Hi everybody!
I want to try debuging GNU ASM programms by simulavr, but have no ideas how to change registers values while step by step debuging, i.e. simulate events

=======exampe.S=======

#include <avr/io.h>
#define SFR(X) _SFR_IO_ADDR(X)
temp = 16
START = PD0
STOP = PD1
    .section .text
    .global main
main:
    rjmp init
init:
    ser    temp
    out    SFR(DDRB),temp
    out    SFR(PORTB),temp
    clr    temp
    out    SFR(DDRD),temp
    ldi    temp,0x03
    out    SFR(PORTD),temp
waits:    sbis    SFR(PIND),START
    rjmp    waits
    nop
    nop
    nop
    nop
    rjmp    init

============================

Compile:

avr-gcc -Wa,--gstabs -mmcu=atmega16a example.S -o example.o

Simulavr - start server and watch registers state:

simulavr -g -P simulavr-dip -X -d atmega16

How I can change PIND state? I'm using Emacs as IDE.


Best Regards
Valber



_______________________________________________
Simulavr-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/simulavr-devel

Reply via email to