-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheach_letter_newline.asm
More file actions
61 lines (53 loc) · 915 Bytes
/
each_letter_newline.asm
File metadata and controls
61 lines (53 loc) · 915 Bytes
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
;WAP to change each letter into uppercase and display in newline in clear screen
.model small
.stack 64
.data
MAXLEN DB 255
ACTLEN DB ?
INPUT DB 255 DUP('$')
NEW_LINE MACRO
MOV AH, 02H
MOV DL, 0AH
INT 21H
MOV DL,0DH
INT 21H
NEW_LINE ENDM
.code
main proc far
mov ax, @data
mov ds, ax
mov ah, 0ah
lea dx, MAXLEN
int 21h
CALL SCR_CLEAR
MOV CX,0000H
MOV CL, ACTLEN
LEA SI, INPUT
L1:
MOV AL,[SI]
cmp al, 32
je skip
SUB AL, 32
skip:
mov dl,al
MOV AH, 02H
INT 21H
NEW_LINE
INC SI
LOOP L1
mov ax, 4C00h
int 21h
main endp
SCR_CLEAR PROC NEAR
MOV AX,0600H;REQ TO SCROLL
MOV BH,61H;BLUE ON BROWN FOR ATTRIBUT ON PIXEL
MOV CX,0000H
MOV DX,1950H
INT 10h
MOV AH, 02h ; Function 02h: Set cursor position
MOV BH, 00h ; Video page 0
MOV DX, 0000h ; Row 0, column 0
INT 10h
RET
SCR_CLEAR ENDP
end