Inline PASM
hippy
Posts: 1,981
How to run inline PASM ...
This uses a RAM-based Spin interpreter ( the ROM-based interpreter with a few hacks to it to allow some code to be moved out as LMM code - divide and sqaure root ). It also slows WaitCnt down by a quarter to prove it's the RAM Interpreter running including Cog 0.
To use inline PASM, as simple as ... CogNew( 0, @inlinePasmCode )
Mainly proof of concept code and I'm sure Cluso99 will add the same or similar to his own RAM Interpreter. When complete, all that will be needed is to include a "RamInterpreter" Object and call it to start, otherwise no change to the rest of the source code, just loads of extra goodness.
Post Edited (hippy) : 7/28/2008 6:15:17 PM GMT
This uses a RAM-based Spin interpreter ( the ROM-based interpreter with a few hacks to it to allow some code to be moved out as LMM code - divide and sqaure root ). It also slows WaitCnt down by a quarter to prove it's the RAM Interpreter running including Cog 0.
To use inline PASM, as simple as ... CogNew( 0, @inlinePasmCode )
Mainly proof of concept code and I'm sure Cluso99 will add the same or similar to his own RAM Interpreter. When complete, all that will be needed is to include a "RamInterpreter" Object and call it to start, otherwise no change to the rest of the source code, just loads of extra goodness.
Post Edited (hippy) : 7/28/2008 6:15:17 PM GMT
zip
13K
Comments
I have plenty of space available in the RamInterpreter. The bytecode $3C is actually unused although it just falls into $3D (I think from memory). The code will be much faster · so inline code could be a built-in feature (did you see my debugger - this implements this style LMM crudely)
Found my bug on why I couldn't run the comparison on the code section for mathops $E0-FF.
The lowloy old jmp loop - s/be jmp #loop
The amazing thing was that it ran for a few thousand loops before it failed ??? I didn't bother to check why.
Now, for the record, I expect it to take around 16 days to validate this section. So I am putting this on hold for a while