vdub_bobby Posted August 3, 2005 Share Posted August 3, 2005 (edited) 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. Edited August 3, 2005 by vdub_bobby Quote Link to comment Share on other sites More sharing options...
supercat Posted August 3, 2005 Share Posted August 3, 2005 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. Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted August 4, 2005 Share Posted August 4, 2005 sta.wx HMP0,x Quote Link to comment Share on other sites More sharing options...
vdub_bobby Posted August 5, 2005 Author Share Posted August 5, 2005 sta.wx HMP0,x 904279[/snapback] 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? Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted August 5, 2005 Share Posted August 5, 2005 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) 1 Quote Link to comment Share on other sites More sharing options...
vdub_bobby Posted August 5, 2005 Author Share Posted August 5, 2005 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.