计算机组成原理与接口技术课件 CHAPTER 5 KEYBOARD AND MOUSE
合集下载
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Dec Hex Bin 4 4 00000100
ORG ; FOUR
INT 21H and INT 10H Programming and Macros
The x86 PC Assembly Language, Design, and Interfacing By Muhammad Ali Mazidi, Janice Gillespie Mazidi and Danny Causey
– Chosen by putting a specific value in register AH.
The x86 PC Assembly Language, Design, and Interfacing By Muhammad Ali Mazidi, Janice Gillespie Mazidi and Danny Causey
© 2010, 2003, 2000, 1998 Pearson Higher Education, Inc. Pearson Prentice Hall - Upper Saddle River, NJ 07458
OBJECTIVES
this chapter enables the student to:
– Saves CS:IP and the flags on the stack and goes to the subroutine associated with that interrupt.
– In x86 processors, 256 interrupts, numbered 00 to FF.
• Use the LOCAL directive to define local variables within macros.
• Use the INCLUDE directive to retrieve macros from other files.
The x86 PC Assembly Language, Design, and Interfacing By Muhammad Ali Mazidi, Janice Gillespie Mazidi and Danny Causey
(cont)
• Use the LABEL directive to set up structured data items.
• Code Assembly language instructions to define and invoke macros.
• Explain how macros are expanded by the assembler.
– Used to communicate with the computer's screen video.
• Manipulation of screen text/graphics can be done via INT 10H.
• Among the functions associated with INT 10H are changing character or background color, clearing the screen, and changing the location of the cursor.
© 2010, 2003, 2000, 1998 Pearson Higher Education, Inc. Pearson Prentice Hall - Upper Saddle River, NJ 07458
4.1: BIOS INT 10H PROGRAMMING
• INT 10H subroutines are burned into the ROM BIOS.
• INT 10H and INT 21H are the most widely used with various functions selected by the value in the AH register.
The x86 PC Assembly Language, Design, and Interfacing By Muhammad Ali Mazidi, Janice Gillespie Mazidi and Danny Causey
© 2010, 2003, 2000, 1998 Pearson Higher Education, Inc. Pearson Prentice Hall - Upper Saddle River, NJ 07458
OBJECTIVES
this chapter enables the student to:
• Use INT 10H function calls to:
– Clear the screen. – Set the cursor position. – Write characters to the screen in text mode. – Draw lines on the screen in graphics mode. 0, 2003, 2000, 1998 Pearson Higher Education, Inc. Pearson Prentice Hall - Upper Saddle River, NJ 07458
4.0: INT 21H and 10H
• The INT instruction is somewhat like a FAR call.
• Use INT 21H function calls to:
– Input characters from the keyboard. – Output characters to the screen. – Input or output strings.
The x86 PC Assembly Language, Design, and Interfacing By Muhammad Ali Mazidi, Janice Gillespie Mazidi and Danny Causey
ORG ; FOUR
INT 21H and INT 10H Programming and Macros
The x86 PC Assembly Language, Design, and Interfacing By Muhammad Ali Mazidi, Janice Gillespie Mazidi and Danny Causey
– Chosen by putting a specific value in register AH.
The x86 PC Assembly Language, Design, and Interfacing By Muhammad Ali Mazidi, Janice Gillespie Mazidi and Danny Causey
© 2010, 2003, 2000, 1998 Pearson Higher Education, Inc. Pearson Prentice Hall - Upper Saddle River, NJ 07458
OBJECTIVES
this chapter enables the student to:
– Saves CS:IP and the flags on the stack and goes to the subroutine associated with that interrupt.
– In x86 processors, 256 interrupts, numbered 00 to FF.
• Use the LOCAL directive to define local variables within macros.
• Use the INCLUDE directive to retrieve macros from other files.
The x86 PC Assembly Language, Design, and Interfacing By Muhammad Ali Mazidi, Janice Gillespie Mazidi and Danny Causey
(cont)
• Use the LABEL directive to set up structured data items.
• Code Assembly language instructions to define and invoke macros.
• Explain how macros are expanded by the assembler.
– Used to communicate with the computer's screen video.
• Manipulation of screen text/graphics can be done via INT 10H.
• Among the functions associated with INT 10H are changing character or background color, clearing the screen, and changing the location of the cursor.
© 2010, 2003, 2000, 1998 Pearson Higher Education, Inc. Pearson Prentice Hall - Upper Saddle River, NJ 07458
4.1: BIOS INT 10H PROGRAMMING
• INT 10H subroutines are burned into the ROM BIOS.
• INT 10H and INT 21H are the most widely used with various functions selected by the value in the AH register.
The x86 PC Assembly Language, Design, and Interfacing By Muhammad Ali Mazidi, Janice Gillespie Mazidi and Danny Causey
© 2010, 2003, 2000, 1998 Pearson Higher Education, Inc. Pearson Prentice Hall - Upper Saddle River, NJ 07458
OBJECTIVES
this chapter enables the student to:
• Use INT 10H function calls to:
– Clear the screen. – Set the cursor position. – Write characters to the screen in text mode. – Draw lines on the screen in graphics mode. 0, 2003, 2000, 1998 Pearson Higher Education, Inc. Pearson Prentice Hall - Upper Saddle River, NJ 07458
4.0: INT 21H and 10H
• The INT instruction is somewhat like a FAR call.
• Use INT 21H function calls to:
– Input characters from the keyboard. – Output characters to the screen. – Input or output strings.
The x86 PC Assembly Language, Design, and Interfacing By Muhammad Ali Mazidi, Janice Gillespie Mazidi and Danny Causey