DATA SEGMENT
ARRAY DB 9H ,40H,88H,3H,20H,66H
ODD DB ?
EVEN DB ?
DATA ENDS
CODE SEGMENT
START: ASSUME CS:CODE, DS:DATA
MOV AX, DATA
MOV DS, AX
MOV CL , 06H
MOV SI , OFFSET ARRAY
NEXT : MOV AL , [SI]
ROR AL, 1
JC NEXT1
INC EVEN
JMP EXIT
NEXT1: INC ODD
JMP EXIT
EXIT: INC SI
DEC CL
JNZ NEXT
MOV AH , 4CH
INT 21H
CODE ENDS
END START
No comments:
Post a Comment