
Assembler Source Format 35
we can use are:
Indicator Base
% 2
@ 8
[none] 10
$ 16
A binary constant would naturally consist of a percent sign followed
by only l’s and 0’s. If we try to write a binary constant with other than
l’s and 0’s, it is an error. The following are all valid constants:
1234 1234,0
$1234 1234,6
$1100111001 11001110012
$FFFF FFFF,e
@377 3778
Character string constants are ASCII character strings delimited by
apostrophes. A character string constant must appear entirely on one line.
Any valid “printing” characters from the ASCII character set are allowed.
For example,
'Hello there.'
is a character string of length 12. The two apostrophes are not part of the
string. What do we do if we want an apostrophe? We can’t just place one
in the middle of the string, that would terminate the string. If we want a
single apostrophe, we merely write two apostrophes. For example,
'Don''t give up the ship.'
is actually the string “Don’t give up the ship.”.
If a string is one to four characters long it can be used as a numeric
value. In this case, the characters are right-justified. This means that the
ASCII values of the characters are used as the low-order bytes. Any
high-order bytes that do not have a corresponding character are filled
with zeros. If it is longer than four characters, it is merely the string
of bytes with the appropriate ASCII values. Both upper and lower case
characters can be used in character strings.
Kommentare zu diesen Handbüchern