rb@ccird1.UUCP (Rex Ballard) (05/18/86)
In article <261@atari.UUcp> dyer@atari.UUcp (Landon Dyer) writes: > > >Here's a perverse thought: Has anyone done any research on >architechures to help people writing /assembly language/? (Maybe the >PDP-11, VAX or IBM-370 architechures are optimal, or maybe no one has >ever considered making life easier for those who spend their lives >coding "down unda.") >-- Actually, a number of attempts at this have been made. The Z-80 attempted to use an instruction set which was easier to remember than their Intel counterparts. The 68K attempted to improve this by providing the full matrix of operators and operand addressing modes. The latest improvement is the Transputer. Seems that they don't use "Assembler memnonics", but instead use primitive equations. For example instead of: move A,B add (R1),(R4) They use the more intuitive A=B (R4)=(R4)+(R1); Or something like it. As pointed out before, early predecessors of C were little more than attempts at a "generic assembler". It was only when it was expanded into a full LALR grammer, that the whole issue of optimizing came up. Unfortunately, instructions sets are normally determined by the manufacturer. Strangely enough, one of my jobs was to go the other direction. Instead of taking C code and turning it into assembler, I had to convert assembler into C. Has anybody figured out a way to do this with a compiler!!! It was real cute to do this with the 8085, and 6502.
jennings@lll-crg.ARpA (Richard Jennings) (05/19/86)
>>Here's a perverse thought: Has anyone done any research on >>architechures to help people writing /assembly language? >Actually, a number of attempts at this have been made. >The latest improvement is the Transputer. Seems that they don't use >"Assembler memnonics", but instead use primitive equations. > >For example instead of: > >move A,B >add (R1),(R4) > >They use the more intuitive > >A=B >(R4)=(R4)+(R1); > >Or something like it. Not really. According to the 10 January 86 Inmos Compiler Writer's Guide for the Transputer what you do to add two numbers is to push the numbers onto the 3-register hardware stack and hit add. Anybody who remembers the Rockwell CMOS/SOS Forth machine would *love* the transputer. Occam (in my view) is a red herring. There are some really slick features which the Occam environment 'hides' from the user. Assuming that A and B are local variables, then code to add A to B and store the result in B is ldl A; x7f ldl B; x7e add; xf5 stl B; xde my macro hex where A is stored f locations from the 'workspace pointer', B is stored e locations from the 'workspace pointer'. If this interests you, bug your local Inmos rep for a Compiler Writer's Guide. r