views:

83

answers:

4

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.

+2  A: 

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.

Ignacio Vazquez-Abrams
Well, it's just a nice 'party trick'... If I'm not able to find the answer in another couple of days, I'll just mark your answer as accepted :- ).
Alterlife
A: 

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".

erjiang
A: 

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.

dthorpe
A: 

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

--jeroen

Jeroen Pluimers