Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.unix.questions,comp.edu,comp.lang.misc Subject: Re: Teaching Assembler on VAX (BSD 4.3) Message-ID: <6725@mimsy.UUCP> Date: Sun, 17-May-87 18:38:42 EDT Article-I.D.: mimsy.6725 Posted: Sun May 17 18:38:42 1987 Date-Received: Sun, 17-May-87 22:41:57 EDT References: <351@aucs.UUCP> <588@maccs.UUCP> <234@brandx.rutgers.edu> <593@maccs.UUCP> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 52 Xref: mnetor comp.unix.questions:2373 comp.edu:386 comp.lang.misc:397 In article <593@maccs.UUCP> ns@maccs.UUCP (Nicholas Solntseff) writes: >I did look at m4, but it is really geared to C It is? Why, then, is someone I know experimenting with using it as a front end to the Sun assembler? (Well, then again, he has some some other pretty dumb things :-) .) >and did not really address the problem of sophomore students learning >a very user-unfriendly assembler. Okay, here is the *real* question: What makes an assembler friendly or unfriendly? I have used: EDTASM (Z80); two homegrown assemblers (Z80); Microsoft's M80 (Z80); a rather weird assembler written in FORTRAN (IBM 370); 4BSD `as' (Vax); Sun `as' (680x0); GENIX `as' (NS320xx); Microsoft's MASM (80x86). Of all of these, I like the 4BSD and Sun `as' best, for two reasons: the 4BSD assembler is fast, and the Sun assembler is reasonably fast except for extremely large (compiler generated) inputs; and both of them support a form of temporary labels (4BSD has number labels, Sun has both number labels and short-scope labels). One of the two homegrown assemblers, `rzasm', uses m4 as a macro preprocessor. (The other was something I wrote in BASIC on my old TRS-80 model I. It could assemble large programs, as it spilled labels to disk files, but was rather slow. It ran at the blinding speed of 15 lines per minute ... each pass.) Only M80 and MASM had extensive built-in macro facilities, but I never really missed these with the others. In the case of the Vax and Sun assemblers, I use the C preprocessor, since the assemblers will accept semicolon-separated statements: movl $0,r7; 1: addl2 r9,r7; ashl $1,r9,r9; bbc $12,r9,1b (/lib/cpp eats newlines in macros, hence something like this is required. m4 does not eat newlines.) So what is /bin/as missing, or what does it do wrong, that makes it user-unfriendly? -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690) Domain: chris@mimsy.umd.edu Path: seismo!mimsy!chris