Move all documentation to README.adoc
This includes both separate .md files, and documentation that was on the head of the .S source files. Retest everything as this was done, and fix a few easy things.
This commit is contained in:
39
lidt.S
39
lidt.S
@@ -1,43 +1,20 @@
|
||||
/*
|
||||
# lidt
|
||||
|
||||
TODO get working:
|
||||
|
||||
- http://wiki.osdev.org/Real_Mode
|
||||
|
||||
Sets the IDTR through a from a descriptor in memory, and tells the CPU where the IDT is on memory.
|
||||
|
||||
Expected outcome: 'ab' gets printed to the screen.
|
||||
|
||||
osdev says this is not compatible with older CPUs.
|
||||
|
||||
# sidt
|
||||
|
||||
Read the descriptor register to memory.
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
BEGIN
|
||||
CLEAR
|
||||
|
||||
cli
|
||||
movw $handler, idt_start
|
||||
mov %cs, idt_start + 2
|
||||
lidt idt_descriptor
|
||||
|
||||
movw $handler, 0x04
|
||||
mov %cs, 0x06
|
||||
|
||||
int $0
|
||||
PUTC $'b
|
||||
hlt
|
||||
|
||||
idt:
|
||||
.word 2
|
||||
.word 4
|
||||
idt_start:
|
||||
.word handler
|
||||
.word
|
||||
idt_end:
|
||||
|
||||
idt_descriptor:
|
||||
.word idt_end - idt
|
||||
.long idt
|
||||
|
||||
.word idt_end - idt_start
|
||||
.long idt_start
|
||||
handler:
|
||||
PUTC $'a
|
||||
iret
|
||||
|
||||
Reference in New Issue
Block a user