2019-01-01 13:30:06 +01:00
|
|
|
/*******************************************************************************/
|
|
|
|
/* COS2000 - Compatible Operating System - LGPL v3 - Hordé Nicolas */
|
|
|
|
/* */
|
|
|
|
|
|
|
|
#define _ASSEMBLY
|
|
|
|
|
|
|
|
#include "memory.h"
|
|
|
|
#include "gdt.h"
|
|
|
|
|
|
|
|
.code32
|
|
|
|
.section ".text"
|
2019-01-01 19:31:26 +01:00
|
|
|
.global start
|
|
|
|
start:
|
2019-01-01 13:37:29 +01:00
|
|
|
ljmp $SEL_KERNEL_CODE,$suite
|
2019-01-01 13:30:06 +01:00
|
|
|
suite:
|
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-01 13:37:29 +01:00
|
|
|
movl $KERNEL_STACK_ADDR, %esp
|
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
|