CP/M on H8

167 views
Skip to first unread message

smp

unread,
Nov 12, 2023, 1:30:59 PM11/12/23
to SEBHC
Good afternoon all,

I am having a blast with my H8, newly upgraded with a H8 Z80 2023.

One thing I have always done with my vintage computer systems is to get fig-FORTH running, either as a stand-alone system on its own, or as a language launched from CP/M.

On every CP/M system I've had, if I have 56K RAM or more, I have always been able to get the fig-FORTH source code into the editor, and then get the file assembled, loaded, an run.  On some of my systems (like Northstar) where I've been disk file size limited, I have had to remove the comments from the source code file in order to get it into the computer.  I usually have to delete the .BAK files to save disk space.  Then when assembling, I usually eliminate creating a .PRN file, again to save disk space.

CP/M on my H8 does not act the same way.  I cannot get the entire source code file into ED.  And if I break the file into two source code files, I cannot use PIP to join them into one larger file.

The fig-FORTH source code file without any blank lines and with all comments removed is a 38K text file.  ED will only accept about 37K of it before it chokes and will take no more input.  If I break the source into two files, PIP will choke when attempting to join them together.  This will occur either on the first file, if it is too large, or on the second file if the first file is 30K or less in size.

Anyone out there more expert that I am with CP/M on the H8?  Does the H8 CP/M have some file size restrictions built in?

Anyway, I have fig-FORTH working on my H8 now, because I was able to grab the .HEX file from another system I have running CP/M with plenty of disk space.

I'm just curious about why CP/M works differently this way that any of my S-100, or all-in-one systems that I have.

Thanks for listening!

smp

Mark Garlanger

unread,
Nov 12, 2023, 3:21:19 PM11/12/23
to se...@googlegroups.com
Not sure about the CP/M limitations, but just wanted to point out there is a bootable figForth on my site - https://heathkit.garlanger.com/software/OSes/figForth/

Mark


--
You received this message because you are subscribed to the Google Groups "SEBHC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sebhc+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sebhc/65b3b46f-f14b-449f-8387-ed10ecbe0b15n%40googlegroups.com.

smp

unread,
Nov 12, 2023, 4:09:16 PM11/12/23
to SEBHC
Thanks very much for the pointer, Mark!
I’ll give these a go.

smp

Douglas Miller

unread,
Nov 12, 2023, 4:09:34 PM11/12/23
to se...@googlegroups.com

Did you "rebuild" CP/M for your memory size? How much memory do you actually have? If you're still using the 32K "distro" CP/M then you won't be taking advantage of any extra memory.

As far as PIP is concerned, it should handle files larger than available memory. We might need more information about how PIP is failing to combine the files, including the error and your commandline.

smb...@gmail.com

unread,
Nov 12, 2023, 4:27:45 PM11/12/23
to SEBHC
Mark, I've recently kindled my interest in Forth, having recently implemented Jonesforth on the 8008. Next I wanted to get a forth variant up and running on my 8085 board.  I'm really curious about this FigForth implementation. It says "H89"... Will it also work on an 8080-based H8?

Scott

smp

unread,
Nov 12, 2023, 5:14:20 PM11/12/23
to SEBHC
Doug, I stated in my opening post that I am using an H8 Z80 2023.  That CPU comes with 64K RAM and the Org 0 circuitry.
I’ve been using both a 64K and a 56K “build” of CP/M.

When I send the source code text into the ED editor (as I have on many different CP/M systems) I set the terminal to delay 50 mS after every character and 200 mS after every line.  I put ED into insert mode with the I command, and then send the file into it from the terminal.  After about 37 K characters later, Ed indicates a BREAK and stops taking input.  This has not happened on any other CP/M system I’ve used.

Like I said before, if I split the source code file into two parts, and get the two parts into files on disk, I then use PIP to join the two files together into one file:
PIP B:WHOLE.ASM=B:P1.ASM,B:P2.ASM

Depending on the file sizes, PIP will stop (I sense this when the disk drive stops all activity) either in the first file or the second one.  That is, if the first file is 37K and the second file is 1K, then PIP will stop during the processing of the first file.  If the first file is 30K, and the second file is 8K, then PIP will stop during the processing of the second file.

That’s about all I can describe.  Hopefully, it helps your understanding.

smp

Mark Garlanger

unread,
Nov 12, 2023, 5:20:53 PM11/12/23
to se...@googlegroups.com
I haven't tried it on an H8, but the title screen does say "8080 H-89", so it should run on an 8080 system like the base 8080.

Douglas Miller

unread,
Nov 12, 2023, 5:30:47 PM11/12/23
to se...@googlegroups.com

I did not realize you were stuffing the "file" into ED using the console.

But the fact that you seem to be running into a problem when the memory around/above 32K gets written to, that starts to look like a hardware problem (e.g. as if writing to memory at 32K is actually altering memory somewhere else).

--
You received this message because you are subscribed to the Google Groups "SEBHC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sebhc+un...@googlegroups.com.

Richard Davis Jr.

unread,
Nov 13, 2023, 6:18:24 AM11/13/23
to se...@googlegroups.com
You can check where CP/M is loaded in memory to get a rough guess on how much memory you have for programs.
Do the following

ddt
d0

It will dump low memory.
The first three bytes is a jump into BIOS warm boot jump vector.
Use the third byte and subtract 16H from it.Multiply by 100H. This will give you a rough guess of how much memory you have for programs.

Rick


--
You received this message because you are subscribed to the Google Groups "SEBHC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sebhc+un...@googlegroups.com.

Douglas Miller

unread,
Nov 13, 2023, 8:22:34 AM11/13/23
to se...@googlegroups.com

Just to expand on what I meant about this looking like a hardware problem:

Imagine if A15 were stuck low (on SRAM chip or on PCB or from Z80). The system would appear to have 64K memory but in reality it was only 32K mirrored between the low and high 32K of the address space. CP/M would be loaded into high memory, but would also appear in the high portion of the low 32K. As soon as a program started to use memory above ~30K, it would start overwriting the BDOS and BIOS (and possibly its own stack) - at which point things start to malfunction/hang/crash.

smp

unread,
Nov 13, 2023, 3:48:54 PM11/13/23
to SEBHC
@Douglas, your memory issue seemed unlikely to me since I just purchased my new H8 Z80 a couple of weeks ago.

However, just to be certain, I took the H8 Z80 CPU out, and replaced it with my original 8080 CPU, separate 64K RAM, and separate ORG-0 boards.
I tried to get the same fig-FORTH file into the editor just like before, and I got the same error just like before.  ED complained with a BREAK at line 3330 in the source file.  This was perhaps a few lines earlier in the file than I had remembered from before, but pretty much in the same area.

Now I have this issue with two completely different sets of hardware.  I believe the hardware is not at fault here.

Next, I will have to download a completely new CP/M disk, and see if somehow I have a corrupt version on my disk.  Any other comments, thoughts or suggestions will be welcome!

Thanks for listening.

smp

smp

unread,
Nov 13, 2023, 4:13:04 PM11/13/23
to SEBHC
@rickdav, thanks for this tip.  I have not used DDT very much.

The dump shows C3 03 EE as the first 3 bytes.  This means that the BIOS is way up there at 0EE03H, nice and high in the memory.

EEH - 16H = D8H, and D8H x 100H = D800H = 55296D, so I seem to have plenty of memory to work with.

smp

Douglas Miller

unread,
Nov 13, 2023, 4:38:16 PM11/13/23
to se...@googlegroups.com

Note that the official top-of-memory is the BDOS address (JMP at 0005H), which is below the BIOS. since this is a standard CP/M BDOS, you could just subtract 3.5K (0E00H). Finding the starting address of the BDOS using DDT is more complicated because DDT has modified it.

--
You received this message because you are subscribed to the Google Groups "SEBHC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sebhc+un...@googlegroups.com.

Richard Davis Jr.

unread,
Nov 14, 2023, 5:39:11 AM11/14/23
to se...@googlegroups.com
That's way up there.
Locations 5-7 are the jump to BDOS which is lower.

Rick


--
You received this message because you are subscribed to the Google Groups "SEBHC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sebhc+un...@googlegroups.com.

smp

unread,
Nov 14, 2023, 4:33:41 PM11/14/23
to SEBHC
Today, I generated a brand new HDOS 2 boot disk, and I was able to use EDIT to get the entire fig-FORTH source file onto a blank HDOS disk.

Now I am studying how to generate the HDOS Assembler so I can try assembling fig-FORTH given my small floppy disk storage space.

At this point, I have done in HDOS what I (so far) have not been able to do in CP/M.  I'll keep you posted.

smp

Glenn Roberts

unread,
Nov 14, 2023, 6:26:50 PM11/14/23
to se...@googlegroups.com
There’s an age-old (friendly) rivalry between the CP/M and HDOS camps. Score one for team HDOS 😀

Nice work…!

As you may have already discovered, the HDOS assembler is fussy about line endings. It uses Unix-style newline endings.  You’ll need to strip out CRs…

Sent from my iPad

On Nov 14, 2023, at 4:33 PM, smp <stephen.m....@gmail.com> wrote:

Today, I generated a brand new HDOS 2 boot disk, and I was able to use EDIT to get the entire fig-FORTH source file onto a blank HDOS disk.

Now I am studying how to generate the HDOS Assembler so I can try assembling fig-FORTH given my small floppy disk storage space.

At this point, I have done in HDOS what I (so far) have not been able to do in CP/M.  I'll keep you posted.

smp

--
You received this message because you are subscribed to the Google Groups "SEBHC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sebhc+un...@googlegroups.com.

rw...@robhome.com

unread,
Nov 14, 2023, 6:30:25 PM11/14/23
to sebhc Google Group
There is a HDOS to CP/M converter that allows you to move HDOS files to CP/M. I wonder if now that you have the file on an HDOS disk, I wonder if you can “convert” it to CP/M.

Just an idea…


From: se...@googlegroups.com <se...@googlegroups.com> On Behalf Of Glenn Roberts
Sent: Tuesday, November 14, 2023 5:26 PM
To: sebhc Google Group <se...@googlegroups.com>
Subject: Re: [sebhc] CP/M on H8

There’s an age-old (friendly) rivalry between the CP/M and HDOS camps. Score one for team HDOS 😀

Nice work…!

As you may have already discovered, the HDOS assembler is fussy about line endings. It uses Unix-style newline endings. You’ll need to strip out CRs…

Sent from my iPad


On Nov 14, 2023, at 4:33 PM, smp <stephen.m....@gmail.com<mailto:stephen.m....@gmail.com>> wrote:
Today, I generated a brand new HDOS 2 boot disk, and I was able to use EDIT to get the entire fig-FORTH source file onto a blank HDOS disk.

Now I am studying how to generate the HDOS Assembler so I can try assembling fig-FORTH given my small floppy disk storage space.

At this point, I have done in HDOS what I (so far) have not been able to do in CP/M. I'll keep you posted.

smp
--
You received this message because you are subscribed to the Google Groups "SEBHC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sebhc+un...@googlegroups.com<mailto:sebhc+un...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/sebhc/e2175097-2ddd-46f6-85a2-840b015da827n%40googlegroups.com<https://groups.google.com/d/msgid/sebhc/e2175097-2ddd-46f6-85a2-840b015da827n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups "SEBHC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sebhc+un...@googlegroups.com<mailto:sebhc+un...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/sebhc/27B36306-201B-45BF-91F5-8A2DCA40E6E5%40gmail.com<https://groups.google.com/d/msgid/sebhc/27B36306-201B-45BF-91F5-8A2DCA40E6E5%40gmail.com?utm_medium=email&utm_source=footer>.
winmail.dat

Joseph Travis

unread,
Nov 14, 2023, 9:46:13 PM11/14/23
to se...@googlegroups.com
You can find CPM2HDOS and HDOS2CPM in my C80 Stuff google folder here:



smp

unread,
Nov 15, 2023, 1:33:31 PM11/15/23
to SEBHC
Joe, thanks very much for the pointer!
Here is my stupid question:
How do I actually download those files once I'm there?

smp

glenn.f...@gmail.com

unread,
Nov 15, 2023, 2:16:37 PM11/15/23
to se...@googlegroups.com

To download from google drive you have to “open” the file first for “preview”. Double click on the file and Google will try to open a preview, then from the preview window there will be a download icon in the upper right.

 

 

If its an ABS or some binary format that Google doesn’t know how to preview then when you double click it will directly give you the download option:

 

 

 

 

From: se...@googlegroups.com <se...@googlegroups.com> On Behalf Of smp
Sent: Wednesday, November 15, 2023 1:34 PM
To: SEBHC <se...@googlegroups.com>
Subject: Re: [sebhc] CP/M on H8

 

Joe, thanks very much for the pointer!

image001.png
image002.png

smp

unread,
Nov 15, 2023, 3:57:20 PM11/15/23
to SEBHC
Thanks very much, Glenn - I feel pretty dumb, but if I didn't ask, I wouldn't know.

smp

smp

unread,
Nov 15, 2023, 4:02:45 PM11/15/23
to SEBHC
Here is my latest update:

I created an HDOS disk with the assembler on it, and I was able to assemble my FORTH.ASM file.
Of course, I got 149 errors because the source file is intended for the CP/M assembler.

However, this kind of proves that there does not seem to be any file size limits in HDOS, and my system running HDOS can handle large files like the 38K FORTH.ASM file.

smp

Douglas Miller

unread,
Nov 15, 2023, 4:07:08 PM11/15/23
to se...@googlegroups.com

Just to be clear, there should NOT have been an such limit in CP/M, either. Either you've got a corrupted copy of CP/M, or there is some other problem with this system that does not show up under HDOS. Or, does not show up the same way under HDOS.

--
You received this message because you are subscribed to the Google Groups "SEBHC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sebhc+un...@googlegroups.com.

smp

unread,
Nov 15, 2023, 4:21:16 PM11/15/23
to SEBHC
I understand what you are saying, Douglas, but there are only a limited number of bootable download disks for CP/M available, and I've tried both of them.
My specific problem exists when I use either of these:

CP/M 2.2.03 H17/H37 BOOT DISK
CP/M 2.2.03 BIOS80 BOOT

Any thoughts on this besides going back and regenerating a CP/M boot disk from scratch?

smp

smp

unread,
Nov 15, 2023, 4:23:15 PM11/15/23
to SEBHC
That should have been:   CP/M 2.2.03 H17 BIOS80 BOOT

smp

Douglas Miller

unread,
Nov 15, 2023, 4:27:34 PM11/15/23
to se...@googlegroups.com

I can see if I can reproduce this behavior on my simulator, but I'd be surprised if it is there. But, I'm not sure how many people are using ED.COM. The last Heath CP/M version was 2.2.04, as far as I know, but I don't think there was this sort of bug.

One problem with all these images is that we can't always be sure of their pedigree. I've seen plenty of cases (outside of Heathkit systems) where a bad image gets propagated all over.

--
You received this message because you are subscribed to the Google Groups "SEBHC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sebhc+un...@googlegroups.com.

Joseph Travis

unread,
Nov 15, 2023, 5:09:14 PM11/15/23
to se...@googlegroups.com
MAPLE is a modem / terminal program available for both HDOS and CP/M as a H8D file.  It's not terribly intuitive but is capable of sending / receiving files via Xmodem (checksum) protocol.  By default, it uses I/O port 330Q and INT 5.

It's not the best but it gets the job done.  I use it regularly and like that it operates the same for either OS.  Good luck!

Joe


glenn.f...@gmail.com

unread,
Nov 15, 2023, 6:33:43 PM11/15/23
to se...@googlegroups.com

The full original Heath distribution of CP/M 2.2.04 is available. It was four (H17) disks

 

https://github.com/sebhc/sebhc/wiki#cpm-2204

 

if you want to start from a clean reference point this would be the place.

 

The manuals are here:

https://sebhc.github.io/sebhc/documentation.html

 

 

You should be able to create clean copies of these via the H8D utility…

 

  • Glenn

 

 

From: se...@googlegroups.com <se...@googlegroups.com> On Behalf Of smp
Sent: Wednesday, November 15, 2023 4:21 PM
To: SEBHC <se...@googlegroups.com>
Subject: Re: [sebhc] CP/M on H8

 

I understand what you are saying, Douglas, but there are only a limited number of bootable download disks for CP/M available, and I've tried both of them.

--

You received this message because you are subscribed to the Google Groups "SEBHC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sebhc+un...@googlegroups.com.

image001.png
Reply all
Reply to author
Forward
0 new messages