mirror of
https://github.com/digarok/MiniMemoryTester.git
synced 2025-01-03 03:29:28 +00:00
menu draws vals
This commit is contained in:
parent
0fa69cf098
commit
42656371ee
62
src/mt.s
62
src/mt.s
@ -160,14 +160,15 @@ DrawMenuOptions sta $0
|
|||||||
:drawOption
|
:drawOption
|
||||||
ldy _menuOptionPtr
|
ldy _menuOptionPtr
|
||||||
lda ($0),y
|
lda ($0),y
|
||||||
|
beq :menuDone
|
||||||
tax
|
tax
|
||||||
|
iny
|
||||||
lda ($0),y
|
lda ($0),y
|
||||||
tay
|
tay
|
||||||
jsr GoXY
|
jsr GoXY
|
||||||
ldy _menuOptionPtr
|
ldy _menuOptionPtr
|
||||||
iny
|
iny
|
||||||
iny
|
iny
|
||||||
iny
|
|
||||||
lda ($0),y
|
lda ($0),y
|
||||||
beq :charItem
|
beq :charItem
|
||||||
cmp #1
|
cmp #1
|
||||||
@ -175,32 +176,55 @@ DrawMenuOptions sta $0
|
|||||||
cmp #2
|
cmp #2
|
||||||
beq :jsrItem
|
beq :jsrItem
|
||||||
:charItem
|
:charItem
|
||||||
:hexItem
|
:hexItem iny
|
||||||
|
lda ($0),y ; get len
|
||||||
|
sta _menuHexIdx
|
||||||
|
iny
|
||||||
|
lda ($0),y ; get da
|
||||||
|
sta $2 ; storez
|
||||||
|
iny
|
||||||
|
lda ($0),y ; get da
|
||||||
|
sta $3 ; storez
|
||||||
|
ldy #0
|
||||||
|
:prloop lda ($2),y
|
||||||
|
jsr PRBYTE
|
||||||
|
iny
|
||||||
|
cpy _menuHexIdx
|
||||||
|
bne :prloop
|
||||||
|
lda _menuOptionPtr
|
||||||
|
clc
|
||||||
|
adc #6 ; len of "struct"
|
||||||
|
sta _menuOptionPtr
|
||||||
|
bra :drawOption
|
||||||
:jsrItem
|
:jsrItem
|
||||||
|
:menuDone
|
||||||
rts
|
rts
|
||||||
|
_menuHexIdx dw 0
|
||||||
|
|
||||||
|
|
||||||
_menuOptionPtr dw 00
|
_menuOptionPtr dw 00
|
||||||
MainMenuDefs
|
MainMenuDefs
|
||||||
Menu_StartBank hex 10,10 ; x,y
|
Menu_StartBank hex 0D,0A ; x,y
|
||||||
hex 01,01 ; memory size (bytes), 0=char/1=hex input
|
db 01 ; 0=char/1=hex input 2=Menu JSR
|
||||||
da StartBank ; variable storage
|
db 01 ; memory size (bytes), 0=char/1=hex input
|
||||||
|
da StartBank ; variable storage
|
||||||
Menu_EndBank hex 10,11 ; x,y
|
Menu_EndBank hex 0D,0B ; x,y
|
||||||
hex 01,01 ; memory size (bytes), 0=char/1=hex input
|
db 01 ; 0=char/1=hex input 2=Menu JSR
|
||||||
da EndBank ; variable storage
|
db 01 ; memory size (bytes), 0=char/1=hex input
|
||||||
Menu_StartAddr hex 10,13 ; x,y
|
da EndBank ; variable storage
|
||||||
hex 02,01 ; memory size (bytes), 0=char/1=hex input
|
Menu_StartAddr hex 0D,0D ; x,y
|
||||||
da StartAddr ; variable storage
|
db 01 ; 0=char/1=hex input 2=Menu JSR
|
||||||
Menu_EndAddr hex 10,14 ; x,y
|
db 02 ; memory size (bytes), 0=char/1=hex input
|
||||||
hex 02,01 ; memory size (bytes), 0=char/1=hex input
|
da StartAddr ; variable storage
|
||||||
da EndAddr ; variable storage
|
Menu_EndAddr hex 0D,0E ; x,y
|
||||||
Menu_BeginTest hex 12,15 ; x,y
|
db 01 ; 0=char/1=hex input 2=Menu JSR
|
||||||
|
db 02 ; memory size (bytes), 0=char/1=hex input
|
||||||
|
da EndAddr ; variable storage
|
||||||
|
Menu_BeginTest hex 0D,12 ; x,y
|
||||||
|
db 02 ; 0=char/1=hex input 2=Menu JSR
|
||||||
db MenuStr_BeginTestL ; menu string length
|
db MenuStr_BeginTestL ; menu string length
|
||||||
db 02 ; memory size (bytes), 2=Menu JSR
|
|
||||||
da MenuStr_BeginTest ; string storage
|
da MenuStr_BeginTest ; string storage
|
||||||
|
MainMenuEnd dw 0000
|
||||||
|
|
||||||
|
|
||||||
MenuStr_JSR da BeginTest ; MUST PRECEDE MENU STRING! Yes, it's magicly inferred. (-2)
|
MenuStr_JSR da BeginTest ; MUST PRECEDE MENU STRING! Yes, it's magicly inferred. (-2)
|
||||||
|
Loading…
Reference in New Issue
Block a user