: : : Is there any way to compile Turbo Pascal 7.0 code to .COM file format ?
: : :
: :
: : Not directly I believe (correct me if I'm wrong).
: : You could, however, mark portions of code with assembly NOP functions and then pull the code out of the .EXE file and use DEBUG to convert it to assembly code that could be inserted into a TASM file.
: :
: : Not really easy, but Turbo Pascal is a high level language and .COM files are built from low-level compilers.
: :
: : I like to use markers like this:
: :
: : Begin
: : ASM NOP; NOP; NOP; END;
: : GotoXY(12,4);
: : ASM NOP; NOP; NOP; END;
: : End.
: :
: :
: : Then after compiling, use your favorite editor to search for Ordinal value 144(x3) ()
: : There will be two sets of these in the file. One will be the start marker for the code, the other will be the end marker. Save it to a new file (such as CODE.OUT) and use "DEBUG CODE.OUT" to view the code as assembly.
: :
: : Anyways, if you say exactly why you want to make it a com file, then we might be able to help more.
: :
: : Phat Nat
: :
: I'd like to point out that the first TP that I used [ver 3.0 in 1984] ONLY compiled .com files, and it should certainly be considered a high-level language. There was even a utility that came with DOS [exe2bin] that could convert most .exe files to .com. I do agree that most modern .exe files cannot be as easily converted.
:
I think you're right. I do remember something along those lines (ah, DOS. Back when you didn't have to reload an operating system every couple months...) Worth checking the old DOS disks (if you still have them) to see about that file; of course it'd only run under a DOS formatted boot disk.
Phat Nat