MGR10 A/B/C - Revision : I (for 7.0 software revision)
96
ON KEY(4) GOSUB 110
ON KEY(5) GOSUB 110
ON KEY(6) GOSUB 110
ON KEY(7) GOSUB command
ON KEY(8) GOSUB sort
KEY(1) ON: KEY(2) ON: KEY(3) ON: KEY(4) ON: KEY(5) ON
KEY(5) ON: KEY(6) ON: KEY(7) ON: KEY(8) ON: KEY ON
110 GOTO 110
'-----------------------------------------------------------------------------
sort:
fin = 1
A$ = "SYSTem:local": GOSUB envoi
END
RETURN
'-----------------------------------------------------------------------------
'envoi d'un message sur la liaison RS232C
' A$ contient le code a envoyer
'
envoi:
PRINT #1, A$
RETURN
'-----------------------------------------------------------------------------
'traitement des interruptions RS232C
INTERUPTIONRS:
COM(port%) OFF: nochr = 0
char$ = INPUT$(1, #1)
LINE INPUT #1, msg$
msg$ = char$ + msg$
char$ = INPUT$(1, #1)
eom = 1
COM(port%) ON
RETURN
'-----------------------------------------------------------------------------
'traitement des SRQ
ATTENTESRQ:
WHILE srq = 0: WEND: srq = 0
RETURN
'-----------------------------------------------------------------------------
'traitement attente message
ATTENTEMSG:
WHILE eom = 0: WEND
eom = 0
RETURN
ATTENTEXON:
RETURN
'-----------------------------------------------------------------------------
TEMP:
t = TIMER
WHILE t <> 0: t2 = TIMER: IF t2 - t >= tempo THEN t = 0
WEND
RETURN
'-----------------------------------------------------------------------------
command:
CLS
COM(port%) ON
PRINT "Entrer les codes … envoyer au MGR10 (RETURN pour sortir)"
LOOP1:
PRINT "A$="; : LINE INPUT A$
IF LEN(A$) = 0 THEN GOTO SORTIE ELSE GOSUB envoi
IF RIGHT$(A$, 1) = "?" THEN