You are on page 1of 9

First course goal

What happens beneath high-level languages

Course Introduction Machine code


CSC 236 How it is created and executed
Computer Organization and Assembly Language Programming

Second course goal Second course goal


How computers are designed and organized Examine several architectures
Developed over time

von Neumann Main-frame PC Latest enhancements


(1950) (1970) (1990) (2015)

x86 floating Java VM ARM


point

Third course goal Why


Performance and efficiency Isn’t is enough to know Java?

It still matters even though No.


● clock is greater than 1GHz and Your degree will not say
● memory is greater than 32GB.
● Application programmer or
● Web designer

It will say “computer science”


Information sources Grading policies
● Class Notes Tests are open book
○ online & coursepak Tradeoff:
○ text & 8086 reference
● Slides ● Closed book tests memorization
○ Link on web page ● Open book requires more difficult questions
● Videos
Allowed
○ Link on web page
● Web site ● All content on the course web page
○ Homeworks ● All context created by student (self -- not others) BEFORE
○ Programs
exam begins
○ Previous tests
○ Grades ● Textbooks

Homework Self-grading assignment


Nine homeworks ● You will know your score before you submit
● Work on it until you have the grade you are satisfied with
● HW0 -- answer some questions
● HW1-4
○ Fixed point representation
○ Addition and subtraction
○ Self-graded
● HW5-8
○ Multiplication and division
○ Self-graded

Self-grading assignment Grading policies that help you


● You will know your score before you submit If being late is bad -- being early must be good.
● Work on it until you have the grade you are satisfied with
Extra credit (+15%) for early submissions

Late work is accepted (up to 1 week) with a penalty (-15%)


If self-graded why doesn’t every one get 100%?
Grading policies that help you Grading policies that help you
The majority of the course grade is based on the exams. Optional team assignments.

● Two midterms and a final Some assignments can be done in teams of two students.
● 68% of the course grade
○ 25% See the syllabus.
○ 25%
○ 18% -- lowest grade
● Example:
○ Scores: 90, 80, 95
○ 90 x 0.25 + 80 x 0.18 + 95 x 0.25 = 60.1 / 68 = 89.2

Program development Program development


Using technology from the Windows programming
dawn of PC architecture

Program development Program development


Windows programming ● IBM compatible 16-bit DOS box
● DOSBox
Nope: DOS programming ○ Emulator
○ Runtime environment
● Download DOSBox to your computer
● Launch it
Program development Program development
● IBM compatible 16 bit DOS box ● IBM compatible 16 bit DOS box
● DOSBox ● DOSBox
○ Emulator ○ Emulator
○ Runtime environment ○ Runtime environment
● Download DOSBox to your computer ● Download DOSBox to your computer
● Launch it ● Launch it
○ Get a DOS prompt
○ Run commands
○ Uses your native filesystem

What is DOS What is DOS


● DOS -- disk operating system ● DOS -- disk operating system
○ Disk is a floppy disk ○ Disk is a floppy disk

360KB
double sided

What is DOS What is DOSBox


● DOS -- disk operating system ● An emulator
○ Disk is a floppy disk ○ It is a substitute for a “DOS box” -- i.e., a PC running DOS
○ Not really an operating system ○ Definition: Computers To imitate the function of (another system)
● Command line driven ● Not a simulator
○ dir -- list directory contents ○ Definition: To create a representation or model of (a physical system or
○ cd -- change directory particular situation)
○ copy -- copy a file
What is 16-bit HW0
● Shows the essence of CSC236
● More later in the course ● Run a short program
● Original IBM PC ○ Java or C
○ Ran MSDOS on
○ Intel 8086 processor
● 8086 is 16-bit architecture
○ The basic word size is 16 binary digits
● Intel chips have evoled
○ To 32-bit and
○ Now 64-bit
● The 16-bit architecture is much simplier

HW0 HW1-8
Generated and graded on your system
● Shows the essence of CSC236 When satisfied with grade;
submit the file
● Run a short program Install DOSBox
○ Java or C hwsubmit.txt
● Answer 9 questions about the program’s Retrieve and unpack the program file
to locker on web site.
execution ● unpack.exe -- located in hw locker
● Create and submit a Plain ASCII text file with ● Run `unpack.exe` -- which creates files you need
your answers ● Run `hw14`
○ Generates unique questions
○ (Print and answer the questions)
○ Enter answers and get a grade
○ Re-do if not happy with grade

HW14 HW14
HW14 program works for 4 assignments. HW14 program works for 4 assignments.
CSC23x: Homework Grades Student: Sauron CSC23x: Homework Grades Student: Sauron
Created: 01/08/18 HW1 locker Created: 01/08/18 HW1 locker

HW# Started Status Grade HW# Started Status Grade


HW1 01/08/20 D 01/09 096 HW2 locker HW1 01/08/20 D 01/09 096 HW2 locker

HW2 HW2 01/10/20 D 01/11 100


HW3 HW3
HW3 locker HW3 locker
HW4 HW4

End of file HW4 locker End of file HW4 locker


HW14 HW14
HW14 program works for 4 assignments. HW14 program works for 4 assignments.
CSC23x: Homework Grades Student: Sauron CSC23x: Homework Grades Student: Sauron
Created: 01/08/18 HW1 locker Created: 01/08/18 HW1 locker

HW# Started Status Grade HW# Started Status Grade


HW1 01/08/20 D 01/09 096 HW2 locker HW1 01/08/20 D 01/09 096 HW2 locker

HW2 01/10/20 D 01/11 100 HW2 01/10/20 D 01/11 100


HW3 01/16/20 D 01/17 100 HW3 01/16/20 D 01/17 100
HW3 locker HW3 locker
HW4 HW4 02/04/20 D 02/05 094

End of file HW4 locker End of file HW4 locker

HW14 How to succeed


HW14 program works for 4 assignments.
Read the handouts!!
CSC23x: Homework Grades Student: Sauron
Created: 01/08/18 HW1 locker
Read the handouts!!
HW# Started Status Grade
Read the handouts!!
HW1 HW2 locker
Read the handouts!!
HW2
HW3 01/16/20 D 01/17 100
HW3 locker Read the handouts!!
HW4

End of file HW4 locker

How to succeed How to succeed


Introduction to Answer four questions

Computer Architect and ●



What is computer architecture?
What is assembly language?

Assembly Language ●

How are they related?
What is the purpose of this class?

CSC 236

Architecture
The specification of the logical relationships among the parts of a
● Definition: Art or science of building computer system

Computer architecture

● Describes how computers are built


● Definition: The specification of the logical relationships among
the parts of a computer system (*)

(*) Prentice Hall Illustrate dictionary of computing.

System Example: Telephone system


establishes a connection
A set of components organized to perform a task between telephones

input process output input process output

10-digit number a channel


machine machine
instruction set instruction set

All systems have these 4 characters


Two views of a system Example: Shovel
Logical view Physical view Logical view Phyiscal view

● Function ● How it is built ● Moves things


● What are its parts ● What is is made of ● Handle
● What does it do ● Speed, size, weight ● Connecting rod
● User’s manual ● Cost ● Blade

Orthogonal

Example: Shovel Example: Shovel


Logical view Phyiscal view Logical view Phyiscal view

● Moves things ● Moves things


● Handle ● Handle
● Connecting rod ● Connecting rod
● Blade ● Blade

Can one study a system only logically Can one study a system only logically

input black box output input black box output

machine machine
instruction set instruction set

Instructions: add, subtract, multiply, divide


Data: integer, floating point, character
Assembly language Assembly language
● Symbolic programming language whose ● Symbolic programming language whose
● Statements match 1:1 with instructions ● Statements match 1:1
● A specific machine instruction set ● A specific machine instruction set

What does this mean?

Assembly language Who cares?


● Symbolic programming language whose ● To user, a computer is ● To an analyst, a computer is
● Statements match 1:1 ○ A tool to ○ The end product
This is significantly better ○ Get a job done ● Care about
● A specific machine instruction set
than programming with ○ Faster
machine code, ie 0s & 1s
○ Cheaper
○ More capable
● Every machine has certain capabilities
○ More reliable
● No high-level language features ○ More secure
● Code at the architectural level -- but symbolically ○ ...

Who cares?
Hopefully, you do!

You might also like