Creating an executable file without a compiler

I came across an article a long while ago on how to write out a .com file directly without using any external tools. The method was to basically copy con myfile.com and then hit ctrl+alt+number for each instruction.

I've lost the url for the guide... Google isn't helping much either.

If you have the link, please could you post it.

Answers


You don't need an article for it; what you've described is the entire tail end of the process. Just make sure you use the keypad numbers and not the toprow numbers.

For the beginning, you'll need to hand-assemble the program. Unless you're into pain I recommend you find yourself an actual assembler or compiler instead.


Insipred by Ignacio Vazquez-Abrams I found this link, which uses ECHO in stead of COPY CON.


There's also debug.exe that comes with most versions of Windows before Vista. You can use it as an assembler, disassembler, debugger, etc. and also code COM executables with x86 assembly with it. It may or may not fit your definition of a "compiler".


This is doable because .com programs aren't relocatable, so they don't need relocation tables, so the header is a fixed size. Not true for .exe files. I don't recall the header details off the top of my head (believe it or not, I used to!), but if you dig up one of the bibles of the old religion like "Undocumented DOS" or anything that talks about writing TSRs those should have info about the .com header.


The article Legion2000 SR iqlord's eXtreme coding describes the process, and has a list of the alt codes with related asm and hex values.

The article that got me interested in this topic was Bootstrapping a simple compiler from nothing. It looks like an interesting challenge, but I haven't tried it myself.

Scheme from Scratch is an example of someone working on the challenge of bootstrapping a compiler.


Need Your Help

Installation problem: couldn't find XML in the pack

joomla installation sifr

I'm a beginner in Joomla CMS, and maybe the answer is obvious.

Jquery Mobile + Phonegap Android - Custom Buttons on bottom

android layout cordova jquery-mobile

I'm developing my first app in jquery mobile and phonegap. Using listview to populate my page with RSS feeds. Now i want to add custom buttons which lie at the bottom of my screen.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.