Dataset Viewer
Auto-converted to Parquet Duplicate
conversations
listlengths
2
2
[ { "from": "human", "value": "What helper should I use to implement an 8-bit SBC helper for a table-driven arithmetic opcode handler when adding a new handler, using the current source naming style?" }, { "from": "gpt", "value": "Compute the full-width result first, then derive the flag byte from...
[ { "from": "human", "value": "How do I encode `RET cc` from tokenized assembler operands when tightening error handling, keeping it small enough to drop into the existing C code?" }, { "from": "gpt", "value": "Decode the operand fields first, reject invalid combinations, then emit the opcode form...
[ { "from": "human", "value": "How would you test register name decoding without needing a full integration boot when writing a regression test, showing the core routine rather than a prose-only explanation?" }, { "from": "gpt", "value": "Write focused tests around the observable state changes, no...
[ { "from": "human", "value": "How can I push a return address in a 64K emulator memory map when porting the pattern to another opcode, including the guard checks that matter?" }, { "from": "gpt", "value": "Use a direct helper so the instruction handler does not duplicate byte handling.\n####\n```...
[ { "from": "human", "value": "How would you test filesystem bitmap helpers to catch byte-order regressions when reviewing a bug in similar code, making the state updates visible?" }, { "from": "gpt", "value": "Write focused tests around the observable state changes, not around incidental debug ou...
[ { "from": "human", "value": "How should I factor common logical flag handling without changing the visible behavior when replacing duplicated logic, using fixed-size buffers where the source does?" }, { "from": "gpt", "value": "Extract only the repeated rule and keep the call sites using the sam...
[ { "from": "human", "value": "Can you show handle writes to the floppy controller low DMA byte in an I/O port dispatcher when implementing the next instruction, preserving the existing return-value convention?" }, { "from": "gpt", "value": "Use a switch on the port number and update only the byte...
[ { "from": "human", "value": "How do I handle writes to the floppy controller low LBA byte in an I/O port dispatcher when checking a boundary case, without inventing a new API?" }, { "from": "gpt", "value": "Use a switch on the port number and update only the byte or field selected by that port.\...
[ { "from": "human", "value": "How can I read a little-endian word so stack operations stay little-endian when wiring it into the dispatch path, showing the minimal call-site pattern too?" }, { "from": "gpt", "value": "Use a direct helper so the instruction handler does not duplicate byte handling...
[ { "from": "human", "value": "What is a good way to copy a descriptor entry into the table for a small kernel descriptor table when keeping the code compatible with the current ABI, making it suitable for a low-level test?" }, { "from": "gpt", "value": "Reserve the standard descriptors and manage...
[ { "from": "human", "value": "How should I implement an 8-bit ADC helper that updates sign, zero, half-carry, overflow, and carry flags when adding a new handler, using the current source naming style?" }, { "from": "gpt", "value": "Compute the full-width result first, then derive the flag byte f...
[ { "from": "human", "value": "What helper should I use to test shell builtin lookup to catch byte-order regressions when tightening error handling, keeping it small enough to drop into the existing C code?" }, { "from": "gpt", "value": "Write focused tests around the observable state changes, not...
[ { "from": "human", "value": "How would you delete a chained file and clear its bitmap blocks using the existing bitmap and file table layout when writing a regression test, showing the core routine rather than a prose-only explanation?" }, { "from": "gpt", "value": "Walk the filesystem structure...
[ { "from": "human", "value": "How do I delete a chained file and clear its bitmap blocks while respecting the 4-byte block header when porting the pattern to another opcode, including the guard checks that matter?" }, { "from": "gpt", "value": "Walk the filesystem structures directly and fail ear...
[ { "from": "human", "value": "How would you implement an 8-bit SBC helper so compare and subtract use the same flag logic when reviewing a bug in similar code, making the state updates visible?" }, { "from": "gpt", "value": "Compute the full-width result first, then derive the flag byte from the ...
[ { "from": "human", "value": "What is a good way to fetch a 16-bit immediate in a 64K emulator memory map when replacing duplicated logic, using fixed-size buffers where the source does?" }, { "from": "gpt", "value": "Model it as a small routine that updates the program state in one place.\n####\...
[ { "from": "human", "value": "Can you show test register name decoding before changing the implementation when implementing the next instruction, preserving the existing return-value convention?" }, { "from": "gpt", "value": "Write focused tests around the observable state changes, not around inc...
[ { "from": "human", "value": "How can I create a file descriptor for an opened file without allocating large stack buffers when checking a boundary case, without inventing a new API?" }, { "from": "gpt", "value": "Walk the filesystem structures directly and fail early when a required block or des...
[ { "from": "human", "value": "Can you write encode `CALL nn` from tokenized assembler operands when wiring it into the dispatch path, showing the minimal call-site pattern too?" }, { "from": "gpt", "value": "Decode the operand fields first, reject invalid combinations, then emit the opcode formul...
[ { "from": "human", "value": "Can you show recognize IX and IY prefixes in a compact Z80 assembler when keeping the code compatible with the current ABI, making it suitable for a low-level test?" }, { "from": "gpt", "value": "Return the opcode field for recognized names and `-1` for invalid input...
[ { "from": "human", "value": "Can you write pop a return address for a Z80-style instruction decoder when adding a new handler, using the current source naming style?" }, { "from": "gpt", "value": "Follow the source style: decode, check, then emit or copy the bytes.\n####\n```c\nstatic inline uin...
[ { "from": "human", "value": "How should I write the OR logical operation for a Z80 emulator when tightening error handling, keeping it small enough to drop into the existing C code?" }, { "from": "gpt", "value": "Compute the byte result directly and rebuild only the flags this operation owns.\n#...
[ { "from": "human", "value": "What helper should I use to test register name decoding with a small assert-based harness when writing a regression test, showing the core routine rather than a prose-only explanation?" }, { "from": "gpt", "value": "Write focused tests around the observable state cha...
[ { "from": "human", "value": "How can I implement an 8-bit ADD helper without spreading flag formulas through the opcode switch when porting the pattern to another opcode, including the guard checks that matter?" }, { "from": "gpt", "value": "Compute the full-width result first, then derive the f...
[ { "from": "human", "value": "What is a good way to implement an 8-bit SUB helper while preserving the undocumented X and Y flag bits from the result when reviewing a bug in similar code, making the state updates visible?" }, { "from": "gpt", "value": "Compute the full-width result first, then de...
[ { "from": "human", "value": "What helper should I use to read a little-endian word for a CPU loop that calls instruction handlers when replacing duplicated logic, using fixed-size buffers where the source does?" }, { "from": "gpt", "value": "Make the code path explicit and return an error as soo...
[ { "from": "human", "value": "How do I find a free filesystem block in a tiny block-based filesystem when implementing the next instruction, preserving the existing return-value convention?" }, { "from": "gpt", "value": "Walk the filesystem structures directly and fail early when a required block...
[ { "from": "human", "value": "How can I implement an 8-bit SUB helper for a table-driven arithmetic opcode handler when checking a boundary case, without inventing a new API?" }, { "from": "gpt", "value": "Compute the full-width result first, then derive the flag byte from the truncated result.\n...
[ { "from": "human", "value": "What is a good way to test relative branch encoding bounds around the edge cases in the source when wiring it into the dispatch path, showing the minimal call-site pattern too?" }, { "from": "gpt", "value": "Write focused tests around the observable state changes, no...
[ { "from": "human", "value": "Can you write append data across chained filesystem blocks while respecting the 4-byte block header when keeping the code compatible with the current ABI, making it suitable for a low-level test?" }, { "from": "gpt", "value": "Walk the filesystem structures directly ...
[ { "from": "human", "value": "How would you test descriptor allocation skips standard fds with a small assert-based harness when adding a new handler, using the current source naming style?" }, { "from": "gpt", "value": "Write focused tests around the observable state changes, not around incident...
[ { "from": "human", "value": "What helper should I use to look up a file entry by fixed-length name so the descriptor position remains consistent when tightening error handling, keeping it small enough to drop into the existing C code?" }, { "from": "gpt", "value": "Walk the filesystem structures...
[ { "from": "human", "value": "What is a good way to test descriptor allocation skips standard fds before changing the implementation when writing a regression test, showing the core routine rather than a prose-only explanation?" }, { "from": "gpt", "value": "Write focused tests around the observa...
[ { "from": "human", "value": "Can you show pop a return address for a CPU loop that calls instruction handlers when porting the pattern to another opcode, including the guard checks that matter?" }, { "from": "gpt", "value": "The safest version mirrors the source by checking bounds before touchin...
[ { "from": "human", "value": "How can I resolve a parenthesized label operand so labels receive the right program counter when reviewing a bug in similar code, making the state updates visible?" }, { "from": "gpt", "value": "Advance the program counter in both passes, but write bytes only during ...
[ { "from": "human", "value": "How should I test relative branch encoding bounds before changing the implementation when replacing duplicated logic, using fixed-size buffers where the source does?" }, { "from": "gpt", "value": "Write focused tests around the observable state changes, not around in...
[ { "from": "human", "value": "What helper should I use to find a free filesystem block and persist the root, bitmap, and file entries afterward when implementing the next instruction, preserving the existing return-value convention?" }, { "from": "gpt", "value": "Walk the filesystem structures di...
[ { "from": "human", "value": "How can I implement an 8-bit SBC helper while preserving the undocumented X and Y flag bits from the result when checking a boundary case, without inventing a new API?" }, { "from": "gpt", "value": "Compute the full-width result first, then derive the flag byte from ...
[ { "from": "human", "value": "How would you push a return address for a Z80-style instruction decoder when wiring it into the dispatch path, showing the minimal call-site pattern too?" }, { "from": "gpt", "value": "Treat the encoded byte sequence as the contract and emit it in that order.\n####\n...
[ { "from": "human", "value": "How can I test register name decoding around the edge cases in the source when keeping the code compatible with the current ABI, making it suitable for a low-level test?" }, { "from": "gpt", "value": "Write focused tests around the observable state changes, not aroun...
[ { "from": "human", "value": "How can I print an integer as uppercase hexadecimal in a small userland or kernel console when adding a new handler, using the current source naming style?" }, { "from": "gpt", "value": "Use fixed buffers and explicit limits, then terminate strings before dispatch or...
[ { "from": "human", "value": "Can you write create a file descriptor for an opened file and persist the root, bitmap, and file entries afterward when tightening error handling, keeping it small enough to drop into the existing C code?" }, { "from": "gpt", "value": "Walk the filesystem structures ...
[ { "from": "human", "value": "How do I replace repeated byte-pair register writes with a helper without changing the visible behavior when writing a regression test, showing the core routine rather than a prose-only explanation?" }, { "from": "gpt", "value": "Extract only the repeated rule and ke...
[ { "from": "human", "value": "What helper should I use to pop a return address in a 64K emulator memory map when porting the pattern to another opcode, including the guard checks that matter?" }, { "from": "gpt", "value": "Make the code path explicit and return an error as soon as validation fail...
[ { "from": "human", "value": "How can I find a free filesystem block so the descriptor position remains consistent when reviewing a bug in similar code, making the state updates visible?" }, { "from": "gpt", "value": "Walk the filesystem structures directly and fail early when a required block or...
[ { "from": "human", "value": "What is a good way to copy bytes out of chained filesystem blocks in a tiny block-based filesystem when replacing duplicated logic, using fixed-size buffers where the source does?" }, { "from": "gpt", "value": "Walk the filesystem structures directly and fail early w...
[ { "from": "human", "value": "How do I test shell builtin lookup without needing a full integration boot when implementing the next instruction, preserving the existing return-value convention?" }, { "from": "gpt", "value": "Write focused tests around the observable state changes, not around inci...
[ { "from": "human", "value": "Can you write test shell builtin lookup with a small assert-based harness when checking a boundary case, without inventing a new API?" }, { "from": "gpt", "value": "Write focused tests around the observable state changes, not around incidental debug output.\n####\n``...
[ { "from": "human", "value": "What is a good way to resolve a direct label operand before code generation so labels receive the right program counter when wiring it into the dispatch path, showing the minimal call-site pattern too?" }, { "from": "gpt", "value": "Advance the program counter in bot...
[ { "from": "human", "value": "What helper should I use to fetch the next opcode byte while keeping the program counter accurate when keeping the code compatible with the current ABI, making it suitable for a low-level test?" }, { "from": "gpt", "value": "Make the code path explicit and return an ...
[ { "from": "human", "value": "How should I test filesystem bitmap helpers without needing a full integration boot when adding a new handler, using the current source naming style?" }, { "from": "gpt", "value": "Write focused tests around the observable state changes, not around incidental debug o...
[ { "from": "human", "value": "What helper should I use to resolve a direct label operand before code generation before encoding jump and load operands when tightening error handling, keeping it small enough to drop into the existing C code?" }, { "from": "gpt", "value": "Advance the program count...
[ { "from": "human", "value": "How can I test relative branch encoding bounds with a small assert-based harness when writing a regression test, showing the core routine rather than a prose-only explanation?" }, { "from": "gpt", "value": "Write focused tests around the observable state changes, not...
[ { "from": "human", "value": "What helper should I use to fetch a 16-bit immediate for a Z80-style instruction decoder when porting the pattern to another opcode, including the guard checks that matter?" }, { "from": "gpt", "value": "Make the code path explicit and return an error as soon as vali...
[ { "from": "human", "value": "What is a good way to implement an 8-bit ADC helper for a table-driven arithmetic opcode handler when reviewing a bug in similar code, making the state updates visible?" }, { "from": "gpt", "value": "Compute the full-width result first, then derive the flag byte from...
[ { "from": "human", "value": "Can you show write the AND logical operation while clearing the carry-related flags correctly when replacing duplicated logic, using fixed-size buffers where the source does?" }, { "from": "gpt", "value": "Compute the byte result directly and rebuild only the flags t...
[ { "from": "human", "value": "How do I test filesystem bitmap helpers with a small assert-based harness when implementing the next instruction, preserving the existing return-value convention?" }, { "from": "gpt", "value": "Write focused tests around the observable state changes, not around incid...
[ { "from": "human", "value": "How do I map 8-bit register names to opcode fields in a compact Z80 assembler when checking a boundary case, without inventing a new API?" }, { "from": "gpt", "value": "Return the opcode field for recognized names and `-1` for invalid input.\n####\n```c\nint reg8(cha...
[ { "from": "human", "value": "What is a good way to implement an 8-bit SBC helper that updates sign, zero, half-carry, overflow, and carry flags when wiring it into the dispatch path, showing the minimal call-site pattern too?" }, { "from": "gpt", "value": "Compute the full-width result first, th...
[ { "from": "human", "value": "How can I test little-endian memory helpers without needing a full integration boot when keeping the code compatible with the current ABI, making it suitable for a low-level test?" }, { "from": "gpt", "value": "Write focused tests around the observable state changes,...
[ { "from": "human", "value": "Can you show create a file descriptor for an opened file in a tiny block-based filesystem when adding a new handler, using the current source naming style?" }, { "from": "gpt", "value": "Walk the filesystem structures directly and fail early when a required block or ...
[ { "from": "human", "value": "How can I handle writes to the floppy controller sector count in an I/O port dispatcher when tightening error handling, keeping it small enough to drop into the existing C code?" }, { "from": "gpt", "value": "Use a switch on the port number and update only the byte o...
[ { "from": "human", "value": "What helper should I use to implement an 8-bit ADC helper without spreading flag formulas through the opcode switch when writing a regression test, showing the core routine rather than a prose-only explanation?" }, { "from": "gpt", "value": "Compute the full-width re...
[ { "from": "human", "value": "Can you write implement an 8-bit SBC helper without spreading flag formulas through the opcode switch when porting the pattern to another opcode, including the guard checks that matter?" }, { "from": "gpt", "value": "Compute the full-width result first, then derive t...
[ { "from": "human", "value": "What is a good way to split assembler operand tokenization from encoding without changing the visible behavior when reviewing a bug in similar code, making the state updates visible?" }, { "from": "gpt", "value": "Extract only the repeated rule and keep the call site...
[ { "from": "human", "value": "What is a good way to test register name decoding to catch byte-order regressions when replacing duplicated logic, using fixed-size buffers where the source does?" }, { "from": "gpt", "value": "Write focused tests around the observable state changes, not around incid...
[ { "from": "human", "value": "How would you write a little-endian word for a CPU loop that calls instruction handlers when implementing the next instruction, preserving the existing return-value convention?" }, { "from": "gpt", "value": "Treat the encoded byte sequence as the contract and emit it...
[ { "from": "human", "value": "How do I write the AND logical operation for a Z80 emulator when checking a boundary case, without inventing a new API?" }, { "from": "gpt", "value": "Compute the byte result directly and rebuild only the flags this operation owns.\n####\n```c\nstatic inline uint8_t ...
[ { "from": "human", "value": "What is a good way to read a bounded kernel input line with backspace in a small userland or kernel console when wiring it into the dispatch path, showing the minimal call-site pattern too?" }, { "from": "gpt", "value": "Use fixed buffers and explicit limits, then te...
[ { "from": "human", "value": "How should I test little-endian memory helpers to catch byte-order regressions when keeping the code compatible with the current ABI, making it suitable for a low-level test?" }, { "from": "gpt", "value": "Write focused tests around the observable state changes, not ...
[ { "from": "human", "value": "What is a good way to fetch the next opcode byte without corrupting the ROM area when adding a new handler, using the current source naming style?" }, { "from": "gpt", "value": "Model it as a small routine that updates the program state in one place.\n####\n```c\nsta...
[ { "from": "human", "value": "Can you show emit a byte during the second assembler pass without writing object bytes during pass one when tightening error handling, keeping it small enough to drop into the existing C code?" }, { "from": "gpt", "value": "Advance the program counter in both passes,...
[ { "from": "human", "value": "How would you write a libc-style open wrapper around a three-argument syscall ABI when writing a regression test, showing the core routine rather than a prose-only explanation?" }, { "from": "gpt", "value": "Keep wrappers thin: pass the syscall number and cast pointe...
[ { "from": "human", "value": "Can you show fetch the next opcode byte in a 64K emulator memory map when porting the pattern to another opcode, including the guard checks that matter?" }, { "from": "gpt", "value": "The safest version mirrors the source by checking bounds before touching memory.\n#...
[ { "from": "human", "value": "Can you show write the OR logical operation with parity, sign, and zero flag updates when reviewing a bug in similar code, making the state updates visible?" }, { "from": "gpt", "value": "Compute the byte result directly and rebuild only the flags this operation owns...
[ { "from": "human", "value": "How do I transmit a byte through a serial ACIA while sharing state with an input thread when replacing duplicated logic, using fixed-size buffers where the source does?" }, { "from": "gpt", "value": "Protect shared serial state with the existing mutex and keep status...
[ { "from": "human", "value": "How can I encode `PUSH rr` from tokenized assembler operands when implementing the next instruction, preserving the existing return-value convention?" }, { "from": "gpt", "value": "Decode the operand fields first, reject invalid combinations, then emit the opcode for...
[ { "from": "human", "value": "Can you show close only non-reserved descriptors for a small kernel descriptor table when checking a boundary case, without inventing a new API?" }, { "from": "gpt", "value": "Reserve the standard descriptors and manage all later entries through the table helper.\n##...
[ { "from": "human", "value": "What helper should I use to encode `POP rr` from tokenized assembler operands when wiring it into the dispatch path, showing the minimal call-site pattern too?" }, { "from": "gpt", "value": "Decode the operand fields first, reject invalid combinations, then emit the ...
[ { "from": "human", "value": "What is a good way to look up a file entry by fixed-length name without allocating large stack buffers when keeping the code compatible with the current ABI, making it suitable for a low-level test?" }, { "from": "gpt", "value": "Walk the filesystem structures direct...
[ { "from": "human", "value": "What is a good way to encode `SUB r` from tokenized assembler operands when adding a new handler, using the current source naming style?" }, { "from": "gpt", "value": "Decode the operand fields first, reject invalid combinations, then emit the opcode formula used by ...
[ { "from": "human", "value": "How can I test shell builtin lookup before changing the implementation when tightening error handling, keeping it small enough to drop into the existing C code?" }, { "from": "gpt", "value": "Write focused tests around the observable state changes, not around inciden...
[ { "from": "human", "value": "What is a good way to write the AND logical operation as a reusable ALU routine when writing a regression test, showing the core routine rather than a prose-only explanation?" }, { "from": "gpt", "value": "Compute the byte result directly and rebuild only the flags t...
[ { "from": "human", "value": "How should I dispatch a shell builtin through a function table in a small userland or kernel console when porting the pattern to another opcode, including the guard checks that matter?" }, { "from": "gpt", "value": "Use fixed buffers and explicit limits, then termina...
[ { "from": "human", "value": "Can you write fetch a 16-bit immediate so stack operations stay little-endian when reviewing a bug in similar code, making the state updates visible?" }, { "from": "gpt", "value": "Follow the source style: decode, check, then emit or copy the bytes.\n####\n```c\nstat...
[ { "from": "human", "value": "Can you show implement an 8-bit SUB helper that updates sign, zero, half-carry, overflow, and carry flags when replacing duplicated logic, using fixed-size buffers where the source does?" }, { "from": "gpt", "value": "Compute the full-width result first, then derive ...
[ { "from": "human", "value": "Can you write push a return address while keeping the program counter accurate when implementing the next instruction, preserving the existing return-value convention?" }, { "from": "gpt", "value": "Follow the source style: decode, check, then emit or copy the bytes....
[ { "from": "human", "value": "How would you test shell builtin lookup around the edge cases in the source when checking a boundary case, without inventing a new API?" }, { "from": "gpt", "value": "Write focused tests around the observable state changes, not around incidental debug output.\n####\n...
[ { "from": "human", "value": "How can I test descriptor allocation skips standard fds to catch byte-order regressions when wiring it into the dispatch path, showing the minimal call-site pattern too?" }, { "from": "gpt", "value": "Write focused tests around the observable state changes, not aroun...
[ { "from": "human", "value": "What is a good way to read a little-endian word while keeping the program counter accurate when keeping the code compatible with the current ABI, making it suitable for a low-level test?" }, { "from": "gpt", "value": "Model it as a small routine that updates the prog...
[ { "from": "human", "value": "How can I emit a little-endian word before encoding jump and load operands when adding a new handler, using the current source naming style?" }, { "from": "gpt", "value": "Advance the program counter in both passes, but write bytes only during the code-generation pas...
[ { "from": "human", "value": "What helper should I use to push a return address without corrupting the ROM area when tightening error handling, keeping it small enough to drop into the existing C code?" }, { "from": "gpt", "value": "Make the code path explicit and return an error as soon as valid...
[ { "from": "human", "value": "How can I implement an 8-bit ADC helper so compare and subtract use the same flag logic when writing a regression test, showing the core routine rather than a prose-only explanation?" }, { "from": "gpt", "value": "Compute the full-width result first, then derive the ...
[ { "from": "human", "value": "What helper should I use to implement an 8-bit SUB helper so compare and subtract use the same flag logic when porting the pattern to another opcode, including the guard checks that matter?" }, { "from": "gpt", "value": "Compute the full-width result first, then deri...
[ { "from": "human", "value": "How can I resolve a direct label operand before code generation without writing object bytes during pass one when reviewing a bug in similar code, making the state updates visible?" }, { "from": "gpt", "value": "Advance the program counter in both passes, but write b...
[ { "from": "human", "value": "How do I test little-endian memory helpers before changing the implementation when replacing duplicated logic, using fixed-size buffers where the source does?" }, { "from": "gpt", "value": "Write focused tests around the observable state changes, not around incidenta...
[ { "from": "human", "value": "How can I append data across chained filesystem blocks in a tiny block-based filesystem when implementing the next instruction, preserving the existing return-value convention?" }, { "from": "gpt", "value": "Walk the filesystem structures directly and fail early when...
[ { "from": "human", "value": "How should I push a return address for a CPU loop that calls instruction handlers when checking a boundary case, without inventing a new API?" }, { "from": "gpt", "value": "Keep the helper small and make the state change explicit.\n####\n```c\nstatic inline void push...
[ { "from": "human", "value": "What is a good way to emit a little-endian word without writing object bytes during pass one when wiring it into the dispatch path, showing the minimal call-site pattern too?" }, { "from": "gpt", "value": "Advance the program counter in both passes, but write bytes o...
[ { "from": "human", "value": "What helper should I use to test relative branch encoding bounds without needing a full integration boot when keeping the code compatible with the current ABI, making it suitable for a low-level test?" }, { "from": "gpt", "value": "Write focused tests around the obse...
End of preview. Expand in Data Studio

Low level dataset v1

This dataset is made from low level code(C, x86 and z80 assembly). The code is from my personal Github.

Total number of rows: 4000

Downloads last month
50