Difference between revisions of "SPO600 64-bit Assembly Language Lab"

From CDOT Wiki
Jump to: navigation, search
Line 5: Line 5:
  
 
== Lab 3 ==
 
== Lab 3 ==
 +
 +
=== Ireland - Configuration ===
 +
 +
The host ''Ireland'' (ireland.proximity.on.ca) has been set up so that you can use it normally as an x86_64 host, or [[SPO600 aarch64 QEMU on Ireland|use an emulation environment to build and run aarch64 binaries]].
 +
 +
The directory <code>~/arm64/spo600/examples<code>, which is also accessible as <code>~/spo600-examples</code>, contains these files:
 +
 +
── hello
 +
    ├── assembler                # 'hello world' example programs
 +
    │  ├── aarch64              # aarch64 assembler version
 +
    │  │  ├── hello.s
 +
    │  │  └── Makefile
 +
    │  └── x86_64                # x86_64 assembler versions
 +
    │      ├── hello-gas.s      # 64-bit instructions for assembley with the gnu assembler (called 'gas', /usr/bin/as)
 +
    │      ├── hello-nasm.s      # 32-bit instructions for assembley with the nasm assembler (/usr/bin/nasm)
 +
    │      └── Makefile
 +
    └── c
 +
        ├── hello2.c              # C version using the write() syscall wrapper
 +
        ├── hello.c              # C version using printf()
 +
        └── Makefile
 +
 +
Throughout this lab, take advantage of ''[[make and Makefiles|make]]'' whenever possible.
 +
 +
=== Lab Tasks ===
 +
 +
1. Build the C version of

Revision as of 11:22, 23 January 2014

Important.png
This is a draft only!
It is still under construction and content may change. Do not rely on this information.
Note.png
Purpose of this Lab
In this lab, you will experiment with assembler on the x86_64 and aarch64 platforms.
Idea.png
Ireland
Perform this lab on ireland.proximity.on.ca.)

Lab 3

Ireland - Configuration

The host Ireland (ireland.proximity.on.ca) has been set up so that you can use it normally as an x86_64 host, or use an emulation environment to build and run aarch64 binaries.

The directory ~/arm64/spo600/examples<code>, which is also accessible as <code>~/spo600-examples, contains these files:

── hello
   ├── assembler                 # 'hello world' example programs
   │   ├── aarch64               # aarch64 assembler version
   │   │   ├── hello.s
   │   │   └── Makefile
   │   └── x86_64                # x86_64 assembler versions
   │       ├── hello-gas.s       # 64-bit instructions for assembley with the gnu assembler (called 'gas', /usr/bin/as)
   │       ├── hello-nasm.s      # 32-bit instructions for assembley with the nasm assembler (/usr/bin/nasm)
   │       └── Makefile
   └── c
       ├── hello2.c              # C version using the write() syscall wrapper
       ├── hello.c               # C version using printf()
       └── Makefile

Throughout this lab, take advantage of make whenever possible.

Lab Tasks

1. Build the C version of