; ye reshte va adade m va n migire va az karaktere n e reshte be andaze m hazf mikone .MODEL SMALL .STACK .DATA M DB ? N DB ? STRLIST LABEL BYTE MAX DB 64 LEN DB ? BUFFER DB 65 DUP('$') .CODE MAIN PROC FAR MOV AX, @DATA MOV DS, AX MOV AH, 0AH MOV DX, OFFSET STRLIST INT 21H ;KHATE BAD MOV AH, 02 MOV DL, 10 INT 21H MOV DL, 13 INT 21H MOV AH, 01H INT 21H MOV N, AL SUB N,48 INT 21H MOV M, AL SUB M,48 LOOP1: DEC M CMP M, -1 JE ENDC MOV BL, N MOV BH, 0 LOOP2: MOV AL, BUFFER[BX+1] MOV BUFFER[BX], AL CMP AL, '$' JE LOOP1 INC BX JMP LOOP2 ENDC: MOV AH, 09 LEA DX, BUFFER INT 21H END_PROG: .EXIT MAIN ENDP END MAIN