\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
public ?conos,?auxis,?auxos,?dvtbl,?devin,?drtbl\r
public ?mltio,?flush,?mov,?tim,?bnksl,?stbnk,?xmov\r
\r
- public bs$stack\r
+ extrn bs$stack\r
+ extrn _b0call\r
\r
\r
; BIOS Jump vector.\r
?ioctl jp ioctl ;\r
\r
\r
+ rept 48\r
+ db '|'\r
+ endm\r
+boot$stack:\r
+\r
+\r
; BOOT\r
; Initial entry point for system startup.\r
\r
out0 (cbr),a\r
ld a,USR$CBAR\r
out0 (cbar),a\r
- ld sp,bs$stack\r
+ ld sp,boot$stack\r
\r
call hwinit ; first time hardware initialisation\r
\r
; Entry for system restarts.\r
\r
wboot:\r
- ld sp,bs$stack\r
+ ld sp,boot$stack\r
call set$jumps ; initialize page zero\r
call ?rlccp ; reload CCP\r
jp ccp ; then reset jmp vectors and exit to ccp\r
ret\r
\r
\r
- ds bs$stack$size\r
-bs$stack equ $\r
-\r
\r
; DEVTBL\r
; Return address of character device table\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
+ 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
+ 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
\r
@cbnk: db 0 ; bank for processor operations\r
\r
-\r
end\r