|
Forum Index : Microcontroller and PC projects : MMBasic: Exiting running program
| Author | Message | ||||
| Decoy Senior Member Joined: 02/08/2019 Location: DenmarkPosts: 109 |
Hi guys Sorry for hammering you these days, but I am attempting to get into MMBasic. When I run a program, I use CTRL + C to stop it. If I am within the editor, I will then have to enter by typing 'edit' again. Is there a way to exit the running program and just still be in the editor? Thanks! |
||||
| ceptimus Senior Member Joined: 05/07/2019 Location: United KingdomPosts: 130 |
I assume you're using a Maximite with a VGA screen and a PS2 keyboard. There is a history buffer accessed by using the up/down cursor keys. So if you type edit the first time, F2 from within the editor and then Ctrl-C to exit your program (or it could exit by some other means) then you just have to press two keys: cursor up, Enter, to get back to the editor. If you wish, you can assign any of the function keys to act as shortcuts. Say you want the F6 key to invoke the editor: OPTION F6 "EDIT"+Chr$(13) (the Chr$(13) is the enter key) Then you just press F6 for the editor. Setting the function key shortcuts doesn't survive after power off, but you can put them in an AUTORUN.BAS program stored on the internal drive A: that gets run automatically, if present, at start up. The AUTORUN.BAS program can assign any function keys, and do any other start-up tasks you wish. If the AUTORUN.BAS program's last line is NEW then it will erase itself so you end up with no program loaded - as you normally would at power-on, but with the function key(s) defined. All this sort of info is in the MMBASIC Language Manual, which you can download from Geoff's website. It runs to 72 pages and is very well written. I printed it out using the 'booklet' option for printing from Windows: it prints 4 pages to an A4 sheet, 2 pages on the first side and after it's printed out a bunch of pages, you get prompted to turn the pages over and feed them back into the printer so it can print the remaining pages on other sides. It's clever enough to print the pages in some weird order so that eventually when the booklet is assembled, all the page numbering comes out right. I don't know if Windows does this for all printers - I don't see why it shouldn't. Then you can fold the printed pages down the middle and staple on the centre fold to get a nice A5 booklet. I find it an invaluable reference - much better than having to fire up a PC or tablet stood next to the Maximite to peruse the manual. Edited 2019-08-10 22:01 by ceptimus |
||||
| Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3308 |
This does not make sense. If you are within the editor you cannot "enter it" again. If you have stopped a program, EDIT will take you back into the editor. I think that some clarification is required. Geoff Geoff Graham - http://geoffg.net |
||||
| ceptimus Senior Member Joined: 05/07/2019 Location: United KingdomPosts: 130 |
I think he means pressing F2 from within the editor, which can make it seem like you're running the program from inside the editor, even though you're not really doing that. Edited 2019-08-11 00:23 by ceptimus |
||||
| Decoy Senior Member Joined: 02/08/2019 Location: DenmarkPosts: 109 |
Yes, this is what I meant! |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |