File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 192192; i.e. what drive letter to assign device
193193; Set exit # (errorlevel) to drive# assigned
194194
195+ ; Version 3.25 05/8/2011 - Jeremy: fix bug where initial CDS not checked,
196+ ; adjust return codes to account for char devices
197+
195198; .............................IMPROVEMENT IDEAS.............................
196199
197200
@@ -560,14 +563,16 @@ noprintladdr: mov ah,52h
560563 mul ah
561564 ; loop until free entry is found
562565CDSinuse:
563- add bx , ax
564- test byte [ es : bx + 44h ], 0C0h ; CDS[AX].flags & 0C00h != 0 then drive in use
565- jz CDSfound
566- ; increment to next CDS entry
567- inc byte [ LastDrUsed ]
566+ add bx , ax ; update pointer into CDS array
567+ ; check that we don't exceed CDS array bounds (> LASTDRIVE)
568568 mov al ,[ LastDrive ]
569569 cmp al ,[ LastDrUsed ]
570570 jbe nofreeCDS
571+ ; test flags (CDS[BX].flags) in current CDS entry to see if in use
572+ test byte [ es : bx + 44h ], 0C0h
573+ jz CDSfound
574+ ; increment to next CDS entry
575+ inc byte [ LastDrUsed ]
571576 mov al ,[ LDrSize ]
572577 cbw
573578 jmp CDSinuse
You can’t perform that action at this time.
0 commit comments