我需要将我的输出放在终端上的冒号中,但它们始终显示在第一行。我需要实现一部分代码(我试图在 YouTube 上找到它,但它们使用不同的微处理器,我不太熟悉汇编语言来做出改变)来代替空格来跳转到下一行。
例如,每次循环运行时,如何在新行中打印此循环的输出:
Label2:
JSR out2hex ; print the counter
LDAB #$3A ; load to B ASCII code of ":"
JSR putchar ;print to the screen the character
LDAB #$24 ; load to B the character of ASCII code of "$"
JSR putchar ; print to the screen the character
LDAB A,X ; load to B the value of X+A
JSR out2hex ; print into the screen the hex value of it
INCA ; increment the counter, the value in
;accumulator A
LDAB #$82 ; load to B the ASCII code of ","
JSR putchar ; print the character of it
CMPA #20 ; compare the counter with 20 (which represents
;the number of elements in the array
BNE Loop2 ; branch if the counter in A is not equal to 20
;to the Loop2