cinera_handmade.network/cmuratori/hero/intro-to-c/intro-to-c2.hmml

53 lines
2.5 KiB
Plaintext
Raw Normal View History

[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=intro-to-c title="Intro to C on Windows - Day 2" vod_platform=youtube id=KF29ePTqWa4 annotator=jacebennett annotator=theinternetftw]
[0:05][News - You can get Visual Studio Community Edition for free (better than express)]
[2:35][VS tip - can load the last thing you had open when you start it next time]
[3:00][Recap on functions]
[4:00][The story of OutputDebugStringA (it all started with ASCII)]
[6:53][Encodings: numbers that mean something more]
[8:11][The Debugger]
[9:15][Breakpoints]
[10:38][VS: Finding the debug windows]
[11:25][The Watch window]
[13:37][See? Letters are numbers!]
[14:35][Escape sequences (\\n and friends)]
[17:40][Bases can trip you up]
[19:20][Back to escape sequences]
[20:53][Note: must type \\\\ to get real \\'s]
[22:10][Platform newline niceties]
[23:55][What to do if VS crashes (like it just did)]
[25:22][Windows vs. Linux vs. Mac OS newlines]
[26:59][Back to OutputDebugStringA]
[28:15][ASCII to Unicode]
[30:18][The consequences of that move: C Error Messages]
[30:55][A glimpse into the seedy Macro underbelly of the Win32 API]
[32:50][Note: Unicode is default in VS]
[34:04][Let's talk about variables]
[35:11][Which means we should talk about CPUs and memory]
[36:12][Asking for memory (declaring vars)]
[37:15][Neat learning anecdote (what does = mean?)]
[40:10][What is a variable *really*? (Let's 'watch' it)]
[41:20][Uninitialized memory can be anything]
[43:15][Debug 'Stepping' (running a program line by line)]
[44:23][Programming doesn't have to be math-y (int x = 5; covers a lot)]
[45:25][Different types of numbers in C (char, short, int, signed-ness)]
[46:24][A bit of binary o.o]
[49:30][char == 8 bits]
[49:37][How can you tell how much you can hold with 8 bits?]
[52:17][Signed-ness]
[54:06][The rest of the int family (short, int)]
[55:56][VS tip: F5 to start debug, Shift-F5 to stop]
[56:14][Math consequences of number size limits (overflows)]
[59:02][Okay. What is *actually* happening when we run programs?]
[59:37][Assembly]
[1:01:15][The registers window]
[1:02:00][What registers are]
[1:03:32][Memory addresses]
[1:04:56][The MOV instruction]
[1:06:08][Hex]
[1:07:28][VS Tip: hover over hex in assembly to see its decimal value]
[1:09:09][Watching the assembly work in the watch window]
[1:10:58][The size of eax vs. the size of a char]
[1:14:09][The moral: The Asm matches the C. You can read this]
[1:15:23][The moral: How things really work is worth knowing]
[/video]