Extend your language: Difference between revisions

→‎{{header|6502 Assembly}}: Fixed a typo (not in the code)
(→‎{{header|6502 Assembly}}: Fixed a typo (not in the code))
Line 40:
Although new opcodes cannot be created, they can be combined in ways to re-create opcodes on other architectures. Expanding the language is typically accomplished with macros or, if the hardware allows, self-modifying code.
 
This is an (admittedly messy) implementation of the double-conditional branch. Unfortunately due to the nature of the processor each branch type needs its own macro. For brevity's sake only <code>BEQ</code> will be displayed here. The rest can be created with simplysimple copy-pasting and substitution.
 
<lang 6502asm>CMP_Double .macro ;NESASM3 syntax
1,489

edits