Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!ames!umd5!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.arch Subject: Re: using assembler (vs HLL, etc) Message-ID: <12729@mimsy.UUCP> Date: 29 Jul 88 02:26:11 GMT References: <1086@garth.UUCP> <76700041@p.cs.uiuc.edu> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 49 In article <76700041@p.cs.uiuc.edu> gillies@p.cs.uiuc.edu writes: >I have a hard time believing people who claim that assembly is more >modifiable than a high level language. I think they mean that the assemblER (the thing that reads the program source and generates the program object) is more flexible/modifiable than a higher-level language compiler. This I find easy to believe. Before I had decent HLL compilers available to me (when I was programming on a TRS-80 model I with bits of homebrew hardware and software: now *that* is primitive :-) ) I did some fairly extensive Z80 assembly programming. The only way I could keep track of what I was doing was to stick to a particular discipline. Within that, I was at least as restricted as by a compiler. Given that (voluntary) set of restrictions, none of the following were particularly difficult: >(c) Extensively revising a struct {} data type to add and remove >fields, then recompiling. (Done by using various label conventions. It would have been nice had I had something to do this for me.) >(d) increasing the local storage of a subroutine from 5 words (smaller >than the register set) to 50 words (probably larger than the register >set). (Use the stack. Painful; stack-relative references are *hard* on a Z80. The typical trick is to use IX or IY; this is slow.) >(e) Changing a subroutine interface specification (adding & removing >arguments) & making sure all the calls are updated appropriately. (A matter of checking all the calls. Typically pointers were in HL and integers in BC, or [if small] in B, C, or A. If many arguments, some went on the stack, or in a `structure' with a descriptor in HL.) >With a high level language (C/Modula-II), these changes are instant >and trivial. Not all of them, perhaps, but the point is that the HLL helps me to do this: it makes it much easier, and that is why I use(d) it. (The TRS-80 has been off for years, now; it has a bad 4116 somewhere in the expansion interface, and I have not the inclination to hunt it down, nor do I have any idea where, or even whether, these 16K chips are still available.) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris