Bootloader add temporary initial command line

This will probably be read from some config file at some point
This commit is contained in:
Bananymous 2023-11-17 20:38:38 +02:00
parent 065eec430e
commit f0d2a211ea
1 changed files with 12 additions and 4 deletions

View File

@ -6,10 +6,20 @@
# NO REGISTERS SAVED # NO REGISTERS SAVED
.global read_user_command_line .global read_user_command_line
read_user_command_line: read_user_command_line:
# print initial command line
movw $command_line_enter_msg, %si movw $command_line_enter_msg, %si
call puts call puts
movw $command_line_buffer, %si
call puts
# prepare registers for input
movw $command_line_enter_msg, %si
movw $command_line_buffer, %di movw $command_line_buffer, %di
.read_user_command_line_goto_end:
cmpb $0, (%di)
jz .read_user_command_line_loop
incw %di
jmp .read_user_command_line_goto_end
.read_user_command_line_loop: .read_user_command_line_loop:
call getc call getc
@ -65,11 +75,9 @@ read_user_command_line:
command_line_enter_msg: command_line_enter_msg:
.asciz "cmdline: " .asciz "cmdline: "
.section .bss
.global command_line .global command_line
command_line: command_line:
# 100 character command line # 100 character command line
command_line_buffer: command_line_buffer:
.skip 100 .ascii "root=/dev/sda2 console=ttyS0"
.skip 100 - 28