@L}5 _$% l0$)$$Hȱ$ UhL" `e$$%`$%`  R@W!( L(1   Y I`  d  Ld M * @  $ % CC$$)%1 Udߥ$9%: !0 S$% DD˙`  }J)Lr d M * @  $ % CC$$)%1 Udߥ$9%: !0 S$%} DD˙`  }J)Lr J  ((  p L ()   J}L= ( L 0q A    IB JC;? D W } LL  ` W )LA!  ߰")-݆ p" } $G@LL 08`Q")<2Q0 -G$Ș݆ UL# ; p8(()(0ʥ)NQ` }$GȘ݆LU )L ݆ L GȘ ݆LL )W>Z   HH)H }p h  hyhy D L> L JJ    ! LA*` BF }7'8  M HN H` 8 Z  \LdJJ!"! GFE@F (!L }EE !E^ ^ E E7EȩEdE/EȩE  D } .L }  ;F d  ;?F7F? ( .   Z D LL d } . D  L    p  E` , d)  D L) 0BM݊L݉} ML  N݆ L NLML [ TEqEHȱEqEh 0Gȹ G} HLL GɛL  LFREE SECTORS G) *Gȩ GȽG GȌ*jj >G} C8jJ3j2CD( C202C ԠBX` N 1? l LlD:RAMDISK}.COMLu L1 L ;LHL  T`  `8  ɐ     `TU  } L ? .  t`GBJ ~DEHI B V0dV!}QDEHI VF9 ,0 ,0 s0hhL  L` H hDHEh"}DEL8HI4 0 HI,0 0  9 .G VLO#},0 L4*IJ`llD1:AUTORUN.SYSNEED MEM.SAV TO LOAD THIS FILE.D8:MEM.SAV J y08 B|DEHI$} V0 0`B;DEL`?<0LV`@ʆ v s? F0Ξ05: [ BDEHI%} VY8 B V  @  /DE `E:D8:DUP.SYSERROR-SAVING USER MEMORY ON DISKTYPE Y TO &}STILL RUN DOS B;DE J  (` 9 V⪍ ઍ  -'}LLu ÝDEHILV 9 .l 9 .l  `` s$B BH(}I|DE V BLV nB,DE JLV B V BLVDEIʩ BꭝLu }NA5W (c)1983 Action Computer Services  B JKIHiDiELV`LA*} A BLV`LAAl LA &` Fj`8冨凪` BEӅӥ+} B`ʆǪƩ Ɛee` *BƦʆǢ &Ɛeǐ NB NBLB *B'&&&8儨児,}祂*LB&&*ń8&&LB B`hihiHHȱȱLAc !#3`-}LAJJJJ`H Ah`Hȩh AL;C AL;C oAL;C wAL;C }AH8.}`HhHh CL;C BHI V䅠L;C LC AL;CԆ ؠPIPP`/} DP wAL;C 7DLC DL}ȌzK0zKu{KLK}KȌ|KyKKK|K}KLK|K}KLKzK{KLK`LK FLK ˠҢK C ~K`6WLL?}KKKLLD:*.000L mK*(mKLELD:*.001Lȑ= mK*(mKLmLD:*.002Lȑe mK@}*(mKLLD:*.003Lȑ mK*(mKLLD:*.004Lȑ mK*(mKLLD:*.005Lȑ݈ mK*(mKA}L MD:*.006Mȑ mK*(mKL5MD:*.007Mȑ- mK*(mKL]MD:*.008MȑU mK*(mKLMB}D:*.009Mȑ} mK*(mKLMD:*.010MȑK mK*(mKȱJ- H`LMM MLM`HC}M L CJ- _CH`L NJA CJi CNAJHNHNNLNNAJI L}NJNAJAJ -HJJAD} HLNNL=NNiJNNNLNNiJI LNJNiJiJ -HJJi HLNNLN`LN VF1,J0+J+Ji,E}JiG+Ji,Ji+Ji ,Ji+Ji ,JiNNLcO+JmN,JiNL=O`LiO NF}HH B GLOO C FLOANTICO C FLOSOFTWAREO C G}FLP O C FL5P P' C  FJA C  FJi C FLP H}Ph C FLP"Press for Screen, for PrinterP C CLPK:PΩ _CI}@ CeOeOIP eOISLP FL8Q$ Q C CeO`LOQJQJQISLaQ`J} FLQPRESS FOR CONTINOUS FEEDQm C FLQPRESS FOR SINGLE SHEETQ C CLQK:Qé _C@K} CKQKQIS KQICLQ FL&R R C FLWR R9 CL} CKQ`LoRjRiRkRHICL.SjRiR FLRàR C CLRK:Ré _C CM}kRkRILR CkR`jRiR FL"S S C C`L:S ȢIc GHcIH͖HN}LjSH C`3S8HSS3SLT8H3S5S5SH4S4SI L T6SHSS6SLS5Sm6SH6ScI6SLS85SO}H8H5ScIH CIcH HHi5S5S`3SLxSH C`L$TTTTTTHDTDTTLT C T TIP}L_TLTLsT TI TILsTLT TTHTL9T8TH T`LTTTTT MTTILTT`TLUTQ} !TT 7STHTILTHITIL7UHI8L7UHT8H"U"U͓TL.U DTLUTiH7͙HLUT ͓TR}L[U DTLFUH  lRTTILU CT`LU͙HLUHILUH lRT} CTILU CT`LT S}CT`LU FLUҠӠԠ΢U C ~K`L VAVAVJAJA J MV NVH fOVV LT}QVVH CVIPLV8HPHH CLVP:V~ _Cd͗HLV C UL%WLVH$H CLVE:U}V _C CVV TVVIL W lRVLWLWVILWLWLWVLVL%WLSVL2VVAVA``VVE:x888888ffffff~~`~~fl0fF>6xo~{>>888>|||f<Z}c6>8pp8?[}w><~~~<||`x`~<~~<\}0~0 ~ <~~<~~f~``~~f~~~``~~~f~~f~`~~~~f~~``~~ff8888<>>``f||f88<<w]}wk~~fff~~ff~~~f~``~~f~~~```~`~~~~fff~~ff~<ckwf~<~fff~~~~~0~<~~<^}~x|ngTTTTTT~f~``~~f~~~```~`~~~~fff~~ff~<ckwf~<~fff~~~~~0~<~~<The Floating Point Packageby Louis J. Chorich IIIThis documentation may not be copied, photocopied, reproduced, translated `}, or telecommunicated in any form, in whole or in part, without the prior written consent of Antic Publishing, Inc.The acco a}mpanying program material may not be duplicated, in whole or in part, for any purpose. No copies of the floppy disk(s) may b b}e sold or given to any person or other entity.Notwithstanding the above, the documentation and accompanying disk(s) may be c}duplicated for the sole use of the original purchaser.Antic is a trademark of Antic Publishing, Inc.MAC/65 and DOS-XL are '}OVERVIEWThe Floating Point Macro Library is designed to take advantage of the tremendous macro capabilities of the MAC/65 e}Macro Assembler produced by Optimized Systems Software. The Library is a programming tool intended to provide an interface bf}etween the programmer and the floating point routines built into the Atari ROM. Though assembly language provides only the cg}apability to operate on integers, the use of the FP library allows a programmer to perform computations on numbers in the ranh}ge of 10^-98 to 10^98. All computations are accurate to nine or ten digits depending upon the operation performed.Includedi} in the FP Library are the following capablities: Addition 2 Byte Integer to FP Conversion Subtractij}on FP to 2 Byte Integer Conversion Multiplication ASCII String to FP Conversion Division k} FP to ASCII String Conversion Natural Logarithm Input FP number from keyboard Base 10 Logarithm Prl}int FP Number to Screen Exponentiation Comparison of Two FP Numbers Inverse Logarithms FP Array Managemm}ent Square Root Move FP Numbers Branching upon Comparison of two FP NumbersThe capabilities of the Trin}g library are contained in a separate section at the end of this documentation.Included on the Library disk are eight fileso}, FP.LIB, FPANNOT.LIB, FPDEMO.M65, MSG.M65, FPDEMO.COM, TRIG.LIB, TRIGDEMO.M65, and TRIGDEMO.COM. The FPANNOT.LIB file contap}ins the fully commented source code while the FP.LIB file has the comments removed. FP.LIB functions identically to FPANNOT.q}LIB but occupies less disk space. FPDEMO.COM is the binary file produced by FPDEMO.M65 and MSG.M65. MSG.M65 is a part of thr}e demo program. TRIG.LIB is the Trigonometric macros. TRIGDEMO.M65 and TRIGDEMO.COM are the source and object code of the ps}rogram which demonstrates the use of the Trig macros. The Library disk is unprotected. You may make copies for your own uset} only.This manual assumes that you are somewhat familiar with 6502 assembly language programming as well as the use of the u}MAC/65 Macro Assembler.SYSTEM REQUIREMENTS 48K Atari Computer Disk Drive MAC/65 Macro AssemblerGETTING v}STARTEDIn order to use the FP Library in your own programs, you first must .INCLUDE the FP.LIB or FPANNOT.LIB file in yourw} source code. The best way to accomplish this is illustrated in the following example: 100 *=$4000 ;START Ox}F CODE 110 JMP MYCODE 120 .INCLUDE #D:FP.LIB 130 ;YOU CAN INCLUDE ANY OTHER MACRO FILES YOU HAVE RIGHT HEREy} 140 MYCODE 150 ;YOUR PROGRAM STARTS HERENote the JMP MYCODE instruction in line 110. It is necessary that this z}is the first line after you indicate the address where assembly begins. If line 110 were not present, the first thing the pr{}ogram would do when run is execute code inside the FP library and certainly crash.It might be mentioned that floating point|} numbers are stored in memory as six byte quantities. Every floating number requires six bytes of memory, no matter how smal}}l or large the value of the number.THE FLOATING POINT MACRO LIBRARYThere are 25 macros in the FP library. They provid~}e a complete interface to the Atari FP routines in ROM. FPADD LN FPI INPUTFP FPCOMP FPSUB } LOG IFP PRINTFP BIGT FPMUL EXP AFP GETEL BILT FPDIV EXP10 FA}SC PUTEL BIEQ FPMOVE EXPON SQR XXPUSH XXPULLFPADD Syntax: FPADD adr1, adr2, adr}3 Purpose: To add two FP numbers.Parameters: adr1 - address of an FP number adr2 - another FP number } adr3 - the FP result of the sum of the two numbers Example: FPADD REAL1,REAL2,RESULTThe FP number at REAL1 is added }to the FP number at REAL2, and the result is stored at RESULT. REAL1 and REAL2 remain intact.FPSUB Syntax: FPSUB adr}1,adr2,adr3 Purpose: To subtract two FP numbers.Parameters: adr1 - address of an FP number adr2 - address of }another FP number adr3 - the FP sum of the two numbers Example: FPSUB REAL1,REAL2,RESULTThe FP number at REA}L2 is subtracted from the FP number at REAL1 and the result is stored at RESULT. REAL1 and REAL2 remain intact.FPMUL } Syntax: FPMUL adr1,adr2,adr3 Purpose: To multiply two FP numbers.Parameters: adr1 - address of a FP number a}dr2 - address of another FP number adr3 - address of the FP product Example: FPMUL AA,BB,XXThe FP number at }AA will be multiplied by the FP number at BB and the FP product will be stored at XX. AA and BB remain intact.FPDIV }Syntax: FPDIV adr1,adr2,adr3 Purpose: To divide one FP number by another.Parameters: adr1 - address of the FP dividend } adr2 - address of the FP divisor adr3 - address at which to store the FP result Example: FPDIV MILES},GALLONS,MILAGEThe FP number at MILES will be divided by the FP number at GALLONS and the result will be stored at MILAGE. } MILES and GALLONS remain intact.INPUTFP Syntax: INPUTFP adr Purpose: To get a FP number as input from the keyboa}rd.Parameters: adr - address at which to store the six byte number entered at the keyboard Example: INP}UTFP REALThis macro waits for input from the keyboard, converts it to floating point notation, and stores it at address REA}L. Memory starting at LBUFF ($580) is used as a buffer for keyboard input. Be careful! Any data in LBUFF may be overwritte}n!PRINTFP Syntax: PRINTFP adr Purpose: To print a floating point number on the screen.Parameters: adr - address }of the FP number to print Example: PRINTFP REALPRINTFP is the complement of INPUTFP. PRINTFP takes the FP number at REA}L, converts it to an ASCII string starting at LBUFF, and prints it to the screen. Like INPUTFP, PRINTFP uses LBUFF for works}pace. Make sure that area of memory is free.LN Syntax: LN adr1,adr2 Purpose: To take the natural logarithm of a }FP number.Parameters: adr1 - address of the FP number whose natural logarithm will be computed } adr2 - address where the result will be stored Example: LN REAL1,REAL2The natural log of the FP number at REAL1 will b}e computed and stored as a FP number at REAL2.LOG Syntax: LOG adr1,adr2 Purpose: To take the base 10 logarithm of} an FP number.Parameters: adr1 - address of the FP number whose base 10 logarithm will be computed } adr2 - address where the result will be stored Example: LOG REAL1,REAL2The base 10 log of the FP number at REAL1 w}ill be computed and stored as a FP number at REAL2.EXP Syntax: EXP adr1,adr2 Purpose: To compute the inverse natur}al logarithm of a floating point number.Parameters: adr1 - address of the FP number whose natural } log will be computed adr2 - address at which the result will be stored Example: EXP NUMBER,INVLOGThe in}verse natural log of the FP number at address NUMBER is calculated and the result is stored starting at address INVLOG.EXP}10 Syntax: EXP10 adr1,adr2 Purpose: To calculate the inverse base 10 log of a floating point number.Para}meters: adr1 - address of the FP number whose inverse base 10 log will be computed. adr2 - add}ress at which to store the result Example: EXP10 TIME,VELOCITYThis macro calculates the inverse base 10 log of the FP nu}mber at TIME and stores the result at VELOCITY.EXPON Syntax: EXPON adr1,adr2,adr3 Purpose: To raise a FP number to} a power.Parameters: adr1 - address of the FP base adr2 - address of the FP exponent adr3 - address }at which the FP result is stored. Example: EXPON BASE,EXPONENT,RESULTThis example calculates the value of BASE raised to} the power EXPONENT and stores the floating point result in RESULT. This is the BASIC equivalent of RESULT = BASE^EXPONENT.}SQR Syntax: SQR adr1,adr2 Purpose: TO calculate the square root of a FP number.Parameters: adr1 - The address of a} FP number adr2 - The address at which to store the result of the square root calulation Ex}ample: SQR PRESSURE,ROOTThis macro determines the square root of the number at PRESSURE and stores the result at ROOT.I}FP Syntax: IFP int,adr Purpose: To convert a 2 byte integer to a 6 byte FP number.Parameters: int - the address of t}he 2 byte integer adr - the address of the 6 byte FP result Example: IFP COUNT,REALThe two byte integer at C}OUNT will be converted to a six byte FP number at REAL. The result can now be used in FP math calculations.FPI Synt}ax: FPI adr,int Purpose: To convert a 6 byte FP number to a 2 byte integer.Parameters: adr - address of the 6 byte FP num}ber int - address of the 2 byte integer result Example: FPI REAL,COUNTThis macro is the complement of IFP. }The FP number at REAL is converted into a two byte integer and stored at COUNT. The FP number is rounded up or down to the n}earest whole number.AFP Syntax: AFP string,adr Purpose: To convert an ASCII string of numeric characters. } to FP notation.Parameters: string - the address of the ASCII string adr - the address at which to store }the FP result Example: AFP BUFFER,SCOREHere, the ASCII string at BUFFER is converted to a FP number and stored at SCORE.} The only legal characters in the ASCII string are numeric digits (0-9), a decimal point (.), a plus or minus sign (+/-), an}d an "E" when using scientific notation.FASC Syntax: FASC adr1,adr2 Purpose: To convert a floating point number to} an ASCII string terminated by a carriage return.Parameters: adr1 - The address of the FP number adr}2 - The address at which to store the ASCII string. Example: FASC NUM,BUFFERThe macro converts the fl}oating point number stored at NUM to an ASCII string starting at adress BUFFER and terminating with a carriage return.FPM}OVE Syntax: FPMOVE adr1,adr2 Purpose: To move a six byte floating point number from one location to anoth}er.Parameters: adr1 - the source address adr2 - the destination address Example: FPMOVE SUBTOT,TOTALThis ma}cro call will move the six byte FP number at SUBTOT into the six bytes at TOTAL. This effectively replaces TOTAL with SUBTOT}. At the end of the macro call, the same FP number will be at SUBTOT and TOTAL.FPCOMP Syntax: FPCOMP adr1,adr2,adr}3 Purpose: To compare two floating point numbers and determine if they are equal or if the first is less tha}n the second or if the first is greater than the second.Parameters: adr1 - the address of the first FP number } adr2 - the address of the second FP number adr3 - the address of the byte at which to store } the result of the comparison Example: FPCOMP REAL1,REAL2,FLAGThe floating point number at REAL1 is compared to }the floating point number at REAL2 and the one byte result of the comparison is stored in FLAG as follows: 1 = REAL1 > }REAL2 0 = REAL1 = REAL2 255 = REAL1 < REAL2Notice that if REAL1 is greater than REAL2, the result stored in FLAG is} positive. If REAL1 is equal to REAL2, the result stored in FLAG is zero. If REAL1 is less than REAL2, the result stored in$}BIEQ Syntax: BIEQ adr1,adr2,adr Purpose: To test if two FP numbers are equal and branch to a given addres}s if the condition is true.Parameters: adr1 - The first FP number adr2 - The second FP number } adr3 - The address at which to branch if the two FP numbers are equal Example: BIEQ COUNT,MAX,EXIT}BIEQ stands for "Branch If Equal." In this case, if the FP number at COUNT is equal to the FP number at MAX, then the prog}ram will branch to EXIT. The assembly language equivalent of this is "JMP EXIT." Of course you do not have to use a label. } Specifying an absolute address such as $0600 in the macro call would be perfectly acceptable.BIGT Syntax: BIGT adr1},adr2,adr3 Purpose: To test if one FP number is greater than another and branch to a given address if the } condition is true.Parameters: adr1 - The first FP number adr2 - The second FP number adr3 - }The address at which to branch Example: BIGT REAL1,REAL2,GETNEXTBIGT stands for "Branch If Greater Than." In this case,} if the FP number at REAL1 is greater than the FP number at REAL2, the program will branch to the label GETNEXT (JMP GET}NEXT).BILT Syntax: adr1,adr2,adr3 Purpose: To test if one floating point number is less than another }and to branch to a given address if the condition is true.Parameters: adr1 - The address of the first FP number} adr2 - The address of the second FP number adr3 - The addres at which to branch Example: BILT SCOR}E,MIN,$0680If the FP number at SCORE is less than the FP number at MIN, the program will branch to address $0680 (JMP $0680}). Otherwise, the program will continue unaffected.PUTEL Syntax: PUTEL adr1,adr2,adr3 Purpose: To put a floating} point number into any element of an array of floating point numbers.Parameters: adr1 - Base address of the arra}y of FP numbers adr2 - This parameter is the memory address whose value holds the number (0-25}5) corresponding to the element in the FP array into which the FP number at adr3 } is to be placed adr3 - The address of the FP number which is to inserted into the} FP array Example: PUTEL ARRAY,ELEMENT,REALThis macro takes the FP number at REAL and inserts it into the ELEMENTth elem}ent of the FP array starting at address ARRAY. Note that the first ELEMENT is ELEMENT 0, the second is ELEMENT 1, etc. A fl}oating point array does not have to be specially declared or dimensioned. All you need to do is set aside enough room to hol}d your array. Each element of a floating point array consumes six bytes. If you only set aside sixty bytes for a floating p}oint array, you must be careful not to access any element outside the range of 0 through 9. The zeroth element of the array }is loacted at ARRAY. Element 1 is located at ARRAY+6, and element 2 is located at ARRAY+12, etc.Take note that this macro }reads the value in address ELEMENT to determine into which element of the FP array REAL will be placed. Suppose you wanted t}o put the FP number at REAL into the tenth element of the floating point array starting at ARRAY. First, you must set aside }66 bytes to hold the entire 11 element (0-10) array. This is accomplished in the following manner: ARRAY *=*+66This }line of assembly code defines the base address of the array as ARRAY and sets aside 66 bytes of memory to hold the array.To} put REAL in the tenth element of the array, there is a correct and incorrect method: Incorrect: PUTEL ARRAY,10,REAL } Correct: LDA #10 STA ELEMENT PUTEL ARRAY,ELEMENT,REALThe first macro call would yield} unpredicatable results, but the second will always place the FP number at REAL into the tenth element of the array. The BAS}IC equivalent of the above macro is: ARRAY(ELEMENT)=REALRefer to the demo programs for detailed examples of implement}ing floating point arrays.GETEL Syntax: GETEL adr1,adr2,adr3 Purpose: To retrieve any element from an array of fl}oating point numbers.Parameters: adr1 - The base address of the floating point array adr2 - The addr}ess of the memory location which holds the number (0-255) which corresponds to the numb}er of the element of the array which is to be extracted and placed in adr3 }adr3 - The address at which to place the FP number extracted from the array Example: GETEL ARRAY,ELEMEN}T,REALGETEL is the complement of PUTEL. This macro will take the ELEMENTth element of the FP array starting at address ARR}AY and place it at REAL. The same restictions that apply to PUTEL apply to GETEL. The BASIC equivalent of the above macro i}s: REAL=ARRAY(ELEMENT)You may notice the ease with which this macro can be placed in a loop. Each pass through the l}oop, the value in element may be incremented to, for example, print an entire array of floating point numbers.XXPUSH } Syntax: XXPUSH Purpose: To save the X, Y, and Accumulator registers on the stack before calling a macroParam}eters: None Example: XXPUSHThis macro is used internally by the Floating Point Library and need not be used by you when }implementing any floating point macros. XXPUSH and its complement, XXPULL, make sure that your X, Y, and Accumulator registe}rs are not altered by any the floating point macros. If you for any reason use this macro, make sure that you use XXPULL to }pull the X,Y, and A registers off the stack at the appropriate time, or else havoc will surely prevail. Use at your own risk}!!!XXPULL Syntax: XXPULL Purpose: To restore the previously saved X, Y, and Accumulator registers.Pa}rameters: None Example: XXPULLXXPULL is the complement of XXPUSH as explained above. You can see how XXPUSH and XXPULL} are used as the first and last lines of every macro definition in the Floating Point Macro Library.LIMITATIONS OF THE FP} LIBRARYRaising a negative number to a power by calling the EXPON macro is likely to yield unpredicatable results. This is} due to the fact that the calculation involves the use of logarithms, and negatives numbers do not have logarithms associated} with them. The Floating Point Library makes no attemp to catch such error. Your program will not crash if you try to do so}mething impossible, such as take the square root of a negative number, but the results will be unpredicatable.PROGRAMMING} TECHNIQUESA major criticism of the use of macros in assembly language is the fact that large macros tend to consume memory} ravenously if used heavily. The reason for this is that a macro is not like a subroutine or some type of function which pul}ls its parameters off a software stack. A macro is expanded, or reproduced, in its entirety each time it is called.A simpl}e solution to this problem is to implement heavily used macros as assembly language subroutines. The only disadvantage of th}is technique is that the parameters passed to the macro are fixed. For example, the following two lines of code are all that} is necessary to create a subroutine that prints a floating point number. PRINT PRINTFP REAL RTSThe routin}e can be called by the following instruction and consumes only three bytes each time it is called. JSR PRINTOf course}, you are limited in that the only floating point number this routine can print is the one at address REAL. But if you speci}fy real as target address at which to store the result of any FP calculation you intend to print, then everything is set up a}utomatically and a JSR to the PRINT subroutine is all that is necessary to print the result of your calculations. Although n}ot appropriate under all circumstances, this technique can save a considerable amount of memory when used efficiently.The }Demo ProgramIncluded on the diskette is a the source and object code for a demo of the Floating Point Library, FPDEMO.COM. } Tthe source code for the demo program is in two files, FPDEMO.M65 and MSG.M65. The RUN address for FPDEMO.COM is $5000 |The Trigonometric Libraryby Louis J. Chorich IIIOVERVIEWThe Trig Library accompanies the Floating Point Macro Library. } It contains an additional eight macros which implement the basic trigonometric functions sine, cosine, tangent, cotangent, s}ecant, and cosecant. Also included are macros for degree/radian conversions.The Trig Library is a stand alone library of m}acros and may be used independently of the Floating Point Library or in conjunction with it.All trig macros operate upon an}gles measured in radians. Specifying an angle in degrees will return incorrect results. All values must be in 6 byte Floati }ng Point format.The Trig Library is called TRIG.LIB and is included on the Library diskette. To access the trig macros, it } is necessary to INCLUDE the library file in your source code in the same way that FP.LIB is INCLUDEed. If both libraries ar }e needed, it is a good idea to INCLUDE them together at the begining of your assembly program. This is explained fully in th }e "Getting Started" section the Floting Point Package manual.Included on the diskette is a demo of the Trig Library, TRIGDE }MO.COM. The source code is TRIGDEMO.M65. The RUN address for TRIGDEMO.COM is $5000.THE TRIGOMOMETRIC MACROSSIN Syn}tax: SIN adr1,adr2 Purpose: To calculate the sine of an angle.Parameters: adr1 - address of a FP angle in radians } adr2 - address at which to store the FP result Example: SIN ANGLE,RESULTThis macro will calculate the sine of the a}ngle represented by the 6 byte floating point number at ANGLE and store the result of its calculation at RESULT.COS S}yntax: COS adr1,adr2 Purpose: To calculate the cosine of an angle.Parameters: adr1 - address of a FP angle in radians } adr2 - address at which to store the FP result Example: COS ANGLE,RESULTThe cosine of the floating point number} at ANGLE is evaluated and the reslt is stored at RESULT.TAN Syntax: TAN adr1,adr2 Purpose: To calculate the tang}ent of an angle.Parameters: adr1 - address of a FP angle in radians adr2 - address at which to store the FP resu}lt Example: TAN RADIANS,TANGENTThis macro will compute the tangent of the angle at RADIANS and store the floating point }result at TANGENT.COT Syntax: COT adr1,adr2 Purpose: To calculate the cotangent of an angle.Parameters: adr1 - ad}dress of a FP angle in radians adr2 - address at which to store the FP result Example: COT RADIANS,COTANThe} cotangent of the angle at RADIANS is evaluated and the floating point result is stored at COTAN.SCN Syntax: SCN adr1},adr2 Purpose: To calculate the secant of an angle.Parameters: adr1 - address of a FP angle in radians adr2 -} address at which to store the FP result Example: SCN THETA,SECANTThis macro call will calculate the secant of the radia}n angle at THETA and store the result at SECANT.CSC Syntax: CSC adr1,adr2 Purpose: To calculate the cosecant of an} angle.Parameters: adr1 - address of a FP angle in radians adr2 - address at which to store the result Exampl}e: CSC ALPHA,RESULTThis macro will calculate the cosecant of the radian angle at ALPHA and store te cosecant of ALPHA at RE}SULT.TORAD Syntax: TORAD adr1,adr2 Purpose: To convert a degree angle to radians.Parameters: adr1 - the address }of a FP angle in degrees adr2 - the address at which to store the FP angle in degrees Examp }le: TORAD DEGREES,RADIANSThis macro is used to convert the degree angle at DEGREES to a radian angle at RADIANS.TODEG !} Syntax: TODEG adr1,adr2 Purpose: To convert a radian angle to degrees.Parameters: adr1 - the address of a FP angle in "}radians adr2 - the address at which to store the FP angle in radians Example: TODEG RADIANS#},DEGREESThis macro is used to convert the radian angle at RADIANS to a degree angle at DEGREES.s Example: TODEG RADIANSb FLAG is negative (to the 6502, all numbers from 128 to 255 [$7F - $FF] are considered negative. This makes for easy testing%} of the result byte and branching accordingly.128 to 255 [$7F - $FF] are considered negative. This makes for easy testing1ng of the result byte and branching accordingly.128 to 255 [$7F - $FF] are considered negative. This makes for easy testi3trademarks of Optimized Systems Software, Inc.haser.Antic is a trademark of Antic Publishing, Inc.MAC/65 and DOS-XL are 0d in FLAG is negative (to the 6502, all numbers from 128 to 255 [$7F - $FF] are considered negative. This makes for easy tes)}ting of the result byte and branching accordingly.28 to 255 [$7F - $FF] are considered negative. This makes for easy tes6B%DOS SYSB-)AUTORUN SYSB VFONT SETB_DOC 000B_dDOC 001BCDOC 002B DOC 003