Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcvax!jack From: jack@mcvax.cwi.nl (Jack Jansen) Newsgroups: comp.unix.questions,comp.edu,comp.lang.misc Subject: Re: Student friendly assemblers Message-ID: <7390@boring.mcvax.cwi.nl> Date: Mon, 18-May-87 17:50:34 EDT Article-I.D.: boring.7390 Posted: Mon May 18 17:50:34 1987 Date-Received: Wed, 20-May-87 03:24:17 EDT References: <351@aucs.UUCP> <588@maccs.UUCP> <234@brandx.rutgers.edu> <593@maccs.UUCP> <6725@mimsy.UUCP> <663@boulder.Colorado.EDU> Reply-To: jack@boring.UUCP (Jack Jansen) Organization: AMOEBA project, CWI, Amsterdam Lines: 45 Xref: mnetor comp.unix.questions:2406 comp.edu:393 comp.lang.misc:403 In article <663@boulder.Colorado.EDU> cdash@boulder.Colorado.EDU (Charles Shub) writes: >The biggest problem students, especially sophmores, face is that they >need simplicity!!!! That means either some simple system calls like >INCHWL on TOPS-20 assembler (input character, wait for line feed before >returning) or macros (see almost any assembly text book) like read_w to >read in word length integers. There is another way to achieve simplicity: use the C library, and provide the students with a skeleton program. This is what my professor used to do. He provided us with a simple calculator (only addition and subtraction), and we had to add * and /, operator precedence, and one feature of our own choice, I think. This worked very well, and it had the added benefit that you learned the C calling sequence. That is what you write assembler for, isn't it, to use little assembly routines in big C programs.... > User friendly items include at least: I'll comment on some of these items. I've left out the ones on which I agree (or don't have an opinion on, or don't understand:-) >1. same mnemonic for adding (et. al.) irrespective of whether the operands > are registers or memory cells and >3. identical syntax for accessing an address in either a memory cell or a > register. No. This is very dependent on the machine. For instance, if you're programming assembler on a RISC machine (poor you), you'd better know where your operands are. >4. reasonable vehicles for parameters in macro definitions (an avid hater of > ampersands here) for both positional and keyword parameters. >5. a reasonable selection of conditional assembly pseudos I'm not sure. I think the C preprocessor should be used here. Especially since most assembler stuff will be used in a C environment under unix, and this allows you to use the same header files. The assembler should know about #line or some such, however, so that it can point you to the correct line in case of an error. Of course, if you want to teach students to use assembly for programming traffic lights using an 8080, you're in a different position altogether. You shouldn't be teaching them VAX assembler then, however. -- Jack Jansen, jack@cwi.nl (or jack@mcvax.uucp) The shell is my oyster.