I'm trying to generate assemblercode for st7lite29 that reads serial data and save it to an array. The receivng-data part works fine, but i have troubles writing it to the array begin: inc _count ; Receive serial data (works fine) ; Save data to array at location '_count' btjt $0000,#7,loop ;other data to come? --> goto begin If someone has an idea how i can do this, i'd be very happy to know. Greets, Johan.
clr X loop call receive data ; receive data in A ld (buffer,X), A inc X ; ready for next byte cp X, #10 ; received 10 bytes yet ? jrne loop ; get next byte Hope this helps sjo
When i write more than 13 datavalues into this array, the data is corrupted. Maybe it is because the variable buffer should be declared and the data is stored into registers that are used for other variables. Anyone an idea how to solve this. Greets.
Thanks for your fast repy. I now have declared an array with 50 places. And this works. But I need more spaces, and my memory space does not to be large enough. Maybe I can rearrange the memory space. I hope to have an array with 512 data places. I'll try to change de lkf file to make this possible... greets.