[org 0x0100] ; offset
jmp start ; jump to start label
Array1: db 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M'
Array2: db 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'
Array3: db ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
start:
mov bx, 0
mov cx, 13
lower_case:
mov al, [Array1+bx]
mov dl, al
add dl, 32
mov [Array3+bx], dl
add bx, 1
loop lower_case
mov bx,0
mov cx, 13
upper_case:
mov al, [Array2+bx]
mov dl, al
sub dl, 32
mov [Array3+bx+13], dl
add bx, 1
loop upper_case
mov bx,0
mov cx, 26
print_result:
mov al, [Array3+bx]
mov dl, al
mov ah, 02
int 21h
add bx, 1
loop print_result
exit:
mov ax , 0x4c00 ; terminate
int 0x21
CS401
Course | Title | Solution Download Status |
---|---|---|
CS401 | Assembly Language |
Download Now
Uploaded
|
0 Comments