From: groepaz (groepaz_at_gmx.net)
Date: 2002-05-21 18:21:25
Hello Ullrich, UvB> Hooking asm handlers is rather easy, because not much has to be done. Hooking UvB> interrupt handlers in C need more work, because the zero page has to be saved UvB> and the stack has to be switched. The break handler used for the debugger UvB> interface does most of this, so it would be a good starting point. yeah ofcoz.... i found it nice to have a simple interface for hooking up different asm-routines though....my handler does all the work of decoding what the source of the interupt was that is,so you can hook irqs like irq_install(&vblank_handler,IRQ_RASTER,0xf8); or irq_install(&timer_routine,IRQ_TIMERA,0x2000); or whatever :O) >> btw whats the deal to get floats supported in cc65? UvB> The old parser is quite ugly, and adding floats would certainly not help with UvB> this:-) It is certainly doable, but will double the code for several of the UvB> operators and make the code generator larger. C defines quite some automatic UvB> conversions, so there has to be code for that also. Maybe you can send me the UvB> interface (not the actual code) for your floating point routines, so I can UvB> check if all required routines are there. There wouldn't be instant support UvB> for floats, but evaluating the library would be a first step. uhmz... dont have the actual file handy atm (not at home) but its got everything that is available in the kernal: convert floats from/to integers convert floats from/to strings basic math operations (+-*/ etc) trig.functions (sin,cos,tan etc) all routines are in the form _fmul(float *out,float *in1,float *in2); where "float" currently is a struct that keeps exponent/mantissa in the form the kernal expects. (different from the one used in basic...one byte more but faster). the only thing actually missing are the two polynom-routines since i didnt really bother figuring out their exact parameter-format (and didnt really have a use for them either ,=P)....apart from that, everything you can do with a float in basic should be doable with that code. (minus some routines i found rather useless, eg the "free()" command) -- Best regards, groepaz mailto:groepaz_at_gmx.net ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo_at_musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2002-05-21 18:20:13 CEST