The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: jj2007 on November 30, 2007, 01:55:24 PM

Title: listall, nolist etc
Post by: jj2007 on November 30, 2007, 01:55:24 PM
Is there any way to get a decent short listing? I tried this, but still get a 1.8 MB listing.

.nolist
include \masm32\include\masm32rt.inc

.code
.list   ; requires ML.EXE /Fl option

MsgText   db "Tiny console application",13,10,0

start:   print Offset MsgText
   print chr$("Eax contains ")
   mov eax,123456789
   print str$(eax)
   invoke ExitProcess,eax
end start
Title: Re: listall, nolist etc
Post by: Jimg on November 30, 2007, 02:45:01 PM
When I assemble your program with "/c /coff /Cp /nologo /Fl /Sn" I get an 873 byte listing file.
Title: Re: listall, nolist etc
Post by: jj2007 on November 30, 2007, 04:00:09 PM
Quote from: Jimg on November 30, 2007, 02:45:01 PM
When I assemble your program with "/c /coff /Cp /nologo /Fl /Sn" I get an 873 byte listing file.
Thanxalot, Jimg - it was the /Sn option that did the job:

/Sn Suppress symbol-table listing

Here is a more complete little App showing Ascii codes for keystrokes, as a template for console apps.


.nolist ; prevents listing of includes
include \masm32\include\masm32rt.inc
.list ; requires ML.EXE /Fl /Sn option

.code

AppName db "Tiny console application",0
UsrPrompt db 13,10,"Press any key to see its ASCII code, or Escape to quit: ",0

start: invoke SetConsoleTitle,addr AppName

.WHILE 1
  print offset UsrPrompt
  call ret_key
  .BREAK .IF eax==27
  print str$(eax)
.ENDW

invoke ExitProcess,0
end start