本文介绍了将两个字符串打印到寄存器中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I keep getting an error if I try to do the following:

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行,我基本上得到一个错误,指出初始化器大小对于指定大小而言太大.我不知道我在做什么错.第26行是 mov edx,偏移名称

At line 26, I basically get an error that says initializer magnitude too large for specified size. I have no idea what I'm doing wrong here. Line 26 is mov edx, OFFSET name

推荐答案

根据msdn name 是一个保留字,没有任何功能(将被忽略),但仍然不允许您使用它.选择其他标识符.

According to msdn name is a reserved word which has no function (it is ignored) but you are still not allowed to use it. Pick a different identifier.

这篇关于将两个字符串打印到寄存器中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-17 16:13