+
+
+;-------------------------------------------------------------------------------
+; get console input, echo it, and shift to upper case
+; save hl,de,bc
+
+uciecho:
+ push hl
+ push de
+ push bc
+u$c0:
+ call ?const
+ or a
+ jr z,u$c1 ; see if any char already struck
+ call ?conin
+ jr u$c0 ; yes, eat it and try again
+u$c1:
+ call ?conin
+ push af
+ ld c,a
+ cp ' '-1
+ call nc,?cono
+ pop af
+ pop bc
+ pop de
+ pop hl
+ cp 'a'
+ ret c
+ sub 'a'-'A' ; make upper case
+ ret
+
+;-------------------------------------------------------------------------------
+;
+
+pr.errors:
+
+ ; suppress error message if BDOS
+ ; is returning errors to application...
+
+ ld a,(@ermde)
+ inc a
+ jr nz,pre1
+ dec a ;return NZ, if @ermde == 0FFH
+ ret
+pre1:
+ push hl
+ ld hl,pre2
+ ex (sp),hl
+ push hl
+
+ ; Had permanent error, print message like:
+ ; BIOS Err on d: T-nn, S-mm, <operation> <type>, Retry ?
+
+ call ?pderr ; print message header
+
+ ld hl,op$msg
+ ld a,(@op)
+ jp pr.idx ; last function (read or write)
+
+pre2:
+ ; prompt for retry
+ call pr.inln
+ db ' Retry (Y/N) ? ',0
+
+ call uciecho ; get operator response
+ cp 'Y'
+ ret ; return Z-flag for yes
+
+
+op$msg:
+ db ', Unknown op, ',0
+ db ', Read, ',0
+ db ', Write, ',0
+ db 0
+
+ end