[comp.unix.questions] Teaching Assembler

andy@batcomputer.UUCP (05/20/87)

In article <7447@brl-adm.ARPA> chris@mimsy.umd.EDU (Chris Torek) writes:
>m4 is just about maximally untailored.
>...
>...All I want from an assembler is that it assemble, quickly, and that it
>tell me where something is wrong.  There is so little to go wrong
>that it does not matter *what*: just *where*.

Absolutely.  While I did pay my dues with a PDP-11 macro assembler under
RT-11, I've found m4/cpp to be more than enough to get the job done.

The project that I am currently involved in is based upon the INMOS
transputer (T414 to be exact).  Our board-level monitor is a classicly
implemented threaded interpreter (forth-like for the uninformed) written
entirely in native T4 assembler.  After a weekend of playing with m4, I
put together an m4 macro package that does some gee-whiz things at assemble
time.

By default, our assembler front end runs the source through any specified
macro files (*.m4), then through cpp, and then finally assembles it.  I could
have gotten by, I think, with just cpp if our assembler understood
semicolon separated statements.

I suppose that I shouldn't tell you that the current version of the assembler
backend (linker, symbolic address binder, etc.) are *all* written in
awk and m4...


-- 
Andy Pfiffer					andy@tcgould.tn.cornell.edu
Cornell Theory Center / Cornell U.		cornell!batcomputer!andy
Home of the first usable T-Series		(607) 255-8686
"...that's the way a Transputer works, right?"  Systems Group

rachiele@nadc.arpa (05/21/87)

I agree that assembler language should not be used for very many applications,
and that learning assembler for one machine does not help you very much
when you need to write a routine for some random machine.  But the main idea
behind teaching assembly language to students is giving them some training
in the inner workings of a given machine.  Understanding what registers (sp?)
do and how indirect addressing and things like that are used can be very
valuable, and some knowledge of the machine code is necessary for debugging
on many machines.  And I've found that the first assembler you learn is the
hardest, after that even a vastly different machine becomes easier to
understand.

   Please flame me on my content, not my spelling or grammer.

         Jim

           rachiele@nadc.arpa

PAAAAAR%CALSTATE.BITNET@wiscvm.wisc.EDU (05/31/87)

This discussion seems to be the result of a time tunnel
from the 60's on PAPERNET!
Seriously tho!
Dick Botting
paaaaar@calstate.bitnet
PAAAAAR%CALSTATE.BITNET@WISCVM.WISC.EDU
Comp Sci, CSUSB, 5500 State Univ Pkwy, San Bernardino, CA 92407
(714)887-7368(voice), (714)887-7365(modem)