Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: "Rod Pemberton" Newsgroups: comp.os.msdos.programmer Subject: Re: Smaller C compiler Date: Thu, 05 Dec 2013 06:38:18 -0500 Organization: Aioe.org NNTP Server Lines: 33 Message-ID: References: NNTP-Posting-Host: CNsg4fVcCsvs3UaOgZtQCw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.16 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.os.msdos.programmer:1114 On Thu, 05 Dec 2013 02:39:14 -0500, Alexei A. Frounze wrote: > I've given it a thought and it looks like I might be able to get 16-bit > .EXEs straight out of NASM, without using any additional linker. > Consider this example (works with newer NASM, not sure if it's going to > work with the old one you're keeping around) for the -f bin option: > > ---------8<--------- > [snip] > ---------8<--------- > > I get a nice 128K .EXE out of the above with NASM and it works in DosBox. > > All I need to do is to make my compiler first emit all code and then > emit all data or emit them into separate files and then concatenate > them, so in the end I can make two 64K segments in such a "fake" .EXE, > one with code, another with data and stack. > I didn't check the size, but it works here. I checked in real-mode MS-DOS v7.10 and Windows SE DOS console. I don't have 6.22. Most versions of NASM I have generated the same error on lines 40 and 41 as listed in your source: ; warning: word data exceeds bounds 0.98.39 generated this warning on lines 39 and 42 instead. NASM versions 2.06rc8 and 2.08rc9 don't generate any warnings. Rod Pemberton