Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles by Chandu yadav
Page 42 of 81
8085 Program to Multiply two numbers of size 8 bits
In this program, we will see how to multiply two 8-bit numbers using 8085 microprocessor.Problem StatementWrite 8085 Assembly language program to multiply two 8-bit numbers stored in a memory location and store the 16-bit results into the memory.DiscussionThe 8085 has no multiplication operation. To get the result of multiplication, we should use the repetitive addition method. After multiplying two 8-bit numbers it may generate 1-byte or 2-byte numbers, so we are using two registers to hold the result.We are saving the data at location 8000H and 8001H. The result is storing at location 8050H and 8051H.InputAddressData......8000DC8001AC......Flow DiagramProgramAddressHEX CodesLabelsMnemonicsCommentsF00021, 00, 80LXI H, ...
Read MoreIN and OUT instructions in 8085 Microprocessor
In 8085 Instruction set, there are two instructions in 8085 for communication with I/O ports. They are the IN and OUT instructions. The IN or OUT instruction mnemonics should be followed by an 8-bit port address. Thus we can have 28 = 256 input ports and 256 output ports are possible in 8085-based microcomputers. IN and OUT both are 2-Bytes instructions.Mnemonics, OperandOpcode(in HEX)BytesIN Port-addressDB2OUT Port-AddressD32In case of IN instruction, the current 8-bit content of the PORT# will be made available on to the Accumulator. Let us suppose with the PORT#, 8 DIP switches are connected. And their states are ON-ON-OFF-ON-ON-ON-OFF-ON. ...
Read MoreIN a8 instruction in 8085 Microprocessor
In 8085 Instruction set, IN is a mnemonic that stands for INput the Byte from input port’s content to the accumulator. Input port’s 8-bit address is indicated in the instructions as a8. It occupies 2 Bytes in the memory. First Byte specifies the opcode, and the next Byte provides the 8-bit input port address. Mnemonics, OperandOpcode(in HEX)BytesIN Port-addressDB2IN F0H is an example instruction of this type. The result of execution of this instruction is shown below with an example.BeforeAfter(A)Any ValueABHInput Port F0HABHABHIN instruction is the only instruction using which read the input port content to the Accumulator. A possible chip select ...
Read MoreInstruction set of 6800
In this section, we will see the different types of instructions of Motorola M6800 microprocessor. There are 72 different types of instructions and 197 different opcodes. So there are 51 1-Byte instruction, 103 2-Byte instruction and 43 3-Byte instruction.As we know that the Intel 8085 has 246 opcodes, though 6800 is more powerful than 8085. The Z-80 has 700 instructions but M6800 has some more advanced branching instructions.The different instruction groups are like these −Data Transfer GroupArithmetic GroupLogical GroupBranch GroupMiscellaneous InstructionsData transfer GroupIn this group, there are 14 instructions. We can find 38 opcodes for these 14 instructions. These instructions ...
Read MoreInterrupts of 6800
In Motorola M6800, there are two hardware interrupt pins. These pins are NMI and. IRQ These pins are active low input pins. The first one is non-maskable and the second one is maskable and lower priority interrupt. When the IM flag is 1, or CCR register is set, the interrupt is masked or disabled.When the Micro processor enters into some Interrupt Service Subroutine (ISS), it uses SEI instruction to mask the interrupt even if the IRQ activated. The reverse action can be performed using the CLI instruction. It can unmask the interrupt.When in the interrupt is occurred, the M6800 follows ...
Read MoreAccumulator or Register A in 8085 Microprocessor
Register A is an 8-bit register used in 8085 to perform arithmetic, logical, I/O & LOAD/STORE operations. Register A is quite often called as an Accumulator. An accumulator is a register for short-term, intermediate storage of arithmetic and logic data in a computer's CPU (Central Processing Unit).In an arithmetic operation involving two operands, one operand has tobe in this register. And the result of the arithmetic operation will be stored or accumulated in this register. Similarly, in a logical operation involving two operands, one operand has to be in the accumulator. Also, some other operations, like complementing and decimal adjustment, ...
Read MoreData Memory Structure of Intel 8051
The 8051 has 128 bytes of On-Chip RAM. So for accessing that RAM area, the address space is 00H to 7FH. When we need more data memory, we can use external RAM. The address space of external RAM is 0000H to FFFFH.The external and internal data memory can be added to increase the total amount of data memory. When we are trying to access the external data memory, then the read RD or write WR will be the output from 8051. The external data memory address can be either 8-bit or 16-bit wide. Generally, the one 8-bit address is used ...
Read MoreRepresentation of fractions
To represent fractions may be necessary quite often inside the computer. For example, it may be needed to represent inside a computer a value like +0.610 or -0.610. To represent signed fractions, it is necessary to assume the binary point just after the MSB in the bit sequence. Such numbers where the binary point is assumed to be at a fixed position in the bit sequence are called fixed-point numbers.Unsigned fractions will have the assumed binary point at the extreme left. SM, 1's complement, and 2's complement fractions will have this imaginary binary point just to the right of the ...
Read MoreInstruction set of 8051
The instructions of 8051 Microcontroller can be classified into five different groups. These groups are like belowData Transfer GroupArithmetic GroupLogical GroupProgram Branch GroupBit Processing GroupThis Bit-Processing group is also known as Boolean Variable Manipulation.Like 8085, some instruction has two operands. The first operand is the Destination, and the second operator is Source.In the following examples, you will get some notations. The notations are like −Rn = Any register from R0to R7 Ri = Either R0 or R1 d8 = Any 8-bit immediate data (00H to FFH) d16 = 16-bit immediate data a8 = 8-bit address bit = 8-bit address of ...
Read MoreBCD to binary conversion in 8051
In this problem, we will see how to convert 8-bit BCD number to its Binary (Hexadecimal)equivalent. The BCD number is stored at location 20H. After converting, the results will be stored at 30H.So let us assume the data is D5H. The program converts the binary value ofD5H to BCD value 213D.AddressValue...20H9421H...Program MOVR0, #20H; Initialize the address of the data MOVA, @R0;Get the data from an address, which is stored in R0 MOVR2, A; Store the content of A into R2 CLRA;Clear the content of A to 00H MOVR3, #00H LOOP: ADDA, #01H;increment A ...
Read More