PIC 8 odd a machine knowledge of commonly used instruction reads assembly language

  • Time:
  • Click:43
Kinds of each are big sheet piece the instruction system of machine does not have versatility, it is by sheet piece engine production manufacturer sets, so the user must follow the standard that manufacturer sets, ability achieves applied sheet piece the purpose of machine. PIC 8 odd a machine is mutual 3 level, have corresponding instruction market. Chip of series of radical step PIC shares an instruction 33, every instruction is 12 words grow; Chip of intermediate PIC series shares an instruction 35, every instruction is 14 words grow; Chip of advanced PIC series shares an instruction 58, every instruction is 16 words grow. Its instruction is down compatible. Here author introduction PIC 8 odd the composition that assembly language dictates reachs a machine the function of the symbol in the instruction, when reading relevant book and material in order to offer abecedarian frequent learn the rudiments of a subject. One, instruction of assembly language of small controller of series of PIC of   of form of statement of PIC assembly language and MCS-51 set are single a machine assembly language is same, instruction of every assembly language divides composition by 4 ministries, its write a format to be as follows: Operand of mnemonic of grade command code 1, operand 2; Annotate dictates the format explains as follows: Segregation magic figures drawn by Taoist priests to invoke or expel spirits and bring good or ill fortune is made by blank space between 4 parts of the instruction, blank space can be 1 case or much style, in order to assure alternate collection when, the PC can identify an instruction. 1  grade and MCS-51 set are single a machine function is same, grade represents the symbolic address of the instruction. When program collection, already taxed the particular numerical value with instruction memory address. Symbolic address is used in assembly language (namely grade) it is to facilitate examine, revise, facilitate the instruction transfers the expression of the address especially. Grade is those who dictate the format is medium is optional, just require the grade on the clique when be cited by other statement only. Below the circumstance that does not have grade, one must be withheld before instruction mnemonic or the blank space of an above writes instruction mnemonic again. Instruction mnemonic cannot take up the position of grade, otherwise this mnemonic can be made by assembler grade is handled by accident. When writing grade, setting the first character must be letter or half horn underline " , " , (of English and digital character, colon can follow at the back of it: ) the watch that make magic figures drawn by Taoist priests to invoke or expel spirits and bring good or ill fortune, can combine arbitrarily. Again grade cannot express with the code name of command code mnemonic and register. Grade also can take group alone. Mnemonic of 2  command code this field is an instruction surely option. This can be instruction mnemonic, also can reach grand command composition by bogus instruction, its action is to be when alternate collection, "Mnemonic of instruction command code " with " command code is expressed " undertake one by one is compared, find out its corresponding machine to pile up one generation. 3  operand is worth by the data of operand or with the symbol denotive data or address are worth composition. If operand has two, comma (is used between two operand, ) apart. When operand it is invariable when, constant can be decimal or binary system, the octal system, hexadecimal number. Still can be the grade that has been defined, string and ASC Ⅱ code. Specific when expressing, the regulation is in the coronal before the binary system is counted with the letter " B " , for example B10011100; The coronal before octal number with the letter " O " , for example O257; The coronal before decimal numeral with the letter " D " , for example D122; The coronal before hexadecimal number with " H " , for example H2F. Here PIC 8 odd acquiesce takes a chance making is hexadecimal, ox is added before hexadecimal number, if H2F can be written into Ox2F. The operand of the instruction also be optional. PIC series and MCS-51 series 8 sheet piece opportunity is same, existence finds location method, namely the origin of operand or whereaboutldirection problem. Because PIC series small controller used compact instruction part (RISC) construction system, its seek location means and injunction already little and simple. Its find location means ground of operand origin different, can divide search to be counted instantly location, direct search location, register secondhand location and find site 4 kinds. PIC set is so single the operand with a machine medium instruction often goes out to concern register symbol now. The concerned example that find site, all can find at the back of of the article. 4  annotate uses pair of programs to make some of specification, facilitating people reader. Semicolon (is used before annotate begins; ) divide be apart with other ministry. Detect when assembler when semicolon, the character at the back of its is handled no longer. Notable: The function that condition of the entry conditions that should show a program when using a subprogram, exit and this program should fulfil and action. 2, to clear dictates (in all 4) 1  of     example of instruction of register to clear: CLRW; Register W is shown by to clear: This instruction is very simple, among them W is PIC sheet piece the working register of machine, be equivalent to MCS-51 series sheet piece the accumulator A in machine, CLR is the abbreviate letter of English Clear. To clear of timer of 2  watchdog dictates. Example: CLRWDT; Watchdog timer to clear (if already assigned, at the same time clear beforehand scale down implement)   explains: WDT is the abbreviate letter of English Watchdog Timer. CLR sees afore-mentioned specifications. Notice these two instructions do not have operand. To clear of F of 3  register dictates. Statement form: Example of CLRF F   : CLRF TMRO; Explain to TMRO to clear: In PIC series 8 sheet piece in machine, f(of commonly used symbol or F) delegate piece inside all sorts of sending Cheng implement the serial number address with F. F takes a value to differ by PIC series model and different, it is Ox00 ~ Ox1F/7F/FF commonly. TMRO represents timer / tally TMRO, CLRF is so right send Cheng implement to clear, used the direct way that find site to give out directly the register TMRO that wants a visit. 4  to clear instruction. Statement form BCF F, b   example: BCF REG1, 2; The D2 register REG1 to clear explains: BCF is the abbreviate of English Bit Clear F. The F in statement form, alexandrine specification; Symbolic B is to express PIC piece inside a date of F of register of 8 a certain data (or address) , so the extraction of B is worth for 0 ~ 7 or D0 ~ D7. The REG in example is the abbreviate of Register. The B=2 in the form of 2 delegates statement in example namely the D2 of register REG1. Pass forms of afore-mentioned statement of 4 to clear and example, can explain, study PIC series 8 sheet piece the mnemonic significance that the instruction should understand above all when the instruction of machine (functional) , have the expressive kind that is it again. Abecedarian was not necessary dead to mark a statement, if understanding is mixed,carry out again. CNC Milling