You are on page 1of 4

COAL LAB

Ali gohar
215168
Topic
Lab task

Submitted by Ali Gohar

Submitted to Sir Imran


Task 1)
Write a program that defines symbolic constants.
Source code
INCLUDE irvine32.inc
.data
monday=0
tuesday=1
wednesday=2
thursday=3
friday=4
saturday=5
sunday=6
daysArray BYTE
monday ,tuesday ,wednesday ,thursday ,friday ,saturday ,sunday
.code
main PROC
mov eax,0
mov al , [daysarray]
call writedec
mov al , [daysarray+1]
call writedec
mov al , [daysarray+2]
call writedec
mov al , [daysarray+3]
call writedec
mov al , [daysarray+4]
call writedec
mov al , [daysarray+5]
call writedec
mov al , [daysarray+6]
call writedec

exit
main ENDP
END main

Out Put
Task 2)
Write a program that define symbolic names for…

Source code
INCLUDE Irvine32.inc

.data
str1 EQU "First String with variable str1"
str2 EQU "Second String with variable str2"
str3 EQU "Third String with variable str3"
first byte str1,0ah
second byte str2,0ah
third byte str3,0ah

.code

main PROC

mov edx, OFFSET first


call WriteString
exit
main ENDP
end main
Out put

You might also like