Difference between revisions of "CSC231 Class Page 2015"
(→ ) |
(→ ) |
||
Line 200: | Line 200: | ||
* '''Monday''': | * '''Monday''': | ||
:* The [http://cs.smith.edu/~dthiebaut/ArtOfAssembly/CH04/CH04-3.html#HEADING3-79 '''MOV''' instruction], and [[CSC231_Many_Mov_Instructions | examples of mov instructions]] | :* The [http://cs.smith.edu/~dthiebaut/ArtOfAssembly/CH04/CH04-3.html#HEADING3-79 '''MOV''' instruction], and [[CSC231_Many_Mov_Instructions | examples of mov instructions]] | ||
+ | ---- | ||
+ | * '''Wednesday''' | ||
:* The '''ADD''' instruction | :* The '''ADD''' instruction | ||
:* [[CSC231 Simple String Encryption | Overly-simplified encryption of a string]] | :* [[CSC231 Simple String Encryption | Overly-simplified encryption of a string]] | ||
Line 205: | Line 207: | ||
:* [[CSC231 Exercises with the MOV instruction | Exercises with the MOV instruction]] | :* [[CSC231 Exercises with the MOV instruction | Exercises with the MOV instruction]] | ||
:* [[CSC231 nasmld script | A script to automatically assemble and link]] assembly programs | :* [[CSC231 nasmld script | A script to automatically assemble and link]] assembly programs | ||
− | |||
− | |||
− | |||
| | | | ||
* Lab | * Lab |
Revision as of 07:46, 30 September 2015
--D. Thiebaut (talk) 11:28, 26 August 2015 (EDT)
Week 1 Sept 7 |
Topics: Introduction, Python, Idle, Piazza, Moodle submission Lab/Hw Reading - Wednesday
- Syllabus
- Class accounts
- The main players for this semester:
- PC
- Processor
- Memory
- Disk
- First program in assembly: recognize the different elements:
- Structure
- Presentation
- Documentation
- Skeleton program
- Hello World! on Linux (and its Mac version)
- Reading
- Chapter 1 in the Art of Assembly.
- Also Chapter 3, Sections 0 to 3.1.2.
- Sections 1.3.1, 1.3.2, 1.3.3, 1.3.4, and 1.3.5 in Carter's PC Assembly Language. Note, Carter uses 1A92h to represent a hexadecimal number. I prefer 0x1A92.
- Wednesday
Week 2 Sept. 14 |
Topics: Processor and Memory, working with the shell, and emacs. Lab/Hw Reading - Monday:
- Review PC destruction lab. Main players: Processor, cores, RAM, motherboard, crystal
- How would Richard Tuttle see a computer motherboard? This is some of his artwork.
- First diagram of a computer as seen by an assembly language programmer
- Review Hello World program with this new knowledge
Notice how the main character uses all kinds of software packages to solve his problem. It includes working in a shell, using shell commands, and mixing the results with various programming techniques.
- Wednesday
- Linux System Calls. See Slide 5 of this presentation
- Working in a shell
- The bash shell
- Playing with the shell using 231a-xx accounts
- Useful commands
- ls, cd, pwd, mkdir, rm, rmdir, cp
- history, !, !!, alias, w, ps, who am i
- grep, wc, head, tail
- Redirection
- Pipes
- Emacs
- quick overview (see this page)
- set of commands
- Lab
- Homework
Week 3 Sept. 21 |
Topics: Lab/Hw Reading - Monday:
- Let's talk about the crystal
- Relationship with instructions
- Power-law for increase in processor speed
- Ray Kurzweil on Power Laws (go to marker 3:30 min in video)
- Playing a game of numbers
- Hexadecimal system:
for i in range( 256 ): print( i, format( i, '02X' ) )
- Assembly:
- Review nasm, ld
- Understanding how data fits in memory: printing strings defined by db
- Size of a program: data + code
size helloWorld2 text data bss dec hex filename 34 14 0 48 30 helloWorld2
- Listing of the assembly and its code:
nasm -f elf -l helloWorld2.lst helloWorld2.asm ls ... helloWorld2.lst ...
- Wednesday
- Quick check of number conversion skills
- Observe output of nasm -l (helloWorld2.lst)
- Another way to look at the executable file with hexdump
hexdump -v -C helloWorld2 00000000 7f 45 4c 46 01 01 01 00 ... ... 000002b0 74 61 00 5f 65 6e 64 00 |ta._end.| 000002b8
- Observe the output of hexdump command
- Finish the reading assigned for Week 1.
- The mov instruction
Week 4 Sept. 28 |
Topics: The Mov instruction. Arithmetic instructions. Addressing Modes. Lab/Hw Reading - Monday:
- Wednesday
- The ADD instruction
- Overly-simplified encryption of a string
- Examples: copying a string to another string
- Exercises with the MOV instruction
- A script to automatically assemble and link assembly programs
- Lab
- Homework
- Chapter 3, Section 1 in The Art of Assembly, to Section 3.2.2.
Week 5 Oct 5 |
Topics: Lab/Hw Reading - Monday:
- Wednesday
- Lab
- Homework
Week 6 Oct. 12 |
Topics: Lab/Hw Reading - Monday: Fall Break
- Wednesday
- Lab
- Homework
Week 7 Oct 19 |
Topics: Lab/Hw Reading - Monday:
- Wednesday
- Lab
- Homework
Week 8 Oct. 26 |
Topics: Lab/Hw Reading - Monday:
- Wednesday
- Lab
- Homework
Week 9 Nov. 2 |
Topics: Lab/Hw Reading - Monday:
- Wednesday
- Lab
- Homework
Week 10 Nov 9 |
Topics: Lab/Hw Reading - Monday:
- Wednesday
- Lab
- Homework
Week 11 Nov 16 |
Topics: Lab/Hw Reading - Monday:
- Wednesday
- Lab
- Homework
Week 12 Nov 23 |
Topics: Lab/Hw Reading - Monday:
- Wednesday: Thankgiving Break
- Lab
- Homework
Week 13 Nov 30 |
Topics: Lab/Hw Reading - Monday:
- Wednesday
- Lab
- Homework
Week 14 Dec 7 |
Topics: Lab/Hw Reading - Monday:
- Wednesday
- Lab
- Homework
Week 15 Dec 14 |
Topics: Lab/Hw Reading - Monday: Last Class
- Final Exam
Links and Resources
- Notes on Assembling 32-bit Code on 64-bit Machines
- Hello Word in assembly running on Mac OS and on Linux