$TITLE('BasGen V051BM01 === 012986')

NAME BasGen

MODULE_DATA     SEGMENT WORD PUBLIC 'DATA'
VERSION_MODULE  DB      '051B01'
MODULE_DATA     ENDS

;******************************* MODULE HEADER *******************************;
;*									     *;
;*									     *;
;* MACHINE: B20		LANGUAGE: ASSEMBLER  OS: BTOS			     *;
;*									     *;
;* DESCRIPTION:								     *;
;*									     *;
;*      BasGen interfaces with  nonBasic procedures.                        *;
;*      BasGen.asm also defines the following configuration                  *;
;*      parameters:                                                          *;
;*	           wMaxFiles, wMaxRecLen, sSamBuffer.                        *;
;*									     *;
;*									     *;
;* HISTORY:								     *;
;*									     *;
;* 012986 051B01 T.Robertson  DESCRIPTION				     *;
;*	    Removed interpretercompiler prompt (fINTERP  added 071885), *;
;*	    and all conditional assembly directives differentiating between  *;
;*	    the compiler and the interpreter.				     *;
;*									     *;
;* 012286 051A01 M Chen  DESCRIPTION				     *;
;*	  SSAMBUFFER Modified to reuse sSamBuffer.			     *;
;*									     *;
;* 073185 050B02 J MARTINEZ  DESCRIPTION                                 *;
;*         RGPARAMSETELTNEXT table entry was changed from 6 to 4 bytes.      *;
;*									     *;
;* 071885 050B01 B Rizzi  DESCRIPTION				     *;
;*		Modified for use with new BASIC interpreter :		     *;
;*			1) Initial interpreter question, fINTERP	     *;
;*			2) No special includes if building for interpreter   *;
;*			3) No InitBasic extern declaration		     *;
;*			4) No longer using sSamBuffer			     *;
;*			5) Added new Graphics calls.			     *;
;*									     *;
;* 022085 040A01 J Martinez   DESCRIPTION				     *;
;*	       Added distinct macro variable, fBTOSprm,                    *;
;*             to avoid interaction between selecting Process management     *;
;*             and selecting Parameter management      			     *;
;*									     *;
;*									     *;
;* TITLE:  B20 SYSTEM SOFTWARE						     *;
;*									     *;
;*			PROPRIETARY PROGRAM MATERIAL			     *;
;*									     *;
;* THIS MATERIAL IS PROPRIETARY TO BURROUGHS CORPORATION AND IS NOT TO BE    *;
;* REPRODUCED, USED OR DISCLOSED EXCEPT IN ACCORDANCE WITH PROGRAM LICENSE   *;
;* OR UPON WRITTEN AUTHORIZATION OF THE PATENT DIVISION OF BURROUGHS	     *;
;* CORPORATION, DETROIT, MICHIGAN 48232, USA.				     *;
;*									     *;
;* COPYRIGHT (C) 1980 CONVERGENT TECHNOLOGIES, INC. ALL RIGHTS RESERVED      *;
;* COPYRIGHT (C) 1985 BURROUGHS CORPORATION		                     *;
;* ************************************************************************* *;
;*									     *;
;* BURROUGHS BELIEVES THAT THE SOFTWARE FURNISHED HEREWITH IS ACCURATE AND   *;
;* RELIABLE, AND MUCH CARE HAS BEEN TAKEN IN ITS PREPARATION.  HOWEVER,      *;
;* NO RESPONSIBILITY, FINANCIAL OR OTHERWISE, CAN BE ACCEPTED FOR ANY        *;
;* CONSEQUENCES ARISING OUT OF THE USE OF THIS MATERIAL, INCLUDING LOSS OF   *;
;* PROFIT, INDIRECT, SPECIAL, OR CONSEQUENTIAL DAMAGES, THERE ARE NO         *;
;* WARRANTIES WHICH EXTEND BEYOND THE PROGRAM SPECIFICATION.		     *;
;*									     *;
;* THE CUSTOMER SHOULD EXERCISE CARE TO ASSURE THAT USE OF THE SOFTWARE      *;
;* WILL BE IN FULL COMPLIANCE WITH LAWS, RULES AND REGULATIONS OF THE        *;
;* JURISDICTIONS WITH RESPECT TO WHICH IT IS USED.			     *;
;*									     *;
;*									     *;
;*************************** END OF MODULE HEADER ****************************;
$save nogen
'
' File:    BasGen.asm                                                        
' Version: 5.1                                                               
' Revised: 061284 by EFW                                                   
'          010585 by RLWJHM: Added distinct macro variable, fBTOSprm,   
'             to avoid interaction between selecting Process management      
'             and selecting Parameter management ( both were assigned        
'             fBTOSpm ).  Makes basic built with default parameters        
'             compatible with EASY software by including Parameter           
'             management calls.                                              
'                                                                            
'                                                                            
' Copyright (c) 1980,1981,1982,1983,1984 by Convergent Technologies          
'                                                                            
'      This version of BasGen.asm can be used for both the BASIC             
'      Interpreter and the BASIC Compiler.  Note that it serves different    
'      functions depending on whether it is being used with the Interpreter  
'      or Compiler as follows:                                               
'                                                                            
' Function                                                                   
'                                                                            
'     Compiled BASIC                                                         
'                                                                            
'     In compiled BASIC, BasGen.asm only defines the procedural interface    
'     for nonBASIC procedures.  The configuration parameters                
'     (e.g. wMaxfiles and sSamBuffer) have no effect. To change these    
'     parameters you must edit BrCnfg.asm, (see the BASIC Compiler Manual    
'     for details).    To access a nonBASIC procedure, first                
'     assemble BasGen.asm to produce BasGen.obj.  Next, compile the          
'     BASIC program and enter BasGen.obj in the  [BasGen file] field of      
'     the Basic Compile command form.  See Appendix B of the BASIC           
'     Compiler Manual for more details.                                      
'                                                                            
'     Interpreted BASIC                                                      
'                                                                            
'     In interpreted BASIC, BasGen.asm defines the procedural interface      
'     of nonBASIC procedures and the required segment ordering of           
'     Basic.run.  BasGen.asm also defines the following configuration        
'     parameters:                                                            
'                                                                            
'      wMaxFiles   Declared in the CONST segment.  Use this variable to     
'      configure the default value for the number of sequential files that   
'      a Basic program can open concurrently.                                
'                                                                            
'      wMaxRecLen   Declared in the CONST segment.  Use this variable to    
'      configure the default value for the maximum record size of a random   
'      file.                                                                 
'                                                                            
'      sSamBuffer   No longer used.					      
'                                                                            
'     See Appendix E of the Basic Manual for more details on using           
'     BasGen.asm to configure a new Basic.run.                               
'                                                                            
' Summary of Changes                                                         
'                                                                            
'    The following procedural interfaces were added or expanded:             
'                                                                            
' 1. Procedural interfaces for BTOS Parameter Management are added.          
' 2. An interface for ConvertTo8087 (in Graphics.lib) is added.              
' 3. Procedural interfaces for ISAM are added.                               
' 4. Procedural interfaces for Video Display Manager are added.              
' 5. Procedural interfaces for File ManagementContingency Management are    
'    added.                                                                  
' 6. Procedural interfaces for Task Management are added.                    
'    added.                                                                  
' 7. Procedural interfaces for Keyboard Management are added                 
' 8. Procedural interfaces for Video Access Method are added                 
' 9. Procedural interfaces for Timer Management are added                    
' 10. BTOS Queue Management is added.                                        
' 11. BTOS Partition Management is added.                                    
' 12. BTOS Cluster Management is added.                                      
' 13. BTOS System Service Management is added.                               
' 14. BTOS Spooler Management is added.                                      
' 15. BTOS Configuration Management is added.                                
' 16. BTOS Interrupt Handlers Management Communication Management is added. 
' 17. BTOS Process Management is added.                                      
' 18. Graphics calls are added.                                              
'      These have been commented out with the use of .  In order to        
'      use graphics, you must remove the commenting from those               
'      procedures you plan to use.                                           
'                                                                            
'                                                                            
' Assembling BasGen.asm: Answering questions                                 
'                                                                            
' NonBASIC procedural interfaces are defined below.  When you assemble      
' this module, the assemble asks questions such as                           
'                                                                            
'                 Are you calling Forms (y or n)?                            
'                                                                            
' If you type y (for yes) followed by RETURN, an entry is defined            
' for each procedure in the corresponding software package (in               
' this case, an entry is made for each procedure in the FORMS package).      
'                                                                            
'                                                                            
' Adding Additional Entries                                                  
'                                                                            
' If you are calling nonBASIC procedures that are not already defined in    
' this module, you must invoke the Editor or Word Processor and add a        
' table entry for each procedure.                                            
'                                                                            
' Use the macros                                                             
'                 TableEntry(procType,cbParams,procName) or                  
'                                                                            
'                 TableEntryRename(procType,cbParams,procName,procRename)    
'                                                                            
' to define a table entry for each new procedure.                            
'                                                                            
' TableEntry and TableEntryRename require these three parameters:          
'                                                                            
'              1) The procedure type, whose value is                         
'                                                                            
'                 0 if the procedure does not return a value,                
'                 1 if the procedure returns a word,                         
'                 2 if the procedure returns a pointer (double word),        
'                 3 if the procedure returns a byte.                         
'                                                                            
'              2) The number of bytes of parameters that are pushed on the   
'                 stack when the procedure is invoked. CAUTION: Byte         
'                 parameters are always pushed as words. For example, if a   
'                 procedure takes a single byte parameter, the number of     
'                 bytes pushed is 2.                                         
'                                                                            
'              3) The procedure name in UPPERCASE.                           
'                                                                            
' TableEntryRename requires this additional parameter:                      
'                                                                            
'              4) A name in UPPERCASE.  This name renames the procedure.     
'                 In a BASIC program, refer to the procedure with this name. 
'                                                                            
' For example, the following macro invocation defines a procedure INITIALIZE 
' which takes a pointer (4 bytes) as a parameter and returns a word.         
'                                                                            
'              TableEntry(1,4,INITIALIZE)                                   
'                                                                            
' In the next example, the macro defines a procedure CHAIN that is renamed   
' OSCHAIN.  CHAIN requires 18 bytes of parameters and returns a word.        
'                                                                            
'              TableEntryRename(1,18,CHAIN,OSCHAIN)                         
'                                                                            
' Add all new entries immediately following the comment                      
'                                                                            
'                           ADD NEW ENTRIES HERE                             
'                                                                            
'

$restore

IF (pass1 eq 1) then (
	out(
Basic Generation 5.1
) ) FI

public	sSamBuffer
extrn	InitBasic:far

public	rgForeignProc, wMaxFiles, wMaxRecLen

;
;                 Segment Ordering and Constant Declarations                  
;

data	segment word public 'data'		; beginning of Dgroup
	rgForeignProc	LABEL	BYTE
data	ends
stack	segment stack 'stack'
stack	ends
const	segment word public 'const'

	sSamBuffer dw 1024	; size of a Sam buffer 
				;  use 512 for synchronous byte streams
				;  use 1024 for asynchronous byte streams

	wMaxFiles  dw 6		; default number of files that can be opened
						;   at the same time
				;  of sequential files if interpreter

	wMaxRecLen dw 128	; default maximum record size of a random file

const	ends
heap	segment public 'heap'
heap	ends
memory	segment public 'memory'
memory	ends					; end of Dgroup
Basic	segment common 'Basic'
;		extrn @baslog:near
Basic	ends
code	segment word public 'code'
code	ends
BasicData segment public 'BasicData'            ; BASIC data segment
BasicData ends 
coed	segment word public 'coed'
coed	ends
MemArray  segment word public 'MemArray'
MemArray  ends					; Must come last

;
;                        End Segment Ordering Declarations                    
;

*define (TableEntry(type,cbParams,procName))(
extrn	procName:far
data	segment	word public 'data'
	DB	type
	DW	cbParams
	DD	procName
	DB	len(procName)
	DB	'procName'
data	ends)

*define (TableEntryRename(type,cbParams,procName,procRename))(
extrn	procName:far
data	segment	word public 'data'
	DB	type
	DW	cbParams
	DD	procName
	DB	len(procRename)
	DB	'procRename'
data	ends)

;
;                           ADD NEW ENTRIES HERE                              
;
'  some sample entries 
'	TableEntry(1,4,INITIALIZE)
'  TableEntryRename(1,18,CHAIN,OSCHAIN)

;   add your entries below

;
;                            END OF NEW ENTRIES                               
;

IF (pass1 eq 1) then (

	out(
Are you calling FORMS (y or n)? )
	define(bFORMS)(in)
	set(fFORMS,0)
	IF (eqs(substr(bFORMS,1,1),Y)) then (set(fFORMS,1)) FI
	IF (eqs(substr(bFORMS,1,1),y)) then (set(fFORMS,1)) FI

	out(
Are you calling BTOS OpenFile or CloseFile (y or n)? )
	define(bBTOSoc)(in)
	set(fBTOSoc,0)
	IF (eqs(substr(bBTOSoc,1,1),Y)) then (set(fBTOSoc,1)) FI
	IF (eqs(substr(bBTOSoc,1,1),y)) then (set(fBTOSoc,1)) FI

	out(
Are you calling SortMerge (y or n)? )
	define(bSM)(in)
	set(fSM,0)
	IF (eqs(substr(bSM,1,1),Y)) then (set(fSM,1)) FI
	IF (eqs(substr(bSM,1,1),y)) then (set(fSM,1)) FI

	out(
Are you calling ISAM (y or n)? )
	define(bISAM)(in)
	set(fISAM,0)
	IF (eqs(substr(bISAM,1,1),Y)) then (set(fISAM,1)) FI
	IF (eqs(substr(bISAM,1,1),y)) then (set(fISAM,1)) FI

	out(
Are you calling the Sequential Access Method (y or n)? )
	define(bSAM)(in)
	set(fSAM,0)
	IF (eqs(substr(bSAM,1,1),Y)) then (set(fSAM,1)) FI
	IF (eqs(substr(bSAM,1,1),y)) then (set(fSAM,1)) FI

	out(
Are you calling the Record Sequential Access Method (y or n)? )
	define(bRSAM)(in)
	set(fRSAM,0)
	IF (eqs(substr(bRSAM,1,1),Y)) then (set(fRSAM,1)) FI
	IF (eqs(substr(bRSAM,1,1),y)) then (set(fRSAM,1)) FI

	out(
Are you calling the Direct Access Method (y or n)? )
	define(bDAM)(in)
	set(fDAM,0)
	IF (eqs(substr(bDAM,1,1),Y)) then (set(fDAM,1)) FI
	IF (eqs(substr(bDAM,1,1),y)) then (set(fDAM,1)) FI

	out(
Are you calling the Video Access Method (y or n)? )
	define(bVAM)(in)
	set(fVAM,0)
	IF (eqs(substr(bVAM,1,1),Y)) then (set(fVAM,1)) FI
	IF (eqs(substr(bVAM,1,1),y)) then (set(fVAM,1)) FI

	out(
Are you calling the Video Display Manager (y or n)? )
	define(bVDM)(in)
	set(fVDM,0)
	IF (eqs(substr(bVDM,1,1),Y)) then (set(fVDM,1)) FI
	IF (eqs(substr(bVDM,1,1),y)) then (set(fVDM,1)) FI

	out(
Are you calling BTOS Memory Management (y or n)? )
	define(bBTOSmm)(in)
	set(fBTOSmm,0)
	IF (eqs(substr(bBTOSmm,1,1),Y)) then (set(fBTOSmm,1)) FI
	IF (eqs(substr(bBTOSmm,1,1),y)) then (set(fBTOSmm,1)) FI

	out(
Are you calling BTOS Task ManagementContingency Management (y or n)? )
	define(bBTOStm)(in)
	set(fBTOStm,0)
	IF (eqs(substr(bBTOStm,1,1),Y)) then (set(fBTOStm,1)) FI
	IF (eqs(substr(bBTOStm,1,1),y)) then (set(fBTOStm,1)) FI

	out(
Are you calling BTOS File ManagementDisk Management (y or n)? )
	define(bBTOSfm)(in)
	set(fBTOSfm,0)
	IF (eqs(substr(bBTOSfm,1,1),Y)) then (set(fBTOSfm,1)) FI
	IF (eqs(substr(bBTOSfm,1,1),y)) then (set(fBTOSfm,1)) FI

	out(
Are you calling BTOS Keyboard Management (y or n)? )
	define(bBTOSkm)(in)
	set(fBTOSkm,0)
	IF (eqs(substr(bBTOSkm,1,1),Y)) then (set(fBTOSkm,1)) FI
	IF (eqs(substr(bBTOSkm,1,1),y)) then (set(fBTOSkm,1)) FI

	out(
Are you calling BTOS Timer Management (y or n)? )
	define(bBTOSttm)(in)
	set(fBTOSttm,0)
	IF (eqs(substr(bBTOSttm,1,1),Y)) then (set(fBTOSttm,1)) FI
	IF (eqs(substr(bBTOSttm,1,1),y)) then (set(fBTOSttm,1)) FI

	out(
Are you calling BTOS Parameter Management (y or n)? )
	define(bBTOSpm)(in)
	set(fBTOSpm,0)
	IF (eqs(substr(bBTOSpm,1,1),Y)) then (set(fBTOSpm,1)) FI
	IF (eqs(substr(bBTOSpm,1,1),y)) then (set(fBTOSpm,1)) FI

	out(
Are you calling ConvertTo8087 (y or n)? )
	define(b87)(in)
	set(f87,0)
	IF (eqs(substr(b87,1,1),Y)) then (set(f87,1)) FI
	IF (eqs(substr(b87,1,1),y)) then (set(f87,1)) FI

	out(
Are you calling BTOS IPC Management (y or n)? )
	define(bBTOSim)(in)
	set(fBTOSim,0)
	IF (eqs(substr(bBTOSim,1,1),Y)) then (set(fBTOSim,1)) FI
	IF (eqs(substr(bBTOSim,1,1),y)) then (set(fBTOSim,1)) FI

	out(
Are you calling BTOS Exchange Management (y or n)? )
	define(bBTOSem)(in)
	set(fBTOSem,0)
	IF (eqs(substr(bBTOSem,1,1),Y)) then (set(fBTOSem,1)) FI
	IF (eqs(substr(bBTOSem,1,1),y)) then (set(fBTOSem,1)) FI

	out(
Are you calling BTOS Queue Management (y or n)? )
	define(bBTOSqm)(in)
	set(fBTOSqm,0)
	IF (eqs(substr(bBTOSqm,1,1),Y)) then (set(fBTOSqm,1)) FI
	IF (eqs(substr(bBTOSqm,1,1),y)) then (set(fBTOSqm,1)) FI

	out(
Are you calling BTOS Partition Management (y or n)? )
	define(bBTOSppm)(in)
	set(fBTOSppm,0)
	IF (eqs(substr(bBTOSppm,1,1),Y)) then (set(fBTOSppm,1)) FI
	IF (eqs(substr(bBTOSppm,1,1),y)) then (set(fBTOSppm,1)) FI

	out(
Are you calling BTOS Cluster Management (y or n)? )
	define(bBTOScm)(in)
	set(fBTOScm,0)
	IF (eqs(substr(bBTOScm,1,1),Y)) then (set(fBTOScm,1)) FI
	IF (eqs(substr(bBTOScm,1,1),y)) then (set(fBTOScm,1)) FI

	out(
Are you calling BTOS System Service Management (y or n)? )
	define(bBTOSssm)(in)
	set(fBTOSssm,0)
	IF (eqs(substr(bBTOSssm,1,1),Y)) then (set(fBTOSssm,1)) FI
	IF (eqs(substr(bBTOSssm,1,1),y)) then (set(fBTOSssm,1)) FI

	out(
Are you calling BTOS Spooler Management (y or n)? )
	define(bBTOSsm)(in)
	set(fBTOSsm,0)
	IF (eqs(substr(bBTOSsm,1,1),Y)) then (set(fBTOSsm,1)) FI
	IF (eqs(substr(bBTOSsm,1,1),y)) then (set(fBTOSsm,1)) FI

	out(
Are you calling BTOS Configuration Management (y or n)? )
	define(bBTOSccm)(in)
	set(fBTOSccm,0)
	IF (eqs(substr(bBTOSccm,1,1),Y)) then (set(fBTOSccm,1)) FI
	IF (eqs(substr(bBTOSccm,1,1),y)) then (set(fBTOSccm,1)) FI

	out(
Are you calling BTOS Interrupt HandlersCommunication Management (y or n)? )
	define(bBTOSih)(in)
	set(fBTOSih,0)
	IF (eqs(substr(bBTOSih,1,1),Y)) then (set(fBTOSih,1)) FI
	IF (eqs(substr(bBTOSih,1,1),y)) then (set(fBTOSih,1)) FI

	out(
Are you calling BTOS Process Management (y or n)? )
	define (bBTOSpm)(in)
	set (fBTOSprm,0)                           
	IF (eqs(substr(bBTOSpm,1,1),Y)) then (set(fBTOSprm,1)) FI
	IF (eqs(substr(bBTOSpm,1,1),y)) then (set(fBTOSprm,1)) FI

	out(
Are you calling Graphics Manager (y or n)? )
	define(bGRAPHMGR)(in)
	set(fGRAPHMGR,0)
	IF (eqs(substr(bGRAPHMGR,1,1),Y)) then (set(fGRAPHMGR,1)) FI
	IF (eqs(substr(bGRAPHMGR,1,1),y)) then (set(fGRAPHMGR,1)) FI

	out(
Are you calling Graphics Library (y or n)? )
	define(bGRAPHLIB)(in)
	set(fGRAPHLIB,0)
	IF (eqs(substr(bGRAPHLIB,1,1),Y)) then (set(fGRAPHLIB,1)) FI
	IF (eqs(substr(bGRAPHLIB,1,1),y)) then (set(fGRAPHLIB,1)) FI

	set(fEASY,0)
        IF ((fGRAPHMGR eq 0) and (fGRAPHLIB eq 0)) then (
	out(
Are you assembling for EASY (y or n)? )
	define(bEASY)(in)
	IF (eqs(substr(bEASY,1,1),Y)) then (set(fEASY,1)) FI
	IF (eqs(substr(bEASY,1,1),y)) then (set(fEASY,1)) FI
) fi
	out(
... configuring BASIC 5.1 )
) fi 

$title( BASIC BuiltIn Functions) eject

	TableEntry(2,4,MAKEPOINTER)
	TableEntry(1,4,GETRA)
	TableEntry(1,4,GETSA)
	TableEntry(2,4,PWA)
	TableEntry(1,6,DEFLPRINT)
	TableEntry(1,0,SYSERC)

IF (PASS1 EQ 1) THEN (out(.)) FI

'
' If you can not find an entry in the appropriate section, check the following
' section.  It contains entries which are used by more than one management.   
'

$title( BTOS routines used by more than one management) eject

	TableEntry(1,16,GETSTAMFILEHEADER)
	TableEntry(1,6,GETMODULEID)
	TableEntry(1,4,GETPASCB)
	TableEntry(1,6,GETUCB)
	TableEntry(1,10,GETPARTITIONSTATUS)
	TableEntry(1,8,GETPSTRUCTURE)
	TableEntry(1,4,GETUSERNUMBER)
	TableEntry(1,8,QUERYREQUESTINFO)
	TableEntry(1,6,QUERYVIDHDW)
	TableEntry(1,10,ULCMPB)
	TableEntry(1,0,UPDATEVAM)

IF (PASS1 EQ 1) THEN (out(.)) FI



if (fFORMS eq 1) then (
$title( Forms Package) eject
	TableEntry(1,14,OPENFORM)
	TableEntry(1,10,DISPLAYFORM)
	TableEntry(1,4,UNDISPLAYFORM)
	TableEntry(1,26,READFIELD)
	TableEntry(1,22,WRITEFIELD)
	TableEntry(1,12,DEFAULTFIELD)
	TableEntry(1,4,DEFAULTFORM)
	TableEntry(1,20,USERFILLFIELD)
	TableEntry(1,0,LOCKKBD)
	TableEntry(1,14,SETFIELDATTRS)
	TableEntry(1,18,GETFIELDINFO)
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi


if (fSM eq 1) then (
$title( SortMerge Package) eject
	TableEntry(1,20,RELEASERECORDANDKEY)
	TableEntry(1,4,DOSORT)
	TableEntry(1,20,RETURNRECORDANDKEY)
	TableEntry(1,4,CONCLUDESORT)
	TableEntry(1,4,TERMINATESORT)
	TableEntry(1,52,BASICPREPARESORT)
	TableEntry(1,12,RELEASERECORD)
	TableEntry(1,12,RETURNRECORD)
	TableEntry(1,54,BASICPREPAREKEYSORT)
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi


if (fISAM eq 1) then (
$title( ISAM Package) eject
	TableEntry(1,6,CLOSEISAM)
	TableEntry(1,34,CREATEISAM)
	TableEntry(1,6,DELETEISAM)
	TableEntry(1,10,DELETEISAMRECORD)
	TableEntry(1,18,DELETEISAMRECORDBYKEY)  ;  NEW ISAM ENTRY
	TableEntry(1,4,ENDISAMTRANSACTION)
	TableEntry(1,18,GETISAMRECORDS)
	TableEntry(1,18,GETISAMRECORDSHOLD)
	TableEntry(1,10,HOLDISAMRECORD)
	TableEntry(1,12,LOCKISAM)
	TableEntry(1,16,MODIFYISAMRECORD)
	TableEntry(1,18,MODIFYISAMRECORDBYKEY)  ;  NEW ISAM ENTRY
	TableEntry(1,24,OPENISAM)
	TableEntry(1,4,PURGEISAMTRANSACTION) 
	TableEntry(1,16,READISAMRECORDBYURI)
	TableEntry(1,16,READISAMRECORDBYURIHOLD)
	TableEntry(1,16,READNEXTISAMRECORD)
	TableEntry(1,16,READNEXTISAMRECORDHOLD)
	TableEntry(1,24,READUNIQUEISAMRECORD)
	TableEntry(1,24,READUNIQUEISAMRECORDHOLD)
	TableEntry(1,10,RELEASEISAMRECORD)
	TableEntry(1,30,RENAMEISAM)
	TableEntry(1,18,SETISAMPROTECTION)
	TableEntry(1,14,SETUPISAMITERATION)  
	TableEntry(1,14,SETUPISAMITERATIONKEY)
	TableEntry(1,14,SETUPISAMITERATIONPREFIX)
	TableEntry(1,24,SETUPISAMITERATIONRANGE)
	TableEntry(1,14,STARTISAMTRANSACTION)
	TableEntry(1,16,STOREISAMRECORD)
	TableEntry(1,4,UNLOCKISAM)
	TableEntry(1,8,HOLDISAMDATASET)
	TableEntry(1,4,ISAMREQUEST)
	TableEntry(1,28,LOADSINGLEUSERISAM)
	TableEntry(1,4,NORMALIZEISAMSTATUS)
	TableEntry(1,6,RELEASEISAMDATASET)
	TableEntry(1,22,SETUPISAMITERATIONLIMITS)
	TableEntry(1,10,VERIFYMULTIUSERISAM)
	TableEntry(1,4,BEGINTRANSACTION)
	TableEntry(1,4,COMMITTRANSACTION)
	TableEntry(1,14,QUERYTRANSACTIONPARAMS)
	TableEntry(1,4,ROLLBACKTRANSACTION)
	TableEntry(1,10,SETTRANSACTIONPARAMS)

IF (PASS1 EQ 1) THEN (out(.)) FI
) fi


if (fSAM eq 1) then (
$title( Sequential Access Method) eject
	TableEntry(1,4,CHECKPOINTBS)
	TableEntry(1,4,CLOSEBYTESTREAM)
	TableEntry(1,8,GETBSLFA)
	TableEntry(1,24,OPENBYTESTREAM)
	TableEntry(1,6,PUTBACKBYTE)
	TableEntry(1,8,QUERYVIDBS)
	TableEntry(1,14,READBSRECORD)
	TableEntry(1,8,READBYTE)
	TableEntry(1,14,READBYTES)
	TableEntry(1,4,RELEASEBYTESTREAM)
	TableEntry(1,8,SETBSLFA)
	TableEntry(1,6,SETIMAGEMODE)
	TableEntry(1,14,WRITEBSRECORD)
	TableEntry(1,6,WRITEBYTE)
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi


if (fRSAM eq 1) then (
$title( Record Sequential Access Method) eject
	TableEntry(1,4,CHECKPOINTRSFILE)
	TableEntry(1,4,CLOSERSFILE)
	TableEntry(1,8,GETRSLFA)
	TableEntry(1,24,OPENRSFILE)
	TableEntry(1,14,READRSRECORD)
	TableEntry(1,4,RELEASERSFILE)
	TableEntry(1,16,SCANTOGOODRSRECORD)
	TableEntry(1,10,WRITERSRECORD)
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi


if (fDAM eq 1) then (
$title( Direct Access Method)  eject
	TableEntry(1,4,CLOSEDAFILE)
	TableEntry(1,8,DELETEDARECORD)
	TableEntry(1,26,OPENDAFILE)
	TableEntry(1,8,QUERYDALASTRECORD)
	TableEntry(1,12,QUERYDARECORDSTATUS)
	TableEntry(1,16,READDAFRAGMENT)
	TableEntry(1,12,READDARECORD)
	TableEntry(1,6,SETDABUFFERMODE)
	TableEntry(1,8,TRUNCATEDAFILE)
	TableEntry(1,12,WRITEDARECORD)
	TableEntry(1,16,WRITEDAFRAGMENT)
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi


if (fVAM eq 1) then (
$title( Video Access Method)  eject
	TableEntry(1,2,ASSIGNVIDOWNER)
	TableEntry(1,6,POSFRAMECURSOR)
	TableEntry(1,10,PUTFRAMEATTRS)
	TableEntry(1,12,PUTFRAMECHARS)
	TableEntry(1,10,QUERYFRAMECHAR)
	TableEntry(1,2,RESETFRAME)
	TableEntry(1,10,SCROLLFRAME)
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi


if (fVDM eq 1) then (
$title( Video Display Manager)  eject
	TableEntry(1,6,INITCHARMAP)
	TableEntry(1,20,INITVIDFRAME)
	TableEntry(1,6,LOADCURSORRAM)
	TableEntry(1,8,LOADFONTRAM)
	TableEntry(1,6,LOADSTYLERAM)
	TableEntry(0,0,LOCKVIDEO)
	TableEntry(0,0,LOCKVIDEOFORMODIFY)
	TableEntry(1,12,RESETVIDEO)
	TableEntry(1,4,SETSCREENVIDATTR)
	TableEntry(0,4,SETSTYLERAMENTRY)
	TableEntry(1,2,SETVIDEOTIMEOUT)
	TableEntry(0,0,UNLOCKVIDEO)
	TableEntry(0,0,UNLOCKVIDEOFORMODIFY)
	TableEntry(0,2,SETSTYLERAM)
	TableEntry(0,4,LOADCOLORSTYLERAM)
'	TableEntry(1,4,LOADSTYLERAMENTRY)  << this label must be resolved >>
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi


if (fBTOSmm eq 1) then (
$title( BTOS Memory Management)  eject
	TableEntry(1,8,ALLOCALLMEMORYSL)
	TableEntry(1,6,ALLOCMEMORYLL)
	TableEntry(1,6,ALLOCMEMORYSL)
	TableEntry(1,6,DEALLOCMEMORYLL)
	TableEntry(1,6,DEALLOCMEMORYSL)
	TableEntry(1,0,RESETMEMORYLL)
	TableEntry(1,4,QUERYMEMAVAIL)
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi


if (fBTOStm eq 1) then (
$title( BTOS Task Management)  eject
	TableEntryRename(1,18,CHAIN,OSCHAIN)
	TableEntry(0,2,CHECKERC)
	TableEntry(0,2,CRASH)
	TableEntry(0,8,ERROREXITSTRING)
	TableEntry(1,2,ERROREXIT)
	TableEntry(1,0,EXIT)
	TableEntry(0,2,FATALERROR)
	TableEntry(1,6,LOADTASK)
	TableEntry(1,16,QUERYEXITRUNFILE)
	TableEntry(1,14,SETEXITRUNFILE)
	TableEntry(1,6,WRITELOG)
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi


if (fBTOSoc eq 1) then (
$title( BTOS OpenFileCloseFile)  eject
	TableEntry(1,2,CLOSEFILE)
	TableEntry(1,18,OPENFILE)
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi


if (fBTOSfm eq 1) then (
$title( BTOS File Management)  eject
	TableEntry(1,6,CHANGEFILELENGTH)
	TableEntry(1,10,CHANGEOPENMODE)
	TableEntry(1,8,CHECKREADASYNC)
	TableEntry(1,8,CHECKWRITEASYNC)
	TableEntry(1,0,CLEARPATH)
	TableEntry(1,0,CLOSEALLFILES)
	TableEntry(1,0,CLOSEALLFILESLL)
	TableEntry(1,22,CREATEDIR)
	TableEntry(1,16,CREATEFILE)
	TableEntry(1,12,DELETEDIR)
	TableEntry(1,2,DELETEFILE)
	TableEntry(1,12,DISMOUNTVOLUME)
	TableEntry(1,16,FORMAT)
	TableEntry(1,20,GETDIRSTATUS)
	TableEntry(1,6,GETFHLONGEVITY)
	TableEntry(1,10,GETFILESTATUS)
	TableEntry(1,8,GETUSERSTATUS)
	TableEntry(1,12,GETVHB)
	TableEntry(1,12,MOUNTVOLUME)
	TableEntry(1,18,OPENFILELL)
	TableEntry(1,4,QUERYWSNUM)
	TableEntry(1,12,QUERYDCB)
	TableEntry(1,16,READFILE)
	TableEntry(1,18,READASYNC)
	TableEntry(1,18,READDIRSECTOR)
	TableEntry(1,14,RENAMEFILE)
	TableEntry(1,14,SETDEVPARAMS)
	TableEntry(1,6,SETNODE)
	TableEntry(1,20,SETDIRSTATUS)
	TableEntry(1,4,SETFHLONGEVITY)
	TableEntry(1,10,SETFILESTATUS)
	TableEntry(1,18,SETPATH)
	TableEntry(1,6,SETPREFIX)
	TableEntryRename(1,16,WRITE,WRITEFILE)
	TableEntry(1,18,WRITEASYNC)
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi


if (fBTOSkm eq 1) then (
$title( BTOS Keyboard Management)  eject
	TableEntry(1,2,ASSIGNKBD)
	TableEntry(1,0,BEEP)
	TableEntry(1,0,CHECKPOINTSYSIN)
	TableEntry(1,2,DISABLEACTIONFINISH)
	TableEntry(1,4,QUERYKBDLEDS)
	TableEntry(1,4,QUERYKBDSTATE)
	TableEntry(1,4,READACTIONCODE)
	TableEntry(1,6,READACTIONKBD)
	TableEntry(1,4,READKBD)
	TableEntry(1,6,READKBDDIRECT)
	TableEntry(1,4,SETKBDLED)
	TableEntry(1,2,SETKBDUNENCODEDMODE)
	TableEntry(1,4,SETSYSINMODE)
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi


if (fBTOSttm eq 1) then (
$title( BTOS Timer Management)  eject
	TableEntry(1,4,CLOSERTCLOCK)
	TableEntry(1,8,COMPACTDATETIME)
	TableEntry(1,2,DELAY)
	TableEntry(1,8,EXPANDDATETIME)
	TableEntry(1,8,FORMATTIME)
	TableEntry(1,8,FORMATTIMEDT)
	TableEntry(1,8,FORMATTIMETM)
	TableEntry(1,4,GETDATETIME)
	TableEntry(1,4,OPENRTCLOCK)
	TableEntry(1,8,PARSETIME)
	TableEntry(1,4,RESETTIMERINT)
	TableEntry(1,4,SETDATETIME)
	TableEntry(1,4,SETTIMERINT)
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi


if (fBTOSpm eq 1) then (
$title( BTOS Parameter Management)  eject
	TableEntry(1,0,CPARAMS)
	TableEntry(1,2,CSUBPARAMS)
	TableEntry(1,8,RGPARAM)
	TableEntry(1,8,RGPARAMINIT)
	TableEntry(1,4,RGPARAMSETELTNEXT)
	TableEntry(1,2,RGPARAMSETLISTSTART)
	TableEntry(1,6,RGPARAMSETSIMPLE)
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi

SET(fGR,0)
if (fGRAPHLIB eq 1) then (set(fGR,1)) fi
if (f87 eq 1) then (set(fGR,1)) fi
if (fGR eq 1) then (
$title( ConvertTo8087)  eject
	TableEntry(2,4,CONVERTTO8087)
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi


if (fBTOSim eq 1) then (
$title( BTOS IPC Management)  eject
	TableEntry(1,6,CHECK)
	TableEntry(1,6,PSEND)
	TableEntry(1,4,REQUEST)
	TableEntry(1,4,RESPOND)
	TableEntry(1,6,SEND)
	TableEntryRename(1,6,WAIT,OSWAIT)
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi


if (fBTOSem eq 1) then (
$title( BTOS Exchange Management)  eject
	TableEntry(1,4,ALLOCEXCH)
	TableEntry(1,2,DEALLOCEXCH)
	TableEntry(1,4,QUERYDEFAULTRESPEXCH)
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi


if (fBTOSqm eq 1) then (
$title ( BTOS Queue Management)  eject
	TableEntry(1,24,ADDQUEUEENTRY)
	TableEntry(1,10,ESTABLISHQUEUESERVER)
	TableEntry(1,34,MARKKEYEDQUEUEENTRY)
	TableEntry(1,20,MARKNEXTQUEUEENTRY)
	TableEntry(1,34,READKEYEDQUEUEENTRY)
	TableEntry(1,22,READNEXTQUEUEENTRY)
	TableEntry(1,22,REMOVEKEYEDQUEUEENTRY)
	TableEntry(1,10,REMOVEMARKEDQUEUEENTRY)
	TableEntry(1,16,REWRITEMARKEDQUEUEENTRY)
	TableEntry(1,6,TERMINATEQUEUESERVER)
	TableEntry(1,10,UNMARKQUEUEENTRY)
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi


if (fBTOSppm eq 1 ) then (
$title ( BTOS Partition Management)  eject
	TableEntry(1,14,CREATEPARTITION)
	TableEntry(1,6,GETPARTITIONEXCHANGE)
	TableEntry(1,10,GETPARTITIONHANDLE)
	TableEntry(1,18,LOADINTERACTIVETASK)
	TableEntry(1,16,LOADPRIMARYTASK)
	TableEntry(1,2,REMOVEPARTITION)
	TableEntry(1,2,SETPARTITIONEXCHANGE)
	TableEntry(1,2,SETPARTITIONLOCK)
	TableEntry(1,2,SETSWAPDISABLE)
	TableEntry(1,2,TERMINATEPARTITIONTASKS)
	TableEntry(1,2,VACATEPARTITION)
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi


if (fBTOScm eq 1) then (
$title ( BTOS Cluster Management)  eject
	TableEntry(1,4,DISABLECLUSTER)
	TableEntry(1,8,GETCLUSTERSTATUS)
	TableEntry(1,8,GETWSUSERNAME)
	TableEntry(1,6,SETWSUSERNAME)
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi


if (fBTOSssm eq 1) then (
$title ( BTOS System Service Management)  eject
	TableEntry(1,0,CONVERTTOSYS)
	TableEntry(1,4,SERVERQ)
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi


if (fBTOSsm eq 1) then (
$title ( BTOS Spooler Management)  eject
	TableEntry(1,24,CONFIGURESPOOLER)
	TableEntry(1,12,SPOOLERPASSWORD)
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi


if (fBTOSccm eq 1) then (
$title ( BTOS Configuration Management)  eject
	TableEntry(1,8,CURRENTOSVERSION)
	TableEntry(1,16,MAPXBUSWINDOW)
	TableEntry(1,4,OSVERSION)
	TableEntry(1,2,SWAPXBUSEAR) 
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi


if (fBTOSih eq 1) then (
$title ( BTOS Interrupt Handlers)  eject
	TableEntry(1,2,LOCKIN)
	TableEntry(1,4,LOCKOUT)
	TableEntry(1,2,MEDIATEINTHANDLER)
	TableEntry(1,2,RESETCOMMISR)
	TableEntry(1,22,SETCOMMISR)
	TableEntry(1,12,SETINTHANDLER)
	TableEntry(1,6,SETLPISR)
	TableEntry(1,6,SETTRAPHANDLER)
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi


if (fBTOSprm eq 1) then (
$title ( BTOS Process Management)  eject
	TableEntry(1,2,CHANGEPRIORITY)
	TableEntry(1,4,CREATEPROCESS)
	TableEntry(1,4,QUERYPROCESSNUMBER)
	TableEntry(1,4,SETDELTAPRIORITY)
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi

'
' Assembling Basgen.asm with Graphics, causes a problem with Burroughs Easy 
' package.  If one wants to use EASY, do not answer YES to Graphics.        
'

if (fGRAPHMGR eq 1) then (
$title (GRAPHICS MANAGER) eject
'	TableEntry(1,0,CLEARSCREEN)
'	TableEntry(1,8,CLEARSCREENRECTANGLE)
'	TableEntry(1,14,DRAWSCREENARC)                 ;CHANGED
'	TableEntry(1,8,DRAWSCREENLINE)
'	TableEntry(1,10,FILLSCREENRECTANGLE)
'	TableEntry(1,4,GETDRAWATTRINFO)                ;NEW
'	TableEntry(1,4,GETRASTERINFO)                  ;NEW
'	TableEntry(1,0,INITADDITIONALGRAPHICSSCREEN)   ;NEW
'	TableEntry(1,0,INITSCREENGRAPHICS)
'	TableEntry(1,6,LOADCOLOR)
'	TableEntry(1,6,LOADCOLORMAPPER)
'	TableEntry(1,4,LOADSOFTPATTERN)
'	TableEntry(1,4,MAPGRAPHICSWINDOW)              ;NEW
'	TableEntry(1,8,READPIXELCOLOR)                 ;NEW
'	TableEntry(1,0,RETURNGRAPHICSSCREEN)           ;NEW
'	TableEntry(1,2,SETCOLORMAPPER)
'	TableEntry(1,2,SETCOMMANDSCREEN)
'	TableEntry(1,2,SETSCREENCOLOR)                 ;NEW
'	TableEntry(1,2,SETSCREENDRAWINGMODE)
'	TableEntry(1,2,SETSCREENLINETYPE)
'	TableEntry(1,2,SETVISIBLESCREEN)
'	TableEntry(1,0,TURNOFFGRAPHICS)
'	TableEntry(1,0,TURNOFFGRAPHICSCOLOR)           ;NEW
'	TableEntry(1,0,TURNONGRAPHICS)
'	TableEntry(1,0,TURNONGRAPHICSCOLOR)            ;NEW

IF (PASS1 EQ 1) THEN (out(.)) FI
) fi

if (fGRAPHLIB eq 1) then (
$title (GRAPHICS LIBRARY) eject
'	TableEntry(1,22,ADDOBJECT)
'	TableEntry(1,28,ADDLABEL)
'	TableEntry(1,8,ADDPICTURE)
'	TableEntry(1,0,CLEARLABELS)
'	TableEntry(1,0,CLEARVECTORS)
'	TableEntry(1,0,CLEARVIEWPORT)
'	TableEntry(1,0,CLOSEOBJECT)
'	TableEntry(1,2,CLOSEPICTURE)
'	TableEntry(1,0,CLOSETEMPOBJECT)
'	TableEntry(1,0,DELETECURRENTLABEL)
'	TableEntry(1,0,DISPLAYCURRENTOBJECT)
'	TableEntry(1,2,DISPLAYPICTURE)
'	TableEntry(1,8,DRAW)
'	TableEntry(1,20,DRAWARC)
'	TableEntry(1,12,DRAWCIRCLE)
'	TableEntry(1,16,DRAWLINE)
'	TableEntry(1,8,DRAWRELATIVE)
'	TableEntry(1,18,FILLRECTANGLE)
'	TableEntry(1,6,GETCURRENTLABEL)
'	TableEntry(1,4,GETCURSORPOSITION)
'	TableEntry(1,10,GETFONTNAME)
'	TableEntry(1,10,GETFONTNUMBER)
'	TableEntry(1,4,GETLABELDATA)
'	TableEntry(1,4,GETNUMBEROFFONTS)
'	TableEntry(1,4,GETNUMBEROFOBJECTS)
'	TableEntry(1,4,GETPICTURECOLORS)
'	TableEntry(1,4,GETTRANSFORMATIONDATA)
'	TableEntry(1,10,GETUSERFONTNAME)
'	TableEntry(1,4,GETWINDOWDATA)
'	TableEntry(1,0,INITGRAPHICS)
'	TableEntry(1,2,LOADPAPER)
'	TableEntry(1,4,MODIFYLABEL)
'	TableEntry(1,8,MOVE)
'	TableEntry(1,8,MOVERELATIVE)
'	TableEntry(1,20,OPENPICTURE)
'	TableEntry(1,16,OPENTEMPOBJECT)
'	TableEntry(1,0,READINTERRUPTKEY)
'	TableEntry(1,0,REMOVECURRENTOBJECT)
'	TableEntry(1,4,SETCHARACTERSIZE)
'	TableEntry(1,2,SETCOLOR)
'	TableEntry(1,2,SETCOLUMNMODE)                       ;NEW
'	TableEntry(1,4,SETCURRENTPALETTE)
'	TableEntry(1,2,SETDRAWINGMODE)
'	TableEntry(1,6,SETFIRSTLABEL)
'	TableEntry(1,0,SETFIRSTOBJECT)
'	TableEntry(1,6,SETFONT)
'	TableEntry(1,2,SETLABELORIGIN)
'	TableEntry(1,16,SETLIMITS)
'	TableEntry(1,2,SETLINETYPE)
'	TableEntry(1,10,SETNDCCURSORPOSITION)
'	TableEntry(1,6,SETNEXTLABEL)
'	TableEntry(1,0,SETNEXTOBJECT)
'	TableEntry(1,10,SETOBJECTCURSORPOSITION)
'	TableEntry(1,2,SETOUTPUTDEVICE)
'	TableEntry(1,2,SETOUTPUTTYPE)
'	TableEntry(1,6,SETPLOTTERDEVICE)
'	TableEntry(1,2,SETPLOTTERMATERIAL)
'	TableEntry(1,8,SETPEN)
'	TableEntry(1,8,SETSCALE)
'	TableEntry(1,8,SETSCALERELATIVE)
'	TableEntry(1,8,SETTRANSLATE)
'	TableEntry(1,8,SETTRANSLATERELATIVE)
'	TableEntry(1,4,SETUPGRAPHICSSPOOLING)                  ;NEW
'	TableEntry(1,16,SETUSERCOORDINATES)
'	TableEntry(1,6,SETUSERFONT)
'	TableEntry(1,16,SETVIEWPORT)
'	TableEntry(1,16,SETWINDOW)
'	TableEntry(1,10,SETWORLDCURSORPOSITION)
'	TableEntry(1,0,TURNOFFCURSOR)
'	TableEntry(1,0,TURNONCURSOR)
'	TableEntry(1,6,WRITEPICTURE)
'	TableEntry(1,6,WRITETEXTSTRING)
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi

IF (fEASY eq 1) then (
$title (Default section for EASY) eject
	TableEntry(1,10,MOVE)
IF (PASS1 EQ 1) THEN (out(.)) FI
) fi

if  (pass1 eq 1)
then (if  (fGRAPHLIB eq 1)
      then (if  (f87 eq 0)
	    then (out(

	You have answered 'Yes' to Graphics Library,
	but not to ConvertTo8087.

	Since ConvertTo8087 is required to use Graphics Library
	procedures in BASIC, it has been defined for you.  

)) FI ) FI ) FI

; SENTINEL

data	segment word public 'data'
	DB	255
data	ends

END
