flat assembler
Message board for the users of flat assembler.
Index
> Main > What's the order of 8 bits of a single byte in memory? |
Author |
|
LiuJunfeng 02 Apr 2004, 08:30
I think this is not cared for programming, but do we know it?
|
|||
02 Apr 2004, 08:30 |
|
S.T.A.S. 02 Apr 2004, 11:38
There is no "left" or "right" when we speak about bits.
There are (D0..D7 for byte) D0..D31 for DWORD pins on CPU |
|||
02 Apr 2004, 11:38 |
|
Intrinsic 02 Apr 2004, 13:24
7...0 for intel
|
|||
02 Apr 2004, 13:24 |
|
JohnFound 02 Apr 2004, 13:52
It is simply human way of thinking that most significant digits (in every radix) are most "left" and less significant are most "right". (Hm, interesting how the people from arabian countries think? ) As a result we have mnemonics for shift operation: shl,rol - from less to most significant bits, shr,ror - from most to less significant bits.
Though these directions have phisical meaning only on the sceen and on piece of paper. Regards. |
|||
02 Apr 2004, 13:52 |
|
S.T.A.S. 02 Apr 2004, 16:09
gorshing wrote: multiple bytes the order would be different. Yes, x86 (Intel and AMD) are Little Endian CPUs, they place first the least significant byte in memory: 00h,FFh Other CPUs (like Motorola 68XX0) are Big Endian, so they use another order: FFh,00h Also there are CPUs which can use both modes, but they are not so cool, because of incompatibility with FASM |
|||
02 Apr 2004, 16:09 |
|
pelaillo 02 Apr 2004, 18:22
JohnFound wrote: (Hm, interesting how the people from arabian countries think? ) Just the same as we do, because numerical system we use was developed by them. They write right to left but they do arithmetic in the same way we do (only the characters are different) |
|||
02 Apr 2004, 18:22 |
|
Tomasz Grysztar 02 Apr 2004, 19:13
And that's why we write numbers from right to left...
|
|||
02 Apr 2004, 19:13 |
|
Madis731 03 Apr 2004, 10:04
Very interesting thoughts I admit, on the writing side, shouldt my age be written 9 and 1, so the least significant numbers go first. Hmm, 0000001 one million:D
It seems confusing, but got used to *-hand traffic and reading/writing L2R or R2L so why wouldn't we start getting used to left 2 right writing of numbers |
|||
03 Apr 2004, 10:04 |
|
Cas 05 Apr 2004, 05:11
Intel microps do not handle numbers directly in bigendian, but you have these instructions:
xchg ah,al ; invert 16bit number bswap eax ; invert 32bit number which can be very useful. |
|||
05 Apr 2004, 05:11 |
|
vid 05 Apr 2004, 18:38
liu: i think you really could use my tutorial
http://board.flatassembler.net/topic.php?t=1178 this is one of things answered there |
|||
05 Apr 2004, 18:38 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.