Memory manipulation

Here are words that move and sort data in local RAM.

move

Moves data from source to destination. This is the best code if data won't overlap or if destination is not greater than source. The strategy is to increment both source and destination in register a

+move

Moves data from source to destination when data overlap and destination is greater than source. As in pushing an entry into a table. The count is n-1, which is convenient. Clearly the code for move is shorter and faster.

The first line moves source and destination to the end of their regions. It is unnecessary if they already point there.

bubble

This bubble sort takes an entry at the beginning of a sorted table and finds its place. The table must have a stopper greater than any possible entry. This is the smallest (only) sort I know. The two adds do not need a dot before them because they're in slot 3. Looks like building this table should start from high address and grow toward lower.