Problem with Label in Assembly language (146 Views)
Reply
Occasional Contributor
Sacha Hnatiuk
Posts: 5
Registered: ‎11-16-2000
Message 1 of 3 (146 Views)

Problem with Label in Assembly language

I wrote a very long assembly code that is call by c procedure and go after to another c procedure. Inside, there is a lot of call to an internal label and after there is only one call to the external label.

When i make the project, i need to use directly in my makefile cc instead of aCC that's calling ansic cc who doesn't exist on my hp server. I must use ansic because the linker need an object file compiling with +z or +Z option; but my cc doesn't support this options...

To correct the problem, i change all call routine to a very, very,very long method to call that recalculates the space.

But one problem exist always: in my first method, i want to jump in my assembly code at an address+offset: the address is the start of a list of fixed routine length and the offset is a multiple of this routine. When i jump to the first label, it's ok, when i jump to another, the mecanism between my c procedure and my assembly code crash.

Anybody have an idea to correct this problem?
Please use plain text.
Honored Contributor
Rainer_1
Posts: 252
Registered: ‎10-31-2000
Message 2 of 3 (146 Views)

Re: Problem with Label in Assembly language

i have no solution for your current problem but to have an ansi cc compiler you could download and install gnu compiler

http://hpux.cs.utah.edu/hppd/hpux/Gnu/gcc-2.95.2/
http://hpux.cs.utah.edu/hppd/hpux/Gnu/binutils-2.9.1/
Please use plain text.
Valued Contributor
Andy Bennett
Posts: 22
Registered: ‎10-24-1999
Message 3 of 3 (146 Views)

Re: Problem with Label in Assembly language

It isn't very clear from your description what isn't working. You indicate that the mechanism between C procedure and your assembly code is crashing in some way. It may be that your assembly code is not correctly setting every register it needs to; particularly if shared shared-library calls are involved there are extra considerations. If you haven't already, it would be worth your looking at the "32-bit PA-RISC Run-Time Architecture" documents available at http://devresource.hp.com -> "document library" -> "architecture" (in the "references and manuals" section). In particular the "Conventions for Calling Procedures" may help, if that is what is failing.
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation