Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

data transfer instruction in assembly language

Status
Not open for further replies.

Parth86

Member
I know the data transfer instruction is used to move data. data can be move between memory, register and accumulator
different movement of data in assembly

accumulator to register mov R0, A
register to accumulator mov A, R0

how to write instruction for memory ( which memory is used for this)
memory to accumulator ?
memory to register ?
 
You can load directly..
Code:
counter equ 0x30

mov A, counter
inc A
mov counter, A

Or indirectly using one of the registers
Code:
counter equ 0x30

mov R0,#counter

mov A, @R0
inc A
mov @R0, A

Oh yeah! the '#' means data without it will be location... In my example I load the value of counter into A
In the second, I load the actual location number into R0.
 
Last edited:
hi,
From your two 'MOV' instructions, I would say yes.
This Link explains the MOV instructions in detail.
**broken link removed**
E
 
Status
Not open for further replies.

Latest threads

Back
Top