Character manipulation in the 1456 object code system.

William Overington

Copyright 2000 William Overington

1456 object code, (in speech, please say "fourteen fifty-six object code") provides a number of operation codes for manipulating characters. Characters are represented using the 16 bit unicode characters of Java.

There are an a register and a b register for characters, namely ac1456 and bc1456.

There is also an array of memory locations for characters, mc1456 from mc1456[0] to mc1456[199]. The mc1456 array has 200 elements, twice as many as the mi1456 array has for integers.

The bc1456 register is not reset automatically after a 1456 operation has been carried out. The bc1456 register is not set directly by incoming numeric characters in the way that bi1456 and bd1456 are set.

There are two instructions provided to directly introduce a character from the 1456 object code into the bc1456 register.

The first is the 'u command. The 'u command is always followed by four hexadecimal characters. These four characters are processed by the 1456 engine in order to produce one unicode character. For example 'u0045 will place an E character into the bc1456 register. A 1456 engine should accept as hexadecimal characters the digits 0 to 9 and the letters a to f and the letters A to F. This allows 1456 programmers to use uppercase or lowercase hexadecimal characters as desired. This facility is provided in case a 1456 programmer is copying and pasting unicode hexadecimal representations from another document when creating a 1456 program, so that he or she will not need to edit them to give compatibility with 1456 object code.

The second 1456 instruction provided to directly introduce a character from the 1456 object code into the bc1456 register is the ^ command. Unlike the 'u command, which may be used for any unicode character, the ^ command can only be used for 7 bit ascii printing characters, including the space character. For example, ^E will place an E character into the bc1456 register. The ^ character simply places the character that follows it into the bc1456 register. The availability of both the ^ command and the 'u command gives maximum flexibility in introducing characters directly from 1456 software.

The character memory is accessed as follows.

Storage into memory is performed by the index number of the memory location followed by the store command. For example 7'> will store whatever is in ac1456 into mc1456[7].

Retrieval from memory is performed by the get command. For example 7'< will make a copy of whatever is in mc1456[7] and place it in the bc1456 register.

Please note, that storage is from the a register, retrieval is to the b register.

Once a retrieved character is in the bc1456 register it can be loaded into the ac1456 register or compared with whatever is already in the ac1456 register.

In particular please note that a character recovered from memory and wished to be placed in the ac1456 register must use 'w in order to achieve this result.

For example, 7'<'w needs to be used to get a character from character memory 7 and place the result in the ac1456 register.

In order to place an integer version of the character that is in ac1456 into ai1456, the &C command is used.

In order to place a character version of the integer that is in ai1456 into ac1456, the 'I command is used.

The linkflag1456 is set as either true or false by a number of character comparison instructions.

Comparison is always between the ac1456 register and the bc1456 register. The value of the ac1456 and bc1456 registers is not affected.

If ac1456 equals bc1456 is coded by the 'E command.

If ac1456 is greater than bc1456 is coded by the 'G command.

If ac1456 is less than bc1456 is coded by the 'L command.

These are straightforward to remember from the first letters of the words equals, greater and less.

If ac1456 is not equal to bc1456 is coded by 'F where F is the next letter after E.

If ac1456 is greater than or equal to bc1456 is coded by 'H where H is the next letter after G.

If ac1456 is less than or equal to bc1456 is coded by 'M where M is the next letter after L.

Thus by setting linkflag1456 by means of a compare instruction and then using !J or !C or !R as appropriate, control over program instruction obeying order can be achieved.

The manipulation of characters within 1456 software requires a suitable 1456 applet landscape to be available. Simulated direct memory access of the mc1456 character array is available. There are various possibilities. For example, a string placed in a textbox by a user can be converted to individual characters by the 1456 applet landscape when a button is clicked and supplied to the 1456 engine by simulated direct memory access. After the 1456 software has been obeyed, the 1456 applet landscape can recover the result by simulated direct memory access. There is a choice as to how to signal the end of the string. One method is to add an extra character as of value \u0000 and place that in the mc1456 array to indicate that that is the end of the string. Another method is to set the value of an integer in the mi1456 array to show how many characters are in the string. That is a matter for choice of a 1456 applet landscape designer. The 1456 object code is able to handle either approach.

1456 object code

Copyright 2000 William Overington