文件名称:sum
- 所属分类:
- 汇编语言
- 资源属性:
- [ASM] [源码]
- 上传时间:
- 2013-05-16
- 文件大小:
- 421kb
- 下载次数:
- 0次
- 提 供 者:
- HoTae*****
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
.org 3000
la r1, 9 counter for outer loop
la r4, 36 initialize offset for saving area in memory
lar r31, outerloop save target address for outerloop
lar r30, innerloop save target address for innerloop
outerloop: la r3, 0 initialize sum
la r7, 1(r1) counter for innerloop
innerloop: add r3, r3, r7 accumulate sum
addi r7, r7, -1 decrement innerloop counter
brpl r30, r7 branch if not done
st r3, A(r4) store sum in memory from high memory
addi r4, r4, -4 set memory pointer 1 word down
addi r1, r1, -1 decrement outerloop counter
brpl r31, r1 branch if not done
stop
.org 1000
A: .dw 10
-.org 3000
la r1, 9 counter for outer loop
la r4, 36 initialize offset for saving area in memory
lar r31, outerloop save target address for outerloop
lar r30, innerloop save target address for innerloop
outerloop: la r3, 0 initialize sum
la r7, 1(r1) counter for innerloop
innerloop: add r3, r3, r7 accumulate sum
addi r7, r7, -1 decrement innerloop counter
brpl r30, r7 branch if not done
st r3, A(r4) store sum in memory from high memory
addi r4, r4, -4 set memory pointer 1 word down
addi r1, r1, -1 decrement outerloop counter
brpl r31, r1 branch if not done
stop
.org 1000
A: .dw 10
la r1, 9 counter for outer loop
la r4, 36 initialize offset for saving area in memory
lar r31, outerloop save target address for outerloop
lar r30, innerloop save target address for innerloop
outerloop: la r3, 0 initialize sum
la r7, 1(r1) counter for innerloop
innerloop: add r3, r3, r7 accumulate sum
addi r7, r7, -1 decrement innerloop counter
brpl r30, r7 branch if not done
st r3, A(r4) store sum in memory from high memory
addi r4, r4, -4 set memory pointer 1 word down
addi r1, r1, -1 decrement outerloop counter
brpl r31, r1 branch if not done
stop
.org 1000
A: .dw 10
-.org 3000
la r1, 9 counter for outer loop
la r4, 36 initialize offset for saving area in memory
lar r31, outerloop save target address for outerloop
lar r30, innerloop save target address for innerloop
outerloop: la r3, 0 initialize sum
la r7, 1(r1) counter for innerloop
innerloop: add r3, r3, r7 accumulate sum
addi r7, r7, -1 decrement innerloop counter
brpl r30, r7 branch if not done
st r3, A(r4) store sum in memory from high memory
addi r4, r4, -4 set memory pointer 1 word down
addi r1, r1, -1 decrement outerloop counter
brpl r31, r1 branch if not done
stop
.org 1000
A: .dw 10
(系统自动生成,下载前可以参看下载内容)
下载文件列表
fib_answer.asm
SRCTools\manifest
........\META-INF\MANIFEST.MF
........\SRCTools\FocusChanger.class
........\........\GUI\AsmEditWindow.class
........\........\...\AssemblyLabel.class
........\........\...\AssemblyViewPanel.class
........\........\...\BreakPointField.class
........\........\...\DataViewPanel.class
........\........\...\GridBagUtil.class
........\........\...\GUIConstants.class
........\........\...\HexInputField.class
........\........\...\HexLocField.class
........\........\...\IEField.class
........\........\...\InterruptPanel.class
........\........\...\MemoryCellView.class
........\........\...\MessageDialog$1.class
........\........\...\MessageDialog$WindowEventHandler.class
........\........\...\MessageDialog.class
........\........\...\PCRegisterPanel.class
........\........\...\RegisterFilePanel.class
........\........\...\RegisterLabel.class
........\........\...\RegisterPanel.class
........\........\...\SaveOnCloseDialog$1.class
........\........\...\SaveOnCloseDialog$WindowEventHandler.class
........\........\...\SaveOnCloseDialog.class
........\........\...\SimClipboard.class
........\........\Parser\ASTAdd.class
........\........\......\ASTAddi.class
........\........\......\ASTAnd.class
........\........\......\ASTAndi.class
........\........\......\ASTAsmLine.class
........\........\......\ASTasmLineError.class
........\........\......\ASTBinaryLiteral.class
........\........\......\ASTBr.class
........\........\......\ASTBrl.class
........\........\......\ASTBrlmi.class
........\........\......\ASTBrlnv.class
........\........\......\ASTBrlnz.class
........\........\......\ASTBrlpl.class
........\........\......\ASTBrlzr.class
........\........\......\ASTBrmi.class
........\........\......\ASTBrnv.class
........\........\......\ASTBrnz.class
........\........\......\ASTBrpl.class
........\........\......\ASTBrzr.class
........\........\......\ASTC1.class
........\........\......\ASTC2.class
........\........\......\ASTC3.class
........\........\......\ASTComment.class
........\........\......\ASTConst.class
........\........\......\ASTConstElement.class
........\........\......\ASTConstTerm.class
........\........\......\ASTDb.class
........\........\......\ASTDc.class
........\........\......\ASTDcb.class
........\........\......\ASTDch.class
........\........\......\ASTDCPseudo.class
........\........\......\ASTDecimalLiteral.class
........\........\......\ASTDh.class
........\........\......\ASTDw.class
........\........\......\ASTEdi.class
........\........\......\ASTEen.class
........\........\......\ASTEqu.class
........\........\......\ASTHexLiteral.class
........\........\......\ASTInstr.class
........\........\......\ASTLa.class
........\........\......\ASTLabDef.class
........\........\......\ASTLabUse.class
........\........\......\ASTLar.class
........\........\......\ASTLd.class
........\........\......\ASTLdr.class
........\........\......\ASTMemoryAddressing.class
........\........\......\ASTNeg.class
........\........\......\ASTNoBinPseudo.class
........\........\......\ASTNoComment.class
........\........\......\ASTNoConst.class
........\........\......\ASTNoInstr.class
........\........\......\ASTNoLabDef.class
........\........\......\ASTNop.class
........\........\......\ASTNoReg.class
........\........\......\ASTNot.class
........\........\......\ASTOr.class
........\........\......\ASTOrg.class
........\........\......\ASTOri.class
........\........\......\ASTRa.class
........\........\......\ASTRb.class
........\........\......\ASTRc.class
........\........\......\ASTReg.class
........\........\......\ASTRfi.class
........\........\......\ASTRi.class
........\........\......\ASTShc.class
........\........\......\ASTShl.class
........\........\......\ASTShr.class
........\........\......\ASTShra.class
........\........\......\ASTSourceFile.class
........\........\......\ASTSt.class
........\........\......\ASTStop.class
........\........\......\ASTStr.class
........\........\......\ASTSub.class