How to load text files in HX-20 (Microsoft) BASIC?

31 views
Skip to first unread message

James Harland

unread,
Nov 14, 2025, 1:29:12 PM (13 days ago) Nov 14
to retro-comp
As I said in another thread, I've got an HX-20 I've recently bought up and running. I have another HX-20 which I have had for 20 years, though it stopped working 5 years ago.

Back in the day I recorded a bunch of text files onto the mini cassette. They have the format "FILENAME.TXT", but they display as "FILENAME TXT" when they are listed with the FILES command. They show up as ASCII files.

For example:

IMG_20251114_223123.jpg

Back in the day I had some sort of minimalistic text editor/cassette file manager which I had written which allowed me to quickly read these text files by the program keeping track of where they were written on the cassette. Unfortunately I did not save that program anywhere it seems, and did not take detailed notes at the time.

Now I cannot remember how to read the text files into the HX-20. I have reviewed the BASIC manual, but I can't see anything which would load data from cassette, and I am not quite sure how to manipulate it once it is loaded. I wonder if you can use the OPEN command somehow, I found some talk of that on CP/M Microsoft BASIC, but the HX-20 manual doesn't seem to talk about files from the cassette there, only the RS232 port.

James Harland

unread,
Nov 14, 2025, 1:42:10 PM (13 days ago) Nov 14
to retro-comp
I now see my problem is the pdf of the BASIC manual I've downloaded is missing the page about OPEN, and goes straight on to *OPEN. If I can find the full manual, I can probably answer my own question.

James Harland

unread,
Nov 14, 2025, 1:58:18 PM (13 days ago) Nov 14
to retro-comp
My challenge now is that I appear to have a UK HX-20, which has no # symbol, but £, but OPEN "I",£1"CAS0:HARWARE.TXT" gives SN Error. I've tried * and @ instead, but no dice. I hope I don't have to open up the compuer and dip into the DIP switches...

James Harland

unread,
Nov 14, 2025, 2:04:49 PM (13 days ago) Nov 14
to retro-comp
OK the problem was not with the pound symbol, which turns out to be CHR$(35) in any case, but with the lack of a comma in the example in the manual:

OPEN "I",£1,"CAS0:HARWARE.TXT" works

James Harland

unread,
Nov 14, 2025, 2:32:46 PM (13 days ago) Nov 14
to retro-comp
I thought this would work but it doesn't seem to. The tape searches but doesn't stop, thought I know the file is there.

10 OPEN "I",#1,"CAS0:PREVIOUS.TXT"
20 LINE INPUT #1,A$
30 PRINT A$
40 IF EOF(1) THEN CLOSE #1 ELSE GOTO 20

Reply all
Reply to author
Forward
0 new messages