Program Format - Panasonic PanaXSeries MN1030 Series User Manual

Panasonic microcomputer user's manual
Table of Contents

Advertisement

7.2

Program Format

A program is text created to assemble as machine language instructions in order to operate a micropro-
cessor. The assembler translates the text into machine language code, while the linker joins that code to
make an executable format file.
One line of text is called a source statement. There are five types of source statements, with the type
determining how a source statement is written.
Basic program format is shown below.
* Comment statement
#include
#define
definitions of constants, macros, globals
section name
.
.
.
program body
.
.
.
end
There are several points to be aware of when writing programs.
Always declare an attribute and link type for a section name the first time it appears in a file.The
same section name cannot be set to a different attribute or link type.
The effective scope of a directive coding rule section is until the line preceding the next directive
coding rule section
Ignore all text after the directive coding rule instruction.
Write comments as needed
#include specifications
Define #define identifiers
Statements to define constants and macros and to
declare and define globals
section
Declare start of section
Machine language instructions, conditional assembly
directives, macro expansions
End of program
Chapter 7 Type of Source Statements
Program Format 119

Advertisement

Table of Contents
loading

Table of Contents