answersLogoWhite

0

What is LDAX?

Updated: 11/10/2022
User Avatar

Wiki User

14y ago

Best Answer

The LDAX/STAX instuctions in the 8085 load and store the accumulator. The target address used is contained in either the BC register pair (LDAX D), or the DE register pair (LDAX D).

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is LDAX?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the full form of LDAX?

The full form of LDAX is load accumulator from memory pointed by extended register denoted as "rp". It occupies only one byte in memory and the target address is contained in either the BC or DE register pair.


How do you do addition of 32 bit numbers in 8085?

In order to add 32 bit numbers in the 8085, you need to add them 8 bits at a time, tracking the carrys between each add. LXI B,first_number LXI H,second_number LXI D,result LDAX B ;first byte - no carry in ADD M STAX D INX B; point to next byte INX D INX H LDAX B ;second byte - carry in ADC M ;note the ADC instead of ADD STAX D INX B; point to next byte INX D INX H LDAX B ;third byte - carry in ADC M STAX D INX B; point to next byte INX D INX H LDAX B ;fourth - carry in ADC M STAX D


How many machine cycle are required in LDAX rp?

4 CYLES; 1 fetch+1 lower byte read+1 higher byte read+1 resding of data pointed by Rp


Why do use cisc and risc processor?

in cisc concept instruction set is complex but in case of risc the ins truction are reduced. for example for mov operation many instruction are there as mov,mvi,sta,lda,lhld,shld,stax,ldax etc. but in case of risc only load and store(lda ,sta) are used for all as in case of ARM processors.


What is a direct address in language?

It means speaking to someone directly. Susan, clean up your room. Bob, hand me a flashlight. I told you already, Mom, I am not going. In these sentences, the direct address is to Susan, Bob, and Mom.


Program for block transfer in 8085?

Block transfer in 8085... PUSH FLAGS {optional, if registers need to be saved} PUSH B PUSH D PUSH H LXI H,COUNT LXI B,SOURCE LXI D,DESTINATION LOOP LDAX B STAX D INX B INX D DCX H MOV A,H ORA L JNZ LOOP POP H {optional, if registers need to be saved} POP D POP B POP FLAGS


Can you give a 8085 program to reverse the memory block within the same block?

; push bytes on to stackLXI H,start addressMVI C,number of bytesLOOP1:MOV A,MPUSH PSWDCR CJNZ LOOP1; pop bytes in reverse order off of stackLXI H,start addressMVI C,number of bytesLOOP2:POP PSWMOV M,ADCR CJNZ LOOP2Alternate Answer: (Not using the stack)LXI B, start addressLXI D, end addressLOOP1:LDAX B get first byteMOV H,A save itLDAX D get last byteSTAX B store in first byte positionMOV A,H retrieve last byteSTAX D store in last byte positionINX B increment first byte addressDCX D decrement last byte addressMOV A,B loop until addresses crossCMP DJNC LOOP1MOV A,CCMP EJNC LOOP1


Difference between direct addressing mode and indirect addressing mode in detail?

Direct addressing mode means the operand address is contained in the instruction. In the 8085, an example is LDA 1234H, which loads the accumulator with the contents of memory location 1234H. In the 8086/8088, an example is MOV AL,[1234H], which accomplishes nearly the same thing.Indirect addressing mode means the operand address is contained in a register. In the 8085, an example is LDAX B, which loads the accumulator with the contents of the memory location specified in register BC. In the 8086/8088, an example is MOV AL,[BX], which accomplishes nearly the same thing.


Write 8085 program on selection sort algorithm?

LXI H,C000H //the length of the string is in C000 memory location//MOV C,MMVI E,00HLOOP1: LXI H,C001H // string starts from C001 H //MOV B,CINX HCMP MJNC LOOP3JZ LOOP3MOV D,MINR E // THIS IS TO CHECK WHETHER THE STRING IS ALREADYSORTED OR NOT //MOV M,ADCX HMOV M,DINX HLOOP3: DCR BJNZ LOOP2MOV A,ESUI 00HJZ LOOP4DCR CJNZ LOOP1LOOP4: HLT


Difference between direct addressing mode and indirect addressing modein8085 microprocessor?

When a microprocessor wants to store a byte of information in memory, or retrieve a byte of information from memory, it needs to refer to the address of the byte in the instruction. When direct addressing is used then the microprocessor instruction refers explicitly to the address that is to be used. When indirect addressing is used then the microprocessor instruction refers to a third object that refers to the address that is to be used. So, for example: Direct addressing: (*) Store the data at address 0x3C6E (*) Deliver the letter to house 12 on the street. Indirect addressing: (*) Store the data at whatever address is in register AX. (*) Deliver the letter to whichever house the occupant of house 7 tells you. So, in indirect addressing, the microprocessor instruction refers to some other "third-party" location (a register or another memory location) to find-out what the ultimate address to be used should be. The instruction does not contain all of the information needed to store the byte (or deliver the letter) but it does say where the missing information can be found. In direct addressing, the instruction contains all of the information needed to store the byte (or deliver the letter). This is basically true for all microprocessors but different microprocessors allow different forms of indirect addressing. For example, some use memory indirect addressing (the third party is another memory location), and some use register indirect addressing (the third party is a register).


Where can you find an opcode sheet for 8085 microprocessor?

ACI n |CE|*****| 7|Add with Carry Immediate |A=A+n+CY | |ADC r |8F|*****| 4|Add with Carry |A=A+r+CY(21X)| |ADC M |8E|*****| 7|Add with Carry to Memory |A=A+[HL]+CY | |ADD r |87|*****| 4|Add |A=A+r (20X)| |ADD M |86|*****| 7|Add to Memory |A=A+[HL] | |ADI n |C6|*****| 7|Add Immediate |A=A+n | |ANA r |A7|****0| 4|AND Accumulator |A=A&r (24X)| |ANA M |A6|****0| 7|AND Accumulator and Memory|A=A&[HL] | |ANI n |E6|**0*0| 7|AND Immediate |A=A&n | |CALL a |CD|-----|18|Call unconditional |-[SP]=PC,PC=a| |CC a |DC|-----| 9|Call on Carry |If CY=1(18~s)| |CM a |FC|-----| 9|Call on Minus |If S=1 (18~s)| |CMA |2F|-----| 4|Complement Accumulator |A=~A | |CMC |3F|----*| 4|Complement Carry |CY=~CY | |CMP r |BF|*****| 4|Compare |A-r (27X)| |CMP M |BF|*****| 7|Compare with Memory |A-[HL] | |CNC a |D4|-----| 9|Call on No Carry |If CY=0(18~s)| |CNZ a |C4|-----| 9|Call on No Zero |If Z=0 (18~s)| |CP a |F4|-----| 9|Call on Plus |If S=0 (18~s)| |CPE a |EC|-----| 9|Call on Parity Even |If P=1 (18~s)| |CPI n |FE|*****| 7|Compare Immediate |A-n | |CPO a |E4|-----| 9|Call on Parity Odd |If P=0 (18~s)| |CZ a |CC|-----| 9|Call on Zero |If Z=1 (18~s)| |DAA |27|*****| 4|Decimal Adjust Accumulator|A=BCD format | |DAD B |09|----*|10|Double Add BC to HL |HL=HL+BC | |DAD D |19|----*|10|Double Add DE to HL |HL=HL+DE | |DAD H |29|----*|10|Double Add HL to HL |HL=HL+HL | |DAD SP |39|----*|10|Double Add SP to HL |HL=HL+SP | |DCR r |3D|****-| 4|Decrement |r=r-1 (0X5)| |DCR M |35|****-|10|Decrement Memory |[HL]=[HL]-1 | |DCX B |0B|-----| 6|Decrement BC |BC=BC-1 | |DCX D |1B|-----| 6|Decrement DE |DE=DE-1 | |DCX H |2B|-----| 6|Decrement HL |HL=HL-1 | |DCX SP |3B|-----| 6|Decrement Stack Pointer |SP=SP-1 | |DI |F3|-----| 4|Disable Interrupts | | |EI |FB|-----| 4|Enable Interrupts | | |HLT |76|-----| 5|Halt | | |IN p |DB|-----|10|Input |A=[p] | |INR r |3C|****-| 4|Increment |r=r+1 (0X4)| |INR M |3C|****-|10|Increment Memory |[HL]=[HL]+1 | |INX B |03|-----| 6|Increment BC |BC=BC+1 | |INX D |13|-----| 6|Increment DE |DE=DE+1 | |INX H |23|-----| 6|Increment HL |HL=HL+1 | |INX SP |33|-----| 6|Increment Stack Pointer |SP=SP+1 | |JMP a |C3|-----| 7|Jump unconditional |PC=a | |JC a |DA|-----| 7|Jump on Carry |If CY=1(10~s)| |JM a |FA|-----| 7|Jump on Minus |If S=1 (10~s)| |JNC a |D2|-----| 7|Jump on No Carry |If CY=0(10~s)| |JNZ a |C2|-----| 7|Jump on No Zero |If Z=0 (10~s)| |JP a |F2|-----| 7|Jump on Plus |If S=0 (10~s)| |JPE a |EA|-----| 7|Jump on Parity Even |If P=1 (10~s)| |JPO a |E2|-----| 7|Jump on Parity Odd |If P=0 (10~s)| |JZ a |CA|-----| 7|Jump on Zero |If Z=1 (10~s)| |LDA a |3A|-----|13|Load Accumulator direct |A=[a] | |LDAX B |0A|-----| 7|Load Accumulator indirect |A=[BC] | |LDAX D |1A|-----| 7|Load Accumulator indirect |A=[DE] | |LHLD a |2A|-----|16|Load HL Direct |HL=[a] | |LXI B,nn |01|-----|10|Load Immediate BC |BC=nn | |LXI D,nn |11|-----|10|Load Immediate DE |DE=nn | |LXI H,nn |21|-----|10|Load Immediate HL |HL=nn | |LXI SP,nn|31|-----|10|Load Immediate Stack Ptr |SP=nn | |MOV r1,r2|7F|-----| 4|Move register to register |r1=r2 (1XX)| |MOV M,r |77|-----| 7|Move register to Memory |[HL]=r (16X)| |MOV r,M |7E|-----| 7|Move Memory to register |r=[HL] (1X6)| |MVI r,n |3E|-----| 7|Move Immediate |r=n (0X6)| |MVI M,n |36|-----|10|Move Immediate to Memory |[HL]=n | |NOP |00|-----| 4|No Operation | | |ORA r |B7|**0*0| 4|Inclusive OR Accumulator |A=Avr (26X)| |ORA M |B6|**0*0| 7|Inclusive OR Accumulator |A=Av[HL] | |ORI n |F6|**0*0| 7|Inclusive OR Immediate |A=Avn | |OUT p |D3|-----|10|Output |[p]=A | |PCHL |E9|-----| 6|Jump HL indirect |PC=[HL] | |POP B |C1|-----|10|Pop BC |BC=[SP]+ | |POP D |D1|-----|10|Pop DE |DE=[SP]+ | |POP H |E1|-----|10|Pop HL |HL=[SP]+ | |SUB r |97|*****| 4|Subtract |A=A-r (22X)| |SUB M |96|*****| 7|Subtract Memory |A=A-[HL] | |SUI n |D6|*****| 7|Subtract Immediate |A=A-n | |XRA r |AF|**0*0| 4|Exclusive OR Accumulator |A=Axr (25X)| |XRA M |AE|**0*0| 7|Exclusive OR Accumulator |A=Ax[HL] | |XRI n |EE|**0*0| 7|Exclusive OR Immediate |A=Axn | |XTHL |E3|-----|16|Exchange stack Top with HL|[SP]<->HL |SBB r |9F|*****| 4|Subtract with Borrow |A=A-r-CY | |SBB M |9E|*****| 7|Subtract with Borrow |A=A-[HL]-CY | |SBI n |DE|*****| 7|Subtract with Borrow Immed|A=A-n-CY


How do you draw timing diagram for 8085 microprocessor CMP instruction?

how to draw timing diagram?discuss the various stepsYou first need to understand the machine cycles of 8085The status signals are as followsIO/M(bar) :--- 1 IO 0 MemoryS1 | S0 | Process-----------------------------------------------------------0 | 0 | Halt0 | 1 | Write1 | 0 | Read1 | 1 | Opcode fetch1)Opcode fetch ( Compulsory Machine cycle)This cycle requires 4 T-states.1st T state ALE is high and lower byte of address from PC(Program Counter) is placed on the multiplexed data/address bus.In the second T-state, after checking the status of READY pin, RD(bar) goes low the opcode is placed on the data bus, This state continues in the 3rd T-State.The fourth T-state is used by the uP to decode the instruction and to generate the relevant control signals. The state of the address bus is unspecified( This T-state is used by some DMA controllers to transfer data in hidden/transperant mode)IO/M_ = 0 S1=1 S0=12)Memory read(for 1 byte)Three T states, similar to the first 3 T states of opcode fetch( as first 3 states of opcode fetch is effectively memory read)IO/M_ 0 S1 = 1 S0 = 03) Memory Write(for 1 byte)Similar to Write but instead of RD bar WR bar is used. Also the data stays on the bus a little longer than READ*.IO/M_ 0 S1 = 0 S0 = 14) & 5) IO write and readSimlar to the above two, only IO/M_ = 1These are the basic machine cycles you will require to draw timing diagrams for most instructions. There are additional cycles such as INTA bar and Bus idle. If anyone requires diagrams for these cycles, message me and i will explain them later.Also some instructions like CALL require 6 T-state Opcode fetch. For this you can draw the 4 T state Opcode fetch but 4th T state extended to the fifth and sixth T state.------------------------------------------------------------------------------------------Now, to draw the timing diagram for any instruction you need to understand what exactly the instruction does. I will explain a few. If you need a specific instruction, msg me.A) MOV A,BDraw only opcode fetch as no further memory acces is required as operands specified in registers onlyB) MVI A,32HDraw opcode fetch and memory read as operand(1 byte) has to be fetched from memoryC) LXI H, 2000HDraw Opcode Fetch and two memory Reads as two bytes, 00H and 20H, (lower byte fetched first) have to be read from memory.D) STA 2000HThis instruction stores the value of accumulator(8 bit) at the location specified.Opcode fetch + Memory read * 2 (byte address) + Memory write * 1(1 byte)i.e 13 T-states 4+3+3+3During the memory write the address bus contains the address fetched by the memory read cycle earlierE) CALL addresss(can be specifed in terms of a label)During a call instruction the uP pushes the current value of program counter(16 bit ie 2 byte) to the stack and then copies the new value from the memory(specified in the instruction)6 T state Opcode fetch+ Memory write * 2 (PC pushed to stack)+ Memory read * 2 (New value of PC fetched from memory)ie 6 + 3 + 3 + 3 + 3 = 18 T-statesNote that during the memory write cycle the address bus contains the address of the top of the stack(Stack Pointer)F)JMP 16-bit address3 Cycles as Follows4 T-State Opcode Fetch+ 2 * Memory Read ( 16 bit = 2 bytes)ie 4 + 3 + 3 = 10 T-states.Note that separate cycle is not required for loading the address into the PC as PC is a register.