New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

Week1 CH3 Notes MASM Basics

by: Tiffani Friesendorf

Week1 CH3 Notes MASM Basics CS 271

Marketplace > Oregon State University > CS 271 > Week1 CH3 Notes MASM Basics
Tiffani Friesendorf
GPA 3.8

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Chapter 3 outline (Sections 3.1, 3.2, 3.3 (p71 only), 3.4, 3.5 Assembly Language Fundamentals (MASM Specific)
Computer Architecture and Assembly Language
Stephen Redfield
Class Notes
Assembly, MASM, literals, Integer, Radix, character, string, MOV, add, Sub, MUL, JMP, Call, operand, NOP, .MODEL, .STACK, .CODE, ENDP, end, Assembler, Byte, SBYTE, Word, SWORD, DWORD, SDWORD, FWORD, QWORD, TBYTE, REAL4, REAL8, REAL10, DB, DW, dd, DQ, DT, DUP, bcd, data structures, data, FLD, floating-point, code, EQU, TEXTEQU
25 ?




Popular in Computer Architecture and Assembly Language

Popular in Department

This 14 page Class Notes was uploaded by Tiffani Friesendorf on Saturday October 1, 2016. The Class Notes belongs to CS 271 at Oregon State University taught by Stephen Redfield in Fall 2016. Since its upload, it has received 2 views.


Reviews for Week1 CH3 Notes MASM Basics


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 10/01/16
Chapter 3Assembly Language Fundamentals (MASM Specific) 3.1 Microsoft syntax notation: • [ …] optional elements. • {…} require a choice of one of the elements. Basic Language Elements • Comments always begin with a semi-colon ; • Size keywords: Work like data types, but any type of data can be used. ◦ Limits size of variable, not type. • Segments: designated areas. ◦ .code ◦ .data ◦ .stack Integer Literals • Integer literal (integer constant): made up of: ◦ (optional) leading sign. ◦ one or more digits. ◦ (optional) radix character. ▪ indicates the number’s base. ◦ [{+ | -}] digits [radix] • If no radix, assume it is in decimal form. • Radix values: ◦ h : hexadecimal ▪ Hexadecimal literals beginning with a letter must have a leading zero to prevent the assembler from interpreting it as an identifier. ◦ q/o : octal ◦ d : decimal ◦ b : binary ◦ r : encoded real ◦ t : decimal (alternate) ◦ y : binary (alternate) Constant Integer Expressions • Constant Integer Expression:Amathematical expression involving integer literals and arithmetic operators. ◦ Each expression must evaluate to an integer, which can be stored in 32 bits. • Arithmetic operators (in order of precedence) ◦ ( ) Parentheses ◦ +, - Unary positive, negative ◦ *, / Multiply, divide ◦ MOD Modulus ◦ +, -Add, subtract Real Number Literals • Real number literal (floating-point literal): represented as either decimal reals or encoded (hexadecimal) reals. ◦ Decimal real: ▪ (optional) sign • {+ , -} ▪ integer ▪ decimal point ▪ (optional) integer that expresses a fraction ▪ (optional) exponent • E [{+ , -}] integer ▪ [sign] integer . [integer] [exponent] • At least one digit and decimal are required. ◦ Encoded real: ▪ Uses IEEE floating-point format for short reals. Character Literals • Character literal:Asingle character enclosed in single or double quotes. ◦ Assembler stores the value in memory as the character’s binaryASCII code. String Literals • String Literal: a sequence of characters (including spaces) enclosed in single or double quotes. ◦ Embedded quotes: ▪ “This isn’t a great test” ▪ ‘Say “Good Night,” Gracie’ ◦ Stored as sequences of integer byte values. ▪ “ABCD” = 41h, 42h, 43h, 44h. Reserved Words • Reserved words: Words with a special meaning and can only be used in their correct context. ◦ Note case sensitive. ◦ AppendixAin book has a complete list of the reserved words. ◦ Types: ▪ Instruction mnemonics: • MOV • ADD • MUL ▪ Register names ▪ Directives: Tell the assembler how to assemble programs. ▪ Attributes: Provide size and usage information for variables and operands. • BYTE • WORD ▪ Operators: Used in constant expressions. ▪ Predefined symbols: Return constant integer values at assembly time. • @data. Identifiers • Identifier: Programmer-chosen name. Can identify a variable, constant, procedure, or a code label. ◦ Rules on how they can be formed: ▪ Contain between 1 and 247 characters. ▪ Not case sensitive. • Can make all keywords and identifiers case sensitive by adding the -Cp command line switch when running the assembler. ▪ First character must be a letter, underscore _, @, ?, or $. • Subsequent characters may also be digits. • Good idea to avoid _ and @ as leading characters as they are used by the assembler and high level language compilers. ▪ Cannot be the same as an assembler reserved word. • Good idea to use descriptive names for identifiers. Directives • Directive:Acommand embedded in the source code that is recognized and acted upon by the assembler. • Do not execute at runtime. • Let you define variables, macros, and procedures. • Can assign names to memory segments and perform other housekeeping tasks related to the assembler. • Not case sensitive. • AppendixAcontains a reference for directives and operators. • Defining segments:An important function of assembler directives. ◦ .data: Used to define variables. ◦ .code: Identifies the area of a program containing executable instructions. ◦ .stack: Identifies the are of a program holding the runtime stack, setting its size. Instructions • Instruction:Astatement that becomes executable when a program is assembled. ◦ Translated by the assembler into machine language bytes, which are loaded and executed by the CPU at runtime. • Parts of an instruction: ◦ (optional) Label ▪ Identifier that acts as a place marker for instructions and data. • Placed before an instruction implies the instruction’s address. • Placed just before a variable implies the variable’s address. ▪ Two types of labels: • Data label: Identifies the location of a variable, providing a convenient way to reference the variable in code. ◦ count DWORD 100 ▪ Label defines a variable named count. ◦ The assembler assigns the numeric address to each label. ▪ It is possible to define multiple data items following a label. • array DWORD 1024, 2048 DWORD 4096, 8192 ◦ Defines the location of the first number 1024, the rest immediately follow. • Code label: Used as targets of jumping and looping instructions. ◦ Must end with a colon : ◦ JMP (jump) instruction transfers control to the location marked by the label named target, creating a loop: ▪ target: mov ax, bx ... jmp target ▪ Can share the same line with an instruction, or be on a line by itself. ◦ (required) Instruction mnemonic ◦ (usually required) Operand(s) ◦ (Optional) Comments ◦ [label:] mnemonic [operands] [;comment] • Label names follow the same rules as identifiers • The same code label can be used multiple times in a program as long as each label is unique within its enclosing procedure. Instruction Mnemonic • Instruction mnemonic:Ashort word that identifies an instruction. ◦ Instruction mnemonics: ▪ MOV: Move (assign) one value to another. ▪ ADD:Add two values. ▪ SUB: Subtract one value from another. ▪ MUL: Multiply two values. ▪ JMP: Jump to a new location. ▪ CALL: Call a procedure. Operands • Operand:Avalue that is used for input or output of an instruction. ◦ Assembly language instructions can have between 0 to 3 operands, each of which can be a register, memory operand, integer expression, or input-output port. • Ways to create memory operands: ◦ Using variable names. ◦ Registers surrounded by brackets. • Sample operands: ◦ 96 : Integer literal. ◦ 2 + 4 : Integer expression. ◦ eax : Register. ◦ count : Memory. • Examples of instructions: ◦ No operands: ▪ stc ; set Carry flag ◦ One operand with INC: ▪ inc eax; add 1 to EAX ◦ Two operands with instruction MOV: ▪ mov count, ebx ; move EBX to count ◦ Three operands with IMUL instruction: ▪ imul eax, ebx, 5 ; EBX is multiplied by 5, moved to EAX • Natural ordering to operands: ◦ First operand: Destination operand. ▪ generally modified by the instruction. • ex: in MOV instruction, data is copied from the source to the destination. ◦ Second & third: Source operand. Comments • Info usually included at the top of a program listing: ◦ Description of the program’s purpose. ◦ Names of persons who created and/or revised the program. ◦ Program creation and revision dates. ◦ Technical notes about the program’s implementation. • Comments can be specified in two ways: ◦ Single line comments: ▪ Begin with a semicolon ; • Everything after on that line ignored by assembler. ◦ Block comments: ▪ Begin with the COMMENT directive and a user specified symbol. • All subsequent info ignored by assembler until the symbol is used again. The NOP (No Operation) Instructions • Safest, and most useless, instruction. • Takes up 1 byte of program storage and doesn’t do any work. • Sometimes used by compilers and assemblers to align code to efficient address boundaries. 3.2 Prototype: function name, PROTO keyword, a comma, a list of input parameters. ExitProcess function: a standard Windows service. • Prototype for ExitProcess: ExitProcess PROTO, dwExitCode:DWORD ◦ Input parameter: dwExitCode ▪ Think of as a return value passed back to the Windows operating system. • Areturn value of 0 usually means it was successful. • Any other number is the error code number. Review ofAssembler Directives • .MODEL: Tells assembler which memory model to use. ◦ Ex: .model flat,stdcall ◦ In 32-bit programs, always use a flat model. ▪ Flat model associated with protected mode. ◦ stdcall keyword: Tells assembler how to manage the runtime stack when procedures are called. • .STACK: Tells assembler how many bytes of memory to reserve for the program’s runtime stack. ◦ Ex: .stack 4096 ▪ 4096 is likely more than we will ever use, but corresponds to the size of a memory page in the processor’s system for managing memory. ◦ All modern programs use a stack when calling subroutines. • First, to hold passed parameters. • Second, to hold the address of the code that caled the function. ◦ CPU uses this address to return when the function call finishes. ◦ Runtime stack can hold local variables. • .CODE: Marks the beginning of the code area of a program. ◦ Usually the next line after .CODE is the declaration of the program’s entry point. ▪ Usually named main. ▪ Ex: .code main PROC • ENDP: Marks the end of a procedure. ◦ References the entry point. ▪ Ex: main ENDP • END: Marks the end of a program. ◦ References the entry point. ▪ Ex: END main ◦ If you add any ore lines to a program after END directive, assembler will ignore them. Debugging Step Over command • In Visual Studio either F10 or Shift+F8 Break Point • Set a breakpoint, then select Start Debugging ◦ If you try to set a breakpoint on a non-executable line, VS will move it forward to the next executable line. ◦ Debugger pauses at break points. ◦ After stepping through the indicated area, either choose Continue or Stop Debugging. Customize Debugging Interface • You can customize the debugging interface while it is running. ◦ Can display and close windows as needed. ◦ To display the CPU registers, Select Windows from the debug menu, then select Registers. ▪ Right click the Registers window and select Flags from pop-up menu to display individual flags. ▪ As you step through the program, any register whose value has changed by the current instruction will turn red. • has a debugging tutorial if needed. • Add a watch window: ◦ Select Windows from Debug menu ◦ Select Watch ◦ Select one of the choices ◦ Highlight a variable and drag it to the watch window. Program Template • Assembly language programs have a simple structure with small variations. Saving time by using a template is helpful. 3.3 Assembling, Linking, and Running Programs • Assembler is similar to a compiler. ◦ Object file: File produced by the assembler containing machine language. ▪ Not quite ready to execute. ▪ Must be passed to another program called a linker, which produces an executable file. TheAssemble-Link-Execute Cycle • Step 1:Aprogrammer uses a text editor to create anASCII text file named the source file. • Step 2: The assembler reads the source file and produces an object file, a machine-language translation of the program. ◦ Optionally, it produces a listing file. ◦ If any errors occur, the programmer must return to Step 1 and fix the program. • Step 3: The linker reads the object file and checks to see if the program contains any calls to procedures in a link library. The linker copies any required procedures from the link library, combines them with the object file, and produces the executable file. • Step 4: The operating system loader utility reads the executable file into memory and branches the CPU to the program’s starting address, and the program begins to execute. • Detailed instructions for assembling, linking, and running assembly on VS at 3.4 Intrinsic Data Types • Intrinsic data types: Describes types in terms of: ◦ Size. ◦ Whether they are signed. ◦ Whether they are integers or reals. • There is overlap of these types: ◦ DWORD (32-bit, unsigned) is interchangeable with SDWORD (32-bit, signed) ▪ Programmers use SDWORD to communicate that a value will be signed, but the assembler doesn’t enforce this. • Assembler only evaluates the size of operands. ◦ Intrinsic Data Types: ▪ BYTE (B): 8bit unsigned integer. ▪ SBYTE (S): 8bit signed int. ▪ WORD: 16bit unsigned int. ▪ SWORD: 16bit signed int. ▪ DWORD (D): 32bit unsigned integer. ▪ SDWORD (SD): 32bit signed int. ▪ FWORD: 48bit integer (Far pointer in protected mode) ▪ QWORD (Q): 64bit integer. ▪ TBYTE (T): 80bit (10 byte) int. ▪ REAL4: 32bit IEEE short real. ▪ REAL8: 64bit IEEE long real. ▪ REAL10: 80bit IEEE extended real. Data definition Statement • Data definition statement: Sets aside storage in memory for a variable. ◦ Creates variables based on intrinsic data types. ◦ Syntax: [name] directive initializer [,initializer]. . . ▪ Ex: count DWORD 12345 • Name: The optional name assigned to available must conform to the rules for identifiers. • Directive: Can be any intrinsic data types, or any legacy data definition directives. ◦ Legacy Data Definitions Directives: ▪ DB: 8bit int. ▪ DW: 16bit int. ▪ DD: 32bit int or real. ▪ DQ: 64 bit int or real. ▪ DT: define 80bit int. • Initializer ◦ At least one initializer is required, even if it is zero.” ◦ Addtl. initializers separated by commas. ◦ For int data types, initializer is an int literal or int expression matching the size of the variable’s type. ◦ If you leave the variable uninitialized (assigned a random value), ? can be used as the initializer. ◦ All initializers, regardless of format, are converted to binary data by the assembler. Defining BYTE and SBYTE Data • These directives allocate storage for one or more values. • Each initializer must fit into 8 bits of storage. ◦ Ex: ▪ value1 BYTE ‘A’ ; character literal ▪ value2 BYTE 0 ; smallest unsigned byte ▪ value3 BYTE 255 ; largest unsigned byte ▪ value4 SBYTE -128 ; smallest signed byte ▪ value5 SBYTE +127 ; largest signed byte • A? initializer leaves the variable uninitialized, implying that it will be assigned a value at runtime. ◦ Ex: value6 BYTE ? Multiple Initializers • If multiple initializers are used in the same data definition, its label refers only to the offset of the first initializer. (storage like an array) ◦ EX: list BYTE 10, 20, 30, 40 ▪ Each stored in their own byte in order. • Not all initializers require labels. ◦ EX: list BYTE 10, 20, 30, 40 BYTE 50, 60, 70, 80 BYTE 81, 82, 83, 84 • With single data definition, its initializers can use different radixes. Characters and string literals can be freely mixed. ◦ Ex: These both have the same contents: ▪ list1 BYTE 10, 32, 41h, 00100010b ▪ list2 BYTE 0Ah, 20h, ‘A’, 22h Defining strings • To define a string of characters, enclose them in single or double quotation marks. • null-terminated string: Most common type of string. ◦ Ends with a null byte (containing 0) ◦ Ex: ▪ greeting1 BYTE “Good afternoon” , 0 ▪ greeting2 BYTE ‘Good night’, 0 • Each character uses a byte of storage. • Strings can be divided between multiple lines without having to supply a label for each line. ◦ Ex: greeting1 BYTE “Welcome to the encryption demo program” BYTE “created by Kip Irvine.”, 0dh, 0ah BYTE “If you wish to modify this program, please “ BYTE “send me a copy.”, 0dh, 0ah, 0 • End-of-line characters: Hexadecimal codes 0Dh and 0Ah are called CR/LF (carriage-return line-feed) ◦ When written in standard output, they move the cursor to the left column of the line following the current line. • Line continuation character (\): concatenates two source code lines into a single statement. ◦ It must be the last character on the line. ◦ These two statements are equivalents: • greeting1 BYTE “Welcome to the Encryption Demo program” • greeting1 \ BYTE “Welcome to the Encryption Demo program” DUP Operator • DUP Operator:Allocates storage for multiple data items, using an integer expression as a counter. ◦ Particularly useful when allocating space for a string or array. ◦ Can be used with initialized or uninitialized data. ◦ Ex: ▪ BYTE 20 DUP(0) ; 20 bytes, all equal to 0 ▪ BYTE 20 DUP(?) ; 20 bytes, uninitialized ▪ BYTE 4 DUP (“STACK”) ; 20 bytes: “STACKSTACKSTACKSTACK” Defining WORD and SWORD Data • Create storage for one or more 16bit integers. ◦ word1 WORD 65535 ;largest unsigned value ◦ word2 SWORD -32768 ; smallest signed value ◦ word3 WORD ? ; uninitialized unsigned • Legacy DW directive versions: ◦ val1 DW 65535 ; unsigned ◦ val2 DW -32768 ; signed • Array of 16bit Words ◦ Create an array of words by listing the elements using the DUP operator. ▪ Array of a list of values: • mylist WORD 1, 2, 3, 4, 5 ◦ Convenient way to declare an array: ▪ array WORD 5 DUP(?) ; 5 values, uninitialized Defining DWORD and SDWORD Data • Create storage for one or more 32-bit integers: ◦ val1 DWORD 12345678h ; unsigned ◦ val2 SDWORD -2147483648 ; signed ◦ val3 DWORD 20 DUP (?) ;unsigned array • DWORD can be used to declare a variable that contains the 32bit offset of another variable. ◦ pVal DWORD val3 ▪ pVal contains the offset of val3 • Array of 32bit doublewords: Create an array of doublewords by explicitly initializing each value: ◦ myList DWORD 1,2,3,4,5 Defining QWORD Data • Allocates storage for 64-bit values. ◦ quad1 QWORD 12345678h • The legacy DQ directive version: ◦ quad1 DQ 12345678h Defining Packed BCD (TBYTE) Data • Intel stores binary coded decimal (BCD) integers in a 10-byte package. ◦ Each byte (except the highest) contains 2 decimal digits. • MASM uses the TBYTE directive to declare packed BCD variables. ◦ Constant initializers must be in hexadecimal because the assembler does not auto translate decimal initializers in BCD ◦ These examples demonstrate both valid and invalid ways of representing the decimal -1234: ▪ intVal TBYTE 8000000000001234h (guessed on amount of zeros) ; valid ▪ intVal TBYTE -1234 ; invalid • Invalid because MASM encodes the constant as a binary integer rather than a packed BCD integer. • To encode a real number as packed BCD, first load it onto the floating-point register stack with the FLD instruction and then use the FBSTP instruction to convert it to packed BCD. ◦ This rounds it to the nearest integer: ▪ .data posVal REALS 1.5 bcdVal TBYTE ? .code fld posVal ; load onto floating-point stack fbstp bcdVal ; rounds up to 2 as packed BCD • is posVal were equal to 1.5, the resulting BCD value would be 2. Defining Floating-Point Types • REAL4 defines a 4byte single-precision floating point variable. • REAL8 → 8byte double-precision value • REAL10 → 10byte extended precision value. ◦ Each requires one or more real constant initializers: ▪ rVal1 REAL4 -1.2 ▪ rVal2 REAL8 3.2E-260 ▪ rVal3 REAL10 4.6E+4096 ▪ ShortArray REAL4 20 DUP (0.0) • Standard real types in terms of their min number of significant digits: ◦ Short real: 6 significant digits ◦ Long real: 15 significant digits ◦ Extended-precision real: 19 sig digits. • DD, DQ, and DT directives can also define real numbers: ◦ rVal1 DD -1.2 ; short real ◦ rVal2 DQ 3.2E-260 ; long real ◦ rVal3 DT 4.6E+4096 : extended-precision real Little-Endian Order • Little-endian order: low to high. • x86 processors store and retrieve data in this order. • The least significant byte is stored at the first memory address allocated for data. ◦ Remaining bytes are stored in the next consecutive memory positions. ▪ Ex: 12345678h: 78h stored in first byte, 56h in second byte, etc etc. • Other systems store in big-endian order (high to low) Declaring Uninitialized Data • .DATA? directive declares uninitialized data. • When defining a large block of uninitialized data, .DATA? reduces the size of a compiled program. ◦ Ex: Declared efficiently: ▪ .data smallArray DWORD 10 DUP(0) ; 40 bytes .data? bigArray DWORD 5000 DUP(?) ; 20,000 bytes, not initialized ◦ This code produces a compiled program 20,000 bytes larger: ▪ .data smallArray DWORD 10 DUP(0) ; 40 bytes bigArray DWORD 5000 DUP(?) ; 20,000 bytes Mixing Code and Data • The assembler lets you switch back and forth between code and data in your program. ◦ Ex: Declaring a variable used only within a localized area of a program. ▪ This inserts a variable named temp between two code statements: • .code mov eax, ebx .data temp DWORD ? .code mov temp, eax . . . ◦ MASM places temp in the data segment, separate from the segment holding compiled code. ▪ This can cause a program to become hard to read. 3.5 Symbolic Constants • Symbolic constant (symbol definition): Created by associating an identifier (a symbol) with an integer expression or some text. • Symbols do not reserve storage. • Only used by the assembler when scanning a program, and cannot change at runtime. Equal Sign Directive • Equal sign directive:Associates a symbol name with an integer expression. ◦ name = expression ▪ When a program is assembled, all occurrences of name are replaced by expression during the assembler’s processor step. • Suppose this statement occurs near the beginning of a source code file: ◦ COUNT = 500 • Also, the following statement is found 10 lines later: ◦ mov eax, COUNT • When the file is assembled, MASM will scan the source file and produce: ◦ mov eax, 500 Why Use Symbols? • Programs are easier to read and maintain when symbols are used. Current Location Counter • Current Location Counter ($) Keyboard Definitions • Programs often define symbols that identify commonly used numeric key-board codes. • Astatement is more self-describing if it uses the symbol rather than an integer literal (ASCII code) ◦ mov al, Esc_key ; good style ◦ mov al, 27 ; poor style Using the DUP Operators • The counter used by DUP should be a symbolic constant, to simplify program maintenance. ◦ If COUNT has been defined, it can be used in this data definition: ▪ array dword COUNT DUP (0) Redefinitions • Asymbol defined with = can be redefined within the same program. ◦ Shows how the assembler evaluates COUNT as it changes value: ▪ COUNT = 5 mov al, COUNT ;AL = 5 COUNT = 10 mov al, COUNT ;AL = 10 COUNT = 100 mov al, COUNT ;AL = 100 Calculating the Sizes of Arrays and Strings • Explicitly stating an array’s size can lead to a programming error, particularly if you should later insert or remove array elements. • Better to let assembler calculate it for you. • $ operator returns the offset associated with the current program statement. ◦ ListSize is calculated by subtracting the offset of list from the current location counter: ▪ list BYTE 10, 20, 30, 40 ListSize = ($ - list) ◦ Instead of calculating the length of a string manually: ▪ myString BYTE “This is a long string, containing” BYTE “any number of characters” myString_len = ($ - myString) Arrays of Words with DoubleWords • When calculating the number of elements in an array containing values other than bytes, always divide the total array size (in bytes) by the size of the individual array elements. ◦ Ex: ▪ list WORD 1000h, 2000h, 3000h, 4000h ListSize = ($ - list) /2 EQU Directive • EQU directive: associates a symbolic name with an integer expression or arbitrary text. • Three formats: ◦ name EQU expression ▪ Must be a valid integer expression. ◦ name EQU symbol ▪ Existing symbol name, already defined with = or EQU ◦ name EQU <text> ▪ Any text may appear within brackets <...> ▪ Useful for defining a value that does not evaluate into an integer. • Ex: PI EQU <3.1416> ▪ Associate a symbol with a character string: • pressKey EQU < “Press any key to continue. . .”, 0 > . . .data prompt BYTE pressKey • Any symbol defined with EQU cannot be redefined withing the same source code file. ◦ Keeps symbols from accidentally being assigned a new value. TEXTEQU Directive • TEXTEQU directive: Creates a text macro. • Asymbol defined by TEXTEQU can be redefined at any time. • Text macros can build on each other. • 3 different formats ◦ name TEXTEQU <text> ▪ Assigns text. ▪ Ex: • continueMSG TEXTEQU < “Do you wish to continue?”> .data prompt1 BYTE continueMsg ◦ name TEXTEQU textmacro ▪ Assigns the contents of an existing text macro. ▪ rowSize = 5 count TEXTEQU %(rowSize * 2) move TEXTEQU <mov> setupALTEXTEQU <move al, count> • count is set to an int expression involving rowSize. • Symbol move is defined as mov. • setupAL is build from move and count. ◦ setupAL is assembled as : ▪ mov al, 10 ◦ name TEXTEQU %constExpr ▪ Assigns a constant integer expression.


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Jennifer McGill UCSF Med School

"Selling my MCAT study guides and notes has been a great source of side revenue while I'm in school. Some months I'm making over $500! Plus, it makes me happy knowing that I'm helping future med students with their MCAT."

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Parker Thompson 500 Startups

"It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.