第 38 关,数位炸弹。指令集介绍请看:https://www.annhe.net/article-3828.html。
优化目标
30行165步
代码
43行156步
见 Github。
第一次pass 29行209步
next:
COPYFROM 9
COPYTO 0
COPYTO 1
INBOX
COPYTO 8
SUB 10
JUMPN ones
ADD 10
SUB 11
JUMPN tens
hundreds:
COPYFROM 8
SUB 11
JUMPN out0
COPYTO 8
BUMPUP 0
JUMP hundreds
out0:
COPYFROM 0
OUTBOX
tens:
COPYFROM 8
SUB 10
JUMPN out1
COPYTO 8
BUMPUP 1
JUMP tens
out1:
COPYFROM 1
OUTBOX
ones:
COPYFROM 8
OUTBOX
JUMP next
发表回复