10 REM SAMPLE MS BASIC 2.0 PROGRAM
20 REM NETWORKING SIMULATOR
30 LET MR = 3
40 LET DP = 8080
50 GOSUB 200
60 GOSUB 300
70 GOSUB 400
80 END
100 REM LOG A MESSAGE
110 REM PARAMS: L$=LEVEL, M$=MESSAGE
200 PRINT "[" L$ "] " M$
210 RETURN
300 REM CONNECT TO SERVER
310 L$ = "INFO"
320 M$ = "CONNECTING"
330 GOSUB 200
340 FOR I = 1 TO MR
350 PRINT "RETRY " I
360 NEXT I
370 RETURN
400 REM DISCONNECT
410 L$ = "INFO"
420 M$ = "DISCONNECTING"
430 GOSUB 200
440 RETURN
