From: Marcus Rowe Date: Mon, 19 Oct 2015 23:30:25 +0000 (+1000) Subject: Added .asize and .isize pseudo variables X-Git-Tag: V2.16~208^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=67cd0c219726b8d6ef5fc5e980cc197fbfb257d7;p=cc65 Added .asize and .isize pseudo variables These pseudo variables will return the size of the accumulator/index in bits. For the 65816 instruction set .ASIZE/.ISIZE will return either 8 or 16, depending on the current size of the operand in immediate addressing mode. For all other CPU instruction sets, .ASIZE/.ISIZE will always return 8. For example: ; Reverse Subtract with Accumulator ; A = memory - A .macro rsb param .if .asize = 8 eor #$ff .else eor #$ffff .endif sec adc param .endmacro --- diff --git a/doc/ca65.sgml b/doc/ca65.sgml index 19c09b85d..278a81d1b 100644 --- a/doc/ca65.sgml +++ b/doc/ca65.sgml @@ -1191,6 +1191,35 @@ writable. assignments to / instead. +.ASIZE