English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. General (https://eab.abime.net/forumdisplay.php?f=37)
-   -   Problem allocating some memory (https://eab.abime.net/showthread.php?t=54902)

CmdrVimes 03 September 2010 18:07

Problem allocating some memory
 
Hi Chaps,
Can anyone tell me what this means? It happens in AsmPro v1.14 when i try to get the assembler to run a Check Only on my code:

>AC
Pass 1..
** Word at Odd Address
52 gfxbas: dc.l 0
>

Have I done something stupid like try to get an even number of bytes into an odd-numbered location or something?

StingRay 03 September 2010 18:10

That just means that label gfxbas is at an odd address which is not allowed. Let me guess, right before the label you have the "graphics.library" string or something similar? :) Anyway, just place CNOP 0,2 before that label, this will align the label properly and the error will be gone.

CmdrVimes 03 September 2010 18:13

Quote:

Originally Posted by StingRay (Post 697150)
Let me guess, right before the label you have the "graphics.library" string or something similar? :)

Can you see my screen? No? Psychic obviously :bowdown

Cheers StingRay.

pmc 03 September 2010 18:52

Quote:

Originally Posted by CmdrVimes
Can you see my screen? No? Psychic obviously

LOL. You'll soon learn that Sting has a finely tuned sense of what the bug might be in code.

I had a problem with a scroller once - Sting immediately suggested a corrupted sine pointer and that turned out to be the problem.

I also had a really strange problem with my vectors that Sting immediately suggested might be an issue with the line draw code and guess where the problem was... :D

Sting == the Yoda of asm! :D

Thorham 03 September 2010 23:23

Quote:

Originally Posted by StingRay (Post 697150)
Anyway, just place CNOP 0,2 before that label, this will align the label properly and the error will be gone.

Or place 'cnop 0,2' (or 'even') after your strings (looks better ;)).

You can also put your strings after everything else in your source code, or even in their own section, and you'll never have that problem again, without using cnop or even.


All times are GMT +2. The time now is 08:51.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04053 seconds with 11 queries