Hi,

first of all i hope, that my question lies within the realm of validity
of this mailing-list. It's also possible, that simulavr is not the
problem. In this case i would appreciate tips for where to pose this
question.


I just compiled the latest simulavr from the git-repository, to test
some simple programs written in assembler. 

Simulavr in combination with ddd and gdb did a great job for the most
programs. But one simple program behaves incorrectly.

Here's the code of the assembler file:


#include <avr/io.h>

#define test 16

.section .data
.equ k,255
output:
.asciz "Hallo Welt"

.section .bss
.comm buffer, 20

.section .text
.global main

delay:
ld test, X
nop
ret

main:
ldi XL, 0x60
ldi XH, 0x00
main_loop:
rcall delay
rjmp main_loop


After i loaded the binary file and connected gdb with simulavr

(gdb) x/20xb &output

yields an empty memory within the defined range.

So the question i pose is, whether the error (that the string is not
located in the SRAM) is produced by simulavr or avr-gcc?


Besides that, maybe sb. who is reading my post can answer me this
question, too: How can i bring the address of the string labeled by
output in the pointer register X? The possibility i have chosen above
isn't very elegant... (lo8(..) and hi8() both give errors)

Kind regards and thanks for your effort

Johannes D.




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

Reply via email to