1 Attachment(s)
Can someone help me to modify Darrel Taylor's STRINGS.PBP
Hello Everyone
I'm looking for a way to modify Darrel's program but I don't understand the ASM portion of his code. I've managed to modify parts of the PBP portion of the program and it works like a charm. Has anyone here used Darrel Taylor's STRINGS.PBP? http://www.pbpgroup.com/modules/wfse...p?articleid=10 It's a great routine that saves heaps of code space when printing to an Lcd. I'm using it in a program for printing multiple instructions (over 150 prints @ 18 words ea) to the Lcd which explains to the user how the program functions and how to program the different variables needed to have the program operate efficiently. Probably as good as having a printed manual but one that you can't loose. I'm also using it for each button press to display (while the button is pressed) where the program is going and what's happening, which I think makes it easier to navigate all the user functions.
The strings.pbp code is set up (thanks to Darrel's help) with two pushbuttons to control the instruction functions, one to view the first print then each additional press of the same pushbutton prints the next screen. The other pushbutton ends the viewing and returns to the main program loop.
What I'd like to be able to do, is to implement in the asm code portion of the routine, additional code so that a third pushbutton could be used to view the previous print in the Inst1: subroutine if that's possible? Having a "view previous print pushbutton" would be the icing on the cake for my program! Can anyone help me out with this one? I've included some parts of my program that relates to Darrel's code in an attachment below that shows how my pushbuttons are set up to use Darrel's code.
Thanks
jessey
1 Attachment(s)
Your PrevPressed code works like a charm
Hi Darrel
Thanks for your improvements. Your PrevPressed code works like a charm but I noticed that when the Inst1: subroutine reaches the end print that it doesn't return like it should. All the other ones that are used for button press descriptions work to return though. Any ideas on what I did wrong or what I can do to get it to work as intended? I managed to get it to return by using a counter to return when the last print is counted but it dosen't display the last screen.
I've spent the last few nights (late nights) working on your code with great results. I've managed to add code to your STRINGS.PBP that allows me to navigate through the 148 prints of instructions with relative ease. I've included the code I wrote to compliment your PrevPressed routine for you to look at.
In the main portion of my program, I have a few variables that are user adjustable using up and down pushbuttons, so I used those 2 existing push buttons to go up and down to view
the next and previous screens for the instructions. Then I added some more code and using another existing push button that when pressed together with either the up or down pushbutton performs a sort of auto repeat that advances or reverses the prints to the Lcd very quickly. I used counters to keep track of which print was showing to the Lcd then added IF..THEN's before the counters to be able to stop at certain prints (preset numbers) that will be the beginning of an instruction topic to make it easy to find the different topics without having to go through all 148 prints to find them. It took a few late nights to get it working properly but it sure was worth it.
I'd appreciate it if you could have a look at it to see if you see any hidden got ya's in my new updated routines. Another question, I've maxed out the amount of prints I can get in my program without getting an error when compiling, is there a way to get more prints to the Lcd with your program?
Thanks for your help
jessey