A little PASM puzzle
jazzed
Posts: 11,803
Anyone (other than kuroneko [noparse]:)[/noparse] care to reverse engineer the purpose of this PASM code?
Hope some of the young ones or newbies give this a shot. I know the answer since I wrote it.
Just consider this a friendly challenge.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
long $a0bfee07, $a4bc0e07, $08bc0df7, $e87c0c02 long $08bc0df7, $ec7c0c04, $00000000, $a3837ffe
Hope some of the young ones or newbies give this a shot. I know the answer since I wrote it.
Just consider this a friendly challenge.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit some of my articles at Propeller Wiki:
MATH on the propeller propeller.wikispaces.com/MATH
pPropQL: propeller.wikispaces.com/pPropQL
pPropQL020: propeller.wikispaces.com/pPropQL020
OMU for the pPropQL/020 propeller.wikispaces.com/OMU
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
PS. I am already teasing of me (because is acomplete non sense what I have written) so, please, you gurus, be polite
BTW: What are CON bits for?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· Propeller Object Exchange (last Publications / Updates)
Post Edited (dMajo) : 8/22/2009 11:51:08 AM GMT
is equivalent (except for timing) to
As for your disassembly, addressing starts at cog address 0 which means dirb isn't loaded with $00000000 but $A3837FFE. As it's used as a hub address in a rdlong the effective (long) address value is $7FFC ...
Post Edited (kuroneko) : 8/22/2009 12:46:34 PM GMT
Too bad I need 2 more registers anyway and only dirb/outb are available besides the normal registers.
@dMajo,
Excellent attempt. No laughing allowed. The neg instruction is a little difficult to know at first.
There is a tool (or two) to do the disassembly. Ale's emulator will do it ... it is a good tool.
Here's the original source with comments.
The stub is a PASM "stepper" which can be used to make a COG "do anything" that COGs can do
without regular PASM. This would be good for debugging PASM code with read, write, flag check, etc....
One could also use it as something of an in-line PASM engine. The LMM approach would be faster.
Here's an example of using the stub to get the COG's Carry flag state.
Some initialization like setting INSA/DATA, etc... is done before one can call getc.
This example will change to make it possible to get rid of the first stub instruction.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
Morpheus & Mem+dual Prop SBC w/ 512KB kit $119.95, 2MB memory IO board kit $89.95, both kits $189.95
www.mikronauts.com - my site 6.250MHz custom Crystals for running Propellers at 100MHz
Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
I'm happy that I at least guessed the direction to go in trying to figure it out your puzzle - but was way over my PASM decompiler (the neural on that is).
In case you don't notice, please look at this:
http://forums.parallax.com/showthread.php?p=833731
thanks
- H
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (CounterRotatingProps) : 8/22/2009 5:36:16 PM GMT