Advertisement

07.19.2008 at 09:01AM PDT, ID: 23579158
[x]
Attachment Details

Symbol type error when I compile this code.

Asked by xudeus in Assembly Programming Language

Cant figure out the issue here, this should work but I keep getting a symbol type error. I am new to assembly so any help would be great.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
INCLUDE Irvine32.inc
 
 
mReadkey MACRO ascii, scan
	mov ah,10h		; BIOS keyboard input function
	int 16h
	mov scan,ah
	mov ascii,al
ENDM
 
.data
ascii BYTE ?
scan  BYTE ?
str1  BYTE "ASCII code: ",0
str2  BYTE "Scan code:  ",0
 
.code
main PROC
	mov ax,@data
	mov ds,ax
 
; Wait for a key; when the macro returns, the two arguments
; contain the ASCII code and scan code of the key.
	mReadkey ascii, scan
 
; Display the values.
	mov edx,OFFSET str1
	call WriteString
	movzx eax,ascii
	call WriteHex
	call Crlf
 
	mov edx,OFFSET str2
	call WriteString
	movzx eax,scan
	call WriteHex
	call Crlf
 
	exit
main ENDP
END main
[+][-]07.19.2008 at 09:24AM PDT, ID: 22042945

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.19.2008 at 10:03AM PDT, ID: 22043052

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.19.2008 at 10:14AM PDT, ID: 22043091

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.19.2008 at 10:16AM PDT, ID: 22043098

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.19.2008 at 02:48PM PDT, ID: 22043772

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.19.2008 at 02:50PM PDT, ID: 22043775

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.20.2008 at 04:34AM PDT, ID: 22045346

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Assembly Programming Language
Sign Up Now!
Solution Provided By: Infinity08
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628