-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
enhancementNew feature or requestNew feature or requestexternalCaused by an external componentCaused by an external component
Description
I already did this for the version available at the FreeDOS Gitlab repo 1, and then noticed that there exists a more recent version 2, which probably comes from 3.
The version from 3 had to be slightly changed to make it work. At line 291, value for AX is 0xFF in case of an EDR kernel which does not support INT21.33FC. And the check for FreeDOS should be extended to test for OEM ID 0xEE.
These are the changes I did for the FreeDOS released version:
diff --git a/SOURCE/CALLVER/CALLVER.ASM b/SOURCE/CALLVER/CALLVER.ASM
index 2fd99f2..b473920 100644
--- a/SOURCE/CALLVER/CALLVER.ASM
+++ b/SOURCE/CALLVER/CALLVER.ASM
@@ -7,6 +7,9 @@
; alternatively, FreeDOS specific: CALLVER 1.23
; will change the reported DOS version to 1.23 until you change it back
; numbers have to be 1+2 digits long.
+;
+; Changes:
+; 2025-04-25: add support for the EDR-DOS kernel (date >= 2025-04-25)
cpu 8086
org 100h
@@ -95,14 +98,14 @@ dosver: dw 0 ; ah=minor al=major
hellomessage: ; will be overwritten by stack
db "Use: CALLVER 6.20 [PROGRAM [ARGUMENTS]]",13,10
db "Run one program (in a new shell, using COMSPEC) with a",13,10
- db "fake DOS version number, or globally (only in FreeDOS)",13,10
+ db "fake DOS version number, or globally (only in FreeDOS and EDR-DOS)",13,10
db "modify the reported DOS version (CALLVER 0.00 reverts)",13,10
db "CALLVER is public domain."
crlfmessage:
db 13,10,"$"
freedosmessage:
- db "FreeDOS kernel, reports DOS version:$"
+ db "Kernel reports DOS version:$"
freedossetmessage:
db "Set reported DOS version to:$"
freedosintmessage:
@@ -113,7 +116,7 @@ realvermessage:
cspecerrormessage:
db "COMSPEC not found",13,10,"$"
fdoserrormessage:
- db "SETVER mode needs a FreeDOS kernel",13,10,"$"
+ db "SETVER mode needs a FreeDOS or INT21.33FC supporting EDR-DOS kernel",13,10,"$"
comarg: db " /c " ; 4 bytes fixed size
@@ -135,7 +138,7 @@ getarg0:
jmp getarg
-nofreedos:
+no_oss_dos:
mov dx,fdoserrormessage
mov ah,9 ; show string
int 21h
@@ -146,7 +149,10 @@ noprog:
mov ax,3000h ; get DOS version
int 21h
cmp bh,0fdh ; FreeDOS?
- jnz nofreedos
+ jz have_oss_dos
+ cmp bh,0eeh ; EDR-DOS?
+ jnz no_oss_dos
+have_oss_dos:
push ax
mov dx,freedosmessage
mov ah,9 ; show string
@@ -198,6 +204,8 @@ setver:
call showver
mov ax,33fch ; set DOS version
int 21h
+ cmp al,0ffh ; function unsupported (older EDR kernel)?
+ je no_oss_dos
mov ax,4c00h ; exit with errorlevel 0
int 21hReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestexternalCaused by an external componentCaused by an external component