Shared publicly  - 
 
International Obfuscated C Code Contest
6
3
Peter da Silva's profile photoFrank Wales's profile photoHenrik Grubbström's profile photoPeter van der Linden's profile photo
3 comments
 
They could write them in assembly! Or Forth!
 
If the Forth inner interpreter is more than a few instructions long, there's something fundamentally broken about your CPU architecture.

1802 is the longest I can remember off the top of my head:

NXT:
LDA IP
PLO WP
LDA IP
PHI WP
LDA WP
PLO PC
LDA WP
PHI PC
SEP PC
JMP NXT

PDP-11 is the shortest I can think of:

MOV (IP)+,WP
JMP @(WP)+

On the recently describe DCPU for the game 0x10c I came up with a hack using the stack pointer for the interpreter pointer, and using X and Y as the Forth operand and return stacks, it was four instructions.
Add a comment...