Well, enough of that. But all I’ve written above applies to your question concerning where to go from Petzold to increase your knowledge of this type of coding. I don't believe there are any additional books that can be picked up, unfortunately. I’d have to say that most of what I’ve picked up I learned in the context of PowerBASIC and the PowerBASIC Forums. That community of folks is really more of a ‘community’ than any other place one is likely to find on the internet. The folks tend to be older – like 40 to 80 years old, and have been with computers since mainframe times – like me.
There are a number of web sites involved with PowerBASIC. The links I earlier provided about the function pointer stuff that you seem to have liked are at Jose Roca’s website. A fellow countryman of yours in Germany named Theo Gottwald provided Jose with the website’s server to host the site. Theo said something to the effect that when a genius is found capable of lifting the whole world up through his intelligence one must provide the genius with everything needed. I was extremely honored when Jose asked me to join his forum by providing me a board there. I’m the least knowledgeable of all the folks there. Other coders Jose asked to join him originally were Patrice Terrier of France, and Charles Pegge of Scotland, and Steve Hutcheson of Australia. For quite a while I was the only American. Recently James C. Fuller joined. He's my neighbor, relatively speaking; he lives in the U.S. state just north of me - New York.
Patrice is a graphics expert. I was glad I was able to help him get started with C and C++. He markets high end graphic software routines I believe mostly to C++ coders. He had to move to C++ because of the 64 bit issue with PowerBASIC.
Charles works on compilers mostly. He's the creator of OxygenBasic, which is a really interesting compiler.
Steve (Hutch) runs the main assembler Forum on the internet....
www.masm32.com
He's definitely hard core and has always been a big PowerBASIC supporter. He also has a PowerBASIC board on his site, and a lot of the active members of his MASM community (Microsoft Macro Assembler) are also PowerBASIC coders too. Hutch always has an interesting take on everything.
So you might be able to find some useful material there. Both Patrice and I have quite a lot of tutorial stuff there.
Here is a program you might find useful for learning material...
Speed Comparisons - x86 / x64 C++ verses PowerBASIC x86
July 31, 2015, 07:48:09 PM
http://www.jose.it-berater.org/smfforum/index.php?topic=5058.0
Its on my Discussion board. Let me tell you why you might find it useful. You had mentioned about displaying output and scrolling data. The genesis of the above referenced program is one of my main forestry applications we use at work to calculate timber sale volumes and create reports. There is a great deal of data processing involved in calculating one of our timber sales, and a lot of the stuff is over a network. Data from Microsoft Access databases and Excel spreadsheets is read, calculations are done, various data is written to databases on a server, and reports are written to Microsoft Word using COM/OLE. It can take a little while, that is, its not instantaneous, so some kind or hourglass, progress bar or whatever is needed to inform the user that work is being done, and that the software isn't 'locked up'.
But I decided I didn't want the typical solution of an hourglass cursor or a progress bar. It occurred to me that what would be really, really cool would be a scrolling output screen where the program would post progress reports of just what it is doing at the moment, and where intermediate results and tables of data would be output as they occurred. In other words, something like the major operating system updates from Microsoft where you can watch the progress of the updates in a window as they are being installed. Such a setup would beat the heck out of a dumb progress bar that tells nothing about the underlying processing taking place.
But oh how tricky it is to do!!! Believe it or not, one of the biggest stumbling blocks in developing software like that is coming up with test data for a mock up application. Computers are so fast its hard to come up with something that takes several seconds or minutes to do. And forget about trying to force the computer to run a dummy loop for billions of repetitions that does nothing. Modern C++ optimizing compilers are so darned smart they'll circumvent just about anything like that that you throw at them. In other words, they'll see a loop doesn't do anything, or they'll pre-calculate the end result of a series of arithmetic operations rather than running the loop!!!!! Its truly amazing. I know its hard to believe this is a problem, i.e., just coming up with test data to write the program, but it is.
Here's how I solved it. And its going to take a little digression on my part. Several years ago a new user of PowerBASIC posted in the PowerBASIC Forums a little C algorithm he had where he was testing the speed of C verses PowerBASIC in running this algorithm. And the C code was killing the PowerBASIC code. The C code was running like a hundred times faster than the algorithm converted to PowerBASIC. He wanted to know what was going on, as he had read that PowerBASIC was as fast as C, which is to say real fast. A number of members tested the results and found out this new user was right. This all caused quite a debate. Finally, one of the asm gurus at the PowerBASIC forum decompiled the C binary to see what the underlying assembler code was doing. What he found out was truly amazing. Microsoft's C compiler was smart enough to look at the code executing within the loop, which involved some simple additions, subtractions, multiplications, and divisions, and recognize that it was a mathematical operation which had a pre-determined result, that is, it was sort of a terminating series or something - mathematically. So the compiler wasn't even generating code to run the loop. It was pre-calculating the result. That's why it was so much faster. But PowerBASIC simply ran the loop and did the calculations. That's why it was being beaten so badly.