954,490 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to make EXE file from assembly?

I am new to assembly. I have writtem a program for my Z80. I have successfully assembled it. How do I make it to an EXE file?

resystor
Newbie Poster
4 posts since Nov 2008
Reputation Points: 10
Solved Threads: 0
 

When you say you have successfully assembled it, i'm asuming you now have at least one Object file. In which case you need a linker to link the object files together into and exe file.

Chris

Freaky_Chris
Master Poster
702 posts since Apr 2008
Reputation Points: 325
Solved Threads: 118
 

An EXE file is a Windows file. Your assembler should output a binary file, which would probably need to be converted to an Intel Hex file, the standard for burning to EPROMs, depending on where the Z80 is executing the code from.

Colin Mac
Posting Whiz
327 posts since Sep 2006
Reputation Points: 78
Solved Threads: 22
 

When you say you have successfully assembled it, i'm asuming you now have at least one Object file. In which case you need a linker to link the object files together into and exe file.

Chris

Yes I have an .obj file. Any idea where I can get this linker. thx

resystor
Newbie Poster
4 posts since Nov 2008
Reputation Points: 10
Solved Threads: 0
 

It would be a lot more useful if you told us the actual name/version of the tools you're using to compile / assemble your programs.

Also, the actual details of the hardware you plan to load this onto.

Salem
Posting Sage
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
 

It would be a lot more useful if you told us the actual name/version of the tools you're using to compile / assemble your programs.

Also, the actual details of the hardware you plan to load this onto.

Hi again. I am using TASM v2.9 assembler. I am running Windows Hyperterminal for communication. I have a Z80 mini computer (1.8432 MHz) with ROM, SRAM, USART, CTC and PIO. The ROM has boot code and has USART running at 2400 baud. I can fire up computer and it works by sending bootup message to Hyperterminal. However, my efforts at loading programs into my Ram have failed miserably. I haven't found a linker that will make a loadable program. Any help would be appreciated.

resystor
Newbie Poster
4 posts since Nov 2008
Reputation Points: 10
Solved Threads: 0
 

do you have an OS for this Z80 pc, because if you dont than your going to be able to use your flat binary file that was created from your compile to be run. You dont need an exe file if there is no OS, i once wrote a bootloader and assembled it to a flat binary file and loaded it on a floppy properly and it worked.

cam875
Junior Poster
170 posts since Jun 2008
Reputation Points: 12
Solved Threads: 4
 
do you have an OS for this Z80 pc, because if you dont than your going to be able to use your flat binary file that was created from your compile to be run. You dont need an exe file if there is no OS, i once wrote a bootloader and assembled it to a flat binary file and loaded it on a floppy properly and it worked.


No there is no OS. Just some bootup code in the ROM

resystor
Newbie Poster
4 posts since Nov 2008
Reputation Points: 10
Solved Threads: 0
 

ok so just write a bootloader, which is the first thing an OS does is run the bootloader. And write it to the first sector on a clean hard drive or floppy disk and boot from that. You just need an assembled flat binary file for a bootloader since your basically writing the OS. Look up this site here and google to learn how to write a bootloader.

http://www.osdever.net/tutorials.php?cat=0&sort=1

if you need any more help just make a new thread about bootloaders, ive written one before so I can offer some help on it.

cam875
Junior Poster
170 posts since Jun 2008
Reputation Points: 12
Solved Threads: 4
 

i think this is suppose to ur editor u use
after u assembled the code first u have created obj file then u link it using ur editor to be exe file these it what i do using intel instruction Set using TASM ans MASM editors

BlackSun
Light Poster
46 posts since Feb 2008
Reputation Points: 28
Solved Threads: 5
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You