Populate pr_Arguments on the fake struct Process - #89
Merged
Merged
Conversation
A0/D0 carry the command-line buffer at process entry, but real AmigaOS also exposes the same string later via struct Process's pr_Arguments field (RunCommand/CreateNewProc set both). volamos only ever set A0/D0, leaving pr_Arguments permanently NULL. Found running the real sidick/micropython Amiga port: its startup reads argv from pr_Arguments rather than A0/D0, so it always saw "no arguments" and fell back to its REPL even when a real script path was passed on the command line -- confirmed by cross-checking against vamos, which does populate this field. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CjVfTPHtTpowd7YqhcjXJW
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RunCommand/CreateNewProcentry convention, but never populatesstruct Process'spr_Argumentsfield — it stayed permanently NULL.sidick/micropythonAmiga port under volamos:micropython.standard script.pyalways dropped into the REPL instead of running the script, because that port's own startup code reads argv frompr_Argumentsrather than (only) A0/D0.amitools'Process.init_args()), which does set this field the same way — confirming this is a volamos gap, not a port bug.PR_ARGUMENTS_OFFSET(204, verified against NDK 3.2's<dos/dosextens.h>) and writespr_Arguments = args_addralongside the existing A0/D0 setup inRuntime::new.Test plan
cargo test— all 856 tests pass (one new regression test:pr_arguments_points_at_the_same_command_line_buffer_as_a0)micropython.standard WORK:examples/hello.pynow runs the script directly (previously always fell back to REPL,sys.argv == [])platform_info.pyandcatalog_lookup.pyexamples also run correctly with the fix🤖 Generated with Claude Code
https://claude.ai/code/session_01CjVfTPHtTpowd7YqhcjXJW