EC327 2009 Lab1

EC327 2009 Lab1 -...

Info iconThis preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: EC327
Introduction
to
Software
Engineering
 Lab
#1
–
Due
Friday
Sept.
25,
2009,
8
pm
 Name:
___________________
 BUID:
___________________
 Lab
guidelines:
 You
are
expected
to
do
individual
work
on
lab
assignments.

You
are
welcome
to
discuss
 the
general
approach
with
classmates,
but
all
final
work
must
be
done
individually.

 Please
refer
to
the
Collaboration
section
of
the
class
syllabus.

Labs
should
be
 demonstrated
to
the
Lab
Assistant
or
the
U/GTF
during
lab
hours
in
PHO
307
(unless
 otherwise
indicated),
and
all
code
must
be
printed
out
and
handed
in
along
with
this
 grading
sheet
at
the
same
time.

One
of
the
U/GTF
or
Graders
will
be
available
on
Friday
 from
6‐8
pm
at
the
lab
to
check
off
assignments.
 
 Section
1
[50
points
total]
 The
first
part
of
this
assignment
is
to
simply
follow
the
directions
laid
out
in
Chapter
1
of
 the
“PC
Assembly
Language”
PDF
(available
on
Blackboard)
to
execute
the
program
 first.asm.
 1.1 [10
points]

Download
the
source
files
for
Linux
from
 http://www.drpaulcarter.com/pcasm
and
extract
the
contents
into
a
temporary
 folder
on
your
home
directory.

Then
create
a
folder
by
the
name
of
Lab1_Original
 and
copy
only
the
files
that
you
need
for
Lab
Assignment
1
into
that
folder.


 [









]
pts
 
 1.2 [10
points]

Compile/assembly
and
run
the
code
and
show
that
the
original
code
 works.

In
section
1.4.3
of
the
directions,
use
the
elf

object‐format
to
assemble
the
 code.

i.e.
nasm –f elf first.asm.
 [









]
pts
 
 1.3 [10
points]

Short
answer:

What
is
the
significance
of
the
0’s
at
the
end
of
text
 strings
that
are
defined
as
prompt1,
prompt2,
etc.?

Feel
free
to
experiment
by
 taking
them
out
or
substituting
other
values
in
their
stead!
 [









]
pts
 
 1.4 [10
points]

Short
answer:

During
the
linking
step,
what
happens
if
you
leave
out
 one
of
the
object
files
(such
as
first.o,
or
asm_io.o)?

Please
provide
the
actual
error
 when
not
including
one
of
these
object
files,
and
explain
what
is
happening.

Can
 you
run
the
executable?
 [









]
pts
 
 1.5 [10
points]
Create
a
second
folder
named
Lab1_FirstModification
and
copy
the
 contents
from
Lab1_Original
into
it.

Change
the
program
so
that
you
are
asking
for
 3
numbers
to
add
up.
 [









]
pts
 
 [Section
2
continued
on
next
page]
 EC327
Introduction
to
Software
Engineering
 Lab
#1
–
Due
Friday
Sept.
25,
2009,
8
pm
 
 Section
2
[50
points]
 Create
a
second
folder
named
Lab1_SecondModification
and
copy
the
contents
from
 Lab1_Original
into
it.

Modify
the
program
so
that
you
ask
the
user
to
enter
up
to
10
 numbers,
or
0
to
stop,
and
print
out
the
sum
of
those
integers.

Each
prompt
should
be
 specific
to
the
number
of
the
input,
e.g.
“Please
enter
the
first
number:”,
“Please
enter
 the
second
number:”,
etc.

You
must
use
a
loop.


 [









]
pts
 
 Extra
Credit
[25
points]


 Use
a
subroutine
to
ask
for
the
numbers,
also
make
two
strings:
“Please
enter
the”,
and
 “number:
“,
and
then
construct
the
appropriate
string
based
on
the
input
number
inside
 of
that
subroutine.

The
loop
should
be
in
the
main
program
and
it
should
call
this
 subroutine,
checking
the
value
returned
to
decide
whether
to
continue
operations
or
to
 exit.
 
 
 Please
print
and
staple
all
source
code
to
this
grading
sheet
when
handing
in.
 
 Date
Handed
in:
___________
 
 Grader:
___________
 
 Score:
___________
 [









]
pts
 ...
View Full Document

This note was uploaded on 11/09/2010 for the course ECE 327 taught by Professor Babakkia during the Fall '09 term at BU.

Ask a homework question - tutors are online