Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;not done yet, so so far:
- ;This is a ti-83+ asm file
- #include "ti83plus.inc"
- .org userMem - 2
- .db t2ByteTok, tAsmCmp
- ;Program Here:
- dispText:
- b_call(_ClrLCDFull)
- ld hl, (xpos)
- ld (penCol), hl
- ld hl, text
- b_call(_VPutS)
- main:
- ; $BF is the group for the mode key
- ; so then to check for a quit, check the 7'th bit of the data for 0
- ld a, $FF
- out (1), a
- ld a, $BF
- out (1), a
- nop
- nop
- in a, (1)
- bit 7, a
- jr nz, check
- ret
- check:
- ; now we do group $FE to check arrow keys
- ld a, $FF
- out (1), a
- ld a, $FE
- out (1), a
- nop
- nop
- in a, (1)
- bit 0, a
- jp z, down
- bit 1, a
- jp z, left
- bit 2, a
- jp z, right
- bit 3, a
- jp z, up
- jp main
- down:
- call mDown ; this is why we came here, no?
- bit 1, a
- call z, mLeft ; just to check if left + down have been pressed
- bit 2, a
- call z, mRight ; just to check if right + down have been pressed
- jp dispText
- left:
- call mLeft
- bit 3, a
- call z, mUp
- jp dispText
- right:
- ; already checked for down and left
- call mRight
- bit 3, a
- call z, mUp
- jp dispText
- up:
- call mUp
- jp dispText
- mDown:
- ret
- mLeft:
- ret
- mRight:
- ret
- mUp:
- ret
- xpos:
- .db 0
- ypos:
- .db 0
- text:
- .db "Hello ASM.", 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement