5.2 CSEG
Code segment.
The CSEG directive defines the start of a Code Segment. An Assembler file can consist of several Code Segments, which are concatenated into one Code Segment when assembled. The BYTE directive can not be used within a Code Segment. The default segment type is Code. The Code Segments have their own location counter which is a word counter. The ORG directive can be used to place code and constants at specific locations in the Program memory. The directive does not take any parameters.
.CSEG
.DSEG ; Start data segment vartab: .BYTE 4 ; Reserve 4 bytes in SRAM .CSEG ; Start code segment const: .DW 2 ; Write 0x0002 in prog.mem. mov r1,r0 ; Do something