\r
; External names for BIOS entry points\r
\r
- public ?boot,?wboot,?const,?conin,?cono,?list,?auxo,?auxi\r
+ public ?boot,?wboot,boot,?const,?conin,?cono,?list,?auxo,?auxi\r
public ?home,?sldsk,?sttrk,?stsec,?stdma,?read,?write\r
public ?lists,?sctrn\r
public ?conos,?auxis,?auxos,?dvtbl,?devin,?drtbl\r
dseg ; this part can be banked\r
\r
boot:\r
+ ld a,SYS$CBR\r
+ out0 (cbr),a\r
+ ld a,USR$CBAR\r
+ out0 (cbar),a\r
ld sp,bs$stack\r
\r
call hwinit ; first time hardware initialisation\r
or d\r
jr z,d$init$next ; if null, no drive\r
push hl ; save @drv pointer\r
- if 0\r
- ex de,hl ; XDPH address in <HL>\r
- dec hl\r
- dec hl\r
- ld b,(hl) ; get relative drive code\r
- ld (@ADRV),bc ; save absolute and relative drive code\r
- dec hl ; point to init pointer\r
- ld d,(hl)\r
- dec hl\r
- ld e,(hl) ; get init pointer\r
- ex de,hl\r
- call ipchl ; call init routine\r
- else\r
push de\r
- pop ix\r
+ pop ix ; XDPH address in <DE>\r
ld b,(ix-2)\r
ld (@ADRV),bc ; save absolute and relative drive code\r
ld l,(ix-4)\r
ld h,(ix-3) ; get init pointer\r
call ipchl ; call init routine\r
- endif\r
pop hl ; recover @drv pointer\r
d$init$next:\r
pop bc ; recover counter and drive #\r
\r
\r
\r
- ; CONOUT\r
- ; Console Output. Send character in <C>\r
- ; to all selected devices\r
-\r
-conout:\r
+ ; LIST\r
+ ; List Output. Send character in <C>\r
+ ; to all selected devices.\r
\r
- ld hl,(@covec) ; fetch console output bit vector\r
+list:\r
+ ld hl,(@lovec) ; fetch list output bit vector\r
jr out$scan\r
\r
\r
jr out$scan\r
\r
\r
- ; LIST\r
- ; List Output. Send character in <C>\r
- ; to all selected devices.\r
+ ; CONOUT\r
+ ; Console Output. Send character in <C>\r
+ ; to all selected devices\r
\r
-list:\r
- ld hl,(@lovec) ; fetch list output bit vector\r
+conout:\r
+\r
+ ld hl,(@covec) ; fetch console output bit vector\r
\r
out$scan:\r
ld b,0 ; start with device 0\r
ret\r
\r
\r
- ; CONOST\r
- ; Console Output Status. Return true if\r
- ; all selected console output devices\r
+ ; LISTST\r
+ ; List Output Status. Return true if\r
+ ; all selected list output devices\r
; are ready.\r
\r
-conost:\r
- ld hl,(@covec) ; get console output bit vector\r
+listst:\r
+ ld hl,(@lovec) ; get list output bit vector\r
jr ost$scan\r
\r
\r
jr ost$scan\r
\r
\r
- ; LISTST\r
- ; List Output Status. Return true if\r
- ; all selected list output devices\r
+ ; CONOST\r
+ ; Console Output Status. Return true if\r
+ ; all selected console output devices\r
; are ready.\r
\r
-listst:\r
- ld hl,(@lovec) ; get list output bit vector\r
+conost:\r
+ ld hl,(@covec) ; get console output bit vector\r
\r
ost$scan:\r
ld b,0 ; start with device 0\r
ret\r
\r
\r
- ; CONST\r
- ; Console Input Status. Return true if\r
- ; any selected console input device\r
- ; has an available character.\r
-\r
-const:\r
- ld hl,(@civec) ; get console input bit vector\r
- jr ist$scan\r
-\r
-\r
; AUXIST\r
; Auxiliary Input Status. Return true if\r
; any selected auxiliary input device\r
\r
auxist:\r
ld hl,(@aivec) ; get aux input bit vector\r
+ jr ist$scan\r
+\r
+\r
+ ; CONST\r
+ ; Console Input Status. Return true if\r
+ ; any selected console input device\r
+ ; has an available character.\r
+\r
+const:\r
+ ld hl,(@civec) ; get console input bit vector\r
\r
ist$scan:\r
ld b,0 ; start with device 0\r
ret\r
\r
\r
- ; CONIN\r
- ; Console Input. Return character from first\r
- ; ready console input device.\r
-\r
-conin:\r
- ld hl,(@civec)\r
- jr in$scan\r
-\r
-\r
; AUXIN\r
; Auxiliary Input. Return character from first\r
; ready auxiliary input device.\r
\r
auxin:\r
ld hl,(@aivec)\r
+ jr in$scan\r
+\r
+\r
+ ; CONIN\r
+ ; Console Input. Return character from first\r
+ ; ready console input device.\r
+\r
+conin:\r
+ ld hl,(@civec)\r
\r
in$scan:\r
push hl ; save bit vector\r