#undef CONFIG_SINGLETASK
#define CONFIG_BANKS 2
+#define CONFIG_CALL_R2L /* Runtime stacks arguments backwards */
+
/* For now used BANK_FIXED as we don't yet have sane swap with 16K maps */
#define CONFIG_BANK_FIXED
#define MAX_MAPS 2
{
staticfast inoptr ino, emu_ino;
staticfast unsigned char *buf;
- staticfast blkno_t blk;
char **nargv; /* In user space */
char **nenvp; /* In user space */
staticfast struct s_argblk *abuf, *ebuf;
brelse(ebuf);
// Shove argc and the address of argv just below envp
+#ifdef CONFIG_CALL_R2L /* Arguments are stacked the 'wrong' way around */
uputw((uint16_t) nargv, nenvp - 1);
uputw((uint16_t) argc, nenvp - 2);
+#else
+ uputw((uint16_t) nargv, nenvp - 1);
+ uputw((uint16_t) argc, nenvp - 2);
+#endif
// Set stack pointer for the program
udata.u_isp = nenvp - 2;