charset.txt
来自「汇编编程艺术」· 文本 代码 · 共 485 行 · 第 1/2 页
TXT
485 行
Routine: AddChar
-----------------
Category: Character Set Routine
Registers on Entry: ES:DI- pointer to first byte of desired set
AL- character to add to the set
Registers on Return: None
Flags affected: None
Example of Usage:
les di, SetPtr
add di, 1 ;Point at 2nd set in group.
mov al, Ch2Add ;Character to add to set.
addchar
Description: AddChar lets you add a single character (passed in AL)
to a set.
Include: stdlib.a or charsets.a
Routine: Rmvchar
-----------------
Category: Character Set Routine
Registers on entry: ES:DI (contains the address of first byte of a set)
AL (contains the character to be removed)
Registers on return: None
Flags affected: None
Example of Usage:
lea di, SetPtr
add di, 7 ;Point at eighth set in group.
mov al, Ch2Rmv
Rmvchar
Description: This routine removes the character in AL from a set.
ES:SI points to the set's mask byte. The corresponding
bit in the set is cleared to zero.
Include: stdlib.a or charsets.a
Routine: Member
----------------
Category: Character Set Routine
Registers on entry: ES:DI (contains the address of first byte of a set)
AL (contains the character to be compared)
Registers on return: None
Flags affected: Zero flag (Zero = 0 if the character is in the set
Zero = 1 if the character is not in the set)
Example of Usage:
les di, SetPtr
add di, 1
mov al, 'H'
member
jne IsInSet
Description: Member is used to find out if the character in AL is in a set
with ES:DI pointing to its mask byte. If the character is in
the set, the zero flag is set to 0. If not, the zero flag is
set to one.
Include: stdlib.a or charsets.a
Routine: CopySet
-----------------
Category: Character Set Routine
Register on entry: ES:DI- pointer to first byte of destination set.
DX:SI- pointer to first byte of source set.
Register on Return: None
Flags affected: None
Example of Usage:
les di, SetPtr
add di, 7 ;Point at 8th set in group.
mov dx, seg SetPtr2 ;Point at first set in group.
lea si, SetPtr2
copyset
Description: CopySet copies the items from one set to another. This is a
straight assignment, not a union operation. After the
operation, the destination set is identical to the source set,
both in terms of the element present in the set and absent
from the set.
Include: stdlib.a or charsets.a
Routine: SetUnion
------------------
Category: Character Set Routine
Register on entry: ES:DI - pointer to first byte of destination set.
DX:SI - pointer to first byte of source set.
Register on return: None
Flags affected: None
Example of Usage: les di, SetPtr
add di, 7 ;point at 8th set in group.
mov dx, seg SetPtr2 ;point at 1st set in group.
lea si, sSetPtr2
unionset
Description: The SetUnion routine computes the union of two sets.
That is, it adds all of the items present in a source set
to a destination set. This operation preserves items
present in the destination set before the SetUnion
operation.
Include: stdlib.a or charsets.a
Routine: SetIntersect
----------------------
Category: Character Set Routine
Register on entry: ES:DI - pointer to first byte of destination set.
DX:SI - pointer to first byte of source set.
Register on return: None
Flags affected: None
Example of Usage:
les di, SetPtr
add di, 7 ;point at 8th set in group.
mov dx, seg SetPtr2 ;point at 1st set in group.
lea si, SetPtr2
setintersect
Description: SetIntersect computes the intersection of two sets, leaving
the result in the destination set. The new set consists
only of those items which previously appeared in
both the source and destination sets.
Include: stdlib.a or charsets.a
Routine: SetDifference
-----------------------
Category: Character Set Routine
Register on entry: ES:DI - pointer to the first byte of destination set.
DX:SI - pointer to the first byte of the source set.
Register on return: None
Flags affected: None
Example of Usage:
les di, SetPtr
add di, 7 ;point at 8th set in group.
mov dx, seg SetPtr2 ;point at 1st set in group.
lea si, SetPtr2
setdifference
Description: SetDifference computes the result of (ES:DI) := (ES:DI) -
(DX:SI). The destination set is left with its original
items minus those items which are also in the source set.
Include: stdlib.a or charsets.a
Routine: Nextitem
------------------
Category: Character Set Routine
Registers on entry: ES:DI (contains the address of first byte of the set)
Registers on return: AL (contains the first item in the set)
Flags affected: None
Example of Usage:
les di, SetPtr
add di, 7 ;Point at eighth set in group.
nextitem
Description: Nextitem is the routine to search the first character (item)
in the set with ES:DI pointing to its mask byte. AL will
return the character in the set. If the set is empty, AL
will contain zero.
Include: stdlib.a or charsets.a
Routine: Rmvitem
-----------------
Category: Character Set Routine
Registers on entry: ES:DI (contains the address fo first byte of the set)
Registers on return: AL (contains the first item in the set)
Flags affected: None
Example of Usage:
les di, SetPtr
add di, 7
rmvitem
Description: Rmvitem locates the first available item in the set and
removes it with ES:DI pointing to its mask byte. AL will
return the item removed. If the set is empty, AL will
return zero.
Include: stdlib.a or charsets.a
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?