Default Drive in WinNT4...
Hy,
I got a little problem with setting the drive in WinNT and maby
other systems too.
I use this code to set the default drive:
(Translated to machine language)
// RWL2-ASM Version
proc SetDRV(DL DRV): // Set Current Drive to DL
CMP DL,25
JBE DoIt // If DL<=25 goto DoIt
CMP DL,65
JAE BIGA // If DL>=65 goto BIGA
JMP Error // Else, DL is not a drive
BIGA:
CMP DL,90
JBE BIG // If DL<=90 goto BIG
CMP DL,97
JAE SMLA // If DL>=97 goto SMLA
JMP Error // Else, DL is not a drive
SMLA:
CMP DL,122
JBE SMALL // If DL<=122 goto SMALL
JMP Error // Else, DL is not a drive
SMALL:
SUB DL,97 // DL=DL-97
JMP DoIt
BIG:
SUB DL,65 // DL=DL-65
DoIt:
MOV AH,#0E // AH=#0E (Set Default Drive)
INT #21 // Call INT21h
Error:
end proc
As you can see, it's nothing special.
It checks if DL<=25, which DL has to be at the time it comes to DoIt
Otherwise it changes it's value to 0-25.
At DoIt, it calls Int21h for setting the drive.
It does set the drives to DL when fixed to 0-25, but when the
drive does not exist it sets it too.
- Could the problem be in WinNT?
- Could the problem be that I poke this string in PM instead of RM?
- What else could be run? (Should I set some other registers)
- Any suggestions to avoid the problem?
- Can the code be shortened and/or speeded-up?
Thanks,
PQ
|
Not Categorized, Please Help
|
|