Position -1 is the last character of a string

Position 0 is invalid, which matches with STRIN/STRRIN
returning 0 on failure.
This commit is contained in:
Rangi
2021-04-19 12:09:32 -04:00
committed by Eldred Habert
parent dc5b7802c8
commit cf2bbe6435
6 changed files with 29 additions and 26 deletions

View File

@@ -7,18 +7,19 @@ ENDM
xstrsub "ABC", 1, 1
xstrsub "ABC", 2, 1
xstrsub "ABC", 3, 1
xstrsub "ABC", -3, 1
xstrsub "ABC", -2, 1
xstrsub "ABC", -1, 1
xstrsub "ABC", 0, 1
xstrsub "ABC", 2
xstrsub "ABC", -1
xstrsub "ABC", 0
xstrsub "ABC", -2
xstrsub "ABC", 5
xstrsub "ABC", -5
xstrsub "ABC", 1, 2
xstrsub "ABC", 2, 2
xstrsub "ABC", 2, 32
xstrsub "ABC", 2, 300
xstrsub "ABC", -3, 300
xstrsub "ABC", -4, 300
xstrsub "ABC", 4, 0
xstrsub "ABC", 5, 0
xstrsub "ABC", 4, 1