P2 Spin + creating P1 standalone objects
![Cluso99](https://forums.parallax.com/uploads/userpics/035/nJPU0EF20AFBB.png)
I have my DE0nano working and my faster interpreter modified so that it compiles for p2 with pnut.exe.
Now i need to create some simple standalone spin objects because presently pnut cannot compile spin yet. So i need to just include the bytecodes into pnut with the interpreter (SP2).
I know a number of you have experimented with making spin standalone objects. What is the simplest/best way?
BTW I intend to just make p1 spin work without any new features. So for example coginit will just perform a setcog and then coginit in sp2.
Now i need to create some simple standalone spin objects because presently pnut cannot compile spin yet. So i need to just include the bytecodes into pnut with the interpreter (SP2).
I know a number of you have experimented with making spin standalone objects. What is the simplest/best way?
BTW I intend to just make p1 spin work without any new features. So for example coginit will just perform a setcog and then coginit in sp2.
Comments
Maybe you can modify the dynamic object loader?
ie relocate the spin file based on the first $20 bytes of the eeprom file; I recall a dynamic object loader. You will probably have to do the relocation in pasm...
Unfortunately my DE0 has been wrapped as my Xmas pressie - havent mentioned that I have unpacked it and run it already
I have been looking at my interpreter version and preping some easy test code to try out the basics of the interpreter. I just have a couple of long[hub]:=$xxxx statements and a coginit to restart the monitor rom. Once this works I think I will get the I/O working DIR/IN/OUT. I am only intending to use the PORTA pins.
I am not sure which program to use as the base for compiling the P1 spin object - PropTool, bst or homespun. bst and homespun can produce a listing which is quite useful.
BTW it is pcurr (the base + 4 words) for the pointer to the start of the spin bytecodes. The 5 words in order are: pbase, vbase, dbase, pcurr, dcurr.