Compiled BASIC Parameter Passing to MASM
ID Number:  Q10294

3.x-5.x
MS-DOS
enduser | 

Question:
   How does a compiled BASIC program link to routines in Assembler? 

Response:
   In compiled BASIC, programs do not "link" to the assembler routines
as do other high-level languages such as Pascal or C. Typically, the
assembler routine is written, which creates an OBJ file; then, it is
linked to produce a relocatable EXE file. 
   BASIC does not handle EXE type files; it prefers files that can be
loaded in a fixed location in memory. These files are sometimes called
"binary files." To save this type of file, use the BSAVE command,
which needs the following information: 

   1. The segment address of the file
   2. The name of the file with a .BIN extension (This is not
required; do this only if you wish to show that this is a binary file.) 
   3. The offset address of the file
   4. The length of the file in bytes

   This information can be used with the BLOAD command to load the
assembly routine from the BASIC program. 
