1 REM Ins{nd av Lars Davidsson <7020> 1986-09-28 19.39.44 (SEND)
1000 ! SAVE DR1:MULTUSER
1010 !
1020 ! Program MULTUSER.BAC version 1.0 1986-09-07
1030 !
1040 ! Konstrukt|rer : Lars Davidsson och Tomas Enblom
1050 ! P}b|rjat : 1986-09-07
1060 ! Senaste {ndring : 1986-09-28
1070 !
1080 ! Programmet laddar ned rutiner f|r multiuser.
1090 !
1100 EXTEND : INTEGER
1110 !
1120 POKE 64512,PEEK(65413),PEEK(65414)
1130 !
1140 Bottom%=32768%+1024%
1150 Multini%=63232%
1160 Path$="" ! Biblioteks pekare till multiuser programmen.
1170 !
1180 IF PEEK2(65292%)<>Bottom% AND PEEK2(65328%)<>Bottom% THEN PRINT "MSTART.BAC m}ste k|ras innan MULTUSER.BAC laddas in !" : STOP
1190 !
1200 Speed$=" 75 110 300 600 1200 2400 4800 9600 19200 38400"
1210 Parity$=" Ingen J{mn Udda"
1220 Dbits$=" 7 8"
1230 Sbits$=" 1 1/2 2"
1240 Deftspeed$="19200" : Defrspeed$=Deftspeed$
1250 Defparity$="Ingen"
1260 Defdbits$="8"
1270 Defsbits$="1"
1280 !
1290 ! Initierings data f|r hastigheterna.
1300 !
1310 DATA 7,156
1320 DATA 7,107
1330 DATA 7,39
1340 DATA 87,156
1350 DATA 87,78
1360 DATA 87,39
1370 DATA 87,20
1380 DATA 87,10
1390 DATA 87,5
1400 DATA 87,2
1410 !
1420 ! Initierings data f|r paritet.
1430 !
1440 DATA 0
1450 DATA 3
1460 DATA 1
1470 !
1480 ! Initierings data f|r antalet databitar.
1490 !
1500 DATA 128,64
1510 DATA 192,96
1520 !
1530 ! Initierings data f|r antalet stopbitar.
1540 !
1550 DATA 4
1560 DATA 8
1570 DATA 12
1580 !
1590 PRINT CHR$(12%)+STRING$(80%,ASCII('_')) : PRINT
1600 PRINT "Multiuser till ABC800 version 1.0 (c) Anemone Software 1986-09-07" : PRINT
1610 PRINT "S{tt nya kommunikations parametrar f|r remote (J/N) ? "; : Svar$=FNInput$(8%)
1620 IF (ASCII(Svar$) AND 95%)=ASCII('J') THEN PRINT : PRINT : GOTO 1660
1630 OPEN Path$+"REMOSET.TXT" AS FILE 1% : INPUT #1%,Tcword%,Ttcdword%,Rcword%,Rtcdword%,Parity%,Rdbits%,Tdbits%,Sbits% : CLOSE
1640 GOTO 1800
1650 !
1660 ON (INSTR(1%,Speed$,FNAsk$("S{ndnings hastighet",Deftspeed$))-1%)/8%+1% RESTORE 1310,1320,1330,1340,1350,1360,1370,1380,1390,1400
1670 READ Tcword%,Ttcdword%
1680 ON (INSTR(1%,Speed$,FNAsk$("Mottagnings hastighet",Defrspeed$))-1%)/8%+1% RESTORE 1310,1320,1330,1340,1350,1360,1370,1380,1390,1400
1690 READ Rcword%,Rtcdword%
1700 ON (INSTR(1%,Parity$,FNAsk$("Paritet",Defparity$))-1%)/8%+1% RESTORE 1440,1450,1460
1710 READ Parity%
1720 ON (INSTR(1%,Dbits$,FNAsk$("Antal databitar",Defdbits$))-1%)/8%+1% RESTORE 1500,1510
1730 READ Rdbits%,Tdbits%
1740 ON (INSTR(1%,Sbits$,FNAsk$("Antal stopbitar",Defsbits$))-1%)/8%+1% RESTORE 1550,1560,1570
1750 READ Sbits%
1760 !
1770 PREPARE Path$+"REMOSET.TXT" AS FILE 1%
1780 PRINT #1%,Tcword% "," Ttcdword% "," Rcword% "," Rtcdword% "," Parity% "," Rdbits% "," Tdbits% "," Sbits% : CLOSE
1790 !
1800 Para$=CHR$(67%,49%,67%,4%,67%,2%,67%,192%)
1810 Para$=Para$+CHR$(65%,52%,65%,64%+Sbits%+Parity%,65%,1%,65%,24%,65%,3%,65%,1%+Rdbits%,65%,5%,65%,128%+2%+8%+Tdbits%)
1820 Para$=Para$+CHR$(96%,Tcword%,96%,Ttcdword%)
1830 Para$=Para$+CHR$(97%,Rcword%,97%,Rtcdword%)
1840 Para$=Para$+CHR$(0%)
1850 !
1860 POKE 65413%,0%,0% : GOSUB 2610 : Z%=CALL(Multini%,VARPTR(Para$))
1870 !
1880 IF PEEK(32768%)=0% THEN GOSUB 1990
1890 !
1900 CHAIN Path$+"MULTLOG"
1910 !
1920 DEF FNAsk$(Asktxt$,Defvalue$)
1930 PRINT Asktxt$+SPACE$(32%-LEN(Asktxt$)-LEN(Defvalue$))+"<"+Defvalue$+"> : ";
1940 INPUT LINE Svar$ : Svar$=LEFT$(Svar$,LEN(Svar$)-2%)
1950 IF Svar$="" THEN Svar$=Defvalue$ : PRINT Svar$ ELSE PRINT
1960 RETURN SPACE$(8%-LEN(Svar$))+Svar$
1970 FNEND
1980 !
1990 PRINT CHR$(12%)+STRING$(80%,ASCII('_'))
2000 PRINT "Multiuser till ABC800 version 1.0 (c) Anemone Software 1986-09-07" : PRINT
2010 PRINT " (1) - VT52 (2) - VT100 (3) - VT220 (4) - VT240"
2020 PRINT " (5) - ADM3A (6) - ABC800"
2030 PRINT
2040 PRINT " (0) - Ingen av ovanst}ende"
2050 Option$=""
2060 WHILE INSTR(1%," 0 1 2 3 4 5 6 "," "+CHR$(ASCII(Option$))+" ")=0%
2070 PRINT : PRINT "Ange vilken terminal du har : "; : Option$=FNInput$(8%)
2080 WEND
2090 ON INSTR(1%,"0123456",CHR$(ASCII(Option$))) GOSUB 2570,2260,2340,2340,2340,2430,2500
2100 RETURN
2110 !
2120 DEF FNInput$(M%)
2130 S$="" : GET C$
2140 WHILE C$<>CHR$(13%)
2150 L%=LEN(S$)
2160 IF C$=CHR$(8%) AND L% THEN S$=LEFT$(S$,LEN(S$)-1%) : PUT CHR$(8%,32%,8%)
2170 IF C$=CHR$(24%) AND L% THEN FOR I%=1% TO L% : PUT CHR$(8%,32%,8%) : NEXT I% : S$=""
2180 IF C$>=" " AND C$<="" AND L%