From: Baltissen, GJPAA (Ruud) (ruud.baltissen_at_abp.nl)
Date: 2004-12-10 13:55:01
Hallo allemaal, I need some advice. At this moment I'm writing the ML for the macros for programs meant to be run on the C64. If possible I'll try to use the code already available on the C64. For example: ... var by : byte; ... writeln(by); ... The contents of by is converted to a floating point using onboard routines and this FP is displayed on the screen, again using onboard routines. But should I use these Kernal routines all the time? Take the addition of two longints (= signed double word): - there is a routine to convert a longint to FP - there is a routine to transfer FAC to ARG - there is a routine to add ARG to FAC - there is a routine to convert a FP into a longint But this last rountine delivers the result into the wrong order so I need my own routine to correct this !!! (Anyone has an idea why? Routine can be found at $BC9B.) So I decided to make my own adder. The resulting routine needs only a few bytes extra then when using the Kernal routines. But I'm quite sure that it is much much faster. At this moment I'm facing more of these dilemmas: what about AND/OR/XOR-ing two bytes, should I use the original routines or make my own? But making my own routines raises again some more questions: I have bytes, integers, words and longints, do I have to create routines for every type? The idea to solve this problem is to convert every type to longint, perform the needed aritmetic and to convert back again. But this comes close to converting them to FP. You see: dilemmas enough :( Another subject: what is the best Basic compiler you know? I want to write and compile some basic and equivalent pascal programs to compare the resulting sizes. (And to see how they did it of course :) Thanks for any input! -- ___ / __|__ / / |_/ Groetjes, Ruud \ \__|_\ \___| URL: Ruud.C64.org =====DISCLAIMER================================================================= De informatie in dit e-mailbericht is vertrouwelijk en uitsluitend bestemd voor de geadresseerde. Wanneer u dit bericht per abuis ontvangt, verzoeken wij u contact op te nemen met de afzender per kerende e-mail. Verder verzoeken wij u in dat geval dit e-mailbericht te vernietigen en de inhoud ervan aan niemand openbaar te maken. Wij aanvaarden geen aansprakelijkheid voor onjuiste, onvolledige dan wel ontijdige overbrenging van de inhoud van een verzonden e-mailbericht, noch voor daarbij overgebrachte virussen. The information contained in this e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail; please delete in this case the e-mail and do not disclose its contents to any person. We don't accept liability for any errors, omissions, delays of receipt or viruses in the contents of this message which arise as a result of e-mail transmission. Message was sent through the cbm-hackers mailing list
Archive generated by hypermail pre-2.1.8.