家庭作業 -- 組譯範例
位址    組合語言        機器碼(絕對)     機器碼 (相對)
0000    LD R1, b        00 1    0 0020 | 00 1 F 001C
0004    LD R2, c        00 2    0 0024 | 00 2 F 001C
0008    LD R3, d        00 3    0 0028 | 00 3 F 001C
000C    ADD R4, R1, R2    13 4 1 2 000
0010    SUB R5, R4, R3    14 5 4 3 000
0014    ST R5, a        01 5    0 001C | 00 5 F 0004
0018    RET                2C 000000
001C a:    RESW 1          00000000
0020 b:    WORD 5            00000005
0024 c:    WORD 31            0000001F
0028 d:    WORD 6            00000006
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License