Jump to content
IGNORED

sta.w HMP0,X


vdub_bobby

Recommended Posts

Does anybody know why sta.w HMP0,X doesn't work in Stella or z26? It doesn't write to HMP0,X at all.

 

On the other hand, sta $0120,X does work just fine...

 

EDIT: It appears to be a problem with DASM, not z26 or Stella. DASM turns sta.w HMP0,X into $8d $20 $00 which is really sta $0020

 

But dasm does turn sta $0120,X into $9d $20 $01, which will work.

 

I also couldn't force sta $0020,X to compile how I wanted, either.

 

I guess I should have read the docs a little better. :dunce:

Edited by vdub_bobby
Link to comment
Share on other sites

EDIT: It appears to be a problem with DASM, not z26 or Stella.  DASM turns sta.w HMP0,X into $8d $20 $00 which is really sta $0020

 

The .w forces DASM to use absolute (non-indexed) addressing mode, regardless of any indicated addressing mode indications to the contrary. I just add 256 or 8192 to the address and be done with it.

Link to comment
Share on other sites

Thank you!  I looked at the docs for dasm and I couldn't find anything.  Is it in the docs or should I be looking somewhere else?
EXTENSIONS:

   FORCE extensions are used to force an addressing mode.  In some cases,
   you can optimize the assembly to take fewer passes by telling it the
   addressing mode.  Force extensions are also used with DS,DC, and DV
   to determine the element size.  NOT ALL EXTENSIONS APPLY TO ALL
   PROCESSORS!

 example:    lda.z   charlie

 i   -implied
 ind -indirect word
 0   -implied
 0x  -implied indexing (0,x)
 0y  -implied indexing (0,y)
 b   -byte address
 bx  -byte address indexed x
 by  -byte address indexed y
 w   -word address
 wx  -word address indexed x
 wy  -word address indexed y
 l   -longword (4 bytes) (DS/DC/DV)
 r   -relative
 u   -uninitialized (SEG) 

  • Like 1
Link to comment
Share on other sites

EXTENSIONS:

   FORCE extensions are used to force an addressing mode.  In some cases,
   you can optimize the assembly to take fewer passes by telling it the
   addressing mode.  Force extensions are also used with DS,DC, and DV
   to determine the element size.  NOT ALL EXTENSIONS APPLY TO ALL
   PROCESSORS!

 example:    lda.z   charlie

 i   -implied
 ind -indirect word
 0   -implied
 0x  -implied indexing (0,x)
 0y  -implied indexing (0,y)
 b   -byte address
 bx  -byte address indexed x
 by  -byte address indexed y
 w   -word address
 wx  -word address indexed x
 wy  -word address indexed y
 l   -longword (4 bytes) (DS/DC/DV)
 r   -relative
 u   -uninitialized (SEG) 

905213[/snapback]

Again, thanks.

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...