Interrupt number 10h (INT 10h) 8086 Microprocessor by Ravinder Nath Rajotiya - April 19, 20210 Share on Facebook Share Send email Mail Print Print INT 10h / AH = 00h – Set Video Mode INT 10h Service no. 00 Inputs any Description Example AH=00 Set Video Mode AL=00 Text mode 40×25, 16 color, 8 pages AL=03 text mode. 80×25. 16 colors. 8 pages. AL=13h Graphical mode. 40×25. 256 colors. 320 x 200 pixels. 1 page. MOV AL, 13h MOV AH, 0 INT 10h AH=01h Set text-mode cursor shape. INT 10h / AH = 01h – set text-mode cursor shape. INT 10h Service no. 01h Inputs any Description Example AH=01h Set text mode cursor shape CH Cursor start line(bit 0-4) and option (bit 5-7) Cursor is visible if Bit 5 =0 else cursor is invisible ; hide Blinking text cursor: MOV CH, 32 MOV AH, 1 INT 10h ; show standard Blinking text cursor: MOV CH, 6 MOV CL, 7 MOV AH, 1 INT 10h show box-shaped Blinking text cursor: MOV CH, 0 MOV CL, 7 MOV AH, 1 INT 10h CL Bottom cursor line(Bit 0-4) INT 10h / AH = 2 – Set cursor position. INT 10h Service no.02h Inputs any Description Example AH=02h set cursor position. DH = row. DH = column. MOV DH, 10 MOV DH, 20 MOV BH, 0 MOV AH, 2 INT 10h BH = page number (0..7). INT 10h / AH = 03h – get cursor position and Size. INT 10h Service no.03h Inputs any Description Example AH=03h set cursor position. BH = page number. Return DH=row DH=col CH = cursor start line. CL = cursor bottom line INT 10h / AH = 05h – select active video page. INT 10h Service no. 05h Inputs any Description Example AH=05h select active video page. AL = new page number (0..7). Select active video page. INT 10h / AH = 06h – scroll up window. INT 10h / AH = 07h – scroll down window. INT 10h Service no. 06h, 07h Inputs any Description Example AH=06h scroll up window AH=07h scroll down window AL = number of lines by which to scroll (00h = Clear entire window). BH = attribute used to write Blank lines at bottom of window. CH, CL = row, column of window’s upper left corner. DH, DH = row, column of window’s lower right corner INT 10h / AH = 08h – read Character and attribute at cursor position. INT 10h Service no. 08h Inputs any Description Example AH=08h read Character and attribute at cursor position input: BH = page number. return: AH = attribute. AL = Character. INT 10h / AH = 09h – write Character and attribute at cursor position. INT 10h Service no. 09h Inputs any Description Example AH=09h; write Character and attribute at cursor position input AL =Character to Display. BH =page number. BL =attribute. CX =number of times to write Character. INT 10h / AH = 0Ah -write Character only at cursor position. INT 10h Service no. 0Ah Inputs any Description Example AH=0Ah write Character only at cursor position input: AL = Character to Display. BH = page number. CX = number of times to write Character INT 10h / AH = 0CH – Change color for a Single pixel. INT 10h Service no. 0Ch Inputs any Description Example AH=0CH Change color for a Single pixel input: AL = pixel color CX = column. DX = row. MOV AL, 13h MOV AH, 0 INT 10h; set graphics video mode. MOV AL, 1100b MOV CX, 10 MOV DX, 20 MOV AH, 0CH INT 10h; set pixel. INT 10h / AH = 0Dh – get color of a Single pixel. INT 10h Service no. 0Dh Inputs any Description Example AH=0Dh get color of a Single pixel input: CX = column. DX = row. output: AL = pixel color  INT 10h / AH = 0Eh – Teletype output. INT 10h Service no.0Eh Inputs any Description Example AH=0Eh teletype output. input: AL = Character to write. this functions DISPlays a Character on the screen, advancing the cursor and scrolling the screen as necessary. the printing is Always done to current active page. MOV AL, ‘a’ MOV AH, 0eh INT 10h This function may not work well on some systems under graphics mode. INT 10h / AH = 13h – write string. INT 10h Service no. 13h Inputs any Description Example AH=13h write string. input: AL = write mode: bit 0: update cursor after writing; bit 1: string contains attributes. BH = page number. BL = attribute if string contains only Characters (bit 1 of AL is zero). CX = number of Characters in string (attributes are not counted). DH,DH = column, row at which to start writing. ES:BP points to string to be printed. MOV AL, 1 MOV BH, 0 MOV BL, 0011_1011b MOV CX, msg1end – offset msg1; calculate message Size. MOV DH, 10 MOV DH, 7 push cs pop es MOV BP, offset msg1 MOV AH, 13h INT 10h JMP msg1end msg1 db ” hello, world! ” msg1end: INT 10h / AX = 1003h – Toggle intensity/Blinking. INT 10h Service no.1003h Inputs any Description Example AX = 1003h – toggle intensity/Blinking input: BL = write mode: 0: enable intensive  colors. 1: enable Blinking (not supported by the emulator and windows command prompt). BH = 0 (to avoid problems on some adapters). MOV AX, 1003h MOV BX, 0 Disable Blinking INT 10h bit color table: Character attribute is 8 bit value, low 4 bits set fore color, high 4 bits set background color. note: the emulator and windows command line prompt do not support background Blinking, however to make colors look the same in dos and in full screen mode it is required to turn off the background Blinking. Hex Binary COLOR NAME 0 0000 Black 1 0001 Blue 2 0010 Green 3 0011 Cyan 4 0100 Red 5 0101 Magenta 6 0110 Brown 7 0111 Light Gray 8 1000 Dark Gray 9 1001 Light Blue A 1010 Light Green B 1011 Light Cyan C 1100 Light Red D 1101 Light Magenta E 1110 Yellow F 1111 White Share on Facebook Share Send email Mail Print Print