1 ; pseudo.S -- produce a pseudo kernel header
3 ; This file is useful for booting arbitrary binary images
6 ; Copyright 2002-2005 John Coffman.
9 ; Licensed under the terms contained in the file 'COPYING' in the
14 #define DELL_DIRTY_HACK
17 SYSSEG = 0x1000 ; DEF_SYSSEG
18 SETUPSEG = 0x9020 ; DEF_SETUPSEG
20 CL_MAGIC_ADDR = 0x20 ! command line magic number
21 CL_MAGIC = 0xa33f ! very unusual command sequence
22 CL_OFFSET = 0x22 ! command line offset
23 CL_LENGTH = 256 ! maximum length
33 ; we want this to look like a bootable kernel image
34 ; so we include the following header
37 .ascii "HdrS" ; looks like a real kernel
38 .word 0x0200 ; header format version number
39 .word 0,0 ; realmode switch, SETUPSEG
40 .word SYSSEG ; SYSSEG -- load at 1000:0000
42 .byte 0 ; type of loader
43 .byte 0 ; flags 0=load low
44 .word 2*512 ; move size: 2 sectors
45 dd 0x10000 ; load us here
48 .word bs_helper,SETUPSEG ; kludge???
49 ;; .word modelist+1024 ; heap end pointer
50 ;----------end of header------------
54 cmp word ptr [CL_MAGIC_ADDR],#CL_MAGIC
58 jmpi 0000,SYSSEG ; jmp to 0x1000:0000
61 bs_helper: int 0x19 ;label here for kludge
64 id_string: .ascii "pseudo.b"