America Online APPLE II DEVELOPMENT FORUM CONFERENCE LOG Tuesday, October 27, 1992 10:00 p.m. Eastern Time Topic: Programming Shells & Environments Forum Leader: Gary Jacobson (AFL GaryJ) AFL GaryJ Welcome to the Apple II Development Forum! Tonight's topic is Programming AFL GaryJ Shells and Environments! AFL GaryJ This is the night we can talk about shells like ORCA/M, APW, and ESPECIALLY AFL GaryJ (as our "about tonight's chat" states :) GNO/ME! AFL GaryJ Ok, does anyone have any question/comment that they'd like to bring up AFL GaryJ off the bat? Developer1 well can I ask a quesion for GNO about switch it? :)))))))))))) AFL GaryJ Sure you can, Developer! AFL GaryJ Go ahead. Developer1 great! :) Developer1 ok. first of all, what does it do and how does it go about doing it? :) GNO Jawaid I tell you what it doesn't do... GNO Jawaid It doesn't multitask. :) But it does just about everything else MultiFinder GNO Jawaid does. Developer1 meaning, you can put programs on pause? Developer1 and switch? GNO Jawaid Dev- yep, that's right. Developer1 great. how does one select which program to be in the foreground? GNO Jawaid There's a little menu you pull down from the right hand of the menubar, GNO Jawaid with a list of applications. GNO Jawaid (A list of the apps you have loaded into memory, that is) AFA Jay ala MultiFinder? :) GNO Jawaid Jay- something like that. :) Developer1 IC. can one use P8's? GNO Jawaid Dev- no, ProDOS 8 is not supported at all. You could ask Matt all about GNO Jawaid the various reasons why.:) Developer1 ok. well it is multifinder. i mean, the mac multifinder doesn't really do THAT Developer1 much background work, it just pretends to :D GNO Jawaid Switch-It lets you do everything commonly associated with MultiFinder GNO Jawaid (have lots of apps loaded, switch between them near-instantaneously, and GNO Jawaid easily copy data back and forth.) SI also interfaces to the 6.0 Finder GNO Jawaid so you can launch programs directly from the Finder into SwitchIt. I've GNO Jawaid found a bunch of neat Finder IPC bugs that way. :) AFA Jay Does it eat up lots of memory? Developer1 good point jay, is it piggish on RAM? GNO Jawaid SI isn't _that_ hoggish. It's been used with as little as 1.75MB, but GNO Jawaid as with MultiFinder I definitely recommend as much memory as you can get GNO Jawaid your hands on (and we're arranging to bundle a very inexpensive 4MB ramcard GNO Jawaid deal with the software). Developer1 ok cool. is it going to slow any operations down at all? GNO Jawaid Dev- not noticeably. Developer1 neat Developer1 when is SI gonna be out? GNO Jawaid Dev- the only person behind the times is me :) In our KansasFest flyers GNO Jawaid we mentioned an August release date. We're in the final stages of testing GNO Jawaid and should be shipping soon (my beta testers are too darn good at finding GNO Jawaid bugs :) Developer1 kewl. is it an INIT, CDEV, DA, wha...? AFL GaryJ Ok, for those coming in late, our topic tonight is Programming Shells and Environments. AFL GaryJ That, of course, includes things like the ORCA shell, or GNO/ME (being questioned about now). GNO Jawaid It's an application. It's easier to leave that way if you need to run P8 GNO Jawaid or some other program SI has a problem with. SI isn't a 100% solution, GNO Jawaid but we've concentrated on making it work with the biggies: AWGS, GraphicWriter, GNO Jawaid Finder, Formulate!, etc. etc. Developer1 gotcha. so one would load it from the finder and then load programs in and Developer1 choose the foreground one and then one could switch it! right? GNO Jawaid Dev- you got it! Sheppy You managed to get it working with AWGS? That deserves a commendation right Sheppy there! Developer1 LOL sheppy. Developer1 how many programs does it support or is it limited by RAM? GNO Jawaid Limited by RAM mainly, but I could talk about the various RAM limits for GNO Jawaid a long time. :) GNO Jawaid We ought to turn this back over to development topics :) MikeW50 How do you handle interrupt handlers that are in bank zero? GNO Jawaid Mike- I don't think there would be a problem. I don't switch out bank 0 GNO Jawaid except for stack/dp space allocated by GS/OS. MikeW50 Stack/DP space can hold an interrupt handler -- a printer driver that is MikeW50 relocated to bank zero is a classic example. (I've done that, incidentally.) MikeW50 ga GNO Jawaid Since you can't switch out of an app while it's printing, I don't foresee GNO Jawaid a problem. MikeW50 The whole point of the interrupt driven print driver is to use the old MikeW50 firmware on the cards, which is why you're in bank zero to start with. You MikeW50 wouldn't KNOW I was printing. ga GNO Jawaid Doesn't the print manager put up dialogs? Or are you talking about not GNO Jawaid going through the print manager? In any case, copying an interrupt handler GNO Jawaid to your stack memory is kinda ooogey. MikeW50 I'm talking about a straight text printer driver that spools printing -- like MikeW50 the one used by the old ORCA shell. ga GNO Jawaid Presumably desktop programs can access this driver through GS/OS calls? MikeW50 Not the old one, no. It was used by the shell and programs that accessed the MikeW50 shell only. Matt DTS Copying an interrupt handler to the stack is perfectly acceptable, though a bit obscure. MikeW50 In any case, this is just one example of this sort of interrupt handler. I MikeW50 doubt if it's all that uncommon. GNO Jawaid Well, SI gives you about 10 different kinds of warnings if you try to launch GNO Jawaid a text app. I patently don't support them. (SI is a totally separate beast GNO Jawaid from GNO.) GNO Jawaid And, if there's a problem with a particular app that does do that, you can GNO Jawaid choose not to have it's stack shared. MikeW50 How do you know if it's a text app? GNO Jawaid Like I said, it's not going to work with 100% of programs out there, but GNO Jawaid I already foresee it saving me amazing amounts of time when I write the GNO Jawaid docs for SI. GNO Jawaid Mike- the auxType in S16s and EXEs. MikeW50 Not reliable -- there are a lot of desktop programs written before the auxtype MikeW50 bits were defined. AFL GaryJ Right Sheppy That would be a problem, yeah. Are users expected to change the aux manually? GNO Jawaid If SI doesn't see the right auxType bits it puts up a dialog that sez: GNO Jawaid "This may not be a desktop application (blah blah there are other problems.. GNO Jawaid "if you're sure it's a desktop app, I can fix the auxType for you." GNO Jawaid And it will fix it, if they want, or it will run it anyway. Sheppy Ah. Cool for me. MikeW50 It'll be interesting. On the one hand, one of the reasons I didn't release MikeW50 my switcher was because I didn't want to do customer support on it. On the MikeW50 other hand, your program is a little like the dancing bear: it's not how well MikeW50 it dances, but the fact that it dances at all that is amazing. ;) ga AFL GaryJ :) For the person who uses it with the right combination of programs, it could be a AFL GaryJ real time saver. GNO Jawaid Heh :) I've actually not had to do many (2 or 3) application-specific GNO Jawaid fixes. Most of what I did was just extend the system software to deal GNO Jawaid with things properly. ga GNO Jawaid (and I have lots of experience in twiddling with the SS. :) AFL GaryJ Ok, any other programming shell questions/comments out there? Sheppy I have one for Mike. AFL GaryJ Go for it! Sheppy Are there any plans to make switching between the memory models easier than Sheppy replacing a library file? MikeW50 I'm open to suggestions. It was the easiest way I could come up with. LL AndyW Why not write an exec file to do it for you?? GNO Jawaid Linker option? Sheppy What I've done is exactly that, Andy. Two of 'em. Just seems kinda... Sheppy awkward. LL AndyW Why 2? Just check for the presense of one, and swap them out with MOVE... Sheppy A linker option would be nice, yeah. MikeW50 It's not a matter of a linker option -- you have two sets of subroutines, each MikeW50 with the same names (specifically, errno), and the linker is going to grab the MikeW50 first one it finds. In fact, it's the global variables that are the problem, MikeW50 and that's also why Pascal never had the problem (no system global variables). Sheppy Maybe it could know which file to read based on a flag? GNO Jawaid The only diff between ORCALIB and ORCAGLIB is the load name in the data GNO Jawaid segments... GNO Jawaid They're exactly the same length in bytes. Sheppy They're exactly the same size (the library files), which seems odd... MikeW50 Pretty close, though. That's the critical difference: the segment name for MikeW50 the files with global variables. For the small memory model, it's the MikeW50 blank segment, while it's ~GLOBALS for the large memory model. Everything MikeW50 else can be finessed. ga Sheppy Hmmm... GNO Jawaid Yeah, like Shep said, have an option flag to pick between ORCALIB and ORCAGLIB. GNO Jawaid It's a hack, true enough, but a convenient one. :) Sheppy Then just deposit them both in the Libraries directory. It would be nicer, Sheppy at least to the developers. MikeW50 How do you know what the libraries are? How do you know all of the MikeW50 differences are in those libraries? The linker just processes library files, MikeW50 it doesn't know about "special" files. GNO Jawaid The other big problem with small/large MM is the fact that custom libraries GNO Jawaid of generic routines need to be in both models, too. GNO Jawaid How about: linker option to change the load segment name of global (not GNO Jawaid private) data segments to "~GLOBALS"? GNO Jawaid ga GNO Jawaid (in libraries only, that is) MikeW50 It's an idea I hadn't though of... but after all, a script works just as well. MikeW50 That's why it's never been a big issue with me. Sheppy Maybe, so... but it feels really kludgy. :) MikeW50 It is. So is C. :) GNO Jawaid Well, it's a big issue with me, since GNO now comes with something like GNO Jawaid five or six different libraries. And there are lots of other PD libraries GNO Jawaid that suffer the same problem. ga LL AndyW Mike, can the file VARS and GVARS be left out of the main library and placed LL AndyW in small ones, and swap between the small ones, or do they have to be in the LL AndyW main library? Sheppy Heck, Mike. I prefer assembly, myself. But C is darned useful for some Sheppy things. MikeW50 No, they don't have to be in the main library. That wouldn't solve Jawaid's MikeW50 very real problem, but it would reduce the size of the standard libraries. It MikeW50 would also give you one more library to get out of order, though, and think MikeW50 of how many problems people have with the ones there are already! I'm not MikeW50 nixing the idea, you understand, just pointing out potential drawbacks. James S WI So how do all the other compilers and linkers hanlde memory models (like on the IBM and Mac)? Sheppy The ones I've seen aren't reliant on the order of the libraries in the... Sheppy directory, which helps. MikeW50 I'm not sure they have the same problem, since it's caused by the 65816 chip, MikeW50 so the solutions there probably don't apply. MikeW50 The order of the libraries is not the issue -- two symols with the same name MikeW50 is the issue. GNO Jawaid I've also got this interesting idea involving a new OMF record type; GNO Jawaid two, actually. "call" and "return" fields, that the linker would resolve GNO Jawaid into JSL/RTL or JSR/RTS depending on a linker flag. That way, you can GNO Jawaid cut out on lots of cycles and maintain a single library (that used GNO Jawaid the new fields, of course). This one is a little out there, but it's just GNO Jawaid a thought. MikeW50 What about the extra byte? That takes 2 cycles for a NOP, which is all you MikeW50 saved anyway. ga GNO Jawaid I was hoping the linker could make the extra byte "go away". :-) MikeW50 How? It doesn't know enough about your code. Technically, it doesn't even MikeW50 know the code is 65816 code. ga Sheppy Like magic! I like magic, especially in linkers. :) GNO Jawaid You have a point; but it'd still be neat :) What would be best is a GNO Jawaid call/return 816 instruction. ga MikeW50 This is the sort of thing that should properly be done by an optimizing MikeW50 compiler, not a linker... stay tuned. :) ga Sheppy Add that to your list, Jawaid... or is it already there? GNO Jawaid I've got it Shep. :) Sheppy You've opened yourself up to questions now, Mike... :) GNO Jawaid Indeed. :) MikeW50 Yea, but I'm safe -- this topic is about shells, so I can duck compiler MikeW50 questions. :) Sheppy I bet Mike don't show next time we talk about compilers! :D AFL GaryJ (An optimizing compiler, eh? :) Sheppy Cooo--ooool! :) MikeW50 Hey -- if you're techical, ORCA/C and Pascal already are. They just don't do MikeW50 enough optimizations. AFL GaryJ Let's see, we could figure out how to work compilers into a shell topic :) AFL GaryJ Compilers are part of the programming environment, for sure :) MikeW50 Compiled shell scripts? :) GNO Jawaid There are Bourne Shell script compilers for Unix. :) LL AndyW Any ideas on a time frame for C 2.0 yet? MikeW50 Late Nov/ early Dec. JHutz Mike... The text version of Orca/Disassembler does not respond well at all under the new shell. JHutz This is presumably due to the changes in the way text/io is performed. JHutz Will it be fixed? I use that thing a lot, and would like to use it under the new shell. ga MikeW50 I think that's a shell bug -- I'll be looking into it as I do the new shell MikeW50 for C 2.0. If nothing else, the shell could filter out buggy chars. ga JHutz Hmmm... That's interesting. OK; I'll be looking forward to the release of 2.0. GNO Jawaid Mike- Since it's been shown that RTLs actually have system software support, GNO Jawaid would you consider adding support for them to the linker? LinkIIgs does it, GNO Jawaid but it, uh, has problems. ga MikeW50 No. Tools do the same thing, and there are a lot of things I feel my time MikeW50 could be more profitably used for. ga AFL GaryJ Right to the point :) GNO Jawaid I must disagree- tools do the same thing, with quite a bit of overhead. GNO Jawaid Tools aren't automatic; you have to specifically load them into memory, GNO Jawaid and writing a tool is not as simple as just linking in an RTL. Also, GNO Jawaid tools have the problem of assigned-in-advance numbers. MikeW50 Which is more important: Bug fixes, BASIC, optimized C, PRIZM 2.0, optimized MikeW50 Pascal, object Pascal C++, modula 2, etc. etc. -- or supporting an obscure MikeW50 feature that itn't needed, and about 3 people would understand and use anyway? MikeW50 ga FredW GS No one is interested in BASIC. MikeW50 Wrong. About 25% of the customers surveyed said they want it. That's a lot MikeW50 of customers. :) AFL GaryJ Fred: BASIC is going to be the MAIN topic of discussion in two weeks! :) GNO Jawaid Seeing that RTLs are a _slight_ extension to the dynamic segment scheme the GNO Jawaid linker already provides, I don't know why you'd have to take time away GNO Jawaid from other projects (_that_ much time, anyway.) MikeW50 Time is time. Time to implement, time to document, time to support -- for a MikeW50 _very_ limited audience. Convince me the audience isn't limited. That's the MikeW50 only thing that would cause me to reconsider. ga GNO Jawaid I'll figure out a way :) Did your survey ask whether users wanted a compiled GNO Jawaid over an interpreted BASIC? ga MikeW50 No. I didn't think they would want a BASIC... but that's what surveys are for. AFL GaryJ A bunch of people have asked about an ORCA BASIC in the past. Sheppy I prototype a lot of my programs in BASIC. GNO Jawaid That's funny- I prototype in C. :) AFC DYAJim I don't care for BASIC anymore AFL GaryJ Go ahead with your comment, Fred FredW GS Hmm, If rumours are right...didn't you BASH BASIC?? MikeW50 No more than I bash C... less in fact... but I'm in the business to give you MikeW50 the languages you want, not the Pascal and Ada that's good for you. :) MikeW50 (And actually, that's the only time I've _really_ bashed C, and you provoked MikeW50 me.) FredW GS Does the GS have a LITHP compilier? Sheppy How about Cobol, Mike!?!? :D AFL GaryJ Oooh, yeah. COBOL!! AFL GaryJ :) Sheppy Fortran! :D MikeW50 :) FredW GS Someone actually hired me to write something in COBOL a bit back...hey a jobs FredW GS a job... :) M Wolfgram Pascal - POSH! GNO Jawaid There isn't a Lisp system for the IIgs, but I uploaded a working but limited GNO Jawaid interpreter for Scheme- the LISP derivative that's more suited for modern GNO Jawaid list processing tasks. It's in Procyon's ADV library, or ought to be. FredW GS OK, will check it out Jawaid...thanks. MikeW50 There are a couple of LISPs for the II -- and one is GS specific, although MikeW50 I don't think it was released commercially. GNO Jawaid If it isn't I can upload it tonight or tomorrow. It's called GSCheme. ga James S WI Mike, did your survey include C++? MikeW50 Yes. That was the winner, incidentally. BASIC was 2nd. The others were too MikeW50 far down to be commercially viable. AFL GaryJ So, you did have a good response to BASIC? MikeW50 (At least, assuming I have to write it from scratch.) MikeW50 Roughly 50% for C++ and 25% for BASIC. FredW GS I'd like MatlabGS! :) GNO Jawaid Fred- GScheme comes with an example program that does simple symbolic GNO Jawaid differentiation. FredW GS Matlab isn't symbolic (much) but I'll definately take a look at that. FredW GS Mathematica is much more symbolic I think. GNO Jawaid Ahh... FredW GS Hmm, ORCA/BASIC would be neat. GNO Jawaid Hmm. A BASIC compiler would benefit from use of RTLs (heh, had to throw GNO Jawaid that one in there.) FredW GS :) AFA Jay :) MikeW50 IF (please see the IF) I ever do one, it will have full toolbox support. It MikeW50 has to. AFC DYAJim What survey is this? AFC DYAJim I don't recall having voted :) MikeW50 I've done two, both with the response cards for products. Wanna vote? Do it MikeW50 now, for all I care. I'd be interested in seeing what people want. James S WI I want C++! M Wolfgram (I'd vote for "name" support as a compiler option) GNO Jawaid Zing.....! AFL GaryJ Big response :) FredW GS If I had any money I'd like to see a BASIC with easy hooks to machine language. MikeW50 I had a guy ask me once why the CHANGE command din't translate his program to MikeW50 the new language. :) MikeW50 I think I told him to get a life -- and a compiler. Politely, of course. James S WI Along those lines, I gues I can use the MS-DOS FST to use Turbo C++ on my GS. AFC DYAJim I'd vote C++ too :) AFC DYAJim I'll write that when I finally get around to sending in the product card for AFC DYAJim the SSW6 ref I got at KFest MikeW50 C++ = 2, BASIC = 1 AFA Jay C++ and properly functioning ++ operator, bye ;) GNO Jawaid I vote for COBOL!