This preview shows page 1-2-3-18-19-36-37-38 out of 38 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 38 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 38 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 38 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 38 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 38 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 38 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 38 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 38 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 38 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Mouse Question #1Mouse Question#1Question #1ASlide 4Question #2Need to find out…Resetting Mouse ReturnsQuestion #2 SolutionsComments about resetting mouseQuestion #3Question #3 SolutionsQuestion #4Slide 13Comments about mouse pointerQuestion #5Slide 16Question #6Before Answering, Need to Know…..Question #6 SolutionsQuestion #7Slide 21Question #8Before Answering Need to know…Slide 24Question #9Slide 26Question #10Before Answering, Need to know …Question #10 SolutionsComments about Button PressQuestion #11Slide 32Question #12Slide 34Question #13Slide 36Question #14Slide 38Mouse Question #1•Which INT number is used for the mouse?Mouse Question#1•Which INT number is used for the mouse?33hQuestion #1A•Unlike DOS INT 21h, or BIOS INT10h, with the mouse BIOS functions, the function number is selected through the _________ register.Question #1A•Unlike DOS INT 21h, or BIOS INT10h, with the mouse BIOS functions, the function number is selected through the ____AL_____ register.Question #2•Write ASM statements that reset the mouse and get the mouse status.Need to find out…•Which INT 33h function handles resetting the mouse and getting the status?–Look at slides –Look in book – page 566-574Resetting Mouse Returns•If mouse is found,–AX = FFFFh–BX = number of mouse buttons•If no mouse found,–AX = 0Question #2 SolutionsWrite ASM statements that reset the mouse and get the mouse status.•Mov ax, 0 ;int 33h, function 0•Int 33h ;status returned in ax•Cmp ax, 0 ;if ax=0, mouse not availableComments about resetting mouse•If mouse is found: –It is centered on the screen–It’s display page is set to video page 0–It’s pointer is hidden–It’s mickey’s are set to pixels ratio–It’s speed is set to default values–It’s range of movement is set to the entire screen area.Question #3•Which INT 33h function shows and hides the mouse pointer?Question #3 Solutions•Which INT 33h function shows and hides the mouse pointer?Function 1 – show Function 2 - hideQuestion #4•Write ASM statements that hide the mouse pointer.Question #4•Write ASM statements that hide the mouse pointer.Mov ax, 2Int 33hComments about mouse pointer•Mouse driver keeps a counter –Incremented (if nonzero) by calls to function 1–Decremented by calls to function 2•When counter is 0, pointer is displayed•Function 0 (reset mouse pointer) sets counter to –1.Question #5•Which INT 33h function gets the mouse position and status?Question #5•Which INT 33h function gets the mouse position and status?Function 3Question #6•Write ASM statements that get the mouse position and store it in the variables mouseX and mouseY.Before Answering,Need to Know…..•What is returned•BX = mouse button status•If bit 0 is set, left button is down•If bit 1 is set, right button is down•If bit 2 is set, middle button is down•CX = X-Coordinate•DX = Y-CoordinateQuestion #6 Solutions•Write ASM statements that get the mouse position and store it in the variables mouseX and m ouseY.mov ax, 3int 33hmov mouseX, CXmov mouseY, DXQuestion #7•Which INT 33h function sets the mouse position?Question #7•Which INT 33h function sets the mouse position?Function 4Question #8•Write ASM statements that set the mouse pointer to X=100 and Y = 400.Before Answering Need to know…What to send…•CX = X-Coordinate•DX = Y-CoordinateQuestion #8•Write ASM statements that set the mouse pointer to X=100 and Y = 400.Mov ax, 4mov cx, 100mov dx, 400int 33hQuestion #9•Which INT 33h function gets the mouse button press information?Question #9•Which INT 33h function gets the mouse button press information?Function 5Question #10•Write ASM statements that jump to label Button1 when the left mouse button has been pressed.Before Answering,Need to know …•What to send…•BX = Button ID (0=left, 1=right, 2=center)•What is returned….•AX = button status•BX = button press counter•CX = X-coordinate of last button press•DX = Y-coordinate of last button pressQuestion #10 Solutions•Write ASM statements that jump to label Button1 when the left mouse button has been pressed.mov ax, 5mov bx, 0int 33htst ax, 0jz Button1Comments about Button Press•In an event-driven programming environment, a drag event always begins with a button press.•Once a call is made to this function for a particular button, the button’s state is reset, and a second call to the function returns nothing.Question #11•Which INT 33h function gets button release information?Question #11•Which INT 33h function gets button release information?Function 6Question #12•Write ASM statements that get the mouse position at the point when the right button was released, and store the position in the variables mouseX and mouseY.Question #12•Write ASM statements that get the mouse position at the point when the right button was released, and store the position in the variables mouseX and mouseY.mov ax, 6mov bx, 1int 33hmov mouseX, CXmov mouseY, DXQuestion #13•Write ASM statements that set the vertical limits of the mosue to 200 and 400.Question #13•Write ASM statements that set the vertical limits of the mouse to 200 and 400.mov ax, 8mov CX, 200mov DX, 400int 33hQuestion #14•Write ASM statements that set the horizontal limits of the mouse to 300 and 600.Question #14•Write ASM statements that set the horizontal limits of the mouse to 300 and 600.mov ax, 7mov cx, 300mov dx, 400int


View Full Document

MSU ECE 3724 - Mouse Questions

Documents in this Course
Timers

Timers

38 pages

TEST 4

TEST 4

9 pages

Flags

Flags

6 pages

Timers

Timers

6 pages

Timers

Timers

54 pages

TEST2

TEST2

8 pages

Load more
Download Mouse Questions
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Mouse Questions and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Mouse Questions 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?