The list of the winners of the contest which ended 03/28/99:
This ZIP contains all the solutions sent in. Be aware of the fact that some may not work!
These were the problems to be solved:
Z-string = null-terminated string
ZF = zero flag set
NZ = zero flag cleared
CF = carry flag set
NC = carry flag cleared
Unless otherwise specified, all strings are Z-strings.
Reverse the bits in a string of bytes
|Input:||HL ® string of bits, A = length of substring (0 < A < 256)|
|Output:||The bits in the string should be reversed|
|Special:||You may use 256 bytes of temporary storage, starting at TEMP|
|Input:||HL = $C000, A = 5|
Decide whether a Z-string is a palindrome or not (A palindrome is a number, word or phrase that reads the same backwards as forwards).
|Input:||HL ® string|
|Output:||Return with zeroflag set if the string is a palindrome, else the flag should be cleared|
|Special:||You mayy assume that the string will only contain the lowercase letters a-z and word spacing. Note that white spaces should be discarded!!!|
|Input:||HL ® "rise to vote sir",0|
|Input:||HL ® "abcdcb",0|
Don't forget to check special cases, like a string of size 0 (which should be considered as a palindrome).
Search for a substring in a string (case-sensitive).
|Input:||HL ® string, DE ® substring|
|Output:||If the substring exists, the carry flag should be cleared, and HL point to the first position in the string where the substring occurs.|
If the substring doesn't exist, the carry flag should be set, and HL may be anything.
|Special:||You may assume that the substring has at least 1 byte. The string itself can be of length 0 though.|
|Input:||HL ® "This is a string!!",0|
DE ® "ring",0
|Output:||NC, HL ® "ring!!",0|
|Input:||HL ® "Another string!!",0|
DE ® "another",0