1 / 41

Advanced Features of Screen Processing

Advanced Features of Screen Processing. Suthida Chaichomchuen std@kmitnb.ac.th. BIOS INT 10H. 00H : Set video mode 01H : Set cursor size 02H : Set cursor position 03H : Read cursor position 04H : Read light pen position 05H : Select active page 06H : Scroll up screen

isaura
Télécharger la présentation

Advanced Features of Screen Processing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Advanced Features of Screen Processing Suthida Chaichomchuen std@kmitnb.ac.th

  2. BIOS INT 10H • 00H : Set video mode • 01H : Set cursor size • 02H : Set cursor position • 03H : Read cursor position • 04H : Read light pen position • 05H : Select active page • 06H : Scroll up screen • 07H : Scroll down screen • 08H : Read attribute/character • 09H : Display attribute/character • 0AH : Display character

  3. BIOS INT 10H • 0BH : Set color palette • 0CH : Write pixel dot • 0DH : Read pixel dot • 0EH : Write teletype • 0FH : Get current video mode • 11H : Character generator • 12H : Select alternative routine • 13H : Display character string • 1BH : Return state information • 1CH : Save/restore video status

  4. Video Adapters • MDA : Monochrome display adapter • CGA : Color graphics adapter • EGA : Enhanced graphics adapter • MCGA : Multicolor graphics array • VGA : Video graphics array

  5. Video Display • Video controller • generate the monitor’s scan signals • Video BIOS • Interface to the video adapter • setting cursor • displaying characters • Video display area • contain the information for display

  6. Attribute Byte • Bit 7 (BL) • set blinking • Bits 6-4 • determine the screen background • Bit 3 (I) • set high intensity • Bit 2-0 • determine the foreground

  7. Screen Pages • Text mode • Page 0 - 3 • Begin address • B800[0] : Page 0 • B900[0] : Page 1 • BA00[0] : Page 2 • BB00[0] : Page 3 • Amount memory for each page • 80 x 25 x 2 = 4000 bytes (4K)

  8. INT 10H Function 00H • Set video mode • AH = 00H • AL = video mode value • 00 : 25 x 40 mono • 01 : 25 x 40 color • 02 : 25 x 80 mono • 03 : 25 x 80 color • 07 : 25 x 80 mono

  9. INT 10H Function 00H • Example • MOV AH,00H • MOV AL,03H • INT 10H

  10. INT 10H Function 01H • Set cursor size • AH = 01H • CH (bit 4-0) = top of cursor • CL (bit 4-0) = bottom of cursor • Cursor size • 0:14 - VGA • 0:13 - EGA • 0:7 - CGA

  11. INT 10H Function 01H • Example • MOV AH,01H • MOV CH,00 • MOV CL,14 • INT 10H

  12. INT 10H Function 02H • Set cursor position • AH = 02H • BH = page number (0-3) • 0 : default • DH = row • DL = column

  13. INT 10H Function 02H • Example • MOV AH,02H • MOV BH,00 • MOV DH,12 • MOV DL,30 • INT 10H

  14. INT 10H Function 03H • Read cursor position • Determine the Row, Column, cursor Size • AH = 02H • BH = page number • Values return of operation • AX, BX : unchanged • CH : starting scan line • CL : ending scan line • DH : row • DL : column

  15. INT 10H Function 03H • Example • MOV AH,03H • MOV BH,00 • INT 10H • MOV AH,02H • INC DL • INT 10H

  16. INT 10H Function 05H • Select active page • AH = 05H • AL = page number • Example • MOV AH,05H • MOV AL,page# • INT 10H

  17. INT 10H Function 06H • Scroll up screen • AH = 06H • AL = number of rows (00 for full screen) • BH = attribute • CX = starting row : column • DX = ending row : column

  18. INT 10H Function 06H • Example • MOV AH,06H • MOV BH,61H • MOV CX,0000H • MOV DX,184FH • INT 10H

  19. INT 10H Function 07H • Scroll down screen • AH = 07H • AL = number of rows (00 for full screen) • BH = attribute • CX = starting row : column • DX = ending row : column

  20. INT 10H Function 08H • Read attribute/character at cursor position • AH = 08H • BH = page number • Values return • AL = character • AH = attribute of character • Example • MOV AH,08H • MOV BH,00 • INT 10H

  21. INT 10H Function 09H • Display attribute/character at cursor position • AH = 09H • AL = ASCII character to be displayed • BH = page number • BL = attribute • CX = count

  22. INT 10H Function 09H • Example • MOV AH,09H • MOV AL,01H • MOV BH,00 • MOV BL,16H • MOV CX,60 • INT 10H

  23. INT 10H Function 0AH • Display character at cursor position • AH = 0AH • AL = ASCII character to displayed • BH = page number • CX = count

  24. INT 10H Function 0AH • Example • MOV AH,0AH • MOV AL,char • MOV BH,page# • MOV CX,repetition • INT 10H

  25. INT 10H Function 0EH • Write teletype • AH = 0EH • AL = ASCII character to displayed • 08H : backspace • 07H : bell • 0DH : carriage return • 0AH : line feed • BH = page number • BL = foreground color

  26. INT 10H Function 0EH • Example • MOV AH,0EH • MOV AL,char • MOV BH,page# • MOV BL,color • INT 10H

  27. INT 10H Function 0FH • Get current video mode • AH = 0FH • Values return • AL = current video mode • AH = characters per line (20, 40 or 80) • BH = current page number • Example • MOV AH,0FH • INT 10H

  28. INT 10H Function 12H • Select alternative screen routine • AH = 12H • Values return • BH = 00H for color, 01H for monochrome • BL = 00H for 64K, 01H for 128K, 02H for 192K, 03H for 256K • CH = adapter bits • CL = switch setting • Example • MOV AH,12H • INT 10H

  29. INT 10H Function 13H • Display character string • AH = 13H • AL = subfunctions (00, 01, 02 or 03) • BH = page number • BL = screen attribute • BP = address of string in ES:BP • CX = length of string • DX = starting location on screen

  30. INT 10H Function 13H • Four subfunctions in AL • 00 : display attribute and string; do not advance cursor • 01 : display attribute and string; advance cursor, • 02 : display character and then attribute; do not advance cursor • 03 : display character and then attribute; advance cursor

  31. INT 10H Function 13H • Example • MOV AH,13H • MOV AL,subfunction • MOV BH,page# • MOV BL,attribute • LEA BP,address • MOV CX,length • MOV DX,screen • INT 10H

  32. Using Graphics Mode • Set graphic mode by use function 00H • Mode number in AL • 04H - 06H • 0DH - 13H • used Pixels to generate color patterns • Example • MOV AH,00H • MOV AL,12H • INT 10H

  33. INT 10H Function 04H • Read light pen position • AH = 04H • Values return • AH = 0 - not triggered, 1 - triggered • DH = row • DL = column • CH:BX = pixel location

  34. INT 10H Function 0BH • Set color palette • AH = 0BH • BH = 00 or 01 • determine the purpose of BL

  35. INT 10H Function 0BH • BH = 00 • select the background color • BL = color value in bit 0-3 • Example • MOV AH,0BH • MOV BH,00 • MOV BL,04 • INT 10H

  36. INT 10H Function 0BH • BH = 01 • select the palette for graphics • BL = the palette 0 or 1 • Example • MOV AH,0BH • MOV BH,01 • MOV BL,00 • INT 10H

  37. INT 10H Function 0CH • Write pixel dot • AH = 0CH • AL = color of the pixel • BX = page number (VGA/EGA) • CX = column • DX = row

  38. INT 10H Function 0CH • Example • MOV AH,0CH • MOV AL,03 • MOV BH,00 • MOV CX,200 • MOV DX,50 • INT 10H

  39. INT 10H Function 0DH • Read pixel dot • AH = 0DH • BX = page number (VGA/EGA) • CX = column • DX = row • Value return • AL = pixel color

  40. INT 10H Function 10H • Set palette registers • AH = 10H • AL = subfunction code (00-03)

  41. INT 10H Function 10H • Subfunction code in AL • 00 : set a palette register • BH = the value to set • BL = the register to set • 01 : set the overscan register • BH = the value to set • 02 : set all palette registers and overscan • bytes 0-15 = palette values • byte 16 = overscan value • 03 : Toggle the intensity/blinking bit • BL = 00 enables intensity • BL = 01 enables blinking

More Related