A86:4 Questions
[Prev][Next][Index][Thread]
A86:4 Questions
4 (possibly stupid to the advanced programmers) questions:
1) what the heck is text_shadow?
2) for this question, i shall cut and paste some code from Sqrxz:
XScr = $C0F9
XBlock = $C0FC
LevelSize = $C0FD
what do these things do? i know they're equates and all that, but are
they kinda like the equivalent of variables? Are $C0FC and those things just
spaces in the RAM, or are they ROM calls or what?
3) again taken as an example from Sqrxz: res appTextSave,(iy+appflags)
what does this do? i know it resets the bit in whatever appTextSave is,
but what are appTextSave and iy+appflags?
4) finally, i have built this program just to try to figure out if I knew how
to use sprites and the PutSprite routine......obviously not because either I'm
not getting a key correctly, or I just have a simple mistake with my program
that one of you ASM wizards could show me.
#include "ti86asm.inc"
#include "asm86.h"
.org _asm_exec_ram
MainLoop45:
call _clrLCD
call BUSY_OFF
ld ix,NewSprite
ld hl,$fc00
ld bc,$4028
call PutSprite
ASK_FOR_KEY:
call _getky
cp K_LEFT
jp z,LEFT
cp K_RIGHT
jp z,RIGHT
cp K_SECOND
jp z,SECOND
cp K_EXIT
jp z,EXIT
jp ASK_FOR_KEY
LEFT:
ld a,16
cp b
jr z,ASK_FOR_KEY
dec b
ld ix,NewSprite
call PutSprite
jr ASK_FOR_KEY
RIGHT:
ld a,112
cp b
jr z,ASK_FOR_KEY
inc b
ld ix,NewSprite
call PutSprite
jr ASK_FOR_KEY
SECOND:
inc c
inc c
inc c
ld b,35
Loop:
push bc ;push counter
inc c
ld ix,NewSprite2
call PutSprite
ld a,8
cp c
jp z,ASK_FOR_KEY
pop bc ;get back counter
djnz Loop
EXIT:
ret
;Input: b,c = x,y; ix = 8x8 sprite location
;Output: sprite drawn; ix points to byte after sprite; bc unchanged
PutSprite:
push bc ;save bc so that this routine can boast preserving
it
ld h,63 ;CLEM's Findpixel
ld a,c ; |
;it goes through this whold PutSprite routine. don't worry, i have all of it.
i just ended
;it here to take up less space.
NewSprite:
.db %00000000
.db %00000000
.db %00000000
.db %00000000
.db %00011000
.db %00111100
.db %01111110
.db %11111111
NewSprite2:
.db %00000000
.db %00000000
.db %00000000
.db %00000000
.db %00011000
.db %00011000
.db %00011000
.db %00011000
.end
well, i hope someone out there can find something wrong with my code. I would
recommend running it in an emulator, as it will probably crash your calc.