将两个字符串打印到寄存器

时间:2016-11-01 01:02:37

标签: assembly masm irvine32

如果我尝试执行以下操作,我会收到错误:

TITLE            (Filename.asm)

INCLUDE Irvine32.inc

.data
    name BYTE "Jdoe", 0
    menu BYTE "Hello user of this computer!", 0dh, 0ah,
        "I am a robot AI designed to help you with you programs", 0dh, 0ah,
        "Please allow me to assist you as you work on your program", 0dh, 0ah,
        "Name Please> ", 0

.code
main PROC
    ; instructions are added here, in the main procedure
    ; which is in the code segment

    mov EDX, OFFSET menu
    call WriteString

    mov EDX, OFFSET name
    call WriteString

    call Crlf

    exit
main ENDP

END main

在第26行,我基本上会收到initializer magnitude too large for specified size的错误消息。我不知道我在这里做错了什么。第26行是mov edx, OFFSET name

1 个答案:

答案 0 :(得分:3)

根据msdn name是一个没有功能的保留字(被忽略),但仍然不允许使用它。选择一个不同的标识符。