Would you like to make this site your homepage? It's fast and easy...
Yes, Please make this my home page!
==================================================================
MikeOS -- The Mike Operating System kernel
STRING MANIPULATION ROUTINES
==================================================================
os_string_length
Return length of a string
- IN: AX = string location
- OUT AX = length (other regs preserved)
Example:
code goes here
os_find_char_in_string
Find location of character in a string
- IN: SI = string location, AL = character to find
- OUT: AX = location in string, or 0 if char not present
Example:
code goes here
os_string_uppercase
Convert zero-terminated string to upper case
- IN/OUT: AX = string location
Example:
code goes here
os_string_lowercase
Convert zero-terminated string to lower case
- IN/OUT: AX = string location
Example:
code goes here
os_string_copy
Copy one string into another
- IN/OUT: SI = source, DI = destination (programmer ensure sufficient room)
Example:
code goes here
os_string_truncate
Chop string down to specified number of characters
- IN: SI = string location, AX = number of characters
- OUT: String modified, registers preserved
Example:
code goes here
os_string_join
Join two strings into a third string
- IN/OUT: AX = string one, BX = string two, CX = destination string
Example:
code goes here
os_string_chomp
Strip leading and trailing spaces from a string
- IN: AX = string location
- OUT: nothing
Example:
code goes here
os_string_strip
Removes specified character from a string
- IN: SI = string location, AL = character to remove
- OUT: nothing
Example:
code goes here
os_string_compare
See if two strings match
- IN: SI = string one, DI = string two
- OUT: carry set if same, clear if different
Example:
code goes here
os_string_strincmp
See if two strings match up to set number of chars
- IN: SI = string one, DI = string two, CL = chars to check
- OUT: carry set if same, clear if different
Example:
code goes here
os_string_parse
Take string (eg "run foo bar baz") and return
pointers to zero-terminated strings (eg AX = "run", BX = "foo" etc.)
- IN: SI = string
- OUT: AX, BX, CX, DX = individual strings
Example:
code goes here
os_string_to_int
Convert decimal string to integer value
- IN: SI = string location (max 5 chars, up to '65536')
- OUT: AX = number
Example:
code goes here
os_int_to_string
Convert value in AX to string
- IN: AX = integer, BX = location of string
- OUT: BX = location of converted string (other regs preserved)
NOTE: Based on public domain code
Example:
code goes here
os_long_int_to_string
Convert value in DX:AX to string
- IN: DX:AX = long unsigned integer, BX = number base, DI = string location
- OUT: DI = location of converted string
Example:
code goes here
os_set_time_fmt
Set time reporting format (eg '10:25 AM' or '2300 hours')
- IN: AL = format flag, 0 = 12-hr format
- OUT: nothing
Example:
code goes here
os_get_time_string
Get current time in a string (eg '10:25')
- IN/OUT: BX = string location
Example:
code goes here
os_set_date_fmt
Set date reporting format (M/D/Y, D/M/Y or Y/M/D - 0, 1, 2)
- IN: AX = format flag, 0-2
- If AX bit 7 = 1 = use name for months
- If AX bit 7 = 0, high byte = separator character
- OUT: nothing
Example:
code goes here
os_get_date_string
Get current date in a string (eg '12/31/2007')
- IN/OUT: BX = string location
Example:
code goes here
RETURN TO MAIN PAGE