mirror of
https://github.com/QB64Official/qb64.git
synced 2024-08-31 13:30:15 +00:00
49 lines
No EOL
1.9 KiB
Text
49 lines
No EOL
1.9 KiB
Text
The [[INTERRUPT]] 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}}
|
|
: [[CALL]] [[INTERRUPT]]({{Parameter|intNum}}, {{Parameter|inRegs}}, {{Parameter|outRegs}})
|
|
|
|
|
|
{{Parameters}}
|
|
* 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.
|
|
* {{Parameter|inRegs}} are the values placed into the call and {{Parameter|outRegs}} are the register return values.
|
|
|
|
|
|
==QBasic/QuickBASIC==
|
|
* Available in 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 an external library.
|
|
* {{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
|
|
* INTERRUPT can use all of the below TYPE elements when they are required.
|
|
{{TextStart}} '' ''
|
|
{{Cb|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
|
|
{{Cb|END TYPE}} '' ''
|
|
{{TextEnd}}
|
|
{{CodeStart}}
|
|
{{Cl|DIM}} {{Cl|SHARED}} inregs {{Cl|AS}} RegTypeX, outregs {{Cl|AS}} RegTypeX
|
|
{{CodeEnd}}
|
|
: QBasic's ''RegType.BI'' $INCLUDE file can be used by INTERRUPT or [[INTERRUPTX]]
|
|
|
|
|
|
{{PageSeeAlso}}
|
|
* [[$INCLUDE|$INCLUDE:]]
|
|
* [[QB.BI]], [[CALL ABSOLUTE]]
|
|
* [[INTERRUPTX]]
|
|
* Ethan Winer's free QBasic Book and Programs: [http://www.ethanwiner.com/fullmoon.html WINER.ZIP]
|
|
|
|
|
|
{{PageNavigation}} |