forked from Apple-2-HW/Apple2-IO-RPi
Enable 80 columns for command line
This commit is contained in:
parent
590575de77
commit
d74c8452f1
@ -46,6 +46,7 @@ DriverEntry:
|
||||
sta OutputFlags
|
||||
|
||||
Start:
|
||||
jsr $c300 ;enable 80 columns
|
||||
lda $33
|
||||
pha
|
||||
lda #$a4
|
||||
@ -53,17 +54,11 @@ Start:
|
||||
GetCommand:
|
||||
jsr $fd67
|
||||
lda $0200
|
||||
cmp #$8d ;stop when return found
|
||||
beq ExitApp
|
||||
cmp #$8d ;skip when return found
|
||||
beq GetCommand
|
||||
jsr DumpOutput
|
||||
clc
|
||||
bcc GetCommand
|
||||
ExitApp:
|
||||
pla
|
||||
sta $33
|
||||
lda #$00
|
||||
sty $34
|
||||
rts
|
||||
|
||||
DumpOutput:
|
||||
lda #$05 ;send command 5 = exec
|
||||
|
@ -50,92 +50,87 @@ Current file: CommandFirmware.asm
|
||||
00C516 1 8D D7 C0 sta OutputFlags
|
||||
00C519 1
|
||||
00C519 1 Start:
|
||||
00C519 1 A5 33 lda $33
|
||||
00C51B 1 48 pha
|
||||
00C51C 1 A9 A4 lda #$a4
|
||||
00C51E 1 85 33 sta $33
|
||||
00C520 1 GetCommand:
|
||||
00C520 1 20 67 FD jsr $fd67
|
||||
00C523 1 AD 00 02 lda $0200
|
||||
00C526 1 C9 8D cmp #$8d ;stop when return found
|
||||
00C528 1 F0 06 beq ExitApp
|
||||
00C52A 1 20 38 C5 jsr DumpOutput
|
||||
00C52D 1 18 clc
|
||||
00C52E 1 90 F0 bcc GetCommand
|
||||
00C530 1 ExitApp:
|
||||
00C530 1 68 pla
|
||||
00C531 1 85 33 sta $33
|
||||
00C533 1 A9 00 lda #$00
|
||||
00C535 1 84 34 sty $34
|
||||
00C537 1 60 rts
|
||||
00C538 1
|
||||
00C538 1 DumpOutput:
|
||||
00C538 1 A9 05 lda #$05 ;send command 5 = exec
|
||||
00C53A 1 20 61 C5 jsr SendByte
|
||||
00C53D 1 A0 00 ldy #$00
|
||||
00C53F 1 getInput:
|
||||
00C53F 1 B9 00 02 lda $0200,y
|
||||
00C542 1 C9 8D cmp #$8d
|
||||
00C544 1 F0 08 beq sendNullTerminator
|
||||
00C546 1 29 7F and #$7f
|
||||
00C548 1 20 61 C5 jsr SendByte
|
||||
00C54B 1 C8 iny
|
||||
00C54C 1 D0 F1 bne getInput
|
||||
00C54E 1 sendNullTerminator:
|
||||
00C54E 1 A9 00 lda #$00
|
||||
00C550 1 20 61 C5 jsr SendByte
|
||||
00C553 1 getOutput:
|
||||
00C553 1 20 7F C5 jsr GetByte
|
||||
00C556 1 C9 00 cmp #$00
|
||||
00C558 1 F0 06 beq endOutput
|
||||
00C55A 1 20 ED FD jsr $fded
|
||||
00C55D 1 18 clc
|
||||
00C55E 1 90 F3 bcc getOutput
|
||||
00C560 1 endOutput:
|
||||
00C560 1 60 rts
|
||||
00C561 1
|
||||
00C561 1 SendByte:
|
||||
00C561 1 48 pha
|
||||
00C562 1 waitWrite:
|
||||
00C562 1 AD DB C0 lda InputFlags
|
||||
00C565 1 2A rol
|
||||
00C566 1 2A rol
|
||||
00C567 1 B0 F9 bcs waitWrite
|
||||
00C569 1 68 pla
|
||||
00C56A 1 8D DD C0 sta OutputByte
|
||||
00C56D 1 A9 1E lda #$1e ; set bit 0 low to indicate write started
|
||||
00C56F 1 8D D7 C0 sta OutputFlags
|
||||
00C572 1 finishWrite:
|
||||
00C572 1 AD DB C0 lda InputFlags
|
||||
00C575 1 2A rol
|
||||
00C576 1 2A rol
|
||||
00C577 1 90 F9 bcc finishWrite
|
||||
00C579 1 A9 1F lda #$1f
|
||||
00C57B 1 8D D7 C0 sta OutputFlags
|
||||
00C57E 1 60 rts
|
||||
00C57F 1
|
||||
00C57F 1 GetByte:
|
||||
00C57F 1 A9 1D lda #$1d ;set read flag low
|
||||
00C581 1 8D D7 C0 sta OutputFlags
|
||||
00C584 1 waitRead:
|
||||
00C584 1 AD DB C0 lda InputFlags
|
||||
00C587 1 2A rol
|
||||
00C588 1 B0 FA bcs waitRead
|
||||
00C58A 1 AD DE C0 lda InputByte
|
||||
00C58D 1 48 pha
|
||||
00C58E 1 A9 1F lda #$1f ;set all flags high
|
||||
00C590 1 8D D7 C0 sta OutputFlags
|
||||
00C593 1 finishRead:
|
||||
00C593 1 AD DB C0 lda InputFlags
|
||||
00C596 1 2A rol
|
||||
00C597 1 90 FA bcc finishRead
|
||||
00C599 1 68 pla
|
||||
00C59A 1 end:
|
||||
00C59A 1 60 rts
|
||||
00C59B 1
|
||||
00C59B 1 00 00 00 00 .repeat 251-<end
|
||||
00C59F 1 00 00 00 00
|
||||
00C5A3 1 00 00 00 00
|
||||
00C519 1 20 00 C3 jsr $c300 ;enable 80 columns
|
||||
00C51C 1 A5 33 lda $33
|
||||
00C51E 1 48 pha
|
||||
00C51F 1 A9 A4 lda #$a4
|
||||
00C521 1 85 33 sta $33
|
||||
00C523 1 GetCommand:
|
||||
00C523 1 20 67 FD jsr $fd67
|
||||
00C526 1 AD 00 02 lda $0200
|
||||
00C529 1 C9 8D cmp #$8d ;skip when return found
|
||||
00C52B 1 F0 F6 beq GetCommand
|
||||
00C52D 1 20 33 C5 jsr DumpOutput
|
||||
00C530 1 18 clc
|
||||
00C531 1 90 F0 bcc GetCommand
|
||||
00C533 1
|
||||
00C533 1 DumpOutput:
|
||||
00C533 1 A9 05 lda #$05 ;send command 5 = exec
|
||||
00C535 1 20 5C C5 jsr SendByte
|
||||
00C538 1 A0 00 ldy #$00
|
||||
00C53A 1 getInput:
|
||||
00C53A 1 B9 00 02 lda $0200,y
|
||||
00C53D 1 C9 8D cmp #$8d
|
||||
00C53F 1 F0 08 beq sendNullTerminator
|
||||
00C541 1 29 7F and #$7f
|
||||
00C543 1 20 5C C5 jsr SendByte
|
||||
00C546 1 C8 iny
|
||||
00C547 1 D0 F1 bne getInput
|
||||
00C549 1 sendNullTerminator:
|
||||
00C549 1 A9 00 lda #$00
|
||||
00C54B 1 20 5C C5 jsr SendByte
|
||||
00C54E 1 getOutput:
|
||||
00C54E 1 20 7A C5 jsr GetByte
|
||||
00C551 1 C9 00 cmp #$00
|
||||
00C553 1 F0 06 beq endOutput
|
||||
00C555 1 20 ED FD jsr $fded
|
||||
00C558 1 18 clc
|
||||
00C559 1 90 F3 bcc getOutput
|
||||
00C55B 1 endOutput:
|
||||
00C55B 1 60 rts
|
||||
00C55C 1
|
||||
00C55C 1 SendByte:
|
||||
00C55C 1 48 pha
|
||||
00C55D 1 waitWrite:
|
||||
00C55D 1 AD DB C0 lda InputFlags
|
||||
00C560 1 2A rol
|
||||
00C561 1 2A rol
|
||||
00C562 1 B0 F9 bcs waitWrite
|
||||
00C564 1 68 pla
|
||||
00C565 1 8D DD C0 sta OutputByte
|
||||
00C568 1 A9 1E lda #$1e ; set bit 0 low to indicate write started
|
||||
00C56A 1 8D D7 C0 sta OutputFlags
|
||||
00C56D 1 finishWrite:
|
||||
00C56D 1 AD DB C0 lda InputFlags
|
||||
00C570 1 2A rol
|
||||
00C571 1 2A rol
|
||||
00C572 1 90 F9 bcc finishWrite
|
||||
00C574 1 A9 1F lda #$1f
|
||||
00C576 1 8D D7 C0 sta OutputFlags
|
||||
00C579 1 60 rts
|
||||
00C57A 1
|
||||
00C57A 1 GetByte:
|
||||
00C57A 1 A9 1D lda #$1d ;set read flag low
|
||||
00C57C 1 8D D7 C0 sta OutputFlags
|
||||
00C57F 1 waitRead:
|
||||
00C57F 1 AD DB C0 lda InputFlags
|
||||
00C582 1 2A rol
|
||||
00C583 1 B0 FA bcs waitRead
|
||||
00C585 1 AD DE C0 lda InputByte
|
||||
00C588 1 48 pha
|
||||
00C589 1 A9 1F lda #$1f ;set all flags high
|
||||
00C58B 1 8D D7 C0 sta OutputFlags
|
||||
00C58E 1 finishRead:
|
||||
00C58E 1 AD DB C0 lda InputFlags
|
||||
00C591 1 2A rol
|
||||
00C592 1 90 FA bcc finishRead
|
||||
00C594 1 68 pla
|
||||
00C595 1 end:
|
||||
00C595 1 60 rts
|
||||
00C596 1
|
||||
00C596 1 00 00 00 00 .repeat 251-<end
|
||||
00C59A 1 00 00 00 00
|
||||
00C59E 1 00 00 00 00
|
||||
00C5FC 1 .byte 0
|
||||
00C5FC 1 .endrepeat
|
||||
00C5FC 1 00 00 .byte 0,0 ;0000 blocks = check status
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user