1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
|
(************************************************************************)
(* *)
(* DDDD IIIII SSSS K K 3333 55555 / M M *)
(* D D I S K K 3 5 / MM MM *)
(* D D I SSS KK 333 5555 / M M M M *)
(* D D I S K K 3 5 / M M M *)
(* DDDD IIIII SSSS K K 3333 O 5555 / M M *)
(* *)
(************************************************************************)
(* *)
(* Diskettenmonitor Version 3.5 Multi *)
(* *)
(* Autor : Ingo Siekmann unter freundlicher Mithilfe von Stefan Haase, *)
(* Nils Ehnert, APu und Frank Lenniger *)
(* *)
(* Stand : Sonntag, den 16. November 1986 *)
(* *)
(* Lauffähig ab EUMEL Version 1.7.3 /M in Systemtasks *)
(* *)
(* *)
(* (c) 1986 by ULES c/o Ingo Siekmann & Nils Ehnert *)
(* *)
(************************************************************************)
(************************************************************************)
(* *)
(* Softwareaenderungen und Softwareneuerungen : *)
(* *)
(* 03.01.1986 3.3.2.8 : Block- Asciieditor ueberarbeitet, neuer Header- *)
(* editor (V1.3), Helpfunktion, gib kommando, *)
(* Fileaccess auch fuer 16-Files *)
(* 15.01.1986 3.3.2.9 : Vorbereitung fuer den Suchmodus in 3.3.3.0, *)
(* Notbremse ins globalmenue mit ctrl g, byte ops *)
(* ueberarbeitet, pic dienste in vorbereitung *)
(* Headereditor (V1.4) *)
(* 16.01.1986 : halt from terminal --> ctrl g := true *)
(* 16.01.1886 3.3.3.0 : Suchmodus ins Blockmenue (TEST), Blockeditor *)
(* Byteposops fuer Suchmodus einbauen *)
(* 21.01.1986 : inchar in get char umgewandelt *)
(* 28.01.1986 : lernmodus eingebaut (???) *)
(* 31.01.1986 3.3.3.1 : Suchmodus und Lernmodus wieder ausgebaut *)
(* beim Datenraumschreiben nur belegte Bloecke raus*)
(* 14.02.1986 3.3.3.2 : Fehler Überarbeitet *)
(* 20.02.1986 : Suchmodus vorbereitet (2. Versuch ?) *)
(* 06.03.1986 3.3.3.3 : Suchmodus eingebaut (Test) *)
(* 10.03.1986 : Softwaretrennung zwischen Single und Multi *)
(* 12.03.1986 : read next block cmd ins blockmenu eingebaut *)
(* Fehler überarbeitet, Vorbereitung für besseren *)
(* Suchmodus *)
(* 17.03.1986 3.3.3.4 : configurator menü -> einstellen von disk type, *)
(* i/o channel, disk info. TEXT/HEX search . *)
(* 02.04.1986 : urflop ops mit versatzops *)
(* 08.04.1986 : urflop menue mit versatz *)
(* 30.04.1986 3.3.3.5 : Fehler ueberarbeitet *)
(* 30.04.1986 3.3.3.6 : lab read/write ins space menue *)
(* 05.05.1986 3.3.3.7 : hex / dez - get für alles, block editor über- *)
(* arbeitet, fehler überarbeitet. auslieferung für *)
(* HRZ ! *)
(* 06.06.1986 3.4 : Fehler im search und menue monitor behoben *)
(* 12.06.1986 : Fehler im Space/Header-Menue behoben *)
(* 16.11.1986 3.5 : Fehler im Urflopmenue behoben *)
(* *)
(* A C H T U N G : Keine weitere Entwicklung von Version 3 !! *)
(* *)
(* Bielefeld, den 16.11.1986 ULES *)
(* *)
(* Ingo Siekmann *)
(* *)
(* *)
(************************************************************************)
PACKET byte operations and disk monitor version 35 multi
DEFINES BYTE ,
HEX ,
ASCII ,
DECRL ,
DECRH ,
INCRL ,
INCRH ,
:= ,
- ,
+ ,
$ ,
hint ,
zu byte ,
lower byte ,
higher byte ,
set lower byte ,
set higher byte ,
nil byte ,
put ,
get ,
block in ,
block out ,
HEADER ,
header ,
nil header ,
is start header ,
is end header ,
is file header ,
name ,
date ,
type ,
pass ,
header edit ,
show first ,
show second ,
block edit ,
ascii edit ,
set ctrl g ,
reset ctrl g ,
set channel ,
read block ,
write block ,
seek space ,
seek block ,
read space ,
write space ,
check archive error ,
space nr ,
header nr ,
urlader lesen ,
urlader schreiben ,
urlader lesen auf seite ,
urlader schreiben von seite ,
search ,
io control ,
central disk monitor process :
LET start of volume = 1000 ,
end of volume = 1 ,
file header = 3 ;
LET global info line = "** GLOBAL : b / s / a / c / u / k / q # stop --> ctrl g, help --> ""?"" **" ,
block info line = "** BLOCK : r / w / e / k / s / n / q # stop --> ctrl g, help --> ""?"" **" ,
search info line = "** SEARCH : a -> ascii / h -> hex / q -> quit / ctrl g -> stop **" ,
editor info line = "** EDITOR : f / s / d / e / k / p / q # stop --> ctrl g, help --> ""?"" **" ,
space info line = "** SPACE : r, R, w, W, e, E, s, l, k, q # stop --> ctrl g, help --> ""?"" **" ,
space header info = "** SPACE / HEADER : s -> read space / h -> read header / q -> quit **" ,
archiv info line = "** ARCHIV : a / r / l / f / s / k / q # stop --> ctrl g, help --> ""?"" **" ,
urflop info line = "** URFLOP : r / R / w / W / l / k / q # stop --> ctrl g, help --> ""?"" **" ,
conf info line = "** CONFIGURATOR : c / t / i / k / q # stop --> ctrl g, help --> ""?"" **" ,
first mon line = "----------------------------------------------------------------------------" ,
command line = ">__________________________________________________________________________<" ;
LET global chars = "bsacuqk?"7"" ,
block chars = "rweqksn?"7"" ,
search chars = "ahdq"7"" ,
editor chars = "fsdeqk?"7"p" ,
space chars = "rRwWesqEkl?"7"" ,
archiv chars = "arlfsqk?"7"" ,
urflop chars = "rRwWlqk?"7"" ,
conf chars = "ctikq?"7"" ;
LET info line x pos = 1 ,
info line y pos = 20 ,
info line x pos 2 = 1 ,
info line y pos 2 = 24 ,
command line x pos = 1 ,
command line y pos = 21 ,
error line x pos = 1 ,
error line y pos = 22 ,
file type = 1003 ,
file type 16 = 1002 ,
block 0 = 0 ,
std archive channel = 31 ,
type mode = 1 ,
size mode = 5 ,
std disk type = 0 ;
LET software stand = "Sonntag, den 16.11.1986" ,
software version = "Version 3.5 /Multi" ,
software bemerkung = "*** Ende der Entwicklung der Version 3 ! ***" ,
software bemerkung1 = "" ;
LET eumel 0 start block = 10 ,
eumel 0 end block = 65 ,
eumel 0 end block pic = 62 ,
eumel 0 end block 1758 = 67 ,
pic char table start block = 63 ,
pic char table end block = 65 ,
pic shard start block = 0 ,
pic shard end block = 79 ,
read write impossible error = 101 ,
read error = 102 ,
write error = 103 ,
block number error = 104 ,
undef archive error = 105 ;
LET ibm 720 format 5 = 1440 ,
ibm 360 format 5 = 720 ,
pic 400 format 5 = 1600 ,
soft sd 8 = 1232 ,
soft dd 8 = 2464 ,
hard ss sd = 616 ,
hard ds sd = 1232 ;
LET home = ""1"" ,
left = ""8"" ,
right = ""2"" ,
up = ""3"" ,
down = ""10"" ,
return = ""13"" ,
tab = ""9"" ,
esc = ""27"" ,
cl eol = ""5"" ,
cl eop = ""4"" ;
LET hex chars = "0123456789ABCDEF" ,
hex marker = "h" ;
LET start pos = 479 ,
heap page nr = 2 ;
TYPE HEADER = STRUCT (TEXT name, date, INT type, TEXT pass) ;
TYPE BYTE = STRUCT (INT lower byte , higher byte) ;
HEADER CONST nil header := HEADER : ("", "", 0, "") ;
BOUND HEADER VAR bound header ;
BOUND TEXT VAR bound text ;
INITFLAG VAR this packet := false ;
ROW 256 BYTE VAR block ;
ROW 32 TEXT VAR text block ;
ROW 256 INT VAR block int ;
DATASPACE VAR ds :: nilspace ; forget (ds) ;
DATASPACE VAR afds :: nilspace ; forget (afds) ;
DATASPACE VAR lds :: nilspace ; forget (lds) ;
DATASPACE VAR uds :: nilspace ; forget (uds) ;
DATASPACE VAR blkinds :: nilspace ; forget (blkinds) ;
FILE VAR af, f, lf ;
INT VAR command index, block nummer, space nummer, x, y, i, i1, xx, yy,
archive channel := std archive channel, user channel, error answer,
header nummer, first sp block, integer, archiv size, error, block nr,
stpos, s, e, fb, fp, cx, cy, disk type := std disk type, ver ;
TEXT VAR c, hex line :: "", tc, char, t, archive name, dummy,
stb1, stb2, own command line ;
REAL VAR po ;
BOOL VAR first := true, ende, list file ok, block shown, ctrl g, result ;
(********************** PACKET bytes ok : ****************************)
BYTE PROC nil byte :
BYTE : (0,0)
END PROC nil byte ;
OP := (BYTE VAR byte , BYTE CONST old byte) :
byte.lower byte := old byte.lower byte ;
byte.higher byte := old byte.higher byte.
END OP := ;
OP := (BYTE VAR byte , INT CONST int byte) :
byte.lower byte := int byte MOD 256 ;
byte.higher byte := (int byte AND -256) DIV 256 AND 255 .
END OP := ;
OP := (ROW 256 BYTE VAR byte, ROW 256 INT CONST int byte) :
INT VAR i ;
FOR i FROM 1 UPTO 256 REPEAT
byte (i) := int byte (i)
END REPEAT .
END OP := ;
OP := (ROW 256 INT VAR int byte, ROW 256 BYTE CONST byte) :
INT VAR i ;
FOR i FROM 1 UPTO 256 REPEAT
int byte (i) := byte (i)
END REPEAT .
END OP := ;
BYTE OP + (BYTE VAR byte , INT CONST int byte) :
byte.lower byte := byte.lower byte + lower byte (int byte) ;
byte.higher byte := byte.higher byte + higher byte (int byte) ;
byte .
END OP + ;
BYTE OP - (BYTE VAR byte, INT CONST int byte) :
byte.lower byte := byte.lower byte - lower byte (int byte) ;
byte.higher byte := byte.higher byte - higher byte (int byte) ;
byte .
END OP - ;
OP := (INT VAR int byte, BYTE CONST byte) :
IF byte.higher byte > 127
THEN int byte := minus * 255 + minus + byte.lower byte
ELSE int byte := byte.higher byte * 256 + byte.lower byte
END IF
.minus : byte.higher byte - 256 .
END OP := ;
OP INCRL (BYTE VAR byte, INT CONST lower) :
byte.lower byte INCR lower
END OP INCRL ;
OP INCRH (BYTE VAR byte, INT CONST high) :
byte.higher byte INCR high
END OP INCRH ;
OP DECRL (BYTE VAR byte, INT CONST lower) :
byte.higher byte DECR lower
END OP DECRL ;
OP DECRH (BYTE VAR byte, INT CONST high) :
byte.higher byte DECR high
END OP DECRH ;
INT PROC lower byte (BYTE CONST byte) :
byte.lower byte .
END PROC lower byte ;
INT PROC higher byte (BYTE CONST byte) :
byte.higher byte .
END PROC higher byte ;
INT PROC lower byte (INT CONST int byte) :
int byte MOD 256 .
END PROC lower byte ;
INT PROC higher byte (INT CONST int byte) :
(int byte AND -256) DIV 256 AND 255 .
END PROC higher byte ;
PROC set lower byte (BYTE VAR byte, INT CONST lower byte) :
byte.lower byte := lower byte
END PROC set lower byte ;
PROC set higher byte (BYTE VAR byte, INT CONST higher byte) :
byte.higher byte := higher byte
END PROC set higher byte ;
OP HEX (TEXT VAR insert line , BYTE CONST byte) :
insert line CAT (hex chars SUB (byte.lower byte DIV 16 + 1)) ;
insert line CAT (hex chars SUB (byte.lower byte MOD 16 + 1)) ;
insert line CAT " " ;
insert line CAT (hex chars SUB (byte.higher byte DIV 16 + 1)) ;
insert line CAT (hex chars SUB (byte.higher byte MOD 16 + 1)) ;
insert line CAT " " .
END OP HEX ;
OP ASCII (TEXT VAR insert line , BYTE CONST byte) :
insert line CAT ascii (byte.lower byte ) ;
insert line CAT ascii (byte.higher byte) .
END OP ASCII ;
TEXT PROC ascii (INT CONST half byte) :
IF half byte > 31 AND half byte < 127 COR
half byte > 213 AND half byte < 219 COR
half byte = 251
THEN code (half byte)
ELSE "."
END IF .
END PROC ascii ;
PROC block in (ROW 256 BYTE VAR block bytes, INT CONST type , block nr) :
ROW 256 INT VAR block ;
reset block io ;
block in (block, type, block nr, error answer) ;
block bytes := block ;
check archive error (error answer, true) .
END PROC block in ;
PROC block out (ROW 256 BYTE CONST bytes , INT CONST disk type, block nr) :
ROW 256 INT VAR int bytes := bytes ;
reset block io ;
block out (int bytes, disk type, block nr, error answer) ;
check archive error (error answer, true) .
END PROC block out ;
PROC put (BYTE CONST byte) :
put ("LOW : " + text (byte.lower byte) + " HIGH : " + text (byte.higher byte)) .
END PROC put ;
PROC get (BYTE VAR byte) :
get (integer) ;
byte := integer .
END PROC get ;
PROC zu byte (ROW 256 BYTE VAR bytes, TEXT CONST byte kette, INT CONST stelle) :
INT VAR lower, higher ;
lower := pos (hex chars, (byte kette SUB 1)) * 16 +
pos (hex chars, (byte kette SUB 2)) - 17 ;
higher:= pos (hex chars, (byte kette SUB 4)) * 16 +
pos (hex chars, (byte kette SUB 5)) - 17 ;
IF higher > 127
THEN bytes (stelle) := minus * 255 + minus + lower
ELSE bytes (stelle) := higher * 256 + lower
END IF .
minus : higher - 256 .
END PROC zu byte ;
BYTE OPERATOR $ (TEXT CONST hex) :
TEXT VAR byte kette :: "";
FOR i FROM 1 UPTO 4 REPEAT
IF (hex SUB i) = ""
THEN byte kette CAT "0"
ELIF (hex SUB i) = " "
THEN (* Nix *)
ELSE byte kette CAT (hex SUB i)
END IF ;
END REPEAT ;
BYTE VAR byte ;
INT VAR lower, higher, i;
lower := pos (hex chars, (byte kette SUB 1)) * 16 +
pos (hex chars, (byte kette SUB 2)) - 17 ;
higher:= pos (hex chars, (byte kette SUB 3)) * 16 +
pos (hex chars, (byte kette SUB 4)) - 17 ;
IF higher > 127
THEN byte := minus * 255 + minus + lower
ELSE byte := higher * 256 + lower
END IF ;
byte .
minus : higher - 256 .
END OPERATOR $ ;
INT PROCEDURE hint (TEXT CONST he) :
INT VAR laenge :: length (he) ,
stelle ,
ziffer ,
ergebnis :: 0 ;
TEXT VAR h :: he ;
FOR stelle FROM 65 UPTO 70 REPEAT
change all (h, code (stelle + 32), code (stelle))
END REPEAT ;
FOR stelle FROM laenge DOWNTO 1 REP
ziffer := pos ("0123456789ABCDEF", h SUB stelle) - 1 ;
IF ziffer < 0
THEN errorstop ("Unerlaubtes Zeichen in Hexadezimalzahl")
END IF ;
ergebnis := ergebnis + ziffer * 16 ** (laenge - stelle)
END REP ;
ergebnis
END PROCEDURE hint ;
(********************** PACKET header operations ***************************)
OPERATOR := (HEADER VAR dest, HEADER CONST source) :
CONCR (dest) := CONCR (source) .
END OPERATOR := ;
HEADER PROCEDURE header (TEXT CONST name, date, INT CONST type,
TEXT CONST pass) :
HEADER : (name, date, type, pass) .
END PROCEDURE header ;
BOOL PROCEDURE is start header (HEADER CONST header) :
CONCR (header).type = start of volume .
END PROCEDURE is start header ;
BOOL PROCEDURE is end header (HEADER CONST header) :
CONCR (header).type = end of volume .
END PROCEDURE is end header ;
BOOL PROCEDURE is file header (HEADER CONST header) :
CONCR (header).type = file header .
END PROCEDURE is file header ;
PROCEDURE name (HEADER VAR header, TEXT CONST new name) :
CONCR (header).name := new name .
END PROCEDURE name ;
TEXT PROCEDURE name (HEADER CONST header) :
CONCR (header).name .
END PROCEDURE name ;
PROCEDURE date (HEADER VAR header, TEXT CONST new date) :
CONCR (header).date := new date .
END PROCEDURE date ;
TEXT PROCEDURE date (HEADER CONST header) :
CONCR (header).date .
END PROCEDURE date ;
PROCEDURE type (HEADER VAR header, INT CONST new type) :
CONCR (header).type := new type .
END PROCEDURE type ;
INT PROCEDURE type (HEADER CONST header) :
CONCR (header).type .
END PROCEDURE type ;
PROCEDURE pass (HEADER VAR header, TEXT CONST new pass) :
CONCR (header).pass := new pass .
END PROCEDURE pass ;
TEXT PROCEDURE pass (HEADER CONST header) :
CONCR (header).pass .
END PROCEDURE pass ;
(********************** Header-Editor V1.4 ****************************)
PROCEDURE header edit (HEADER VAR header, TEXT CONST msg) :
TEXT VAR head :: ""15"HEADER - EDITOR V1.4" + (25 - LENGTH msg) * "." + msg +
5 * "." + " "14"" ;
disable stop ;
REPEAT
out (home) ;
out (16 * (cl eol + down)) ;
cursor (6, 6) ;
putline (head) ;
cursor (6, 7) ;
put (""15"TEXT name : "14"") ;
edit get (CONCR (header).name, max text length, 38) ;
IF is error
THEN clear error ;
CONCR (header).name := "" ;
cursor (6, 7) ;
put (""15"TEXT name : "14"") ;
edit get (CONCR (header).name, max text length, 38)
END IF ;
cursor (6, 8) ;
put (""15"TEXT date : "14"") ;
edit get (CONCR (header).date, max text length, 38) ;
IF is error
THEN clear error ;
CONCR (header).date := "" ;
cursor (6, 8) ;
put (""15"TEXT date : "14"") ;
edit get (CONCR (header).date, max text length, 38)
END IF ;
cursor (6, 9) ;
put (""15"INT type : "14"") ;
TEXT VAR d :: text (CONCR (header).type) ;
edit get (d, max text length, 38) ;
CONCR (header).type := int (d) ;
cursor (6, 10) ;
put (""15"TEXT pass : "14"") ;
edit get (CONCR (header).pass, max text length, 38) ;
IF is error
THEN clear error ;
CONCR (header).pass := "" ;
cursor (6, 10) ;
put (""15"TEXT pass : "14"") ;
edit get (CONCR (header).pass, max text length, 38)
END IF ;
cursor (6, 13) ;
UNTIL NOT no (""15"header ok. "14"") END REPEAT
END PROCEDURE header edit ;
(********************** PACKET block editor ****************************)
PROCEDURE show first (ROW 256 BYTE CONST block) :
out (home) ;
po := 1.0 ;
first := true ;
FOR i FROM 1 UPTO 16 REPEAT
text block (i) := text ((i - 1) * 16, 4) ;
text block (i) CAT " : " ;
get cursor (x, y) ;
FOR i1 FROM 1 UPTO 8 REPEAT
text block (i) HEX block ((i-1) * 8 + i1)
END REPEAT ;
text block (i) CAT " *" ;
FOR i1 FROM 1 UPTO 8 REPEAT
text block (i) ASCII block ((i - 1) * 8 + i1)
END REPEAT ;
text block (i) CAT "*" ;
cursor (x, y) ;
putline (text block (i))
END REPEAT .
END PROCEDURE show first ;
PROCEDURE show second (ROW 256 BYTE CONST block) :
out (home) ;
po := 129.0 ;
first := false ;
FOR i FROM 17 UPTO 32 REPEAT
text block (i) := text ((i - 1) * 16, 4) ;
text block (i) CAT " : " ;
get cursor (x,y) ;
FOR i1 FROM 1 UPTO 8 REPEAT
text block (i) HEX block ((i - 1) * 8 + i1)
END REPEAT ;
text block (i) CAT " *" ;
FOR i1 FROM 1 UPTO 8 REPEAT
text block (i) ASCII block ((i - 1) * 8 + i1)
END REPEAT ;
text block (i) CAT "*" ;
cursor (x, y);
putline (text block (i))
END REPEAT .
END PROCEDURE show second ;
PROCEDURE block edit (ROW 256 BYTE VAR block, INT CONST st) :
IF st > 0
THEN IF st > 255
THEN push (255 * right)
ELSE push (st * right)
END IF
END IF ;
BOOL VAR low :: TRUE ;
edit info ;
cursor (8, 1) ;
get cursor (x, y) ;
po := 1.0 ;
REPEAT
get cursor (x, y) ;
cursor (x, y) ;
(* inchar (t) ; *)
get char (t) ;
IF (t = right OR t = " ") AND x < 53
THEN cursor (x + 3, y) ; po INCR 0.5
ELIF (t = right OR t = " ") AND x > 52 AND y < 16
THEN cursor (8, y + 1) ; po INCR 0.5
ELIF t = up AND y > 1
THEN cursor (x, y - 1) ; po DECR 8.0
ELIF t = left AND x > 8
THEN cursor (x - 3, y) ; po DECR 0.5
ELIF t = left AND x = 8 AND y <> 1
THEN cursor (53, y - 1) ; po DECR 0.5
ELIF t = down AND y < 16
THEN cursor (x, y + 1) ; po INCR 8.0
ELIF t = tab
THEN IF first
THEN show first (block)
ELSE show second (block)
END IF ;
ascii edit (block, first) ;
IF first
THEN show first (block)
ELSE show second (block)
END IF ;
IF t <> return
THEN edit info ;
cursor (8, 1) ;
END IF
ELIF t = ""7""
THEN set ctrl g
END IF ;
get cursor (x, y) ;
cursor (x, y);
IF code (t) > 47 AND code (t) < 58 OR
code (t) > 96 AND code (t) < 103
THEN IF code (t) > 96 CAND code (t) < 103
THEN t := code (code (t) - 32)
END IF ;
out (left + "-" + 2 * right + "-" + 3 * left + t) ;
REPEAT
(* inchar (tc) ; *)
get char (tc) ;
UNTIL code (tc) > 47 AND code (tc) < 58 OR
code (tc) > 96 AND code (tc) < 103 END REPEAT ;
IF code (tc) > 96 CAND code (tc) < 103
THEN tc := code (code (tc) - 32)
END IF ;
out (tc + " " + 4 * left + " ") ;
cursor (x, y) ;
t CAT tc ;
INT VAR bp :: int (po) ;
IF po MOD real (bp) = 0.0
THEN low := TRUE
ELSE low := FALSE
END IF ;
IF NOT first (* ONE : 17.06.85 *)
THEN bp INCR 128
END IF ;
IF low
THEN set lower byte (block (bp), hint (t))
ELSE set higher byte (block (bp), hint (t))
END IF ;
END IF ;
info ;
UNTIL t = return COR ctrl g END REPEAT ;
IF first
THEN show first (block)
ELSE show second (block)
END IF ;
cursor (1, 17) .
info :
get cursor (x, y) ;
cursor (xx, yy) ;
IF po MOD real (int(po)) = 0.0
THEN put ("LOW")
ELSE put ("HIGH")
END IF ;
cursor (x,y) .
edit info :
cursor (1, 23) ;
put (cl eol + "Block-Editor : Hexmodus,") ;
IF first
THEN put ("First Block")
ELSE put ("Second Block")
END IF ;
put (",") ;
get cursor (xx, yy) .
END PROCEDURE block edit ;
PROCEDURE block edit (ROW 256 BYTE VAR block, BOOL CONST first,
INT CONST st) :
IF st > 0
THEN IF st > 255
THEN push (255 * right)
ELSE push (st * right)
END IF
END IF ;
BOOL VAR low :: TRUE ;
edit info ;
cursor (8, 1) ;
get cursor (x, y) ;
po := 1.0 ;
REPEAT
get cursor (x, y) ;
cursor (x, y) ;
(* inchar (t) ; *)
get char (t) ;
IF (t = right OR t = " ") AND x < 53
THEN cursor (x + 3, y) ; po INCR 0.5
ELIF (t = right OR t = " ") AND x > 52 AND y < 16
THEN cursor (8, y + 1) ; po INCR 0.5
ELIF t = up AND y > 1
THEN cursor (x, y - 1) ; po DECR 8.0
ELIF t = left AND x > 8
THEN cursor (x - 3, y) ; po DECR 0.5
ELIF t = left AND x = 8 AND y <> 1
THEN cursor (53, y - 1) ; po DECR 0.5
ELIF t = down AND y < 16
THEN cursor (x, y + 1) ; po INCR 8.0
ELIF t = tab
THEN IF first
THEN show first (block)
ELSE show second (block)
END IF ;
ascii edit (block, first) ;
IF first
THEN show first (block)
ELSE show second (block)
END IF ;
IF t <> return
THEN edit info ;
cursor (8, 1) ;
END IF
ELIF t = ""7""
THEN set ctrl g
END IF ;
get cursor (x, y) ;
cursor (x, y);
IF code (t) > 47 AND code (t) < 58 OR
code (t) > 96 AND code (t) < 103
THEN IF code (t) > 96 CAND code (t) < 103
THEN t := code (code (t) - 32)
END IF ;
out (left + "-" + 2 * right + "-" + 3 * left + t) ;
REPEAT
(* inchar (tc) ; *)
get char (tc) ;
UNTIL code (tc) > 47 AND code (tc) < 58 OR
code (tc) > 96 AND code (tc) < 103 END REPEAT ;
IF code (tc) > 96 CAND code (tc) < 103
THEN tc := code (code (tc) - 32)
END IF ;
out (tc + " " + 4 * left + " ") ;
cursor (x, y) ;
t CAT tc ;
INT VAR bp :: int (po) ;
IF po MOD real (bp) = 0.0
THEN low := TRUE
ELSE low := FALSE
END IF ;
IF NOT first (* ONE : 17.06.85 *)
THEN bp INCR 128
END IF ;
IF low
THEN set lower byte (block (bp), hint (t))
ELSE set higher byte (block (bp), hint (t))
END IF ;
END IF ;
info ;
UNTIL t = return COR ctrl g END REPEAT ;
IF first
THEN show first (block)
ELSE show second (block)
END IF ;
cursor (1, 17) .
info :
get cursor (x, y) ;
cursor (xx, yy) ;
IF po MOD real (int(po)) = 0.0
THEN put ("LOW")
ELSE put ("HIGH")
END IF ;
cursor (x,y) .
edit info :
cursor (1, 23) ;
put (cl eol + "Block-Editor : Hexmodus,") ;
IF first
THEN put ("First Block")
ELSE put ("Second Block")
END IF ;
put (",") ;
get cursor (xx, yy) .
END PROCEDURE block edit ;
PROCEDURE ascii edit (ROW 256 BYTE VAR block, BOOL CONST first) :
BOOL VAR low ;
edit info ;
cursor (59, 1) ;
x := 1 ;
y := 1 ;
po := 1.0 ;
REPEAT
get char (t) ;
IF po < 1.0 AND first
THEN po := 1.0
END IF ;
IF po < 129.0 AND NOT first
THEN po := 129.0
END IF ;
IF po > 128.5 AND first
THEN po := 128.5
END IF ;
IF po > 256.5 AND NOT first
THEN po := 256.5
END IF ;
SELECT pos (""9""8""2""3""10""13""7"", t) OF
CASE 1, 6 : quit ascii edit
CASE 2 : IF x > 1 COR (x = 1 AND y > 1)
THEN x DECR 1; po DECR 0.5
END IF
CASE 3 : IF x < 16 COR (x = 16 AND y <> 16)
THEN x INCR 1; po INCR 0.5
END IF
CASE 4 : IF y > 1
THEN y DECR 1 ;
po DECR 8.0
END IF
CASE 5 : IF y < 16
THEN y INCR 1 ;
po INCR 8.0
END IF
CASE 7 : set ctrl g
OTHERWISE IF code (t) >= 32 AND code (t) <= 126
THEN set char ; push (""2"")
END IF
END SELECT ;
IF x < 1 AND y = 1
THEN x := 1
ELIF x < 1 AND y > 1
THEN x := 16 ;
y DECR 1
ELIF x > 16 AND y = 16
THEN x := 16 ;
ELIF x > 16 AND y < 16
THEN x := 1 ;
y INCR 1
ELIF y < 1
THEN y := 1
ELIF y > 16
THEN y := 16
END IF ;
info ;
UNTIL ctrl g END REPEAT .
quit ascii edit :
x := 8 ;
y := 1 ;
cursor (x, y) ;
po := 1.0 ;
LEAVE ascii edit .
set char :
out (t) ;
INT VAR bp :: int (po) ;
IF x MOD 2 = 0
THEN set higher byte (block (bp), code (t))
ELSE set lower byte (block (bp), code (t))
END IF.
info :
cursor (xx, yy) ;
IF po MOD real (int (po)) = 0.0
THEN put ("LOW")
ELSE put ("HIGH")
END IF ;
cursor (58 + x, y) .
edit info :
cursor (1, 23) ;
put (""5"Block-Editor : Asciimodus,") ;
IF first
THEN put ("First Block")
ELSE put ("Second Block")
END IF ;
put (",") ;
get cursor (xx, yy) .
END PROCEDURE ascii edit ;
(********************** PACKET block i/o : ****************************)
PROCEDURE set channel (INT CONST channel) :
archive channel := channel .
END PROCEDURE set channel ;
PROCEDURE read block (ROW 256 BYTE VAR block byte, INT CONST block nummer) :
user channel := channel ;
enable stop ;
continue (archive channel) ;
disable stop ;
block in (block int, disk type, block nummer, error answer) ;
IF is error
THEN clear error
END IF ;
break (quiet) ;
continue (user channel) ;
enable stop ;
check archive error (error answer, true) ;
block byte := block int .
END PROCEDURE read block ;
PROCEDURE write block (ROW 256 BYTE VAR block byte, INT CONST block nummer) :
user channel := channel ;
enable stop ;
block int := block byte ;
continue (archive channel) ;
disable stop ;
block out (block int, disk type, block nummer, error answer) ;
IF is error
THEN clear error
END IF ;
break (quiet) ;
continue (user channel) ;
enable stop ;
check archive error (error answer, false) .
END PROCEDURE write block;
PROCEDURE read block (ROW 256 INT VAR block int, INT CONST block nummer) :
user channel := channel ;
enable stop ;
continue (archive channel) ;
disable stop ;
block in (block int, disk type, block nummer, error answer) ;
IF is error
THEN clear error
END IF ;
break (quiet) ;
continue (user channel) ;
enable stop ;
check archive error (error answer, true) .
END PROCEDURE read block ;
PROC write block (ROW 256 INT VAR block int, INT CONST block nummer) :
user channel := channel ;
enable stop ;
continue (archive channel) ;
disable stop ;
block out (block int, disk type, block nummer, error answer) ;
IF is error
THEN clear error
END IF ;
break (quiet) ;
continue (user channel) ;
enable stop ;
check archive error (error answer, false) .
END PROCEDURE write block ;
(********************** PACKET space i/o : ****************************)
PROCEDURE seek space (INT CONST space) :
user channel := channel ;
enable stop ;
rewind ;
INT VAR i ;
continue (archive channel) ;
disable stop ;
FOR i FROM 1 UPTO space REPEAT
skip dataspace
UNTIL is error END REPEAT ;
break (quiet) ;
continue (user channel) .
END PROCEDURE seek space ;
PROCEDURE seek block (INT CONST block nr) :
seek (block nr) .
END PROCEDURE seek block ;
PROCEDURE read space (DATASPACE VAR ds) :
user channel := channel ;
enable stop ;
continue (archive channel) ;
disable stop ;
read (ds) ;
break (quiet) ;
continue (user channel) .
END PROCEDURE read space ;
PROCEDURE read space (DATASPACE VAR ds, INT VAR max pages,
BOOL CONST errors) :
user channel := channel ;
enable stop ;
continue (archive channel) ;
disable stop ;
read (ds, max pages, errors) ;
break (quiet) ;
continue (user channel) .
END PROCEDURE read space ;
PROCEDURE write space (DATASPACE CONST ds) :
user channel := channel ;
enable stop ;
continue (archive channel) ;
disable stop ;
write (ds) ;
break (quiet) ;
continue (user channel) .
END PROCEDURE write space ;
PROCEDURE check archive error (INT CONST code, BOOL CONST read) :
enable stop ;
IF read
THEN SELECT code OF
CASE 0 :
CASE 1 : error stop (read write impossible error,
"Lesen unmoeglich (1)")
CASE 2 : error stop (read error,
"Lesefehler (2)")
CASE 3 : error stop (block number error,
"Blocknummer zu hoch (3)")
OTHERWISE error stop (undef archive error,
"Archivfehler unbekannt ("+ text (code) +")")
END SELECT
ELSE SELECT code OF
CASE 0 :
CASE 1 : error stop (read write impossible error,
"Schreiben unmoeglich (1)")
CASE 2 : error stop (write error,
"Schreibfehler (2)")
CASE 3 : error stop (block number error,
"Blocknummer zu hoch (3)")
OTHERWISE error stop (undef archive error,
"Archivfehler unbekannt ("+ text (code) +")")
END SELECT
END IF .
END PROCEDURE check archive error ;
(********************** PACKET menue monitor : ****************************)
PROCEDURE fehler behandeln :
IF is error CAND error message <> ""
THEN IF is halt from terminal
THEN set ctrl g
ELSE cursor (error line x pos, error line y pos) ;
clear error ;
put (cl eol +"Fehler : "+ error message)
END IF
END IF .
END PROCEDURE fehler behandeln ;
PROCEDURE set ctrl g :
ctrl g := true .
END PROCEDURE set ctrl g ;
PROCEDURE reset ctrl g :
ctrl g := false .
END PROCEDURE reset ctrl g ;
PROCEDURE fehler loeschen :
INT VAR x, y ;
get cursor (x, y) ;
cursor (1, 22) ;
out (cl eol) ;
cursor (1, 18) ;
out (cl eol) ;
cursor (1, 23) ;
out (cl eol) ;
cursor (x, y) .
END PROCEDURE fehler loeschen ;
(********************** Global-Menue ****************************)
PROCEDURE global menue :
ende := false ;
user channel := channel ;
disable stop ;
REPEAT
menue monitor (global info line, global chars, command index) ;
fehler loeschen ;
SELECT command index OF
CASE 1 : block menue
CASE 2 : space menue
CASE 3 : archive menue
CASE 4 : configurator menue
CASE 5 : urflop menue
CASE 6 : out ("uit");ende := true ;
CASE 7 : get and do one command ; block shown := false
CASE 8 : global menue help ; block shown := false
CASE 9 : set ctrl g
END SELECT ;
fehler behandeln ;
UNTIL ende COR ctrl g END REPEAT ;
reset ctrl g ;
ende := false .
END PROCEDURE global menue ;
(********************** Block-Menue ****************************)
PROCEDURE block menue :
disable stop ;
REPEAT
menue monitor (block info line, block chars, command index) ;
fehler loeschen ;
SELECT command index OF
CASE 1 : read one block
CASE 2 : write one block
CASE 3 : edit block menue
CASE 4 : LEAVE block menue
CASE 5 : get and do one command
CASE 6 : search menue
CASE 7 : push ("r"+ text (block nummer + 1) +" ")
CASE 8 : block menue help ; block shown := false
CASE 9 : set ctrl g
END SELECT ;
show first three ints ;
display info line ;
fehler behandeln
UNTIL ctrl g END REPEAT .
read one block :
out ("ead Block : ") ;
x get (block nummer) ;
IF NOT is error
THEN reset block io ;
read block (block, block nummer)
END IF ;
IF NOT is error
THEN show first (block) ; block shown := true
END IF .
write one block :
out ("rite") ;
IF yes ("write auf Block "+ text (block nummer))
THEN reset block io ;
write block (block, block nummer)
ELIF yes ("write auf einen anderen Block")
THEN out (" auf Block : ") ;
x get (block nummer) ;
IF NOT is error
THEN reset block io ;
write block (block, block nummer)
END IF
END IF .
show first three ints :
cursor (1, 18) ;
put (""5"1.INT : ") ;
TEXT VAR h :: "" ; h HEX block (1) ;
INT VAR ih := block (1) ;
h CAT ("/ " + text (ih)) ;
put (h) ;
put (", 2.INT : ") ;
h := "" ; h HEX block (2) ;
ih := block (2) ;
h CAT ("/ " + text (ih)) ;
put (h) ;
put (", 3.INT : ") ;
h := "" ; h HEX block (3) ;
ih := block (3) ;
h CAT ("/ " + text (ih)) ;
put (h) .
END PROCEDURE block menue ;
(********************** Search-Menue ****************************)
PROCEDURE search menue :
disable stop ;
menue monitor (search info line, search chars, command index) ;
fehler loeschen ;
SELECT command index OF
CASE 1 : ascii search
CASE 2 : hex search
CASE 3 : dez search
CASE 4 : LEAVE search menue
CASE 5 : set ctrl g
END SELECT ;
display info line ;
fehler behandeln .
ascii search :
cursor (command line x pos + 1, command line y pos) ;
put ("Suchtext :") ; getline (t) ;
cursor (command line x pos + 1, command line y pos) ;
put ("suchen nach """+ t +""" von Block :") ;
x get (s) ;
cursor (command line x pos + 1, command line y pos) ;
put ("suchen nach """+ t +""" von Block") ;
put (s) ; put ("bis Block :") ; x get (e) ;
search (t, s, e, fb, fp) ;
out (""13"") ;
IF fp > 0
THEN put (cl eol +"Gefunden auf Block") ; put (fb) ;
put (", Position") ; put (fp) ;
read block (block, fb) ;
IF fp < 256
THEN show first (block)
ELSE show second (block)
END IF ;
block shown := true ;
st pos := (fp MOD 256) - 1 ;
block nummer := fb ;
ELSE put ("Nicht gefunden !!");
FI .
hex search :
cursor (command line x pos + 1, command line y pos) ;
put ("Suchhex :") ; getline (t) ;
cursor (command line x pos + 1, command line y pos) ;
put ("suchen nach """+ t +""" von Block :") ;
x get (s) ;
cursor (command line x pos + 1, command line y pos) ;
put ("suchen nach """+ t +""" von Block") ;
put (s) ; put ("bis Block :") ; x get (e) ;
change all (t, " ", "") ;
TEXT VAR such hex := "" ;
i := 1 ;
REPEAT
such hex CAT code (hint (subtext (t, i, i + 1))) ;
i INCR 2
UNTIL i >= length (t) END REPEAT ;
search (such hex, s, e, fb, fp) ;
out (""13"") ;
IF fp > 0
THEN put (cl eol +"Gefunden auf Block") ; put (fb) ;
put (", Position") ; put (fp) ;
read block (block, fb) ;
IF fp < 256
THEN show first (block)
ELSE show second (block)
END IF ;
block shown := true ;
st pos := (fp MOD 256) - 1 ;
block nummer := fb ;
ELSE put ("Nicht gefunden !!");
FI .
dez search :
error stop ("gibt es noch nicht !") .
END PROCEDURE search menue ;
(********************** Block-Editor-Menue ****************************)
PROCEDURE edit block menue :
INT VAR command index ;
disable stop ;
REPEAT
fehler loeschen ;
show first three ints ;
menue monitor (editor info line, editor chars, command index) ;
SELECT command index OF
CASE 1 : out ("irst") ;
show first (block) ;
block shown := true
CASE 2 : out ("econd") ;
show second (block) ;
block shown := true
CASE 3 : out ("ump") ;
show first (block) ; block edit (block, stpos) ;
show second (block) ; block edit (block, stpos) ;
block shown := true ;
CASE 4 : IF NOT block shown
THEN IF first
THEN show first (block)
ELSE show second (block)
END IF ;
block shown := true
END IF ;
(* IF first AND stpos >= 256
THEN show second (block) ;
block shown := true
ELIF NOT first AND stpos <= 256
THEN show first (block) ;
block shown := true
END IF ; *) (* ??? *)
block edit (block, stpos)
CASE 5 : LEAVE edit block menue
CASE 6 : get and do one command ; block shown := false
CASE 7 : block editor menue help ; block shown := false
CASE 8 : set ctrl g
CASE 9 : INT VAR old st pos := st pos ;
out ("os auf Byte : ") ;
x get (st pos) ;
IF st pos < 0 OR st pos > 513
THEN st pos := old st pos ;
error stop ("Zahl nicht ok")
END IF
END SELECT ;
fehler behandeln
UNTIL ctrl g END REPEAT .
show first three ints :
cursor (1, 18) ;
put (""5"1.INT : ") ;
TEXT VAR h :: "" ; h HEX block (1) ;
INT VAR ih := block (1) ;
h CAT ("/ " + text (ih)) ;
put (h) ;
put (", 2.INT : ") ;
h := "" ; h HEX block (2) ;
ih := block (2) ;
h CAT ("/ " + text (ih)) ;
put (h) ;
put (", 3.INT : ") ;
h := "" ; h HEX block (3) ;
ih := block (3) ;
h CAT ("/ " + text (ih)) ;
put (h) .
END PROCEDURE edit block menue ;
(********************** Space-Menue ****************************)
PROCEDURE space menue :
disable stop ;
REPEAT
menue monitor (space info line, space chars, command index) ;
fehler loeschen ;
rewind ;
SELECT command index OF
CASE 1 : read one space
CASE 2 : bit map read
CASE 3 : write one space
CASE 4 : bit map write
CASE 5 : edit one space
CASE 6 : copy one space
CASE 7 : LEAVE space menue
CASE 8 : new edit
CASE 9 : get and do one command
CASE 10 : load one space
CASE 11 : space menue help
CASE 12 : set ctrl g
END SELECT ;
fehler behandeln ;
display info line ;
UNTIL ctrl g END REPEAT .
load one space :
out ("aden aus Datei : ") ;
getline (dummy) ;
forget (ds) ;
ds := nilspace ;
ds := old (dummy) .
read one space :
cursor (info line x pos, info line y pos) ;
out (space header info) ;
cursor (command line x pos + 2, command line y pos) ;
out ("ead ") ;
REPEAT
get char (dummy)
UNTIL pos ("shq"7"", dummy) > 0 END REPEAT ;
IF dummy = "s"
THEN out ("Space : ") ; read one s
ELIF dummy = "h"
THEN out ("Header : ") ; read one h
ELIF dummy = ""7""
THEN set ctrl g
END IF .
read one s :
x get (space nummer) ;
IF NOT is error
THEN seek space (space nummer) ;
first sp block := block number + 1 ;
forget (ds) ;
ds := nilspace ;
read space (ds)
END IF .
read one h :
x get (header nummer) ;
space nummer := space nr (header nummer) ;
IF NOT is error
THEN seek space (space nummer) ;
first sp block := block number + 1 ;
forget (ds) ;
ds := nilspace ;
read space (ds)
END IF .
bit map read :
out ("ead Space ab Block : ") ;
x get (s) ;
cursor (command line x pos + 1, command line y pos) ;
out ("Read Space ab Block "+ text (s) +" Max. Bloecke : ") ;
x get (e) ;
seek block (s) ;
IF e = 0
THEN e := 32000
END IF ;
forget (ds) ;
ds := nilspace ;
IF yes ("bei Lesefehlern abbrechen")
THEN read space (ds, e, true)
ELSE read space (ds, e, false)
END IF .
write one space :
out ("rite") ;
IF yes ("write auf Space "+ text (space nummer))
THEN seek space (space nummer) ;
write space (ds)
ELIF yes ("write auf einen anderen Space")
THEN out (" auf Space : ") ;
x get (space nummer) ;
IF NOT is error
THEN seek space (space nummer) ;
write space (ds)
END IF
END IF .
bit map write :
out ("rite Space ab Block : ") ;
x get (s) ;
seek block (s) ;
write space (ds) .
edit one space :
IF type (ds) = file type 16
THEN change to 17 ;
f := sequential file (modify, ds) ;
edit (f, 1, 1, x size - 2, 16) ;
block shown := false
ELIF type (ds) = file type
THEN f := sequential file (modify, ds) ;
edit (f, 1, 1, x size - 2, 16) ;
block shown := false
ELIF ds pages (ds) = 1 CAND type (ds) = 0
THEN edit header ;
block shown := false
END IF .
change to 17 :
TEXT VAR t := "" ;
REPEAT
t CAT ""
UNTIL NOT exists (t) END REPEAT ;
copy (ds, t) ;
reorganize (t) ;
forget (ds) ;
ds := nilspace ;
ds := old (t) ;
forget (t, quiet) .
copy one space :
put ("ave in Datei : ") ;
getline (t) ;
copy (ds, t) .
edit header :
bound header := ds ;
cursor (1, 23) ;
out (cl eol +"Header-Editor : ") ;
IF is start header (bound header)
THEN out ("Header ist ein Archiv-Startheader.")
ELIF is file header (bound header)
THEN out ("Header ist ein File-Header.")
ELIF is end header (bound header)
THEN out ("Header ist ein Archiv-Endheader.")
ELSE out ("Header ist unbekannt (Headertype = "+ text (type (bound header)) +").")
END IF ;
header edit (bound header, "Headernummer : "+ text (header nr) + " ") .
new edit :
out (left +"new edit ") ;
block shown := false ;
IF yes ("Neuen Headerspace erstellen")
THEN create new header
ELSE create new file
END IF .
create new header :
forget (ds) ;
ds := nilspace ;
bound header := ds ;
bound header := nil header ;
cursor (1, 23) ;
out (cl eol +"Header-Editor : ") ;
put ("Neuen Header erstellen") ;
header edit (bound header, "Neuen Header erstellen") .
create new file :
forget (ds) ;
ds := nilspace ;
f := sequential file (modify, ds) ;
edit (f, 1, 1, x size - 2, 16) .
END PROCEDURE space menue ;
(********************** Configurator-Menu ****************************)
PROCEDURE configurator menue :
disable stop ;
REPEAT
display conf info ;
menue monitor (conf info line, conf chars, command index) ;
fehler loeschen ;
SELECT command index OF
CASE 1 : put ("hannel :") ; x get (archive channel) ;
CASE 2 : put (left +"disktype :") ; x get (disk type) ;
CASE 3 : disk info
CASE 4 : get and do one command
CASE 5 : LEAVE configurator menue
CASE 6 : conf menue help
CASE 7 : set ctrl g
END SELECT ;
fehler behandeln ;
display info line ;
UNTIL ctrl g END REPEAT .
display conf info :
cursor (1, 19) ;
put (cl eol +"I/O Channel :") ; put (archive channel) ; put (",") ;
put ("Disktype :") ; put (disk type) ; put (",") ;
put ("Operatorchannel :") ; put (channel) ;
cursor (1, 18) ;
put ("Zeit :") ; put (time of day) ; put (", Datum :") ; put (date) ;
INT VAR x size, x used ;
storage (x size, x used) ;
put (",") ; put (x used) ; put ("K von") ;
put (int (real (x size + 24) * 64.0 / 63.0)) ;
put ("K sind belegt !") .
disk info :
INT VAR size, io, error ;
io control (archive channel, io, size, error) ;
out (home + 16 * (cl eol + down)) ;
out (home + down) ;
putline ("Diskinfo :") ;
putline (first mon line) ;
put ("Disksize :") ; put (size) ; put ("Blocks,") ;
put (size DIV 2) ; put ("kB.") ;
line ;
put ("Disktype :") ;
IF size = ibm 720 format 5
THEN putline ("5 1/4 Zoll, IBM-720 kB Format, 80 Tracks,") ;
putline (" double sided/double density, softsectored")
ELIF size = ibm 360 format 5
THEN putline ("5 1/4 Zoll, IBM-360 kB Format, 40 Tracks,") ;
putline (" single sided/double density, softsectored")
ELIF size = pic 400 format 5
THEN putline ("5 1/4 Zoll, PIC400 Format, 80 Tracks,") ;
putline (" double sided/double density, softsectored")
ELIF size = soft sd 8
THEN putline ("8 Zoll, EUMEL-Format, 77 Tracks,") ;
putline (" single sided/double density, softsectored")
ELIF size = soft dd 8
THEN putline ("8 Zoll, EUMEL-Format, 77 Tracks,") ;
putline (" double sided/double density, softsectored")
ELIF size = hard ss sd
THEN putline ("8 Zoll, EUMEL-Format, 32 Tracks,") ;
putline (" single sided/single density, hardsectored")
ELIF size = hard ds sd
THEN putline ("8 Zoll, EUMEL-Format, 32 Tracks,") ;
putline (" double sided/single density, hardsectored")
ELSE putline ("Unbekannter Disktype") ; line
END IF ;
putline (first mon line) .
END PROCEDURE configurator menue ;
(********************** Header/Space Ops. ****************************)
INT PROCEDURE header nr :
IF space nummer = 0
THEN 0
ELSE (space nummer + 1) DIV 2
END IF .
END PROCEDURE header nr ;
INT PROCEDURE space nr (INT CONST header nummer) :
IF header nummer = 0 COR header nummer = 1
THEN header nummer
ELSE header nummer * 2 - 1
END IF
END PROCEDURE space nr ;
(********************** Archiv-Menue ****************************)
PROCEDURE archive menue :
archive (archive name) ;
disable stop ;
REPEAT
menue monitor (archiv info line, archiv chars, command index) ;
fehler loeschen ;
SELECT command index OF
CASE 1 : archive anmelden
CASE 2 : out ("elease (archive)") ;
release (archive) ; archivename := ""
CASE 3 : out ("ist (archive)") ;
list archive ;
block shown := false
CASE 4 : out ("etch (SOME archive, archive)") ;
fetch (SOME archive, archive) ;
block shown := false
CASE 5 : out ("ave (SOME all, archive)") ;
save (SOME all, archive) ;
block shown := false
CASE 6 : release (archive) ;
LEAVE archive menue
CASE 7 : get and do one command ;
block shown := false
CASE 8 : archiv menue help ;
block shown := false
CASE 9 : set ctrl g
END SELECT ;
fehler behandeln
UNTIL ctrl g END REPEAT .
archive anmelden :
put ("rchivename : ") ;
getline (archivename) ;
archive (archivename) .
list archive :
IF NOT (list file ok) COR no (""13"Alte Archiveliste zeigen")
THEN forget (af ds) ;
af ds := nilspace ;
af := sequential file (output, af ds) ;
list (af, archive) ;
list file ok := true
END IF ;
edit (af, 1, 1, xsize - 2, 16) .
END PROCEDURE archive menue ;
(********************** Urflop-Menue ****************************)
PROCEDURE urflop menue :
INT VAR s, e ;
disable stop ;
REPEAT
menue monitor (urflop info line, urflop chars, command index) ;
fehler loeschen ;
SELECT command index OF
CASE 1 : read
CASE 2 : x read
CASE 3 : write
CASE 4 : x write
CASE 5 : list task ;
block shown := false
CASE 6 : LEAVE urflop menue
CASE 7 : get and do one command ;
block shown := false
CASE 8 : urflop menue help ;
block shown := false
CASE 9 : set ctrl g
END SELECT ;
fehler behandeln
UNTIL ctrl g END REPEAT .
list task :
forget (l ds) ;
l ds := nilspace ;
lf := sequential file (output, l ds) ;
list (lf) ;
edit (lf, 1, 1, xsize - 2, 16) .
write :
out ("rite Datenraumname : ") ;
getline (t) ;
IF yes ("Urlader schreiben wie gelesen")
THEN urlader schreiben (t, eumel 0 start block,
-1)
ELIF yes ("Urlader für PIC 400 (Shard 6.xx) schreiben")
THEN urlader schreiben (t, eumel 0 start block,
eumel 0 end block pic)
ELIF yes ("Urlader für PIC 400 (Shard 7.xx, u. Bicos Masch.) schreiben")
THEN urlader schreiben (t, eumel 0 start block,
eumel 0 end block)
ELIF yes ("Urlader für PIC 400 (ab Shard 7.13 für EUMEL Ver. 1758) schreiben")
THEN urlader schreiben (t, eumel 0 start block,
eumel 0 end block 1758)
END IF .
x write :
out ("rite Datenraumname : ") ;
getline (t) ;
cursor (command line x pos, command line y pos) ;
out (">Write Datenraum """+ t +""" von Block : ") ;
x get (s) ;
cursor (command line x pos, command line y pos) ;
out (">Write Datenraum """+ t +""" von Block "+ text (s) + " bis : ") ;
x get (e) ;
cursor (command line x pos, command line y pos) ;
out (">Write Datenraum """+ t +""" von Block "+ text (s) + " bis"+
" Block "+ text (e)) ;
IF yes ("mit Versatz")
THEN cursor (command line x pos, command line y pos) ;
out (">Write Datenraum """+ t +""" von Block "+ text (s) + " bis"+
" Block "+ text (e) +" Versatz : ") ;
x get (ver) ;
cursor (command line x pos, command line y pos) ;
out (">Write Datenraum """+ t +""" von Block "+ text (s) + " bis"+
" Block "+ text (e) +" Ver. "+ text (ver) + " --> ") ;
urlader schreiben (t, s, e, ver)
ELSE cursor (command line x pos, command line y pos) ;
out (">Write Datenraum """+ t +""" von Block "+ text (s) + " bis"+
" Block "+ text (e) +" --> ") ;
urlader schreiben (t, s, e)
END IF .
read :
out ("ead Datenraumname : ") ;
getline (t) ;
IF yes ("Urlader für PIC 400 (Shard 6.xx) lesen")
THEN urlader lesen (t, eumel 0 start block,
eumel 0 end block pic)
ELIF yes ("Urlader für PIC 400 (Shard 7.xx, u. Bicos Masch.) lesen")
THEN urlader lesen (t, eumel 0 start block,
eumel 0 end block)
ELIF yes ("Urlader für PIC 400 (Shard 7.xx für EUMEL Ver. 1758) lesen")
THEN urlader lesen (t, eumel 0 start block,
eumel 0 end block 1758)
END IF .
x read :
out ("ead Datenraumname : ") ;
getline (t) ;
cursor (command line x pos, command line y pos) ;
out (">Read Datenraum """+ t +""" von Block : ") ;
x get (s) ;
cursor (command line x pos, command line y pos) ;
out (">Read Datenraum """+ t +""" von Block "+ text (s) + " bis : ") ;
x get (e) ;
IF yes ("mit Versatz")
THEN cursor (command line x pos, command line y pos) ;
out (">Read Datenraum """+ t +""" von Block "+ text (s) + " bis"+
" Block "+ text (e) +" Versatz : ") ;
x get (ver) ;
cursor (command line x pos, command line y pos) ;
out (">Read Datenraum """+ t +""" von Block "+ text (s) + " bis"+
" Block "+ text (e) +" Ver. "+ text (ver) + " --> ") ;
urlader lesen (t, s, e, ver)
ELSE cursor (command line x pos, command line y pos) ;
out (">Read Datenraum """+ t +""" von Block "+ text (s) + " bis"+
" Block "+ text (e) +" --> ") ;
urlader lesen (t, s, e)
END IF .
END PROCEDURE urflop menue ;
(********************** Disk - Monitor Call ****************************)
PROCEDURE central disk monitor process :
archive ("disk") ;
release (archive) ;
space nummer := -1 ;
block nummer := -1 ;
header nummer := -1 ;
first sp block := -1 ;
st pos := 0 ;
archive name := "" ;
list file ok := false ;
block shown := false ;
reset ctrl g ;
page ;
line (3) ;
putline ("D I S K - M O N I T O R") ;
putline ("=========================") ;
line ;
putline ("Autor : Ingo Siekmann") ;
putline ("Stand : "+ software stand) ;
putline (software version) ;
putline ("Bem. : "+ software bemerkung) ;
putline (" "+ software bemerkung1) ;
line ;
putline ("(c) 1986 by ULES c/o Ingo Siekmann & Nils Ehnert") ;
line ;
initialize if necessary ;
global menue ;
line ;
unblock (archive) ;
IF archive name <> "" CAND NOT ctrl g
THEN archive (archive name)
END IF .
END PROCEDURE central disk monitor process ;
(********************** Unterprogramme ****************************)
THESAURUS OPERATOR SOME (THESAURUS CONST thesaurus) :
DATASPACE VAR edit space :: nilspace ;
THESAURUS VAR result := empty thesaurus ;
FILE VAR file := sequential file (output, edit space) ;
file FILLBY thesaurus ;
modify (file) ;
edit (file, 1, 1, xsize - 2, 16) ;
input (file) ;
result FILLBY file ;
forget (edit space) ;
result .
END OPERATOR SOME ;
THESAURUS OPERATOR SOME (TASK CONST dest task) :
SOME ALL dest task .
END OPERATOR SOME ;
PROCEDURE display info line :
INT VAR x, y ;
get cursor (x, y) ;
cursor (1, 24) ;
put (cl eol +"Block : ") ; put (block nummer) ;
put (", Space : ") ; put (space nummer) ;
put (", First Sp Block : ") ; put (first sp block) ;
put (", Header : ") ; put (header nummer) ;
cursor (x, y) .
END PROCEDURE display info line ;
PROCEDURE x get (INT VAR i) :
enable stop ;
get (dummy) ;
IF (dummy SUB length (dummy)) = hex marker
THEN i := hint (text (dummy, length (dummy) - 1))
ELSE i := int (dummy)
END IF ;
IF NOT last conversion ok
THEN error stop ("Zahl ist nicht korrekt")
END IF .
END PROCEDURE x get ;
(********************** Urflop - Ops. ****************************)
PROCEDURE urlader lesen (TEXT CONST urname, INT CONST start, end) :
urlader lesen (urname, start, end, 0) .
END PROCEDURE urlader lesen ;
PROCEDURE urlader schreiben (TEXT CONST urname, INT CONST start, end) :
urlader schreiben (urname, start, end, 0) .
END PROCEDURE urlader schreiben ;
PROCEDURE urlader lesen auf seite (TEXT CONST urname, INT CONST start, end,
auf) :
urlader lesen (urname, start, end, auf - start) .
END PROCEDURE urlader lesen auf seite ;
PROCEDURE urlader schreiben von seite (TEXT CONST urname, INT CONST start,
end, von) :
urlader schreiben (urname, start, end, von - start) .
END PROCEDURE urlader schreiben von seite ;
PROCEDURE urlader lesen (TEXT CONST urname, INT CONST start, end, ver) :
IF exists (urname)
THEN error stop (""""+ urname +""" gibt es schon")
END IF ;
forget (uds) ;
uds := nilspace ;
reset block io ;
reset ctrl g ;
FOR block nr FROM start UPTO end REPEAT
continue (archive channel) ;
disable stop ;
block in (uds, block nr + ver, disk type, block nr, error) ;
continue (user channel) ;
enable stop ;
check archive error (error, true) ;
cout (block nr) ;
dummy := incharety ;
IF dummy = ""7""
THEN set ctrl g
END IF
UNTIL dummy = esc COR ctrl g END REPEAT ;
IF NOT ctrl g
THEN copy (uds, urname) ;
END IF ;
forget (uds) .
END PROCEDURE urlader lesen ;
PROCEDURE urlader schreiben (TEXT CONST urname, INT CONST start, end, ver) :
forget (uds) ;
uds := old (urname) ;
reset ctrl g ;
reset block io ;
block nr := start;
IF block nr = -1
THEN block nr := next ds page (uds, block nr)
END IF ;
WHILE block nr <> -1 REPEAT
continue (archive channel) ;
disable stop ;
block out (uds, block nr + ver, disk type, block nr, error) ;
break (quiet);
continue (user channel) ;
enable stop ;
check archive error (error, false) ;
cout (block nr) ;
dummy := incharety ;
IF dummy = ""7""
THEN set ctrl g
END IF ;
IF end = -1 COR start = -1
THEN block nr := next ds page (uds, block nr)
ELIF block nr = end
THEN block nr := -1
ELSE block nr INCR 1
END IF
UNTIL dummy = esc COR ctrl g END REPEAT ;
forget (uds) .
END PROCEDURE urlader schreiben ;
(********************** Unterprogramme ****************************)
PROCEDURE reset block io :
user channel := channel ;
INT VAR i, s, e ;
io control (archive channel, i, s, e) ;
check archive error (e, true) .
END PROCEDURE reset block io ;
PROCEDURE get and do one command :
initialize if necessary ;
cursor (1, 21) ;
out (cl eop) ;
get command ("gib ein EUMEL-Kommando : ", own command line) ;
do (own command line) .
END PROCEDURE get and do one command ;
PROCEDURE io control (INT VAR io, size, error) :
ROW 256 INT VAR block ;
control (type mode, 0, 0, io) ;
control (size mode, 0, 0, size) ;
block in (block, std disk type, block 0, error) .
END PROCEDURE io control ;
PROCEDURE io control (INT CONST io channel, INT VAR io, size, error) :
INT VAR op channel :: channel ;
continue (io channel) ;
io control (io, size, error) ;
break (quiet) ;
continue (op channel) .
END PROCEDURE io control ;
(********************** Menue - Help Ops ****************************)
PROCEDURE global menue help :
out (home + cl eop) ;
line ;
putline ("Help für das Global-Menue : ") ;
line ;
putline ("b --> Aufruf des Block-Menüs (direkter Block i/o)") ;
putline ("s --> Aufruf des Space-Menüs (direkter Space- und Header i/o)") ;
putline ("a --> Aufruf des Archiv-Menüs (normale Archivoperationen)") ;
putline ("u --> Aufruf des Urflop-Menüs (Urlader/Datenraum <-> Floppy)") ;
putline ("c --> Aufruf des Konfigurator-Menüs") ;
line ;
putline ("k --> Möglichkeit, ein EUMEL/ELAN - Kommando zu geben (gib kommando :)") ;
line ;
putline ("q --> Verlassen des Diskettenmonitors (quit wie im Editor)") ;
END PROCEDURE global menue help ;
PROCEDURE block menue help :
out (home + cl eop) ;
line ;
putline ("Help für das Block-Menü : ") ;
line ;
putline ("r --> Lesen eines Blockes (block in)") ;
putline ("n --> Lesen des nächsten Blockes") ;
putline ("w --> Schreiben eines Blockes (block out)") ;
line ;
putline ("s --> Suchen nach einem Text") ;
line ;
putline ("e --> Aufruf des Blockeditor-Menüs") ;
line ;
putline ("k --> Möglichkeit, ein EUMEL/ELAN - Kommando zu geben (gib kommando :)") ;
line ;
putline ("q --> Verlassen des Block-Menüs (Rückkehr ins Global-Menü)") ;
END PROCEDURE block menue help ;
PROCEDURE block editor menue help :
out (home + cl eop) ;
line ;
putline ("Help für das Blockeditor-Menü : ") ;
line ;
putline ("f --> Zeigen der ersten 256 Bytes des aktuellen Blockes") ;
putline ("s --> Zeigen der zweiten 256 Bytes des aktuellen Blockes") ;
line ;
putline ("e --> Editieren des aktullen Teilblockes") ;
putline ("d --> Editieren des ersten und zweiten Teilblockes") ;
line ;
putline ("p --> Position setzen, auf der der Editor beginnen soll.") ;
line ;
putline ("k --> Möglichkeit, ein EUMEL/ELAN - Kommando zu geben (gib kommando :)") ;
line ;
putline ("q --> Verlassen des Blockeditor-Menüs (Rückkehr ins Block-Menü)") ;
END PROCEDURE block editor menue help ;
PROCEDURE space menue help :
out (home + cl eop) ;
line ;
putline ("Help für das Space-Menü : ") ;
line ;
putline ("r --> Lesen eines Datenraums bzw. eines Headers") ;
putline ("R --> Lesen eines Datenraums ab Block x") ;
putline ("w --> Schreiben eines Datenraums bzw. eines Headers") ;
putline ("W --> Schreiben eines Datenraums ab Block x") ;
line ;
putline ("e --> Editieren des aktullen Datenraums (Datei o. Header)") ;
putline ("E --> Editieren einer neuen Datei oder eines Header") ;
line ;
putline ("s --> Kopieren des aktuellen Datenraums in eine benannten Datenraum") ;
putline ("l --> Kopieren eines benannten Datenraums in den aktuellen Datenraum") ;
line ;
putline ("k --> Möglichkeit, ein EUMEL/ELAN - Kommando zu geben (gib kommando :)") ;
putline ("q --> Verlassen des Space-Menüs (Rückkehr ins Global-Menü)") ;
END PROCEDURE space menue help ;
PROCEDURE archiv menue help :
out (home + cl eop) ;
line ;
putline ("Help für das Archiv-Menü : ") ;
line ;
putline ("a --> Archiv anmelden") ;
putline ("r --> Archiv abmelden") ;
line ;
putline ("f --> Einige Dateien vom Archiv in die Task laden") ;
putline ("s --> Einige Dateien der Task auf das Archiv schreiben") ;
putline ("l --> Dateiliste des Archives zeigen") ;
line ;
putline ("k --> Möglichkeit, ein EUMEL/ELAN - Kommando zu geben (gib kommando :)") ;
line ;
putline ("q --> Verlassen des Archiv-Menüs (Rückkehr ins Global-Menü)") ;
END PROCEDURE archiv menue help ;
PROCEDURE urflop menue help :
out (home + cl eop) ;
line ;
putline ("Help für das Urflop-Menü : ") ;
line ;
putline ("r --> Lesen der Blöcke 10 bis 62 in einen benannten Datenraum") ;
putline ("R --> Lesen der Blöcke x bis y in einen benannten Datenraum") ;
line ;
putline ("w --> Schreiben der Blöcke 10 bis 62 aus einem benannten Datenraum") ;
putline ("W --> Schreiben der Blöcke x bis y aus einem benannten Datenraum") ;
line ;
putline ("l --> Dateiliste der Task zeigen (list)") ;
line ;
putline ("k --> Möglichkeit, ein EUMEL/ELAN - Kommando zu geben (gib kommando :)") ;
line ;
putline ("q --> Verlassen des Urflop-Menüs (Rückkehr ins Global-Menü)") ;
END PROCEDURE urflop menue help ;
PROCEDURE conf menue help :
out (home + cl eop) ;
line ;
putline ("Help für das Configurator-Menü :") ;
line ;
putline ("c --> Einstellen des Kanals, auf dem der Block i/o abläuft") ;
putline ("t --> Einstellen des Diskettentypes (EUMEL, CPM etc)") ;
line ;
putline ("i --> Disketteninfo") ;
line ;
putline ("k --> Möglichkeit, ein EUMEL/ELAN - Kommando zu geben (gib kommando :)") ;
line ;
putline ("q --> Verlassen des Archiv-Menüs (Rückkehr ins Global-Menü)") ;
END PROCEDURE conf menue help ;
BOOL PROCEDURE is halt from terminal :
is error CAND error code = 1
END PROCEDURE is halt from terminal ;
PROCEDURE block in (TEXT VAR block, INT CONST block nr, disk type,
INT VAR error) :
initialize if necessary ;
block in (blkinds, heap page nr, disk type, block nr, error) ;
block := subtext (bound text, start pos, LENGTH bound text) ;
END PROCEDURE block in ;
PROCEDURE initialize if necessary :
IF NOT initialized (this packet)
THEN forget (blkinds) ;
blkinds := nilspace ;
bound text := blkinds ;
bound text := (start pos + 511) * " " ;
own command line := "" ;
archive channel := std archive channel ;
disk type := std disk type
END IF .
END PROCEDURE initialize if necessary ;
BOOL PROCEDURE yes (TEXT CONST msg) :
get cursor (cx, cy) ;
cursor (command line x pos + 1, command line y pos + 1) ;
result := NOT no (msg) ;
cursor (cx, cy) ;
result .
END PROCEDURE yes ;
(*
INT OPERATOR $ (TEXT CONST hex) :
INT VAR laenge := length (hex), stelle, ziffer, ergebnis := 0 ;
FOR stelle FROM laenge DOWNTO 1 REPEAT
ziffer := pos ("0123456789ABCDEF", hex SUB stelle) - 1 ;
IF ziffer < 0
THEN error stop ("Ist keine Hexzahl")
END IF ;
ergebnis INCR ziffer * 16 ** (laenge - stelle)
END REPEAT ;
ergebnis .
END OPERATOR $ ;
*)
PROCEDURE search (TEXT CONST st, INT CONST start block, end block,
INT VAR fbnr, fpos) :
enable stop ;
INT CONST l := LENGTH st - 1 ;
reset ctrl g ;
reset block io ;
FOR fbnr FROM start block UPTO end block REPEAT
cout (fbnr) ;
continue (archive channel) ;
block in (stb1, fbnr, disk type, error) ;
IF error = 0
THEN block in (stb2, fbnr + 1, disk type, error)
END IF ;
break (quiet) ;
continue (user channel) ;
check archive error (error, true) ;
stb1 CAT text (stb2, l) ;
UNTIL pos (stb1, st) > 0 COR incharety = ""27"" END REPEAT ;
fpos := pos (stb1, st)
END PROCEDURE search ;
END PACKET byte operations and disk monitor version 35 multi ;
|