A86: simple code I can't figure out


[Prev][Next][Index][Thread]

A86: simple code I can't figure out




Hi everybody. It's ryan, and I must admit that I've done nothing but delete 
the letters from this chain for awhile, because I've been kind of busy. I'm a 
completely ignorant Z-80 programmer, so I don't really have anything to offer 
anyone right now. Anyways...I read up on a tutorial or two today and 
downloaded some software, and I made this little pointless thing here, and I 
can get it to print out the words but then it crashes my calculator. I've 
tried many different versions of it with little adjustments made each time, 
but I can't seem to get it to work. If someone could tell me what I'm doing 
wrong it'd be greatly appreciated. Thanks.
										
				--RC
#include "ti86asm.inc"
#include "asm86.h"

.org _asm_exec_ram

Start:
 call _clrLCD
 call _homeup
 ld hl,String
 call _puts
 ldir
String:
 .db "did it work?",0
Loop:
 call _getkey
 cp K_EXIT
 jr z,Exit
 cp K_ENTER
 jr z,Exit
 jr Loop
Exit:
 call _clrLCD
 ret

 .end