Hi,
Just a few comments...
1. push ebx/pop ebx to save/restore ebx on the now working stack around cpuid.
2. with bochs debugger you could just do b <entrypoint>, c, regs to get the value of EBX (with x <addr> to confirm its contents.) Don't underestimate the usefulness of debuggers. You could have gotten the value of EBX in about a minute. Take your time to get comfortable with debuggers right now - don't wait.
3. i typically recommend writing to serial port since emulators and virtual machines can redirect it to a file. That way you can have debug messages and output whatever you want. No need to try to "get the value of a register" when you can just output an entire structure contents through serial and output it to a file.
How to load all registers into C struct?
Re: How to load all registers into C struct?
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}