TJ
2009-Mar-30 21:32 UTC
[syslinux] [PATCH 3/3] v2: isohdpfx: Ctrl-key press forces load from first hard disk
--- mbr/isohdpfx.S | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/mbr/isohdpfx.S b/mbr/isohdpfx.S index 9e9d55c..bddb533 100644 --- a/mbr/isohdpfx.S +++ b/mbr/isohdpfx.S @@ -67,6 +67,7 @@ _start: movw %ax, %ss movw $stack, %sp movw %sp, %si + movw %sp, %bp /* needed later if drive number is to be forced due to Ctrl key being pressed */ pushw %es /* es:di -> $PnP header */ pushw %di pushw %dx /* dl -> drive number */ @@ -82,6 +83,15 @@ _start: ljmpw $0, $next next: + /* Provide a way for the user to force boot from first hard-disk by pressing a Ctrl key */ +get_shift_keys: /* Provide a way for the user to force CHS addressing mode by pressing either Shift key */ + testb $0x04, 0x0417 /* I/O memory-mapped keyboard shift flags: control key pressed? */ + jz detect_bios_type +force_first_hard_disk: + movb $0x80, -6(%bp) /* offset from top-of-stack to drive number; force it to be first hard disk */ + movb $0x80, %dl /* change the drive number about to be used in detect_bios_type */ + +detect_bios_type: /* Check to see if we have EBIOS */ pushw %dx /* drive number */ movb $0x41, %ah /* %al == 0 already */ -- 1.6.0.4
Seemingly Similar Threads
- [PATCH 1/1] v3: Add Diagnostic MBR for trouble-shooting BIOS boot-order problems.
- [PATCH 1/1] Add Diagnostic MBR for trouble-shooting
- [PATCH 1/1] v2 Add Diagnostic MBR for trouble-shooting
- fwd: [syslinux:syslinux-4.xx] mbr/isohdpfx.S: correct stack for heads/sectors
- Patch: make slightly more verbose versions of isohdp.x.S