Forum : 8051
Post Information | Post |
---|---|
October 9, 2007 - 8:55am
|
Hello to all . A few days ago we update our old BN713 (XA/8051) to BN737(XA/8051) . But I need some help and info for the Error Message : 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 : ***ERROR 121: IMPROPER FIXUP (ADDRESS OUT OF RANGE) Thanks Andi |
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
thanks Stephane
Yes , I write my own putchar() ... so maybe this is a hint to the problem .
Now i try to fix it !
andi
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