MOVS and MOVD
Bobb Fwed
Posts: 1,119
I am trying to reset an instruction's destination and source. I am hoping there is a way to set both at the same time.
To progress it, I am adding 1 << 9 + 1 to the value, but to set it back to the original location what's the fastest way?
Here is clips of what I am doing:
Can I do that reset section in one instruction? It is is a known number of additions. So I guess I could SUB it...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
To progress it, I am adding 1 << 9 + 1 to the value, but to set it back to the original location what's the fastest way?
Here is clips of what I am doing:
timeh IF_Z ADD time, pinhighs ADD timeh, dsplus1 [i]_with_[/i] reset MOVD timeh, #time MOVS timeh, #pinhighs dsplus1 LONG 1 << 9 + 1 ' destination and source plus one value pinhighs LONG 0 [noparse][[/noparse]31] time RES 31
Can I do that reset section in one instruction? It is is a known number of additions. So I guess I could SUB it...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
Safety Tip: Life is as good as YOU think it is!
I'm still a bit young in pasm, but that would be my guess.· In fact, that's one of the tricks I picked up studying Chip's vga driver code...
edit - oops, had reser as immediate
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (Agent420) : 9/11/2009 4:09:18 PM GMT
http://obex.parallax.com/objects/268/
Example of using movd / movs for self modifying code
J
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!