第五章

&ccedil&not - 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

Info iconThis 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 试试试试试试试
Background image of page 1

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

View Full DocumentRight 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 试试试试试试试试试
Background 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 试试
Background image of page 3

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

View Full DocumentRight 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)试
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/23/2012 for the course CS 2000 taught by Professor Peter during the Spring '12 term at Appalachian State.

Page1 / 16

&ccedil&not - 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

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online