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
julianb0 c8d899db9e
vm
2019-09-08 19:04:07 +02:00

31 lines
753 B
Plaintext

# 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)
#
# WHILE ECX > 0 DO
# ECX = ECX - 1
#
# IF ([%1] == 0) OR ([%1] == $2) THEN
# BREAK
# ELSE
# %1 = %1 + sizeof(x)
# FI
# DONE
#
#
# Note: Does not move past the value when found
#
scasb 2
scasw 2
scasd 2
scasq 2
#---------------------------------------------------------------------------#