Motorola M68000 User's Guide Page 26

  • Download
  • Add to my manuals
  • Print
  • Page
    / 256
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 25
12 Assembly Language Programming for the 68000 Family
10011100
+ 00000001
10011101
Let’s convert 8910 to8910 using two’s complement. First we must
convert 8910 to binary. 89io = 010110012. Now form the one’s complement,
101001102; finally, to get the two’s complement we add one. Our result
is 8910 = 101001112.
The nice property of two’s complement numbers is that we can add
them together without concern for the sign. We do not have to perform
any conversion. As a simple example, we should be able to add 8910 and
8910 and obtain a zero result.
01011001 8910
+ 10100111 -89^0
oooooooo o10
We ignore any carry out from the sign bit position.
To subtract in two’s complement, we merely negate the subtrahend
and then add. This operation is performed regardless of whether the
subtrahend is positive or negative.
ASCII Character Codes
In order to represent character information in the computer’s memory,
we must find a way to convert the such as CR (carriage return), LF
(line feed) and HT (horizontal tab). There are other control character”
codes that are of general interest but are not necessarily available on
all terminals. For example, a BEL (bell) might sound a beep on your
terminal, or a VT (vertical tab) might be implemented. The other codes
with values less than 3210 are used for a variety of purposes including the
protocols used for data communications.
One special character should be mentioned. The DEL (delete) code,
12710, which is sometimes called a rubout, is most commonly used by
software to indicate the deletion of the last character typed. Some soft
ware uses the BS (backspace) character to perform this same operation.
You should note that these are really two different character codes, 810
and 12710, and the interpretation as to what, if anything, these characters
do is up to the software.
Some computers and terminals have incorporated additional charac
ters as an extension to the standard ASCII character set. By allowing
codes above 12710> an additional 12810 characters can be specified. These
might be from a foreign language, or for special graphics used by certain
Page view 25
1 2 ... 21 22 23 24 25 26 27 28 29 30 31 ... 255 256

Comments to this Manuals

No comments