Yeah, real sub but no parameters, OK
So look at what is being shared between main and sub, All or nearly all just about like a Gosub (I bet), or none which would make the bogged down issue really curious for sure.
More: The word Restart is in the title. Maybe you have start code in the real sub that should be removed and done once at the beginning separate from the Sub code.
BTW is the Sub basically the entire program? Where is the main loop? In the Sub or the main calling the SUB.
So look at what is being shared between main and sub, All or nearly all just about like a Gosub (I bet), or none which would make the bogged down issue really curious for sure.
More: The word Restart is in the title. Maybe you have start code in the real sub that should be removed and done once at the beginning separate from the Sub code.
BTW is the Sub basically the entire program? Where is the main loop? In the Sub or the main calling the SUB.
b = b + ...