mirror of https://github.com/tailix/loadwarka.git
Save disk number
This commit is contained in:
parent
7456e22e21
commit
d103eb0c6c
|
@ -7,6 +7,9 @@
|
||||||
_start:
|
_start:
|
||||||
ljmp $0, $(start - _start + 0x7c00)
|
ljmp $0, $(start - _start + 0x7c00)
|
||||||
|
|
||||||
|
disk:
|
||||||
|
.byte 0
|
||||||
|
|
||||||
start:
|
start:
|
||||||
cli
|
cli
|
||||||
xor %ax, %ax
|
xor %ax, %ax
|
||||||
|
@ -17,6 +20,8 @@ start:
|
||||||
mov %ax, %gs
|
mov %ax, %gs
|
||||||
mov $0x2000, %sp
|
mov $0x2000, %sp
|
||||||
|
|
||||||
|
mov %dl, (disk - _start + 0x7c00)
|
||||||
|
|
||||||
mov $0x02, %ah
|
mov $0x02, %ah
|
||||||
mov $1, %al /* Sectors count */
|
mov $1, %al /* Sectors count */
|
||||||
mov $0x80, %dl /* Drive */
|
mov $0x80, %dl /* Drive */
|
||||||
|
|
Loading…
Reference in New Issue