I'm trying to make a little ASM project for the CE, but the code isn't working properly.
(I'm writing with eZ80 studio by the way)
Code:
dark mode does not get toggled, and the exiting does not work properly. When you try to exit, it just flickers, and you have to perform a RAM reset.
The run indicator part works properly, though.
(I'm writing with eZ80 studio by the way)
Code:
main:
call ClrLCDFull
call HomeUp
ld hl,greet1
call PutS
ld hl,greet2
call NewLine
call PutS
call GetKey
menu:
call ClrLCDFull
call HomeUp
ld hl, menuGreet
call PutS
call NewLine
ld hl,menu1
call PutS
call NewLine
ld hl,menu2
call PutS
ld hl,menuEnd
call NewLine
call PutS
jr wait
wait:
call GetKey
ld a,(kbdScanCode)
cp a,k1
jp nz,runInd
cp a,k2
jp nz,textToggle
cp a,k3
ret nz
jp wait
runInd:
call RunIndicOff
jr menu
textToggle:
ld (hl),textFlagsLoc
ld a,08
xor a,(hl)
ld (hl),a
jp menu
greet1:
db "text",0
greet2:
db "just more text",0
menuGreet:
db "greeting thing",0
menu1:
db "1:run indicator",0
menu2:
db "2:toggle dark mode",0
menuEnd:
db "3:exit",0dark mode does not get toggled, and the exiting does not work properly. When you try to exit, it just flickers, and you have to perform a RAM reset.
The run indicator part works properly, though.