X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp-cpm3.git/blobdiff_plain/d6c677a8a2cdb57e83f9ba8c03c643441c1878d9..958f610fd7c11481fae54d758bf34619d161554a:/cbios/cfio.180 diff --git a/cbios/cfio.180 b/cbios/cfio.180 index 5dd8a2e..fc3bea1 100644 --- a/cbios/cfio.180 +++ b/cbios/cfio.180 @@ -649,6 +649,9 @@ rw$common: endif rwc_new_sectors: + ld (cfstack),sp + ld sp,cfstack + in0 a,(dcntl) and a,~(M_DMS1+M_DIM1+M_DIM0) or b @@ -705,7 +708,8 @@ retry: pop hl jr c,lba_ok ld a,1 ; block# >= partition size, return error - ret + jp exit +; ret lba_ok: WAITREADY @@ -762,7 +766,8 @@ err_out: pop bc ld e,a and 10001001b ; Busy, DRQ, or Error? - ret z ; Return to BDOS if no error + jr z,exit +; ret z ; Return to BDOS if no error ld hl,print_details call pr.errors @@ -772,6 +777,8 @@ err_out: ld (residual),a ld a,1 ; return hard error to BDOS +exit: + ld sp,(cfstack) ret ;------------------------------------------------------------------------------- @@ -824,4 +831,10 @@ parttbl: tmpsecbuf: ;temporary sector buffer ds 512 + rept 80 + db 07CH + endm +cfstack:: + dw 0 + end