Home Random Page


CATEGORIES:

BiologyChemistryConstructionCultureEcologyEconomyElectronicsFinanceGeographyHistoryInformaticsLawMathematicsMechanicsMedicineOtherPedagogyPhilosophyPhysicsPolicyPsychologySociologySportTourism






Management of files. Management of listing. Comments. File Management

In the old DOS world, files would be manipulated using interrupts. In Windows, we

use Windows functions in order to access files. These are the 4 functions we can use:

CreateFile – Creates or opens a file, and returns its handle.

ReadFile – Reads data from a file.

WriteFile – You guessed it! Writes data to a file.

CloseHandle – Closes the handle that you obtained using CreateFile.

 

Management of listing

 

Typically, assemblers, in addition to creating an object file, provide the ability to create a program listing (TASM / L - for TASM, ml / Fl - for MASM). Listing - a file containing the text of the assembler program, the code is assembled, each command, a list of certain labels, cross-references, segments and groups. The format of the listing file is different for different assemblers and directives control the format of the file is also very different, but some of the most comprehensive guidelines yet supported by all three assemblers discussed in this book.

TITLE text - defines the header listing. The title appears in the beginning of each page;

SUBTTL text - defines a subtitle listing. The subtitle appears on the next line after the title;

PAGE height, width - sets the size of the listing pages (10-255 height, width 59-255). PAGE directive without arguments, starts a new page, the directive PAGE + begins a new section, and page numbering is from the beginning;

NAME text - specifies the name of the module program. If NAME is not specified, the name used in the first 6 characters from the TITLE; if no NAME, nor TITLE, for the name of the file name is taken;

. XLIST - cancel the issuance of the listing;

. LIST - to resolve the issue of listing;

. SALL - prohibit the listing of macro definitions;

. SFCOND - prohibit the listing not assembled conditional blocks;

. LFCOND - permit listing not assembled conditional blocks;

. TFCOND - change the listing of conditional blocks to the opposite;

. CREF - to allow cross-reference listing;

. XCREF - prohibit the listing of cross-references.

Comments

Besides the usual comments which start with, (comma) and ending at the end of a string, the large blocks of comments describing specific directive COMMENT.

comment @

any text

@

Operand for COMMENT - any character that will be the end of the comment. The entire section of the text, until the next occurrence of that character, the assembler is completely ignored.

 

 


Date: 2015-01-29; view: 851


<== previous page | next page ==>
Syntax of a Macro | Virtual drivers and virtual Windows engines.
doclecture.net - lectures - 2014-2024 year. Copyright infringement or personal data (0.007 sec.)