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

Is there any use of the XTHL instruction in an 8085 microprocessor?

I understand what XTHL does, but can someone give an example of a scenario where one would actually use it? Moreover, if possible please share the code for the application as well.
Dhruv Mullick
  • 551
  • 9
  • 25
0
votes
3 answers

Guidelines to develop an 8085 simulator for iPhone

I'm an undergraduate and an iOS app developer. We are being taught about 8085 microprocessor at my college and I thought it would be cool and useful for me to develop an iOS simulator for the same I want to know how I can start the app from scratch…
Viki
  • 421
  • 1
  • 4
  • 12
0
votes
0 answers

8085 Microprocessor - Assembly DB Directive

I am having a problem with the following assembly code. PROGX: MVI C, 10h LOOP1: CALL SHOWX DATAX: DB 80h, 01h, 40h, 02h DB 20h, 04h, 10h, 08h DB 08h, 10h, 04h, 20h DB 02h, 40h, 01h, 80h DB 02h, 40h, 04h, 20h DB…
0
votes
0 answers

Sum of two n bit numbers (n<=255) in 8085 microprocessor

LDA 2000h ; Store the no of byte that each number consists of in memory location 2000h. MOV C A MOV B A LXI D 5000h LXI H 2001h STC CMC LOOP1: MOV A M SHLD 7000h LOOP: INX H DCR C JNZ LOOP ADC M STAX D LHLD 7000h LDA 2000h MOV C A INX D INX H DCR…
Soumya Kanti Naskar
  • 1,021
  • 3
  • 16
  • 29
0
votes
1 answer

Assembly level programming to find the factorial

MVI B 07h LXI H 0007h LXI D 0007h DCR B LOOP1: DCR B MOV C B INR B LOOP: DAD D DCR C JNZ LOOP MOV E L MOV D H DCR B JNZ LOOP1 HLT I couldn't find out the problem in my code. Can you please help me out? It's giving me partially wrong answer. The two…
Soumya Kanti Naskar
  • 1,021
  • 3
  • 16
  • 29
0
votes
1 answer

How does program counter in 8085 actually work?

I have been reading about Program Counter of 8085. This material here states that the function of the program counter is to point to the memory address from which the next byte is to be fetched. When a byte (machine code) is being fetched, the…
Ravi
  • 612
  • 1
  • 6
  • 17
0
votes
2 answers

GNU 8085 Simulator(How to change the initial starting address)

I'm using GNUSim8085. And its default starting address is 4200H. How do i change this address to any custom address I want?
user4371190
0
votes
0 answers

8085 Microprocessor: How to see the changes your program made to memory

I want to write an assembler for the 8085 in C. I used GNUSIM8085 to review my knowledge of assembly. When I learned assembly in my microprocessor class where I used ASMIDE with HCS12 Dragonboard. With ASMIDE and Dragonboard I used some instructions…
Hauzron
  • 305
  • 1
  • 3
  • 19
0
votes
1 answer

Register returning a hex value 1 higher than it should (8085 assembly)

I am working on an assignment for my intro to Computer Engineering class. I am trying to write a subroutine that takes a number input from the user and then returns this number in H register. From what I can see, it works fine with single digit…
wakey
  • 2,283
  • 4
  • 31
  • 58
0
votes
1 answer

8085 multiplication.How does it work?

I have this program but i didn't understand it. Why is ral and dad used? 1. lxi h, 4050h 2. mov e,m 3. mvi d,00h 4. inx h 5. mov a,m 6. mvi b,08h 7. lxi h,0000h 8. mvlt: ral ; this line 9. jnc add1 10. dad d 11. add1: dcr…
Kirsche
  • 13
  • 1
0
votes
1 answer

Sorting in ascending order using 8085.

So, here in the following code, I am writing a code to sort numbers in ascending order. start: nop MVI B, 09 ; Initialize counter LXI H, 2200H ;Initialize memory pointer MVI C, 09H; Initialize counter 2 BACK: MOV A, M ;Get the number INX H…
Pragyaditya Das
  • 1,648
  • 6
  • 25
  • 44
0
votes
1 answer

8085 Microprocessors. Opcode needs user argument. Using GNUSim8085

LXI H ; "Load HL with 4000H" MVI M ; "Store 32H in memory location pointed by HL register pair (4000H)" HLT ; "Terminate program execution" Its an 8085 microprocessor code, intended to store 8 data in memory. However when I run the code, I…
Pragyaditya Das
  • 1,648
  • 6
  • 25
  • 44
0
votes
2 answers

8085 assembly: sign extend 8-bit to 16-bit

How to sign extend a group of 8 bit numbers into 16 bits and store them in little endian format. For example I have following data in my memory location. Address = Value 0001 = 03 [counter] 0002 = 05 0003 = 43 0004 = 8C Results: Address…
Sollo
  • 163
  • 11
0
votes
3 answers

Please give me an example where I need to use Push and Pop for 8085

I know push means placing a value on a stack and pop means retrieving the value from the stack (correct me if I am wrong), but what is the purpose of this? When would I need to use Push and Pop and real life? Please give an example so I can…
Layla Haq
  • 1
  • 1
0
votes
0 answers

Taking input and working with numbers in MIPS

I'm working with Emulator 8085A and I am trying to do an exercise, but I can't find any information or examples of taking input and working with it. I have to make an assembly program for MIPS processors which reads 50 numbers from keyboard. We call…