With ARNITECH_BLADE the screen editor, the keyboard matrix scan, and the VIC-II set-up are left out, and devices 3 and 0 are the Terminal Card the Arnitech controller finds by its type, $04. CHROUT writes each byte to its Output, or to its Literal while quote or insert mode is on, keeping QTSW and INSRT as the screen editor does. CHRIN marks where input starts, echoes the keys typed, and on RETURN has the Card take the logical line under the cursor and reads it back. SCNKEY moves the Card's keys into the keyboard buffer up to XMAX, UDTIM sets STKEY from its RUN/STOP, SCREEN answers 80x25, PLOT moves and reads its cursor, and CINT resets it and puts the native-mode vectors in place. With no Terminal Card, bytes printed go nowhere and no key comes.
58 lines
1.0 KiB
ArmAsm
58 lines
1.0 KiB
ArmAsm
;; #LAYOUT# STD * #TAKE
|
|
;; #LAYOUT# * KERNAL_0 #TAKE
|
|
;; #LAYOUT# * * #IGNORE
|
|
|
|
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
|
!ifndef CONFIG_ARNITECH_BLADE {
|
|
|
|
;
|
|
; CHROUT routine - convert PETSCII to screen code
|
|
;
|
|
|
|
|
|
chrout_to_screen_code:
|
|
|
|
; Codes $C0-$FE become $40-$7E, and $FF (pi) becomes $5E, as $DE does
|
|
; (C64 PRG p380-381)
|
|
cmp #$FF
|
|
beq @pi
|
|
cmp #$C0
|
|
bcc @1
|
|
|
|
and #$7F
|
|
rts ; not high char
|
|
@pi:
|
|
lda #$5E
|
|
rts
|
|
@1:
|
|
; Range $20-$3F is unchanged
|
|
cmp #$40
|
|
bcc @done ; not high char
|
|
|
|
; Unshifted letters and symbols from $40-$5F
|
|
; all end up being -$40
|
|
; (C64 PRG p376)
|
|
|
|
; But anything >= $80 needs to be -$40
|
|
; (C64 PRG p380-381)
|
|
; And bit 7 should be cleared, only to be
|
|
; set by reverse video
|
|
sec
|
|
sbc #$40
|
|
|
|
; Fix shifted chars by adding $20 again
|
|
cmp #$20
|
|
bcc @done ; not high char
|
|
cmp #$40
|
|
bcs @done ; not high char
|
|
clc
|
|
adc #$20
|
|
|
|
; FALLTROUGH
|
|
|
|
@done:
|
|
|
|
rts
|
|
|
|
} ; CONFIG_ARNITECH_BLADE
|