[原创]输入10进制,输出2进制
; 纯 DOS 程序
.model small
.stack 200h
.data
yushu db 16 dup (?),'$'
.CODE
START:
mov ax,@data
mov ds,ax
mov ax,255;这里更改数字0~255
mov cx,16
mov bl,2
mov di,0
lop:div bl
mov yushu[di],ah
inc di
cbw
loop lop
mov cx,16
mov si,15
fdk:mov dl,yushu[si]
add dl,30h
mov ah,02
int 21h
sub si,1
loop fdk
;暂停,任意键关闭
mov ah,1
int 21h
mov ah,4ch
int 21h
END START