60 likes | 163 Views
COSC 456 Lesson 14. DOS & BIOS Services. 256 different types of interrupts INT 0, INT 1, INT 2, INT 3, ........ INT 255 4 - byte address of ISR stored at 0000 : xxxx What is the type number and address of ISR? 0000:000F 42 0000:000E A5 0000:000D 04 0000:000C 00. Solution INT 3.
E N D
DOS & BIOS Services • 256 different typesof interrupts • INT 0, INT 1, INT 2, INT 3, ........ INT 255 • 4 - byte address of ISR stored at 0000 : xxxx • What is the type number and address of ISR? 0000:000F 42 0000:000E A5 0000:000D 04 0000:000C 00
Solution INT 3 • 0000:0000 through 0000:0003 for INT 0 • 0000:0004 through 0000:0007 for INT 1 • 0000:0008 through 0000:000B for INT 2 • 0000:000C through 0000:000F for INT 3 • 42A5:0400 is the address of the ISR corresponding to INT 3 • Incidentally, the total RAM space set aside for the 256 type numbers is 1KB from 0000:0000 through 0000:03FF
BIOS Services • BIOS ROM has useful subroutines • DOS also provides useful services • All accessed via INT xx INT 21H AH = 02 Output character DL = character AH = 30H DOS version AL:AH (e.g. 6 .1) AH = 4C EXIT and return control to DOS.
BIOS Video Service INT 10H AH = 02 cursor DH = row and DL = column BH = page (0 in graphics mode) AH = 09 Write character AL = ASCII BH = page INT 14H AH = 01 Write to port DX = com port AL = ASCII AH = 02 Read from port DX = com port AL = ASCII
Smiley ( MOV DL, 1 MOV AH,2 INT 21 INT 3 Assembly language program to display a smiley face on the screen. ASCII code for smiley face is 01.