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
11
votes
1 answer

8085 assembly instructions MOV, LDA and STA

I get the point of MOV, STA and LDA instructions, but what I don't understand is why are there three different instructions for two different processes? STA is for copying data from accumulator to memory location, LDA is for copying data from…
Lucenzo97
  • 215
  • 1
  • 2
  • 7
6
votes
1 answer

How does a processor without an overflow flag perform signed arithmetic?

I know that addition of two unsigned integers larger than the bus size of a given processor can be achieved via the carry flag. And normally, the same is true for signed integers using the overflow flag. However, the Intel 8085 only possesses a Sign…
5
votes
1 answer

What is the purpose of the reserved/undefined bit in the flag register?

In the flag register of Z80, 8080, 8085, and 8086 processors, what is the purpose of bits 1, 3, 5, which are documented as "reserved" or "undefined"?
Joseph
  • 55
  • 7
4
votes
1 answer

What do bitshift operations in Intel 8085 assembly do?

I am trying to explain to myself the following 8085 assembly code I have this code that asks for two numbers (from a virtual keyboard within the IDE) and displays them on LEDs 7 and 8: .ORG 0000 CALL DATA MOV C,A CALL PRNT CALL DATA MOV E,A CALL…
Ashir
  • 511
  • 2
  • 8
  • 24
4
votes
1 answer

8085- Strange behaviour of Carry flag

I am using GNUSim8085 (Also the results are same on trainer) I was getting familiar wih ADC instruction and the instructions below doesnt seem to work the way i want. stc ;to make sure carry is set mvi a,00h mvi b,0ffh adc b hlt I…
rooni
  • 1,036
  • 3
  • 17
  • 33
4
votes
3 answers

What does it mean by MOV D D?

In assembly language, instruction MOV A B means moving the content of B (source) to A (destination). I suddenly came up with the instruction MOV D D What does it imply? I have seen this in my lab manual. Screenshot:
haccks
  • 104,019
  • 25
  • 176
  • 264
3
votes
2 answers

Memory allocation from heap or stack?

I read that, In 8085 the starting address of processor is 00000H. Where as, In 8086 the starting address of the processor is FFFF0H. Now I have also learnt that the top portion of the memory is heap while below lies the stack. What I am confused…
user379888
3
votes
2 answers

How Intel 8085 actually performs a subtraction with previous borrow?

My understanding is that in order to evaluate X - Y - borrow, we can either perfrom X - (Y + borrow) or (X - Y) - borrow. Examples in the textbooks depicts the former approach. In that case, what will happen is the subtrahend (Y) is FFH and borrow…
codeR
  • 165
  • 1
  • 1
  • 13
3
votes
1 answer

What are the initial values of different registers in 8085?

I want to know about the initial values of all the registers: A, B, C, D, E, H, L, SP and PC. Do general purpose registers like B contain garbage values, or are they initialized to zero? And what about PC and SP? Are they dependent on manufacturer?
Ranveer Singh
  • 131
  • 1
  • 1
  • 9
3
votes
1 answer

How to check for flags being set for 8085 simulator

byte x = 0x0c; byte y = 0x05; System.out.println((x&0xf) + (y&0xf)); // if > 15 then af on System.out.println((b&0xf) - (c&0xf)); System.out.println((int)(b&0xff) + (c&0xff)); // if > 255 then cf on …
3
votes
2 answers

Why are there 6T states in opcode fetch of CALL instead of 4?

My question is why are there 6T states in opcode fetch of the CALL instruction while there are 4 for other instructions in 8085 microprocessor. I have searched a lot but didn't find any satisfactory answer. Here:…
tapananand
  • 4,392
  • 2
  • 19
  • 35
3
votes
1 answer

How to divide a BCD by 2 on an 8085 processor?

On an 8085 processor, an efficient algorithm for dividing a BCD by 2 comes in handy when converting a BCD to binary representation. You might think of recursive subtraction or multiplying by 0.5, however these algorithms require lengthy…
2
votes
0 answers

MOV r, M instruction in 8085 microprocessor

I am sorry if the question is too basic but I still cannot understand the code that I found in Google. Basically, I need to make a simple code of MOV r, M instruction in 8085 microprocessor. Here is the code that I want to make: LXI H, 1234H MOV B,…
Anonymous
  • 21
  • 2
2
votes
0 answers

Cannot seem to identify error in JNC statement in 8085 assembly

I wrote a fairly frugal program to compare 2 numbers , the first JNC statement works fine, the second throws an error, I am using gnusim8085 . Here is my code MVI B,03H MVI C,02H MOV A,B CMP C JNC NO_ZERO_1 MOV H,C NO_ZERO_1: MOV A,C CMP B JNC…
RasenRhino
  • 47
  • 5
2
votes
1 answer

Finding the absolute value of a number in 8085 microprocessor assembly language

I have a task of finding the absolute value of any given number in 8085 assembly language. The algorithm is the following (found on the internet): mask = n >> 7 (number itself is 8 bits) (mask + n) XOR mask My question is that how would I implement…
franklin
  • 35
  • 7
1
2 3 4 5 6 7 8