/****************************************************************************** The values which the registers (should) have upon exiting Shared_Setup(): R0 no specific value; available to be used R1 has the value 0 R3:R2 pointer to the BYTE count WORD before the data BYTEs R4-R10 no specific values; available to be used R11 3 MSBits: G,R,B enable; 1:Z, 4 LSBits: Port index uVars.B[ n+1 ] R12 bPortPins, the output pins selected uVars.B[ n+2 ] R13 bIncrDecr, the increment or decrement amount uVars.B[ n+3 ] R14 bMaxBright, the maximum color output value uVars.B[ n+4 ] R15 uVars.B[] adder in the 328P; unused & available in 1284P & 2560 R16 no specific value; available to be used R17 Mode Specific BYTE #1 uVars.B[ n+7 ] R18 Mode Specific BYTE #2 uVars.B[ n+8 ] R19 Mode Specific BYTE #3 uVars.B[ n+9 ] R21:R20 number of data BYTES (pixels * 3) to write R22 scratch (values OR'd together) R23 no specific value; available to be used R25:R24 pointer to the HEAP; available to be used R27:R26 wLEDCount WORD pixel count uVars.B[ n+5, n+6 ] R29:R28 base SRAM address for uVars.B[ n ] R31:R30 pointer to the starting data location (= R3:R2 + 2) As an example, these 2 configurations: 0200: 01 E2 1C FF FF 27 00 00-28 08 C8 00 05 00 FF FF .....'..(....... 0210: 00 E2 1C FF FF 28 00 00-08 28 C8 00 05 00 FF FF .....(...(...... Generate these register set upon entry, when called with R24 = 0: 10 32 54 76 98 1110 1312 1514 1716 1918 2120 2322 2524 2726 2928 3130 ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- 0000 027E 1081 8128-0000 E210 FF1C 00FF-0000 2808 0078 0328-027E 0028 0200 0280 0000 027E 1081 8128-0000 E200 FF1C 00FF-0000 0828 0075 0327-027E 0027 0200 0280 Passed: R3:R2 pointing to the BYTE count WORD before the data (as above) R29:R28 pointing to the base uVars.B[ n ] SRAM address (as above) ******************************************************************************/