cos2000v2/system/system.S

31 lines
691 B
ArmAsm
Raw Normal View History

/*******************************************************************************/
/* 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
suite:
2019-01-01 13:37:29 +01:00
movw $SEL_KERNEL_DATA, %ax
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
movw %ax, %ss
2019-01-01 13:37:29 +01:00
movl $KERNEL_STACK_ADDR, %esp
xor %eax,%eax
xor %ebx,%ebx
xor %ecx,%ecx
xor %edx,%edx
xor %esi,%esi
xor %edi,%edi
xor %ebp,%ebp