SlideShare a Scribd company logo
1 of 25
INT 21H FOR SCREEN DISPLAY
&&
INT 10H OPERATIONS
Video Screen Operations
• Screen Display with INT 21h
– functions 02h to display a character
– function 09h to display a string
• Setting the cursor position on the screen
– INT 10h ;with function 02h
• Clearing the screening and Scrolling
– INT 10h ;with function 06h
Displaying a Character
Load 02h in AH
Load the character to be displayed in DL
Call INT 21h
Example:
CHAR DB ‘X’
MOV AH,02h ; Step 1
MOV DL,CHAR ; Step 2
INT 21h ; Step 3
Displaying a String of Characters
String DB ‘Hello world’, 13, 10
...
LEA DI,STRING1
MOV AH,02h
MOV CX,13
LP1: MOV DL,[DI]
INT 21h
INC DI
LOOP LP1
...
Displaying a String of Character
• Use INT 21h with function 09h:
• Define a string in the data area
– String must be ended with a ‘$’
• Load 09h in register AH
• Load the offset address of the string in
DX
• Call INT 21h
Example
String DB ‘Hello There’,13,10,‘$’ ;Step 1
...
MOV AH,09H ;Step 2
LEA DX,String ;Step 3
INT 21h ;Step 4
...
Screen Clearing
INT 10h with function 06h
Load 06h in AH
Load 00h in AL (for clearing the full screen)
Load attribute value in BH (color, blinking)
Load starting position to scroll in CX
(row:column)
row # in CH and column # in CL
Load ending position in DX (row:column)
row # in DH and column # in DL
Example
Clear screen with white background and
red foreground
MOV AX,0600h ;AH=06h & AL=00h
MOV BH,74h ;White background (7)
red foreground(4)
MOV CX,0000h ;row 0 col 0
MOV DX,184Fh ;row 24 col 79(inHex)
INT 10h
Screed Display with File Handles
• A file handle is a number that refers to a
specific device such as keyboard, screen,
printer or a disk file
• File handles are useful in case the output
from a program is be redirected to a
device other than the screen ( e.g. a disk
file) or if the input is to redirected from a
device other than the keyboard
File Handles
• File handles are useful when reading
from or writing to a disk file
• The file handles for standard devices
such as the keyboard and the screen are
preset.
The file handle for keyboard = 00
The file handle for the screen = 01
Screed Display with File Handles
To display a string of character on the
screen with file handles use INT 21h
function 40h
– Set up string to be displayed as with function
09h
– Load AH with 40h
– Load DX with address of data to be displayed
– Load BX with 01 ; file handle for screen
– Load CX with number of characters to display
– Call INT 21h
Example
STRING1 DB ‘Hello There’,0Dh ,0Ah ;Step 1
...
MOV AH,40h ;Step 2
LEA DX,STRING1 ;Step 3
MOV BH,01 ;Step 4
MOV CX,13 ;Step 5
INT 21h ;Step 6
BIOS INT 10H OPERATIONS
INT 10H Function 00H: Set Video Mode
Sets the video mode and also clears the screen (this can
be overridden).
AH contains 00H and AL contains the color
INT 10H Function 01H: Set Cursor Size
Sets the cursor size on the Video Controller.
set AH = 01H
set CH (bits 4-0) = top of cursor (start scan line)
set CL (bits 4-0) = bottom of cursor (end scan line)
INT 10H Function 02H: Set Cursor Position
Set the cursor anywhere on the screen whether in
graphics or text mode.
set AH = 02H
set BH = page number (0 is the default)
set DH = row and DL = column
INT 10H Function 03H: Return Cursor Status
set AH = 03H
set BH = page number
AX and BX are unchanged and returns these values:
CH = Starting scan line DH = Row
CL = Ending scan line DL = Column
INT 10H Function 05H: Select Active Page
set AH = 05H
set AL = page number
INT 10H Function 06H: Scroll Up Screen
set AH = 06H
set AL = number of rows (00H for full screen)
BH = attribute or pixel value
CX = starting row:coloumn
DX = ending row:coloumn
The operation returns no values: Here's a
standard approach for scrolling up on line:
1. Initialize ROW variable to 0
2. Display a line and advance the cursor to the
next line.
3. Text whether ROW is near the bottom of the
screen (CMP ROW,22)
4. If yes, scroll one line, use ROW to set the
cursor, and clear ROW to 00H.
5. If no, increment ROW (INC ROW).
INT 10H Function 07H: Scroll Down Screen
set AH = 07H
set AL = Number of rows (00H for full screen)
set BH = Attribute or pixel value
set CX = Starting row:coloumn
set DX = Ending row:coloumn
INT 10H Function 08H: Read Character and Attribute at
Cursor
set AH = 08H
set BH = page number
In text mode, AL contains the character and AH its
attribute.
In graphics mode, 00H for a non-ASCII character.
INT 10H Function 09H: Display Character and Attribute at
Cursor
set AH = 09H
set AL = ASCII character
set BH = Page number
set BL = Attribute or pixel value
set CX = count (how many times to repeat character in AL)
This operation does not advance the cursor or respond to
the Bell, Carriage Return, Line Feed, or Tab Characters:
instead, it attempts to display them as ASCII characters. In
text mode, when the display exceeds the rightmost column,
the operation automatically continues the display on the
next row at column 0. For graphics mode, use BL for defining
the foreground colour. If bit 7 is 0, the defined colour
replaces present pixel colour: if bit 7 is 1, the defined colour
is combined (XORed) with them.
INT 10H Function 0AH: Display Character at Cursor
Same as 09H, except instead of setting the attribute it
uses the current value.
INT 10H Function 0BH: Set Colour Palette
set AH = 0BH
set BH = 00H : Select the background colour, where BL
contains the colour value in bits 0-3
(any of 16 colours)
set BH = 01H: Select the palette for graphics, where BL
contains the palettel (0 or 1)
INT 10H Function 0CH: Write Pixel Dot
set AH = 0CH
AL = colour of pixel
BH = page number
CX = column
DX = row
Maximum row or column size depends upon the graphics
resolution.
INT 10H Function 0DH: Read Pixel Dot
set AH = 0DH
set BH = page number
set CX = column
set DX = row
AL contains the returned pixel colour
INT 10H Function 0EH: Display in Teletype Mode
INT 10H Function 0FH: Get Current Video Mode
set AH = 0FH
AL = current video mode
BH = active video page
INT 10H Function 10H: Access Palette Registers
and Video DAC
set AH = 10H
Subfunction 00H:
Update Palette Register (changes the colour
displayed by any of 16
Palette registers)
Set BH = colour value
set BL = 00 - 0FH (palette register
number)
Subfunction 01H:
Update Border Color
set BH = new border color
Subfunction 03H:
Select Background Intensity (enable or disable
blinking attribute)
set BL = 00H (disable) or 01H (enable)
Subfunction 07H:
Read Palette Register ( returns the color code
stored in any of the 16
Palette registers)
BH = returned color code
Subfunction 08H:
Read Overscan Register (returns the colour code
currently in the
Overscan (border) register)
BH = returned colour code
Subfunction 09H:
Read Table of Palette Register Values
Subfunction 10H: Update DAC Colour Register
Subfunction 12H: Update Block of DAC register
Subfunction 15H: Read Video DAC Colour Register
Subfunction 17H: Read Block of DAC Registers
Subfunction 1BH: Perform gRay Scaling on DAC
Registers
INT 10H Function 11H: Access Character Generator
INT 10H Function 12H: Select Alternative Video
Routine
INT 10H Function 13H: Display Character String
INT 10H Function 1AH: Video Display Combination
INT 10H Function 1BH: Return Video BIOS
Information
INT 10H Function 1CH: Save or Restore Video State
INT 21H & INT 10H VIDEO FUNCTIONS

More Related Content

What's hot

Instruction Set of 8086 Microprocessor
Instruction Set of 8086 MicroprocessorInstruction Set of 8086 Microprocessor
Instruction Set of 8086 MicroprocessorAshita Agrawal
 
Bcd to 7 segment display
Bcd to 7 segment displayBcd to 7 segment display
Bcd to 7 segment displayMaulik Sanchela
 
Data Structures Practical File
Data Structures Practical File Data Structures Practical File
Data Structures Practical File Harjinder Singh
 
Chapter 1 : Balagurusamy_ Programming ANsI in C
Chapter 1  :  Balagurusamy_ Programming ANsI in C Chapter 1  :  Balagurusamy_ Programming ANsI in C
Chapter 1 : Balagurusamy_ Programming ANsI in C BUBT
 
Chapter 2 : Balagurusamy_ Programming ANsI in C
Chapter 2 :  Balagurusamy_ Programming ANsI in CChapter 2 :  Balagurusamy_ Programming ANsI in C
Chapter 2 : Balagurusamy_ Programming ANsI in CBUBT
 
Interfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessorInterfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessorVikas Gupta
 
adder and subtractor
 adder and subtractor adder and subtractor
adder and subtractorUnsa Shakir
 
Boolean algebra And Logic Gates
Boolean algebra And Logic GatesBoolean algebra And Logic Gates
Boolean algebra And Logic GatesKumar
 
Four way traffic light conrol using Verilog
Four way traffic light conrol using VerilogFour way traffic light conrol using Verilog
Four way traffic light conrol using VerilogUtkarsh De
 
Verilog VHDL code Decoder and Encoder
Verilog VHDL code Decoder and EncoderVerilog VHDL code Decoder and Encoder
Verilog VHDL code Decoder and EncoderBharti Airtel Ltd.
 
Ascii adjust & decimal adjust
Ascii adjust & decimal adjustAscii adjust & decimal adjust
Ascii adjust & decimal adjustTech_MX
 
Data Structures Using C Practical File
Data Structures Using C Practical File Data Structures Using C Practical File
Data Structures Using C Practical File Rahul Chugh
 

What's hot (20)

Instruction Set of 8086 Microprocessor
Instruction Set of 8086 MicroprocessorInstruction Set of 8086 Microprocessor
Instruction Set of 8086 Microprocessor
 
DIGITAL ELECTRONICS LAB
DIGITAL ELECTRONICS LABDIGITAL ELECTRONICS LAB
DIGITAL ELECTRONICS LAB
 
Chapter 4: Combinational Logic
Chapter 4: Combinational LogicChapter 4: Combinational Logic
Chapter 4: Combinational Logic
 
Bcd to 7 segment display
Bcd to 7 segment displayBcd to 7 segment display
Bcd to 7 segment display
 
My Report on adders
My Report on addersMy Report on adders
My Report on adders
 
K - Map
  K - Map    K - Map
K - Map
 
Data Structures Practical File
Data Structures Practical File Data Structures Practical File
Data Structures Practical File
 
Chapter 1 : Balagurusamy_ Programming ANsI in C
Chapter 1  :  Balagurusamy_ Programming ANsI in C Chapter 1  :  Balagurusamy_ Programming ANsI in C
Chapter 1 : Balagurusamy_ Programming ANsI in C
 
Chapter 2 : Balagurusamy_ Programming ANsI in C
Chapter 2 :  Balagurusamy_ Programming ANsI in CChapter 2 :  Balagurusamy_ Programming ANsI in C
Chapter 2 : Balagurusamy_ Programming ANsI in C
 
Clinica
ClinicaClinica
Clinica
 
Interfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessorInterfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessor
 
adder and subtractor
 adder and subtractor adder and subtractor
adder and subtractor
 
Boolean algebra And Logic Gates
Boolean algebra And Logic GatesBoolean algebra And Logic Gates
Boolean algebra And Logic Gates
 
Registers siso, sipo
Registers siso, sipoRegisters siso, sipo
Registers siso, sipo
 
Counters
CountersCounters
Counters
 
Four way traffic light conrol using Verilog
Four way traffic light conrol using VerilogFour way traffic light conrol using Verilog
Four way traffic light conrol using Verilog
 
Verilog VHDL code Decoder and Encoder
Verilog VHDL code Decoder and EncoderVerilog VHDL code Decoder and Encoder
Verilog VHDL code Decoder and Encoder
 
Ascii adjust & decimal adjust
Ascii adjust & decimal adjustAscii adjust & decimal adjust
Ascii adjust & decimal adjust
 
full subtractor
full subtractorfull subtractor
full subtractor
 
Data Structures Using C Practical File
Data Structures Using C Practical File Data Structures Using C Practical File
Data Structures Using C Practical File
 

Similar to INT 21H & INT 10H VIDEO FUNCTIONS

Brief description of all the interupts
Brief description of all the interuptsBrief description of all the interupts
Brief description of all the interuptsSHREEHARI WADAWADAGI
 
10 h interrupt
10 h interrupt10 h interrupt
10 h interruptgmnithya
 
Home works summary.pptx
Home works summary.pptxHome works summary.pptx
Home works summary.pptxHebaEng
 
Assembly language programs 2
Assembly language programs 2Assembly language programs 2
Assembly language programs 2HarshitParkar6677
 
chapter 7 Logic, shift and rotate instructions
chapter 7 Logic, shift and rotate instructionschapter 7 Logic, shift and rotate instructions
chapter 7 Logic, shift and rotate instructionswarda aziz
 
Part III: Assembly Language
Part III: Assembly LanguagePart III: Assembly Language
Part III: Assembly LanguageAhmed M. Abed
 
Assembly programming 8085/8086 microprocessors
Assembly programming 8085/8086 microprocessorsAssembly programming 8085/8086 microprocessors
Assembly programming 8085/8086 microprocessorsFazalHameed14
 
Keyboard interrupt
Keyboard interruptKeyboard interrupt
Keyboard interruptTech_MX
 
Assembly lab up to 6 up (1)
Assembly lab up to 6 up (1)Assembly lab up to 6 up (1)
Assembly lab up to 6 up (1)ilias ahmed
 
Assembly language programming
Assembly language programming Assembly language programming
Assembly language programming Gaurav Takrani
 
Instruction 8.pptx
Instruction 8.pptxInstruction 8.pptx
Instruction 8.pptxHebaEng
 

Similar to INT 21H & INT 10H VIDEO FUNCTIONS (20)

Brief description of all the interupts
Brief description of all the interuptsBrief description of all the interupts
Brief description of all the interupts
 
10 h interrupt
10 h interrupt10 h interrupt
10 h interrupt
 
Home works summary.pptx
Home works summary.pptxHome works summary.pptx
Home works summary.pptx
 
Atari 2600 VCS Programming
Atari 2600 VCS ProgrammingAtari 2600 VCS Programming
Atari 2600 VCS Programming
 
Files 3-handouts lecture-12
Files 3-handouts lecture-12Files 3-handouts lecture-12
Files 3-handouts lecture-12
 
Biosmac
BiosmacBiosmac
Biosmac
 
Assembly language programs 2
Assembly language programs 2Assembly language programs 2
Assembly language programs 2
 
chapter 7 Logic, shift and rotate instructions
chapter 7 Logic, shift and rotate instructionschapter 7 Logic, shift and rotate instructions
chapter 7 Logic, shift and rotate instructions
 
Lecture6
Lecture6Lecture6
Lecture6
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Al2ed chapter15
Al2ed chapter15Al2ed chapter15
Al2ed chapter15
 
Part III: Assembly Language
Part III: Assembly LanguagePart III: Assembly Language
Part III: Assembly Language
 
Lec06
Lec06Lec06
Lec06
 
Assembly programming 8085/8086 microprocessors
Assembly programming 8085/8086 microprocessorsAssembly programming 8085/8086 microprocessors
Assembly programming 8085/8086 microprocessors
 
Keyboard interrupt
Keyboard interruptKeyboard interrupt
Keyboard interrupt
 
Assembly language programs
Assembly language programsAssembly language programs
Assembly language programs
 
Assembly lab up to 6 up (1)
Assembly lab up to 6 up (1)Assembly lab up to 6 up (1)
Assembly lab up to 6 up (1)
 
Assembly language programming
Assembly language programming Assembly language programming
Assembly language programming
 
Mpmc lab
Mpmc labMpmc lab
Mpmc lab
 
Instruction 8.pptx
Instruction 8.pptxInstruction 8.pptx
Instruction 8.pptx
 

More from Anju Kanjirathingal (9)

Java withrealworldtechnology
Java withrealworldtechnologyJava withrealworldtechnology
Java withrealworldtechnology
 
resolution in the propositional calculus
resolution in the propositional calculusresolution in the propositional calculus
resolution in the propositional calculus
 
The propositional calculus
The propositional calculusThe propositional calculus
The propositional calculus
 
microprocessor
microprocessormicroprocessor
microprocessor
 
int 21,16,09 h
int 21,16,09 hint 21,16,09 h
int 21,16,09 h
 
Intel 80286
Intel 80286Intel 80286
Intel 80286
 
OO Design Principles
OO Design PrinciplesOO Design Principles
OO Design Principles
 
TCP/IP
TCP/IPTCP/IP
TCP/IP
 
2 3 tree
2 3 tree2 3 tree
2 3 tree
 

Recently uploaded

Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 

Recently uploaded (20)

Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 

INT 21H & INT 10H VIDEO FUNCTIONS

  • 1. INT 21H FOR SCREEN DISPLAY && INT 10H OPERATIONS
  • 2. Video Screen Operations • Screen Display with INT 21h – functions 02h to display a character – function 09h to display a string • Setting the cursor position on the screen – INT 10h ;with function 02h • Clearing the screening and Scrolling – INT 10h ;with function 06h
  • 3. Displaying a Character Load 02h in AH Load the character to be displayed in DL Call INT 21h Example: CHAR DB ‘X’ MOV AH,02h ; Step 1 MOV DL,CHAR ; Step 2 INT 21h ; Step 3
  • 4. Displaying a String of Characters String DB ‘Hello world’, 13, 10 ... LEA DI,STRING1 MOV AH,02h MOV CX,13 LP1: MOV DL,[DI] INT 21h INC DI LOOP LP1 ...
  • 5. Displaying a String of Character • Use INT 21h with function 09h: • Define a string in the data area – String must be ended with a ‘$’ • Load 09h in register AH • Load the offset address of the string in DX • Call INT 21h
  • 6. Example String DB ‘Hello There’,13,10,‘$’ ;Step 1 ... MOV AH,09H ;Step 2 LEA DX,String ;Step 3 INT 21h ;Step 4 ...
  • 7. Screen Clearing INT 10h with function 06h Load 06h in AH Load 00h in AL (for clearing the full screen) Load attribute value in BH (color, blinking) Load starting position to scroll in CX (row:column) row # in CH and column # in CL Load ending position in DX (row:column) row # in DH and column # in DL
  • 8. Example Clear screen with white background and red foreground MOV AX,0600h ;AH=06h & AL=00h MOV BH,74h ;White background (7) red foreground(4) MOV CX,0000h ;row 0 col 0 MOV DX,184Fh ;row 24 col 79(inHex) INT 10h
  • 9. Screed Display with File Handles • A file handle is a number that refers to a specific device such as keyboard, screen, printer or a disk file • File handles are useful in case the output from a program is be redirected to a device other than the screen ( e.g. a disk file) or if the input is to redirected from a device other than the keyboard
  • 10. File Handles • File handles are useful when reading from or writing to a disk file • The file handles for standard devices such as the keyboard and the screen are preset. The file handle for keyboard = 00 The file handle for the screen = 01
  • 11. Screed Display with File Handles To display a string of character on the screen with file handles use INT 21h function 40h – Set up string to be displayed as with function 09h – Load AH with 40h – Load DX with address of data to be displayed – Load BX with 01 ; file handle for screen – Load CX with number of characters to display – Call INT 21h
  • 12. Example STRING1 DB ‘Hello There’,0Dh ,0Ah ;Step 1 ... MOV AH,40h ;Step 2 LEA DX,STRING1 ;Step 3 MOV BH,01 ;Step 4 MOV CX,13 ;Step 5 INT 21h ;Step 6
  • 13. BIOS INT 10H OPERATIONS INT 10H Function 00H: Set Video Mode Sets the video mode and also clears the screen (this can be overridden). AH contains 00H and AL contains the color INT 10H Function 01H: Set Cursor Size Sets the cursor size on the Video Controller. set AH = 01H set CH (bits 4-0) = top of cursor (start scan line) set CL (bits 4-0) = bottom of cursor (end scan line)
  • 14. INT 10H Function 02H: Set Cursor Position Set the cursor anywhere on the screen whether in graphics or text mode. set AH = 02H set BH = page number (0 is the default) set DH = row and DL = column INT 10H Function 03H: Return Cursor Status set AH = 03H set BH = page number AX and BX are unchanged and returns these values: CH = Starting scan line DH = Row CL = Ending scan line DL = Column
  • 15. INT 10H Function 05H: Select Active Page set AH = 05H set AL = page number INT 10H Function 06H: Scroll Up Screen set AH = 06H set AL = number of rows (00H for full screen) BH = attribute or pixel value CX = starting row:coloumn DX = ending row:coloumn
  • 16. The operation returns no values: Here's a standard approach for scrolling up on line: 1. Initialize ROW variable to 0 2. Display a line and advance the cursor to the next line. 3. Text whether ROW is near the bottom of the screen (CMP ROW,22) 4. If yes, scroll one line, use ROW to set the cursor, and clear ROW to 00H. 5. If no, increment ROW (INC ROW).
  • 17. INT 10H Function 07H: Scroll Down Screen set AH = 07H set AL = Number of rows (00H for full screen) set BH = Attribute or pixel value set CX = Starting row:coloumn set DX = Ending row:coloumn INT 10H Function 08H: Read Character and Attribute at Cursor set AH = 08H set BH = page number In text mode, AL contains the character and AH its attribute. In graphics mode, 00H for a non-ASCII character.
  • 18. INT 10H Function 09H: Display Character and Attribute at Cursor set AH = 09H set AL = ASCII character set BH = Page number set BL = Attribute or pixel value set CX = count (how many times to repeat character in AL) This operation does not advance the cursor or respond to the Bell, Carriage Return, Line Feed, or Tab Characters: instead, it attempts to display them as ASCII characters. In text mode, when the display exceeds the rightmost column, the operation automatically continues the display on the next row at column 0. For graphics mode, use BL for defining the foreground colour. If bit 7 is 0, the defined colour replaces present pixel colour: if bit 7 is 1, the defined colour is combined (XORed) with them.
  • 19. INT 10H Function 0AH: Display Character at Cursor Same as 09H, except instead of setting the attribute it uses the current value. INT 10H Function 0BH: Set Colour Palette set AH = 0BH set BH = 00H : Select the background colour, where BL contains the colour value in bits 0-3 (any of 16 colours) set BH = 01H: Select the palette for graphics, where BL contains the palettel (0 or 1)
  • 20. INT 10H Function 0CH: Write Pixel Dot set AH = 0CH AL = colour of pixel BH = page number CX = column DX = row Maximum row or column size depends upon the graphics resolution. INT 10H Function 0DH: Read Pixel Dot set AH = 0DH set BH = page number set CX = column set DX = row AL contains the returned pixel colour
  • 21. INT 10H Function 0EH: Display in Teletype Mode INT 10H Function 0FH: Get Current Video Mode set AH = 0FH AL = current video mode BH = active video page INT 10H Function 10H: Access Palette Registers and Video DAC set AH = 10H Subfunction 00H: Update Palette Register (changes the colour displayed by any of 16 Palette registers) Set BH = colour value set BL = 00 - 0FH (palette register number)
  • 22. Subfunction 01H: Update Border Color set BH = new border color Subfunction 03H: Select Background Intensity (enable or disable blinking attribute) set BL = 00H (disable) or 01H (enable) Subfunction 07H: Read Palette Register ( returns the color code stored in any of the 16 Palette registers) BH = returned color code
  • 23. Subfunction 08H: Read Overscan Register (returns the colour code currently in the Overscan (border) register) BH = returned colour code Subfunction 09H: Read Table of Palette Register Values Subfunction 10H: Update DAC Colour Register Subfunction 12H: Update Block of DAC register Subfunction 15H: Read Video DAC Colour Register Subfunction 17H: Read Block of DAC Registers Subfunction 1BH: Perform gRay Scaling on DAC Registers
  • 24. INT 10H Function 11H: Access Character Generator INT 10H Function 12H: Select Alternative Video Routine INT 10H Function 13H: Display Character String INT 10H Function 1AH: Video Display Combination INT 10H Function 1BH: Return Video BIOS Information INT 10H Function 1CH: Save or Restore Video State