Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!snorkelwacker!apple!goofy.apple.com!esmith From: esmith@goofy.apple.com (Eric Smith) Newsgroups: comp.sys.handhelds Subject: Re: (long) Re: SAD - Saturn Disassembler Beta 1.01 Message-ID: Date: 18 Sep 90 05:44:25 GMT References: <10712@life.ai.mit.edu> <57448@microsoft.UUCP> <10753@life.ai.mit.edu> <57461@microsoft.UUCP> Sender: usenet@Apple.COM Organization: Frobozz Magic Widget Company Lines: 57 In-reply-to: alonzo@microsoft.UUCP's message of 17 Sep 90 10:12:19 GMT In article <57461@microsoft.UUCP> alonzo@microsoft.UUCP (Alonzo GARIEPY) writes: > In article <10753@life.ai.mit.edu> bson@rice-chex.ai.mit.edu (Jan Brittenson) writes: > > >1. All hex numbers should be preceded by the # symbol, including the > > > machine code and addresses in listing files. > > Why? They are not part of any assembler syntax and can only be in > > hex anyway. > > That isn't exactly true. You forget that I wrote the first assembler and > disassembler using these mnemonics :-). The ideas was that ALL numbers > in hex have a # in front. That makes life much easier for the lexical > front end to understand what it is getting. Since my program is reversible, > the listing files are completely compatible with input files (code for > assembly, hex for disassembly). How about using "$" to indicate hex? Many assemblers for 65xx and 68xx processors do that. Or suffix an "h", "d", "o", or "b" for hex, decimal, octal, or binary, as most 808x and x86 assmeblers use. Or (less preferred) how about "0x" as C uses? Anything but "#", please! > > >3. Nonstandard symbols are enclosed in quotes and can contain any > > > characters. Example: "Garbage Collector!" When used as labels, > > > the colon goes outside the quotes. > > > > Hmm... I agree, although I'd prefer to see the quotes as part of > > the symbol name itself. The result is the same, of course. I think > > enclosure within | and | looks better, and I'm used to it from Common > > Lisp. It's not a big issue for me, though. > > The vertical bar should be reserved for C-like bitwise operations. > And I realized that I would prefer to use quotes for string literals. > How about enclosing nonstandard symbols in < and >, and you can think > of them as part of the symbol. I would prefer that such symbols were > alphabetized by their second character, however :-). I haven't actually ever *needed* symbols with reserved characters, but you never know. I don't like "<" and ">" as delimiters, since they already have several well known meanings: 1) Forcing data size to 8 or 16 bits (typical of Motorola assemblers) 2) Selecting high or low byte of expression (typical of 65xx asm) 3) Comparison (not too relevant since comparison operators are binary) 4) Bit shift operators ("<<" and ">>", also binary) > > x^expr Hex > > d^expr Decimal > > o^expr Octal > > i^expr Code > > l^expr Literal > > where ^ can be freely substituted with ' (i.e. x'expr etc). The code and literal support would be great. I don't like this syntax for numbers, though. -- Eric L. Smith Opinions expressed herein do not necessarily reflect those esmith@apple.com of my employer, friends, family, computer, or even me! :-)