Disassembly
Jump to navigation
Jump to search
Disassembly Disassembly is a theoretical esolang created by user:RainbowDash Disassembly is an Anti-humor coding language, the whole point of it, is that each instruction is the exact opposite of a similar sounding assembly instruction. Whenever Disassembly code is ran, it outputs a disassembled C++ file in which the code can actually run in C++.
Important to note
- The memory address $ff holds the ascii code of the most recent key press from the user.
- Some instructions do not have opposites, so they are not included.
Instruction set
Here are the instructions of Disassembly , along with the original instructions.
The instruction is the | Opposite of |
---|---|
INC | DEC |
DEC | INC |
ROR | ROL |
ROL | ROR |
COMEFROM | JMP |
REPEAT | HALT |
BEQ | BNE |
BNE | BEQ |
REM | EXEC |
STA | LDA |
LDA | STA |
CMP | * |
(Please note this isn't a full instruction set, and this might not ever get finished)
Example code
Truth Machine
The accumulator must be set before the program is ran Input:
start: 10 LDA #$01 20 CMP #$01 30 BEQ start ; If accumulator is 1, jump back to start
Output:
#include <iostream> int ACC = 0; int main() { ACC = 1; while (true) { if (ACC == 1) continue; else break; } return 0; }