From: <Ara...@Ar...> - 2005-08-26 04:42:35
|
On Thu, 25 Aug 2005 20:12:25 -0700, you wrote: <snip> > 1. Re: Assembly Language Compiler (Frank Kotler) >Message: 1 >Date: Thu, 25 Aug 2005 01:14:55 -0400 >From: Frank Kotler <fbk...@co...> >Organization: N >To: George G Fung <gu...@ju...> >CC: nas...@li..., nas...@li... >Subject: Re: [Nasm-devel] Assembly Language Compiler > >George G Fung wrote: >> Hi Nasm, > >Hi George, > >This really isn't a "nasm-devel" question. The "nasm-users" list was=20 >created for this kind of question, so I'm cc'ing this reply there. > >> I have a bunch of subroutines and functions that are written in = Assembly >> Language and I would to compile them so that I can use them in my = Visual >> Basic programing . Is there a compiler available for doing this? I = have >> attached one of those Assembly Language subroutines for your viewing. > >What you've got there is 16-bit code for Masm. I'm not very familiar=20 >with VB, but I'm pretty sure it's 32-bits - so this code won't work, as=20 >written. I don't know how to use asm with VB, but I recall hearing that=20 >it can be done. I think the code you've got would require a *complete*=20 >rewrite to be used with Nasm and VB - maybe easier to start from=20 >scratch. Might be an interesting project - why don't we discuss it=20 >further on "nasm-users"? > <snip> VB 1,2,3 were 16-bit. VB 4 came in both flavors. VB 5+ are 32-bit. The short answer is: You can't. Don't waste your time trying. VB (thru 6 - the last that I have seen) has no ability to link with static libs. The only reasonable way to use ASM code of any kind in VB is to put the ASM code in a DLL. There is a (horribly convoluted) way around this limitation, but it requires modifying the actual VB compile process. That requires a program that I think is no longer available from the original source. In addition, you have to create an additional VB module with fake versions of all the ASM routines that you want to use, in order for there to be something to replace. Then in the modified compile process, you remove the VB fake module, and replace it with the ASM obj file. Roaring Pain. Better to make a DLL. The only useful thing that I use the compile modify routine for is to turn on the pass 2 compiler asm listing. You can't actually compile the output, but it quickly shows how badly bloated some parts of VB generated code really is. --=20 ararghmail508 (ararghmail508 at arargh dot com) http://www.arargh.com BCET Basic Compiler Page: http://www.arargh.com/basic/index.html |