Click here to Skip to main content
15,881,561 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to assemble a .asm source from within my cpp code using CreateProcess on NASM.
When I used Windows Command Prompt nasm -f obj hello.asm, the source assembled well resulting is about 300kb .obj file but when I use "cmd /c nasm -f obj hello.asm" as createProcess 2nd parameter within c++, it resulted in an incomplete 60kb .obj file.
No error was produced and I just can't figure out what is wrong.
Posted
Comments
Richard MacCutchan 3-Jul-13 9:06am    
Try using cmd /k then you can check the output of the command window. Or pipe the output of the nasm command into a text file.
Oso Oluwafemi Ebenezer 3-Jul-13 9:38am    
Thank you, found my error... I wasn't closing the ofstream that writes the .asm source to disk so NASM was assembling an empty .asm file

1 solution

Thank you, found my error... I wasn't closing the ofstream that writes the .asm source to disk so NASM was assembling an empty .asm file
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900