TIP: Click on subject to list as thread! ANSI
echo: 80xxx
to: CAMERON CLARK
from: BRIAN MCCLOUD
date: 1997-06-23 06:51:00
subject: encoding instuction [q]

CC>    I've not found anything examples for the SIB byte.
CC>    Any examples showing each of the different addressing type
CC>    would be helpful.
SIB byte format is:
ss iii bbb
        ss is the two-bit scaling field: 00 = 1, 01 = 2, 10 = 4, 11 = 8
        iii is the index register, and 100 means there is no index
        bbb is the base register, 101 means disp32 if mod is 00, otherwise
          it's [EBP+disp]
The address is calculated as [base + (scale * index) {+ disp}]
The mod bits determine the size of the displacement.
CC>    also,
CC>    using prefix's
CC>    using 32bit instructions (pentium and below)  mov eax,ebx  mov 
eax,[ebx]
The operand-size override prefix is 66h, and the address-size override prefix
is 67h.  These reverse 16/32 bit operands and addresses, respectively.  In a
Use16 segment, the default is 16 for both, and in a Use32 segment the default
is 32 bit operands/addresses.
For 32-bit indirect memory operands, the r/m bits in most cases mean [reg {+
disp}], except for 100 which means a SIB is needed, and mod=00, r/m=101 means
DS:disp32.  For the reg bits, the extended registers use the same codes as
their subregisters would.
((Cloud))
MauveCloud@juno.com
 * OLX 2.2 * My Karma has just run over your Dogma.
--- PCBoard (R) v15.3/M 10
---------------
* Origin: Next time, Dial The Wrong Number! (209) 943-1880 (1:208/205)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.