照书清华IBM-PC那本书219页抄的程序编译出错,帮偶看看问题在哪儿?谢谢了
.model medium
.data
array dw 100 dup(?)
count dw 100
sum dw ?
.stack 200h
.code code1
main proc
start:
mov ax, @data
mov ds, ax
mov bx, offset array
push bx
mov bx, offset count
push bx
mov bx, offset sum
push bx
call proadd
mov ax, 4c00h
int 21h
main endp
.code code2
proadd proc pascal uses ax cx si di,
para:word,parc:word,pars:word
mov si, para
mov di, parc
mov cx, [di]
mov di, pars
xor ax, ax
next:
add ax, [si]
add si, 2
loop next
mov [di], ax
ret
proadd endp
end start
保持为Main.asm用MASM5编译出现:
D:\Masm5\Code>masm main.asm main.obj,main.lst,main.crf
Microsoft (R) Macro Assembler Version 5.00
Copyright (C) Microsoft Corp 1981-1985, 1987. All rights reserved.
main.asm(16): error A2062: Missing or unreachable CS
main.asm(26): error A2071: Forward needs override or FAR
main.asm(33): error A2022: Operand must be type specifier
main.asm(34): error A2062: Missing or unreachable CS
main.asm(36): warning A4057: Illegal size for operand
main.asm(37): error A2009: Symbol not defined: PARC
main.asm(39): error A2009: Symbol not defined: PARS
main.asm(41): error A2062: Missing or unreachable CS
49604 + 416684 Bytes symbol space free
1 Warning Errors
7 Severe Errors
请问哪儿出错了?还是偶抄错了,谢谢~~