Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:36 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMM: How can you capture text Printed from BASIC

Author Message
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 05:34pm 22 Oct 2019
Copy link to clipboard 
Print this post

Hi there,

Is there a mechanism to capture text output by the Print command in a file?

Regards,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 06:03pm 22 Oct 2019
Copy link to clipboard 
Print this post

I've decided my initial post was too terse.

The background is that I am writing a Z-machine interpreter for the CMM, or at least attempting to. I think it is a race as to what will kill the project: poor performance or insufficient memory.

I need to share debugging output with a domain expert who doesn't have access to a CMM, hence the need to capture the output in a file.

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7937
Posted: 06:07pm 22 Oct 2019
Copy link to clipboard 
Print this post

I assume it's the same as the MM+, with an SD card?

You can OPEN filename$ FOR OUTPUT AS [filenumber]

then you can

PRINT #[filenumber], whatever you want to print (don't forget the comma)

CLOSE [filenumber]

That will write the text or whatever to the file. I don't know of any way to use the normal PRINT statement to do that. Perhaps someone else does?
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 06:22pm 22 Oct 2019
Copy link to clipboard 
Print this post

Thanks, but what I'm really hoping to do is capture/redirect the output from the normal Print command.

Otherwise I'll need to write a wrapper subroutine around Print.
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10310
Posted: 06:25pm 22 Oct 2019
Copy link to clipboard 
Print this post

If you are connected to a computer just use the log function in teraterm
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 06:34pm 22 Oct 2019
Copy link to clipboard 
Print this post

  matherp said  If you are connected to a computer just use the log function in teraterm


Right, I was just browsing the manual and discovering the same whilst you were replying. For masochistic reasons (and so it seems less like my day job) I have been trying to avoid using my 21st century computer on this project, but possibly this is a case of "needs must".

Thanks.
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025