CPU与汇编实验五实验报告

INT 21H RET

INPUTSTR ENDP

HUICHE PROC NEAR ;回车换行函数 MOV DL,0DH MOV AH,02H INT 21H MOV DL,0AH MOV AH,02H INT 21H RET HUICHE ENDP OUTPUTSTR PROC NEAR MOV DX,BX ;输出字符串函数 MOV AH,09H INT 21H RET

OUTPUTSTR ENDP

DELETE PROC NEAR ;删除函数 LEA BX,BUF MOV DI,BX ADD DI,1

MOV AL,DELE XOR AH,AH ADD DI,AX XOR CH,CH MOV CL,NUMBER ADD BX,CX ADD BX,1 MOVE: CMP BX,DI JE LADE MOV DH,[DI+1] MOV [DI],DH INC DI CMP BX,DI JNE MOVE LADE:

MOV BYTE PTR [DI],'$' DEC NUMBER RET DELETE ENDP

MOVE1 PROC NEAR ;移动复制函数 LEA SI,BUF

ADD SI,2 LEA DI,BUF1 MOV CL,NUMBER XOR CH,CH REP MOVSB

MOV BYTE PTR [DI],'$' RET MOVE1 ENDP

INSERT PROC NEAR ;插入函数 LEA BX,BUF MOV DI,BX MOV AL,[INSER] XOR AH,AH ADD DI,AX INC DI XOR CH,CH MOV CL,NUMBER ADD BX,CX ADD BX,1 INS1: MOV DH,[BX] MOV [BX+1],DH

DEC BX CMP BX,DI JAE INS1 INC BX

MOV AL,[INSER+1] MOV [BX],AL INC NUMBER RET INSERT ENDP CODES ENDS END START (3)、实验结果 插入:

联系客服:779662525#qq.com(#替换为@)