A simple assembler newbie question
awasson
Posts: 57
I've been re-reading Gunther's book, Programming the SX Microcontroller for the second time and for me, it's well worth the effort but I've run into a little problem.
In the section about Correctly Addressing SX Data Memory there are 2 listings TUT006.SRC and TUT007.SRC that explain how important it is to call the bank before doing anything with the area of memory that you want to use. The concept makes absolute sense to me however the code is not running as expected.
In the example, I have 4 memory locations that will increment one after another and then loop to do it all over again however that is not what happens when I step through the program. Only the first two registers increment and start to loop while ignoring the 3rd and 4th. Can anyone see where I've made a mistake in the code?
Thanks,
Andrew
In the section about Correctly Addressing SX Data Memory there are 2 listings TUT006.SRC and TUT007.SRC that explain how important it is to call the bank before doing anything with the area of memory that you want to use. The concept makes absolute sense to me however the code is not running as expected.
In the example, I have 4 memory locations that will increment one after another and then loop to do it all over again however that is not what happens when I step through the program. Only the first two registers increment and start to loop while ignoring the 3rd and 4th. Can anyone see where I've made a mistake in the code?
ifdef __SASM DEVICE SX28L, OSCHS3, STACKX, OPTIONX IRC_CAL IRC_FAST FREQ 50_000_000 else DEVICE SX28AC, OSCHS, OPTIONX endif DEVICE TURBO RESET Start Start bank $10 inc $10 bank $30 inc $30 bank $50 inc $50 bank $70 inc $70 jmp Start
Thanks,
Andrew
Comments
My mistake.
The code is fine, I was just hitting debug again instead of the debug icon and the code wan't being updated in the chip.
Thanks for looking
Andrew
please;
assembler sht11 for at89c52 to lcd
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA