Hello!
This is my first post here and I was wondering if you could help me with a small basic kernel that I've translated to masm. Here is the code: http://pastebin.com/QSJ4sDeR
The problem is with the multiboot header(or at least that is what qemu says). Please don't say that nasm is better or something like that, because I've used this syntax for programming under Win32.
Thanks,
Paul Herman
C Barebones ported to MASM - Errors
Re: C Barebones ported to MASM - Errors
I just want to say that the MASM license doesn't allow you to write an OS with it. So, you should use JWasm. This assembler is fully compatible with MASM-syntax.bluman wrote: Please don't say that nasm is better or something like that, because I've used this syntax for programming under Win32.
"Open source seems to embrace the dark side of human nature." - Ville Turjanmaa
Re: C Barebones ported to MASM - Errors
Have you checked your output file with a hex editor to make sure the header is correctly formed and in the right place ?
If a trainstation is where trains stop, what is a workstation ?
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: C Barebones ported to MASM - Errors
OS development is not windows development. The barebones assumes a cross-compiler targeting ELF, because that's what the bootloader expects to find. You can not simply use the PE format that windows-targeted tools use because it means you are violating the specification.
Re: C Barebones ported to MASM - Errors
MASM32's license restricts this, not MASM.I just want to say that the MASM license doesn't allow you to write an OS with it. So, you should use JWasm. This assembler is fully compatible with MASM-syntax.
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();}
Re: C Barebones ported to MASM - Errors
MASM64 is under the MASM32 license too right?neon wrote:MASM32's license restricts this, not MASM.I just want to say that the MASM license doesn't allow you to write an OS with it. So, you should use JWasm. This assembler is fully compatible with MASM-syntax.
Re: C Barebones ported to MASM - Errors
Sorry, not sure, never used MASM64. I would think so if its from the MASM32 site.iLewis wrote:MASM64 is under the MASM32 license too right?
MASM is a Microsoft product; MASM32 and MASM64 are not which is probably why it gets confused alot.
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();}
Re: C Barebones ported to MASM - Errors
OK, I've "compiled" with jwASM and linked with LD, now it simply reboots without any message. Also does anyone know how to make the start label global? LD tells me that it can't find the start label. I think there is a problem as in my code I don't have .text and .bss