initvesa: don't trust the BIOS when it says tty is supported
[syslinux.git] / init.inc
bloba01c6e94a384ec7f065b34ee987ccc2d7963c156
1 ; -*- fundamental -*-
2 ; -----------------------------------------------------------------------
4 ;   Copyright 2004 H. Peter Anvin - All Rights Reserved
6 ;   This program is free software; you can redistribute it and/or modify
7 ;   it under the terms of the GNU General Public License as published by
8 ;   the Free Software Foundation, Inc., 53 Temple Place Ste 330,
9 ;   Boston MA 02111-1307, USA; either version 2 of the License, or
10 ;   (at your option) any later version; incorporated herein by reference.
12 ; -----------------------------------------------------------------------
15 ; init.inc
17 ; Common initialization code (inline)
20                 section .text
21 common_init:
22                 ; Now set up screen parameters
23                 call adjust_screen
25                 ; Wipe the F-key area
26                 mov al,NULLFILE
27                 mov di,FKeyName
28                 mov cx,10*(1 << FILENAME_MAX_LG2)
29                 rep stosb
31                 mov si,linuxauto_cmd            ; Default command: "linux auto"
32                 mov di,default_cmd
33                 mov cx,linuxauto_len
34                 rep movsb
36                 mov di,KbdMap                   ; Default keymap 1:1
37                 xor al,al
38                 inc ch                          ; CX <- 256
39 mkkeymap:       stosb
40                 inc al
41                 loop mkkeymap
44 ; Clear Files structures
46                 mov di,Files
47                 mov cx,(MAX_OPEN*open_file_t_size)/4
48                 xor eax,eax
49                 rep stosd
51 %if IS_PXELINUX
52                 mov di,Files+tftp_pktbuf
53                 mov cx,MAX_OPEN
54 .setbufptr:
55                 mov [di],ax
56                 add di,open_file_t_size
57                 add ax,PKTBUF_SIZE
58                 loop .setbufptr
59 %endif
61                 section .data
62 linuxauto_cmd   db 'linux auto',0
63 linuxauto_len   equ $-linuxauto_cmd
65                 section .text                   ; This is an inline file...