HP48 Machine Langage Programming - Page 266 -HP48 Machine Language - A Journey to the Center of the HP48 s/sx - Read the book online - Paul Courbis
Accueil du site > 02. Réalisations > 01. Publications > 01. Ouvrages > 02. Ouvrages sur la HP48 s/sx > HP48 Machine Language - A Journey to the Center of the HP48 s/sx - Read the (...)

HP48 Machine Language - A Journey to the Center of the HP48 s/sx - Read the book online

mardi 12 juin 2007, par Paul Courbis

If you don’t want to download the book, you can read it online here...

hp48ml - page 266 - Courbis, acteur de l'Internet depuis 1988
Section précédente : Programs dealing with Machine Language Page précédente Sommaire Page suivante Section suivante : Games

Mathematical Programs

(c) Courbis www.courbis.fr   266 PARTTHREE:LIBRARYOFPROGRAMSh  ttp:  //ww  w.c  our  bis.  com  PD Ff iles  av aila  ble on htt p:// ww  w.c our bis .co m-  Re dis trib  utio  no rm irro rin gs tric  tly pro hib ited  .  CALC CALCisacollectionofprogramsthatwillperformarithmeticcalculations withlargeintegers.TheHP48canalreadydoarithmeticwithintegers,but onlythoseintherangefrom0to18446744073709551615.Thesepro- gramscanuseintegersthatareaslargeasyourmemorywillpermit.As examples,theywereusedtocalculatethefactorialof2000(morethan 5000digits!),andthesquarerootof2,accurateto500decimalplaces.  Thesefunctionsworkwithpositiveintegersrepresentedinstringform. (Forexample,'1234567890'istheinteger1234567890).Thefunc- tions:  ' ADDtoaddtwointegers; ' SUBStosubtracttwointegersandreturntheabsolutevalue; ' MULTtomultiplytwointegers; ' BFACTtocalculatethefactorialoftheintegergivenasanargument.Itdoes  thisbymakingsuccessivemultiplications,anddisplaysonthescreenthe currentresultaswellasthenumberofmultiplicationsleft,sothattheuser cangetanideaastowhenitwillbefinished.  ' POWwillraisetheintegerinlevel2tothepowerinlevel1(justlike  the^function).Aswith BFACT,stepnumbersaredisplayedto showwhatworkislefttodo(0willbedisplayedwhenitS^sdone).  ' Emultipliestheintegerinlevel2by10raisedtothepowerinlevel1. ' DIVdividestheintegerinlevel2bytheintegerinlevel1,and  returnstheintegerpart.  ' MODUisthemodulofunction.Itreturnstheremainderoftheinteger  inlevel2dividedbytheintegerinlevel1.  ' SQRcalculatestheintegerpartofthesquarerootoftheargument  given.  Theseprogramsallusesubroutines,mostofwhicharewritteninassem-bly.The commentedsourcelistingsarefirst,thenthehexadecimalcodes.  PM65-005.p65 11/07/2001,08:55266
Section précédente : Programs dealing with Machine Language Page précédente Sommaire Page suivante Section suivante : Games
© Courbis 1988-2010
Tous droits réservés
Permalien
Faire un don avec Paypal Le livre est entièrement gratuit mais vous pouvez
avec Paypal pour participer aux frais d'hébergement de ce site... Merci !

Répondre à cet article