1 ; bootnot.asm - boot1 written for turbo assembler, since gas only
2 ; generates 32 bit code and this must run in real mode.
3 ; To compile as floppy boot1f.not:
4 ; tasm /m3 /dBOOTDEV=FLOPPY boot1 ,boot1f
7 ; ren boot1f.bin boot1f.not
9 ;***********************************************************************
10 ; This is the code for the NeXT boot1 bootsector.
11 ;***********************************************************************
13 P486 ;enable i386 instructions
16 ASSUME CS:CSEG,DS:CSEG
20 ;BOOTSEG = 100h ; boot will be loaded at 4k
24 BUFSZ = 2000h ; 8K disk transfer buffer
26 ; This code is a replacement for boot1. It is loaded at 0x0:0x7c00
31 mov ss,ax ; set up stack seg
33 sti ; reenable interrupts
39 cld ; so pointers will get updated
40 mov di,0E000h ; relocate boot program to 0xE000
41 mov cx,100h ; copy 256x2 bytes
43 off1 = 0E000h + (a1 - start)
44 jmp FAR 0000:off1 ; jump to a1 in relocated place
52 mov si, OFFSET not_boot
53 call message ; display intro message
58 jmp halt ; get key and loop forever
60 message: ; write the error message in ds:esi
66 mov bx, 1 ; bh=0, bl=1 (blue)
70 lodsb ; load a byte into al
73 mov ah, 0eh ; bios int 10, function 0xe
74 int 10h ; bios display a byte in tty mode
81 mov bx, 1 ; bh=0, bl=1 (blue)
82 mov ah, 0eh ; bios int 10, function 0xe
83 int 10h ; bios display a byte in tty mode
90 db 'The disk in the floppy disk drive isn''t a startup disk:'
92 db 'It doesn''t contain '
93 db 'the system files required to start up the computer.'
95 db 'Please eject this disk and restart the computer'
96 db ' with a floppy disk,'
98 db 'hard disk, or CD-ROM that is a startup disk.'
102 ; the last 2 bytes in the sector contain the signature
104 a2 = 510 - (d1 - start)