Readings in the text
- Section 5.4 - Software Interrupts
- Sections 5.6, 5.7 - BIOS Keyboard & Video Services
- Section 10.2 - String Instructions
- Section 14.2 - Input / Output
- Section 15.4 - Interrupt Handling
- Section 15.5 - Floating Point Operations
- Handout - How Interrupts Work
Topics
- General
- Three sides of the OS (HW, API, UI)
- Different ways of obtaining services (libraries, OS, BIOS, HW)
- Memory diagram (IVT, BDA, VRAM, ROM BIOS)
- Boot Loaders
- Power-up process
- Structure of a boot sector
- Boot sector signature 55AAh
- BIOS Parameter Block
- Interrupts
- Hardware interrupts (HW devices)
- Software interrupts (OS/BIOS services)
- Programmable Interrupt Controller (master and slave)
- Interrupt Vector Table (at 0000:0000)
- Interrupt Service Routines
- IRQ number vs. int number
- What happens in response to an interrupt
- Disabling and enabling interrupts (cli / sti)
- Critical sections
- Setting your own ISR
- End of Interrupt command (20h to port 20h)
- Timers
- Different kinds of timers (PIT CHN0, PIT CHN2, TSC, RTC)
- Programmable Interval Timer
- Crystal Oscillator and the magic number 1193182
- Three channels of the PIT and their purpose
- Timer tick interrupt (hardware, IRQ 0, int 8, 18.2 times/sec)
- Timer tick interrupt responsibilities
- User-defined timer tick interrupt (software, int 1Ch, 18.2 times/sec)
- Timer tick count in BDA (0040:006Ch)
- Determining time of day by the tick count
- Programming the PIT (ports 61h, 43h, 40h, 41h, 42h)
- Speaker
- Input Devices
- Keyboard Food Chain
- Keyboard data in BDA (head, tail, queue, start, end)
- Keyboard Controller access (port 64h, 60h)
- Scancodes vs. ASCII codes
- Make codes vs. break codes
- Writing a keyboard ISR
- Disks and File Systems
- Heads, cylinders (tracks), records (sectors)
- DOS sectors and clusters
- FAT file system structure
- Directory entry, attributes, date, time
- File Allocation Table structure
- Other
- Writing directly to video memory
- Floating point instructions
- String instructions
Alex Fedosov
2002-02-27