1
0
mirror of https://github.com/stid/woz64.git synced 2024-11-22 11:32:29 +00:00

Working version

This commit is contained in:
stid 2019-11-17 00:52:55 -08:00
parent 65687a91fd
commit 04c83fd5a2
2 changed files with 16 additions and 21 deletions

View File

@ -1,4 +1,4 @@
BasicUpstart2(start)
///BasicUpstart2(start)
* = $8000 "Main"
@ -50,15 +50,13 @@ Raster: cmp $D012
// Execute Item
jsr Shell.push
jsr Shell.wozExec
lda #$0d
jsr Screen.petToScreen
cPrint()
jsr Screen.screenNewLine
jsr Screen.screenNewLine
jsr Shell.clear
jmp loop
inputChar:
jsr Shell.push
jsr Screen.petToScreen
cPrint()
@ -81,10 +79,10 @@ initApp: {
.encoding "screencode_mixed"
testString:
.text "=stid= os - v 0.1.1a"
.text "woz64 - v 0.1.5a"
.byte $8e
.byte 0
.text "----------------------------------------"
.byte $8e, 0
* = $9FFF "EpromFiller"
.byte 0

View File

@ -41,7 +41,12 @@ wozExec: {
SETSTOR:
asl
SETMODE: sta MemMap.SHELL.MODE
SETMODE:
cmp #0
beq !+
eor #%10000000
!:
sta MemMap.SHELL.MODE
BLSKIP: iny
@ -57,7 +62,7 @@ wozExec: {
beq SETMODE // Set BLOCK XAM mode ("." = $AE)
cmp #':'
beq SETSTOR // Set STOR mode! $BA will become $7B
cmp #'R'
cmp #'r'
beq RUN // Run the program! Forget the rest
stx MemMap.SHELL.L // Clear input value (X=0)
stx MemMap.SHELL.H
@ -70,9 +75,7 @@ wozExec: {
eor #$30 // Map digits to 0-9
cmp #9+1 // Is it a decimal digit?
bcc DIG // Yes!
// TODO: THIS IS NOT WORKING
adc #$08 // Map letter "A"-"F" to $FA-FF
adc #$88 // Map letter "A"-"F" to $FA-FF
cmp #$FA // Hex letter?
bcc NOTHEX // No! Character not hex
@ -180,16 +183,10 @@ PRBYTE: pha // Save A for LSD
PRHEX: and #%00001111 // Mask LSD for hex print
ora #'0' // Add "0"
cmp #'9'+1 // Is it a decimal digit?
bcc ECHO // Yes! output it
bcc !+ // Yes! output it
adc #6 // Add offset for letter A-F
jsr Screen.petToScreen
cPrint()
rts
done:
.break
rts
ECHO:
!:
cPrint()
rts