/* -----------------------------------------------------------------------
*
* Copyright 2007-2009 H. Peter Anvin - All Rights Reserved
+ * Copyright 2009 Intel Corporation; author: H. Peter Anvin
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
*
* ----------------------------------------------------------------------- */
+#include "adjust.h"
+
.code16
.text
BIOS_kbdflags = 0x417
BIOS_page = 0x462
-
+
/* gas/ld has issues with doing this as absolute addresses... */
.section ".bootsec", "a", @nobits
.globl bootsec
.text
.globl _start
_start:
+ .byte 0x33, 0xc0 /* xorw %ax, %ax */
cli
- xorw %ax, %ax
movw %ax, %ds
movw %ax, %ss
movw $stack, %sp
ljmpw $0, $next
next:
-
- /* Escape for the user: if Ctrl is pressed, assume drive hd0 */
- testb $0x04, BIOS_kbdflags /* Ctrl pressed */
- jz 1f
- movb $0x80, %dl
-1:
+
+ ADJUST_DRIVE
pushw %dx /* dl -> drive number */
/* Check to see if we have EBIOS */