fachat / GeckOS-V2

GeckOS version 2, a multi-tasking and multithreading operating system for the 6502
http://www.6502.org/users/andre/osa/index.html
GNU General Public License v2.0
240 stars 28 forks source link

slipd build gives 65816 mode req' error with xa 2.3.5 #8

Closed fachat closed 5 years ago

fachat commented 5 years ago

When building the slipd, the xa from ubuntu (version 2.3.5) bails out with rsh.a65:line 688: 2ed0:65816 mode used/required error rsh.a65:line 701: 2eed:65816 mode used/required error that refer to uses of "flib2osa_w" and "flib2osa_r", which translate to lib6502/libjmp.a65:#define flib2osa_r LIB6502-6 /* maps lib fileno to OS/A65 stream */ lib6502/libjmp.a65:#define flib2osa_w LIB6502-3 /* maps lib fileno to OS/A65 stream */ where "LIB6502" is defined as late-binding label, i.e. using "-LLIB6502"

fachat commented 5 years ago

The reason for this seems to be that there is a negative offset on an undefined label. This results, in the internal computation of xa, in an underflow, which becomes a 4-byte-value, which is only handled (is it?) in 65816 mode.

The reason for the negative offset is that rsh is using an "undocumented" library entry.

The question now is, whether rsh or xa should be fixed....

fachat commented 5 years ago

The reason for this problem seems to be a defect in xa65's current version. See https://github.com/fachat/xa65/issues/5 Currently xa65 from a fixed branch should be used (which is hopefully going to upstream soon): https://github.com/fachat/xa65/tree/xa-2.3.9+

fachat commented 5 years ago

Fixed by using xa-2.3.10