Skip to content

[Nextor 3] Modify ZAP_ALL to skip drives assigned to device-based drivers#182

Merged
Konamiman merged 3 commits intov3.0from
nextor3/fix/zap-drives-on-device-based-drivers
Jan 29, 2026
Merged

[Nextor 3] Modify ZAP_ALL to skip drives assigned to device-based drivers#182
Konamiman merged 3 commits intov3.0from
nextor3/fix/zap-drives-on-device-based-drivers

Conversation

@Konamiman
Copy link
Owner

@Konamiman Konamiman commented Jan 29, 2026

"Backport" of #147

  • The semantics change from "when the drive is assigned to a device-based driver" to "when the drive is assigned to a Nextor driver" since device-based is the only type of driver supported by Nextor 3.
  • Also fixes a bug in the original implementation: UD_FLAGS was being checked instead of UD_DFLAGS, and DE was being used instead of HL.

Part of #164

@Konamiman Konamiman added this to the v3.0.0 alpha 1 milestone Jan 29, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 29, 2026

📝 Walkthrough

Walkthrough

A conditional guard was added to the zap_all_loop routine to skip zapping units controlled by Nextor drivers by testing the UF_DBD bit in UD_DFLAGS, preserving subsequent UD_TIME handling while making zap conditional.

Changes

Cohort / File(s) Summary
Nextor Driver Guard
source/kernel/bank2/val.mac
Inserted conditional logic in zap_all_loop that reads UD_DFLAGS, tests the UF_DBD flag, and branches to skip zapping for units marked as controlled by Nextor drivers. UD_TIME handling unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A little rabbit hops with care,
I peek at flags and stop the snare,
If Nextor holds a unit tight,
I skip the zap and set things right,
Hooray for safe and gentle light!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: modifying ZAP_ALL to skip drives assigned to device-based drivers, with Nextor 3 context.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-project-automation github-project-automation bot moved this to Backlog in Nextor 3 Jan 29, 2026
@Konamiman Konamiman moved this from Backlog to In review in Nextor 3 Jan 29, 2026
@Konamiman Konamiman marked this pull request as ready for review January 29, 2026 10:49
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@source/kernel/bank2/val.mac`:
- Around line 2767-2773: The code incorrectly loads UD_DFLAGS into DE
(clobbering the unit descriptor) and then adds it to HL (which points into
UNIT_TAB); instead load the UD_DFLAGS offset into HL (not DE) and then add HL,DE
so DE still contains the unit descriptor address before testing the UF_DBD bit;
i.e. replace the instruction "ld de,UD_DFLAGS" with "ld hl,UD_DFLAGS" so the
subsequent "add hl,de" and "bit UF_DBD,(hl)" operate on the correct address and
DE is preserved for later code (references: UD_DFLAGS, UF_DBD, no_zap_unit).

@Konamiman Konamiman merged commit fa3f06c into v3.0 Jan 29, 2026
1 of 2 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in Nextor 3 Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant