More Assembler Hacking
?
?

Keyboard Navigation

Global Keys

[, < / ], > Jump to previous / next episode
W, K, P / S, J, N Jump to previous / next marker
t / T Toggle theatre / SUPERtheatre mode
V Revert filter to original state Y Select link (requires manual Ctrl-c)

Menu toggling

q Quotes r References f Filter y Link c Credits

In-Menu Movement

a
w
s
d
h j k l


Quotes and References Menus

Enter Jump to timecode

Quotes, References and Credits Menus

o Open URL (in new tab)

Filter Menu

x, Space Toggle category and focus next
X, ShiftSpace Toggle category and focus previous
v Invert topics / media as per focus

Filter and Link Menus

z Toggle filter / linking mode

Credits Menu

Enter Open URL (in new tab)
0:00Recap and set the stage for the day, with a mention of the pacing of the stream
🗩
0:00Recap and set the stage for the day, with a mention of the pacing of the stream
🗩
0:00Recap and set the stage for the day, with a mention of the pacing of the stream
🗩
1:58Pull our test asm out into a multi-line string
1:58Pull our test asm out into a multi-line string
1:58Pull our test asm out into a multi-line string
2:54Run it to see that it didn't work
🏃
2:54Run it to see that it didn't work
🏃
2:54Run it to see that it didn't work
🏃
3:18Allow parse_line() to optionally match a \n at the beginning
3:18Allow parse_line() to optionally match a \n at the beginning
3:18Allow parse_line() to optionally match a \n at the beginning
3:46Run it and show the emulation in action
🏃
3:46Run it and show the emulation in action
🏃
3:46Run it and show the emulation in action
🏃
4:05Define other data types and helper commands in the cmd_defs table, introducing cmd_org() and cmd_align()
4:05Define other data types and helper commands in the cmd_defs table, introducing cmd_org() and cmd_align()
4:05Define other data types and helper commands in the cmd_defs table, introducing cmd_org() and cmd_align()
7:19Test creation of a uint8
7:19Test creation of a uint8
7:19Test creation of a uint8
8:44Run it to see how the emulator handles our uint8
🏃
8:44Run it to see how the emulator handles our uint8
🏃
8:44Run it to see how the emulator handles our uint8
🏃
9:57Introduce cmd_fill()1
9:57Introduce cmd_fill()1
9:57Introduce cmd_fill()1
15:26Test our fill command, enabling cmd_fill() to handle commas
15:26Test our fill command, enabling cmd_fill() to handle commas
15:26Test our fill command, enabling cmd_fill() to handle commas
17:27Run it and hit an "Expected instruction" error
🏃
17:27Run it and hit an "Expected instruction" error
🏃
17:27Run it and hit an "Expected instruction" error
🏃
18:07Add fill to the cmd_defs table, and add error handling to cmd_fill()
18:07Add fill to the cmd_defs table, and add error handling to cmd_fill()
18:07Add fill to the cmd_defs table, and add error handling to cmd_fill()
20:40Run it to see our fill in action
🏃
20:40Run it to see our fill in action
🏃
20:40Run it to see our fill in action
🏃
21:04Do a test of placing a variable at a specific position using org rather than fill
21:04Do a test of placing a variable at a specific position using org rather than fill
21:04Do a test of placing a variable at a specific position using org rather than fill
22:17Run it to see this in action, and explain why it works
🏃
22:17Run it to see this in action, and explain why it works
🏃
22:17Run it to see this in action, and explain why it works
🏃
22:45rygorous pervognsen Your cmd_uint16() is buggy (it does uint8 only)
🗪
22:45rygorous pervognsen Your cmd_uint16() is buggy (it does uint8 only)
🗪
22:45rygorous pervognsen Your cmd_uint16() is buggy (it does uint8 only)
🗪
22:50Fix cmd_uint16() to call asm_uint16()
22:50Fix cmd_uint16() to call asm_uint16()
22:50Fix cmd_uint16() to call asm_uint16()
23:04Begin to enable parse_instr() to handle store instructions2
23:04Begin to enable parse_instr() to handle store instructions2
23:04Begin to enable parse_instr() to handle store instructions2
24:45Two variants of load
🗩
24:45Two variants of load
🗩
24:45Two variants of load
🗩
26:09rygorous Most RISCs do have "store <value>, (<effective_addr>)" though
🗪
26:09rygorous Most RISCs do have "store <value>, (<effective_addr>)" though
🗪
26:09rygorous Most RISCs do have "store <value>, (<effective_addr>)" though
🗪
26:30Enable parse_instr() to handle both the register- and label-based load instruction
26:30Enable parse_instr() to handle both the register- and label-based load instruction
26:30Enable parse_instr() to handle both the register- and label-based load instruction
31:05Test a register-based load
31:05Test a register-based load
31:05Test a register-based load
31:59Run it and hit an "Immediate is out of range" error
🏃
31:59Run it and hit an "Immediate is out of range" error
🏃
31:59Run it and hit an "Immediate is out of range" error
🏃
32:55Reduce the offset in our addi instruction
32:55Reduce the offset in our addi instruction
32:55Reduce the offset in our addi instruction
33:00Run it to see that it works
🏃
33:00Run it to see that it works
🏃
33:00Run it to see that it works
🏃
33:07Test parenthesised offset in our lw instruction
33:07Test parenthesised offset in our lw instruction
33:07Test parenthesised offset in our lw instruction
33:13Run it to see that it works
🏃
33:13Run it to see that it works
🏃
33:13Run it to see that it works
🏃
33:16Try changing that offset to our lw instruction, also editing the org instruction to match
33:16Try changing that offset to our lw instruction, also editing the org instruction to match
33:16Try changing that offset to our lw instruction, also editing the org instruction to match
33:23Run it to see that this works too
🏃
33:23Run it to see that this works too
🏃
33:23Run it to see that this works too
🏃
33:40miotatsu I wasn't a fan of the store syntax when I first encountered it in RISC-V asm either
🗪
33:40miotatsu I wasn't a fan of the store syntax when I first encountered it in RISC-V asm either
🗪
33:40miotatsu I wasn't a fan of the store syntax when I first encountered it in RISC-V asm either
🗪
34:18Introduce cmd_li() adding li to the cmd_defs table
34:18Introduce cmd_li() adding li to the cmd_defs table
34:18Introduce cmd_li() adding li to the cmd_defs table
36:43Test an li instruction
36:43Test an li instruction
36:43Test an li instruction
36:50Run it and hit an "Immediate is out of range" error
🏃
36:50Run it and hit an "Immediate is out of range" error
🏃
36:50Run it and hit an "Immediate is out of range" error
🏃
37:13Fix cmd_li() to correctly emit our immediate
37:13Fix cmd_li() to correctly emit our immediate
37:13Fix cmd_li() to correctly emit our immediate
37:43Run it to see that li works
🏃
37:43Run it to see that li works
🏃
37:43Run it to see that li works
🏃
37:49Enable cmd_li() to handle full-width immediates
37:49Enable cmd_li() to handle full-width immediates
37:49Enable cmd_li() to handle full-width immediates
38:41Test loading a big immediate
38:41Test loading a big immediate
38:41Test loading a big immediate
39:00Run it to see that it works
🏃
39:00Run it to see that it works
🏃
39:00Run it to see that it works
🏃
39:48Enable parse_instr() to handle store instructions
39:48Enable parse_instr() to handle store instructions
39:48Enable parse_instr() to handle store instructions
43:37Test a sw instruction
43:37Test a sw instruction
43:37Test a sw instruction
44:34Run it to see that the sw instruction works
🏃
44:34Run it to see that the sw instruction works
🏃
44:34Run it to see that the sw instruction works
🏃
45:20A few thoughts on x86 deference syntax
🗩
45:20A few thoughts on x86 deference syntax
🗩
45:20A few thoughts on x86 deference syntax
🗩
46:50Introduce parse_addr() for parse_instr() to call, changing our load instruction to use the '[' and ']' syntax
46:50Introduce parse_addr() for parse_instr() to call, changing our load instruction to use the '[' and ']' syntax
46:50Introduce parse_addr() for parse_instr() to call, changing our load instruction to use the '[' and ']' syntax
54:16Test our [ / ] syntax
54:16Test our [ / ] syntax
54:16Test our [ / ] syntax
54:31Run it to see that it works
🏃
54:31Run it to see that it works
🏃
54:31Run it to see that it works
🏃
54:38Switch the store handling to use '[' and ']'
54:38Switch the store handling to use '[' and ']'
54:38Switch the store handling to use '[' and ']'
56:06Run it to see that it works
🏃
56:06Run it to see that it works
🏃
56:06Run it to see that it works
🏃
56:41Further test our notation
56:41Further test our notation
56:41Further test our notation
57:00Run it to see that it works
🏃
57:00Run it to see that it works
🏃
57:00Run it to see that it works
🏃
57:42Enable parse_instr() to handle the label-based store instruction
57:42Enable parse_instr() to handle the label-based store instruction
57:42Enable parse_instr() to handle the label-based store instruction
59:44Test a label-based store
59:44Test a label-based store
59:44Test a label-based store
1:00:13Run it to see that it works
🏃
1:00:13Run it to see that it works
🏃
1:00:13Run it to see that it works
🏃
1:00:31rygorous Looking SPARC-y now! Well, halfway between SPARC and ARM. (This is why MIPS has the "at" register, "assembler temporary")
🗪
1:00:31rygorous Looking SPARC-y now! Well, halfway between SPARC and ARM. (This is why MIPS has the "at" register, "assembler temporary")
🗪
1:00:31rygorous Looking SPARC-y now! Well, halfway between SPARC and ARM. (This is why MIPS has the "at" register, "assembler temporary")
🗪
1:01:57Enable parse_instr() to handle branches,3 introducing parse_label()
1:01:57Enable parse_instr() to handle branches,3 introducing parse_label()
1:01:57Enable parse_instr() to handle branches,3 introducing parse_label()
1:07:26Enable parse_instr() to handle jump and link, introducing cmd_jmp()
1:07:26Enable parse_instr() to handle jump and link, introducing cmd_jmp()
1:07:26Enable parse_instr() to handle jump and link, introducing cmd_jmp()
1:12:27Test branching and jumping
1:12:27Test branching and jumping
1:12:27Test branching and jumping
1:13:15Enable scan_int() to handle negative numbers
1:13:15Enable scan_int() to handle negative numbers
1:13:15Enable scan_int() to handle negative numbers
1:15:23Run it to see that it all works
🏃
1:15:23Run it to see that it all works
🏃
1:15:23Run it to see that it all works
🏃
1:16:17Test the j instruction
1:16:17Test the j instruction
1:16:17Test the j instruction
1:16:41Run it and hit a "Jump target is out of range" error
🏃
1:16:41Run it and hit a "Jump target is out of range" error
🏃
1:16:41Run it and hit a "Jump target is out of range" error
🏃
1:18:16Fix cmd_jump() to use the offset
1:18:16Fix cmd_jump() to use the offset
1:18:16Fix cmd_jump() to use the offset
1:18:23Run it to see that it works
🏃
1:18:23Run it to see that it works
🏃
1:18:23Run it to see that it works
🏃
1:18:30Rewrite the asm test to perform the check after one iteration
1:18:30Rewrite the asm test to perform the check after one iteration
1:18:30Rewrite the asm test to perform the check after one iteration
1:19:53Run it to see that it works
🏃
1:19:53Run it to see that it works
🏃
1:19:53Run it to see that it works
🏃
1:20:25elavid But you know statically that the first check will go the loop since you just loaded x1 and x2
🗪
1:20:25elavid But you know statically that the first check will go the loop since you just loaded x1 and x2
🗪
1:20:25elavid But you know statically that the first check will go the loop since you just loaded x1 and x2
🗪
1:20:42Try an addi based on user input
1:20:42Try an addi based on user input
1:20:42Try an addi based on user input
1:23:26Run it to see that it works
🏃
1:23:26Run it to see that it works
🏃
1:23:26Run it to see that it works
🏃
1:24:47Enable parse_instr() to handle the jalr instruction
1:24:47Enable parse_instr() to handle the jalr instruction
1:24:47Enable parse_instr() to handle the jalr instruction
1:28:37Introduce cmd_jmp_reg(), cmd_call() and cmd_ret() to handle the jr, call and ret instructions4
1:28:37Introduce cmd_jmp_reg(), cmd_call() and cmd_ret() to handle the jr, call and ret instructions4
1:28:37Introduce cmd_jmp_reg(), cmd_call() and cmd_ret() to handle the jr, call and ret instructions4
1:34:47jgomes83 pervognsen Line 985: && instead of <=
🗪
1:34:47jgomes83 pervognsen Line 985: && instead of <=
🗪
1:34:47jgomes83 pervognsen Line 985: && instead of <=
🗪
1:34:55Finish implementing cmd_ret()
1:34:55Finish implementing cmd_ret()
1:34:55Finish implementing cmd_ret()
1:35:38Test our call and return capabilities, doing a mul routine
1:35:38Test our call and return capabilities, doing a mul routine
1:35:38Test our call and return capabilities, doing a mul routine
1:38:49Run it and hit an "Expected name, got newline" error
🏃
1:38:49Run it and hit an "Expected name, got newline" error
🏃
1:38:49Run it and hit an "Expected name, got newline" error
🏃
1:40:05Remove a comment from our test asm
1:40:05Remove a comment from our test asm
1:40:05Remove a comment from our test asm
1:40:11Run it to determine that there's a lexer bug in comment parsing
🏃
1:40:11Run it to determine that there's a lexer bug in comment parsing
🏃
1:40:11Run it to determine that there's a lexer bug in comment parsing
🏃
1:40:20Test multiplication of user-input values
1:40:20Test multiplication of user-input values
1:40:20Test multiplication of user-input values
1:41:39Run it and try our user-input multiplication
🏃
1:41:39Run it and try our user-input multiplication
🏃
1:41:39Run it and try our user-input multiplication
🏃
1:44:49Enable parse_instr() to handle lui (load upper immediate)
1:44:49Enable parse_instr() to handle lui (load upper immediate)
1:44:49Enable parse_instr() to handle lui (load upper immediate)
1:45:32Run it to see that it works
🏃
1:45:32Run it to see that it works
🏃
1:45:32Run it to see that it works
🏃
1:46:14Q&A
🗩
1:46:14Q&A
🗩
1:46:14Q&A
🗩
1:46:49Reflect on our assembler, with a glimpse into the future of supporting constant expressions and local labels
🗩
1:46:49Reflect on our assembler, with a glimpse into the future of supporting constant expressions and local labels
🗩
1:46:49Reflect on our assembler, with a glimpse into the future of supporting constant expressions and local labels
🗩
1:51:32That's it for today
🗩
1:51:32That's it for today
🗩
1:51:32That's it for today
🗩