8085

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

霸气de小男生 提交于 2020-01-24 12:11:25
问题 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 this in assembly language. It seems that I should be using the "RRC" command but that performs circular shift on the number and the algorithm doesnt seem to work. Any ideas would be appreciated. Cheers. 回答1: The n>>7 in that abs algorithm is an

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

天大地大妈咪最大 提交于 2020-01-11 06:15:29
问题 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: http://www.edaboard.com/thread201650.html it says that it has something to do with dual addressing modes being used in case of CALL. But doesn't really explain why 6T states. Any idea? EDIT This question arose when I came to know that CALL takes 18 T-states. According to my

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

纵饮孤独 提交于 2020-01-11 06:14:37
问题 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: http://www.edaboard.com/thread201650.html it says that it has something to do with dual addressing modes being used in case of CALL. But doesn't really explain why 6T states. Any idea? EDIT This question arose when I came to know that CALL takes 18 T-states. According to my

auxiliary carry and carry flags in 8085

南笙酒味 提交于 2019-12-31 03:14:07
问题 It is said that the subtraction is performed in 2's complement in 8085 and so the flags must be set according to the operation. However,in the figure shown, i am unable to figure out the reason behind auxiliary carry flag being set to '0' and the same goes for carry flag. When i performed 2's complement operation, i found carry=1 (which is not taken into consideration in 2's complement) and i also found carry of 1 shifting from lower nibble to upper and so i thought auxiliary carry to be 1.

8085- Strange behaviour of Carry flag

◇◆丶佛笑我妖孽 提交于 2019-12-23 12:02:08
问题 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 expected the carry flag to be set because we are adding 11111111+00000000+00000001 , so that would obviously yield a carry but the carry flag is not set. Why is this working this way. Can you please explain this. Also why is carry generated in the below code and not

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

六眼飞鱼酱① 提交于 2019-12-19 04:03:16
问题 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 flag, not an Overflow flag, so how does it deal with signed integer arithmetic? 回答1: As you know, the overflow flag is only relevant for signed integer arithmetic. On processors whose ALU has both overflow and carry flags (like x86), both of these

Importance of Hexadecimal numbers in Computer Science [closed]

心不动则不痛 提交于 2019-12-12 07:23:45
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . When studying programming 8085, 8086 and microporcessors in general we always have hexadecimal representation. Its ok that binary numbers are important in computers. But how these hexadecimal numbers are important? Any historical importance? It would be nice if someone point to

Why does 8085 start from 00000 while 8086 from FFFF0?

夙愿已清 提交于 2019-12-10 10:49:55
问题 I am unable to understand the different starting addresses of Physical Address generated by CS:IP in 8085-86. Is this because of Stack? I think the concept of Stack was present before 8085. Please help out. Thanks. 回答1: There are 3 reasons I can think of that a particular value could be used for the powerup IP: convention - other processors in the same family/brand use the same location, and they want to give their customers a sense of familiarity compatibility certain areas are restricted or

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

為{幸葍}努か 提交于 2019-12-10 06:19:26
问题 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"? 回答1: These bits are unused; that is, no instruction explicitly sets them to any value. The designers decided that 5/6 flags was enough, and they just left the remaining bits of the flags register unused. They are documented as being "undefined" because it is not possible to know in advance which value will they have after any of the instructions

Why does 8085 start from 00000 while 8086 from FFFF0?

妖精的绣舞 提交于 2019-12-06 04:21:39
I am unable to understand the different starting addresses of Physical Address generated by CS:IP in 8085-86. Is this because of Stack? I think the concept of Stack was present before 8085. Please help out. Thanks. There are 3 reasons I can think of that a particular value could be used for the powerup IP: convention - other processors in the same family/brand use the same location, and they want to give their customers a sense of familiarity compatibility certain areas are restricted or enhanced for certain purposes. The 6502 for example has special faster instructions for accessing the first