Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How does assembler start programs from given memory address?

Status
Not open for further replies.

sacrpio

Member level 3
Joined
May 24, 2004
Messages
56
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
500
ASSEMBLER Related

Dear Friends,
How microcontroller knows that program has to start execution from a particular memory address, if we r not using ORG directive.

When we talk about cross compiler then STARTUP code takes care. If we talk in terms of assembler the how it happens.

Thanks..
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,311
Reputation
4,624
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,416
Re: ASSEMBLER Related

If you don't use ORG command assembler will auutomatically start your code from address 0000h ..
 

glenjoy

Banned
Joined
Jan 1, 2004
Messages
963
Helped
72
Reputation
146
Reaction score
20
Trophy points
1,298
Location
Philippines
Activity points
0
ASSEMBLER Related

After you turned ON your microcontroller or after a reset, the program counter is set to address 0x0000h so the program always starts at 0x0000h, if there is a goto command at 0x0000h, the offset address of the said goto command address is put into the program counter so the execution moevs to the targeted address.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top