teaching machines

CS 330 Lecture 14 – Jeff’s Malloc

Agenda what ?s finish jmalloc what happens when TODO Optional: check out the section of the C FAQ on memory allocation: http://c-faq.com/malloc/index.html. Really optional: check out the GNU implementation of malloc. What Happens When… You malloc but you don’t free? You write beyond your allocation? You free a pointer twice? You free memory that’s not your […]

CS 330 Lecture 13 – DIY Malloc

Agenda what ?s enums in Java making a path from a directory and file name implementing malloc TODO Read up on scope and bindings in chapter 3 through section 3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3. 1/4 sheet. Code Rank.java CardUtilities.java file_stuff.c jmalloc.h jmalloc.c Haiku

CS 330 Lecture 13 – Types

Agenda what ?s program this a definition of type scalars arrays enums structs enums in C vs. enums in Java type qualifiers Program This Code blackjack.c Haiku

CS 330 Lecture 12 – C

Agenda what ?s array/pointer duality scope in C vs. Java array allocation in C vs. Java call by value in C vs. Java new types enums in C vs. Java Think About This TODO Read Simon Tatham’s Descent into C: http://www.chiark.greenend.org.uk/~sgtatham/cdescent. Why does C not have a boolean type? Why does Java not have unsigned types? […]

CS 330 Lecture 11 – Slightly Above the Machine with C

Agenda what ?s what does assembly not do? things that languages provide: binding names to data type systems scope abstraction compilers and interpreters some C exercises atoi makepath blackjack scoring TODO Read chapter 1 through 1.5 in Programming Language Pragmatics. Bonus 1/4 sheet. Start Savage, homework 1. Later-week submission deadline is February 28. Code atoi.c […]

CS 330 Homework 1 – due before February 28

See the PDF.

CS 330 Lecture 10 – Assembly

Agenda what ?s assembly ways of doing: loops structs local variables functions TODO Read pages 35-45 in Programming From The Ground Up. 1/4 sheet. Code headxortails.s loop.s struct.s stringloop.s Haiku

CS 330 Lecture 9 – Assembly

Agenda what ?s think about this the assembly way of doing things getting input from user heads/tails generator summing up a list of numbers using local variables binding data together TODO Read pages 19-31 and 109-114 of Programming From The Ground Up. 1/4 sheet. Think About This Code get_two.s headxortails.s Haiku

CS 330 Lecture 8 – Assembly

Agenda what ?s TA office hours the assembly way of doing things print some numbers sum some numbers program this getting input from user heads/tails generator summing up a list of numbers Program This Code makefile Note to copy and pasters: makefile rules need to be indented with real tabs, not spaces. add.s printf.s quadruple.s […]

CS 330 Lecture 7 – Assembly

Agenda what ?s zero-width assertions think about this Von Neumann memory footprint of a process how to do things from a high-level language in assembly exit declare globals print some numbers sum some numbers getting input from user heads/tails generator TODO Read Programming From The Ground Up, from the beginning through page 19. What’s a […]

1 22 23 24 25 26 35