Industrial Training

Design Steps


It should accept a filename as command line argument and if the extension is not present then it assumes it to be .asm, if the extension is anything other than .asm, then it should show error (fatal error).

Read a line from the .asm file.

Squeeze the line and remove any comments from it.

Check the syntax of the instruction.

If there is any syntax error, generate the error-code and print the error message.

If End-Of-File is reached, then stop else Go To 2.

Syntax Checks in the Data Segments

Name of the Identifiers→
Character Set
A to Z
A to z

  • to 9

?, _, $, @ , .

  • first character must be an alphabet or a special character except for .
  • a warning should be generated if the first character is @.
  • “the assembler uses some special words that begin with @ symbol. You should avoid using it in your own data definition”


Maxlen= 31
The identifier should not be a reserved word or register name.
Maxline at a line is 132 chars.
General form
identifiers datatypes operand(s)

Hi I am Pluto.