In assembler, you use the ABSCODE directive:

.area ABSCODE (ABS,CODE)
.org address
...
[code]
...
.area CSEG (REL,CODE)  ; To return to normal mode

Mary-Ann


________________________________
From: Jinsik Kim [mailto:[email protected]]
Sent: 25 October 2009 20:41
To: [email protected]
Subject: [Sdcc-user] Allocation each code block to different locations

Dear,


In 8051 assembly, I want split function code into several code blocks and 
locate each code block to specific memory location.

How can I allocate each block into specific memory location.

For example

.area CS01 (CODE)
func1:
~
~
00001$:
~
00002$:
~
00003$:
~
ret
func1 is located at CS01 address

However, I want to split funct1 into 4 parts and locate each at differenct 
locations, CS01, CS02, CS03, and CS04.
---------------------------------------
funct1: ;;;;-> would be located at CS01
~
~
---------------------------------------
00001$: ;;;;->would be located at CS02
~
---------------------------------------
00002$: ;;;;->would be located at CS03
~
----------------------------------------
00003$: ;;;;->would be lcoated at CS04
~
ret
---------------------------------------

Thanks,
________________________________
Windows Live: Friends get your Flickr, Yelp, and Digg updates when they e-mail 
you.<http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010>
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to