《汇编语言统计数组中的正数、负数和零的个数》由会员分享,可在线阅读,更多相关《汇编语言统计数组中的正数、负数和零的个数(2页珍藏版)》请在金锄头文库上搜索。
1、DATA SEGMENTS1 DB 13,10,ZHENG:$S3 DB 13,10,FU:$S2 DB 13,10,0:$NUM DB -1,3,5,0,-5,-7,4,0,8V1 DB 0V2 DB 0V3 DB 0DATA ENDSSTACK1 SEGMENT PARA STACK DB 20H DUP(0)STACK1 ENDSCODE SEGMENTASSUME CS:CODE,DS:DATA,SS:STACKSTART:MOV AX,DATAMOV DS,AXMOV ES,AXMOV DI,OFFSET NUMXOR BL,BLMOV CX,9L1: MOV AL,DIOR AL,
2、ALJE ADDV2JG ADDV1INC V3JMP BOTTOMADDV2: INC V2JMP BOTTOMADDV1: INC V1BOTTOM: INC DILOOP L1MOV AH,09HMOV DX,OFFSET INT 21HMOV AH,02H MOV DL,V3ADD DL,30HINT 21HMOV AH,09H MOV DX,OFFSET INT 21HMOV AH,02HMOV DL,V2ADD DL,30HINT 21HMOV AH,09HMOV DX,OFFSET INT 21HMOV AH,02HMOV DL,V1ADD DL,30HINT 21HMOV AX,4C00HINT 21HCODE ENDSEND START