...Addressing Modes The way the operands are chosen during program execution is dependent on the addressing mode of the instructions. The addressing mode specifies a rule for interpreting or modifying the address field of the instruction before the operand is actually referenced. Computers use addressing mode techniques for the purpose of accommodating one or both of the following provisions: 1 Addressing Modes Computers use addressing mode techniques for the purpose of accommodating one or both of the following provisions: 1. 2. to give programming versatility to the user by providing such facilities as pointers to memory, counters for loop control, indexing of data and program relocation. To reduce the number of bits in the addressing field of the instruction. 2 Addressing Modes Immediate Direct Indirect Register Register Indirect Displacement (Indexed) Stack 3 Immediate Addressing Operand is part of instruction Operand = address field e.g. ADD 5 Add 5 to contents of accumulator 5 is operand No memory reference to fetch data Fast Limited range 4 Immediate Addressing Diagram Instruction Opcode Operand 5 Direct Addressing Address field contains address of operand Effective address (EA) = address field (A) e.g. ADD A Add contents of cell A to accumulator Look in memory at address A for operand Single memory reference to access data No additional calculations to work out effective address Limited address space 6 Direct Addressing...
Words: 595 - Pages: 3
...A telephone network is a telecommunication network used for telephone calls between two or more people (www.wikipedia.com ). In the olden days telephones were connected directly to each other, they had to have a direct link to a particular person they would like to keep in touch with. For example, say they are four people, namely A, B, C and D, and this people are friends who would like to keep in touch with each other, so what would happen is, A would have a direct link to B, C and D and in order for B to keep in touch with C he would also need a direct link to C, which means a special telephone for each person, in that case A would have 3 different phones linking to each friend. All this changed ever since the invention of telephone exchange happened. A telephone exchange network is a telecommunication system used in the public switched telephone network. There are two main types of telephone exchange namely, manual service exchange and automatic exchange. With manual service, the customer calls the operator to connect the call to the third party, and this is only possible if the number is in the same central office and on the operators switchboard, if it is not, the operator plugs it into the trunk for the destination switchboard and asks the operator that answers to connect the call, but if the number is in the same central office the operator plugs the ringing cord into the jack of the switchboard. With the automatic exchange service, the caller dials a destination telephone...
Words: 594 - Pages: 3
...General Objective: To know and understand the addressing mode and programming. Specific Objectives: At the end of the unit you should be able to: 4.1 classify and describe the addressing modes 4.2 explain the concept of programming 4.3 discuss the implementation structure of programming 0. INTRODUCTION Programming is a process of composing several instructions to perform certain tasks. The product of the programming is called a program which contains several instructions. The skill of programming is to know the best or optimum composition of selective instructions to performs the required tasks. In other words, we may classify these skills into uniform concepts as structure of programming implementation. These structure shall bear the emphasis to: • what instructions (selectable from a complete list of instructions as a tools list) essential and best to perform a certain task; • how these instructions are organized into a sub program which can be reused or recalled as many times as possible to perform the identical task with different set of data; • to preserve the minimum lines of instruction but performs the maximum tasks. The less instruction lines require less operating times, thus expetite the implementation speed. The main proccess of program (instructions) implementation is nothing else just the manipulation of data. We need to know how to identify the source of data, procedure to fetch these...
Words: 9907 - Pages: 40
...Assignment 4.1 Chapter 5 pg 135-138 2. Identify the addressing mode for each of the following? (A) MOV B,#34H IMMEDIATE (B) MOV A 50H DIRECT (C) MOV R2,07 REGISTER MODE (D) R3,#0 IMMEDIATE (E) MOV R7,0 REGISTER MODE (F) MOV R6,#7FH IMMIDIATE (G) MOV R0,A REGISTER MODE (H) MOV B,A (I) MOV A,@R0 INDIRECT MODE (J) MOV R7,A REGISTER MODE (K) MOV A,@R1 INDIRECT MODE 9. Which register are allowed to be used for indicated addressing mode when accessing data in RAM? 20. Write a program to generate a square wave with 75% duty cycle on bit P1.5. 29. What bit addresses are assigned to the TCON register? 88H 30. What bit address are assigned to register A? 0E0H 31. What bit address are assigned to resister B? 0F0H 45. The byte address assigned to the SFR are REGISTERS to ADDRESSES 61. What addressing mode is used to access the upper 128 bytes of RAM in the 8052? DIRECT MODE 66. Which registers can be used to access the upper 128 bytes of RAM in the 8052? Chapter 6 pg. 174-178 1) a) AC=1 and CY= 0 b) AC= 2 and CY= 2 c) AC=0 and CY= 0 d) AC= 2 and CY= 1 e) AC=0 and CY=0 f) CY=1 and AC=1 9. Write a program to add 897F9AH to 34BC48H and save the result in RAM memory locations stating at 40H. CLR C MOV 12. Show how to perform 77 x 34 in the 8051. 77 x 34 in 8051 = MOV A, #77 MOV B, #34 MUL AB 13. Show how to perform 77 / 3 in the 8051. 77/3 in 8051 = MOV A, #77 MOV B, #3 DIV AB 14. True or False. The MUL and DIV instructions work on an...
Words: 446 - Pages: 2
...Assembly Language Tutorial (x86) For more detailed information about the architecture and about processor instructions, you will need access to a 486 (or 386+) microprocessor manual. The one I like is entitled The 80386 book, by Ross P. Nelson. (This book is copyright 1988 by Microsoft Press, ISBN 1-55615-138-1.) Intel processor manuals may also be found at http://www.x86.org/intel.doc/586manuals.htm. The GNU Assembler, gas, uses a different syntax from what you will likely find in any x86 reference manual, and the two-operand instructions have the source and destinations in the opposite order. Here are the types of the gas instructions: opcode (e.g., pushal) opcode operand (e.g., pushl %edx) opcode source,dest (e.g., movl %edx,%eax) (e.g., addl %edx,%eax) Where there are two operands, the rightmost one is the destination. The leftmost one is the source. For example, movl %edx, %eax means Move the contents of the edx register into the eax register. For another example, addl %edx,%eax means Add the contents of the edx and eax registers, and place the sum in the eax register. Included in the syntactic differences between gas and Intel assemblers is that all register names used as operands must be preceeded by a percent (%) sign, and instruction names usually end in either "l", "w", or "b", indicating the size of the operands: long (32 bits), word (16 bits), or byte (8 bits), respectively. For our purposes...
Words: 1264 - Pages: 6
...topology that will support ABC’s needs. In addition to meeting the specified needs, be sure to consider security. 1. Explain why you think your design meets the needs of ABC. 2. List the major user communities for your design. 3. List the major data stores and the user communities for each data store. 4. Identify major network traffic flows in your network topology drawing. 5. How does your design provide security for ABC’s network? 6. What questions will you ask ABC about this project as you do your work? ____________________________________________________________ Exercise 4: Duration: 3 weeks Ip Addressing: Solve the following questions. Use of online IP calculators is strictly prohibited. You must include evidence of calculation. Q1- Separate the network portion of these addresses (assumed class based IP addressing) 177.100.18.6 10.15.123.25 223.250.200.222 95.0.21.90 33.0.0.0 171.120.77.77 Q2- Write...
Words: 875 - Pages: 4
...CH11 Instruction Sets: Addressing Modes and Formats Software and Hardware interface Addressing Modes • • • • • • • Immediate Direct Indirect Register Register Indirect Displacement (Indexed) Stack • • • • Addressing Pentium and PowerPC Addressing Modes Instruction Formats Pentium and PowerPC Instruction Formats TECH Computer Science CH10 Immediate Addressing Immediate Addressing Diagram • Operand is part of instruction • Operand = address field • e.g. ADD 5 Add 5 to contents of accumulator 5 is operand Instruction Opcode Operand • No memory reference to fetch data • Fast • Limited range Direct Addressing • Address field contains address of operand • Effective address (EA) = address field (A) • e.g. ADD A Add contents of cell A to accumulator Look in memory at address A for operand • Single memory reference to access data Direct Addressing Diagram Instruction Opcode Address A Memory • No additional calculations to work out effective address • Limited address space Operand Indirect Addressing (1) • Memory cell pointed to by address field contains the address of (pointer to) the operand • EA = (A) Look in A, find address (A) and look there for operand • e.g. ADD (A) Add contents of cell pointed to by contents of A to accumulator Indirect Addressing (2) • Large address space • 2n where n = word length • May be nested, multilevel, cascaded e.g. EA = (((A))) f Draw the diagram yourself • Multiple memory accesses to find...
Words: 592 - Pages: 3
...Chapter 3: Jump, Loop, and Call Instructions 3:1: Loop and Jump Instructions 1. In the 8051, looping action with the instruction “DJNZ Rx, rel address” is limited to decrement iterations. 2. If a conditional jump is not taken, what is the next instruction to be executed? Unconditional jump 3. In calculating the target address for a jump, a displacement is added to the contents of register program counter. 4. The mnemonic SJMP stands for short jump and it is a 2-byte instruction. 5. The mnemonic LJMP stands for long jump and it is a 3-byte instruction. 6. What is the advantage of using SJMP and LJMP? The advantage is no stack handling is needed. 7. True or false. The target of a short jump within -128 to +127 bytes of the current PC. True 8. True or false. All 8051 jumps are short jumps. False 9. Which of the following instructions is (are) not a short jump? C. LJMP 3:2: Call Instructions 17. LCALL is a 3 -byte instruction. 18. ACALL is a 2 -byte instruction. 19. The ACALL target address is limited to 2k bytes from the present PC. 20. The LCALL target address is limited to 64k bytes from the present PC. 21. When LCALL is executed, how many bytes of the stack are used? 64k 22. When ACALL is executed, how many bytes of the stack are used? 2k 23. Why do the PUSH and POP instructions in a subroutine need to be equal in number? The number needs to be equal because with the use of every PUSH there has to be a POP to match. 24. Describe the...
Words: 686 - Pages: 3
...1. (12 points) Show how the value ASCII “DEVORA” is stored as hexadecimal in memory in Big Endian format starting at location 200 hexadecimal. Assume that each memory location stores two ASCII characters. |Memory Location |Value Stored | | | | | | | | | | 2. (18 points) ) For X = 0011 1111, show the result of the following independent operations (i.e. each instruction occurs with X starting at the value above): a) Shift-right ____ ____ b) Circular Shift-right ____ ____ c) Shift-left ____ ____ d) Circular Shift-left ____ ____ e) Arithmetic Shift-left ____ ____ f) Arithmetic Shift-right ____ ____ 3. (12 points) a) Convert the following formula from postfix (Reverse Polish Notation) to infix: AB*CD/+ b) Convert the following formula from infix to postfix (Reverse Polish Notation): A + B * C + D / E * F Note that the result of part b) can be used in problem 7 In the problems 4 through 7 write code that performs the computation: X = A + B * C + D / E * F using CPUs that have the following instruction formats. You may only use registers A through F, plus X and T. Registers A through F may not be changed, i.e. their...
Words: 457 - Pages: 2
...Course Code Course Title Assignment Number Maximum Marks Weightage Last Dates for Submission : : : : : : MCS-012 Computer Organisation and Assembly Language Programming MCA(1)/012/Assign/2011 100 25% 15th April, 2011 (For January Session) 15th October, 2011 (For July Session) There are four questions in this assignment, which carries 80 marks. Rest 20 marks are for viva voce. You may use illustrations and diagrams to enhance the explanations. Please go through the guidelines regarding assignments given in the Programme Guide for the format of presentation. Answer to each part of the question should be confined to about 300 words. Question 1: (a) Perform the following arithmetic operations using binary signed 2’s complement notation for integers. You may assume that the maximum size of integers is of 10 bits including the sign bit. (Please note that the numbers given here are in decimal notation) (3 Marks) i) Ans: Add – 498 and 260 ii) Ans: Subtract 456 from – 56 Page 1 iii) Ans: Add 256 and 255 (b) Convert the hexadecimal number: FA BB C9 into binary, octal and decimal. Ans1: (FA BB C9)16 = (0110011001001011000111)2 Ans2: (FA BB C9)16 = (77735711)8 Ans3: (FA BB C9)16 = (16759753)10 (1 Mark) (c) Convert the following string into equivalent ASCII code – “Copyright © 2001 - 2011”. Include ASCII code of spaces between words in the resultant ASCII. Are these codes same as that used in Unicode? (2 Marks) Ans: 43h6fh70h79h72h69h67h68h74h20h28h43h29h20h32h30h30h30h20h32h ...
Words: 7501 - Pages: 31
...Subnet and Router Configuration Author Note This research is being submitted on August 18th, 2013, for Christine Stagnetto-Zweig’s N235/CET2629 Section 02 Cisco Networking Fundamentals and Routing course. Subnet and Router Configuration Given the IP address 154.78.0.0 calculate the subnet masks that would offer 18 subnets, and have the ability to add 6 per year for the next five years, with each subnet having up to 580 hosts? With This IP address (154.78.0.0) in order to give my client 18 available Subnets also with an option of adding 6 more subnets for the next five years and with each subnet having up to 580 hosts per subnet. I have given this much thought and the subnet mask I would use is 255.255.252.0 this will give me 64 available subnets for growth along with 1,022 hosts per subnet I know that’s a little more than 580 hosts but in my mind having doubled that wouldn’t hurt. This will make my first host IP address be 154.78.0.1 and my last host address be 154.78.3.254 leaving 154.78.3.255 my broadcast address and 154.78.0.0 my network address. Indicate the steps and command that you would use to access and configure the router/switch. Configuring the Fast Ethernet Interface Steps | Command | Purpose | 1 | Router>enable | EXEC Mode, Privileged/pswd | 2 | Router# configure terminal | global configuration mode | 3 | Router# show ip interface brief | brief status of the interfaces that are configured for IP | 4 | Router(config)# interface fastethernet...
Words: 423 - Pages: 2
...Network Addressing In standard computer networking there are two different addresses associated with each host on the network; they are termed logical and physical addresses. The physical hardware address is a 48-bit , 12-digit number that is burned into the memory of each network interface card, and it works on the data link layer of the OSI model. An example of this “hexadecimal” number is 02-C3-7E-3D-0A-B4. This MAC address is unchangeable and unique to each system, and assigned to each device by the manufacturer. In addition, if you move a device to another network this address stays the same, as long as the network card has not been changed (Addressing Facts, n.d.). The MAC address is used mostly for identifying and sending information to hosts that are on the same network, or Ethernet. If you need to connect to a device on a network outside of your home or business network, however, you will need the logical address (or TCP/IP address). The example that was given in a book excerpt on informit.com was extremely helpful for me to understand the concept of network addressing. In Barry Press’ book, “Networking by Example”, he uses the example of finding a specific house or home address. When you know where a friend or family member’s house is in your own neighborhood or specific area, you usually do not need their address to get back to their house again and again. You know physically where their house is located in your area, which can compare to the physical...
Words: 622 - Pages: 3
...Advanced Networks Lab Book 2015/2016 Module Leader: Nauman Israr Office Location: IT 1.06 Email: N.Israr@tees.ac.uk Telephone no: 2693 Course Number and Name: Advanced Networks(COM3038-N-BJ1-2015) Year: 2015/2016 Working Time: Timetable Tutorial Time Only in Lab Name of Student: Name of Lab Instructor: Submission Date: TBA Grade: Submission Method: Introduction The purpose of this lab book is to document your solution for a given set of exercises. The relevant concepts used in each exercise will be covered during the lecture. You must complete these exercises within your timetabled tutorial session. The lab book will count towards your final grade. You will be required to submit completed lab book before the submission deadline. Please check with your tutor about the deadline date, time and submission method. This lab book is 10% of your overall mark. 1 Exercise 1: Duration- One Hour You are a network engineer who has been asked to attend an initial meeting with the management team of ABC, LLC. ABC manufactures electric cars. Its new electric car was just picked up by a Government promotional scheme. ABC is upgrading its manufacturing capacity and hiring new employees. Recently, ABC employees have started saying, “The network is too slow.” They are also experiencing problems sending email, accessing web-based applications, and printing. In the past, when the company was small, it didn’t have these...
Words: 2719 - Pages: 11
...(part 2) Memory Access to access memory we can use these four registers: BX, SI, DI, BP. combining these registers inside [ ] symbols, we can get different memory locations. these combinations are supported (addressing modes): [BX + SI] [BX + DI] [BP + SI] [BP + DI] | [SI] [DI] d16 (variable offset only) [BX] | [BX + SI + d8] [BX + DI + d8] [BP + SI + d8] [BP + DI + d8] | [SI + d8] [DI + d8] [BP + d8] [BX + d8] | [BX + SI + d16] [BX + DI + d16] [BP + SI + d16] [BP + DI + d16] | [SI + d16] [DI + d16] [BP + d16] [BX + d16] | d8 - stays for 8 bit signed immediate displacement (for example: 22, 55h, -1, etc...) d16 - stays for 16 bit signed immediate displacement (for example: 300, 5517h, -259, etc...). displacement can be a immediate value or offset of a variable, or even both. if there are several values, assembler evaluates all values and calculates a single immediate value.. displacement can be inside or outside of the [ ] symbols, assembler generates the same machine code for both ways. displacement is a signed value, so it can be both positive or negative. generally the compiler takes care about difference between d8 and d16, and generates the required machine code. for example, let's assume that DS = 100, BX = 30, SI = 70. The following addressing mode: [BX + SI] + 25 is calculated by processor to this physical address: 100 * 16 + 30 + 70 + 25 = 1725. by default DS segment register is used for all modes except those with BP register, for these SS segment...
Words: 2749 - Pages: 11
...IP ADDRESSING: An Internet Protocol address (IP address) is a numerical label assigned to each device (e.g., computer, printer) participating in a computer network that uses the Internet Protocol for communication. An IP address serves two principal functions: host or network interface identification and location addressing. Its role has been characterized as follows: "A name indicates what we seek. An address indicates where it is. A route indicates how to get there." The designers of the Internet Protocol defined an IP address as a 32-bit number[ and this system, known as Internet Protocol Version 4 (IPv4), is still in use today. However, due to the enormous growth of the Internet and the predicted depletion of available addresses, a new addressing system (IPv6), using 128 bits for the address, was developed in 1995, standardized as RFC 2460 in 1998, and its deployment has been ongoing since the mid-2000s. In the most widely installed level of the Internet Protocol (IP) today, an IP address is a 32-bit number that identifies each sender or receiver of information that is sent in packets across the Internet. When you request an HTML page or send e-mail, the Internet Protocol part of TCP/IP includes your IP address in the message (actually, in each of the packets if more than one is required) and sends it to the IP address that is obtained by looking up the domain name in the Uniform Resource Locator you requested or in the e-mail address you're sending a note to. At the other...
Words: 1361 - Pages: 6