@@ -489,6 +489,48 @@ ERRNO_OPT
489489 - 85
490490 -
491491
492+ ARGV
493+ ----
494+
495+ .. c:function:: int _argv (char *argv, int size)
496+
497+ |
498+
499+ The virtual _argv is called by C initialization to provide argc and argv for main().
500+ It returns an array of zero terminated string indexes followed by the strings.
501+ e.g. ["ABC", "DEF"] is 06 00 0A 00 00 00 41 42 43 00 44 45 46 00
502+ The returned data is guaranteed to be valid.
503+
504+ :Op code: RIA_OP_ARGV 0x08
505+ :C proto: (none)
506+ :returns: Size of argv data
507+ :errno: will not fail
508+
509+ EXEC
510+ ----
511+
512+ .. c:function:: int ria_execl (const char *path, ...)
513+ .. c:function:: int ria_execv (const char *path, char * const argv[])
514+ .. c:function:: int _exec (const char *argv, int size)
515+
516+ |
517+
518+ The virtual _exec is called by ria_execl() and ria_execv(). Be aware of the
519+ one difference from the execl() and execv() you may be used to. Because RAM
520+ is precious, the path is only supplied once, not again in argv[0]. The
521+ launched ROM will see argv[0] as the filename.
522+
523+ The data sent by _exec() will be checked for pointer safety and sanity, but
524+ will assume the path points to a loadable ROM file. If API_EINVAL is returned,
525+ the argv buffer is cleared so further attempts to _argv() will return an empty set.
526+ Is the ROM is invalid, the user will be left on the console with an error message.
527+
528+ :Op code: RIA_OP_ARGV 0x09
529+ :C proto: rp6502.h
530+ :returns: Size of argv data
531+ :errno: API_EINVAL
532+
533+
492534CLOCK
493535-----
494536
@@ -533,7 +575,7 @@ TZSET
533575-----
534576
535577.. c :function :: int void tzset (void);
536- .. c :function :: int f_tzset (struct _tzset *tz)
578+ .. c :function :: int _tzset (struct _tzset *tz)
537579
538580 .. code-block :: c
539581
@@ -545,8 +587,8 @@ TZSET
545587 char dstname[5]; /* Name when daylight true, e.g. CEST */
546588 };
547589
548- The virtual f_tzset () is the how tzset() is implemented . Use `help set tz ` on the
549- monitor to learn about configuring your time zone.
590+ The virtual _tzset () is called internally by tzset(). Use `help set tz ` on the
591+ console monitor to learn about configuring your time zone.
550592
551593 :Op code: RIA_OP_TZSET 0x0D
552594 :C proto: time.h
@@ -558,7 +600,7 @@ TZQUERY
558600-------
559601
560602.. c :function :: struct tm *localtime (const time_t *timep);
561- .. c:function:: int f_tzquery (uint32_t time, struct _tzquery *dst)
603+ .. c:function:: int _tzquery (uint32_t time, struct _tzquery *dst)
562604
563605 .. code-block :: c
564606
@@ -567,7 +609,7 @@ TZQUERY
567609 int8_t daylight; /* non 0 if daylight savings time active */
568610 };
569611
570- The virtual f_tzquery () is part of how localtime() is implemented .
612+ The virtual _tzquery () is called internally by localtime().
571613
572614 :Op code: RIA_OP_TZQUERY 0x0E
573615 :C proto: time.h
0 commit comments