[英]Assembly Motorola 68k, how to branch if a tested bit is zero?
我正在使用easy68k編寫匯編程序,我正在尋找一種方法,如果測試位等於零[SR中的Z = 0],則可以進行分支。
我搜索了很多,但沒有得到答案,
例如,我有這行:
BTST #0,D2 ;Testing the LSB bit in data register 0
現在我想要一種方法,或者如果存在的話,可以在SR中檢查Z,因此我可以知道測試的位是否為零。
在Z標志上分支:
btst #0,d2
beq bitIsCleared
; or
bne bitIsSet
Z標志注冊:
btst #0,d2
sne d0
; d0 (byte only) will now be 0xFF if bit was set, 0x00 otherwise)
; if a word is required add ext.w d0
; if a long is required add also ext.l d0
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.