#31 Support for undowumented opcodes

None
closed
Borut Ražem
None
5
2013-01-01
2007-01-15
Anonymous
No

Hi,

MPASM supports three undocumented opcodes, tret, trap, and halt.

tret and trap are used under the 18F family of chips to implement debugging. I amd not sure what halt is used for.

If the following code is compiled under mpasm these undocumented opcodes can be seen in the .LST file.

    list p=PIC18F2550
    errorlevel      -226
    include p18f2550.inc

    org     0
    tret
    halt
    trap
    end

Discussion

  • Logged In: NO

    A more generic/portable way to accomodate this and similar requests in the future might be
    to provide a dynamically editable mapping of ascii mnemonics and their binary opcodes,
    (including bit info for parameter storage). So that new/undocumented opcodes can be easily
    used in the assembler simply by modifying the mnemonic/opcode mapping, so that new opcodes
    can easily take effect immediately.

    In the long run this might even make it easier for contributors to add support for others
    targets, simply by providing a plaintext mnemonic/opcode mapping including some meta
    information.

     
  • Borut Ražem
    Borut Ražem
    2013-01-01

    Implemented in svn revision #927.

    ... to provide a dynamically editable mapping of ascii mnemonics and their binary opcodes, ...

    I don't see much benefit doing this since I believe that all the opcodes are now supported. It is very easy to add a new opcodes to the tables in gpopcode.c file if something is still missing.

    In the long run this might even make it easier for contributors to add support for others targets ...

    It is much more then the opcode table that defines the target so just adding a new table won't help much. OTOH gputils is FOSS so a new target can be easily added to the existing ones or a fork can be made if it makes sense: the source code is available to anyone all the time!

    Borut

     
  • Borut Ražem
    Borut Ražem
    2013-01-01

    • status: open --> closed
    • assigned_to: Borut Ražem
    • milestone: --> None
     


Anonymous


Cancel   Add attachments