problem with assembly code

Hi guys , i have prob here

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
.model small

.data

data1 dd 5H
data2 dd 3H

.code 

.startup




mov ax,data1
mov cx,data2
clc
call loop1
                    
                    
                 loop1:
       label:dec ax  
       loop label
 mov bx,ax
       
      
       
  .exit
  end     



its simple code for subtract two number ... THE problem is :
when am using emu8086 it's work !
but when am use the code by ( masm subtraction.asm )

ther's many Error >?!

who can help !
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Microsoft (R) Macro Assembler Version 5.00                  3/1/14 17:31:59
                                                             Page     1-1


				.model small 
				 
 0000				.data 
				 
 0000  0005			data1 dw 5H 
 0002  0003			data2 dw 3H 
				 
 0000				.code  
				 
				.startup 
sub.asm(10): error A2105: Expected: instruction or directive
				 
				 
				 
				 
 0000  A0 0000 R		mov ax,data1 
sub.asm(15): warning A4031: Operand types must match
 0003  8B 0E 0002 R		mov cx,data2 
 0007  F8			clc 
 0008  E8 000B R		call loop1 
				                     
				                     
 000B				                 loop1: 
 000B  FE C8			       label:dec ax   
sub.asm(22): warning A4016: Reserved word used as symbol: LABEL
				       loop label 
sub.asm(23): error A2003: Unknown type specifer
 000D  8B D8			 mov bx,ax 
sub.asm(24): warning A4031: Operand types must match
				        
				       
				        
				  .exit 
sub.asm(28): error A2105: Expected: instruction or directive
 000F				  end      
Microsoft (R) Macro Assembler Version 5.00                  3/1/14 17:31:59
                                                             Symbols-1


Segments and Groups:

                N a m e         	Length	 Align	Combine Class

DGROUP . . . . . . . . . . . . .  	GROUP
  _DATA  . . . . . . . . . . . .  	0004	WORD	PUBLIC	'DATA'
_TEXT  . . . . . . . . . . . . .  	000F	WORD	PUBLIC	'CODE'

Symbols:            

                N a m e         	Type	 Value	 Attr

DATA1  . . . . . . . . . . . . .  	L WORD	0000	_DATA
DATA2  . . . . . . . . . . . . .  	L WORD	0002	_DATA

LABEL  . . . . . . . . . . . . .  	L NEAR	000B	_TEXT
LOOP1  . . . . . . . . . . . . .  	L NEAR	000B	_TEXT

@CODE  . . . . . . . . . . . . .  	TEXT  _TEXT		
@CODESIZE  . . . . . . . . . . .  	TEXT  0		
@DATASIZE  . . . . . . . . . . .  	TEXT  0		
@FILENAME  . . . . . . . . . . .  	TEXT  sub		


     29 Source  Lines
     29 Total   Lines
     17 Symbols

  51220 + 465324 Bytes symbol space free

      3 Warning Errors
      3 Severe  Errors
Last edited on
Topic archived. No new replies allowed.