SlideShare a Scribd company logo
TEXT MODE PROGRAMMING
DISPLAY PAGES
IMPORTANT POINT
• Position on the screen may be located by giving its
columns and rows.
• Screen in text mode is divided into 80 columns by 25
rows.
• 0-79 columns ....... 0-24 rows.
• The upper left corner has coordinate (0,0)
• Character display at a screen position is specified by the
contents of a words in the display memory.
• The low byte of a word contains the characters ACSII
code.
• The high byte of the word contains its attributes.
DISPLAY PAGES
• For a MDA, the display memory can hold one screenful of
data.
• A graphics adapter divides its display memory into
DISPLAY PAGES.
• One page can hold the data for one screen.
• The page are numbered, starting with 0.
• The numbers of pages avaliable depends on the adapter
and the select mode selected.
• In the 80*25 text mode,each display pages 4 KB (4096
bytes).
• The Monochrome Display Adapter has only one page.
• The Color Graphics Adapter has four pages.
THE ACTIVE DISPLAY PAGE
• The active display page is the page currently being
displayed .
• For 80*25 text mode, the memory requirement is 80*25 =
2000words = 4000 btyes.
• The vedio controller displays the first word in the active
display page at the upper left corner of the screen (col
0,row 0).
• The next word is displayed in column 1, row 0.
• Active display page is displayed on the screen row by
row.
• AH register contains the functions number
• 00h set text mode
• 01h set cursor lines
• 02h set cursor position
• 03h get cursor position and size
• 06h scroll window up
• 07h scroll window down
• 08h read character and attributes
• 09h write character and attributes
INT 10h vedio functions:
EXAMPLE: Select page 1 for the CGA
solution:
MOV AH,5 ;active display pg function
MOV AL,1 ;pg 1
INT 10H ;select pg
EXAMPLE: Clear the screen to black for the 80*25
display.
• SOLUTION:
MOV AH,6 ;scroll up function
XOR AL,AL ;clr whole screen
XOR CX,CX ;upper left corner is(0,0)
MOV DX,184Fh ;lower rite corner is (4Fh,18h)
MOV BH,7 ;normal video attribute
INT 10h ;clr scr

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 Programming By Ytha Yu, Charles Marut Chap 5 (The Processor...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 5 (The Processor...Assembly Language Programming By Ytha Yu, Charles Marut Chap 5 (The Processor...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 5 (The Processor...
Bilal Amjad
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...
Bilal Amjad
 
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
 
Organization of the ibm personal computers
Organization of the ibm personal computersOrganization of the ibm personal computers
Organization of the ibm personal computers
warda aziz
 
Introduction to ibm pc assembly language
Introduction to ibm pc assembly languageIntroduction to ibm pc assembly language
Introduction to ibm pc assembly language
warda aziz
 
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMINGChapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Frankie Jones
 
Conversion of number system
Conversion of number systemConversion of number system
Conversion of number system
University of Potsdam
 
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
 
Disk structure & File Handling
Disk structure & File HandlingDisk structure & File Handling
Disk structure & File Handling
Momina Idrees
 
assembly language programming and organization of IBM PC" by YTHA YU
assembly language programming and organization of IBM PC" by YTHA YUassembly language programming and organization of IBM PC" by YTHA YU
assembly language programming and organization of IBM PC" by YTHA YU
Education
 
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
 
Assembly Language Lecture 5
Assembly Language Lecture 5Assembly Language Lecture 5
Assembly Language Lecture 5
Motaz Saad
 
Assembly Language Basics
Assembly Language BasicsAssembly Language Basics
Assembly Language Basics
Education Front
 
1327 Addressing Modes Of 8086
1327 Addressing Modes Of 80861327 Addressing Modes Of 8086
1327 Addressing Modes Of 8086
techbed
 
Binomial queues
Binomial queuesBinomial queues
Binomial queues
durvasikiran
 
Arithmetic instructions
Arithmetic instructionsArithmetic instructions
Arithmetic instructions
Robert Almazan
 
Assembly language (coal)
Assembly language (coal)Assembly language (coal)
Assembly language (coal)
Hareem Aslam
 
Solution manual of assembly language programming and organization of the ibm ...
Solution manual of assembly language programming and organization of the ibm ...Solution manual of assembly language programming and organization of the ibm ...
Solution manual of assembly language programming and organization of the ibm ...
Tayeen Ahmed
 
Assembly language solution
Assembly language  solutionAssembly language  solution
Assembly language solution
Ahsan Riaz
 

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 Programming By Ytha Yu, Charles Marut Chap 5 (The Processor...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 5 (The Processor...Assembly Language Programming By Ytha Yu, Charles Marut Chap 5 (The Processor...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 5 (The Processor...
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...
 
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 ...
 
Organization of the ibm personal computers
Organization of the ibm personal computersOrganization of the ibm personal computers
Organization of the ibm personal computers
 
Introduction to ibm pc assembly language
Introduction to ibm pc assembly languageIntroduction to ibm pc assembly language
Introduction to ibm pc assembly language
 
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMINGChapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
 
Conversion of number system
Conversion of number systemConversion of number system
Conversion of number system
 
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
 
Disk structure & File Handling
Disk structure & File HandlingDisk structure & File Handling
Disk structure & File Handling
 
assembly language programming and organization of IBM PC" by YTHA YU
assembly language programming and organization of IBM PC" by YTHA YUassembly language programming and organization of IBM PC" by YTHA YU
assembly language programming and organization of IBM PC" by YTHA YU
 
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...
 
Assembly Language Lecture 5
Assembly Language Lecture 5Assembly Language Lecture 5
Assembly Language Lecture 5
 
Assembly Language Basics
Assembly Language BasicsAssembly Language Basics
Assembly Language Basics
 
1327 Addressing Modes Of 8086
1327 Addressing Modes Of 80861327 Addressing Modes Of 8086
1327 Addressing Modes Of 8086
 
Binomial queues
Binomial queuesBinomial queues
Binomial queues
 
Arithmetic instructions
Arithmetic instructionsArithmetic instructions
Arithmetic instructions
 
Assembly language (coal)
Assembly language (coal)Assembly language (coal)
Assembly language (coal)
 
Solution manual of assembly language programming and organization of the ibm ...
Solution manual of assembly language programming and organization of the ibm ...Solution manual of assembly language programming and organization of the ibm ...
Solution manual of assembly language programming and organization of the ibm ...
 
Assembly language solution
Assembly language  solutionAssembly language  solution
Assembly language solution
 

Similar to Text Mode Programming in Assembly

Coal 19-int10 h in Assembly Programming
Coal 19-int10 h in Assembly ProgrammingCoal 19-int10 h in Assembly Programming
Coal 19-int10 h in Assembly Programming
Muhammad Taqi Hassan Bukhari
 
Programming Techniques.pptx
Programming Techniques.pptxProgramming Techniques.pptx
Programming Techniques.pptx
himanshu2125cse1052
 
Introduction to Assembly Language & various basic things
Introduction to Assembly Language & various basic thingsIntroduction to Assembly Language & various basic things
Introduction to Assembly Language & various basic things
ishitasabrincse
 
S09mid2sol
S09mid2solS09mid2sol
S09mid2sol
Anil Reddy
 
Qr code
Qr codeQr code
Qr code
Ajay Verma
 
ME119-L1.pdf
ME119-L1.pdfME119-L1.pdf
ME119-L1.pdf
pradeepdubey73
 
EC8691-MPMC-PPT.pptx
EC8691-MPMC-PPT.pptxEC8691-MPMC-PPT.pptx
EC8691-MPMC-PPT.pptx
Manikandan813397
 
8279_full.ppt
8279_full.ppt8279_full.ppt
8279_full.ppt
parul757596
 
8279_fullaanananannananansnsnnsnsnsnsn.ppt
8279_fullaanananannananansnsnnsnsnsnsn.ppt8279_fullaanananannananansnsnnsnsnsnsn.ppt
8279_fullaanananannananansnsnnsnsnsnsn.ppt
AnuragGautam79
 
Chapter 6 - Introduction to 8085 Instructions
Chapter 6 - Introduction to 8085 InstructionsChapter 6 - Introduction to 8085 Instructions
Chapter 6 - Introduction to 8085 Instructions
cmkandemir
 
6_2018_11_23!09_24_56_PM (1).pptx
6_2018_11_23!09_24_56_PM (1).pptx6_2018_11_23!09_24_56_PM (1).pptx
6_2018_11_23!09_24_56_PM (1).pptx
HebaEng
 
07 sap scripts
07 sap scripts07 sap scripts
07 sap scripts
Kranthi Kumar
 

Similar to Text Mode Programming in Assembly (12)

Coal 19-int10 h in Assembly Programming
Coal 19-int10 h in Assembly ProgrammingCoal 19-int10 h in Assembly Programming
Coal 19-int10 h in Assembly Programming
 
Programming Techniques.pptx
Programming Techniques.pptxProgramming Techniques.pptx
Programming Techniques.pptx
 
Introduction to Assembly Language & various basic things
Introduction to Assembly Language & various basic thingsIntroduction to Assembly Language & various basic things
Introduction to Assembly Language & various basic things
 
S09mid2sol
S09mid2solS09mid2sol
S09mid2sol
 
Qr code
Qr codeQr code
Qr code
 
ME119-L1.pdf
ME119-L1.pdfME119-L1.pdf
ME119-L1.pdf
 
EC8691-MPMC-PPT.pptx
EC8691-MPMC-PPT.pptxEC8691-MPMC-PPT.pptx
EC8691-MPMC-PPT.pptx
 
8279_full.ppt
8279_full.ppt8279_full.ppt
8279_full.ppt
 
8279_fullaanananannananansnsnnsnsnsnsn.ppt
8279_fullaanananannananansnsnnsnsnsnsn.ppt8279_fullaanananannananansnsnnsnsnsnsn.ppt
8279_fullaanananannananansnsnnsnsnsnsn.ppt
 
Chapter 6 - Introduction to 8085 Instructions
Chapter 6 - Introduction to 8085 InstructionsChapter 6 - Introduction to 8085 Instructions
Chapter 6 - Introduction to 8085 Instructions
 
6_2018_11_23!09_24_56_PM (1).pptx
6_2018_11_23!09_24_56_PM (1).pptx6_2018_11_23!09_24_56_PM (1).pptx
6_2018_11_23!09_24_56_PM (1).pptx
 
07 sap scripts
07 sap scripts07 sap scripts
07 sap scripts
 

Recently uploaded

MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
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
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
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
 
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
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
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
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
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
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 

Recently uploaded (20)

MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
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
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
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
 
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
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
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
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
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
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 

Text Mode Programming in Assembly

  • 2. IMPORTANT POINT • Position on the screen may be located by giving its columns and rows. • Screen in text mode is divided into 80 columns by 25 rows. • 0-79 columns ....... 0-24 rows. • The upper left corner has coordinate (0,0) • Character display at a screen position is specified by the contents of a words in the display memory. • The low byte of a word contains the characters ACSII code.
  • 3. • The high byte of the word contains its attributes.
  • 4. DISPLAY PAGES • For a MDA, the display memory can hold one screenful of data. • A graphics adapter divides its display memory into DISPLAY PAGES. • One page can hold the data for one screen. • The page are numbered, starting with 0. • The numbers of pages avaliable depends on the adapter and the select mode selected.
  • 5. • In the 80*25 text mode,each display pages 4 KB (4096 bytes). • The Monochrome Display Adapter has only one page. • The Color Graphics Adapter has four pages.
  • 6. THE ACTIVE DISPLAY PAGE • The active display page is the page currently being displayed . • For 80*25 text mode, the memory requirement is 80*25 = 2000words = 4000 btyes. • The vedio controller displays the first word in the active display page at the upper left corner of the screen (col 0,row 0). • The next word is displayed in column 1, row 0. • Active display page is displayed on the screen row by row.
  • 7. • AH register contains the functions number • 00h set text mode • 01h set cursor lines • 02h set cursor position • 03h get cursor position and size • 06h scroll window up • 07h scroll window down • 08h read character and attributes • 09h write character and attributes INT 10h vedio functions:
  • 8. EXAMPLE: Select page 1 for the CGA solution: MOV AH,5 ;active display pg function MOV AL,1 ;pg 1 INT 10H ;select pg
  • 9. EXAMPLE: Clear the screen to black for the 80*25 display. • SOLUTION: MOV AH,6 ;scroll up function XOR AL,AL ;clr whole screen XOR CX,CX ;upper left corner is(0,0) MOV DX,184Fh ;lower rite corner is (4Fh,18h) MOV BH,7 ;normal video attribute INT 10h ;clr scr