30 lines
278 B
Text
30 lines
278 B
Text
|
INP
|
||
|
STA toGuess
|
||
|
|
||
|
loop INP
|
||
|
STA guess
|
||
|
|
||
|
LDA toGuess
|
||
|
SUB guess
|
||
|
|
||
|
BRZ equal
|
||
|
BRP small
|
||
|
BRA big
|
||
|
|
||
|
small LDA higher
|
||
|
OUT
|
||
|
BRA loop
|
||
|
|
||
|
big LDA lower
|
||
|
OUT
|
||
|
BRA loop
|
||
|
|
||
|
equal LDA win
|
||
|
OUT
|
||
|
HLT
|
||
|
|
||
|
toGuess DAT
|
||
|
guess DAT
|
||
|
higher DAT 1
|
||
|
lower DAT 0
|
||
|
win DAT 9
|