Send Bytes out Second Serial Port

151 views
Skip to first unread message

Patrick Jackson

unread,
Mar 10, 2021, 5:26:34 PM3/10/21
to RC2014-Z80
I'm trying to make a tool that will send/receive bytes from the second uart port of my romwbw system (to send a paper tape file to a sym-1). I'm sure there's tools out there for this, but I'd really like to make my own because I think its a simple task to solve and I'd learn a bit about how the serial ports work.

I'm using a z180 with its integrated 2 uart ports.

I've seen tools like TALK.COM, but they don't seem to be able to talk to devices like ASCI0/1. I don't have CRT or such, I just have this:

ASCI0: IO=0xC0 ASCI W/BRG MODE=115200,8,N,1
ASCI1: IO=0xC1 ASCI W/BRG MODE=115200,8,N,1
MD: UNITS=2 ROMDISK=384KB RAMDISK=384KB
SD: MODE=SC OPR=0x0C CNTR=0xCA TRDR=0xCB DEVICES=1
SD0: SDHC NAME=SA16G BLOCKS=0x01CD4000 SIZE=14760MB


I'm assuming that I need to use some bdos calls or such, are there good jumping off points for this in documentation/example code? I'm looking for assembly/c.

Richard Deane

unread,
Mar 10, 2021, 6:21:14 PM3/10/21
to rc201...@googlegroups.com
use ACN's patched version of Qterm (qtermh1) (ACN =Anna Christina Nass); search this group for Qtermh1.

Richard



--
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 on the web, visit https://groups.google.com/d/msgid/rc2014-z80/188c0549-cee4-48aa-abc5-565c028eeecfn%40googlegroups.com.

Alan Cox

unread,
Mar 10, 2021, 8:54:14 PM3/10/21
to rc201...@googlegroups.com

I've seen tools like TALK.COM, but they don't seem to be able to talk to devices like ASCI0/1. I don't have CRT or such, I just have this:

ASCI0: IO=0xC0 ASCI W/BRG MODE=115200,8,N,1
ASCI1: IO=0xC1 ASCI W/BRG MODE=115200,8,N,1
MD: UNITS=2 ROMDISK=384KB RAMDISK=384KB
SD: MODE=SC OPR=0x0C CNTR=0xCA TRDR=0xCB DEVICES=1
SD0: SDHC NAME=SA16G BLOCKS=0x01CD4000 SIZE=14760MB

These are ROMWBW names. CP/M 2 has no notion of them. The BIOS maps the second port to the aux port so it can be accessed via the BDOS and BIOS calls for the aux port. CP/M 3 has a way to assign different ports to things but CP/M never grew a proper device abstraction. It's one reason the DOS/Windows low level one is such a mess - they inherited that and bodged it about a bit.

Alan

Wayne Warthen

unread,
Mar 10, 2021, 9:01:57 PM3/10/21
to RC2014-Z80
Yup, if you want to refer to the HBIOS device names, then it would be best to use HBIOS calls.  These are documented in the file called "RomWBW Architecture.pdf" in the Doc directory of the RomWBW distribution.  Note that further on in the boot process all of the character devices are assigned a unit number.  This unit number is how you would refer to the devices using HBIOS calls.

-Wayne 

Patrick Jackson

unread,
Mar 11, 2021, 1:10:33 PM3/11/21
to RC2014-Z80
Ah, I figured. I found some good literature on BDOS calls, I'll look into the HBIOS too. Doesn't look like it will be impossible.
I'm guessing that because CP/M abstracts things away a bit, it will be platform-neutral for the most part?
I'll see whats up.

Wayne Warthen

unread,
Mar 11, 2021, 2:30:13 PM3/11/21
to rc201...@googlegroups.com
On Thu, Mar 11, 2021 at 10:10 AM Patrick Jackson <gindiamon...@gmail.com> wrote:
Ah, I figured. I found some good literature on BDOS calls, I'll look into the HBIOS too. Doesn't look like it will be impossible.
I'm guessing that because CP/M abstracts things away a bit, it will be platform-neutral for the most part?
I'll see whats up.

If you use BDOS calls, your code should be portable to any CP/M 2.2 system.  Under normal circumstances, the first RomWBW character unit (#0) will be assigned to CP/M device TTY: and the second RomWBW character unit (#1) will be assigned to CP/M device UC1:  You will need to manipulate the IOBYTE to address the different units under BDOS.

If you use HBIOS calls, your code will be portable only to other RomWBW implementations.  However, you will be able to address any of the RomWBW characters units easily.

-Wayne
Reply all
Reply to author
Forward
0 new messages