endif\r
\r
rwc_new_sectors:\r
+ ld (cfstack),sp\r
+ ld sp,cfstack\r
+\r
in0 a,(dcntl)\r
and a,~(M_DMS1+M_DIM1+M_DIM0)\r
or b\r
pop hl\r
jr c,lba_ok\r
ld a,1 ; block# >= partition size, return error\r
- ret\r
+ jp exit\r
+; ret\r
\r
lba_ok:\r
WAITREADY\r
pop bc\r
ld e,a\r
and 10001001b ; Busy, DRQ, or Error?\r
- ret z ; Return to BDOS if no error\r
+ jr z,exit\r
+; ret z ; Return to BDOS if no error\r
\r
ld hl,print_details\r
call pr.errors\r
ld (residual),a\r
\r
ld a,1 ; return hard error to BDOS\r
+exit:\r
+ ld sp,(cfstack)\r
ret\r
\r
;-------------------------------------------------------------------------------\r
tmpsecbuf: ;temporary sector buffer\r
ds 512\r
\r
+ rept 80\r
+ db 07CH\r
+ endm\r
+cfstack::\r
+ dw 0\r
+\r
end\r