-n is accepted by CassoCli in as65 mode and does nothing. It is parsed, stored
in disableOpt, copied into AssemblerOptions, and read by no code.
In real as65 it is not a no-op:
-n — "Disable optimizations. When this option is specified no
optimizations will be done, even when the OPT pseudo-instruction is used."
Source: as65 1.42 manual, https://raw.githubusercontent.com/Ludoclt/as65_142/master/as65.man
So it has to override OPT, not merely skip a default.
The optimization it has to disable
Operand mode selection picks zero page when the address fits — AssemblySession.cpp,
the expr candidate list, "a branch target, a jump target, then zero page if it
fits". Nothing there consults disableOpt.
Measured on the built binary:
|
bytes |
without -n |
A5 10 60 — zero page |
with -n |
A5 10 60 — identical |
Acceptance
-n suppresses the zero-page selection, so LDA $0010 assembles to AD 10 00.
- It does so even where
OPT asks for optimization.
- Covered by a test that fails when the behavior is removed.
-i needed no work and has been closed out
This issue used to cover -i as well. It does not any more, because the
behavior as65 documents was already unconditional here.
-i — "Ignore case in opcodes. In this way, the assembler does not
differentiate between adc and ADC, for example. Labels are still case
sensitive."
Measured with no flags given at all: lda #$42, LDA #$42 and Lda #$42
assemble to identical bytes, and a label defined Foo and referenced FOO is
an undefined symbol with or without -i. That is exactly the asymmetry as65
specifies, so -i is a no-op because the requested behavior is already the
default — not because it is missing.
Done on 020-disk-file-access:
- The help said "not implemented" and now reads
Case-insensitive opcodes. Already the default; accepted as a no-op.
ignoreOpcodeCase is deleted. Nothing read it and nothing could; a stored
true in two structs invited somebody to build a conditional case-folding the
assembler does not need. -i is still accepted and still concatenates.
AssemblerTests pins the opcode behavior against the assembler, so the help
and the code cannot drift apart on it.
Also closed out since this was filed
caseSensitive rename. The field was renamed to ignoreOpcodeCase and has
now been removed entirely.
--cpu removed in favor of as65's -x. Done on 020-disk-file-access.
This has a known cost on spec 019, which pins --cpu in as65 mode with its
own tests and refuses --cpu by name on its Merlin path; whoever merges the two
branches owns retargeting those at -x.
- Exit code 4. Now documented in the assembler's exit-code list as as65's
out-of-memory status, which this tool never returns.
-nis accepted by CassoCli in as65 mode and does nothing. It is parsed, storedin
disableOpt, copied intoAssemblerOptions, and read by no code.In real as65 it is not a no-op:
Source: as65 1.42 manual, https://raw.githubusercontent.com/Ludoclt/as65_142/master/as65.man
So it has to override
OPT, not merely skip a default.The optimization it has to disable
Operand mode selection picks zero page when the address fits —
AssemblySession.cpp,the
exprcandidate list, "a branch target, a jump target, then zero page if itfits". Nothing there consults
disableOpt.Measured on the built binary:
-nA5 10 60— zero page-nA5 10 60— identicalAcceptance
-nsuppresses the zero-page selection, soLDA $0010assembles toAD 10 00.OPTasks for optimization.-ineeded no work and has been closed outThis issue used to cover
-ias well. It does not any more, because thebehavior as65 documents was already unconditional here.
Measured with no flags given at all:
lda #$42,LDA #$42andLda #$42assemble to identical bytes, and a label defined
Fooand referencedFOOisan undefined symbol with or without
-i. That is exactly the asymmetry as65specifies, so
-iis a no-op because the requested behavior is already thedefault — not because it is missing.
Done on
020-disk-file-access:Case-insensitive opcodes. Already the default; accepted as a no-op.ignoreOpcodeCaseis deleted. Nothing read it and nothing could; a storedtruein two structs invited somebody to build a conditional case-folding theassembler does not need.
-iis still accepted and still concatenates.AssemblerTestspins the opcode behavior against the assembler, so the helpand the code cannot drift apart on it.
Also closed out since this was filed
caseSensitiverename. The field was renamed toignoreOpcodeCaseand hasnow been removed entirely.
--cpuremoved in favor of as65's-x. Done on020-disk-file-access.This has a known cost on spec 019, which pins
--cpuin as65 mode with itsown tests and refuses
--cpuby name on its Merlin path; whoever merges the twobranches owns retargeting those at
-x.out-of-memory status, which this tool never returns.