adding entry routines

This commit is contained in:
Dagen Brock 2015-02-26 10:04:10 -06:00
parent c6500f1911
commit 64992ae08d
2 changed files with 63 additions and 8 deletions

View File

@ -1,6 +1,9 @@
**************************************************
* Apple Standard Memory Locations
**************************************************
CH EQU $24
CV EQU $25
CLRLORES equ $F832
LORES equ $C050
TXTSET equ $C051
@ -51,5 +54,6 @@ RDKEY equ $FD0C ; Displays blinking cursor; goes to standard input
; routine, nonnally KEYIN or BASICIN
SCRN equ $F871 ; Reads color of a low-resolution block
SETCOL equ $F864 ; Sets the color for plotting in low-resolution block
VTABZ equ $FC24 ; Sets the cursor vertical position
VTAB equ $FC22 ; Sets the cursor vertical position (from CV)
VTABZ equ $FC24 ; Sets the cursor vertical position (0)
VLINE equ $F828 ; Draws a vertical line of low-resolution blocks

View File

@ -14,6 +14,8 @@
MLI equ $bf00
jsr DrawMenu
jsr GetStartBank
jsr GetThing
jsr WaitKey
@ -31,6 +33,54 @@ QuitParm dfb 4 ; number of parameters
Error brk $00 ; shouldn't be here either
GetStartBank
lda #13
sta $24
lda #10
sta $25
jsr VTAB
lda #"$"
sta $33
jsr GetHex
jsr RDKEY
jsr PRBYTE
rts
* Pass desired length in A
GetHex sta _gethex_maxlen
:input jsr RDKEY
cmp #"9"+1
bcs :notNum ;bge > 9
cmp #"0"
bcc :badChar ;
sec
sbc #"0"
bra :gotHex
:notNum cmp #"a"
bcc :notLower
sec
sbc #$20 ; ToUpper
:notLower cmp #"A"
bcc :badChar
cmp #"F"+1
bcs :badChar
:gotHex jsr PRHEX
rts
:badChar bra :input
_gethex_maxlen db 1
GetThing lda #13
sta $24
lda #10
sta $25
jsr VTAB
lda #"$"
sta $33
jsr GETLN
rts
DrawMenu jsr HOME
lda #MenuStrs
@ -81,13 +131,13 @@ PrintString sta $0
:done rts
MenuStrs
asc " *********************** ",$8D,$00
asc " ** **",$8D,$00
asc " ** Mini Memory Tester **",$8D,$00
asc " ** Reactive Micro **",$8D,$00
asc " ** (beta) **",$8D,$00
asc " ** **",$8D,$00
asc " *********************** ",$8D,$00
asc " *********************** ",$8D,$00
asc " ** **",$8D,$00
asc " ** Mini Memory Tester **",$8D,$00
asc " ** Reactive Micro **",$8D,$00
asc " ** (beta) **",$8D,$00
asc " ** **",$8D,$00
asc " *********************** ",$8D,$00
asc $8D,$8D,$8D,$00
asc " Start BANK: ",$8D,$00
asc " End BANK: ",$8D,$8D,$00
@ -111,4 +161,5 @@ StartBank db #$02
EndBank db #$7F
StartAddr dw #$0000
EndAddr dw #$FFFF
TestValue dw #$00