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
because ALU work for 8bit operation not for 16 bit
sign flag parity flag zero flag
there are 5 flags of intel 8085 are: Carry flag(CY), parity flag(P), Auxiliary Carry flag(AC), Zero Flag(Z), Sign flag(S).
Sub a ani 00h xra a
Flags are microprocessor dependent. ie flags are different for different microprocessors. Flag represents the status ( & Type) of the operation performed. Ex: In terms of 8085 we have 5 flags : Zero, Carry, Ac Carry, Parity, Sign Flag register is of 8 bits in this case. These flags can also be used for logic implementation.
no....it does not aff
The ORA A instruction does not change the contents of the accumulator. It does, however, set flags to indicate something about the value of the accumulator. In particular, Z means the result is zero, N means it is negative, and P means it has an odd number of ones.
The 8085 microprocessor has 5 flags: 1. Zero flag: The zero flag is set, when the ALU operation results a zero . 2. Carry flag: If an arithmetic operations results in a carry, this flag is set. 3. Parity flag: This flag is set, when an arithmetic or logical operation results in a data, which has even number of 1s. If otherwise, it is reset. 4. Sign flag: After the execution of an arithmetic or logic operations, if D7 bit of the accumulator is 1, it indicates a negative number and this flag is set. If otherwise, it is reset. 5. Auxiliary Carry flag: used for BCD Operations, During the BCD operations, if D3 bit producing the carry then the AC bit set as1, otherwise the bit is 0. 6. Carry Flag: when a carry is generated by digit D7, then the carry flag set as 1, otherwise the bit will be 0.
JNC is Jump No-Carry, so the carry flag is checked. JNZ is Jump No-Zero, so the zero flag is checked.
Calls Which are based on conditions like flag status are called conditional flags ex:cc(Call if carry) cz(Call if zero) Calls Which are independent of any kind of conditions, are called unconditional call Ex:Call 2030
The compare and subtract instructions in the 8085 both subtract one operand from another, and set flags accordingly. The subtract instruction stores the result in the accumulator, while the compare instruction does not - except for the flags, the compare instruction "throws" the result away.
every odd no. has "1" in its last bit and every even no has "0" (in binary) eg- 2=0010 ,3=0011 4=0100 ,5=0101....and so on so just logically "AND" the no with "01H" using instruction [HAVING THAT NO. IN ACCUMULATOR (A)] ANI 01H so if the no. is even => A=0 (and zero flag is set i.e. "1" but if the no is odd then => A=1 means zero flag is reset i.e. "0" so using instruction "JZ" you can find if the no. if even or odd. :)
i just know 2 of them.. 1. XRA A 2. SUB A