首页 > 解决方案 > 错误消息“前向消息需要覆盖”警告“模块依赖于传递 - 兼容性传递已完成”

问题描述

错误消息“前向消息需要覆盖(24)[在文件输入中]”警告“模块依赖于传递 - 兼容性传递已完成 [主文件第 31 行]”“我的代码是:

file: input
enter_char proc ;; the ouput from console is saved in al; destroys ax.
    mov ah, 01h
    int 21h
    ret
enter_char endp

enter_notFullPos proc
    mov bx, 0
    mov cl, 0
    num_enter:
        call enter_char
        cmp al, "."
        jnz after_point
        mov cl, 1
        after_point: 
            sub al, "0"
            jc end_input
            cmp al, 10
            jnc end_input
            adding_number:
                mult bx, 10
                add bl, al
                cmp cl, 0
                jnz after_add
                inc cl
                after_add:jmp num_enter
    end_input:
        mov angel, bx
        dec cl
        mov pivot, cl
        ret
enter_notFullPos endp

并在文件中:“ mathop.asm ”

mult macro num1, num2 ; returns result in num1
    push dx
    push ax
    push bx
    mov ax, num1
    mov bx, num2
    mul bx
    pop bx
    mov num1, ax
    pop ax
    pop dx
endm

有3个问题:1.错误2.程序掉了。3.程序运行不正常

没有“call downLine”行的程序不会关闭”,但让我们关注可能与其他问题有关的主要问题,即错误。mult宏应该将计算的最终值放在num1中,并且不更改任何寄存器。我的主要代码不使用宏。我正在使用 tasm,带有 /m

我的主要:(从第 13 行开始)

assume cs:cseg, ds: dseg
include print.asm
include input.asm
include mathop.asm
    start:
        mov ax, dseg
        mov ds, ax
        print massage1
        call downLine
        call enter_char
        mov trigo_func, al
        print massage2
        call enter_notFullPos
        mov bx, angel
        push bx
        ;call print_num
        int 3h
cseg ends
end start

在此处输入图像描述

标签: assemblymacrosx86-16tasm

解决方案


人员按文件包含的顺序排列。我需要另一个文件中的一些函数,但它们仍然没有定义


推荐阅读