CSE 506 Lab 5

CSE 506 Lab 5

Practise #1 (Eg 6.1)

Write a code to find the greater signed number of the numbers stored in AX and BX

ABC:
mov ah, 1
int 21h
mov bl, al

int 21h
mov bh, al

cmp bl, bh
jG point1
jl point2

point1:
mov ah, 2
mov dl, '>'
int 21h
jmp ABC

point2:
mov ah, 2
mov dl, '<'
int 21h

jmp ABC

Practise #2
Print 80 star using condition

mov cx, 80
point1:
mov ah, 2
mov dl, '*'
int 21h
dec cx
jnz point1

Problem #1
Print 10*10 box with star (*) without using string and using conditions

Practise #3 (eg 6.2)
Replace a number with absolute number

mov ax,0FFFBh

cmp ax, 0
jnl point1
neg ax

point1:

Practise #4 (eg 6.3)
Suppose AL and BL contain extended ASCII characters. Display the one that comes first in the character sequence.

MOV AH,2
CMP AL,BL
JNBE NOT_AL
MOV DL,AL
JMP DISPLAY
NOT_AL:
MOV DL,BL
JMP DISPLAY
DISPLAY:
INT 21h

 

Leave a Reply

Your email address will not be published. Required fields are marked *