1/* 2 * Copyright (c) 1998 Robert Nordier 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms are freely 6 * permitted provided that the above copyright notice and this 7 * paragraph and the following disclaimer are duplicated in all 8 * such forms. 9 * 10 * This software is provided "AS IS" and without any express or 11 * implied warranties, including, without limitation, the implied 12 * warranties of merchantability and fitness for a particular 13 * purpose. 14 * |
15 * $FreeBSD: head/sys/boot/i386/boot2/boot1.S 215284 2010-11-14 08:25:27Z brucec $ |
16 */ 17 18/* Memory Locations */ 19 .set MEM_REL,0x700 # Relocation address 20 .set MEM_ARG,0x900 # Arguments 21 .set MEM_ORG,0x7c00 # Origin 22 .set MEM_BUF,0x8c00 # Load area 23 .set MEM_BTX,0x9000 # BTX start --- 210 unchanged lines hidden (view full) --- 234 * by a prompt, wait for a keypress, and then reboot the machine. 235 */ 236error: callw putstr # Display message 237 mov $prompt,%si # Display 238 callw putstr # prompt 239 xorb %ah,%ah # BIOS: Get 240 int $0x16 # keypress 241 movw $0x1234, BDA_BOOT # Do a warm boot |
242 ljmp $0xf000,$0x0 # reboot the machine |
243/* 244 * Display a null-terminated string using the BIOS output. 245 */ 246putstr.0: mov $0x7,%bx # Page:attribute 247 movb $0xe,%ah # BIOS: Display 248 int $0x10 # character 249putstr: lodsb # Get char 250 testb %al,%al # End of string? --- 120 unchanged lines hidden --- |