Re: Borland c++ - Spawn Function
Hi,
I'm using borland c++ builder, and i'm trying to get the spawnl function to work correctly. At the moment i am trying to execute masm assembler, so to compile assembly code from a text editor i created.
i have enter:
int result;
result = spawnl(P_WAIT,"masm.exe","/z /zi /zd /l *.asm",NULL);
The *.asm is causing masm to assemble ALL files in the folder. As the
number of .asm files increases masm reaches a limit (somewhere around 8files) and cannot assemble any more.
In the short term, I remove some .asm files from the folder (store themsomewhere else).
In the long term however I need to find out how to get at the filename I am working on so to direct spawnl(...) to only assemble one file.
I would be very grateful to any suggestions of how to overcome this problem.
RE: Borland c++ spawn function
Thanks for trying to help,
but the same thing still happens, unfortunately i can not specifiy one single .asm file because i need the editor to be able to open more than one (this is why i use the "*.asm").
It still will only create the list and object files of the asm file when only one asm file is saved. The minute more than one is saved it will not create the list and obkect file of any.
Any other suggestions would be very much appreciated.
Re: Assembling using spawn
Hi again,
I've attached my code so you can see what i'm trying to achieve. The assemble function still is not working correctly. I'm trying to use my windows based editor to assemble a .asm file that i open in it with a dos based assembler (using spawn).
I realise that *.asm does not work so i tried converting the filename (that has been loaded) into a char (rather than a AnsiString) and calling it in the spawn function, however spawn seems to pass over the filename i want to assemble because it is now just a char function.
Ideally i want to be able to pass the filename to a console type c function such as spawnl and then for masm to get the filename and assemble it to create the .lst file and .obj
Again.. any help would be greatly appriciated.