1000 '>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<< 1010 '>>> SETSIO.BAS - ein Utility zum Ein- <<< 1020 '>>> stellen der SIO-Parameter. <<< 1030 '>>> Programmiersprache: Mallard-Basic <<< 1040 '>>> System: JOYCE (PCW 8256/8512) <<< 1050 '>>> CP/M-Version: CP/M 3 V. 1.4 <<< 1060 '>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<< 1200 GOSUB 1830:'Maschinenprogramm initialisieren 1210 IF NOT sio.flag GOTO 1690 1220 '>>>>>>>>>>>>Parameter-Eingabe<<<<<<<<<<<<<<< 1230 WIDTH 255:PRINT cls$FNat$(10,1); 1240 PRINT"Parameter-Einstellung f}r die serielle Schnittstelle:" 1250 RESTORE 1720:c=1:para$="" 1260 READ a:WHILE a:READ b,a$ 1270 PRINT FNat$(10,b)a$ 1280 FOR i=1 TO a 1290 READ var$(i):PRINT FNat$(10,i+b)i" = "var$(i) 1300 NEXT 1310 GOSUB 1640:para$=para$+CHR$(VAL(a$)) 1320 PRINT FNat$(20,b)e$"J"var$(VAL(a$)) 1330 READ a:WEND:b=b+2:i=1:c=5:a=8 1340 PRINT FNat$(10,b)"RX-Bits: (5..8)" 1350 GOSUB 1640:para$=para$+CHR$(VAL(a$)) 1360 PRINT FNat$(19,b)e$"J"VAL(a$):b=b+2 1370 PRINT FNat$(10,b)"TX-Bits: (5..8)" 1380 GOSUB 1640:para$=para$+CHR$(VAL(a$)) 1390 PRINT FNat$(19,b)e$"J"VAL(a$) 1400 b=5:PRINT FNat$(70,b-1)"Baud-Rates:" 1410 FOR i=1 TO 15:READ var$(i) 1420 PRINT FNat$(70,b+i)DEC$(i,"###"); 1430 PRINT " = "RIGHT$(SPACE$(5)+var$(i),5)" Baud" 1440 NEXT:b=b+i+2:i=1:c=1:a=15 1450 PRINT FNat$(10,b)"TX-Baud: (1..15)" 1460 GOSUB 1640:para$=para$+CHR$(VAL(a$)) 1470 PRINT FNat$(20,b)e$"J"var$(VAL(a$)) 1480 b=b+2:PRINT FNat$(10,b)"RX-Baud: (1..15)" 1490 GOSUB 1640:para$=para$+CHR$(VAL(a$)) 1500 PRINT FNat$(20,b)e$"J"var$(VAL(a$)) 1510 PRINT:PRINT"SIO-Parameter werden gesetzt" 1520 '>>>>>>>>>>>Parameter eintragen<<<<<<<<<<<<<< 1530 MID$(para$,1,1)=CHR$((NOT(ASC(para$))AND 255)+2) 1540 MID$(para$,2,1)=CHR$(ASC(MID$(para$,2))-1) 1550 MID$(para$,3,1)=CHR$(ASC(MID$(para$,3))-1) 1560 FOR i=0 TO 4 1570 POKE VARPTR(sio%(i))+1,ASC(MID$(para$,i+1,1)) 1580 NEXT 1590 POKE VARPTR(sio%(8)),ASC(MID$(para$,6,1)) 1600 POKE VARPTR(sio%(9)),ASC(MID$(para$,7,1)) 1610 sp%=UNT(VARPTR(sio%(0))):CALL sp% 1620 END 1630 '>>>>>>>>>>>>>>>Eingabe holen<<<<<<<<<<<<<<<< 1640 PRINT FNat$(10,b+i+1)e$"J"; 1650 INPUT"Bitte w{hlen Sie ...",a$ 1660 IF VAL(a$)a THEN 1640 1670 RETURN 1680 '>>>>>>>>>>Keine SIO vorhanden<<<<<<<<<<<<<<< 1690 PRINT cls$"Keine serielle Schnittstelle vorhanden!" 1700 END 1710 '>>>>>>>>>>>>>Ausgabe-Texte<<<<<<<<<<<<<<<<<< 1720 DATA 4,4,"Modus:","Abfrage ohne Handshake" 1730 DATA "Abfrage mit Handshake" 1740 DATA "Interrupt-Kontrolle ohne Handshake" 1750 DATA "Interrupt-Kontrolle mit Handshake",3,6 1760 DATA "Stopbits:","1 Stopbit","1.5 Stopbits" 1770 DATA "2 Stopbits",3,8,"Parit{t:" 1780 DATA "keine Parit{t","gerade Parit{t" 1790 DATA "ungerade Parit{t",0,50,75,110,134.5,150 1800 DATA 300,600,1200,1800,2400,3600,4800,7200 1810 DATA 9600,19200 1820 '>>>>>>>>>>>>>>Initialisierung<<<<<<<<<<<<<<< 1830 e$=CHR$(27):cls$=e$+"E"+e$+"H" 1840 DEF FNat$(x,y)=e$+"Y"+CHR$(32+y)+CHR$(32+x) 1850 DIM sio%(12),var$(16):RESTORE 1940 1860 true=-1:false=0 1870 FOR i=0 TO 8:READ a$ 1880 POKE i+VARPTR(sio%(0)),VAL("&H"+a$) 1890 NEXT 1900 sp%=UNT(VARPTR(sio%(0))) 1910 CALL sp%(sio%(8)) 1920 IF sio%(8)<>255 THEN sio.flag=false:RETURN 1930 sio.flag=true 1940 FOR i=0 TO 24 1950 READ a$:POKE i+VARPTR(sio%(0)),VAL("&H"+a$) 1960 NEXT 1970 RETURN 1980 '>>>>>>>>>>>>>Maschinenprogramm<<<<<<<<<<<<<< 1990 '>>>>>>>>>Abfrage, ob SIO vorhanden<<<<<<<<<< 2000 DATA E5 :'PUSH HL 2010 DATA CD,5A,FC :'CALL 0FC5AH 2020 DATA 78,01 :'DEFW CD_INFO 2030 DATA E1 :'POP HL 2040 DATA 71 :'LD (HL),C 2050 DATA C9 :'RET 2060 '>>>>>>>>>>>SIO-Parameter setzen<<<<<<<<<<<<< 2070 DATA 3E,00 :'LD A,Modus 2080 DATA 16,00 :'LD D,Stopbits 2090 DATA 1E,00 :'LD E,Parity 2100 DATA 26,00 :'LD H,RX_Bits 2110 DATA 2E,00 :'LD L,TX_Bits 2120 DATA CD,5A,FC :'CALL 0FC5AH 2130 DATA CF,02 :'DEFW CD_SA_INIT 2140 DATA 26,00 :'LD H,RX_Baud 2150 DATA 2E,00 :'LD L,TX_Baud 2160 DATA CD,5A,FC :'CALL 0FC5AH 2170 DATA B9,04 :'DEFW CD_SA_BAUD 2180 DATA C9 :'RET 2190 '>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<