-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
124 additions
and
52 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,8 @@ private/** | |
**/*.lst | ||
vm_* | ||
rom | ||
*.exe | ||
*.com | ||
x*.exe | ||
x*.com | ||
pcdos.img | ||
mscmd.asm | ||
mscmdex.asm |
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
File renamed without changes.
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,56 @@ | ||
ORG 100H | ||
|
||
program segment | ||
assume cs:program, ds:program | ||
org 100h | ||
|
||
_start: | ||
clc | ||
; Get BIOS Configuration | ||
int 12h | ||
push ax | ||
push ax | ||
jc short exit | ||
mov cl, 6 | ||
mov ax, cs | ||
shr ax, cl | ||
inc ax | ||
mov bx, ax | ||
pop ax | ||
sub ax, bx | ||
|
||
jmp short display | ||
digitend: | ||
db "K$" | ||
eol: | ||
db 0Ah,0Dh,'$' | ||
display: | ||
call convert | ||
mov ah, 2 | ||
mov dl, '/' | ||
int 21h | ||
pop ax | ||
call convert | ||
exit: | ||
mov ah, 9 | ||
lea dx, [eol] | ||
int 21h | ||
int 20h | ||
convert: | ||
mov bl, 10 | ||
lea di, [digitend] | ||
cvtloop: | ||
dec di | ||
div bl | ||
add ah, '0' | ||
mov [di], ah | ||
xor ah, ah | ||
test al, al | ||
jnz short cvtloop | ||
mov ah, 9 | ||
mov dx, di | ||
int 21h | ||
ret | ||
|
||
program ends | ||
end _start |