MASM错误A2006:未定义的符号

时间:2015-10-09 05:34:59

标签: assembly masm

我只是跟随教师的视频,无法摆脱错误。 我希望我是个白痴,错过了什么。请帮忙。谢谢! 我的代码如下所示:

; Title: Poject 00
; Name: Flamo
; Course/Project ID: CS271 
; Description: It will ask for name/age input


.386
.model flat,stdcall
.stack 4096
ExitProcess proto,dwExitCode:dword

DOG_FACTOR = 7

.data ; declare variables here

    userName    BYTE    33 DUP(0) ; string to be entered by user
    userAge     DWORD   ?        ; integer to be entered by user
    intro_1     BYTE    "Hi, my name is Flamo, and I am here to tell you your age in dog years", 0
    prompt_1    BYTE    "What is your name? ", 0
    intro_2     BYTE    "Nice to meet you " , 0
    prompt_2    BYTE    "How old are you? ", 0
    dogAge      DWORD   ?
    results_1   BYTE    "WOW THAT's ", 0
    results_2   BYTE    " IN DOG YEARS!!!!!!!" , 0
    goodbye     BYTE    "BYE BYE! " , 0


.code
main proc ; write your code here

    ; Introduce programmer
    mov edx,    OFFSET intro_1
    call    WriteString
    call    CrLf

    ; get user name

    ; get user age

    ; calculate dog years

    ; output results

    ; say goodbye
    mov edx, OFFSET goodBye
    call    WriteString
    call    CrLf

    invoke ExitProcess,0

main endp
end main

我的错误是这样的:

1>------ Build started: Project: Project, Configuration: Debug Win32 ------
1>  Assembling ..\..\Project00.asm...
1>..\..\Project00.asm(33): error A2006: undefined symbol : WriteString
1>..\..\Project00.asm(34): error A2006: undefined symbol : CrLf
1>..\..\Project00.asm(46): error A2006: undefined symbol : WriteString
1>..\..\Project00.asm(47): error A2006: undefined symbol : CrLf
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\masm.targets(50,5): error MSB3721: The command "ml.exe /c /nologo /Sg /WX /Zi /Fo"Debug\Project00.obj" /Fl"Project.lst" /I "c:\Irvine" /W3 /errorReport:prompt  /Ta..\..\Project00.asm" exited with code 1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

任何和所有帮助表示赞赏。

0 个答案:

没有答案