]> cloudbase.mooo.com Git - z180-stamp-cpm3.git/blobdiff - cbios/bioskrnl.180
time and date allways from server. 1.25ms interrupt
[z180-stamp-cpm3.git] / cbios / bioskrnl.180
index 93d556da10407dad903d4852a74558ac6f78f1dd..39927bea80eaba88c94e9ebf388d46d5d56f1612 100644 (file)
 ;      can be combined to support a particular system\r
 ;      configuration.\r
 \r
-cr     equ     13\r
-lf     equ     10\r
-bell   equ     7\r
 ctlQ   equ     'Q'-'@'\r
 ctlS   equ     'S'-'@'\r
 \r
-ccp    equ     0100h                   ; Console Command Processor gets loaded\r
-                                       ; into the TPA\r
+ccp    equ     0100h           ; Console Command Processor gets loaded\r
+                               ; into the TPA\r
 \r
-       cseg                            ; GENCPM puts CSEG stuff in common memory\r
+       cseg                    ; GENCPM puts CSEG stuff in common memory\r
 \r
 \r
     ; variables in system data page\r
@@ -40,7 +37,7 @@ ccp   equ     0100h                   ; Console Command Processor gets loaded
 \r
     ; initialization\r
 \r
-       extrn hwinit,?init                      ; general initialization and signon\r
+       extrn hwinit,?init              ; general initialization and signon\r
        extrn ?ldccp,?rlccp             ; load & reload CCP for BOOT & WBOOT\r
 \r
     ; user defined character I/O routines\r
@@ -65,19 +62,12 @@ ccp equ     0100h                   ; Console Command Processor gets loaded
 \r
        extrn ?time                     ; signal time operation\r
 \r
-    ; general utility routines\r
-\r
-       public ?pmsg,?pdec      ; print message, print number from 0 to 65535\r
-       public ?pderr           ; print BIOS disk error message header\r
-       public pmsg.in          ; print message inline\r
-       public phex4,phex2      ; print 4 digit hex (HL), or 2 digit hex (A)\r
-\r
        include modebaud.inc            ; define mode bits\r
 \r
 \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
@@ -88,45 +78,45 @@ ccp equ     0100h                   ; Console Command Processor gets loaded
 \r
     ; BIOS Jump vector.\r
 \r
-               ; All BIOS routines are invoked by calling these\r
-               ;       entry points.\r
-\r
-?boot: jp      boot    ; initial entry on cold start\r
-?wboot:        jp      wboot   ; reentry on program exit, warm start\r
-\r
-?const:        jp      const   ; return console input status\r
-?conin:        jp      conin   ; return console input character\r
-?cono: jp      conout  ; send console output character\r
-?list: jp      list    ; send list output character\r
-?auxo: jp      auxout  ; send auxiliary output character\r
-?auxi: jp      auxin   ; return auxiliary input character\r
-\r
-?home: jp      home    ; set disks to logical home\r
-?sldsk:        jp      seldsk  ; select disk drive, return disk parameter info\r
-?sttrk:        jp      settrk  ; set disk track\r
-?stsec:        jp      setsec  ; set disk sector\r
-?stdma:        jp      setdma  ; set disk I/O memory address\r
-?read: jp      read    ; read physical block(s)\r
-?write:        jp      write   ; write physical block(s)\r
-\r
-?lists:        jp      listst  ; return list device status\r
-?sctrn:        jp      sectrn  ; translate logical to physical sector\r
-\r
-?conos:        jp      conost  ; return console output status\r
-?auxis:        jp      auxist  ; return aux input status\r
-?auxos:        jp      auxost  ; return aux output status\r
-?dvtbl:        jp      devtbl  ; return address of device def table\r
-?devin:        jp      ?cinit  ; change baud rate of device\r
-\r
-?drtbl:        jp      getdrv  ; return address of disk drive table\r
-?mltio:        jp      multio  ; set multiple record count for disk I/O\r
-?flush:        jp      flush   ; flush BIOS maintained disk caching\r
-\r
-?mov:  jp      ?move   ; block move memory to memory\r
-?tim:  jp      ?time   ; Signal Time and Date operation\r
-?bnksl:        jp      bnksel  ; select bank for code execution and default DMA\r
-?stbnk:        jp      setbnk  ; select different bank for disk I/O DMA operations\r
-?xmov: jp      ?xmove  ; set source and destination banks for one operation\r
+       ; All BIOS routines are invoked by calling these\r
+       ;       entry points.\r
+\r
+?boot: jp      boot            ; initial entry on cold start\r
+?wboot:        jp      wboot           ; reentry on program exit, warm start\r
+\r
+?const:        jp      const           ; return console input status\r
+?conin:        jp      conin           ; return console input character\r
+?cono: jp      conout          ; send console output character\r
+?list: jp      list            ; send list output character\r
+?auxo: jp      auxout          ; send auxiliary output character\r
+?auxi: jp      auxin           ; return auxiliary input character\r
+\r
+?home: jp      home            ; set disks to logical home\r
+?sldsk:        jp      seldsk          ; select disk drive, return disk parameter info\r
+?sttrk:        jp      settrk          ; set disk track\r
+?stsec:        jp      setsec          ; set disk sector\r
+?stdma:        jp      setdma          ; set disk I/O memory address\r
+?read: jp      read            ; read physical block(s)\r
+?write:        jp      write           ; write physical block(s)\r
+\r
+?lists:        jp      listst          ; return list device status\r
+?sctrn:        jp      sectrn          ; translate logical to physical sector\r
+\r
+?conos:        jp      conost          ; return console output status\r
+?auxis:        jp      auxist          ; return aux input status\r
+?auxos:        jp      auxost          ; return aux output status\r
+?dvtbl:        jp      devtbl          ; return address of device def table\r
+?devin:        jp      ?cinit          ; change baud rate of device\r
+\r
+?drtbl:        jp      getdrv          ; return address of disk drive table\r
+?mltio:        jp      multio          ; set multiple record count for disk I/O\r
+?flush:        jp      flush           ; flush BIOS maintained disk caching\r
+\r
+?mov:  jp      ?move           ; block move memory to memory\r
+?tim:  jp      ?time           ; Signal Time and Date operation\r
+?bnksl:        jp      bnksel          ; select bank for code execution and default DMA\r
+?stbnk:        jp      setbnk          ; select different bank for disk I/O DMA operations\r
+?xmov: jp      ?xmove          ; set source and destination banks for one operation\r
 \r
        jp      0               ; reserved for future expansion\r
        jp      0               ; reserved for future expansion\r
@@ -136,69 +126,59 @@ ccp       equ     0100h                   ; Console Command Processor gets loaded
        ; BOOT\r
        ;       Initial entry point for system startup.\r
 \r
-       dseg    ; this part can be banked\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
+       call    hwinit          ; first time hardware initialisation\r
 \r
-       ld      c,15    ; initialize all 16 character devices\r
+       ld      bc,16*256 + 0   ; initialize all 16 character devices\r
 c$init$loop:\r
        push    bc\r
        call    ?cinit\r
        pop     bc\r
-       dec     c\r
-       jp      p,c$init$loop\r
+       inc     c\r
+       djnz    c$init$loop\r
 \r
-       call    ?init   ; perform any additional system initialization\r
-                       ; and print signon message\r
+       call    ?init           ; perform any additional system initialization\r
+                               ; and print signon message\r
 \r
        ld      bc,16*256+0\r
-       ld      hl,@dtbl                ; init all 16 logical disk drives\r
+       ld      hl,@dtbl        ; init all 16 logical disk drives\r
 d$init$loop:\r
-       push    bc                      ; save remaining count and abs drive\r
+       push    bc              ; save remaining count and abs drive\r
        ld      e,(hl)\r
        inc     hl\r
        ld      d,(hl)\r
-       inc     hl                      ; grab @drv entry\r
+       inc     hl              ; grab @drv entry\r
        ld      a,e\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
+       jr      z,d$init$next   ; if null, no drive\r
+       push    hl              ; save @drv pointer\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      (@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
+       ld      h,(ix-3)        ; get init pointer\r
+       call    ipchl           ; call init routine\r
+       pop     hl              ; recover @drv pointer\r
 d$init$next:\r
-       pop     bc                      ; recover counter and drive #\r
+       pop     bc              ; recover counter and drive #\r
        inc     c\r
-       djnz    d$init$loop             ; and loop for each drive\r
+       djnz    d$init$loop     ; and loop for each drive\r
        jp      boot$1\r
 \r
        cseg    ; following in resident memory\r
 \r
 boot$1:\r
        call    set$jumps\r
-       call    ?ldccp                  ; fetch CCP for first time\r
+       call    ?ldccp          ; fetch CCP for first time\r
        jp      ccp\r
 \r
 \r
@@ -207,9 +187,9 @@ boot$1:
 \r
 wboot:\r
        ld      sp,bs$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
+       call    set$jumps       ; initialize page zero\r
+       call    ?rlccp          ; reload CCP\r
+       jp      ccp             ; then reset jmp vectors and exit to ccp\r
 \r
 \r
 set$jumps:\r
@@ -229,7 +209,7 @@ set$jumps:
        ret\r
 \r
 \r
-       ds 64\r
+       ds bs$stack$size\r
 bs$stack       equ $\r
 \r
 \r
@@ -250,13 +230,12 @@ getdrv:
 \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
@@ -269,12 +248,13 @@ auxout:
        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
@@ -282,31 +262,31 @@ co$next:
        add     hl,hl           ; shift out next bit\r
        jr      nc,not$out$device\r
        push    hl              ; save the vector\r
-       push    bc              ; save the count and character\r
-not$out$ready:\r
-       call    coster\r
-       or      a\r
-       jp      z,not$out$ready\r
-       pop     bc\r
-       push    bc      ; restore and resave the character and device\r
-       call    ?co     ; if device selected, print it\r
+;      push    bc              ; save the count and character\r
+;not$out$ready:\r
+;      call    coster\r
+;      or      a\r
+;      jr      z,not$out$ready\r
+;      pop     bc\r
+       push    bc              ; restore and resave the character and device\r
+       call    ?co             ; if device selected, print it\r
        pop     bc              ; recover count and character\r
        pop     hl              ; recover the rest of the vector\r
 not$out$device:\r
        inc     b               ; next device number\r
        ld      a,h\r
-       or      l       ; see if any devices left\r
+       or      l               ; see if any devices left\r
        jr      nz,co$next      ; and go find them...\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
@@ -320,13 +300,13 @@ auxost:
        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
@@ -334,7 +314,7 @@ cos$next:
        add     hl,hl           ; check next bit\r
        push    hl              ; save the vector\r
        push    bc              ; save the count\r
-       ld      a,0FFh  ; assume device ready\r
+       ld      a,0FFh          ; assume device ready\r
        call    c,coster        ; check status for this device\r
        pop     bc              ; recover count\r
        pop     hl              ; recover bit vector\r
@@ -342,30 +322,31 @@ cos$next:
        ret     z                       ; if any not ready, return false\r
        inc     b               ; drop device number\r
        ld      a,h\r
-       or      l       ; see if any more selected devices\r
+       or      l               ; see if any more selected devices\r
        jr      nz,cos$next\r
-       or      0FFh    ; all selected were ready, return true\r
+       or      0FFh            ; all selected were ready, return true\r
        ret\r
 \r
-coster:                ; check for output device ready, including optional\r
-               ;       xon/xoff support\r
+       ; check for output device ready, including optional\r
+       ;       xon/xoff support\r
+coster:\r
        ld      l,b\r
-       ld      h,0     ; make device code 16 bits\r
-       push    hl                      ; save it in stack\r
+       ld      h,0             ; make device code 16 bits\r
+       push    hl              ; save it in stack\r
        add     hl,hl\r
        add     hl,hl\r
-       add     hl,hl   ; create offset into device characteristics tbl\r
+       add     hl,hl           ; create offset into device characteristics tbl\r
        ld      de,@ctbl+6\r
-       add     hl,de   ; make address of mode byte\r
+       add     hl,de           ; make address of mode byte\r
        ld      a,(hl)\r
        and     mb$xon$xoff\r
-       pop     hl                      ; recover console number in <HL>\r
+       pop     hl              ; recover console number in <HL>\r
        jp      z,?cost         ; not a xon device, go get output status direct\r
        ld      de,xofflist\r
-       add     hl,de   ; make pointer to proper xon/xoff flag\r
+       add     hl,de           ; make pointer to proper xon/xoff flag\r
        call    cist1           ; see if this keyboard has character\r
        ld      a,(hl)\r
-       call    nz,ci1  ; get flag or read key if any\r
+       call    nz,ci1          ; get flag or read key if any\r
        cp      ctlq\r
        jr      nz,not$q        ; if its a ctl-Q,\r
        ld      a,0FFh          ;       set the flag ready\r
@@ -374,12 +355,12 @@ not$q:
        jr      nz,not$s        ; if its a ctl-S,\r
        ld      a,00h           ;       clear the flag\r
 not$s:\r
-       ld      (hl),a                  ; save the flag\r
+       ld      (hl),a          ; save the flag\r
        call    cost1           ; get the actual output status,\r
-       and     (hl)                    ; and mask with ctl-Q/ctl-S flag\r
+       and     (hl)            ; and mask with ctl-Q/ctl-S flag\r
        ret                     ; return this as the status\r
 \r
-cist1:                 ; get input status with <BC> and <HL> saved\r
+cist1:                         ; get input status with <BC> and <HL> saved\r
        push    bc\r
        push    hl\r
        call    ?cist\r
@@ -388,7 +369,7 @@ cist1:                      ; get input status with <BC> and <HL> saved
        or      a\r
        ret\r
 \r
-cost1:                 ; get output status, saving <BC> & <HL>\r
+cost1:                         ; get output status, saving <BC> & <HL>\r
        push    bc\r
        push    hl\r
        call    ?cost\r
@@ -397,7 +378,7 @@ cost1:                      ; get output status, saving <BC> & <HL>
        or      a\r
        ret\r
 \r
-ci1:                   ; get input, saving <BC> & <HL>\r
+ci1:                           ; get input, saving <BC> & <HL>\r
        push    bc\r
        push    hl\r
        call    ?ci\r
@@ -406,16 +387,6 @@ ci1:                       ; get input, saving <BC> & <HL>
        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
@@ -423,6 +394,16 @@ const:
 \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
@@ -434,27 +415,27 @@ cis$next:
        ret     nz              ; if any ready, return true\r
        inc     b               ; next device number\r
        ld      a,h\r
-       or      l       ; see if any more selected devices\r
+       or      l               ; see if any more selected devices\r
        jr      nz,cis$next\r
        xor     a               ; all selected were not ready, return false\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
@@ -485,158 +466,22 @@ ipchl:           ; vectored CALL point
        jp      (hl)\r
 \r
 \r
-;-------------------------------------------------------------------------------\r
-; print message @<HL> up to a null\r
-; saves <BC> & <DE>\r
-\r
-?pmsg:\r
-       push    bc\r
-       push    de\r
-pmsg$loop:\r
-       ld      a,(hl)\r
-       or      a\r
-       jr      z,pmsg$exit\r
-       ld      c,a\r
-       push    hl\r
-       call    ?cono\r
-       pop     hl\r
-       inc     hl\r
-       jr      pmsg$loop\r
-pmsg$exit:\r
-       pop     de\r
-       pop     bc\r
-       ret\r
-\r
-;-------------------------------------------------------------------------------\r
-; print message inline up to a null\r
-; saves all registers\r
-\r
-pmsg.in:\r
-       ex      (sp),hl\r
-       push    af\r
-       call    ?pmsg\r
-       pop     af\r
-       ex      (sp),hl\r
-       ret\r
-\r
-;-------------------------------------------------------------------------------\r
-; print hl as a 4 digit hexadecimal number\r
-; saves all registers\r
-\r
-phex4:\r
-       ld a,h\r
-       call phex2\r
-       ld a,l\r
-       ; fall thru\r
-\r
-;-------------------------------------------------------------------------------\r
-; print a as a 2 digit hexadecimal number\r
-; saves all registers\r
-\r
-phex2:\r
-       push    af\r
-       rra\r
-       rra\r
-       rra\r
-       rra\r
-       call    print.digit\r
-       pop     af\r
-\r
-print.digit:\r
-       push    hl\r
-       push    de\r
-       push    bc\r
-       push    af\r
-       and     00fh\r
-       cp      10\r
-       jr      c,prd_1\r
-       add     a,007h\r
-prd_1:\r
-       add     a,'0'\r
-\r
-       ld      c,a\r
-       call    ?cono\r
-       pop     af\r
-       pop     bc\r
-       pop     de\r
-       pop     hl\r
-       ret\r
-\r
-;-------------------------------------------------------------------------------\r
-\r
-?pdec:         ; print binary number 0-65535 from <HL>\r
-       ld      bc,table10\r
-       ld      de,-10000\r
-next:\r
-       ld      a,'0'-1\r
-pdecl:\r
-       push    hl\r
-       inc     a\r
-       add     hl,de\r
-       jp      nc,stoploop\r
-       inc     sp\r
-       inc     sp\r
-       jp      pdecl\r
-stoploop:\r
-       push    de\r
-       push    bc\r
-       ld      c,a\r
-       call    ?cono\r
-       pop     bc\r
-       pop     de\r
-nextdigit:\r
-       pop     hl\r
-       ld      a,(bc)\r
-       ld      e,a\r
-       inc     bc\r
-       ld      a,(bc)\r
-       ld      d,a\r
-       inc     bc\r
-       ld      a,e\r
-       or      d\r
-       jp      nz,next\r
-       ret\r
-\r
-table10:\r
-       dw      -1000,-100,-10,-1,0\r
-\r
-?pderr:\r
-       ld      hl,drive$msg\r
-       call    ?pmsg                   ; error header\r
-       ld      a,(@adrv)\r
-       add     a,'A'\r
-       ld      c,a\r
-       call    ?cono   ; drive code\r
-       ld      hl,track$msg\r
-       call    ?pmsg                   ; track header\r
-       ld      hl,(@trk)\r
-       call    ?pdec                           ; track number\r
-       ld      hl,sector$msg\r
-       call    ?pmsg                   ; sector header\r
-       ld      hl,(@sect)\r
-       call    ?pdec                           ; sector number\r
-       ret\r
-\r
 \r
        ; BNKSEL\r
        ;       Bank Select.  Select CPU bank for further execution.\r
 \r
 bnksel:\r
-       ld      (@cbnk),a               ; remember current bank\r
-       jp      ?bank                   ; and go exit through users\r
-                                       ; physical bank select routine\r
+       ld      (@cbnk),a       ; remember current bank\r
+       jp      ?bank           ; and go exit through users\r
+                               ; physical bank select routine\r
 \r
 \r
 xofflist:\r
        db      -1,-1,-1,-1,-1,-1,-1,-1         ; ctl-s clears to zero\r
        db      -1,-1,-1,-1,-1,-1,-1,-1\r
 \r
-\r
-\r
        dseg    ; following resides in banked memory\r
 \r
-\r
-\r
 ;      Disk I/O interface routines\r
 \r
 \r
@@ -648,34 +493,34 @@ xofflist:
        ;               in <HL>\r
 \r
 seldsk:\r
-       ld      a,c                     ; save drive select code\r
+       ld      a,c             ; save drive select code\r
        ld      (@adrv),a\r
-       ld      b,0                     ; create index from drive code\r
+       ld      b,0             ; create index from drive code\r
        ld      hl,@dtbl\r
-       add     hl,bc                   ; get pointer to dispatch table\r
+       add     hl,bc           ; get pointer to dispatch table\r
        add     hl,bc\r
        ld      a,(hl)\r
        inc     hl\r
        ld      h,(hl)\r
-       ld      l,a                     ; point at disk descriptor\r
-       ld      (@xdph),hl              ; save descriptor pointer\r
+       ld      l,a             ; point at disk descriptor\r
+       ld      (@xdph),hl      ; save descriptor pointer\r
        or      h\r
-       ret     z                       ; if no entry in table, no disk\r
+       ret     z               ; if no entry in table, no disk\r
 \r
-       ld      a,e                     ; examine login bit\r
+       ld      a,e             ; examine login bit\r
        and     1\r
        ret     nz\r
 \r
        push    ix\r
        ld      ix,(@xdph)\r
        ld      a,(ix-2)\r
-       ld      (@RDRV),a               ; get relative drive\r
-       ld      l,(ix-6)                ; get address of LOGIN routine\r
+       ld      (@RDRV),a       ; get relative drive\r
+       ld      l,(ix-6)        ; get address of LOGIN routine\r
        ld      h,(ix-5)\r
        ex      (sp),ix\r
        pop     de\r
-       call    ipchl                   ; call LOGIN\r
-       ld      hl,(@xdph)              ; recover DPH pointer\r
+       call    ipchl           ; call LOGIN\r
+       ld      hl,(@xdph)      ; recover DPH pointer\r
        ret\r
 \r
 \r
@@ -751,8 +596,8 @@ sectrn:
        ;               extended disk parameter header (XDPH).\r
 \r
 read:\r
-       ld      ix,(@xdph)              ; get drive descriptor pointer\r
-       ld      l,(ix-8)                ; get read routine entry\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
@@ -763,8 +608,8 @@ read:
        ;               extended disk parameter header (XDPH).\r
 \r
 write:\r
-       ld      ix,(@xdph)              ; get drive descriptor pointer\r
-       ld      l,(ix-10)               ; get write routine entry\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
 \r
@@ -784,14 +629,7 @@ multio:
 \r
 flush:\r
        xor     a\r
-       ret             ; return with no error\r
-\r
-\r
-\r
-       ; error message components\r
-drive$msg:     db      cr,lf,bell,'BIOS Error on ',0\r
-track$msg:     db      ': T-',0\r
-sector$msg:    db      ', S-',0\r
+       ret                     ; return with no error\r
 \r
 \r
 ; disk communication data items\r