Topic : ERROR 121: IMPROPER FIXUP (ADDRESS OUT OF RANGE)

Forum : 8051

Original Post
Post Information Post
October 9, 2007 - 8:55am
Guest

Hello to all .

A few days ago we update our old BN713 (XA/8051) to BN737(XA/8051) .
BN713 shuts down since we have Win XP .
It looks that BN737 runs stable but during compiling of my old XA projects I got some Errors .
These Errors will not come with the old BN717 .
Ok ... the most of them are solved now .

But I need some help and info for the Error Message :
ERROR 121: IMPROPER FIXUP (ADDRESS OUT OF RANGE) ADDRESS: 140DB

I know the meaning of this error message but how can i find out where the problem is ?

Here is a part of the generated map File :

--------- TranslatorMod-XA UT_SC
--------- PROC-XA
--------- ENDPROC-XA
--------- EndModule-XA
--------- TranslatorMod-XA GETCHAR
--------- PROC-XA

***ERROR 121: IMPROPER FIXUP (ADDRESS OUT OF RANGE)
ADDRESS: 140DB
--------- ENDPROC-XA
--------- EndModule-XA
--------- TranslatorMod-XA UNGETCHAR
--------- PROC-XA
--------- ENDPROC-XA
--------- EndModule-XA

Thanks

Andi

Replies
Post Information Post
+1
0
-1
October 9, 2007 - 10:03am
Raisonance Support Team

Sir,

The trouble seems to be in the getchar function.
the getchar function calls the putchar one.

Did you define your one putchar in your project?

If it's the case, it seems that yours is to far (in the map) from the getchar.

Stéphane

+1
0
-1
October 9, 2007 - 10:34am
Guest

thanks Stephane

Yes , I write my own putchar() ... so maybe this is a hint to the problem .

Now i try to fix it !

andi

+1
0
-1
October 9, 2007 - 11:43am
Guest

Thanks Stephane , this is the problem .

The putchar must be within the same 64k segment as the getchar() .
The Linker puts the getchar() and I think all the other Raisonance libary code at the end of my code .
So the raisonance libary code is in the 2nd 64 k segment ( from 10000H up ).

example(s) of my os.axa :

; 1st example , did not work ERROR 121: IMPROPER FIXUP (ADDRESS OUT OF RANGE) ADDRESS: 140DB

public ?putchar :
; here the putchar code
ret

; 2nd example , will be compiled without errors , but my code did not like putchar in the 2nd 64k segment :-(

code at 012000H
public ?putchar :
; here the putchar code
ret

; 3rd example , will be compiled without errors , but I did not know if the getchar is used by other Raisonance Libs ...
; and in some situation it crashes :-(

public ?getchar : ; lib's getchar will be overwritten
ret

public ?putchar :
; here the putchar code
ret

To be in a save situation I think there are two solutions ( and one question ) :

1. I put the raisonance Libs , especialy the getchar() into the first 64k Page.
Question : What is the best way to do that ?

2. I wrote my own getchar , whitch maybe ist the simplest and savest way .
If I will get no better answer I think I will do that .

thanks
andi