Re: Simplistic Assemblers?

peter@sugar.UUCP (Peter da Silva)
24 Jan 88 08:12:51 GMT

          From comp.compilers

Related articles
Simplistic Assemblers? ames!oliveb!edge!doug (1987-12-15)
Re: Simplistic Assemblers? jiml@cs.wisc.edu (1987-12-16)
Re: Simplistic Assemblers? peter@sugar.UUCP (1987-12-20)
Re: Simplistic Assemblers? watmath!attila!arlie (1988-01-05)
Re: Simplistic Assemblers? peter@sugar.UUCP (1988-01-24)
| List of all articles for this month |

From: peter@sugar.UUCP (Peter da Silva)
Newsgroups: comp.compilers
Date: 24 Jan 88 08:12:51 GMT
References: <789@ima.ISC.COM> <842@ima.ISC.COM>
Organization: Sugar Land UNIX - Houston, TX

In article <842@ima.ISC.COM>, writes:
> M4 is NOT a full function macro processor.
>
> My biggest problem was that it doesn't know how to translate a character
> into its ascii value. We had a convention of storing strings as a sequence
> of characters with the high bit set on the last character. Strings were
> defined by a macro. How do you write that macro in M4 ? (Yes, there IS
> a kludge around...not a nice one.)


You shouldn't need to. I ported a FORTH from MACRO-11 to M4 plus AS, and
had to do this very thing. I don't recall how I did it (this was something
like 3 years ago), but I'm pretty sure it did something like:


head(dup...


generated:


byte 3|200, 'd', 'u', 'p'|200


Doesn't look like a kludge to me...


> M4 is not integrated with the assembler. How do I force a string
> (in the data segment or bss, not the text segment) to start on a word
> or long word boundary, when the assembler has no alignment directive
> available (except in the text segment) ?


Your assembler should have that function. The pdp-11 version of as did.


> And then there's the problem of an assembler that's designed to assemble
> only the output of a C compiler, not ordinary human generated assembler.


Could be a problem, yes. It didn't seem too bad for me. All my interface
code for the file I/O was in as and it came together pretty well. It
did catch typos in mnemonics pretty well...


> I could not cope with the Sun assembler, which I understand is a typical
> Unix assembler, possibly better than some of the others.


It sounds like the Sun 68000 assembler is NOT better than the typical "as".
As should provide all the functions you mentioned. Perhaps the pdp-11 as
was more heavily used by the programmers who developed it. I believe that
quite a bit of 5th edition was written in it.
[true, including the notorious `fc' Fortran. -John]
-- Peter da Silva `-_-' ...!hoptoad!academ!uhnix1!sugar!peter
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.