SlideShare a Scribd company logo
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 21 h for screen display

More Related Content

What's hot

Logic, shift and rotate instruction
Logic, shift and rotate instructionLogic, shift and rotate instruction
Logic, shift and rotate instruction
kashif Shafqat
 
Assembly Language and microprocessor
Assembly Language and microprocessorAssembly Language and microprocessor
Assembly Language and microprocessor
Khaled Sany
 
Bus system
Bus systemBus system
Bus system
Farah Shaikh
 
BOOLEAN ALGEBRA.ppt
BOOLEAN ALGEBRA.pptBOOLEAN ALGEBRA.ppt
BOOLEAN ALGEBRA.ppt
SainiNageshSir
 
1D Array in Assembly Language
1D Array in Assembly Language1D Array in Assembly Language
1D Array in Assembly Language
Javeria Yaqoob
 
Assembly Language Lecture 3
Assembly Language Lecture 3Assembly Language Lecture 3
Assembly Language Lecture 3
Motaz Saad
 
python Function
python Function python Function
python Function
Ronak Rathi
 
Tic Tac Toe
Tic Tac ToeTic Tac Toe
Pattern detection in mealy machine
Pattern detection in mealy machinePattern detection in mealy machine
Pattern detection in mealy machine
Animesh Chaturvedi
 
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
vikram mahendra
 
Chapter 2 The 8088 Microprocessor
Chapter 2   The 8088 MicroprocessorChapter 2   The 8088 Microprocessor
Chapter 2 The 8088 Microprocessor
Dwight Sabio
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
Bilal Amjad
 
For Loops and Nesting in Python
For Loops and Nesting in PythonFor Loops and Nesting in Python
For Loops and Nesting in Python
primeteacher32
 
Presentation on Karnaugh Map
Presentation  on Karnaugh MapPresentation  on Karnaugh Map
Presentation on Karnaugh Map
Kawsar Ahmed
 
C language (Collected By Dushmanta)
C language  (Collected By Dushmanta)C language  (Collected By Dushmanta)
C language (Collected By Dushmanta)
Dushmanta Nath
 
Ascii adjust & decimal adjust
Ascii adjust & decimal adjustAscii adjust & decimal adjust
Ascii adjust & decimal adjust
Tech_MX
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Bilal Amjad
 
Binary and hex input/output (in 8086 assembuly langyage)
Binary and hex input/output (in 8086 assembuly langyage)Binary and hex input/output (in 8086 assembuly langyage)
Binary and hex input/output (in 8086 assembuly langyage)
Bilal Amjad
 
CH11-Digital Logic.pptx
CH11-Digital Logic.pptxCH11-Digital Logic.pptx
CH11-Digital Logic.pptx
FathoniMahardika1
 
8086 String Instructions.pdf
8086 String Instructions.pdf8086 String Instructions.pdf
8086 String Instructions.pdf
A. S. M. Badrudduza
 

What's hot (20)

Logic, shift and rotate instruction
Logic, shift and rotate instructionLogic, shift and rotate instruction
Logic, shift and rotate instruction
 
Assembly Language and microprocessor
Assembly Language and microprocessorAssembly Language and microprocessor
Assembly Language and microprocessor
 
Bus system
Bus systemBus system
Bus system
 
BOOLEAN ALGEBRA.ppt
BOOLEAN ALGEBRA.pptBOOLEAN ALGEBRA.ppt
BOOLEAN ALGEBRA.ppt
 
1D Array in Assembly Language
1D Array in Assembly Language1D Array in Assembly Language
1D Array in Assembly Language
 
Assembly Language Lecture 3
Assembly Language Lecture 3Assembly Language Lecture 3
Assembly Language Lecture 3
 
python Function
python Function python Function
python Function
 
Tic Tac Toe
Tic Tac ToeTic Tac Toe
Tic Tac Toe
 
Pattern detection in mealy machine
Pattern detection in mealy machinePattern detection in mealy machine
Pattern detection in mealy machine
 
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
 
Chapter 2 The 8088 Microprocessor
Chapter 2   The 8088 MicroprocessorChapter 2   The 8088 Microprocessor
Chapter 2 The 8088 Microprocessor
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
 
For Loops and Nesting in Python
For Loops and Nesting in PythonFor Loops and Nesting in Python
For Loops and Nesting in Python
 
Presentation on Karnaugh Map
Presentation  on Karnaugh MapPresentation  on Karnaugh Map
Presentation on Karnaugh Map
 
C language (Collected By Dushmanta)
C language  (Collected By Dushmanta)C language  (Collected By Dushmanta)
C language (Collected By Dushmanta)
 
Ascii adjust & decimal adjust
Ascii adjust & decimal adjustAscii adjust & decimal adjust
Ascii adjust & decimal adjust
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
 
Binary and hex input/output (in 8086 assembuly langyage)
Binary and hex input/output (in 8086 assembuly langyage)Binary and hex input/output (in 8086 assembuly langyage)
Binary and hex input/output (in 8086 assembuly langyage)
 
CH11-Digital Logic.pptx
CH11-Digital Logic.pptxCH11-Digital Logic.pptx
CH11-Digital Logic.pptx
 
8086 String Instructions.pdf
8086 String Instructions.pdf8086 String Instructions.pdf
8086 String Instructions.pdf
 

Similar to int 21 h for screen display

Brief description of all the interupts
Brief description of all the interuptsBrief description of all the interupts
Brief description of all the interupts
SHREEHARI WADAWADAGI
 
10 h interrupt
10 h interrupt10 h interrupt
10 h interrupt
gmnithya
 
Home works summary.pptx
Home works summary.pptxHome works summary.pptx
Home works summary.pptx
HebaEng
 
Atari 2600 VCS Programming
Atari 2600 VCS ProgrammingAtari 2600 VCS Programming
Atari 2600 VCS Programming
Carlos Duarte do Nascimento
 
Files 3-handouts lecture-12
Files 3-handouts lecture-12Files 3-handouts lecture-12
Files 3-handouts lecture-12
Muhammad Aamir Rakhshani
 
Biosmac
BiosmacBiosmac
Biosmac
charmi19
 
Assembly language programs 2
Assembly language programs 2Assembly language programs 2
Assembly language programs 2
HarshitParkar6677
 
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
warda aziz
 
Lecture6
Lecture6Lecture6
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
Tirumalesh Nizampatnam
 
Al2ed chapter15
Al2ed chapter15Al2ed chapter15
Al2ed chapter15
Abdullelah Al-Fahad
 
Part III: Assembly Language
Part III: Assembly LanguagePart III: Assembly Language
Part III: Assembly Language
Ahmed M. Abed
 
Lec06
Lec06Lec06
Assembly programming 8085/8086 microprocessors
Assembly programming 8085/8086 microprocessorsAssembly programming 8085/8086 microprocessors
Assembly programming 8085/8086 microprocessors
FazalHameed14
 
Keyboard interrupt
Keyboard interruptKeyboard interrupt
Keyboard interrupt
Tech_MX
 
8086-instruction-set-ppt
 8086-instruction-set-ppt 8086-instruction-set-ppt
8086-instruction-set-ppt
jemimajerome
 
Assembly language programs
Assembly language programsAssembly language programs
Assembly language programs
HarshitParkar6677
 
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
 
Mpmc lab
Mpmc labMpmc lab

Similar to int 21 h for screen display (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
 
8086-instruction-set-ppt
 8086-instruction-set-ppt 8086-instruction-set-ppt
8086-instruction-set-ppt
 
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
 

More from Anju Kanjirathingal

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

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

World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
Assessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptxAssessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptx
Kavitha Krishnan
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
simonomuemu
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 

Recently uploaded (20)

World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
Assessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptxAssessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptx
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 

int 21 h for screen display

  • 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