12.07.2015 Views

MAXQ Core Assembly Guide - Maxim

MAXQ Core Assembly Guide - Maxim

MAXQ Core Assembly Guide - Maxim

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>MAXQ</strong> <strong>Core</strong> <strong>Assembly</strong> <strong>Guide</strong>The additional information needed when selecting extended source and destination register indexes is provided bywriting to a particular PFX index, from 0 to 7.Table 5. Prefix Register IndexingPFX Destination Accesses Destination Index Accesses Source IndexesPFX[0] 0 – 7 0 – 15PFX[1] 0 – 7 16 – 31PFX[2] 8 – 15 0 – 15PFX[3] 8 – 15 16 – 31PFX[4] 16 – 23 0 – 15PFX[5] 16 – 23 16 – 31PFX[6] 24 – 31 0 – 15PFX[7] 24 – 31 16 – 31When writing PFX in this manner to set the extended bits for source and destination, the following instructionshould contain only the low-order bits of the source and destination (0-7 for destination and 0-15 for source) toavoid generating an additional, unneeded prefix instruction. This is identical to the code automatically generatedby the assembler.If both the source and destination are registers, the actual value written to PFX is unused, but it must still be writtento select the high-order destination and source bits.7: 0004: 8000 move M0[0], M0[0] ; No prefix needed9: 0005: 1B00 move PFX[1], #00h ; Manual version10: 0006: 8000 move M0[0], M0[0]11: 0007: 1B0011: 0008: 8000 move M0[0], M0[16] ; Automatic version13: 0009: 2B00 move PFX[2], #00h ; Manual version14: 000A: 9000 move M0[1], M0[0]15: 000B: 2B0015: 000C: 9000 move M0[9], M0[0] ; Automatic version17: 000D: 3B00 move PFX[3], #00h ; Manual version18: 000E: 9020 move M0[1], M0[2]19: 000F: 3B0019: 0010: 9020 move M0[9], M0[18] ; Automatic version21: 0011: 4B00 move PFX[4], #00h ; Manual version22: 0012: 8000 move M0[0], M0[0]23: 0013: 4B0023: 0014: 8000 move M0[16], M0[0] ; Automatic version25: 0015: 5B00 move PFX[5], #00h ; Manual version26: 0016: B040 move M0[3], M0[4]27: 0017: 5B0027: 0018: B040 move M0[19], M0[20] ; Automatic versionVersion 1.2 23 of 43 March 7, 2007

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!