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