cs 332
cs
loop cs top
sbr loop&3
c loop&3,adcon
bu loop
...
adcon dsa w99
This requires 23 characters.
If the code needs to be reused, put the top address to be cleared into
mcw &top,loop&3
or
sbr loop&3,top
This increases the requirement to 33 or 30 characters, respectively.
mcw *-6,xyz
loop cs top
sbr top&3
bce loop,xyz,M
This requires 23 characters.
If the value of xyz is known, that value can be tested at the bottom of the loop, and the MCW is not needed. This brings the requirement down to 16 characters.
sw xyz
loop cs top
sbr top&3
bw loop,xyz
This requires 20 characters.
If it is known that xyz has a word mark, the first instruction is not needed. This brings the requirement down to 16 characters.
loop cs 0&x3
sbr x3
...
This requires putting the top address to clear into X3 instead of
sbr x3,xtu
sw xyz
loop mcw @ @,0&x3
sbr x3
cw 1&x3
bw loop,xyz
If X3 already contains an appropriate address, perhaps as a result of
using X3 to clear down to y00 where y equals x+1, the first instruction
can be deleted.