1. TPA starts at 0100h, but how high uo can I go before I slam into the CCP and start corrupting the OS; given an out of the box base Pro system?
2. Is there a listing somewhere of the I/O port configuration for the boards that make up an out of the box base Pro system running the CP/M 2.2 that is on the supplied CF card?
3. Is there something that shows, or describes, the required jumper config for the boards that are part of the Pro system, intending to run CP/M 2.2?
Thanks Phillip. I've been thinking about this since I read your reply and got to thinking; 'what if my program never stops processing'? As in, once it loads, it constantly runs, and just uses the OS for disk I/O, console I/O, printer I/O, etc. If it reloads CCP & BDOS after each BDOS interaction, then reloading CCP would wipe out my code if I did use up to FBASE. Granted, I am far from being any kind of CP/M 'guru' but, for my own sanity, might it be best to keep my stuff below where CCP runs?
On Wednesday, 3 December 2025 at 21:54:34 UTC+8 Michelle Lawson wrote:Thanks Phillip. I've been thinking about this since I read your reply and got to thinking; 'what if my program never stops processing'? As in, once it loads, it constantly runs, and just uses the OS for disk I/O, console I/O, printer I/O, etc. If it reloads CCP & BDOS after each BDOS interaction, then reloading CCP would wipe out my code if I did use up to FBASE. Granted, I am far from being any kind of CP/M 'guru' but, for my own sanity, might it be best to keep my stuff below where CCP runs?
The return is typically done with a JP 0x0000 or with a RST0 instruction (which will be provided by the CRT0 if you’re using a C compiler for your program). If you’re writing assembly, that should be done by you as the last instruction of a well behaved program.
A summary of BDOS calls is provided here.
--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/rc2014-z80/08617b21-db62-4563-96c6-efbfa814217dn%40googlegroups.com.
1. The SIO-2 board has two serial ports. Port 1 is obviously for the console and thus it's code is baked into CP/M as the CONSOLE. But what about Port 2, is it baked into the provided CP/M, as say the PUNCH/READER; or does Port 2 rely on some external program for use?
2. And if it is an external program, which one(s), and is it provided on the supplied CF Card?
3. Along with that, is the source code for the external program(s) available in case one might want to modify it, or include it in some other program?
--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/rc2014-z80/97416cd5-8a4f-4581-8426-237ce9b088f3n%40googlegroups.com.
Thanks Phillip. I guess what I am looking for is the routine that is used to setup/initialize Port A of the SIO-2 board, so I can change the hardware port numbers, and re-use the code to initialize Port B similarly. Code that loads the various registers in the SIO-2 chip to allow me to send & receive data through it.
--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/rc2014-z80/6cbdddcf-5396-4792-be73-c9a6c65a2451n%40googlegroups.com.
Thanks Phillip. I suspect that is exactly what I am looking for. I've been going though the spec sheets for that chip and trying to map out what I would 'think' are the bit configurations for each of the write registers. The init process is nice and linear and just the stuff I can grasp; and I'll add comments along the way. I'm kinda big on documentation and code comments because I hate to relearn something months down the road. But, in what I am hearing, interrupts are used....
Hmm, I figure that needs to happen for the CP/M Console side of things, but could I turn them off for the Port B side? Maybe for portions of code I write that don't require interrupts.... Or is it a case that if you turn it off for one port, it turns it off for both..... Well, the learning will continue, until the brain improves..... Thanks again
--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/rc2014-z80/b0ac5043-d450-4dcd-b7f4-426f5367e70an%40googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/rc2014-z80/d93e8455-c9f1-450e-af5e-a882798a758dn%40googlegroups.com.
On programming the SIO, if you do decide to do that, I should have also mentioned that CHB WR1 bit D2 (Status Affects Vector) controls both channels. So, if you are reprogramming CHB after both channels have been configured by something else that is using CHA, you will need to maintain the state of that bit or you might mess up whatever is using CHA. For example, in the cbios128.asm that Phillip pointed you to, CHB-WR1-D2 is written with a 0 (status does not affect vector), so you would want to make sure that you also write CHB-WR1-D2 with 0.You mention the cbios128 code checking if there is a character in A, and if not, there is a character in B... Had it used 'Status Affects Vector' it wouldn't need to do that check. It could immediately go to the correct routine (CHA character available or CHB character available).
On Thu, Dec 18, 2025, Michelle Lawson wrote:A lot to digest is an understatement. And some extremely great info too. The comments in the cbios128 code ( ; Check if there is a char in channel A & ; If not, there is a char in channel B ) seem to imply that either, or both, could be used as the console; if I read that correctly. If that is the case I could connect channel A up to my RS232 to Ethernet dongle and have network access, and connect channel B to a locally connected dumb terminal, by setting Clk2 to .6144 to get 9600 baud. That sure adds some versatility to things.
As a side note/question; what address equates to CBASE in the Pro system running CP/M 2.2? From what I see in cbios128.asm, CBASE is 0D000h. Unless I am misreading that, that is the value I will go with. And thank you all again for helping me along my 'RC2014 Path To Enlightenment'.
Of course learning is the exception to this rule. IMHO, the best place to learn about configuring serial ports is to get a ROM burner, and then play with an "on the metal" build. That is very accessible and the learning path most people take with assembly. Zaks has some good initial code for this kind of learning. And, read the SIO technical manual too. You can use the code examples I already linked to build your own solution.
But (one of) the issues with the default CP/M implementation is that it doesn't exploit IM2 capabilities at all.
--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/rc2014-z80/42865a8a-3cf3-4c76-a350-b32463893445n%40googlegroups.com.
it doesn't exploit IM2 capabilities
is not run in IM2 interrupt (fast) mode
Unfortunately the standard RC2014 CP/M does not use IM2
Phillip,Your statement:it doesn't exploit IM2 capabilitiesis more correct than your earlier statements:is not run in IM2 interrupt (fast) modeandUnfortunately the standard RC2014 CP/M does not use IM2
The code you provide references to does use Interrupt Mode 2. It puts a vector into the SIO CHB-WR2 here:
So, it is using Interrupt Mode 2 (IM2), it's just not getting much benefit from it.I only point this out, because people that are new to the Z80 that are reading the code that you linked to might get confused. It is using Interrupt Mode 2, not Interrupt Mode 0 or Interrupt Mode 1. I've never seen IM0 used with a Zilog peripheral device (could you put a RST opcode in the vector register?).
Hmmm, with all this info, I'm thinking it is best for me to just let the base RC2014 CP/M 'Out Of The Box' implementation stay as it is. Then just use BDOS calls as needed to slowly get into the CP/M 'pool'. I am still a bit confused over the " the FBASE, the base of BDOS, is loaded into 0x0006 on boot. This is the address you need to refer to" thing.
If I just run with what came with the kit, as it comes loaded on the CF Card, and without modification, shouldn't that address always be the same? If not, who, or what, changes it? I have two other CP/M machines, one S-100 and the other an SBC, and I never did more than run what it came built as. So, a big head scratch......