home *** CD-ROM | disk | FTP | other *** search
- REM RB.BAS. The code in this program is compatible
- REM with Microsoft QuickBASIC, Microsoft BASIC, or
- REM IBM BASIC. To use it, compile with the /O option
- REM and link with M2.OBJ.
- REM $STATIC
- DIM ARRAY%(3)
-
- REM Get the value on the command line.
-
- A$ = COMMAND$
- ADDR% = VAL(A$)
-
- REM Call install, passing the addresses of the array
- REM and the buffer passed on the command line.
- REM install places the address of the array and the
- REM address of a return instruction into the buffer
- REM and executes a request to DOS to terminate and
- REM stay resident.
-
- CALL INSTALL(ADDR%, ARRAY%(0))
-
- REM Calls to the return instruction eventually wind up
- REM at this point. The array has been defined by the
- REM calling program.
- ARRAY%(0) = ARRAY%(1) + ARRAY%(2)
-
- REM GOBACK, which could be called at any point, any
- REM level, exits the BASIC program to the protected
- REM mode program. Subsequent calls to the BASIC
- REM program will continue to start at the instruction
- REM following the call to INSTALL.
-
- CALL GOBACK
- END
-
-