.


:




:

































 

 

 

 





: , /, . 3.1.

3.1.

.

/  
:  
MOV , ()  
XCHG ,  
POP  
PUSH  
XLAT/XLATB  
/:  
IN ,
OUT ,
:  
LDS ,  
LEA ,  
LES ,  
:  
LAHF AH  
SAHF AH  
POPF  
PUSHF  

.

MOV (move data) , :

MOV dst, src

dst , src .

:

dst src
r8 i8, r8, m8
m8 i8, r8
r16 i16, r16, sr, m16
sr ( CS) i16, m16
m16 i16, r16, sr

XCHG (exchange) ( , ), :

XCHG dst, src

XCHG:

dst src
r8 r8, m8
m8 r8
r16 r16, m16
m16 r16

Examle 3.4. XCHG.

;

count db 10h, 20h

total dw 1234h

var16 dw?

;

XCHG AX, total;

XCHG AX, BX;

XCHG DL, AL;

XCHG count, AL;

XCHG var16, AX;

PUSH (PUSHed) - , a POP (POPed) - .

PUSH src.

POP dst

PUSH POP :

dst - r16, m16, sr ( CS) src - r16, m16, sr

Examle 3.5. PUSH POP.

;

var16 dw 1234h

;

PUSH BX;

PUSH var16;

POP BX;

POP var16;

;

MOV BP, SP;

MOV AX, [BP];

XLAT . AL 256- , BX, - AL. DS. XLATB, , .

XLAT [table]

XLATB [table]

[table] , .

3.1. XLAT.

Examle 3.6. XLAT.

; 0 15 16-

;

tablehex db 0123456789ABCDEF;

;

MOV BX, OFFSET tablehex; BX tablehex

MOV AL, 10; AL

XLAT; 16-

LEA 16- . MOV, .

LDS 32- , - DS.

LES 32- , - ES.

LEA reg, mem

LDS reg, mem

LES reg, mem

Examle 3.7. LES, LDS LEA.

;

str_1 DB Hello; str_1 Hello

str_2 DB 50 DUP ( );

str_pnt DD str_1; str_pnt str_1

;

LEA SI, str_1;

LEA DI, str_2;

MOV AL, [SI];

MOV [DI], AL;

LES BX, str_pnt;

LDS BX, str_pnt;





:


: 2015-10-01; !; : 767 |


:

:

, .
==> ...

1866 - | 1679 -


© 2015-2024 lektsii.org - -

: 0.013 .