mirror of
https://github.com/tjboldt/Apple2-IO-RPi.git
synced 2024-05-28 09:41:30 +00:00
Assembler clean-up
This commit is contained in:
parent
24b9f62d88
commit
34af9d54c7
BIN
Apple2/27256.bin
BIN
Apple2/27256.bin
Binary file not shown.
Binary file not shown.
|
@ -24,6 +24,9 @@ ExecCommand = $05
|
||||||
LoadFileCommand = $06
|
LoadFileCommand = $06
|
||||||
SaveFileCommand = $07
|
SaveFileCommand = $07
|
||||||
|
|
||||||
|
InputString = $fd67
|
||||||
|
PrintChar = $fded
|
||||||
|
|
||||||
.org SLOT*$100 + $C000
|
.org SLOT*$100 + $C000
|
||||||
;ID bytes for booting and drive detection
|
;ID bytes for booting and drive detection
|
||||||
cpx #$20 ;ID bytes for ProDOS and the
|
cpx #$20 ;ID bytes for ProDOS and the
|
||||||
|
@ -66,7 +69,7 @@ endSendHelp:
|
||||||
lda #$a4
|
lda #$a4
|
||||||
sta $33
|
sta $33
|
||||||
GetCommand:
|
GetCommand:
|
||||||
jsr $fd67
|
jsr InputString
|
||||||
lda $0200
|
lda $0200
|
||||||
cmp #$8d ;skip when return found
|
cmp #$8d ;skip when return found
|
||||||
beq GetCommand
|
beq GetCommand
|
||||||
|
@ -93,7 +96,7 @@ DumpOutput:
|
||||||
jsr GetByte
|
jsr GetByte
|
||||||
cmp #$00
|
cmp #$00
|
||||||
beq endOutput
|
beq endOutput
|
||||||
jsr $fded
|
jsr PrintChar
|
||||||
clc
|
clc
|
||||||
bcc DumpOutput
|
bcc DumpOutput
|
||||||
endOutput:
|
endOutput:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
ca65 V2.17 - Raspbian 2.17-1
|
ca65 V2.18 - N/A
|
||||||
Main file : CommandFirmware.asm
|
Main file : CommandFirmware.asm
|
||||||
Current file: CommandFirmware.asm
|
Current file: CommandFirmware.asm
|
||||||
|
|
||||||
|
@ -28,6 +28,9 @@ Current file: CommandFirmware.asm
|
||||||
000000r 1 LoadFileCommand = $06
|
000000r 1 LoadFileCommand = $06
|
||||||
000000r 1 SaveFileCommand = $07
|
000000r 1 SaveFileCommand = $07
|
||||||
000000r 1
|
000000r 1
|
||||||
|
000000r 1 InputString = $fd67
|
||||||
|
000000r 1 PrintChar = $fded
|
||||||
|
000000r 1
|
||||||
000000r 1 .org SLOT*$100 + $C000
|
000000r 1 .org SLOT*$100 + $C000
|
||||||
00C700 1 ;ID bytes for booting and drive detection
|
00C700 1 ;ID bytes for booting and drive detection
|
||||||
00C700 1 E0 20 cpx #$20 ;ID bytes for ProDOS and the
|
00C700 1 E0 20 cpx #$20 ;ID bytes for ProDOS and the
|
||||||
|
@ -70,7 +73,7 @@ Current file: CommandFirmware.asm
|
||||||
00C739 1 A9 A4 lda #$a4
|
00C739 1 A9 A4 lda #$a4
|
||||||
00C73B 1 85 33 sta $33
|
00C73B 1 85 33 sta $33
|
||||||
00C73D 1 GetCommand:
|
00C73D 1 GetCommand:
|
||||||
00C73D 1 20 67 FD jsr $fd67
|
00C73D 1 20 67 FD jsr InputString
|
||||||
00C740 1 AD 00 02 lda $0200
|
00C740 1 AD 00 02 lda $0200
|
||||||
00C743 1 C9 8D cmp #$8d ;skip when return found
|
00C743 1 C9 8D cmp #$8d ;skip when return found
|
||||||
00C745 1 F0 F6 beq GetCommand
|
00C745 1 F0 F6 beq GetCommand
|
||||||
|
@ -97,7 +100,7 @@ Current file: CommandFirmware.asm
|
||||||
00C768 1 20 9B C7 jsr GetByte
|
00C768 1 20 9B C7 jsr GetByte
|
||||||
00C76B 1 C9 00 cmp #$00
|
00C76B 1 C9 00 cmp #$00
|
||||||
00C76D 1 F0 06 beq endOutput
|
00C76D 1 F0 06 beq endOutput
|
||||||
00C76F 1 20 ED FD jsr $fded
|
00C76F 1 20 ED FD jsr PrintChar
|
||||||
00C772 1 18 clc
|
00C772 1 18 clc
|
||||||
00C773 1 90 F3 bcc DumpOutput
|
00C773 1 90 F3 bcc DumpOutput
|
||||||
00C775 1 endOutput:
|
00C775 1 endOutput:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
ca65 V2.17 - Raspbian 2.17-1
|
ca65 V2.18 - N/A
|
||||||
Main file : DriveFirmware.asm
|
Main file : DriveFirmware.asm
|
||||||
Current file: DriveFirmware.asm
|
Current file: DriveFirmware.asm
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,9 @@ ExecCommand = $05
|
||||||
LoadFileCommand = $06
|
LoadFileCommand = $06
|
||||||
SaveFileCommand = $07
|
SaveFileCommand = $07
|
||||||
|
|
||||||
|
InputString = $fd67
|
||||||
|
Monitor = $ff59
|
||||||
|
|
||||||
.org SLOT*$100 + $C000
|
.org SLOT*$100 + $C000
|
||||||
;ID bytes for booting and drive detection
|
;ID bytes for booting and drive detection
|
||||||
cpx #$20 ;ID bytes for ProDOS and the
|
cpx #$20 ;ID bytes for ProDOS and the
|
||||||
|
@ -50,7 +53,7 @@ Start:
|
||||||
sta $33
|
sta $33
|
||||||
|
|
||||||
GetFilename:
|
GetFilename:
|
||||||
jsr $fd67
|
jsr InputString
|
||||||
|
|
||||||
LoadFile:
|
LoadFile:
|
||||||
lda #$00
|
lda #$00
|
||||||
|
@ -99,7 +102,7 @@ NextByteFinal:
|
||||||
cpy BlockLo
|
cpy BlockLo
|
||||||
bne NextByteFinal
|
bne NextByteFinal
|
||||||
ExitToMonitor:
|
ExitToMonitor:
|
||||||
jsr $ff59
|
jsr Monitor
|
||||||
|
|
||||||
SendByte:
|
SendByte:
|
||||||
pha
|
pha
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
ca65 V2.17 - Raspbian 2.17-1
|
ca65 V2.18 - N/A
|
||||||
Main file : FileAccessFirmware.asm
|
Main file : FileAccessFirmware.asm
|
||||||
Current file: FileAccessFirmware.asm
|
Current file: FileAccessFirmware.asm
|
||||||
|
|
||||||
|
@ -28,6 +28,9 @@ Current file: FileAccessFirmware.asm
|
||||||
000000r 1 LoadFileCommand = $06
|
000000r 1 LoadFileCommand = $06
|
||||||
000000r 1 SaveFileCommand = $07
|
000000r 1 SaveFileCommand = $07
|
||||||
000000r 1
|
000000r 1
|
||||||
|
000000r 1 InputString = $fd67
|
||||||
|
000000r 1 Monitor = $ff59
|
||||||
|
000000r 1
|
||||||
000000r 1 .org SLOT*$100 + $C000
|
000000r 1 .org SLOT*$100 + $C000
|
||||||
00C700 1 ;ID bytes for booting and drive detection
|
00C700 1 ;ID bytes for booting and drive detection
|
||||||
00C700 1 E0 20 cpx #$20 ;ID bytes for ProDOS and the
|
00C700 1 E0 20 cpx #$20 ;ID bytes for ProDOS and the
|
||||||
|
@ -54,7 +57,7 @@ Current file: FileAccessFirmware.asm
|
||||||
00C71B 1 85 33 sta $33
|
00C71B 1 85 33 sta $33
|
||||||
00C71D 1
|
00C71D 1
|
||||||
00C71D 1 GetFilename:
|
00C71D 1 GetFilename:
|
||||||
00C71D 1 20 67 FD jsr $fd67
|
00C71D 1 20 67 FD jsr InputString
|
||||||
00C720 1
|
00C720 1
|
||||||
00C720 1 LoadFile:
|
00C720 1 LoadFile:
|
||||||
00C720 1 A9 00 lda #$00
|
00C720 1 A9 00 lda #$00
|
||||||
|
@ -103,7 +106,7 @@ Current file: FileAccessFirmware.asm
|
||||||
00C76D 1 C4 46 cpy BlockLo
|
00C76D 1 C4 46 cpy BlockLo
|
||||||
00C76F 1 D0 F6 bne NextByteFinal
|
00C76F 1 D0 F6 bne NextByteFinal
|
||||||
00C771 1 ExitToMonitor:
|
00C771 1 ExitToMonitor:
|
||||||
00C771 1 20 59 FF jsr $ff59
|
00C771 1 20 59 FF jsr Monitor
|
||||||
00C774 1
|
00C774 1
|
||||||
00C774 1 SendByte:
|
00C774 1 SendByte:
|
||||||
00C774 1 48 pha
|
00C774 1 48 pha
|
||||||
|
|
|
@ -25,6 +25,11 @@ LoadFileCommand = $06
|
||||||
SaveFileCommand = $07
|
SaveFileCommand = $07
|
||||||
MenuCommand = $08
|
MenuCommand = $08
|
||||||
|
|
||||||
|
Wait = $fca8
|
||||||
|
PrintChar = $fded
|
||||||
|
Home = $fc58
|
||||||
|
ReadChar = $fd0c
|
||||||
|
|
||||||
.org SLOT*$100 + $C000
|
.org SLOT*$100 + $C000
|
||||||
;ID bytes for booting and drive detection
|
;ID bytes for booting and drive detection
|
||||||
cpx #$20 ;ID bytes for ProDOS and the
|
cpx #$20 ;ID bytes for ProDOS and the
|
||||||
|
@ -52,13 +57,13 @@ Start:
|
||||||
sta $36
|
sta $36
|
||||||
lda #$fd
|
lda #$fd
|
||||||
sta $37
|
sta $37
|
||||||
jsr $fc58 ;clear screen and show menu options
|
jsr Home ;clear screen and show menu options
|
||||||
ldy #$00
|
ldy #$00
|
||||||
PrintString:
|
PrintString:
|
||||||
lda Text,y
|
lda Text,y
|
||||||
beq WaitForRPi
|
beq WaitForRPi
|
||||||
ora #$80
|
ora #$80
|
||||||
jsr $fded
|
jsr PrintChar
|
||||||
iny
|
iny
|
||||||
bne PrintString
|
bne PrintString
|
||||||
|
|
||||||
|
@ -67,13 +72,13 @@ WaitForRPi:
|
||||||
rol
|
rol
|
||||||
bcs OK
|
bcs OK
|
||||||
lda #$ff
|
lda #$ff
|
||||||
jsr $fca8
|
jsr Wait
|
||||||
lda #$ae
|
lda #'.'
|
||||||
jsr $fded
|
jsr PrintChar
|
||||||
jmp WaitForRPi
|
jmp WaitForRPi
|
||||||
|
|
||||||
OK:
|
OK:
|
||||||
jsr $fc58 ;clear screen
|
jsr Home ;clear screen
|
||||||
|
|
||||||
lda #MenuCommand ;request menu text from RPi
|
lda #MenuCommand ;request menu text from RPi
|
||||||
jsr SendByte
|
jsr SendByte
|
||||||
|
@ -82,12 +87,12 @@ DumpOutput:
|
||||||
jsr GetByte
|
jsr GetByte
|
||||||
cmp #$00
|
cmp #$00
|
||||||
beq GetChar
|
beq GetChar
|
||||||
jsr $fded
|
jsr PrintChar
|
||||||
clc
|
clc
|
||||||
bcc DumpOutput
|
bcc DumpOutput
|
||||||
|
|
||||||
GetChar:
|
GetChar:
|
||||||
jsr $fd0c
|
jsr ReadChar
|
||||||
sec ;subtract ascii "1" to get 0 - 3 from "1" to "4"
|
sec ;subtract ascii "1" to get 0 - 3 from "1" to "4"
|
||||||
sbc #$b1
|
sbc #$b1
|
||||||
asl ;put in top nibble as EPROM page
|
asl ;put in top nibble as EPROM page
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
ca65 V2.17 - Raspbian 2.17-1
|
ca65 V2.18 - N/A
|
||||||
Main file : MenuFirmware.asm
|
Main file : MenuFirmware.asm
|
||||||
Current file: MenuFirmware.asm
|
Current file: MenuFirmware.asm
|
||||||
|
|
||||||
|
@ -29,6 +29,11 @@ Current file: MenuFirmware.asm
|
||||||
000000r 1 SaveFileCommand = $07
|
000000r 1 SaveFileCommand = $07
|
||||||
000000r 1 MenuCommand = $08
|
000000r 1 MenuCommand = $08
|
||||||
000000r 1
|
000000r 1
|
||||||
|
000000r 1 Wait = $fca8
|
||||||
|
000000r 1 PrintChar = $fded
|
||||||
|
000000r 1 Home = $fc58
|
||||||
|
000000r 1 ReadChar = $fd0c
|
||||||
|
000000r 1
|
||||||
000000r 1 .org SLOT*$100 + $C000
|
000000r 1 .org SLOT*$100 + $C000
|
||||||
00C700 1 ;ID bytes for booting and drive detection
|
00C700 1 ;ID bytes for booting and drive detection
|
||||||
00C700 1 E0 20 cpx #$20 ;ID bytes for ProDOS and the
|
00C700 1 E0 20 cpx #$20 ;ID bytes for ProDOS and the
|
||||||
|
@ -56,13 +61,13 @@ Current file: MenuFirmware.asm
|
||||||
00C71B 1 85 36 sta $36
|
00C71B 1 85 36 sta $36
|
||||||
00C71D 1 A9 FD lda #$fd
|
00C71D 1 A9 FD lda #$fd
|
||||||
00C71F 1 85 37 sta $37
|
00C71F 1 85 37 sta $37
|
||||||
00C721 1 20 58 FC jsr $fc58 ;clear screen and show menu options
|
00C721 1 20 58 FC jsr Home ;clear screen and show menu options
|
||||||
00C724 1 A0 00 ldy #$00
|
00C724 1 A0 00 ldy #$00
|
||||||
00C726 1 PrintString:
|
00C726 1 PrintString:
|
||||||
00C726 1 B9 B8 C7 lda Text,y
|
00C726 1 B9 B8 C7 lda Text,y
|
||||||
00C729 1 F0 08 beq WaitForRPi
|
00C729 1 F0 08 beq WaitForRPi
|
||||||
00C72B 1 09 80 ora #$80
|
00C72B 1 09 80 ora #$80
|
||||||
00C72D 1 20 ED FD jsr $fded
|
00C72D 1 20 ED FD jsr PrintChar
|
||||||
00C730 1 C8 iny
|
00C730 1 C8 iny
|
||||||
00C731 1 D0 F3 bne PrintString
|
00C731 1 D0 F3 bne PrintString
|
||||||
00C733 1
|
00C733 1
|
||||||
|
@ -71,13 +76,13 @@ Current file: MenuFirmware.asm
|
||||||
00C736 1 2A rol
|
00C736 1 2A rol
|
||||||
00C737 1 B0 0D bcs OK
|
00C737 1 B0 0D bcs OK
|
||||||
00C739 1 A9 FF lda #$ff
|
00C739 1 A9 FF lda #$ff
|
||||||
00C73B 1 20 A8 FC jsr $fca8
|
00C73B 1 20 A8 FC jsr Wait
|
||||||
00C73E 1 A9 AE lda #$ae
|
00C73E 1 A9 2E lda #'.'
|
||||||
00C740 1 20 ED FD jsr $fded
|
00C740 1 20 ED FD jsr PrintChar
|
||||||
00C743 1 4C 33 C7 jmp WaitForRPi
|
00C743 1 4C 33 C7 jmp WaitForRPi
|
||||||
00C746 1
|
00C746 1
|
||||||
00C746 1 OK:
|
00C746 1 OK:
|
||||||
00C746 1 20 58 FC jsr $fc58 ;clear screen
|
00C746 1 20 58 FC jsr Home ;clear screen
|
||||||
00C749 1
|
00C749 1
|
||||||
00C749 1 A9 08 lda #MenuCommand ;request menu text from RPi
|
00C749 1 A9 08 lda #MenuCommand ;request menu text from RPi
|
||||||
00C74B 1 20 6A C7 jsr SendByte
|
00C74B 1 20 6A C7 jsr SendByte
|
||||||
|
@ -86,12 +91,12 @@ Current file: MenuFirmware.asm
|
||||||
00C74E 1 20 88 C7 jsr GetByte
|
00C74E 1 20 88 C7 jsr GetByte
|
||||||
00C751 1 C9 00 cmp #$00
|
00C751 1 C9 00 cmp #$00
|
||||||
00C753 1 F0 06 beq GetChar
|
00C753 1 F0 06 beq GetChar
|
||||||
00C755 1 20 ED FD jsr $fded
|
00C755 1 20 ED FD jsr PrintChar
|
||||||
00C758 1 18 clc
|
00C758 1 18 clc
|
||||||
00C759 1 90 F3 bcc DumpOutput
|
00C759 1 90 F3 bcc DumpOutput
|
||||||
00C75B 1
|
00C75B 1
|
||||||
00C75B 1 GetChar:
|
00C75B 1 GetChar:
|
||||||
00C75B 1 20 0C FD jsr $fd0c
|
00C75B 1 20 0C FD jsr ReadChar
|
||||||
00C75E 1 38 sec ;subtract ascii "1" to get 0 - 3 from "1" to "4"
|
00C75E 1 38 sec ;subtract ascii "1" to get 0 - 3 from "1" to "4"
|
||||||
00C75F 1 E9 B1 sbc #$b1
|
00C75F 1 E9 B1 sbc #$b1
|
||||||
00C761 1 0A asl ;put in top nibble as EPROM page
|
00C761 1 0A asl ;put in top nibble as EPROM page
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user