Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

fil the blank space Worksheet 1 _ if your code To build an assembler project, VS assumes the entry point will be named links to

fil the blank space image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Worksheet 1 _ if your code To build an assembler project, VS assumes the entry point will be named links to C++, or, the entry point will be named if it is stand-alone. Converting MASM source code to an object file requires the use of the comment shouldsay What should a single-line comment tell the reader w h o w a Converting an object file to an executable file requires the use of the What is the sizeof a 10 element array of type word?_Size of a Converting C++ source code to an object file requires the use of the Operation codes, opcodes, and instructions are also known as Maemonic If you need to "hard code" lots of hex numbers in your code, how can you avoid putting the 'h' suffix on all of them? Are MASM variable names case-sensitive? What does "dword ptz"do? attributes to What is the lengthof a 10 element array of type word? What are the MSVS C++ x64 Build Tools for? Most opcodes require one or more_Operands 19 MASM Language Format Your source code will be laid out in a 4-column format. The exact spacing of the columns doesn't matter, so long as you are consistent. There is no indentation of control structures like in other languages. Most lines of code will look like this: LABEL MNEMONIC OPERANDS COMMENT *-Label:-most lines won't need a label, but the rules are much like C++; start with an alpha character and use letters, numbers, and certain special characters, and end with a colon. *Mnemonic (operation code, opcode, instruction) -The language keywords. "Operand(s) - as required by the instruction. Some opcodes have no operands, some have one, two or three operands. "Comment - Anything after a semicolon on a line is treated as a comment. Nearly all lines will be commented for readability. Your comment should explain why you are doing something, not what you are doing. Each source code file should begin with a comment block with your name, the project name, and a brief description of the program: comment- Author: Your Name Project: ICE01 Description: First in-class assignment In general, instruction operands read right to left: label: destination, source comment add rax, subtotal ;add subtotal to the rax register Lexicon of Assembler integer constants are whole numbers with an optional radix (default radix 15 10 or decimal). Integer constants always start with a digit. Examples: 10 (ten decimal), 10b (one oh binary), 2ah or 2Ah (hex), OAF, Offh (hex) .radix 16 changes the default radix to 16. All numbers following this line will default to hex. Integer expressions are formulas that the assembler can compute for you. Sometimes used for readability. Example 3 * (11/3) MOD 16 Real constants are numbers containing a decimal point and stored in IEEE format. The ALU does not use real data directly, but must call a co-processor such as the FPU, SSE, or AVX Character constants are a single character, or one byte. Examples: "A" or 'A' String constants and arrays of characters: 'hello, world', or "Ain't that so!" *Reserved words include Mnemonics (add, sub, mov), Directives (comment, title, .data, .code, PROC), attributes (BYTE, WORD, QWORD, PTR, FAR), operators (+, *./), and symbols (@data) Identifiers (labels and variable names) are not case-sensitive, but can made to be with a command-line switch. Operands include identifiers, registers, and numeric constants Data Directives OFFSET - Similar to the "address of operator in C++. mov rax, OFFSET total ;rax is now a pointer to total mov rbx, (rax] moves total to rbx; "pointers" are not locked to a data type similar to: LEA rsi, array PTR - Overrides the declared size of an operand. mov al, BYTE PTR total the low byte of total is in al mov byte ptr[rax), 100 size otherwise unclear TYPE - Returns the size in bytes of a variable Returns the size in bytes of a variable type qword returns 8 LENGTHOF - Number of elements in an array array word 10 dup(?) lengthof array ;returns 10 SIZEOF-LENGHTOF TYPE array word 10 dup(?) sizeof array ;returns 20

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Master The Art Of Data Storytelling With Visualizations

Authors: Alexander N Donovan

1st Edition

B0CNMD9QRD, 979-8867864248

More Books

Students also viewed these Databases questions