Intel 9800758-02 manual Baprom F1HEATER.BAS

Page 109

BASIC-SO

RMX/SO BASIC-SO

BAPROM is a program (and the name of the file that contains it) that runs under ISIS-II. It converts an ASCII file to Intel SOSO/SOS5 relocatable object file format. It is not a compiler; it transforms ASCII data to a form that can be LOCATEd. It requires an Intellec or Intellec Series II microcomputer development system, at least 32K of RAM, at least one disk drive, and a terminal. To actually burn the PROM, you also need a Universal PROM Programmer (UPP) and the Universal PROM Mapper (UPM) program.

The format of the BAPROM command:

:Fn:BAPROM input file TO output file

BAPROM is the name of the file that contains the BAPROM program. If it isn't on the disk in drive 0, include the drive number in the filename.

input file is the name of the file that contains the ASCII form of the BASIC-SO program to be burned into PROM.

output file is the name of the converted absolute object file. If you don't specify an output filename, it is given the same name as the input file with an extension of OBJ.

BAPROM does not modify the source in any way except to add a control Z at the end.

For example, assume you have written and tested a thermostat control program in BASIC-SO and saved it in ASCII format with the name HEATER.BAS. You wish to burn the program into PROM. If BAPROM and LOCATE are on drive 0, your pro- gram is on drive 1, and you wish to locate it at OEOOOH then the session would go as follows:

-BAPROM :F1:HEATER.BAS

Because no output filename is specified, it is :Fl :HEATER.OBJ. BAPROM displays its message, then displays the size of the input file:

ISIS-II BAPROM, Vm.n

SIZE = nnnnH BYTES

The size (nnnnH) is in hexadecimal.

-LOCATE :F1 :HEATER.OBJ CODE(OEOOOH) ISIS-II LOCATER Vm.n

To actually burn the resulting file (:Fl :HEATER) into PROM, you need the Univer- sal PROM Mapper program (UPM) and a Universal Prom Programmer (UPP). Supposing your program is approximately 2K and you wish to burn it into one 2716 PROM you must install the 2716 Personality Card into UPP, place a 2716 PROM into Socket 2 and then enter the following commands at the console:

-UPM *TYPE 2716 *SOCKET = 2

*OFFSET

7500

*OFFSET = 9500H

READ into 0 object file :F1 :HEATER PROGRAM from OEOOOH to OE7FFH Start 0

From a more detailed description of UPM and UPP see: Universal PROM Program- mer Reference Manual, 9800133F.

A discussion of how to select the proper offset can be found on pp. 36-37 of the Universal PROM Mapper Operator's Manual, 9S00236A.

F-17

Image 109
Contents BASIC-SO Reference Manual A108/0979/7500 FL Preface Page Contents Illustrations Invoking BASIC-80 Chapter Introduction to BASIC-80Introduction to BASIC-80 ExamplesBasic filename MEMTOPaddress FilenameRenaming a File Listing the Directory of a DiskChanging File Attributes Deleting a FileSave LP ,A You can now run, list, or edit the programStatements CommandsBASIC-80 Statements BASIC-80 Commands ContdBASIC-80 Functions BASIC-80 Statements ContdBASIC-80 Functions Contd Functions Representing DataInteger Constants ConstantsDecimal Integer Constants Hexadecimal Integer ConstantsSingle-Precision Floating-Point Constants Octal Integer ConstantsDouble-Precision Floating-Point Constants String Variables String ConstantsThis is a string constant $ = Enter next data stringYI,1 L4! = Csng l4String Arrays BASIC-SO Operators in Order of Precedence Contd Arithmetic OperatorsString Operator Logical OperatorsNumeric Expressions String ExpressionsEntering and Editing Programs 30 A=8 30 A=8*5230 A=8*52 30 A=8*37 30 A--=8xx*522537 Control-R a = 8*37Command 3D press 3, then D results SubcommandInteger D If AB thenIf AB then 120 Else Null SET At this point, the other editing subcommands may be used Syntax of the X subcommand isInteger C character character Print Undefined SET The E subcommand is enteredMove the cursor to PRINT. Enter 2C RE L Print Undefined SET. Enter a LSyntax Error Messages BASIC-80 Error MessagesOverflow, Underflow, and Divide-by-Zero Error Trapping Trace Facility Error Handling Error SimulationRestarting Program Execution If line 40 is replaced withOpen 1,#1,F1DATES Opening a Sequential FileWriting to a Sequential File Refer to for further details of Print UsingReading from a Sequential File If executed four times, it would read all eight valuesValue of R$ would be Closing a Sequential FileDefining a Random 1/0 Field-FIELD BuffersField #3, 20 AS N$ Field #3, 20 AS N$, 9 AS SS$ Disk File Input/OutputReading from a Random 1/0 File Opening and Closing a Random Disk FileAny of the parameters can be variables To read the next recordInteger Writing to a Random 1/0 FileSingle-precision value Double-precision valueMKI$ Attrib Fdrive numberfilename, WO Attrib Fdrive numberfilename, W1Auto first lineJ, increment Clear expression,addressClose Commands and StatementsRules for function name are the same as for variable name DEF FNXDefsng Defdbl Defstr Defint Delete DIMDIR ErrorEdit ENDExit Error expressionField FOR-NEXT-STEPGosub GETFor variable=expression to expression Step expression GET I file number ,record numberInput IF-THEN-ELSEGoto LET KillLine Input ListLoad LSET, RsetNEW Merge9 16 NextOn ... Goto On ... GosubOpen OUT Option BasePoke Print Print UsingString Fields If X$=SEVEN and Y$=EIGHT, the results of line 40 would be Numeric fieldsPUT PrunRead RandomizeREM Return ResumeRUN line numberlstring expression ,F SaveLine number RUN filename 60 END? 5,8,2 TRON, TroffWidth WaitATN ABSCint CHR$Functions CVI CVS Csng10 A# = 1.00/3.00 AO/o =EOF DskfOk· FIXINP HexsInputs Instr INTLEFT$ LOC LENLOF LOGMKI$ MKS$ MKD$ MID$OCT$ Peek expression RightsPOS integer RIGHT$ string,integerSIN SGNSpaces 10 a =1SPC integer SPCIf A$ = 2 then Print Correct Else Goto SQRexpressionTAB expression STR$ expressionTAN expression 60 AO/o = Here is an example of how the USRn statement is usedTable A-I. BASIC-80 Error Codes Appendix a BASIC-SO Error CodesTable A-I. BASIC-SO Error Codes Contd Appendix B BASIC-SO Reserved Words Page Level To halt program execution and return to commandTo tab across the line To resume program execution after it is stopped byPage Appendix D Ascii Codes Table D-l. Ascii Code ListBEL Table D-2. Ascii Code DefinitionAppendixe Calling Subroutines Figure B-1. Internal Representation of Numbers and Strings RESULT=USR%1VARPTRA, VARPTRB, VARPTRC» PRINTA+B+C= Result Some Real ExamplesFigure E-2 /8085 Assembly Language Program Figure E-3. PL/M-80 Program Appendix F RMX/SO BASIC-SO ISIS-II BASIC-SO Initializing the Predefined RMX/SO BASIC-SO ConfigurationOOOOH-OFFFH Table F-l. Sample Configuration Jumper WiringBASIC-80 Source Files Generating Boot-Loaded and PROM-Based VersionsBASIC-80 Object Files BASIC-80 Executable FilesGenerating a Boot-Loaded RMX/80 BASIC-80 This option is used to allocate memory. It is 1 if the boot That are not boot loadedSetting baud rates, refer to the RMX/SO Users Guide This option enables your user-written I/O drivers if youISBC 80/20-4 Generating a PROM-Based RMX/80 BASIC-80 Prom F1 RMX820.L1BSTART, & FOBASCM.OBJ,& FORMXBAS.LlB F1 DFSDIR. L1BDIRECTORY ,RENAM E,& F1 MTI810.L1B Adding BASIC-SO to an Existing RMX/SO Configuration Configuring DFS on an iSBC 80/10Configuration Requirements ISBC SO/10 System ClockPublic Variables Open 0,#1, L1LlST Adding User-Written I/O Drivers to RMX/SO BASIC-SOFigure F-S. Sample User-Written 1/0 Driver Routine Burning a BASIC-80 Program Into Prom Altering BASIC-80 WorkspaceBaprom F1HEATER.BAS Page Index Ase BASIC-80 RIGHT$,7-1O Request for Readerscomments 111111