Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
sprites like MJ's Trabajo Basura (not unregr. Fourspriter)
#6
na_th_an Wrote:splib2 is not so integrated into z88dk when compared to SP1, so porting it to a ZX Basic library would be posible, albeit painstakingly laborious, as the assembly syntaxes are not compatible and lots of things should be made by hand.
I would like to have a look at these asm code. Where can I get the src code of sp1?
na_th_an Wrote:Besides, ZX Basic binaries aren't as fast as z88dk binaries (for obvious reasons: C is much lower level than BASIC).
A note on this claim: it's is only *partially true*. It's true that higher level languages add more overhead to programs (that's the trade-off). But keep in mind the idea behind ZX BASIC is that it performs heavy optimizations so it tries to be as fast as C while maintaining high level syntax (that's why I don't add many features people are asking for, like a true VAL routine, a richer PRINT one, or a GOTO 3 * n, DATA or whatever). Of course, benchmarking (thanks to Britlion) is necessary (e.g. compare ZX BASIC vs C vs ASM) to study possible optimizations by the compiler.

If you want you can push it further and use FastCALL routines (which are faster than __STDCALL__ ones), and even inline asm. A FASTCALLed + inline ASM routine is exactly the same as a normal ASM one (no overhead added).

I'm writting an extensive documentation (I think I've already mentioned before), that might even become a little manual. This manual is *really* advanced, and document things like: ASM Inlining, calling conventions and parameter passing, graph tables for the speccy, optimizations the compiler does (according to its optimization level), and much much more.

Regarding people asking more and more features: some (wanted!) features are slowly being added (one by one), but preserving the current performance or adding overhead *only* when such feature is used by the programmer, because I think if people want a slow fully-compatible Sinclair BASIC they better stick to the BASIC already included in the Speccy's ROM. :roll:

The most important feature missing at the moment (IMHO) is passing arrays as parameters to functions and subs.

Update: I've already had a look to the sp1 src above (about a year ago). The main problem there is I don't know how to use that library in C (to convert it to basic).
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)