SlideShare a Scribd company logo
1 of 13
Handling Character Display
in graphics mode Using
32 bit system call
ASJAD ALI
(p14-6100)
LIST OF TOICS
 Write Console
 GetStdHandle
 GetConsoleCursorInfo
 SetConsoleCursorInfo
 ConsoleScreenBufferInfo
 GetConsoleScreenBufferInfo
 SetConsoleScreenBufferSize
 SetConsoleTitle
 WriteConsoleOutputAttribute
 TYPE OF BUFFER:
 INPUT BUFFER:
 Input Buffer contain queue of inputs record
 E.g Mouse Click , Keyboard etc
 SECREEN BUFFER:
 2D array of Character and color data affecting
appearance of text
 INVOKE WriteConsole,
 eax, ; console output handle
 edx, ; string pointer
 ecx, ; string length
 ADDR bytesWritten,
 WriteConsole
(
_In_ HANDLE hConsoleOutput,
_In_ VOID *lpBuffer,
_In_ DWORD nNumberOfCharsToWrite,
_Out_ LPDWORD lpNumberOfCharsWritten,
);
 GetStdHandle
 GET the Control of the Screen Buffer
INVOKE GetStdHandle, STD_OUTPUT_HANDLE
mov outHandle,eax
 ;INVOKE GetConsoleCursorInfo, outHandle,
 ; ADDR cursorInfo
 ;mov eax, cursorInfo.dwSize
 typedef struct _CONSOLE_CURSOR_INFO
 {
 DWORD dwSize;
 BOOL bVisible;
 }
 ;mov cursorInfo.bVisible,1
 ;mov cursorInfo.dwSize,100
 ;INVOKE SetConsoleCursorInfo, outHandle,
 ; ADDR cursorInfo
 SetConsoleCursorInfo
 (
 HANDLE hConsoleOutput,
 CONSOLE_CURSOR_INFO *lpConsoleCursorInfo
 );
 CONSOLE_SCREEN_BUFFER_INFO
 {
 COORD dwSize;
COORD dwCursorPosition;
WORD wAttributes; SMALL_RECT
srWindow;
COORD dwMaximumWindowSize;
 }
 INVOKE GetConsoleScreenBufferInfo,
outHandle,
 ADDR consoleInfo
 GetConsoleScreenBufferInfo
 (
 HANDLE hConsoleOutput, (input)
 PCONSOLE_SCREEN_BUFFER_INFO
*lpConsoleScreenBufferInfo (Output)
 );
 mov scrSize.x, 80
 mov scrSize.y, 25
 INVOKE SetConsoleScreenBufferSize,
 outHandle,scrSize
INVOKE SetConsoleTitle,
ADDR titleStr
 INVOKE WriteConsoleOutputAttribute,
 outHandle, ADDR attributes,
 BufSize, xyPos,
 ADDR cellsWritten
 WriteConsoleOutputAttribute
 (
 _In_ HANDLE hConsoleOutput,
 _In_ WORD *lpAttribute,
 _In_ DWORD nLength,
 _In_ COORD dwWriteCoord,
 _Out_ LPDWORD lpNumberOfAttrsWritten
 );
Graphics 32 bit

More Related Content

Similar to Graphics 32 bit

Assembly Language Lecture 2
Assembly Language Lecture 2Assembly Language Lecture 2
Assembly Language Lecture 2Motaz Saad
 
Please correct my code for me i am lost Thanks i submitted.pdf
Please correct my code for me i am lost Thanks i submitted.pdfPlease correct my code for me i am lost Thanks i submitted.pdf
Please correct my code for me i am lost Thanks i submitted.pdfkitty811
 
Home works summary.pptx
Home works summary.pptxHome works summary.pptx
Home works summary.pptxHebaEng
 
Lec 47.48 - stream-files
Lec 47.48 - stream-filesLec 47.48 - stream-files
Lec 47.48 - stream-filesPrincess Sam
 
Part III: Assembly Language
Part III: Assembly LanguagePart III: Assembly Language
Part III: Assembly LanguageAhmed M. Abed
 
Vintage Computing Festival Midwest 18 2023-09-09 What's In A Terminal.pdf
Vintage Computing Festival Midwest 18 2023-09-09 What's In A Terminal.pdfVintage Computing Festival Midwest 18 2023-09-09 What's In A Terminal.pdf
Vintage Computing Festival Midwest 18 2023-09-09 What's In A Terminal.pdfRichard Thomson
 
04 Console input output-
04 Console input output-04 Console input output-
04 Console input output-maznabili
 
Swug July 2010 - windows debugging by sainath
Swug July 2010 - windows debugging by sainathSwug July 2010 - windows debugging by sainath
Swug July 2010 - windows debugging by sainathDennis Chung
 

Similar to Graphics 32 bit (20)

Al2ed chapter15
Al2ed chapter15Al2ed chapter15
Al2ed chapter15
 
Managing console
Managing consoleManaging console
Managing console
 
Assembly Language Lecture 2
Assembly Language Lecture 2Assembly Language Lecture 2
Assembly Language Lecture 2
 
Please correct my code for me i am lost Thanks i submitted.pdf
Please correct my code for me i am lost Thanks i submitted.pdfPlease correct my code for me i am lost Thanks i submitted.pdf
Please correct my code for me i am lost Thanks i submitted.pdf
 
Home works summary.pptx
Home works summary.pptxHome works summary.pptx
Home works summary.pptx
 
Assembler
AssemblerAssembler
Assembler
 
Lec 47.48 - stream-files
Lec 47.48 - stream-filesLec 47.48 - stream-files
Lec 47.48 - stream-files
 
Introduction to Input/Output Functions in C
Introduction to Input/Output Functions in CIntroduction to Input/Output Functions in C
Introduction to Input/Output Functions in C
 
Basic standard calculator
Basic standard calculatorBasic standard calculator
Basic standard calculator
 
Files 3-handouts lecture-12
Files 3-handouts lecture-12Files 3-handouts lecture-12
Files 3-handouts lecture-12
 
Assembler
AssemblerAssembler
Assembler
 
Part III: Assembly Language
Part III: Assembly LanguagePart III: Assembly Language
Part III: Assembly Language
 
Vintage Computing Festival Midwest 18 2023-09-09 What's In A Terminal.pdf
Vintage Computing Festival Midwest 18 2023-09-09 What's In A Terminal.pdfVintage Computing Festival Midwest 18 2023-09-09 What's In A Terminal.pdf
Vintage Computing Festival Midwest 18 2023-09-09 What's In A Terminal.pdf
 
Password based door locksystem
Password  based door locksystemPassword  based door locksystem
Password based door locksystem
 
04 Console input output-
04 Console input output-04 Console input output-
04 Console input output-
 
OpenGL ES 3.2 Reference Guide
OpenGL ES 3.2 Reference GuideOpenGL ES 3.2 Reference Guide
OpenGL ES 3.2 Reference Guide
 
Assembler (2)
Assembler (2)Assembler (2)
Assembler (2)
 
C++InputOutput.pptx
C++InputOutput.pptxC++InputOutput.pptx
C++InputOutput.pptx
 
Chap 01[1]
Chap 01[1]Chap 01[1]
Chap 01[1]
 
Swug July 2010 - windows debugging by sainath
Swug July 2010 - windows debugging by sainathSwug July 2010 - windows debugging by sainath
Swug July 2010 - windows debugging by sainath
 

Recently uploaded

Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
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
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
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
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
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
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
_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
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 

Recently uploaded (20)

Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
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
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
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
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
_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
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 

Graphics 32 bit

  • 1. Handling Character Display in graphics mode Using 32 bit system call ASJAD ALI (p14-6100)
  • 2. LIST OF TOICS  Write Console  GetStdHandle  GetConsoleCursorInfo  SetConsoleCursorInfo  ConsoleScreenBufferInfo  GetConsoleScreenBufferInfo  SetConsoleScreenBufferSize  SetConsoleTitle  WriteConsoleOutputAttribute
  • 3.  TYPE OF BUFFER:  INPUT BUFFER:  Input Buffer contain queue of inputs record  E.g Mouse Click , Keyboard etc  SECREEN BUFFER:  2D array of Character and color data affecting appearance of text
  • 4.  INVOKE WriteConsole,  eax, ; console output handle  edx, ; string pointer  ecx, ; string length  ADDR bytesWritten,  WriteConsole ( _In_ HANDLE hConsoleOutput, _In_ VOID *lpBuffer, _In_ DWORD nNumberOfCharsToWrite, _Out_ LPDWORD lpNumberOfCharsWritten, );
  • 5.  GetStdHandle  GET the Control of the Screen Buffer INVOKE GetStdHandle, STD_OUTPUT_HANDLE mov outHandle,eax
  • 6.  ;INVOKE GetConsoleCursorInfo, outHandle,  ; ADDR cursorInfo  ;mov eax, cursorInfo.dwSize  typedef struct _CONSOLE_CURSOR_INFO  {  DWORD dwSize;  BOOL bVisible;  }
  • 7.  ;mov cursorInfo.bVisible,1  ;mov cursorInfo.dwSize,100  ;INVOKE SetConsoleCursorInfo, outHandle,  ; ADDR cursorInfo  SetConsoleCursorInfo  (  HANDLE hConsoleOutput,  CONSOLE_CURSOR_INFO *lpConsoleCursorInfo  );
  • 8.  CONSOLE_SCREEN_BUFFER_INFO  {  COORD dwSize; COORD dwCursorPosition; WORD wAttributes; SMALL_RECT srWindow; COORD dwMaximumWindowSize;  }
  • 9.  INVOKE GetConsoleScreenBufferInfo, outHandle,  ADDR consoleInfo  GetConsoleScreenBufferInfo  (  HANDLE hConsoleOutput, (input)  PCONSOLE_SCREEN_BUFFER_INFO *lpConsoleScreenBufferInfo (Output)  );
  • 10.  mov scrSize.x, 80  mov scrSize.y, 25  INVOKE SetConsoleScreenBufferSize,  outHandle,scrSize
  • 12.  INVOKE WriteConsoleOutputAttribute,  outHandle, ADDR attributes,  BufSize, xyPos,  ADDR cellsWritten  WriteConsoleOutputAttribute  (  _In_ HANDLE hConsoleOutput,  _In_ WORD *lpAttribute,  _In_ DWORD nLength,  _In_ COORD dwWriteCoord,  _Out_ LPDWORD lpNumberOfAttrsWritten  );