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:
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",0

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 adjusted the code try it now.

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",0

I also don't think the following piece of code works with EZ80 studio.

Code:
ld a,(kbdScanCode)

The following line of your code also takes up extra memory.

Code:
ld hl, menuGreet


I think you should try to use the following hexcode.

Code:
Text Inverse
:Asm84CEPrgm
:FD7E05EE08FD7705C9

You might also want to try the following hexcode.

Code:
Dark Mode
Asm84CEPrgm
:3E21B7211808F8CD9EA8D16C36012E0D7EE6F020FB2DCB5620FC6C77C906031717177710FAC9
I'm using a new OS, so I can't run hexcodes.
Ok, so then I won't know but I will try looking for a TIOS call that you can use.
Did you look at this?

Code:
PutMap
Display
Displays a character in the large font without affecting cursor position.
ACC = character to display, see TI83plus.inc
textInverse, (IY + textFlags) = 1 to display in reverse video
appTextSave, (IY + appFlags) = 1 to write char to textShadow also
preClrForMode, (IY + newDispF) = 1 to preclear the character space before
writing
This is done when toggling between inverted and uninverted.
(curRow) = home screen row to display in, 0-7
(curCol) = home screen column to display in, 0-15
None
None
None
None
See: PutC.
Display char C in row 3 column 4:
 LD HL,4*256+3
 LD (curRow),HL ; set curRow & curCol
;
 LD A,'C'
 CALL PutMap
;
How does
Code:
ld hl, menuGreet
take up extra space?
claculator wrote:
How does
Code:
ld hl, menuGreet
take up extra space?

After the comma you have a space. It's not really important but I just wanted to mention it.

I have also found the following piece of code in a older topic.

Code:
main:
 ld hl, $f80818
 ld (hl), h
 ld (hl), $ffffff
 ld (hl), $21
 ld l, h
 ld (hl), $01
 ret
I made a functioning version of it without dark mode for the 84+(non-CE) using Mimas, I'll share it when I get home.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement