Testing & Debugging; Templates I; C++17 Library Additions

Size: px
Start display at page:

Download "Testing & Debugging; Templates I; C++17 Library Additions"

Transcription

1 Testing & Debugging; Templates I; C++17 Library Additions PV264 Advanced Programming in C++ Nikola Beneš Jan Mrázek Vladimír Štill Faculty of Informatics, Masaryk University spring 2018 PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

2 Three Basic Questions of Programming Is my program well-written? Will someone else be able to read (maintain, refactor) it? Will I be able to read it (tomorrow, next week, next year)? Is my program correct? Does it do what it is supposed to? What is it actually supposed to do? Is my program efficient? time, memory consumption, other resources consumption (data, energy,... ) PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

3 Correctness How to approach correctness? Testing testing formal verification (automatic/semi-automatic/manual) code inspection... important part of development process levels of testing unit testing integration testing system testing... many approaches and frameworks our focus here: unit testing using the Catch2 framework PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

4 Using Catch2 Catch2 (C++ Automated Test Cases in Headers) advantages: easy to use no dependencies, one header file readable test cases (support for Behaviour-Driven Development) arbitrary strings as names test cases divided into independent sections use standard C++ operators for comparison PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

5 Using Catch2 Sections #define CATCH_CONFIG_MAIN // provide main() #include "catch.hpp" #include <vector> TEST_CASE("Vector is initialised as empty") { vector<int> vec; REQUIRE(vec.size() == 0); } PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

6 Using Catch2 Sections TEST_CASE("Vector size and capacity") { vector<int> vec; vec.push_back(1); vec.push_back(2); auto size = vec.size(); REQUIRE(size == 2); SECTION("push_back increases size") { vec.push_back(3); REQUIRE(vec.size() > size); } SECTION("erase decreases size") { vec.erase(vec.begin()); REQUIRE(vec.size() < size); } } PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

7 Using Catch2 Sections for each (leaf) SECTION the TEST_CASE is executed from the start alternative to the traditional text fixture approach (setup/teardown) Catch2 also supports fixtures, see docs SECTIONs can be arbitrarily nested failure in parent section prevents nested sections from running BDD (Behaviour-Driven Development) SCENARIO, GIVEN, WHEN, THEN SCENARIO("Adding an element to a vector") { GIVEN("A vector with no elements") { vector<int> vec; WHEN("an element is added via push_back") { vec.push_back(0); THEN("the size becomes 1") { REQUIRE(vec.size() == 1); } } } } PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

8 Using Catch2 Asserts & Logs REQUIRE, CHECK, REQUIRE_FALSE, CHECK_FALSE assert condition (CHECK: execution continues even after failure) REQUIRE_THROWS, REQUIRE_NOTHROW, CHECK_THROWS,... assert that an expression throws/does not throw an expression INFO, WARN, FAIL logging CAPTURE log the value of a variable PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

9 Using Catch2 Useful Information command-line parameters which test(s) to run output format (junit, XML,... ) configuration via macros, own main() Recommended practice one main source file with nothing but the main function (possibly generated by Catch2) #define CATCH_CONFIG_MAIN #include "catch.hpp" // end of file other source files for tests PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

10 Debugging PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

11 Debugging Tests fail, now what? tracing ( printf debugging ) logging using debuggers using other useful tools Recommendation try to find a minimal example where the problem occurs code bisection bugs are sometimes caused by bad memory management don t forget about valgrind and similar tools to be able to employ debuggers: compile without optimisation compile with debug information (-g) PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

12 Debuggers Typical Debugger Functions pause at specified breakpoints line of code, condition, exception thrown/caught, signals,... evaluate expressions step through program (modify program state) Our Focus gdb (The GNU Debugger) command-line tool many graphical front-ends PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

13 Using gdb Basic commands: help run start the debugged program list list specified function or line break set breakpoint catch set catchpoint (exception breakpoint) info show information about the debugged program info args, info registers, info breakpoints,... step step program, steps into functions next step program, steps over function calls stepi, nexti step by instructions, not lines of code print evaluate expression examine display contents of memory address disp evaluate expression each time the program stops continue continue running (after breakpoint) kill stop execution of the program PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

14 Using gdb Stack commands: backtrace print backtrace of stack frames up, down, frame, select-frame select stack frame finish run until current stack frame returns info locals, info frame Executing code at runtime: set var = value change the value of a variable call func() call a function Watchpoints: watch var watch changes (writes) of a variable rwatch var watch reads of a variable awatch var watch both reads and writes PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

15 gdb front-ends cgdb terminal-based front-end for gdb (uses the curses library) displays the source code above the gdb session module add cgdb on faculty computers Other front-ends: see PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

16 Assembler Assembly Language (symbolic machine code) low-level; closest to machine code commands machine code instructions Why do we want to know about it? debugging computer security examine optimisation done by compiler sometimes it is good to know what s under the hood Our focus here: brief overview; reading assembly, not writing it PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

17 Assembler Tools Disassemble clang++ -S, g++ -S, etc. gdb disassemble x/10i address (such as $rip) (print, disp) set disassemble-next-line on objdump -d Show raw bytes hexdump -C xxd Compiler explorer: PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

18 Assembler Notation Intel AT&T operands in order dest, src mov rax, rbx moves from rbx to rax add rax, 0x1f adds 0x1f to rax memory indexing [base + index*scale + disp] mov eax, [rbx + rcx*4 + 0x10] operands in order src, dest mov %rbx, %rax add $0x1f, %rax memory indexing disp(base, index, scale) movl 0x10(%rbx, %rcx, 4), %eax size indicated in the instruction mnemonic movb, movw, movl, movq (1, 2, 4, and 8 bytes) immediate values with $, registers with % PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

19 Assembler notation How to use the Intel syntax? clang++ -S -masm=intel objdump -d -M intel gdb set disassembly-flavor intel PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

20 x86(-64) Architecture Registers instruction pointer: ip (16 bit), eip (32 bit), rip (64 bit) stack pointer: sp (16 bit), esp (32 bit), rsp (64 bit) general purpose: ax, bx, cx, dx (eax, rax,... ) lower 8 bits: al, bl, cl, dl source/destination: si, di (esi, rsi,... ) stack frame base pointer: bp (ebp, rbp) 64 bit general purpose: r8, r9,..., r15 low 32 bits: r8d,... low 16 bits: r8w,... low 8 bits: r8b,... floating-point (80 bit) registers st0,..., st7 XMM 128 bit registers xmm0,..., xmm15 PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

21 x86(-64) Architecture Stack memory area given by OS to programs LIFO data structure; x86 stack grows towards lower addresses esp (rsp) points to the top of the stack main use: return address, function arguments, local variables, temporary storage PUSH value decrements esp (rsp) and then stores the given value at the memory address given by (the new value of) esp (rsp) POP register copies the value from the memory address given by esp (rsp) into the given register and then increments esp (rsp) PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

22 x86(-64) Architecture How do function calls work? parameters are stored somewhere (see below) call address push address of next instruction on stack jump to address ret (return from function) pops address from stack and jumps to it Calling conventions 32bit: many different possibilities cdecl: arguments passed on the stack in reverse order 64bit: two main approaches (Microsoft x64, System V AMD64) both use registers to pass (some of) the arguments registers used also depend on type (integers, floats) of arguments PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

23 x86(-64) Architecture Function frames (standard entry/exit sequence) at the beginning of a function: push rbp mov rbp, rsp sub rsp, 0x10 (allocate 16 bytes on stack for local variables) rbp is the base frame pointer local values referenced as [rbp + 0x08],... note that [rbp] holds the value of the previous rbp at the end of a function: mov rsp, rbp pop rbp Note: Optimisations (frame pointer omission optimisation) may eliminate this. (-f[no-]omit-frame-pointer) PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

24 x86(-64) Instructions Move instruction MOV copy value from src to dest Arithmetic and logic instructions ADD, SUB, MUL,... AND, OR, XOR,... Test instructions CMP performs SUB; does not save the result, only sets flags TEST similar to CMP, performs AND Jump instructions JMP unconditional jump Jxx conditional jump, reacts to flags JZ jump if zero JBE jump if below or equal... PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

25 Optimisations What can the compiler optimise for us? speed space obvious rearranging memory accesses inline functions tail recursion (sometimes even non-tail recursion) loop unrolling... and much more collapse common code constant propagation PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

26 Templates Motivation Syntax generic programming; polymorphism metaprogramming; compile-time programming template < parameters > parameters can be: types: typename or class values: integers, enums, (pointers, references) templates: more about this later parameters can have default values template <typename T, typename U = bool, size_t N = 10> PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

27 Templates What can be templated? functions classes type aliases (using) since C++11 variables since C++14 template<typename T> const T pi = T( ); int main() { std::cout.precision(17); std::cout << pi<double> << '\n'; std::cout << pi<float> << '\n'; std::cout << pi<int> << '\n'; } PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

28 Templates Template Instantiation templates instantiated at compile time all templated functions/classes in header files methods of templated classes only instantiated if actually used (why?) the previous point is not completely true; why? virtual methods template <typename T> struct X { T t; void f() { t.f(); } void g() { t.g(); } }; struct A { void f() {} }; int main() { X<int> xi; X<A> xa; xa.f(); } PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

29 Template Deduction until C++14 only for templated functions in C++17 also for classes in initialization template arguments may be deduced from the usage template <typename To, typename From> To lexical_cast(const From& val) { std::stringstream str; str << val; To result; str >> result; return result; } int main() { double d = lexical_cast<double, int>(17); int x = lexical_cast<int>("17"); std::string s = lexical_cast(10); // ERROR: why? } PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

30 Template Deduction template <typename T> void foo1(t t); // value parameter template <typename T> void foo2(t& t); // reference parameter Value parameters arrays and functions decay into pointers int a[7]; foo1(a); // T is deduced to be int* Reference parameters no decay int a[7]; foo2(a); // T is deduced to be int[7] // works as if foo2 was declared as // void foo(int (&t) [7]); // reference to array PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

31 Template Deduction template <typename T> void foo1(t t); template <typename T> void foo2(t& t); template <typename T> void foo3(const T& t); what is T deduced as? int x; const int answer = 42; foo1(x); foo1(answer); foo2(x); foo2(answer); foo3(x); foo3(answer); int, int, int, const int, int, int PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

32 Class Template Deduction in C++17, we can finally write things like these: we need std::make_pair etc. no more std::pair my_pair{ 1, "hello" }; std::vector some_ints{ 1, 2, 7, 42, 17, -1, 0 }; those things can also work with user-defined classes template <typename T> class Wrapper { T value; public: Wrapper(T val) : value(std::move(val)) {} }; Wrapper x = 3; // x is Wrapper<int> note: does not work with unique_ptr PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

33 Class Template Deduction: Deduction Guides sometimes the compiler might be unable to deduce what we want sometimes we may want a different deduction behaviour we can change the deduction behaviour using deduction guides template<typename Iterator> MyContainer(Iterator, Iterator) -> MyContainer<typename Iterator::value_type>; // also non-templated ones Wrapper(const char*) -> Wrapper<std::string>; Wrapper w{ "hello" }; // w is now Wrapper<std::string> see template_argument_deduction PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

34 C++17 Library Additions std::optional motivation: return either a value or an information that there is none no good default value for a type (or too expensive) other languages: Maybe (Haskell), nullable types (C#),... old solutions: std::pair<t, bool> std::unique_ptr<t> (needs heap allocation) std::optional<t> allocates space for a value of type T locally (on stack if local variable) pointer-like access (operators *, ->); std::nullopt PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

35 C++17 Library Additions std::variant motivation: type-safe union other languages: Either (Haskell), Rust enums,... std::variant<int, std::string> v = 42; // v contains int std::get<int>(v); // returns 42 std::get<0>(v); // also works std::get<std::string>(v); // throws v.index(); // returns 0 std::get_if<int>(&v); // returns pointer to int std::get_if<std::string>(&v); // returns nullptr PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

36 C++17 Library Additions std::variant visitor access struct Visitor { void operator()(int val) const { std::cout << "got int: " << val << '\n'; } void operator()(std::string val) const { std::cout << "got string: \"" << val << "\"\n"; } }; int main() { std::variant<int, std::string> v{ "hello" }; std::visit(visitor, v); } PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

37 C++17 Library Additions std::string_view motivation: lightweight (non-owning) string wrapper with reference semantics eliminate temporary std::string (needs allocation) take substrings in a cheap way (without allocation) void do_something(const std::string& str) { // do something read-only with str } do_something("what is this?"); void do_something_with_subst(const std::string& str) { auto substr = str.substr(1, 7); // this always creates a copy // even if I only want to read the substring } PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

38 C++17 Library Additions std::string_view older solutions: std::pair<const char*, size_t> std::string_view does exactly that! with a nicer interface can be created from std::string, const char* libraries can add their own conversions (QString) how to use: always pass by value make sure that the original string is still alive (think of std::string_view as a reference) do read-only string operations take substrings using substr PV264: Testing & Debugging; Templates I; C++17 Library Additions spring / 38

Registers. Ray Seyfarth. September 8, Bit Intel Assembly Language c 2011 Ray Seyfarth

Registers. Ray Seyfarth. September 8, Bit Intel Assembly Language c 2011 Ray Seyfarth Registers Ray Seyfarth September 8, 2011 Outline 1 Register basics 2 Moving a constant into a register 3 Moving a value from memory into a register 4 Moving values from a register into memory 5 Moving

More information

18-600: Recitation #3

18-600: Recitation #3 18-600: Recitation #3 Bomb Lab & GDB Overview September 12th, 2017 1 Today X86-64 Overview Bomb Lab Introduction GDB Tutorial 2 3 x86-64: Register Conventions Arguments passed in registers: %rdi, %rsi,

More information

CSE351 Spring 2018, Midterm Exam April 27, 2018

CSE351 Spring 2018, Midterm Exam April 27, 2018 CSE351 Spring 2018, Midterm Exam April 27, 2018 Please do not turn the page until 11:30. Last Name: First Name: Student ID Number: Name of person to your left: Name of person to your right: Signature indicating:

More information

CS Bootcamp x86-64 Autumn 2015

CS Bootcamp x86-64 Autumn 2015 The x86-64 instruction set architecture (ISA) is used by most laptop and desktop processors. We will be embedding assembly into some of our C++ code to explore programming in assembly language. Depending

More information

Program Exploitation Intro

Program Exploitation Intro Program Exploitation Intro x86 Assembly 04//2018 Security 1 Univeristà Ca Foscari, Venezia What is Program Exploitation "Making a program do something unexpected and not planned" The right bugs can be

More information

x86 Programming I CSE 351 Winter

x86 Programming I CSE 351 Winter x86 Programming I CSE 351 Winter 2017 http://xkcd.com/409/ Administrivia Lab 2 released! Da bomb! Go to section! No Luis OH Later this week 2 Roadmap C: car *c = malloc(sizeof(car)); c->miles = 100; c->gals

More information

Practical Malware Analysis

Practical Malware Analysis Practical Malware Analysis Ch 4: A Crash Course in x86 Disassembly Revised 1-16-7 Basic Techniques Basic static analysis Looks at malware from the outside Basic dynamic analysis Only shows you how the

More information

Computer Architecture and System Programming Laboratory. TA Session 3

Computer Architecture and System Programming Laboratory. TA Session 3 Computer Architecture and System Programming Laboratory TA Session 3 Stack - LIFO word-size data structure STACK is temporary storage memory area register points on top of stack (by default, it is highest

More information

CSE 351 Section 4 GDB and x86-64 Assembly Hi there! Welcome back to section, we re happy that you re here

CSE 351 Section 4 GDB and x86-64 Assembly Hi there! Welcome back to section, we re happy that you re here CSE 351 Section 4 GDB and x86-64 Assembly Hi there! Welcome back to section, we re happy that you re here x86-64 Assembly Language Assembly language is a human-readable representation of machine code instructions

More information

Rev101. spritzers - CTF team. spritz.math.unipd.it/spritzers.html

Rev101. spritzers - CTF team. spritz.math.unipd.it/spritzers.html Rev101 spritzers - CTF team spritz.math.unipd.it/spritzers.html Disclaimer All information presented here has the only purpose of teaching how reverse engineering works. Use your mad skillz only in CTFs

More information

Functions. Ray Seyfarth. August 4, Bit Intel Assembly Language c 2011 Ray Seyfarth

Functions. Ray Seyfarth. August 4, Bit Intel Assembly Language c 2011 Ray Seyfarth Functions Ray Seyfarth August 4, 2011 Functions We will write C compatible function C++ can also call C functions using extern "C" {...} It is generally not sensible to write complete assembly programs

More information

CS165 Computer Security. Understanding low-level program execution Oct 1 st, 2015

CS165 Computer Security. Understanding low-level program execution Oct 1 st, 2015 CS165 Computer Security Understanding low-level program execution Oct 1 st, 2015 A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns

More information

Rvalue References, Move Semantics, Universal References

Rvalue References, Move Semantics, Universal References Rvalue References, Move Semantics, Universal References PV264 Advanced Programming in C++ Nikola Beneš Jan Mrázek Vladimír Štill Faculty of Informatics, Masaryk University Spring 2018 PV264: Rvalue References,

More information

Credits and Disclaimers

Credits and Disclaimers Credits and Disclaimers 1 The examples and discussion in the following slides have been adapted from a variety of sources, including: Chapter 3 of Computer Systems 3 nd Edition by Bryant and O'Hallaron

More information

How Software Executes

How Software Executes How Software Executes CS-576 Systems Security Instructor: Georgios Portokalidis Overview Introduction Anatomy of a program Basic assembly Anatomy of function calls (and returns) Memory Safety Intel x86

More information

MACHINE-LEVEL PROGRAMMING I: BASICS COMPUTER ARCHITECTURE AND ORGANIZATION

MACHINE-LEVEL PROGRAMMING I: BASICS COMPUTER ARCHITECTURE AND ORGANIZATION MACHINE-LEVEL PROGRAMMING I: BASICS COMPUTER ARCHITECTURE AND ORGANIZATION Today: Machine Programming I: Basics History of Intel processors and architectures C, assembly, machine code Assembly Basics:

More information

Computer Processors. Part 2. Components of a Processor. Execution Unit The ALU. Execution Unit. The Brains of the Box. Processors. Execution Unit (EU)

Computer Processors. Part 2. Components of a Processor. Execution Unit The ALU. Execution Unit. The Brains of the Box. Processors. Execution Unit (EU) Part 2 Computer Processors Processors The Brains of the Box Computer Processors Components of a Processor The Central Processing Unit (CPU) is the most complex part of a computer In fact, it is the computer

More information

Changelog. Assembly (part 1) logistics note: lab due times. last time: C hodgepodge

Changelog. Assembly (part 1) logistics note: lab due times. last time: C hodgepodge Changelog Assembly (part 1) Corrections made in this version not seen in first lecture: 31 August 2017: slide 34: split out from previous slide; clarify zero/positive/negative 31 August 2017: slide 26:

More information

Corrections made in this version not seen in first lecture:

Corrections made in this version not seen in first lecture: Assembly (part 1) 1 Changelog 1 Corrections made in this version not seen in first lecture: 31 August 2017: slide 34: split out from previous slide; clarify zero/positive/negative 31 August 2017: slide

More information

CS429: Computer Organization and Architecture

CS429: Computer Organization and Architecture CS429: Computer Organization and Architecture Dr. Bill Young Department of Computer Sciences University of Texas at Austin Last updated: February 28, 2018 at 06:32 CS429 Slideset 9: 1 Mechanisms in Procedures

More information

CS 261 Fall Machine and Assembly Code. Data Movement and Arithmetic. Mike Lam, Professor

CS 261 Fall Machine and Assembly Code. Data Movement and Arithmetic. Mike Lam, Professor CS 261 Fall 2018 0000000100000f50 55 48 89 e5 48 83 ec 10 48 8d 3d 3b 00 00 00 c7 0000000100000f60 45 fc 00 00 00 00 b0 00 e8 0d 00 00 00 31 c9 89 0000000100000f70 45 f8 89 c8 48 83 c4 10 5d c3 Mike Lam,

More information

Instruction Set Architectures

Instruction Set Architectures Instruction Set Architectures! ISAs! Brief history of processors and architectures! C, assembly, machine code! Assembly basics: registers, operands, move instructions 1 What should the HW/SW interface

More information

C to Assembly SPEED LIMIT LECTURE Performance Engineering of Software Systems. I-Ting Angelina Lee. September 13, 2012

C to Assembly SPEED LIMIT LECTURE Performance Engineering of Software Systems. I-Ting Angelina Lee. September 13, 2012 6.172 Performance Engineering of Software Systems SPEED LIMIT PER ORDER OF 6.172 LECTURE 3 C to Assembly I-Ting Angelina Lee September 13, 2012 2012 Charles E. Leiserson and I-Ting Angelina Lee 1 Bugs

More information

Areas for growth: I love feedback

Areas for growth: I love feedback Assembly part 2 1 Areas for growth: I love feedback Speed, I will go slower. Clarity. I will take time to explain everything on the slides. Feedback. I give more Kahoot questions and explain each answer.

More information

Winter Compiler Construction T11 Activation records + Introduction to x86 assembly. Today. Tips for PA4. Today:

Winter Compiler Construction T11 Activation records + Introduction to x86 assembly. Today. Tips for PA4. Today: Winter 2006-2007 Compiler Construction T11 Activation records + Introduction to x86 assembly Mooly Sagiv and Roman Manevich School of Computer Science Tel-Aviv University Today ic IC Language Lexical Analysis

More information

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 4

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 4 CS24: INTRODUCTION TO COMPUTING SYSTEMS Spring 2018 Lecture 4 LAST TIME Enhanced our processor design in several ways Added branching support Allows programs where work is proportional to the input values

More information

Lab 3. The Art of Assembly Language (II)

Lab 3. The Art of Assembly Language (II) Lab. The Art of Assembly Language (II) Dan Bruce, David Clark and Héctor D. Menéndez Department of Computer Science University College London October 2, 2017 License Creative Commons Share Alike Modified

More information

Reverse Engineering II: Basics. Gergely Erdélyi Senior Antivirus Researcher

Reverse Engineering II: Basics. Gergely Erdélyi Senior Antivirus Researcher Reverse Engineering II: Basics Gergely Erdélyi Senior Antivirus Researcher Agenda Very basics Intel x86 crash course Basics of C Binary Numbers Binary Numbers 1 Binary Numbers 1 0 1 1 Binary Numbers 1

More information

Binghamton University. CS-220 Spring x86 Assembler. Computer Systems: Sections

Binghamton University. CS-220 Spring x86 Assembler. Computer Systems: Sections x86 Assembler Computer Systems: Sections 3.1-3.5 Disclaimer I am not an x86 assembler expert. I have never written an x86 assembler program. (I am proficient in IBM S/360 Assembler and LC3 Assembler.)

More information

Princeton University Computer Science 217: Introduction to Programming Systems. Assembly Language: Function Calls

Princeton University Computer Science 217: Introduction to Programming Systems. Assembly Language: Function Calls Princeton University Computer Science 217: Introduction to Programming Systems Assembly Language: Function Calls 1 Goals of this Lecture Help you learn: Function call problems x86-64 solutions Pertinent

More information

University of Washington

University of Washington Roadmap C: car *c = malloc(sizeof(car)); c->miles = 100; c->gals = 17; float mpg = get_mpg(c); free(c); Assembly language: Machine code: Computer system: get_mpg: pushq %rbp movq %rsp, %rbp... popq %rbp

More information

Machine Programming 3: Procedures

Machine Programming 3: Procedures Machine Programming 3: Procedures CS61, Lecture 5 Prof. Stephen Chong September 15, 2011 Announcements Assignment 2 (Binary bomb) due next week If you haven t yet please create a VM to make sure the infrastructure

More information

Machine Program: Procedure. Zhaoguo Wang

Machine Program: Procedure. Zhaoguo Wang Machine Program: Procedure Zhaoguo Wang Requirements of procedure calls? P() { y = Q(x); y++; 1. Passing control int Q(int i) { int t, z; return z; Requirements of procedure calls? P() { y = Q(x); y++;

More information

System calls and assembler

System calls and assembler System calls and assembler Michal Sojka sojkam1@fel.cvut.cz ČVUT, FEL License: CC-BY-SA 4.0 System calls (repetition from lectures) A way for normal applications to invoke operating system (OS) kernel's

More information

CS412/CS413. Introduction to Compilers Tim Teitelbaum. Lecture 21: Generating Pentium Code 10 March 08

CS412/CS413. Introduction to Compilers Tim Teitelbaum. Lecture 21: Generating Pentium Code 10 March 08 CS412/CS413 Introduction to Compilers Tim Teitelbaum Lecture 21: Generating Pentium Code 10 March 08 CS 412/413 Spring 2008 Introduction to Compilers 1 Simple Code Generation Three-address code makes it

More information

Reverse Engineering II: The Basics

Reverse Engineering II: The Basics Reverse Engineering II: The Basics Gergely Erdélyi Senior Manager, Anti-malware Research Protecting the irreplaceable f-secure.com Binary Numbers 1 0 1 1 - Nibble B 1 0 1 1 1 1 0 1 - Byte B D 1 0 1 1 1

More information

x86 Assembly Tutorial COS 318: Fall 2017

x86 Assembly Tutorial COS 318: Fall 2017 x86 Assembly Tutorial COS 318: Fall 2017 Project 1 Schedule Design Review: Monday 9/25 Sign up for 10-min slot from 3:00pm to 7:00pm Complete set up and answer posted questions (Official) Precept: Monday

More information

Machine/Assembler Language Putting It All Together

Machine/Assembler Language Putting It All Together COMP 40: Machine Structure and Assembly Language Programming Fall 2015 Machine/Assembler Language Putting It All Together Noah Mendelsohn Tufts University Email: noah@cs.tufts.edu Web: http://www.cs.tufts.edu/~noah

More information

CS241 Computer Organization Spring 2015 IA

CS241 Computer Organization Spring 2015 IA CS241 Computer Organization Spring 2015 IA-32 2-10 2015 Outline! Review HW#3 and Quiz#1! More on Assembly (IA32) move instruction (mov) memory address computation arithmetic & logic instructions (add,

More information

Assembly I: Basic Operations. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Assembly I: Basic Operations. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University Assembly I: Basic Operations Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Basic Execution Environment RAX RBX RCX RDX RSI RDI RBP RSP R8 R9 R10

More information

x86 64 Programming I CSE 351 Autumn 2018 Instructor: Justin Hsia

x86 64 Programming I CSE 351 Autumn 2018 Instructor: Justin Hsia x86 64 Programming I CSE 351 Autumn 2018 Instructor: Justin Hsia Teaching Assistants: Akshat Aggarwal An Wang Andrew Hu Brian Dai Britt Henderson James Shin Kevin Bi Kory Watson Riley Germundson Sophie

More information

CSC 2400: Computing Systems. X86 Assembly: Function Calls"

CSC 2400: Computing Systems. X86 Assembly: Function Calls CSC 24: Computing Systems X86 Assembly: Function Calls" 1 Lecture Goals! Challenges of supporting functions" Providing information for the called function" Function arguments and local variables" Allowing

More information

CS 480 Fall Runtime Environments. Mike Lam, Professor. (a.k.a. procedure calls and heap management)

CS 480 Fall Runtime Environments. Mike Lam, Professor. (a.k.a. procedure calls and heap management) CS 480 Fall 2015 Mike Lam, Professor Runtime Environments (a.k.a. procedure calls and heap management) Subprograms General characteristics Single entry point Caller is suspended while subprogram is executing

More information

How Software Executes

How Software Executes How Software Executes CS-576 Systems Security Instructor: Georgios Portokalidis Overview Introduction Anatomy of a program Basic assembly Anatomy of function calls (and returns) Memory Safety Programming

More information

x86 Programming I CSE 351 Autumn 2016 Instructor: Justin Hsia

x86 Programming I CSE 351 Autumn 2016 Instructor: Justin Hsia x86 Programming I CSE 351 Autumn 2016 Instructor: Justin Hsia Teaching Assistants: Chris Ma Hunter Zahn John Kaltenbach Kevin Bi Sachin Mehta Suraj Bhat Thomas Neuman Waylon Huang Xi Liu Yufang Sun http://xkcd.com/409/

More information

CS 161 Computer Security. Week of January 22, 2018: GDB and x86 assembly

CS 161 Computer Security. Week of January 22, 2018: GDB and x86 assembly Raluca Popa Spring 2018 CS 161 Computer Security Discussion 1 Week of January 22, 2018: GDB and x86 assembly Objective: Studying memory vulnerabilities requires being able to read assembly and step through

More information

RISC I from Berkeley. 44k Transistors 1Mhz 77mm^2

RISC I from Berkeley. 44k Transistors 1Mhz 77mm^2 The Case for RISC RISC I from Berkeley 44k Transistors 1Mhz 77mm^2 2 MIPS: A Classic RISC ISA Instructions 4 bytes (32 bits) 4-byte aligned Instructions operate on memory and registers Memory Data types

More information

Machine Language CS 3330 Samira Khan

Machine Language CS 3330 Samira Khan Machine Language CS 3330 Samira Khan University of Virginia Feb 2, 2017 AGENDA Logistics Review of Abstractions Machine Language 2 Logistics Feedback Not clear Hard to hear Use microphone Good feedback

More information

Assembly Language: Function Calls

Assembly Language: Function Calls Assembly Language: Function Calls 1 Goals of this Lecture Help you learn: Function call problems x86-64 solutions Pertinent instructions and conventions 2 Function Call Problems (1) Calling and returning

More information

Islamic University Gaza Engineering Faculty Department of Computer Engineering ECOM 2125: Assembly Language LAB. Lab # 7. Procedures and the Stack

Islamic University Gaza Engineering Faculty Department of Computer Engineering ECOM 2125: Assembly Language LAB. Lab # 7. Procedures and the Stack Islamic University Gaza Engineering Faculty Department of Computer Engineering ECOM 2125: Assembly Language LAB Lab # 7 Procedures and the Stack April, 2014 1 Assembly Language LAB Runtime Stack and Stack

More information

Lecture 15 Intel Manual, Vol. 1, Chapter 3. Fri, Mar 6, Hampden-Sydney College. The x86 Architecture. Robb T. Koether. Overview of the x86

Lecture 15 Intel Manual, Vol. 1, Chapter 3. Fri, Mar 6, Hampden-Sydney College. The x86 Architecture. Robb T. Koether. Overview of the x86 Lecture 15 Intel Manual, Vol. 1, Chapter 3 Hampden-Sydney College Fri, Mar 6, 2009 Outline 1 2 Overview See the reference IA-32 Intel Software Developer s Manual Volume 1: Basic, Chapter 3. Instructions

More information

Process Layout and Function Calls

Process Layout and Function Calls Process Layout and Function Calls CS 6 Spring 07 / 8 Process Layout in Memory Stack grows towards decreasing addresses. is initialized at run-time. Heap grow towards increasing addresses. is initialized

More information

Mechanisms in Procedures. CS429: Computer Organization and Architecture. x86-64 Stack. x86-64 Stack Pushing

Mechanisms in Procedures. CS429: Computer Organization and Architecture. x86-64 Stack. x86-64 Stack Pushing CS429: Computer Organization and Architecture Dr. Bill Young Department of Computer Sciences University of Texas at Austin Last updated: February 28, 2018 at 06:32 Mechanisms in Procedures Passing Control

More information

6/20/2011. Introduction. Chapter Objectives Upon completion of this chapter, you will be able to:

6/20/2011. Introduction. Chapter Objectives Upon completion of this chapter, you will be able to: Introduction Efficient software development for the microprocessor requires a complete familiarity with the addressing modes employed by each instruction. This chapter explains the operation of the stack

More information

Do not turn the page until 5:10.

Do not turn the page until 5:10. University of Washington Computer Science & Engineering Autumn 2018 Instructor: Justin Hsia 2018-10-29 Last Name: First Name: Student ID Number: Name of person to your Left Right All work is my own. I

More information

6.035 Project 3: Unoptimized Code Generation. Jason Ansel MIT - CSAIL

6.035 Project 3: Unoptimized Code Generation. Jason Ansel MIT - CSAIL 6.035 Project 3: Unoptimized Code Generation Jason Ansel MIT - CSAIL Quiz Monday 50 minute quiz Monday Covers everything up to yesterdays lecture Lexical Analysis (REs, DFAs, NFAs) Syntax Analysis (CFGs,

More information

Reverse Engineering II: The Basics

Reverse Engineering II: The Basics Reverse Engineering II: The Basics This document is only to be distributed to teachers and students of the Malware Analysis and Antivirus Technologies course and should only be used in accordance with

More information

Computer Systems Lecture 9

Computer Systems Lecture 9 Computer Systems Lecture 9 CPU Registers in x86 CPU status flags EFLAG: The Flag register holds the CPU status flags The status flags are separate bits in EFLAG where information on important conditions

More information

Machine-level Programs Procedure

Machine-level Programs Procedure Computer Systems Machine-level Programs Procedure Han, Hwansoo Mechanisms in Procedures Passing control To beginning of procedure code Back to return point Passing data Procedure arguments Return value

More information

Intro to x86 Binaries. From ASM to exploit

Intro to x86 Binaries. From ASM to exploit Intro to x86 Binaries From ASM to exploit Intro to x86 Binaries I lied lets do a quick ctf team thing Organization Ideas? Do we need to a real structure right now? Mailing list is OTW How do we get more

More information

CSE 351 Midterm - Winter 2017

CSE 351 Midterm - Winter 2017 CSE 351 Midterm - Winter 2017 February 08, 2017 Please read through the entire examination first, and make sure you write your name and NetID on all pages! We designed this exam so that it can be completed

More information

The x86 Architecture

The x86 Architecture The x86 Architecture Lecture 24 Intel Manual, Vol. 1, Chapter 3 Robb T. Koether Hampden-Sydney College Fri, Mar 20, 2015 Robb T. Koether (Hampden-Sydney College) The x86 Architecture Fri, Mar 20, 2015

More information

Instruction Set Architectures

Instruction Set Architectures Instruction Set Architectures Computer Systems: Section 4.1 Suppose you built a computer What Building Blocks would you use? Arithmetic Logic Unit (ALU) OP1 OP2 OPERATION ALU RES ALU + Registers R0: 0x0000

More information

The Stack & Procedures

The Stack & Procedures The Stack & Procedures CSE 351 Autumn 2017 Instructor: Justin Hsia Teaching Assistants: Lucas Wotton Michael Zhang Parker DeWilde Ryan Wong Sam Gehman Sam Wolfson Savanna Yee Vinny Palaniappan http://xkcd.com/648/

More information

Where We Are. Optimizations. Assembly code. generation. Lexical, Syntax, and Semantic Analysis IR Generation. Low-level IR code.

Where We Are. Optimizations. Assembly code. generation. Lexical, Syntax, and Semantic Analysis IR Generation. Low-level IR code. Where We Are Source code if (b == 0) a = b; Low-level IR code Optimized Low-level IR code Assembly code cmp $0,%rcx cmovz %rax,%rdx Lexical, Syntax, and Semantic Analysis IR Generation Optimizations Assembly

More information

Lecture 3 CIS 341: COMPILERS

Lecture 3 CIS 341: COMPILERS Lecture 3 CIS 341: COMPILERS HW01: Hellocaml! Announcements is due tomorrow tonight at 11:59:59pm. HW02: X86lite Will be available soon look for an announcement on Piazza Pair-programming project Simulator

More information

Machine-Level Programming III: Procedures

Machine-Level Programming III: Procedures Machine-Level Programming III: Procedures CSE 238/2038/2138: Systems Programming Instructor: Fatma CORUT ERGİN Slides adapted from Bryant & O Hallaron s slides Mechanisms in Procedures Passing control

More information

EEM336 Microprocessors I. Addressing Modes

EEM336 Microprocessors I. Addressing Modes EEM336 Microprocessors I Addressing Modes Introduction Efficient software development for the microprocessor requires a complete familiarity with the addressing modes employed by each instruction. This

More information

Assembly Programming IV

Assembly Programming IV Assembly Programming IV CSE 351 Spring 2017 Instructor: Ruth Anderson Teaching Assistants: Dylan Johnson Kevin Bi Linxing Preston Jiang Cody Ohlsen Yufang Sun Joshua Curtis 1 Administrivia Homework 2 due

More information

Systems I. Machine-Level Programming V: Procedures

Systems I. Machine-Level Programming V: Procedures Systems I Machine-Level Programming V: Procedures Topics abstraction and implementation IA32 stack discipline Procedural Memory Usage void swap(int *xp, int *yp) int t0 = *xp; int t1 = *yp; *xp = t1; *yp

More information

administrivia today start assembly probably won t finish all these slides Assignment 4 due tomorrow any questions?

administrivia today start assembly probably won t finish all these slides Assignment 4 due tomorrow any questions? administrivia today start assembly probably won t finish all these slides Assignment 4 due tomorrow any questions? exam on Wednesday today s material not on the exam 1 Assembly Assembly is programming

More information

Machine-Level Programming (2)

Machine-Level Programming (2) Machine-Level Programming (2) Yanqiao ZHU Introduction to Computer Systems Project Future (Fall 2017) Google Camp, Tongji University Outline Control Condition Codes Conditional Branches and Conditional

More information

CNIT 127: Exploit Development. Ch 1: Before you begin. Updated

CNIT 127: Exploit Development. Ch 1: Before you begin. Updated CNIT 127: Exploit Development Ch 1: Before you begin Updated 1-14-16 Basic Concepts Vulnerability A flaw in a system that allows an attacker to do something the designer did not intend, such as Denial

More information

Bryant and O Hallaron, Computer Systems: A Programmer s Perspective, Third Edition. Carnegie Mellon

Bryant and O Hallaron, Computer Systems: A Programmer s Perspective, Third Edition. Carnegie Mellon Carnegie Mellon Machine-Level Programming III: Procedures 15-213/18-213/14-513/15-513: Introduction to Computer Systems 7 th Lecture, September 18, 2018 Today Procedures Mechanisms Stack Structure Calling

More information

x86 assembly CS449 Fall 2017

x86 assembly CS449 Fall 2017 x86 assembly CS449 Fall 2017 x86 is a CISC CISC (Complex Instruction Set Computer) e.g. x86 Hundreds of (complex) instructions Only a handful of registers RISC (Reduced Instruction Set Computer) e.g. MIPS

More information

W4118: PC Hardware and x86. Junfeng Yang

W4118: PC Hardware and x86. Junfeng Yang W4118: PC Hardware and x86 Junfeng Yang A PC How to make it do something useful? 2 Outline PC organization x86 instruction set gcc calling conventions PC emulation 3 PC board 4 PC organization One or more

More information

Machine-Level Programming V: Unions and Memory layout

Machine-Level Programming V: Unions and Memory layout Machine-Level Programming V: Unions and Memory layout Slides adapted from Bryant and O Hallaron Bryant and O Hallaron, Computer Systems: A Programmer s Perspective, Third Edition 1 FAQ Call conventions

More information

Part 7. Stacks. Stack. Stack. Examples of Stacks. Stack Operation: Push. Piles of Data. The Stack

Part 7. Stacks. Stack. Stack. Examples of Stacks. Stack Operation: Push. Piles of Data. The Stack Part 7 Stacks The Stack Piles of Data Stack Stack A stack is an abstract data structure that stores objects Based on the concept of a stack of items like a stack of dishes Data can only be added to or

More information

143A: Principles of Operating Systems. Lecture 4: Calling conventions. Anton Burtsev October, 2017

143A: Principles of Operating Systems. Lecture 4: Calling conventions. Anton Burtsev October, 2017 143A: Principles of Operating Systems Lecture 4: Calling conventions Anton Burtsev October, 2017 Recap from last time Stack and procedure calls What is stack? Stack It's just a region of memory Pointed

More information

Procedures and the Call Stack

Procedures and the Call Stack Procedures and the Call Stack Topics Procedures Call stack Procedure/stack instructions Calling conventions Register-saving conventions Why Procedures? Why functions? Why methods? int contains_char(char*

More information

Objectives. ICT106 Fundamentals of Computer Systems Topic 8. Procedures, Calling and Exit conventions, Run-time Stack Ref: Irvine, Ch 5 & 8

Objectives. ICT106 Fundamentals of Computer Systems Topic 8. Procedures, Calling and Exit conventions, Run-time Stack Ref: Irvine, Ch 5 & 8 Objectives ICT106 Fundamentals of Computer Systems Topic 8 Procedures, Calling and Exit conventions, Run-time Stack Ref: Irvine, Ch 5 & 8 To understand how HLL procedures/functions are actually implemented

More information

CSC 2400: Computing Systems. X86 Assembly: Function Calls

CSC 2400: Computing Systems. X86 Assembly: Function Calls CSC 24: Computing Systems X86 Assembly: Function Calls 1 Lecture Goals Challenges of supporting functions Providing information for the called function Function arguments and local variables Allowing the

More information

The Stack & Procedures

The Stack & Procedures The Stack & Procedures CSE 351 Spring 2017 Instructor: Ruth Anderson Teaching Assistants: Dylan Johnson Kevin Bi Linxing Preston Jiang Cody Ohlsen Yufang Sun Joshua Curtis Administrivia Homework 2 due

More information

Von Neumann Architecture. Machine Languages. Context of this Lecture. High-Level Languages. Assembly Language: Part 1. Princeton University.

Von Neumann Architecture. Machine Languages. Context of this Lecture. High-Level Languages. Assembly Language: Part 1. Princeton University. Princeton University Computer Science 217: Introduction to Programming Systems Assembly Language: Part 1 Agenda Language Levels Instruction-Set Architecture (ISA) Assembly Language: Performing Arithmetic

More information

Assembly Language Programming 64-bit environments

Assembly Language Programming 64-bit environments Assembly Language Programming 64-bit environments October 17, 2017 Some recent history Intel together with HP start to work on 64-bit processor using VLIW technology. Itanium processor is born with the

More information

Meet & Greet! Come hang out with your TAs and Fellow Students (& eat free insomnia cookies) When : TODAY!! 5-6 pm Where : 3rd Floor Atrium, CIT

Meet & Greet! Come hang out with your TAs and Fellow Students (& eat free insomnia cookies) When : TODAY!! 5-6 pm Where : 3rd Floor Atrium, CIT Meet & Greet! Come hang out with your TAs and Fellow Students (& eat free insomnia cookies) When : TODAY!! 5-6 pm Where : 3rd Floor Atrium, CIT CS33 Intro to Computer Systems XI 1 Copyright 2017 Thomas

More information

Rvalue References & Move Semantics

Rvalue References & Move Semantics Rvalue References & Move Semantics PB173 Programming in Modern C++ Nikola Beneš, Vladimír Štill, Jiří Weiser Faculty of Informatics, Masaryk University spring 2016 PB173 Modern C++: Rvalue References &

More information

Exercise Session 6 Computer Architecture and Systems Programming

Exercise Session 6 Computer Architecture and Systems Programming Systems Group Department of Computer Science ETH Zürich Exercise Session 6 Computer Architecture and Systems Programming Herbstsemester 2016 Agenda GDB Outlook on assignment 6 GDB The GNU Debugger 3 Debugging..

More information

Assembly II: Control Flow

Assembly II: Control Flow Assembly II: Control Flow Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu SSE2030: Introduction to Computer Systems, Spring 2018, Jinkyu Jeong (jinkyu@skku.edu)

More information

SPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY

SPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY BACKGROUND 8086 CPU has 8 general purpose registers listed below: AX - the accumulator register (divided into AH / AL): 1. Generates shortest machine code 2. Arithmetic, logic and data transfer 3. One

More information

CPEG421/621 Tutorial

CPEG421/621 Tutorial CPEG421/621 Tutorial Compiler data representation system call interface calling convention Assembler object file format object code model Linker program initialization exception handling relocation model

More information

CSC 2400: Computer Systems. Towards the Hardware: Machine-Level Representation of Programs

CSC 2400: Computer Systems. Towards the Hardware: Machine-Level Representation of Programs CSC 2400: Computer Systems Towards the Hardware: Machine-Level Representation of Programs Towards the Hardware High-level language (Java) High-level language (C) assembly language machine language (IA-32)

More information

Assembly Language: Function Calls

Assembly Language: Function Calls Assembly Language: Function Calls 1 Goals of this Lecture Help you learn: Function call problems: Calling and returning Passing parameters Storing local variables Handling registers without interference

More information

CSC 8400: Computer Systems. Using the Stack for Function Calls

CSC 8400: Computer Systems. Using the Stack for Function Calls CSC 84: Computer Systems Using the Stack for Function Calls Lecture Goals Challenges of supporting functions! Providing information for the called function Function arguments and local variables! Allowing

More information

x86-64 Programming II

x86-64 Programming II x86-64 Programming II CSE 351 Winter 2018 Instructor: Mark Wyse Teaching Assistants: Kevin Bi Parker DeWilde Emily Furst Sarah House Waylon Huang Vinny Palaniappan http://xkcd.com/409/ Administrative Homework

More information

Generation. representation to the machine

Generation. representation to the machine Unoptimized i Code Generation From the intermediate representation to the machine code 5 Outline Introduction Machine Language Overview of a modern processor Memory Layout Procedure Abstraction Procedure

More information

Today: Machine Programming I: Basics

Today: Machine Programming I: Basics Today: Machine Programming I: Basics History of Intel processors and architectures C, assembly, machine code Assembly Basics: Registers, operands, move Intro to x86-64 1 Intel x86 Processors Totally dominate

More information

Intro x86 Part 3: Linux Tools & Analysis

Intro x86 Part 3: Linux Tools & Analysis Intro x86 Part 3: Linux Tools & Analysis Xeno Kovah 2009/2010 xkovah at gmail Approved for Public Release: 10-3348. Distribution Unlimited All materials is licensed under a Creative Commons Share Alike

More information

Assembly Language Lab # 9

Assembly Language Lab # 9 Faculty of Engineering Computer Engineering Department Islamic University of Gaza 2011 Assembly Language Lab # 9 Stacks and Subroutines Eng. Doaa Abu Jabal Assembly Language Lab # 9 Stacks and Subroutines

More information

CSCE 212H, Spring 2008 Lab Assignment 3: Assembly Language Assigned: Feb. 7, Due: Feb. 14, 11:59PM

CSCE 212H, Spring 2008 Lab Assignment 3: Assembly Language Assigned: Feb. 7, Due: Feb. 14, 11:59PM CSCE 212H, Spring 2008 Lab Assignment 3: Assembly Language Assigned: Feb. 7, Due: Feb. 14, 11:59PM February 7, 2008 1 Overview The purpose of this assignment is to introduce you to the assembly language

More information