我编了个关于if else条件汇编的测试程序,函数原型是tmp = ConditionTest(m, n, 9, result);
汇编的循环体代码如下,编译后导入板子运行出现错误:
“Close error: Invalid File ID (38257) in CIO message!”
请问我的代码是哪里出错了,谢谢!!!
MV .L1 A6, A_loopcount loop: LDB .D1T1 *A4++[1], A_x1 LDB .D2T2 *B4++[1], B_y1 SUB .L1 A_loopcount, 1, A_loopcount CMPGT .L1 A_loopcount, 6, A_tmp [A_tmp] B .S2 condition1 [A_tmp]ADDKPC loop, B3, 4 NOP 4 CMPGT .L1 A_loopcount, 3, A_tmp [A_tmp] B .S2 condition2 [A_tmp]ADDKPC loop, B3, 4 NOP 4 CMPGT .L1 A_loopcount, 0, A_tmp [A_tmp]B .S2 condition3 [A_tmp]ADDKPC loop, B3, 4 NOP 4 *===================== LOOP EPILOG ============================== *
[!A_loopcount]B .S2 B3 ;return || MVK .S1 1,A4 ;return 1 NOP 4
* ================= LOOP PROLOG ============================ * condition1: ADD .S1X A_x1, B_y1, A_sum STB .D2T1 A_sum, *result++[1] [A_loopcount] B .S2 B3 nop 5 condition2: SUB .S1X A_x1, B_y1, A_sum STB .D2T1 A_sum, *result++[1] [A_loopcount] B .S2 B3 nop 5 condition3: MPY .M1x A_x1, B_y1, A_sum nop 1 STB .D2T1 A_sum, *result++[1] [A_loopcount] B .S2 B3 nop 5 .end
[ 本帖最后由 breeze505 于 2012-6-13 10:07 编辑 ]
|