An assembler is a software program that reads assembly code and directives and produces executable machine code. We will use the 68KASM assembler in this and the next CLAB.
Use a text editor to enter the following code into a new file clab51s.s:
* clab51s.s ORG $0 DC.L $8000 Stack pointer value after a reset DC.L START Program counter value after a reset ORG $2000 Start at location 2000 Hex START move.w #$2468,d0 move $2468 into register d0 add.w #1,d0 add 1 to do BREAK tell the simulator to BREAK
The syntax will be explained below.
In a terminal window, cd into the directory containing your new file clab51s.s and assemble it by typing:
68kasm -l clab51s.s
If all was successful the software will say so and produce two files:
Take a look at both files using a text editor.
If any errors occured, correct them and make sure these files have been created before proceeding.
ANU Engineering - ENGN3213