Building the CP/M Memory Image
Will I have built and tested boot.asm, echo.asm and cbios.asm with echo.asm.
So now to put them together! Well I started that, putting cpp.asm and bdos.asm (from https://github.com/brouhaha/cpm22), and my cbios.asm into a single assembler file but there are various label conflicts between the files if you put them together. So while I did put them together and compiled, I was not happy with the approach because of the risk of an error 9and the prospect of tracking the error down).
A better approach is to load the individual i8hex files into RAM. The boot.asm file would be a single "jump cbios" instruction.
That okay but now I am thinking about what happens when CP/M meets an unformated disk image. At the moment if the directory structure is "initialised" then no problem.
So now I have to check the workings of the directory structure, I am guessing that if the directory structure is all zeros then it will see an empty disk.
No, according to https://obsolescence.wixsite.com/obsolescence/cpm-internals the first char of the file name should be E5h if empty.
Okay, I can do that. Not sure what the [cr][DMA] stuff at the end of the directory entry is?
http://cpuville.com/Code/CPM-on-a-new-computer.html says each empty directory entry should have a e5h and he just fills his whole disk with e5h (over kill!).
Okay, I think I know enough to proceed.
Now the Fun! Starts
my CP/M EMU Console - Written by Alan Cooper (AlanCooper@StartMail.com) Bdos Err On A: Select
Somehow not unexpected but it does say start, cbios, ccp and bdos are talking to each other.
Likely an error in my cbios code.
Update
After a bit of debugging I realised I need to see the labels/symbols matching the PC. It makes life so much easier knowing what subroutine is being called or jumped to.
Anyway after a day I have partial success:
my CP/M EMU Console - Written by Alan Cooper (AlanCooper@StartMail.com) A>DIR NO FILE A>SAVE 3 X.COM A>DIR A: X .COM A>B: B>DIR NO FILE B>C: C>DIR NO FILE C>D: D>DIEER <- A type error which I corrected NO FILE D>E: <- Locks up when accessing an illegal drive
The "DIEER" simply means the backspace cannot undo a character that has been sent to the console. But the "E" was deleted as the command succeed. "Delete" does not work as well. But checking the manual, it says to use ^H, and that works.
The fail was the "E:", it locked up the machine.
An "F:" generates a different that I cannot escape.
A>F:
Bdos Err On F: Select
- Bdos Err On F: Select
- ...
Okay, fixed "E:", The "F:" issue is because a warm boot is initiated but there is no system on the disk.
Fixed problem with switching disks:
my CP/M EMU Console - Written by Alan Cooper (AlanCooper@StartMail.com) A>DIR NO FILE A>SAVE 80 X.COM A>DIR A: X COM A>B: B>DIR NO FILE B>A: A>DIR A: X COM A>REN X.COM Y.COM FILE EXISTS Y.COM? A>DIR A: X COM A>REN Y.COM X.COM Y.COM? A>ERA X.COM A>DIR NO FILE A>
I have a problem with REN? No, just don't know how to use it!
A>SAVE 80 X.COM A>DIR A: X COM A>REN Y.COM=X.COM A>DIR A: Y COM A>
Okay, it looks pretty good now. Next is to build a boot image.
AlanX
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.