;CONSOLE BUFFER INPUT FCALL 0A
;if ctrl+D then BREAK
;
C576 2A64D0 CONBFIN:LD HL,(CURSOR)
C579 7D LD A,L
C57A 3268D0 LD (CURSORWK),A
C57D 62 LD H,D
C57E 6B LD L,E
C57F E5 CONBFIN1:PUSH HL
C580 4E LD C,(HL)
C581 0600 LD B,00
C583 23 INC HL
C584 E5 PUSH HL
C585 23 INC HL
C586 2266D0 LD (CONBFINWK),HL
C589 CD09D2 CALL B_CONIN
C58C E67F AND 7F
C58E FE04 CP 04;ctrl+D
C590 C299C5 JP NZ,CONBFIN22
C593 C336D2 JP ZREENT
C596 CD09D2 CONBFIN2:CALL B_CONIN
C599 FE0D CONBFIN22:CP 0D;CR
C59B CACCC5 JP Z,CONBFIN4
C59E FE0A CP 0A;LF
C5A0 CACCC5 JP Z,CONBFIN4
C5A3 FE09 CP 09;TAB
C5A5 CAE5C5 JP Z,CONBFIN3
C5A8 FE08 CP 08;BS
C5AA CA07C6 JP Z,CONBFIN5
C5AD FE12 CP 12;^R
C5AF CA45C6 JP Z,CONBFIN6
C5B2 FE15 CP 15;^U
C5B4 CA9AC6 JP Z,CONBFIN7
C5B7 FE18 CP 18;^X
C5B9 CAB9C6 JP Z,CONBFIN8
C5BC FE1B CP 1B
C5BE DACFC6 JP C,CONBFIN9
C5C1 77 CONBFIN23:LD (HL),A
C5C2 5F LD E,A
C5C3 CDEAC4 CALL CONOUT
C5C6 23 CONBFIN24:INC HL
C5C7 04 INC B
C5C8 0D DEC C
C5C9 C296C5 JP NZ,CONBFIN2
;CR,LF
C5CC E1 CONBFIN4:POP HL
C5CD 70 LD (HL),B
C5CE 54 LD D,H
C5CF 5D LD E,L
C5D0 EB EX DE,HL
C5D1 78 LD A,B
C5D2 B7 OR A
C5D3 CAE2C5 JP Z,CONBFIN43
C5D6 23 CONBFIN41:INC HL
C5D7 7E LD A,(HL)
C5D8 B7 OR A
C5D9 F2DEC5 JP P,CONBFIN42
C5DC 3609 LD (HL),09;TAB
C5DE 05 CONBFIN42:DEC B
C5DF C2D6C5 JP NZ,CONBFIN41
C5E2 EB CONBFIN43:EX DE,HL
C5E3 D1 POP DE;dummy
C5E4 C9 RET
;
;TAB
C5E5 E5 CONBFIN3:PUSH HL
C5E6 C5 PUSH BC
C5E7 2A64D0 LD HL,(CURSOR)
C5EA 7D LD A,L
C5EB 2F CPL
C5EC E607 AND 07
C5EE 47 LD B,A
C5EF 3C INC A
C5F0 4F LD C,A
C5F1 1E20 LD E,20
C5F3 CDEAC4 CONINBF31:CALL CONOUT
C5F6 0D DEC C
C5F7 C2F3C5 JP NZ,CONINBF31
C5FA 78 LD A,B
C5FB 07 RLCA
C5FC 07 RLCA
C5FD 07 RLCA
C5FE 07 RLCA
C5FF F689 OR 89;TAB
C601 C1 POP BC
C602 E1 POP HL
C603 77 LD (HL),A
C604 C3C6C5 JP CONBFIN24
;
;BS
C607 78 CONBFIN5:LD A,B
C608 B7 OR A
C609 CA96C5 JP Z,CONBFIN2
C60C 2B DEC HL
C60D 7E LD A,(HL)
C60E B7 OR A
C60F FA22C6 JP M,CONBFIN54;TAB
C612 FE20 CP 20;ctrl check
C614 D21AC6 JP NC,CONBFIN52
C617 CD38C6 CALL BSOUT
C61A CD38C6 CONBFIN52:CALL BSOUT
C61D 05 CONBFIN53:DEC B
C61E 0C INC C
C61F C396C5 JP CONBFIN2
C622 E5 CONBFIN54:PUSH HL
C623 C5 PUSH BC
C624 0F RRCA
C625 0F RRCA
C626 0F RRCA
C627 0F RRCA
C628 E607 AND 07
C62A 3C INC A
C62B 4F LD C,A
C62C CD38C6 CONBFIN55:CALL BSOUT
C62F 0D DEC C
C630 C22CC6 JP NZ,CONBFIN55
C633 C1 POP BC
C634 E1 POP HL
C635 C31DC6 JP CONBFIN53
;
C638 CD40C6 BSOUT:CALL BSOUT2
C63B 1E20 LD E,20
C63D CDEAC4 CALL CONOUT
C640 1E08 BSOUT2:LD E,08
C642 C3EAC4 JP CONOUT
;
; ctrl+R
C645 1E23 CONBFIN6:LD E,23;#
C647 CDEAC4 CALL CONOUT
C64A C5 PUSH BC
C64B 3A68D0 LD A,(CURSORWK)
C64E 4F LD C,A
C64F CD90C6 CALL CRLF
C652 79 LD A,C
C653 B7 OR A
C654 CA60C6 JP Z,CONBFIN62
C657 1E20 LD E,20
C659 CDEAC4 CONBFIN61:CALL CONOUT
C65C 0D DEC C
C65D C259C6 JP NZ,CONBFIN61
C660 2A66D0 CONBFIN62:LD HL,(CONBFINWK)
C663 7E CONBFIN63:LD A,(HL)
C664 B7 OR A
C665 FA80C6 JP M,CONBFIN66;TAB
C668 FE20 CP 20;ctrl check
C66A D273C6 JP NC,CONBFIN64
C66D CDD5C6 CALL CTRLDSP
C670 C377C6 JP CONBFIN65
C673 5F CONBFIN64:LD E,A
C674 CDEAC4 CALL CONOUT
C677 23 CONBFIN65:INC HL
C678 05 DEC B
C679 C263C6 JP NZ,CONBFIN63
C67C C1 POP BC
C67D C396C5 JP CONBFIN2
C680 E5 CONBFIN66:PUSH HL
C681 C5 PUSH BC
C682 2A64D0 LD HL,(CURSOR)
C685 CD2BC5 CALL TABOUT
C688 2264D0 LD (CURSOR),HL
C68B C1 POP BC
C68C E1 POP HL
C68D C377C6 JP CONBFIN65
;
C690 1E0D CRLF:LD E,0D
C692 CDEAC4 CALL CONOUT
C695 1E0A LD E,0A
C697 C3EAC4 JP CONOUT
;
;ctrl+U
C69A 1E23 CONBFIN7:LD E,23;#
C69C CDEAC4 CALL CONOUT
C69F 3A68D0 LD A,(CURSORWK)
C6A2 4F LD C,A
C6A3 CD90C6 CALL CRLF
C6A6 79 LD A,C
C6A7 B7 OR A
C6A8 CAB4C6 JP Z,CONBFIN72
C6AB 1E20 CONBFIN71:LD E,20
C6AD CDEAC4 CALL CONOUT
C6B0 0D DEC C
C6B1 C2ABC6 JP NZ,CONBFIN71
C6B4 E1 CONBFIN72:POP HL
C6B5 E1 POP HL
C6B6 C37FC5 JP CONBFIN1
;
;ctrl+X
C6B9 2B CONBFIN8:DEC HL
C6BA 7E LD A,(HL)
C6BB FE20 CP 20;ctrl check
C6BD D2C3C6 JP NC,CONBFIN82
C6C0 CD38C6 CALL BSOUT
C6C3 CD38C6 CONBFIN82:CALL BSOUT
C6C6 05 DEC B
C6C7 C2B9C6 JP NZ,CONBFIN8
C6CA E1 POP HL
C6CB E1 POP HL
C6CC C37FC5 JP CONBFIN1
;
;ctrl+
C6CF CDD5C6 CONBFIN9:CALL CTRLDSP
C6D2 C3C1C5 JP CONBFIN23
C6D5 F5 CTRLDSP:PUSH AF
C6D6 1E5E LD E,5E;^
C6D8 CDEAC4 CALL CONOUT
C6DB F1 POP AF
C6DC F5 PUSH AF
C6DD C640 ADD A,40
C6DF 5F LD E,A
C6E0 CDEAC4 CALL CONOUT
C6E3 F1 POP AF
C6E4 C9 RET
|