From 7055170fb2f1f27893ab9e86a1d59a3bf894bb00 Mon Sep 17 00:00:00 2001 From: Leo C Date: Fri, 30 Oct 2015 09:50:28 +0100 Subject: [PATCH] bioskrnl.180: Remove xon/xoff handling. --- cbios/bioskrnl.180 | 79 +++++----------------------------------------- cbios/z180reg.inc | 4 +-- 2 files changed, 10 insertions(+), 73 deletions(-) diff --git a/cbios/bioskrnl.180 b/cbios/bioskrnl.180 index 39927be..6ead6c3 100644 --- a/cbios/bioskrnl.180 +++ b/cbios/bioskrnl.180 @@ -262,13 +262,7 @@ co$next: add hl,hl ; shift out next bit jr nc,not$out$device push hl ; save the vector -; push bc ; save the count and character -;not$out$ready: -; call coster -; or a -; jr z,not$out$ready -; pop bc - push bc ; restore and resave the character and device + push bc ; save device num and the character call ?co ; if device selected, print it pop bc ; recover count and character pop hl ; recover the rest of the vector @@ -315,7 +309,7 @@ cos$next: push hl ; save the vector push bc ; save the count ld a,0FFh ; assume device ready - call c,coster ; check status for this device + call c,?cost ; check status for this device pop bc ; recover count pop hl ; recover bit vector or a ; see if device ready @@ -327,38 +321,6 @@ cos$next: or 0FFh ; all selected were ready, return true ret - ; check for output device ready, including optional - ; xon/xoff support -coster: - ld l,b - ld h,0 ; make device code 16 bits - push hl ; save it in stack - add hl,hl - add hl,hl - add hl,hl ; create offset into device characteristics tbl - ld de,@ctbl+6 - add hl,de ; make address of mode byte - ld a,(hl) - and mb$xon$xoff - pop hl ; recover console number in - jp z,?cost ; not a xon device, go get output status direct - ld de,xofflist - add hl,de ; make pointer to proper xon/xoff flag - call cist1 ; see if this keyboard has character - ld a,(hl) - call nz,ci1 ; get flag or read key if any - cp ctlq - jr nz,not$q ; if its a ctl-Q, - ld a,0FFh ; set the flag ready -not$q: - cp ctls - jr nz,not$s ; if its a ctl-S, - ld a,00h ; clear the flag -not$s: - ld (hl),a ; save the flag - call cost1 ; get the actual output status, - and (hl) ; and mask with ctl-Q/ctl-S flag - ret ; return this as the status cist1: ; get input status with and saved push bc @@ -369,23 +331,6 @@ cist1: ; get input status with and saved or a ret -cost1: ; get output status, saving & - push bc - push hl - call ?cost - pop hl - pop bc - or a - ret - -ci1: ; get input, saving & - push bc - push hl - call ?ci - pop hl - pop bc - ret - ; AUXIST ; Auxiliary Input Status. Return true if @@ -408,17 +353,15 @@ const: ist$scan: ld b,0 ; start with device 0 cis$next: - add hl,hl ; check next bit - ld a,0 ; assume device not ready - call c,cist1 ; check status for this device - or a + xor a ; assume next device not ready + add hl,hl ; check next bit (lets z flag unaffected) + call c,cist1 ; check status for this device ret nz ; if any ready, return true inc b ; next device number ld a,h or l ; see if any more selected devices - jr nz,cis$next - xor a ; all selected were not ready, return false - ret + ret z ; all selected were not ready, return false + jr cis$next ; AUXIN @@ -441,10 +384,9 @@ in$scan: push hl ; save bit vector ld b,0 ci$next: + xor a ; assume next device not ready add hl,hl ; shift out next bit - ld a,0 ; insure zero a (nonexistant device not ready). call c,cist1 ; see if the device has a character - or a jr nz,ci$rdy ; this device has a character inc b ; else, next device ld a,h @@ -475,11 +417,6 @@ bnksel: jp ?bank ; and go exit through users ; physical bank select routine - -xofflist: - db -1,-1,-1,-1,-1,-1,-1,-1 ; ctl-s clears to zero - db -1,-1,-1,-1,-1,-1,-1,-1 - dseg ; following resides in banked memory ; Disk I/O interface routines diff --git a/cbios/z180reg.inc b/cbios/z180reg.inc index 2666867..8b93984 100644 --- a/cbios/z180reg.inc +++ b/cbios/z180reg.inc @@ -20,7 +20,7 @@ cntla1 equ IOBASE+01h ;ASCI Control Register A Channel 1 b2m RE, 6 ;Receiver Enable b2m TE, 5 ;Transmitter Enable b2m RTS0, 4 ;Request to Send Channel 0 - b2m CKA1D, 4 ; + b2m CKA1D, 4 ;CKA1 disable (Enable DREQ0) b2m MPBR, 3 ;Multiprocessor Bit Receive (Read) b2m EFR, 3 ;Error Flag Reset (Write) b2m MOD2, 2 ;Data Format Mode 1 = 8-Bit data @@ -47,7 +47,7 @@ stat1 equ IOBASE+05h ;ASCI Status Channel 1 b2m FE,4 ;Framing Error b2m RIE,3 ;Receive Interrupt Enable b2m DCD0,2 ;Data Carrier Detect (Ch 0) - b2m CTS1E,2 ;Clear To Send (Ch 1) + b2m CTS1E,2 ;Clear To Send Enable (Ch 1) b2m TDRE,1 ;Transmit Data Register Empty b2m TIE,0 ;Transmit Interrupt Enable -- 2.39.2