fifo for isr
Peter Verkaik
Posts: 3,956
Is there any specific reason why SX/B does not use the secret fifo
to temporarily save M and the 4 parameter bytes?
The attached source shows it saves 9 isr cycles and no need for parameterbyte copies.
regards peter
to temporarily save M and the 4 parameter bytes?
The attached source shows it saves 9 isr cycles and no need for parameterbyte copies.
regards peter
Comments
regards peter
You can use "INTERRUPT NOPRESERVE", then add the code yourself.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
Product web site: www.sxvm.com
"One experiment is worth a thousand theories"
·
Are there more options like that, and are these documented?
regards peter
There are options like that for INTERRUPT,· PROGRAM (see Directives), and BANK (see Directives).· If we need to clarify the documentation further, please let us know.
And, as everyone in this forum knows, I love SX/B because it lets me transfer a lot of my PBASIC skills to the SX.· What I mean to say is that I'm not as clever at ASM as most of you are.· That said, I took your FIFO code and incorporated it into an SX/B file.· The compiler (v1.40)·doesn't complain -- would you check to see if this works as you intended?· If it does, you could save this file (or derivative thereof) as your default template and start with it each time.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Post Edited (Jon Williams (Parallax)) : 8/5/2005 3:12:55 PM GMT
This always gets me into trouble when using asm in SX/B and moving from the SX28 to the SX48/52.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
Product web site: www.sxvm.com
"One experiment is worth a thousand theories"
·
CAUTION HERE!!!!!
If you use the "secret FIFO" you WILL get screwed up if you alse expect to use the SX Key to DEBUG code in those places where you use that FIFO.
Once your code is properly running and the SX Key is no longer used, all seems to operate OK.
Where the problem comes in, is when your program breaks into the debugger, several of your global variables are stored in that FIFO, so if you mess with those contents then improper values may be restored yielding unpredictable results.
I have NOT tested this exhaustively, and my description is what my current understanding is; it could be flawed.
SO PLEASE, USER BE WARE
That said, have fun pushing the limits!
Peter (pjv)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
Sorry, but SASM doesn't have any such ability. SASM was written by Ubicom for public release as their reference assembler for the SX chips. I believe that due to it being a program "for public consumption", they probably had no intention of adding support, documented or not, for the hidden instructions. I have spent far more time than I ever imagined working on the SASM code and I can guarantee that functionality like that is not buried anywhere in the source files.
Thanks, PeterM
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
I adapted your template to make the fifo use optional.
Bean,
I removed the clr fsr instruction, SX/B already sets it correct and the fifo code does not
touch the fsr.
regards peter