嗨我有一个cs类的问题
The puts TRAP routine has been disabled for some reason. Write an LC-3
subroutine called puts that
implements its behaviour. In other words when the subroutine is called
register R0 will contain the
address of a null-delimited string and the subroutine will simply print the
string and return. You will of
course need to utilize the TRAP routine out that prints a character.
DO 不必写主要 程序
所以我的方法是这个我不确定这是否正确或我的逻辑是否正确
PUTS:
ADD R2, R0, #0;
AND R0, R0, #0;
ADD R0, R2, #0;
Out(trapx21) ; print first char in r0;
BRp PUTS ; repeat loop
我不确定我是否正确地做了这个帮助?
答案 0 :(得分:1)
关于您的TRAP还有一些问题。
与你问题中的说明相反,你应该写一个MAIN来测试它。