Loading ...
Sorry, an error occurred while loading the content.

opcodes & macro ?

Expand Messages
  • Vasile Surducan
    Hi Wouter, still alive? There is somewhere on your site a brief with special instruction mnemonics used by jal compiler ? I ve noticed the skpnc or skpc are
    Message 1 of 4 , Mar 7, 2001
    • 0 Attachment
      Hi Wouter,
      still alive?

      There is somewhere on your site a brief with special instruction mnemonics
      used by jal compiler ?
      I've noticed the skpnc or skpc are defined but bnc or bnz are not.
      But a list with macros supported by jal ?

      Vasile
    • wouter van ooijen & floortje hanneman
      Some questions are much easier than others ;) The following snippet from the compiler source shows the supported opcodes: addlw , andlw , call ,
      Message 2 of 4 , Mar 7, 2001
      • 0 Attachment
        Some questions are much easier than others ;)

        The following snippet from the compiler source shows the supported opcodes:

        "addlw", "andlw", "call", "clrwdt", "goto",
        "iorlw", "movlw", "option", "retfie", "retlw",
        "return", "sleep", "sublw", "tris", "xorlw",
        "addwf", "andwf", "clrf", "clrw", "comf",
        "decf", "decfsz", "incf", "incfsz", "retiw",
        "iorwf", "movf", "movwf", "nop",
        "rlf", "rrf", "subwf", "swapf", "xorwf",
        "bcf", "bsf", "btfsc", "btfss",
        "skpz", "skpnz", "setz", "clrz",
        "skpc", "skpnc", "setc", "clrc",
        "skpdc", "skpndc", "setdc", "clrdc",
        "movfw", "tstf", "bank", "page"

        Note that some opcodes are not supported on all targets (for instance no
        addlw on 12c509, and page does not mean much on a 16x84).

        Wouter

        ----- Original Message -----
        From: Vasile Surducan <vasile@...-cj.ro>
        To: <jallist@yahoogroups.com>
        Sent: Wednesday, March 07, 2001 10:28 AM
        Subject: [jallist] opcodes & macro ?


        >
        > Hi Wouter,
        > still alive?
        >
        > There is somewhere on your site a brief with special instruction mnemonics
        > used by jal compiler ?
        > I've noticed the skpnc or skpc are defined but bnc or bnz are not.
        > But a list with macros supported by jal ?
        >
        > Vasile
        >
        >
        >
        >
        >
        > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
        >
        >
        >
      • Vasile Surducan
        ... I was thinking at your macros like var byte x asm bank movfw 0x81 if( target_chip == pic_16f877 ) then bank_1 end if asm bank movwf x if( target_chip ==
        Message 3 of 4 , Mar 8, 2001
        • 0 Attachment
          On Wed, 7 Mar 2001, wouter van ooijen & floortje hanneman wrote:

          > Some questions are much easier than others ;)

          I was thinking at your macros like

          var byte x
          asm bank movfw 0x81
          if( target_chip == pic_16f877 ) then bank_1 end if
          asm bank movwf x
          if( target_chip == pic_16f877 ) then bank_0 end if
          return x

          I would love ( from a looong time ), to know how is used bank macro
          here...
          Vasile



          >
          > The following snippet from the compiler source shows the supported opcodes:
          >
          > "addlw", "andlw", "call", "clrwdt", "goto",
          > "iorlw", "movlw", "option", "retfie", "retlw",
          > "return", "sleep", "sublw", "tris", "xorlw",
          > "addwf", "andwf", "clrf", "clrw", "comf",
          > "decf", "decfsz", "incf", "incfsz", "retiw",
          > "iorwf", "movf", "movwf", "nop",
          > "rlf", "rrf", "subwf", "swapf", "xorwf",
          > "bcf", "bsf", "btfsc", "btfss",
          > "skpz", "skpnz", "setz", "clrz",
          > "skpc", "skpnc", "setc", "clrc",
          > "skpdc", "skpndc", "setdc", "clrdc",
          > "movfw", "tstf", "bank", "page"
          >
          > Note that some opcodes are not supported on all targets (for instance no
          > addlw on 12c509, and page does not mean much on a 16x84).
          >
          > Wouter
          >
          > ----- Original Message -----
          > From: Vasile Surducan <vasile@...-cj.ro>
          > To: <jallist@yahoogroups.com>
          > Sent: Wednesday, March 07, 2001 10:28 AM
          > Subject: [jallist] opcodes & macro ?
          >
          >
          > >
          > > Hi Wouter,
          > > still alive?
          > >
          > > There is somewhere on your site a brief with special instruction mnemonics
          > > used by jal compiler ?
          > > I've noticed the skpnc or skpc are defined but bnc or bnz are not.
          > > But a list with macros supported by jal ?
          > >
          > > Vasile
          > >
          > >
          > >
          > >
          > >
          > > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
          > >
          > >
          > >
          >
          >
          >
          >
          >
          > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
          >
          >
        • wouter van ooijen & floortje hanneman
          ... I do not fully understand what you want to know, but: There are no macro s in that piece of code (in fact Jal does not support macro s at all, except for
          Message 4 of 4 , Mar 8, 2001
          • 0 Attachment
            > I was thinking at your macros like
            >
            > var byte x
            > asm bank movfw 0x81
            > if( target_chip == pic_16f877 ) then bank_1 end if
            > asm bank movwf x
            > if( target_chip == pic_16f877 ) then bank_0 end if
            > return x
            >
            > I would love ( from a looong time ), to know how is used bank macro
            > here...

            I do not fully understand what you want to know, but:

            There are no macro's in that piece of code (in fact Jal does not support
            macro's at all, except for the build-in aliases like skpnz). bank_1 and
            bank_0 are procedures defined elsewhere.

            The if
            if( target_chip == pic_16f877 ) then
            behaves a little bit like a macro in the sense that it is evaluated at
            compile time (because target_chip and pic_16f877 are constants) so at run
            time there is either the call to bank_1 or nothing.

            The pseudo-instructions bank are implemented for SX and 12C509 in-line
            assembly and translate to the SX bank instruction and for the 12C509 to an
            appropriate BCF or BSF.

            regards,
            Wouter

            PS my firewall is still not running, but I am making progress. Damn the
            SuSe-linux installer for not running in 8 Mb, SuSe for denying installation
            support because they have brought out a new version, my old PC for not
            understanding the geometry of a 3 Gb disk, my new CD-drive for not
            functioning well under linux, my old CD-drive for not booting, the earth for
            having only 24 hours in a day, myself for not understanding all this, and
            praise the internet because the answer to all your questions is out there
            somewhere if only you could find the right query for google to bring up the
            right page!
          Your message has been successfully submitted and would be delivered to recipients shortly.