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
exp 4In X? I must assume you mean 4InX or InX^4 Regardless, the derivitive of InX = 1/X
minx
6
Because that is the way Intel designed the INX instruction of the 8085. The 8080 is also the same. INX increments (and DCX decrements) the 16 bit register pairs or BC, DE or HL, depending on what register pair you specify in the INX (or DCX) instruction. To check is the value is 0 after an INX (or DCX) instruction, you need to OR the values of the register pair into the A register. For example..... INX H ;increment HL register pair MOV A,H ; move H register into the accumulator ORA L ; Logical OR it with the L register JZ ADDR ; If 0 then jump to ADDR
Lxi h,xx50 mov a,m inx h mov b,m mvi ,ffh inr c sub b jnc xx08 add b inx h mov m,c inx h mov m,a hlt
INR B increments the B register as an 8-bit value. INX B increments the BC register as a 16-bit value.
INR increment the content of register/memory by 1and result is stored in same place. INX increment the register pair by 1(no flags are affected)
03ABH in the 8085 is ... INX B XRA E
register direct addressing mode
INX H instruction requires 1 machine cycle having 6 T-states because 8-bit instruction operate on 16 bit data (HL) completed in 6 T-states.
mvi c,ooh lxi h,foooh mov a.m lxi h add m jnc inr c inx h mov m,a inx h mov m,c hlt