[A83] Re: SDCC Port


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

[A83] Re: SDCC Port



Look like the tabs were not preserved in my last email.  Here's a copy of 
the code with tabs converted to spaces (alternatively, download it with the 
linkfile and asm.bat at http://ti8xds.sourceforge.net/test.zip):

---BEGIN CODE---
;Messing with IY test

INCLUDE "ti8xds_ion.inc"

xcall: MACRO
       pop    IY
       bcall  \1
       push   IY
       ENDM

SECTION "TEST",CODE
Header:
       xor    a
       jr     nc,start
       db     "IY Test", 0
start:
       jp     Main

Main:
       push   IY

.loop
       ;delay a while, to test the effects of an interrupt
       ;hapenning in the middle of some code
.delay
       dec    BC
       ld     A, B
       or     A, C
       jp     nz, .delay

       ;put some text, we're still alive!
       ld     HL, Text
       xcall  _puts

       ;get a key, and quit if it's celar
       xcall  _getkey
       cp     $09
       jp     z,.bail

       ;fuck with IY
       inc    IY

       jp     .loop

.bail
       pop    IY
       ret

Text:
       DB     " This is a test "
---END CODE---

Stupid like a fox!
Look ma, I'm an artist: http://aaronstj.deviantart.com



_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail