diff options
author | tomsmeding <hallo@tomsmeding.nl> | 2015-12-18 22:17:16 +0100 |
---|---|---|
committer | tomsmeding <hallo@tomsmeding.nl> | 2015-12-18 22:17:16 +0100 |
commit | 534cd47f7488d7081d68c641b28a7c30c93643b9 (patch) | |
tree | 2975be410a08a33d8d37400808321c2b1ce146b8 /stdlib.rip | |
parent | 478f02ff10d152054abacb15750246083c560133 (diff) |
strcmp stdlib function
Diffstat (limited to 'stdlib.rip')
-rw-r--r-- | stdlib.rip | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -40,6 +40,21 @@ F<mkstr>[ P ] +0I[compares two strings; 0 = equal, >0, <0 = second string is greater, less than first; destructive] +F<strcmp>[ + 0 3r + <dup2>mW[ + D28pM 3R D28pM S 4r S s + DI[ + 4rPPP00 + 0 0I[to counter the P after the if] + ] + P + 28pqS28pqS + <dup2>m] + PP +] + 0I[initialises variable store at beginning of stack (no args) (CALL ONLY ONCE)] F<varinit>[ @@ -152,3 +167,9 @@ F<strsend>[ <strrev> DW[D28pM3RSwS28pqD]P ] + + +0I[A B -> A B A B] +F<dup2>[ + SD3RD3r +] |