1 ; Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3 ; @APPLE_LICENSE_HEADER_START@
5 ; Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
6 ; Reserved. This file contains Original Code and/or Modifications of
7 ; Original Code as defined in and that are subject to the Apple Public
8 ; Source License Version 1.1 (the "License"). You may not use this file
9 ; except in compliance with the License. Please obtain a copy of the
10 ; License at http://www.apple.com/publicsource and read it before using
13 ; The Original Code and all software distributed under the License are
14 ; distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 ; EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 ; INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 ; FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
18 ; License for the specific language governing rights and limitations
21 ; @APPLE_LICENSE_HEADER_END@
23 ; nullboot.s - boot1 written for nasm assembler, since gas only
24 ; generates 32 bit code and this must run in real mode.
25 ; To compile as floppy boot1f.not:
26 ; nasm -dBOOTDEV=FLOPPY nullboot1.s -o nullboot1
28 ;***********************************************************************
29 ; This is the code for the NeXT boot1 bootsector.
30 ;***********************************************************************
38 BUFSZ EQU 2000h ; 8K disk transfer buffer
40 ; This code is a replacement for boot1. It is loaded at 0x0:0x7c00
45 mov ss,ax ; set up stack seg
47 sti ; reenable interrupts
53 cld ; so pointers will get updated
54 mov di,0E000h ; relocate boot program to 0xE000
55 mov cx,100h ; copy 256x2 bytes
57 jmp 0000:0E000h + (a1 - start) ; jump to a1 in relocated place
66 call message ; display intro message
71 jmp short halt ; get key and loop forever
73 message: ; write the error message in ds:esi
79 mov bx, 1 ; bh=0, bl=1 (blue)
83 lodsb ; load a byte into al
86 mov ah, 0eh ; bios int 10, function 0xe
87 int 10h ; bios display a byte in tty mode
94 mov bx, 1 ; bh=0, bl=1 (blue)
95 mov ah, 0eh ; bios int 10, function 0xe
96 int 10h ; bios display a byte in tty mode
103 db 'The disk in the floppy disk drive isn',39,'t a startup disk:'
105 db 'It doesn',39,'t contain ' ; 39 = a ' char
106 db 'the system files required to start up the computer.'
108 db 'Please eject this disk and restart the computer'
109 db ' with a floppy disk,'
111 db 'hard disk, or CD-ROM that is a startup disk.'
115 ; the last 2 bytes in the sector contain the signature
117 a2 equ 510 - (d1 - start)
118 times a2 db 0 ; fill the rest with zeros