spaderkung
Member
Hi!
I use the following code (from FC) to copy words between DBs given an word offset address and nbr of words to copy. But I found out it fails for byte adresses 4096 and above and I don't see why.
L #i_SourceDB
T #iDB
OPN DB [#iDB]
L #i_DestDB
T #iDB
OPN DI [#iDB]
LAR1 P#DBX 0.0
L #i_SourceElementsOffset
SLD 4
+AR1
LAR2 P#DIX 0.0
L #i_DestElementsOffset
SLD 4
+AR2
L #i_NbrOfElements
LA: T #iLoopCount
L W [AR1,P#0.0]
T W [AR2,P#0.0]
+AR1 P#2.0
+AR2 P#2.0
L #iLoopCount
LOOP LA
SET
SAVE
I use the following code (from FC) to copy words between DBs given an word offset address and nbr of words to copy. But I found out it fails for byte adresses 4096 and above and I don't see why.
L #i_SourceDB
T #iDB
OPN DB [#iDB]
L #i_DestDB
T #iDB
OPN DI [#iDB]
LAR1 P#DBX 0.0
L #i_SourceElementsOffset
SLD 4
+AR1
LAR2 P#DIX 0.0
L #i_DestElementsOffset
SLD 4
+AR2
L #i_NbrOfElements
LA: T #iLoopCount
L W [AR1,P#0.0]
T W [AR2,P#0.0]
+AR1 P#2.0
+AR2 P#2.0
L #iLoopCount
LOOP LA
SET
SAVE