Assembler






- . ,
, , ,
.
,
0 1, . ,
.
 
AND (), OR
(), XOR ( ), NOT ().
, ,
8088 .

.
 
NOT.
, (TRUE)
(FALSE) . NOT TRUE ( ) -
FALSE (), NOT FALSE ( ) - TRUE
(). NOT .
, NOT ,
. . 4.17 , NOT
.
 
NOT()
-------------------------------------
0 1
1 0
------------------------------------- . 4.17 NOT
 
.
.4.18 ,
.
 
X Y X AND Y X OR Y X XOR Y
-----------------------------------------------------
0 0 0 0 0
0 1 0 1 1
1 0 0 1 1
1 1 1 1 0
-----------------------------------------------------
 
. 4.18
 
8088 ,
. ,

0 .
.

.
 
AND 1 , 1.
, , X,
Y . OR 1,
1. , X, Y
. XOR 1,
1, 0. 0,
1, 0.
, .
 
. 4.19
8088. NOT ,
NEG.
.
 
8088 ,
.
,
0.
,
(, ) .
NOT,
.
Microsoft (R) Macro Assembler Version 5.00 1/1/80 04:01:15
. 4.19 Page 1-1
 
PAGE ,132
TITLE . 4.19
0000 CODE SEGMENT
ASSUME CS:CODE,DS:CODE
0000 EXBYTE LABEL BYTE
0000 EXWORD LABEL WORD
 
0000 22 06 0000 R AND AL, EXBYTE ; AL <- AL and [EXBYTE]
0004 81 E3 9FEF AND BX, 1001111111101111B ; BX <- BX and 9FEFH
0008 80 26 0000 R 03 AND EXBYTE, 00000011B ; [EXBYTE] <- [EXBYTE] and 3
 
000D 08 2E 0000 R OR EXBYTE, CH ; [EXBYTE] <- [EXBYTE] or CH
0011 0B 16 0000 R OR DX, EXWORD ; DX <- DX or [EXWORD]
0015 0D FFF9 OR AX, 0FFF9H ; AX <- AX or 0FFF9H
 
0018 33 1E 0000 R XOR BX, EXWORD ; BX <- BX xor [EXWORD]
001C 30 1E 0000 R XOR EXBYTE, BL ; [EXBYTE] <- [EXBYTE] xor BL
0020 34 EF XOR AL, 0EFH ; AL <- AL xor 0EFH
 
0022 F7 D1 NOT CX ; CX <- not CX
0024 F6 16 0000 R NOT EXBYTE ; [EXBYTE] <- not [EXBYTE]
 
0028 F7 06 0000 R 0003 TEST EXWORD, 0003H ; [EXWORD] and 3
002E 84 E0 TEST AH, AL ; (AH and AL)
0030 A9 0002 TEST AX, 02H ; (AX and 2)
 
0033 D1 C1 ROL CX, 1 ; 1
0035 D3 0E 0000 R ROR EXWORD, CL ; CL
 
0039 D0 16 0000 R RCL EXBYTE, 1 ;
; 1
003D D3 DB RCR BX, CL ;
; CL
003F D1 E0 SHL AX, 1 ; 1
0041 D1 E0 SAL AX, 1 ; 1
 
0043 D3 EB SHR BX, CL ; CL
0045 D0 3E 0000 R SAR EXBYTE, 1 ; 1
 
0049 CODE ENDS
END
 
. 4.19
 

8088 - . ,
, .

,
.
 
?
- - .
, ,
, .

.
,
.

=, .
=
, .
 

, , , .
.
. =
, OR.
- , .
OR 1 ,
. ,
AND .
, . 0,
.
 

, AND OR, .
.
XOR ,
1, 0. XOR , ,
, , ,
, .
0, 1 XOR 0 1, 0,
1, 1 XOR 1 0, 1.
 
- TEST ().
AND, ,
, , ..
TEST AND, CMP
SUB. ,
.
 
? ,
, 0.
01H , .
TEST ( AND)
, 0; 0
. 0,
. , ,
; 0, ,
. ,
, TEST AND ,
;
. TEST
,
.