진정으로 호기심에서 - 왜 변수 "c"를 명명하는 것이 불가능합니까? \ 3 번째 파티 프로그램 \ winASM \ WinAsm 프로젝트 \ 이차 방정식 \ \ EXE.asm (예를 들어 ... 문자 "c"를 변수 이름으로 사용
.386
.model flat, stdcall
option casemap:none
include windows.inc
include kernel32.inc
include user32.inc
includelib user32.lib
includelib kernel32.lib
Main proto
.data
hOutput dd 0
hInput dd 0
bReadWritten dd 0
szText db "Program calculates the roots of the quadratic expression ax^2+bx+c",10,"Enter a",0
a dd 0
b dd 0
c dd 0
delta dd 0
szInput db 128 dup(0)
.data?
.code
start:
Invoke Main
Invoke ExitProcess,0
Main proc
invoke GetStdHandle, STD_OUTPUT_HANDLE
mov hOutput, eax
invoke GetStdHandle,STD_INPUT_HANDLE
mov hInput, eax
invoke lstrlen, addr szText
invoke WriteFile, hOutput, addr szText, eax, ADDR bReadWritten, NULL
invoke ReadFile, hInput, a, eax,addr bReadWritten, NULL
invoke ReadFile, hInput, b, eax,addr bReadWritten, NULL
invoke ReadFile, hInput, c, eax,addr bReadWritten, NULL
invoke Sleep,10000
ret
Main endp
end start
...이 조립시 오류를
C 원인 24) : 오류 A2008 : 구문 오류 : C
C : \ -3- RD 자 프로그램 \ winASM \ winAsm \ 프로젝트 차식 \ \ EXE.asm (52) : 오류 A2008 : 구문 오류 :
C 이름을 바꿀 때 모든 것이 모여서 잘 돌아갑니다.
아마도 'c'는 winasm의 예약어입니다. 나는 결코 그것을 사용하지 않았다. 그래서 나는 확실히 모른다. 이 경우 설명서에 문서화되어야합니다. – twalberg