moonwalk wrote
from line 12 to 14, 
@addr
A=M  // if M equals *A, How to understand the assignment between two different things?
M=D
Thanks
 
ASM is untyped. Think of A as a C union.  It can be used as either an int or a *int.
int D;      // CPU registers
union {
    int num;
    int *ptr;
} A;
int addr;   // RAM variable
A.ptr = &addr;  // @addr
A.num = *A.ptr; // A=M
*A.ptr = D      // M=D
--Mark