I learned a lot about how to optimize graphics output via GDI+ while creating BasEdit, I never thought before that it would be possible to do this in pure VisualBasic. Seems like I am very addicted to this programming language
Cool, so did you have to change anything else beside the NEXT-commands?It seems to run about 4 times faster than running VICE in warp mode.
I'm really not sure how the Interpreter on the real machine handles these NEXT A,B thingy, it's very clever about if a variable was used in a FOR-NEXT loop or not. I cannot imagine how to do that beside using a second stack with finished FOR-Variables as a lookup.
Code: Select all
10 FORA=1TO10
20 FORB=1TO10
30 NEXT B,A
I studied the Kernal routines for the NEXT command a little bit but am confused, I think the Kernal leaves finished variables on stack so when arriving at the NEXT B,A it sees that B is finished, ignores it and continues with the A-loop. This way it gets not fooled by an NEXT C,A command and can assert an NEXT WITHOUT FOR ERROR for C.
Any other/better idea?