Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
- Z80MC
- Messages
Search
Re: Micro BASIC Manual
Hi Josh, Unfortunately my Z80MC Front Panel had an issue with an IC, so currently it is waiting for a part. In the meantime I am somewhat familiar with Micro Professor MPF-1 Tiny Basic. The system has a coder ROM. Sounds like for Z80MC, I need a separate coder to convert instructions before inputting. Some reason all the links to Dave’s material giving me an unavailable URL error as if the pages have been deleted. If you can point me to Dave’s Micro Basic coder, I would?appreciate it. Regards, Kerem On Sun, Mar 16, 2025 at 6:31?PM joshbensadon via <joshbensadon=[email protected]> wrote:
|
Re: Micro BASIC Manual
Kerem, I should tell you, I added 2 instructions to Micro Basic.? OUT and INP.? OUT pp,vv? works to output byte vv to port pp. And INP(pp) is a function that returns they byte at input port pp. The assembler code for Micro Basic is available and was very easy to modify to add these instructions.? Dave Dunfield is a very well organized coder. Cheers, Josh
On Sunday, March 16, 2025 at 02:10:51 p.m. EDT, Kerem Kapkin via groups.io <kkapkin@...> wrote:
Hello Josh, Thank you very much. That’s what I was looking for. Excellent. Regards, Kerem On Sun, Mar 16, 2025 at 10:24?AM joshbensadon via <joshbensadon=[email protected]> wrote:
|
Re: Micro BASIC Manual
Hello Josh, Thank you very much. That’s what I was looking for. Excellent. Regards, Kerem On Sun, Mar 16, 2025 at 10:24?AM joshbensadon via <joshbensadon=[email protected]> wrote:
|
Re: Micro BASIC Manual
Hi Kerem, Hmm, I wonder what happened to the website? Here's the MBasic Manual I downloaded. Cheers, Josh Bensadon
On Saturday, March 15, 2025 at 06:29:19 p.m. EDT, Kerem Kapkin via groups.io <kkapkin@...> wrote:
Hello,
I am new to the Z80MC, just completed building one and learning about the operation. However none of the links to Dave Dunfield's Micro BASIC Manual is working. If you have a new link or if you can share the pdf file of the manual I would appreciate it.
Best Regards,
Kerem
|
Re: using SDCC and stdio to Z80MC w/ CP/M 2.2....
Dave,
?
I was there from the start 8008 in '73 and Altair8800 (8080) December 1974
I was early adopter bleeding edge sort.
?
Period pieces...? Yes they are old but still work as they did then..or better.? ;)
I refer to them as fully debugged.? Lots of hardware improvements and
much more software.? Once I started with BIOS building I realized
more could be done and that most were so minimal it hurt.
?
Noteable S100 crates I have are Compupro, CCS, NorthStar* (two of them)
and a base 8slot backplane with full Compupro board set.
?
Aztec-C? I have it, doesn't stand out in my mind however. Available here.
?
The early Z180 the Hitachi part HG64180 is in my SB180, that's from ways
back and still use it occasionally.? ?Mine has the SCSI board talking to a
Zybec SCSI to MFM with a 3.5" MFM 20mb drive.? ? Micromint was the
vendor of the and IT was the cover system of the 1985 September Byte.
I put it in an old IBMPC Pizza box (thin profile) using the drives and
power supply.? ?Others include a modified Z80 card with a mezzanine
board with 64180 on it.? ? ?I also have a Micromint BCC180 that was
intended for control or embedded use.? So 64180 and kin are part
of the systems list.
?
As it works out a Z80 with 64K and two serial ports (DART or SIOB)
are a good start and rounding that out is some form of mass storage.?
Generally floppies were the rule early on but had two issues, slow and
small.? CP/M starts being more useful with larger drives of at least 512K
to the 8MB limit (or much larger for P2DOS and later) .? It solves the
problem of large projects needing multiple drives.? P2dos is a BDOS
replacement with improved internal math and written in z80 rather
than 8080.? It would spawn SUPRbdos, ZSdos, Zrdos and other
CP/M improved z80 replacements.? The CCP saw?improvements
with ZCCP and ZCPR and they all worked this existing BIOS though
by then people were also improving that.? So CP/M-80 from 1979 to
1985 saw a lot of growth and improvements that enhanced its
usefulness.? By then Conix a CCP overlay was used to get unix
like facilities like pipes, redirection, alias, and utilities.
?
To me the biggest weakness in CP/M was the file system.? Its flat
and a hierarchical file system was really needed.? There are things
done with aliases, system and user spaces (A0> though A15>) to make
that?more useful.? That and it was only usable for single user.
?
I mispelled Uzi Unix, there are a few flavors of that one for the P112
a Z180 board and others.? ? It eats memory.? Base kernel uses about 32K
and then you need banked/paged memory to do applications.? ?It was
useful when a CP/M interface (API) was added so it could? load and run
CP/M programs as those for unix were scarce and mostly utilities.
?
I had the fortune to be at DEC from 1983 to 93, great place to work and?
I got to do interesting stuff and work with interesting people.? That and
I had an LSI-11 before that.? Prior to that NEC Microcomputers, Hazeltine,
Automated processes (did i8008 stuff there in '73).? The market for
engineers took a plunge mid 90s due to?DEC imploding and others in
the region (eastern MA, southern NH...)? did as well.? Lot of talent
very few jobs.
?
Lynx.. RTOS, that should be easy.? There are many that have base
platforms on Z80/180.? RT systems are fun to do.??
?
?
Allison |
Re: using SDCC and stdio to Z80MC w/ CP/M 2.2....
Hey, that's awesome! ?Amazing to talk to someone who was there for all that. ?Even more amazing that you are still doing it on period pieces, with period software!
?
I hadn't heard of the tools you mention, but I did hear of "Aztec C" -- maybe because they open sourced it a few years back.
?
Interesting that you and Mark mentioned the Z180 -- my first contract job was for the Hitachi variant that preceded it. ?Came about by accident; I was a young EE and the company I worked out made EPROM programmers. ?A client needed a 'personality module' for the 647180. ?While I was present for that site visit, I served no useful function. ?The client mentioned offhandedly about having some difficulty getting the LCD working. ?While my boss and the client were working on the personality module, I asked if I might try my hand at the LCD since I knew Z80 from earlier in 80's (when I worked on TRS-80s). ?So I wrote a driver for the LCD presenting a kind of puts()-esque interface, and tricked it out with some control characters to clear the screen and do cursor stuff. ?So the client asked if I would like a job. ?And for $10 whole bucks an hour! ?My boss got jealous and shortly thereafter raised me to $10 from the $7.50 I was then making. ?I thought I was so rich.
?
I learned a lot on that job. ?First, I didn't know people got paid to do software. ?I thought software was just something you made to make the hardware run -- who pays for that? ?Second, I was surprised to find out you don't need a CS degree to do software. ?All the other folks had degrees in chemistry, physics, etc. ?And the work environment was nicer and I didn't have to wear a tie. ?Five years later I switched to software full time. ?I expected to do it for 5 years and move on to something else, but I never did.
?
Anyway, keep the stories coming, they're interesting to hear (read). ?It was interesting also to read Lee's (actual) story about his days at Polaroid. ?Coincidentally, I interviewed with them in the 90's but didn't take that job. ?(Jobs were so plentiful then and folks would fight over you. ?It was surreal.)
?
Your mention of "Usi UNIX" is interesting -- I'll have to check that out. ?I also contemplated porting Lynx for fun, which I'm pretty sure will require all the extra pages I can throw at it.
?
Cheers!
-dave |
Re: using SDCC and stdio to Z80MC w/ CP/M 2.2....
Hi Dave,
?
I know SDCC is PC based but it inherent PCisms are notable.
?
Its compiler does not produce great code.? It works and runs
but you would think on a current generation PC there would
be better optimization.? Even for Z80 it does a lot of redundant
stack work and under utilizes the register set.? Actually most
do not as the assumptions of stacks and issues with addressing
modes are a handicap.
?
Code for 6502 is not terrible.? The compiler writer has to get
out of the hardware stack mentality.? ?The 6502 has a limited
hardware stack ( best used for subroutines only) but decent
selection of memory addressing modes.
?
The granddaddy of them all is PDP-11, as that was where C
as we know it originated and many of the nominal K&R pointers,
datatypes and the like are native addressing modes on that
machine. It also had a powerful MMU.? I have several PDP-11
systems.
?
Owing to the period of generation (very late 70s and early 80s)?
one has to expect K&R C is the standard.? Later C# and C++ are?
nearly a decade later.
?
As to IDEs Turbo Pascal and C were later and very good. they
migrated to DOS on PCs.? At that time a step up for PCs
and DOS languages.
?
Bank switching is easy, there is no standard mechanism
and CP/M does not support it (or prohibit it).? ?CP/M
applications?don't know to use it. So...
?
As to MMU and larger than 16 bit addresses, that were Z80
(and friends) were at a impasse.? ?The Z180 has it built in but
it adds little.? The two predominant schemes were whole
Bank switch (whole 64K pages) usually with a small common?
non-banked ram or paged with scatter gather using a
1/4/8/16/32k kb page size.? ?I have such a paged system
(1k page).? ?The real issue is CP/M based system? are flat
64K and programs do not look further.? The most common
use was to put an extended bios and maybe resident system
extensions outside normal workspace the TPA or the Transient
Program Area (from 100h to below the BIOS) and that could
be up to 63K though systems with 56K were considered large.
The other was to use the extended ram as fast disk.
?
Also tried?straight 64K ram system (about 1980) with fast
(ram disk) storage to do virtual paging.? ? Nothing to take
advantage of it and swaping overhead was high.? Worthwhile
but only got used for foreground/background operations
like printer spooling.
?
I also do hybrid...? Myz80 a full z80 system emulation in software
on the PC under linux/dosemu for when? a PC is handy but a
real system is not.? It has all the same tools as my real
hardware and can even transfer files PC space (either way).?
Turns out the PC editors are no better than VEDIT on CP/M.
?
If you want a Unix like system then Usi unix and kin are to
be looked at.? ITs big so banked memory is desirable.
?
That's 50 years of been there did a lot of that.
?
?
Allison |
Re: using SDCC and stdio to Z80MC w/ CP/M 2.2....
Mark,
?
That is the exact one I have. got it because it was small and had capability
matching some of my larger machines.? Indeed nice kit.? Still putting?
my usual work stuff on it.? Turbo Pascal and C wonderful IDEs.
?
Older machines include a much modified NorthStar* horizon.? That's S100,
10mhz z80, 256K ram with MMU, 512K ramdisk, 512K romdisk, Z-system,?
multiple smart disk controllers for Floppies and hard disk.??
?
The ones I use most are Kaypro 4/84 with Handyman, advent turbo rom
with personality card,? and 1mb Ramdisk.
?
AmplroLB+? Full z80 with 64K, SIO and SCSI to a 45mb 3.5" fujitsu
Runs P2DOS variant of CP/M.
?
Most are still being used as they are application loaded and have been in
my collection for over 4 decades.
?
Allison |
Re: using SDCC and stdio to Z80MC w/ CP/M 2.2....
The z180-based pocket computer (I have an essentially identical one called the "") is indeed a neat bit of kit.? Plenty of disk space, and so wonderfully fast compared to the 4 MHz Cromemco I spent so much time on the the 80s.? I wrote the BIOS on that so that it would support multiple terminals; a ^C typed at the command line while at the CCP prompt would transfer control to that terminal, and I had four of them of various types scattered throughout my little two-bedroom apartment.? Not quite a multi-user system, but close enough for a sole occupant.
?
I keep the SC131 on the large USB hub that my laptop plugs into when I'm in town (nearly all the time now, finally).? Often, when I need a break, I'll power it up and play with the tools I used then.? Frankly, I'm not convinced that my productivity is that much better with modern tools.? OK, a sophisticated IDE like Visual Studio on a 4k monitor does bring something to the table, for sure, but for embedded work a purely text-based world is still eminently functional.? At that time, I used Turbo Pascal a lot, because it was very fast, was a capable language, and the editor matched the WordStar control character set that my left hand knew (and still knows) so well.
?
I never used C on CP/M, but now I'm inspired to give it a try.? And I agree with your assessment of the Andy Laird book - it's still sitting on the shelf behind me.
~~ Mark |
Re: using SDCC and stdio to Z80MC w/ CP/M 2.2....
yes, indeed, SDCC is PC based, and may not be to the taste of those wishing to be period-accurate and develop on the target systems.? I imagine the vintage compilers are all K&R style?? I should try it out that way to appreciate the feel.? I did trivially hack the rom to make the power-on default 115200 bps.
?
My coming to this was somewhat roundabout, as I had used SDCC for other things before.? I needed to adapt crt0 for the board, and malloc didn't act the way I wanted, and then I got carried away with stdio (well, the missing FILE* stuff), hence the post if others had curiousity and wanted to save the trouble.? One can enjoy taking such excursions when it is not a paid effort for a client; lol!
?
The generated code can be quite fluffy.? I guess that's what you get for the conveniences of the language on a 8-bitter.? (can't imagine the generated code for a 6502)
?
I punted on scanf for the time being, but now I am distracted by thoughts of supporting the bank switching mechanism.? I suspect I would need to make some tool to plan linkage from the collection of object modules, and possibly generating thunks in non-paged memory.? Seems like a graph theory problem.
Anyway, some short term work popped up last week that will absorb me for the next 4 weeks, so I'll have to wait a bit for all that, alas. ?
I'll check out the book you mention -- CP/M is definitely new to me.? Fortunately systems' surface area tended to be smaller back then. cheers! -dave |
Re: using SDCC and stdio to Z80MC w/ CP/M 2.2....
That whole process looks to be all PC based/biased.?
?
All C code for CP/M? and 8085/z80 I do is using native tools
on CP/M systems.? There more than enough disk (uSD) and
ram to?run all the native CP/M tools and languages from
off the net.
?
Based on the code source I have SMC (small-C), Hitech-C,
and BDS-C as the usual tools.??
?
For the AmproLB+ using BDS-C:
?
C0> RT11.C
C0> RTMISC.C
C0> RTFILES.C
C0> CLINK RT11 RTMISC RTFILES
?
To run it
C0> RT11
?
Takes less than two minutes to do all that.
The Membership card is a little slower as the uSD is slower than
the AmproLB+ SCSI disk.? Both are running the Z80 at 4mhz.
It's possible to run the Z80 faster? as 6 and 10mhz parts are
not hard to find.
?
For faster the same task on a Z180 at 20mhz takes less time than
to type the command lines.? ?That's a? SC131...??
https://smallcomputercentral.com/sc131-z180-pocket-computer/
?
?
Allison |
Re: using SDCC and stdio to Z80MC w/ CP/M 2.2....
Dave,
?
Started using C back late '79 using Ron Cains SmallC and soon after BDS C
natively on Z80 system. Also have HighTec-C and Nevada C.? Never
thought to use SDCC.? However all of the compilers have STDIO which
for CP/M is a ship that calls BDOS and BIOS for IO.? the BIOS provides
both raw and cooked interfaces and BDOS has resources that with some
translation gives standard C calls for disk IO.
?
If your not using CP/M then you have to create your own filesystem
and IO system.? Likely more work than desired.? My solution for
standalone systems was to put CP/M and needed utilities in
Eprom and tread that in the bios as a read only disk (Romdisk).
?
Malloc is maybe internal for the compiler as most all CP/M systems are
flat memory space typically 32 to? 60 kbytes and single threaded.
?
Including the Kaypros I have 17 systems running CP/M.? I've been doing
that since 1977.?
?
FYI the best book on using C and building CP/M software is
Andy Johnson-Laird, The programmers CP/M Handbook.??
?
?
Allison |
using SDCC and stdio to Z80MC w/ CP/M 2.2....
Hello group! I did build my Z80 Membership Card, and it has been some fun. ?I intended to use it as a basic Z80 cpu board in an unrelated project, but figured I should play with it in its native form before changing the firmware. ?I'm impressed with the work that clearly went into it.
?
I did not get to use CP/M back in the day since it was expensive, so it was fun to explore now. ?It's amazing what we considered a system back then; lol.
?
While I can code in assembly, I prefer to do things in C where possible, and I'm using SDCC. ?I had to set up a CRT0 that was appropriate for CP/M and the Z80MC in particular. ?SDCC provides a pretty rich implementation of libc, but stdio is lacking since file i/o is system dependent. ?So I did what any programmer would do and implemented the parts of stdio for doing the FILE* stuff, e.g. fopen(), fclose(), fread/write/printf, etc. ?(and malloc seemed broken so I adjusted for that.)
?
Anyway, I don't know if anyone has interest in coding in C for CP/M, but if so I'm putting some files in the file space. ?This includes stdio-cpm-example-20241207a.zip, which contains a demo project exercising the library, along with the libs and headers for writing your own stuff. ?If you just want to run the test program first without building, there is also a disk image STDIOEX.BIN that can be mounted via CPMDISKS.TXT (I replace DISK-D.BIN with that), and then you can run STDIOEX.COM directly from it. ?It will printf some stuff, get keyboard input, and open, read, and write files showing stuff along the way. ?The source 'main.c' should be useful in showing how to construct a program. (I mean, it's standard C, but the headers and parsing the command line is different.) ?There are also the build scripts so you can see how to set up for assembling, compiling, and linking. ?You're on your own for installing SDCC! ?I think you can manage! ?It's easy! ?You might like cpmtools for manipulating disk images.
I need to clean up the library code then I'll put it on github for anyone curious to see the internals. ?I'm still implementing stuff (e.g. scanf(); yikes.) Cheers! -dave |
2 files uploaded
#file-notice
Group Notification
The following items have been added to the Files area of the [email protected] group. By: dave <dev@...> Description: |
Re: A Z80 Asm rec
Yes same here...
Also because it runs classic TECO command scripts. Getting disparate platforms (outside of Unix) to do similar things the same or very similar ways? was a major issue when on a given day it could be Z80, PDP11, or VAX.? ?Just being able to move text easily was a handy thing. Then again it made copying CP/M stuff from MARKET::? over DECNET engineering net much easier.?? Allison |
Re: A Z80 Asm rec
I agree. VEDIT is my favorite editor, and I still used it today. It works in both DOS and CP/M systems, and is configurable enough to handle all the different terminals I have used. ? Lee -- Excellence does not require perfection. -- Henry James -- Lee A. Hart ? -----Original Message-----
From: <[email protected]> Sent: Jan 3, 2024 10:38 PM To: <[email protected]> Subject: Re: [Z80MC] A Z80 Asm rec ? Hi Herb,I know the CUG and a few others.? I was running Pascal and C (tinyC, SmallC, BDS C) on Z80 back when they first hit the streets.? As a result I collected many C compilers native to Z80.? After trying a few? I looked at the code and most are huge? I was trying to get editors ?from PC to Z80 and none came close to VEDIT for compactness and ability to work in cramped systems (48Ktpa).? The ASMX executable in the ZIP file is 485K.?? Allison ? |
Re: A Z80 Asm rec
Hi Herb,
I know the CUG and a few others.? I was running Pascal and C (tinyC, SmallC, BDS C) on Z80 back when they first hit the streets.? As a result I collected many C compilers native to Z80.? After trying a few? I looked at the code and most are huge? I was trying to get editors ?from PC to Z80 and none came close to VEDIT for compactness and ability to work in cramped systems (48Ktpa).? The ASMX executable in the ZIP file is 485K.?? Allison |
Re: A Z80 Asm rec
I was responding a bit late, while my membership in this list was in process. Things resolved since.
Allison said: use shift and mask as then its compatible with native (z80 CP/M) system ASMZ80OK, I see that consideration. Another dodge I use to extract bytes is integer divide or remainder variable / 256 *256 or variable - (variable / 256) Regarding CP/M-80 compatible assemblers, It's possible you can make this cross-assembler fit a CP/M-80 system: Its origins are from the C User's Group (CUG) distributions, as an MS-DOS C program derived from a CP/M-80 C program. Turbo C MS-DOS will compile AZ80. In any event, I assembled ZMCV15.ASM with my AZ80, and it only choked on a few things, fixed with effort. (No macro support, but the macro in the monitor is trivial.) Web search will find a CUG distribution, then search its index of disks for AZ80 to find the distribution disk files. Somewhere in the 200's series. I have a set of C cross assemblers on my site as they all have the same baseline code - this is explained on my Web site. I'm glad everything is resolved. It's good that ASMX got some attention, Bruce has done good work to maintain and distribute it over the years. 8-bit macro assemblers are a bit scarce so I was glad to find it years ago. BTW, if someone has compiled "my" ASMX under linux, they could do me a favor and send me their make file (or confirm my make from Bruce works). Of course I'll add it to the distribution. Regards, Herb Johnson |
Re: A Z80 Asm rec
Scott,
What you missed is first I needed a assembler that can handle ZMCV15.ASM even though I had LST, HEX output in the zip file.? ?Reason is so I could then understand the?code and recreate it using ASMX the assembler of origin.? That done I could feed it to Z80ASM as that is also a Linux z80 assembler and its also the same as?the CP/M version Z80ASM.? Test is same in for same out. Getting that assembler on the mint Linux system ran afoul of a few system things (security) I'd put in.? Then once sorted I could run it though I was name identical to existing cross platform assembler that caused a conflict.? Minor fix. Once the differences were understood it should have been easy. But one oddity was the pseudo ops HIGH and LOW and they were for byte extraction as that was incompatible.? ?The fix was simple substitute shift and mask which most assemblers understand and support.?? Once that was answered and sorted I could progress to assemble on a real CP/M system (and a faithful simulated system MYZ80).? Which I was able to do today, the Compupro S100 crate (z80 10mhz) was able to ingest it and produce identical output. With that the Z80MC (full stack) will be brought up and experimented with.? Once operational a few software projects will be explored. -Using the FAT code in ZMCV15 as a OS that is PCDOS compatible at the ?file and media level.? -A version of NorthStar DOS that was wired to a hard sector disk ?and matching controller that would work with SD or other media. -Build?embedable uSd hardware and code to replace the small, slow, ?and balky cassette in the Epson PX8s I have and still use. I may be eccentric but most of my ideas and approaches date back to my? Altair I bought in 1974 and later flavored by CP/M, RT11, and VAX-VMS operating system? long before the PC was even real. Allison |
to navigate to use esc to dismiss