BigDumbDinosaur wrote:
Chromatix wrote:
It would indeed be logical to assemble "BRK #0" as 00 00, and some assemblers accept that syntax, but that's not what was specified here. This difference from standard assembler behaviour could indeed be considered a bug.
In the case of the Kowalski assembler, it's not a bug. It's a design feature that gives the programmer the option to have any signature byte assembled after a
BRK instruction. The default if this feature is enabled is to assemble
$EA (
NOP) as the signature byte. If this feature is disabled, only
$00 will be assembled for a
BRK instruction.
Except that that's demonstrably *not* what happens here, and it makes it *more* difficult to assemble an arbitrary desired trailing byte.
The code given was
Code:
BRK NOP NOP
and it assembled to
Code:
00 00 EA EA
According to your description, it should have assembled to
Code:
00 EA EA EA
According to every other assembler I know about, it would become
Code:
00 EA EA
I have no problem with
Code:
BRK #0
being assembled as
Code:
00 00
.
instruction and the signature byte option enabled. The code assembled was
.