LEA < l>, < 2>; , .
:
) lea bx, exword - bx exword;
) lea bx, [di+10] - bx l0- , di.
.
LDS < >,< 2>
LS < >,< 2>
LDS DS:<> (< >: < >), , .
LS , , S:<>.
:
lds si, exword;.e. (2 ) exword si, exword + 2 - ds.
SP. , , BP, MOV. , :
mov ax,[bp+4]; AX BP+4.
PUSH POP.
PUSH <>; , .
:
push x - x .
POP <>; , .
:
pop x - x .
, :
mov ax,1
push ax
pop bx
( 1) AX , 1 BX.
XCHG. , .
, :
xchg ax,dx; AX DX, :
push ax
mov ax,dx
pop dx
/
ADD < 1>, < 2>
ADC < 1>, < 2>; , , , .
o ADD . . DC , , , .
32- :
Mov ax,value1
Add value2,ax
mov ax,value1+2
adc value2+2,ax
value1 value2, value1.
SUB <->, <>;
|
|
SBB <->,<>; , , , .
SUB , SBB - . , .
, :
.DATA
BaseVal DW 99
Adjust DW 10
.CODE
mov dx,[BaseVal]
add dx,11
sub dx,[Adjust]
, BaseVal, DX, 11 ( DX 110) , , DX 10, Adjust. 100 DX.
NEG <>; .
NEG, () .
, :
mov ax,1; AX 1
neg ax; AX, -1
mov bx,ax; AX BX
neg bx; BX, 1
AX -1, BX - 1.
/
INC () DEC (). INC DEC - , .
INC <>; .
DEC <>; .
P < 1>, < 2>; .
/
i86 . , , [38].
MUL 8- 16- , 16- 32- . 8- .
8- (8-) AL, 8- . MUL 16- AX.
, :
mov al,25
mov dh,40
mul dh
AL DH, (1000) AX. , MUL , AL ( AX 16- ).
16- . AX, 16- . 32- MUL DX:AX, ( ) 16 AX, ( ) 16 - DX.
|
|
, :
mov ax,1000
mul ax
AX 1000, , ( 1000000) DX:AX.
, , , IMUL 8- 16- . , , IMUL MUL.
, :
mov al,-2
mov ah,10
imul ah
AX -20.
i86 32- 16-, 16- 8-. 16- 8-.
16- 8- AX. 8- 8- . DIV 8- AL, 8- - AH.
, :
mov ax,51
mov dl,10
div dl
5 (51/10) AL, 1 ( 51/10) - AH.
, 8- . , 16- 8- 255. , 0 ( 0).
:
mov ax,0fffh
mov bl,1
div bl
0 ( , 0 , 0 ).
32- 16- DX:AX. 16- 16- .
, :
mov ax,2
mov dx,1; DX:AX 10002h
mov bx,10h
div bx
1000h ( 10002h 10h) AX, 2 ( ) - DX.
. 3.5 ( - - , - - ) ( - [35].
. 3.5.
:
Imul word ptr c
ax. a, - dx (. 3.5).
DIV <->
IDIV <->; DIV , IDIV - ( ).
. 3.6 , ( - - , - - ).
. 3.6. ,