• λ我爱Aspx >> C#.Net >> 求汇编实现三位十进制的加法
  • 求汇编实现三位十进制的加法

  • :aspxer  Դ:csdn  :2007-6-12 3:44:54  ؼ:
  • 回复:qinzhenzhou(小P)

    =========================

    repeat: pop ax "get ax

    jmp repeat

    这两条语句有问题

    第7楼. 由 mydo 于 2007-6-2 21:40:30 发表

    搜我以前用hla写的代码

    第8楼. 由 qinzhenzhou 于 2007-6-3 22:39:36 发表

    注释写错了! 你把单引号都改成分号,再编译一下! 我的EXE文件都编译出来了,结果也是正确的!

    第9楼. 由 qinzhenzhou 于 2007-6-3 22:43:31 发表

    hexibin proc near

    mov ax,bx ;the paramenter is in bx

    push ax

    mov cx,1h ;set 1 into cx

    xor ax,ax

    mov dx,ax ;set result into dx

    repeat: pop ax ;get ax

    mov bl,10d ;set 10d to bl

    div bl ;ax div bl

    mov bl,ah ;save the remainder in bl

    xor ah,ah ;set ah to 00h

    cbw ;change al(quotient) to type word

    push ax ;push the quotient into stack

    mov al,bl ;save the remainder back to al

    cbw ;change it to word

    mul cx ;mul cx

    mov bx,dx ;add it to old remainder

    Ҷƪл˵?
  • һƪ按纽点击时间
    һƪ有一个问题,帮忙解决一下,谢谢了