954,479 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Fixing Assembly Code

Hi, I created this student calculator code but in MASM32 it keeps giving me errors. I've modified it about 10 times but it's still wrong. Could anybody help me?

.data
;the terminators
NULL EQU 00H
CR EQU 0DH
LF EQU 0AH
;number of test scores allowed
MAXSCORES EQU 5

; What the user sees before inputting a score.
PromptTscore BYTE "What is the score for the test: ",NULL 

Scores BYTE MAXSCORES DUP(?)
; WriteString
; ReadInt

.code

StudentScoring proc

mov ecx, MAXSCORES	; for the number of test scores per student
mov ESI, OFFSET Scores	; offset for storing test score values
mov ebx, 0		; running count

StudentScoring endp

LablScoring:
	;prompts user for test score
		mov EDX,OFFSET PromptTscore
		Call WriteString


	;reads the users input
		Call ReadInt	
			
	;save score
		mov [ESI+EBX], EAX	
		inc EBX

LOOP LablScoring

End Main


The errors are:
error A2006: undefined symbol: WriteString
error A2006: undefined symbol: ReadInt
error A2006: undefined symbol: Main
error A2148: invalid symbol type in expression: Main

dmtYork921
Newbie Poster
2 posts since Nov 2011
Reputation Points: 10
Solved Threads: 0
 

1) You are calling "Call WriteString", but there is nothing called WriteString except a line that is commented-out.

2) ReadInt (same)

3) You have an End Main, but no start or begin Main

thines01
Postaholic
Team Colleague
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: