Tuesday, January 12, 2016

FUNCTION INSTRUCTIONS / ORDERS




The commands are grouped by function simultaneously:
1.      Transfer function (transfer function)
What is meant by removal is fill in a register or memory with a data taken from its original location without changing the data in the original place.
·         MOV reg2, reg1   = >   data transfer from register 1 to register 2
·         STA Address     =>   removal of the contents of reg. A memory at the address on the show
·         LDA Address    =>    inverse order STA, which moves data from memory at the show to reg. A
·         STAX preg    =>   as well as STA, it's just not in the show memory address directly, but in the show by the couple registers on show at preg (pair registers)
·         LDAX preg    =>   move data from memory at the register to show the couple reg. A
·         IN PORT     =>   take data from the port number on the show to reg. A
·         OUT PORT    =>   released data from reg. A to the output port
·         LHLD Address    =>   data transfer 16 bits of memory address pointed to HL register pair. Address shown will fill reg. L then the next address will fill reg. H
·         SHLD address     =>   LHLD opposite of command.
·         PUSH preg    =>   save the contents of the register pair to the memory of his address indicated by reg.SP. the contents of registers in the state will be stored in the memory indicated by reg.SP minus one address, ssedangkan partner contents stored underneath.
·         POP preg    =>   move back data that has been stored in advance and put the push command to register shown pairs. After this POP commands dilakasanakan then reg.SP will grow 2 address. Note that after the push command is executed, the address of the SP will be reduced from 2 to each time the data is stored, the data continue to accumulate downwards. Then when the command is executed, the address POP SP will rise 2 continues and the data taken from the address below. Means it is not possible to avoid overlapping of storage for each store SP will go down, nor never will be taking data at the same address for each decision with POP commands SP address increased 2.

2.       Initial function (charging function)
Charging function is to enter the data directly to a place, either to register or to memory.

·         MVI reg, the data     = >   is intended to fill the 8-bit data registers.
·         LXI preg, the data    =>   is intended to fill a couple registers with the data

3.       Logic function (logic function)
Group logic functions are commands in the work based on the data bits separately, so that in analyzing these commands we have to decipher the data in binary form.
·         ANA reg    =>    Doing the AND between the contents of the register A with the contents of the register mentioned.
·         ORI Data    =>    Doing the OR between the contents of the register A with 8 bits of data are mentioned.
·         XRA reg     =>      Doing the EXOR between the register A with the contents of the register mentioned.
·         RAR    =>      Shifts the contents of register A to the right 1 bit, bit LSB will be entered into the carry, while the contents of carry previously entered into bits MSB.

4.       Arithmetic function (arithmetic function)
Arithmetic functions possessed by the microprocessor 8085 is simply the process of addition and subtraction, but it has some way in its implementation. The commands are included in this group are:
·         reg ADD    =>     add the contents of reg, A with the contents of the register mentioned. The sum will be saved back to reg.A.
·         ADC reg     =>     summing reg.A contents with the contents of the register mentioned and add them again with the carry bits before this command is executed.
·          ADI Data    =>   add the contents of reg. A with 8 bits of data are mentioned.
·         SUB reg      =>     reducing reg A with the contents of the register mentioned.
·         SBB reg     =>      reducing reg A register with the contents mentioned and reduced again with the carry bits before the command is executed.
·         SUI Data     =>      reducing the contents of reg. A with 8 bits of data and put the result back to reg.A
·         SBI Data   =>     reducing the content reg A with 8 bits of data and reduce it again with the carry bits previous
·         INR reg   =>    add the contents of the register mentioned in 1 and put it back into the registers.
·         DCR reg   =>     reducing the contents of the register referred to 1
·         DAD reg    =>     add the contents of the register pair specified by the contents of the register pair HL and put the result to register pair HL.
·         INX reg     =>     add the contents of the register pair specified with 1.
·         DCX reg     =>     reducing the contents of the register pair specified with 1.
·         CMP reg     =>      reg.A compare the contents with the contents of the register mentioned. Because only compare the contents of reg. A incomparable or register contents do not change the content / data. This command affects only the status bits in reg. Flag and for use with conditional commands. The comparison process is done together with the reduction in orders SUB reg.
·         CPI Data    =>      comparing the contents of reg. A with 8 bits of data are mentioned.
5.       Interchange function (function exchanges)
Exchanges are intended as the transfer of data from first place to second place while the data is transferred to the place where the first two. Exchange function was shown to exchange the contents of registers 16 bits with other 16-bit registers.
Commands are included in this group are:
·         XCHG     =>     the content exchange between the pair reg.HL with REG.DE
·         SPHL     =>      the content exchange between the pair reg. HL with reg.Sp
·         Pchl        =>     the content exchange between the pair reg. HL with reg.PC

6.       String function (function determination)
Determination question is ensuring a state or condition of being at the desired price. Commands are included in this group are:
·         STC (Set Carry)       =>       Set the Carry bit to 1. With this order we are biased ensure that Carry today is 1. This command we've seen on previous usage.
·         CMC (Complemen Carry)       =>     Used to carry-inverskan bit earlier. This command is used after the command STC to ensure that the carry bit is 0 (zero).
·         CMA (Complemen Accumulator)     =>    Used to-inverse-kan bits reg.A
·         DI (Disable Interrupt)      =>       The command that aims to tell the hardware in order not considering any unterrupt who came during this command has been implemented to meet orders in EI
·         EI (ENABLE INTERRUPT)      =>     The command that aims to allow the return of hardware to accept any interrupt justified. This command customarily in use with AT commands, only AT commands used in the beginning of the program while the command line E1 at the end of the program. Both of these commands are used in the program are in operation do not want to be bothered by other programs to complete.


7.      Jumping function (jump function)
Leap in question is divert the course of the program to the other programs that address mentioned alihannya program with a jump command or function has been set according to the rules.
The transfer of the program from the track caused due to three things:
1.       Repeats re-run the program lines have been run previously
2.       Passing through the area that is not in the desired program
3.       Run the program parts (subroutines)
Unconditional commands are:
·         JMP ADDRESS     =>     The next program will run the program lines of the address mentioned on perinta
·         CALL address    =>       call the program early part of the address as given.
·         RET     =>      commands used to return to the main program.
8.      function fittings
·         DAA (Decimal Adjust Accumulator)        =>       The command that changes the contents of reg. A format BCD (Binary Coded Decimal). This command is used with the arithmetic commands intended for processing data in decimal form instead of hex decimal.

1 comment: