Save disk number

This commit is contained in:
Alex Kotov 2022-01-27 02:33:27 +05:00
parent 7456e22e21
commit d103eb0c6c
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
1 changed files with 5 additions and 0 deletions

View File

@ -7,6 +7,9 @@
_start:
ljmp $0, $(start - _start + 0x7c00)
disk:
.byte 0
start:
cli
xor %ax, %ax
@ -17,6 +20,8 @@ start:
mov %ax, %gs
mov $0x2000, %sp
mov %dl, (disk - _start + 0x7c00)
mov $0x02, %ah
mov $1, %al /* Sectors count */
mov $0x80, %dl /* Drive */