1 ; pseudo.S - Produce a pseudo kernel header
3 ; Useful for booting arbitrary
4 ; binary images at 0x1000:0000
6 ; Copyright 2002-2005 John Coffman
7 ; Copyright 2009-2011 Joachim Wiedorn
10 ; Licensed under the terms contained in the file 'COPYING'
11 ; in the source directory.
15 #define DELL_DIRTY_HACK
18 SYSSEG = 0x1000 ; DEF_SYSSEG
19 SETUPSEG = 0x9020 ; DEF_SETUPSEG
21 CL_MAGIC_ADDR = 0x20 ! command line magic number
22 CL_MAGIC = 0xa33f ! very unusual command sequence
23 CL_OFFSET = 0x22 ! command line offset
24 CL_LENGTH = 256 ! maximum length
34 ; we want this to look like a bootable kernel image
35 ; so we include the following header
38 .ascii "HdrS" ; looks like a real kernel
39 .word 0x0200 ; header format version number
40 .word 0,0 ; realmode switch, SETUPSEG
41 .word SYSSEG ; SYSSEG -- load at 1000:0000
43 .byte 0 ; type of loader
44 .byte 0 ; flags 0=load low
45 .word 2*512 ; move size: 2 sectors
46 dd 0x10000 ; load us here
49 .word bs_helper,SETUPSEG ; kludge???
50 ;; .word modelist+1024 ; heap end pointer
51 ;----------end of header------------
55 cmp word ptr [CL_MAGIC_ADDR],#CL_MAGIC
59 jmpi 0000,SYSSEG ; jmp to 0x1000:0000
62 bs_helper: int 0x19 ;label here for kludge
65 id_string: .ascii "pseudo.b"