Rybags Posted June 22, 2012 Share Posted June 22, 2012 Do any of our commonly used PC-based Assemblers allow forcing absolute (2 byte) addressing mode rather than zero page for selected instructions? e.g. lda label2 where label2 = $80 will assemble using the zero page LDA opcode. I know that the Atari Assembler Editor cart does it all the time but I don't want to use it and I want to control if/when the non default mode is used. Logically the usage might be: lda.w label2 I had the idea of maybe just make macros to cover all possibilities but it'd probably be easier if the assembler could take care of it. Especially when you have stuff like inc label2,x Quote Link to comment Share on other sites More sharing options...
MaPa Posted June 22, 2012 Share Posted June 22, 2012 (edited) From XASM manual: You can explicitly specify absolute (a:) and zero-page (z:) addressing modes. Examples: nop asl @ lda >$1234 assembles to lda #$12 lda $100,x lda 0 zero-page (8-bit address) lda a:0 absolute (16-bit address) jmp ($0a) lda ($80),y Edited June 22, 2012 by MaPa Quote Link to comment Share on other sites More sharing options...
Rybags Posted June 22, 2012 Author Share Posted June 22, 2012 Thanks Mapa. Since MADS is sort of descended from Xasm, I tried it there. Seems you can do it with: lda.a or lda.w Quote Link to comment Share on other sites More sharing options...
Irgendwer Posted June 22, 2012 Share Posted June 22, 2012 ca65: sta a:$01 z: zeropage a: absolute f: far Quote Link to comment Share on other sites More sharing options...
ivop Posted June 22, 2012 Share Posted June 22, 2012 Although not commonly used, my shasm65 assembler explicitely uses different mnemonics for absolute and zero page addressing. # absolute: lda 1 inc 1 # zero page: lda.z 1 inc.z 1 # immediate lda. 1 Quote Link to comment Share on other sites More sharing options...
falcon_ Posted October 24, 2012 Share Posted October 24, 2012 (edited) what about simply using: lda $00ff instead? lda $ff will definitely assemble to zp. wouldn't that do it?? &falcon Edited October 24, 2012 by falcon_ Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted October 24, 2012 Share Posted October 24, 2012 what about simply using: lda $00ff instead? lda $ff will definitely assemble to zp. wouldn't that do it?? &falcon I should think so, but it wouldn't help if you're using labels: address = $80 lda address 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.