String and Character Instructions in Assembly Language (original) (raw)
| | | OSdata.com | | --------------------------------------------------------------------------------------------- | | ---------- |
character and string operations
summary
This web page examines string and character instructions in assembly language. Specific examples of instructions from various processors are used to illustrate the general nature of assembly language.
free computer programming text book project
Now building a [For those with high speed connections, the very large single file ](../../milo/milo.html>free emulator and assembly language proigramming lessons.
string and character operations
- MVC MoVe Character; IBM 360/370; SS format; moves one to 256 characters (8 bits each) of data; main storage to main storage only; does not affect condition code
- CMPC3 Compare Characters 3 Operand; DEC VAX; compares two character strings designated by a length and two source addresses, indicating if they are the same or different; sets Z flag if two strings are equal and sets registers to indicate position where the two strings differed
- CMPC5 Compare Characters 5 Operand; DEC VAX; compares two character strings designated by two lengths and two source addresses, indicating if they are the same or different, virtually extending the shorter string with the designated fill character; sets Z flag if two strings are equal and sets registers to indicate position where the two strings differed
- LOCC Locate Character; DEC VAX; finds the character operand in the character string designated by the source string length and address; sets Z flag if the character is in the string and sets registers to indicate position, one register havingthe integer count and another register having the memory address
- MATCHC Match Characters; DEC VAX; searchs a string of specified legth and source address for a substring that matches the object string specified by the object length and object address; sets or clears Z flag (set if substring found, cleared if not)
- MOVC3 Move Character 3 Operand; DEC VAX; moves the character string of the designated length from the source address to the destination address, taking into account the possibility of overlapping memory blocks
- MOVC5 Move Character 5 Operand; DEC VAX; moves the character string of the designated length and source address to the destination length and address, taking into account the possibility of overlapping memory blocks, truncating if the source is larger than the destination and using the designated fill character if the destination is larger than the source
- MOVTC Move Translated Characters; DEC VAX; moves the character string of the designated length and source address to the destination length and address, using the designated translation table (256 entries), taking into account the possibility of overlapping memory blocks, truncating if the source is larger than the destination and using the designated fill character if the destination is larger than the source
- MOVTUC Move Translated Until Character; DEC VAX; moves the character string of the designated length and source address to the destination length and address, using the designated translation table (256 entries), stopping when encountering the designated escape character, taking into account the possibility of overlapping memory blocks, truncating if the source is larger than the destination and using the designated fill character if the destination is larger than the source
- SCANC Scan Characters; DEC VAX; scans the character string designated by the length and memory address using the designated table and mask, each character being used as an index into the table, the resulting table entry bit ANDed with the mask operand until the result of the AND is non-zero or the string is exhausted, giving the integer count and the memory address of the byte producing the non-zero AND result or zero count for exhausting the string without a non-zero result
- SPANC Span Characters; DEC VAX; scans the character string designated by the length and memory address using the designated table and mask, each character being used as an index into the table, the resulting table entry bit ANDed with the mask operand until the result of the AND is zero or the string is exhausted, giving the integer count and the memory address of the byte producing the zero AND result or zero count for exhausting the string without a zero result
- SKPC Skip Characters; DEC VAX; compares the character operand with the string designated by the length and memory address until an inequality is located or the string is exhausted, giving the integer count and memory address of the byte producing inequality or zero count for exhausting the string without inequality
See also character codes (ASCII, EBCDIC, etc.).
Now building a [For those with high speed connections, the very large single file ](../../milo/milo.html>free emulator and assembly language proigramming lessons.
free music player coding example
Programming example: I am making heavily documented and explained open source PHP/MySQL code for a method to play music for free — almost any song, no subscription fees, no download costs, no advertisements, all completely legal. This is done by building a front-end to YouTube (which checks the copyright permissions for you).
View music player in action: www.musicinpublic.com/.
Create your own copy from the original source code/ (presented for learning programming). Includes how to run this from your own computer if you don’t have a web site.
return to table of contents
free downloadable college text book
view text book
HTML file
Because I no longer have the computer and software to make PDFs, the book is available as an HTML file, which you can convert into a PDF.
A web site on dozens of operating systems simply can’t be maintained by one person. This is a cooperative effort. If you spot an error in fact, grammar, syntax, or spelling, or a broken link, or have additional information, commentary, or constructive criticism, please e-mail Milo. If you have any extra copies of docs, manuals, or other materials that can assist in accuracy and completeness, please send them to Milo, PO Box 1361, Tustin, CA, USA, 92781.
Click here for our privacy policy.
home page
two levels up
one level up
peer level
- intro to assembly language
- data representation and number systems
- registers
- addressing modes
- data and address movement
- integer arithmetic
- floating arithmetic
- binary coded decimal
- advanced math
- data conversion
- logical operations
- shift and rotate
- bit and bit field manipulation
- table operations
- high level language support
- program control and condition codes
- input/output
- system control
- coprocessor and multiprocessor
- trap generating
free computer programming text book project
Building a free downloadable text book on computer programming for university, college, community college, and high school classes in computer programming.
If you like the idea of this project,
then please donate some money.
send donations to:
Milo
PO Box 1361
Tustin, California 92781
Supporting the entire project:
If you have a business or organization that can support the entire cost of this project, please contact Pr Ntr Kmt (my church)
Some or all of the material on this web page appears in the
free downloadable college text book on computer programming.
I do the news as an unpaid volunteer for KOCI 101.5 FM, Newport Beach/Costa Mesa (also available on the web)
This web site handcrafted on Macintosh computers using Tom Bender’s Tex-Edit Plus and served using FreeBSD .
Names and logos of various OSs are trademarks of their respective owners.
Copyright © 2000, 2001, 2010 Milo
Created: February 21, 2001 (from machcode.htm)
Last Updated: November 28, 2010
return to table of contents
free downloadable college text book