Locomotive BASIC emulator or equiv BASIC TGB

I have several programs which I run on an 8 bit CP/M machine (Amstrad CPC6128).  The native language of the machine is (interpretive) Locomotive Basic which has a useful feature relating to “printing”.   It uses streams 0 - 9 to which the "print" can be directed,  0 - 7 direct output to a “screen”, 8 to the printer and 9 to a file.

This means that, by changing the “stream expression”, the same coding can be used to display on the screen, print hard copy or to a file by different passes of the program.

I can convert the straight text from the Amstrad (on 3” floppy) to PC format but need to find a DOS or Windows Basic with a similar feature.  Otherwise I’ve got to triplicate each print statement and proceed with “IF stream is ??? print to screen/printer/file”.

The only other possibility is a good Locoscript emulator on the PC.  It doesn’t need to be fast nor compile.

green baron
greenbaronAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jhanceCommented:
How about this:

http://www.simtel.net/pub/simtelnet/msdos/emulate/myz80111.zip

It's a Z-80/CPM emulator that runs under DOS.  I've run many of my old CPM programs on it under both Windows 9x and Windows NT.  It's getting pretty old but still works perfectly.  On my PII/400, execution speed is faster than the fastest Z80 ever made!!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
greenbaronAuthor Commented:
For the moment I won't accept or reject until I've had a try.  My worry is whether it will recognize the (Amstrad) Locomotive BASIC commands.
green baron
I'll be back!
0
vikiingCommented:
You have other approach: you can specify an OPEN statement, where you can open:
a) A file
b) The CON device
c) The PRN device

option a) directs output to a given file; b) directs to the screen and c) goes directly to the printer.

Then, you only need open a variable "file name", like:

INPUT "Your option";OP%
IF OP%=1 THEN A$="yourfile"
You have other approach: you can specify an OPEN statement, where you can open:
a) A file
b) The CON device
c) The PRN device

option a) directs output to a given file; b) directs to the screen and c) goes directly to the printer.

Then, you only need open a variable "file name", like:

INPUT "Your option";OP%
IF OP%=1 THEN A$="yourfile"
IF OP%=2 THEN A$="CON"
IF OP%=3 THEN A$="PRN"

OPEN A$ FOR OUTPUT AS #1


From there, all your output must be made thru channel #1 and voilá !!

0
Redefining Cyber Security w/ AI & Machine Learning

The implications of AI and machine learning in cyber security are massive and constantly growing, creating both efficiencies and new challenges across the board. Join our webinar on Sept. 21st to learn more about leveraging AI and machine learning to protect your business.

greenbaronAuthor Commented:
For the moment I'll acknowledge your response until I've had time to really understand it - first reading is never enough for me!

Just to recap, the single output line in Locomotive Basic:

PRINT ch#,"stuff to be written"
(where ch is the variable I use, not a reserved word) will,
with ch=0 (to 7)send output to a screen
with ch=8 send output to the printer
with ch=9 send output to "the" file (one major restriction of Loco Basic is only one file open at a time - has made for some interesting programming in the past with much use of arrays to store either the input or output file!

I'll come back as soon as I've given your interesting idea a try
Thanks
green baron
0
vikiingCommented:
>>PRINT ch#,"stuff to be written"

If that's the right syntax, you only have to change ch# yo #ch and it will work smoothly.

If you keep on going on DOS environment, you can use Borland's Turbo Basic, an EXCELLENT tool for developing.
0
greenbaronAuthor Commented:
Yes I do have Turbo Basic and DOS is fine for these applications - thanks - the points are yours evem though I haven't tried yet.  I let you know how I get on
green baron
0
vikiingCommented:
Mmmm... points were already (fairly) awarded to Jhance.

Anyway, give a try to TB.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Hardware

From novice to tech pro — start learning today.