|
@@ -1,46 +0,0 @@
|
1
|
|
-/* We need a real mode stack that won't be stomped on by Etherboot
|
2
|
|
- which starts at 0x20000. Choose something that's sufficiently high,
|
3
|
|
- but not in DOC territory. Note that we couldn't do this in a real
|
4
|
|
- .com program since stack variables are in the same segment as the
|
5
|
|
- code and data, but this isn't really a .com program, it just looks
|
6
|
|
- like one to make DOS load it into memory. It still has the 64kB
|
7
|
|
- limitation of .com files though. */
|
8
|
|
-#define STACK_SEG 0x7000
|
9
|
|
-#define STACK_SIZE 0x4000
|
10
|
|
-
|
11
|
|
- .text
|
12
|
|
- .code16
|
13
|
|
- .arch i386
|
14
|
|
- .section ".prefix", "ax", @progbits
|
15
|
|
-
|
16
|
|
-/* Cheat a little with the relocations: .COM files are loaded at 0x100 */
|
17
|
|
-_prefix:
|
18
|
|
- /* Set up temporary stack */
|
19
|
|
- movw $STACK_SEG, %ax
|
20
|
|
- movw %ax, %ss
|
21
|
|
- movw $STACK_SIZE, %sp
|
22
|
|
-
|
23
|
|
- pushl $0 /* No parameters to preserve for exit path */
|
24
|
|
- pushw $0 /* Dummy return address - use prefix_exit */
|
25
|
|
-
|
26
|
|
- /* Calculate segment address of image start */
|
27
|
|
- pushw %cs
|
28
|
|
- popw %ax
|
29
|
|
- addw $(0x100/16), %ax
|
30
|
|
- pushw %ax
|
31
|
|
- pushw $_start
|
32
|
|
- /* Calculated lcall to _start with %cs:0000 = image start */
|
33
|
|
- lret
|
34
|
|
-
|
35
|
|
- .section ".text16", "ax", @progbits
|
36
|
|
-prefix_exit:
|
37
|
|
- movw $0x4c00,%ax /* return to DOS */
|
38
|
|
- int $0x21 /* reach this on Quit */
|
39
|
|
-prefix_exit_end:
|
40
|
|
- .previous
|
41
|
|
-
|
42
|
|
-/* The body of etherboot is attached here at build time.
|
43
|
|
- * Force 16 byte alignment
|
44
|
|
- */
|
45
|
|
- .align 16,0
|
46
|
|
-_body:
|