2. Program for Symbolic Integer Constants in Assembly Language using Visual Studio

Chapter 3

 Assembly Language Fundamentals

Assembly Language Programming Exercise

Problem # 2:

Write a program that defines symbolic constants for all seven days of the week. Create an array variable that uses the symbols as initializers.

Solution:

.386
.model flat,stdcall
.stack 4096
ExitProcess PROTO, dwExitCode:DWORD

SUN = 0
MON = 1
TUE = 2
WED = 3
THU = 4
FRI = 5
SAT = 6

.data
daysArray BYTE SUN,MON,TUE,WED,THU,FRI,SAT

.code
main PROC

INVOKE ExitProcess,0
main ENDP
END main