? MOVS instruction
Can anyone clarify for me what the·MOVS instruction does? What does it mean that·the 9-bit·value of VALUE·is·copied into·bits 0..8 of the·destinations source? What is the destinations source? How is·MOVS used? Thanks...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

Comments
can be used to change the address used in a JMP instruction at runtime, for a state machine perhaps
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Who says you have to have knowledge to use it?
I've killed a fly with my bare mind.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
zeromem movd :zloop, :cptr 'init destination pointer nop '1 instruction must be between movd and execution of instruction movd modified :zloop mov 0_0, :zero 'zero out a memory location add :cptr, #1 'increment pointer movd :zloop, :cptr 'update pointer in the instruction using it djnz :i, :zloop ;zero LONG 0 :cptr res 1 :i res 1This function zero's out a portion of the cog memory between cptr and cptr+i, where cptr and i are initialized before this function is executed. In this example it would be faster to increment :zloop's instruction directly by $0000_0200, but you asked for an example using the MOVx·instruction.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.