Example: marketing

RPBASIC-52 PROGRAMMING GUIDE - Remote …

RPBASIC-52 PROGRAMMING GUIDEiCOPYRIGHTC opyright 1996 - Remote Processing Corporation. All rights software described in this manual is furnishedunder contents of this manual and the specificationsherein may change without Processing Corportation7975 E. Harvard AvenueDenver, Co 80231 Phone: 303 690 1588 Fax: 303 690 1875email: order # 1084 Revision SUPPORTIf you have a question about RPBASIC-52 andcannot find the answer in this manual, call us at thenumber listed below during normal business you call, please have the following at hand:Your RPBASIC-52 PROGRAMMING guideYour card hardware manualA description of the problemRPBASIC-52 PROGRAMMING GUIDEiiTABLE OF 1 MANUAL 1 Symbols and 1 Basic 2 Line 2 Tasking 2 WRITING A

RPBASIC-52 PROGRAMMING GUIDE 1-1 PREFACE This programming guide is for Remote Processing controllers using RPBASIC-52 language. It was derived from Intel MCS-51 BASIC, V1.1.

Tags:

  Guide, Programming, Rpbasic 52 programming guide, Rpbasic

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of RPBASIC-52 PROGRAMMING GUIDE - Remote …

1 RPBASIC-52 PROGRAMMING GUIDEiCOPYRIGHTC opyright 1996 - Remote Processing Corporation. All rights software described in this manual is furnishedunder contents of this manual and the specificationsherein may change without Processing Corportation7975 E. Harvard AvenueDenver, Co 80231 Phone: 303 690 1588 Fax: 303 690 1875email: order # 1084 Revision SUPPORTIf you have a question about RPBASIC-52 andcannot find the answer in this manual, call us at thenumber listed below during normal business you call, please have the following at hand.

2 Your RPBASIC-52 PROGRAMMING guideYour card hardware manualA description of the problemRPBASIC-52 PROGRAMMING GUIDEiiTABLE OF 1 MANUAL 1 Symbols and 1 Basic 2 Line 2 Tasking 2 WRITING AND EDITING PROGRAMS. 2 4 Variables and 5 Passing Variables Between 5 OPERATING 6 Command and Run 6 Autorunning 6 Stopping Program 6X-ON and X-Off Flow 6 STORING 6 HARDWARE AND 7 MULTITASKING 8 COUNT 8 Serial Communication 8ON LINE 12ON COUNT 12 Assembly Language 12 Assembly language 13 ARITHMETIC 13 OBSOLETE and 13 COMMAND 8 CARD$.

3 13 CLEAR 13 CLEAR 15 CLEAR 16 CLEAR 17 CLEAR 18 COM$.. 22 COUNT (statement).. 23 COUNT (function).. 25 DATE (function).. 26 DATE (statement).. 44IF THEN 50 LINE (Function).. 51 LINE# (Function).. 52 LINEB (Function).. 53 LINE (Statement).. 54 LINE# (Statement).. 55 LINEB (Statement).. 57 LIST#.. 63ON COM$.. 64ON 67ON 68ON 70ON 72 RPBASIC-52 PROGRAMMING GUIDEiiiON 78 PEEK$.

4 83 POKE$.. 87 PRINT #,.. 87?.. 110 TIME (function).. 111 TIME (command).. 117 CONFIG 118 CONFIG 118 CONFIG 119 CONFIG 120 CONFIG 121 APPENDIX A - Network example 1 APPENDIX B - Modem example 1 APPENDIX C- ERROR 1 ARITH. 1 ARITH. 2 ARRAY 2 BAD 2 BAD 2 CAN'T 2 DIVIDE BY 3 MEMORY 3NO 3 APPENDIX D - Data 1 STRING 1 VARIABLE 1 FLOATING-POINT 1 APPENDIX E - Software revision 1 RPBASIC-52 PROGRAMMING GUIDE1-1 PREFACEThis PROGRAMMING GUIDE is for Remote Processingcontrollers using RPBASIC-52 language.

5 It wasderived from Intel MCS-51 BASIC, Severalcommand extensions and features have been addedto effectively speed up command serial ports. Received characters arebuffered to 256 characters. PRINT strings areput into a 256 character buffer, making it constructs such as ON LINE, ONCOM, ON COUNT, and ON KEYPAD. Linesand keypad are monitored at assembly languagespeed on every 5 ms tick time. This speeds upprogram execution because the main programno longer has to monitor these commands directly support hardware.

6 DATE and TIME work with the real time clock. AIN reads a voltage while AOT outputs cards do not have all hardware features so donot support all of the commands. Cards supported orexceptions are listed with each command. In somecases you must refer to your hardware manual forexact few original BASIC-52 commands have beenremoved. These commands were oriented aroundspecific registers in the 8052 chip or a specificdesign. For example, the PROG command assumedcode is stored in an EPROM. Remote Processingcards use a flash EPROM which uses a newprogramming algorithm.

7 The PROG command wasreplaced with CONVENTIONSI nformation appearing on your screen is shown in adifferent :Symbols and Terminology<xxx>Paired angle brackets are used to indicate aspecific key on your keyboard. Forexample, <esc> means the escape meaning a number, simplevariable, or mathematical expressioninvolving variables and numbers. Thefollowing are valid *45C*D+54 INT(D)expr can be another function. Complexity of expr is limited byavailable stack memory. Usually this is7 levels of clarity, expr may be another namesuch as position, channel, and so variables require anexpression or value.

8 For example:AIN(channel)KEYPAD(function)Elli psis (..) follow an instruction which optionallyaccept more data[,data][,data]..READ variable[,variable]..Optional portions of an instruction are enclosed inbrackets []:DISPLAY option[,option][,option] RPBASIC-52 PROGRAMMING GUIDE1-2 Basic InterpretersThere are several types and levels of interpreters. Aslow, very basic type of interpreter figures out whateach command is supposed to do during run time. Atoken-based interpreter, such as this basic, is muchfaster.

9 This type examines each program line as it istyped in, figures out what it should do, and convertsit to a string of Basic tokens mixed with text. Atoken is a single character that represents acommand. For example, an ASCII value of 89 Hrepresents the PRINT command. After a line is processed, it is stored in memory. When you type the RUN command, each programline is scanned. A token causes a branch to anassembly language routine which carries out therequired OF A BASIC PROGRAMC ommandsCommands direct or perform an output action.

10 Examples are PRINT, SAVE, POKE, and LOAD. Commands do not return a value used return a value used for computation. Examples are AIN, PEEK, SIN, and COM$. Functions do not cause a change in an NumbersProgram lines begin with a unique line number. Each line number may contain one or more Basicstatements separated by a colon. Line numbers arein the range of 1 - act on or convert numeric or string data. These include arithmetic (+,-,*, and /), naturallogarithmic (base "e"), trig (SIN, COS), relational(>, <, or <>), logical (.)


Related search queries