It is currently Fri Jan 19, 2018 10:27 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Mon Jan 15, 2018 1:07 am 
Offline

Joined: Mon May 27, 2013 9:40 am
Posts: 382
I've been having this problem for months. It just seems to be an ugly warning as everything seems to work, but I don't like warnings.

It seems that tschak909 had the same problem here: viewtopic.php?p=211844#p211844 and got it sorted out, but the same solution doesn't work for me.

This is my issue:

I created a couple of pointers in ZP in the crt0 file. They are read by a modification I made to neslib, and have to be written from by C code in my main module. Such pointers are defined as:

Code:
.export _SCROLL_WRITE, _ATTRIB_WRITE

[...]

.segment "ZEROPAGE"

; [...] <- neslib stuff being defined here as in lots of "var .res N"

_SCROLL_WRITE:    .res 2
_ATTRIB_WRITE:    .res 2


Those symbols I import from my main module:
Code:
extern unsigned char *SCROLL_WRITE;
#pragma zpsym ("SCROLL_WRITE")
extern unsigned char *ATTRIB_WRITE;
#pragma zpsym ("ATTRIB_WRITE")


But keep getting the warnings:

Code:
ld65: Warning: Address size mismatch for `_ATTRIB_WRITE': Exported from crt0.o, crt0-pantanow.s(81) as `zeropage', import in game.o, game.s(20597) as `absolute'
ld65: Warning: Address size mismatch for `_SCROLL_WRITE': Exported from crt0.o, crt0-pantanow.s(80) as `zeropage', import in game.o, game.s(20597) as `absolute'


I even updated to the latest win32 snapshot of cc65, to no avail. Any pointers on what I'm doing wrong / what's missing?

Thanks.

_________________
http://www.mojontwins.com


Top
 Profile  
 
PostPosted: Mon Jan 15, 2018 3:17 am 
Offline
User avatar

Joined: Sat Sep 07, 2013 2:59 pm
Posts: 1552
The error message doesn't seem to imply this, but shouldn't it be .exportzp in the Assembly file instead of .export?

_________________
Available now: My game "City Trouble".
Website: https://megacatstudios.com/products/city-trouble
Trailer: https://youtu.be/IYXpP59qSxA
Gameplay: https://youtu.be/Eee0yurkIW4
German Retro Gamer article: http://i67.tinypic.com/345o108.jpg


Top
 Profile  
 
PostPosted: Mon Jan 15, 2018 3:44 am 
Offline

Joined: Tue Oct 06, 2015 10:16 am
Posts: 625
Either the warning is wrong, or your crt0.s has another .section directive in between, causing them to be normal symbols. I use ZP symbols all the time, and don't have any warnings.

edit: Look at the generated game.s asm. It should have those as importzp, not import.


Top
 Profile  
 
PostPosted: Mon Jan 15, 2018 2:57 pm 
Offline

Joined: Mon May 27, 2013 9:40 am
Posts: 382
Thanks both. I'll double-check.

_________________
http://www.mojontwins.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: Yahoo [Bot] and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group