Solved

Peek & Poke?

Posted on 1997-06-10
2
831 Views
Last Modified: 2012-05-04
I am useing Turbo C/C++ and I have a few questions for you
experts out there....

I am sort of new at programming in C, I know all the basics
I just cant figure out how to access Interrupts. I am a little lost, I have been useing Peek and Poke commands for the accessing but I am still lost.  I am using helpPC for the interupt list and thats fine but when it says, for example:  INT 33,0 for the mouse, does that mean that I peek 0x33, 0x00? And what exactly in AX & BX? I get all of the other stuff like what it will return and such... I know I must sound like a moron to most of you guys but help would be greatly appreciated. Sorry about the typos but I am in a rush... Thanks...
0
Comment
Question by:Garrett061097
2 Comments
 
LVL 4

Accepted Solution

by:
emmons earned 120 total points
ID: 1251255
Since you used the mouse as your example, let's go with it.
The mouse information is obtained by various mouse function calls. When using the mouse interrupt (0x33), the mouse function call number is passed to the mouse driver in AX, and other information that the driver may need is passed in BX, CX, and/or DX.
AX          Function
----           -------------
0    Mouse reset and status
1    Show mouse cursor
2    Hide mouse cursor
3    Get cursor position and button status
4    Set cursor position
7    Set Horizontal Minimum/Maximum
8    Set Vertical Minimum/Maximum

So, if you wanted to execute function INT 33,0 (which would be a mouse reset) you would set AX=0, and then call the interrupt driver.
0
 

Author Comment

by:Garrett061097
ID: 1251256
Ohhh.... Ok... Thank you for that clarification.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now