Dec 222017
Pass information between 2 QuickBASIC modules.
File LINKBAS.ZIP from The Programmer’s Corner in
Category BASIC Language
Pass information between 2 QuickBASIC modules.
File Name File Size Zip Size Zip Type
PROG1.BAS 64 64 stored
PROG2.BAS 30 30 stored
SETCMD.ASM 577 313 deflated
SETCMD.DOC 1359 727 deflated
SETCMD.OBJ 157 153 deflated
TPCREAD.ME 199 165 deflated
XVAL.BAS 252 139 deflated
XVAL.DOC 998 552 deflated

Download File LINKBAS.ZIP Here

Contents of the SETCMD.DOC file

Title: "Fancy Passing"
Reference: PC World September 1990
Author: Bob Manookian

When QuickBASIC programs become too large for a single code file, a
solution is to divide the code among separate modules. This often
means you'll need to pass data between the individual programs that
made up your application. But if you use the BASIC compiler's /o option
to generate stand-alone EXE files, you can't use COMMON variables for
this purpose.

An assembly language routine, SETCMD.ASM saves the day. CALLing
SetCmd before a RUN statement copies a string argument into the tail
end of the command line, passing the string to another program. That
data might contain variables, ASCII text, or the name of a data file
for the called program to read. SETCMD.OBJ is ready to use, but if you
have the Microsoft Macro Assembler 5.1, you can assemble SETCMD.ASM
using the command masm setcmd;.

PROG1.BAS and PROG2.BAS demonstrate how to use SETCMD. With the
QuickBASIC compiler and linker on the current path, enter the
commands bc /o prog1; and link prog1+setcmd;. Then type bc /o prog2;
and link prog2;. Run the test program by entering prog1 arg1. After
PROG1 displays `Prog1:Arg1', it calls PROG2, which displays the
argument passed to SetCmd.>

 December 22, 2017  Add comments

Leave a Reply