Listing is a plain text file with two columns where EuroAssembler logs its activity. See also manual.
lst PROGRAM FORMAT=COFF,MODEL=FLAT,WIDTH=32 INCLUDEHEAD "euroasm.htm" ; Interface (structures, symbols and macros) of other modules.
lst HEAD ; Start of module interface.
Dump lines may be accompanied with expanded lines, diagnostic and error messages.
The object Lst is allocated statically as a part of object
Src.
The listing line is compiled by procedure StmListing.
LST STRUC .Stream D D ; ^STREAM of the listing file contents. .SetBuffer D D ; ^BUFFER for %variable contents presented in dump column. .Section D D ; ^SSS with current section used in listing. .Status D D ; Flags in LstEncoding which control the listing. LSB contains character used as separator. ENDSTRUC LST
lstSeparator EQU 0x000000FF ; Mask of separating character in end-dump column: | ! + - *
lstNoList EQU 0x00010000 ; Do not list current statement.
lstNoData EQU 0x00020000 ; Dump column contains no data.
lstTRUE EQU 0x00040000 ; Dump the token TRUE to listing Data column instead of emitted data.
lstFALSE EQU 0x00080000 ; Dump the token FALSE to listing Data column instead of emitted data.
lstNothingExp EQU 0x00100000 ; Nothing to expand, Stm.ExpBuffer doesn't differ from Stm.SrcBuffer, or LISTVAR=OFF.
lstSet EQU 0x00200000 ; Dump .SetBuffer as hexa instead of emitted data. Set by LstSet.
lstAsRepeated EQU 0x00400000 ; Use '+' as lstSeparator for this statement.
lstExpSrc EQU 0x00800000 ; Expanded source is listed. Supress offset if no more dump bytes.
lstSectInline EQU 0x01000000 ; [sect] in dump column is on the same line as SEGMENT,STRUC,[Sect] statement.
lstSectKeep EQU 0x02000000 ; Do not display [sect] change in dump column.
lstLiteral EQU 0x04000000 ; Dump as literal, use '=' as lstSeparator.
lstEQU EQU 0x08000000 ; Dump Stm.Offset as numeric symbol value instead of address.
lstEnvelope EQU 0x10000000 ; Use space as lstSeparator for this statement, which is envelope PROGRAM/ENDPROGRAM.
lstListOn EQU 0x20000000 ; List this statement even when EUROASM LIST=OFF
.
lstTilde EQU 0x80000000 ; ~ as the last char in dump column indicates that not all dump bytes were listed.
lstVolMask EQU 0xFFFF0000 ; Volatile flags. Set in PseudoHandlers, reset in StmListing.
ENDHEAD lst ; End of module interface.
LstCreate Procedure LEA EBX,[Src::+SRC.Lst] MOV EDX,[Src.Pool::] StreamCreate EDX,BufSize=32K MOV [EBX+LST.Stream],EAX BufferCreate EDX,Size=2K MOV [EBX+LST.SetBuffer],EAX SUB EAX,EAX MOV [EBX+LST.Status],EAX MOV [EBX+LST.Section],EAX EndProcedure LstCreate
LstSet Procedure DataPtr, DataSize MOV EDI,Src::+SRC.Lst MOV EBX,[EDI+LST.SetBuffer] BufferClear EBX BufferStore EBX,[%DataPtr],[%DataSize] SetSt [EDI+LST.Status],lstSet EndProcedure LstSet
LstBoolean Procedure PUSHFD JC .90: MOV EAX,lstFALSE JZ .50: MOV EAX,lstTRUE .50: SetSt [Src.Lst::+LST.Status],EAX .90:POPFD EndProcedure LstBoolean
EUROASM LISTFILE=
,
or it is constructed from source file name appended with extension .lst.
LstGetFileName Procedure MOV ECX,[Ea::+EA.Eaopt+EAOPT.ListFileSize] MOV ESI,[Ea::+EA.Eaopt.ListFilePtr] TEST ECX JNZ .80: ; If explicitly specified with LISTFILE= option. ; Otherwise use the default "%^SourceName%^SourceExt.lst". LEA EBX,[Ea.SrcFile.Name::] ; Pointer to zero-terminated filename. GetLength$ EBX ; EBX,ECX now specifies source file name. Invoke EaBufferReserve::,LstGetFileName BufferStore EAX,EBX,ECX BufferStore EAX,=B".lst",5 BufferRetrieve EAX Invoke EaBufferRelease::,EAX DEC ECX CMP ECX,MAX_PATH_SIZE JNA .80: Msg '8020',ESI ; Filename "!1$" is too long. MOV ECX,MAX_PATH_SIZE .80:MOV [%ReturnESI],ESI MOV [%ReturnECX],ECX EndProcedure LstGetFileName
ENDPROGRAM lst