Post Reply 
(41) REGMOVE
04-11-2024, 05:54 PM
Post: #1
(41) REGMOVE
The X-Functions command REGMOVE's input consists of a control word sss,dddnnn with
Rsss the first register in the source block
Rddd the first in the destination block
nnn number of registers in both blocks.

On pg. 201 of the 41CX Owner's Manual, Volume 2 under 'Block Operations', there's an extra piece of information not present in my Extended Functions Manual:
'The blocks can't overlap - make sure that |sss - ddd| >= nnn'

But this is NOT true. REGMOVE works as expected both for a downward and upward move, at least it does so on the DM41X (my 41CV died on me, sadly).
Try it out with the following tiny code snippet, that places i in Ri, for i=1 to 9, then executes REGMOVE with the supplied control number:

01 LBL"T"
02 9
03 LBL 10
04 STO IND X
05 DSE X
06 GTO 10
07 RDN
08 REGMOVE
09 END

1,003005 XEQ"T" results in R1-R9 contents of 121234589, correctly moving 12345 two places up.
3,001005 XEQ"T" results in R1-R9 contents of 345676789, moving 34567 two places down

To be honest, there's another extra phrase further down: for REGMOVE, it says that the contents of the source block are unchanged and the contents of the destination block are lost. The former is not true for overlapping blocks, of course. But REGMOVE - thankfully - works as expected, and changes the order in which the elements are copied depending on whether they are copied down or up.

Cheers, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
04-11-2024, 07:43 PM
Post: #2
RE: (41) REGMOVE
I get the same result on a ...
- 41CV with the XFM module
- 41CV with the MAXX module (beta version)

Sylvain Côté
Find all posts by this user
Quote this message in a reply
04-12-2024, 04:30 AM
Post: #3
RE: (41) REGMOVE
What about with XFM version 1A?

Calculator Clique on YouTube
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)