Question
pointer problem (sdcc assembler)
Posted on September 26, 2014 at 16:37
Hello
With the code below, i get returned an incremented caracter it self , the pointer is not,is it normal ? meaning my code is wrong . i mean i get U not O ...Or should I file a bug at sdcc comunity? ldw X,&sharpstring_0 ldw _charptr, Xmain_loop: LDW X, &sharp0d50 CALL delay_m CALL ledon LDW X, &sharp0d50 CALL delay_m CALL ledoff ldw Y,[_charptr] ; <---- not returning what is at that address ldw _lcdchar, Y call _lcdwritechar ldw Y, _charptr incw Y ldw _charptr, Y JP main_loop.area CODE
string_0: .ascii ''toto'' .db 0x00 #stm8-sdcc-linux-sdasm-sdasstm8