Actions

SCHG

68000 ASM-to-Hex Code Reference

From Sonic Retro

Segaretro-round.svg It has been suggested that this page be moved over to Sega Retro as to be in accordance with both sites' policies.
Please see the talk page for relevant discussion and export procedure.

(Document originally by Ambil)

Welcome to my Motorola 68000 programming reference. It consists of a table containing useful examples of the 68k instructions, and it can be a very nice tool for everyone who is hacking MegaDrive / Genesis games in a hex editor. For your help and confort, the parameters in the ASM commands have been coloured along with their respective places in the 16-bit instruction codes.

ASM Binary instruction Hex code
adda.w #$20, a0 1101 0000 1111 1100 D0FC 0020
adda.w ($FFFFF100).w, a2 1101 0100 1111 1000 D4F8 F100
adda.l ($FFFFF100).l, a3 1101 0111 1111 1001 D7F9 FFFF F100
adda.w d0, a2 1101 0100 1100 0000 D4C0
adda.w (a0), a1 1101 0010 1101 0000 D2D0
adda.w $10(a0), a1 1101 0010 1110 1000 D2E8 0010
adda.w (a0)+, a1 1101 0010 1101 1000 D2D8
adda.w -(a0), a1 1101 0010 1110 0000 D2E0
adda.w #$1337, a4 1101 1000 1111 1100 D8FC 1337
adda.w (a3,d1.w), a3 1101 0110 1111 0011 D6F3 1000
adda.w $24(a3,d4.w), a3 1101 0110 1111 0011 D6F3 4024
addi.b #$20, d1 0000 0110 0000 0001 0601 0020
addi.l #$FFFFE6AC, d0 0000 0110 1000 0000 0680 FFFF E6AC
addi.w #$1337, ($FFFFF100).w 0000 0110 0111 1000 0678 1337 F100
addi.w #$1337, ($FFFFF100).l 0000 0110 0111 1001 0679 1337 FFFF F100
addi.l #$19650917, ($FFFFF100).w 0000 0110 1011 1000 06B8 1965 0917 F100
addi.b #$40, (a1) 0000 0110 0001 0001 0611 0040
addi.w #$40, $1C(a1) 0000 0110 0110 1001 0669 0040 001C
addi.l #$500, $64(a1) 0000 0110 1010 1001 06A9 0000 0500 0064
addi.b #$40, (a1)+ 0000 0110 0001 1001 0619 0040
addi.b #$40, -(a1) 0000 0110 0010 0001 0621 0040
addq.b #1, ($FFFFF100).w 0101 0010 0011 1000 5238 F100
addq.b #2, ($FFFFF100).w 0101 0100 0011 1000 5438 F100
addq.b #8, ($FFFFF100).w 0101 0000 0011 1000 5038 F100
addq.b #1, d6 0101 0010 0000 0110 5206
addq.w #3, d2 0101 0110 0100 0010 5642
addq.w #8, (a1) 0101 0000 0101 0001 5051
addq.b #1, $25(a0) 0101 0010 0010 1000 5228 0025
addq.w #1, $14(a0) 0101 0010 0110 1000 5268 0014
addq.w #8, (a1)+ 0101 0000 0101 1001 5059
addq.w #8, -(a1) 0101 0000 0110 0001 5061
addq.w #1, a0 0101 0010 0100 1000 5248
addq.l #1, a0 0101 0010 1000 1000 5288
addq.l #4, sp 0101 1000 1000 1111 588F
add.w d2, d0 1101 0000 0100 0010 D042
add.w d6, d2 1101 0100 0100 0110 D446
add.w ($FFFFEE8C).w, d0 1101 0000 0111 1000 D078 EE8C
add.w (a1), d0 1101 0000 0101 0001 D051
add.b 1(a3), d1 1101 0010 0010 1011 D22B 0001
add.w $46(a0), d2 1101 0100 0110 1000 D468 0046
add.w (a1)+, d0 1101 0000 0101 1001 D059
add.w -(a1), d0 1101 0000 0110 0001 D061
add.l a0, d1 1101 0010 1000 1000 D288
add.w d1, ($FFFFFFAC).w 1101 0011 0111 1000 D378 FFAC
add.w d0, (a1) 1101 0001 0101 0001 D151
add.w d1, $1A(a0) 1101 0011 0110 1000 D368 001A
add.l d0, $14(a0) 1101 0001 1010 1000 D1A8 0014
add.l d3, (a5)+ 1101 0111 1001 1101 D79D
add.w d3, -(a1) 1101 0111 0110 0001 D761
andi.b #$36, d1 0000 0010 0000 0001 0201 0036
andi.w #$100, d2 0000 0010 0100 0010 0242 0100
andi.l #$FFFFFF, d0 0000 0010 1000 0000 0280 00FF FFFF
andi.b #$70, ($FFFFF100).w 0000 0010 0011 1000 0238 0070 F100
andi.w #$2005, ($FFFFF100).w 0000 0010 0111 1000 0278 2005 F100
andi.b #$80, (a1) 0000 0010 0001 0001 0211 0080
andi.b #$80, $2B(a1) 0000 0010 0010 1001 0229 0080 002B
andi.b #$80, (a1)+ 0000 0010 0001 1001 0219 0080
andi.b #$80, -(a1) 0000 0010 0010 0001 0221 0080
andi.w #$777, 4(a4) 0000 0010 0110 1100 026C 0777 0004
andi.b #$7F, (a2,d0.w) 0000 0010 0011 0010 0232 007F 0000
andi.w #$7FF, $10(a2,d4.w) 0000 0010 0111 0010 0272 07FF 4010
andi #$FFFE,sr 0000 0010 0111 1100 027C FFFE
and.b d0, d1 1100 0010 0000 0000 C200
and.b ($FFFFF607).w, d0 1100 0000 0011 1000 C038 F607
and.w ($FFFFEEAC).w, d3 1100 0110 0111 1000 C678 EEAC
and.w (a0), d0 1100 0000 0101 0000 C050
and.w 6(a5), d4 1100 1000 0110 1101 C86D 0006
and.w $A(a5), d5 1100 1010 0110 1101 CA6D 000A
and.w (a0)+, d0 1100 0000 0101 1000 C058
and.w -(a0), d0 1100 0000 0110 0000 C060
and.w d0, ($FFFFF606).w 1100 0001 0111 1000 C178 F606
and.w d0, (a0) 1100 0001 0101 0000 C150
and.w d0, $14(a0) 1100 0001 0110 1000 C168 0014
and.w d1, $A(a0) 1100 0011 0110 1000 C368 000A
and.w d0, (a0)+ 1100 0001 0101 1000 C158
and.w d0, -(a0) 1100 0001 0110 0000 C160
bra.s #$24 0110 0000 0010 0100 6024
bra.w #$4E1A 0110 0000 0000 0000 6000 4E1A
bsr.s #$10 0110 0001 0001 0000 6110
bhi.s #$10 0110 0010 0001 0000 6210
bls.s #$10 0110 0011 0001 0000 6310
bcc.s #$10 0110 0100 0001 0000 6410
bcs.s #$10 0110 0101 0001 0000 6510
bne.s #$10 0110 0110 0001 0000 6610
beq.s #$10 0110 0111 0001 0000 6710
bvc.s #$10 0110 1000 0001 0000 6810
bvs.s #$10 0110 1001 0001 0000 6910
bpl.s #$10 0110 1010 0001 0000 6A10
bmi.s #$10 0110 1011 0001 0000 6B10
bge.s #$10 0110 1100 0001 0000 6C10
blt.s #$10 0110 1101 0001 0000 6D10
bgt.s #$10 0110 1110 0001 0000 6E10
ble.s #$10 0110 1111 0001 0000 6F10
btst #6, ($FFFFF604).w 0000 1000 0011 1000 0838 0006 F604
btst #4, d1 0000 1000 0000 0001 0801 0004
btst #6, (a0) 0000 1000 0001 0000 0810 0006
btst #6, $2A(a0) 0000 1000 0010 1000 0828 0006 002A
btst d6, ($FFFFF604).w 0000 1101 0011 1000 0D38 F604
btst d6, d1 0000 1101 0000 0001 0D01
btst d6, (a0) 0000 1101 0001 0000 0D10
btst d6, $2A(a0) 0000 1101 0010 1000 0D28 002A
bclr #7, ($FFFFE43D).w 0000 1000 1011 1000 08B8 0007 E43D
bclr #7, d2 0000 1000 1000 0010 0882 0007
bclr #3, (a1) 0000 1000 1001 0001 0891 0003
bclr #3, $2A(a1) 0000 1000 1010 1001 08A9 0003 002A
bclr d6, ($FFFFE43D).w 0000 1101 1011 1000 0DB8 E43D
bclr d6, d2 0000 1101 1000 0010 0D82
bclr d6, (a0) 0000 1101 1001 0000 0D90
bclr d6, $2A(a0) 0000 1101 1010 1000 0DA8 002A
bset #3, ($FFFFFE05).w 0000 1000 1111 1000 08F8 0003 FE05
bset #3, d2 0000 1000 1100 0010 08C2 0003
bset #2, (a0) 0000 1000 1101 0000 08D0 0002
bset #2, $2A(a0) 0000 1000 1110 1000 08E8 0002 002A
bset d0, ($FFFFFE05).w 0000 0001 1111 1000 01F8 FE05
bset d0, d2 0000 0001 1100 0010 01C2
bset d0, (a2) 0000 0001 1101 0010 01D2
bset d0, $2A(a2) 0000 0001 1110 1010 01EA 002A
bchg #4, ($FFFFFFB2).w 0000 1000 0111 1000 0878 0004 FFB2
bchg #4, d2 0000 1000 0100 0010 0842 0004
bchg #4, (a3) 0000 1000 0101 0011 0853 0004
bchg #4, $2A(a3) 0000 1000 0110 1011 086B 0004 002A
bchg d3, ($FFFFFFB2).w 0000 0111 0111 1000 0778 FFB2
bchg d3, d2 0000 0111 0100 0010 0742
bchg d3, (a3) 0000 0111 0101 0011 0753
bchg d3, $2A(a3) 0000 0111 0110 1011 076B 002A
clr.w d2 0100 0010 0100 0010 4242
clr.l d0 0100 0010 1000 0000 4280
clr.w ($FFFF8500).w 0100 0010 0111 1000 4278 8500
clr.b $3C(a0) 0100 0010 0010 1000 4228 003C
clr.w $1A(a0) 0100 0010 0110 1000 4268 001A
clr.l (a1) 0100 0010 1001 0001 4291
clr.l 4(a1) 0100 0010 1010 1001 42A9 0004
clr.l (a1)+ 0100 0010 1001 1001 4299
clr.l -(a1) 0100 0010 1010 0001 42A1
cmpa.w #$B000, a1 1011 0010 1111 1100 B2FC B000
cmpa.l #$FFFFB000, a5 1011 1011 1111 1100 BBFC FFFF B000
cmpa.l ($FFFFE660).w, a2 1011 0101 1111 1000 B5F8 E660
cmpa.w d0, a2 1011 0100 1100 0000 B4C0
cmpa.l (a1), a2 1011 0101 1101 0001 B5D1
cmpa.l 8(a1), a2 1011 0101 1110 1001 B5E9 0008
cmpa.l a1, a2 1011 0101 1100 1001 B5C9
cmpi.b #$26, ($FFFFFFE4).w 0000 1100 0011 1000 0C38 0026 FFE4
cmpi.w #$4170, ($FFFFFFB0).w 0000 1100 0111 1000 0C78 4170 FFB0
cmpi.l #$FFFE8000, ($FFFFEE9C).w 0000 1100 1011 1000 0CB8 FFFE 8000 EE9C
cmpi.w #3, ($FFFFFF08).l 0000 1100 0111 1001 0C79 0003 FFFF FF08
cmpi.b #$2, d0 0000 1100 0000 0000 0C00 0002
cmpi.w #$2E0, d3 0000 1100 0100 0011 0C43 02E0
cmpi.l #$0, d2 0000 1100 1000 0010 0C82 0000 0000
cmpi.b #$2, (a0) 0000 1100 0001 0000 0C10 0002
cmpi.b #$2, $20(a1) 0000 1100 0010 1001 0C29 0002 0020
cmpi.w #$1044, $10(a0) 0000 1100 0110 1000 0C68 1044 0010
cmpi.b #$2, (a0)+ 0000 1100 0001 1000 0C18 0002
cmpi.b #$2, -(a0) 0000 1100 0010 0000 0C20 0002
cmp.b d0, d1 1011 0010 0000 0000 B200
cmp.l d0, d7 1011 1110 1000 0000 BE80
cmp.w ($FFFFEE78).w, d0 1011 0000 0111 1000 B078 EE78
cmp.l ($FFFFEE98).w, d6 1011 1100 1011 1000 BCB8 EE98
cmp.w (a0), d0 1011 0000 0101 0000 B050
cmp.b 1(a3), d0 1011 0000 0010 1011 B02B 0001
cmp.w $14(a0), d0 1011 0000 0110 1000 B068 0014
cmp.w (a6)+, d0 1011 0000 0101 1110 B05E
cmp.b -(a2), d0 1011 0000 0010 0010 B022
dbf d0, $556A 0101 0001 1100 0000 51C0 556A
dbf d3, $FFA0 0101 0001 1100 1011 51CB FFA0
dbeq d1, $FFFC 0101 0111 1100 1001 57C9 FFFC
dbmi d4, $FFDC 0101 1011 1100 1100 5BCC FFDC
divs.w #$A, d0 1000 0001 1111 1100 81FC 000A
divu.w ($FFFFF314).w, d1 1000 0010 1111 1000 82F8 F314
divu.w d1, d1 1000 0010 1100 0001 82C1
divu.w (a1), d1 1000 0010 1101 0001 82D1
divu.w 4(a0), d1 1000 0010 1110 1000 82E8 0004
divu.w (a1)+, d1 1000 0010 1101 1001 82D9
divu.w -(a1), d1 1000 0010 1110 0001 82E1
eori.w #$8810, d7 0000 1010 0100 0111 0A47 8810
eori.b #$80, ($FFFFF00E).w 0000 1010 0011 1000 0A38 0080 F00E
eori.w #$3119, ($FFFFF010).w 0000 1010 0111 1000 0A78 3119 F010
eori.l #$10001000, d5 0000 1010 1000 0101 0A85 1000 1000
eori.l #$FFFF, (a0) 0000 1010 1001 0000 0A90 0000 FFFF
eori.l #$FFFF, $40(a0) 0000 1010 1010 1000 0AA8 0000 FFFF 0040
eori.l #$FFFF, (a0)+ 0000 1010 1001 1000 0A98 0000 FFFF
eori.l #$FFFF, -(a0) 0000 1010 1010 0000 0AA0 0000 FFFF
eori #$0001,sr 0000 1010 0111 1100 0A7C 0001
eor.b d0,d1 1011 0001 0000 0001 B101
eor.w d5,d7 1011 1011 0100 0111 BB47
exg d1, d2 1100 0011 0100 0010 C342
exg a3, a4 1100 0111 0100 1100 C74C
exg d5, a6 1100 1011 1000 1110 CB8E
ext.w d0 0100 1000 1000 0000 4880
ext.l d1 0100 1000 1100 0001 48C1
illegal 0100 1010 1111 1100 4AFC
jmp (a1) 0100 1110 1101 0001 4ED1
jmp $10(a1) 0100 1110 1110 1001 4EE9 0010
jmp $65A70 0100 1110 1111 1001 4EF9 0006 5A70
jsr $4B98C 0100 1110 1011 1001 4EB9 0004 B98C
lea ($FFFFFFF4).w, a0 0100 0001 1111 1000 41F8 FFF4
lea ($FFFF7CC0).l, a1 0100 0011 1111 1001 43F9 FFFF 7CC0
lea d3, a2 0100 0101 1100 0011 45C3
lea (a6), a2 0100 0101 1101 0110 45D6
lea $130(a1), a1 0100 0011 1110 1001 43E9 0130
lea (a3,d3.w), a2 0100 0101 1111 0011 45F3 3000
lea 8(a3,d3.w), a2 0100 0101 1111 0011 45F3 3008
lea $4C(pc,d0.w), a1 0100 0011 1111 1011 43FB 004C
link a4, #$1087 0100 1110 0101 0100 4E54 1087
lsl.b #1, d1 1110 0011 0000 1001 E309
lsr.w #7, d1 1110 1110 0100 1001 EE49
lsr.w #8, d1 1110 0000 0100 1001 E049
lsr.w d2, d2 1110 0100 0110 1010 E46A
lsl.l #8, d0 1110 0001 1000 1000 E188
asr.l #3, d0 1110 0110 1000 0000 E680
asr.l #8, d1 1110 0000 1000 0001 E081
asr $1C(a1) 1110 0000 1110 1001 E0E9 001C
move.b #$64, ($FFFFFFE0).w 0001 0001 1111 1100 11FC 0064 FFE0
move.w #$03E8, ($FFFFFFE0).w 0011 0001 1111 1100 31FC 03E8 FFE0
move.l #$05F5E100, ($FFFFFFE0).w 0010 0001 1111 1100 21FC 05F5 E100 FFE0
move.b #$20, d1 0001 0010 0011 1100 123C 0020
move.l #$60000003, d0 0010 0000 0011 1100 203C 6000 0003
move.w #$101, (a1) 0011 0010 1011 1100 32BC 0101
move.b #$3C, 2(a2) 0001 0101 0111 1100 157C 003C 0002
move.w #$2FA0, $10(a1) 0011 0011 0111 1100 337C 2FA0 0010
move.w #$0, (a3)+ 0011 0110 1111 1100 36FC 0000
move.w #$0, -(a3) 0011 0111 0011 1100 373C 0000
move.w ($FFFFFF0A).w, ($FFFFFF08).w 0011 0001 1111 1000 31F8 FF0A FF08
move.w ($FFFFFF0A).w, ($FFFFFF08).l 0011 0011 1111 1000 33F8 FF0A FFFF FF08
move.w ($FFFF01A5).l, ($FFFFFFE0).w 0011 0001 1111 1001 31F9 FFFF 01A5 FFE0
move.w ($FFFFEE18).w, d0 0011 0000 0011 1000 3038 EE18
move.b ($FFFFFF0B).w, (a0) 0001 0000 1011 1000 10B8 FF0B
move.b ($FFFFFF0B).w, $22(a0) 0001 0001 0111 1000 1178 FF0B 0022
move.b ($FFFFFF0B).w, (a0)+ 0001 0000 1111 1000 10F8 FF0B
move.b ($FFFFFF0B).w, -(a0) 0001 0001 0011 1000 1138 FF0B
move.b d0, ($FFFFF604).w 0001 0001 1100 0000 11C0 F604
move.l d1, ($FFFFFFE0).l 0010 0011 1100 0001 23C1 FFFF FFE0
move.w d1, d3 0011 0110 0000 0001 3601
move.l d0, d7 0010 1110 0000 0000 2E00
move.w d0, (a6) 0011 1100 1000 0000 3C80
move.b d3, $26(a0) 0001 0001 0100 0011 1143 0026
move.w d3, (a2)+ 0011 0100 1100 0011 34C3
move.w d3, -(a2) 0011 0101 0000 0011 3503
move.b (a3), d1 0001 0010 0001 0011 1213
move.b (a3), (a4) 0001 1000 1001 0011 1893
move.b (a1), 3(a2) 0001 0101 0101 0001 1551 0003
move.l (a0), $80(a2) 0010 0101 0101 0000 2550 0080
move.b (a3), (a4)+ 0001 1000 1101 0011 18D3
move.b (a3), -(a4) 0001 1001 0001 0011 1913
move.w $34(a0), ($FFFFFF08).w 0011 0001 1110 1000 31E8 0034 FF08
move.b 8(a1), d0 0001 0000 0010 1001 1029 0008
move.b $26(a0), d6 0001 1100 0010 1000 1C28 0026
move.l $64(a1), d3 0010 0110 0010 1001 2629 0064
move.b 1(a2), (a2) 0001 0100 1010 1010 14AA 0001
move.b 3(a2), 2(a2) 0001 0101 0110 1010 156A 0003 0002
move.w $14(a1), $54(a2) 0011 0101 0110 1001 3569 0014 0054
move.l $10(a1), $50(a2) 0010 0101 0110 1001 2569 0010 0050
move.b 1(a2), (a2)+ 0001 0100 1110 1010 14EA 0001
move.b 1(a2), -(a2) 0001 0101 0010 1010 152A 0001
move.b (a4)+, ($FFFFFFB2).w 0001 0001 1101 1100 11DC FFB2
move.b (a4)+, d0 0001 0000 0001 1100 101C
move.l (a4)+, d0 0010 0000 0001 1100 201C
move.l (a0)+, (a1) 0010 0010 1001 1000 2298
move.l (a1)+, $74(a2) 0010 0101 0101 1001 2559 0074
move.l (a0)+, (a1)+ 0010 0010 1101 1000 22D8
move.b -(a3), d0 0001 0000 0010 0011 1023
move.w -(a4), d0 0011 0000 0010 0100 3024
move.w -(a5), -(a1) 0011 0011 0010 0101 3325
move.l a1, ($FFFFE446).w 0010 0001 1100 1001 21C9 E446
move.l a1, d0 0010 0000 0000 1001 2009
move.l a1, (a0) 0010 0000 1000 1001 2089
move.w a2, $3C(a0) 0011 0001 0100 1010 314A 003C
move.l a2, (sp) 0010 1110 1000 1010 2E8A
move.l a2, (sp)+ 0010 1110 1100 1010 2ECA
move.l a2, -(sp) 0010 1111 0000 1010 2F0A
move.b $14(a2,d6.w), ($FFFFE446).w 0001 0001 1111 0010 11F2 6014 E446
move.b (a2,d0.w), d1 0001 0010 0011 0010 1232 0000
move.w 4(a4,d0.w), d6 0011 1100 0011 0100 3C34 0004
move.b $1D(a3,d4.w), d4 0001 1000 0011 0011 1833 401D
move.b (a2,d2.w), (a3) 0001 0110 1011 0010 16B2 2000
move.b $14(a2,d6.w), $3C(a3) 0001 0111 0111 0010 1772 6014 003C
move.b (a2,d2.w), (a3)+ 0001 0110 1111 0010 16F2 2000
move.b (a2,d2.w), -(a3) 0001 0111 0011 0010 1732 2000
move.b $5E(pc,d3.w), ($FFFFE446).w 0001 0001 1111 1011 11FB 305E E446
move.b $5E(pc,d0.w), d2 0001 0100 0011 1011 143B 005E
move.b $5E(pc,d0.w), (a1) 0001 0010 1011 1011 12BB 005E
move.b $5E(pc,d0.w), $22(a1) 0001 0011 0111 1011 137B 005E 0022
move #$2700,sr 0100 0110 1111 1100 46FC 2700
movea.w #$6000, a4 0011 1000 0111 1100 387C 6000
movea.w ($FFFFEE4A).w, a4 0011 1000 0111 1000 3878 EE4A
movea.w d1, a4 0011 1000 0100 0001 3841
movea.l a2, a6 0010 1100 0100 1010 2C4A
movea.w (a3), a1 0011 0010 0101 0011 3253
movea.w $2C(a3), a1 0011 0010 0110 1011 326B 002C
movea.l (a1)+, a2 0010 0100 0101 1001 2459
movea.l -(a1), a2 0010 0100 0110 0001 2461
movea.l (sp), a2 0010 0100 0101 0111 2457
movea.l (sp)+, a2 0010 0100 0101 1111 245F
movea.l -(sp), a2 0010 0100 0110 0111 2467
movea.l (a4,d0.w), a3 0010 0110 0111 0100 2674 0000
movea.l $18(a4,d0.w), a3 0010 0110 0111 0100 2674 0018
movep.w 0(a0), d3 0000 0111 0000 1000 0708 0000
movep.l 0(a0), d3 0000 0111 0100 1000 0748 0000
movep.w d2, 0(a0) 0000 0101 1000 1000 0588 0000
movep.l d2, 0(a0) 0000 0101 1100 1000 05C8 0000
moveq #$80, d1 0111 0010 1000 0000 7280
muls.w #$19, d1 1100 0011 1111 1100 C3FC 0019
muls.w ($FFFFFF9E).w, d1 1100 0011 1111 1000 C3F8 FF9E
muls.w d2, d1 1100 0011 1100 0010 C3C2
muls.w (a0), d1 1100 0011 1101 0000 C3D0
muls.w $1C(a0), d1 1100 0011 1110 1000 C3E8 001C
muls.w (a0)+, d1 1100 0011 1101 1000 C3D8
muls.w -(a0), d1 1100 0011 1110 0000 C3E0
mulu.w #$19, d2 1100 0100 1111 1100 C4FC 0019
mulu.w ($FFFFFF9E).w, d2 1100 0100 1111 1000 C4F8 FF9E
mulu.w d2, d1 1100 0010 1100 0010 C2C2
mulu.w (a3), d2 1100 0100 1101 0011 C4D3
mulu.w $1C(a3), d2 1100 0100 1110 1011 C4EB 001C
mulu.w (a3)+, d2 1100 0100 1101 1011 C4DB
mulu.w -(a3), d2 1100 0100 1110 0011 C4E3
neg.w ($FFFFFE26).w 0100 0100 0111 1000 4478 FE26
neg.l d0 0100 0100 1000 0000 4480
neg.w (a1) 0100 0100 0101 0001 4451
neg.w $1A(a1) 0100 0100 0110 1001 4469 001A
neg.w (a1)+ 0100 0100 0101 1001 4459
neg.w -(a1) 0100 0100 0110 0001 4461
nop 0100 1110 0111 0001 4E71
not.w ($FFFFFE26).w 0100 0110 0111 1000 4678 FE26
not.l d0 0100 0110 1000 0000 4680
not.w (a1) 0100 0110 0101 0001 4651
not.w $1A(a1) 0100 0110 0110 1001 4669 001A
not.w (a1)+ 0100 0110 0101 1001 4659
not.w -(a1) 0100 0110 0110 0001 4661
ori.b #$36, d1 0000 0000 0000 0001 0001 0036
ori.w #$100, d2 0000 0000 0100 0010 0042 0100
ori.l #$FFFFFF, d0 0000 0000 1000 0000 0080 00FF FFFF
ori.b #$70, ($FFFFF100).w 0000 0000 0011 1000 0038 0070 F100
ori.w #$2005, ($FFFFF100).w 0000 0000 0111 1000 0078 2005 F100
ori.b #$80, (a1) 0000 0000 0001 0001 0011 0080
ori.b #$80, $2B(a1) 0000 0000 0010 1001 0029 0080 002B
ori.b #$80, (a1)+ 0000 0000 0001 1001 0019 0080
ori.b #$80, -(a1) 0000 0000 0010 0001 0021 0080
ori.w #$777, 4(a4) 0000 0000 0110 1100 006C 0777 0004
ori.b #$7F, (a2,d0.w) 0000 0000 0011 0010 0032 007F 0000
ori.w #$7FF, $10(a2,d4.w) 0000 0000 0111 0010 0072 07FF 4010
ori #$0001,sr 0000 0000 0111 1100 007C 0001
or.b d0, d1 1000 0010 0000 0000 8200
or.b ($FFFFF607).w, d0 1000 0000 0011 1000 8038 F607
or.w ($FFFFEEAC).w, d3 1000 0110 0111 1000 8678 EEAC
or.w (a0), d0 1000 0000 0101 0000 8050
or.w 6(a5), d4 1000 1000 0110 1101 886D 0006
or.w $A(a5), d5 1000 1010 0110 1101 8A6D 000A
or.w (a0)+, d0 1000 0000 0101 1000 8058
or.w -(a0), d0 1000 0000 0110 0000 8060
or.w d0, ($FFFFF606).w 1000 0001 0111 1000 8178 F606
or.w d0, (a0) 1000 0001 0101 0000 8150
or.w d0, $14(a0) 1000 0001 0110 1000 8168 0014
or.w d1, $A(a0) 1000 0011 0110 1000 8368 000A
or.w d0, (a0)+ 1000 0001 0101 1000 8158
or.w d0, -(a0) 1000 0001 0110 0000 8160
pea ($FFFFE53C).w 0100 1000 0111 1000 4878 E53C
pea d2 0100 1000 0100 0010 4842
pea (a2) 0100 1000 0101 0010 4852
pea $2A(a0) 0100 1000 0110 1000 4868 002A
rol.w d0, d1 1110 0001 0111 1001 E1E9
ror.b #1, d0 1110 0010 0001 1000 E218
ror.l #1, d3 1110 0010 1001 1011 E6EA
rol.w ($FFFFFFE0).w 1110 0111 1111 1000 E7F8 FFE0
rte 0100 1110 0111 0011 4E73
rtr 0100 1110 0111 0111 4E77
rts 0100 1110 0111 0101 4E75
st ($FFFFF000).w 0101 0000 1111 1000 50F0 F000
sf ($FFFFF000).w 0101 0001 1111 1000 51F0 F000
shi ($FFFFF000).w 0101 0010 1111 1000 52F0 F000
sls ($FFFFF000).w 0101 0011 1111 1000 53F0 F000
scc ($FFFFF000).w 0101 0100 1111 1000 54F0 F000
scs ($FFFFF000).w 0101 0101 1111 1000 55F0 F000
sne ($FFFFF000).w 0101 0110 1111 1000 56F0 F000
seq ($FFFFF000).w 0101 0111 1111 1000 57F0 F000
svc ($FFFFF000).w 0101 1000 1111 1000 58F0 F000
svs ($FFFFF000).w 0101 1001 1111 1000 59F0 F000
spl ($FFFFF000).w 0101 1010 1111 1000 5AF0 F000
smi ($FFFFF000).w 0101 1011 1111 1000 5BF0 F000
sge ($FFFFF000).w 0101 1100 1111 1000 5CF0 F000
slt ($FFFFF000).w 0101 1101 1111 1000 5DF0 F000
sgt ($FFFFF000).w 0101 1110 1111 1000 5EF0 F000
sle ($FFFFF000).w 0101 1111 1111 1000 5FF0 F000
stop #$2500 0100 1110 0111 0010 4E72 2500
suba.w #$20, a0 1001 0000 1111 1100 90FC 0020
suba.w ($FFFFF100).w, a2 1001 0100 1111 1000 94F8 F100
suba.l ($FFFFF100).l, a3 1001 0111 1111 1001 97F9 FFFF F100
suba.w d0, a2 1001 0100 1100 0000 94C0
suba.w (a0), a1 1001 0010 1101 0000 92D0
suba.w $10(a0), a1 1001 0010 1110 1000 92E8 0010
suba.w (a0)+, a1 1001 0010 1101 1000 92D8
suba.w -(a0), a1 1001 0010 1110 0000 92E0
suba.w #$1337, a4 1001 1000 1111 1100 98FC 1337
suba.w (a3,d1.w), a3 1001 0110 1111 0011 96F3 1000
suba.w $24(a3,d4.w), a3 1001 0110 1111 0011 96F3 4024
subi.b #$20, d1 0000 0100 0000 0001 0401 0020
subi.l #$FFFFE6AC, d0 0000 0100 1000 0000 0480 FFFF E6AC
subi.w #$1337, ($FFFFF100).w 0000 0100 0111 1000 0478 1337 F100
subi.w #$1337, ($FFFFF100).l 0000 0100 0111 1001 0479 1337 FFFF F100
subi.l #$19650917, ($FFFFF100).w 0000 0100 1011 1000 04B8 1965 0917 F100
subi.b #$40, (a1) 0000 0100 0001 0001 0411 0040
subi.w #$40, $1C(a1) 0000 0100 0110 1001 0469 0040 001C
subi.l #$500, $64(a1) 0000 0100 1010 1001 04A9 0000 0500 0064
subi.b #$40, (a1)+ 0000 0100 0001 1001 0419 0040
subi.b #$40, -(a1) 0000 0100 0010 0001 0421 0040
subq.b #1, ($FFFFF100).w 0101 0011 0011 1000 5338 F100
subq.b #2, ($FFFFF100).w 0101 0101 0011 1000 5538 F100
subq.b #8, ($FFFFF100).w 0101 0001 0011 1000 5138 F100
subq.b #1, d6 0101 0011 0000 0110 5306
subq.w #3, d2 0101 0111 0100 0010 5742
subq.w #8, (a1) 0101 0001 0101 0001 5151
subq.b #1, $25(a0) 0101 0011 0010 1000 5328 0025
subq.w #1, $14(a0) 0101 0011 0110 1000 5368 0014
subq.w #8, (a1)+ 0101 0001 0101 1001 5159
subq.w #8, -(a1) 0101 0001 0110 0001 5161
subq.w #1, a0 0101 0011 0100 1000 5348
subq.l #1, a0 0101 0011 1000 1000 5388
subq.l #4, sp 0101 1001 1000 1111 598F
sub.w d2, d0 1001 0000 0100 0010 9042
sub.w d6, d2 1001 0100 0100 0110 9446
sub.w ($FFFFEE8C).w, d0 1001 0000 0111 1000 9078 EE8C
sub.w (a1), d0 1001 0000 0101 0001 9051
sub.b 1(a3), d1 1001 0010 0010 1011 922B 0001
sub.w $46(a0), d2 1001 0100 0110 1000 9468 0046
sub.w (a1)+, d0 1001 0000 0101 1001 9059
sub.w -(a1), d0 1001 0000 0110 0001 9061
sub.l a0, d1 1001 0010 1000 1000 9288
sub.w d1, ($FFFFFFAC).w 1001 0011 0111 1000 9378 FFAC
sub.w d0, (a1) 1001 0001 0101 0001 9151
sub.w d1, $1A(a0) 1001 0011 0110 1000 9368 001A
sub.l d0, $14(a0) 1001 0001 1010 1000 91A8 0014
sub.l d3, (a5)+ 1001 0111 1001 1101 979D
sub.w d3, -(a1) 1001 0111 0110 0001 9761
swap d0 0100 1000 0100 0000 4840
tas.b ($FFFFFE00).w 0100 1010 1111 1000 4AF8 FE00
tas.b d1 0100 1010 1100 0001 4AC1
tas.b (a2) 0100 1010 1101 0010 4AD2
tas.b $2A(a0) 0100 1010 1110 1000 4AE8 002A
trap #1 0100 1110 0100 0001 4E41
trapv 0100 1110 0111 0110 4E76
tst.b d4 0100 1010 0000 0100 4A04
tst.l d1 0100 1010 1000 0001 4A81
tst.b ($FFFFAA80).w 0100 1010 0011 1000 4A38 AA80
tst.w ($FFFFAA80).w 0100 1010 0111 1000 4A78 AA80
tst.w ($A1000C).l 0100 1010 0111 1001 4A79 00A1 000C
tst.l ($A10008).l 0100 1010 1011 1001 4AB9 00A1 0008
tst.w (a4) 0100 1010 0101 0100 4A54
tst.w $1A(a1) 0100 1010 0110 1001 4A69 001A
unlk a0 0100 1110 0101 1000 4E58

Note: The instructions addi and subi cannot repoint a dynamic pointer. For the following instructions, addq and adda are valid, but addi is invalid. Use adda instead. The instructions addq and adda work equivalently in these examples when given the same arguments, but adda allows greater arguments than addq allows. The corresponding sub instructions work parallel to the given add instructions.

ASM Binary instruction Hex code
addq.w #2, a4 0101 0100 0100 1100 544C
addi.w #$20, a4 0000 0110 0100 1100 064C 0020
adda.w #$20, a4 1101 1000 1111 1100 D8FC 0020

References


Sonic Community Hacking Guide
General
SonED2 Manual | Subroutine Equivalency List
Game-Specific
Sonic the Hedgehog (16-bit) | Sonic the Hedgehog (8-bit) | Sonic CD (prototype 510) | Sonic CD | Sonic CD (PC) | Sonic CD (2011) | Sonic 2 (Simon Wai prototype) | Sonic 2 (16-bit) | Sonic 2 (Master System) | Sonic 3 | Sonic 3 & Knuckles | Chaotix | Sonic Jam | Sonic Jam 6 | Sonic Adventure | Sonic Adventure DX: Director's Cut | Sonic Adventure DX: PC | Sonic Adventure (2010) | Sonic Adventure 2 | Sonic Adventure 2: Battle | Sonic Adventure 2 (PC) | Sonic Heroes | Sonic Riders | Sonic the Hedgehog (2006) | Sonic & Sega All-Stars Racing | Sonic Unleashed (Xbox 360/PS3) | Sonic Colours | Sonic Generations | Sonic Forces
Technical information
Sonic Eraser | Sonic 2 (Nick Arcade prototype) | Sonic CD (prototype; 1992-12-04) | Dr. Robotnik's Mean Bean Machine | Sonic Triple Trouble | Tails Adventures | Sonic Crackers | Sonic 3D: Flickies' Island | Sonic & Knuckles Collection | Sonic R | Sonic Shuffle | Sonic Advance | Sonic Advance 3 | Sonic Battle | Shadow the Hedgehog | Sonic Rush | Sonic Classic Collection | Sonic Free Riders | Sonic Lost World
Legacy Guides
The Nemesis Hacking Guides The Esrael Hacking Guides
ROM: Sonic 1 | Sonic 2 | Sonic 2 Beta | Sonic 3

Savestate: Sonic 1 | Sonic 2 Beta/Final | Sonic 3

Sonic 1 (English / Portuguese) | Sonic 2 Beta (English / Portuguese) | Sonic 2 and Knuckles (English / Portuguese)
Move to Sega Retro
Number Systems (or scrap) | Assembly Hacking Guide | 68000 Instruction Set | 68000 ASM-to-Hex Code Reference | SMPS Music Hacking Guide | Mega Drive technical information