[A83] Re: SDCC Port


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

[A83] Re: SDCC Port



> Van: Aaron St.John <aaronstj@hotmail.com>
> 
> 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):

As far as I can see; run this and press [2nd] or [Alpha] a couple of times.
It will change bits at 'random' locations (shiftflags+IY). There are off
coarse the APD counter and probably some other stuff that the TIOS
interrupt writes to IY.

"Off coarse" (kinda) it will not crash. Try put some game on your calc (you
probably don't have one when you develop), and run it after you run your
test program. It "should" crash.

Could also be that the TIOS interrupt restores the IY to what it is
supposed to be. You could try to display IY.

	Henk Poley <><

> ---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---