473,466 Members | 1,389 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to map a subroutine to a particular address in rom?

Hello ,
I am writing a interrupt service routine for a vectored
interrupt(vectored address 0x0056). Now I want to load this subroutine to
start from the address(0x0056).

Please help me out

Regards,
Dinesh
Dec 26 '07 #1
2 1237
I am writing a interrupt service routine for a vectored
>interrupt(vectored address 0x0056). Now I want to load this subroutine to
start from the address(0x0056).
This is off-topic for comp.lang.c. I suggest looking at the manuals
that came with your linker. Oh, yes, you didn't say what compiler
that was or what CPU is involved.

Are you sure you want that? Isn't the *VECTOR* at location 0x0056,
and you want the subroutine to be a bit longer than the size of a
vector?

A common thing to do on PCs is to have an initialization routine
which will "hook" vectors by setting the vector to the address of
a given function, and possibly save the old vector in case the new
routine wants to call the old one. Of course, this doesn't work
if everything is in ROM.

Sometimes it's worth going to assembly language, which may allow
you to define data located at an absolute address.

Dec 26 '07 #2
On Wed, 26 Dec 2007 09:27:29 +0530, "Dinesh P" <di******@in.bosch.com>
wrote in comp.lang.c:
Hello ,
I am writing a interrupt service routine for a vectored
interrupt(vectored address 0x0056). Now I want to load this subroutine to
start from the address(0x0056).
The concepts of interrupt service routines, vectored addresses, or ROM
do not exist in the C language, which is 100% hardware independent.

The place to ask this question is news:comp.arch.embedded. But do not
dare post it there without supplying a lot more information, at the
very least:

1. The microprocessor or microcontroller.

2. The development tools (compiler, assembler, linker, etc.), both
the brand and version.

3. Any other pertinent information about your development
environment.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html
Dec 26 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Michael Farber | last post by:
Not sure if this is the right group for this but anyways... I've got an ASP web application that uses a Visual Basic component to do some work. I instantiate the component in asp and then...
3
by: Bill | last post by:
I've got a subroutine, defined as Private, takes two parameters, that is called lots of times from different ASP scripts. I need specific error handling when it is called from only one particular...
5
by: Amit | last post by:
I tried calling a subroutine in a fortran module from C ,but couldn't.I always get the error: undefined reference in the main.o file (main is in C calling the subroutine). for calling the...
11
by: RichN | last post by:
I am developing a c program in Visual Studio .NET 2003. I also have an Intel(R) Fortran compiler for MVS .NET My fortran sourcecode already existed. I started a new fortran project and chose to...
4
by: Dursun | last post by:
I need to call a subroutine in FormA from within FormB. Let FormA be an MDIForm and let FormB be its MDIChild form. So, the FormB.MDIParent property will return an object refernce to the FormA...
2
by: Richard | last post by:
Hi. How can I pass a subroutine as a parameter to another subroutine? How would the formal parameter list needs to be declared in order to receive a rubroutine (address)? Thanks in advance, ...
7
by: Richard Grant | last post by:
Hi. In c/C++ i can pass the address of a subroutine to another subroutine as an actual parameter How do I do that in VB .NET What should be the syntax for a parameter to receive the address of a...
0
by: B-lv | last post by:
I have an admin script to modify data in an Access db, but when I hit the update button after changing a field, I get a "Specified argument was out of the range of valid values. Parameter name:...
4
by: JhacK | last post by:
I need to allocate a float array delegating the task to a subroutine . The code I wrote is: int foo(float *bar) { bar = 3; return 1; }
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.