11.07.2015 Views

section 7 - Index of

section 7 - Index of

section 7 - Index of

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

DOStart Hardware LoopDOOperation:Assembler Syntax:SP+1 --t SP;LA --t SSH;LC --t SSL;X:ea --t LCSP+1 --t SP;PC --t SSH;SR --t SSL;expr -1 --t LA1 --t LFDO X:ea,exprSP+1 --t SP;LA --t SSH;LC --t SSL;X:aa --t LCSP+1 --t SP;PC --t SSH;SR --t SSL;expr -1 --t LA1 --t LFSP+1 --t SP;LA --t SSH;LC --t SSL;Y:ea --t LCSP+1 --t SP;PC --t SSH;SR --t SSL;expr -1 --t LA1 --t LFSP+1 --t SP;LA --t SSH;LC --t SSL;Y:aa --t LCSP+1 --t SP;PC --t SSH;SR --t SSL;expr -1 --t LA1 --t LFSP+1 --t SP;LA --t SSH;LC --t SSL;#xxx --t LCSP+1 --t SP;PC --t SSH;SR --t SSL;expr -1 --t LA1 --t LFSP+1 -4 SP;LA --t SSH;LC --t SSL;S --t LCSP+1 --t SP;PC --t SSH;SR --t SSL;expr -1 --t LA1 --t LFEnd <strong>of</strong> Loop:SSL(LF) --t SR;SP-1 --t SPSSH --t LA;SSL --t LC;SP - 1 --t SPDODODODODOX:aa,exprY:ea,exprY:aa,expr#xxx,exprS,expr-Description: Begin a hardware DO loop that is to be repeated the number <strong>of</strong> times specifiedin the instruction's source operand and whose range <strong>of</strong> execution is terminated bythe destination operand (previously shown as "expr"). No overhead other than the execution<strong>of</strong> this DO instruction is required to set up this loop. DO loops can be nested and theloop count can be passed as a parameter.During the first instruction cycle, the current contents <strong>of</strong> the loop address (LA) and theloop counter (LC) registers are pushed onto the system stack. The DO instruction'ssource operand is then loaded into the loop counter (LC) register. The LC register containsthe remaining number <strong>of</strong> times the DO loop will be executed and can be accessedfrom inside the DO loop subject to certain restrictions. If LC equals zero, the DO loop is

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!