In SX Microcontrollers, SX/B Compiler and SX-Key Tool, tdg8934 wrote: JonnyMac, That is awesome. I never knew about that! If I declare: pattern VAR Byte(103) it shows all of the RAM locations so you know how much space you have left for RAM variables / arrays. At 103 it brings it to the very end limit. So using an array of 112 would cause the error. Great to know! With [b]pattern VAR Byte(103)[/b] - See below: [code] 1171 ;********************************************************************** 1172 ; SX/B VARIABLE MEMORY MAP: [B]=Byte; [b0-7]=Bit, [W]=Word, (#)=Array 1173 1174 ; $00 = __RAM(0), W[B], IND[B] 1175 ; $01 = __RAM(1), RTCC[B] 1176 ; $02 = __RAM(2), PC[B] 1177 ; $03 = __RAM(3), STATUS[B], PA2[b7], PA1[b6], PA0[b5], _TO[b4], PD[b3], Z[b2], DC[b1], C[b0] 1178 ; $04 = __RAM(4), FSR[B] 1179 ; $05 = __RAM(5), PORTA[B], RA[B], Clock[b0], DataIn[b1], Strobe[b2] 1180 ; $06 = __RAM(6), RBC[W], RBC_LSB[B], PORTB[B], RB[B] 1181 ; $07 = __RAM(7), RBC_MSB[B], PORTC[B], RC[B] 1182 ; $08 = __RAM(8), __PARAM1[B], __WPARAM12[W], __WPARAM12_LSB[B], __REMAINDER[B], __WREMAINDER[W], __WREMAINDER_LSB[B] 1183 ; $09 = __RAM(9), __PARAM2[B], __WPARAM12_MSB[B], __WPARAM23[W], __WPARAM23_LSB[B], __WREMAINDER_MSB[B] 1184 ; $0A = __RAM(10), __PARAM3[B], __WPARAM23_MSB[B], __WPARAM34[W], __WPARAM34_LSB[B] 1185 ; $0B = __RAM(11), __PARAM4[B], __WPARAM34_MSB[B], __WPARAM45[W], __WPARAM45_LSB[B] 1186 ; $0C = __RAM(12), __PARAM5[B], __PARAMCNT[B], __WPARAM45_MSB[B] 1187 ; $0D = __RAM(13), idx[B] 1188 ; $0E = __RAM(14), idx2[B] 1189 ; $0F = __RAM(15), temp1[B] 1190 1191 ; $10 = __RAM(16), tmpW1[W], tmpW1_LSB[B] 1192 ; $11 = __RAM(17), tmpW1_MSB[B] 1193 ; $12 = __RAM(18) 1194 ; $13 = __RAM(19) 1195 ; $14 = __RAM(20) 1196 ; $15 = __RAM(21) 1197 ; $16 = __RAM(22) 1198 ; $17 = __RAM(23) 1199 ; $18 = __RAM(24) 1200 ; $19 = __RAM(25) 1201 ; $1A = __RAM(26) 1202 ; $1B = __RAM(27) 1203 ; $1C = __RAM(28) 1204 ; $1D = __RAM(29) 1205 ; $1E = __RAM(30) 1206 ; $1F = __RAM(31) 1207 [b]1208 ; $30 = __RAM(48), pattern(0) 1209 ; $31 = __RAM(49), pattern(1) 1210 ; $32 = __RAM(50), pattern(2) 1211 ; $33 = __RAM(51), pattern(3) 1212 ; $34 = __RAM(52), pattern(4) 1213 ; $35 = __RAM(53), pattern(5) 1214 ; $36 = __RAM(54), pattern(6) 1215 ; $37 = __RAM(55), pattern(7) 1216 ; $38 = __RAM(56), pattern(8) 1217 ; $39 = __RAM(57), pattern(9) 1218 ; $3A = __RAM(58), pattern(10) 1219 ; $3B = __RAM(59), pattern(11) 1220 ; $3C = __RAM(60), pattern(12) 1221 ; $3D = __RAM(61), pattern(13) 1222 ; $3E = __RAM(62), pattern(14) 1223 ; $3F = __RAM(63), pattern(15) 1224 1225 ; $50 = __RAM(80), pattern(16) 1226 ; $51 = __RAM(81), pattern(17) 1227 ; $52 = __RAM(82), pattern(18) 1228 ; $53 = __RAM(83), pattern(19) 1229 ; $54 = __RAM(84), pattern(20) 1230 ; $55 = __RAM(85), pattern(21) 1231 ; $56 = __RAM(86), pattern(22) 1232 ; $57 = __RAM(87), pattern(23) 1233 ; $58 = __RAM(88), pattern(24) 1234 ; $59 = __RAM(89), pattern(25) 1235 ; $5A = __RAM(90), pattern(26) 1236 ; $5B = __RAM(91), pattern(27) 1237 ; $5C = __RAM(92), pattern(28) 1238 ; $5D = __RAM(93), pattern(29) 1239 ; $5E = __RAM(94), pattern(30) 1240 ; $5F = __RAM(95), pattern(31) 1241 1242 ; $70 = __RAM(112), pattern(32) 1243 ; $71 = __RAM(113), pattern(33) 1244 ; $72 = __RAM(114), pattern(34) 1245 ; $73 = __RAM(115), pattern(35) 1246 ; $74 = __RAM(116), pattern(36) 1247 ; $75 = __RAM(117), pattern(37) 1248 ; $76 = __RAM(118), pattern(38) 1249 ; $77 = __RAM(119), pattern(39) 1250 ; $78 = __RAM(120), pattern(40) 1251 ; $79 = __RAM(121), pattern(41) 1252 ; $7A = __RAM(122), pattern(42) 1253 ; $7B = __RAM(123), pattern(43) 1254 ; $7C = __RAM(124), pattern(44) 1255 ; $7D = __RAM(125), pattern(45) 1256 ; $7E = __RAM(126), pattern(46) 1257 ; $7F = __RAM(127), pattern(47) 1258 1259 ; $90 = __RAM(144), pattern(48) 1260 ; $91 = __RAM(145), pattern(49) 1261 ; $92 = __RAM(146), pattern(50) 1262 ; $93 = __RAM(147), pattern(51) 1263 ; $94 = __RAM(148), pattern(52) 1264 ; $95 = __RAM(149), pattern(53) 1265 ; $96 = __RAM(150), pattern(54) 1266 ; $97 = __RAM(151), pattern(55) 1267 ; $98 = __RAM(152), pattern(56) 1268 ; $99 = __RAM(153), pattern(57) 1269 ; $9A = __RAM(154), pattern(58) 1270 ; $9B = __RAM(155), pattern(59) 1271 ; $9C = __RAM(156), pattern(60) 1272 ; $9D = __RAM(157), pattern(61) 1273 ; $9E = __RAM(158), pattern(62) 1274 ; $9F = __RAM(159), pattern(63) 1275 1276 ; $B0 = __RAM(176), pattern(64) 1277 ; $B1 = __RAM(177), pattern(65) 1278 ; $B2 = __RAM(178), pattern(66) 1279 ; $B3 = __RAM(179), pattern(67) 1280 ; $B4 = __RAM(180), pattern(68) 1281 ; $B5 = __RAM(181), pattern(69) 1282 ; $B6 = __RAM(182), pattern(70) 1283 ; $B7 = __RAM(183), pattern(71) 1284 ; $B8 = __RAM(184), pattern(72) 1285 ; $B9 = __RAM(185), pattern(73) 1286 ; $BA = __RAM(186), pattern(74) 1287 ; $BB = __RAM(187), pattern(75) 1288 ; $BC = __RAM(188), pattern(76) 1289 ; $BD = __RAM(189), pattern(77) 1290 ; $BE = __RAM(190), pattern(78) 1291 ; $BF = __RAM(191), pattern(79) 1292 1293 ; $D0 = __RAM(208), pattern(80) 1294 ; $D1 = __RAM(209), pattern(81) 1295 ; $D2 = __RAM(210), pattern(82) 1296 ; $D3 = __RAM(211), pattern(83) 1297 ; $D4 = __RAM(212), pattern(84) 1298 ; $D5 = __RAM(213), pattern(85) 1299 ; $D6 = __RAM(214), pattern(86) 1300 ; $D7 = __RAM(215), pattern(87) 1301 ; $D8 = __RAM(216), pattern(88) 1302 ; $D9 = __RAM(217), pattern(89) 1303 ; $DA = __RAM(218), pattern(90) 1304 ; $DB = __RAM(219), pattern(91) 1305 ; $DC = __RAM(220), pattern(92) 1306 ; $DD = __RAM(221), pattern(93) 1307 ; $DE = __RAM(222), pattern(94) 1308 ; $DF = __RAM(223), pattern(95) 1309 1310 ; $F0 = __RAM(240), pattern(96) 1311 ; $F1 = __RAM(241), pattern(97) 1312 ; $F2 = __RAM(242), pattern(98) 1313 ; $F3 = __RAM(243), pattern(99) 1314 ; $F4 = __RAM(244), pattern(100) 1315 ; $F5 = __RAM(245), pattern(101) 1316 ; $F6 = __RAM(246), pattern(102) [/b] 1317 ; $F7 = __RAM(247), __INTPARAMFSR(0) 1318 ; $F8 = __RAM(248), __INTPARAMFSR(1) 1319 ; $F9 = __RAM(249), __INTPARAMFSR(2) 1320 ; $FA = __RAM(250), __INTPARAMFSR(3) 1321 ; $FB = __RAM(251), __INTPARAMFSR(4) 1322 ; $FC = __RAM(252), __INTPARAMFSR(5) 1323 ; $FD = __RAM(253), TRIS_A(0) 1324 ; $FE = __RAM(254), TRIS_B(0) 1325 ; $FF = __RAM(255), TRIS_C(0) With [b]pattern VAR Byte(LED_COUNT)[/b] 'where LED_COUNT is 32[/code] [code] 1171 ;********************************************************************** 1172 ; SX/B VARIABLE MEMORY MAP: [B]=Byte; [b0-7]=Bit, [W]=Word, (#)=Array 1173 1174 ; $00 = __RAM(0), W[B], IND[B] 1175 ; $01 = __RAM(1), RTCC[B] 1176 ; $02 = __RAM(2), PC[B] 1177 ; $03 = __RAM(3), STATUS[B], PA2[b7], PA1[b6], PA0[b5], _TO[b4], PD[b3], Z[b2], DC[b1], C[b0] 1178 ; $04 = __RAM(4), FSR[B] 1179 ; $05 = __RAM(5), PORTA[B], RA[B], Clock[b0], DataIn[b1], Strobe[b2] 1180 ; $06 = __RAM(6), RBC[W], RBC_LSB[B], PORTB[B], RB[B] 1181 ; $07 = __RAM(7), RBC_MSB[B], PORTC[B], RC[B] 1182 ; $08 = __RAM(8), __PARAM1[B], __WPARAM12[W], __WPARAM12_LSB[B], __REMAINDER[B], __WREMAINDER[W], __WREMAINDER_LSB[B] 1183 ; $09 = __RAM(9), __PARAM2[B], __WPARAM12_MSB[B], __WPARAM23[W], __WPARAM23_LSB[B], __WREMAINDER_MSB[B] 1184 ; $0A = __RAM(10), __PARAM3[B], __WPARAM23_MSB[B], __WPARAM34[W], __WPARAM34_LSB[B] 1185 ; $0B = __RAM(11), __PARAM4[B], __WPARAM34_MSB[B], __WPARAM45[W], __WPARAM45_LSB[B] 1186 ; $0C = __RAM(12), __PARAM5[B], __PARAMCNT[B], __WPARAM45_MSB[B] 1187 ; $0D = __RAM(13), idx[B] 1188 ; $0E = __RAM(14), idx2[B] 1189 ; $0F = __RAM(15), temp1[B] 1190 1191 ; $10 = __RAM(16), tmpW1[W], tmpW1_LSB[B] 1192 ; $11 = __RAM(17), tmpW1_MSB[B] 1193 ; $12 = __RAM(18) 1194 ; $13 = __RAM(19) 1195 ; $14 = __RAM(20) 1196 ; $15 = __RAM(21) 1197 ; $16 = __RAM(22) 1198 ; $17 = __RAM(23) 1199 ; $18 = __RAM(24) 1200 ; $19 = __RAM(25) 1201 ; $1A = __RAM(26) 1202 ; $1B = __RAM(27) 1203 ; $1C = __RAM(28) 1204 ; $1D = __RAM(29) 1205 ; $1E = __RAM(30) 1206 ; $1F = __RAM(31) 1207 [b] 1208 ; $30 = __RAM(48), pattern(0) 1209 ; $31 = __RAM(49), pattern(1) 1210 ; $32 = __RAM(50), pattern(2) 1211 ; $33 = __RAM(51), pattern(3) 1212 ; $34 = __RAM(52), pattern(4) 1213 ; $35 = __RAM(53), pattern(5) 1214 ; $36 = __RAM(54), pattern(6) 1215 ; $37 = __RAM(55), pattern(7) 1216 ; $38 = __RAM(56), pattern(8) 1217 ; $39 = __RAM(57), pattern(9) 1218 ; $3A = __RAM(58), pattern(10) 1219 ; $3B = __RAM(59), pattern(11) 1220 ; $3C = __RAM(60), pattern(12) 1221 ; $3D = __RAM(61), pattern(13) 1222 ; $3E = __RAM(62), pattern(14) 1223 ; $3F = __RAM(63), pattern(15) 1224 1225 ; $50 = __RAM(80), pattern(16) 1226 ; $51 = __RAM(81), pattern(17) 1227 ; $52 = __RAM(82), pattern(18) 1228 ; $53 = __RAM(83), pattern(19) 1229 ; $54 = __RAM(84), pattern(20) 1230 ; $55 = __RAM(85), pattern(21) 1231 ; $56 = __RAM(86), pattern(22) 1232 ; $57 = __RAM(87), pattern(23) 1233 ; $58 = __RAM(88), pattern(24) 1234 ; $59 = __RAM(89), pattern(25) 1235 ; $5A = __RAM(90), pattern(26) 1236 ; $5B = __RAM(91), pattern(27) 1237 ; $5C = __RAM(92), pattern(28) 1238 ; $5D = __RAM(93), pattern(29) 1239 ; $5E = __RAM(94), pattern(30) 1240 ; $5F = __RAM(95), pattern(31) 1241 [color=red>] 1243 ; $71 = __RAM(113) 1244 ; $72 = __RAM(114) 1245 ; $73 = __RAM(115) 1246 ; $74 = __RAM(116) 1247 ; $75 = __RAM(117) 1248 ; $76 = __RAM(118) 1249 ; $77 = __RAM(119) 1250 ; $78 = __RAM(120) 1251 ; $79 = __RAM(121) 1252 ; $7A = __RAM(122) 1253 ; $7B = __RAM(123) 1254 ; $7C = __RAM(124) 1255 ; $7D = __RAM(125) 1256 ; $7E = __RAM(126) 1257 ; $7F = __RAM(127) 1258 1259 ; $90 = __RAM(144) 1260 ; $91 = __RAM(145) 1261 ; $92 = __RAM(146) 1262 ; $93 = __RAM(147) 1263 ; $94 = __RAM(148) 1264 ; $95 = __RAM(149) 1265 ; $96 = __RAM(150) 1266 ; $97 = __RAM(151) 1267 ; $98 = __RAM(152) 1268 ; $99 = __RAM(153) 1269 ; $9A = __RAM(154) 1270 ; $9B = __RAM(155) 1271 ; $9C = __RAM(156) 1272 ; $9D = __RAM(157) 1273 ; $9E = __RAM(158) 1274 ; $9F = __RAM(159) 1275 1276 ; $B0 = __RAM(176) 1277 ; $B1 = __RAM(177) 1278 ; $B2 = __RAM(178) 1279 ; $B3 = __RAM(179) 1280 ; $B4 = __RAM(180) 1281 ; $B5 = __RAM(181) 1282 ; $B6 = __RAM(182) 1283 ; $B7 = __RAM(183) 1284 ; $B8 = __RAM(184) 1285 ; $B9 = __RAM(185) 1286 ; $BA = __RAM(186) 1287 ; $BB = __RAM(187) 1288 ; $BC = __RAM(188) 1289 ; $BD = __RAM(189) 1290 ; $BE = __RAM(190) 1291 ; $BF = __RAM(191) 1292 1293 ; $D0 = __RAM(208) 1294 ; $D1 = __RAM(209) 1295 ; $D2 = __RAM(210) 1296 ; $D3 = __RAM(211) 1297 ; $D4 = __RAM(212) 1298 ; $D5 = __RAM(213) 1299 ; $D6 = __RAM(214) 1300 ; $D7 = __RAM(215) 1301 ; $D8 = __RAM(216) 1302 ; $D9 = __RAM(217) 1303 ; $DA = __RAM(218) 1304 ; $DB = __RAM(219) 1305 ; $DC = __RAM(220) 1306 ; $DD = __RAM(221) 1307 ; $DE = __RAM(222) 1308 ; $DF = __RAM(223) 1309 1310 ; $F0 = __RAM(240) 1311 ; $F1 = __RAM(241) 1312 ; $F2 = __RAM(242) 1313 ; $F3 = __RAM(243) 1314 ; $F4 = __RAM(244) 1315 ; $F5 = __RAM(245) 1316 ; $F6 = __RAM(246) [/color][/b] 1317 ; $F7 = __RAM(247), __INTPARAMFSR(0) 1318 ; $F8 = __RAM(248), __INTPARAMFSR(1) 1319 ; $F9 = __RAM(249), __INTPARAMFSR(2) 1320 ; $FA = __RAM(250), __INTPARAMFSR(3) 1321 ; $FB = __RAM(251), __INTPARAMFSR(4) 1322 ; $FC = __RAM(252), __INTPARAMFSR(5) 1323 ; $FD = __RAM(253), TRIS_A(0) 1324 ; $FE = __RAM(254), TRIS_B(0) 1325 ; $FF = __RAM(255), TRIS_C(0) [/code] Thanks again for this very helpfull find! ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=324489#m324508 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)