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

View File

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