我正在尝试制作一个程序,它将打印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的二进制值中收集每个单独的位?