(1 / 1)
Date: January 29, 1990 16:29
From: BERT::ALBAUGH
To: @SYS$MAIL:EE
Well, I'm confused, so I decided to turn to the august community of erstwhile scholars we know as sys$mail:ee to answer a question (or set of them). First a little background. When I started working on ASAP, I needed names for data items of 8, 16, and 32 bits. The first and last were relatively easy, 8 bits was the minimum addressable unit, so it was a byte. 32 bits was the size of all registers and the data bus so it was a word. That means 16 bits would be a halfword. This was simple, self- explanatory, and had historical precedent (IBM 360, PDP-10, etc). I toyed with the idea of calling them char, short, and int, but someone (I forget who) flamed me severely so I abandoned that approach. So loading 16 bits was done with a LDH (sign extend) or LDUH (zero-fill) while loading a whole machine word was LD. So far, so good. The fly in the ointment was that I was assembling with a set of macros for MAC65, and .word generated 16-bit data while .long generated 32-bit data. I cobbled up a version of MACAS to use .hword and .word respectively, but I have never been _real_ happy with this and am getting less so. When I ran the idea of reverting to the old definitions past the two Eds, they agreed, but went on to say I should _also_ re-name the instructions. Under the proposed scheme we would have: old new means LD LDL load a 32-bit machine word ST STL store a 32-bit machine word LEA LEAL load the effective address of a 32-bit word LDH LDW load a 16-bit halfword with sign extension LDUH LDUW load a 16-bit halfword with zero-fill STH STW store a 16-bit halfword LEAH LEAW load the effective address of a 16-bit halfword LDB LDB load an 8-bit byte with sign extension LDUB LDUB load an 8-bit byte with zero-fill STB STB store an 8-bit byte This leaves open the question of just what we should call the 32-bit entity in comments, circuit diagrams, etc. It _is_ a word, but we have pre-empted that (pardon the expression) word to mean something else. "long" means something to C programmers, but not neccesarily to everyone. Also there is the not-inconsiderable problem that my daughter's initials (LEA) would no longer be a valid mnemonic :-). Other than then over-40 references to words in the spec (and who knows how many in various programs) the proposed scheme has merit, but I am still bothered. So I'd like each of you who cares (or doesn't) to reply telling me: "I prefer the proposed way as stated" "I prefer the proposed way, except forget the gratuitous 'L's" "I prefer the current way" "I prefer C (char) and S (short) and whoever disagrees can eat my..." "I don't care (and promise not to whine and snivel about final choice)" Those giving one of the first two answers should also be prepared to fill in the blanks in the following sentence: "You should call 32-bit quantities ______ in the hardware documentation" Of course none of this would be neccesary if we hadn't all stopped learning after the PDP-11 or 8086, but as it confuses me too..... Thank you for your support. Maybe next week we can get into how I could have been so brain-damaged as to make the sucker little-endian, with a latched carry, and no _____-straddling memory-references (I need that term soon :-) Mike
Jan 29, 1990