In gcc's terms compile means 'generate an assembler file from the source and assemble it'. In general terms compile means 'generate an object file from the source'. AFAIK Visual C/C++ doesn't even generate an assembler file during compilation so there's nothing wrong with Codeblocks' behavior. If you want an assembler output for some reason, you have to configure your compiler to generate one. For gcc it's the '-s' flag if I recall correctly. You can configure the command for 'compile single file to object' in 'settings->compiler->other settings->advanced options->command line macro' for your compiler.
Be aware that for gcc compilers if you configure the compilation step to generate an assembler output then you'll have to introduce an extra step to assemble to output into an object file.