Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement version table support for int21/ah=4b, subfunctions 0 and 1
- Loading branch information
1 parent
35a1835
commit 7496c68
Showing
9 changed files
with
164 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,9 @@ cd ..\sys | |
cd ..\kernel | ||
%MAKE% clean | ||
|
||
cd ..\setver | ||
%MAKE% clean | ||
|
||
cd ..\hdr | ||
if exist *.bak del *.bak | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# | ||
# makefile for setver.sys | ||
# | ||
|
||
!include "../mkfiles/generic.mak" | ||
|
||
|
||
production: setver.sys | ||
|
||
setver.sys: setver.asm | ||
$(NASM) -o ..$(DIRSEP)bin$(DIRSEP)setver.sys setver.asm | ||
|
||
clobber: clean | ||
|
||
clean: | ||
-$(RM) *.obj *.map *.lst *.err | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
; | ||
; Initially written by Ricardo Hanke | ||
; Released under the terms of the GNU General Public License. | ||
; See the file 'COPYING' in the main directory for details. | ||
; | ||
; This driver loads the list of special programs into memory. | ||
; | ||
|
||
section .text | ||
|
||
|
||
COMMAND equ 2 | ||
STATUS equ 3 | ||
DRIVEREND equ 14 | ||
|
||
FAKETABLE equ 37h | ||
|
||
|
||
header dw -1, -1 | ||
dw 1000000000000000b | ||
dw strategy | ||
dw interrupt | ||
db "SETVERXX" | ||
|
||
dw signature | ||
|
||
paramblock dd 0 | ||
|
||
|
||
strategy: mov [cs:paramblock + 0], bx | ||
mov [cs:paramblock + 2], es | ||
retf | ||
|
||
|
||
interrupt: push ax | ||
push bx | ||
push di | ||
push es | ||
pushf | ||
|
||
les di, [paramblock] | ||
mov bl, [es:di + COMMAND] | ||
cmp bl, 0 | ||
jne error | ||
|
||
mov ax, table | ||
add ax, [length] | ||
|
||
mov word [es:di + DRIVEREND + 0], ax | ||
mov word [es:di + DRIVEREND + 2], cs | ||
|
||
mov ah, 52h | ||
int 21h | ||
|
||
mov word [es:bx + FAKETABLE + 0], table | ||
mov word [es:bx + FAKETABLE + 2], cs | ||
|
||
xor ax, ax | ||
jmp exit | ||
|
||
error: mov ax, 8003h | ||
|
||
exit: or ax, 0100h | ||
mov [es:di + STATUS], ax | ||
|
||
popf | ||
pop es | ||
pop di | ||
pop bx | ||
pop ax | ||
|
||
retf | ||
|
||
|
||
signature db 'SDIR' | ||
length dw 1 | ||
|
||
table ;db 11, "SHOWVER.EXE", 5, 00 | ||
;db 12, "BUGGYPRG.EXE", 3, 31 | ||
|
||
db 0 |