Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!ucbcad!ucbvax!decvax!tektronix!orca!ruby!gary From: gary@ruby.UUCP Newsgroups: comp.sys.cbm Subject: Re: Commodore Macro Assembler -- long review Message-ID: <378@ruby.TEK.COM> Date: Tue, 18-Aug-87 02:08:59 EDT Article-I.D.: ruby.378 Posted: Tue Aug 18 02:08:59 1987 Date-Received: Fri, 21-Aug-87 04:44:59 EDT References: <894@edge.UUCP> Reply-To: gary@ruby.UUCP (Gary Hanson) Organization: home Lines: 81 Keywords: conditional assembly exists Favorite color: blue [ if you can see this, there is a bug in your line-eater] Interesting to see that someone is still using the good 'ol Commodore Macro Assembler. I kinda like it; it's quaint, and inexpensive (I think I paid $12 for it a few years ago - before it got marked up to $30, and then back down). Anyway, conditional assembly DOES exist, if you're willing to put up with some slightly bizarre syntax. Below is a list of some features that didn't seem to make it into the documentation that came with the package. I think that there might be one or two other things hidden in there; look through the binary till you find the token tables - I think there's a couple of alternate names for existing pseudo-ops or somesuch. Enjoy. -=+=-=+=--=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=- UNDOCUMENTED COMMODORE ASSEMBLER FEATURES Gary Hanson (rev 16-Aug-85) Undocumented Pseudo-ops .LIST Turn on listing .NOLIST Turn off listing Undocumented Option .OPT NOSYM Turn off symbol table on lineprinter This option suppresses the listing of the symbol table on the line- printer. The option to enable the symbol table list is .OPT SYM There is no way to get a symbol table on the screen, only the lineprinter. Conditional Assembly .IFE assemble if expression equals zero .IFN assemble if expression not equals zero Syntax: .IFE expr < (whatever) > There must be a less-than sign (<) on the line with the pseudo-op, and the block to be conditionally assembled must end with a greater-than in the first character (leave the rest of the line blank). Example 1000 DEBUG = 0 1010 LDA 33 1020 STA CHAR 1030 .IFN DEBUG < 1040 JSR CHROUT 1050 RTS 1060 > 1070 JMP DOMORE The two lines JSR CHROUT / RTS would not be assembled unless the value of the DEBUG flag was nonzero. Usage Hints When going from the editor to the assembler, always KILL the editor first. I'm not sure that this is really necessary, but it seems to avoid a condition where some of the system pointers get messed up. Also, when the assembler asks whether you want a listing, type N to get a listing on the screen, or to get a listing on the printer. Unplug the printer to get no listing. This is not explained well in the documentation. -=+=-=+=--=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=- Gary Hanson Tektronix IDG ...!tektronix!ruby!gary gary@zarquon.GWD.TEK.COM No mice allowed in my house - that's why I have a cat.