mov eax , cr0
or eax , 0x01
mov cr0 , eax



back to months list

Project : The "Microkernel" Operating System

Journal Entry Date : 2024.01.05

I finally fixed problems in interrupt system. The problem was the io ports function. They were malfunctioning - which created issues in PIC - leading everything to problems in interrupt system. So, I fixed it all!

Anyways, there were lots of changes in GDT & segmentation system. The system now no longer requires to predetermine the kernel&user code & data segments. Instead, the system requires to just determine what segments will be used for code&data segment from the pools of segments. Also, now system manages segments separately by "System segments" and "Task segments." System segments are used for general code & data segments(like kernel code&data, ) and Task segments are used for task. There's also "segmentation mode" that controls whether the task segment translates address as 1-to-1 or other. This information is contained in "kernel info" structure.

The reason why I separated task segments's management mode is that most task segments do not use memory segmentation, so I made an option to (effectively) not use the segmentation, which is the "1-to-1 correspondence" mode.

Anyway, here's the diagram for the overall segmentation system :


lol my painting skill sucks