![]() |
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 KingdomPosts: 4311 |
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 KingdomPosts: 4311 |
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 KingdomPosts: 7937 |
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 KingdomPosts: 4311 |
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 KingdomPosts: 10310 |
If you are connected to a computer just use the log function in teraterm |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
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 |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |