America Online
APPLE II DEVELOPMENT FORUM CONFERENCE LOG
Tuesday, June 19, 1990  10:00 p.m. eastern time
Topic:  Assembly Language Programming
Forum Leader:  Gary Jacobson (AFA Gary J)

AFA Gary J Let's see, have we had a banner yet?
Doctor Why Are we starting now or can I sneak in the question
AFA Gary J Why don't we start... (Dyfet's looking after the plumber for a
          minute :)
AFA Gary J Good evening, and welcome to the Apple II Development Forum.
          Tonight's
AFA Gary J topic is assembly language.  We'll be using protocol starting
          NOW, so if you
AFA Gary J have a question, type a "?" on a line by itself, or if you have a
          comment
AFA Gary J on the current topic, type a "!" on a line by itself.  I'll
          relinquish control
AFA Gary J back to AFL Dyfet as soon as he returns :)
AFA Gary J Looks like Doctor Why got the first question in :)  GA, Doc.
Doctor Why On Tech note 83 you mention a call to LGetPathName2. Where is that
          call
Doctor Why documented?
AFA Gary J GA, Dave
Dave Lyons Well, I *know* it's in the version of the GS/OS reference that
Dave Lyons you can't get just yet.  Other than that, I believe it was
          documented in the release notes
Doctor Why release notes?
Dave Lyons that were sent *to developers* when 5.0 came out.  Errr...maybe
          even 4.0:  I think it was
Dave Lyons invented then.  GA, Coach...you probably know better than I do,
          since I get confused by
Dave Lyons having 19000 beta drafts floating around.
AFA Gary J :)
AFA Gary J (Information overflow :)
Coach101   LGetPathName2 is documented in published manuals....  I believe I
          found
Coach101   it in GS/OS Reference Volume 2 from APDA
Coach101   ga
Dave Lyons Hey!  Coach is right--it IS in the
Dave Lyons 1/26/89 APDA draft of GS/OS reference Volume 2.
Doctor Why Accckk. The one manual I DON'T have.  :(
Dave Lyons BTW, the
Dave Lyons info is just this:  call number is $2211, and it's just like
Dave Lyons LGetPathname except the return value points to a GS/OS string
          instead of a Pascal string (a
Dave Lyons length word instead of a length byte).  done
AFA Gary J Anything else, Doc?
Doctor Why LGetPathName wouldn't be documented in the same manual? Would
          it?
Dave Lyons Sure, among other places.
Dave Lyons LGetPathname is in the ProDOS 16 Reference, too.
Dave Lyons (I don't suppose you have that one either?)
Doctor Why That one I have.
Coach101   He said he was only missing one manual Dave :)
Doctor Why (checking)
Doctor Why it's not in the index. I'll keep looking. GA
Dave Lyons Pass it a Memory ID and a file number ($0001), and get back a
          pointer, toolbox style.
Dave Lyons LGetPathname is tool $1111, and LGetPathname2 is $2211.
Dave Lyons ga
Coach101   It would be in the system loader section Why
Doctor Why Okay, thanks.
AFA Gary J Ooops, lets' get Jeffrey's comment first.. GA, Jeff
JeffreyH11 I just found Get Pathname in the System Loader section, page 242
          in my book.
Doctor Why I got it. Thanks.
Seaspider  Any idea when 6.0, New Sound tools and better graphics for the GS
          will be re-
Seaspider  leased?
Dave Lyons (Sorry, I don't have any info on Seaspider's question.)
Coach101   Seaspider,
Coach101   By and large all Apple employees are bound by non-disclosure
          agreements
Coach101   with resepect to developments that may or may not be underway at
          Apple...
Coach101   So, anyone who knows, will not be able to comment on release date
          questions
Coach101   , product directions, etc.    ga
Seaspider  Thanks anyway Dave!
Seaspider  Coach101 Understood.  Thank you.  ga
AFA Gary J Thanks, Coach.  Ok, I have a question....
AFA Gary J In Lichtey and Eyes book under Absolute Addressing (mode)... it
AFA Gary J documents the Data Bank Register (DBR) as being used "if locating
          data".
AFA Gary J What exactly does that mean?
AFA Gary J GA, Jeff
JeffreyH11 The Program Bank is used for JMP and JSR; DBR is used otherwise
AFA Gary J Ahh... yes.  If I had looked at ALL the instructions that use it
          at the
AFA Gary J bottom of the page, it would have made sense immediatly.  GA,
          Dave
Dave Lyons DBR supplies the high byte (bank byte) of addresses when the
          instruction supplies exactly two
Dave Lyons bytes (not used for direct-page addressing or long addressing).
          ga
AFA Gary J (I forgot that JMP/JSR was considered absolute :)
AFA Gary J That's what I thought, but I thought ALL absolute addressing used
          DBR, (since
AFA Gary J I forgot about JMP/JSR).  GA, Coach
Coach101   Its picky, but JMP/JSR don't quite fit Dave's precise
          description....
AFA Gary J :)
Dave Lyons (you're right...oops)
Coach101   I just use the old if it could be in a different bank its data, if
          it must
Coach101   be in my procedure bank use K...   So LDA #1234 (and its arguable
          whethere
AFA Gary J PBR is used in the case of JSR/JMP
Coach101   1234 is data or address) uses K but LDA 1234 uses DBR...    ga
AFA Gary J GA, Jeff.
JeffreyH11 LDA #1234 is immediate, not absolute addressing
AFA Gary J :)
AFA Gary J Ok, Jeffery, you have the floor now.  GA
JeffreyH11 Does anyone know when Vol. 3 of the Toolbox Reference is due for
          release?
JeffreyH11 I tried calling Apple today and they said it wasn't available
          yet.
Matt DTS   Is it my imagination or does this question get asked each and
          every week?  :)
AFA Gary J (not imagination :)
Matt DTS   It should be out any day now.  GA.
JeffreyH11 Thanks.
AFA Gary J We get a different answer every week, however :)
Coach101   We do it just for you Matt...   Its a rotating question,
          different
Coach101   people have the responsibility for asking it on differen weeks
          :)
AFA Gary J (It makes things less predictable that way :)
AFA Gene   It sure looked neat when I saw it at AFest. Complete dox of MIDI
          Synth (yay!)
JeffreyH11 I'll call back next week to see what the answer is then :)
A GibberFC I have the question Next week, Matt..... so you can ready up for
          it :)
AFA Gary J GA, Dave
Dave Lyons Gene, I don't think there's a chapter by that name in TB Ref 3:
          there's the MIDI Tools, the Note
Dave Lyons Sequencer, and the Note Synthesizer, though.  ga
AFA Gary J OK, the queue is empty!!! There must be TONS of assembly
          questions out there!!
AFA Gary J (pounds, maybe?)
Tamira     no, Gary, we are waiting for your pearls of wisdom  :>
AFA Parik  will orca/m v2.0 come with a label "some assembly required."?
Tamira     ounces????     Drams??
AFA Gary J heheh :)
Tamira     ML??
JeffreyH11 Ha Ha :?
Tamira     drops??
AFA Gary J Good assembly question, Parik :)
A GibberFC This group is just a few JSL's from a full Stack
AFA Gary J Ok, looks like Coach has a REAL question.  GA, Coach
Coach101   No, the label will read "Debugger included"
Coach101   A very general one though....    I have a process that runs
          merrily for
Coach101   hours in the background (exchanging tens of thousands of messages
          via
Coach101   AppleTalk).  But when I say something like "type src/listen.a" to
          ORCA,
Coach101   the system comes down within a second...
Coach101   The state of the system is full emulation, D=0,
          S=bank-0,page-1....
Coach101   Is there some place I can look to see how I got where I am (I am,
          of course,
Coach101   off in limbo land executing garbage when the break takes place)...
           gs
Coach101   ga
AFA Gary J GA, Dave
Dave Lyons Besides looking for return addresses on the stack, you mean?
Dave Lyons Gee...it you can't tell from that, you've gotta get a logic
          analyzer or something.
Coach101   Yes, the stack did not seem very helpful..   Not much that look
          like RTS
Coach101   or RTL (unless I was JSR/JSL ing from bank-0,page-0)  ga
Coach101   Ok, I will go back to staring the code out and executing it in my
          mind
Coach101   looking for that fatal bug.....  I do play with the state register
          and
Coach101   the state of the language card area within my Listen routine
          (invoked via
Coach101   either SIGNAL or AppleTalk)..    next ?
AFA Gary J GA, Genoxor with your question.
Genoxor    Ok, well do you think Scott Patterson used pei to animate task
          force? ks
AFA Parik  no, tsb.
Genoxor    thanks
AFA Gary J Ok.
AFL Dyfet  Okay, I guess the Q is empty again then....do we have any other
          questions out
AFL Dyfet  there for tonight?
AFL Dyfet  Okay Doctor Why, you have the floor now...GA...
Doctor Why A question on Tech note #82  (working down the list)  :)
Doctor Why It says that your window (NewWindow2) should not have an attached
          control list
Doctor Why If you create a window with controls with Genesys, I don't think
          there is a
Doctor Why way to detach the control list from the window. Do I have to DEREZ
          it and
Doctor Why make that change?
AFL Dyfet  GA Dave...
Dave Lyons Hmmm...that's really a Genesys question.  I don't know that part
          of the answer.  Of course,
Dave Lyons eventually the whole thing will become moot, when the system is
          fixed to always work right with
Dave Lyons an attached control list.  I would expect there's a way to do it
          nicely in Genesys, since I know
Dave Lyons the Genesys folks encountered the problem in their own code and
          worked around it.  ga
Doctor Why (any hints on when.....nah I know the answer)
Sir AWGS   Can ToolStartup be used safely in an NDA?
AFL Dyfet  GA Dave...
Dave Lyons What's ToolStartup?
Dave Lyons Do you mean StartUpTools?
Sir AWGS   sigh... yes Dave....
A GibberFC (Can toolstartup be used unsafely in an NDA <grin>)
Sir AWGS   (I know that answer already ! :)
Dave Lyons I don't think so--the main
Dave Lyons problem is that StartUpTools tries to do an OpenResourceFile on
          what is supposed to be
Dave Lyons the pathname of the "application" that's making the call.  The
          current implementation depends on
Dave Lyons prefix 1 and the result of GET_NAME, so it's not going to be able
          to actually open your
Dave Lyons resource fork for you, and it'll probably manage to open a 2nd
          read-only copy of the current
Dave Lyons applicatin's resource fork, in your NDA's resource search path.
          Ick.
Sir AWGS   Consider it a suggestion then ;o.
Dave Lyons So, I have to say No, ToolStartUp isn't supported from NDAs.
Dave Lyons What do you want to start up
Dave Lyons exactly?  You want it mainly for opening your NDA's resource fork,
          or for starting lots of tools?
Sir AWGS   TE, FM, Sound Tools, QDAUX. And handle all the errors nicely.
Sir AWGS   Its not hard but is cubersome. Lots of tests for _toolErr
Dave Lyons All *what* errors?  StartUpTools doesn't even tell you what
          tools
Dave Lyons were not found if there's a problem, and you have to be really
          careful
Dave Lyons starting up tools from an NDA--you're going toave to shut them
          down at DeskShutDown time (when
Dave Lyons your Init routine gets called), in many cases.  Seems like doing
          them one at a time with
Dave Lyons LoadOneTool is better.
Dave Lyons (ga)
Sir AWGS   Oops - forgot we're assembling tonight! sorry.
Sir AWGS   Wanted to use StartupTools as an alternative to startig up the
          tools myself.
Sir AWGS   ga
AFL Dyfet  GA Nuzz
Nuzz       Could you use LoadTools instead?
Dave Lyons Hmm--
Dave Lyons I guess that depends on whether LoadTools is defined as not
          causing any trouble if a tool
Dave Lyons is already loaded.  Otherwise building the table on the fly would
          be more of a pain than just
Dave Lyons calling LoadOneTool for each one not already there.  ga
Nuzz       GA
Sir AWGS   Well it would be nice to have a call that an NDA can make to
          startup a set
Sir AWGS   of the non-standard DA's @ open time and corresponding call to
          shut them down
Sir AWGS   @ close time. (and handle the memory allocation & error handling
          ).
JeffreyH11 I don't see any reason you couldn't, unless LoadTools reloaded a
          tool that was]
JeffreyH11 already in use by the current application or another NDA.
Dave Lyons Problem--you can't in general start up a bunch of tools at Open
          time and shut them down at Close
Dave Lyons time.  Consider two NDAs that both do this:  open A, open B, close
          A.  If they need some of the
Dave Lyons same nonstandard tools, B is open, but closing A shut down some of
          the tools.  Ick.  This is why I
Dave Lyons say to start them up at Open time and shut them down at Init
          (DeskShutDown) time.  And it can
Dave Lyons still cause problems with applications, since they have the right
          to load and unload tools when they
Dave Lyons feel like it (although it's recommended that they be careful about
          that, for NDA compatability). ga
Nuzz       _LoadTools_That_Are_Not_Already_Loaded  :)
Sir AWGS   NO! The correct way would be to remember which tools are loaded, &
          started
Sir AWGS   up and only set them back.
A GibberFC _Load_The_Tools_I_Want <grin>
AFL Dyfet  GA Jeff...
JeffreyH11 There would still be a problem with NDA's remembering which tools
          were started
JeffreyH11 if they close then down when closed, and another NDA is still
          using the tool.GA
Dave Lyons (Yeah...I wish I'd said that. :-)
AFL Dyfet  Okay, do we have any other comments on problems with NDA's and
          tool loading?
Sir AWGS   Hmmm I guess you could do it on an Activate/Deactivate as well.
Coach101   Naybe with a 400mhz cpu :)
Dave Lyons That's a problem too--see at least one Technical Note with my name
          on it.  It used to actually
Dave Lyons recommend that, but it can still cause problems with applications
          that don't start up all their
Dave Lyons tools at launch, since you can choose application menus while your
          NDA is in front, for ex.
Dave Lyons (And for some tools it isn't terribly practical, like possibly the
          Font Manager.)  ga
Sir AWGS   Well since its such a problem all the more reason for a tool call
          to hide it
Sir AWGS   from the rest of the app. That way you guys could muck with it and
          even have
Sir AWGS   the system jump into bed with itself if necessary.
Matt DTS   (This would probably be TN #53, "DAs and Tools".)
Coach101   What is needed is a "system" facillity that counts the number of
          starts
Coach101   and when a shutdown is done, decrements the count.   If the count
          goes to
Coach101   zero, then, and only then, actually shutdown the tool....
JeffreyH11 If you reloaded tools on every activate and unloaded on every
          inactivate,
JeffreyH11 users would not be able to tolerate the delay.
JeffreyH11 GA
Matt DTS   Let me get this straight, AWGS - you want the system software to
          take up *more* memory?
AFL Dyfet  ONE AT A TIME, please...Dave now has the floor...
Sir AWGS   Actually it will in the average case take up less. Because every
          DA won't be
Sir AWGS   duplicating this code.
Dave Lyons Unfortunately, counting the xxxStartUp calls and xxxShutDown calls
          won't work too well.  Consider
Dave Lyons an NDA that calls FMStatus, says "Oh, the Font Manager is already
          started up," and proceeds to
Dave Lyons use it without starting it up itself.  That's correct behavior,
          and there is no record of the
Dave Lyons fact that the NDA is "using" the Font Manager.  Ick.  ga
AFL Dyfet  GA Jeffry...
JeffreyH11 Still an execellent idea.
JeffreyH11 GA
Sir AWGS   So have everyone treat them as virtual tools - Everyone does a
          Startup &
Sir AWGS   Shutdown and the system resolves the rest. It could even lie in
          the "old"
Sir AWGS   status calls to be compatible with existing code.
Coach101   The present situation and available tools, does not seem to
          present any
Coach101   foolproof, or at least not extremely kludgey, solutions....
Coach101   If the problem is to be solved, and if it is worth solving, I
          really feel
Coach101   that intervention at the system level (virtual tools sounds good)
          is
Coach101   necessary....   And any change in the system means the possibility
          of
Coach101   breaking some existing code for the advancement of the species
          :)   ga
AFL Dyfet  GA Dave
Dave Lyons Hmmm...I would like to see a longer discussion of this, since it
          almost sounds strange enough
Dave Lyons to work (having Status lie, etc).  Definitely need to give it some
          thought.
Dave Lyons (Who wants to start the folder?) ga
AFL Dyfet  GA Jeffry...
JeffreyH11 You would want to create a new Status call that returns the "real"
          statos of a
JeffreyH11 tool, just so the feature is still available to new code that
          wants the info.GA
Sir AWGS   Probably... but the point is usually you shouldn't need it.. Like
          ReadMouse2
Sir AWGS   All my DAs end up having this big chunk of common code to handle
          this stuff.
Sir AWGS   I think the savings would pay for themselves.
Sir AWGS   (not to mention the reduction in bug potential).
Coach101   Thereby decreasing the cost of IIgs software
Coach101   thereby, increasing the sales of IIgs software
Coach101   thereby, decreasing the tendency to pirate...
Dave Lyons (You probably have more of your NDAs installed than the average
          user.... :-)
Coach101   thereby, increasing sales....    whew... It took a while..
Sir AWGS   thereby, causing temporary unrealistic expectations... :)
Coach101   :)
Sir AWGS   Dave: thats a safe bet... I haven't released most of them :) +
          >EGO< :)
JeffreyH11 This whole idea sounds interesting.  Dave, why don't you start a
          folder.
Sir AWGS   After all it may only toggle a pixel - but I wrote it DA*N it!
          :)
Coach101   I will give you dispensation Dave, and not move it to the NDA
          folder  :)
Sir AWGS   oooohhhhhh..... aaaaaaahhhhhhh.......
Dave Lyons Okee dokee...looking for the right place....
AFL Dyfet  Okay, do we have any other questions for tonight??
JeffreyH11 Is there a TechNote describing what you need to know to write a
          device
JeffreyH11 driver for a block device (hard drive, etc.) ?
AFL Dyfet  GA Matt...
Matt DTS   No.  That would be a book.
JeffreyH11 Yuk.  Thanks anyway.
Matt DTS   (It's called "GS/OS Reference, Volume 2" and will eventually be
          called "GS/OS Driver Reference".)
Matt DTS   Available from your local APDA.
JeffreyH11 Is it released yet?
Sir AWGS   currently available in beta form.
Sir AWGS   from APDA.
JeffreyH11 To anyone??
Matt DTS   There has been a beta draft there since 4.0.  It's available to
          APDA members.
AFA Gary J Sure, it's released!
JeffreyH11 Thanks.
Coach101   It is an EXCELLENT book....   Answers almost every question you
          could ask
Coach101   and contains sample "shell" code of different types of drivers
          ... ga
Sir AWGS   and poses many more you wouldn't have thought of :)
AFA Gary J YOU can be an APDA member.
AFA Gary J (If you aren't)
JeffreyH11 For how much???
Coach101   It is $35.00 from APDA
JeffreyH11 I meant how much to join APDA?
AFA Gary J Free, but you have to pay $20 to get..
Coach101   $20 to join APDA
AFA Gary J 4 quarterly issues of the catalog :)
AFA Gary J ($5 per catalog)
JeffreyH11 Well, I don't need the catalog - I know what I want!
Coach101   Right, and first class mail is only a nickle, the other 20 cents
          is for storage
Tamira     storage???
Tamira     oh of snail mail  :>
JeffreyH11 In the mailbox]
Tamira     what is APDA??
AFA Gary J Jeffrey, it's worth it if you want to get the info you need to do
          state-of-the
AFA Gary J art programming.
AFA Gary J APDA is an achronym standing for "Apple Programmers and
          Developers Association"
JeffreyH11 You sure you can join free if you don't want the catalog, or were
          you just
JeffreyH11 joking?  I know it's worth it, but I'm on a limited budget.  GA
AFA Gary J :)
AFA Gary J I think the catalog is "required" :)
AFA Gary J That's more or less the way they put it when Apple took it over
          from
AFA Gary J Tech Alliance.
JeffreyH11 Just like storage is "required" on first class mail.
Dave Lyons You can get CLASS 1 products without joining APDA, but most of the
          cool stuff isn't class 1 (i.e.,
Dave Lyons it's still "beta" or otherwise not fully supported).
JeffreyH11 Can I get TB Ref. Vol. 3 Beta if I join?
AFA Gary J Yep
Coach101   You can send the application and order in the same envelop.....
JeffreyH11 Where can I get an application?
Dave Lyons (At this stage, you may want to wait for the final Addison-Wesley
          book, which is better than the
Dave Lyons APDA draft.)
JeffreyH11 Will A-W be selling it other than through APDA?
Dave Lyons You can call 1-800-282-APDA...I'm sure they'll send you one.
Dave Lyons Yes, you should be able to ask your favorite bookstore to order
          you one, if they don't have it
Dave Lyons on the shelf.
AFA Gary J You can't sign up by phone, though.
JeffreyH11 So I have to call, get a form, wait for it, then order :)
AFA Gary J Sounds that way.
Coach101   Yep, thats the drill.....   Export regulations I think....
AFA Gary J I got a sign up form from my user's group.
AFA Gary J If you know someone who is a member, they can give you a form
          from their
AFA Gary J catalog.
JeffreyH11 My users' group doesn't have many programmers.
AFA Gary J They should be able to get you the APDA form though.
JeffreyH11 I'll give it a try.  Thanks.
AFL Dyfet  Goodnight everyone...need to get on some dry ground :)