Browse Source

* set the 6502 function return register to A

Nikolay Nikolov 1 month ago
parent
commit
eb8b1f7d0f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      compiler/mos6502/cpubase.pas

+ 2 - 2
compiler/mos6502/cpubase.pas

@@ -220,8 +220,8 @@ unit cpubase;
       }
       NR_PIC_OFFSET_REG = NR_INVALID;
       { Results are returned in this register (32-bit values) }
-      NR_FUNCTION_RETURN_REG = NR_INVALID;
-      RS_FUNCTION_RETURN_REG = RS_INVALID;
+      NR_FUNCTION_RETURN_REG = NR_A;
+      RS_FUNCTION_RETURN_REG = RS_A;
       { Low part of 64bit return value }
       NR_FUNCTION_RETURN64_LOW_REG = NR_INVALID;
       RS_FUNCTION_RETURN64_LOW_REG = RS_INVALID;