While reversing an executable with olly, theres compiler code and user code. So how do i recognise the compiler codes ? Lets say if the executable is visual basic, it has a jmp and a call in the first 2 instructions and the winmain comes later.
You just need to identify the main function. Everything called from main is user code. If you want to check if a function is part of user code, recursively check the xref starting from that function and see if it ends up in main. As for how to identify main, it depends on the OS that the executable is compiled for and possibly the specific compiler too. But for ELF files compiled by gcc for Linux, main is the last value pushed before calling __libc_start_main in start.