









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This lecture was delivered by Mr. Gurpreet Verma at Cochin University of Science and Technology for Assembly Language Programming course. It includes: Masm, Link, Prerequisites, Textbook, Assignments, Quizzes, Participation, Compilers, Performance, Compile, Hexadecimal
Typology: Slides
1 / 17
This page cannot be seen from the preview
Don't miss anything!










Books Textbook
Reference The Art of Assembly Language , Randy Hyde
Grading (subject to change)
Why programming in assembly? It is all about lack of smart compilers Faster code, compiler is not good enough Smaller code , compiler is not good enough, e.g. mobile devices, embedded devices, also Smaller code → better cache performance → faster code
Syllabus Assembly Language Fundamentals Data Transfers, Addressing, and Arithmetic Procedures Conditional Processing Integer Arithmetic Strings and Arrays Code Optimization
High-Level Language Application-oriented languages Programs compile into assembly language X =(Y+4)*
Assembly Language Instruction mnemonics that have a one-to- one correspondence to machine language Programs are translated into machine language mov eax, Y add eax, 4 mov ebx, 3 imul ebx mov X, eax
Binary numbers Digits are 1 and 0 (a binary digit is called a bit) 1 = true 0 = false MSB – most significant bit LSB – least significant bit Bit numbering: A bit string could have different interpretations 15 0 1 0 1 1 0 0 1 0 1 0 0 1 1 1 0 0 MSB LSB
Unsigned binary integers Each digit (bit) is either 1 or 0 Each bit represents a power of 2: 1 1 1 1 1 1 1 1 27 26 25 24 23 22 21 20 Every binary number is a sum of powers of 2
Translating Unsigned Decimal to Binary Repeatedly divide the decimal integer by 2. Each remainder is a binary digit in the translated value: 37 = 100101
Binary addition Starting with the LSB, add each pair of digits, include the carry if present. 0 0 0 0 0 1 1 1 0 0 0 0 0 1 0 0
0 0 0 0 1 0 1 1 1 (4) (7) (11) carry: bit position: 7 6 5 4 3 2 1 0