Welcome to Dream.In.Code
Getting Help is Easy!

Join 132,470 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,425 people online right now. Registration is fast and FREE... Join Now!




Assmnly Language

 
Reply to this topicStart new topic

Assmnly Language, Simple subroutine question

scorpionviolinist
post 25 Jun, 2008 - 04:39 AM
Post #1


New D.I.C Head

*
Joined: 29 Feb, 2008
Posts: 36

I have to create a subroutine where the code and any other data must not be below $1000.
Is it correct to put and ORG at a subroutine?
Ex:
is this correct?
ORG $1000
REVERSE MOVE.L SR,-(SP)
....
User is offlineProfile CardPM

Go to the top of the page

perfectly.insane
post 13 Jul, 2008 - 07:35 AM
Post #2


D.I.C Addict

Group Icon
Joined: 22 Mar, 2008
Posts: 557



Thanked 46 times

Dream Kudos: 25

Expert In: C/C++

My Contributions


Yes... I think you can legally put it nearly anywhere, actually, but for your purposes, the ORG should be place before the code that should originate from 0x1000. It's possible to have multiple ORG directives in a source (from my general experience, though your assembler may differ).
User is online!Profile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/22/08 02:01PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month