; SAMPLE_1.ASM file ; Anything after a semicolon (;) in a line is treated as a "comment" ; List of instructions: pwr 7, 2, 7 ; set power level to 7 for all motors dir 2, 7 ; set "forward" direction for all motors sent 0, 1 ; set type of Sensor_1 to "switch" (touch) senm 0, 1, 0 ; set mode of Sensor_1 to "boolean" (0 or 1) dir 2, 5 ; set "forward" direction for motors A,C out 2, 5 ; turn "on" motors A,C loop_1: chk 2, 1, 2, 9, 0, loop_2 ; "Sensor_1 value == 1"? dir 0, 5 ; if FALSE goto loop_2 out 2, 5 wait 2, 30 ; create 30 x 10 = 300 miliseconds delay dir 2, 1 out 2, 1 wait 2, 30 dir 2, 5 out 2, 5 loop_2: jmp loop_1 ; unconditional jump to "loop_1" label