x86 Assembly: Having hard time finding ideas for an infinite loop challenge

。_饼干妹妹 提交于 2020-01-04 07:27:05

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!