aboutsummaryrefslogtreecommitdiffstats
path: root/init.inc
diff options
context:
space:
mode:
authorhpa <hpa>2004-12-19 07:08:48 +0000
committerhpa <hpa>2004-12-19 07:08:48 +0000
commit67af2ad7bead9bd53a15cd069217a28f02337811 (patch)
treee6761dabad01e70afa7ed27cf7584f22b752e1d2 /init.inc
parent30f627b2fbf9b0c83eaa8ae8550d729c8ac00f1b (diff)
downloadsyslinux-elf-67af2ad7bead9bd53a15cd069217a28f02337811.tar.gz
syslinux-elf-67af2ad7bead9bd53a15cd069217a28f02337811.tar.xz
syslinux-elf-67af2ad7bead9bd53a15cd069217a28f02337811.zip
More common code cleanup; actually use the code to compress vkernels
Diffstat (limited to 'init.inc')
-rw-r--r--init.inc67
1 files changed, 67 insertions, 0 deletions
diff --git a/init.inc b/init.inc
new file mode 100644
index 00000000..d2289d7e
--- /dev/null
+++ b/init.inc
@@ -0,0 +1,67 @@
+; -*- fundamental -*-
+; -----------------------------------------------------------------------
+;
+; Copyright 2004 H. Peter Anvin - All Rights Reserved
+;
+; This program is free software; you can redistribute it and/or modify
+; it under the terms of the GNU General Public License as published by
+; the Free Software Foundation, Inc., 53 Temple Place Ste 330,
+; Boston MA 02111-1307, USA; either version 2 of the License, or
+; (at your option) any later version; incorporated herein by reference.
+;
+; -----------------------------------------------------------------------
+; $Id$
+
+;
+; init.inc
+;
+; Common initialization code (inline)
+;
+
+ section .text
+common_init:
+ ; Now set up screen parameters
+ call adjust_screen
+
+ ; Wipe the F-key area
+ mov al,NULLFILE
+ mov di,FKeyName
+ mov cx,10*(1 << FILENAME_MAX_LG2)
+ rep stosb
+
+ mov si,linuxauto_cmd ; Default command: "linux auto"
+ mov di,default_cmd
+ mov cx,linuxauto_len
+ rep movsb
+
+ mov di,KbdMap ; Default keymap 1:1
+ xor al,al
+ inc ch ; CX <- 256
+mkkeymap: stosb
+ inc al
+ loop mkkeymap
+
+;
+; Clear Files structures
+;
+ mov di,Files
+ mov cx,(MAX_OPEN*open_file_t_size)/4
+ xor eax,eax
+ rep stosd
+
+%if IS_PXELINUX
+ mov di,Files+tftp_pktbuf
+ mov cx,MAX_OPEN
+.setbufptr:
+ mov [di],ax
+ add di,open_file_t_size
+ add ax,PKTBUF_SIZE
+ loop .setbufptr
+%endif
+
+ section .data
+linuxauto_cmd db 'linux auto',0
+linuxauto_len equ $-linuxauto_cmd
+
+ section .text ; This is an inline file...
+