Skip to content

Commit

Permalink
Added DOSVER tool for checking MS-DOS Version)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsupplis committed Jan 2, 2023
1 parent 5dbee4e commit a4a0bba
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ rom
**/.D*
**/*.log
**/*.cmd
**/*.exe
**/*.com
**/*.lib
**/.*.swp
**/*.obj
Expand Down
15 changes: 14 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
AS=aztec34_as
CC=aztec34_cc
AR=aztec34_lib
MASM=pcdev_masm
LINK=pcdev_link
EXE2BIN=pcdev_exe2bin
CFLAGS=-I. -B +0 -D__CPM86__
STRIP=aztec34_sqz
LDFLAGS=-lc86
Expand All @@ -11,7 +14,7 @@ RASM86=pcdev_rasm86
TOOLS=rm.cmd more.cmd write.cmd dump.cmd mode.cmd ls.cmd \
cls.cmd pause.cmd reboot.cmd tod.cmd ver.cmd touch.cmd wc.cmd \
atinit.cmd attime.cmd ciotest.cmd ball.cmd getch.cmd printenv.cmd \
mem.cmd
mem.cmd dosver.com
EXTRAS=clsansi.cmd
PCETOOLS=pce/pceexit.cmd pce/pcever.cmd pce/pcemnt.cmd pce/pcetime.cmd \
pce/pceinit.cmd
Expand Down Expand Up @@ -101,6 +104,15 @@ mem.obj: mem.a86 tinylib.a86

atinit.obj: atinit.a86 baselib.a86 tinylib.a86 atclock.a86

dosver.com: dosver.exe
$(EXE2BIN) dosver.exe dosver.com

dosver.exe: dosver.obj
$(LINK) dosver \;

dosver.obj: dosver.asm
$(MASM) dosver \;

%.cmd: %.obj
$(LINK86) $* '[$$sz]'

Expand All @@ -113,6 +125,7 @@ atinit.obj: atinit.a86 baselib.a86 tinylib.a86 atclock.a86

clean:
$(RM) *.o *.h86 *.log *.sym *.prn *.lst *.obj $(TOOLS) util.lib
$(RM) dosver.exe
$(RM) cpmtest.img ccpmtest.img dostest.img hack.img
(cd pce;make clean)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ For the status, (\\s: space, \\\\: \\, \\u: upper, \\l: lower)
- CLS: Clear screen (clsansi is a vt100/ansi version as opposed to vt52 for PC)
- PAUSE: submit tool waiting for a keystroke
- TOD: Replacement for CP/M-86 without the 78-99 year constraint and date/time validation including leap years. It does not fix the visual issue of the century hard coded to 19. Patches exist for that. It has exactly the same behaviour as the original CP/M-86 tod.cmd tool. (CP/M-86 1.1 for PC/XT only)
- VER: Displays the BDOS version
- VER: Displays the BDOS version (DOSVER.COM is provided to display MS-DOS Compatibility on PC-MODE compatible OSes)
- MEM: Displays the available and system memory
- BALL: A simple CGA demo (CP/M-86 1.1 for PC/XT, DOS Plus and CCP/M-86 or Concurrent DOS BDOS > 3.1) (take on https://www.z80cpu.eu/mirrors/klaw/bouncy.zip)
- GETCH: A simple keyboard scanner
Expand Down
65 changes: 65 additions & 0 deletions dosver.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@

program segment
assume cs:program, ds:program
org 100h
_start:
mov cx,0Ch
int 0E0h
push ax
lea dx,[_header]
mov ah, 09h
int 21h
pop ax
cmp al,41h
jb _print_v1
mov ah, 30h
int 21h
push ax
xor ah,ah
call _print_dec
mov dl, '.'
mov ah, 02h
int 21h
pop ax
mov al,ah
xor ah,ah
call _print_dec
lea dx,[_nl]
mov ah, 09h
int 21h
jmp _exit
_print_v1:
lea dx,[_v1]
mov ah, 09h
int 21h
_exit:
int 20h
_print_dec:
mov cx,0
mov dx,0
_print_dec_loop:
cmp ax,0
je _print_dec_1
mov bx,10
div bx
push dx
inc cx
xor dx,dx
jmp _print_dec_loop
_print_dec_1:
cmp cx,0
je _print_dec_exit
pop dx
add dx,48
mov ah,02h
int 21h
dec cx
jmp _print_dec_1
_print_dec_exit:
ret
_header db "MS-DOS Level $"
_v1 db "1.1"
_nl db 13, 10, "$"
program ends
end _start

0 comments on commit a4a0bba

Please sign in to comment.