1
0
mirror of https://gitlab.os-k.eu/os-k-team/kvisc.git synced 2023-08-25 14:05:46 +02:00
kvisc/vm/in/STRING

31 lines
753 B
Plaintext
Raw Normal View History

2019-06-23 12:40:18 +02:00
# The OS/K Team licenses this file to you under the MIT license.
# See the LICENSE file in the project root for more information.
#---------------------------------------------------------------------------#
# String manipulation instructions #
#---------------------------------------------------------------------------#
#
# Scan string for a particular value (SCASx)
#
2019-08-14 20:23:05 +02:00
# WHILE RCX > 0 DO
# RCX = RCX - 1
2019-06-23 12:40:18 +02:00
#
2019-08-14 20:23:05 +02:00
# IF ([%1] == 0) OR ([%1] == $2) THEN
# BREAK
# ELSE
# %1 = %1 + sizeof(x)
2019-06-23 12:40:18 +02:00
# FI
2019-08-14 20:23:05 +02:00
# DONE
2019-06-23 12:40:18 +02:00
#
#
2019-08-14 20:23:05 +02:00
# Note: Does not move past the value when found
2019-06-23 12:40:18 +02:00
#
2019-08-03 17:41:44 +02:00
scasb 2
scasw 2
scasd 2
scasq 2
2019-06-23 12:40:18 +02:00
#---------------------------------------------------------------------------#