include f877_20 include jlib var byte a = 0, b = 0, c = 0, d = 0, e = 0 var bit carry = true procedure shift( byte in out x, byte in n ) is var byte save_carry = x >> n var bit new_carry at save_carry : 0 x = x << 1 if carry then x = x + 1 end if carry = new_carry end procedure port_a_direction = all_output port_b_direction = all_output port_c_direction = all_output port_d_direction = all_output port_e_direction = all_output forever loop shift( a, 5 ) shift( b, 7 ) shift( c, 7 ) shift( d, 7 ) shift( e, 2 ) port_a = ! a port_b = ! b port_c = ! c port_d = ! d port_e = ! e delay_100ms end loop