|
3 | 3 |
|
4 | 4 | ; TITLE DEVLOAD to load device drivers from command line. |
5 | 5 | ; FORMAT EXE ; *** changed to COM in 3.12/newer *** |
6 | | -; VERSION 3.19 |
| 6 | +; VERSION 3.20 |
7 | 7 | ; CODE 80x86 |
8 | 8 | ; OPTIONS /ML |
9 | 9 | ; TIME CHECK |
10 | 10 | ; DATE 12/3/92 - 31/3/98 |
11 | 11 | ; AUTHOR David Woodhouse |
12 | 12 | ; (C) 1992, 1993 David Woodhouse. |
13 | | -; Patches for 3.12 to 3.16, 3.17 - 3.19: 2004 to 2005, 2007 by Eric Auer |
| 13 | +; Patches for 3.12 to 3.16, 3.17 - 3.20: 2004 to 2005, 2007 by Eric Auer |
14 | 14 |
|
15 | 15 | ; EXPLANATION... |
16 | 16 | ; The program first relocates itself to the top of the available memory |
|
149 | 149 | ; Also tune error messages, use generic text |
150 | 150 | ; for unlikely messages. Shorten help a bit. |
151 | 151 |
|
| 152 | +; Version 3.20 13/9/2007 - Alexey: added EDR-DOS support |
| 153 | +; (for version WIP 17.6.2007 and newer ONLY!) |
| 154 | +; added fmake.bat & readme.txt |
| 155 | + |
152 | 156 | ; .............................IMPROVEMENT IDEAS............................. |
153 | 157 |
|
154 | 158 |
|
@@ -1594,9 +1598,9 @@ LASTBYTE equ $ |
1594 | 1598 |
|
1595 | 1599 | ; ................DATA WHICH ISN'T NEEDED AFTER RELOCATION................... |
1596 | 1600 |
|
1597 | | -SignOnMsg db 'DEVLOAD v3.19 (C) 1992-1996 David Woodhouse ' |
| 1601 | +SignOnMsg db 'DEVLOAD v3.20 (C) 1992-1996 David Woodhouse ' |
1598 | 1602 | |
1599 | | - db ' Patches for v3.12-3.19 by Eric Auer 2004-2007' |
| 1603 | + db ' Patches for v3.12-3.20 by Eric Auer 2004-2007' |
1600 | 1604 | db ' <Eric*coli.uni-sb.de>',13,10 |
1601 | 1605 | db ' Loads device drivers.',13,10 |
1602 | 1606 | ; kind of obvious...: db ' Needs DOS 3 or newer.' |
@@ -1700,26 +1704,39 @@ ver3: ; DR DOS up to 7.00 "are DOS 3.31" but pre-DR-6.0 fail: |
1700 | 1704 | ; (drive parameter block) items, 20h bytes in DOS 3.x, 21h in 4.0-6.0 |
1701 | 1705 | ; FAT32 DPB start like FAT1x ones, but are 1ch bytes longer ... (3.17) |
1702 | 1706 | realver3: mov LDrSize,51h |
1703 | | - mov byte ptr BlHSize,20h |
| 1707 | + mov byte ptr BlHSize,20h |
1704 | 1708 | mov NextBlHOfs,18h |
1705 | 1709 | jmp short classicver |
1706 | 1710 |
|
1707 | 1711 | okver: ; Check FAT32 compatibility: VER >= 7.01 |
1708 | | - ; (new in 3.17, extended in 3.18) |
| 1712 | + ; (new in 3.17, extended in 3.18 and in 3.20) |
1709 | 1713 | cmp al,5 ; new 3.17 |
1710 | 1714 | jb classicver |
| 1715 | + push ax ; Save DOS version from int 21.3000 |
| 1716 | + push bx ; Save OEM ID from int 21.3000 |
1711 | 1717 | mov ax,3306h ; Get true DOS version |
1712 | 1718 | int 21h |
1713 | 1719 | mov cl,8 ; Swap BH and BL |
1714 | 1720 | ror bx,cl ; |
1715 | 1721 | cmp bx,0701h ; VER >= 7.01 ? |
| 1722 | + pop bx ; Restore DOS version from int 21.3000 |
| 1723 | + pop ax ; Restore OEM ID from int 21.3000 |
1716 | 1724 | jb classicver |
1717 | 1725 |
|
1718 | 1726 | ; FAT32 aware version: larger DPB, but same DPB pointer / CDS size |
1719 | | - mov byte ptr BlHSize,003Dh ; new 3.17 |
| 1727 | + mov ch, 3Dh ; Set BlHSize (new in 3.20) |
| 1728 | + ; Check EDR-DOS presence (added in 3.20) |
| 1729 | + ; This code is required because EDR-DOS uses non-typical |
| 1730 | + ; FAT32 DPB (it has 65 b size instead of 61 b) |
| 1731 | + jne stdFAT32 ; If VER != 7.01 - it is not EDR-DOS |
| 1732 | + cmp bx, 0EE00h ; 0EE00h is EDR-DOS OEM ID |
| 1733 | + jne stdFAT32 ; |
| 1734 | + cmp ax, 00006h ; EDR-DOS always returns ver 6.00 |
| 1735 | + jne stdFAT32 ; after calling function int 21.3000 |
| 1736 | + mov ch, 41h ; Increase DPB size for EDR-DOS (added in 3.20) |
| 1737 | +stdFAT32: mov byte ptr BlHSize, ch ; Set FAT32 DPB size (3Dh or 41h) |
1720 | 1738 |
|
1721 | 1739 | classicver: |
1722 | | - |
1723 | 1740 | ; Check command line. |
1724 | 1741 |
|
1725 | 1742 | mov ds,PSPSeg |
|
0 commit comments