conversations
listlengths
2
2
[ { "from": "human", "value": "How should I reason about a loop and bounds handling routine in bit-serial CPU emulator when the source example is `main`?" }, { "from": "gpt", "value": "`main` is a concrete example of a loop and bounds handling routine: it implements loop and bounds handling in the...
[ { "from": "human", "value": "How can I implement a loop and bounds handling helper without breaking nearby bit-serial CPU emulator code when the source example is `main`?" }, { "from": "gpt", "value": "Follow the existing ownership and state-update pattern instead of inventing a second path.\n##...
[ { "from": "human", "value": "What edge cases matter for loop and bounds handling code in a bit-serial CPU emulator when the source example is `main`?" }, { "from": "gpt", "value": "The important edge cases are the ones that stress bounds, ownership, and partial progress.\n####\nIn the source, `m...
[ { "from": "human", "value": "How should a loop and bounds handling routine fit into a larger bit-serial CPU emulator subsystem when the source example is `main`?" }, { "from": "gpt", "value": "It should expose one clear behavior and leave unrelated policy to the surrounding subsystem.\n####\nThe...
[ { "from": "human", "value": "How should I reason about a systems-programming control flow routine in Z80 emulator when the source example is `set_af`?" }, { "from": "gpt", "value": "`set_af` is a concrete example of a systems-programming control flow routine: it implements systems-programming co...
[ { "from": "human", "value": "How can I implement a systems-programming control flow helper without breaking nearby Z80 emulator code when the source example is `set_af`?" }, { "from": "gpt", "value": "Follow the existing ownership and state-update pattern instead of inventing a second path.\n###...
[ { "from": "human", "value": "Why can bugs appear in systems-programming control flow code when state is updated in the wrong order and the source example is `set_af`?" }, { "from": "gpt", "value": "These bugs usually happen when bookkeeping changes are separated from the operation they describe....
[ { "from": "human", "value": "How should I test a systems-programming control flow routine in low-level C code when the source example is `set_af`?" }, { "from": "gpt", "value": "Test the normal path, the boundary path, and the failure path with observable state before and after each call.\n####\...
[ { "from": "human", "value": "How can I refactor systems-programming control flow code while keeping behavior stable when the source example is `set_af`?" }, { "from": "gpt", "value": "Separate decoding, validation, state mutation, and reporting only where the source already shows a useful bounda...
[ { "from": "human", "value": "How should another module call into a systems-programming control flow function safely when the source example is `set_af`?" }, { "from": "gpt", "value": "Call it only after preparing the state it expects and be ready for its existing failure convention.\n####\nThe r...
[ { "from": "human", "value": "What edge cases matter for systems-programming control flow code in a Z80 emulator when the source example is `set_af`?" }, { "from": "gpt", "value": "The important edge cases are the ones that stress bounds, ownership, and partial progress.\n####\nIn the source, `se...
[ { "from": "human", "value": "What small code pattern helps keep a systems-programming control flow operation easy to audit when the source example is `set_af`?" }, { "from": "gpt", "value": "Use a validate-then-mutate shape so all side effects are visible after the checks.\n####\nThe source arou...
[ { "from": "human", "value": "How do I diagnose a regression in a systems-programming control flow path when the source example is `set_af`?" }, { "from": "gpt", "value": "Trace the inputs, the derived values, and the exact state writes in execution order.\n####\n`set_af` gives a concrete path to...
[ { "from": "human", "value": "How should a systems-programming control flow routine fit into a larger Z80 emulator subsystem when the source example is `set_af`?" }, { "from": "gpt", "value": "It should expose one clear behavior and leave unrelated policy to the surrounding subsystem.\n####\nThe ...
[ { "from": "human", "value": "What should failure handling look like in systems-programming control flow code when the source example is `set_af`?" }, { "from": "gpt", "value": "Failure handling should leave shared state either unchanged or deliberately marked as failed.\n####\nA grounded source ...
[ { "from": "human", "value": "How do I avoid off-by-one and bounds errors in systems-programming control flow code when the source example is `set_af`?" }, { "from": "gpt", "value": "Compute limits once, check them before memory access, and advance cursors in one consistent place.\n####\nThe sour...
[ { "from": "human", "value": "How should I reason about a systems-programming control flow routine in Z80 emulator when the source example is `set_bc`?" }, { "from": "gpt", "value": "`set_bc` is a concrete example of a systems-programming control flow routine: it implements systems-programming co...
[ { "from": "human", "value": "How can I implement a systems-programming control flow helper without breaking nearby Z80 emulator code when the source example is `set_bc`?" }, { "from": "gpt", "value": "Follow the existing ownership and state-update pattern instead of inventing a second path.\n###...
[ { "from": "human", "value": "Why can bugs appear in systems-programming control flow code when state is updated in the wrong order and the source example is `set_bc`?" }, { "from": "gpt", "value": "These bugs usually happen when bookkeeping changes are separated from the operation they describe....
[ { "from": "human", "value": "How should I test a systems-programming control flow routine in low-level C code when the source example is `set_bc`?" }, { "from": "gpt", "value": "Test the normal path, the boundary path, and the failure path with observable state before and after each call.\n####\...
[ { "from": "human", "value": "How can I refactor systems-programming control flow code while keeping behavior stable when the source example is `set_bc`?" }, { "from": "gpt", "value": "Separate decoding, validation, state mutation, and reporting only where the source already shows a useful bounda...
[ { "from": "human", "value": "How should another module call into a systems-programming control flow function safely when the source example is `set_bc`?" }, { "from": "gpt", "value": "Call it only after preparing the state it expects and be ready for its existing failure convention.\n####\nThe r...
[ { "from": "human", "value": "What edge cases matter for systems-programming control flow code in a Z80 emulator when the source example is `set_bc`?" }, { "from": "gpt", "value": "The important edge cases are the ones that stress bounds, ownership, and partial progress.\n####\nIn the source, `se...
[ { "from": "human", "value": "What small code pattern helps keep a systems-programming control flow operation easy to audit when the source example is `set_bc`?" }, { "from": "gpt", "value": "Use a validate-then-mutate shape so all side effects are visible after the checks.\n####\nThe source arou...
[ { "from": "human", "value": "How do I diagnose a regression in a systems-programming control flow path when the source example is `set_bc`?" }, { "from": "gpt", "value": "Trace the inputs, the derived values, and the exact state writes in execution order.\n####\n`set_bc` gives a concrete path to...
[ { "from": "human", "value": "How should a systems-programming control flow routine fit into a larger Z80 emulator subsystem when the source example is `set_bc`?" }, { "from": "gpt", "value": "It should expose one clear behavior and leave unrelated policy to the surrounding subsystem.\n####\nThe ...
[ { "from": "human", "value": "What should failure handling look like in systems-programming control flow code when the source example is `set_bc`?" }, { "from": "gpt", "value": "Failure handling should leave shared state either unchanged or deliberately marked as failed.\n####\nA grounded source ...
[ { "from": "human", "value": "How do I avoid off-by-one and bounds errors in systems-programming control flow code when the source example is `set_bc`?" }, { "from": "gpt", "value": "Compute limits once, check them before memory access, and advance cursors in one consistent place.\n####\nThe sour...
[ { "from": "human", "value": "How should I reason about a systems-programming control flow routine in Z80 emulator when the source example is `set_de`?" }, { "from": "gpt", "value": "`set_de` is a concrete example of a systems-programming control flow routine: it implements systems-programming co...
[ { "from": "human", "value": "How can I implement a systems-programming control flow helper without breaking nearby Z80 emulator code when the source example is `set_de`?" }, { "from": "gpt", "value": "Follow the existing ownership and state-update pattern instead of inventing a second path.\n###...
[ { "from": "human", "value": "Why can bugs appear in systems-programming control flow code when state is updated in the wrong order and the source example is `set_de`?" }, { "from": "gpt", "value": "These bugs usually happen when bookkeeping changes are separated from the operation they describe....
[ { "from": "human", "value": "How should I test a systems-programming control flow routine in low-level C code when the source example is `set_de`?" }, { "from": "gpt", "value": "Test the normal path, the boundary path, and the failure path with observable state before and after each call.\n####\...
[ { "from": "human", "value": "How can I refactor systems-programming control flow code while keeping behavior stable when the source example is `set_de`?" }, { "from": "gpt", "value": "Separate decoding, validation, state mutation, and reporting only where the source already shows a useful bounda...
[ { "from": "human", "value": "How should another module call into a systems-programming control flow function safely when the source example is `set_de`?" }, { "from": "gpt", "value": "Call it only after preparing the state it expects and be ready for its existing failure convention.\n####\nThe r...
[ { "from": "human", "value": "What edge cases matter for systems-programming control flow code in a Z80 emulator when the source example is `set_de`?" }, { "from": "gpt", "value": "The important edge cases are the ones that stress bounds, ownership, and partial progress.\n####\nIn the source, `se...
[ { "from": "human", "value": "What small code pattern helps keep a systems-programming control flow operation easy to audit when the source example is `set_de`?" }, { "from": "gpt", "value": "Use a validate-then-mutate shape so all side effects are visible after the checks.\n####\nThe source arou...
[ { "from": "human", "value": "How do I diagnose a regression in a systems-programming control flow path when the source example is `set_de`?" }, { "from": "gpt", "value": "Trace the inputs, the derived values, and the exact state writes in execution order.\n####\n`set_de` gives a concrete path to...
[ { "from": "human", "value": "How should a systems-programming control flow routine fit into a larger Z80 emulator subsystem when the source example is `set_de`?" }, { "from": "gpt", "value": "It should expose one clear behavior and leave unrelated policy to the surrounding subsystem.\n####\nThe ...
[ { "from": "human", "value": "What should failure handling look like in systems-programming control flow code when the source example is `set_de`?" }, { "from": "gpt", "value": "Failure handling should leave shared state either unchanged or deliberately marked as failed.\n####\nA grounded source ...
[ { "from": "human", "value": "How do I avoid off-by-one and bounds errors in systems-programming control flow code when the source example is `set_de`?" }, { "from": "gpt", "value": "Compute limits once, check them before memory access, and advance cursors in one consistent place.\n####\nThe sour...
[ { "from": "human", "value": "How should I reason about a systems-programming control flow routine in Z80 emulator when the source example is `set_hl`?" }, { "from": "gpt", "value": "`set_hl` is a concrete example of a systems-programming control flow routine: it implements systems-programming co...
[ { "from": "human", "value": "How can I implement a systems-programming control flow helper without breaking nearby Z80 emulator code when the source example is `set_hl`?" }, { "from": "gpt", "value": "Follow the existing ownership and state-update pattern instead of inventing a second path.\n###...
[ { "from": "human", "value": "Why can bugs appear in systems-programming control flow code when state is updated in the wrong order and the source example is `set_hl`?" }, { "from": "gpt", "value": "These bugs usually happen when bookkeeping changes are separated from the operation they describe....
[ { "from": "human", "value": "How should I test a systems-programming control flow routine in low-level C code when the source example is `set_hl`?" }, { "from": "gpt", "value": "Test the normal path, the boundary path, and the failure path with observable state before and after each call.\n####\...
[ { "from": "human", "value": "How can I refactor systems-programming control flow code while keeping behavior stable when the source example is `set_hl`?" }, { "from": "gpt", "value": "Separate decoding, validation, state mutation, and reporting only where the source already shows a useful bounda...
[ { "from": "human", "value": "How should another module call into a systems-programming control flow function safely when the source example is `set_hl`?" }, { "from": "gpt", "value": "Call it only after preparing the state it expects and be ready for its existing failure convention.\n####\nThe r...
[ { "from": "human", "value": "What edge cases matter for systems-programming control flow code in a Z80 emulator when the source example is `set_hl`?" }, { "from": "gpt", "value": "The important edge cases are the ones that stress bounds, ownership, and partial progress.\n####\nIn the source, `se...
[ { "from": "human", "value": "What small code pattern helps keep a systems-programming control flow operation easy to audit when the source example is `set_hl`?" }, { "from": "gpt", "value": "Use a validate-then-mutate shape so all side effects are visible after the checks.\n####\nThe source arou...
[ { "from": "human", "value": "How do I diagnose a regression in a systems-programming control flow path when the source example is `set_hl`?" }, { "from": "gpt", "value": "Trace the inputs, the derived values, and the exact state writes in execution order.\n####\n`set_hl` gives a concrete path to...
[ { "from": "human", "value": "How should a systems-programming control flow routine fit into a larger Z80 emulator subsystem when the source example is `set_hl`?" }, { "from": "gpt", "value": "It should expose one clear behavior and leave unrelated policy to the surrounding subsystem.\n####\nThe ...
[ { "from": "human", "value": "What should failure handling look like in systems-programming control flow code when the source example is `set_hl`?" }, { "from": "gpt", "value": "Failure handling should leave shared state either unchanged or deliberately marked as failed.\n####\nA grounded source ...
[ { "from": "human", "value": "How do I avoid off-by-one and bounds errors in systems-programming control flow code when the source example is `set_hl`?" }, { "from": "gpt", "value": "Compute limits once, check them before memory access, and advance cursors in one consistent place.\n####\nThe sour...
[ { "from": "human", "value": "How should I reason about a parsing and code generation routine in Z80 emulator when the source example is `get_index_addr`?" }, { "from": "gpt", "value": "`get_index_addr` is a concrete example of a parsing and code generation routine: it computes an instruction res...
[ { "from": "human", "value": "How can I implement a parsing and code generation helper without breaking nearby Z80 emulator code when the source example is `get_index_addr`?" }, { "from": "gpt", "value": "Follow the existing ownership and state-update pattern instead of inventing a second path.\n...
[ { "from": "human", "value": "Why can bugs appear in parsing and code generation code when state is updated in the wrong order and the source example is `get_index_addr`?" }, { "from": "gpt", "value": "These bugs usually happen when bookkeeping changes are separated from the operation they descri...
[ { "from": "human", "value": "How should I test a parsing and code generation routine in low-level C code when the source example is `get_index_addr`?" }, { "from": "gpt", "value": "Test the normal path, the boundary path, and the failure path with observable state before and after each call.\n##...
[ { "from": "human", "value": "How can I refactor parsing and code generation code while keeping behavior stable when the source example is `get_index_addr`?" }, { "from": "gpt", "value": "Separate decoding, validation, state mutation, and reporting only where the source already shows a useful bou...
[ { "from": "human", "value": "How should another module call into a parsing and code generation function safely when the source example is `get_index_addr`?" }, { "from": "gpt", "value": "Call it only after preparing the state it expects and be ready for its existing failure convention.\n####\nTh...
[ { "from": "human", "value": "What edge cases matter for parsing and code generation code in a Z80 emulator when the source example is `get_index_addr`?" }, { "from": "gpt", "value": "The important edge cases are the ones that stress bounds, ownership, and partial progress.\n####\nIn the source, ...
[ { "from": "human", "value": "What small code pattern helps keep a parsing and code generation operation easy to audit when the source example is `get_index_addr`?" }, { "from": "gpt", "value": "Use a validate-then-mutate shape so all side effects are visible after the checks.\n####\nThe source a...
[ { "from": "human", "value": "How do I diagnose a regression in a parsing and code generation path when the source example is `get_index_addr`?" }, { "from": "gpt", "value": "Trace the inputs, the derived values, and the exact state writes in execution order.\n####\n`get_index_addr` gives a concr...
[ { "from": "human", "value": "How should a parsing and code generation routine fit into a larger Z80 emulator subsystem when the source example is `get_index_addr`?" }, { "from": "gpt", "value": "It should expose one clear behavior and leave unrelated policy to the surrounding subsystem.\n####\nT...
[ { "from": "human", "value": "What should failure handling look like in parsing and code generation code when the source example is `get_index_addr`?" }, { "from": "gpt", "value": "Failure handling should leave shared state either unchanged or deliberately marked as failed.\n####\nA grounded sour...
[ { "from": "human", "value": "How do I avoid off-by-one and bounds errors in parsing and code generation code when the source example is `get_index_addr`?" }, { "from": "gpt", "value": "Compute limits once, check them before memory access, and advance cursors in one consistent place.\n####\nThe s...
[ { "from": "human", "value": "How should I reason about a systems-programming control flow routine in Z80 emulator when the source example is `set_high`?" }, { "from": "gpt", "value": "`set_high` is a concrete example of a systems-programming control flow routine: it implements systems-programmin...
[ { "from": "human", "value": "How can I implement a systems-programming control flow helper without breaking nearby Z80 emulator code when the source example is `set_high`?" }, { "from": "gpt", "value": "Follow the existing ownership and state-update pattern instead of inventing a second path.\n#...
[ { "from": "human", "value": "Why can bugs appear in systems-programming control flow code when state is updated in the wrong order and the source example is `set_high`?" }, { "from": "gpt", "value": "These bugs usually happen when bookkeeping changes are separated from the operation they describ...
[ { "from": "human", "value": "How should I test a systems-programming control flow routine in low-level C code when the source example is `set_high`?" }, { "from": "gpt", "value": "Test the normal path, the boundary path, and the failure path with observable state before and after each call.\n###...
[ { "from": "human", "value": "How can I refactor systems-programming control flow code while keeping behavior stable when the source example is `set_high`?" }, { "from": "gpt", "value": "Separate decoding, validation, state mutation, and reporting only where the source already shows a useful boun...
[ { "from": "human", "value": "How should another module call into a systems-programming control flow function safely when the source example is `set_high`?" }, { "from": "gpt", "value": "Call it only after preparing the state it expects and be ready for its existing failure convention.\n####\nThe...
[ { "from": "human", "value": "What edge cases matter for systems-programming control flow code in a Z80 emulator when the source example is `set_high`?" }, { "from": "gpt", "value": "The important edge cases are the ones that stress bounds, ownership, and partial progress.\n####\nIn the source, `...
[ { "from": "human", "value": "What small code pattern helps keep a systems-programming control flow operation easy to audit when the source example is `set_high`?" }, { "from": "gpt", "value": "Use a validate-then-mutate shape so all side effects are visible after the checks.\n####\nThe source ar...
[ { "from": "human", "value": "How do I diagnose a regression in a systems-programming control flow path when the source example is `set_high`?" }, { "from": "gpt", "value": "Trace the inputs, the derived values, and the exact state writes in execution order.\n####\n`set_high` gives a concrete pat...
[ { "from": "human", "value": "How should a systems-programming control flow routine fit into a larger Z80 emulator subsystem when the source example is `set_high`?" }, { "from": "gpt", "value": "It should expose one clear behavior and leave unrelated policy to the surrounding subsystem.\n####\nTh...
[ { "from": "human", "value": "What should failure handling look like in systems-programming control flow code when the source example is `set_high`?" }, { "from": "gpt", "value": "Failure handling should leave shared state either unchanged or deliberately marked as failed.\n####\nA grounded sourc...
[ { "from": "human", "value": "How do I avoid off-by-one and bounds errors in systems-programming control flow code when the source example is `set_high`?" }, { "from": "gpt", "value": "Compute limits once, check them before memory access, and advance cursors in one consistent place.\n####\nThe so...
[ { "from": "human", "value": "How should I reason about a systems-programming control flow routine in Z80 emulator when the source example is `set_low`?" }, { "from": "gpt", "value": "`set_low` is a concrete example of a systems-programming control flow routine: it implements systems-programming ...
[ { "from": "human", "value": "How can I implement a systems-programming control flow helper without breaking nearby Z80 emulator code when the source example is `set_low`?" }, { "from": "gpt", "value": "Follow the existing ownership and state-update pattern instead of inventing a second path.\n##...
[ { "from": "human", "value": "Why can bugs appear in systems-programming control flow code when state is updated in the wrong order and the source example is `set_low`?" }, { "from": "gpt", "value": "These bugs usually happen when bookkeeping changes are separated from the operation they describe...
[ { "from": "human", "value": "How should I test a systems-programming control flow routine in low-level C code when the source example is `set_low`?" }, { "from": "gpt", "value": "Test the normal path, the boundary path, and the failure path with observable state before and after each call.\n####...
[ { "from": "human", "value": "How can I refactor systems-programming control flow code while keeping behavior stable when the source example is `set_low`?" }, { "from": "gpt", "value": "Separate decoding, validation, state mutation, and reporting only where the source already shows a useful bound...
[ { "from": "human", "value": "How should another module call into a systems-programming control flow function safely when the source example is `set_low`?" }, { "from": "gpt", "value": "Call it only after preparing the state it expects and be ready for its existing failure convention.\n####\nThe ...
[ { "from": "human", "value": "What edge cases matter for systems-programming control flow code in a Z80 emulator when the source example is `set_low`?" }, { "from": "gpt", "value": "The important edge cases are the ones that stress bounds, ownership, and partial progress.\n####\nIn the source, `s...
[ { "from": "human", "value": "What small code pattern helps keep a systems-programming control flow operation easy to audit when the source example is `set_low`?" }, { "from": "gpt", "value": "Use a validate-then-mutate shape so all side effects are visible after the checks.\n####\nThe source aro...
[ { "from": "human", "value": "How do I diagnose a regression in a systems-programming control flow path when the source example is `set_low`?" }, { "from": "gpt", "value": "Trace the inputs, the derived values, and the exact state writes in execution order.\n####\n`set_low` gives a concrete path ...
[ { "from": "human", "value": "How should a systems-programming control flow routine fit into a larger Z80 emulator subsystem when the source example is `set_low`?" }, { "from": "gpt", "value": "It should expose one clear behavior and leave unrelated policy to the surrounding subsystem.\n####\nThe...
[ { "from": "human", "value": "What should failure handling look like in systems-programming control flow code when the source example is `set_low`?" }, { "from": "gpt", "value": "Failure handling should leave shared state either unchanged or deliberately marked as failed.\n####\nA grounded source...
[ { "from": "human", "value": "How do I avoid off-by-one and bounds errors in systems-programming control flow code when the source example is `set_low`?" }, { "from": "gpt", "value": "Compute limits once, check them before memory access, and advance cursors in one consistent place.\n####\nThe sou...
[ { "from": "human", "value": "How should I reason about a I/O and resource ownership routine in Z80 emulator when the source example is `mwrite8`?" }, { "from": "gpt", "value": "`mwrite8` is a concrete example of a I/O and resource ownership routine: it writes data through the Z80 emulator bounda...
[ { "from": "human", "value": "How can I implement a I/O and resource ownership helper without breaking nearby Z80 emulator code when the source example is `mwrite8`?" }, { "from": "gpt", "value": "Follow the existing ownership and state-update pattern instead of inventing a second path.\n####\nTh...
[ { "from": "human", "value": "Why can bugs appear in I/O and resource ownership code when state is updated in the wrong order and the source example is `mwrite8`?" }, { "from": "gpt", "value": "These bugs usually happen when bookkeeping changes are separated from the operation they describe.\n###...
[ { "from": "human", "value": "How should I test a I/O and resource ownership routine in low-level C code when the source example is `mwrite8`?" }, { "from": "gpt", "value": "Test the normal path, the boundary path, and the failure path with observable state before and after each call.\n####\nA so...
[ { "from": "human", "value": "How can I refactor I/O and resource ownership code while keeping behavior stable when the source example is `mwrite8`?" }, { "from": "gpt", "value": "Separate decoding, validation, state mutation, and reporting only where the source already shows a useful boundary.\n...
[ { "from": "human", "value": "How should another module call into a I/O and resource ownership function safely when the source example is `mwrite8`?" }, { "from": "gpt", "value": "Call it only after preparing the state it expects and be ready for its existing failure convention.\n####\nThe releva...
[ { "from": "human", "value": "What edge cases matter for I/O and resource ownership code in a Z80 emulator when the source example is `mwrite8`?" }, { "from": "gpt", "value": "The important edge cases are the ones that stress bounds, ownership, and partial progress.\n####\nIn the source, `mwrite8...
[ { "from": "human", "value": "What small code pattern helps keep a I/O and resource ownership operation easy to audit when the source example is `mwrite8`?" }, { "from": "gpt", "value": "Use a validate-then-mutate shape so all side effects are visible after the checks.\n####\nThe source around `m...
[ { "from": "human", "value": "How do I diagnose a regression in a I/O and resource ownership path when the source example is `mwrite8`?" }, { "from": "gpt", "value": "Trace the inputs, the derived values, and the exact state writes in execution order.\n####\n`mwrite8` gives a concrete path to ins...
[ { "from": "human", "value": "How should a I/O and resource ownership routine fit into a larger Z80 emulator subsystem when the source example is `mwrite8`?" }, { "from": "gpt", "value": "It should expose one clear behavior and leave unrelated policy to the surrounding subsystem.\n####\nThe sourc...
[ { "from": "human", "value": "What should failure handling look like in I/O and resource ownership code when the source example is `mwrite8`?" }, { "from": "gpt", "value": "Failure handling should leave shared state either unchanged or deliberately marked as failed.\n####\nA grounded source examp...
[ { "from": "human", "value": "How do I avoid off-by-one and bounds errors in I/O and resource ownership code when the source example is `mwrite8`?" }, { "from": "gpt", "value": "Compute limits once, check them before memory access, and advance cursors in one consistent place.\n####\nThe source ex...