Hi all,
Not sure to post this in 8 or 32 bit, but as the latter had no posts yet I thought I'd go first.
As shown
here I'm porting a scheme interpreter to Sprow's ARM7 board using yagarto.
I'm in the process of adding the standard OSxxxx calls we all know and love as primitives to the language, but also pondering if I can't get even more "primitive" by exposing swi itself to the interpreter. I haven't thought of a nice API though.
Anyway, while implementing OSWORD I decided to create a dispatch because of the different control block sizes and meanings. It's becoming quite unruly though as I'm dynamically allocating control block space each time according to the specification of the osword call.
Can I presume an OSWORD control block is at most 256 bytes on a BBC? I.e. could I get away with allocating a static memory block of 256 bytes which I'd use as the standard osword control block space?
I think this would both simplify things and enhance performance because it eliminates heap allocation overhead. The translation of the control block can then be implemented as a cast of the control block to a particular C struct.
Slightly OT: Would anybody be interested in a source release of this interpreter? If so, would it be one for the retrosoftware repository?