forked from adriancable/8086tiny
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix disk/read write error handling and add int13h LBA BIOS extensions
- Loading branch information
Showing
6 changed files
with
248 additions
and
33 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 |
---|---|---|
|
@@ -2,5 +2,7 @@ bios.bin | |
bios.lst | ||
tinyxms.sys | ||
tinyxms.lst | ||
quitemu.com | ||
quitemu.lst | ||
8086tiny | ||
hd.img |
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,40 @@ | ||
CPU 8086 | ||
|
||
BITS 16 | ||
|
||
ORG 0x100 | ||
|
||
mov si, 0x80 | ||
lodsb | ||
mov bl, al | ||
mov bh, 0 | ||
add bx, si | ||
mov cl, 10 | ||
xor dx, dx | ||
lop: | ||
cmp si, bx | ||
je go | ||
lodsb | ||
cmp al, ' ' | ||
je lop | ||
cmp al, 9 | ||
je lop | ||
sub al, '0' | ||
jb help | ||
cmp al, 9 | ||
ja help | ||
xchg ax, dx | ||
mul cl | ||
add al, dl | ||
xchg ax, dx | ||
jmp lop | ||
help: | ||
mov dx, msg | ||
mov ah, 9 | ||
int 21h | ||
ret | ||
go: | ||
xchg ax, dx | ||
mov bx, 0x1234 ; Tell emulator to use AL as exit code | ||
jmp 0:0 ; Actual enstruction that exits emulator | ||
msg db 'Quits 8086tiny emulator', 13, 10, 'Usage: QUITEMU [exit code]', 13, 10, '$' |
Oops, something went wrong.