IXP1200 Programming: The Microengine Coding Guide for the Intel IXP1200 Network Processor Family

This book provides many examples of microengine assembly code, most of it generated by the microengine C compiler. Microengine assembly language can be difficult to read if you are not familiar with it. This appendix is a crash course in figuring out what this microengine assembly code does, although it doesn t supply enough information to start writing microengine assembly code, and it is not a replacement for the Microcode Programmer s Reference Manual.
Microengine assembly code instructions are contained on a single line of code. They follow this basic format:
opcode[param1, param2, ...], opt1, opt2, ...
The opcode is like an opcode in any other architecture s assembly language. It describes the action being taken. For examble, the ALU opcode indicates that the Arithmetic Logic Unit is being used to perform some computation.
Different opcodes have different parameter lists, and only NOP (no operation) has no parameter list at all. A common opcode is the ALU opcode. Its parameter list looks like this:
lu[dest_reg, a_operand, op, b_operand] <a name="4425"></a><a name="beginpage.EB0082C0-9C91-4748-8F07-18EC36FD463E"></a>
For the alu instruction, the dest_reg parameter is a register where the result of the computation is placed. The op parameter is a symbol describes the computation performed. Examples are " + " for addition, and " B " for copying the b_operand into the dest_reg. The a_operand and b_operand parameters are the two numbers being used in the computation. They can be registers, immediates, or "don t care"s (denoted by " -- "). The "don t care" values...