8086 Assembly Language INT 10h Video Interrupt Edit

Murugan Andezuthu Dharmaratnam | 13 February 2021 | 313

Int 10h is a video service bios interrupt. It includes services like setting the video mode, character and string output, and reading and writing pixels in graphics mode. It is one of the most frequently used interrupt while coding in 8086 assembly language.

To use the bios interrupt load ah with the desired sub-function. load other required parameters in other registers. and make a call to int 10h.

Int 10h functions

Function Number Description
AH=00h Set video mode
AH=01h Set text-mode cursor shape
AH=02h Set cursor position
AH=03h Get cursor position and shape
AH=04h Read light pen position (Does not work on VGA systems)
AH=05h Select active display page
AH=06h Scroll up window
AH=07h Scroll down window
AH=08h Read character and attribute at cursor position
AH=09h Write character and attribute at cursor position
AH=0Ah Write character only at cursor position
AH=0Bh, BH = 00h Set background/border color
AH=0Bh, BH = 01h Set palette
AH=0Ch Write graphics pixel
AH=0Dh Read graphics pixel
AH=0Eh Teletype output
AH=0Fh Get current video mode
AH=11h Change text mode character set
AH=13h Write string (EGA , meaning PC AT minimum)
AX=4f02h set VESA-Compliant video modes, beginning at 640 by 480 and reaching 1280 by 1024 with 256 colors

Function 0Eh Teletype output

bios interrupt 10h function 0Eh prints a character at the current cursor position and advance the cursor by 1.


Registers Used

        AH = 0Eh
        AL = character to write
        BH = page number
        BL = foreground color (graphics modes only)

Example: Program in 8086 to display Hi using bios interrupt

.model tiny
.code
org 100h


main proc near
    
    mov ah,0eh
    mov al,'H'
    int 10h

    mov ah,0eh
    mov al,'i'
    int 10h

    mov ah,4ch
    mov al,00
    int 21h

endp
end main