日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) >

汇编 and or xor not test cmp 条件跳转指令 jcc

發(fā)布時(shí)間:2025/6/17 63 豆豆
生活随笔 收集整理的這篇文章主要介紹了 汇编 and or xor not test cmp 条件跳转指令 jcc 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

布爾和比較指令

  • and

and destination, source

and reg, reg/mem/imm

and mem, reg/imm

mov al, 10101110b and al, 11110110b.data array byte 50 dup(?) .code mov ecx, lengthof array mov esi, offset array L1:and byte ptr [esi], 11011111binc esi loop L1

and 總是清除溢出標(biāo)志和進(jìn)位標(biāo)志,并根據(jù)目標(biāo)操作數(shù)的值來(lái)修改符號(hào)標(biāo)志,零標(biāo)志,奇偶標(biāo)志。

  • or

or destination, source

or reg, reg/mem/imm

or mem, reg/imm

or 總是清除溢出標(biāo)志和進(jìn)位標(biāo)志,并根據(jù)目標(biāo)操作數(shù)的值來(lái)修改符號(hào)標(biāo)志,零標(biāo)志,奇偶標(biāo)志。

mov al, 11100011b or al, 00000100b
  • xor

xor destination, source

xor 總是清除溢出標(biāo)志和進(jìn)位標(biāo)志,并根據(jù)目標(biāo)操作數(shù)的值來(lái)修改符號(hào)標(biāo)志,零標(biāo)志,奇偶標(biāo)志。

mov al, 10110101b xor al, 0 mov al, 11001100b xor al, 0mov ax, 64c1h xor ah, al

xor指令把兩個(gè)集合交集中的成員清0,并形成了其余位的并集

B0xorB1xorB2xorB3

  • not

not reg/mem

mov al, 11110000b not al
  • test 進(jìn)行邏輯與操作

xor 總是清除溢出標(biāo)志和進(jìn)位標(biāo)志,并修改符號(hào)標(biāo)志,零標(biāo)志,奇偶標(biāo)志。

test al, 00001001b

影響零標(biāo)志,進(jìn)位標(biāo)志,符號(hào)標(biāo)志,溢出標(biāo)志,奇偶標(biāo)志

位映射集

SetX = 10000000 00000000 00000000 00000111

mov eax, SetX

and eax, 10000b

  • 補(bǔ)集

    mov eax, SetX

    not eax

  • 交集

    mov eax, SetX

    and ea, SetY

  • 并集

mov eax, SetX

or eax, SetY

cmp

cmp destination, source(有無(wú)符號(hào)數(shù))

溢出,符號(hào),零,進(jìn)位,輔助進(jìn)位,奇偶標(biāo)志

mov ax, 5 cmp ax, 10mov ax, 1000 mov cx, 1000 cmp cx, axmov si, 105 cmp si, 0

清除和設(shè)置標(biāo)志位

test al, 0 and al, 0 or al, 0or al, 80h and al, 7fhstc clcmov al, 7fh inc al or eax, 0

64位模式下的布爾指令

.data allones qword 0ffffffffffffffffh .code mov rax, allones and rax, 80h mov rax, allones and rax, 8080h mov rax, allones and rax, 808080hmov rax, allones adn rax, 80808080h ; rax = ffffffff80808080

Jcond指令

Jcond destination

jc, jnc, jz, jnz,jc, jnc, jo,jno,js,jns,jp,jnp

相等性的比較

je,jne,jcxz,jecxz,jrcxz

cmp eax, 5 je L1mov ax, 5 cmp ax, 6 jl L1mov ax, 5 jg L1 mov edx, 0a523h cmp edx, 0a523h jne L5 je L1mov bx, 1234h sub bx, 1234h jne L5 je L1mov cx, 0ffffh inc cx jcxz L2xor ecx, ecx jecxz L2

無(wú)符號(hào)數(shù)比較

ja, jnbe, jae, jne, jb, jnae, jbe, ja

mov al, +127 cmp al, -128 ja IsAbove jg IsGreater

有符號(hào)數(shù)比較

jg, jnle, jge, jnl, jl, jnge, jle, jng

mov edx, -1 cmp edx, 0 jnl L5 jnle L5 jl L1mov bx,+32 cmp bx, -35 jng L5 jnge L5 jge L1mov ecx, 0 cmp ecx, 0 jg L5 jnl L1mov ecx, 0 cmp ecx, 0 jl L5 jng L1
  • 測(cè)試狀態(tài)位

    mov al, status test al, 00100000b jnz DeviceOfflinemov al, status test al, 00010011b jnz DeviceOfflinemov al, status and al, 10001100b cmp al, 10001100b je ResetMachine
  • 兩個(gè)數(shù)中的較大數(shù)

mov edx, eax cmp eax, ebx jae L1 mov edx, ebx L1:
  • 三個(gè)數(shù)中的最小數(shù)
.data V1 word ? V2 word ? V3 word ? .code mov ax, V1 cmp ax, V2 jbe L1 mov ax, V2 L1:cmp ax, V3jbe L2 L2:
  • 循環(huán)直到按鍵
.data char byte ? .code L1:mov eax, 10call Delaycall ReadKeyjz L1mov char, al

條件循環(huán)指令

LOOPZ和LOOPE指令

loopz(loope) destination

loopnz和loopne指令

loopnz(loopne) destination

.data array sword -3, -6, -1, -10, 10, 30, 40, 4 sentinel sword 0 .code mov esi, offset array mov ecx, lengthof array L1:test word ptr[esi], 8000hpushfdadd esi, type arraypopfdloopnz L1jnz quitsub esi, type array quit:

總結(jié)

以上是生活随笔為你收集整理的汇编 and or xor not test cmp 条件跳转指令 jcc的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。