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
|
|
|
|
|
|
|
#---------------------------------------------------------------------------#
|
|
|
|
|