Replace the memcpyram2ram with spelled out version: { char __data *d = (void*)&hid_tx_buffer; char __data *s = (void*) &g_toad4_status; char acount=64; /* * copy from lower addresses to higher addresses */ while (acount--) { *d++ = *s++; } }
and this works... also tried calling memcpyram2ram(&hid_tx_buffer, &hid_tx_buffer, 64); memcpyram2ram(&g_toad4_status, &g_toad4_status, 64); both crash... something wrong with calling that function... map says it is here: _memcpyram2ram 0x001da4 program extern memcpyram2ram.asm the compiled call looks like: 01214 ; .line 339; main.c /* 0005EA 0E?? 01215 MOVLW LOW(_hid_tx_buffer) 0005EC 6E?? 01216 MOVWF r0x00 0005EE 0E?? 01217 MOVLW HIGH(_hid_tx_buffer) 0005F0 6E?? 01218 MOVWF r0x01 0005F2 0E?? 01219 MOVLW LOW(_g_toad4_status) 0005F4 6E?? 01220 MOVWF r0x02 0005F6 0E?? 01221 MOVLW HIGH(_g_toad4_status) 0005F8 6E?? 01222 MOVWF r0x03 0005FA 0E00 01223 MOVLW 0x00 0005FC 6EE5 01224 MOVWF POSTDEC1 0005FE 0E40 01225 MOVLW 0x40 000600 6EE5 01226 MOVWF POSTDEC1 000602 50?? 01227 MOVF r0x03, W 000604 6EE5 01228 MOVWF POSTDEC1 000606 50?? 01229 MOVF r0x02, W 000608 6EE5 01230 MOVWF POSTDEC1 00060A 50?? 01231 MOVF r0x01, W 00060C 6EE5 01232 MOVWF POSTDEC1 00060E 50?? 01233 MOVF r0x00, W 000610 6EE5 01234 MOVWF POSTDEC1 000612 EC?? F0?? 01235 CALL _memcpyram2ram 000616 0E06 01236 MOVLW 0x06 000618 26E1 01237 ADDWF FSR1L, F br Kusti This e-mail may contain confidential or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. We will not be liable for direct, indirect, special or consequential damages arising from alteration of the contents of this message by a third party or as a result of any virus being passed on or as of transmission of this e-mail in general. ------------------------------------------------------------------------------ New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user