WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Sponsors
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
Hard Drive Recovery
Wiring your own LAN
Personal menu
Welcome Guest
User:
Pass:
Register!
Resend Validation Email
 
Forum
Pages (3) [1] 2 3   ( Go to first unread post )

Support for alternate linker? (Or Add-in)?, Support for OptLink

filofel
Quote Post


New Member
*

Group: Members
Posts: 8
Member No.: 1579
Joined: 16-October 05


Hi,

I've been using WinAsm studio for a couple of days now, and it sure is nice.
Thanks, Antonis!

Now, I'm using it to develop NBP (PXE's Network Boot Programs). When assembled and linked, thoses things end up as a flat binary file, something like a .COM file that would start executing at 0x00 instead of 0x100. Or like a .SYS or .BIN file, for that matter.

To develop this, I use OptLink, that is able to link such files, as well as to do many other wonderful things that few other linkers can do. Optlink has the nicest features set I know of, can generate 16-bit as well as 32-bit executables, COFF and OMF, DOS, NE and PE .exes, can consolidate multiple segments, can give useful diagnostics when something is wrong about the object code it's fed with, etc...

Anyway, OptLink was originally designed to be command-line compatible with the 16-bit MS Linker, that didn't have an /OUT or a /LIBPATH option, but that took positionnal file names on the command line instead. Unfortunately, MS changed this in their 32-bit linkers to use the OUT and LIBPATH switches, and WinAsm studio now generates both of those, something that doesn't cut it with Optlink.

I have looked at the Add-in facility, but I don't see much API that would allow me to simply intercept the creation of the @*.war file to fix it on the fly. I have also noticed that the FASM support plug-in has a "batch file" facility", but it is limited to a single object file name.

The 10c question is thus:
Is there any way to do what I would like to do, i.e. write an Add-In that could intercept WinAsm studio before file "whatever.war" is written to disk, and manipulate the data buffer before it goes out to disk?

I have the brute force solution of writing a utility that I would call link.exe and that would take control, open the file, translate the parms and then launch Optlink, but an add-in looks cleaner.

Any solution to this one?

Philippe

P.S.:
I hope some folks around here remember the late and missed OptASM. It was two orders of magnitude better, faster and smarter than the MASM we had back then, and managed to be 150% compatible. It could even emulate various MASM bugs for project compatibility, something that Microsoft didn't do for MASM: MASM was notorious for breaking project builds whenever MS came out with a new version... Programs that used to assemble with Vn typically didn't assemble anymore under Vn+1.

Optlink came from the same author as OptASM, Steve Russell (SLR Systems).
Optlink was sold to Symantec, and finally bought by Digital Mars when Symantec gave up and sold their development tools. I presume OptASM was sold to Symantec too (since it disappeared at exactly the same time), but Symantec never upgraded it for 32-bit support and MASM 6 compatibility, nor even released it under their brand name.

Now as for Optlink, the folks at Digital Mars still sell and support OptLink as part as their excellent (and very cheap) software development tools suite.
Last but not least, Optlink can also be downloaded for free from Digital Mars.
PMEmail Poster
Top
shoorick
Quote Post


Extremely Active Member
******

Group: Admins
Posts: 2301
Member No.: 160
Joined: 22-June 04


hi!

although batch compilation has its bad sides i think any project can be compiled using bats. ASM_NAME, RC_NAME and OUT_NAME environment variables provided to use in bat to not edit them each time when you clone project and change name of application etc. You may put any parameters to the commandline in the bat. _link.bat in the project folder is exactly that "link.exe" you plan to write to intercept generic ms link wink.gif note: on "go all" _make.bat will be executed - you have to place full process in it. and last: sophistic/non standart project can be made using "make" utilities - they can be easy called from _make.bat (see wap example from tasm5 in the last examples for wafasm in download area) in future i plan to add direct support for make tool in wafasm (forced to uncover a secret 8)

regards!
PMEmail PosterUsers Website
Top
filofel
Quote Post


New Member
*

Group: Members
Posts: 8
Member No.: 1579
Joined: 16-October 05


Hi, Shoorick!

But ASM_NAME only contains the name of *one* ASM file, right?
The nice thing with WinASM is that it builds the list of all files in the project, the main ASM file plus all of the module files (and I have many of those!)
And as I restructure code, add, remove or rename files, it's just boring duplicating effort by manually keeping track of them in an external .bat or make file. I keep on forgetting to properly update file lists in make files (such as include, modules, libraries, etc.) when the change rate is high. And of course, the kind of build error this introduces is not obvious.
As far as I'm concerned, the main benefit of an environment such as WinAsm is that it contains its own GUI built-in make, and avoids error-prone duplication of efforts.

Or am I missing something in the way to use the _link.bat file? /Ph.


PMEmail Poster
Top
shoorick
Quote Post


Extremely Active Member
******

Group: Admins
Posts: 2301
Member No.: 160
Joined: 22-June 04


yes, you are fully right about ASM_NAME. if you mean building filelist of binary files, included into project, before _link/_make will be called: it is possible, but will take some time.

regards!
PMEmail PosterUsers Website
Top
shoorick
Quote Post


Extremely Active Member
******

Group: Admins
Posts: 2301
Member No.: 160
Joined: 22-June 04


I keep on forgetting to properly update file lists in make files
if you mean all files: *.asm / *.inc / *.obj etc. could be possible to use. if you mean adding files via "Project/Binary files..." - you can also forget to update it wink.gif

at last, you can post your project (wap only) and what command line and how you wish to pass to the linker so we can decide the best way to solve this problem.

regards!
PMEmail PosterUsers Website
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Pages (3) [1] 2 3  Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian
Google