START HALT REWIND ALERT QUERY PAUSE
LDI "10b" ;send GO command to the tape reader OUT 1 CHECKCTL: IN 0 ;read data ready bit from control port SUB "01"b ;compare to 01b JNZ CHECKCTL ;if not equal jump up to top of loop IN 2 ;read data byte on port 2 STD X ;store into main memory somewhere LDI "11"b ;get ready to write 1 into data accepted OUT 0 ;write to status port JMP CHECKCTL ;do it all over again