assemble load and execute rather than assemble link and execute

I am an IBM SYS/390 sys prog, getting interested in x86 assembler.  In the
IBM world, there are programs, depending on the language the program was
written in, that would assemble (or compile), load the program into memory
and execute, rather than assembling the program, linking the object code
into an executable lib and then executing the program.

Is there in x86 assembler a way to assemble code, load it and execute it
without the linking, etc.

Inquiring minds want to know.

Thanks.
JR

0
John
9/11/2004 11:10:24 AM
comp.lang.asm.x86 4917 articles. 11 followers. Post Follow

11 Replies
379 Views

Similar Articles

[PageSpeed] 41
> Is there in x86 assembler a way to assemble code, load it and execute it
> without the linking, etc.

COM programs can be just assembled, loaded into memory and executed. They 
don't require linking if the source consists of one file. IIRC nasm can 
produce .com immediately, without generating .obj

-- 
Ivan

e-mail me at: korotkov2 at ztel dot ru

0
Ivan
9/11/2004 12:14:04 PM
On Sat, 11 Sep 2004 11:10:24 +0000 (UTC), "John F. Regus"
<spamtrap@crayne.org> wrote:

>I am an IBM SYS/390 sys prog, getting interested in x86 assembler.  In the
>IBM world, there are programs, depending on the language the program was
>written in, that would assemble (or compile), load the program into memory
>and execute, rather than assembling the program, linking the object code
>into an executable lib and then executing the program.
>
>Is there in x86 assembler a way to assemble code, load it and execute it
>without the linking, etc.

I'm not sure I understand the problem.  With a typical 'make' utility
(or a simple batch file) the assembly and linking are a single
invocation from your standpoint.  With a batch file you can even
include the execution as well as assembly and link.  If you are
really bothered by the separate linker, note that current versions
of MASM include a built-in linker, but I seem to recall that there is
some limitation or awkwardness in using it.  I suspect most
folks still use a separate linker.


Bob Masta
dqatechATdaqartaDOTcom
 
            D A Q A R T A
Data AcQuisition And Real-Time Analysis
           www.daqarta.com

0
NoSpam
9/11/2004 2:07:22 PM
On Sat, 11 Sep 2004 11:10:24 +0000 (UTC), John F. Regus wrote:

> Is there in x86 assembler a way to assemble code, load it and execute it
> without the linking, etc.

I'd recommend FASM - www.flatassembler.net. It can directly generate
executables without the need of linker, import libraries and the like.

-- 
Vulnerant omnes, ultima necat.
http://ry.pl/~omega/
Looking for a job.

0
Omega
9/11/2004 5:47:17 PM
"John F. Regus"  <spamtrap@crayne.org> �crivait
news:KkrVc.28801$9Y6.4635@newsread1.news.pas.earthlink.net: 

> I am an IBM SYS/390 sys prog, getting interested in x86 assembler.  In
> the IBM world, there are programs, depending on the language the
> program was written in, that would assemble (or compile), load the
> program into memory and execute, rather than assembling the program,
> linking the object code into an executable lib and then executing the
> program. 
> 
> Is there in x86 assembler a way to assemble code, load it and execute
> it without the linking, etc.
> 
> Inquiring minds want to know.


RosAsm does it for PEs.


Betov.

< http://betov.free.fr/RosAsm.html >


0
Betov
9/11/2004 9:12:40 PM
"John F. Regus"  <spamtrap@crayne.org> wrote in message news:<KkrVc.28801$9Y6.4635@newsread1.news.pas.earthlink.net>...
> Is there in x86 assembler a way to assemble code, load it and execute it
> without the linking, etc.
'octasm' can assemble and execute a source file without writing any
file to disk,it runs with DOS.

0
spamtrap
9/12/2004 1:11:13 PM
[snip]

If you think not only about x86 ASM, then older Turbo Pascal compilers 
come to mind where you could set the destination of the compiler to 
"Memory" instead of "Disk" and it would not produce an EXE-File but you 
would run the program for testing directly from this memory-compile.

Is this what you ask for?

Greetings

Markus

0
Markus
9/13/2004 5:56:16 PM
"John F. Regus" <spamtrap@crayne.org> wrote in message
news:KkrVc.28801$9Y6.4635@newsread1.news.pas.earthlink.net...
> I am an IBM SYS/390 sys prog, getting interested in x86 assembler.  In the
> IBM world, there are programs, depending on the language the program was
> written in, that would assemble (or compile), load the program into memory
> and execute, rather than assembling the program, linking the object code
> into an executable lib and then executing the program.
>
> Is there in x86 assembler a way to assemble code, load it and execute it
> without the linking, etc.
>
> Inquiring minds want to know.

"Compile, Load, and Go" doesn't exist in any meaningful fashion
under Windows. There were some DOS tools that did this, but
nothing really, for Windows.

OTOH, most assemblers automatically run the linker for you,
so who cares about the linker stage?  Consider the High Level
Assembler (HLA), a simple command line like:

hla hw.hla

automatically compiles the sources, links it, and produces
an executable, ready to run.  Usually in less than a second
or two.  Other assemblers have similar processes.

About the closest to "compile, load, and go" you're going
to get in assembly language is the little built-in assemblers
that accompany debuggers. However, they are too
painful to even consider.

Cheers,
Randy Hyde

0
Randall
9/13/2004 9:36:57 PM
I vaguely remember something on the sourceforge site that was a tool
that assembled assembler code and loaded it into memory to run. From
memory it was nothing like as powerful as a modern windows assembler
but apparently it worked.

Its generally been the case on x86 PCs to build the file as a binary
file then run it from disk. The linking stage is usually one of the
faster ones in building the complete file, its assembly time that is
the slowest in most cases.

What you can get will depend on the platform you have in mind, there
are dedicated assembler for both Windows and Linux and a couple that
will work on both.

Regards,

hutch at movsd dot com

0
spamtrap
9/14/2004 3:58:10 AM
"John F. Regus"  <spamtrap@crayne.org> wrote in message news:<KkrVc.28801$9Y6.4635@newsread1.news.pas.earthlink.net>...
> I am an IBM SYS/390 sys prog, getting interested in x86 assembler.  In the
> IBM world, there are programs, depending on the language the program was
> written in, that would assemble (or compile), load the program into memory
> and execute, rather than assembling the program, linking the object code
> into an executable lib and then executing the program.
> 
> Is there in x86 assembler a way to assemble code, load it and execute it
> without the linking, etc.
> 
> Inquiring minds want to know.


Probably the closest you'll get is if you use an IDE like Visual
Studio*.  While you've got your project open, hit F5, and it'll
compile and run the program (and, if it crashes, toss you right into
the debugger).  Under the hood it'll actually generate an executable,
but...


*You will have to fiddle a bit to convince VS to allow an assembler
mainline project - it's not one of the default project types - for a C
or C++ program you can just start a new project of that flavor.  If
you don't mind writing a trivial C mainline, it's fairly easy to add
an assembler subroutine to a C project.


Frankly, though, the suggestion to just do the compile/link/execute in
a batch file is simpler for a small project.

0
spamtrap
9/14/2004 7:24:05 AM
On Tue, 14 Sep 2004 03:58:10 +0000 (UTC), spamtrap@crayne.org
(hutch--) wrote:

>I vaguely remember something on the sourceforge site that was a tool
>that assembled assembler code and loaded it into memory to run. From
>memory it was nothing like as powerful as a modern windows assembler
>but apparently it worked.
>
>Its generally been the case on x86 PCs to build the file as a binary
>file then run it from disk. The linking stage is usually one of the
>faster ones in building the complete file, its assembly time that is
>the slowest in most cases.
>
>What you can get will depend on the platform you have in mind, there
>are dedicated assembler for both Windows and Linux and a couple that
>will work on both.
>
>Regards,
>
>hutch at movsd dot com
>

Hutch, isn't there an IDE in your MASM32 package
that does pretty much what the OP asks?  (I use
MASM32 without the IDE because I'm attached to
my old DOS-based TSE editor.)

Just a thought...



Bob Masta
dqatechATdaqartaDOTcom
 
            D A Q A R T A
Data AcQuisition And Real-Time Analysis
           www.daqarta.com

0
NoSpam
9/14/2004 12:06:40 PM
"Bob Masta" <NoSpam@daqarta.com> wrote in message
news:4146db5d.271317@news.itd.umich.edu...
> On Tue, 14 Sep 2004 03:58:10 +0000 (UTC), spamtrap@crayne.org
> (hutch--) wrote:
>
> >I vaguely remember something on the sourceforge site that was a tool
> >that assembled assembler code and loaded it into memory to run. From
> >memory it was nothing like as powerful as a modern windows assembler
> >but apparently it worked.
> >
> >Its generally been the case on x86 PCs to build the file as a binary
> >file then run it from disk. The linking stage is usually one of the
> >faster ones in building the complete file, its assembly time that is
> >the slowest in most cases.
> >
> >What you can get will depend on the platform you have in mind, there
> >are dedicated assembler for both Windows and Linux and a couple that
> >will work on both.
> >
> >Regards,
> >
> >hutch at movsd dot com
> >
>
> Hutch, isn't there an IDE in your MASM32 package
> that does pretty much what the OP asks?  (I use
> MASM32 without the IDE because I'm attached to
> my old DOS-based TSE editor.)
>
> Just a thought...

The IDE (e.g., RadASM) still does file-to-file and
linking. It just automates the process (much like a
makefile).

Then again, as I said earlier, who really cares? If you
type "ml file.asm" and you get an executable, does it
really matter that the linker ran somewhere in there?

"Compile-load-and-Go" systems were very popular
in the days of mainframes, card punches, and
$150/hour CPU-time systems because they were
very fast and cost less to operate. Those savings
just don't apply on PCs. Even when linkage, most
assemblers complete the full assembly and link process
before the human operator can react.

Cheers,
Randy Hyde

0
Randall
9/14/2004 3:21:43 PM
Reply:
Similar Artilces:

help in accessing the load data in Simpower systems
Hello All, Does anyone have an idea on how we can access the load data eg Active power P of the constant impedance load block during the simulation? I want to vary the load and see the effect during the simulation. I would appreciate if anybody could solve my problem. Thank you in advance. regards Sarina ...

Figuring out table based encryption in assembly
I've been tracing an old (1996) utility that uses a very sophisticated encryption algorithm for license info. It generates a table, uses constantly changing keys, and does some really bizarre stuff with multiplication, shifts, xor, and table lookups. The crypto group doesn't seem to be very active or very helpful, so I thought I'd ask here: is there any way to figure out if this is a standard encryption method? It's so complex, it seems unlikely some guy in his garage made it up. But at the same time, I'm not sure how to tell if it is DES, Blowfish, or something similar...

Different views of same assembly with different sub parts showing?
Hi, I am trying to make an A3 drawing of an assembly showing different sides of the assembly. And also showing different parts in the assembly. As soon as I import another view with different parts showing the other view changes so that the same parts as the new view are also visible in the old view. How can I make the parts defined in the old view stay in the drawing and aslo get the new view with other parts visible? SW2003 user. Best regards P�l Eilertsen I do the same thing all the time in my assemblies. What I do is set up Assembly Configurations showing the parts I need for a given ...

Firefox 1.0.7 browser keeps loading after simple DOM manipulation, works in FF 1.5 and IE
I'm performing some simple DOM manipulation. Basically creating two iframes, adding a bold element with text and then removing the bold while preserving the text that was part of the bold element. In FireFox 1.0 this causes the browser to start the throbber and it does not stop. The bug does not appear in FF 1.5 or in IE. Note, that the bug also does NOT appear if I remove the second IFrame element and the DOM manipulation on this element. Stepping through the code with the Venkman debugger shows that the throbber begins when I execute the following line in the iframeBug2 function: _...

{Historical} Lisp 'manually' compiled to assembly
Hello All, I was going through wikipedia's article on eval at http://en.wikipedia.org/wiki/Eval. For eval in Lisp it mentions that: <quote> Lisp was the original language to make use of an eval function. In fact, definition of the eval function led to the first implementation of the language interpreter. Before the eval function was defined, Lisp functions were manually compiled to assembly language statements. However, once the eval function had been manually compiled it was then used as part of a simple input-interpret-output loop which formed the basis of the first L...

Still learning about loading modules
I am trying to setup the sound card in a computer running Mandrake 9.1. I just updated the kernel modules from a cd-rom (actually I just installed them). The Soundblaster kernel module will not load. This is the output I get when I do "insmod sb": Using /lib/modules/2.4.21-0.25mdk/kernel/drivers/sound/sg.o.gz /lib/modules/2.4.21-0.25mdk/kernel/drivers/sound/sg.o.gz: unresolved symbol probe_sbmpu_Rddc8ad00 /lib/modules/2.4.21-0.25mdk/kernel/drivers/sound/sg.o.gz: unresolved symbol smw_free_R450f9aea /lib/modules/2.4.21-0.25mdk/kernel/drivers/sound/sg.o.gz: unresolve...

Executing system commands in threads under Ruby 1.8.6
I tried to write a script that makes use of external binaries. Each external binary is called from a different thread, but, under 1.8.6, this doesn't seem to work. Everything is executing in a sequential-like manner. The guys from StackOverflow said this was because of Ruby's thread implementation ( and when I tried the same code under JRuby, it worked ). Is there some way to make my script work under 1.8.6, or is upgrading to 1.9 the only solution? -- Posted via http://www.ruby-forum.com/. vhaerun vh wrote: > I tried to write a script that makes use of external binaries. Each &...

Timeout in VO applications ( Re: Leave data servers open or load into listview, which is better ? )
My news server is having problem with my new ADSL modem. Sometimes works, sometimes it does not. I had to use my dailup modem again for posting. Marcos, Yes, I can kick that fellow out by using self:Quit() instead of a login screen. I cut and past that example from one of my application which purpose is to lock the screen so other users cannot meddle with the data while he is away for too long. If this login screen is cancelled, the application terminates itself. Gary, I agree with you about using constants. I am not sure what are the defined constant available for IDLE state. In...

US-TX-Austin: Software Eng., 5yrs exp., C++ mastery on OOP, C, Assembly, debug; (45319132408)
US-TX-Austin: Software Eng., 5yrs exp., C++ mastery on OOP, C, Assembly, debug; (45319132408) ============================================================================================= Position: Software Eng. Reference: SMC01564 Location: Austin TX Duration: C-P Skills: BSCE or BSEE with a minimum of 3-5 years related experience. 3-5 years experience implementing development tools for embedded systems. C++ with emphasis on object oriented programming concepts. Proficiency with C/C++, Vi...

Assembly Weldment
I am rather new to Works, I have worked in SolidEdge and ProE for 5 years now. I am trying to create a fabricated bracket. I have several rings and tubes that I would like to have welded together. Then once I have the weldment created I would like to open that assembly in the part environment and add my drilled holes and cutouts. Is there a workflow to do this? In SolidEdge I would just tag the assembly as a weldment, then it could be opened in the part environment for all the post welding operations. I like this workflow because it maintains all the linkages between the weldment and fin...

Sun Ultra-2 Loaded !!!! #3
Sun Microsystems Sun Ultra 2 Enterprise Dual 400mhz processors w/2 megs Ecache each 2 Gig memory Quad Fast Ethernet Card Elite 3D-m6 Framebuffer 18 gig hard drive Your choice of Solaris 8 or 9 installed Type 6 Keyboard and Mouse $400.00 $35 Shipping anywhere in U.S. Located in San Francisco Contact : Manfred Antar 415 681 6235 ================================== || null@pozo.com || || Ph. (415) 681-6235 || ================================== ...

New assembler syntax file for Textpad
G'day everyone, I've just submitted a simple z80 assembly language syntax definition file to the developers of Textpad (AKA Helios Software Solutions). It's one of my dusty old files I found on a previously unreadable floppy disk. It's not perfect, but it's saved my bacon a couple of times, and it sure makes reading someone else's code a HECK of a lot easier! It won't interest anyone who doesn't use or want to use Textpad, so I apologise to the *nix and DOS-only users out there! FWIW, I cut my teeth on the later Z80 mnemonics, not the 8080 ones,...

dll loading problem
Hi all, I'm trying to create an interactive application which compiles ant file, and does several other things. For this purpose I'm using Project and ProjectHelper ant classes. In addition, I defined my own ant Task, which used native code: public class IdentityTask extends MatchingTask { .... private native boolean CallIdentity(); static { System.loadLibrary("..."); } ...... } The first compilation is succeeded without any problems, the dll is loaded and the native code is called. But when the second compilation request is processed, the following exception is th...

Firewalling 2 live WAN links
I currently have one ASA 5510 sitting behind one of my edge routers and I'd like to also use this same device to firewall another WAN link. Currently the 2 networks behind each WAN link can talk to each other through our core router. Is this doable? Would I need to configure 2 inside interfaces so that traffic destined for either of those WANs have their own gateway? Can this be accomplished with just one inside interface? The end result will look something like this (Ip ranges are just examples): 10.1.1.0/24 WAN B = = Router B = = ASA 5510 = = Router A = = WAN A 20.1.1.0/24 = = Core Rout...

Load and display an image.
Why doesn't this work? When I execute the "onClick" event, the image appears briefly, then goes away. I'm trying to develop a page where I can change the image being displayed. <script type='text/javascript'> function getImage() { var image = "images/MtRushmore.JPG" ; document.getElementById('imgSpot').src=image; } </script> <form name="form1" id="form1" method="post" action=""> <img id='imgSpot' name='imgSpot' src="" height="200" ...

The Last Lonely Lisp Link
The Auckland University of Technology, dateline November 4, 2003. He searches. Further and further into the stacks at the AUT library. At last, the familiar blue-green cover, images of 'Steele' and 'Lisp' appear on his retina. Amidst a sea of Java, an ocean of C++, the Last Lonely Lisp Link awaits, perhaps for one last time, a human touch. But I can not bring myself to actually take it off its shelf. Looking like it has not been touched since dinosaurs roamed New Zealand, I fear for its very existence. No worthwile companions do it honor. No Norvig, no Graham, no Keene. ...

linking Access to internet databases
Is it possible to link Access tables to internet databases such as, for example the International Labour Organization (ILO) Database? There are a set of ILO tables from which I use the data regularly, and it would be great if there was a live link (automatic update) to a table in Access. I would appreciate any ideas on the best way to do this. Thanks. Dave Shapiro *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! ...

Quartus II 3.0 Release & Web Edition Download Links
Quartus II software version 3.0 is now available on the PC, Solaris, Red Hat Linux, and HP-UX operating systems. Customer CD shipments will be made from July 11 - July 21. The Web Edition is available for download now. Learn about the new features in Quartus II version 3.0 at <http://www.altera.com/products/software/pld/products/q2/whats_new/qts-whatsnew.jsp> For general Quartus II software information visit <http://www.altera.com/products/software/pld/products/q2/qts-index.html> To download the free Quartus II Web Edition software for PCs visit <http://www.altera.com/product...

Large executable file
Hi, Now that we have cc65+open source software, i am planning to compile few intresting programming languages for iie. So I would like to know whether it is possible to run a large executable file like 200KB..... or more.... on a iie. what are the limitations of 1MB ram card + Prodos in this case? Regarding Contiki... will this OS support large executable files? thanks, sanjaya I think there is a driver for apple II RAM cards for CC65. This would allow you to fiddle with the softswitches and change which bank is active. There is not a memory manager that will automatically use extra RAM...

First Help query is slow to load.
This problem is a bit insignificant, but I find it annoying, so I thought I'd check if anyone can help. When I run Matlab on my personal laptop, it takes about 20 seconds to execute the first help query of a Matlab session. After the first one is done, help works smoothly and quickly as I've always experienced. Does anyone know why this could be or anything I can do about it? I am running: MATLAB Version 7.0.4.365 (R14) Service Pack 2 Operating System: Microsoft Windows XP Version 5.1 (Build 2600: Service Pack 2) Java VM Version: Java 1.5.0 with Sun Microsystems Inc. Java HotSpot(TM...

Re: No need to optimize in assembly anymore
"a" <a@a.com> wrote in message news:e4Npc.89$JL5.48@newsfe1-win... > Given that optimizing in assembly for one processor will have no effect (or > negative effect) on a different processor it seems that low level > optimization is becoming a waste of time. As processors become more > sophisticated and diverse in the way they execute code this trend is likely > to continue. Trying to optimally schedule code for multiple implementations may be difficult, but code optimized for a P6, K7, or K8 processor runs near optimally on the other two, so there's rarely a...

WTB: Link Host Adapter for Atari! #20
I'm building SCSI Hard Drives for my Customers & need Link Host Adapters! Specifically ICD Hosts, preferably ICD Link 2. Not Link 97! I cant afford New! That means no Dealers.Private Parties only. E-Mail Atari@aracnet.com Atari Jaguar, 8 Bit and ST Games/Software, Hardware/Accessories & References/ Books. FREE Catalogs on Ben's Domain at http://BensCatalogs.Atari.org or at http://BenSells.Atari.org Catalogs can be attached to,Requested by & Received Through E-Mail at Atari@aracnet.com or BenSells@Atari.org and Please Specify Atari 8 Bit, ST, Jaguar and/or all 3...

linking MatLab with Fortran and C/C++
Hi there, I am not very used to programming and I've been trying to link a Fortran program with MATLAB. Nevertheless, my MATLAB does not recognize my Fortran compiler but it does recognize my C++ compiler. So, I decided to link the Fortran and MATLAB programs through a C/C++ routine. Looking for this subject on the web, I found out about the Mex-Files but, for my lack of experience, I still don't understand how to use them properly. I have already managed to link a C++ main program with a Fortran function on a Visual Studio 2005, but I can't see how can I make a Mex-File call thi...

load a custom wxMenu class from an XRC file
Hi, I want to load a custom wxMenu class from an XRC file. How can this be done? wxXmlResource::AttachUnknownControl() cannot be used since my custom class is not derived from wxWindow. I think that wxXmlResourceHandler would do, but is there ant sample available anywhere? Thank you, Cristina. --------------------------------------------------------------------- Please read http://www.wxwindows.org/mlhowto.htm before posting. To unsubscribe, e-mail: wx-users-unsubscribe@lists.wxwindows.org For additional commands, e-mail: wx-users-help@lists.wxwindows.org --Bou...

support D-Link DSL-200 ?
Hi all, i'm considering to apply ADSL in my place and many ISPs are selling D-Link DSL-200 modem which is a USB modem. So, before i buy it, i want to make sure that freebsd supports this modem; otherwise, i may need to go for another more expensive model which is an ethernet modem. does anyone has successfuly using D-Link DSL-200 in freebsd? could u share some experience with me ? thanks a lot :) -- ~FreeDevil~ FreeDevil wrote: > Hi all, > > i'm considering to apply ADSL in my place and many ISPs are selling D-Link > DSL-200 modem which is a ...