1

2 つの特定の命令間で現在の割り込みが発生したかどうかを検出するアセンブリを作成しようとしています。

私はそれを持っていると思いますが、テストするのは簡単ではないので、誰かが検証できれば非常に感謝しています.

LDR R0, =INSTR_A ;address of first instruction
CMP LR, R0       ;are we ahead of the first?
BLO NOPE
LDR R0, =INSTR_B ;yes, address of second instr
CMP LR, R0       ;are we ahead of second?
{YEP}LO          ;no, so we're between, do {stuff}LO
{MORE STUFF}LO

それは正しく見えますか?

私の懸念は、LS代わりにLO?を使用する必要があることです。

4

2 に答える 2

-1
LDR R0, =INSTR_A ;address of first instruction
CMP LR, R0       ;If LR < R0 (or LR - R0 underflows), set carry
BLO NOPE         ; Branch if carry set (LO = CC)
LDR R0, =INSTR_B ;yes, address of second instr
CMP LR, R0       ;are we ahead of second?
BLO YEP          ;This is what you meant?
于 2013-12-24T10:54:03.910 に答える