字串操作彙編指令

來源:互聯網
上載者:User

 

1、操作指令功能

  移動 movsb,movsw,movsd   從 ESI 指向的記憶體位置向 EDI 指向的記憶體位置拷貝資料
  
  比較 cmpsb,cmpsw,cmpsd   把 ESI 指向記憶體位置的資料和 EDI 指向記憶體位置拷的資料比較
  
  搜尋 scasb,scasw,scasd   把 al/ax/eax 中的資料與 EDI 定址的記憶體資料比較
  
  儲存 stosb,stosw,stosd   把 al/ax/eax 中的資料儲存在 EDI 定址的記憶體單元
  
  載入 lodsb,lodsw,lodsd   把 ESI 定址的記憶體資料載入到 al/ax/eax 中

2、重複執行首碼

  rep      當 ecx>0 時重複
  
  repe,repz   當 ecx>0 ,且 ZF==1 時重複(只用在比較和搜尋中)
  
  repne,repnz  當 ecx>0 ,且 ZF==0 時重複(只用在比較和搜尋中)
  
3、重複執行方向

  cld   清除 DF 標誌,ESI 和 EDI 遞增
  
  std   設定 DF 標誌,ESI 和 EDI 遞減
  
4、字元操作指令格式

  方向              cld,std
  
  資料來源            esi,al/ax/eax
  
  資料目的            edi,al/ax/eax
  
  迴圈次數            ecx
  
  重複首碼  操作指令       rep,repe,repne    movsb,cmpsb,scasb,stosb,lodsb 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.