8008guy
Veteran Member
Does cpm have an equivalent way to auto start and run a program on power up?
Can I assume that it's possible to run a program from any drive with e:clock as the atart up command?
Great job on the video Mike
The copy of cpm I want to modify is the one Grant Searle did for his minimalist cpm on a breadboard machine.
Not sure if you have seen my microtv clock... For anyone but me it's a lot of work to get running.
http://www.chronworks.com/TvClock/
Right now I have a little terminal built in that I plug in a keyboard and monitor to bring up cpm and start the clock. The cf card is partitioned into 8 drives. I have the clock sw on e: I can put the software on the a: drive if necessary. Can I assume that it's possible to run a program from any drive with e:clock as the atart up command?
Anywho, that's a bit of background for you.
Cheers,
Len
Looks like Grant's BIOS jumps to the first jump in the CCP when entering CP/M (both cold and warm boot) which WILL run a command line. His BIOS has no flags for controlling options for executing or not, or for selectively running for cold and/or warm boot.
In Grant's CP/M implementation, the CCP is at D000h in memory. To do what you want, follow "Part 2 Putsys" in the "Installing CP/M" section on Grant's website. Then, before running PUTSYS, put your command string ("e:clock") into memory starting at D008h. Follow the ASCII string with a zero byte. Put the length of the string (7) at location D007. Then run PUTSYS. Upon rebooting (both cold and warm), e:clock will be run.
Let me know how it goes.
Mike
If Grant's BIOS doesn't differentiate between warm and cold start, then you are stuck - sort of. Most CP/M BIOSes, and I think Grant's also, reload the CCP from disk each warm boot. They really have to, since CP/M programs are free to use the memory normally occupied by the CCP. So, if your CCP image on disk contains this command, and your BIOS doesn't jump to CCP+3 on warm start, then you're kinda stuck. But, if you make a simple modification to the BIOS so that warm boot jumps to CCP+3 (and leave cold boot to jump to CCP+0), then you should have the flexibility to enter and exit clock mode as desired.
Thanks Mike,
Tomorrow I will make a back up of my cf card and give it a try.
So what you are telling me is that one I make the change I wont be able to warm boot back to a cpm prompt?
Len
How does your program exit? If it exits with a jump to zero (i.e., warm boot), then you are correct, you won’t be able to exit to a CP/M prompt. If it exits with a RET instruction to the CCP, then you will get a prompt.
In either case, you are better off patching the BIOS to jump to the 2nd CCP entry for warm start. Shouldn’t be hard to patch in memory as long as there are a few bytes of spare space at the end of the BIOS to put the patch.
Mike
Can the bios be modified on the system in-flight? Or do I need to assemble that elsewhere? I supose I'm at the edge of the RTFM area...
Len
Did you pick up a binary BIOS image to flash on to disk? Or compile from assembler source code? If you can point me at what you used I could patch it for you.
I'm not sure what all is required to build a system image, but here's updated source (ASM) files for CBIOS, along with LST and HEX files. I also added a "diffs" file to show what I changed. I went for minimal changes rather than elegance, etc. I used ZMAC, so the HEX files are in traditional 16-byte lines instead of 24. I also had to change the 'list' symbol in CBIOS because that's a reserved word.
View attachment 44229
I don't have anyplace to test it, but I think someone can look at the diffs and/or code and see if looks right. Hope this helps.