X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp-cpm3.git/blobdiff_plain/7055170fb2f1f27893ab9e86a1d59a3bf894bb00..1e56f37617354c528443fc320e079037f1971ad9:/cbios/bioskrnl.180 diff --git a/cbios/bioskrnl.180 b/cbios/bioskrnl.180 index 6ead6c3..dc04ed1 100644 --- a/cbios/bioskrnl.180 +++ b/cbios/bioskrnl.180 @@ -51,6 +51,7 @@ ccp equ 0100h ; Console Command Processor gets loaded extrn @dtbl ; table of pointers to XDPHs public @adrv,@rdrv,@trk,@sect ; parameters for disk I/O public @dma,@dbnk,@cnt ; '' '' '' '' + public @xdph ; memory control @@ -432,7 +433,9 @@ bnksel: seldsk: ld a,c ; save drive select code ld (@adrv),a - ld b,0 ; create index from drive code + xor a + ld (@cnt),a + ld b,a ; create index from drive code ld hl,@dtbl add hl,bc ; get pointer to dispatch table add hl,bc @@ -444,19 +447,21 @@ seldsk: or h ret z ; if no entry in table, no disk - ld a,e ; examine login bit - and 1 - ret nz - - push ix - ld ix,(@xdph) - ld a,(ix-2) - ld (@RDRV),a ; get relative drive - ld l,(ix-6) ; get address of LOGIN routine - ld h,(ix-5) - ex (sp),ix - pop de + bit 0,e ; login bit to zero flag + ex de,hl + ld hl,-2 ; get relative drive + add hl,de + ld a,(hl) + ld (@RDRV),a + jr nz,notfirst ; examine login bit + ld hl,-6 + add hl,de + ld a,(hl) + inc hl + ld h,(hl) + ld l,a call ipchl ; call LOGIN +notfirst: ld hl,(@xdph) ; recover DPH pointer ret