America Online
APPLE II DEVELOPMENT FORUM CONFERENCE LOG
Tuesday, February 19, 1991 10:00 p.m. Eastern Time
Topic: Pascal and C Programming
Forum Leader: Dave Sugar (AFL Dyfet)
AFL DannyH are we talking C and Pascal tonight?
AFA Gary J Yep. C and Pascal
WinkieJim Oh, great the two languages I don't know :) :)
AFA Gary J :)
AFL DannyH I'm struggling to learn assembly, next is either Pascal or
C.....
Coach101 infidel :)
WinkieJim Actualy I'm learning pascal
WinkieJim slowly
WinkieJim (i.e. whenever I get time to)
WinkieJim Well, after I learn Pascal, I'm going to learn C, (again when I
have time)
WinkieJim I sould be done by the year 2000
AFL Dyfet :)
AFL DannyH I'm leaning toward C, any comments on which one is best?
Coach101 I think C has a much richer future as a programming language than
PASCAL...
MDW Flyer How do GS Pascals compare to that available for the Mac?
MDW Flyer I've seen several texts for learning Pascal on the Mac.
AFL DannyH I'm thinking of getting ByteWorks' C and their lesson plan too
AFL DannyH how portable will be the code in Byteworks' C to go to the Mac
MDW Flyer and vice/versa
Coach101 Portability....
Coach101 Is more a question of how one interfaces with the user and the
file system.
Coach101 If you use the C stuff.. very portable
Coach101 If you use native mode stuff (toolbox, etc.) then
Coach101 you will have to do considerable design work to achieve a high
degree of portability. ga
WinkieJim But, Mac and GS toolboxes are similar enough to make converting
either
WinkieJim programs to the other a simpler task than many think
JWankerl There are enough differences between toolboxes to give you
headaches forever.
AFL Dyfet Converting between the Mac and GS can be both trivial and
frustrating :)....
Coach101 I agree Winkie, but one must do a lot of upfront research to avoid
doing things that are not
Coach101 reasonably done on *both* platforms....
AFL Dyfet One place that always gets you when you least expect it is Endians
(which byte
AFL Dyfet is first)...
AFA Gary J :)
WinkieJim I didn't say it wasn't hard...just eaisier than say translating a
IBM program
WinkieJim to mac or visa versa
Coach101 Yeah.... VAX and IIgs.... A pair of machines unlike the rest of
the world.....
MDW Flyer Sounds like whats needed is source pre-processing.
JWankerl Can I take my IIGS programs and run them directly on a VAX? ;-)
AFL Dyfet If you use stdio only, maybe...
AFL Dyfet At least for compiling :)
AFA Gary J :)
JWankerl Even my assembler programs that support the Desktop (TM)? :-)
AFL DannyH I have found out to my dismay that writing hardware drivers is a
lot more
AFL DannyH difficult than I ever imagined
Coach101 Ah Danny, drivers are fun... They sure make you pay homage to
GsBug also...
Coach101 A Q for the Apple types: Has anyone published a set of guidelines
on toolbox commonality between the
Coach101 IIgs and Mac?
AFA Gary J Good question, Coach
WinkieJim I don't know of one coach...the GS toolbox refs do mention some
differences
WinkieJim between the two here and there...
MDW Flyer Could be new ground for some budding author/programmer.
Coach101 But, is there a market for a "Transportable Apple Interface"
subroutine set for the IIgs & Mac?
Dave Lyons C. K. Haun did a nonzero amount of work in this area...Matt, is
his stuff in a presentable state
Dave Lyons these days?
Matt DTS I don't know the status of CK's stuff.
WinkieJim Well, it could be usefull...WOuld have to be in MPW for best use
though...
AFA Gary J I don't know that the language, or programming environment is the
issue, it's the
AFA Gary J raw toolbox calls that need to be compared.
MDW Flyer Anyone yet using the CTI release of the old TML Pascal II?
AFL DannyH I bought TML Pascal and quikly put it away along with my Jeeves
Desktop and
AFL DannyH Pinpoint products
MDW Flyer Where are the Mac toolbox calls referenced. Any concise source
like the GS's?
AFL Dyfet Inside Macintosh is somewhat concise :)
Coach101 Mac calls are in Inside Macintosh (volumes I -> n)
AFA Gary J n^2
WinkieJim MDW, five volumes, plus a few more references...
Coach101 If you do not like toolbox III refering you to toolbox I or II,
you will really have fun with
Coach101 the inside Macintosh series... A lot more updating has gone on in
that arena...
AFL Dyfet Inside Macintosh currently viey's with VMS for manual shelf space
hogging :)
MDW Flyer Total poundage looks about the same, so set up a group to do a
comparison.!
Coach101 Whow.... Inside Mac, looseleaf edition, is only two 3" D-ring
binders. VMS is an order of
Coach101 magnitude worse than that (maybe in cost also)
MDW Flyer Tackle each related group, set up ground rules for comparitive
analysis.
Coach101 By the way, I find the descriptions, organization, and detail in
the IIgs ToolBox series much better
Coach101 than the comparable Macintosh documentation. Kudos to the authros
and reviewers !!!
Matt DTS (Just out of curiosity, does this have anything to do with Pascal
or C?)
MDW Flyer Who's really interested. Sounds like a fair case for
KansasFest.
WinkieJim Matt, no trying to get this chat back onto the topic! :)
AFL Dyfet :(
AFL Dyfet :)
AFA Gary J It started out on C/Pascal :)
AFL Dyfet Okay, do we have any more Pascal and C questions for tonight?
MDW Flyer Wasn't there a training - class on Pascal last year sometime on
AO?
Coach101 I have one, but I doubt that there is an answer to it so I wont
ask it.
Coach101 I so hate to stump Matt
WinkieJim Only prob I have is with vol 3, they should have noted what
toolset version is
WinkieJim required for each new call...
Dave Lyons WinkineJim, good point--but see GS Technical Note #100 for the
up-to-date version list (I recommend
Dave Lyons always requiring the latest versions, not just the earliest
version that has all the calls you need).
AFL DannyH does Apple support Pascal anymore? any version?
Matt DTS MPW IIgs Pascal, version 1.0 is a supported APDA product.
AFL Scott Who's been following the Todd Whitesel "I've got more ideas on
compilers
AFL Scott that work better than anyone" thread on comp.sys.apple2?
AFL Scott And, what are your thoughts on the current state of IIGS
compilers?
AFL Dyfet Go ahead Coach...
JWankerl Scott: I discard those messages - not much fun reading to me.
Coach101 I have not, but given the material in his "enhanced IIgs" thread
of months ago, I do not think he
Coach101 has his feet on solid ground (technical or business). ga
AFL Dyfet Having not seen the threads in question, I will withhold comment
:)
AFL Scott I'm done... I just wanted to hear some ideas on what people
thought could be
AFL Scott better. Personally, I think Orca/C is pretty good. :)
Coach101 As to the state of IIgs compilers... I believe both APW C and
ByteWorks C to be viable, usable
Coach101 productive, and quality products.
SteveSand I know I got here late, I paid complete technology some money and
haven't ...
SteveSand ...heard much any news?
SteveB Vince and his crew are busy at work on CP 2.0! They haven't had
much time
SteveB to come on and do any supporting lately :)
AFL Dyfet Okay, Joker has the floor now...Go ahead Joker...
AFC Joker Just got my A2-Central today, with ads for their Summer
conference.
AFC Joker Since they're offering Pascal and C colleges at the same time,
AFC Joker which would be better for me, a programming neophyte, to take up
first?
MDW Flyer Pascal.
AFL Dyfet Go ahead Coach...
AFC Joker Why?
Coach101 Disclaimer... THis is personal opinion and opinions on languages
are "religous" in nature
AFA Gary J :)
SteveB :)
AFC Joker acknowledged...:)
Coach101 I think you will find that PASCAL is an easier environment for the
learning experience...
WinkieJim Blasphemer!
Coach101 But, I think you will find that C provides a more viable long term
platform. ga
AFL Dyfet Go ahead Flyer...
MDW Flyer Coachs' point is well put. But C forces to many Coloquiel aspects
into learnin
MDW Flyer Pascal provides a better basis to learn "Learn" programming &
enjoy it.
AFC Joker Sounds like I'd be better off in the Pascal college, then.
MDW Flyer You can experience the agnonnnnny of defeat anywhere along the
learning curve
MDW Flyer with either language. But the benefit of some english like
commonality
MDW Flyer will provide for a more productive learning curve. Move to 'C'
down the road
MDW Flyer for some greater flexibility in tools later. Done. Off the
soapbox.
AFL Dyfet GA Wind...
Windrider5 One thing to remember... learning to program in C or Pascal is one
thing, but
Windrider5 learning to program using the IIgs toolbox is
Windrider5 perhaps a bit more difficult
Windrider5 ga
AFC Joker Thanks, all for your input. :))
AFL Dyfet GA Danny
AFL DannyH I have been looking for a discontinued product by Apple
Computer.....
AFL DannyH Instant Pascal... I understand that this product is
AFL DannyH not good for programming but....
AFL DannyH it is one hell of a tutorial for...
AFL DannyH a beginning Pascal learner....
AFL DannyH any comments? ga
AFC Joker Sounds like a question, Danny.....:))))))))
AFL DannyH goes along with Tracy's question on learning
AFL Dyfet I reviewed Instant Pascal a long time ago...it was really only
suitable as a
AFL Dyfet tutorial system, but it performed that role very well. It had a
bunch of
AFL Dyfet hand holding features to help the novice user...
AFL Dyfet Unfortunately, I do not believe it is available any longer...
AFL Dyfet It ran on a 128K IIe or IIc....
AFL Dyfet Under ProDOS...
AFC Joker Danny, I know a guy who =used= to have IP, but he
AFC Joker "graduated" to a Mac, and sold most of his Apple II stuff.
AFC Joker I'll drop him an email on the local BBS to see if he still has it.
WinkieJim Joker, some people concider that being left back a grade :)
AFA Gary J (total dropout)
AFC Joker No kidding. :)
AFL Dyfet Okay, I guess Coach has been held up in Queue :)...GA :)
Coach101 One additional thought, as you learn the language and toolbox, you
will find that the language or the
Coach101 toolbox will require you to do things in a manner that may seem
unnatural to you. The best advice
Coach101 is to resist all temptation to fight and just go along with the
flow of the environment. In the
Coach101 end you will be much farther ahead... done.
AFC Joker Thx, Coach. :)
AFL Dyfet Okay, go ahead, Jonah...
ShanoJ Okay, just a quick question: I finally figured out how to write a
Twilight
ShanoJ blanker in C. To link it, however, you have to delete the .ROOT
file output by
ShanoJ the compiler (ORCA/C). Is this a Bad Thing that my children's
children will
ShanoJ regret me having done, or should I not worry about it?
AFL Dyfet Go ahead Matt...
Matt DTS Don't worry about it, as long as it's really a dummy procedure
(make sure you're not throwing away
Matt DTS something you need!). Mike Westerfield's own library source
includes a dummy procedure first in
Matt DTS every file so he can safely ignore the .ROOT files. GA>
ShanoJ Okey doke, just wanted to be sure before I told people that was
the way to do
ShanoJ it... Thanks a lot!
AFL Dyfet Okay, do we have any other questions for tonight??
AFL Dyfet Go ahead Coach..
Coach101 Does anyone know if either APW C or Orca C has a provision for
intercepting an I/O call and passing
Coach101 control to a custom routine to do the actual work? Sort of like a
"handler pointer" in the _FILE str
Coach101 ga
Matt DTS Define "I/O call".
Coach101 read() write() ioctl() fcntl() etc.
Matt DTS To my knowledge, the only way to intercept these is to write your
own standard library. GA.
AFL Dyfet If you mean stdio, you could redirect access to
stdin/stdout/stderr by directly
AFL Dyfet manipulating the text tools, as those handles are routed through
them and NOT
AFL Dyfet GS/OS. Other than that, you could patch/trap the GS/OS call
vector itself :),
AFL Dyfet but I really find it hard to imagine an application where
something that
AFL Dyfet extreme would be needed...
Coach101 What I am getting at is adding things like socket() to the system.
I have seen implementations where
Coach101 the _FILE structure had a pointer, which if non-nil the standard C
routines would pre-process and then
Coach101 pass to the pointer'd routine to do the rest of the work. It
makes adding extensions to the C I/O
Coach101 system a little easier. ga
Matt DTS If something like that were present in APW or ORCA/C, I'm sure
you'd know about it, Coach. :)
Matt DTS (GA)
AFA Gary J :)
AFL Dyfet :)...
WinkieJim Don't drool David...
Coach101 Cmon guys.... They were desperate for Qs :)
SteveB LOL Jim! ;)
AFL Dyfet Okay, Go ahead Jonah :)
ShanoJ Okay, I got some source from someone where in his TStartup record
he has the
ShanoJ shadowing and fast port bits OFF (in the QD mode word). Then he
calls
ShanoJ SetMasterSCB($C000) to turn 'em ON. Is that a cool thing to do?
When I took a
ShanoJ list with NL, $012000 wasn't allocated to anyone, so shadowing
wasn't really on
ShanoJ (even though the application thought it was)...
Dave Lyons Doesn't help! Currently you have to pass Shadow and Fastport bits
to QDStartUp if you want to
Dave Lyons use them.
Matt DTS (Dave <> protocol)
AFL Dyfet Go ahead Matt...
Matt DTS Currently, QD assumes shadowing is on and properly started if the
proper bit is set in the SHADOW
Matt DTS register - it doesn't use the Master SCB for that purpose. So the
code you speak of..
Matt DTS ...is really only fooling the programmer into thinking he's using
features he's not using.
Matt DTS (if he later directly manipulates shadowed memory, he could crash
the system, too. Uncool.) GA.
ShanoJ And Twilight... :)
ShanoJ (fooling Twilight, that is...)
ShanoJ Okay, if I OpenPort when the master SCB has been set to $C000,
will I get a
ShanoJ pointer to $E12000 as I should (because shadowing isn't really on)
or will QD
ShanoJ tell me the screen is in bank $01?
AFL Dyfet Okay, go ahead, Dave...
Dave Lyons Today you get a pointer based on the bit in the $E0C035 shadow
register, like Matt said. This is
Dave Lyons -not- guaranteed! Nobody should be trying to change the
shadow/fastport bits by calling
Dave Lyons SetMasterSCB. ga
ShanoJ So I should just use OpenPort to find the screen and tell him to
change his
ShanoJ program? Cool. :)
Dave Lyons Sounds like a plan.
AFL Dyfet Okay, go ahead Winkie...
Matt DTS Tell him to change his program anyway. No one said he could do
that. :)
WinkieJim I'd tell him to change his program...he made the mistake...
WinkieJim BTW anyone who has never broken one of Apple's Guidelines please
standup... :)
WinkieJim ga
ShanoJ <-- never broke a single rule. Always checks for errors. :)
Matt DTS <standing>
Matt DTS <ducking>
AFL Marty <standing>
Matt DTS <running>
WinkieJim Sit down matt :) :)
AFL Marty I don't program. Does that matter? :)
SteveB ::standing, but quickly sitting down:: ;)
A2Evanglst NOT EVEN MOVING ;)
AFL Dyfet ::hoping nobody notices me not stand:: :)
Dave Lyons (Anyone who has coded in circles to accomodate people who did
Weird stuff....)
WinkieJim Ok, point made :) ga
AFL Dyfet Okay, Winkie has the next question...GA Winkie :)
WinkieJim Hows this for breaking the rules:
WinkieJim Assuming I can handle sending the proper keyboard hits and mouse
movements to
WinkieJim the program running, how much trouble would it cause if I had a
CDA or a
WinkieJim other memory resident code put up a
WinkieJim menu bar and handle taskemaster behind a programs back?
WinkieJim BTW I can't rewrite the actual program...
Matt DTS I'm not touching that one...
AFL Dyfet GA Dave...
WinkieJim I'm trying to allow NDAs to be used at a Sys16 program that
doesn't allow them
WinkieJim at a certain point in the program.
AFL Dyfet Hmmm....
Dave Lyons WJ, you want the user to enter the CDA menu, choose your CDA, and
get a Desktop?
WinkieJim Something like that...
Dave Lyons And this is only when the application was *not* already using the
desktop tools?
WinkieJim Right, none of the desktop toolsets
Dave Lyons Hmmm...pretty sure it won't work anyway:
Dave Lyons for example, on ROM 1 you normally can't move the cursor while
you're in the CDA menu, if the tools
Dave Lyons were already started up. That might not be a problem if you're
starting it yourself--not sure.
Dave Lyons The next step: Is the Desk Manager sufficiently re-entrant to be
happy with you for making
Dave Lyons NDA-related calls while inside the CDA menu. Maybe.
Dave Lyons Gee, I've almost convinced myself it could work, now--but you're
still in the realm of
Dave Lyons Unsupported Weirdness Which Might Work. :)
Dave Lyons (ga?)
WinkieJim Ok, basicaly wanted to see what some other people thought of the
possibility
WinkieJim I'll let you know how much of my hard disk is wiped out but my
trying :)
AFL Dyfet :)
AFL Dyfet Okay, I guess Scott's been waiting patiently for awhile now...Go
ahead Scott :)
AFL Scott How about using SetMasterSCB to change a Ports mode - Is that
legal/guaranteed?
Dave Lyons Does it even work? I don't think so! SetMasterSCB
Dave Lyons has no effect on any port's locInfo SCB word.
AFL Scott Ok... That's right... sorry... I made a boo boo. Then what good
is
AFL Scott that tool call?
Dave Lyons Scott, good question...it may affect any newly opened or init-ed
ports; it -could- be used for
Dave Lyons enabling and disabling special features later, but that doesn't
work right now.
AFL Scott Ok, just wondering... I seem to have used it somewhere involved
with printing
AFL Scott but I can't recall with certainty since I _know_ I passed a port
during
AFL Scott printing... and did create that port with a different locinfo
record. Done..
AFL Scott GA.
ShanoJ What's the difference between the returned value from GetMasterSCB
and
ShanoJ GetStandardSCB? I THINK that GetStandardSCB gives you the SCB that
QD was
ShanoJ started with, but I'm not sure... Am I close? :)
Dave Lyons GetStandardSCB always returns $0000 as of 5.0.4 on ROM 1 (I just
looked). Not too useful, eh?
AFA Gary J :)
ShanoJ Uhh... Is there any point to the call, or should I just forget
about it and
ShanoJ move on to bigger and better things? :)
Dave Lyons I think it's pretty pointless.
AFA Gary J Does it return a $0002 on a ROM 03?
AFA Gary J (Then it would be useful) :)
ShanoJ Okey doke--that makes things easier... :)
AFA Gary J One less tool call to worry about :)