Resurrected help screen from CaTer.

This commit is contained in:
Oliver Schmidt 2017-08-02 14:18:50 +02:00
parent 4d729ec839
commit ffa5088e16
2 changed files with 187 additions and 6 deletions

View File

@ -959,10 +959,19 @@ crsrR ldx #<ScrsrR
jsr SendStr jsr SendStr
rts rts
; --- Open-Apple h ---
; print help
C3 cmp #$68 ; h
bne C4
bit BUTN0 ; Open-Apple key
bmi Help ; pressed
jsr putRS ; send h
rts
; --- Open-Apple q --- ; --- Open-Apple q ---
; quit CaTer ; quit CaTer
C3 cmp #$71 ; q C4 cmp #$71 ; q
bne C4 bne C5
bit BUTN0 ; Open-Apple key bit BUTN0 ; Open-Apple key
bmi Cquit ; pressed bmi Cquit ; pressed
jsr putRS ; send q jsr putRS ; send q
@ -973,7 +982,31 @@ Cquit jsr telnet_close
rts rts
; --- unknown character --- ; --- unknown character ---
C4 rts C5 rts
; -------------------------------------
; Help - print help screen
;
; calledom outgoing data loop
; returns with rts
; -------------------------------------
Help jsr CR ; next screen line
jsr LF
ldx #<HelpStr1
ldy #>HelpStr1
jsr CPrnStrNL
ldx #<HelpStr2
ldy #>HelpStr2
jsr CPrnStrNL
rts
HelpStr1;".........1.........2.........3.........4.........5.........6.........7.........8"
.asc "OA-H Help (this text) OA-Q Quit current Telnet session "
.asc "OA-C-H Send C-H OA-C-J Send C-J"
.byt $00
HelpStr2;".........1.........2.........3.........4.........5.........6.........7.........8"
.asc "OA-C-K Send C-K OA-C-U Send C-U"
.byt $00
; ************************************* ; *************************************
; * ; *
@ -1357,6 +1390,54 @@ DS3 lda (xVector),y ; copy char
rts rts
; -------------------------------------
; CPrnStrNL - print string to sceen,
; followed by CR NL
;
; string: chars, terminated by $00
; params: string ptr lo in X
; string ptr hi in y
; affects: A, X, Y
;
; The string must be smaller than
; 255 chrs.
; The crsr ist turned off during
; operation (COff - COn)
; -------------------------------------
CPrnStrNL
jsr CPrnStr
jsr CR
jsr LF
rts
; -------------------------------------
; CPrnStr - print string to screen
;
; string: chars, terminated by $00
; params: string ptr lo in X
; string ptr hi in y
; affects: A
;
; The string must be smaller than
; 255 chrs.
; The crsr ist turned off during
; operation (COff - COn)
; -------------------------------------
CPrnStr stx vVector ; store string ptr
sty vVector+1
jsr COff
ldy #$00
L1 lda (vVector),y
beq L2 ; string ends at $00
jsr PrnChr
; -- put char to screen --
iny
jmp L1
L2 jsr COn
rts
; ------------------------------------- ; -------------------------------------
; ErLn - erase screen line ; ErLn - erase screen line
; ;
@ -1661,6 +1742,6 @@ kta ;_0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _a _b _c _d _e _f
; --- lower case letters ------------------------------------------- ; --- lower case letters -------------------------------------------
; ` a b c d e f g h i j k l m n o ; ` a b c d e f g h i j k l m n o
.byt $60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$6a,$6b,$6c,$6d,$6e,$6f ; 6_ .byt $60,$61,$62,$63,$64,$65,$66,$67,$fe,$69,$6a,$6b,$6c,$6d,$6e,$6f ; 6_
; p q r s t u v w x y z { | } ~ DEL ; p q r s t u v w x y z { | } ~ DEL
.byt $70,$fe,$72,$73,$74,$75,$76,$77,$78,$79,$7a,$7b,$7c,$7d,$7e,$7f ; 7_ .byt $70,$fe,$72,$73,$74,$75,$76,$77,$78,$79,$7a,$7b,$7c,$7d,$7e,$7f ; 7_

View File

@ -73,6 +73,10 @@ bgcolour = $0b ; gray1
; border colour ; border colour
bgocolour = $0c ; gray2 bgocolour = $0c ; gray2
; color for cater speaking
; (help)
colExtra = $07
; ------------------------------------- ; -------------------------------------
; Zeropage Kernal ; Zeropage Kernal
; ;
@ -228,6 +232,9 @@ lbPending .res 1
; 0 = visible, !0 = invisible ; 0 = visible, !0 = invisible
civis .res 1 civis .res 1
; --- save crsr color for XCon/XCoff ---
XCrsr .res 1 ; safe crsr colour
; --- buffer for addDecDig --- ; --- buffer for addDecDig ---
mul10buf .res 1 mul10buf .res 1
@ -1179,7 +1186,7 @@ crsrR ldx #<ScrsrR
; --- ^Q --- ; --- ^Q ---
; both events send char $11 ; both events send char $11
C0 cmp #$11 ;^Q / crsr down C0 cmp #$11 ;^Q / crsr down
bne C8 bne C2
lda #$04 ; test control Key lda #$04 ; test control Key
bit ControlFlags bit ControlFlags
beq crsrD ; not pressed beq crsrD ; not pressed
@ -1194,6 +1201,12 @@ crsrD ldx #<ScrsrD
jsr SendStr jsr SendStr
rts rts
; --- C=H ---
; print help
C2 cmp #$b4 ; C=H
bne C8
jmp Help
; --- HOME key --- ; --- HOME key ---
; --- ^S --- ; --- ^S ---
; both events send char $13 ; both events send char $13
@ -1240,6 +1253,24 @@ C10 cmp #$ab ; C=Q
; --- unknown C=-Key --- ; --- unknown C=-Key ---
C12 rts C12 rts
; -------------------------------------
; Help - print help screen
;
; calledom outgoing data loop
; returns with rts
; -------------------------------------
Help jsr XCon
ldx #<HelpStr
ldy #>HelpStr
jsr CPrnStrNL
jsr XCoff
rts
HelpStr ;".........1.........2.........3.........4"
.asc "c=h - hELP (THIS TEXT) "
.asc "c=q - qUIT CURRENT tELNET SESSION"
.byt $00
; ************************************* ; *************************************
; * ; *
; * screen handling ; * screen handling
@ -1669,6 +1700,54 @@ DS2 lda (xVector),y ; copy char
rts rts
; -------------------------------------
; CPrnStrNL - print string to sceen,
; followed by CR NL
;
; string: chars, terminated by $00
; params: string ptr lo in X
; string ptr hi in y
; affects: A, X, Y
;
; The string must be smaller than
; 255 chrs.
; The crsr ist turned off during
; operation (COff - COn)
; -------------------------------------
CPrnStrNL
jsr CPrnStr
jsr CR
jsr LF
rts
; -------------------------------------
; CPrnStr - print string to screen
;
; string: chars, terminated by $00
; params: string ptr lo in X
; string ptr hi in y
; affects: A
;
; The string must be smaller than
; 255 chrs.
; The crsr ist turned off during
; operation (COff - COn)
; -------------------------------------
CPrnStr stx vVector ; store string ptr
sty vVector+1
jsr COff
ldy #$00
L1 lda (vVector),y
beq L2 ; string ends at $00
jsr PrnChr
; -- put char to screen --
iny
jmp L1
L2 jsr COn
rts
; ------------------------------------- ; -------------------------------------
; ErLn - erase screen line ; ErLn - erase screen line
; ;
@ -1786,6 +1865,27 @@ SLV1 sty xVector+1
rts rts
; -------------------------------------
; XCon - set yellow font, next line
; XCoff - restore font, not next line
;
; affects: A, X, Y
;
; Switch to another font indicating
; cater is speaking.
; -------------------------------------
XCon lda sColor ; save present..
sta XCrsr ; ..colour
lda #colExtra
sta sColor
jsr CR ; next screen line
jsr LF
rts
XCoff lda XCrsr ; get colour
sta sColor
rts
; ************************************* ; *************************************
; * ; *
; * Init routines ; * Init routines
@ -2059,7 +2159,7 @@ pta ;_0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _a _b _c _d _e _f
.byt $00,$00,$00,$00,$00,$00,$00,$00,$00,$7c,$00,$fe,$00,$00,$00,$00 ; a_ .byt $00,$00,$00,$00,$00,$00,$00,$00,$00,$7c,$00,$fe,$00,$00,$00,$00 ; a_
; C=A C=E C=R C=W C=H C=J C=L C=Y C=U C=O Sh@ C=F C=C C=X C=V C=B ; C=A C=E C=R C=W C=H C=J C=L C=Y C=U C=O Sh@ C=F C=C C=X C=V C=B
; ` ; `
.byt $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$60,$00,$00,$00,$00,$00 ; b_ .byt $00,$00,$00,$00,$fe,$00,$00,$00,$00,$00,$60,$00,$00,$00,$00,$00 ; b_
; --- capital letters ---------------------------------------------- ; --- capital letters ----------------------------------------------
; Sh* A B C D E F G H I J K L M N O ; Sh* A B C D E F G H I J K L M N O