I made a test asm program for converting numbers in mmeory to decimal and print them. by debugging the program actually works but _putC has a weird behaviour. So I created a smaller, basical program and it present similar problems:
it prints correctly 73820 but followed by 70194 that is "7382070194"
if I limit the loop to the 4 iterations it prints 738270194. So where does that appendix come from?
Am I using _putC in the wrong way or have I initialized memory in the wrong place?
thank you.
Code:
it prints correctly 73820 but followed by 70194 that is "7382070194"
if I limit the loop to the 4 iterations it prints 738270194. So where does that appendix come from?
Am I using _putC in the wrong way or have I initialized memory in the wrong place?
thank you.
Code:
#define equ .equ
#define EQU .EQU
#include "../tasm32/ti86asm.inc"
.org _asm_exec_ram ; the address of mem from where to start
call _clrLCD
ld A,3
ld (_curRow),A
ld A,1
ld (_curCol),A
ld BC,0
reading_loop:
ld IX, list_of_byte;
add IX, BC
ld A, (ix)
add A, L0
call _putC
inc C
ld A, C
cp 5
jp NZ, reading_loop
ret
list_of_byte:
.db 7, 3, 8, 2, 0
;
.end