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

  • :aspxer  Դ:csdn  :2007-6-12 3:44:54  ؼ:
  • add ax,bx ;

    mov dx,ax ;

    pop ax ; pop the quotient from stack

    cmp ax,0d ;compare with zero

    je exit2 ; if equ then exit

    push ax ;else save it back to the stack

    mov ax,cx ;make cx mul by 10h

    mov cx,10h

    mul cx

    mov cx,ax

    jmp repeat

    exit2:

    mov bx,dx

    ret

    hexibin endp

    第10楼. 由 qinzhenzhou 于 2007-6-3 23:55:04 发表

    今晚我再编译了一下,果真有错,以下已做了修正!应该没有问题了!

    data segment

    temp dw ?

    data ends

    decihex segment

    assume cs:decihex,ds:data

    main proc far

    nexts:

    call decibin

    mov temp,bx

    call decibin

    mov ax,temp

    add bx,ax

    call hexibin

    call crlf

    call binihex

    call crlf

    jmp nexts

    main endp

    ;-----------------------------------------------------------------------

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