.Program SHOWM1
C ----------------------------------------
C ????? ??????? ??? ??-01 ? ???
C ----------------------------------------
C ?????? ???????:
C 1 GO.HOME - ??? ? ?????? ?????????
C 2 TAKE.P - ????? ????
C 3 PUT.P - ???????? ????
C 4 TAKE.G - ????? ????
C 5 PUT.G - ???????? ???? ? ????
C
C ??????????
CALL INIT
C ????
RETURN
C ------
C
PRINT 'Robot is ready'
C
10 PRINT '$'
C <==> ??? - ???????? ???????
CALL SWITCH.
JUMP 101
JUMP 10
C 1 ??????
CALL GO.HOME
JUMP 101
JUMP 10
C 2 ??????
CALL TAKE.P
JUMP 101
JUMP 10
C 3 ??????
CALL PUT.P
JUMP 101
JUMP 10
C 4 ??????
CALL TAKE.G
JUMP 101
JUMP 10
C 5 ??????
CALL PUT.G
JUMP 101
JUMP 10
C 6 ?????? - ??? ?? ?????
RETURN
C ------
C
101 CALL ERROR.
JUMP 10
.End
C
C
C ????? ???????
C
C
.Program GO.HOME
C --------------------------
C 1 ??? ? ?????? ?????????
C --------------------------
C ?????? ???
C
GO #HOME
C ==> ???
SET MARKER. = NULL.
CALL TRANSC.
JUMP 101
C
RETURN 1
C ????
101 RETURN
.End
.Program TAKE.P
C ------------
C 2 ????? ????
C ------------
C ??????:
C PAR1. - ????? ????? ???? (1,2,3)
C
IF PAR1. = 1 THEN JUMP 10
IF PAR1. = 2 THEN JUMP 20
IF PAR1. = 3 THEN JUMP 30
C ???? ? ??????
SET ERRORW. = ER1
JUMP 102
C ?????? 1
10 LOCATE #P1 = #P1.1
LOCATE #P2 = #P2.1
JUMP 50
C ?????? 2
20 LOCATE #P1 = #P1.2
LOCATE #P2 = #P2.2
JUMP 50
C ?????? 3
30 LOCATE #P1 = #P1.3
LOCATE #P2 = #P2.3
JUMP 50
C ????? ????
50 GO #P1
OPEN
SPEED NEXT 50
GOS #P2
CLOSE
SPEED NEXT 50
GOS #P1
C ==> ???
100 SET MARKER. = NULL.
CALL TRANSC.
JUMP 101
C
RETURN 1
C --------
C ==> ???
102 SET MARKER. = ERRORW.
CALL TRANSC.
JUMP 101
C ????
101 RETURN
.End
.Program PUT.P
C ---------------
C 3 ???????? ????
C ---------------
C ?????? ???
C
GO #W1
C
SPEED NEXT 50
GOS #W2
OPEN
SPEED NEXT 50
GOS #W1
C
100 SET MARKER. = NULL.
CALL TRANSC.
JUMP 101
C
RETURN 1
C --------
C ????
101 RETURN
.End
.Program TAKE.G
C ------------
C 4 ????? ????
C ------------
C ??????:
C PAR1. - ????? ????? ???? (1,2,3)
C
IF PAR1. = 1 THEN JUMP 10
IF PAR1. = 2 THEN JUMP 20
IF PAR1. = 3 THEN JUMP 30
C ???? ? ??????
SET ERRORW. = ER1
JUMP 102
C ?????? 1
10 LOCATE #G = #G.1
JUMP 50
C ?????? 2
20 LOCATE #G = #G.2
JUMP 50
C ?????? 3
30 LOCATE #G = #G.3
JUMP 50
C ????? ????
50 GONEAR #G, 50
OPEN
SPEED NEXT 50
GOS #G
CLOSE
SPEED NEXT 50
GOSNEAR #G, 50
C ==> ???
100 SET MARKER. = NULL.
CALL TRANSC.
JUMP 101
C
RETURN 1
C --------
C ==> ???
102 SET MARKER. = ERRORW.
CALL TRANSC.
JUMP 101
C ????
101 RETURN
.End
.Program PUT.G
C ---------------
C 5 ???????? ????
C ---------------
C ?????? ???
C
GONEAR #GW, 50
C
SPEED NEXT 50
GOS #GW
OPEN
SPEED NEXT 50
GOSNEAR #GW, 50
C
100 SET MARKER. = NULL.
CALL TRANSC.
JUMP 101
C
RETURN 1
C --------
C ????
101 RETURN
.End
.Program INIT
C -------------
C ??????????
C -------------
C
C ?????????? ??????????? ????
CALL INID2.
C
SPEED% 100
ODELAY 1
CDELAY 1
TOOL
C
C ***** ???? *****
C ?????? ??????
SET ER1 = 50
C
C ***** ??????? *****
C
C ??? ??????
SET MAX.FR. = 6
C
C ===== ????? ?????? ????? ????? =====
C
IF START <> 0 THEN JUMP 99
C ???????? ????? (START=0)
SET START = 1
C ==> ???
100 SET MARKER. = NULL.
CALL TRANSC.
JUMP 101
C
99 RETURN 1
101 RETURN
C ------
.End





Чтобы не видеть здесь видео-рекламу достаточно стать зарегистрированным пользователем.
Чтобы не видеть никакую рекламу на сайте, нужно стать VIP-пользователем.
Это можно сделать совершенно бесплатно. Читайте подробности тут.