SlideShare a Scribd company logo
1 of 21
Handling Character
display in
graphics mode
using BIOS
Who are we?
• Syed Owais Ali Chishti
• Faisal Usman
• Ibrahim Abbasi
Interrupts 10h (Video Service)
INT 10h,0 - Set video mode
INT 10h,1 - Set cursor type
INT 10h,2 - Set cursor position
INT 10h,3 - Read cursor position
INT 10h,5 - Select active display page
INT 10h,6 - Scroll active page up
INT 10h,7 - Scroll active page down
INT 10h,8 - Read character and attribute at cursor
INT 10h,9 - Write character and attribute at cursor
INT 10h,A - Write character at current cursor
INT 10h,B - Set color palette
INT 10h,C - Write graphics pixel at coordinate
More…
Compiling 16 Bit MASM
• Download TaizTextEditor
• Unzip on Desktop
• Click on loadAsm16.bat in unzipped folder
• Click TaizTextEditor.exe to start
• To Compiler press F6
• Download: http://bit.ly/TaizTextEditor
InitMode PROC
mov ah, 0h ; Function
mov al, 10h ; 640x350 16 color
int 10h
ret
InitMode ENDP
; Modes Page 556
PrintChar PROC
mov ah, 9h
mov al, ‘A’
mov bh, 0 ; Page number
mov bl, 0Fh ; Color
mov cx, 1 ; Repeat
int 10h
ret
PrintChar ENDP
ScrollUp PROC
mov ah, 6h ; scroll window up
mov al, 0 ; entire window
mov ch, 0 ; upper left row
mov cl, 0 ; upper left column
mov dh, 24 ; lower right row
mov dl, 79 ; lower right column
mov bh, 7 ; attribute for blanked area
int 10h
ret
ScrollUp ENDP
ScrollDown PROC
mov ah, 7h ; scroll window down
mov al, 0 ; entire window
mov ch, 0 ; upper left row
mov cl, 0 ; upper left column
mov dh, 24 ; lower right row
mov dl, 79 ; lower right column
mov bh, 7 ; attribute for blanked area
int 10h
ret
ScrollDown ENDP
ShowCursor PROC
mov ah, 1h
mov cx, 0607h
int 10h
ret
ShowCursor ENDP
HideCursor PROC
mov ah, 3h ; Get Cursor Pos
int 10h
or ch, 30h ; Illegal Pos
mov ah, 1h ; Set Cursor Pos
int 10h
ret
HideCursor ENDP
GetMetoXY PROC
mov ah, 2h ; Move cursor
mov dh, 10 ; row
mov dl, 20 ; columns
mov bh, 0 ; page
int 10h
ret
GetMetoXY ENDP
clear PROC
mov ax, 0600h
mov cx, 0
mov dx, 184Fh
mov bh, 0 ; Color
int 10h
mov dx, 0
call GetMeToXY
clear ENDP
PrintString PROC loc:WORD
; Print first Char of string
; Move cursor Ahead
; Loop until null found
ret
PrintString ENDP
PrintPX PROC
mov ah, 0Ch
mov al, 15 ; Color 0-16
mov bh, 0 ; video page
mov cx, 10 ; x_coord
mov dx, 10 ; y_coord
int 10h
ret
PrintPX ENDP
ReadPX PROC
mov ah, 0Dh
mov bh, 0 ; Video Page
mov cx, 100 ; x
mov dx, 100 ; y
int 10h
; result in al 0-15
ret
ReadPX ENDP
VerticalLine PROC
l0:
call PrintPX
dec dx ; dx y-axis
dec ax ; ax loop value
cmp ax, 0
jg l0
ret
VerticalLine ENDP
HorizontalLine PROC
l0:
call PrintPX
inc cx
dec ax
cmp ax, 0
jg l0
ret
HorizontalLine ENDP
Include soac16.inc
.code
main PROC
startup
mov al, 10h ; 640x350 16 colors
call InitMode
mov al, ‘A'
call PrintChar
mov al, 'B'
call PrintChar ; Print in same place - ERROR
mov ah, 4Ch
int 21h
main ENDP
END main
Include soac16.inc
.code
main PROC
startup
mov al, 10h ; 640x350 16
call InitMode
invoke Square, 200, 300, 200
mov ah,4Ch
int 21h
main ENDP
END main
Good Resources on Video Service
• http://bit.ly/BIOSGraphics001
• http://bit.ly/BIOSGraphics002
• http://bit.ly/BIOSGraphics003

More Related Content

Similar to Graphics mode char display BIOS

Write Assembly code (8086) that implements the function of (A.B) +C..pdf
Write Assembly code (8086) that implements the function of (A.B) +C..pdfWrite Assembly code (8086) that implements the function of (A.B) +C..pdf
Write Assembly code (8086) that implements the function of (A.B) +C..pdfgopalk44
 
Taller practico emu8086_galarraga
Taller practico emu8086_galarragaTaller practico emu8086_galarraga
Taller practico emu8086_galarragaFabricio Galárraga
 
Emulador de ensamblador emu8086
Emulador de ensamblador emu8086Emulador de ensamblador emu8086
Emulador de ensamblador emu8086Marco Muñoz
 
Assembly language
Assembly languageAssembly language
Assembly languagebryle12
 
Instalación de emu8086 y compilados
Instalación de emu8086 y compiladosInstalación de emu8086 y compilados
Instalación de emu8086 y compiladosDiego Erazo
 
Instruction 8.pptx
Instruction 8.pptxInstruction 8.pptx
Instruction 8.pptxHebaEng
 
Chapter 6 Flow control Instructions
Chapter 6 Flow control InstructionsChapter 6 Flow control Instructions
Chapter 6 Flow control Instructionswarda aziz
 
Home works summary.pptx
Home works summary.pptxHome works summary.pptx
Home works summary.pptxHebaEng
 
Instalación de emu8086
Instalación de emu8086Instalación de emu8086
Instalación de emu8086Alex Toapanta
 
Assembly Language Lecture 2
Assembly Language Lecture 2Assembly Language Lecture 2
Assembly Language Lecture 2Motaz Saad
 
Keyboard interrupt
Keyboard interruptKeyboard interrupt
Keyboard interruptTech_MX
 
Microprocessor 8086-lab-mannual
Microprocessor 8086-lab-mannualMicroprocessor 8086-lab-mannual
Microprocessor 8086-lab-mannualyeshwant gadave
 

Similar to Graphics mode char display BIOS (19)

Emulador emu8086
Emulador emu8086Emulador emu8086
Emulador emu8086
 
Ensamblador emu 8086
Ensamblador emu 8086Ensamblador emu 8086
Ensamblador emu 8086
 
Write Assembly code (8086) that implements the function of (A.B) +C..pdf
Write Assembly code (8086) that implements the function of (A.B) +C..pdfWrite Assembly code (8086) that implements the function of (A.B) +C..pdf
Write Assembly code (8086) that implements the function of (A.B) +C..pdf
 
Taller practico emu8086_galarraga
Taller practico emu8086_galarragaTaller practico emu8086_galarraga
Taller practico emu8086_galarraga
 
int 21 h for screen display
int 21 h for screen displayint 21 h for screen display
int 21 h for screen display
 
Emulador de ensamblador emu8086
Emulador de ensamblador emu8086Emulador de ensamblador emu8086
Emulador de ensamblador emu8086
 
staOS
staOSstaOS
staOS
 
Lec06
Lec06Lec06
Lec06
 
Assembly language
Assembly languageAssembly language
Assembly language
 
Instalación de emu8086 y compilados
Instalación de emu8086 y compiladosInstalación de emu8086 y compilados
Instalación de emu8086 y compilados
 
Instruction 8.pptx
Instruction 8.pptxInstruction 8.pptx
Instruction 8.pptx
 
Assembler
AssemblerAssembler
Assembler
 
Chapter 6 Flow control Instructions
Chapter 6 Flow control InstructionsChapter 6 Flow control Instructions
Chapter 6 Flow control Instructions
 
Home works summary.pptx
Home works summary.pptxHome works summary.pptx
Home works summary.pptx
 
Instalación de emu8086
Instalación de emu8086Instalación de emu8086
Instalación de emu8086
 
Assembly Language Lecture 2
Assembly Language Lecture 2Assembly Language Lecture 2
Assembly Language Lecture 2
 
Keyboard interrupt
Keyboard interruptKeyboard interrupt
Keyboard interrupt
 
Microprocessor 8086-lab-mannual
Microprocessor 8086-lab-mannualMicroprocessor 8086-lab-mannual
Microprocessor 8086-lab-mannual
 
Taller Ensambladores
Taller EnsambladoresTaller Ensambladores
Taller Ensambladores
 

More from Syed Owais Ali Chishti (11)

Vehicle Classification
Vehicle ClassificationVehicle Classification
Vehicle Classification
 
Regular Expression
Regular ExpressionRegular Expression
Regular Expression
 
Intro to Matlab + GUI
Intro to Matlab + GUIIntro to Matlab + GUI
Intro to Matlab + GUI
 
Cross-Platform Development
Cross-Platform DevelopmentCross-Platform Development
Cross-Platform Development
 
Shell Annual Report 2015
Shell Annual Report 2015Shell Annual Report 2015
Shell Annual Report 2015
 
Rabin Karp - String Matching Algorithm
Rabin Karp - String Matching AlgorithmRabin Karp - String Matching Algorithm
Rabin Karp - String Matching Algorithm
 
Plagiarism
PlagiarismPlagiarism
Plagiarism
 
Chishti
ChishtiChishti
Chishti
 
Personality 2.0
Personality 2.0Personality 2.0
Personality 2.0
 
4th Law by Robert Greene
4th Law by Robert Greene4th Law by Robert Greene
4th Law by Robert Greene
 
Personality
PersonalityPersonality
Personality
 

Recently uploaded

Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝
Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝
Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝soniya singh
 
Motivation and Theory Maslow and Murray pdf
Motivation and Theory Maslow and Murray pdfMotivation and Theory Maslow and Murray pdf
Motivation and Theory Maslow and Murray pdfakankshagupta7348026
 
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...NETWAYS
 
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )Pooja Nehwal
 
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...henrik385807
 
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyCall Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyPooja Nehwal
 
SaaStr Workshop Wednesday w: Jason Lemkin, SaaStr
SaaStr Workshop Wednesday w: Jason Lemkin, SaaStrSaaStr Workshop Wednesday w: Jason Lemkin, SaaStr
SaaStr Workshop Wednesday w: Jason Lemkin, SaaStrsaastr
 
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxNikitaBankoti2
 
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...NETWAYS
 
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Delhi Call girls
 
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...Sheetaleventcompany
 
Microsoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AIMicrosoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AITatiana Gurgel
 
Russian Call Girls in Kolkata Vaishnavi 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Vaishnavi 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Vaishnavi 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Vaishnavi 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...Salam Al-Karadaghi
 
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesVVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesPooja Nehwal
 
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdfOpen Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdfhenrik385807
 
Genesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptxGenesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptxFamilyWorshipCenterD
 
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Hasting Chen
 
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Krijn Poppe
 
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...Pooja Nehwal
 

Recently uploaded (20)

Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝
Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝
Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝
 
Motivation and Theory Maslow and Murray pdf
Motivation and Theory Maslow and Murray pdfMotivation and Theory Maslow and Murray pdf
Motivation and Theory Maslow and Murray pdf
 
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
 
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )
 
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
 
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyCall Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
 
SaaStr Workshop Wednesday w: Jason Lemkin, SaaStr
SaaStr Workshop Wednesday w: Jason Lemkin, SaaStrSaaStr Workshop Wednesday w: Jason Lemkin, SaaStr
SaaStr Workshop Wednesday w: Jason Lemkin, SaaStr
 
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
 
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
 
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
 
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
 
Microsoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AIMicrosoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AI
 
Russian Call Girls in Kolkata Vaishnavi 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Vaishnavi 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Vaishnavi 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Vaishnavi 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
 
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesVVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
 
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdfOpen Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
 
Genesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptxGenesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptx
 
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
 
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
 
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
 

Graphics mode char display BIOS

  • 2. Who are we? • Syed Owais Ali Chishti • Faisal Usman • Ibrahim Abbasi
  • 3. Interrupts 10h (Video Service) INT 10h,0 - Set video mode INT 10h,1 - Set cursor type INT 10h,2 - Set cursor position INT 10h,3 - Read cursor position INT 10h,5 - Select active display page INT 10h,6 - Scroll active page up INT 10h,7 - Scroll active page down INT 10h,8 - Read character and attribute at cursor INT 10h,9 - Write character and attribute at cursor INT 10h,A - Write character at current cursor INT 10h,B - Set color palette INT 10h,C - Write graphics pixel at coordinate More…
  • 4. Compiling 16 Bit MASM • Download TaizTextEditor • Unzip on Desktop • Click on loadAsm16.bat in unzipped folder • Click TaizTextEditor.exe to start • To Compiler press F6 • Download: http://bit.ly/TaizTextEditor
  • 5. InitMode PROC mov ah, 0h ; Function mov al, 10h ; 640x350 16 color int 10h ret InitMode ENDP ; Modes Page 556
  • 6. PrintChar PROC mov ah, 9h mov al, ‘A’ mov bh, 0 ; Page number mov bl, 0Fh ; Color mov cx, 1 ; Repeat int 10h ret PrintChar ENDP
  • 7. ScrollUp PROC mov ah, 6h ; scroll window up mov al, 0 ; entire window mov ch, 0 ; upper left row mov cl, 0 ; upper left column mov dh, 24 ; lower right row mov dl, 79 ; lower right column mov bh, 7 ; attribute for blanked area int 10h ret ScrollUp ENDP
  • 8. ScrollDown PROC mov ah, 7h ; scroll window down mov al, 0 ; entire window mov ch, 0 ; upper left row mov cl, 0 ; upper left column mov dh, 24 ; lower right row mov dl, 79 ; lower right column mov bh, 7 ; attribute for blanked area int 10h ret ScrollDown ENDP
  • 9. ShowCursor PROC mov ah, 1h mov cx, 0607h int 10h ret ShowCursor ENDP
  • 10. HideCursor PROC mov ah, 3h ; Get Cursor Pos int 10h or ch, 30h ; Illegal Pos mov ah, 1h ; Set Cursor Pos int 10h ret HideCursor ENDP
  • 11. GetMetoXY PROC mov ah, 2h ; Move cursor mov dh, 10 ; row mov dl, 20 ; columns mov bh, 0 ; page int 10h ret GetMetoXY ENDP
  • 12. clear PROC mov ax, 0600h mov cx, 0 mov dx, 184Fh mov bh, 0 ; Color int 10h mov dx, 0 call GetMeToXY clear ENDP
  • 13. PrintString PROC loc:WORD ; Print first Char of string ; Move cursor Ahead ; Loop until null found ret PrintString ENDP
  • 14. PrintPX PROC mov ah, 0Ch mov al, 15 ; Color 0-16 mov bh, 0 ; video page mov cx, 10 ; x_coord mov dx, 10 ; y_coord int 10h ret PrintPX ENDP
  • 15. ReadPX PROC mov ah, 0Dh mov bh, 0 ; Video Page mov cx, 100 ; x mov dx, 100 ; y int 10h ; result in al 0-15 ret ReadPX ENDP
  • 16. VerticalLine PROC l0: call PrintPX dec dx ; dx y-axis dec ax ; ax loop value cmp ax, 0 jg l0 ret VerticalLine ENDP
  • 17. HorizontalLine PROC l0: call PrintPX inc cx dec ax cmp ax, 0 jg l0 ret HorizontalLine ENDP
  • 18. Include soac16.inc .code main PROC startup mov al, 10h ; 640x350 16 colors call InitMode mov al, ‘A' call PrintChar mov al, 'B' call PrintChar ; Print in same place - ERROR mov ah, 4Ch int 21h main ENDP END main
  • 19.
  • 20. Include soac16.inc .code main PROC startup mov al, 10h ; 640x350 16 call InitMode invoke Square, 200, 300, 200 mov ah,4Ch int 21h main ENDP END main
  • 21. Good Resources on Video Service • http://bit.ly/BIOSGraphics001 • http://bit.ly/BIOSGraphics002 • http://bit.ly/BIOSGraphics003