- ; check for output device ready, including optional\r
- ; xon/xoff support\r
-coster:\r
- ld l,b\r
- ld h,0 ; make device code 16 bits\r
- push hl ; save it in stack\r
- add hl,hl\r
- add hl,hl\r
- add hl,hl ; create offset into device characteristics tbl\r
- ld de,@ctbl+6\r
- add hl,de ; make address of mode byte\r
- ld a,(hl)\r
- and mb$xon$xoff\r
- pop hl ; recover console number in <HL>\r
- jp z,?cost ; not a xon device, go get output status direct\r
- ld de,xofflist\r
- add hl,de ; make pointer to proper xon/xoff flag\r
- call cist1 ; see if this keyboard has character\r
- ld a,(hl)\r
- call nz,ci1 ; get flag or read key if any\r
- cp ctlq\r
- jr nz,not$q ; if its a ctl-Q,\r
- ld a,0FFh ; set the flag ready\r
-not$q:\r
- cp ctls\r
- jr nz,not$s ; if its a ctl-S,\r
- ld a,00h ; clear the flag\r
-not$s:\r
- ld (hl),a ; save the flag\r
- call cost1 ; get the actual output status,\r
- and (hl) ; and mask with ctl-Q/ctl-S flag\r
- ret ; return this as the status\r