×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

INTERRUPT, INTERRUPTX, CALL ABSOLUTE

INTERRUPT, INTERRUPTX, CALL ABSOLUTE

INTERRUPT, INTERRUPTX, CALL ABSOLUTE

(OP)
can someone give me some examples on or tell me how these functions work and how to use them plz?

RE: INTERRUPT, INTERRUPTX, CALL ABSOLUTE

Call absolute works with assembly programming. There are some examples around at some QB sites.

You basically have to enter the assembly codes (hex values)
into an array then call absolute pointing to the first
array item.

Interrupt and interruptx call the MS-dos interrupts.
They can be used for all kinds of things.
You can set the AX,BX,CX registers using the type definitions in the qb.bi file (or qbx.bi for pds).
The AX register usually controls what sub-set of the interrupt is used. For example interrupt 20H has lots of
things it does, many for the screen. The different processes are accessed by what is in the AH/AL or AX registers.

There is a list of interrupts and what they do on my site.

http://www.gbronline.com/oasys1/index.htm

RE: INTERRUPT, INTERRUPTX, CALL ABSOLUTE

Call Absolute calls a function via an absolute address in memory...

You usually use a string, insert machine code characters into it and the use Varseg so send the absolute address of the string to Call Absolute to  run the opcodes at that address in memory...

Confused Yet?

Basically each Assembly command has an OpCode (Operation Code) associated with it...

Take this Assembly Code for Example:
mov AX, 1
int 33
Retf


Is the same as this in Hex Machine code...
B80100
CD33
CB


Expanation...
mov AX : B8
1 : 0001 ... 00 01 ... 01 00 ... 0100 (low byte:high byte)
int : CD
33 : 33 (same since it is only 1 byte)
retf : CB

Then you put it into a string...
M$ = CHR$(&HB8)
M$ = M$ + CHR$(&H01)
M$ = M$ + CHR$(&H00)
M$ = M$ + CHR$(&HCD)
M$ = M$ + CHR$(&H33)
M$ = M$ + CHR$(&HCB)


DEF SEG = VARSEG(M$)
CALL ABSOLUTE (SADD(M$))

------------------------------

Now the above code can also be done with
Call interupt...

Such as...
AX = &H33
Call interupt(AX, BX, CX, DX)


Vic wrote some VERY good tutorials on this...
http://members.aol.com/radiohands/tutors.html

See this tutorial for more information:
http://members.aol.com/radiohands/tutors/tutor13.txt

Have Fun, Be Young... Code BASIC
-Josh

http://cubee.topcities.com

PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.

RE: INTERRUPT, INTERRUPTX, CALL ABSOLUTE

(OP)
thx cubeE101. Buff the interrupts list download didn't work and so did most other file downloads, but awsome tip page.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close