Since I expect that the CATS membership may be interested in the network setup for the Pascal workshop that we had in June and continued in August, I will mention a few pertinent items here. At a later date, I may be able to write an article on the ins and outs of QL networking (I still need to fill in some holes in how Tebby’s commands work).
At the meeting we had seven QL’s involved and the presentation part of the networking worked fine! First, 2X2 slides (photographed from an RGB monitor) were projected on the screen, and each of the first three slides were also presented on each screen in the network by using the broadcast feature of QDOS/FSERVE. Then, after some more explanation, and more projected slides, we went through some Pascal programming excercises. Each station ew’d the “screen editor” from n1_flp1_ and then loaded the source code from flp2_num_<filename> (num equalled the station number, TWO, THREE, etc.). To assist the users the <filename> was messaged into a scr at the top of each monitor. This scr was above the Pascal program screens so it was visible to the programmer. The programmer then edited the code, saved it to his directory on flp2_, and later compiled his effort, and linked and ran it. All of this was accomplished with SUPERBASIC programs that made most of the operation transparent to the users.
The Pascal compiler used required a ROM in the QL for it to work. Since effective networking also requires the TOOLKIT in ROM somewhere, this meant each QL that was to use the compiler needed both. The only QL’s that we have with such capability are ones with TRUMP cards.
We managed to make this network work – but it did not go quite as I hoped. The parts of SUPERBASIC programs below show how it worked. Below that is the discussion of the problems, which were not extreme. Check with the TOOLKIT manual; Quantum Levels, 6/88; and QL World, 7/89, pp. 22-25 for a full understanding of the comments in the programs below.
OK, here are the Superbasic programs that set-up the network.
First, the station boot program (one for each network station on an mdv):
90 MODE 8:clr
100 AT 1,1:PRINT 'Booting'
105 TK2_EXT
110 station$='THREE_':nr=3:[REM this defines the net no., 2, 3, etc.]
120 initialize nr:[REM see the DEF PROC initialize.]
220 AT #2, 5,5:PRINT #2,'This is net no.: ';nr
250 clr:[REM clr blanks the whole screen]
260 LRUN neti_0_20: [This is the broadcasting command. This TK2 command sets up the station to receive a broadcast. At this point the QL just sits and waits, no cursor, just waits. In this case a program was broadcast from n1_flp1_ and as soon as that happened the program ran on each station. The program displayed the desired slide. The "_20" is needed to prevent neti_ from robbing all of the QL's memory for the buffer.]
270 STOP
280 :
290 DEFine PROCedure clr
300 OPEN #9,con_512x256a0x0
310 CLS #9:CLOSE #9
320 END DEFine clr
640 :
650 DEFine PROCedure initialize(nr):[REM PROC. to define this workstation.
660 NET nr
670 FSERVE
680 NFS_USE 'flp','n1_flp1_','n1_flp2_'&station$
690 clr
700 WINDOW 345,230,144,8:PAPER 1:STRIP 1
710 END DEFine initialize
720 :
The boot/utility program on n1_, the fileserver, should explain the rest of the operation.
100 CSIZE #2,2,1:PRINT #2,"PASCAL"\"PROGRAM"\"DISK"\"BOOTING" : CSIZE #2,0,0
110 TK2_EXT
120 NET 1
130 FSERVE
140 keys:[REM A proc. to set up some ALT keys for the slides.]
145 DIM excer$(7,60)
147 setnm:[REM See line 890.]
148 STOP
160 clr:PRINT 'Ready!'
720 :
730 DEFine PROCedure clr
740 OPEN #9, con_512x256a0x0
750 CLS #9: CLOSE #9
760 END DEFine clr
770 :
780 DEFine PROCedure keys:[REM This is what does the broadcasting. Each slide program will run on any station the is waiting with "neti_0_20"]
790 ALTKEY '1','copy flp1_slide1 to neto_0',"
800 ALTKEY '2','copy flp1_slide2 to neto_0',"
810 ALTKEY '3','copy flp1_slide3 to neto_0',"
820 ALTKEY '4','copy flp1_end to neto_0',"
830 END DEFine keys
880:
890 DEFine PROCedure setnm:[REM This sets up a list of messages to be sent to guide the user.]
900 RESTORE 940
910 FOR i=1 TO 7:READ excer$(i)
940 DATA 'n1_flp2_num_grid_pas','n1_flp2_num_vargrid_pas','n1_flp2_num_turn1_pas','n1_flp2_num_turn2_pas'
950 DATA 'n1_flp2_num_ticarray1_pas','n1_flp2_num_getsquare_pas','n1_-flp2_num_tictac_pas'
960 END DEFine setnm
970 :[REM Below, "pg", is the messaging procedure. It sends a short message to each station. I needed to set this up for only those stations that were attached. Line 1070 was edited to indicate the stations attached. Look at loop in 990, if z was replaced by i -land- if, say station 3, was out. The messaging would stop, a "Network aborted" message would appear on n1_, and stations 4-7 would get no message. I could not find a way to trap, with WHEN/ERROR, the "Network aborted" "error", so that the loop would continue.]
980 DEFine PROCedure pg(k)
985 RESTORE 1070
990 FOR i=2 TO 7:REM the limit would have to be increased for more QL's.
1000 READ z
1010 IF z > 0 THEN
1020 OPEN #7,'n'&z&'_scr_300x10a100x0'
1025 PRINT #7,' '
1030 PRINT #7,excer$(k)
1040 CLOSE #7
1050 END IF
1060 END FOR i
1070 DATA 2,3,0,0,0,0:[REM Defines only stations 2 & 3, as shown.]
1080 END DEFine pg
1090 :
A slide program would be as follows:
100 REMark Program to make slides for Pascal talk.
110 MODE 8
120 WINDOW 345,230,144,8:PAPER 1:STRIP 1
125 clr
130 slide1:[REM This prints the display to the screen.]
140 LRUN neti_0_20:[REM This command sets up the QL to receive the next item broadcast, and will prevent any keyboard input until it is received.]]
1000 REM DEFine PROCedure clr is the same as other programs.
1070 :
1080 DEFine PROCedure slide1
1085 CLS
1090 AT 1,10:INK 7:CSIZE 2,1
1100 PRINT "Pascal"\" A Computer Programming"\" Language"\\
1110 CSIZE 0,0:INK 3:PRINT ' ";:REM In this sample, only two print lines are shown.
1200 END DEFine slide1
1210 :
Note line 140, this command sets the QL to receive the broadcast, that is, it catches the next slide. Finally, an “end” program (i. e., “LOAD mdv1_boot”) returned the station to the user by loading, but not running, the boot program. Two problems developed. First, the NFS_USE command did not work as written in the “initialize” PROCEDURE in the station boot program (line 680) when the TRUMP cards were attached. The QL accepted the command, but the device accesses are not redirected as NFS_USE. We did some more checking of this problem at the August meeting workshop and our checking confirmed that the TRUMP card is somehow the problem; the command did work between two machines -lnot- equipped with TRUMP cards. According to the QL World article, the usual use of NFS_USE -ldoes work- with the TRUMP card, that is: “NFS_USE,flp,n1_flp1_,n1_flp2_THREE_” should make any reference to flp1_ to look to “n1_flp1_” and any reference to flp2_ look to the directory “n1_flp2_THREE_”. Our problem may be that a TRUMP card must be on the file-server machine – we need to try that in September.
The second problem was caused by first. We had to use full file-names for loading the sample exercises into the Pascal screen editor, e. g.: “n1_flp2_THREE_vargrid_pas” Because the Pascal editor, compiler, & linker allow file names of only 22 characters, I had to quickly shorten the excercise names “on-the-fly”.
I made changes to these boot programs to correct some of the problems and used them at the August workshop. For the next worshop I plan to use Computer One Pascal – this will make things easier yet.
DON’T FORGET
Bring your QLs to the meeting
For an equipment list see page 3