Compare commits

..

No commits in common. "e161d14321f61f8a5553bc3516af3fb6471507cb" and "1c62da4e2daedc999d8b4c541c525c8ca67004bc" have entirely different histories.

1 changed files with 0 additions and 27 deletions

27
io.asm
View File

@ -1,8 +1,6 @@
; SPDX-License-Identifier: MIT
; Copyright (c) 2021 Juhani 'nortti' Krekelä.
debug equ 1
iosegment equ 60h
dossegment equ iosegment + 1*1024/16 ; DOS starts 1KiB after IO system
@ -66,10 +64,8 @@ init:
shl ax, cl
; Memory size is passed in dx
mov dx, ax
if debug
call hexprint16
call newline
endif
; Disk table is passed in si
mov si, offset iogroup:disks_table
@ -98,11 +94,9 @@ endif
test al, al
jnz open_error
if debug
mov al, '+'
mov ah, 0eh
int 10h
endif
; Set random record field 0
mov word ptr iogroup:command_fcb+33, 0
@ -120,14 +114,12 @@ endif
cmp al, 1
jne read_error
if debug
mov ax, cx
call hexprint16
mov al, '.'
mov ah, 0eh
int 10h
endif
; Set up segments for command.com
mov ds, bx
@ -213,7 +205,6 @@ putch endp
; OUT:
; TODO: Document
diskread proc far
if debug
push ax
mov ax, 0e00h + 'r'
int 10h
@ -235,7 +226,6 @@ if debug
call hexprint16
call newline
pop ax
endif
; TODO: Everything except sregs can be trashed
push es
@ -276,25 +266,13 @@ endif
dec di
jz sector_read_fail
reset_disk:
if debug
mov al, '"'
mov ah, 0eh
int 10h
endif
xor ax, ax
int 13h
pop cx
pop ax
jmp try_sector_read
sector_read_fail:
mov al, ah
if debug
call hexprint8;debg
endif
mov al, '?'
mov ah, 0eh
int 10h
@ -554,9 +532,7 @@ error:
mov ah, 0eh
mov al, '!'
int 10h
if debug
call far_caller
endif
hang:
hlt
@ -607,8 +583,6 @@ days_since_epoch: dw 0
data ends
code segment
if debug
hexprint16 proc
xchg al, ah
call hexprint8
@ -698,7 +672,6 @@ logaddr proc
ret
logaddr endp
endif
code ends
end