Running Out of Programing Memory


Closed Thread
Results 1 to 16 of 16

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    704


    Did you find this post helpful? Yes | No

    Default

    Hi all,

    Thank you all for your help. This post is an update for this thread. When giving the final touches to my program, I found out one more time that I was running out of programming memory space. Luckily, I was able to reduce the size of my program by almost 1K words . I don't know assembly so; this is how I did it.

    Before, I was using only one variable I that was declared as a word for all my FOR I = ... NEXT I loops and whenever I needed a counter I = I + 1.

    Code:
    I VAR WORD
    Sometimes the value of I went well over 255 but must of the times it didn't go over 255. So, I created a new variable J and declared it as a byte.

    Code:
    I VAR WORD
    J VAR BYTE
    I replaced J by I wherever it was possible and BINGO, the size of the program went down by almost 1K words.
    Again, Thank you all for your help.


    Robert

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,171


    Did you find this post helpful? Yes | No

    Default

    Also a 0 to x instead of 1 to x may help too in a for-next loop.

    Ioannis

  3. #3
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    704


    Did you find this post helpful? Yes | No

    Default

    Also a 0 to x instead of 1 to x may help too in a for-next loop.

    Ioannis
    Yes, I read that in the link that you posted earlier. Thank you.

    Robert

Similar Threads

  1. fatal error out of memory (pbpw.exe)
    By hardcore in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 14th March 2010, 20:13
  2. Need the code to write to a memory
    By Hamlet in forum General
    Replies: 0
    Last Post: - 20th August 2007, 01:22
  3. Replies: 4
    Last Post: - 2nd March 2007, 07:12
  4. sample code for M25P32
    By Pedro Santos in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 9th January 2007, 03:37
  5. Use internal program memory like DATA memory
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th December 2006, 19:38

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts