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.

assembly language

Status
Not open for further replies.

Parth86

Member
suppose we want to add two 8 bit number
we have to implement 8 bit adder

example 6+ 2 =8
00000110
+00000010
------------
00001000

suppose we have binary sequence
Mov (1000)
Add (0100)
6(00000110)
2(00000010)
8(00001000)

machine language
1000 0110
1000 0010
0100 0110 0010

assembly language
mov A, #6
mov R1,#2
add A,R1

I know assembly code convert into machine code but for low level understanding how we developed assembly language to understand machine language
 
how we access memory and which instruction we use that determine weather we are accessing Internal rom , Internal Ram ?

how to access rom

example
Mov R0, #55H ; load R0 with 55H
Mov R1, #85H ; load R1 with 85H


how to access ram memory
Mov 00, #55H ; ram location 00 has 55H data
Mov 01 , #85H : ram location 01 has 85H data
 
Code:
example
Mov R0, #55H ; load R0 with 55H
Mov R1, #85H ; load R1 with 85H

how to access ram memory
Mov 00, #55H ; ram location 00 has 55H data
Mov 01 , #85H ; ram location 01 has 85H data
These two examples are the same... R0 and R1 are in position 0 and 1 in internal ram..

Movc is for rom and movx is for external ram...
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top