Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CP/M-80 on V20

196 views
Skip to first unread message

Paul Edwards

unread,
Jul 17, 2023, 7:17:10 PM7/17/23
to
Hi folks.

I have suddenly got an interest in the 8080 because I
ordered one of these new laptops:

https://www.ebay.com/itm/134615009272

which at least according to the picture has an NEC V20 in it.

Note that I've never run CP/M (any flavor) in my life (not
even under emulation).

I have written a public domain OS for the 8086 called PDOS/86,
available here:

http://pdos.org

I was thinking of having a flavor of it called PDOS/86-V20
which is designed to run CP/M-80 applications. So any
.com files are treated as 8080 binaries and a switch to
8080 mode is done.

There are three routes I could take:

1. Create a CP/M-80 clone, so that CP/M-80 apps can do
a c=9 to display string, and that is handled by PDOS/86
(or possibly an app under PDOS/86), and the 8086
infrastructure will take care of it. 22Nice does roughly
this already, basically (or used to).

2. Run the real CP/M-80 and replace the CP/M BIOS layer
with stubs to go back to 8086 mode to handle it.

3. Create my own OS for the 8080 which is not compatible
with anything else. I have something specific already,
which I call PDOS-generic. It is similar to UEFI - apps are
expecting to receive callback functions via a structure
pointer on the stack.

I'm good with C code. My 8086 assembler is mediocre.
My 8080 assembler is non-existent, but I've taken a look
at some of it and it seems doable.

Is anyone interested in working with me on this?

Note that I am only interested in public domain code.
BDS C is of interest to me for this reason too.

Thanks. Paul.

Phil G

unread,
Jul 18, 2023, 6:54:28 AM7/18/23
to
On Tuesday, July 18, 2023 at 12:17:10 AM UTC+1, Paul Edwards wrote:
> Hi folks.
> I have suddenly got an interest in the 8080 because I ordered one of these new laptops:
> https://www.ebay.com/itm/134615009272 which at least according to the picture has an NEC V20 in it.
...Thanks. Paul.

Whilst the OS project is fascinating, hardware-wise this machine in itself has stirred up a lot of interest so we'd love to hear how you find it :)
Ta v much
Phil

Paul Edwards

unread,
Jul 25, 2023, 3:50:52 AM7/25/23
to
On Tuesday, July 18, 2023 at 6:54:28 PM UTC+8, Phil G wrote:

> > Hi folks.
> > I have suddenly got an interest in the 8080 because I ordered one of these new laptops:
> > https://www.ebay.com/itm/134615009272 which at least according to the picture has an NEC V20 in it.
> ...Thanks. Paul.
>
> Whilst the OS project is fascinating, hardware-wise this machine in itself
> has stirred up a lot of interest so we'd love to hear how you find it :)

Hi Phil.

The machine arrived yesterday and it works. I made videos about
it yesterday, and uploaded them today to http://pdos.org (down
the bottom - on my vlog).

I made more videos today but haven't uploaded them yet.

I also ordered another one in case this one dies.

Good news is that it does indeed have an NEC V20, although
it wasn't guaranteed in the description.

I haven't attempted to get to 8080 mode yet. Still doing other
things in 8086 mode.

Let me know if there is something specific you want to know.

Also as per my vlog I have questions about the hardware - can
I connect an external floppy drive and boot from that? And can
I have a serial port? And can I back up this CF using a device
on my PC?

The manuals are here:

https://drive.google.com/file/d/1WeAeEXDMUuTTd2KjlhRJ_DjXyG0LDcaI/edit

BTW, it was indeed a Book 8088, even though it wasn't
advertised as that.

BFN. Paul.

Phil G

unread,
Jul 25, 2023, 6:17:56 AM7/25/23
to
Thanks Paul, I watched the videos and it looks really good. I was thinking I could revisit my 1990's MASM days when I did loads of utilities & tools for my employer BT,
mostly in 8086 assembler and a few in Borland Turbo C. A lot of my stuff was TSR's, I had a system for registering each TSR in memory so you could list them, test residency, uninstall etc
My first PC compatible after CP/M was an Opus PCII which was a V20 with a 4.77 or 10mhz switch. Ran a Fido BBS and a ham radio AX25 BBS on it for several years using DoubleDOS and later Desqview.
I'd wondered about trying to find an original PC or XT on ebay but collectors have made them so expensive - the option of a brand new machine is tempting and probably cheaper :)
I'd be interested to see a Norton SI ("System Information") screen, see if the clock really is 4.77 Mhz and what its "SI rating" is :)
Looking at various listings I see some come with an ISA extension so maybe an external 8250 com port would work (I'm sure I have one somewhere!) or maybe the bios supports the 16550.
All very interesting,
Many thanks - Phil

Dennis Boone

unread,
Jul 25, 2023, 11:54:28 AM7/25/23
to
> My first PC compatible after CP/M was an Opus PCII which was a V20 with
> a 4.77 or 10mhz switch. Ran a Fido BBS and a ham radio AX25 BBS on it
> for several years using DoubleDOS and later Desqview.

I'd say "running Opus CBCS, I hope", but I suppose it might have been
too early for that. :)

De

Phil G

unread,
Jul 25, 2023, 12:27:04 PM7/25/23
to
>>Dennis Boone
No relation to Doug Boone? :)

Paul Edwards

unread,
Jul 25, 2023, 7:33:31 PM7/25/23
to
On Tuesday, July 25, 2023 at 6:17:56 PM UTC+8, Phil G wrote:

> Thanks Paul, I watched the videos and it looks really good.

Ok, great. I'm struggling to upload yesterday's videos.
I have about 2 hours, mostly usage of the machine.

> I was thinking I could revisit my 1990's MASM days when I

We now have a public domain assembler (as86) compatible
with masm (subset), so it can be done legally.

I'm after some public domain (explicit notice) 8086 code to switch
into 8080 mode and execute a few instructions to prove that
the 8080 works (bearing in mind that I have never used an 8080
ever - well, not knowingly). I can video that being tested.

I wrote these notes:


I believe there is an intel 8080 syntax similar to 8086, but
there are rival assembler syntaxes (from zilog z80 and others
I think)

CP/M BDOS calls are done with "call 5". Normally "call bdos",
and bdos is a define (equ) of 5.

c=9 : write text with $ terminator. known as C_WRITESTR
text address is given in register pair de somehow (it's a 16-bit
immediate address). Terminator can change if you use
another call.

Semicolon (;) used for comment

Not sure what the reference assembler would be (backdating,
the same as year 0 can be backdated). masm with ".code 8080"?
Or just make the level a parameter to the assembler.

program is exited with "ret"

call opcode is x'cd' (to a 16-bit address)
ret opcode is x'c9' (same as 8086 near return)
lxi (into register pair - give first letter, e.g.
h for hl, d for de, or b for bc). opcode is x'11' for d
opcode to move (mvi mnemonic) 8-bit immediate into c is x'0e'

brkem is the v20 instruction to get into 8080 mode
0f ff is the instruction, followed by a 1-byte
interrupt vector the same as the INT instruction
retem gets out (opcode ed fd). equivalent of iret in that
it loads flags, cs and ip from the 8086 stack


There probably needs to be multiple goals:

1. Replace the CP/M-80 BIOS with calls to 8086 to see
if genuine CP/M-80 can be made to run.

2. Replace CP/M-80 with the equivalent in 8086 code
(using stubs).

3. Implement the PDOS-generic OS in 8080.

4. Implement MSDOS INT 21H calls to the same extent
that PDOS/386 did, but this time going to 8080.

> did loads of utilities & tools for my employer BT,
> mostly in 8086 assembler and a few in Borland Turbo C.

Turbo C 2.0 and Turbo C++ 1.01 were made freely available
by the owner, although you now need to go to archive.org
to get to the page I think.

> I'd wondered about trying to find an original PC or XT on
> ebay but collectors have made them so expensive - the

Yeah - I'm leery about relying on stuff that can only be
obtained from landfill.

> option of a brand new machine is tempting and probably cheaper :)
> I'd be interested to see a Norton SI ("System Information") screen,
> see if the clock really is 4.77 Mhz and what its "SI rating" is :)

If you can provide something that I can legally run, I'd be
happy to do so.

> Looking at various listings I see some come with an ISA extension
> so maybe an external 8250 com port would work (I'm sure I have
> one somewhere!) or maybe the bios supports the 16550.

I don't actually know what this ISA extension is for yet. I am
hoping that I can buy some sort of floppy drive that is capable
of reading DMF disks. Also to be able to boot from a 3.5" floppy.

But yeah - if I can get a COM port, that would be great. I am
happy to use an entire PC as a com port if required. I'm not
sure what my options are.

BFN. Paul.

Dennis Boone

unread,
Jul 25, 2023, 8:21:00 PM7/25/23
to
> No relation to Doug Boone? :)

Hard to tell. :)

De

Phil G

unread,
Jul 26, 2023, 5:31:01 AM7/26/23
to
I'll be looking out for your new videos later Paul, thanks.
My masm, borland turbo c and norton were licensed purchases back in the day so I guess they're still legal, though
personally I really wouldnt worry about that for occasional hobby use :)
Your 'notes' are about right, the CP/M BDOS process is almost identical to DOS and your 8080 opcodes are correct.
Looking at the photos and reading between the lines the ISA extension looks genuine, I'd expect an ISA com port
to work assuming the interrupt structure has been replicated, easy enough to check :)
This machine is looking like a better buy than a rusty old xt, yours is the first I've seen reviewed so we very much
appreciate you posting this feedback, thanks Paul :)
Cheers
Phil
0 new messages