Dir cleanup

This commit is contained in:
2025-10-01 23:44:19 +02:00
parent bf9a88805f
commit 1b2237f2f7
39 changed files with 84 additions and 74 deletions

32
src/writefloppy.asm Normal file
View File

@@ -0,0 +1,32 @@
BITS 16
CPU 8086
start:
; sp and all segment registers need to be saved
push bp ; and we also save bp (??)
push es
mov bp, sp ; we'll need that to access parameters
xor dx, dx ; drive 0, head 0
mov es, dx ; es = 0
mov bx, 0xf000 ; store the read sector there
mov ax, 0x0301 ; write, 1 sector
; params: cylinder, head, sector, out
mov si, [bp+14]
mov ch, [si]
mov si, [bp+12]
mov dh, [si]
mov si, [bp+10]
mov cl, [si]
int 0x13
mov si, [bp+8]
mov [si], ax
pop es
pop bp
retf 8 ; 2x the number of parameters on the stack