Download Print this page

RCA Spectra 70 Training Manual page 54

System
Hide thumbs

Advertisement

The binary values of all alphabetic and numeric char-
acters range as follows:
A to I inclusive
193 10 to 201 10
J
to R inclusive
20510 to 21710
S to Z inclusive
226 10 to 23310
o
to 9 inclusive
24010 to 24910
The table could be allocated by the DC (Define Con-
stant) code as follows:
NAME
OPERATION
OPERAND
TABLE
DC
193x'FF'
DC
9x'OO'
A to I
DC
7x'FF'
DC
9x'00'
J to R
DC
8x ' FF'
DC
8x'OO'
S to Z
DC
6x'FF'
DC
10x'OO'
o
to 9
DC
6x'FF'
48
Then, using instructions similar to those in the pre-
ceding example, a field could be tested for alpha or
numeric content.
Any other character will translate into a 1 bit-filled
byte.
For example, assume the field contained a
period, an invalid character. A period (.) has a bi-
nary value of 01001011 2 or 75 10 , It would address
the 75th position of the table and be replaced by a 1
bit-filled byte.
The previous examples have illustrated the Translate
instruction for validation. A table of this type is fairly
easy for the programmer to construct using the DC
and DS codes.
For translating from one code to another, such as
from the ASCII to the EBCDIC code a prepared table
could be used which would be entered into memory
from an input device.

Advertisement

loading

  Also See for RCA Spectra 70

  Related Manuals for RCA Spectra 70

This manual is also suitable for:

Spectra 70/25