Questions tagged [8085]

The Intel 8085 is an 8-bit CPU from the 1970's. Use this tag for queries regarding assembly code written for 8085.

The Intel 8085 processor was introduced in the late 1970's as an improved version of the then popular 8080 CPU.

It was soon succeed by the 16-bit 8086, the first x86 processor.

113 questions
0
votes
1 answer

Stack Pointer (SP) adjustment at RST 5.5 interruption

In a microprocessor-8085 we run the command CALL 3000H . The program counter (PC) is equal to (PC)=2000H and the stack pointer is equal to (SP)=4000H. In the middle of the execution of the command we have an RST 5.5 interruption. I want to define…
MJ13
  • 195
  • 6
0
votes
0 answers

How to do insertion sort in 8085 microprocessor?

LXI D 8021 MVI B 01 MOV C B------------L3 MOV L E MOV H D DCX H LDAX D CMP M--------------L2 JNC L1 STA 8030 MOV A M STAX D LDA 8030 DCX H DCR C JNZ L2 INX H---------------L1 MOV M A INX D INR B MOV A B CPI 05 JNZ L3 HLT
iGhostYou
  • 23
  • 4
0
votes
0 answers

How to detect in assembly 8085 that the Auxiliary carry is 1

I am trying to make a little program that adds two numbers in bcd and I cannot use the DAA command. How can I detect that the Auxiliary Carry is one?
themhz
  • 8,335
  • 21
  • 84
  • 109
0
votes
1 answer

What is the need of a temporary register for Arithmetic operations in 8085 microprocessor?

I know the two inputs of ALU are accumulator and the temporary register.I was bit curious that why we store intermediate result in a temporary register and why not the data bus is directly connected to the ALU.What is the need of that temporary…
LocalHost
  • 910
  • 3
  • 8
  • 24
0
votes
1 answer

Is carry flag complemented when subtrahend is converted into 2's complement in 8085 microprocessor?

I was studying from a web course and found an example in which subtraction operation was explained. In that example, A= A5H, B= 9BH and operation SUB B was executed. As the subtraction operation in 8085 microprocessor is carried out by converting…
Durgesh
  • 3
  • 3
0
votes
1 answer

Why is CMP an example of implicit addressing mode in 8085 microprocessor?

Definition of implicit addressing mode is: This mode doesn’t require any operand; the data is specified by the opcode itself. CMP B: This instruction will compare B with A contents. Here, opcode is CMP and operand is B. Then why is that CMP is an…
mhk
  • 19
  • 1
  • 6
0
votes
1 answer

8085 - How can I compare 2 values in a Stack

I would like to know how can I compare 2 values in a Stack to discover the smaller one. I'm a begginer so I'm not realy sure if I'm supposed to use the Acumulator and how ,considering it's only a 8bit register and a Stack uses pairs of registers for…
user9090540
0
votes
1 answer

8085 ASM Program Restorative Division w/ Left Shifting

I'm doing some Homework getting ready for Final and i'm trying to figure out what i know on paper to work for Restorative Division with Left Shifting. I've been playing with this for a couple nights straight and can't seem to figure out what i'm…
Mercyful
  • 107
  • 1
  • 7
0
votes
1 answer

I need some help improving this 8085 code

Sorry for the vague title, I'm trying to move in the 8085 sim the right led from left to right and viceversa. I did it but I realised that the led is moving with "intermitences", is not an instant movement. I want to remove those intermitences. This…
JACK1ETO
  • 15
  • 4
0
votes
2 answers

16 bit multiplication using 8085 microprocessor

Following is assembly language for multiplying two 16 bit numbers. LHLD 0002H ;DATA 1 SPHL LHLD 0004H ;DATA 2 XCHG LXI H,0000H LXI B,0000H NEXT: DAD SP JNC LOOP INX B LOOP: DCX D MOV A,E ORA D JNZ …
anapi
  • 31
  • 1
  • 4
0
votes
1 answer

Why is the sign flag set even on addition of 5FH and 33H?

I am studying about 8085 microprocessor and I came across an instruction - ADC. In the example, they gave the accumulator [A] = 57H and a register [D] = 33H and initially carry was set, so [CY] = 01H Instruction: ADC D They added 57H, 33H and 01H 0…
Ishaan
  • 43
  • 5
0
votes
1 answer

Source of loading value to register or memory

When we load a register or memory location with a value (e.g. MVI 3A or MVI 53), what initializes register or memory location with that specific value? It is the CPU who performs the initialization, right? But where are those values drawn from?
Lucenzo97
  • 215
  • 1
  • 2
  • 7
0
votes
1 answer

Why XRA A also clears other registers too?

Let us suppose accumulator contains 0AH and following instructons are given. MOV D,A; XRA A; I found out that this instruction clears accumulator as well as the D register. I confirmed this by using 'Virtual 8085' simulator. Why the secon…
Sohail Ahmed
  • 27
  • 1
  • 4
0
votes
1 answer

How count works in 8085 Processor?

MVI D,10H LXI H,4500 LXI B,4600 l1: MOV A,M STAX B INX H INX B DCR D JNZ l1 RST 1 hlt Can any one help me to understand how loop works i.e, how count becomes zero and why is D value 10H?
MJN
  • 610
  • 1
  • 7
  • 19
0
votes
1 answer

Do mov or lda set flags in 8085 assembly?

I want to check if C register is empty before doing any computations with that register(other than moving the data we got from somewhere to it.) LDA 8100H; MOV B,A; JNZ MOVE; Can I use JNZ after MOV to check if B is zero or not? Because if the…
Michael
  • 577
  • 1
  • 11
  • 21