.com

Discussion in 'Software' started by LI_Geek_95, Jul 23, 2008.

  1. LI_Geek_95

    LI_Geek_95 Post-and-Run Geek

    How would I create a .COM application?
     
  2. PC-XT

    PC-XT Master Sergeant

    In assembler, C++, or what?

    I use debug to create very small .com files in assembler.

    You can use assemblers with ORG 100, then run through exe2bin.

    You may be able to convert some C, C++, or other .exe programs to .com programs if they meet the requirements, which include being smaller than 64KB.

    I think linkers can link .com executables, if told to. You may be able to tweak the switches to get it to do that, unless they've dropped support for this older format.
     
    Last edited: Jul 25, 2008
  3. LI_Geek_95

    LI_Geek_95 Post-and-Run Geek

    Possible to do one in C#
     
  4. PC-XT

    PC-XT Master Sergeant

    There is no linker in C#, although I've heard of third-party linkers. I don't know if any of them can link .com files or not. If you really want to, you could try some combo of a third-party linker and exe2bin, but it seems like a lot of trouble. It very well might not work, since C# is quite dependent on libraries and such. Is your objective dependent on using .com files?

    A .com file is basically an image of the program, after a 256 byte PSP (Program Segment Prefix) that gives program arguments. The .com file is copied immediately following the PSP and is executed starting with the first byte, with no validation or other processing of the file. It's just copied and run. There are other ways to get images, but you usually need special utilities to create and run them, like a debugger or a specially made utility, so that you can place the program in the proper state to run it.
     
    Last edited: Jul 26, 2008

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds