[puzzle] Escape
kuroneko
Posts: 3,623
Given the listed code fragment, you have 4 longs (code, no data) to execute the instructions at pick and exit. After executing exit the task is done so you can safely execute the cogstop. Further limitations:
- the red coloured instructions are read-only and can't be changed
- cnt's shadow register is read-only (add cnt, #n|reg & Co are therefore invalid)
- the blue instructions are an example, they are unknown to you for the purpose of this exercise
DAT org 0 escape [COLOR="Red"]cogid cnt[/COLOR] nop ' | [COLOR="DarkOrange"]nop[/COLOR] ' | [COLOR="DarkOrange"]nop[/COLOR] ' | [COLOR="DarkOrange"]nop[/COLOR] ' | your code here [COLOR="Red"]cogstop cnt[/COLOR] pick [COLOR="Blue"]mov par, #42[/COLOR] [COLOR="Red"]cogstop cnt[/COLOR] exit [COLOR="Blue"]wrlong par, par[/COLOR] [COLOR="Red"]cogstop cnt[/COLOR] fit
Comments
OR