Rybags #1 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 Share this post Link to post Share on other sites
MaPa #2 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 Share this post Link to post Share on other sites
Rybags #3 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 Share this post Link to post Share on other sites
Irgendwer #4 Posted June 22, 2012 ca65: sta a:$01 z: zeropage a: absolute f: far Quote Share this post Link to post Share on other sites
ivop #5 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 Share this post Link to post Share on other sites
falcon_ #6 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 Share this post Link to post Share on other sites
SeaGtGruff #7 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 Share this post Link to post Share on other sites