Logic directives:
Logical operation instruction and, or, not, XOR, TEST
Shift Commands SHL, SHR, SAL, SAR, ROL, ROR, RCL, RCR
Logical non-directive: not OPR; OPR cannot affect flag bit for immediate number
Logic and directives: and DST, SRC
Logic or directives: or DST, SRC
XOR /Directive : + DST, SRC
test Instruction : OPR1, OPR2
SF ZF PF is set according to the result of operation
(1) Shift instruction format: SHL opr,cnt
(1) Shift data from one register or memory unit to the left
(2) One of the last moved out is written to CF
(3) Minimum position with 0 supplement
If the number of moved bits is greater than 1 o'clock,must beWillnumber of moving bitsPut it in CL. 1) SHL logical left SHIFT instruction 2) SAL arithmetic left shift instruction
3) SHR Logical Right SHIFT command
4) SAR arithmetic right Shift commandlogical shift, moved out into the cf. The arithmetic left shift and the logical left shift are the same.
(2) cyclic shift instruction 1) ROL cyclic left shift instruction
2) ROR Loop right Shift command
3) RCL with carry Loop left Shift command
4) RCR with carry loop right-shift instruction 1) SHLD double-precision left-shift instruction SHLD Dst,reg,cnt2) SHRD double-precision right-shift instructionwith carry-on is the CF is also linked up. Each time the highest displacement into carry flag bit CFCF is set according to the instructions, the of bit is only valid when cnf=1, otherwise the bit is undefined. When Cnt=1, the highest bit changes in the shift, of=1, otherwise 0. The arithmetic shift instruction applies to the operation with the signed number, SAL Times 2, and the SAR divided by 2. The logical shift directive applies to operations with unsigned numbers.
Assembly--Instruction system Logic instructions