2019-01-01 13:30:06 +01:00
|
|
|
/*******************************************************************************/
|
|
|
|
/* COS2000 - Compatible Operating System - LGPL v3 - Hordé Nicolas */
|
|
|
|
/* */
|
|
|
|
|
|
|
|
#include "memory.h"
|
|
|
|
#include "gdt.h"
|
|
|
|
|
|
|
|
.code32
|
2019-01-19 00:17:35 +01:00
|
|
|
.section ".inittext"
|
2019-01-01 19:31:26 +01:00
|
|
|
.global start
|
2019-01-15 01:15:58 +01:00
|
|
|
.extern main
|
2019-01-01 19:31:26 +01:00
|
|
|
start:
|
2019-01-01 13:37:29 +01:00
|
|
|
movw $SEL_KERNEL_DATA, %ax
|
2019-01-01 13:30:06 +01:00
|
|
|
movw %ax, %ds
|
|
|
|
movw %ax, %es
|
|
|
|
movw %ax, %fs
|
|
|
|
movw %ax, %gs
|
2019-01-01 13:37:29 +01:00
|
|
|
movw $SEL_KERNEL_STACK, %ax
|
2019-01-01 13:30:06 +01:00
|
|
|
movw %ax, %ss
|
2019-01-19 00:17:35 +01:00
|
|
|
movl %cr3, %eax
|
|
|
|
mov $KERNEL_STACK_ADDR,%esp
|
|
|
|
pushl %eax
|
2019-01-01 13:30:06 +01:00
|
|
|
xor %eax,%eax
|
|
|
|
xor %ebx,%ebx
|
|
|
|
xor %ecx,%ecx
|
|
|
|
xor %edx,%edx
|
|
|
|
xor %esi,%esi
|
|
|
|
xor %edi,%edi
|
|
|
|
xor %ebp,%ebp
|
2019-01-19 00:17:35 +01:00
|
|
|
calll main
|