Yes
It finally worked,
I admit i confused with direct and indirect addressing too
Thank you again for the great work :)
Le 2014-09-30 07:36, Ben Shi a écrit :
> I do not find anything wrong with the sdasstm8,
>
> 08 72 C6 00 00 [ 4] 53 ld a, [_p]
> 0C 72 CE 00 00 [ 5] 54 ldw
I do not find anything wrong with the sdasstm8,
08 72 C6 00 00 [ 4] 53 ld a, [_p]
0C 72 CE 00 00 [ 5] 54 ldw x, [_p]
10 91 CE 00 [ 5] 55 ldw y, [_p]
it seems all right.
Maybe the only way remains is make a
I have checked the generated code of indirect addressing ld/ldw instructions,
and find no error. The only way remains is that make c code work first and then
make a contract with your own asm code.
Actually, there is no difference between c and asm while using a pointer
variable.
1. It is also
Does your c code work? If so, what are the differences between the generated
asm and your own asm ?
r...@remi.lu编写:
>hi,
>
>I tried following a c/asm generated code by sdcc , but now it only
>prints the T , like the INCrementing doesnt do it:
>
>
>any help ?, and as I said , when I use thing.w
hi,
I tried following a c/asm generated code by sdcc , but now it only
prints the T , like the INCrementing doesnt do it:
any help ?, and as I said , when I use thing.w , the "thing"
register/variable is not recognised, it takes is as a new reference ...
the .w to make show as a word, is not
Hello
I tested your suggestion, then replaced the ADDW with INCW ... still not
working
this time, the carracter it self is incremented
as if the syntax
ldw X,[_charptr] doesnt return a pointer ...
If you guys think this is not a bug, I can try forum@st and try to port
their answe
the _pointer is a 16-bit variable, and stm8 is big endian. you might need
ld y, _pointer
addw y, #1
ld _pointer, y
to replace inc _pointer
r...@remi.lu编写:
>
>
>hello
>
>with this code i get printed : "t333"
>
>you think the X register gets polluted by the delay fonction ?
>
>Regard
Sorry i forgot to add ,
I had to remove the .w , to make it assemble otherwise i get
ASlink >> -f main.lk
ASlink >> -muwx
ASlink >> -i main.ihx
ASlink >> -Y
ASlink >> -b HOME = 0x8000
ASlink >> -b DATA = 0x0001
ASlink >> -k /usr/local/bin/../share/sdcc/lib/stm8
ASlink >> -k /usr/local/share/
hello
with this code i get printed : "t333"
you think the X register gets polluted by the delay fonction ?
Regards
Le 26.09.2014 04:11, Ben Shi a écrit :
> I am not sure how your function _lcdwritechar works, but I guess you might
> need such kind of code,
>
> .area DATA
>
I am not sure how your function _lcdwritechar works, but I guess you might need
such kind of code,
.area DATA
_varOne:
.ds 1
_lcdchar:
.ds 1
_pointer:
.ds 1
.
ldw x, #_string_0
ldw _pointer, x
main_loop:
LDW X, #0d50
CALL delay_m
CALL ledon
LDW X, #0d50
CALL delay_m
10 matches
Mail list logo