SET 19 PROGRAMMING THE MOUSE. Mouse Features All mouse operations within a program are performed by standard INT 33H functions of the form: MOV AX, function.

Slides:



Advertisements
Similar presentations
Computer Programming Spring-2007
Advertisements

DOS and BIOS Interrupts DOS and BIOS interrupts are used to perform some very useful functions, such as displaying data to the monitor, reading data from.
There are two types of addressing schemes:
University of Tehran 1 Microprocessor System Design Interrupt Omid Fatemi
ICS312 Set 6 Operands. Basic Operand Types (1) Register Operands. An operand that refers to a register. MOV AX, BX ; moves contents of register BX to.
Mouse handling Suthida Chaichomchuen
Video systems (continue). Practice Modify the program to get a string from a keyboard to display the input string on the middle of the screen with reverse.
Assembly Language for Intel-Based Computers Chapter 15: BIOS-Level Programming (c) Pearson Education, All rights reserved. You may modify and.
8.7 Memory management Program E Program D System memory DOS INT 21, function 48H: Allocate Memory Specification: allocates a number of memory paragraphs.
Flow Control Instructions
Kip Irvine: Assembly Language for Intel-Based Computers
Equivalent Fractions Equivalent Fractions Using Cross-Multiplication.
Program.-(4)* Write a program for input two integer number with message and display their sum. Algorithm steps Algorithm steps 1.Display message for input.
ORG ; FOUR INT 21H and INT 10H Programming and Macros Dec Hex Bin
CEN 226: Computer Organization & Assembly Language :CSC 225 (Lec#7)
Electrical Engineering Department Engineering College Prince Sattam bin Abdul Aziz University Text Book: - Triebel and Singh, "The 8088 and 8086 Microprocessors",
The x86 PC Assembly Language, Design, and Interfacing By Muhammad Ali Mazidi, Janice Gillespie Mazidi and Danny Causey © 2010, 2003, 2000, 1998 Pearson.
BIOS and DOS Programming in DOS INT 10 and 21H. Interrupts There are some extremely useful subroutines within BIOS or DOS that are available to the user.
GRAPHICS AND MOUSE PROGRAMMING IN C. Turbo C has a good collection of graphics libraries. If you know the basics of C, you can easily learn graphics programming.
1 Screen and Keyboard Operations Suthida Chaichomchuen
© 2010 South-Western / Cengage Learning Century 21 Keyboarding  Cycle 1  Office Features 1.
Lab 8 Bit-Mapped Graphics Moving from text-based graphics to bit- mapped graphics. Easy to draw graphic points and lines using INT 10h, Function 0Ch (write.
Lecture 10: BIOS and DOS Programming
Mouse Question #1 Which INT number is used for the mouse?
Computer Architecture and Operating Systems CS 3230 :Assembly Section Lecture 4 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
File I/O MS-DOS Interrupt 21h has many functions dealing with file and directory I/O services. Both MS-DOS and MS_Windows use 16- bit integers called HANDLES.
CEN 226: Computer Organization & Assembly Language :CSC 225 (Lec#9) By Dr. Syed Noman.
Video systems. Lesson plan Review the code for the previous exercise Video systems Review for midterm exam.
The PC Game Adapter. The game adapter card typically contains a DB15 connector into which you plug an external device. The digital joystick is probably.
10H Interrupt. Option 0H – Sets video mode. Registers used: – AH = 0H – AL = Video Mode. 3H - CGA Color text of 80X25 7H - Monochrome text of 80X25 Ex:
String Instructions String instructions were designed to operate on large data structures. The SI and DI registers are used as pointers to the data structures.
Chapter 3 Device Monitor Screen Otasuke GP-EX! Chapter 3 Device Monitor Screen Chapter 3 Device Monitor Screen.
In this activity, we are going to type a simple Chinese sentence with Microsoft Word by Tsang-jei Input Method and Simplified Tsang-jei Input Method. 1Start.
ENEE 440 Chapter PPI 8255 Register Select -CS A1 A0 REGISTER R/W PORT A R/W PORT B R/W PORT C R/W CR W 1 X X8255 NOT.
In Class Program Write, assemble and test a program: –Use the DB directive to define the following list of numbers and name it array: 31h, 32h, 33h, 34h.
Khaled A. Al-Utaibi  I/O Ports  I/O Space VS Memory Space  80x86 I/O Instructions − Direct I/O Instructions − Indirect I/O Instructions.
ROM BIOS Chapter 9. The ROM BIOS PC computer come with a set od built in routines collectively called the ROM BIOS. These routines are permanent part.
COMP 1321 Digital Infrastructure Richard Henson University of Worcester October 2012.
Microprocessor Fundamentals Week 2 Mount Druitt College of TAFE Dept. Electrical Engineering 2008.
Internal Programming Architecture or Model
Lecture 11 Text mode video
Direct-Access Color Graphics Chapter 11. Graphics modes C++ provides a different combination of graphics characteristics. These characteristics include.
Computer and Information Sciences College / Computer Science Department CS 206 D Computer Organization and Assembly Language.
File Operations. FILE PROCESSING For the purposes of the following discussion, reading means copying all or part of an existing file into memory Writing.
Splash Screen. Then/Now You wrote equations of lines using information about their graphs. Write the equation of a circle. Graph a circle on the coordinate.
Then/Now You wrote equations of lines using information about their graphs. Write the equation of a circle. Graph a circle on the coordinate plane.
Practical Session 3 Computer Architecture and Assembly Language.
Computer Architecture and Assembly Language
Mouse Programming With “C” or “C++”
COMP 1321 Digital Infrastructure
Presentation on Real Mode Memory Addressing
Locate Points on a Coordinate Plane
Calculator in assembly language
9/17/2018 Kiến Trúc Máy Tính.
Microprocessor and Assembly Language
EV3 On Brick Programming
Arithmetic Instructions
Symbolic Instruction and Addressing
Introduction to Functions
The horizontal number line is called the ______. x-axis
BIC 10503: COMPUTER ARCHITECTURE
8086 Registers Module M14.2 Sections 9.2, 10.1.
CS-401 Computer Architecture & Assembly Language Programming
Morgan Kaufmann Publishers Computer Organization and Assembly Language
Symbolic Instruction and Addressing
Practical Session 4.
The Microprocessor & Its Architecture
Symbolic Instruction and Addressing
Chapter 6 –Symbolic Instruction and Addressing
CS-401 Computer Architecture and Assembly Language Programming
Presentation transcript:

SET 19 PROGRAMMING THE MOUSE

Mouse Features All mouse operations within a program are performed by standard INT 33H functions of the form: MOV AX, function ; request mouse function... ; set arguments, if any INT 33h ; call mouse driver Note that INT 33h functions are loaded in the full AX register (not just AH).

00h: Initialize the mouse The First mouse function used in a program to initialize the mouse. Input: AX = 0

00h: Initialize the mouse (Cont.) Operations performed by mouse initialization: Sets mouse pointer to center screen Conceals mouse pointer, if visible Sets mouse pointer according to screen mode (text or graphics)

01h: Display Mouse Pointer Input: AX = 01h Output: none This function causes the mouse pointer to be displayed. The mouse driver uses a counter to determine whether or not to display the mouse.

01h: display the mouse (Cont.) If counter >= 0 display the mouse Otherwise, do not display the mouse When the mouse is initialized, the counter is set to -1. Function 01h increments the counter (making it zero) to display the mouse.

02h: Conceal Mouse Pointer Used to conceal the mouse pointer. Decrements the counter (making it - 1). Input: AX = 02h Output: none Do not use fn. 1 to display the mouse when it is already displayed or fn. 2 to conceal the mouse when it already concealed. Otherwise if, for instance, you employ fn. 2 three times to conceal the mouse, then you will have to use fn. 1 three times to display it Ued to conceal the mouse pointer. Decrements the counter (making it -1). Input: AX = 02h Output: noneUed to conceal the mouse pointer. Decrements the counter (making it -1). Input: AX = 02h Output: none

03h: Get Button Status and Pointer Location Gets current button status and pointer location. Input: AX = 03h Output: BX = Button status bit 0 = left button (0 = up, 1 = down) bit 1 = right button (0 = up, 1 = down) CX = horizontal position * 2 (x coordinate*2) DX = vertical position (y coordinate) Note: For some reason CX supplies twice times the X coord.

04h: Set Pointer Location Use this operation to set the horizontal and vertical coordinates for the mouse pointer on the screen (the values for the location are in terms of pixels). Input: AX = 04h CX = horizontal location*2 (Note again, double the X coord) DX = vertical location

Textbook Reading (Jones): None