Skip to content

The Assembly Template

Students will use and complete the assembly template for all graded work. This file is in the LC-3 Docs zip file downloaded earlier

Assembly Template

The top section with lines started by a semicolon (😉 is filled in with assignment and student name info. There is a line to describe the program at a high level and another to include any notes ot comments

Main Body

The program will be written between the .ORIG x3000 and the ;End of Program lines.

asm
.ORIG x3000

Done HALT

;End of Program

.ORIG x3000 is the assembler directive that identifies memory location 300016 as the location to load and execute the program

Done HALT is the last executable line of code in an assembly program

Done is an optional label used to other parts of the program to terminal the program early

HALT is a build-in function that stops the system clock so that no more instructions can execute

;End of Program is a comment to remind programs that no code will be executed after HALT

Data Declarations

The area under the ;Data Declarations------------- comment is reserved for allocating memory locations and initialized data

Code End

Like .ORIG, .END is an assembler directive informing that there is no more programs or data allocations to assemble

The contents of this E-Text were developed under an Open Textbooks Pilot grant from the Fund for the Improvement of Postsecondary Education (FIPSE), U.S. Department of Education. However, those contents do not necessarily represent the policy of the Department of Education, and you should not assume endorsement by the Federal Government.
Released under Creative Commons BY NC 4.0 International License