apparently "signed divide by 2" is "bit shift right" and I misread this shit documentation. Props to Intel for making up shit
This commit is contained in:
parent
7f35d3770b
commit
ed9ac96552
1 changed files with 6 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ test_disk_params:
|
|||
mov %ch, %al
|
||||
# write higher part
|
||||
mov %cl, %ah
|
||||
shr $3, %ah # shift 6 bits to right, because cylinder num's high part is in high 2 bits
|
||||
shr $6, %ah # shift 6 bits to right, because cylinder num's high part is in high 2 bits
|
||||
mov %ax, disk_cylinders
|
||||
# write sectors per cylinder
|
||||
xor %ax, %ax
|
||||
|
|
@ -31,6 +31,11 @@ test_disk_params:
|
|||
and $0b00111111, %al # 6 lower bits are sector count
|
||||
mov %ax, disk_sectors
|
||||
|
||||
# these values are MAX value, so to get TOTAL need to add 1 to each one
|
||||
incw disk_heads
|
||||
incw disk_cylinders
|
||||
incw disk_sectors
|
||||
|
||||
# now we can print all this info
|
||||
movw disk_slaves, %ax
|
||||
mov $str_slaves, %si
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue