AppleLink
APPLE II DEVELOPMENT FORUM CONFERENCE LOG
April 11, 1989  10:00 p.m. Eastern time
Topic:  Assembly Language
Forum Leader:  Dave Sugar  (AFL Dyfet)

AFL Dyfet  Okay, good evening and welcome to the tuesday night Apple
          Development forum chat.  Tonight's topic will be assembly language
          programming.  We will be using PROTOCOL here tonight.  This means               that if you wish to ask a question, you must enter a '?' on a line
          by itself.  If you wish to comment on the current question being
          asked, you must enter a '!' on a line by itself.  We will keep track
          of who has questions and comments pending and call upon you in the
          order your question and/or comment was noticed.  We are now open to
          questions, so rush to it, people!
AFL TracyP ?
AFL Dyfet  GA Tracy
AFL TracyP Question from a rookie programmer....how best to start?
AFL TracyP Then I'll let thepros take over...:)
AFL Dyfet  Good question.  Anyone wish to comment on this one?
AFL TracyP What
CecilFret  !
AFL Dyfet  Go ahead Cecil.
Shoggoth2  !
AFL TracyP What's the best source material forlearning?
CecilFret  First get yourself a good assembler.  SOme of this depends on what
          books you
CecilFret  choose to buy.  For example, Compute! has published a book by
          Roger Wagner
David C137 What assembler do you reccomend?
AFL Dyfet  Q=Tracy (Cecil, Shoggoth)
CecilFret  entitled Apple IIgs Machine Langauge for Beginners.  It uses
          Merlin 16 as
DwayneW    ?
CecilFret  sold by Roger Wagner.  After that, just wade in
CecilFret  ga
AFL Dyfet  Okay, your up now, Shaggoth, GA.
CecilFret  !
Shoggoth2  I was going to recommend Roger Wagner's book too.  I think it's
          excellent.
Shoggoth2  He also has one for Apple IIe/c
Coach101   !
Shoggoth2  As for assemblers...I have to get this in...I like Lisa816...it's
          underrated.
Windrider5 ?
AFL Dyfet  Okay, I believe DaveC was next...GA Dave...
David C137 What assembler do you reccomend
David C137 and is there any protocol being observed
AFL Dyfet  I believe it's Cecil's turn now...GA Cecil.
CecilFret  For assemblers, if you have a pre-IIgs, Merlin by Glen Bredon and
          sold by
CecilFret  Roger Wanger Publishing is good.  For the IIgs, I can pick no
          particular one
CecilFret  of choice.  I use APW, ORCA/M and Merlin in reviewing articeles
          for
CecilFret  Call -A.P.P.L.E.
CecilFret  ga
AFL Dyfet  GA Coach.
AFA Gary J Q = Tracy (Cecil, Coach), Dwayne, Windryder
Coach101   Besides a good book, and an assembler, read as much assembler
          code
Coach101   as you can get your hands on.  There is almost no substitute for
Shoggoth2  !
Coach101   understnading how other people have done things.  You will pick
          up
Coach101   some tricks and improve your coding speed and proficiency.  GA
AFL Dyfet  I would recommend Merlin and the programming book supplied by
          Roger Wagner
AFL Dyfet  myself.  GA Shaggoth...
Shoggoth2  I've found it helpful to examine the code output by compilers in
          learning.  GA
DennisDoms !
AFL Dyfet  GA Dennis.
DennisDoms I was going to say that the Merlin 16+ package includes Merlin Pro
          (for...
Nuzz       !
AFA Gary J Q = Tracy (Dennis, Shoggoth), Dwayne, Windryder
DennisDoms 128K IIe/IIc), Merlin 816 (for IIe/c with 65802, or IIgs), and
          Merlin 16+..
DennisDoms for the IIgs, which covers a lot of bases. I had switched to
          ORCA/APW, ...
DennisDoms but as a straight assembler I'm finding a lot to like in Merlin.
          Lisa 816...
DennisDoms may be good, but it may also be in transition (the version I have
          does not...
David C137 ?
AFA Gary J Q = Tracy (Dennis, Shoggoth, Nuzz), Dwayne, Windryder, David C
DennisDoms look complete.). Also, if you're looking at books for the IIgs, I
          like the...
DennisDoms Lichty/Eyes "Programming the IIgs in Assembly Language" book.
DennisDoms GA
AFL Dyfet  Incidently I plan to schedule in a 'novice' conf. sometime in the
          next few
DennisDoms !
AFL Dyfet  months.  I would like to wrap this question up with the comments
          now pending
AFL Dyfet  from Nuzz and Dennis and move on to the other questions out there.
           GA Nuzz.
Nuzz       I've always found that to learn, start with a basic task. Write a
          SMALL ---
Nuzz       and don't stop till its done...GA
AFL Dyfet  Okay, Dennis, GA.
DennisDoms Almost forgot...an advantage of Merlin is the disassembler
          (Sourceror) ...
DennisDoms which can give you some training in taking apart existing code.
          GA
AFL TracyP Thanks fellows........
AFL Dyfet  Okay, thank you Dennis.  Our next question is from Dwayne.  GA
          Dwayne.
AFA Gary J Q = Dwayne, Windryder, David C
DwayneW    I would like to know of a good source to learn some basic math
          algorithms...
JimMensch  !
DwayneW    in assembler.  I've been writing some code for some time, but
          floating point
Solo GS    I need help with ImageWriter II printing problems....
DwayneW    and normal mult, div functions give me trouble.
Shoggoth2  !
AFL Dyfet  Okay, Jim.
AFL Dyfet  GA
JimMensch  Well, two books that I know of are Programming the 65816 by eyes
          and Lichty (excelent integer
JimMensch  multiply and divide routines (but they could be a little
          faster...
Solo GS    geezzzzzzzzz
AFA Gary J Q = Dwayne (Jim M, Shoggoth), Windryder, David C
JimMensch  and for floating point, Mike fischers 65816 assembly language
          programming ( the examples are not
JimMensch  very fast but the explanations of floating point are quite
          good...)
JimMensch  GA
AFL Dyfet  Okay, thank you Jim.  I believe Shoggoth is next.  GA Shoggoth.
Shoggoth2  Just take the easy way out and use SANE.  mult & div are a pain on
          65xxx chips
Shoggoth2  GA
DwayneW    !
AFL Dyfet  Okay, are there any more comments?
AFL Dyfet  Okay, GA Dwayne...
AFA Parik  !
DwayneW    I would use SANE, but the project I'm working on is for a //e,
          although I am
DwayneW    writing the code on a //gs.  :)
DennisDoms !
Shoggoth2  !
AFA Gary J Q = Dwayne (Parik, Dennis, Shoggoth), Windryder, David C
AFL Dyfet  Okay, GA Parik.
AFA Parik  6502 Software Design by LEO J. SCANLON contains a lot of examples.
           GA
AFL Dyfet  Okay, Dennis, GA.
DennisDoms Bob Sander-Cederloff printed some routines in Apple Assembly
          Lines; you may...
DennisDoms be able to reach him via Applied Engineering. ?: Does Apple still
          license...
DennisDoms the 8-bit version of SANE? That may be an option.
AFL Dyfet  I believe your up now, Shoggoth, GA.
Shoggoth2  As Dennis said, there was a 6502 SANE.  I've got it.  Don't know
          if it's...
Shoggoth2  still avail.  GA
Matt DTS   !
AFL Dyfet  I'd have to find one of my Apple sheets to check...maybe Matt :)
          knows...
AFA Gary J Q = Dwayne (Matt), Windryder, David C
AFL Dyfet  GA Matt
Matt DTS   It's still available from Software Licensing, who will send you
          information for the simple act of...
Matt DTS   ...calling (408) 974-4667.  GA.
AFL Dyfet  Okay, are there any more comments?
AFL Dyfet  Our next question was from Windryder.  GA Windryder...
Windrider5 Any suggestions about mixing Assembly and C e.g. when to use each
          language in
Windrider5 a program
Coach101   !
CecilFret  !
AFL Dyfet  GA Coach.
Coach101   I would suggest using C as much as is possible in the early stages
          of the program development; using assembly only where it is
          absolutely
Coach101   required (i.e., manipulating the B register is a good example).
Coach101   Once the program is up and functional, then convert speed
          bottlenecks
Coach101   and/or size bottle necks into assembly (using the C source as
          the
Coach101   algorithm to implement).  Generally speaking, you will code
          faster
Coach101   and with less bugs in a higher level language...  ga
Shoggoth2  ?
AFL Dyfet  Okay, I believe you are up now, Cecil, GA.
CecilFret  Coach pretty much covered what I wanted to say.  I just want to
          add that the
CecilFret  May issue fo Call -A.P.P.L.E. has an article on how to interface C
          with
CecilFret  Assembly language.
CecilFret  ga
DennisDoms !
AFL Dyfet  GA Dennis.
DennisDoms This is theoretical at present, but the ORCA Desktop Debugger has
          a ...
DennisDoms "profiler" utility that will help show where the program is
          spending it's...
AFA Gary J Q = Windrider (Dennis), David C, Shoggoth
DennisDoms time. If ORCA/C utilyzes this (when released :), this would be a
          useful...
DennisDoms tool in determining where to apply assembly (or better
          algorithms). GA
Brin Londo Have used Profiler
AFL Dyfet  I believe our next question is from David C.  GA David.
David C137 I have heard that Orca/M is ponderous and difficult to use. Is
          this true?..
DwayneW    !
AFL Dyfet  GA Dwayne.
David C137 And any info on the novice conference would be appreciated.  GA
DwayneW    I'm little better than a novice, but I haven't had much trouble
          learning to
CecilFret  !
DwayneW    use ORCA/M.  My only gripe is having to quit to use applesoft,
          then rerun
DwayneW    ORCA/M to change some more code in my programs.  GA
AFL Dyfet  GA Cecil.
AFA Gary J Q = David C (Cecil), Shoggoth
CecilFret  I  think a lot of packages like ORCA/M are ponderous at first.
CecilFret  Even for someone like myself who has been in the business for
          years.
CecilFret  You are right, exiting out to Applesoft is a pain then having to
          come back
CecilFret  in.  Unfortunaltely, this is a "problem" with the rest like APW.
CecilFret  ga
Coach101   !
AFL Dyfet  In regards to the 'novice' conf., I plan to hold the first one
          sometime in late
AFL Dyfet  may.  GA Coach.
AFA Gary J Q = David C (Coach), Shoggoth
Coach101   The exiting/re-entering should not be that bad.  With APW and I
David C137 !
Coach101   probably with ORCA you can define an alias that will make it
Doc Arcane ?
Coach101   possible to use a simple command to get to AppleSoft.  Getting
Coach101   back is as simple as stroking BYE.   If you have enought memory
Coach101   your times may be even quicker (less disk activity?). ga
AFL Dyfet  Okay, thank you coach.  GA David C.
David C137 I would suggest using programming excercises for beginners like
          me. GA
Brin Londo !
AFL Dyfet  Okay, Brin, GA.
AFA Gary J Q = David C (Brin), Shoggoth, Doc Arcane
Brin Londo Would it be possible to have a "Switcher" for Applesoft.  We're
          only taking
Brin Londo about swapping 64k.  GA
AFL Dyfet  Any comments?
Dave Lyons !
AFL Dyfet  I knew you would, Dave :).  GA Dave...
Dave Lyons SoftSwitch already works for Applesoft...am I missing the
          question?
Brin Londo !
Dave Lyons If the ? is switching out 16-bit application, there are lots of
          problems. ga
AFL Dyfet  GA Brin.
Brin Londo Interrupt, save state, swap banks, cold start ProDOS8? GA
AFL Dyfet  I believe our next question is from Shoggoth.  GA shoggoth.
Shoggoth2  For Matt: You probably can't comment, but I'm waiting desperately
          for GS/OS...
AFA Parik  ?
Shoggoth2  resource forks.  They'll make programming life *much* easier.  Any
          dates?  ga
Matt DTS   !
Coach101   Probably the 31st of a month :)
AFL Dyfet  GA Matt.
AFA Parik  heheh Coach
Matt DTS   You already have resource forks!  Now if you want a resource
          MANAGER, to split it into discrete...
AFA Gary J Q = Shoggoth (Matt), Doc Arcane, Parik
Matt DTS   ...chunks and toolbox support, etc., *that* I can't comment on,
          other than to say it is coming.
Shoggoth2  !
Coach101   !
Matt DTS   GA.
AFL Dyfet  Go ahead Shoggoth.
Shoggoth2  Yes, resource manager is what I meant. ga
AFL Dyfet  GA Coach.
Coach101   Matt, I hate to be picky (nah, its my nature) but we have
Matt DTS   (Just trying to throw in a little levity before lowering the "no
          comment" boom.  GA)
Coach101   been told by Apple to _NOT_ user resource forks yet.  Ergo,
Coach101   we DO NOT have them yet!
Dave Lyons !
Shoggoth2  !
Coach101   :)
AFL Dyfet  Okay, Dave...GA
AFA Gary J Q = Shoggoth (Dave), Doc Arcane, Parik
Dave Lyons You can wirte your Copy program to COPY the resource forks...you
          just can't yet
DaviesDoug !
DaviesDoug I already did
Dave Lyons know their structure.
AFL Dyfet  GA Shoggoth
Shoggoth2  If Apple doesn't define them soon, programmers will take the
          matter into their.
Shoggoth2  own hands.  I believe that's what TML is doing for v2.0 Pascal and
          Basic.  GA
AFL Dyfet  That would be a mistake.  As Matt said, Apple is working on
          resource support
Matt DTS   !
JimMensch  !
AFL Dyfet  and I see Matt wants to comment here...GA matt...
Matt DTS   (Let Mensch go first - I already had a turn)
AFL Dyfet  Okay, Mensch...GA
JimMensch  On the matter of resource forks....
JimMensch  Well, here are some facts...
Doc Arcane ?
JimMensch  If you define your own resource data types, be sure to look at
          inside mac and leave the proper number
JimMensch  of header bytes at the beginning for Apple standard header
JimMensch  (no matter what happens, you can be sure at some level those will
          get trashed)
JimMensch  If you define your own resource definition, don't be supprised if
          one day they get screwed up..
JimMensch  I wish I could give you a day....
JimMensch  And
Shoggoth2  !
JimMensch  While the resource fork of a file does indeed currently exist in
          THEORY
JimMensch  none of the current software (finder et al) will acknowledge their
          presence and if they have to
JimMensch  deal with them the resource fork may get trashed.
AFL Dyfet  (Your question is next, Doc Arcane...) GA Shoggoth.
Shoggoth2  I've consigned myself to wait for Apple...but I can't speak for
          others. :) GA
JimMensch  So, in short.... you really do not have resource forks right now.
          Maybe they should be left
JimMensch  unused
JimMensch  GA
BillP      !
BillP      cancel !
AFL Dyfet  I don't recall Doug, Gary...but if he has a comment...GA
          Doug...:)
DaviesDoug .sorry done. in another room for a sec
AFL Dyfet  Okay, our next question is from Doc Arcane.
AFL Dyfet  GA Doc.
Doc Arcane Please bear with me, I've been out of the assembly scene for some
          time.....
Doc Arcane First, is there a devlopment system for the GS on the MAC? I
          heard...
Doc Arcane there was one, and second, will there be something similar to
          Multi-finder...
AFA Parik  <recant ?>
Doc Arcane for the GS, or is that what forks are? I'm unclear on what forks
          are. GA
AFA Gary J Q = Doc Arcane, Parik
AFL Dyfet  Yes, there is a Mac version of the APW environment available for
          cross-
Shoggoth2  !
AFL Dyfet  development.  GA Shoggoth.
Shoggoth2  Randy Hyde is working on Multi-Anix, a multi-tasking GS/OS
          shell...
Shoggoth2  don't hold your breath, though. GA
AFL Dyfet  He's not the only one working on that :) (don't hold your breath
          from here
Brin Londo <too late, already blue>
AFL Dyfet  either though :)...I believe Cecil had some information he wanted
          to give
AFL Dyfet  us at this point in regards to Call Apple.  You have the floor,
          Cecil, GA.
AFL Marty  <breathe in....  breathe out>
CecilFret  As some of you may know, I am Technical Editor for Call
          -A.P.P.L.E. Magazine.
CecilFret  We are under some fire from the pre-IIgs owners for not having
          many articles
Brin Londo ][
CecilFret  which do not involve the IIgs.  The fact is, we don't have any
          articles from
CecilFret  authors in the queue.  So if any of you think you have a good
          program and
CecilFret  wouldlike to take a crack at getting it published, send it to
          us.
CecilFret  Thanks Gary.
CecilFret  ga
Brin Londo !
AFL Dyfet  GA Brin.
Brin Londo Fact is, I started my Call-Apple sub. after you started getting
          IIGS...
Brin Londo was getting pretty "waterered" down with "begining" ProDos
          article. GA
AFL Dyfet  I am also planning a conf. sometime in the future specifically for
          8 bit
AFA Gary J Yes, it is hard to please ALL of the people ALL of the time!  :(
AFL Dyfet  programming for those that have felt left out...
AFL Dyfet  Are there any more comments or questions at this point?
DaviesDoug ya, where did matt go? :)
Brin Londo !
AFL Dyfet  GA Brin.
Brin Londo I came in late. So forgive if covered.  Display card need GS/OS
          tools? to ...
Brin Londo fully utilize?
Brin Londo and I mean FULLY. ga
AFL Dyfet  There is a toolset provided for the GS to use the card...I suppose
          you can
AFL Dyfet  directly twiddle the port addresses if you want :)
Brin Londo !
AFL Dyfet  GA Brin.
Dave Lyons !
Brin Londo Hear rumur it will drive "psuedo" super-hires on //e (true?) gao
AFL Dyfet  GA Dave.
Dave Lyons I don't even know what all the dang card CAN do, much less whether
          the toolset
Dave Lyons lets you do it all!  I have also heard that the card will let a
          IIe have
Brin Londo !
Dave Lyons super-hires, and that it'll let a GS have two separate super-hires
          screens.
Dave Lyons I don't know if
AFL Dyfet  I saw some mention of interlace support for 400 lines, but no info
          on how to
Dave Lyons QuickDraw can be easily modified to allow Mac II-like tricks w/
          two monitors
Dave Lyons in the same coordinate system (in different places).  done
AFL Dyfet  get there.  It also can have it's video buffer mapped in different
          places
AFL Dyfet  in memory (perhaps page flipping can be done :)...but I'm not too
          up to date
AFL Dyfet  on it either.  GA Brin.
Brin Londo Saw card at MACUL (Detroit) impressive device!!
AFL Dyfet  Any further comments?
Brin Londo !
AFL Dyfet  GA Brin.
AFA Gary J <I'd sure like to see it.)
Brin Londo Seems to be thinning out.  How about a //c question?
AFL Dyfet  A //c question?  Sure...feel free to ask away...
Brin Londo LDA $C019 on //e  (changes +/-)  on IIGS (changes +/-)  on //c
          (nothing)...
DwightW1   got to go...excellent conference tonight
Brin Londo is the darn INT firmware grabing and clearing?
AFL Dyfet  I believe that's the VBL detect softswitch.  On the //c you cannot
          read the
AFA Gary J Goodnight, Dwight.
AFL Dyfet  this switch, but instead are reading whether VBL interrupts have
          been enabled.
AFL Dyfet  A slight difference there between the //c and the other machines
          :)
Brin Londo Time to update a ][ tech note. #19 I think.  Thanks
AFL Dyfet  I've wondered about that peculiarity myself.  I also believe the
          IIgs VBL works
AFL Dyfet  oposite of the //e, that is, it's negative during VBL where the
          //e is
AFL Dyfet  positive...:)
Brin Londo That's right but the //c unlike the //e,IIGS,Laser 128,Franklin,
          etc. ...
Brin Londo doesn't let you just look at the VBL going by. GA
AFL Dyfet  Correct.  You can only detect VBL on the //c by an interrupt
          handler.