Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!samsung!uunet!dino!ux1.cso.uiuc.edu!midway!chsun1!lee From: lee@chsun1.uchicago.edu (dwight lee) Newsgroups: comp.os.msdos.programmer Subject: Turbo Assembler and .COM files Summary: How do I make COM files without EXE2BIN? Keywords: 8086 Turbo COM Message-ID: Date: 19 Jul 90 19:11:13 GMT Sender: news@midway.uchicago.edu (News Administrator) Distribution: comp Organization: University of Chicago Computing Organizations Lines: 44 I am using Turbo Assembler 1.0 (came with Turbo C 2.0 Professional) and I am starting to learn 8086 Assembly. To start out, I would just like to get the commonly-used instructions to work (ADD, MUL, etc). To this end I am only writing programs whose code and data are all in the same segment so that I don't have to worry about segmented addressing (for now). I also want to learn how to use DEBUG (from MS-DOS 3.30) to analyze the execution of COM files. Therefore, I want to use Turbo Assembler (and Linker) to generate COM files which I can then DEBUG. However, I can't seem to get the Turbo Linker to generate a COM file. I specify the /t flag when linking and generally get an error like: Unable to generate .COM file - data below CS:IP Or something like that. Without the /t, TLINK generates an EXE which can be converted to COM via EXE2BIN. Fine, but I'd rather do it directly through Turbo Linker. I have read the Turbo Assembler User's Guide and Reference Manual and have had no success puzzling this through. Evidently I need to find a way to get the code to start at an offset of 0100h, but I don't know how to do this. I only know about the simplified segment directives so far. My test program is: DOSSEG .CODE ProgramStart: mov ah,0 int 21h END ProgramStart Help! Also, if I want to put some data at a specific offset, how can I do this? I want to put, say, a list of ten numbers at 0300h (if the COM program starts at 0100) and address them in my program directly, instead of having the Linker take care of it for me. (I know it sounds silly to do this, but I want to do it anyway. Surely there is a way!) Thanks for your generous assistance. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Dwight A Lee / lee@chsun1.uchicago.edu / Am I the only net.user in DeKalb? 416 Annie Glidden Rd #B6 / "I am not the only dust my mother raised" - TMBG DeKalb IL 60115 / 815-758-1389 / I speak only for myself. / tCS/BB / Font