Why is LDAA 0,X Equivalent to LDAA 1,X+?

  • Thread starter Thread starter seang
  • Start date Start date
  • Tags Tags
    Equivalent
AI Thread Summary
LDAA 0,X loads the A accumulator with the value at the address in the X register plus an offset of 0. In contrast, LDAA 1,X+ loads the A accumulator with the value at the address in the X register plus an offset of 1, while also incrementing the X register after the operation. The confusion arises from the use of the offset in the second instruction, which is necessary for the intended operation. The first argument in the LDAA instruction specifies the offset to be added to the address in the X register. Understanding these differences clarifies why the two instructions, despite their similarities, are not interchangeable.
seang
Messages
184
Reaction score
0
I cannot understand why the following bits are equivalent:

Code:
LDAA 0,X
INCX
;and
LDAA 1,X+


The 1 is throwing me off. Since the X register is post incremented, why is it necessary? I would think that LDAA 0,X+ would be equivalent to the first bit of code. What am I missing?
 
Engineering news on Phys.org
I don't program in HC 12 assembly, but is the first arguent to the LDAA instruction the register number?
 
Right, I was thinking that might be a problem.

LDAA 0,X loads the A accumulator with the address stored in the X register, plus the offset (0, in this case).

LDAA 1,X+ loads the A accumulator with the address in the X register, plus the offset (1 in this case), and then increments the X register.
 
While I was rolling out a shielded cable, a though came to my mind - what happens to the current flow in the cable if there came a short between the wire and the shield in both ends of the cable? For simplicity, lets assume a 1-wire copper wire wrapped in an aluminum shield. The wire and the shield has the same cross section area. There are insulating material between them, and in both ends there is a short between them. My first thought, the total resistance of the cable would be reduced...
Hi all I have some confusion about piezoelectrical sensors combination. If i have three acoustic piezoelectrical sensors (with same receive sensitivity in dB ref V/1uPa) placed at specific distance, these sensors receive acoustic signal from a sound source placed at far field distance (Plane Wave) and from broadside. I receive output of these sensors through individual preamplifiers, add them through hardware like summer circuit adder or in software after digitization and in this way got an...
I am not an electrical engineering student, but a lowly apprentice electrician. I learn both on the job and also take classes for my apprenticeship. I recently wired my first transformer and I understand that the neutral and ground are bonded together in the transformer or in the service. What I don't understand is, if the neutral is a current carrying conductor, which is then bonded to the ground conductor, why does current only flow back to its source and not on the ground path...

Similar threads

Back
Top