KenBash
02-19-2007, 12:58 AM
I'm converting an old SX assembly language function into propeller code and I'm having some difficulty understanding· access of Main memory from assembly language.
· I've· written a simple test function to see if I can·modify·a main memory value:
·Passing the value location·to the assembly language routien, modifying it, then·putting
·the mofified value·back into main memory:
move
················· ·mov· mem, PAR
················· ·mov xat , #1
···············
·················· ·wrlong xat, mem
················· · call #pauseit
··················· ret
··
Pauseit····································· ' wait a moment for sync.
······················ nop················
Pauseit_ret······· Ret
I know it modifies the value because I get a change after·I run the assembly function.·
When I print the value·using text.dec· I get the value 1 printed on the screen with an additional bunch of "Garbage" on the screen.·· I've searched for an assembly language tutorial for the propeller but haven't been able to find the right thing.
I would like to:···· 1. · read a value from main memory.
························ 2.· incriment ( or anything ) this value
························ 3.· write it back to main memory so that it displays correctly
····························· using the text.dec· function.·
I'm also a bit fuzzy on·why a 32 bit processor is limited to a $1ff value in assembly language.·
I've got some great code running in Spin, but I want to compact·it·and speed up some motion control functions.
Can someone point me in the right direction for getting up to speed in·Propeller assembly?
I'd like to understand the register structure and such if the information is available in some organized form.
Thanks.
Ken Bash
···
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
" Anything worth doing... is worth overdoing. "
··············································· ( R.A.H. )
····································
· I've· written a simple test function to see if I can·modify·a main memory value:
·Passing the value location·to the assembly language routien, modifying it, then·putting
·the mofified value·back into main memory:
move
················· ·mov· mem, PAR
················· ·mov xat , #1
···············
·················· ·wrlong xat, mem
················· · call #pauseit
··················· ret
··
Pauseit····································· ' wait a moment for sync.
······················ nop················
Pauseit_ret······· Ret
I know it modifies the value because I get a change after·I run the assembly function.·
When I print the value·using text.dec· I get the value 1 printed on the screen with an additional bunch of "Garbage" on the screen.·· I've searched for an assembly language tutorial for the propeller but haven't been able to find the right thing.
I would like to:···· 1. · read a value from main memory.
························ 2.· incriment ( or anything ) this value
························ 3.· write it back to main memory so that it displays correctly
····························· using the text.dec· function.·
I'm also a bit fuzzy on·why a 32 bit processor is limited to a $1ff value in assembly language.·
I've got some great code running in Spin, but I want to compact·it·and speed up some motion control functions.
Can someone point me in the right direction for getting up to speed in·Propeller assembly?
I'd like to understand the register structure and such if the information is available in some organized form.
Thanks.
Ken Bash
···
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
" Anything worth doing... is worth overdoing. "
··············································· ( R.A.H. )
····································