Propeller PASM size limits
I have done several projects with propellers and have a good understanding of using PASM. However, my current project is causing me some trouble as I seem to be reaching a size limit with the code. I haven't written what I consider to be too many lines in the DAT section (assembly of course), but if I write one more it causes the code not to function correctly. This confuses me greatly as I have the fit statement at the bottom and I start the code with (ORG 0) no compile time errors. It really is as simple as adding a line at the bottom to stop the code from functioning properly. Has anyone had experience with this? Any info would be greatly appreciated. I have looked all over for an explanation of the limits of PASM code segments, but I have found nothing. Thanks in advance.

Comments
''**************************************** ''* Monitor Assem. V1.0 * ''* Author: Makares * ''* Date: Oct. 7, 2013 * ''**************************************** PUB start(stack,CID) 'stack is the pointer to buf_head coginit(CID,@mon, stack) 'Open new cog DAT 'Initialization org 0 mon mov m1,par 'Get first address of contiguous longs. mov headptr,m1 'This device uses a head and tail buffer system. add m1,#1 << 2 mov tailptr,m1 add m1,#3 << 2 mov buffptr,m1 add m1,#1 << 2 mov test1mask,#1 rdlong m2,m1 shl test1mask,m2 'This creates a mask for setting an output led. or dira,test1mask add m1,#1 << 2 mov test2mask,#1 rdlong m2,m1 shl test2mask,m2 'This creates a mask for setting an output led. or dira,test2mask add m1,#1 << 2 mov test3mask,#1 rdlong m2,m1 shl test3mask,m2 'This creates a mask for setting an output led. or dira,test3mask :markerscan rdlong head,headptr 'Get current head location. rdlong tail,tailptr 'Get current tail location. cmp head,tail wz if_z jmp #:markerscan 'Wait until head <> tail. mov m2,#0 'Grab the next byte off the buffer and increment tail. mov m1,buffptr add m1,tail rdbyte m2,m1 add tail,#1 or tail,#$FF wrlong tail,tailptr shl currentword,#8 'Shift out the top byte of the long. or currentword,m2 'Shift in new byte cmp currentword,PAT1 wz 'Compare to pattern 1 if_z jmp #:testblock cmp currentword,PAT2 wz 'Compare to pattern 2 if_z jmp #:testblock jmp #:markerscan 'Return to markerscan if neither patern is found. :testblock or outa,test3mask 'This is a test stub to light an led to see this location was reached. rdlong head,headptr 'Get current head location. rdlong tail,tailptr 'Get current tail location. mov m1,head cmp m1,tail wc if_c add m1,#256 sub m1,tail 'Check for gap between head and tail. cmp m1,#24 wc if_c jmp #:testblock add tail,#20 'Move to the desired byte location. mov m2,#0 'Grab the next byte off the buffer and increment tail. mov m1,buffptr add m1,tail rdbyte m2,m1 add tail,#1 or tail,#$FF wrlong tail,tailptr or outa,test3mask or outa,test1mask '''Any extra lines here causes the code to not run properly. I believe that it may '''cause the jmp to be ignored and so the code finishes. jmp #:markerscan PAT1 long $0F0F0F0F PAT2 long $F0F0F0F0 m1 res 1 m2 res 1 test1mask res 1 test2mask res 1 test3mask res 1 head res 1 headptr res 1 tail res 1 tailptr res 1 buffptr res 1 currentword res 1 fit 496Also, you use currentword uninitialised (res). IOW there is a chance (however small) that it contains part of a pattern you check against which means a single incoming byte may complete the pattern and you detect one where there isn't one.