COE 308 - Storage - Sets aside storage in memory for a...

Info icon This preview shows pages 1–2. Sign up to view the full content.

Sets aside storage in memory for a variable May optionally assign a name (label) to the data Syntax: [ name: ] directive initializer [, initializer ] . . . .BYTE DirectiveStores the list of values as 8-bit bytes .HALF DirectiveStores the list as 16-bit values aligned on half-word boundary .WORD DirectiveStores the list as 32-bit values aligned on a word boundary .FLOAT DirectiveStores the listed values as single-precision floating point .DOUBLE DirectiveStores the listed values as double-precision floating point .ASCII DirectiveAllocates a sequence of bytes for an ASCII string .ASCIIZ DirectiveSame as .ASCII directive, but adds a NULL char at end of string Strings are null-terminated, as in the C programming
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: language .SPACE DirectiveAllocates space of n uninitialized bytes in the data segment .DATA var1: .BYTE var2: .HALF var3: .WORD var4: .FLOAT var5: .DOUBLE 1.5e-10 str1: .ASCII str2: .ASCIIZ array: .SPACE "A String\n" "NULL Terminated String" 100 'A', 'E', 127, -1, '\n'-10, 0xffff 0x12345678 12.3, -0.1 Memory is viewed as an array of bytes with addresses Byte Addressing: address points to a byte in memory Words occupy 4 consecutive bytes in memory MIPS instructions and integers occupy 4 bytes Alignment: address is a multiple of size Word address should be a multiple of 4 Least significant 2 bits of address should be 00 Halfword address should be a multiple of 2 .ALIGN n directive...
View Full Document

  • Fall '08
  • MuhamedMudawar
  • ASCII, null character

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern