Using a debug routine with multiple text strings without repeating DEBUG CRSRX
beazleybub
Posts: 102
In my program I am using subroutines to print text in the debug window based on a value.
How·do I trim the fat on this program by getting rid of the additional DEBUG CRSRXY, 0, 10, CLREOL statements?
I have tried to use DATA with no success. Could someone please tell me at least what·command I should use?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
How can there be·nothing? Nothing is something!
How·do I trim the fat on this program by getting rid of the additional DEBUG CRSRXY, 0, 10, CLREOL statements?
I have tried to use DATA with no success. Could someone please tell me at least what·command I should use?
IF Work = 1 THEN GOSUB Print1: ENDIF IF Work = 2 THEN GOSUB Print2: ENDIF IF Work = 3 THEN GOSUB Print3: ENDIF Print1: DEBUG CRSRXY, 0, 10, CLREOL, "Some text" DEBUG CRSRXY, 0, 11, CLREOL, "Some more text" RETURN Print2: DEBUG CRSRXY, 0, 10, CLREOL, "Additional text" DEBUG CRSRXY, 0, 11, CLREOL, "Some more additional text" RETURN Print3: DEBUG CRSRXY, 0, 10, CLREOL, "Even more text" DEBUG CRSRXY, 0, 11, CLREOL, "Even more additional text" RETURN
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
How can there be·nothing? Nothing is something!
Comments
Your soluton works but it uses even more of the eeprom. I am trying to free eeprom space.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
How can there be·nothing? Nothing is something!
Post Edited (beazleybub) : 8/17/2008 7:34:54 PM GMT
I realized that·even if I completely remove the "DEBUG·CRSRXY,·0,·10,·CLREOL" And "DEBUG·CRSRXY,·0,·11,·CLREOL"
statements from my entire program entirely it only saves around 3% of the EEPROM's space. So removing them is pointless.
Thanks again.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
How can there be·nothing? Nothing is something!