-
Notifications
You must be signed in to change notification settings - Fork 0
/
code_1
67 lines (45 loc) · 977 Bytes
/
code_1
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
58
59
60
61
62
63
64
65
66
67
include 'emu8086.inc'
.model small
.stack 100h
.data
arr db 100 dup(?)
a dw ?
.code
main proc
mov ax,@data
mov ds,ax
xor bx,bx
xor cx,cx
print "Enter the length of the string: "
mov ah,1
int 21h
and al,0fh
mov cl,al
mov bl,al
mov si,0
printn
mov si, offset arr
print 'Enter string: '
l1:
mov ah,1
int 21h
add al,32
mov [si],al
inc si
loop l1
mov si, offset arr
printn
print "Output : "
mov cx,bx
mov si,0
mov ah,2
output:
mov dl,arr[si]
int 21h
inc si
loop output
exit:
mov ah,4ch
int 21h
main endp
end main