ENTCOM.TXT ---------- Processor Technology ENT-to-COM File Converter by Emmanuel ROCHE Ok. A few weeks ago, I published on the comp.os.cpm Newsgroup a specification of the ENT files used on the SOL computer to load binary programs into memory. As explained then, ENT files are merely a dump of memory, without any checksum. As a result, they are a very, very bad way of storing and loading a program... But they seem to be a "de facto" standard, and several ENT files are available on the Internet, some of which seeming to contain copies of lost programs... For example, during my quick browse for samples, I noticed a FOCAL and a "6.5K Byte Shop BASIC Revision 'C'" interpreter... I had never heard about this BASIC (also containing the string "MSA BASIC") before (is anybody out there who was a fan of the SOL computer who could tell us more about it?), however, I had already saved from oblivion 2 others FOCAL interpreters, so I decided to have a try saving it/them. As usual, life interfered with my will. Finally, last night the opportunity arised: it rained all day long, I worked hard all day long, I had nothing to read before going to bed, and I wanted to not think about all the work that I had still to do: Programming, with its need of mental concentration, was the perfect solution to forget everything during a few hours. (In fact, since I had already started playing with the problem, I quickly (one hour) came to a solution.) So, you are going to see one way to solve the problem. However, for once, I must warn you that I only tested this program on 2 ENT files... and only interactively on screen! So, if you ever find a bug in the working of the program, please "respond to the newsgroup", so that people can update it. Since you will probably not be interested in long dumps (which will be essentials when recreating the source codes), I edited the output of the program, keeping only the most interesting parts. run ENT-to-COM> Enter ENT File Name: ? focal 0000| CD A7 13 C3 B8 04 00 00 C6 00 5F 7A CE 00 57 79 |.........._z..Wy 0010| CE 00 C3 A2 17 D6 00 7D DE 00 6F 7C DE 00 67 7B |.......}..o|..g{ 0020| DE 00 5F 3E 00 C9 C6 00 6F 7C CE 00 67 7B CE 00 |.._>....o|..g{.. 0030| 5F 3E 00 C3 0E 18 00 00 00 00 00 00 00 00 00 00 |_>.............. Obviously not a CP/M COMmand uses directly the 8080 restart points. 1510| 47 CD 72 14 06 0A CD 72 14 AF D3 FA C1 E1 C9 52 |G.r....r.......R 1520| 65 77 69 6E 64 20 74 61 70 65 20 75 6E 69 74 20 |ewind tape unit 1530| 00 20 28 48 69 74 20 72 65 74 75 72 6E 20 77 68 |. (Hit return wh 1540| 65 6E 20 72 65 77 6F 75 6E 64 29 20 00 00 00 00 |en rewound) .... A cassette tape player! This FOCAL must definitively not have run under CP/M... 1C10| 20 20 20 20 20 20 20 20 43 61 73 73 65 74 74 65 | Cassette 1C20| 20 46 4F 43 41 4C 28 54 4D 29 20 31 2E 30 20 20 | FOCAL(TM) 1.0 1C30| 20 28 4D 4F 44 20 30 30 30 29 0D 20 20 20 43 6F | (MOD 000). Co 1C40| 70 79 72 69 67 68 74 20 28 43 29 20 31 39 37 38 |pyright (C) 1978 1C50| 20 50 72 6F 63 65 73 73 6F 72 20 54 65 63 68 6E | Processor Techn 1C60| 6F 6C 6F 67 79 20 43 6F 72 70 2E 0D 20 20 20 20 |ology Corp.. 1C70| 20 20 20 20 20 20 20 20 2A 2A 20 41 4C 4C 20 52 | ** ALL R 1C80| 49 47 48 54 53 20 52 45 53 45 52 56 45 44 20 2A |IGHTS RESERVED * 1C90| 2A 0D 00 |*.. First address: 0000 Last address: 1C92 Bytes read: 1C93 Records read: 39 So, this "Cassette FOCAL Version 1.0" was made by Processor Technology Corp. in 1978. Could someone tell us (1) if the paper doc is available, and (2) if the source code is available? (Else, it is only 7.5K, so could be an interesting programming project: FOCAL interpreters are much more rarer than BASIC interpreters... By the way, let us have a look to the unknown BASIC.) Ok run ENT-to-COM> Enter ENT File Name: ? msabasic 0100| AF D3 FE D3 C8 CD D5 C0 CD F9 C2 C3 1A 01 21 1A |..............!. 0110| 01 22 0C 01 21 0C 02 CD 00 02 21 80 01 11 00 C9 |."..!.....!..... 0120| 01 B0 01 31 E9 CB AF 32 07 C8 7E 12 7C B8 C2 36 |...1...2..~.|..6 0130| 01 7D B9 CA 00 C9 23 13 C3 2A 01 11 00 02 01 00 |.}....#..*...... 0140| A0 AF 12 7A B8 C2 4B 01 C3 60 01 13 C3 41 01 20 |...z..K..`...A. 0150| FF 22 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |." 1D10| 03 CD B1 03 21 F7 02 22 02 00 E9 57 41 4E 54 20 |....!.."...WANT 1D20| 53 49 4E 2D 43 4F 53 2D 54 41 4E 2D 41 54 4E 00 |SIN-COS-TAN-ATN. 1D30| 0D 0A 0A 0A 43 4F 52 45 20 41 4C 4C 4F 43 41 54 |....CORE ALLOCAT 1D40| 49 4F 4E 00 0D 4C 49 4E 45 20 4C 45 4E 47 54 48 |ION..LINE LENGTH 1D50| 00 0D 54 52 49 47 4F 4E 4F 4D 45 54 52 49 43 20 |..TRIGONOMETRIC 1D60| 46 55 4E 43 54 49 4F 4E 53 00 20 42 59 54 45 53 |FUNCTIONS. BYTES 1D70| 20 4F 46 20 43 4F 52 45 20 41 56 41 49 4C 41 42 | OF CORE AVAILAB 1D80| 4C 45 0A 0A 0A 00 20 20 20 20 42 59 54 45 20 53 |LE.... BYTE S 1D90| 48 4F 50 20 42 41 53 49 43 0D 0A 20 20 20 20 20 |HOP BASIC.. 1DA0| 20 36 2E 35 2D 4B 20 56 45 52 53 49 4F 4E 0D 0A | 6.5-K VERSION.. 1DB0| 20 20 20 20 20 20 52 45 56 49 53 49 4F 4E 20 27 | REVISION ' 1DC0| 43 27 0D 0A 0A 0A 00 0A 00 00 00 00 00 00 00 00 |C'.............. It probably starts by asking if the user wants to keep the sin and trig functions, the size of memory used, and the length of the command line. This is quite similar to the boot sequence of "Altair 8K BASIC". 2010| 2A 2A 2A 2A 2A 2A 2A 2A 2A 2A 2A 2A 2A 0D 0A 20 |*************.. 2020| 20 20 20 20 20 20 20 20 20 20 20 20 20 2A 20 4D | * M 2030| 53 41 20 42 41 53 49 43 20 2A 0D 0A 20 20 20 20 |SA BASIC *.. 2040| 20 20 20 20 20 20 20 20 20 20 2A 2A 2A 2A 2A 2A | ****** 2050| 2A 2A 2A 2A 2A 2A 2A 0D 0A 00 2A 2A 2A 2A 2A 2A |*******...****** 2060| 2A 2A 2A 0D 0A 00 2A 2A 2A 2A 2A 2A 2A 2A 2A 2A |***...********** 2070| 2A 2A 2A 2A 2A 0D 0A 00 00 40 00 00 40 00 00 00 |*****....@..@... 2080| 0D 0A 0A 20 20 20 20 20 20 20 20 20 20 20 20 20 |... 2090| 20 53 4F 4C 4F 53 20 56 45 52 53 49 4F 4E 0D 0A | SOLOS VERSION.. 20A0| 00 0A 0A 20 20 20 20 20 43 55 54 45 52 20 56 45 |... CUTER VE 20B0| 0D 0A 0A 20 20 20 20 20 20 20 20 20 20 20 20 20 |... 20C0| 20 43 55 54 45 52 20 56 45 52 53 49 4F 4E 0D 0A | CUTER VERSION.. 20D0| 00 FF FF FF BF BF FF FF 00 40 00 10 00 40 00 00 |.........@...@.. 20E0| FF FF FF FF FF FF F7 FF 00 00 00 00 00 40 00 00 |.............@.. 20F0| BF FF FF FF 7F 7F FF FF 00 40 00 00 00 80 00 00 |.........@...... 2100| 20 20 20 20 20 36 2E 35 20 4B 20 42 59 54 45 20 | 6.5 K BYTE 2110| 42 41 53 49 43 20 49 4E 54 45 52 50 52 45 54 45 |BASIC INTERPRETE 2120| 52 0D 0A 20 20 20 20 20 52 45 56 49 53 49 4F 4E |R.. REVISION 2130| 20 4C 45 56 45 4C 20 0D 0A 0D 0D 0A 0A 20 20 20 | LEVEL ...... 2140| 20 20 20 20 20 20 20 20 43 4F 50 59 52 49 47 48 | COPYRIGH 2150| 54 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |T .............. First address: 0100 Last address: 22FF Bytes read: 2200 Records read: 44 What is the purpose of a Copyright notice, if there is no name given? Could it be a copy of a pirated program? Again, let us hope that a SOL computer fan will be able to provide some answers (availability of paper doc, and of source code). Finally, after those questions, at least one answer: the program that will enable you to transform those ENT files into CP/M BIN files (if starting at 0000H) or COMmand files (if starting at 0100H). (Let us hope that the SOL computer used COMmand files compatibles with CP/M...) (Else, change the program to generate only BIN (or "SOL") files.) Ok list 10 REM ENTCOM.BAS by Emmanuel ROCHE 20 : 30 PRINT 40 INPUT "ENT-to-COM> Enter ENT File Name: " ; file$ 50 PRINT 60 file1$ = file$ + ".ENT" 70 OPEN "I", #1, file1$ 80 INPUT #1, line$ 90 IF LEFT$ (line$, 2) <> "EN" THEN PRINT CHR$ (7) "First line must contain EN(TER), then a space, followed by the load address." : PRINT : PRINT line$ : PRINT : END 100 IF LEFT$ (line$, 3) = "EN " THEN sa = 4 110 IF LEFT$ (line$, 6) = "ENTER " THEN sa = 7 120 ta$ = MID$ (line$, sa) 130 ta = VAL ("&H" + ta$) 140 IF ta = 0 THEN typ$ = ".BIN" 150 IF ta = &H100 THEN typ$ = ".COM" 160 file2$ = file$ + typ$ 170 OPEN "R", #2, file2$, 1 180 FIELD #2, 1 AS db2$ 190 lc = 1 200 en = 1 210 : 220 INPUT #1, line$ 230 la$ = LEFT$ (line$, 4) 240 PRINT la$ "|" ; 250 la = VAL ("&H" + la$) 260 IF en = 1 AND la <> ta THEN PRINT : PRINT : PRINT CHR$ (7) "Big problem: ENTER address <> DUMP address..." : PRINT : END 270 IF en = 1 THEN fa = la 280 IF MID$ (line$, 5, 2) = ": " THEN ra = 6 290 IF MID$ (line$, 5, 3) = ": " THEN ra = 7 300 alpha$ = "" 310 FOR i = 0 TO 15 320 db$ = MID$ (line$, ra+i*3, 3) 330 IF db$ = "/" THEN PRINT " |" alpha$ : GOTO 510 340 PRINT db$ ; 350 db = VAL ("&H" + db$) 360 al$ = CHR$ (db) 370 LSET db2$ = al$ 380 PUT #2 390 IF (db < &H20) OR (db > &H7E) THEN al$ = "." 400 alpha$ = alpha$ + al$ 410 la = la + 1 420 NEXT i 430 PRINT " |" alpha$ 440 lc = lc + 1 450 en = en + 1 460 ' IF lc = 24 THEN lc = 0 : WHILE INKEY$ = "" : WEND 470 IF i = 16 AND RIGHT$ (line$, 1) = "/" THEN GOTO 510 480 IF EOF (1) THEN GOTO 510 490 GOTO 220 500 : 510 PRINT 520 PRINT "First address: " ; HEX$ (fa, 4) 530 PRINT "Last address: " ; HEX$ (la - 1, 4) 540 PRINT "Bytes read: " ; HEX$ (la - fa, 4) 550 PRINT "Records read: " ; HEX$ ( (la - fa) / 128, 2) 560 PRINT 570 CLOSE 580 END system A>That's all, folks! Yours Sincerely, "French Luser" EOF