Epson HX-20 BASIC Commands

Before I received my HX-20 I had very little experience with using BASIC. Knowledge of the following BASIC commands were very useful for me when it came to using the HX-20 programs on this website. I’ll give a brief description of how I use them, but see the BASIC Reference Manual for more information on each one.

CLEAR 200, 256 – When trying out lots of the programs I have in my collection, I noticed that same of them would change the RAM file size. I would use this command to reset it back to the machines default. (see page 3-2 of BASIC Reference Manual)

CLS – One of the few BASIC commands I knew. It will clear the screen of any text. (see page 3-3 of BASIC Reference Manual)

LIST – Used to list the program area on the LCD. Specific line numbers or a range of numbers can also be listed instead of the whole program e.g. LIST 110 or LIST 110-150. (see page 3-30 of BASIC Reference Manual). After loading a program over the RS232C port I always list the last line just to make sure the entire program copied over.

LOAD"CAS1:" – This command is used to load a program from the external cassette, or in my case, my PC. A specific filename can be defined if needed, say for example you have many files on the same cassette, but from a PC with each individual file as a single .mp3 the command this command is enough by itself. If command LOAD"CAS0:" was used instead it would try to load from the HX-20s onboard micro cassette. (see page 3-32 of BASIC Reference Manual).

LOAD"COM0:(BLPSC)" – This is the command that is used to load programs over the RS232C port. The BLPSC specifies the interface conditions. The table below shows the various options for each condition. The conditions I use when loading programs using my Simple Null Modem cable is LOAD"COM0:(68N1F)". (see page 3-32 of BASIC Reference Manual).

B (bit rate)0 = 110bps, 1 = 150bps, 2 = 300bps, 3 = 600bps, 4 = 1200bps, 5 = 2400bps, 6 = 4800bps
L (word length)7 = 7 bits/character, 8 = 8 bits/character
P (parity)N = no parity check, E = even parity check, O = odd parity check
S (stop bits)1 = 1-bit length, 2 = 2-bit length
C (control line active)F (option used for Simple Null Modem cable) = CTS ignored, DTS ignored, RTS positve signal active, CD ignored. (See page 3-47 of BASIC Reference Manual for details of all hexadecimal options 0 – E).

LOGIN – There are 5 program areas on the HX-20, the LOGIN command followed by the program area number (e.g. LOGIN 3) is used to change between them. (see page 3-36 of BASIC Reference Manual).

MEMSET – If you install a machine language program it may require using memory that is allocated to BASIC programs. Restoring this memory back to the BASIC program area default is done by using the MEMSET command. (see page 3-37 of BASIC Reference Manual).

NEW – When logged into a specific program area the NEW command will delete any program that is in memory. (see page 3-42 of BASIC Reference Manual).

RUN– Use this command to run a program after it has been loaded into the program area. (see page 3-65 of BASIC Reference Manual).

SAVE"CAS0:ABC" – To save a program on the internal cassette (CAS0) or external cassette (CAS1) the SAVE command followed by filename no more than 8 characters in length is used. (see page 3-66 of BASIC Reference Manual).

SAVE"COM0:(BLPSC)" – This command will output a program over the RS232C port to your terminal program. the (BLPSC) parameters are the same as the LOAD"COM:(BLPSC)". (see page 3-67 of BASIC Reference Manual).

STAT – This command will show you the status of the program area you are logged into. Status of other program areas can be seen by following STAT with the program area number. STATALL will list the status of all program areas. (see page 3-71 of BASIC Reference Manual).

TITLE"TEST1" – This command is used to name the program area that you are logged into. The name within the quotations must be no longer than 8 characters. Once applied this name will appear on the Menu and when the STAT command is used. (see page 3-73 of BASIC Reference Manual).