From a1e66d80179262be63c43bb33046bd41069b803d Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 30 Mar 2009 17:53:09 -0700 Subject: [PATCH] mbr/*.S: use a symbolic constant for BIOS_kbdflags Impact: cleanup Use a symbolic constant for BIOS_kbdflags instead of open-coding the address. Signed-off-by: H. Peter Anvin --- mbr/gptmbr.S | 3 ++- mbr/isohdpfx.S | 5 +++-- mbr/mbr.S | 7 ++++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/mbr/gptmbr.S b/mbr/gptmbr.S index 0a547b8..d6a9a96 100644 --- a/mbr/gptmbr.S +++ b/mbr/gptmbr.S @@ -42,6 +42,7 @@ bootguid = _start + 0x1a8 /* Where we put DS:SI */ dssi_out = _start + 0x1be +BIOS_kbdflags = 0x417 BIOS_page = 0x462 /* gas/ld has issues with doing this as absolute addresses... */ @@ -73,7 +74,7 @@ _start: ljmpw $0, $next next: /* Escape for the user: if Ctrl is pressed, assume drive hd0 */ - testb $0x04, 0x417 /* keyboard control flags: Ctrl pressed */ + testb $0x04, BIOS_kbdflags /* Ctrl pressed */ jz 1f movb $0x80, %dl 1: diff --git a/mbr/isohdpfx.S b/mbr/isohdpfx.S index 0e15b11..0c5b95e 100644 --- a/mbr/isohdpfx.S +++ b/mbr/isohdpfx.S @@ -49,7 +49,8 @@ sectors = (stack-10) heads = (stack-12) secpercyl = (stack-16) -BIOS_page = 0x462 +BIOS_kbdflags = 0x417 +BIOS_page = 0x462 /* gas/ld has issues with doing this as absolute addresses... */ .section ".bootsec", "a", @nobits @@ -82,7 +83,7 @@ _start: next: /* Escape for the user: if Ctrl is pressed, assume drive hd0 */ - testb $0x04, 0x417 /* keyboard control flags: Ctrl pressed */ + testb $0x04, BIOS_kbdflags /* Ctrl pressed */ jz 1f movb $0x80, %dl 1: diff --git a/mbr/mbr.S b/mbr/mbr.S index 70572d5..2c3e65a 100644 --- a/mbr/mbr.S +++ b/mbr/mbr.S @@ -34,8 +34,9 @@ driveno = (stack-6) sectors = (stack-8) secpercyl = (stack-12) -BIOS_page = 0x462 - +BIOS_kbdflags = 0x417 +BIOS_page = 0x462 + /* gas/ld has issues with doing this as absolute addresses... */ .section ".bootsec", "a", @nobits .globl bootsec @@ -66,7 +67,7 @@ _start: next: /* Escape for the user: if Ctrl is pressed, assume drive hd0 */ - testb $0x04, 0x417 /* keyboard control flags: Ctrl pressed */ + testb $0x04, BIOS_kbdflags /* Ctrl pressed */ jz 1f movb $0x80, %dl 1: -- 2.7.4