VGAFileBuf resb FILENAME_MAX ; Unmangled VGA image name
VGAFileBufEnd equ $
VGAFileMBuf resb FILENAME_MAX ; Mangled VGA image name
+ alignb 4 ; For the good of REP MOVSD
+command_line resb max_cmd_len+2 ; Command line buffer
+ alignb 4
+default_cmd resb max_cmd_len+1 ; "default" command line
alignb open_file_t_size
Files resb MAX_OPEN*open_file_t_size
linuxauto_len equ $-linuxauto_cmd
boot_image db 'BOOT_IMAGE='
boot_image_len equ $-boot_image
- align 4, db 0 ; For the good of REP MOVSD
-command_line equ $
-default_cmd equ $+(max_cmd_len+2)
-ldlinux_end equ default_cmd+(max_cmd_len+1)
-kern_cmd_len equ ldlinux_end-command_line
+ldlinux_end equ $
+
;
; Put the getcbuf right after the code, aligned on a sector boundary
;
VGAFileMBuf resb 11 ; Mangled VGA image name
alignb 4 ; For the good of REP MOVSD
command_line resb max_cmd_len+2 ; Command line buffer
+ alignb 4
default_cmd resb max_cmd_len+1 ; "default" command line
-kern_cmd_len equ $-command_line
section .text
org 7C00h
%include "font.inc" ; VGA font stuff
%include "graphics.inc" ; VGA graphics
%include "highmem.inc" ; High memory sizing
+%include "strcpy.inc" ; strcpy()
; -----------------------------------------------------------------------------
; Begin data section
VGAFileBuf resb FILENAME_MAX ; Unmangled VGA image name
VGAFileBufEnd equ $
VGAFileMBuf resb FILENAME_MAX ; Mangled VGA image name
+ alignb 4 ; For the good of REP MOVSD
+command_line resb max_cmd_len+2 ; Command line buffer
+ alignb 4
+default_cmd resb max_cmd_len+1 ; "default" command line
;
; PXE packets which don't need static initialization
linuxauto_len equ $-linuxauto_cmd
boot_image db 'BOOT_IMAGE='
boot_image_len equ $-boot_image
- align 4, db 0 ; For the good of REP MOVSD
-command_line equ $
-default_cmd equ $+(max_cmd_len+2)
-ldlinux_end equ default_cmd+(max_cmd_len+1)
-kern_cmd_len equ ldlinux_end-command_line
+ldlinux_end equ $
+
;
; Put the getcbuf right after the code, aligned on a sector boundary
;
SPECIAL_APPEND ; Module-specific hook
mov si,[CmdOptPtr] ; Options from user input
- mov cx,(kern_cmd_len+3) >> 2
- rep movsd
+ call strcpy
;
; Scan through the command line for anything that looks like we might be