[求助]以下有问题的汇编程序怎样改正?
DATA SEGMENTBUFFER DB
SUM DW
DATA ENDS
STACK SEGMENT
STAPN DB 50 DUP(?)
TOP EQU LENGTH STAPN
STACK ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
ASSUME SS:STACK
START: MOV DATA
MOV DS,AX
MOV AX,STACK
MOV SS,AX
MOV AX,TOP
MOV SP,AX
MOV AX,00H
MOV DI,OFFSET SUM
MOV BX,OFFSET BUFFER
MOV CX,100
LOOP1: ADD AX,[BX]
INC BX
DEC CX
JNZ LOOP1
MOV [DI],AX
MOV AH,00H
INT 21H
HLT
CODE ENDS
END START
计算1+2+3+``````````100=?
求0~9这间的某个数的平方值,结果存入变量result中
DATA SEGMENT
ORG 0210H
SQTAB DB 0,1,4,9,16,25,36,49,64,81
NUM DB 7
RESULT DB ?
DATA ENDS
CODE ENDS
ASSUME DS:DATA,CS:CODE
START:PUSH DS
SUB AX,AX
PUSH AX
MOV AX,DATA
MOV DS,AX
LEA SI,SQTAB
ADD SI,NUM
MOV AL,[SI]
MOV RESULT,AL
CODE ENDS
END START
[此贴子已经被作者于2006-6-28 19:45:03编辑过]