;默认认采用ML6.11汇编程序
DATAS SEGMENT;此处输入数据段代码BUF DB -2,2,3,4,-4N=$-BUF
DATAS ENDS
STACKS SEGMENT;此处处输入堆栈段代码
STACKS ENDS
CODES SEGMENTASSUME CS:CODES,DS: DATAS, SS:STACKS
START:MOV AX, DATASMOV DS,AXMOV BX,0MOV CX,0
LOP:
mov AX,[BX]
ROR AX,1
AND AX,0C0H
CMP AX,40H
JNE NEXT
TRUE:
ADD SI,1
NEXT:
ADD BX,1
INC CX
CMP CX,N
JNE LOP
ANS:
ADD SI,30H
MOV AH,02H
MOV DX,SI
INT 21H;此处输入代码段代码
EXIT:MOV AH,4CHINT 21H
CODES ENDS
END START