Week 4 Day 1 - Strings and Memory Access
We had three guest speakers come talk in the first half of class today, who graduated from CCC a few years ago and are now professional programmers at Berkeley and elsewhere. They answered questions about computer science and such. This video is after they finished.
Today we learned a few important things:
1) C-style strings are arrays of characters with a 0 byte ending the string
2) C-style strings are garbage (the rest of the C language is fine, but the basic string type in particular is bad and has led to many hacks over the years).
3) LDR/STR - commands to load and store 32 bits of memory from RAM in ARM32
4) LDRB/STRB - commands to load and store 8 bits of memory from RAM in ARM32
Example:
R5 holds the address of a string
R6 holds the index of which character of the string we want to access
LDRB R4, [R5,R6]; //Loads that character into R4