Welcome to CPSC 240. Here we learn about two major areas, namely: Computer Architecture and Assembly programming. Specifically, we will learn about the X86 Intel family of microprocessors.
I am your instructor. I am Floyd Holliday. I have taught many classes of assembly programming during my academic life. Assembly programming is simply more fun than other kinds of programming. Here are data about me.
Email address: holliday@fullerton.edu
Office hours: Mon, Tues, and Wed beginning at 7:30pm on Zoom. Arrive as close to 7:30pm as possible.
Zoom number: 841 642 3131
Assembly programming is quite special among programming languages. When you program in assembly, you are touching the rare metals inside the microprocessor. This is the key difference between assembly programming and other language programming. Only assembly gives you the ability to work this close to iron.
You will need a computer to use during class lectures. The best choice to to bring your own laptop to class. We will meet in a lab room with individual computers available and you may use those computer. However, you are familiar with your own computer more than you are familiar with the computers in the classroom. The recommendation here is to bring your own.
Laptops may be borrowed from the university to keep throughout the semester. Go to the second floor of the Library. Ask a library employee to direct you to the location that lends laptops. When you arrive at the right place tell the clerk you want to borrow a "laptop running Linux" because your instructor requires it. Laptops will be available until the supply is exhausted. You should apply for the loan a few days before the beginning of the semester.
SI instructors will be helping your progress in assembly and in architecture. These are the two SI leaders:
Dianella Sy: Class meets Tue and Thur, 2:30-3:45pm; room MH465
Don't tell me it's too far to walk. It is for the benefit of your education.
Solivan Hiep, Class meets Mon and Wed; 2:30-3:45pm, room CS110B
You should experience both instructors. Each one brings new views of the technology of architecture and assembly.
The discord server for this course can be found at this link: https://discord.gg/DXcQBUdCqZ
When you have completed building a program and it is ready to submit, then place the assignment number in the subject area and send the files to the proper address given below.
Students enrolled in 240-3 send programs to cs240-3@proton.me
Students enrolled in 240-13 send programs to tt2025s@proton.me
Students enrolled in 240-15 send programs to mw2025s@proton.me
If a student sends a link to files in the cloud including Google Docs, Microsoft one-drive, github, and some others, then the email is immediately sent to trash, a score of zero is recorded for the assignment. Don't take a chance. The best practice is to never put assembly programs in a remote cloud server. Keep your assembly files on your own computer and send them as attachments to ordinary mail when the time comes.
Don't send text messages with your submission of programs. Those messages are not read by the graders. I never see those messages until the semester ends. How do you get a message to me in a way that I will see it? Answer: Send the message by private chat during the second hour of any 240 class meeting.
This page will be updated from time to time. You should return here regularly during the semester.
Available for download
Assignment 3 is under deveopment.
Instructions approved for use in 240
Instructions acting on GPRs operand(s): at least one operand is GPRs
add
sub
mul
imul
div
idiv
inc
dec
cmp
mov
xor
or
not
and
lea
Instructions acting on xmm operands(s); at lease one operand is xmm
addsd
subsd
mulsd
divsd
sqrtsd
movsd
Other instructions having no visible operands:
jmp <== Valid in all contexts
je, jne, jl, jle, jg, jge <== Valid in the context of signed integers only
ja, jae, jb, jbe, je, jne <== Valid in the context of unsigned integers and IEEE numbers only
Registers of odd sizes. Currently there are two registers allowed. There are special case where one or both of these are allowed
al
eax
Notice that all registers with names beginning with 'e' are prohibited except eax in rare cases.
It is up to you to tell chatGPT the rules of this course.
Library functions: generally all library function are available for use in this course. The available list includes functions and others.
printf
fgets
scanf
malloc
clearerr
strlen
atof
isfloat
Odd facts
Kernighan and Ritchie state that EOF and NULL are both constants defined in "stdio.h". Many students report that the linker cannot find these two constants. In such a case declare NULL equ 0 and EOF equ -1.
These are acronyms of clubs in the Computer Science Department. What are the complete names of these clubs? Who is the president of each club?
ACM
ACMW
DSML
NSBE
OSS
VGDE
DSML