Nascom Newsletter |
Volume 3 · Number 2 · May 1983 |
Page 5 of 36 |
---|
if between one and sight matches are found, the memory address of the start of each match is displayed in the response line. After the final match, XXXX is displayed to signify that the search continued to the top end of memory. If nine matches are found, all nine memory addresses are displayed in the response line. After nine matches the command terminates without searching any further.
AAAA – memory address at which the search is to start.
The logic of this command is really quite involved. A full description would require an article on its own. Basically, the command obtains the first byte in the required mask and searches through memory until it finds a match. The second byte of the mask is then compared with the next location in memory; if that matches, the third byte of the mask is compared and so on. If the ‘n’th byte fails to match, the command continues with searching for the first byte at the memory location one beyond the previous first byte match. Clearly, the command will for most of it’s time be searching for and failing to find a match on the first byte in the mask. This matching exercise on the first byte in the mask was therefore made as quick as possible, in order to minimise the execution tine of the command. However, this approach does mean that if the first byte of the mask occurs frequently in memory, the command will take a little longer. On average, the command will search 64K in a couple of seconds. However, if the first two bytes of the mask are –say– 00 00 (00 usually seems to occur frequently) it may take up to ten seconds to search 64K. Times are for a processor running at 4MHz with wait states.
Converts a hexadecimal integer value in the range 0 to FFFF, to decimal.
The result of the conversion to decimal is displayed on the first screen line following the command letter. The hexadecimal number is first displayed as it’s signed decimal equivalent with a preceding minus sign if the value is negative. If the number is negative, a further value is displayed to show the positive decimal equivalent of the unsigned format hexadecimal number.
In order to determine the sign of the input argument the command uses the number of input digits typed to determine whether the argument represents a single or a double byte value. If the number of digits typed is greater than two, a double byte value is assumed, otherwise a single byte value is assumed. If requires, leading zeroes may be typed in order to force a double byte conversion.
AAAA – hexadecimal value for conversion
Rather than just describe the operation, a commented assembler listing of the conversion follows. The actual SYS-EX code is slightly modified to cater for negative numbers
Page 5 of 36 |
---|