-
Notifications
You must be signed in to change notification settings - Fork 2
/
ters_cevirme.asm
57 lines (39 loc) · 1.04 KB
/
ters_cevirme.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
.MODEL SMALL
.STACK 32
.DATA
STR1 DB 21,0,22 dup ('$')
STR2 DB 21,0,22 dup ('$')
nl db 21,0,22 dup ('$')
.CODE
START:
MOV AX,@DATA
MOV DS,AX
DISP:
LEA DX,STR1
MOV AH,09H
INT 21H
MOV CL,00
MOV AH,01H
READ:
INT 21H
MOV BL,AL
PUSH BX
inc cx
CMP AL,0DH
JZ DISPLAY
JMP READ
DISPLAY:
LEA DX,STR2
MOV AH,09H
INT 21H
lea dx, nl
mov ah,09h
int 21h
ANS:
MOV AH,02H
POP BX
MOV DL,BL
INT 21H
LOOP ANS
.EXIT
END START