Starting from:

$25

CSC35-Lab 1: Hello World… Your first "lab" Solved

Overview
It is finally time for your first lab,

Anyway, it is a long-standing tradition in computer science that your first program displays “Hello World” to the screen. This dates back to the first message sent over ARPANET – the predecessor to the Internet.

This week, you will basically get your feet wet with assembly programming. On the next page of this handout, there is a very basic "Hello World" program.  Essentially, your only task for this lab is to print the traditional "Hello World!" to the screen followed by some other information. 

Connecting to the Server
To do your labs, you need to use your ECS Account. If you don't have one yet, then I will show you how to create one. Unfortunately, you probably won't be able to work on your lab today, but you have a week to finish it.

Step 1– Windows
The three servers that we use to do our labs cannot be accessed from off campus – at least directly. To connect these computers, first connect to Athena using Putty.

athena.csus.edu
Step 1 – Macintosh
Open the Terminal program. This is the same UNIX prompt that you get when you connect to Athena. Mac-OS X is a version of UNIX. Neat! Once at the prompt, type the following where username is your ECS username.

ssh username@athena.csus.edu
Step 2 – Secure Shell to SP1, SP2, or SP3
Once you are connected, you need to Secure Shell (SSH) to one of the SP computers. Basically, you will connect to Athena and it will connect you to the SP computer. This example uses SP2. You will have to enter your password again and (maybe) have to manually type "yes".

ssh sp2 

Creating a new file
To run nano, type "nano" following by the name of the file you either want to create or edit:

nano lab1.s

 

Hints
First type in the program at the end of this handout verbatim. Then see if you can it to assemble, link, and execute. You don't have to type the comments, but I recommend it.
 

Now work on each of the requirements below one at a time. You will turn in the final program, but incremental design is best for labs.
Hello World On x86 Linux
Pressley the Lab was helpful enough to write the following program for you! She's a good doggy!

             

Requirements
You must think of a solution on your own.  The requirements are as follows:

 

Print "hello world" to the screen. You can make it "howdy" or any type of greeting you like. This is pretty much done for you already in the sample code.
Print the text "My name is" and your full name to the screen.
Do not use the same string as in #1. Create a new label and ASCII text.

Print a quote from someone. It can be funny or inspirational.
Do not use the same string as in #1 or #2. Create a new label and ASCII text. 

Print off the text "I will graduate in year from Sacramento State!" The year must be printed using the PrintInt 

More products