Difference between revisions of "INTERRUPTX"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
m
imported>SMcNeill
(-)
Line 1: Line 1:
The '''INTERRUPTX''' statement is an assembly routine for accessing computer information registers.
+
The [[INTERRUPTX]] statement is an assembly routine for accessing computer information registers.
  
 +
 +
==Legacy support==
 +
* Registers are emulated in '''QB64''' to allow older programs to be compiled. To enable mouse input in your programs, the recommended practice is to use [[_MOUSEINPUT]] and related functions.
  
  
 
{{PageSyntax}}
 
{{PageSyntax}}
:: '''[[CALL]] INTERRUPTX('''intnum, inregs, outregs''')'''
+
: [[CALL]] [[INTERRUPTX]]({{Parameter|intNum}}, {{Parameter|inRegs}}, {{Parameter|outRegs}})
  
  
 
{{Parameters}}
 
{{Parameters}}
* '''Register 33 is emulated in QB64; no support for ''intnum'' 33h mouse functions above 3 or INT requests other than 33'''
+
* Registers are emulated in QB64 and there is no support for {{Parameter|intNum}} 33h mouse functions above 3 or {{Parameter|intNum}} requests other than 33.
* ''Inregs'' are the values placed into the call and ''outregs'' are the register return values.
+
* {{Parameter|inRegs}} are the values placed into the call and {{Parameter|outRegs}} are the register return values.
  
  
''QuickBasic:''
+
==QBasic/QuickBASIC==
*Available on QuickBasic versions 4 up, it requires the library to be loaded. Command line: QB.EXE /L in QB4.5 .
+
* Available on QuickBasic versions 4 and up and required an external library to be loaded. <!-- Command line: QB.EXE /L in QB4.5 --> '''QB64''' emulates the statement without external an library.
* ''Interrupt number'' is the interrupt reference vector table address. See: [http://www.ctyme.com/intr/cat.htm Ralf Brown's Interrupt List]
+
* {{Parameter|intNum}} is the interrupt reference vector table address. For historic reference, see: [http://www.ctyme.com/intr/cat.htm Ralf Brown's Interrupt List]
 
* The [[TYPE]] definition below will work for both [[INTERRUPT]] and INTERRUPTX statement calls
 
* The [[TYPE]] definition below will work for both [[INTERRUPT]] and INTERRUPTX statement calls
 
+
* INTERRUPT can use all of the below TYPE elements when they are required.
 
 
* INTERRUPTX can use all of the below TYPE values when they are required.
 
 
{{TextStart}} '' ''
 
{{TextStart}} '' ''
 
{{Cb|TYPE}} RegTypeX
 
{{Cb|TYPE}} RegTypeX
Line 31: Line 32:
 
   ds AS INTEGER
 
   ds AS INTEGER
 
   es AS INTEGER
 
   es AS INTEGER
{{Cb|END TYPE}}
+
{{Cb|END TYPE}} '' ''
 
{{TextEnd}}
 
{{TextEnd}}
{{CodeStart}} '' ''
+
{{CodeStart}}
{{Cl|REM}} {{Cl|$INCLUDE}}: 'RegType.BI'  'Use only with the RegType or {{Cl|QB.BI}} files
+
{{Cl|DIM}} {{Cl|SHARED}} inregs {{Cl|AS}} RegTypeX, outregs {{Cl|AS}} RegTypeX
 
 
{{Cl|DIM}} {{Cl|SHARED}} inregs {{Cl|AS}} RegTypeX, outregs AS RegTypeX
 
 
{{CodeEnd}}
 
{{CodeEnd}}
* Qbasic's ''RegType.BI'' [[$INCLUDE]] file can be used by [[INTERRUPT]] or INTERRUPTX
+
: QBasic's ''RegType.BI'' $INCLUDE file can be used by INTERRUPT or [[INTERRUPTX]]
  
  
''See also:''
+
{{PageSeeAlso}}
* [[$INCLUDE|$INCLUDE:]]  
+
* [[$INCLUDE|$INCLUDE:]]
* [[QB.BI]], [[CALL ABSOLUTE]]  
+
* [[QB.BI]], [[CALL ABSOLUTE]]
 
* [[INTERRUPT]]
 
* [[INTERRUPT]]
 
+
* Ethan Winer's free QBasic Book and Programs: [http://www.ethanwiner.com/fullmoon.html WINER.ZIP]
 
 
''Download Ethan Winer's FREE Qbasic Book and Programs:'' [http://www.ethanwiner.com/fullmoon.html WINER.ZIP]
 
  
  
 
{{PageNavigation}}
 
{{PageNavigation}}

Revision as of 23:07, 20 September 2017

The INTERRUPTX statement is an assembly routine for accessing computer information registers.


Legacy support

  • Registers are emulated in QB64 to allow older programs to be compiled. To enable mouse input in your programs, the recommended practice is to use _MOUSEINPUT and related functions.


Syntax

CALL INTERRUPTX(intNum, inRegs, outRegs)


Parameters

  • Registers are emulated in QB64 and there is no support for intNum 33h mouse functions above 3 or intNum requests other than 33.
  • inRegs are the values placed into the call and outRegs are the register return values.


QBasic/QuickBASIC

  • Available on QuickBasic versions 4 and up and required an external library to be loaded. QB64 emulates the statement without external an library.
  • intNum is the interrupt reference vector table address. For historic reference, see: Ralf Brown's Interrupt List
  • The TYPE definition below will work for both INTERRUPT and INTERRUPTX statement calls
  • INTERRUPT can use all of the below TYPE elements when they are required.

TYPE RegTypeX ax AS INTEGER bx AS INTEGER cx AS INTEGER dx AS INTEGER bp AS INTEGER si AS INTEGER di AS INTEGER flags AS INTEGER ds AS INTEGER es AS INTEGER END TYPE

DIM SHARED inregs AS RegTypeX, outregs AS RegTypeX

QBasic's RegType.BI $INCLUDE file can be used by INTERRUPT or INTERRUPTX


See also



Navigation:
Keyword Reference - Alphabetical
Keyword Reference - By Usage
Main Wiki Page