\r
; version 1.0 15 Sept 82\r
\r
- include config.inc\r
- include z180reg.inc\r
+ maclib z180reg.inc\r
+ maclib config.inc\r
\r
\r
; Copyright (C), 1982\r
; in <HL>\r
\r
seldsk:\r
- b0call _seldsk\r
- ret\r
-\r
-_seldsk:\r
ld a,c ; save drive select code\r
ld (@adrv),a\r
xor a\r
inc hl\r
ld h,(hl)\r
ld l,a\r
+ ld (bs$stack),sp\r
+ ld sp,bs$stack\r
call ijphl ; call LOGIN\r
+ ld sp,(bs$stack)\r
notfirst:\r
ld hl,(@xdph) ; recover DPH pointer\r
ret\r
; extended disk parameter header (XDPH).\r
\r
read:\r
- b0call _read\r
- ret\r
-\r
-_read:\r
+ ld (bs$stack),sp\r
+ ld sp,bs$stack\r
ld a,1\r
ld (@op),a\r
ld ix,(@xdph) ; get drive descriptor pointer\r
ld l,(ix-8) ; get read routine entry\r
ld h,(ix-7)\r
- jp (hl)\r
-\r
+ call ijphl ; call LOGIN\r
+ ld sp,(bs$stack)\r
+ ret\r
\r
; WRITE\r
; Write physical sector from currently selected drive.\r
; extended disk parameter header (XDPH).\r
\r
write:\r
- b0call _write\r
- ret\r
-\r
-_write:\r
+ ld (bs$stack),sp\r
+ ld sp,bs$stack\r
ld a,2\r
ld (@op),a\r
ld ix,(@xdph) ; get drive descriptor pointer\r
ld l,(ix-10) ; get write routine entry\r
ld h,(ix- 9)\r
- jp (hl)\r
+ call ijphl ; call LOGIN\r
+ ld sp,(bs$stack)\r
+ ret\r
\r
\r
\r