Jump to content
IGNORED

DASM Question


Just Jeff

Recommended Posts

Can anyone please clarify the the meaning of this from these DASM instructions? I set aside 9 bytes of RAM ($8c through $94) in a program that I am having trouble with. Is this telling me I could only set aside 1, 2, or 4 bytes?:

 

[label] DS[.BWL] exp[,filler]

declare space (default filler is 0). Data is not generated if
within an uninitialized segment. Note that the number of bytes
generated is exp * entrysize (1,2, or 4)

The default size extension is a byte.

Note that the default filler is always 0 (has nothing to do
with the ORG default filler).

 

I had a second question, actually. I see this alot- what does it mean?: #if Olaf and #endif

 

From what I can tell it is C# code meaning "Do this stuff if defined" But I keep seeing olaf. What the frig is olaf and why is it in a set of instructions so much?

 

Thanks!

 

 

Link to comment
Share on other sites

I have:

 

Pills: ds 9 ; used for field prizes $8c through $94

 

Which I think means I didn't right? I think I can guess what you mean by word and double word. I wonder what the consequences are. It assembles without errors and runs, but is glitchy. I though I made mistake with some indirect addressing, but maybe this is it.

Link to comment
Share on other sites

I had a second question, actually. I see this alot- what does it mean?: #if Olaf and #endif

 

From what I can tell it is C# code meaning "Do this stuff if defined" But I keep seeing olaf. What the frig is olaf and why is it in a set of instructions so much?


I see this in dasm.txt:

Copyright © 1995 by Olaf "Rhialto" Seibert.

 

...

 

PREFACE FROM PETER (APRIL/2008)

 

Everything Andrew says above is still true, there have been a

few sporadic updates to the documentation but no major ones,

not even Olaf Seibert's changes from 1995 have been integrated,

to say nothing of Thomas Mathys' F8 backend from 2004. We are

urgently looking for volunteers to help with the documentation!


So my guess is the #if Olaf / #endif denote parts of the help file that are only valid if the relevant changes by Olaf Seibert's are in your build of dasm.

 

<checking source>

 

Yep - I see this in asm.h:

#if !defined(Olaf) || Olaf
#define Olaf        1        /* Olaf Seibert's (KosmoSoft) Improvements */
#define OlafM        1        /* -M option */
#define OlafColon   1        /* Allow label:mne */
#define OlafDol     1        /* Allow 0$ labels */
#define OlafStar    1        /* Allow * for . */
#define OlafByte    1        /* Allow BYTE,etc for DC.B,etc */
#define OlafAsgn    1        /* Allow = for EQU */
#define OlafDotop   1        /* Allow .OP for OP */
#define OlafFreeFormat    0    /* Decide on looks of word if it is opcode */
#define OlafHashFormat    1    /* Decide on # and ^ if it is an opcode */
#define OlafIncbin  1        /* INCBIN operation */
#define OlafIncdir  1        /* INCDIR operation */
#define OlafPhase   1        /* silence phase errors sometimes */
#define OlafList    1        /* LIST ON/OFF */
#define OlafListAll 1        /* Option to list all passes, not just last */
#define OlafPasses  1        /* Option to specify max #passes */
#define OlafEnd     1        /* Implement END */
#define OlafDotAssign    1    /* Allow ". EQU expr" to change origin */
#endif

And in the source I see things like this:

#if OlafByte
    /* for byte, .byte, word, .word, long, .long */
    if (mne->name[0] != 'd') {
        static char tmp[4];
        strcpy(tmp, "x.x");
        tmp[2] = mne->name[0];
        findext(tmp);
    }
#endif

I know .byte works as I use it all the time, so OlafByte was defined when dasm was built.

  • Like 1
Link to comment
Share on other sites

Thanks Darrell,

 

I don't see that in my txt document though it does say copyright 1988. So Olaf isn't C# code then!

 

You tried to get me to read dasm.txt about 6 months ago but I abandoned it a third of the way through because it was making little sense to me. I finally made it through this time and did get something out of it now that I recognize some of it from what I've seen in .asm files. Still a lot of it is over my head but what else is new ;-)

 

Thanks again!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...