汇编:将十进制或十六进制数转化成二进制数输出

来源:互联网 发布:手机fc2最新域名设置 编辑:程序博客网 时间:2024/05/16 13:38

.datastr1 byte "1",0str2 byte "0",0num word 0 .code ……mov ecx,16                 //循环次数,num的位数L1:shl num,1                 //num是要转换的数jnc print0                //跳转到输出0的部分//输出1的部分mov edx,offset str1call writestringjmp L2print0:mov edx,offset str2call writestringL2: loop L1
1 0
原创粉丝点击