Added random number generator to VVS stdlib.
authorAaron Taylor <ataylor@subgeniuskitty.com>
Sat, 13 Jul 2019 02:01:31 +0000 (19:01 -0700)
committerAaron Taylor <ataylor@subgeniuskitty.com>
Sat, 13 Jul 2019 02:01:31 +0000 (19:01 -0700)
stdlib/README.md
stdlib/math.pvvs

index 3bff980..ee4670b 100644 (file)
@@ -31,6 +31,7 @@ header comment for each function to learn the call and return stack.
            1001 ----- print string from heap        (stdio.pvvs)
            1010 ----- print number from stack       (stdio.pvvs)
          010xxx - math functions
            1001 ----- print string from heap        (stdio.pvvs)
            1010 ----- print number from stack       (stdio.pvvs)
          010xxx - math functions
+          10000 ----- random                        (math.pvvs)
           10001 ----- absolute value                (math.pvvs)
          011xxx - unassigned
          100xxx - unassigned
           10001 ----- absolute value                (math.pvvs)
          011xxx - unassigned
          100xxx - unassigned
index b1a6c0e..0df09ed 100644 (file)
@@ -1,6 +1,18 @@
 #ifndef VVS_STDLIB_MATH
 #define VVS_STDLIB_MATH
 
 #ifndef VVS_STDLIB_MATH
 #define VVS_STDLIB_MATH
 
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+@ Description:
+@   This function returns a random IEEE-vetted number per RFC 1149.5.
+@ Call Stack:
+@   empty
+@ Return Stack:
+@   random number  <-- TOS
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+NSSVTSSSSN              | Mark: 10000 (random)
+SSSTSSN                 | PUSH +4
+NTN                     | RTS
+
 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 @ Description:
 @   This function returns the absolute value of its argument
 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 @ Description:
 @   This function returns the absolute value of its argument