Hi, can someone help out by giving me 2 code fragments such that i can break an .asm file into multiple .asm file and still have it comple like it was one.. example: Window with a Dialog box. I would like to break the dialog box proc (DlgProc) into a separate .asm file such that i can keep the code more organized. I dont need the code or anything.. just the prototypes needed and roughly where in each file.. I know how to create lib's and use them.. but i dont want to do this for something like a DlgProc that is specific to a project. I tried reading the MASM ref manual that was posted a while ago, but the code examples are missing (some grphical error with word). The first fragment would be: main file and seconde asm file that has a parameter list, but doesnt call any api's within itself (like dw2ah.asm). The second fragment would be: main file and second asm with api calles.. (say messagebox.) This would greatly help me out for project organization, and again i dont want to much work in the examples just the needed info and where.. Thanx NaN
Posted on 2001-02-19 12:52:00 by NaN
To further this thougth, I renamed dw2ah.asm and saved it in my project dir. (temp.asm) I removed all the header infor in dw2ah.asm up to .code I provided a PROTO for it in the main file and included it as: include temp.asm I later call it for a simple conversion to test it invoke temp, edx, addr buffer1 It assembles fine... But the linker give me "one unresolved external error" I have tried using extern as described by the manul (with out examples) but seem to be failing, which is why i have turned to the guru's... NaN
Posted on 2001-02-19 12:57:00 by NaN
Doesn't "include" treat it as if the file were a part of the actual file it is included in (if that makes sense). So by including a file, it is comparable to copying & pasting the contents of that file into your code at the position of the include (I think :) ) Where as extern refers to some object external to the code being assembled, and will be added at link time. So

include blah.asm
will litteraly contain the code within blah.asm, rather than it being added later (ie. at linking time). Mirno --Legal disclamer for my stupidity/being wrong-- This information is provided as is, and may be wrong at any time. Not only may it be wrong, but its "wrongness" is meant to be. As such no reprocussions upon its author may be exacted, as any part wrong or otherwise is meant to be such. It is up to any readers to activly disceminate correctness, and not the responsiblity of the author to point out incorrectness. Thankyou --End of disclaimer--
Posted on 2001-02-19 13:17:00 by Mirno
Ok.. Im a moron.. :) I have been seeing it solution time and time again.. and never though about what i was reading.. The prostart does a good job of just that.. including modular PROC's like button etc. my template is found.. But if any of you have any other words of wisdom on the subject i would still like to hear what you have to say.. NaN
Posted on 2001-02-19 14:35:00 by NaN