Block-transfer instruction

On the PDP-10 mainframe computer, the BLT (Block Transfer) in assembly language programming, is the instruction which copies words from memory to memory. The left half of the BLT instruction's specified accumulator (or AC) specifies the first source address. The right half of the AC specifies the first destination address. The effective address specifies the last destination address. Words are copied, one by one, from the source to the destination, until a word is stored in an address greater than or equal to the effective address of the BLT.

Caution: BLT clobbers the specified AC. Don't use the BLT AC in address calculation for the BLT; results will be random. If source and destination overlap, remember that BLT moves the lowest source word first. If the destination of the BLT includes the BLT AC, then the BLT AC should be the last destination address.

Programming examples

Save all the accumulators:

MOVEM 17,SAVAC+17
MOVEI 17,SAVAC ;Source is 0, destination is SAVAC
BLT 17,SAVAC+16

Restore all the accumulators:

MOVSI 17,SAVAC ;Source is SAVAC, destination is 0
BLT 17,17

Zero 100 words starting at TABLE.

SETZM TABLE
MOVE AC,|TABLE,,TABLE+1] ;Source and destination overlap
BLT AC,TABLE+77

Move 77 words from TABLE through TABLE+76 to TABLE+1 through TABLE+77. BLT can't be done here because the source and destination overlap.

MOVE AC,|400076,,TABLE+76]
POP AC,1(AC) ;Store TABLE+76 into TABLE+77, etc.
JUMPL AC,.-1

See also

References

This article is issued from Wikipedia - version of the 7/6/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.