You are on page 1of 3

National University of Technology

Computer Science Department


Semester Spring – 2023
LAB – 10
Course: COAL LAB
Course code: CS4604

Submitted to: Submitted by:


Name: Dr. Daud Sultan Name: Muhammad Saad Ahmed

Reg. No: F21605037


CS Department
TASK # 1: Write a program that will find maximum number in the given array.
CODE:
TITLE Write a program that will find minimum number in the given array.
; MUHAMMAD SAAD AHMED
; F21605037
; CS 21

.686
.MODEL flat, stdcall
.STACK
INCLUDE Irvine32.inc
.data
str1 BYTE "Smallest number is: ",0
arr BYTE 99d,10d,60d,20d,50d,30d,90d,90d,40d
.code
main PROC
MOV ecx, lengthOf arr
MOVZX eax, arr
l1:
cmp arr[ecx],al
JNA label1
JB label2
label1:
MOVZX eax,arr[ecx]
label2:
loop l1
lea edx,str1
call writeString

call writeDec

exit
main ENDP
END main
SCREENSHOT:

You might also like