PROGRAMMING THE MICROCONTROLLER
EMCH 367 Fundamentals of microcontrollers 367pck Dr. Victor Giurgiutiu Page 18 1/17/01 PROGRAMMING THE MICROCONTROLLER ASSEMBLY LANGUAGE Assembly language is of higher level than machine language and hence easier to use. An assembly language code consists of a) Program statement lines b) Comment lines A program statement is a line that contains 4 fields in the following format: [<LABEL>] [<OPCODE MNEMONIC>] [<OPERANDS>] [;<comments>] or [<LABEL>] [<DIRECTIVE MNEMONIC>] [<OPERANDS>] [;<comments>] where [ ] indicates an optional field that may not be always required. The fields are separated by a tab or space. (Tab is recommended, since it ensures an orderly appearance to your code. For the same reason, when a field is not used, the tab or blank should still to be used, such that the fields of the same type stay aligned in same columns.) When writing <LABEL>, <OPCODE MNEMONIC> or <DIRECTIVE MNEMONIC>, and <OPERANDS>, use upper case characters.
The .ASM files can be opened, viewed, edited and saved in the THRSIM11 application. Alternatively, all three file types (.ASM, .LST, .S19) can be also processed in a text editor, e.g., the Notepad applicat ion. Examples of .ASM and .LST files follow. Addressing Modes Inherent Mode is implied and requires no programming action.
Download PROGRAMMING THE MICROCONTROLLER
Information
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document: