Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.apple2.programmer > #2014
| Newsgroups | comp.sys.apple2.programmer |
|---|---|
| Subject | Re: Secret Shame? Reading Source Code |
| From | Michael J. Mahon <mjmahon@aol.com> |
| References | (2 earlier) <n4hbcc$1m8$1@dont-email.me> <WYCdnbTAV8FBBPHLnZ2dnUVZ5hQAAAAA@giganews.com> <n4k5pi$gk7$1@dont-email.me> <1mfeukw.35vmv21i2281kN%dempson@actrix.gen.nz> <n4ku5c$mge$1@dont-email.me> |
| Message-ID | <h9WdnUrkSLQ3nPPLnZ2dnUVZ5rOdnZ2d@giganews.com> (permalink) |
| Date | 2015-12-13 17:39 -0600 |
Jeff Blakeney <CUTjeffrey_blakeney@yahoo.ca> wrote: > On 13/12/2015 2:15 PM, David Empson wrote: >> ultramagnus_tcv <mikew@thecomputervalet.com> wrote: >> >>> On 2015-12-12 22:04:12 +0000, Michael J. Mahon said: >>> >>>> In the example you give, the pseudo-op is "dw", which stands, as you >>>> guessed, for "double word"--in this case, a two-byte data item. Its > operand >>>> is an expression which is evaluated as a 16-bit quantity by the > assembler, >>>> then used as the (initial) value of the two-byte field. >>> >>> Roger. >> >> I'd suggest that "dw" is more likely "define word" rather than "double >> word", because that matches "dfb" or "db" as "define byte". It is still >> a two byte data item. > > I'm with you on that. DW is define word (two bytes), DB is define byte > (one byte), DS is define storage (arbitrary number of bytes). At least > in the Orca languages. > >> The use of the term "word" is rather arbitrary. It should refer to the >> native word size of the processor (which would be 8 bits for a 6502 or >> 65C02) but it is quite common to refer to a "word" as 16 bits on an 8 >> bit processor. > > I'm not sure why anyone ever thought that making the definition of a > term be dependent on the architecture of the processor was a good idea. > I've run into it with PCs where the default size of integer variable > types were 16 bit for one language and and 32 bit for another. To me it > has always been a that a byte is 8 bits, a word is 16 bits and a double > word is 32 bits. Well, an assembler *is* about the most architecture-dependent language imaginable. ;-) Back when assemblers were invented, "word" quite naturally meant whatever "word" meant for the target machine, whether it was 40 bits, 36 bits, or whatever. The smallest addressable unit was the "word", and that was the default size for integers, and often for single-precision floating-point. When almost all machines became byte-addressed (with the IBM 360), the situation became more ambiguous, though "word" on large machines continued to be 32 bits, with 16 bits being a "halfword". As micro architectures continued to grow, first to 16-bit registers and then 32-bit registers and beyond, the "word" nomenclature became hopelessly confused, and is now deprecated in favor of an explicit designation of bit length. Fortunately (?), the 6502 architecture has only been expanded once, and a desire for assembler compatibility has kept a 65x02 "word" as 16 bits. -- -michael - NadaNet 3.1 and AppleCrate II: http://michaeljmahon.com
Back to comp.sys.apple2.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
Secret Shame? Reading Source Code ultramagnus_tcv <mikew@thecomputervalet.com> - 2015-12-11 10:06 -0600
Re: Secret Shame? Reading Source Code Chris Torrence <gorthmog@gmail.com> - 2015-12-11 08:50 -0800
Re: Secret Shame? Reading Source Code ultramagnus_tcv <mikew@thecomputervalet.com> - 2015-12-12 08:38 -0600
Re: Secret Shame? Reading Source Code Michael J. Mahon <mjmahon@aol.com> - 2015-12-12 16:04 -0600
Re: Secret Shame? Reading Source Code Michael J. Mahon <mjmahon@aol.com> - 2015-12-12 16:10 -0600
Re: Secret Shame? Reading Source Code ultramagnus_tcv <mikew@thecomputervalet.com> - 2015-12-13 10:21 -0600
Re: Secret Shame? Reading Source Code Michael J. Mahon <mjmahon@aol.com> - 2015-12-13 11:23 -0600
Re: Secret Shame? Reading Source Code ultramagnus_tcv <mikew@thecomputervalet.com> - 2015-12-13 11:41 -0600
Re: Secret Shame? Reading Source Code dempson@actrix.gen.nz (David Empson) - 2015-12-14 08:15 +1300
Re: Secret Shame? Reading Source Code Michael J. Mahon <mjmahon@aol.com> - 2015-12-13 17:16 -0600
Re: Secret Shame? Reading Source Code Jeff Blakeney <CUTjeffrey_blakeney@yahoo.ca> - 2015-12-13 18:17 -0500
Re: Secret Shame? Reading Source Code Michael J. Mahon <mjmahon@aol.com> - 2015-12-13 17:39 -0600
Re: Secret Shame? Reading Source Code m.omalley.au@gmail.com - 2016-01-24 02:26 -0800
Re: Secret Shame? Reading Source Code Michael J. Mahon <mjmahon@aol.com> - 2016-01-24 10:45 -0600
Re: Secret Shame? Reading Source Code wssimms@gmail.com - 2016-01-24 15:20 -0800
Re: Secret Shame? Reading Source Code Michael J. Mahon <mjmahon@aol.com> - 2016-01-24 23:33 -0600
Re: Secret Shame? Reading Source Code wssimms@gmail.com - 2016-01-25 05:01 -0800
Re: Secret Shame? Reading Source Code Michael J. Mahon <mjmahon@aol.com> - 2016-01-25 16:29 -0600
Re: Secret Shame? Reading Source Code michael.pohoreski@gmail.com - 2016-01-27 07:09 -0800
Re: Secret Shame? Reading Source Code wssimms@gmail.com - 2015-12-11 18:02 -0800
Re: Secret Shame? Reading Source Code awanderin <awanderin@gmail.com> - 2015-12-11 23:01 -0700
Re: Secret Shame? Reading Source Code Michael Pohoreski <michael.pohoreski@gmail.com> - 2016-01-28 12:33 -0800
Re: Secret Shame? Reading Source Code Michael Barry <barrym95838@yahoo.com> - 2016-01-28 22:50 -0800
Re: Secret Shame? Reading Source Code wssimms@gmail.com - 2016-01-29 02:04 -0800
Re: Secret Shame? Reading Source Code Michael J. Mahon <mjmahon@aol.com> - 2016-01-29 13:58 -0600
Re: Secret Shame? Reading Source Code Michael Pohoreski <michael.pohoreski@gmail.com> - 2016-01-29 16:10 -0800
Re: Secret Shame? Reading Source Code Michael Pohoreski <michael.pohoreski@gmail.com> - 2016-01-29 16:15 -0800
Re: Secret Shame? Reading Source Code Brian Patrie <bpatrie@bellsouth.spamisicky.net> - 2016-01-31 03:50 -0600
Re: Secret Shame? Reading Source Code michael.pohoreski@gmail.com - 2016-01-25 11:03 -0800
Re: Secret Shame? Reading Source Code michael.pohoreski@gmail.com - 2016-01-25 11:04 -0800
Re: Secret Shame? Reading Source Code michael.pohoreski@gmail.com - 2016-01-27 07:14 -0800
csiph-web