第19关,计时器。指令介绍请看:https://www.annhe.net/article-3828.html。
Contents
优化目标
优化目标:10行82步
代码
14行79步
JUMP next
next0:
OUTBOX
next:
INBOX
JUMPZ next0
COPYTO 0
JUMPN neg
pos:
OUTBOX
BUMPDN 0
JUMPZ next0
JUMP pos
neg:
OUTBOX
BUMPUP 0
JUMPZ next0
JUMP neg
10行107步
next:
INBOX
COPYTO 0
JUMP out
neg:
BUMPUP 0
out:
OUTBOX
timer:
COPYFROM 0
JUMPN neg
JUMPZ next
pos:
BUMPDN 0
JUMP out
10行87步
-- HUMAN RESOURCE MACHINE PROGRAM --
a:
INBOX
COPYTO 0
b:
JUMPN d
c:
OUTBOX
BUMPDN 0
JUMPN a
JUMP c
d:
OUTBOX
BUMPUP 0
JUMP b