【问题标题】:error massage "forward massage needs override" warning "module is pass dependent - compitability pass was done""错误消息“前向消息需要覆盖”警告“模块依赖于传递 - 兼容性传递已完成”
【发布时间】:2020-03-29 18:15:00
【问题描述】:

错误消息“前向消息需要覆盖 (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

enter image description here

【问题讨论】:

  • 你甚至没有使用宏,或者如果你使用了,你忘了显示它。通常,要消除此类错误,您应该使用/m 命令行开关(假设您使用的是您也忘记指定的tasm。)请提供minimal reproducible example,其中还包括使用的确切命令。
  • 对不起,你是对的。我更新了我的问题。 /m 命令行开关是什么意思?我应该在哪里使用它?
  • 您没有显示您使用的命令。您应该将/m 添加到tasm 的命令行中。
  • 您没有显示产生错误的代码。我们应该如何猜测?这可能是一个简单的错字,因为它通常应该被称为“消息”。
  • input 需要来自mathopmult,但稍后会包含它。换个顺序试试。

标签: assembly macros x86-16 tasm


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2021-07-20
    • 2022-01-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-21
    • 2018-04-10
    • 1970-01-01
    相关资源
    最近更新 更多