+loading_msg: .asciz "Loading "
+loading_msg2: .asciz " bytes\n"
+
+sect_per_track: .short 18
+num_cylinders: .short 80
+num_heads: .short 2
+heads_mask: .byte 1
+
+get_drive_chs:
+ movb drive_number, %dl
+ mov $8, %ah
+ int $0x13
+ jnc .Lok
+ ret
+
+.Lok: mov %ch, %al
+ mov %cl, %ah
+ rol $2, %ah
+ and $0x3ff, %ax
+ mov %ax, num_cylinders
+
+ mov %cx, sect_per_track
+ andw $0x3f, sect_per_track
+
+ shr $8, %dx
+ mov %dx, num_heads
+ dec %dl
+ mov %dl, heads_mask
+
+ ret
+