Minimizing code....


Results 1 to 7 of 7

Threaded View

  1. #1
    Join Date
    Feb 2009
    Posts
    41

    Default Minimizing code....

    My project uses non-standard hardware (a microwire port expander) so I could not use the LCDout function. I did manage to get my LCD working however with the following code.

    gosub LCD_HOME 'clear the LCD and set the cursor to 00

    For y=0 To 64
    Gosub modescreen1b 'software version

    OUT_BITS = ascii

    gosub ioxwriteb
    Pause 1
    gosub LCD_DATA_EN 'send the "Software Version" message

    Next y

    initscreenb:
    Lookup y,["Software Ver: DL1.00A "],ascii
    Return


    It works well, but I don't want to copy this block for ever screen I need to print. It would be a huge waste of code. I can't figure out how to minimize the code to just pass the menu to lookup to a sub.

    All comments greatly appreciated!

    Thanks,
    TR
    Last edited by TerdRatchett; - 11th February 2009 at 18:34. Reason: Accidently screwed up...

Similar Threads

  1. Minimizing code space
    By Tobias in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th May 2009, 07:25
  2. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 21:55
  3. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 21:31
  4. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  5. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26

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