So, basically, I have an exam on Wednesday, and I started studying the 68k assembly on Friday, because I've been busy studying for the math exam, passed on Friday (I know you don't care, but I say this so you don't think I'm an a******.) Anyway, I'm trying to write a subroutine, that compares the [i] with the numer #12. IF [i]=#12, then memory offset ($8200+[i])=D3-#1, ELSE memory offset($8100+[i])=2*D3. When I try to assemble this (using ASIMTOOL), it gives me these errors
ERROR in line 10: Displacement out of range
ERROR in line 12: Displacement out of range
ERROR in line 15: Invalid syntax
ERROR in line 16: Invalid syntax
I know this code it's a load of s*it, but I've no one assisting me and I'm trying to do this by myself. If you could help, it would awesome, thank you. Here's the code:
ORG $8000
START MOVE.l #0,D3
MOVEA.l #$8200,a0
MOVEA.l #$8100,a1
CMP.w #12,i
BEQ.s VERO
JMP FALSO
VERO: SUB.w #1,D3
MOVE.l D3,i(a0)
FALSO: MULU.w #2,D3
MOVE.w D3,i(a1)
STOP #2000
i DC.w 12
x DC.w #4
y DC.w #3
END START