Posts

Showing posts with the label pdp-11

Understanding Assembly basic code

Understanding Assembly basic code pointr: .word pointr mov #pointr,r0 mov pointr,r1 Can someone please explain the difference between the values r0 and r1? From experience with asm syntax for other machines, likely #pointr is an immediate operand (the address of the label), while pointr is a memory source operand, so the 2nd mov is a load instruction. – Peter Cordes Jul 1 at 2:42 #pointr pointr mov pointr: .word pointr creates a label for a word value containing the actual absolute address of pointr . mov #pointr,r0 uses immediate mode to move the value of the pointr label directly to r0. mov pointr,r1 uses relative mode to move the word value at pointr into r1 . Since the word value stored at pointr is the address of pointr itself it has the effect of moving the address of pointr to r1. The values in...