Ththhd Dffj Fnejf Fjefe F Efifme

Topics: Processor register, X86, Central processing unit Pages: 5 (1020 words) Published: June 19, 2013
QUESTION 1:

Convert 111001101110112 to Hexadecimal

They are 14 digits altogether, Grouping them into four's

we have:

00112 / 10012 / 10112 / 10112

Table: A-1010, B-1011, C-1100, D-1101, E-1110, F-1111

00112 --- 3 (Conversion to Hex)
10012 --- 9 (Conversion to Hex)

111001101110112 = 3 9 B B h

Conversion of the above: 11100110111011
Conversion to Base 10
1*2 13 + 1*2 12 + 1*2 11+ 0*2 10 + 0*2 9+ 1*2 8+ 1*2 7+ 0*2 6+ 1*2 5+ 1*2 4+ 1*2 3+ 0*2 2+ 1*2 1 + 1*20 = 1 4 7 7 910

Conversion to Base 16 , Hexadecimal

1 4 7 7 9 | 1 6 | Remainder |
9 2 3 | 16 | 11 |
57 | 16 | 11 |
3 | 16 | 9 |
| 0 | 3 |

= 3 9 11 11 16 OR 3 9 B B h

QUESTION 2:
Write a short note on record representation and array representation :

An array:
is a collection of data types whose members are all the same type. The base addresses of the first element on the array and always appears in the lowest memory location.

The second array element directly follows the first in memory; and so on. However, it is not important that the indices start at zero; they may start with any number as long as they may start with any number as long as they are contiguous.

Record representation:
Just like record representation in other programming language like Pascal which support the use of different sized field item. The same record is implemented in assembly language by first defining its composition then creates the record which has the composition of the previous record definition. Each field of record is accessed by a similar method as to that of any other language like Pascal access the left field of the record.

QUESTION 3:
How will you assemble your code in MASM?

Steps:
Install the MASM software on your pc
Use notepad as text editor
Type your assembly code on the text editor and save it in the “\bin” directory of the *.asm. For example type the following code and save it as C:\MASM615\BIN\TEST.ASM To assemble (execute) the program start by opening the command prompt Using the change directory (cd command), change the directory to the MASM615 working environment Use the following command to assemble your program make “test” remember test is the file name that we have saved before you will have something like Microsoft® overlay linker version 3.64 copyright © Microsoft corp 1983, 1988 all right reserved. Run file [c:\ test.exe] Press enter

List file [mul.map] press enter
Libraries [LIB] press enter
Now to run your program simply enter its name “test” you would now see your output on the command prompt window.

QUESTION 4:

Discuss the 8086 register?
8086 registers are divided into
general registers
pointers
segments
instructions
flag
Index registers.
GENERAL PURPOSE REGISTERS: These are registers used for storing, working data. Accumulator register AX: This register is used in specific instructions involving multiplication and division, I/O and string manipulation. Base register BX: This register is frequently used to hold address value when accessing memory. Counter register CX: this register holds the count index during loop operation or in specifying the number of characters in a string. Data register DX: the register is use as an index for I/O port functions. It is use for 16 by 16 bit multiplication and 32 by 16 bit divide instruction This registers has their respective 8bits registers AL & Ah, BL&BH, CL&CH, and DL&DH. POINTERS

This comprises of the Base pointer (BP) and stack pointer (SP) the base pointer is more or less like the BX register. It is generally used to access parameter and local variables in a procedure while the stack pointer is responsible for holding offset value for the stack in some instruction. SEGMENT REGISTER

This are use specifically for referencing memory locations the memory...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • F Essay
  • ;alkfjds;f Essay
  • f and b Research Paper
  • Essay about F&N
  • Ethics F Essay
  • Take The F Essay
  • Appendix F Essay
  • Essay on Ethics of a&F

Become a StudyMode Member

Sign Up - It's Free