COMSC260-Assembly x86 Irvine32代写
时间:2023-12-05
Diablo Valley College
COMSC 260
Assembly Language Programming/Computer Organization
Course Syllabus
Spring 2017
Course Hours: T/TH 8:00 – 10:50 AM (ATC115)
Instructor: Laura Lan Lo
E-mail: llo@dvc.edu
Office Location: ATC113B
Office Hours: T/TH 3:00 – 4:00 PM
Supervised Lab Sessions: T/Th 9:30-10:50am, Tuesday 5:30-6:50pm ATC-115
Thursday 5:30-6:50pm ATC-109
Online via Canvas Inbox message: anytime
Course Website: https://4cd.instructure.com/ COMSC-260-1531
Prerequisite: COMSC 165
Course Credits: 4 units
Course Description
This course covers the basics of machine architecture, machine language, assembly language, operating system
interface, and interfacing with high level languages. Topics include data representation, instruction representation
and execution, addressing, indexing, macros, subroutine linkages, storage and time efficiency issues, interrupt
descriptor tables, virtual memory, cache memory, and dynamic address translation.
Student Learning Outcomes:
A. Describe computer hardware architecture.
B. Use all types of data representation.
C. Access and use the operating system.
D. Program in assembly language.
E. Interface with high level languages.
F. Perform simple hardware simulation.
Required Text/Material
2
Text: Assembly Language for x86 processors, 7th edition
ISBN-13: 978-0133769401 ISBN-10: 0133769402
Author: Kip Irvine
Publisher: Prentice Hall
Having at least one flash drive or saving on cloud (you can access anytime/anywhere) for keeping your assignments is
mandatory.
Software
For this course, we will be using Microsoft Visual Studio 2013/2015. You may also use the express editions of Visual
Studio.
To setup up MASM in Visual Studio 2013 environment, you may refer to author’s page:
http://kipirvine.com/asm/gettingStartedVS2013/index.htm
To setup up MASM in Visual Studio 2015 environment, you may refer to author’s page:
http://kipirvine.com/asm/gettingStartedVS2015/index.htm
Installing Visual Studio on a Mac
Before you can install Visual Studio on a Mac you must first install Windows.
You have 2 choices for installing Windows: you can either have a dual boot system (Boot Camp) or you can run Windows
as a virtual machine (Virtual Box or Parallels Desktop). In general, if you run Windows on a dual boot system you will have
better performance. The best recommendation is to install the 64-bit version of Windows 10.
Here is one suggested link for installing Windows 10 on a Mac: http://www.macworld.co.uk/how-to/mac-software/how-
to-run-windows-10-on-mac-get-download-iso-bootcamp-3590513/
Course Assignments and Exams
The course will require 9 online quizzes, 9 assignments, a midterm exam and a final exam. The lowest quiz will be dropped.
Exams cannot be made up or rescheduled. In case of emergency, please talk to me.
Assignments are worth 60% of the final grade, quizzes 10%, midterm 15% and final 15%.
Final letter grades are based on the following overall course percentage:
90 – 100 % A
80 – 89 % B
70 – 79 % C
60 – 69 % D
0 – 59 % F
Submission of Assignments:
3
Assignments are due before or on the due dates. For due dates, please check out the deadline for each assignment on
Canvas. All assignments should be submitted on corresponding assignment page in the Canvas course shell.
Late penalty: 10% off for one day late; 20% off for two days late; 30% off for three days late; 40% off for four days late;
50% off for five days late. No credit received afterwards and the assignment submission option will be closed on Canvas.
Submit assignments:
1. For programming exercises:
Copy your source code and screen shots of one or more runs for each part of the assignment (if more
than one part) on a word document and submit via drop box.
2. For non-programming exercises: Upload a word document with your work.
For your convenience, each assignment uses its own page. If the assignment is made up of more than
one part, please submit the assignment when you complete ALL parts. I do not accept partially completed
assignments. You can submit partially completed assignment only if you cannot/do not have time to
complete the entire assignment and elect to get a partial credit for that particular assignment.
Assignments sent in any other format or by email will not be graded. You may receive no credits.
3. Grading assignments
Refer to the grading rubric for each assignment in details. Here is a sample grading rubric for programming
exercise.
Grading Rubric Max
Source codes content & structure 70
Output screenshot & format 20
File format/submission format 10
total 100
Quizzes
All quizzes are online. You will have 20 minutes to complete each quiz. You need to complete each quiz on one sitting.
Quizzes are due by Midnight (PST) Sundays. Please refer to quizzes instructions and deadline on Canvas for details. Due
dates will be also posted on the calendar on Canvas. You need to complete the quizzes by their closing time. No makeup on
quizzes. No quiz will be re-opened after its closing date. The lowest quiz will be dropped.
Attendance
This is a challenging class and you should try and attend every lecture. If you miss class, you will be responsible for asking
another student about what was covered on the day you missed including assignment due dates. The best practice is to login
to Canvas daily or set up notifications to remind the due day for each assignment.
Students who miss 2 or more weeks of class and who do not turn in assignments or take exams may be dropped from the
class unless arrangements are made in advance.
Tutoring
4
Currently there is no authorized tutoring for Comsc-260 at DVC. If you need help or tutoring, please come to lab or my office
hours. I am here to help.
Class Policy
§ Expect to spend about 15 hours per week on this course.
§ Please silent your cell phones in class. Please do not interrupt the class to answer your cell phone or to send text
messages. Otherwise, you will be asked to leave the classroom.
§ Assignments, quizzes, tests and other materials are posted on the class website in Canvas.
§ Please refer to the tentative schedule table attached to this syllabus, and refer to the course calendar from Canvas
for due dates.
§ Quizzes will cover the material for the indicated week's reading assignment in the course outline, the lecture notes
and the power point slides for the week.
§ For questions on labs, assignments, and any other course related questions, use the course discussion board.
Students may post and reply to questions in order to help each other. Use this method so that all students benefit
from questions, answers, and clarifications.
§ If you have any questions about lectures, quizzes, exams, etc. please send email through Canvas.
§ Arrangements for missed exams must be made with the instructor in advance. Final Exam cannot be missed.
No credit will be given for work that is plagiarized. Points awarded for work that is later found to be plagiarized will
be withdrawn. Please do not delete (lose) your assignments and labs from your computers or flash drives until the
end of the semester.
Dropping from Class
If for any reason you need to stop attending class, it is your responsibility to contact the admissions office and withdraw
from the class. If you haven't dropped and your name shows up on the FINAL Class Roster, your grade will be "F" for the
school Policy.
Incomplete
The “incomplete” grade was designed for students who have a last minute “disastrous” event (serious illness, death in the
family) that prevents them from completing the course. A student must be passing prior to the “disaster”, must have more
than 50 percent of the work completed, and evidence of the “disaster” must be supplied to the instructor. The instructor has
sole discretion of whether to issue the incomplete. Incompletes are rarely given and do require a contract between the
student and instructor about what work is to be made up and the time limit in which it is to be finished.
Cheating & Plagiarism Policy
Don't do it…Consider this…
Do you really want to have faked your way through the class?
The DVC Academic Dishonesty is located at:
http://www.dvc.edu/communication/policies/studentrights/academic-dishonesty.html
Student Code of Conduct Policy
5
Student Code of Conduct is located at:
http://www.dvc.edu/communication/policies/studentrights/code-of-conduct.html
is posted on the DVC Website and pertains to both face to face and online courses. Please read and contact me if you have
questions.
Student Privacy Rights Policy
The Family Educational Rights and Privacy Act (FERPA) is a law that protects students from having their education records
shared with people without the student giving their advance approval in writing. (Education records include such things as
grades, information from counseling appointments, academic standing, disciplinary records, to name a few.) FERPA also
gives students the right to see their education records. If there is inaccurate or misleading information in their records,
students can challenge it and try to get it changed. Under FERPA, colleges must have students’ written permission to let
parents, guardians, spouses, or others see or discuss their educational records, even if the student is present.
Students Privacy Policy is located at:
http://www.dvc.edu/communication/policies/studentrights/privacy.html
Accommodations for Students with Disabilities
If you have a documented disability and wish to discuss academic accommodations, or if you would need assistance in the
event of an emergency, please contact me as soon as possible.
DSS Statement:
"Any student with a documented disability is welcome to contact us as early in the semester as possible so that we
may arrange reasonable accommodations. As part of this process, please be in touch with Disability Support Services
office at Student Services Center Room 240 or call: 925-969-2176”
For information related to DVC Disabled Student Services go to:
http://www.dvc.edu/studentservices/dss/dss-student-handbook/index.html
Changes to the Syllabus
The contents of this syllabus are subject to change with appropriate notice to the students.
Tentative schedule by week
6
Note: This schedule is tentative. It may be updated as we go. To keep current, please attend class, check
your emails, check due date calendar on the course shell, check announcements area on the course site in
Canvas.
Week Topics Covered Reading Assignments and quizzes are
due by Midnight Sundays
Week 1
Jan 24
Jan 26
Orientation
Basic Concepts
Chapter 1
Week 2
Jan 31
Feb 2
Basic Concepts
X86 Processor Architecture
Chapter 1
Chapter 2
Quiz 1 due Feb 5th
Assignment 1due Feb 5th
Week 3
Feb 7
Feb 9
X86 Processor Architecture
Chapter 2 Quiz 2 Due Feb 12th
Assignment 2 due Feb 12th
Week 4
Feb 14
Feb 16
Assembly Language
Fundamentals
Chapter 3 Quiz 3 Due Feb 19th
Assignment 3 due Feb 19th
Week 5
Feb 21
Feb 23
Data Transfers, Addressing,
and Arithmetic
Chapter 4
Week 6
Feb 28
Mar 2
Data Transfers, Addressing,
and Arithmetic
Chapter 4 Quiz 4 Due Mar 5th
Assignment 4 due Mar 5th
Week 7
Mar 7
Mar 9
Procedures
Chapter 5
Week 8
Mar 14
Mar 16
Procedures
Chapter 5 Quiz 5 Due Mar 17th
Assignment 5 due Mar 17th
Week 9
Mar 21
Mar 23
Review for the Midterm
Chapter 1 - 5
Week 10
Mar 28
Mar 30
MIDTERM – Mar 28
Chapters 1 - 5 —
In Class Online
Week 11
Apr 4
Apr 6
Spring break Spring break
Week 12
Apr 11
Apr 13
Conditional Processing Chapter 6
Week 13
Apr 18
Apr 20
Conditional Processing Chapter 6 Quiz 6 Due Apr 23rd
Assignment 6 due Apr 23rd
Week 14
Apr 25
Apr 27
Integer Arithmetic Chapter 7 Quiz 7 Due Apr 30th
Assignment 7 due Apr 30th
Week 15
May 2
May 4
Advanced Procedures Chapter 8 Quiz 8 Due May 7th
Assignment 8 due May 7th
7
Week 16
May 9
May 11
Advanced Procedures Chapter 8
Week 17
May 16
May 18
Strings and Arrays Chapter 9
Quiz 9 Due May 21st
Assignment 9 due May 21st
Week 18
May 23
May 25
FINAL – May 23
Chapters 1 - 9 —
In class online
Regular class time
Final Exam
This is a preview of the published version of the quiz
Started: Dec 4 at 12:13am
Quiz Instructions

Read the following instructions carefully before you start the test:
It is a sample Final Exam
This test is covered for Chapter 1-9 from the textbook and class lectures
You can access the textbook either hardcopy or softcopy during the test.
Only the following windows can be opened from the computer you access:
The final exam from Canvas
Visual Studio
Calculator
The textbook
There are total 37 questions
The total points are 100 points
Once you start the test you need to finish it without break
You have 120 minutes to complete this test
Make sure you read the input instruction in each question.
Please review the result after you submit.
Ask the instructor if you have any questions.
2 ptsQuestion 1
What is the hexadecimal representation of the following binary number?
0011 1110 1010 0101
2 ptsQuestion 2
True
False
Assembly language has a one-to-one relationship with high-level languages.
2 ptsQuestion 3
True
False
When running in 64-bit mode, only the lowest 48 bits of address operands are used.
2 ptsQuestion 4
True
False
The MMX register names are just different names for registers in the floating-point unit.
2 ptsQuestion 5
True
False
A string literal must be enclosed in double quotes.
2 ptsQuestion 6
True
False
A listing file contains a copy of the program's source code, the numeric address of each instruction, and a symbol table.
Optionally, it may display the machine code bytes for the program.
2 ptsQuestion 7
True
False
The EIP register can be the source operand of a MOV, ADD, or SUB instruction.
2 ptsQuestion 8
True
False
The format for the ADD instruction is: ADD source, destination.
2 ptsQuestion 9
True
False
The WriteDec procedure does not display a plus sign.
2 ptsQuestion 10
True
False
A nested procedure call occurs when a called procedure calls another procedure before the first procedure returns.
2 ptsQuestion 11
True
False
The ESI and EDI registers cannot be used when passing 32-bit parameters to procedures.
2 ptsQuestion 12
8. What value will RAX contain after the following instructions execute?
.data
dwordVal DWORD 84326732h
.code
mov rax,0FFFFFFFF00000000h
mov rax,dwordVal
2 ptsQuestion 13
True
The following statements will assemble without errors:
main PROC
jmp L2
exit
main ENDP
sub2 PROC
L2:
mov eax, 10
ret
sub2 ENDP
end main
False
2 ptsQuestion 14
True
False
ANDing an operand with 1 sets the zero flag if the operand was originally an even number.
2 ptsQuestion 15
True
False
The JECXZ instruction jumps to a target label when the CX register is equal to zero.
2 ptsQuestion 16
True
False
For any two integers n and m, ((n XOR m) XOR m) produces n.
2 ptsQuestion 17
True
False
XORing an operand with 1 always causes the Zero flag to be set.
2 ptsQuestion 18
True
False
The ROR instruction is only suitable for signed integers.
2 ptsQuestion 19
True
False
When the MUL BL instruction executes, the upper half of the product ends up in the AH register.
2 ptsQuestion 20
True
False
The binary value of AL after the following instructions have executed is 11101101.
mov al, 01101011b
rol al, 2
2 ptsQuestion 21
When the MUL BX instruction executes, the 32-bit product ends into the EAX register.
True
False
2 ptsQuestion 22
True
False
The assembler checks the pointer type used with the ADDR operator against the pointer type declared in the PROC
directive. For example, it prevents a pointer to DWORD from being passed to a procedure expecting an pointer to BYTE.
2 ptsQuestion 23
True
False
The following is a valid LOCAL declaration:
LOCAL LastName:BYTE(25)
2 ptsQuestion 24
True
False
The C calling convention is used by the Irvine32 library.
2 ptsQuestion 25
In assembly language, a variable declared using the LOCAL directive in one procedure can be read by code in another
True
False
procedure.
2 ptsQuestion 26
True
False
The Str_trim procedure has a second parameter that holds the character to be trimmed from the end of the string.
2 ptsQuestion 27
True
False
The CLD instruction causes the ESI and EDI registers to be increased in value by the MOVSB instruction.
2 ptsQuestion 28
True
False
Binary search uses a divide and conquer strategy.
2 ptsQuestion 29
The Str_compare procedure returns no value in the EAX register. Instead, it sets the Carry and Zero flags.
True
False
2 ptsQuestion 30
Which conditional jump instruction executes a branch based on the contents of ECX? 

2 ptsQuestion 31
When a C function returns a 32-bit integer, where is the return value stored?
2 ptsQuestion 32
When the Direction flag is clear and SCASB has found a matching character, where does EDI point?
2 ptsQuestion 33
What will be the contents of AX after the following operation? 

mov ax,63h
mov bl,10h
div bl
2 ptsQuestion 34
What is the value of AL after the shift instruction has executed:
mov al,0D4h
shr al,1
2 ptsQuestion 35
When a repeat prefix is used with STOSW, what value is added to or subtracted from the index register?
10 ptsQuestion 36
Extended Subtraction Procedure
Create a procedure named Extended_Sub that subtracts two binary integers of arbitrary size. The storage size of the
two integers must be the same, and their size must be a multiple of 32 bits. Write a test program that passes several
pairs of integers, each at least 10 bytes long.
Use the sample data below:
.data
op1 QWORD 0A2B2A40674981234h
op2 QWORD 08010870000234502h
result QWORD 1 DUP(0); = 22A21D067474CD32h
msg BYTE "The difference equals ",0
Refer to sample output below:
HTML Editor

! " # $ $ % & ' ( ) * + , - .
/ 0 1 2   3 4 Font Sizes Paragraph
p
5
20 pts
HTML Editor
Question 37
Constructing a Frequency Table
Write a procedure named Get_frequencies that constructs a character frequency table. Input to the procedure should be
a pointer to a string and a pointer to an array of 256 doublewords initialized to all zeros.
Each array position is indexed by its corresponding ASCII code. When the procedure returns, each entry in the array
contains a count of how many times the corresponding character occurred in the string.
Get_frequencies PROTO,
pString:PTR BYTE,; points to string
pTable:PTR DWORD; points to frequencey table
.data
freqTable DWORD 256 DUP(0)
aString BYTE 80 DUP(0),0
str1 BYTE "*** Constructing a Frequency Table *** (DEMO)",
0dh,0ah,0dh,0ah, "Enter between 1 and 80 characters: ",0

! " # $ $ % & ' ( ) * + , - .
/ 0 1 2   3 4 Font Sizes Paragraph
Quiz saved at 12:13am
p
5
Submit Quiz

essay、essay代写