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

6C opcode = INP 4 or INP C?

Expand Messages
  • whd_whd_whd
    I m yet again re-acquainting myself with the 1802 opcodes and instruction set. I wanted to make sure I get this right. Is the Input opcode 6C supposed to be
    Message 1 of 3 , Jun 3, 2011
    • 0 Attachment
      I'm yet again re-acquainting myself with the 1802 opcodes and instruction set.

      I wanted to make sure I get this right.

      Is the Input opcode 6C supposed to be shown as

      INP 4

      or

      INP C

      ???

      I think it's the former, but right now I have it as the latter,
      and I have seen it both ways.
    • Lee Hart
      ... It will depend on your assembler. If an equate sets C=4, then they are the same. The assembler I use (Avocet XASM18) also accepts INP4. -- Lee A. Hart |
      Message 2 of 3 , Jun 3, 2011
      • 0 Attachment
        On 6/3/2011 3:17 PM, whd_whd_whd wrote:
        > I'm yet again re-acquainting myself with the 1802 opcodes and instruction set.
        >
        > I wanted to make sure I get this right.
        >
        > Is the Input opcode 6C supposed to be shown as
        >
        > INP 4
        >
        > or
        >
        > INP C

        It will depend on your assembler. If an equate sets C=4, then they are
        the same.

        The assembler I use (Avocet XASM18) also accepts INP4.

        --
        Lee A. Hart | Ring the bells that still can ring
        814 8th Ave N | Forget the perfect offering
        Sartell MN 56377 | There is a crack in everything
        leeahart earthlink.net | That's how the light gets in -- Leonard Cohen
      • Richard
        The processor has three N lines to encode the selected port. This would normally provide for 8 input and 8 output ports. The 60 and 68 instructions are
        Message 3 of 3 , Jun 3, 2011
        • 0 Attachment
          The processor has three N lines to encode the selected port. This would normally provide for 8 input and 8 output ports. The 60 and 68 instructions are reserved or used for different purposes, so only 7 input and output ports remain.

          Officially, those are INP 1 to INP 7 and OUT 1 to OUT 7, matching the values on the N lines. Some assemblers, however, may allow you to use INP 9 to INP F instead. Personally I would not use this notation to keep my sources more readable and not run into troubles when using another assembler.

          --- In cosmacelf@yahoogroups.com, "whd_whd_whd" <whd_whd_whd@...> wrote:
          >
          > I'm yet again re-acquainting myself with the 1802 opcodes and instruction set.
          >
          > I wanted to make sure I get this right.
          >
          > Is the Input opcode 6C supposed to be shown as
          >
          > INP 4
          >
          > or
          >
          > INP C
          >
          > ???
          >
          > I think it's the former, but right now I have it as the latter,
          > and I have seen it both ways.
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.