如何使用循环和字符串在LC3(使用汇编语言)中打印值的二进制版本?

时间:2017-11-25 07:29:33

标签: arrays assembly lc3

我正在尝试制作一个程序,它将打印r0中任何值的二进制版本。我们的老师告诉我们以下内容:

To print a datum in binary, first construct a character string in 
memory describing its data bits; then display the character string via 
the service routine described above. To construct the character string:

repeat 16 times {
store( datum[15] ? ‘1’ : ‘0’ ) into the next memory location
left_shift( datum )
}

问题是,我们如何使用LC3的汇编语言从r0的二进制值中收集每个单独的位?

0 个答案:

没有答案
相关问题