Impact: cleanup
Use a symbolic constant for BIOS_kbdflags instead of open-coding the
address.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
/* 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... */
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:
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
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:
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
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: