3
我正在通过将整数除以10来打印多个数字整数并收集剩余部分,然后将其打印出来。下面是有问题的代码段:linux nasm将AL中的值移动到AX
鸿沟:
; initial division
mov ax, 111 ; number we want to print
mov ch, 10 ; we divide by ten to siphon digits
div ch ; divide our number by 10
; al now has 11, ah has 1
mov dh, ah ; save the remainder in dh
1 mov bx, al ; these lines refill ax with the number to
mov ax, bx ; divide
mov ch, 10 ; refill ch with the divisor
div ch ; al now has 1, ah now has 1
线标有1具有的问题。我需要将8位寄存器AL中的值移到16位寄存器AX。我怎样才能在那里获得价值,这样我就可以分开它?
又见['movsx' ](http://faydoc.tripod.com/cpu/movsx.htm)和['movzx'](http://faydoc.tripod.com/cpu/movzx.htm)说明。 – DCoder