From kjb@CS.VU.NLMon May 13 12:10:29 1996 Date: Mon, 13 May 1996 15:28:51 GMT From: Kees J Bot To: Multiple recipients of list MINIX-L Subject: Re: Manual for the assembler? aswNS@hamp.hampshire.edu (Albert S Woodhull) writes: >On 10 May 1996 20:19:45 GMT Tom F McCabe (tm@astros.cs.swt.edu) wrote >in comp.os.minix: >: Is there a manual somewhere for the assembler used >: in Minix 1.7? I haven't kept up with this group >: for a couple of years so I missed out on the 1.6-1.7 >: updates. I'm trying to slog thru the 1.7 kernel >: now and need to know the syntax of the new assembler. >I don't think there is any change in the assembler syntax since >earlier versions, but for i366 (32 bit) Minix the instruction set has >been expanded to include 80386 instructions. Well, we have progressed to the third assembly dialect by now. The Book shows examples of code that is indeed PC/IX, I believe. The 16-bit ACK ANSI C compiler has a different dialect, I think it is Xenix like, or a horrible crossbreed between PC/IX and the normal ACK dialect. The 32-bit ACK ANSI C compiler understands the true ACK assembly syntax, that has always been used by the 68000 variants of Minix. (For the pseudo instructions, of course, the machine instructions are different.) Here is the startling truth: All this time I have never seen a manual describing any of these assembly dialects. All the assembly code I have written or rewritten for Minix over the years, which is practically everything by now, I have learned by trial and error and 'cc -S' output. This is not as bad as it seems, the only thing that makes an assembly dialect special are the pseudo instructions and the way operands are written. This one gathers from code examples. The real instructions are in the Intel 386 manual. Some time ago I did manage to find a assembler document hidden in the ACK source tree that listed the pseudo ops. There were only two I didn't yet know. I have dumped all my knowledge into the 'asmconv' program, because I needed a way to convert assembly from ACK to Bruce Evans BCC assembler or GNU assembly. Later I taught the program to convert back and forth between ACK-Xenix and true ACK for standard Minix. The 'cc' driver for 32-bit Minix knows about the assembler converter. You may have noticed the -Was-ncc options used in the Makefiles, they tell 'cc' that the language is ACK-Xenix. Most 16-bit assembly is ACK-Xenix, because the 16-bit 'cc' driver can't do conversions. Under 32-bit mode the compiler knows only true ACK, even if it compiles to 16-bit for the bootstrap, but the 'cc' driver can use asmconv, so there is no problem. Under Minix-vmd the assembly files have names that end in '.ack.s', or '.gnu.s', to mark the assembly files with the type of assembly they are written in. The compiler description file lists a number of conversions between such suffixes. So does 32-bit standard Minix in /usr/lib/descr, but I still use simple '.s' names with -Was-xxx options to avoid the 14 character file name limit. One of the things I am planning to do is to transform the ASLD manual that is printed in The Book to describe the 386 true ACK language. Until then I'm afraid there is no documentation, but the assembly files themselves. -- Kees J. Bot (kjb@cs.vu.nl) Vacuum Cleaner and Washing Machine Repair