Chapter 3
Assembly Language Fundamentals
Assembly Language Programming Exercise
Problem # 4:
Write a program that defines symbolic names for several string literals (characters between quotes). Use each symbolic name in a variable definition.
Solution:
.386
.model flat,stdcall
.stack 4096
ExitProcess PROTO, dwExitCode:DWORD
str1 EQU <"Hadiqa",0>
str2 EQU <"Iqra",0>
str3 EQU <"Aqsa",0>
.data
first BYTE str1
second BYTE str2
third BYTE str3
.code
main PROC
INVOKE ExitProcess,0
main ENDP
END main
.model flat,stdcall
.stack 4096
ExitProcess PROTO, dwExitCode:DWORD
str1 EQU <"Hadiqa",0>
str2 EQU <"Iqra",0>
str3 EQU <"Aqsa",0>
.data
first BYTE str1
second BYTE str2
third BYTE str3
.code
main PROC
INVOKE ExitProcess,0
main ENDP
END main
Let me know in the comment section if you have any question.
Previous Post:
Program for Data Definitions in Assembly Language using Visual Studio
Previous Post:
Program for Data Definitions in Assembly Language using Visual Studio