问题
I'm going to intend a competition similar to "corewars" with my friends (We are using the same memory grid as the original game)
In the game each one of us supposes to write a "safe" which is an infinite loop that is not longer then 25 lines. each "safe" has a trick or a code that can stop the loop, hence breaking the "safe". for example:
;Safe
safe:
mov ax, [1000]
cmp ax, 9999
jne safe
This safe can be broken if we pass the correct code (9999) to the [1000], which will break the safe:
;Breaker
mov ax, 9999
mov [1000], ax
breaker: jmp breaker
I was thinking about making some sort of a mathematical equation, and then use it's result as the code for the safe, but I don't have any good ideas which are both short and interesting.
I'm not sure if this question is relevant to this stack site, so if it isn't I would like to know the better stack site for this kind of problem.
Thanks!
来源:https://stackoverflow.com/questions/59319979/x86-assembly-having-hard-time-finding-ideas-for-an-infinite-loop-challenge