X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp-cpm3.git/blobdiff_plain/50f3b8f0cb6ccbdc5c1ea8f916f3d95b197d3d04..a894545eb628dd3899b970132a29bd87a30e760f:/cbios/bioskrnl.180 diff --git a/cbios/bioskrnl.180 b/cbios/bioskrnl.180 index f2cfde8..39927be 100644 --- a/cbios/bioskrnl.180 +++ b/cbios/bioskrnl.180 @@ -67,7 +67,7 @@ ccp equ 0100h ; Console Command Processor gets loaded ; External names for BIOS entry points - public ?boot,?wboot,?const,?conin,?cono,?list,?auxo,?auxi + public ?boot,?wboot,boot,?const,?conin,?cono,?list,?auxo,?auxi public ?home,?sldsk,?sttrk,?stsec,?stdma,?read,?write public ?lists,?sctrn public ?conos,?auxis,?auxos,?dvtbl,?devin,?drtbl @@ -129,6 +129,10 @@ ccp equ 0100h ; Console Command Processor gets loaded dseg ; this part can be banked boot: + ld a,SYS$CBR + out0 (cbr),a + ld a,USR$CBAR + out0 (cbar),a ld sp,bs$stack call hwinit ; first time hardware initialisation @@ -156,27 +160,13 @@ d$init$loop: or d jr z,d$init$next ; if null, no drive push hl ; save @drv pointer - if 0 - ex de,hl ; XDPH address in - dec hl - dec hl - ld b,(hl) ; get relative drive code - ld (@ADRV),bc ; save absolute and relative drive code - dec hl ; point to init pointer - ld d,(hl) - dec hl - ld e,(hl) ; get init pointer - ex de,hl - call ipchl ; call init routine - else push de - pop ix + pop ix ; XDPH address in ld b,(ix-2) ld (@ADRV),bc ; save absolute and relative drive code ld l,(ix-4) ld h,(ix-3) ; get init pointer call ipchl ; call init routine - endif pop hl ; recover @drv pointer d$init$next: pop bc ; recover counter and drive # @@ -240,13 +230,12 @@ getdrv: - ; CONOUT - ; Console Output. Send character in - ; to all selected devices - -conout: + ; LIST + ; List Output. Send character in + ; to all selected devices. - ld hl,(@covec) ; fetch console output bit vector +list: + ld hl,(@lovec) ; fetch list output bit vector jr out$scan @@ -259,12 +248,13 @@ auxout: jr out$scan - ; LIST - ; List Output. Send character in - ; to all selected devices. + ; CONOUT + ; Console Output. Send character in + ; to all selected devices -list: - ld hl,(@lovec) ; fetch list output bit vector +conout: + + ld hl,(@covec) ; fetch console output bit vector out$scan: ld b,0 ; start with device 0 @@ -290,13 +280,13 @@ not$out$device: ret - ; CONOST - ; Console Output Status. Return true if - ; all selected console output devices + ; LISTST + ; List Output Status. Return true if + ; all selected list output devices ; are ready. -conost: - ld hl,(@covec) ; get console output bit vector +listst: + ld hl,(@lovec) ; get list output bit vector jr ost$scan @@ -310,13 +300,13 @@ auxost: jr ost$scan - ; LISTST - ; List Output Status. Return true if - ; all selected list output devices + ; CONOST + ; Console Output Status. Return true if + ; all selected console output devices ; are ready. -listst: - ld hl,(@lovec) ; get list output bit vector +conost: + ld hl,(@covec) ; get console output bit vector ost$scan: ld b,0 ; start with device 0 @@ -397,16 +387,6 @@ ci1: ; get input, saving & ret - ; CONST - ; Console Input Status. Return true if - ; any selected console input device - ; has an available character. - -const: - ld hl,(@civec) ; get console input bit vector - jr ist$scan - - ; AUXIST ; Auxiliary Input Status. Return true if ; any selected auxiliary input device @@ -414,6 +394,16 @@ const: auxist: ld hl,(@aivec) ; get aux input bit vector + jr ist$scan + + + ; CONST + ; Console Input Status. Return true if + ; any selected console input device + ; has an available character. + +const: + ld hl,(@civec) ; get console input bit vector ist$scan: ld b,0 ; start with device 0 @@ -431,21 +421,21 @@ cis$next: ret - ; CONIN - ; Console Input. Return character from first - ; ready console input device. - -conin: - ld hl,(@civec) - jr in$scan - - ; AUXIN ; Auxiliary Input. Return character from first ; ready auxiliary input device. auxin: ld hl,(@aivec) + jr in$scan + + + ; CONIN + ; Console Input. Return character from first + ; ready console input device. + +conin: + ld hl,(@civec) in$scan: push hl ; save bit vector