I was wondering if there was a way to reliably cipher, encrypt, or hide a number in m68k (or assembly in general).
I.e: 01=09, 32=1F
Or something inconsistent like that.
Thanks!
Only way I can think without wasting any extra cycles, is abusing the fact that 68k address bus is only 24-bits (at least on some earliest models). You can indent random 8-bit integer after each longword address, e.g.
dc.l ($30<<24)|$FF1234.l
jsr ($EA<<24)|DisplayText
lea ($1F<<24)|MainPalette,a2
clr.b ($1F<<24)|$FF890D.l
This will not affect 68k processor at the slightest as the high 8 bits are ignored, but anyone trying to use IDA Pro for instance will go insane, as IDA Pro uses full 32-bits for addressing! This means it now can not find any referenced data, subroutine, or RAM address, as long as the high 8 bits aren't 0 or 0xFF (for ROM and RAM respectively). Of course anyone clever enough this is not much of a problem but it would require manual work a lot more.
Other forms of encryption you may try, is using Turing complete instruction sets, to reduce the instructions used, and have the program flow be harder to understand. However, it is likely to use more CPU time and ROM space, which may not be ideal. Nonetheless, I've made something with move only, if you wish to see.