统计1和0的个数 =======================数据段============= D1 SEGMENT DATA DW 1204H D DW 1000H D1 ENDS ======================附加段============== D2 SEGMENT D2 ENDS ======================堆栈段============== D3 SEGMENT D3 ENDS =====================代码段============== C1 SEGMENT ASSUME DS:D1,ES:D2,SS:D3,CS:C1 START: MOV AX,D1 MOV DS,AX MOV AX,D2 MOV ES,AX MOV AX,D3 MOV SS,AX =======初始化======== MOV AX,DATA MOV BX,0 MOV DX,AX DTA: MOV CL,8 ROL AX,CL JZ AGAIN AGAIN: INC BX LOOP AGAIN MOV AH,2 INT 21H MOV AH,4CH INT 21H C1 ENDS END START 本文来源:https://www.wddqw.com/doc/c363618086254b35eefdc8d376eeaeaad1f316ef.html