💾 Archived View for gemini.spam.works › mirrors › textfiles › apple › ADC › adv.891017 captured on 2020-10-31 at 20:59:42.

View Raw

More Information

-=-=-=-=-=-=-

America Online
APPLE II DEVELOPMENT FORUM CONFERENCE LOG
October 17, 1989  10:00 pm eastern time
Topic:  Special Guest:  TML Systems

        Discussion following the conference on how
        to do decimal arithmatic in assembly language for
        use in 3-D animation routines.

Forum Leader:  Dave Sugar  (AFL Dyfet)


TML Vince  Looks like we may be missing our west coast regulars tonight..
AFA Gary J Yup.
A2GS       or at least our SF regulars.
AFL Dyfet  And others, Vince...I have heard from Dave Lyons and Matt, though,
           and they are
TML Vince  San Jose is a real mess from what I'm hearing on TV..
AFL Dyfet  okay, just without power.
TML Vince  Darn, was hoping Matt and Dave would be here.
TML Vince  Hello Tom
A2GS       where are they from?
TML Vince  Cupertino..  just south of San Jose
TML Vince  right in the middle of the whole mess
TML Tom    Greetings. 
AFL Dyfet  Appearently some of the buildings were cracked, and they had to
           evacuate
AFL Dyfet  Apple.
AFA Gary J Hi Tom
AFL Dyfet  But nobody there was hurt.
TML Vince  glad to hear that..
AFL Dyfet  Though Dave lost a monitor, and Matt gained a light fixture in his
           cubical...
TML Vince  :)
A2GS       :)
AFA Gary J Hope everyone had backups  :)
TML Vince  Oh well, there goes my tech support... :))
AFL Dyfet  Well, for those who might have missed the intro's we skipped, we
           do have two
AFL Dyfet  guests here from TML Systems, Vince Cooper, and Bob Leanord :). 
           Most of you
TML Vince  Err, Tom's here, not Bob... :)
TML Tom    Sorry, its Tom
AFL Dyfet  are probably more familiar with Vince as 'AFL Vince' :), (Yes, you
           are right,
AFL Dyfet  Vince, I did confuse that :), but if Tom would like to take this
           oppertunity to
AFL Dyfet  introduce himself, this would be a good time :).
TML Tom    Hi, I'm the president of TML Systems and the author of the
           recently released TML Pascal II compiler
TML Tom    for the Apple IIGS.
TML Tom    I've also written the TML BASIC compiler and TML Pascal for the
           Mac.
TML Tom    I'm here tonight to answer whatever questions you might have about
           TML Pascal II.
TML Tom    ga
AFL Dyfet  Thank you Tom :).  Now, who would like to ask the first
           question?
TML Vince  I would, I'd like to know how many people here have actually seen
           the new compiler?
Doctor Why I have.
AE PhilM   Not I.
AFA Gary J Not I.
BRENTON    Nor I.
AFL Dyfet  I have, for one :)
John moyln not I(just spent the upgrade money on the Mac version...:)
Windrider5 Not I
Terry Cox  Not I
TML Vince  Ok, maybe we should tell you a bit about it, then you can ask
           questions...  
JDavies1   what are we commenting on?
AE PhilM   Sounds like a good chance for 8 sales :))
Windrider5 ?
AFA Gary J :)
AFL Dyfet  How many here are familiar with the older version of TML Pascal?
John moyln I am...
BRENTON    Sorry.
John moyln ($@&^^($@* 32k editor...;)
AE PhilM   Sort of..
Doctor Why I am.
Terry Cox  Nope.
JDavies1   I am
A2GS       A little
TML Tom    I'll give a brief intro to TML Pascal II.
AFL Dyfet  Okay, perhaps a good start, Vince, would be to explain some of the
           differences
AFL Dyfet  and then explain about TML Pascal in general for the new folks :).
            GA Tom, I
AFL Dyfet  did not see your comment fly in :)
TML Tom    TML Pascal II is a new version of the original TML Pascal compiler
           for the IIGS.
TML Tom    It is a stand-alone application which operates in the IIGS 640
           mode graphics screen.
TML Tom    The product has an editor, compiler, linker and a resource
           editor.
TML Tom    The compiler and linker are mostly the same as the original
           version with bug fixes and general
TML Tom    improvements.  The major new features include a new text editor
           based on the new TextEdit toolset,
TML Tom    interfaces to System Software v5.0, and most importantly the
           resource editor.
TML Tom    System Software 5.0 implements a Resource Mgr like the Mac and the
           other toolsets have been extended
TML Tom    to support resouces.  This allows you to implements windows,
           menus, dialogs, etc. separate from the
TML Tom    code in your program.  And further, these user interface elements
           are now created "graphically" 
TML Tom    with the TML Pascal II resource editor.
TML Tom    That sounds like enough.
TML Tom    ga
AFL Dyfet  Thank you Tom :)...Okay, I believe that Windrider has the next
           question, GA.
Windrider5 I have a very general question.
Windrider5 Why did you choose the pascal language over other languages such
           as C
TML Tom    TML Systems shipped its first product in December 1985.  It was a
           Pascal compiler (the first one!)
TML Tom    for the Mac.  When the IIGS was released, we decided to port that
           compiler to the IIGS.
TML Tom    So it was mostly a business decision since that was (and is) the
           technology that we have.  TML Systems
TML Tom    has never programmed and projects in C, although we use assembly
           quite routinely.
TML Tom    ga
AFL Dyfet  Okay, I believe Phil has the next question and the floor now.  GA
           Phil.
AE PhilM   Can you link APW OMF files with the TML Linker?  If you can that's
           great, if
AE PhilM   not how do you incorporate Assembly language routines in a TML
           Pascal program?
AE PhilM   ga
TML Tom    No, the TML Pascal II linker can not link APW OMF files.
TML Tom    Now that we have completed the features we thought were most
           important for TML Pascal II (the resource
TML Tom    editor and System 5.0 interfaces) I think that Vince has pretty
           well communicated that this 
TML Tom    feature is really needed.  I would look for it in
TML Tom    furture versions.
TML Tom    ga
TML Vince  As for now, we do have the Inline statement..  :)
AE PhilM   Thanks :)
AFL Dyfet  I would like that feature, too :)...I believe that A2GS has the
           next question,
AFL Dyfet  GA A2 :)
A2GS       Has TML thought about an assembly language assembler (made up
           completely of 
A2GS       custom routines if the Desktop is the interface you would go with,
           except for
A2GS       such things like interfacing with the Resource Manager, etc)  GA
TML Tom    No, I don't think that you will see TML Systems release an
           assembler.  There are already two
TML Tom    very fine assemblers for the machine.
A2GS       Agreed...What do you consider them to be?
AFA Gary J :)
AFL Dyfet  :)
TML Tom    However, we will in the future provide a mechanism to link in at
           least OMF files.
TML Tom    Oh, I think I take a no comment on that one.  But I will say that
           I use the MPW IIGS assembler for
TML Tom    whatever that is worth.
TML Tom    ga
A2GS       O.K.  Thanx  :)
AFL Dyfet  A good answer, Tom :), actually, we all probably have strong
           prejudices on that
AFL Dyfet  one :).  Okay, do we have any more questions from the audiance
           tonight?
AFA Gary J Q = <empty>
AFL Dyfet  Okay, Doctor Why, GA, you have the floor now.
Doctor Why Reading some of the folders here, there have been a number of
           problems with
Doctor Why the current version of TML PASCAL II, (not all your fault)
Doctor Why You mentioned that there will be an update soon?
TML Tom    You are absolutely right.
A2GS       Never mind my Q, Gary.
TML Tom    We have had numerous problem completing the software.  Some
           because of System Software v5.0
TML Tom    and some because we just tried to do too much in the time frame
           allocated.
TML Tom    We have now been shipping v1.1 of the compiler together with
           System Software v5.0.2 from Apple for
TML Tom    about 2 weeks and this configuration has proved to be VERY solid. 
           We have also shipped free update
TML Tom    disks to all customers who received v1.0 earlier this week.
TML Tom    Vince, do you know what day that was?
TML Vince  The last of the update disks went out yesterday.  Some folks
           should begin receiving them by tomorrow
Doctor Why You shipped to all registered owners?
TML Vince  The only problem the update didnt take care of was the TE cut and
           delete problem which will fix itself
TML Vince  with a future system software update from Apple.. :)
TML Vince  GA
Doctor Why Thanks.
AFL Dyfet  Thank you, Vince and Bob :), does anyone else have any questions
           for tonight?
TML Tom    Any good meaty techical question?
A2GS       Can TML Pascal II compile and link during a major Earthquake?
A2GS       :)
TML Tom    Even if you lose power!!!  Its that good!
John moyln what sort of enhancements were made to the editor?
TML Tom    The editor was replaced entirely.  It is now based on the Text
           edit toolset provided with
TML Tom    System Software v5.0.x
TML Tom    The major new features in the editor include:  much impoved
           find/replace, any font/font size, no 32K
TML Tom    limit on file size, Undo, ...
TML Tom    ga
AFL Dyfet  I think people will most appreciate the breaking of the 32K
           boundry :).  Okay,
AFL Dyfet  I see that AFL Scott is next, GA Scott.
AFL Scott  How does the compiled look and run (speed wise) with respect to
           code generated
John moyln (yep, into the present, our of the dark ages...;)
AFL Scott  under the full optimization of compilers like ORCA/Pascal?  It is
           my under-
AFL Scott  standing that TML II is an optimizing compiler, is it?  
AFL Scott  GA
TML Tom    Well, I think that our compiler makes some very good decisions
           about the code it generates, but
TML Tom    I would not really call it a "optimizing" compiler.  Such a
           compiler would make at least two passes
TML Tom    during code generation to make sophisticated code generation
           decisions.  The MPW IIGS compiler does
TML Tom    this, I don't know what the ORCA compiler does.
TML Tom    We have tried to emphasize speed, ease of use and now the resource
           editor capability.
AFL Dyfet  I think TML has done pretty well in the ease of use part,
           certainly :)...Okay,
AFL Dyfet  I see that A2GS has the next question, GA A2GS.
A2GS       This is way off the subject, but I was wondering if maybe one of
           the TML guys
A2GS       or anyone else for that matter, has any idea where I might be able
           to find code
A2GS       or an algorithm for writing floating point routines in assembly
           language?  GA
TML Tom    Not me.
TML Vince  Hmm.. not I...  I use the tools that are provided.. Ie SANE  :)
A2GS       Thanx anyways   :)    :(
TML Vince  Since I'm not a masochist, I avoid Assembly when at all possible..
            :)
AFL Dyfet  Way back in a few very old issues of Byte, there were some pretty
           good articals
A2GS       need them for 3-d routines :)
AFL Dyfet  on implimenting floating point math, and perhaps in other places
           as well :).
A2GS       how far back?
AFA Gary J There's a 3-d package in our library :)
A2GS       when/where?
AFL Dyfet  As to 3-d routines, I think, for speed, you would do best with
           table driven
AFL Dyfet  lookup routines for cos/sine :).
A2GS       Working on my own....have all the routines/algorithms except for
           the FP ones!
AFL Dyfet  That is what Sublogic's 3-d toolkit did :)...I see Scott wishes to
           comment, GA
AFL Dyfet  Scott :)
AFA Gary J A friend of mine wrote the one in our library, I'm not sure what
           he did for
AFA Gary J his algorithms.
AFL Scott  Is there any support planned for the Innovative Systems Floating
           Point Engine?
A2GS       Will still need FP routines even with Cos/Sin Table (already had
           it in mind :)
TML Vince  Scott?
AFL Dyfet  I believe Scott's question was directed twords TML :)
AFL Scott  I do to!:)
AFL Scott  too!:)
TML Vince  err, I missed it :)
AFL Dyfet  Um, Scott?
ProDude    (scroll up)
TML Vince  Oh, Floating Point Engine...  we've discussed it, and I'm really
           wondering how much saturation this
TML Vince  product has really made...  In other words, is full support really
           needed?  you tell me :)
AFL Scott  I think so.
AFL Scott  Anything is better than SANE.
TML Vince  ah, a single voice raises from the masses.. :)
TML Vince  I dont know, Tom, comments?  FPE support, or the AE math card for
           that matter..
AFL Dyfet  I think it would be good, too, for those who have need of high
           powered math
AFL Dyfet  support :).
AFA Gary J I don't think Scott's opinion of SANE is singular.
AFA Gary J :)
AFL Dyfet  That is also true, Gary :)
AFL Scott  Either built in support or optional support (user purchase--extra)
           would be
AFL Scott  so nice!:)
TML Tom    Unfortunately, I don't think we have the resources right now to
           recode the code generation for these
TML Tom    alternative FP mechanisms.  I believe each of these, however,
           patches SANE and dispatches the calls
TML Tom    to their respective boards?  GA
TML Vince  I know FPE does this guys, not sure about FastMath
TML Vince  GA
AFL Scott  It does, but it's several orders of magnitude faster to call the
           card directly
AFL Scott  than to use the init.
TML Vince  understood, and noted... :)
A2GS       Prefer homemade FP routines for a Compiler.
A2GS       NOT SANE!!!
Doctor Why ?
A2GS       inSANE
TML Vince  anyone else have a question relating to TML Pascal II?
AFL Dyfet  I see that Doctor Why has a question :).  GA Doctor :)
Doctor Why Are there any plans to add support for resources for icons and
           cursors?
TML Tom    We will certainly enhance the resource editor based on demand.  I
           think that cursors and icons are
TML Tom    right at the very TOP of the list!
AFL Dyfet  Okay, I believe that A2GS has the next question.  Ga A2, you have
           the floor
AFL Dyfet  now :)
A2GS       How would you compare TML Pascal II with your competitors ver. of
           Pascal?  GA
TML Tom    I think that our major advantages are speed, ease of use, System
           Software 5.0 support which is fully
TML Tom    conformant to the new Apple interfaces for Pascal, and most
           especially the resource editor.
TML Tom    Their product's major advantages are the debugger and
           multi-language integration.
TML Tom    ga
TML Vince  I'll add that Ease of Use covers many angles!
A2GS       Can you compare yours speedwise?  (compiling time)
A2GS       and what comes with the TML PASCAL II package?  GA
TML Tom    Honestly, I haven't compared their latest version with TML Pascal
           II so I don't think it would be fair
TML Tom    to say exactly.
TML Vince  Speed wise, we're considerably quicker...  I think you'll find our
           competitor himself is willing to 
TML Vince  conceed the speed issue to us.  
TML Vince  GA
TML Tom    The TML Pascal II product comes with two disks and a manual.  The
           disks include System Disk v5.0.2,
TML Tom    the second disk contains the compiler, examples, toolbox
           interfaces and source code to the interfaces.
A2GS       Manual?
TML Tom    The manual is pretty standard stuff.  I think the nicest feature
           is a complete listing of the toolbox
TML Tom    interfaces with a full index of every toolbox procedure, function
           and typename!
A2GS       Clear list/explanation of commands available and usage?  GA
AFL Dyfet  Have you considered making that kind of information available
           online in a live
AFL Dyfet  help system?
AFL Dyfet  (online, as in, while using the product, not as in on AO :)
TML Tom    Yes, but so little time...  Anyone want to do it?
TML Vince  We also have a nice Source Code Library available as a companion
           product... :)
AFL Dyfet  It would certainly make an interesting companion DA for TML Pascal
           :)
Rohit      What does 
Rohit      How much does TML Pascal II cost?
TML Tom    $125 retail and $49.95 for the SCL
Rohit      Whats SCL?
AFA Gary J Source Code Library
AFL Dyfet  Source Code Library, sample Pascal II source code, Rohit.  Okay, I
           believe we
AFL Dyfet  can move to Doctor Why's question now.  GA Doc.
Doctor Why In your first flyer on TML Pascal II, there was a contest
           mentioned. Can you
Doctor Why give us some more details?
Rohit      Doyou know of any good programs that were made with TML Pascal?
TML Vince  I'll take this one... :)
TML Vince  I'm in the process of working out the final details of the
           Programming Challenge right now.  You'll
TML Vince  receive information on this when you return the registration card
           from Pascal II.  I think you'll
TML Vince  like what we're lining up for you!
A2GS       What's the prize?
TML Vince  As for good programs written with Pascal II, if you've looked at
           Britanica Software's new 
TML Vince  Revolution 76 game, it was written totally with TML Pascal..
Rohit      Thanks
Rohit      Bye
TML Vince  And I can't tell you the prize... it would ruin all the fun... :) 
           kind of like christmas.. :)
A2GS       prize?
TML Vince  GA
AFL Dyfet  Okay, I see that Doctor Why has a new question, GA Doc :)
Doctor Why Does the update just sent out have any changes to interfaces?
TML Vince  Yes, we changed a couple of things in the Print and Desk
           interfaces.
TML Vince  I'm sure other things will eventually be found..  Apple is still
           in the process of setting those 
TML Vince  things in stone.. :)
Doctor Why :)
TML Vince  GA
Doctor Why the cement is still wet.  :)
TML Vince  Anyone else got anything about Pascal II you want to ask?
AFA Gary J What's the status of TML BASIC?
TML Vince  Gary, its fine...  :)  
TML Vince  Gee, and I thought we were going to make it all night without that
           one... :)
TML Tom    Bye.
Doctor Why Night Tom.
TML Vince  Night, Tom
TML Vince  Actually, I havent made any decisions about Basic, and it looks
           like that decision is going to be
A2GS       oops missed.
TML Vince  my problem to make..
AFA Gary J What kind of decision?
TML Vince  I want to look at a few things market wise before I do or say much
           about Basic..
AFL Dyfet  I think it would be a very good time to put out a decent basic for
           the gs
AFL Dyfet  myself...:)
Doctor Why How about making TMLBASIC capable of doing custom controls?
TML Vince  About how much we're going to do with it Gary, it needs more than
           a simple update.
AFA Gary J :)
TML Vince  in all honesty, it needs HELP
TML Vince  :)
TML Vince  how many of you actually write serious programming projects in
           Basic?
A2GS       Ampersand revisited.
AFA Gary J I picked up an unopened copy at a garage sale, but have never
           cracked the
A2GS       LOL Vince.
AFA Gary J wrapper.
AFA Gary J I don't write serious programs in BASIC because I don't have a
           serious BASIC.
AFL Dyfet  Well put Gary!!
Doctor Why Sometimes you just don't want to write a serious program!   :)
TML Vince  The problem with Basic is that the toolbox is not designed for it.
            Pascal and C are stack based 
TML Vince  languages, Basic isnt.  The toolbox is designed to interact with a
           stack based language...  It CAN
TML Vince  be done, but not done well.
AFL Dyfet  One can mold the internal architecure of Basic in any way one
           wishes,
AFL Dyfet  actually :)...One only needs to see what MicroSloth did with
           QuickBasic to see
AFL Dyfet  what Basic can be :)
AFA Gary J Right!
AFA Gary J (I DO have QuickBasic on the IBM clone at work :)
TML Vince  I'm looking seriously at QuickBasic, Dave..  It is a good
           implementation, but it still leaves a lot
A2GS       You can have it!
TML Vince  to be desired for serious programming projects.
TML Vince  I'm looking at QB for the Mac.. :)
AFL Dyfet  The Mac implimentation, from what I have seen, is a very poor
           cousin of the
AFL Dyfet  PC ones, and lacks most of the features found there.
TML Vince  It's a nice attempt, as is Zbasic on the Mac..  Like I said, our
           basic can be made better...  I just
TML Vince  need to do some study before I'm willing to commit to anything.
Doctor Why Vince, can I ask a dumb question on Pascal II?
AFA Gary J No such thing as a dumb question :)
TML Vince  GA,  Doctor
Doctor Why Just wait... :)
A2GS       :)
Doctor Why When printing out samples and selecting page numbers, I only got
           it on the
Doctor Why 1st page.
TML Vince  only got what?  a listing?
Doctor Why yes, printing out the sample programs.
TML Vince  I didnt know it even asked you how many pages to print...
TML Vince  am I misunderstanding the problem?
Doctor Why No, I only got one page number, many pages.
Doctor Why and no page breaks.
TML Vince  Oh, ok, set if for cut sheets instead of continous forms..
TML Vince  if = it
TML Vince  there are two buttons there, you DONT want the default.. :)
TML Vince  GA
Doctor Why Oh , really? I thought that was asking if you were using
           continuous forms or
Doctor Why single sheets.
TML Vince  It is, but its confused.. :)
Doctor Why :)   So am I.   :)
Doctor Why I'll give it a try.
AFA Gary J :)
TML Vince  it'll work, I promise.. :)
Doctor Why If that's the case, is the number of lines per page
Doctor Why the number of lines you WANT printed per page?
TML Vince  you do what the default (60) on the lines per page..
TML Vince  a page has 66 lines, 60 lines of printing leaves 3 lines each at
           the top and bottom for a margin.
TML Vince  you should also position the form so that you already have a small
           margin at the top of the
TML Vince  page before you start to print.. it makes a nice listing if you
           do.
Doctor Why One other comment on printing.
TML Vince  GA
Doctor Why It would be nice for you to provide a left margin for those of us
           who would
AFL Dyfet  Okay, did we have any more questions for tonight? :)
Doctor Why like to put these in binders.
TML Vince  you can do that yourself by sending a printer command.  we do
           provide a box for you to do that. :)
TML Vince  I forget the command though, look in your imagewriter manual to
           find it.
Doctor Why Oh, that didn't occur to me. I'll give that a try also.
A2GS       Man, these guys think of everything  :)
Doctor Why hehe
TML Vince  Great!  well folks, its about time for me to cut out!  It's been a
           real pleasure to talk to you 
TML Vince  tonight!
Doctor Why Thanks for the help Vince.


<log file resumed after a brief laps>

Question on doing floating point arithmatic for 3-D animation routines, and
a discussion on doing decimal arithmatic in assembly language:

AFA Gary J There's the Perspective View 3-D program in the library that my
AFA Gary J friend wrote.  You could take a look at that and see if it would
AFA Gary J do what you want, or maybe take a look at some of the code.  I'm
AFA Gary J not sure exactly where in the program you would have to look for
           the calc routines..
A2GS       I've been working on some of my own routines, and have
           completed the
AFA Gary J ..It has been a while since I've used the program,
AFA Gary J and it is modulized.  I'm not sure which is which.
A2GS       Mult. routine...but it's buggy...still trying to work out all the
           kinks.
A2GS       Well I'll download it...can't really hurt...but I don't think
           it'll help too
AFL Dyfet  Again, most of that can be done much faster with table lookup
           routines...
A2GS       much.   If you could GARY, please ask your friend what he
           used....probably
A2GS       the same routines used by Applesoft.
AFA Gary J Ok.. I'll ask him.
AFL Dyfet  Especially since the resolution of the screen is typically much
           lower than the
AFL Dyfet  resolution of full FP math routines...
A2GS       Yes Dyfet, you have to use a lookup table for the cos/sin values
           but you still
A2GS       need FP routines when dealing with the cos/sin values.
A2GS       in calculating the x,y,z results.
AFL Dyfet  You can treat them as fractional integers, and then do simple
           integer multiply
AFL Dyfet  and devides to apply them :)
A2GS       Have to keep track of where decimal point is located....can't do
           that in hex
A2GS       form.
AFA Gary J Pixel locations are integer values.
AFL Dyfet  You don't need to...You multiply values by cos/sin values in the
           range 0-ffff
AFL Dyfet  and throw away the low product, giving you the actual rounded
           displacement.
A2GS       multiply them by what?
AFL Dyfet  Say you have $80 (128) as your value, and the cos is .45 (or
           approximately
AFL Dyfet  $6800), just multiply the $6800 fraction of $10000 by the $80, and
           the high
AFL Dyfet  part of your result will be about $35xxxx, or the scaled value.
AFL Dyfet  Just drip the xxxx and you are done :)
AFA Gary J you can drop the xxxx too :)
AFL Dyfet  (drop=drip :)
A2GS       how do you get cos .45=$6800?
AFL Dyfet  I guestimated...but take $10000 (655536) * .45 and you will find
           the value to
AFL Dyfet  actually use :)
A2GS       65536
AFL Dyfet  I added an extra 5 :)
AFL Dyfet  Oops :)
AFA Gary J Yes, you can drip the 5. :)
AFA Gary J :)
A2GS       yes, but I need the COS of .45   not just .45! 
AFL Dyfet  Thanks a lot, Gary :)
AFA Gary J <sorry>  :)
A2GS       :)
A2GS       which BTW is .9999
AFL Dyfet  What you want, really, is the scaled 1 to -1 value of the cos/sin
           of any angle,
AFL Dyfet  and then to form that as a table :)
A2GS       right
A2GS       no problem doing that
A2GS       But...
AFL Dyfet  The .45 might be cos of 70 deg. for example :), and then you
           multiply the
A2GS       Once you've created the table of .xxxx decimal cos/sin
           results....
AFL Dyfet  appropriate axes by the scaled value :)
A2GS       how do you multiply that by an integer value and then get rid of
           the 
A2GS       insignificant value to the right of the decimal point which would
           normally
A2GS       be produced in base 10 math....you don't get simple # like that in
           hex.
AFL Dyfet  Don't think in terms of base 10 decimal arithmatic...think in
           terms of base 2,
AFL Dyfet  scale your table as base 2 fractions of $10000, and when you
           multiply by the
A2GS       Easier said then done  :)
AFL Dyfet  fraction, your high word (yyyyxxxxx) product (the yyyy part) would
           be the
AFL Dyfet  integer result of zzzz * cos[n]
AFL Dyfet  If you have a line of 10 pixels long rotated by 30 degrees, the x
           and y axes
A2GS       But no matter how you look at it, you will come out with some
           insignificant
AFL Dyfet  for one of the end points simply becomes len * cos[10] for x and
           len * sin[10]
AFL Dyfet  for y.
A2GS       hex # and the object is to try and figure the significant value
           (integer) from
A2GS       the insignificant (fraction leftover).
AFL Dyfet  The significent portion is always the leftmost word if your table
           is scaled in
A2GS       while it's in it's hex form.
AFL Dyfet  $1000 as 1 and $0000 as 0.
Guide NR   is this still open questions?
A2GS       so what does decimal 215 become
AFA Gary J We're talking about decimal arithmatic in hex, Neil.
A2GS       Dyfet?
AFL Dyfet  215 is still $d3.  That is then multiplied by the fraction, say
           .50, which woul
A2GS       $D3 what....$D300 or $00D3.
AFL Dyfet  d be $8000 ($10000 * .50 is $8000), yielding an integer product of
           $670000, and
Guide NR   bye all
AFL Dyfet  the $67 would be the part you want, dropping the lower 16 bits.
AFL Dyfet  I need a hex calculator for this, to make sure my numbers are
           right :), but
AFL Dyfet  the principle is correct.
A2GS       let's take a real example to test your theory.  :)
A2GS       me too.
A2GS       hold on.
A2GS       o.k.
A2GS       say you have...
A2GS       sin 5.683 * 42
A2GS       put it in an easier form....btw sin 5.683=.0990
AFL Dyfet  Okay, first you need a look up table element equal to $10000 *
           .0990 :)
AFL Dyfet  Let's call it .1 for simplicity, or 6553, rounding down.
AFL Dyfet  Anyone know what 6553 in hex is???
A2GS       in dec.  =  6488.064, for practical reasons let's say 6488
AFA Gary J $1999
A2GS       thanx
AFA Gary J 6553 = $1999
AFL Dyfet  Okay, but Gary, was that $1999 for 6553 or 6488? :)
A2GS       is that 6553 or 6488
A2GS       :)
A2GS       o.k.
A2GS       we'll use 6553
A2GS       6553 * 42
AFL Dyfet  Ah, okay...42 in hex is $2A...
AFA Gary J 6553 = $1999, 6488 = $1930
AFA Gary J (There's not enough light in here to power my solar calculator...
           I have to 
AFL Dyfet  Theory: $2A * 6553 = 42 *.0990 * 65536 :)
AFA Gary J keep walking away from the computer to get the answers  :)
A2GS       right...go on
A2GS       :)
AFL Dyfet  Drop the 65536 by shifting left (as it's $1000), and the results
           should be
AFL Dyfet  the same (minus rounding error :)
AFL Dyfet  What is 42 * 6553?  Anyone with a calc.?
A2GS       275226
AFL Dyfet  (or 42 * 6488, since we're now in decimal land)
A2GS       dec.
AFL Dyfet  Okay, and what is 275226 in hex?
A2GS       272496
A2GS       in dec.
AFL Dyfet  Or 272496 in hex :)
A2GS       for 42 * 6488
A2GS       lol
AFA Gary J $42870
A2GS       Gary?
A2GS       thanx
AFA Gary J 272496 = $42870
AFL Dyfet  Okay, result $4, or 4!
AFA Gary J (getting out flashlight to power calculator  :)
AFL Dyfet  (dropping the $2870)
AFL Dyfet  42 *.0990 certainly is near 4 :)
A2GS       what?????
A2GS       oh.
AFL Dyfet  The $2870 becomes the fractional part below $10000 :)
A2GS       right!!!!
AFL Dyfet  You could keep it around for further calculations and future
           accuracy, and you
AFL Dyfet  would then have fixed point fractional numbers, which are faster,
           by the way,
A2GS       Now things are clearing up.....I see the Light.....(if only Gary's
           calculator
AFL Dyfet  than using full floating point math :)
A2GS       did  :)
AFL Dyfet  So the full result is $4 and $2870/$10000's :)
AFA Gary J This calculator is a real power hog. :)
A2GS       Yeah...but how do you know how much of the result to drop off (in
           our case the
AFL Dyfet  If all your fractions are expressed as parts of $10000 then you
           always drop off
A2GS       $2780)  from the way it seems to me you always drop off the lower
           word....
A2GS       right?
AFL Dyfet  the last two bytes for the integer :)
AFL Dyfet  And, for plotting, it's the integer xy position your interested in
           :)
A2GS       right
A2GS       so briefly let's go through the steps...
A2GS       Put sin # into .dec form and multiply by $10000
A2GS       or cos #
A2GS       drop the point BTW
AFL Dyfet  Yes, or round it :)
A2GS       Then multiply the integer which you already have (the x, y, or z,
           value)
A2GS       which should be in word form (easier for word * word = 32 bit
           result routine)
AFL Dyfet  Good so far! :)
A2GS       then drop the relutant xxxx word in the result (result =
           yyyyxxxx)
A2GS       relutent=resultant
AFL Dyfet  Or keep the xxxx as your fractional portion, since you could
           always add it to
A2GS       and you've got you integer (x,y, or z  point)
AFL Dyfet  another fractional number in the form yyyyxxxxx if you need to
           :)
A2GS       (probably won't)
AFL Dyfet  But the yyyy part is the integer you are looking for :)
A2GS       and that's it!
A2GS       Thanx....
AFL Dyfet  Yes, that is it...and it can be table driven, and use a simple
           word * word
AFA Gary J easy as pi
AFL Dyfet  multiply :)
A2GS       makes life a lot easier!!!
A2GS       Didn't think of this way...thoought about a million other ways of
           converting
A2GS       and reconverting from and too integer and hex form but always came
           up with 
A2GS       something interfering in the simplicity of it.
AFL Dyfet  Well, the rest should be easy :)
A2GS       You make a great teacher!!!! Dyfet....BTW  Thanx for the Hex help
           GARY!
A2GS       Dyfet have you considered working at NYU they could use a couple
           of decent
A2GS       professors!
A2GS       :)
AFL Dyfet  *blush*...Actually, I have never considered teaching before :)
AFA Gary J (Now the batteries are running down on my flashlight!  What are
           solar
AFA Gary J calculators good for, anyway!  :)
A2GS       Well you just ended my Month long search...kept getting wierd
           results when
AFA Gary J I agree.  I found your explanation to be very clear and
           understandable, Dave :)
A2GS       converting to hex...should have thought of multiplying by
           65536!!!!!
A2GS       Now things are clear as a bell....what I was doing wrong all this
           time!
AFL Dyfet  Once you understand how to look at numbers, the rest is easy :)
A2GS       Yeah.....you better believe it
AFL Dyfet  It's just that you have to stop thinking of base 10 and start
           thinking about
AFL Dyfet  what fractions are really about :)
A2GS       somebody showed me a FAST way to always calculate an address on
           the screen
A2GS       if given the x,y coordinates.
AFA Gary J On the screen?  A graphics screen memory address?
A2GS       Have to admit....Never would have thought of it!
A2GS       Yup!!!
AFL Dyfet  There are a number of cute ways to do that trick (finding a line
           address on the
AFA Gary J You can use lookup tables for that, too, which are the fastest
           way.
AFL Dyfet  hires screen :)
A2GS       On the Super-Hires acreen.
Pamme M    Rehi!
AFL Dyfet  You only need a lookup for the 24 base screen lines, as it's a mod
           24, with the
AFA Gary J Rehi, Pamme!
A2GS       Too difficult........the table would have to be pretty big.
AFL Dyfet  remainder an offset :)
A2GS       I see....But I was shown a simpler/ still very fast way. 
A2GS       thought about lookup tables....like to avoid them if not
           needed....prefer
A2GS       general algorithms  :)
AFA Gary J Depends if you want a faster program, or more memory  :)
AFL Dyfet  Okay...that would just be my way of doing it :)...everyone has
           their own
AFL Dyfet  preferences :)
A2GS       True
A2GS       The way I was shown....
AFL Dyfet  I do think the best way is the LARGE table (all 192 base line
           addresses), for
AFL Dyfet  the fastest speed possible :)
AFA Gary J Yup.  I've seen it used, too.
A2GS       WhoW!!! I'm talking about the Super Hires screen!!!
AFL Dyfet  Ohhh...the Super Res screen could also benifit from a 200 line
           address table
AFA Gary J Super hi-res is linear, so it's not quite so much of a problem as
           the other
AFA Gary J screens.
AFL Dyfet  map, as the code is simpler and faster to use :)
A2GS       true...but there's a more GRACEFUL way (trickier :)
AFA Gary J which is.... ?
A2GS       Take the Y-value (line #) Do 5 ASL' to it...then add the X coord
           and do 2 more
A2GS       ASL' and you have the exact byte/pixels address.
AFL Dyfet  Hmm...that sounds kinda neat :)...I will have to think about that
           :)
A2GS       Simple/Obvious/Tricky and still does the job quick!
A2GS       Figures out the Y value and multiplies it by 160 (bytes per scan
           line)
A2GS       with all the ASL's....believe me it works....I wrote a line
           drawing
AFL Dyfet  Yes, that is cute and clever :)
AFA Gary J Yes.
A2GS       algorithm using it and it beat's the pants off of any other line
           drawing
A2GS       routine I've seen to date on the GS!!
A2GS       Got to go soon....listen in on the SF quake....work on 3-d
           routines  :)