CP/M Boot Menu?

Everything about Memotech CP/M and CP/M Software.
Post Reply
wyerd
Posts: 88
Joined: 13 May 2013 23:16
Location: Upstate New York. USA.

CP/M Boot Menu?

Post by wyerd » 29 Aug 2015 22:48

Is it possible to have a simple menu to appear once CP/M has booted? I'd like to be able to select Newword, SuperCalc, and some games off it. In MSDOS I'd use a batch file, but there's nothing similar in CP/M AFAIK. Any ideas?

Thanks.

Bill B
Posts: 159
Joined: 26 Jan 2014 16:31

Re: CP/M Boot Menu?

Post by Bill B » 30 Aug 2015 08:42

I haven't tried this, but I think it is possible. However the process is more complex than writing a batch file.

You need to create your own menu program, which does the following steps:
  1. Displays your menu of options to select.
  2. Processes user input to select an item.
  3. Creates a file "A:$$$.SUB" with the following contents:
    • Byte 1: Length of command to execute (N).
    • Bytes 2 - N+1: The command.
    • Byte N+2: Null byte (0x00).
    This is how the CP/M SUBMIT command works [Source: "CP/M The Software Bus", A Clarke, MJ Eaton, D Powys-Lybbe, ISBN 0-905104-18-8, chapter 5]
  4. Returns to CP/M (warm boot).
Once the menu program is working, use the STARTUP command so that it is run automatically on boot-up.

Notes:
  • I don't think that you can use FDXB to write the menu program, it does not return cleanly to CP/M. BBC BASIC should be OK.
  • The $$$.SUB file can contain multiple commands, but other than noting that the commands are executed in reverse order, my source does not give details. More research needed.

Martin A
Posts: 406
Joined: 09 Nov 2013 21:03

Re: CP/M Boot Menu?

Post by Martin A » 30 Aug 2015 15:47

FDXB is fine for game selection if you have them in RUN or BAS format, as it's quite happy to USER RUN or USER LOAD other programs.

I've seen one crude menu system that might have been DOS rather than CPM, but the principle is the same.

TYPE MENU.TXT was used to display a simple menu screen, and then all the relevant programs had been renamed to a single letter which was then typed at the command prompt.

I've just faked something similar on the CFX prototype, CPM side. There's an imbedded CLS code at the start of the text file to clear the screen, but if you pad out the "menu" to 23 lines that's not needed.
menu1.jpg
Crudest menu system out
menu1.jpg (18.02 KiB) Viewed 2140 times

wyerd
Posts: 88
Joined: 13 May 2013 23:16
Location: Upstate New York. USA.

Re: CP/M Boot Menu?

Post by wyerd » 30 Aug 2015 17:15

Thanks for the replies and ideas which I'll investigate further.

I stumbled upon this http://www.z80.eu/microshell.html while Googling. I might just do the job as long as it doesn't take up too much memory.

User avatar
JonB
Posts: 101
Joined: 08 Nov 2013 11:16

Re: CP/M Boot Menu?

Post by JonB » 07 Sep 2015 17:29

You could get the menu program to inject the launch command direct into the CCP's command buffer then jump to the routine that interprets it.. Now that would be cool, but you would need to work out where everything is by disassembling the CCP and comparing with a copy of the source (such as the one I just attached).
Attachments
cpm22.zip
(28.48 KiB) Downloaded 103 times

Post Reply