Skip to content

Commit f259d8b

Browse files
committed
doesn't trample CDS but /V displays incorrect information
git-svn-id: http://svn.code.sf.net/p/fdos/code/trunk@131 d9247ac3-808d-4053-b241-f1a6b6229609
1 parent b5e0e17 commit f259d8b

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

devload.asm

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -519,9 +519,9 @@ loadedok: test byte [ModeFlag],VerboseFlag ; *** byte ptr ***
519519
; DS:TopCSeg, ES:TopCSeg
520520

521521
; Get pointer to 'invar' (list of lists)
522-
523522
noprintladdr: mov ah,52h
524523
int 21h
524+
int 3
525525

526526
; Store for later use.
527527

@@ -536,24 +536,24 @@ noprintladdr: mov ah,52h
536536
mov word [nBlkDev],ax ; *** updates nBlkDev & LastDrive
537537
538538
; Determine 1st free CDS entry
539-
push bx
540-
push es
539+
push bx
540+
push es
541541

542-
; Get pointer to LASTDRIVE array (Current Directory Structure - CDS).
542+
; Get pointer to LASTDRIVE array (Current Directory Structure - CDS).
543543
les bx,[es:bx+16h]
544544

545-
; Calculate offset in CDS array of next free entry (>= current # of block devices)
546-
dec al ; AX set earlier to nBlkDev, -1 for zero based
547-
mov [LastDrUsed], al ; default to assume only block drivers have CDS entry
545+
; Calculate offset in CDS array of next free entry (>= current # of block devices)
546+
dec al ; AX set earlier to nBlkDev, -1 for zero based
547+
mov [LastDrUsed], al ; default to assume only block drivers have CDS entry
548548
mov ah,[LDrSize]
549549
mul ah
550550
; loop until free entry is found
551551
CDSinuse:
552552
add bx,ax
553-
inc byte [LastDrUsed]
554553
test byte [es:bx+44h], 0C0h ; CDS[AX].flags & 0C00h != 0 then drive in use
555554
jz CDSfound
556555
; increment to next CDS entry
556+
inc byte [LastDrUsed]
557557
mov al,[LDrSize]
558558
cbw
559559
jmp CDSinuse
@@ -1395,7 +1395,7 @@ noprintblhmsg: lds bx,[Invar]
13951395
; Calculate offset in array of entry for this drive.
13961396

13971397
mov al,[cs:LastDrUsed]
1398-
dec al
1398+
;dec al ; **** remove me?
13991399
mov ah,[cs:LDrSize]
14001400
mul ah
14011401
add bx,ax
@@ -1644,9 +1644,9 @@ EmptyPath dw 0
16441644

16451645
NameBuffer times 80h db 0 ; resb 80h
16461646
1647-
nBlkDev db 0 ; resb 1
1647+
nBlkDev db 0 ; resb 1 ; Note: nBlkDev & LastDrive
1648+
LastDrive db 0 ; resb 1 ; must be together as loaded from LoL together
16481649
LastDrUsed db 0 ; resb 1
1649-
LastDrive db 0 ; resb 1
16501650

16511651
OldAllocStrat dw 0 ; resw 1 ; DOS allocation strategy
16521652
BlockSize dw 0 ; resw 1

0 commit comments

Comments
 (0)