0
我想創建一個程序,它使用ADD.B,ADD.W和ADD.L將兩個十六進制值相加在一起,並查看它們之間的區別。我是彙編程序設計新手,所以我似乎無法完全理解它。沒有錯誤,但是當我運行該程序時,不顯示任何結果。在寄存器D3中似乎也沒有任何值。誰能告訴我我做錯了什麼?非常感謝您的幫助。用匯編語言(EASy68K)添加兩個十六進制值
START ORG $1000 Program starts at loc $1000
MOVE $374D1FC4,D2 [D0] <- $374D1FC4
MOVE $F22C4663,D3 [D1] <- $F22C4663
ADD.B D2,D3 [D1] <- [D0] + [D1]
* ADD.W D2,D3 [D1] <- [D0] + [D1]
* ADD.L D2,D3 [D1] <- [D0] + [D1]
MOVE D3,R
* The following three instructions will display [R] to Output Window
* Task number 3 of trap #15 is to display D1.L as a signed decimal
MOVE R,D1 [D1] <- R
EXT.L D1 Extend sign bit to presreve the sign
MOVE #3,D0 Assign task number to [D0]
TRAP #15 Ask "OS" to perform the task
STOP #$2700 Stop execution
* Data section
R DS.W 1 int R;
END START
也必須將其更改爲MOVE.L,但現在可以使用。謝謝。 – Brett