APPENDIX F

Appendix F

Use with Apple

Apple Integer Basic

The MX-70 is activated by ASCII code numbers from O-255. The easiest way to send these codes in BASIC is via the CHR$ function, a feature not supported by Apple Integer Basic.

In theory the codes could all be POKEed from BASIC but it doesn’t seem to be a practical option.

Apple Disk Basic

Nearly all programs in this manual are written in Applesoft ROM BASIC. Apple disk users should have no trouble with the programs if the advice in the Apple DOS Manual is heeded. Apple recommends that all DOS commands executed from a BASIC program (ie. with a line number) be preceded by a CTRL-D (CHR$(4) ). For example:

10 PRINT CHR$(4) “CATALOG”

gives a CATALOG LISTing of all files on the disk.

The DOS commands most frequently needed are PR#l and PR#O. They can usually be issued from either inside a program (with a line number) or outside the program, at the “command level.” In most cases, a simple PR#l or PR#O will do fine. In Chapter 3, while we’re learning printer control, it is essential they be included INSIDE the program.

There are several ways to issue a CTRL-D from a BASIC program. One is to use CHR$(4) as in the following example.

9 PRINT CHR$(4) “PR#l”

10 PRINT “VIDEO AND PRINTER”

20PRINT CHR$(4) “PR#O”

30PRINT “VIDEO ONLY”

Many disk users find the CHR$(4), called “Control D” in lines 9 and 20 unnecessary. They can simply use:

9PR#l

20PR#O

instead. Experiment to see what works best with your system.

91