- ld a,1 ; return hard error to BDOS\r
- ret\r
-\r
-cancel: ; here to abort job\r
- jp ?wboot ; leap directly to warmstart vector\r
-\r
-\r
-\r
-; Print message to error code in A\r
-;\r
-\r
-pdecoded:\r
- push bc\r
- push de\r
- push hl ; put pointer to first message on stack\r
- cp c\r
- jr c,pdc_1\r
- xor a\r
-pdc_1:\r
- ld bc,0\r
- ld e,a ; save message number\r
- xor a\r
- inc e\r
-pdc_nxt_str:\r
- dec e\r
- ex (sp),hl\r
- jr z,pdc_found\r
- ex (sp),hl\r
- cpir\r
- jr z,pdc_nxt_str\r
- ; not found (should not happen)\r
-pdc_found:\r
- pop hl\r
- call ?pmsg\r
- pop de\r
- pop bc\r
- ret\r
-\r
-\r
-; get console input, echo it, and shift to upper case\r
-\r
-u$conin$echo:\r
-\r
- call ?const\r
- or a\r
- jr z,u$c1 ; see if any char already struck\r
- call ?conin\r
- jr u$conin$echo ; yes, eat it and try again\r
-u$c1:\r
- call ?conin\r
- push af\r
- ld c,a\r
- cp ' '-1\r
- call nc,?cono\r
- pop af\r
- cp 'a'\r
- ret c\r
- sub 'a'-'A' ; make upper case\r
- ret\r