Is PUSH A Instruction Valid in 8085?

In summary, the PUSH A instruction is invalid on the Intel 8085 chip. However, the PUSH PSW (or PUSH A) instruction is the same as the F5 instruction and will be recognized by the assembler.
  • #1
reddvoid
119
1
Is PUSH A Instruction Valid in 8085
I get this doubt because PUSH and POP always acts on register pairs but only register pairs available in 8085 are BC DE HL there is no register to pair with A so ?
 
Engineering news on Phys.org
  • #2
If you want to push the accumulator you do a PUSH PSW. This pushes the 8-bit accumulator and 8-bits worth of flags. (PSW stands for processor state word).

I'm showing my age on this one. Why in the world are you interested in 8085?

Not complaining, I would enjoy reminiscing about this old gem.
 
  • #3
thanks the_emi_guy :biggrin:
this damn entrance test, they have mentioned this 1980's 8085 in their test syllabus
I think its because 8085 is pretty basic and if you master it others can be understood easily :)

So, PUSH A is invalid instruction in 8085?
 
  • #4
The actual instruction (opcode) is an F5. PUSH PSW (or PUSH A) are mnemonics that an assembler would recognize and translate into the cooresponding opcode.

The Intel ICE assemblers that I used (many years ago) recognized only the mnemonic PUSH PSW.
 
  • #5
For example, the Zilog Z80 processor's assembler used the mnemonic PUSH AF for this same instruction (F5).

(Z80 would execute 8080/8085 machine code).
 
  • #6
I'd have to look at my 8085 book. But push a is valid on the Intel 8085 chip. If you google 8085 instruction set there is several pdf books containing the instruction set.
 
  • #7
Just double checked. My 8080/8085 Assembly Langauge Programming Manual (1977) uses the mnemonic PUSH PSW. There is no PUSH A in there.

But the point is PUSH PSW, PUSH A, or PUSH AF are all the same instruction as far as the actual 8085 chip is concerned. The only difference is in what the assembler you are using to assemble your code recognizes.

All the 8085 chip itself will see is an F5 returned from memory at the program counter address during the M1 (instruction fetch) cycle.
 
Last edited:
  • #8
Lol yeah I just dug out my copy from storage you are correct. Been years for myself as well
 
  • #9
reddvoid said:
thanks the_emi_guy :biggrin:
this damn entrance test, they have mentioned this 1980's 8085 in their test syllabus

BTW 1970s!
 

Related to Is PUSH A Instruction Valid in 8085?

1. Is PUSH a valid instruction in the 8085 microprocessor?

Yes, PUSH is a valid instruction in the 8085 microprocessor. It is used to push data from the accumulator or a register onto the stack.

2. What is the purpose of the PUSH instruction in the 8085 microprocessor?

The PUSH instruction in the 8085 microprocessor is used to store data onto the stack. This is useful for saving the current state of the program or for storing temporary data.

3. Can the PUSH instruction be used to push data from any register onto the stack?

Yes, the PUSH instruction can be used to push data from any register onto the stack in the 8085 microprocessor. This includes the accumulator, general purpose registers, and special function registers.

4. How is data pushed onto the stack using the PUSH instruction?

The PUSH instruction in the 8085 microprocessor works by first decrementing the stack pointer by 1, then storing the data from the specified register onto the stack at the memory location pointed to by the stack pointer.

5. Can the PUSH instruction be used in conjunction with other instructions in the 8085 microprocessor?

Yes, the PUSH instruction can be used in conjunction with other instructions in the 8085 microprocessor. It is commonly used with the CALL instruction to store the return address onto the stack before branching to a subroutine.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
7
Views
3K
Replies
13
Views
961
  • Engineering and Comp Sci Homework Help
Replies
10
Views
1K
  • Electrical Engineering
Replies
20
Views
2K
  • Programming and Computer Science
Replies
1
Views
850
  • Introductory Physics Homework Help
Replies
4
Views
931
  • General Math
Replies
33
Views
2K
Replies
14
Views
2K
Replies
13
Views
2K
  • Electrical Engineering
Replies
4
Views
3K
Back
Top