I already do this, but the problem is that when I try to have a thread sub in a class instance. Not to change the subject because I think if I was able to just "include" my subroutines as inline code my wish would work. Including inline code, and calling on class or code module subs is far from being the same thing.
For example my "cpu" object has been created using my hd6809 class module using: dim cpu as hd6809. I can call my cpu.execute sub directly from the main module just fine as expected even from within a thread created by and for the Main module. Using a forever loop inside the thread sub I am successfully stepping my cpu.execute sub and it works great. However, that's not what I want to do. I want to have the cpu.execute sub as the thread sub.
Trial and error seems to lead to the same results.
From Main module:
Thread1.Start(cpu, execute, args) sub not found
Thread1.Start(null, cpu.execute, args) sub not found
Thread1.Start(cpu, cpu.execute) sub not found
I've also tried creating the thread from within my hd6809 class which also fails.