top of page
Writer's picturerehsd

Interrupts and More Interrupts

Updated: Apr 2, 2023

I am starting to implement support for additional interrupts on my 286 system. This includes BIOS interrupts and DOS interrupts.


Relevant to interrupts, my 286 system currently includes:

  • System board (i.e., motherboard) with two ISA slots

  • Math co-processor

  • Single priority interrupt controller (PIC)

  • ISA VGA card running 640x480x16bpp with two video pages

  • ISA sound card with onboard audio co-processor and two-way interrupt support

  • SD Card reader

My "BIOS" functionality and "operating system" (OS) functionality are intermingled in a single assembled codebase, placed on my flash ROMs on the motherboard. At some point, I need to remove the OS functionality from the ROMs and have that functionality loaded at boot from some other storage location (e.g., SD Card).


Currently, I have support for the following interrupts. When I say support, I minimally have the interrupt stubbed out and being processed. Most of the interrupt service routines will need additional work as I build out system functionality.

Interrupt Number

Function

Type

Description

Handled By

0x00

Hardware Internal

Divide error

BIOS

0x04

Hardware Internal

Overflow

BIOS

​0x06

Hardware Internal

Invalid Opcode

BIOS

0x08

Hardware Internal

Multiple exceptions

BIOS

0x09 (IRQ1)

n/a

Hardware External

PS/2 Keyboard

BIOS

0x0A (IRQ2)

n/a

Hardware External

PS/2 Mouse

BIOS

0x10

0x02

0x03

0x0A

0x0C

0xB0

0xB1

0xB2

0xB3

0xB4

Software

Set cursor position

Get cursor position

Write character

Draw pixel

Swap frame

Set print char options

Read print char options

Write pixel (16-bit color)

Clear screen

BIOS

​0x21

​0x00

0x2C

0x30

0x3D

0x3E

0x3F

0x40

0x42

0x44

0x4A

0x4C

0x63

0x66

0x68

Software

​DOS: Terminate

Get time

Get version

Open file

Close file

Read

Write

Move file pointer

IO control

Set block

Terminate process

Get lead byte table

Global code page

Flush buffer

0x31

0x01

0x02

Software

​Show mouse cursor

Hide mouse cursor


As I am researching interrupts that I will want to implement, the following interrupts seem fitting.

Interrupt Number

Function

Type

Description

Handled By

0x09

n/a

Hardware External

Keyboard data ready

BIOS

0x70

n/a

Hardware External

CMOS real-time clock

BIOS

​0x10

0x06

0x07

0x08

0x09

0x0B:00

0x0D

0x13

Software

Video: Scroll up

Scroll down

Read char/attr at position

Write char/attr at position

Set background/border color

Read graphics pixel

Write string

BIOS

0x11

n/a

Software

Get equipment list

BIOS

0x12

n/a

Software

Get memory size

BIOS

0x13

many

Software

Disk services

BIOS

0x15

0x86

Software

Wait

BIOS

0x19

n/a

Software

Bootsrap loader

BIOS

0x80

0x0006

0x0007

0x0009

0x000A

Software

Sound: Play music

Stop music

Pause music

Resume music

BIOS

0x21

0x01

0x02

0x4A

0x08

0x09

0x39

0x3A

0x3B

0x3C

0x3D

0x3E

0x4B

0x4D

Software

DOS: Read char std in w/ echo

Write char to std out

SETBLOCK

Char in w/o echo

Write string to std out

MKDIR

RMDIR

CHDIR

CREAT

OPEN

CLOSE

Load/Execute

Exit

DOS

...


More to come...



Helpful Resources

100 views0 comments

Comments


bottom of page