<html><body>Tak ješte jeden pokus, já bych to zkontroloval, ale koukal jsem zběžně na<div>pár asm instrukcí picu co tam jsou a velmi rychle mě to přešlo :-)</div><div><br></div><div><div><div>; LST file generated by mikroListExporter - v.2.0 </div><div>; Date/Time: 1. 6. 2016 18:15:00</div><div>;----------------------------------------------</div><div><br></div><div>;Address Opcode ASM</div><div>0x0000 0xF000EF28 GOTO 80</div><div>0x0004 0x0000 NOP</div><div>0x0006 0x0000 NOP</div><div>0x0008 0xF000EF00 GOTO 0</div><div>0x000C 0x0000 NOP</div><div>0x000E 0x0000 NOP</div><div>0x0010 0x0000 NOP</div><div>0x0012 0x0000 NOP</div><div>0x0014 0x0000 NOP</div><div>0x0016 0x0000 NOP</div><div>0x0018 0xD7F3 BRA 0</div><div>_writeeeprom:</div><div>;MyProject.mpas,19 :: begin</div><div>;MyProject.mpas,20 :: for n:=0 to size do begin</div><div>0x001C 0x6A01 CLRF R1 </div><div>0x001E 0x6A02 CLRF R2 </div><div>L__writeeeprom1:</div><div>0x0020 0x5002 MOVF R2, 0 </div><div>0x0022 0x5C44 SUBWF FARG_writeeeprom_size+1, 0 </div><div>0x0024 0xE102 BNZ L__writeeeprom8</div><div>0x0026 0x5001 MOVF R1, 0 </div><div>0x0028 0x5C43 SUBWF FARG_writeeeprom_size, 0 </div><div>L__writeeeprom8:</div><div>0x002A 0xE311 BNC L__writeeeprom5</div><div>;MyProject.mpas,21 :: x := Oblast^[n]; // v X je vzdy dato alespon doufam</div><div>0x002C 0x5001 MOVF R1, 0 </div><div>0x002E 0x2441 ADDWF FARG_writeeeprom_oblast, 0 </div><div>0x0030 0x6EE9 MOVWF FSR0L </div><div>0x0032 0x5002 MOVF R2, 0 </div><div>0x0034 0x2042 ADDWFC FARG_writeeeprom_oblast+1, 0 </div><div>0x0036 0x6EEA MOVWF FSR0H </div><div>0x0038 0xF003CFEE MOVFF POSTINC0, R3</div><div>;MyProject.mpas,22 :: end;</div><div>0x003C 0x5002 MOVF R2, 0 </div><div>0x003E 0x1844 XORWF FARG_writeeeprom_size+1, 0 </div><div>0x0040 0xE102 BNZ L__writeeeprom9</div><div>0x0042 0x5043 MOVF FARG_writeeeprom_size, 0 </div><div>0x0044 0x1801 XORWF R1, 0 </div><div>L__writeeeprom9:</div><div>0x0046 0xE003 BZ L__writeeeprom5</div><div>0x0048 0x4A01 INFSNZ R1, 1 </div><div>0x004A 0x2A02 INCF R2, 1 </div><div>0x004C 0xD7E9 BRA L__writeeeprom1</div><div>L__writeeeprom5:</div><div>;MyProject.mpas,23 :: end;</div><div>L_end_writeeeprom:</div><div>0x004E 0x0012 RETURN 0</div><div>; end of _writeeeprom</div><div>_main:</div><div>;MyProject.mpas,28 :: begin</div><div>;MyProject.mpas,30 :: writeeeprom( PBytearray(@X1), SizeOf(X1), 0 );</div><div>0x0050 0x0E36 MOVLW _X1</div><div>0x0052 0x6E41 MOVWF FARG_writeeeprom_oblast </div><div>0x0054 0x0E00 MOVLW hi_addr(_X1)</div><div>0x0056 0x6E42 MOVWF FARG_writeeeprom_oblast+1 </div><div>0x0058 0x0E0B MOVLW 11</div><div>0x005A 0x6E43 MOVWF FARG_writeeeprom_size </div><div>0x005C 0x0E00 MOVLW 0</div><div>0x005E 0x6E44 MOVWF FARG_writeeeprom_size+1 </div><div>0x0060 0x6A45 CLRF FARG_writeeeprom_pozice </div><div>0x0062 0x6A46 CLRF FARG_writeeeprom_pozice+1 </div><div>0x0064 0xDFDB RCALL _writeeeprom</div><div>;MyProject.mpas,31 :: writeeeprom( PBytearray(@X2), SizeOf(X2), 0 );</div><div>0x0066 0x0E15 MOVLW _X2</div><div>0x0068 0x6E41 MOVWF FARG_writeeeprom_oblast </div><div>0x006A 0x0E00 MOVLW hi_addr(_X2)</div><div>0x006C 0x6E42 MOVWF FARG_writeeeprom_oblast+1 </div><div>0x006E 0x0E21 MOVLW 33</div><div>0x0070 0x6E43 MOVWF FARG_writeeeprom_size </div><div>0x0072 0x0E00 MOVLW 0</div><div>0x0074 0x6E44 MOVWF FARG_writeeeprom_size+1 </div><div>0x0076 0x6A45 CLRF FARG_writeeeprom_pozice </div><div>0x0078 0x6A46 CLRF FARG_writeeeprom_pozice+1 </div><div>0x007A 0xDFD0 RCALL _writeeeprom</div><div>;MyProject.mpas,32 :: end.</div><div>L_end_main:</div><div>0x007C 0xD7FF BRA $+0</div><div>; end of _main</div><div>Symbol List:</div><div>//** Routines locations **</div><div>//ADDRESS SIZE PROCEDURE</div><div>//----------------------------------------------</div><div>0x001C [52] _writeeeprom</div><div>0x0050 [46] _main</div><div>//** Variables locations ** </div><div>//ADDRESS SIZE VARIABLE</div><div>//----------------------------------------------</div><div>0x0000 [1] R0</div><div>0x0001 [2] writeeeprom_n</div><div>0x0001 [1] R1</div><div>0x0002 [1] R2</div><div>0x0003 [1] writeeeprom_x</div><div>0x0003 [1] R3</div><div>0x0004 [4] Get_Fosc_kHz_local_result</div><div>0x0004 [1] R4</div><div>0x0005 [1] R5</div><div>0x0006 [1] R6</div><div>0x0007 [1] R7</div><div>0x0008 [1] R8</div><div>0x0009 [1] R9</div><div>0x000A [1] R10</div><div>0x000B [1] R11</div><div>0x000C [1] R12</div><div>0x000D [1] R13</div><div>0x000E [1] R14</div><div>0x000F [1] R15</div><div>0x0010 [1] R16</div><div>0x0011 [1] R17</div><div>0x0012 [1] R18</div><div>0x0013 [1] R19</div><div>0x0014 [1] R20</div><div>0x0015 [33] _X2</div><div>0x0036 [11] _X1</div><div>0x0041 [2] FARG_writeeeprom_oblast</div><div>0x0043 [2] FARG_writeeeprom_size</div><div>0x0045 [2] FARG_writeeeprom_pozice</div></div><div><br></div><p>---------- Původní zpráva ----------<br>Od: Jan Waclawek <konfera@efton.sk><br>Komu: HW-news <hw-list@list.hw.cz><br>Datum: 1. 6. 2016 18:06:04<br>Předmět: Re: Ukladani nastaveni v programu pro MCU</p><br><blockquote>x by chcelo volatile alebo globalne alebo oboje. Takto samotny zapis do x<br>(a aj citanie zo zdroja) ten chytrak vyoptimalizoval... ;-)<br><br>Zda sa, ze tie pointre su len jednobytove.<br><br>wek<br><br>PS. Ten odpor je opodstatneny... ;-)<br><br><br><br>----- Original Message ---------------<br><br>>Přiznám, se že PIC vůbec neznám a vždycky jsem měl k němu odpor, přiznávám<br>>že neopodstatněný :-) Ale tohle je výsledek.<br>><br>_______________________________________________<br>HW-list mailing list - sponsored by www.HW.cz<br>Hw-list@list.hw.cz<br>http://list.hw.cz/mailman/listinfo/hw-list</blockquote></div></body></html>