• CP/M-80 on V20

    From Paul Edwards@21:1/5 to All on Mon Jul 17 16:17:08 2023
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Phil G@21:1/5 to Paul Edwards on Tue Jul 18 03:54:27 2023
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Edwards@21:1/5 to Phil G on Tue Jul 25 00:50:50 2023
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Phil G@21:1/5 to All on Tue Jul 25 03:17:55 2023
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dennis Boone@21:1/5 to All on Tue Jul 25 15:54:16 2023
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Phil G@21:1/5 to All on Tue Jul 25 09:27:02 2023
    Dennis Boone
    No relation to Doug Boone? :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Edwards@21:1/5 to Phil G on Tue Jul 25 16:33:30 2023
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dennis Boone@21:1/5 to All on Wed Jul 26 00:20:48 2023
    No relation to Doug Boone? :)

    Hard to tell. :)

    De

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Phil G@21:1/5 to All on Wed Jul 26 02:31:00 2023
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)