COMPIL.THD --- Copyright 1987 by Phil Wheeler An original compilation of Compuserve Model 100 Forum messages for use by Forum members only. Compilers for the Model 100 are a topic of definite interest. One compiler, written in Basic, is available: TCOMP.121 (DL 8) -- and there is a version for the '200. The limited RAM of these computers appears to constrain the features in a Model 100 (etal) compiler. But there is always something new to surprise us. These messages discuss the prospects for new or improved Model 100 compilers, and what they should be (capability, language, etc.) Message range: 147166 to 147811 Dates: 5/4/87 to 5/11/87 Fm: Ariel Frailich 72477,326 To: All Hi! I'm new to the M100, although I've been programming 8080/Z80 for a long time. Could anybody recommend a half-decent compiler for the Model 100, preferably C or BASIC? Much appreciated! RYL - Ariel Fm: Denny Thomas 76701,40 To: Ariel Frailich 72477,326 Ariel, We do have a BASIC compiler here (TCOMP.121 & TCOMP.DOC in DL8), but it only handles a small subset of BASIC commands. (no strings) Also check out TCOMP.DO2 and TCOMP.DO3 for additional documentation. The author of the program included as much as possible given the limited ram of the M100. The next version would have had to be a disk based program, but he moved on to other things before doing anything of that nature. Fm: Tony Anderson 76703,4062 To: Ariel Frailich 72477,326 There is no C compiler for the model 100 family. There have been some comments about compiling in another machine, and transferring the code to the Model 100, but without details. As Denny mentions, the only compiler known to exist for the Model 100 is here in our data library, and is a "Tiny" Compiler. Fm: Ariel Frailich 72477,326 To: Denny Thomas 76701,40 Thank you very much for the info. I looked through the DLs before sending my message and came across TCOMP, but the lack of strings is a major problem. I intend to write a commercial program and it happens to be string-intensive... Oh, well -- thanks for your help and let me know if you can think of anything I can use (it doesn't HAVE to be C or BASIC, although they're likely the most common ones). Thanks again! RYL - Ariel Fm: Ariel Frailich 72477,326 To: Tony Anderson 76703,4062 Thank you very much for the info, Tony. That is not a major problem. I have a number of C compilers for CP/M which can produce ROMable code, so they are obviously intended for cross-development. All I have to do now is learn the differences between 8080 and 8085, then learn about the architecture of the Model 100, and I should be in business. Do you think you could recommend a book about M100 internals? I'd appreciate it! Thanks again for your help. RYL Fm: Tony Anderson 76703,4062 To: Ariel Frailich 72477,326 There are a number of books listed in the file BOOKS.001 in DL13, but I find the most useful ones are listed in the file ASMBLY.UTL in DL8. Fm: Ariel Frailich 72477,326 To: Denny Thomas 76701,40 Thank you very much, Denny! I read the thread so far and it doesn't seem to hard. I have BDS C for CP/M; it allows full re-ORGing and whatever else is necessary for cross-development. That is obviously the way to go. If I ever get it done successfully, I'll be happy to provide details to anyone interested, but don't hold your breath. Anyway, thanks again. RYL - Ariel Fm: Phil Wheeler 71266,125 To: Ariel Frailich 72477,326 Ariel, one major fly in your ointment using BDS-C will be the size of the programs generated. Full-featured C compilers produce pretty large programs, in terms of Model 100 memory capacity, that is. You may want to take up ASM programming for the M100, instead. Even T-COMP gives pretty big CIO files -- and it is far from full-featured. Fm: David C. Ridge 70416,1435 To: ALL It seems strange to me that a computer as popular as the Model 100 does not have any compilers available. Especially considering the fact that most users dabble at least a little with BASIC. You would think that there would be a BASIC compiler. Since I have the resources to write such a compiler, I would be interested in hearing from anyone about why there are non none. Lets have your opinion!!! Later,,,David C. Ridge Fm: Tony Anderson 76703,4062 To: David C. Ridge 70416,1435 David, there IS a compiler available for the Model 100, right here in our Data Library.... the only known Compiler for the Model 100 known to exist. The reason is simple; with the Model 100 family's RAM limitation, by the time you put the compiler in RAM, along with the program you wish to convert, there is no room left for the code the compiler generates. Mike Weiblen wrote the compiler we have available, and stopped when it became apparent you would have to work from disk, due to the size of the compiler. It's not a problem with desktops with 640K or so to play around with, but in a 32K machine, with only 29.5K actually available, it's just not feasible. So what we have is a "Tiny" BASIC compiler, without string capability. See the files in DL8. Get a list with the command: S TCOMP?? Fm: David C. Ridge 70416,1435 To: Tony Anderson 76703,4062 Thanks for the reply . We have compilers for machines with 38K RAM (Sinclair) that do a fair job. It seems to me that if the compiler were intirely assembly, it should be small enough to do something useful. The way we get around the problem of space is that the compiler over-writes the BASIC source code as it is compiling. Thus, there need only be enough room in RAM for the compiler and the compiled code. By the way, are there any statistics (or guesses) on how many Model 100's there are out there and how many of those people are using Disk? Fm: Ariel Frailich 72477,326 To: Phil Wheeler 71266,125 Thank you for the advice. Indeed, most compilers I have generate huge binary files, but I hve faith in BDS C; I have some fairly useful stand-alone .COM (CP/M executable files) which take less than 8K. Also, the c functions are available in source format and can be recoded to take advantage of ROM routines. I'll probably do well with BDS, possibly because it's NOT full-featured, as c compilers go. Still, I'll heed your advice. RYL - Ariel Fm: Tony Anderson 76703,4062 To: David C. Ridge 70416,1435 The Model 100 family's partitioning works a little different, and I doubt that you can compile a BASIC program "in place", since programs and files move around dynamically as you use RAM space. But be my guest, see if you can come up with something useful... it's really needed. Tandy does not release sales figures. So none area available as to how many machines are in the field. One company, who publishes such "guesses", guessed over 250,000 Model 100's in the field a year before they were discontinued. Tandy Corp acknowledged that was a little low. There are 6 known disk drives for the Model 100 family, of which, 3 are Tandy's. Again, no figures. We know that at least 50,000 TDD's were sold before the new model, the TDD-2 came out. No figures, or guesses, on the other disk drives. Fm: W. J. Tingle 73107,62 To: David C. Ridge 70416,1435 I'd buy one if you build one. I would be willing to spend up to $50 for a simple compiler, while a good (FORTRAN 77?) compiler would command more. Go for it, and dont be afraid to require a TDD2, I'd buy one if that were the requirement for compiled programs. Fm: David C. Ridge 70416,1435 To: Tony Anderson 76703,4062 Thanks Tony...very useful info as always! Fm: David C. Ridge 70416,1435 To: W. J. Tingle 73107,62 Thanks for the input. Now, is there anyone else out there who would like to see a BASIC compiler for the Model 100? How much would you be willing to pay? Would you buy it even if you required a TDD or TDD2? What sort of programs would you use it on? And would you use it even if it required you to completely empty your RAM? Fm: Mark Lutton 73106,1627 To: David C. Ridge 70416,1435 David, I would also be interested in a compiler for the Model 100. The specific language wouldn't matter too much, but BASIC and C would be the best choices. $50 to $100 would be acceptable; any more than that and I probably wouldn't buy it. Also, it would be unfairly compared to Borland's products if the price were >$100. It should use sequential I/O as much as possible, so that it could read the source from TDD, Chipmunk or cassette tape and write the result to TDD, Chipmunk or cassette tape. (Back when mainframes had 8K, you'd read in the compiler on paper tape, then read in the program on paper tape, the machine would punch an intermediate file which you'd then read in, and you'd get the object program on paper tape. You could then read in the intermediate file again and get the listing on paper tape.) With BASIC, you can use the ROM as a run-time system. For C you probably would have to change the semantics of the library functions to use the ROM in this way, or else risk having to link a large run-time system to the program. Fm: Dick Monahan 73240,1535 To: David C. Ridge 70416,1435 I'd pay anything up to $300, but I'd rather see a cross-compiler, hosted on the PC. I'm too old to play with little computers again...Dick Fm: Ariel Frailich 72477,326 To: all Would anyone be interested in Pascal? It is usually relocatable dynamically, so things can move around without disturbing it. It does, however, require an interpreter. Well, it's worth a thought, anyway. I'd be happy to hear some more expert opinions! Thank you for your time and interest. Fm: Tony Anderson 76703,4062 To: Ariel Frailich 72477,326 There _was_ a Pascal for the Model 100, I believe... some time ago. Check Rick Mendosa's file SOFTWR.100 in DL13 which lists the commercial software available for the model 100. We have an implementation of Forth for the 100, too, already here. Fm: David C. Ridge 70416,1435 To: Mark Lutton 73106,1627 Thanks for the input Mark. We (NovelSoft) have extensive experience with compilers for small computers (Sinclair) and are looking into the possiblity of repeating our success with the Model100. Fm: David C. Ridge 70416,1435 To: Dick Monahan 73240,1535 A good point Dick. We were of the opinion that the use of a PC would seriously limit the sales of the compiler since most Model100 users would not own a PC. I am sure that many do but not enough to make it worth our while. But I could be wrong?! Fm: Mark Lutton 73106,1627 To: David C. Ridge 70416,1435 Oh, yes: The Model 100 is rather unfriendly toward machine-language programs so anything you can do to help this situation would be appreciated (I mean, anything to make it easier to load, unload and use machine-language programs). The ideal situation would be if the code were positionindependent and could just run from wherever it is in the file system, like BASIC programs do, but that's nearly impossible with the 8085. Also, if you do a C compiler, it would be helpful if for each library function you would indicate whether it used ROM functions or additional code; we could make our programs smaller by using only those routines that are in ROM. Fm: Mark Lutton 73106,1627 To: David C. Ridge 70416,1435 On the cross-compiler issue: I'd think it would be easier to write a cross-compiler anyway. For one thing, you could write it in C. For another, memory size for the compiler itself would no longer be an issue. Fm: Mark Lutton 73106,1627 To: Ariel Frailich 72477,326 Pascal would be OK, particularly if it is similar to Turbo Pascal. Please don't bother to consider: COBOL, Fortran, APL (character set problems), PL/I, Algol 68, Ada (Ada is a registered trademark of the DOD). Impractical. Algol 60, Snobol and Trac (TM) probably have too few adherents these days. Lisp might be worth considering. Fm: David C. Ridge 70416,1435 To: Mark Lutton 73106,1627 I feel the only language to consider for a compiler is BASIC due to the large installed user base who already have familiarity with it. Our experience is that we can obtain results as good or better with a properly written BASIC compiler as with C or PASCAL. Fm: David C. Ridge 70416,1435 To: Mark Lutton 73106,1627 You are correct on both accounts but I still say that It woullimit the sales of the product. Fm: Ariel Frailich 72477,326 To: Mark Lutton 73106,1627 Thank you very much for the thoughts. I agree with the Turbo idea, tailored to the Model 100, but I'd shy away from Lisp -- once you get it loaded, you'd need several disks as virtual memory to make it run! Just kidding, but BASIC, C, or Pascal are the only viable choices, I feel. RYL - Ariel