Skip to content

Commit

Permalink
mbr/isohdpfx.S: correct stack for heads/sectors; revert
Browse files Browse the repository at this point in the history
Heads and sectors were pushed in reverse order per isolinux.asm

bb519a9 reversed the order of heads/sectors on the stack

Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
  • Loading branch information
Martin Str|mberg authored and geneC committed Mar 28, 2017
1 parent 2b35150 commit 32c0902
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mbr/isohdpfx.S
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,12 @@ next:
/* Get (C)HS geometry */
movb $0x08, %ah
int $0x13
andw $0x3f, %cx /* Sector count */
popw %bx /* EBIOS flag */
pushw %cx /* -16: Save sectors on the stack */
movzbw %dh, %ax /* dh = max head */
incw %ax /* From 0-based max to count */
pushw %ax /* -18: Save heads on the stack */
pushw %ax /* -16: Save heads on the stack */
andw $0x3f, %cx /* Sector count */
pushw %cx /* -18: Save sectors on the stack */
mulw %cx /* Heads*sectors -> sectors per cylinder */

pushw %bx /* -20: EBIOS flag */
Expand Down

0 comments on commit 32c0902

Please sign in to comment.