-
Notifications
You must be signed in to change notification settings - Fork 1
/
stufstub.bas
55 lines (46 loc) · 1.19 KB
/
stufstub.bas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
REM $INCLUDE: 'x86.bi'
'***
' QB.BI - Assembly Support Include File
'
' Copyright <C> 1987 Microsoft Corporation
'
' Purpose:
' This include file defines the types and gives the DECLARE
' statements for the assembly language routines ABSOLUTE,
' INTERRUPT, INTERRUPTX, INT86OLD, and INT86XOLD.
'
'***************************************************************************
'
' Define the type needed for INTERRUPT
'
TYPE RegType
axx AS INTEGER
bxx AS INTEGER
cxx AS INTEGER
dxx AS INTEGER
bpp AS INTEGER
sii AS INTEGER
dii AS INTEGER
flagss AS INTEGER
END TYPE
'
'
' Generate a software interrupt, loading all but the segment registers
'
DECLARE SUB INTERRUPT (intnum AS INTEGER, inreg AS RegType, outreg AS RegType)
'
' Generate a software interrupt, loading all registers
'
'
' Call a routine at an absolute address.
' NOTE: If the routine called takes parameters, then they will have to
SUB STUFF (Z$)
DIM passreg AS RegType
DIM dummyreg AS RegType
LET N = LEN(Z$)
FOR K = 1 TO N
LET passreg.axx = &H500
LET passreg.cxx = ASC(MID$(Z$, K, 1))
CALL INTERRUPT(&H16, passreg, dummyreg)
NEXT
END SUB