Initial checkin of toy OS project.
[os.git] / inc / defs.asm
1 BOOT0SEG equ 0x07C0
2 BOOT0OFF equ 0x0000
3
4 BOOT1SEG equ 0x0100
5 BOOT1OFF equ 0x0000
6
7 KERNSEG equ 0x1000
8 KERNOFF equ 0x0000
9
10 VIDEOSEG equ 0xB800
11
12 ; 8259A PIC initialization codes.
13 ; Source: Linux bootsect.S, and Intel 8259A datasheet
14
15 ; The most important reason why we reprogram the PICs is to
16 ; route the hardware interrupts through vectors *above*
17 ; those reserved by Intel.  The BIOS (for historical reasons :-)
18 ; routes them such that they conflict with internal processor-generated
19 ; interrupts.
20
21 ICW1 equ 0x11           ; ICW1 - ICW4 needed, cascade mode, interval=8,
22                         ;   edge triggered. (I think interval is irrelevant
23                         ;   for x86.)
24 ICW2_MASTER equ 0x20    ; put IRQs 0-7 at 0x20 (above Intel reserved ints)
25 ICW2_SLAVE equ 0x28     ; put IRQs 8-15 at 0x28
26 ICW3_MASTER equ 0x04    ; IR2 connected to slave
27 ICW3_SLAVE equ 0x02     ; slave has id 2
28 ICW4 equ 0x01           ; 8086 mode, no auto-EOI, non-buffered mode,
29                         ;   not special fully nested mode
30
31 KERN_THREAD_OBJ equ (1024*1024)
32 KERN_STACK equ KERN_THREAD_OBJ + 4096       
33