Jim's
Tutorials

Fall 2016
course
navigation

9-13-16

little vs. big endians

if the output is--
1 : the machine is little endian
2 : the machine is big endian
  #include <stdio.h> int main() { unsigned int x = 1; printf ("%d", (int) (((char *)&x)[0])); return 0; }
We mentioned bit fields :
http://www.catb.org/esr/structure-packing/

Jim showed some C examples of structs and style from his system course : http://cs.marlboro.edu/courses/spring2016/systems/code/c_word_list/

Dylan:
$ make show_bytes $ xxd show_bytes # show hex dump


Here's a link to some of my systems course notes on gdb :
http://cs.marlboro.edu/courses/spring2013/systems/code/gdb_example/gdb_notes.txt
http://cs.marlboro.edu/ courses/ fall2016/jims_tutorials/ malware/ 9-13-16
last modified Tuesday September 13 2016 2:59 pm EDT

attachments [paper clip]

     name last modified size
[COD]show_bytes.c Sep 13 2016 2:17 pm 2.10kB