From f86f602b9ed5c92add87e32fabae748f235f458f Mon Sep 17 00:00:00 2001 From: Kugel Fuhr <98353208+kugelfuhr@users.noreply.github.com> Date: Mon, 14 Jul 2025 16:45:42 +0200 Subject: [PATCH] Add a description for --memory-model to the docs. --- doc/cc65.sgml | 22 ++++++++++++++++++++++ src/cc65/main.c | 8 ++++++++ 2 files changed, 30 insertions(+) diff --git a/doc/cc65.sgml b/doc/cc65.sgml index 0fa43a906..6acf023da 100644 --- a/doc/cc65.sgml +++ b/doc/cc65.sgml @@ -514,6 +514,28 @@ Here is a description of all the command line options: name="#pragma local-strings"> for fine grained control. + -mm model, --memory-model model + + This option sets the code and data models for the compiler to use. Please + note that memory models are an unfinished feature and using this option + with any other memory model than + + + -o name Specify the name of the output file. If you don't specify a name, the diff --git a/src/cc65/main.c b/src/cc65/main.c index 5fc6ea343..692288a91 100644 --- a/src/cc65/main.c +++ b/src/cc65/main.c @@ -1089,6 +1089,14 @@ int main (int argc, char* argv[]) OptSignedChars (Arg, 0); break; + case 'm': + if (Arg[2] == 'm') { + OptMemoryModel (Arg, GetArg (&I, 3)); + } else { + UnknownOption (Arg); + } + break; + case 'o': SetOutputName (GetArg (&I, 2)); break;