This action might not be possible to undo. Are you sure you want to continue?
The input data byte is obtained by enabling a tri-state buffer and placed in the accumulator.
b) A subroutine is a sequence of program instructions that perform a specific task, packaged as a unit.
This unit can then be used in programs wherever that particular task should be performed. Subprograms may be defined within programs, or separately in libraries that can be used by multiple programs. In different programming languages a subroutine may be called a procedure, a function, a routine, a method, or a subprogram. A subroutine is a group of instructions that will be used repeatedly in different locations of the Program. Rather than repeat the same instructions several times, they can be grouped into a subroutine that is called from the different locations. In Assembly language, a subroutine can exist anywhere in the code. However, it is customary to place subroutines separately from the main program. The 8085 has two instructions for dealing with subroutines. The CALL instruction is used to redirect program execution to the subroutine. The RET insutruction is used to return the execution to the calling routine.(Explain their mechanism). c) Memory Mapped I/O - 16-bit device address - Data transfer between any general-purpose register and I/O port. - The memory map (64K) is shared between I/O device and system memory. - More hardware is required to decode 16-bit address - Arithmetic or logic operation can be directly performed with I/O data Peripheral MappedI/O - 8-bit device address - Data is transfer only between accumulator and I.O port - The I/O map is independent of the memory map; 256 input device and 256. output device can be connected - Less hardware is required to decode 8-bit address - Arithmetic or logical operation cannot be directly performed with I/O data d) In a given program, it is often needed to perform a particular sub-task many times on different data values. Such a subtask is usually called a subroutine. For example, a subroutine may sort numbers in an integer array or perform a complex mathematical operation on an input variable (e.g., calculate sin(x)). It should be noted, that the block of instructions that constitute a subroutine can be included at every point in the main program when that task is needed.
duplicating or deleting lines or blocks of lines . Hence. we must have a mechanism to return to the appropriate location (the first instruction that follows the CALL instruction in the calling program). Since a subroutine can be called from different places in a calling program. Some additional capabilities are: . only one copy of the instructions that constitute the subroutine is placed in memory and any program that requires the use of the subroutine simply branches to its starting location in memory. The calling program is called CALLER and the subroutine called is called CALLEE. and we say that the subroutine returns to the program that called it. The last instruction in the subroutine is a RETURN instruction. The simplest subroutine linkage method is to save the return address in a specific location. this would result in unnecessary waste of memory space. When the subroutine completes its task. The RETURN instruction is a special branch instruction that performs the following operations: ƒ Branch to the address contained in the link register. The instruction that is executed right after the CALL instruction is the first instruction of the subroutine. the return instruction returns to the calling program by branching indirectly through the link register.However. The way in which a machine makes it possible to call and return from subroutines is referred to as its subroutine linkage method. The instruction that performs this branch is named a CALL instruction. we should save the return address at the time the CALL instruction is executed. Rather. This location may be a register dedicated to this function. At the time of executing the CALL instruction we know the program location of the instruction that follows the CALL (the next program counter or PC). 1e) Text editors allow data entry and updating. The CALL instruction is a special branch instruction and performs the following operations: ƒ Store the contents of the PC in the link register ƒ Branch to the target address specified by the instruction. often referred to as the link register.
moving sections of text .excluding lines not of interest . or clearing the clipboard .showing duplicate or unique data .allowing more than one file to be edited at the same time .setting and going to bookmarks (in larger files) .command retrieval and repetition . left or right) by line. down. page or top/bottom .writing to.allowing invocation of external code/applications .screen movement (up.regular expression capability .retrieval of other files into the current one .showing changed lines .. appending to.randomizing lines or paragraphs .splitting and joining lines either manually or at/after some text .highlighting keywords or entire lines .sorting .finding text .undoing changes .a macro facility .aligning strings within lines .allowing split screens on the same or different files .changing specific text or using a regular expression to change a range of text .centering or justifying text .filling or overlaying areas with numbers or text .formatting or justifying paragraphs in various ways .
This allows instructions following to act accordingly. that machine should have exactly same hardware. System programming is used to make device drivers kind of application. such as a branch as a result of two values comparing equal. The flags are: ZERO FLAG: This flag is set to a 1 by the instruction just ending if the A Register contains a result of all 0’s. Programming is done using assembly language which interacts with hardware. i) ii) iii) iv) v) vi) vii) viii) ix) LXI Rp MOV R. System programming is used to write low level instructions which are understandable to computer hardware. this is useful in determining equality in a compare operation (a value subtracted from a second value with an answer of 0).Ans 1 f) Application programming is used to build application software which includes software like notepad. Word Pad. It interacts with system software which in turn interacts and makes physical hardware functional.R STAX B/D STA 16-bit INX Rp DCX Rp Register pair instructions for Rotation. Ans 2 a)Arithmetic instructions for register pair. Again output is in low level instructions which in turn translated by such drivers to the language understandable by operating system. or in logical AND or OR . Microsoft excel and many more. Application software runs on top of system software. calculator. web browser. Besides the obvious mathematical applications. It helps operating system to interact with hardware. 2b)FLAG REGISTER The Status Flags of the 8080 and 8085 are single bits which indicate the logical conditions that existed as a result of the execution of the instruction just completed. If this code has to be executed on another machine. This assembly code is specific to hardware.M LDAX B/D LDA 16-bit MOV M. i) ii) iii) iv) RLC (rotate accumulator left) RAL (rotate accumulator left through carry) RRC (rotate accumulator right) RAR (rotate accumulator right through carry).
it is possible to bring BCD values directly into the A Register and perform mathematical operations on them. Generally. or highest order. will be as if two hex characters are being processed. The 8085’s instructions are either one. unless noted otherwise. and 1 if the value is negative. The 9th bit would be lost. such as the OP code. PARITY FLAG: This flag is set to a 1 by the instruction just ending if the A Register is left with an even number of bits set on. provide operand information that won’t fit in the first byte. Thus. The most significant bit is on the left. or three bytes long. CARRY FLAG: This flag is set to a 1 by the instruction just ending if a carry out of the leftmost bit occurred during the execution of the instruction. In microprocessor parlance. a particular task is assigned to that interrupt signal. The least significant bit is on the right. INSTRUCTION ORGANIZATION The 8085’s instructions are made up of bytes. Note also that there is no parity bit. the Auxiliary Carry Flag is provided to assist in this operation. An example would be the addition of two 8-bit numbers whose sum was 9 bits long. In the microprocessor based system the interrupts are used for data transfer between the peripheral devices and the microprocessor. bit of the A Register is set to a 1. Because of the relationships of decimal in pure BCD to hexadecimal coding. In all cases. and will be 0 if the value in the lower seven bits is positive. or anyplace that error checking is to be done. i.e. in even parity. The result. . and is Bit 7. This flag is also set if a borrow occurred during a subtraction or a compare operation. yielding an erroneous answer if the carry bit was not captured and held by this flag.operations where the result left the A Register with no bit set to a 1 (the AND was not satisfied). The processor will check the interrupts always at the 2nd T-state of last machine cycle. 2c ) Interrupt is a mechanism by which an I/O or an instruction can suspend the normal execution of processor and get itself serviced. AUXILIARY CARRY FLAG: This flag is set to a 1 by the instruction just ending if a carry occurred from bit 3 to bit 4 of the A Register during the instruction’s execution. the Decimal Adjust Accumulator (DAA) instruction can make that translation. If the result must be returned to the program as BCD rather than as hex. a byte is described as 8 contiguous binary bits treated as a unit. if included. however. and is labeled Bit 0. the machine coding is "origin zero". or provision for it. two. the first byte contains the essential information. This may be useful in I/O operations with serial devices. The leftmost bit of a byte in signed arithmetic is the sign bit. The second and third bytes. the flag will be reset to a 0 condition.. If the number of bits in the A Register is odd. the bit is left off. SIGN FLAG: This flag is set to a 1 by the instruction just ending if the leftmost. as would be found in larger systems. If any bits were left set to a 1 in the A Register.
5 RST5.Software Interrupts There are 6 pins available in 8085 for interrupt: TRAP RST 7. The vectored address of particular interrupt is stored in program counter.Interrupt Service Routine(ISR):-A small program or a routine that when executed services the corresponding interrupting source is called as an ISR.5 INTR INTA Execution of Interrupts:When there is an interrupt requests to the Microprocessor then after accepting the interrupts Microprocessor send the INTA (active low) signal to the peripheral. Maskable/Non-Maskable Interrupt:-An interrupt that can be disabled by writing some instruction is known as Maskable Interrupt otherwise it is called Non-Maskable Interrupt. There are two types of interrupts used in 8085 Microprocessor: 1. The processor executes an interrupt service routine (ISR) addressed in program counter.5 RST6. 2 d) .Hardware Interrupts 2.
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue listening from where you left off, or restart the preview.