c6591b60e3b94fd3095d2b119c2c0e9d3b6f6fa9
[profile/ivi/syslinux.git] / configinit.inc
1 ;; -----------------------------------------------------------------------
2 ;;
3 ;;   Copyright 1994-2008 H. Peter Anvin - All Rights Reserved
4 ;;
5 ;;   This program is free software; you can redistribute it and/or modify
6 ;;   it under the terms of the GNU General Public License as published by
7 ;;   the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8 ;;   Boston MA 02111-1307, USA; either version 2 of the License, or
9 ;;   (at your option) any later version; incorporated herein by reference.
10 ;;
11 ;; -----------------------------------------------------------------------
12
13 ;;
14 ;; configinit.inc
15 ;;
16 ;; Initialize the configuration section
17 ;;
18
19                 section .text
20
21 reset_config:
22                 xor eax,eax
23
24                 ; Initialize the .config section
25                 mov si,section..config.start
26                 mov di,section..config.vstart
27                 mov cx,section..config.end.start
28                 sub cx,di
29                 shr cx,2
30                 rep movsd
31
32 %ifndef DEPEND
33 %if NULLFILE != 0
34                 mov al,NULLFILE
35                 mov di,FKeyName
36                 mov cx,MAX_FKEYS*(1 << FILENAME_MAX_LG2)
37                 rep stosb
38 %endif
39 %endif
40
41                 mov si,linuxauto_cmd            ; Default command: "linux auto"
42                 mov di,default_cmd
43                 mov cx,linuxauto_len
44                 rep movsb
45
46                 mov di,KbdMap                   ; Default keymap 1:1
47                 xor al,al
48                 inc ch                          ; CX <- 256
49 mkkeymap:       stosb
50                 inc al
51                 loop mkkeymap
52
53                 ret
54
55                 section .data
56 linuxauto_cmd   db 'linux auto',0
57 linuxauto_len   equ $-linuxauto_cmd