Machine-Level & Systems Programming - Set 1

The flashcards below were created by user tulipyoursweety on FreezingBlue Flashcards.

  1. What kind of data does the DX data directive have?
    initialized data
  2. What kind of data does the RESX directives have?
    uninitialized data
  3. What is the size in bytes of: B
    byte, 1 byte
  4. What is the size in bytes of: W
    word, 2
  5. What is the size in bytes of: D
    double word, 4
  6. What is the size in bytes of: Q
    quad word, 8
  7. What is the size in bytes of: T
    ten bytes, 10
  8. What does the D in DX directives stand for?
    defined
  9. What does the RES in RESX directives stand for?
    reserved
  10. What is the DX label?
    the name used in the program to refer to that zone of memory. A pointer to the zone of memory i.e. an address
  11. What does the X in DX represent?
    the appropriate letter for the size of the data being declared (B for byte, W for word, etc.)
  12. DX data directive initial value: 
    What is default?
    decimal
  13. DX data directive initial value: 
    What is b
    binary
  14. DX data directive initial value: 
    What is h?
    hexadecimal
  15. DX data directive initial value: 
    What is o?
    octal
  16. DX data directive initial value: 
    What do quotes represent?
    ASCII
  17. What is 'A' in decimal and hexadecimal?
    65d / 41h
  18. What is 'a' in decimal and hexadecimal?
    97d / 61h
  19. In register byte order is what type of Endian?
    big
  20. In-memory byte order is in what type of Endian?
    little
  21. Motorola and IBM processors use(d) what type of Endian?
    Big Endian
  22. Intel/AMD uses what type of Endian?
    little
  23. True/False: Some processors are configurable (either in hardware or in software) to use either type of endianness
    True, e.g. MIPS processor
  24. What datatypes get switched around in little Endian?
    multibyte: w, d, q, t
  25. The RESX directive is very similar to the DX directive, but...
    always specifies the number of memory elements

    • e.g. L20    resw 100
    • 100 uninitialized 2-byte words
    • L20 is a pointer to the first word
  26. What does this operation do:
    add eax, ebx
    eax = eax + ebx

    Register: specifies one of the registers
  27. What does this operation do:
    add eax, [ebx]
    eax = eax + content of memory at address ebx

    Memory: specifies an address in memory
  28. What does this operation do:
    add eax, 2
    eax = eax + 2

    Immediate: specifies a fixed value (i.e. a number)
  29. What does this operation do:
    inc eax
    eax = eax + 1

    implied: not actually encoded in the instruction
  30. What does this operation do:
    mov dest, src
    Moves data from the src location to the dest location
  31. Which of the following is not okay:
    A) mov eax, [ebx]
    B) mov [eax], [ebx]
    C) mov [eax], ebx
    B) mov [eax], [ebx]

    Because at most, one of the operands can be a memory operand. Both operands must be exactly the same size, which is not specified here.
    (this multiple choice question has been scrambled)
  32. what are the 5 size specifiers for moving immediate values to memory?
    byte, word, dword, qword, tword

    move dword [L], 1
  33. How many bytes are moved?
    mov [L1], 1
    Error
  34. How many bytes are moved?
    move byte [L1], 1
    1 byte
  35. How many bytes are moved?
    mov word [L1], 1
    2 bytes
  36. How many bytes are moved?
    mov dword [L1], 1
    4 bytes
  37. How many bytes are moved?
    mov [L1], eax
    4 bytes
  38. How many bytes are moved?
    mov [L1], ax
    2 bytes
  39. How many bytes are moved?
    mov [L1], al
    1 byte
  40. How many bytes are moved?
    mov eax, [L1]
    4 bytes
  41. How many bytes are moved?
    mov ax, [L1]
    2 bytes
  42. How many bytes are moved?
    mov ax, 12
    2 bytes
  43. What does this command do?
    mov eax, [L]
    • - puts the contents of at address L into eax
    • - puts 32-bits of content
  44. What does this command do?
    mov eax, L
    • - puts the address L into eax
    • - Puts the 32-bit address L into eax
  45. What does this command do?
    mov ebx, [eax]
    puts the content at address stored in eax into ebx
  46. What does this command do?
    inc eax
    increases eax by one
  47. What does this command do?
    mov ebx, [eax]
    puts the contents at address stored in eax into ebx
Author:
tulipyoursweety
ID:
315592
Card Set:
Machine-Level & Systems Programming - Set 1
Updated:
2016-02-09 08:40:32
Tags:
Assembly
Folders:
Machine-Level & Systems Programming
Description:
NASM: data and bss
Show Answers: