第五章

第五&cc...

Info icon This preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
5.1 试试试试试试试试试试试试试试试试试试试试试试试试试试试试试试试试试试 试试试试试试试试 BEGIN: MOV AH, 1 试试试试试试试试试试试 DOS 试试 INT 21H CMP AL, ‘a’ 试试试试试<‘a’试试 JB STOP CMP AL, ‘z’ 试试试试试>‘z’试试 JA STOP SUB AL, 20H 试试试试试试试试试试 AND AL, 1101 1111B 试试 MOV DL, AL 试试试试试试试试 DOS 试试 MOV AH, 2 INT 21H JMP BEGIN STOP: RET 5.2 试试试试试试试试试试试试试试试试试试试试试试试试试试试试试试试试试试试试试试试试试试试试试 试试试试试试试试 BEGIN: MOV AH, 1 试试试试试试试试试试试 DOS 试试 INT 21H CMP AL, ‘a’ 试试试试试<‘a’试试 JB STOP CMP AL, ‘z’ 试试试试试>‘z’试试 JA STOP DEC AL 试试试试试试试
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
MOV DL, AL 试试试试试试试试试 MOV CX, 3 DISPLAY: MOV AH, 2 试试试试试试试试 DOS 试试 INT 21H INC DL LOOP DISPLAY STOP: RET 5.3 试 AX 试试试试试 16 试试试试 4 试试试试 4 试试试试试试试试试试试试试 AL试BL试CL 试 DL 试试 试试试试试试试试 DSEG SEGMENT STORE DB 4 DUP (?) DSEG ENDS BEGIN: MOV CL, 4 试试试试试 MOV CH, 4 试试试试试 LEA BX, STORE A10: MOV DX, AX AND DX, 0FH 试试 AX 试试试试 MOV [BX], DL 试试试试试试 STORE 试 INC BX SHR AX, CL 试试试试试 DEC CH JNZ A10 试试试试试试试试试
Image of page 2
B10: MOV DL, STORE 试试试试试试试试 AL试BL试CL 试 DL 试 MOV CL, STORE+1 MOV BL, STORE+2 MOV AL, STORE+3 STOP: RET 5.4 试试试试试试试试试试试试试试试试 STRING1 试 STRING2 试试试试试试试试试试试试试试试试试‘MATCH’试 试试试试试试试‘NO MATCH’试 试试试试试试试 DSEG SEGMENT STRING1 DB ‘I am a student.’ STRING2 DB ‘I am a student!’ YES DB ‘MATCH’, 0DH, 0AH, ‘$’ NO DB ‘NO MATCH’, 0DH, 0AH, ‘$’ DSEG ENDS 试-------------------------------------------------------------------------- CSEG SEGMENT MAIN PROC FAR ASSUME CS: CSEG, DS: DSEG, ES: DSEG START: PUSH DS 试试试试试 DOS SUB AX, AX PUSH AX MOV AX, DSEG MOV DS, AX 试试 DS 试试 MOV ES, AX 试试 ES 试试
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
BEGIN: LEA SI, STRING1 试试试试试试试试试试试 LEA DI, STRING2 CLD MOV CX, STRING2 - STRING1 REPE CMPSB 试试试试 JNE DISPNO LEA DX, YES 试试试 MATCH JMP DISPLAY DISPNO: LEA DX, NO 试试试 NO MATCH DISPLAY: MOV AH, 9 试试试试试试试试试 DOS 试试 INT 21H RET MAIN ENDP CSEG ENDS 试试试试试试试试 试-------------------------------------------------------------------------- END START 5.5 试试试试试试试试试试试试试试试试试试试试 N试试试试试 N 试(试试试 ASCII 试试 07)试
Image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern