CompuServe Thread

#SAS/C bug…

16 messages in this thread
#11665From: Stephen AndersonJun 30, 1991 6:59 PM
Help! If there is anyone who is an expert on SAS/C please give me some help here. I've been porting GNU Make to Amy (it's actually pretty much done) and wanted to use forkv() and wait() to fire off the commands as needed. Unfortunately most (not all, but most) commands crash the system. Just to see if I was crazy, I typed in the example code that SAS gives in the manual for forkv(), and tried again. Same result. Specifically, it seems to crash on any AmigaDOS commands (which, being BCPL commands, I'm not real suprised..), but also any ARP commands! The exception is sometimes a 3 and sometimes a 4. Oh, BTW – I re-wrote the sample test program using Manx and their fexecv() / wait() combo, and everything works fine. Problem is I've pretty much switched over to Lattice, mainly because trying to port stuff from GNU/Unix using Manx got too frustrating. If anyone has any ideas, please let me know. Also, I have lost the SAS support number (tech support) – can anyone give it to me? Steve Anderson
#11677From: BILL LEACHJul 1, 1991 9:30 AM
Stephen; I'm not sure if SAS has switched back to a 900 number or not but the other number that I have for SAS is 919-677-8009. Talked with Jim Cooper and he requested that I ask you to call him. He indicated that he should be able to clear everything up for you. An Amiga message processed by Whap!, bill
#11678From: Stephen AndersonJul 1, 1991 9:39 AM
Bill: Thanks – I'll give them a call and ask for Jim Cooper. I sure hope he can clear everything up for me… Steve
#11712From: BILL LEACHJul 2, 1991 7:11 AM
Steve; I don't think all of his news will be good but I do think that he will come up with a solution. An Amiga message processed by Whap!, bill
#11731From: Stephen AndersonJul 3, 1991 12:35 AM
Bill: He was very kind, and no, his news wasn't good. His explanation of why the Manx functions work and SAS/C doesn't was that Manx "cheats" to get around the BCPL problems. I'll easily say that I consider SAS to be a much more solid product, but that answer seems like sour grapes a little. If you just look at it from my perspective here's what you see: I've got an application for which I want to use the function as it was documented. Aztec can do it, SAS can't. If the answer is that it's a shortfall in SAS that will be fixed later then I can accept that, and I'll look forward to sending in my upgrade money. However, if the answer is that the competition didn't follow the rules, I don't have much to look forward to, except from the competion – theirs works. It's just hard to accept. I guess my feeling is that I can't throw away my MANX stuff yet. I've already dropped the SAS effort of porting GNU Make, and now have it working pretty well under MANX. I just hope someday C=, SAS, and everyone else can either write better 'rules' or get off the high horse and make the things do what they should, no matter the rules. (Geez, I really got going there… :^> ). Anyway, thanks for your help in getting me in touch with SAS. Steve Anderson
#11733From: John ToebesJul 3, 1991 1:15 AM
The answer is that Manx did break the rules to make it work. When I wanted to implement a similar functionality in the SAS/C product, I was explicitely asked by Commodore not to include it in order to provide them the most breathing room with the 2.0 release. John A. Toebes, VIII – via Whap!
#11773From: Betty Clay/SYSOPJul 3, 1991 11:56 PM
Hi, John. Good to see you here. And please tell us that you will still be around in the AMiga world, even if you ARE leaving SAS.
#11835From: John ToebesJul 5, 1991 7:28 PM
Of course I am still around. In fact, it looks like I might be a little more active here on CIS now that I am no longer a moderator on another service. I am putting as much distance between me and SAS as is possible, but I do expect to still be active as an Amiga programmer. I still am the Coordinator to the Software Distillery and Chairman of the Amiga Software Developers Forum. John A. Toebes, VIII – via Whap!
#11867From: Betty Clay/SYSOPJul 6, 1991 7:56 PM
That's very good news, John. I hope we do see you around more often. Betty
#11743From: BILL LEACHJul 3, 1991 7:55 AM
Steve; Playing by the rules is very important. Remember AmigaBasic? An Amiga message processed by Whap!, bill
#11759From: Stephen AndersonJul 3, 1991 7:00 PM
Bill (and John Toebes): I understand the rules; I understand why rules are important (although I've never touched Amiga Basic and have no idea what you are referring to there); and like I said, I think that SAS/C is a much more solid product – It took alot of twisting and turning to get most of the GNU Make source files to work right even after they compiled under Manx, while the behavior under SAS/C was much more predictable. I have two gripes: 1) with C= (and the Amiga team) for turning loose BCPL's in the first place; 2) with SAS/Lattice for giving us what looks like a fork() / wait() pair (that's what they are called) that neither behave like the Unix calls they are named after nor behave as documented (no mention of BCPL problems in the docs for forkv()). I'm sorry John. You've done a great job with SAS/C. But this one is my current problem (and the reason I had to break out the MANX stuff again) so it bothers me. forkv() crashes the machine if you run a BCPL program (most of the AmigaDOS commands), and crashes the machine if you run an ARP command (why?). That makes it unusable for a make program, which has to be able to use such commands. It gives the impression that the SAS forkv() will only work with other programs compiled with SAS/C (at least Jim Cooper indicated that was all that he was sure of). Gosh, there I go again. To leave this on a high note, I am making alot of progress on the GNU Make port using Manx, and I hope to have it done soon. For those who don't use Unix much, the GNU make is a real make, full featured and all. I'll make it available as soon as I'm done. BTW John, don't take this all to seriously – I'll probably forget it as soon as I get frustrated with MANX again. :^> Steve
#11763From: John ToebesJul 3, 1991 9:40 PM
Actually I don't take it personally – I no longer have anything to do with SAS/C. You should note however that the fork/exec method is not a good way for a make program to spawn tasks. You will note that the Manx method does NOT allow for invoking resident programs. You are better off using Execute() to do the operation. Many years ago, Jack Rouse devised the method now used by LC and LMK to spawn off subprocesses that even respect the resident list and can get reasonable return codes. You should be able to find the source laying around on one of the early fish disks. I would tell you the number but no longer have my listing online. John A. Toebes, VIII – via Whap!
#11782From: BILL LEACHJul 4, 1991 7:56 AM
Steve; Did not mean to "touch a button." I would have suspected that you were aware of the importance of not breaking the rules. I also appreciate the frustration of not being able to do something that you believe that you should be able to do, particularly when that same thing can be done on other machines. The AmigaBasic reference was to MicroSoft and the fact that they did what ever they wanted to do to make AmigaBasic work on an Amiga 1000 under AMigaDOS 1.1, regardless of the rules. MicroSoft did things like use the upper 8 bits of address for storage. Of course their program broke when accellerators became available. For other reasons, the program broke on most other versions of the OS. As an interesting aside, I understand that it appears that the original ABasic (available on AmigaDOS 1.0 only) works on an Amiga 3000 with DOS 2.0 (it would break on DOS 1.3 however). Much of the "pain" that we live with now is due to the "rule breaking" that was performed by the programmers that wrote many of the more popular Amiga programs. Unfortunately, even AmigaDOS 2.0 still has allowances for improperly written programs. I'll admit that I would not want to be a part of the group that has to make the decisions in that area… its a tough call. The very health of the machine hangs on such decisions. While most of the programming community curses BCPL, the folks that wrote AmigaDOS 1.0 managed to do it in somthing around a couple of months. The production of such a massive software undertaking is such a short time is amazing. C= has been weeding out the BCPL ever since. SAS has been a very strong supporter of both following C='s rules and keeping the "heat on" so that C= set rules that we can live with. A great deal of SAS's efforts have been to improve the quality of AmigaDOS itself. An Amiga message processed by Whap!, bill
#11805From: Stephen AndersonJul 4, 1991 11:58 PM
Bill: You didn't really hit any button (except perhaps those on your keyboard ;^> ). I completely agree with you. Like I said, I think the world of SAS and what they have done, but I'm sure you can understand my current position. It's like – I love animals, but if a mad dog is chewing on my leg I'd just as soon kill it. Anyway, I'm guessing that except for this GNU Make port I'll be using SAS for just about all my C development. I'm just glad I hadn't purged all this MANX stuff off my hard drive yet! Steve
#11814From: BILL LEACHJul 5, 1991 9:19 AM
Steve; Nope, no HITTING going on here either (a little feeble fingered fumbling, but definately not hitting). And I do understand…. An Amiga message processed by Whap!, bill
#11836From: John ToebesJul 5, 1991 7:28 PM
As I commented before, you are better off NOT USING fork/exec in any form. While it looks easier and more in line with the unix philosophy, it doesn't allow you to take advantave of the Amiga resident commands. John A. Toebes, VIII – via Whap!