assembly - 在使用 CodeWarrior 的 HCS12 微控制器上,将文本打印到汇编代码的新行中的代码是什么?
问题描述
我需要将我的输出放在终端上的冒号中,但它们始终显示在第一行。我需要实现一部分代码(我试图在 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
解决方案
推荐阅读
- python - 熊猫 OHLCV 转 JSON 格式
- javascript - JavaScript 汉堡按钮不起作用
- java - 在 Java 8 中使用并行流时,对于相同的请求,我得到了不同大小的响应。任何人都可以提供有关如何处理此问题的见解吗?
- r - 我可以使用 apply 系列来获取许多数据帧的每一列的统计信息吗
- angular - 如何使用分页消除输出信息的限制?
- php - QUERY FAILED.. SQL 语法错误;.. 检查 MariaDB 以获取正确的语法,以便在 ''customer_pass' = '899b573719facc368f32770ea0b68e32' 附近使用
- php - 在 joomla 3.x 中覆盖 mod_related_item 上的 helper.php
- python - Python 2.7 Socket 编程端口
- javascript - 异步/等待 -> 可能没有返回值?
- erlang - ETS 似乎没有存储我的插入