[video member=miotatsu stream_platform=twitch project=book title="C vs. ASM, 2.3" vod_platform=youtube id=El_YbdOi42U annotator=Miblo] [0:13][Recap and set the stage for the day, with thoughts on comparing the code sizes of various languages][:speech] [2:58][Perform a more rigorous "Hello, World!" comparison between C and x86 :asm][:language :programming] [9:57][@supersaiyengunner][Just passing by seeing what’s on and I heard I don’t need sake] [10:34][Note that start.S will be shared between :asm and C][:language :programming] [11:02][@supersaiyengunner][Now I’m clueless] [11:38][@supersaiyengunner][I just found you] [12:13][Pull up the existing clang invocation for test.c][:programming] [13:01][@supersaiyengunner][I’m down to learn] [14:24][Build and consult the objdump for our program][:programming] [15:54][Create hello.S][:asm :programming] [17:02][@supersaiyengunner][I must absorb your knowledge so I can become more powerful] [17:42][Remove excess lines from hello.S][:asm :programming] [19:15][Compare the lines of code in hello.S and test.c][:language :asm :programming] [21:50][Chapter 2.3 - Operands of the Computer Hardware[ref title="Computer Organization and Design RISC-V Edition" author="David Patterson & John Hennessy" publisher="Morgan Kaufmann" isbn=9780128122754 url=https://www.elsevier.com/books/computer-organization-and-design-risc-v-edition/patterson/978-0-12-812275-4]][:hardware] [24:41][Sketch out a way to deal with the limited number of :hardware registers, with thoughts on portable software][:programming] [41:12][Chapter 2.3 continued[ref title="Computer Organization and Design RISC-V Edition" author="David Patterson & John Hennessy" publisher="Morgan Kaufmann" isbn=9780128122754 url=https://www.elsevier.com/books/computer-organization-and-design-risc-v-edition/patterson/978-0-12-812275-4]][:hardware] [44:10][Recall [@cmuratori Casey]'s explanation of how the speed of light can become a bottleneck[ref site=YouTube page="Intro to C on Windows - Day 3" url=https://www.youtube.com/watch?v=T4CjOB0y9nI]][:hardware] [52:49][Chapter 2.3 continued[ref title="Computer Organization and Design RISC-V Edition" author="David Patterson & John Hennessy" publisher="Morgan Kaufmann" isbn=9780128122754 url=https://www.elsevier.com/books/computer-organization-and-design-risc-v-edition/patterson/978-0-12-812275-4]][:hardware] [55:40][Chapter 2.3 Example 1 - Compiling a C Assignment Using Registers[ref title="Computer Organization and Design RISC-V Edition" author="David Patterson & John Hennessy" publisher="Morgan Kaufmann" isbn=9780128122754 url=https://www.elsevier.com/books/computer-organization-and-design-risc-v-edition/patterson/978-0-12-812275-4]][:asm :hardware] [56:29][Our answer to Chapter 2.1 Example 2][:asm :blackboard :hardware] [1:00:32][Setup the tablet][:admin] [1:01:51][Putting variables into RISC-V registers][:blackboard :hardware] [1:04:03][Compare our answer to Chapter 2.1 Example 1 with the book[ref title="Computer Organization and Design RISC-V Edition" author="David Patterson & John Hennessy" publisher="Morgan Kaufmann" isbn=9780128122754 url=https://www.elsevier.com/books/computer-organization-and-design-risc-v-edition/patterson/978-0-12-812275-4]][:asm :hardware] [1:07:37][Chapter 2.1 continued, :Memory Operands[ref title="Computer Organization and Design RISC-V Edition" author="David Patterson & John Hennessy" publisher="Morgan Kaufmann" isbn=9780128122754 url=https://www.elsevier.com/books/computer-organization-and-design-risc-v-edition/patterson/978-0-12-812275-4]][:hardware] [1:09:51][Figure 2.2 - :Memory addresses and contents of memory at those locations[ref title="Computer Organization and Design RISC-V Edition" author="David Patterson & John Hennessy" publisher="Morgan Kaufmann" isbn=9780128122754 url=https://www.elsevier.com/books/computer-organization-and-design-risc-v-edition/patterson/978-0-12-812275-4]][:blackboard :hardware] [1:15:26][Chapter 2.1 continued[ref title="Computer Organization and Design RISC-V Edition" author="David Patterson & John Hennessy" publisher="Morgan Kaufmann" isbn=9780128122754 url=https://www.elsevier.com/books/computer-organization-and-design-risc-v-edition/patterson/978-0-12-812275-4]][:hardware :memory] [1:16:05][Chapter 2.3 Example 2 - Compiling an Assignment When an Operand Is in :Memory[ref title="Computer Organization and Design RISC-V Edition" author="David Patterson & John Hennessy" publisher="Morgan Kaufmann" isbn=9780128122754 url=https://www.elsevier.com/books/computer-organization-and-design-risc-v-edition/patterson/978-0-12-812275-4]][:hardware] [1:16:51][Compiling g = h + A\[8\];][:asm :blackboard :memory] [1:24:56][Compare our answer to Chapter 2.1 Example 2 with the book[ref title="Computer Organization and Design RISC-V Edition" author="David Patterson & John Hennessy" publisher="Morgan Kaufmann" isbn=9780128122754 url=https://www.elsevier.com/books/computer-organization-and-design-risc-v-edition/patterson/978-0-12-812275-4]][:asm :memory] [1:25:32][Update our answer to use x22 as the base address][:blackboard :asm :memory] [1:26:19][Continue to compare our answer to Chapter 2.1 Example 2[ref title="Computer Organization and Design RISC-V Edition" author="David Patterson & John Hennessy" publisher="Morgan Kaufmann" isbn=9780128122754 url=https://www.elsevier.com/books/computer-organization-and-design-risc-v-edition/patterson/978-0-12-812275-4]][:asm :memory] [1:29:42][Leave the rest of Chapter 2.3 for the next day][:speech] [/video]