[HN Gopher] Having fun with CP/M on a Z80 single-board computer
___________________________________________________________________
Having fun with CP/M on a Z80 single-board computer
Author : stevekemp
Score : 65 points
Date : 2021-04-17 12:07 UTC (10 hours ago)
(HTM) web link (blog.steve.fi)
(TXT) w3m dump (blog.steve.fi)
| tyingq wrote:
| _" It must run CP/M. The source-code to "everything" must be
| available."_
|
| Interestingly, that's only been possible with CP/M relatively
| recently. Reading over http://cpuville.com/Code/CPM-on-a-new-
| computer.html you'll see he had to fix some OCR errors, translate
| 8080 ASM to Z80, etc.
|
| And it's still not really legal due to some poor wording in the
| last license: http://www.cpm.z80.de/license.html
| anthk wrote:
| A pity CP/Mish is not more developed.
| VLM wrote:
| zsdos is cpm software compatible and GPL licensed
|
| The closest analogy I can come up with is freedos is to msdos
| as zsdos is to cpm.
| anthk wrote:
| Does it run on the altair sim? any, the one from Simh,
| altairz80, or anything else.
| tyingq wrote:
| It's listed for this altair simulator:
| https://schorn.ch/altair_4.php
| anthk wrote:
| But that doesn't replace the whole CP/M I think, just the
| shell.
|
| EDIT: I already mentioned altairz80, so I knew that page,
| indeed. The last time I tried a replacement I had the
| same issue: there is no libre CP/M 2.2 a la FreeDOS, at
| least _fully_ compatible for the Altair.
| tyingq wrote:
| If it's anything like my Kaypro, someone would have to
| port it to call out to the right BIOS routines for the
| display, I/O, etc.
| codebje wrote:
| ZSDOS provides replacements for two of the three parts of a
| CP/M system: BDOS and CPR. The existing BIOS should work
| perfectly with these replacements, and the BIOS is the only
| part that is machine specific.
|
| IOW it should run just fine, unless the simulator is
| written to hook into CP/M itself. I have my own z80 based
| system emulator where the BIOS is basically breakpoints
| into host code, and I didn't need to change anything to
| switch from DR's OS to ZSDOS.
| jstanley wrote:
| > Add paging to TYPE
|
| Not really the same, but you might find that Ctrl-S/Ctrl-Q
| provides software flow control just like in Linux.
|
| I'm not sure if that's universal in CP/M, but it seems to be
| implemented in the CP/M BDOS on my RC2014 (RomWbW), at least.
| stevekemp wrote:
| Yeah that works, but timing it is hard.
|
| For the most part I run "TYPE BLAH", then use the history
| available to GNU Screen to scroll backwards in pages.
| whartung wrote:
| That's because you're running on a I/O device at 2 Billion
| Baud, instead of a 9600 baud device which is more era
| appropriate. At 9600, ^S/^Q is quite manageable.
| tyingq wrote:
| A couple of other text viewers for CP/M:
| https://techtinkering.com/articles/text-viewers-on-cpm/
| stevekemp wrote:
| Thanks for the link, I've added QL(41) to my system now, and
| it's a cute little tool.
| tasty_freeze wrote:
| > Since CP/M 2.x has no concept of sub-directories
|
| It has the notion of user areas. Each file entry has a 4b field
| tagging the file indicating which user space it belongs to. When
| you type "DIR" for example, it will filter and show only files
| for the current user space.
|
| There are no protections across user spaces. Typing "USER n" will
| change the current user space you are in. Although one could use
| it to allow multiple people to have a file space on one floppy,
| often it was used by a single user to partition work, eg, USER 0
| is utilities, USER 1 is word processing, USER 2 is source code,
| USER 3 is games.
|
| So with a little squinting, it is possible to view CP/M has
| having 16 subdirectories, but the file system is flat in each
| subdirectory.
| whartung wrote:
| The cold hard truth, however, is that CP/M is kind of awful.
| Back then you didn't have directories and subdirectories, what
| you had were floppies and disk drives. These were your file
| management components. Hard drives were rare, and CP/M was just
| not very friendly to large disk spaces.
|
| User areas had a marginal affect at the time, since they were
| really considered more apt to their name "User area", as in
| "separate users", vs a mechanic to actually organize files.
|
| Out of the box CP/M had really poor support for user areas. The
| simple fun fact that the way you shared a command across user
| areas was to...copy the file in to each user area. Which is
| easier said than done.
|
| The file copy program, PIP, could copy files FROM one user area
| to another (i.e. pull a file from one user area in to your
| current one), but not TO another user area.
|
| So, in order to copy files in to a user area, you had to have a
| copy of PIP in that user area. But you can't use PIP to move
| PIP in the first place. You have to jump through hoops loading
| PIP into memory with the debugger to span user areas.
|
| Later, new shells and utilities supported the idea of
| A3:FILE.TXT to represent user area 3 on drive A, started
| becoming common, but not every program supported it, and the
| stock OS did not support it either. Recall, in CP/M, the
| programs did most of the heavy lifting for this stuff.
|
| It's unjust, honestly, to criticize CP/M looking backward. It
| managed to empower great things back in the day, which is what
| microcomputing was all about. Its influence is felt to this
| day. But that doesn't necessarily mean it was a great place to
| be.
| teh_klev wrote:
| CP/M wasn't that terrible. Some of my first paid development
| work circa 1985 was writing dBase II apps, with WordStar as
| an editor, on CP/M on a rather nice NEC PC. It did enough to
| allow small/medium sized businesses to start "computerising"
| their workflows for not staggering sums of money.
___________________________________________________________________
(page generated 2021-04-17 23:01 UTC)