我一直在使用GNU工具链,只是使用数据表中的信息来维护我自己的定义。当然,也有一些像Pinguino这样可以提供可用文件的东西,虽然我不知道它们是否是Microchip提供的其他文件或其他东西。至于不同的指令,我似乎记得LA显然不是真正的指令。Falm是一个伪指令,它产生Li,但它的加载地址源于一个标签,它是由汇编程序查找的,而不是一个作为操作数立即可用的常数。但是,像GNU这样的东西,不管怎么说,都是可以互换的。我倾向于使用常量偏移量来传递任何给定的基寄存器的SET、CLR和IV变量。所以,像这样…显然,我必须定义CLR是适当的偏移量。
以上来自于百度翻译
以下为原文
I've been doing this using the GNU toolchain and just maintaining my own #defines using the information from the datasheets. Of course, there are also things like Pinguino that provide usable files for this purpose, although I don't know if they are the same files that Microchip provides or something else.
As for the different instructions, I seem to recall that
la is apparently not a genuine instruction as such: it is effectively a pseudo-instruction producing
li but with the loaded address originating from a label looked up by the assembler, as opposed to a constant immediately usable as an operand. But things like GNU
as seem to treat them interchangeably anyway.
I tend to use the constant offset to communicate the SET, CLR and INV variants of any given base register. So, something like this...
la $s0, LATA
sw $a0, CLR($s0)
Obviously, I have to #define CLR to be the appropriate offset.
我一直在使用GNU工具链,只是使用数据表中的信息来维护我自己的定义。当然,也有一些像Pinguino这样可以提供可用文件的东西,虽然我不知道它们是否是Microchip提供的其他文件或其他东西。至于不同的指令,我似乎记得LA显然不是真正的指令。Falm是一个伪指令,它产生Li,但它的加载地址源于一个标签,它是由汇编程序查找的,而不是一个作为操作数立即可用的常数。但是,像GNU这样的东西,不管怎么说,都是可以互换的。我倾向于使用常量偏移量来传递任何给定的基寄存器的SET、CLR和IV变量。所以,像这样…显然,我必须定义CLR是适当的偏移量。
以上来自于百度翻译
以下为原文
I've been doing this using the GNU toolchain and just maintaining my own #defines using the information from the datasheets. Of course, there are also things like Pinguino that provide usable files for this purpose, although I don't know if they are the same files that Microchip provides or something else.
As for the different instructions, I seem to recall that
la is apparently not a genuine instruction as such: it is effectively a pseudo-instruction producing
li but with the loaded address originating from a label looked up by the assembler, as opposed to a constant immediately usable as an operand. But things like GNU
as seem to treat them interchangeably anyway.
I tend to use the constant offset to communicate the SET, CLR and INV variants of any given base register. So, something like this...
la $s0, LATA
sw $a0, CLR($s0)
Obviously, I have to #define CLR to be the appropriate offset.
举报