Assembly 汇编语言上的512位乘法

Assembly 汇编语言上的512位乘法,assembly,Assembly,这是我的代码,其中有两个错误。我是这门语言的初学者,请帮助我。这是我的代码 org 100h jmp start num1: dw 15 num2: dw 7 result: dw 0000 temp: dw 0000 start: xor ax,ax mov cx,64 xor bx,bx here: mov [result+bx],ax add bx,2 loop here mov cx,32 xor bx,bx here1:

这是我的代码,其中有两个错误。我是这门语言的初学者,请帮助我。这是我的代码

org 100h

jmp start

num1: dw 15
num2: dw 7
result: dw 0000
temp: dw 0000 

start:  xor ax,ax
    mov cx,64
    xor bx,bx
here:   mov [result+bx],ax
    add bx,2
    loop here

    mov cx,32
    xor bx,bx
here1:  mov ax,[bx+num1]
    mov [temp+bx],ax
    add bx,2
    loop here1

    xor ax,ax
    mov cx,32
here2:  mov [temp+bx],ax
    add bx,2
    loop here2

    mov cx,32
there:  push cx
    mov cx,32
    mov bx,32
    clc
here3:  rcr [num2+bx]
    dec bx
    dec bx
    loop here3
    jnc skipadd

    xor bx,bx
    mov cx,64
    clc
here4:  mov ax,[temp+bx]
    adc [result+bx],ax
    inc bx
    inc bx
    loop here4

skipadd:xor bx,bx
    mov cx,64
    clc
here5:  rcl [temp+bx]
    inc bx
    inc bx
    loop here5

    pop ax,
    loop there

    mov ax,4c00h
    int 21h

此代码正在覆盖程序

num1: dw 15
num2: dw 7
result: dw 0000
temp: dw 0000 

start:  xor ax,ax
    mov cx,64
    xor bx,bx
here:   mov [result+bx],ax
    add bx,2
    loop here
您需要更改result和temp的定义以允许64个字

result: dw 64 dup (0)
temp:   dw 64 dup (0)
您正在使用以下命令复制垃圾

    mov cx,32
    xor bx,bx
here1:  mov ax,[bx+num1]
    mov [temp+bx],ax
    add bx,2
    loop here1
更好地利用

    mov cx,32
    xor bx,bx
    mov ax,[bx+num1]
here1:  mov [temp+bx],ax
    add bx,2
    loop here1

这些错误是什么?我们都不是通灵者。就像你的结果和温度一样,num1和num2是16位的。您确定这些NUM中提供了您的输入吗?请编辑您的问题并为您的处理器体系结构添加标记。我可以猜,但我不应该猜。世界上有不止一种类型的处理器,它们有不同的汇编语言。你说的“512位乘法”是什么意思?乘以512位数字?将2 256位数字乘以512位数字?