I have an Epson HX-20 which has been in storage since I last used it in 2013.

To my surprise the program I wrote back then is still stored in RAM, and by LISTing it (and checking it against the external backup I made), I can verify that it is in place.

However, when I run the program if ever it comes across a GOSUB statement, it stops with error UL (Undefined Line Number).

If I LIST the whole program, I can see the line numbers in question. However if I type LIST {line number} I get a blank output.

Can anyone explain what has probably happened, and what I could do to recover things in place?

I am aware that I could type the whole program in again, or try to transfer it from backup - the first being time consuming and the second risky as if anything goes wrong I will delete the program anyway. I'm really more interested in understanding what has happened that simply restoring the program.

  • 2
    Very probably, there is two types of "line number chains" that thread through the program (1) the line numbers in the ASCII text (2) some BASIC internal pointers linking to GOSUB/GOTO targets, and apparently the second sort is lost. If you would save and re-load from mass storage, chances are this would be re-generated.
    – tofro
    Commented Feb 24, 2018 at 17:01
  • 1
    Ok - just discovered the internal tape recorder is not working any more, so I'd have to try with external tape. Thanks for the tip. Btw wouldn't your comment be an answer?
    – harlandski
    Commented Feb 24, 2018 at 17:19
  • Too much of a guess to be a real answer, I'm afraid. I don't have an HX-20.
    – tofro
    Commented Feb 24, 2018 at 19:00
  • Perhaps try frigolit.net/projects/hxemu . Read the About me bit.
    – cup
    Commented Mar 2, 2018 at 16:22

1 Answer 1


First, how did you store prog in RAMFILE, which is intended for storing formatted data?

Secondly, if you don't have a tape recorder, you can connect to main PC microphone input and record (SAVE) prog to a .WAV file. You can then LOAD back onto HX. I've had excellent results doing this with my HX and a laptop.

  • Welcome to Retrocomputing! If you have a question, please post it as its own question, not as the answer to another question.
    – DrSheldon
    Commented Feb 2, 2019 at 23:31
  • 2
    @DrSheldon, that doesn’t look like a “question” but more like a request for clarification. Geoff questions part of the premise of the question (“stored in ramfile”) which he must think cannot be true. It’s probably an inconsequential misstatement by the original poster. He then suggest a fix. Outside of some grammar tweaks, I think the form of the answer is fine (but I can’t judge on its substance). Commented Feb 3, 2019 at 4:38
  • I might be using the wrong terminology, but I just meant the program was still held in RAM, or apparently so.
    – harlandski
    Commented Feb 4, 2019 at 12:04
  • OK, there is a specific facility within the HX-20 BASIC called RAMFILE, and I wondered just what you were meaning re storing BASIC code there. Oh, if you've still got the problem, another thing you might try is to RENUM the prog, which might restore the links referred to in earlier comment. In any case, prob a good idea to SAVE the prog first, unless you've got the means to re-enter it all. Commented Feb 4, 2019 at 22:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .