嗨,我有个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. 不必编写主程序。
所以我的方法是这样,我不确定这是正确的还是我的逻辑是正确的
PUTS:
ADD R2, R0, #0;
AND R0, R0, #0;
ADD R0, R2, #0;
Out(trapx21) ; print first char in r0;
BRp PUTS ; repeat loop 我不确定我做得对不对有什么帮助吗?
发布于 2017-12-06 07:23:29
你的陷阱有几件事要做。
与问题中的说明相反,您应该编写一个MAIN来测试它。
https://stackoverflow.com/questions/47666072
复制相似问题