CSE 322 Lab 1

February 12, 2018

Problem #1

mov ah, 01 ; selecting input
 int 21h ;
 mov bl, al ; Copying the input value to bl
 mov ah, 02 ; selecting output mode
 mov dl,0ah ;NEw line
 int 21h ;
 mov dl, 0dh ; Carriage return
 int 21h ;
 
 mov dl, bl ;Print value
 int 21h ;
 

Problem #2

mov ah , 2
mov dl, 'H'
int 21h
mov dl, 'E'
int 21h
mov dl, 'L'
int 21h
mov dl, 'L'
int 21h
mov dl, 'O'
int 21h
mov dl, ' '
int 21h
mov dl, 'W'
int 21h
mov dl, 'O'
int 21h
mov dl, 'R'
int 21h
mov dl, 'L'
int 21h
mov dl, 'D'
int 21h

Problem #3

.model small
.stack 100h
.data
shp db 'Hello world$'
.code
main proc
mov ax, @data
mov ds, ax
lea dx, shp
mov ah, 9h
int 21h
main endp

Problem #4: Case conversion program

mov ah, 1
int 21h

sub al, 20h
mov ah,2
mov dl, al
int 21h

home work
1 uppercase to lowercase conversion
2 subtraction of two number after taking input

Leave a Reply