I'm making some progress getting the vbcc compiler to generate code for the #vtech #vsmile. However, the CPU has only 4 general purpose registers (R1-R4) with the other ones (SP, PC, SR/flags and BP/framepointer) already in useby the cpu itself or the code generator.
The register allocation in vbcc endsup allocating all 4 registers at the start of a function and freeing them at the end, despite not actually using them that much. So all code that needs a temporary register has to push/pop one