3 ms·
I thought this was pretty clever: 00000001 <-- this line is both an instruction and data. 00000011 00000001 <-- this line is both data and an address.
by HanyouHottie 12y ago
I thought this was pretty clever:
00000001 <-- this line is both an instruction and data.
00000011
00000001 <-- this line is both data and an address.
00000011
00000111
00000000
11111101
A program that doesn't work if you move its location in memory is pretty hilarious.
- Danieru 12y agoYou may be interested in the story of Mel: http://www.pbm.com/~lindahl/mel.html http://www.pbm.com/~lindahl/mel.html
- userbinator 12y agoOverlapping code/data is a trick used in practice in highly size-constrained systems, like older game consoles (e.g. http://andrewkelley.me/post/jamulator.html#dirty-assembly-tricks http://andrewkelley.me/post/jamulator.html#dirty-assembly-tr... , discussed here at https://news.ycombinator.com/item?id=8405214 https://news.ycombinator.com/item?id=8405214 ) and in the tiniest categories of the demoscene.
- muyuu 12y agoThat was extremely common in 8-bit days. But then again it was commonplace to destroy userspace upon loading of programs and you finished your session by either resetting the computer or turning it off (1~2s boot times helped though).
- moron4hire 12y agoJust goes to show how good my reading comprehension is. I completely failed to realize that the subtract operation was operand B from operand A, not the other way around.