Also provide the command line to the kernel

This commit is contained in:
Pierre Pronchery 2018-06-21 00:41:25 +02:00
parent a0f9602d67
commit b05c58c8f8
2 changed files with 21 additions and 4 deletions

View File

@ -60,6 +60,20 @@ _start:
push %ebx
call multiboot
add $0x4, %esp
/* set the interrupt descriptor */
call __arch_setidt
/* start the kernel */
push $0x0
push $0x0
mov %ebx, %eax
add $0x10, %eax
push %eax
push $0x1
call main
add $0x10, %esp
jmp 2f
1:
/* set the interrupt descriptor */
@ -69,9 +83,13 @@ _start:
/* start the kernel */
push $0x0
push $0x0
push $0x0
push $0x0
call main
add $0x4, %esp
add $0x10, %esp
2:
/* exit the kernel */
push %eax
call exit

View File

@ -64,13 +64,12 @@ _start:
/* start the loader */
push $0x0
push $0x0
push $0x0
mov %ebx, %eax
add $0x10, %eax
push %eax
push $0x1
call main
add $0x14, %esp
add $0x10, %esp
jmp 2f
1:
@ -83,7 +82,7 @@ _start:
add $0x10, %esp
2:
/* exit the kernel */
/* exit the loader */
call _exit
hlt