FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    Lesson 13: Single chip logic and or different degrees

     

    ANL A, RN; A and Rn in RN, and ', the result is sent to A ANL A, Direct; A and Direct in Direct Bit 'and', the result is sent to A ANL A, @ ri; A and the value of the value in the site addressing unit @RI, and the result is sent to A ANL A, # data; a with immediate DATA bit 'and', the result is sent to A ANL DIRECT, A; Direct Medium Value and Value Bit in A and ', the result is sent to Direct ANL DIRECT, # DATA; DIRECT in Direct The number of times DATA bit 'and', and the result is sent to Direct. The key to these instructions is to know what is logical. The logic here is a bit bit and Example: 71h and 56h faults will write two numbers into binary form: (71h) 01110001 (56h) 00100110 The result 00100000 is 20h, from the above formula, the value of the two participating calculations is 0, and the result is 0, two of the same one, the result is 1. Understand the logic and calculation rules, and the results will naturally come out. Note from each instruction Let's take some routines below. Mov A, # 45h; (a) = 45H MOV R1, # 25h; (r1) = 25h MOV 25h, # 79h; (25h) = 79h ANL A, @ R1; 45H and 79H standby, the result is sent to 41h (a) = 41h ANL 25H, # 15H; 25H (79H) and 15H phase with the result (25h) = 11h) The value (11h) in ANL 25H, A; 25H is in the value (41h) of A, the result is (25h) = 11h After knowing the functionality of logic and instructions, logic or logical varying or function is very simple. Logic or bit "or", that is, "1" is 1, "0" is 0. example: 10011000 Or 01100001 Result 11111001 It is the same "different or", the same "0", which is "1". example: 10011000 Different or 01100001 Result 11111001 And all or instructions are to replace ANL in the referral to orl, while the different or instructions are replaced with an XRL. which is Or instructions: ORL A, RN; A and RN value bit 'or', the result is sent to A Orl A, Direct; A and Value Bits 'or' in the address addressing unit @RI, the result is sent to A Orl A, # data; A and stand in Direct Run "or ', the result is sent to A Orl A, @ ri; A and ie Data Bit 'or', the result is sent to A Orl Direct, A; Direct Medium Value and Value Bit 'or' in A. The result is sent to Direct ORL DIRECT, # data; Direct's value and immediate DATA bit "or ', the result is sent to Direct. Different or directive: XRL A, RN; A and RN in the RN value ', the result is sent to A XRL A, Direct; A and Direct's Value Bits 'Differences or', and the result is sent to A XRL A, @ ri; A and the value of the value in the site @RI, the result is sent to A XRL A, # data; a and immediate DATA bit by or ', the result is sent to A XRL Direct, A; Direct Medium Value and the value of the value in A. The result is sent to Direct XRL Direct, # data; value in Direct and immediate DATA bit bit 'is or', and the result is sent to Direct. Exercise: Mov A, # 24h MOV R0, # 37h Orl A, R0 XRL a, # 29h Mov 35h, # 10h ORL 35h, # 29h MOV R0, # 35h ANL A, @ r0 Fourth, control the transfer class instruction Conditional transfer class instruction Short transfer class instruction AJMP Addr11 Long transfer class directive LJMP Addr16 Relative transfer instruction SJMP REL Three instructions above, if you want to analyze it carefully, differences, but when you start learning, you can ignore so much, all understand: JMP markings, that is, jump to a label. In fact, the LJMP label, we have already contacted in the previous routines, and know how to use it. The same is true of AJMP and SJMP. So what is their difference? Different in the range of jumps. It's so far away, and LJMP can jump 64K so far (of course, it is nothing to do). And AJMP can only jump 2k distance, while SJMP can only jump 256 so far. In principle, all places where SJMP or AJMP can be replaced with LJMP. Therefore, when you start learning, you can use LJMP when you need to jump, except for an occasion. What are the occasion? First understand the AJMP, AJMP is a double-byte directive, but also say that this instruction itself takes up two units of the memory (ROM). LJMP is three-byte instructions, ie three units of the memory (ROM). Below is the fourth jump instruction. Indirect transfer instruction JMP @ A + DPTR The purpose of this instruction is also jumping, where is it going? This can not be simply determined by the label. Let us start from an actual routine. MOV DPTR, # Tab; send the address represented by Tab into DPTR Mov A, R0; Number of Number of R0 (see below) Mov B, # 2 MUL A, B; A value in A by 2 (see below) JMP A, @ A + DPTR; jump Tab: AJMP S1; Jump Form AJMP S2 AJMP S3 figure 2 image 3 Application Background: In the microcontroller development, the keyboard is often used, see the keyboard of the 9 buttons above. Our requirements are: When you press the function key A ........G to complete the different features. This is expressed by the language design language, that is: pressing a different key to perform a different block to complete the different functions. How is it realized? Looking at Figure 2, the previous program is read into the value of the button. If the key value obtained after pressing the 'A' button is 0, the value obtained after pressing the 'b' button is '1', and then according to not The same value is jump, and if the key value is 0, it is transformed to S1, and 1 is transferred to S2 execution. . . . How to achieve this feature? Read more

     

     

     

     

    List all Question

    Nickname

    Email

    Questions

    Our other product:

    Professional FM Radio Station Equipment Package

     



     

    Hotel IPTV Solution

     


      Enter email  to get a surprise

      fmuser.org

      es.fmuser.org
      it.fmuser.org
      fr.fmuser.org
      de.fmuser.org
      af.fmuser.org ->Afrikaans
      sq.fmuser.org ->Albanian
      ar.fmuser.org ->Arabic
      hy.fmuser.org ->Armenian
      az.fmuser.org ->Azerbaijani
      eu.fmuser.org ->Basque
      be.fmuser.org ->Belarusian
      bg.fmuser.org ->Bulgarian
      ca.fmuser.org ->Catalan
      zh-CN.fmuser.org ->Chinese (Simplified)
      zh-TW.fmuser.org ->Chinese (Traditional)
      hr.fmuser.org ->Croatian
      cs.fmuser.org ->Czech
      da.fmuser.org ->Danish
      nl.fmuser.org ->Dutch
      et.fmuser.org ->Estonian
      tl.fmuser.org ->Filipino
      fi.fmuser.org ->Finnish
      fr.fmuser.org ->French
      gl.fmuser.org ->Galician
      ka.fmuser.org ->Georgian
      de.fmuser.org ->German
      el.fmuser.org ->Greek
      ht.fmuser.org ->Haitian Creole
      iw.fmuser.org ->Hebrew
      hi.fmuser.org ->Hindi
      hu.fmuser.org ->Hungarian
      is.fmuser.org ->Icelandic
      id.fmuser.org ->Indonesian
      ga.fmuser.org ->Irish
      it.fmuser.org ->Italian
      ja.fmuser.org ->Japanese
      ko.fmuser.org ->Korean
      lv.fmuser.org ->Latvian
      lt.fmuser.org ->Lithuanian
      mk.fmuser.org ->Macedonian
      ms.fmuser.org ->Malay
      mt.fmuser.org ->Maltese
      no.fmuser.org ->Norwegian
      fa.fmuser.org ->Persian
      pl.fmuser.org ->Polish
      pt.fmuser.org ->Portuguese
      ro.fmuser.org ->Romanian
      ru.fmuser.org ->Russian
      sr.fmuser.org ->Serbian
      sk.fmuser.org ->Slovak
      sl.fmuser.org ->Slovenian
      es.fmuser.org ->Spanish
      sw.fmuser.org ->Swahili
      sv.fmuser.org ->Swedish
      th.fmuser.org ->Thai
      tr.fmuser.org ->Turkish
      uk.fmuser.org ->Ukrainian
      ur.fmuser.org ->Urdu
      vi.fmuser.org ->Vietnamese
      cy.fmuser.org ->Welsh
      yi.fmuser.org ->Yiddish

       
  •  

    FMUSER Wirless Transmit Video And Audio More Easier !

  • Contact

    Address:
    No.305 Room HuiLan Building No.273 Huanpu Road Guangzhou China 510620

    E-mail:
    [email protected]

    Tel / WhatApps:
    +8618078869184

  • Categories

  • Newsletter

    FIRST OR FULL NAME

    E-mail

  • paypal solution  Western UnionBank OF China
    E-mail:[email protected]   WhatsApp:+8618078869184   Skype:sky198710021 Chat with me
    Copyright 2006-2020 Powered By www.fmuser.org

    Contact Us