Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- TASM 2.x / MASM 6.x Assembly Language - <b>.code defines code segment directive</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
.CODE            Defines Code Segment                               Directive

  .CODE [name]

     The .CODE directive is a short-cut way of defining the code segment.
     You must have first defined a memory model (see .MODEL). To
     define a code segment, place the .CODE directive in your source
     code, followed by the statements you want in the code segment.

     You end the definition of the code segment with another segment
     directive (such as .DATA) or an END directive, which indicates the
     end of the file.

     The advantage of .CODE is that it is translated into the standard code
     segment name for that memory model when the file is assembled, which
     makes it easy to link into high-level languages.

       Notes:     If you are using the MEDIUM or LARGE memory model, you
                  can follow .CODE with a name that identifies that segment.
                  This way, you can define multiple segments.

See Also: .CONST .DATA .FARDATA .STACK .MODEL

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson