Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Intel to Zilog translation

796 views
Skip to first unread message

Tesseract

unread,
Jan 13, 2014, 8:09:31 PM1/13/14
to
Recently I have been doing a lot of assembly language development as I write and modify tools to reconstruct the Tesseract RCPM+ computer. Since I refuse to do half of the assembler's job for it I translate any Intel source code to use Zilog mnemonics.

Many years ago I looked around for tools to do the translation. There weren't many but Irv Hoff's XIZ was pretty good, ESPECIALLY IF YOU REALLY LIKE HAVING ALL YOUR CODE IN UPPER CASE. The only trouble with XIZ is that Irv saw fit to keep the source code secret, even though the program was a modification of XLATE2 which in turn was a disassembly of Cromemco's XLATE. That meant I had no easy way to modify or fix the translator itself. (Now I see that XLATE5 exists with source code but I did not notice that back in the day.) Ultimately I decided to use IZ from SIG/M 144.

More recently I recoded IZ from the original Pascal/Z into C and since then I have been fixing IZ whenever I encountered Intel source files that caused problems. My latest exercise was to translate Digital Research's CPMLDR and that exposed several deficiencies in IZ (as well as XIZ). I took me a while to patch IZ to generate a translated file that would assemble cleanly with M80 and Z80ASM. For now IZ remains my translator of choice simply because I can fix it when I see the need.

Now for the point of this posting. Some questions:

1. Am I the only one who strongly objects to Intel mnemonics?

2. Are there better translators around?

3. Does anyone else actually use IZ?

retrogear

unread,
Jan 14, 2014, 6:06:34 AM1/14/14
to
I started learning assembly on computers which only had ASM and MAC assemblers with their tools. At that time I had no clue M80 even existed. I learned the Intel mnemonics and never could make the switch to Zilog. I even went so far as to disassemble the ASM assembler and produced my own "ASM" which would assemble all the Intel mnemonics like the MAC library Z80.LIB. I did the same with DDT. I had this very conversation with Tim Olmstead in the mid 90's and he was very interested in my ASM disassembly but he also wanted it in Zilog so somehow I translated it to Zilog and sent him both versions which ended up on his Unofficial website. Just google asm80.zip, I find it all over the world !!! It seems he recommended a translator which I used but I never did any translations after that. Long story short, I use Intel and not Zilog, sorry.

Larry

Steven Hirsch

unread,
Jan 14, 2014, 7:27:43 AM1/14/14
to
On 01/13/2014 08:09 PM, Tesseract wrote:

> Now for the point of this posting. Some questions:
>
> 1. Am I the only one who strongly objects to Intel mnemonics?

I think it's vi vs. emacs by another name, but I was never comfortable with
Intel ASM syntax and always used Zilog mnemonics. It's been a while, but ISTR
using xlate5 for that purpose.

Steve

dott.Piergiorgio

unread,
Jan 14, 2014, 8:47:46 AM1/14/14
to
I'm neither in favour nor object to intel/Zilog mnemonics; I tend to use
Intel when handling 8080 code and Zilog in handling Z80 code. it's the
best way to avoid creeping Z80 opcodes in 8080/Z80 programs; OTOH, I
favour the use of native assemblers in debugging, esp. for quick fixes
(hence my favour to the mildly bugged pasmo6, whose AFAIK is the lone
linux x-asm whose understand 8080 mnemonics, because often is faster to
use CP/M ASM inside the emulator than using the external x-asm.

Best regards from Italy,
dott. Piergiorgio.

dott.Piergiorgio

unread,
Jan 14, 2014, 8:50:36 AM1/14/14
to
Il 14/01/2014 13:27, Steven Hirsch ha scritto:
> On 01/13/2014 08:09 PM, Tesseract wrote:
>
>> Now for the point of this posting. Some questions:
>>
>> 1. Am I the only one who strongly objects to Intel mnemonics?
>
> I think it's vi vs. emacs by another name,

tnx for the warning

(wearing absestos armour)

retrogear

unread,
Jan 14, 2014, 2:09:37 PM1/14/14
to
On Tuesday, January 14, 2014 5:06:34 AM UTC-6, retrogear wrote:
> I started learning assembly on computers which only had ASM and MAC assemblers with their tools. At that time I had no clue M80 even existed. I learned the Intel mnemonics and never could make the switch to Zilog. I even went so far as to disassemble the ASM assembler and produced my own "ASM" which would assemble all the Intel mnemonics like the MAC library Z80.LIB. I did the same with DDT. I had this very conversation with Tim Olmstead in the mid 90's and he was very interested in my ASM disassembly but he also wanted it in Zilog so somehow I translated it to Zilog and sent him both versions which ended up on his Unofficial website. Just google asm80.zip, I find it all over the world !!! It seems he recommended a translator which I used but I never did any translations after that. Long story short, I use Intel and not Zilog, sorry. Larry

Interesting, I just realized my disassembly was of DRI ASM V2.0 and the original source of V1.4 is available and a file asm1420.asm states the 2.0 source was evidently just a ddt patch added to 1.4 !!! I may revisit that...

Larry

Paul Bartlett

unread,
Jan 14, 2014, 7:54:39 PM1/14/14
to
A lot of it, I would say, is what you are first exposed to and have
any real experience with. My personal only heavy duty assembly
language programming was on IBM S/370 class mainframes (I did a lot of
that!), but for MPUs, my first exposure was to Z80. So I suppose if I
were to try to do any real Intel/Zilog work, even on an 8080, it would
be Zilog mnemonics that would be most comfortable, because that is what
I was first exposed to (although obviously I would have to avoid the
hardware instructions unique to the Z80).

--
Paul Bartlett

glen herrmannsfeldt

unread,
Jan 15, 2014, 12:19:37 AM1/15/14
to
Paul Bartlett <bart...@panix.com> wrote:

(snip)
> A lot of it, I would say, is what you are first exposed to and have
> any real experience with. My personal only heavy duty assembly
> language programming was on IBM S/370 class mainframes (I did a lot of
> that!), but for MPUs, my first exposure was to Z80. So I suppose if I
> were to try to do any real Intel/Zilog work, even on an 8080, it would
> be Zilog mnemonics that would be most comfortable, because that is what
> I was first exposed to (although obviously I would have to avoid the
> hardware instructions unique to the Z80).

Years ago, which was about 1976, when working with both S/370 and
Z80/8080 systems, we had macros for the S/370 assembler to
generate Z80/8080 code. Mostly it followed the usual conventions,
but I believe that constants had to be in S/370 format.
(That is, X'12' instead of 12H.)

-- glen

Jeff Jonas

unread,
Jan 15, 2014, 3:19:42 AM1/15/14
to
In article <lb55p9$8eq$1...@speranza.aioe.org>,
glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote:
>Paul Bartlett <bart...@panix.com> wrote:

>> A lot of it, I would say, is what you are first exposed to
>> and have any real experience with.
>> My personal only heavy duty assembly language programming
>> was on IBM S/370 class mainframes

Me too! I still have my IBM System 360 "green card"
and IBM System 370 yellow reference cards.
I got to 'execute' a MVC for moving a variable number of bytes
for legitimate self-modifying code!
CNOP is so awesome, I miss that power in other assemblers.

>> (I did a lot of that!), but for MPUs,
>> my first exposure was to Z80.

I found Z80 assembler terribly tedious
compared to the power of 18/16/32 bit operations of the Sys/360,
and the instructions are just SO WEAK :-(
Happily, C compilers were already available.

>Years ago, which was about 1976, when working with both S/370 and
>Z80/8080 systems, we had macros for the S/370 assembler to
>generate Z80/8080 code.

Programming on both systems simultaneously?
That's mind expanding!

At first, I misread that as being Z8000 and Z80 systems,
which was reasonable for 1982 while Zilog Office Systems
was under Exxon, selling Z8000 Zeus (Unix) systems
as well as their own Z80 systems all connected by Z-net.


-- Jeffrey Jonas
jeffj@panix(dot)com
The original Dr. JCL and Mr .hide

Tesseract

unread,
Jan 16, 2014, 6:32:50 AM1/16/14
to
On Wednesday, 15 January 2014 10:54:39 UTC+10, Paul Bartlett wrote:
> On Tue, 14 Jan 2014, Steven Hirsch wrote:

> >> 1. Am I the only one who strongly objects to Intel mnemonics?
>
> > I think it's vi vs. emacs by another name, but I was never comfortable with
> > Intel ASM syntax and always used Zilog mnemonics.
>
> A lot of it, I would say, is what you are first exposed to and have
> any real experience with. My personal only heavy duty assembly
> language programming was on IBM S/370 class mainframes (I did a lot of
> that!), but for MPUs, my first exposure was to Z80. So I suppose if I
> were to try to do any real Intel/Zilog work, even on an 8080, it would
> be Zilog mnemonics that would be most comfortable, because that is what
> I was first exposed to (although obviously I would have to avoid the
> hardware instructions unique to the Z80).
> --
> Paul Bartlett

I think the issue is not quite the same as the vi v. emacs argument (but
only a masochist would use vi). Further, in my case it is not a matter
of which assembler I encountered and used first because I did assembly
language programming with ASM for a considerable time before switching to
Zilog mnemonics.

hen writing programs in assembly language I much prefer to use Zilog
rather than Intel mnemonics. The reason for that has nothing to do with
the extra instructions that are available to the Z80. What I like is the
simplicity of the Zilog assembly language itself. It is a bit like
encountering the metric system; you never want to go back to the complex
mish-mash of 18th century British measurements which are still in use in
the USA and a couple of other countries.

Consider the following Intel 8080 assembly language instructions:

LDA LDAX LHLD
LXI MOV MVI
SPHL STA STAX
SHLD

All of these instructions are similar in that they perform the same logical
function, namely copying a few bits from somewhere to somewhere else. Ten
instructions which all do much the same thing! In Zilog assembly language
these instructions all share the same mnemonic, LD, with the operands
specifying the source and destination. In my view having to remember one
mnemonic instead of ten is much more reasonable.

The situation is much worse when using the macros in Z80.LIB to write Z80
code in Intel notation but I shall not discuss those beyond saying that the
number of instructions for copying a few bits from here to there increases
to 34!

It is not hard to guess why Intel chose to have ten instruction mnemonics
rather than one; it makes the task of writing an assembler so very much
easier. Once an opcode mnemonic has been identified a great deal is known
about the instruction as a whole, e.g. its length, the skeleton machine
code to be generated and the types of operand which are acceptable. On the
other hand the writer of an assembler which accepts Zilog mnemonics has a
much more difficult task; he often doesn't even know how many bytes of
machine code an instruction will occupy until the operands have been
identified and checked. Of course that is his problem and should not
concern us as users of an assembler. The Intel-mnemonic assembler writer
forces us to do his job for him every time we write an 8080 program, in
fact, almost every time we code an instruction!

I have this naive idea that computers and software are supposed to serve
users rather than the converse yet when writing assembly language programs
using Intel mnemonics I find that I am doing some of the assembler's job
for it. That is something to which I object.

Another reason why I prefer Z80 mnemonics is that whenever I write an
instruction which operates on a 16-bit register-pair I actually code the
operand as a register-pair mnemonic (e.g. PUSH BC instead of PUSH B, DEC HL
instead of DCX H). I think that makes a program somewhat easier to read.

Ed

unread,
Jan 19, 2014, 8:03:15 AM1/19/14
to
When using a conventional assembler I'll use Zilog mnemonics because
it's the most used. However when writing code subroutines under Forth,
I use an RPN assembler with Intel/TDL mnemonics (and like it :)

Folks dismiss Intel's mnemonics however they make writing assemblers
very easy (why I chose them). They're also easy to learn, contrary to first
impressions. As I have reason to use both Intel and Zilog mnemonics,
I can't pick between them :)



Tesseract

unread,
Jan 19, 2014, 4:53:38 PM1/19/14
to
On Sunday, 19 January 2014 23:03:15 UTC+10, Ed wrote:
> Steven Hirsch wrote:
>
> > On 01/13/2014 08:09 PM, Tesseract wrote:
>
> >
>
> > > Now for the point of this posting. Some questions:
>
> > >
>
> > > 1. Am I the only one who strongly objects to Intel mnemonics?
>
> >
>
> > I think it's vi vs. emacs by another name, but I was never comfortable with
>
> > Intel ASM syntax and always used Zilog mnemonics. It's been a while, but ISTR
>
> > using xlate5 for that purpose.
>
>
>
> When using a conventional assembler I'll use Zilog mnemonics because
>
> it's the most used. However when writing code subroutines under Forth,
>
> I use an RPN assembler with Intel/TDL mnemonics (and like it :)
>
>
>
> Folks dismiss Intel's mnemonics however they make writing assemblers
>
> very easy (why I chose them). [Rest of paragraph deleted.]

That is precisely my point. The burden is shifted from the assembler writer to the assembler user!

Human serves computer rather than computer serves human.

However I consider my questions to be answered.

1. Am I the only one who strongly objects to Intel mnemonics?

--- YES

2. Are there better translators around?

--- IRRELEVANT (given the answer to #1)

3. Does anyone else actually use IZ?

--- NO

Thanks for all the feedback. I really mean that; it has been a most enlightening exchange. It is very easy to become too attached to one's own views and the occasional deflation is a valuable lesson.

I shall use IZ for my own purposes and to suit my own preferences. I shall continue to make adjustments to IZ as I find source files which cause problems but I shall not rush to release the latest version. Meanwhile if anyone wants an update then just ask me privately.

Thanks again to all who participated.

Ed

unread,
Jan 20, 2014, 6:43:36 AM1/20/14
to
Tesseract wrote:
> ...
> Human serves computer rather than computer serves human.

No greater tool has the devil invented.



billc...@iscmns.org

unread,
Jan 10, 2016, 3:34:57 PM1/10/16
to
On Tuesday, January 14, 2014 at 2:09:31 AM UTC+1, Tesseract wrote:

> 3. Does anyone else actually use IZ?
Yes I've use both XIZ and XZI. I'm perfectly at home with both Intel and Zilog mnemonics.

For my successful attempts to re-write BDOS and CCP, I write in TDL mnemonics assembled by MAC (or RMAC) using macros for the Z80 instructions. In this way I can decide on the target CPU at assembly time. Generally the Z80 code is about 4% smaller but I dare say that if I had designed the code with the Z80 in mind the figure would improve to say 10%.

In the late 80's I took on a contract to optimize the CP/M code generated by the Aztec compiler. My approach was to translate the Intel mnemonics into Zilog, apply sophisticated automatic batch editing, and then optimization by hand. I think I achieved a 29% size reduction and 41% speed improvement. :)

dusty...@gmail.com

unread,
Jan 25, 2020, 5:35:31 AM1/25/20
to
> Now for the point of this posting. Some questions:
>
> 1. Am I the only one who strongly objects to Intel mnemonics?
>
> 2. Are there better translators around?
>
> 3. Does anyone else actually use IZ?

No, you aren't alone with the dislike of Intel mnemonics. I personally can't stand them. Much prefer Zilog's mnemonics. Oh thou, I prefer Lower case. I know, there's always one that screws up the statistics. LOL

There is one written in AWK that used to work good, before I screwed around with it and now messes up a couple of "Rotate A".
There's also one written in basic. I'll go thru my TAR files and locate them for upload. Virgin copies btw.

Steven Hirsch

unread,
Jan 25, 2020, 8:46:26 AM1/25/20
to
On 1/10/16 3:34 PM, billc...@iscmns.org wrote:
> On Tuesday, January 14, 2014 at 2:09:31 AM UTC+1, Tesseract wrote:
>
>> 3. Does anyone else actually use IZ?

FWIW, I patched John Saxton's IZ45 to build on Linux and routinely use it for
Intel to Zilog conversion. Intel mnemonics never made a lick of sense to me.

RIP, John. You did nice work!

Martin

unread,
Jan 25, 2020, 9:41:52 AM1/25/20
to
silence is golden!

larsn...@adelphia.net

unread,
Apr 26, 2020, 11:49:44 PM4/26/20
to
While I originally learned Intel mnemonics, I prefer Zilog. I like using either to ZMAC or Z80ASM assemblers which only take the Zilog mnemonics. For most .asm files I use XLATE5. However if I run into problems I switch to IZ45, i.e. the one coded in C. While a tad slower, it handles a wider range input and probably does the best job. Have not found anything better than IZ45.

Lars

Steven Hirsch

unread,
Apr 27, 2020, 9:44:06 AM4/27/20
to
On 4/26/20 11:49 PM, larsn...@adelphia.net wrote:
>> 3. Does anyone else actually use IZ?
>
> While I originally learned Intel mnemonics, I prefer Zilog. I like using
> either to ZMAC or Z80ASM assemblers which only take the Zilog mnemonics.
> For most .asm files I use XLATE5. However if I run into problems I switch
> to IZ45, i.e. the one coded in C. While a tad slower, it handles a wider
> range input and probably does the best job. Have not found anything better
> than IZ45.

Ditto for me. I ported IZ45 to Linux and use it frequently.

dott.Piergiorgio

unread,
Apr 30, 2020, 4:49:45 AM4/30/20
to
mha. I use intel mnemonics when coding for 8080 and zilog when coding
for Z80. Best way for avoiding an uncommon mistake, using Z80 opcodes in
a program intended for 8080.

Fred Weigel

unread,
May 2, 2020, 6:34:04 PM5/2/20
to
I like the idea of using opcodes as arguments, which doesn't work
as well with the Zilog nomenclature:

mvi a,(mvi a)

works just fine (in m80)

in Zilog that would be? Not "LD A" because that is not specific enough.
So, m80 simply removes that feature in ".z80" mode.


I have always liked m80, because it switches easily with .8080 and .z80

FredW

dxforth

unread,
May 2, 2020, 10:30:44 PM5/2/20
to
On Sunday, May 3, 2020 at 8:34:04 AM UTC+10, Fred Weigel wrote:
> I like the idea of using opcodes as arguments, which doesn't work
> as well with the Zilog nomenclature:
>
> mvi a,(mvi a)
>
> works just fine (in m80)
>
> in Zilog that would be? Not "LD A" because that is not specific enough.
> So, m80 simply removes that feature in ".z80" mode.
>
>
> I have always liked m80, because it switches easily with .8080 and .z80

Being one of the earliest full-featured Z80 assemblers for CP/M it became
the defacto standard. I recall encountering M80 code that SLR would choke on.
While I use SLR for speed, I always check the code assembles under M80.
Message has been deleted

angus...@gmail.com

unread,
May 10, 2020, 11:03:15 PM5/10/20
to
On Monday, May 11, 2020 at 12:57:49 PM UTC+10, angus...@gmail.com wrote:
> On Tuesday, January 14, 2014 at 12:09:31 PM UTC+11, Tesseract wrote:
> > Recently I have been doing a lot of assembly language development as I write and modify tools to reconstruct the Tesseract RCPM+ computer. Since I refuse to do half of the assembler's job for it I translate any Intel source code to use Zilog mnemonics.
>
I beg to differ. I started with TDL software (and have managed to salvage most TDL/CDL/PSA software). Its mnemonics were produced before the Z80 was released and so is a cross breed of Intel and Zilog mnemonics. I am currently writing a program to facilitate translation from Zilog to TDL (both ASM and PRN files) to give me access to various pieces of code.

larsn...@adelphia.net

unread,
May 16, 2020, 9:54:02 PM5/16/20
to
Reconsidering my previous post. Realized I haven't had the need for IZ's extended capabilities for 4 or 5 years! So I tried running it the other night and it didn't work. No sign-on message not nothing. Then I realized I was using ZPM3 the last I used it. I currently run ZSDOS and BPBios almost exclusively now. Dusted off the ZPM3 boot disk and tried IZ again, it worked just like I remembered. Tried to recompile on CP/M 2.2 and got memory overflow error. Same with ZPM3. Must be using an incorrect command line for Hi-Tech C. Does any one know the correct command line to use?

Lars

angus...@gmail.com

unread,
May 17, 2020, 6:10:21 AM5/17/20
to
I got an email of your post. Tried a couple of ways to reply back. Do you need a Hi-tech C manual? I have one (though it came from the web) which I could email to you.

Angus Bliss

positron (JL.Collado)

unread,
Jul 5, 2020, 10:40:25 PM7/5/20
to
Hi Lars, I also use ZPM3; could you share your compiled version of IZ45 ? Thanks in advance !
Cheers, JL.

Bill Collis

unread,
Jul 7, 2020, 11:19:21 AM7/7/20
to
On Thursday, 30 April 2020 10:49:45 UTC+2, dott.Piergiorgio wrote:
>
> mha. I use intel mnemonics when coding for 8080 and zilog when coding
> for Z80. Best way for avoiding an uncommon mistake, using Z80 opcodes in
> a program intended for 8080.
>
> Best regards from Italy,
> dott. Piergiorgio.

I will admit that Zilog mnemonics may be more logical. On the other hand the code I write needs the ability to have one source which generates 8080 or more compact Z80 code. The extra TDL mnemonics can very easily be handled by macros for both processors. So for example, my Tiny CP/M project shrinks by about 8% when the Z80 is specified.

If I were to write Zilog mnemonics, there would be no easy way to substitute unimplemented Zilog opcodes into 8080 equivalents. And I might inadvertantly use Zilog opcodes when the target processor is 8080. So it would be a potential source of error. But mnemonics like SSPD, JR, LDED work fine on an 8080 using macros. I have never had any problem reconfiguring for different CPUs (including Z180). This kind of flexibility is not available with Zilog mnemonics.

But maybe I am wasting time? Does anyone actually use an 8080 or V20 anymore?

Udo Munk

unread,
Jul 7, 2020, 1:35:55 PM7/7/20
to
On Tuesday, July 7, 2020 at 5:19:21 PM UTC+2, Bill Collis wrote:

> But maybe I am wasting time? Does anyone actually use an 8080 or V20 anymore?

For IMSAI and Altair systems I prefer to use them with an 8080.

dxforth

unread,
Jul 8, 2020, 3:53:15 AM7/8/20
to
On Wednesday, July 8, 2020 at 1:19:21 AM UTC+10, Bill Collis wrote:
> ...
> But maybe I am wasting time? Does anyone actually use an 8080 or V20 anymore?

Other than 8085 users and Russian enthusiasts with machines hosting
an 8080 clone CPU? :)

Udo Munk

unread,
Jul 8, 2020, 5:51:49 AM7/8/20
to
On Wednesday, July 8, 2020 at 9:53:15 AM UTC+2, dxforth wrote:

> Other than 8085 users and Russian enthusiasts with machines hosting
> an 8080 clone CPU? :)

For S100 bus machines even new 8080 CPU boards are made, like these:

http://jmprecision.co.uk/shopping/pgm-more_information.php?id=131&=SID#MOREINFO
https://www.tindie.com/products/gekaufman/altair-mits-8800-cpu-card-8080a-s-100-s100-replica/
https://deramp.com/altair_8800c.html
http://www.vcfed.org/forum/showthread.php?63360-Reproduction-8080A-CPU-boards-for-the-IMSAI-and-Altair-are-now-available-for-shipping
http://s100computers.com/My%20System%20Pages/8080%20CPU%20Board/8080%20CPU%20Board.htm

That are only a few new boards that require a real 8080A CPU, not to mention software
implementations of the 8080 in emulations or FPGA's. So yes, people are still using them.
0 new messages