Extend your language: Difference between revisions
→{{header|6502 Assembly}}: Fixed a typo (not in the code)
Puppydrum64 (talk | contribs) |
Puppydrum64 (talk | contribs) (→{{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
<lang 6502asm>CMP_Double .macro ;NESASM3 syntax
|