With non-PIC code (Java, C, etc), I don't have this problem, but my assembly code has gotten "messy" when I plunge right into it ,and I too have re-written things to better organize it. I've found that simple flowcharting helps tremendously here. Cheers, -Neil. Quoting alan.b.pearce@stfc.ac.uk: >> I'm not sure how the question is too vague - my problem, as stated, is >> that on projects i've worked on with assembly code, I end up with >> something that's hard to read and follow, and I'm not sure how to go >> about structuring it any better. Hence my request for other people's >> methods. > > Being a person who is inherently unstructured in any sort of work, I > like to write out the proposed code in "high level pseudo code" without > any actual code that will assemble/compile. Then when I have > changed/restructured/whatever other changes deemed appropriate I then > use this pseudo code as the comments, and write the actual code in > between lines of the comment pseudo code. This may end up having a block > of the pseudo code as a large multi-line comment, or single lines of > pseudo code as a comment to a block of code. > > Otherwise I tend to start coding, and find that I haven't taken into > account something, and end up having to rewrite considerable amounts of > code, instead of a few lines of pseudo code. > > The pseudo code can start of as very broad brush stroke code, which can > get refined in several passes as I determine what variables are > required, and what blocks can be changed to make suitable subroutines > which can be used in multiple places by having suitable call parameters. > -- > Scanned by iCritical. > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist