Need an executable version of asm80

Jun 01, 2006 16 Replies

I need to do a quick patch on an old 8051 program written in assembler for asm80. The assembler was asm80 A Cross Assembler



for the Intel 8080-8085



With CPM[tm] syntax



- by -



David A. Klotzbach



I have the only C source for the program, it's generally available on the web, but I can't compile it. It originally ran on an old Tektronix workstation that is long defunct. What I'd like is a dos/windows executable that I can use to assemble my program, but I'd settle for something that works in linux. I only plan to do this once.



The ASM won't assemble in any other assembler I've found...expect it's because of the "CP/M syntax". The assembler won't compile in any version of C that I've tried. The issues appear to be version-specific directives rather than the actual C-code...but I'm not a C programmer. Is there a way to determine which C-compiler will compile this assembler program so I can run it on a PC?


My options appear to be:



1) port my asm program to an available assembler.
2) port the Assembler to an available C-compiler.
3) edit the hex code by hand.

None of the above is the most likely outcome.



But maybe someone else has had this problem and has an executable version of the assembler. Dos or windows or Linux would work for me. Thanks, mike


You already posted this.

-- Some informative links: news:news.announce.newusers

formatting link
formatting link
formatting link
formatting link

On this newsgroup? I thought I saw it elsewhere.

Al Balmer Sun City, AZ

Umm, maybe I'm missing something here, but AFAIK asm80 won't assemble

8051 code. 8051 code is completely different to 8080/5.

Regards,

Mark McDougall, Engineer Virtual Logic Pty Ltd, 21-25 King St, Rockdale, 2216 Ph: +612-9599-3255 Fax: +612-9599-3266

You're right. I'm wrong. He got sent here.

Some informative links: news:news.announce.newusers http://www.geocities.com/nnqweb/ http://www.catb.org/~esr/faqs/smart-questions.html http://www.caliburn.nl/topposting.html http://www.netmeister.org/news/learn2quote.html

This might have been a macro assembler, with the Cross-asm in the macros. In that case, you'll need the ASM source, and the MAC file as well.

Another pathway might be to load a CP/M emulator, on your PC, and find an original ASM com file ?

-jg

Still can't see how it would've been done - asm80 is producing 8080/5 opcodes regardless of the macro conversion...

I can see how it *might* have been done the other way - i.e. cross-assemble 8051 into 8080/5...

Regards,

Mark McDougall, Engineer Virtual Logic Pty Ltd, 21-25 King St, Rockdale, 2216 Ph: +612-9599-3255 Fax: +612-9599-3266

Well, actually, It's an 8744 RUPI chip. It's been more than a decade, but I think 8080 code will run just fine on it. I think I have to lie to the programmer and program it as a

8751H.

I built a DOS 6.2 system and put Borland TurboC V2.0 and tried to compile asm80. It's giving me erorrs about size of structure unknown. Don't think I'll ever be able figure that out within the limits of my attention span.

Looks like I gotta port the ASM code....sigh... I'm gonna try ASEM51 unless someone has a better idea. Thanks, mike

I think you're confused?!? I found this...

...which looks remarkably similar to the blurb from your OP. You're not getting mixed up with this assembler are you?

Regards,

Mark McDougall, Engineer Virtual Logic Pty Ltd, 21-25 King St, Rockdale, 2216 Ph: +612-9599-3255 Fax: +612-9599-3266

It can be done - That's how we did our first 8051 project....

-jg

Nope.

Other alternatives :

You do have the HEX file, as well ?

Then, you could DISASM that, assemble (using a new assembler) again to verify equality, then apply your quick patch to the DisAsm code.

That might be less effort, than a full assembler port, and if the patch is at the simple end of the scale, will be workable.

-jg

I'd be interested to see that!

I guess you could define macros for 8051-like mnemonics which resolve to 'nonsense' 8080/5 instructions (with the correct 8051 binary) or perhaps even DB's (define bytes)?!? Was that how it was done?

Can't think how address offsets for jumps etc were calculated???

Regards,

Mark McDougall, Engineer Virtual Logic Pty Ltd, 21-25 King St, Rockdale, 2216 Ph: +612-9599-3255 Fax: +612-9599-3266

Generating opcodes for instructions without operands is easy, something like

MACRO NOP DB 00h ENDM

just generate the corresponding bit pattern with a byte/word generating directive. Opcodes with operands require a bit more to parse the operand expression and modify the opcode byte code accordingly and possibly add some extra bytes after the opcode.

The labels must be on the correct addresses so that the opcode macros will get correct addresses from the assembler symbol table and the macros are then capable of calculating branch displacements etc.

Managing different pages etc. can be a bit difficult within the macros.

These tricks work quite well as long as the assembler generates absolute binary code in the same format (S-record etc.) that can used more or less directly by the actual target system.

Paul

INTEL 8744 RUPI chip has 8051-core with aditional SIU (Serial Interface Unit ) and 192 bytes of RAM . It is code compatibile with 8051. You can use any assembler for 8051 family.

Regards Jarek Czula Poland

Ahh, those were the days when spirits were brave, the stakes were high, men were real men, women were real women and documentation was real ASCII :-)

Two hints:

  1. I just located a file named "asm80.tar$z" on

ftp://ftp.encompassus.org/lib/vs0088/languages/assembler/

This is a compressed tar file. Unpacking it yields source code and makefile for what I believe to be the assembler in question. It compiles on my Linux box with one warning:

"asm.h:66: Warning: array `hashtbl' assumed to have one element"

By adding "extern" at the beginning of line 66 in asm.h like this:

struct sym ... -> extern struct sym ...

the warning goes away and the assembler builds with no errors.

I have no idea wether this assembler actually works, but I guess you should give it a try (took me 5 minutes).

  1. Cite from
    formatting link

"All of these tools build under Cygwin/Linux and come with the GNU X-Tools product (on the same CD-ROM distribution).

[...]

asm80 Cross-Assembler An Intel 8080/8085 Cross-Assembler written by David A. Klotzbach. This

2Pass absolute assembler is basically compatible with the original CPM assembler."

So it seems this assembler is also available for purchase.

Cheers

Rob

-- Robert Kaiser email: rkaiser AT sysgo DOT com SYSGO AG

formatting link
Klein-Winternheim / Germany
formatting link

...

OK, I'll byte... Email that assembler source code to snipped-for-privacy@rwaltman.com and I'll try to make an executable. No promises of course, and probably I will not get to do it until Sunday.

Roberto Waltman

^^^^ Oops! Freudian typo.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required