SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
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
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
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
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
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
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 

Kürzlich hochgeladen (20)

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
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
 
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
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).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
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
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
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 

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  );