开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

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


 

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

?


 

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


 

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 ASMZ80
OK, 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


 

Hi Allison:
Thanks for explaining. It seemed like both issues were the issue. :)

Peace and blessings,
JQ


 

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


 

Scott,

Your questions are dated, so things have progressed.
As was, both were true.

The problem from my perspective has been resolved.

Thanks and happy New Year.

Allison


 

Allison, Maybe I missed something in the 44 messages but I'm a bit confused about what the issue is that you are running in to.

Is it?
1) cannot compile the ASMX source code on an X86 or X64 Linux system?
? or
2) cannot compile Josh's Z80?ZMC v1.5 code on a Linux system using ASMX

Peace and blessings,
JQ


 

Hi Herb,

Happy New Year.

The version I have came from your site.? When I need things micro, its on my list
for many decades.

No idea but its possible when I tried to assemble it (and install) a problem resulted
in an older version. The source is your modded version.? Either way the solution
was to use shift and mask as then its compatible with native (z80 CP/M) system
ASMZ80 which does not know of the pseudo op.? It was the only version
downloaded (zip file).? So not a ding just an oddity and in the end working or no
I still needed the problem of cross platform (PC to real z80CP/M) solution.?

I have a thing for cross platform compatibility.? All my systems have editors that are
K52/Vteco/Vedit/VAX-LSE with similar use inputs and formats. Same for assemblers
for most targets (SC/MP, 1802, 8080-8085, Z80, 8048 series, and others ).? In all
cases a floating point BASIC language as well plus other high level languages.
I try for the same on the PC and check it using MYZ80.

So in the end regardless having the shift and mask is what was really needed
and the pseudo op (both flavors) added one ore variant to the languages of bable.

Yes, the CP/M system has at least 5 flavors of assembler formats for Z80 with
several different mnemonics and wider range of pseudo op (macro and non macro).
It reflects the evolution of 8080/z80 over about 45 years of using those micros.
That does not include the less used but build and evolved on PC cross compilers?
that seem to be based on the 32/64bit platforms.? Many seem to be evolved
from MASM.

So problem resolved.


Allison


 

On Sat, Dec 30, 2023 at 12:30 PM, ajparent1/kb1gmx wrote:

Oddly the[asmx] Zip files I found none had a manual...
Then again I was looking for a TXT or DOC and it was HTML..
Oddly neither Herbs note or the HTML explain why H(val) or
HIGH (VAL) does not behave as they are documented.
This is Herb Johnson. The HTML document file in my ZIPped asmx distribution is a copy of a similar file in Bruce Tomlin's
asmx distribution. My copy has changes which represent the changes I made in asmx. Included in my file is the use of HIGH
and LOW which I added to my version. My Web page for asmx, also notes I added those features. In Bruce's file, he uses < and > for low and high byte
also the function H(value) and L(value). I believe my version of asmx, also supports Bruce's operation, but I'm not certain.

In any case, Bruce and I distribute C source, and you can inspect the C source to look for pseudo-ops and see how the code works.

There's been a lot of discussion here, about the asmx cross assembler. I was alerted to this discussion on Dec 30th and joined this
group, to make a few points, such as the above. Points are 1) there's documenation 2) there's source code, 3) there's Web sites. Use those
to get more information about use of these versions of asmx.

Another point - *contact me* if my version has some apparent issue. Nobody in this discussion contacted me, some third-party mentioned to me this discussion. I cannot help you if I don't know! And as almost no one has contacted me about my distribution of asmx in years, I've pretty much ignored it for the last few years. I show my work and date it, on my Web page, in my copy of the code.

Another point - there's more than one version of asmx! Do others a favor and note *whose distribution* of asmx you are talking about. I encourage Josh to
note a Web link or at least name me, where his code mentions use of asmx. My Web page immediately points to Bruce tomlin's Web page, and in fact Bruce has updated his code (without changing version or revision) up to a month ago.

Also:, thanks to this discussion,I'm aware there's a *third* distribution, on github. Apparently they took my version's changes, and moved them into Bruce's recent version. (shrug) I don't know that versions merits, but that seems like a good idea. I gave Bruce the opportunity to add my updates to his code, years ago. We are on good terms as far as I know, but not kept in touch.

Maybe I'll respond to other people's posts here, at a later time. I'm still waiting for my first post (I just joined) to be accepted by the moderator. Presumably this one too, I don't know yet.

Regards Herb Johnson


 

Hello folks, I'm Herb Johnson, the distributor of a version of Bruce Tomlin's great asmx cross assembler. It was called to my attention, there was
a discussion here about "my" asmx, Bruce's asmx, and Josh's use of (apparently my) asmx to support his/Lee Hart's Z80 product. All that is good,
but *nobody contacted me* until today - so I had zero opportunity to respond and help those who asked for help here. I just don't follow many discussion
groups, I have a Web site and an email address people can use to contact me and to find what I offer. That's how I work, mostly.

But I know most of the people in the discussion and I've supported Lee Hart and others for many years. So here I am for this moment. I'll respond in two parts. One, in general; then another message in particular. It's just too much text for one or even two messages! Hey, life's complicated. First, general responses.

1) Josh Bensadon's Z80MC Z80 source says quote "Assemble using ver 2.0 of the ASMX assembler by Bruce Tomlin"
end quote.

2) ASMX by Bruce Tomlin is available from Bruce Tomlin's Web site, and has been for decades, link below. His
asmx version for years has been called "2.0 beta 5". In recent years, he'd updated it, but apparently hasn't changed
the version/beta description. Read his Web site for more information.



2a) And ho ho ho! Somebody forked both Bruce's code, *and* my code, for asmx, and put it on github! Nobody told
Herb Johnson about this (that I recall)! Thanks to Scott Vitale for posting that information here, so now I know.



3) Pardon the history lesson. In year 2012, I looked for an 1802 cross assembler with macro capability. Why? Because I offer an 1802
cross assembler called A18, *without* macro capability. I wanted macro support. I found asmx, downloaded the source, and offered it on my site. Over time I and others made some mods to it. Bruce is/was aware of my use and can certainly extract any mods he wishes. The version of my asmx is self-described as "2.0b5+" currently with files dated up to Jan 2023. Again: my asmx code dates back to Tomlin's 2012 code.



*Note how points 2) and 3) relate to Josh's statement in point 1).*

4) I've recently updated my asmx Web page, to provide more information of this sort. I point out on my asmx Web page, people haven't contacted me about my asmx. So I haven't paid a lot of attention to it, or to Bruce's current work - until approximately "now". I don't promise I'll match Bruce's version, I'm just saying these are circumstances.

This suggests my following general advice:

If someone uses "my" asmx with Josh's Z80 code, and finds problems, I'd like to know, contact me please, but also read my fine documentation and Web page. I suggest likewise for Bruce's code, Web site and contacting him. If someone uses Bruce's most-recent asmx *and* my asmx, and finds differences, *please* let me know so I can consider changes, fixes in my version. But Bruce or I may have different features or other differences that aren't errors.

If my use and distribution of Bruce's code, has brought attention to his fine assembler, that's a good thing. I'm sorry if there's confusion between the two (make that three) "forks" but, you know, I've left a trail behind, I try to be responsible for my own litter, etc, but you have to *ask me*.

I'll address specific posted comments in my next email.

- regards, Herb Johnson


 

I used DRI's MAC80 and Microsoft's M80 for most of my Z80 programming. Later I got the SLR180 assembler, which was the fastest and most versatile Z80 assembler.? I used it to write a lot of code for the Heath H19 terminal (which was Z80-based).

?

Josh used the ASMX 2.0 assembler from Herb Johnson's website as-is. It also works for me as-is, but I haven't tried to recompile it.

?

> ...a different approach so that the Z80MC teamed with a portable terminal> emulation (not A PC) to make a portable system with enough performance> to assemble CP/M itself.

?

I've actually designed a Z80 terminal to pair with the Z80MC; but haven't gotten around to laying out the PCB yet. I wrote new firmware for the Heath H19 terminal that included quite a few features, and would like to re-use that code. Unanswered questions are a) what do to for a keyboard, and b) what to use for a screen.

?

For the keyboard, I don't want to use expensive modern switches or the keyboard alone will be big and cost over $100. So I'm thinking of something more like the Radio Shack model 100 keyboard, which had full size type-able keys but was fairly small and portable.

?

The screen will probably have to be LCD, as nothing else exists any more. But so many of them are "one-time wonders" that are available today, but not tomorrow.

?

Lee

--

Excellence does not require perfection. -- Henry James

--

Lee A. Hart

?


 

Oddly the Zip files I found none had a manual...??
Then again I was looking for a TXT or DOC and it was HTML..
Oddly neither Herbs note or the HTML explain why H(val) or
HIGH (VAL) does not behave as they are documented.

As a result I'll do the mask and shift as that was easy to implement and
compatible with assemblers on the CP/M systems and under MyZ80 sim. I
do that as my collection of CP/M machines is both large and frequently in
use.? Code portability is fairly important to me as I'm supporting
8080/8085/z80/Z180/Z280 systems and CP/M 1.4 though CPM3(cpm+).
Of course I don't expect the 8080/8085 machines to run Z80 code but
producing using suitable assembler is something I have done before.

This takes me back to the early 80s when, if the floppy format (or size)
wasn't the issue, the text and assembler formats were.? CP/M in 1980
suffered from?portability issues.? Back then Z80 source could be in not
less than 4 formats extended 8080(intel) style opcodes, TDL opcodes
that were Intel 8080 like but different, Zilogs' manual, and?at least
three Z80 assemblers that all varied for syntax and pseudo ops.

So all this makes sense as to purpose the original plan was build
a generic BIOS without any FAT filesystem for uSD, based on
your work for the uSD handler and the Z80MC as the foundation to
side step hardware build.??Its also pretty slick Z80 build as it allows
for banked lower memory and three IO.??

The target is to modify one of my three Epson PX-8s with uSD as mass storage
to replace and be both larger and faster storage than the slow microcassette
that had failed in that one.? I've done it with CF but that is a bit more complex
hardware, larger, and uses more power.? ?The upside is the way to "install"
the device code in the software (BIOS) as transient (not part of the cold boot
image) was well developed by others and simple to implement.


Allison


 

Need to find out how ASMZ80 does it.? Perhaps you will need to mask the address and shift it?

LD L, LED_DISPLAY_SB & 0xFF
LD H, HIGH_SCAN_PTR >> 8

Need to read the ASMZ80 manual to see how they handle it.



On Friday, December 29, 2023 at 06:44:30 p.m. EST, ajparent1/kb1gmx <kb1gmx@...> wrote:


I thought I had the assembler used...

ASMZ80? does not digest the following:

? LD? L,LOW LED_DISPLAY_SB? ;Restart Pointer to Secondary Buffer
? LD ? ? ? ? H,HIGH SCAN_PTR
? OR? ? ? ? LOW LED_DISPLAY

Best guess is it extracts the LOW or HIGH byte of the address of that variable or the 16 bit variable.

Any other ways around this??


Allison


 

Never mind...? Even if the cross assembler were right I'd still have to heavily edit
the code for a CP/M native assembler.

I'd briefly considered feeding the ZASMV20 to BDS C compiler but it was
unlikely it would not fit in memory with enough working space.


Allison


 

I thought I had the assembler used...

ASMZ80? does not digest the following:

? LD? L,LOW LED_DISPLAY_SB? ;Restart Pointer to Secondary Buffer
? LD ? ? ? ? H,HIGH SCAN_PTR
? OR? ? ? ? LOW LED_DISPLAY

Best guess is it extracts the LOW or HIGH byte of the address of that variable or the 16 bit variable.

Any other ways around this??


Allison


 

I'm running it on X64 linux using dosbox.? A Dell I5 5440 and linux on it is
Mint 21.3 64bit.

FYI got amsx to run...? it was far to dumb.? I really didn't expect it to be that simple!
The Zip had an .exe file and I'd been reading all the text about building it.? Turns
out asmx.exe is directly executable .? ?So all I needed to do was put it in a
convenient directory and CD to it and type the required incantation:

$asmx -C z80 -Llistfile.prn zmcV15?

Now assembles clean.?


Bed time...my head hurts.

Allison


 

开云体育

MyZ80 is an excellent emulator. I wish the code existed somewhere — I’d love to port it for x64.?

Rich?

http://cini.classiccmp.org/
Long Island S100 User’s Group

Get for iOS


From: [email protected] <[email protected]> on behalf of ajparent1/kb1gmx <kb1gmx@...>
Sent: Saturday, December 23, 2023 10:19:41 PM
To: [email protected] <[email protected]>
Subject: Re: [Z80MC] A Z80 Asm rec
?
Hi Rich,

Been doing asm code since my first Altair...
TASM I have it.? Good assembler.

Its one of the dozen on the AMproLB+, S100 crates (both compupro and NS* horizon chassis),
Kaypro4/84, and YAZBC )(yet another Z80 single board computer).

For Z80 I generally develop on MyZ80 CP/M emulator on PCs rather than directly
cross platform.? The emulator provides a fully valid and well tested z80 and
CP/M environment.? By tested I've used it for over 20 years.

What am I trying to do... simplify the uSD interface (software) for performance and as
an abstracted block device for OS experiments other than CP/M.? Over all a different
approach so that the Z80MC teamed with a portable terminal emulation (not A PC)
to make a portable system with enough performance to assemble CP/M itself.

The whole of asmx2.x has been not getting it to behave (run/Install) on Linux PC.
No success so far and it would be nice to have a very fast assembler that is
was used for ZMCv15.? Its proven to be very frustrating, unusually so.


Allison


 

Hi Rich,

Been doing asm code since my first Altair...
TASM I have it.? Good assembler.

Its one of the dozen on the AMproLB+, S100 crates (both compupro and NS* horizon chassis),
Kaypro4/84, and YAZBC )(yet another Z80 single board computer).

For Z80 I generally develop on MyZ80 CP/M emulator on PCs rather than directly
cross platform.? The emulator provides a fully valid and well tested z80 and
CP/M environment.? By tested I've used it for over 20 years.

What am I trying to do... simplify the uSD interface (software) for performance and as
an abstracted block device for OS experiments other than CP/M.? Over all a different
approach so that the Z80MC teamed with a portable terminal emulation (not A PC)
to make a portable system with enough performance to assemble CP/M itself.

The whole of asmx2.x has been not getting it to behave (run/Install) on Linux PC.
No success so far and it would be nice to have a very fast assembler that is
was used for ZMCv15.? Its proven to be very frustrating, unusually so.


Allison


 

One of the assemblers I saw mentioned above is one I particularly like: TASM. Multi-target, multiple host versions (DOS, Win32, Win64). It has been my go-to for over 20 years, although I've used a bunch of others, mostly because I don't want to re-write the original source to fix syntax, etc. Beyond that, I use NASM, MASM, various gcc compilers for different projects. Obviously some are more flexible than others and/or have different features needed for a specific purpose. For one project, I had to even dip into an original ASM from Seattle Computer because it had a unique encoding method that was needed for a specific recreation project.

Rich Cini