Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!topaz!gaynor From: gaynor@topaz.UUCP Newsgroups: comp.lang.misc Subject: Re: assembly programming prefereable to HLL programming ? Message-ID: <7738@topaz.RUTGERS.EDU> Date: Fri, 12-Dec-86 01:11:05 EST Article-I.D.: topaz.7738 Posted: Fri Dec 12 01:11:05 1986 Date-Received: Mon, 15-Dec-86 03:06:55 EST References: <646@instable.UUCP> <476@atari.UUcp> <8@blipyramid.BLI.COM> <386@unc.unc.UUCP> Organization: Rutgers Univ., New Brunswick, N.J. Lines: 55 In article <386@unc.unc.UUCP>, rentsch@unc.UUCP (Tim Rentsch) writes: > From previous article.... [myself] > > I think the key to being able to conveniently write assembly code lies > > in a really bitching macro facility, with the general approach being > > 'define whatever wierd constructs using the macro expander, but, > > because YOU are supplying the underlying code, you can make it as > > efficient as you want'. Now, the program is not necessarily > > non-portable, just the macro code. Since most of the macro routines > > are not too complex when singled out, it's easier to rewrite. > > Gee, along with that macro facility, wouldn't it be nice to have a > facility for automatically passing parameters to a routine? And > maybe some simple data-structuring macros? Maybe a flexible > macro-call syntax which allows expressions to generate code? And > how about some macros to do IF's and WHILE's? Maybe some routine > calling macros, and some simple checks on argument validity? > > Before laughing too hard, ask an assembly language programmer with > "a really bitching macro facility" if he has ever wanted those > things, or if he has tried to implement any himself. > Then tell me > (with a straight face) that the result is significantly different > from a HLL. It is not, which is what makes it reasonable... Now, come on. I'm NOT saying that programming in assembler is preferable to programming in a given HLL - *read* the portions that you've included! The point I'm trying to get across is, that with the proper support, programming in assembler (for whatever purpose and reason) can be done in a portable and structured manner that makes the task much easier. Consider the following circumstance: You've just written a real CPU hog which will have to be able to port easily. Because it's a hog, you want to write the hungry code in assembler for efficiency. You DO rewrite the pertinent, say, 5% in assembler. Now you try to port it to a different machine. Do you want to rewrite all of the assembler code? I personally wouldn't ever write in assembler (unless I'm being grossly over-compensated), for all the previously stated reasons. Silver. /-------------------------------------------------\ | uucp: ...!topaz!gaynor ...!topaz!remus!gaynor | | ~~~~~~~~~~~~~~~~ | | arpa: gaynor@topaz silver@gold | \-------------------------------------------------/ ps alias hell /dev/null Send flames to hell (where they belong :-).