SOLVED - pfth_p2 - problems with converting to AUXRAM data stack
mindrobots
Posts: 6,506
I've been playing with the P2 version of pfth that Dave Hein created.
The first step was to remove the bit-banged serial I/O and replace it with SERA (SERIN/SEROUT) - that worked great! (It's attached below pfth_serio.spin)
The second step was to convert the return stack to use AUXRAM and PTRY and integrate it into the serio version - that worked great! (It's attached below as pfth_rstack.spin)
The third step was to to convert the data stack to using AUXRAM and PTRX and integrate it into the rstack version - that one didn't work. I decided to back up a step and integrate the data stack version into serio....that didn't work either. I'm doing something wrong (probably something obvious and stupid ) but I'm too close to see it as I've been looking at it on and off for about a week now. I've attached the pfth_dstack.spin version also. The code to set up and use the AUXRAM stak with PTRX seemed pretty straight forward. If I was to guess where I broke it, it's in the indexstack routine or in the pick and roll routines. IN my mind, they work but sadly it doesn't get to execute in my mind! As it is now, it just hangs someplace after loading.
Anybody care to take a look and see what I'm missing?
Thanks!
The first step was to remove the bit-banged serial I/O and replace it with SERA (SERIN/SEROUT) - that worked great! (It's attached below pfth_serio.spin)
The second step was to convert the return stack to use AUXRAM and PTRY and integrate it into the serio version - that worked great! (It's attached below as pfth_rstack.spin)
The third step was to to convert the data stack to using AUXRAM and PTRX and integrate it into the rstack version - that one didn't work. I decided to back up a step and integrate the data stack version into serio....that didn't work either. I'm doing something wrong (probably something obvious and stupid ) but I'm too close to see it as I've been looking at it on and off for about a week now. I've attached the pfth_dstack.spin version also. The code to set up and use the AUXRAM stak with PTRX seemed pretty straight forward. If I was to guess where I broke it, it's in the indexstack routine or in the pick and roll routines. IN my mind, they work but sadly it doesn't get to execute in my mind! As it is now, it just hangs someplace after loading.
Anybody care to take a look and see what I'm missing?
Thanks!
Comments
Maybe I can learn forth while I wait for the threading to be resolved
It' s all Dave's excellent implementation except for the 15 or so lines scattered throughout that broke it. Those are mine!!
Dave did a great job that is readable, well documrnted PASM. A great Learning tool for Forth and PASM alike!
Cool! Now I want to run to a computer and test! For some reason, I thought we were checking to see if the stack bottomed out.
Thanks!
EDIT: Dang, Dave! That was easy!! It works like a champ now. I don;t know how long I stared at that and didn't see it or let my brain try and tell me what it should be instead of just reading it. Next step combine everything and see how much using P2 features saves in HUBRAM and COG! THANKS!!