什么是错的这条线LC3 code的? [英] What is wrong with this line of Lc3 code?
问题描述
我在做模拟考试的问题。
问题是
这有什么错在此行LC3 code的? (出演线)
块引用>ADD R3,R3,0;
** BRNZ ISPOS **
停
.BLKW 250
ISPOS不R3,R3 ....我看到星号线是科和条件codeS为负,零,基本上去标签ISPOS如果条件code为负或零或以其他方式阻止该程序。
我要说的是,这条线LC3 code有什么不妥的地方。有没有人看到它的任何问题?
解决方案是的,有这个code段几个不同的错误。
的运算codeS不能有什么比一个标签$ P $其他pceding他们。的
** BRNZ ISPOS **
必须成为:
BRNZ ISPOS **
的你不能有任何随机字符运算后,除非他们被注释掉的
ISPOS不R3,R3 ....
必须更改为:
ISPOS不R3,R3; ....
I am doing a practice exam question.
The Question is
Is there anything wrong in this line of LC3 code? (The starred line)
ADD R3, R3, 0; **BRNZ ISPOS;** HALT .BLKW 250 ISPOS NOT R3, R3 ....
I saw that the starred line is Branch and the condition codes are negative and zero, basically go to label ISPOS if the condition code is negative or zero or halt the program otherwise.
I would say that this line of LC3 code has nothing wrong with it. Does anyone see any problems with it?
解决方案Yes, there are a couple different errors with this code segment.
Opcodes cannot have anything other than a label preceding them.
**BRNZ ISPOS;**
Must become:
BRNZ ISPOS;**
You cannot have any random characters after operands, unless they are commented out
ISPOS NOT R3, R3 ....
Must change to:
ISPOS NOT R3, R3 ;....
这篇关于什么是错的这条线LC3 code的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!