能不能帮我看看此程序哪错了《谢谢》《求出每名学生的名次,并保存在rank数组。rank+i存放第i名学生的名次》
;program title goes here --compare sting;*******************************
datarea segment ; define data segment
string1 db 'Move the cursor backword'
string2 db 'Move the cursor backword'
;
mess1 db 'Match',13,10,'$'
mess2 db 'No Match!',13,10,'$'
datarea ends
;********************************
prognam segment ;define code segment
;--------------------------------
main proc far
assume cs:prognam,ds:datarea,es:datarea
start: ;starting execution address
; set up stack for return
push ds ;save old data segment
sub ax,ax ;put zero in ax
push ax ;save it on stack
; set ds register to current datarea segment
mov ax,datarea ;datarea segment addr
mov ds,ax ;into ds register
mov es,ax ;into es register
;main part of program gdes here
lea si,string1
lea di,string2
cld
mov cx,25
repz cmpsb
jz match
lea dx,mess2
jmp short disp
match:
lea dx,mess1
disp:
mov ah,09
int 21h
ret ;return to dos
main endp ;end of main part of program
;---------------------------------------
prognam ends ;end of code segment
;***************************************
end start ;end assmbly