Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Computer Science: Assembly Language for x86 Processors VS 2017 [C++] Symbolic In

ID: 3886585 • Letter: C

Question

Computer Science: Assembly Language for x86 Processors

VS 2017 [C++]

Symbolic Integer and Text Constants

This is a practice with symbolic constant definitions either using integers or strings. The requirement is as follows:

1. Write a program that defines symbolic names for several string literals

- Define three strings for symbol named like Message1, Message2, etc.

- In the data segment, use each symbolic name to initialize the string variables

- Try to use 0D and 0A, as well as a zero terminator in your definitions

- In the code segment, set a break point and when running in debug, you can watch your string memory

Explanation / Answer

MULTIPLE QUESTIONS ARE POSTED. SO I am answering ONLY FIRST Question.

The Required program is :

INCLUDE masm32includemasm32rt.inc
INCLUDE masm32includeIrvine32.inc
INCLUDELIB masm32libIrvine32.lib
INCLUDE masm32includedebug.inc
INCLUDELIB masm32libdebug.lib
.486

; 486 Architechture
;.model flat, stdcall

.stack 1000h
ExitProcess PROTO, DwErrorCode:DWORD
WriteHex PROTO
Crlf PROTO

;The program that creates symbolic constants for the seven days of the week.
;An array variable is created that uses the symbols as initializers.


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
Call WriteHex
main PROC
inkey

; next console build must be done

INVOKE ExitProcess, 0
main ENDP
END main

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote