5-structures - Assembler Directives Beginning of comments...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Assembler Directives * Beginning of comments start address (of data section or program) ORG $C000 declaring a constant CONST EQU 5 declaring variables in memory RMB 3 (reserve 3 memory bytes) declaring and initializing variables in memory FCB 12, 20 (declarers and initializes two 1-byte variables) FDB $1234, $ABCD (declarers and initializes two 2-byte variables)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Assembler Program Program normally consists of two parts: Data section Program code Both parts start with ORG statement to tell assembler where to put it in memory Program written in columns (separated by either space or tab): 1. Column: Labels 2. Column: Instruction 3. Column: Instruction operands 4. Column: Comment Assembler will generate two files: xxx.lst = list file containing source code, machine code, and any error messages xxx.s19 = file containing actual machine code and initialization data; file is used to download program onto
Background image of page 2
******************************************** * This program will add data1 and data3 and Program Header * subtract data2 from the result ******************************************** * data location starts at $b000 ORG $B000 DATA1 FCB 10 DATA2 FCB 15 DATA3 FCB $1A RESULT RMB 1 reserve storage for answer
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 19

5-structures - Assembler Directives Beginning of comments...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online