12.07.2015 Views

williams-et-al-1983-apple-ii-computer-graphics

williams-et-al-1983-apple-ii-computer-graphics

williams-et-al-1983-apple-ii-computer-graphics

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

102 APPLE II COMPUTER GRAPHICSPUSLSUPR1!011llTo communicate those v<strong>al</strong>ues to the <strong>computer</strong>, you need to put themtog<strong>et</strong>her to form "byte size" pieces. For the purpose of encoding thevectors, each byte is divided into three sections, A, B, and C, as shown inFigure 10-3.c B ABIT # .__ 5__.4-'-3_.I l_2_.__1_.__o___.Figure 11-3. Byte divisions.Begin by placing the fi rst vector code in section A, the second in B, andthe third (if possible) in C. It is NOT permissible to break a code in themiddle and carry the remainder over to the next byte; you have no doubtnoticed that section C contains only two bits, so it cannot contain a compl<strong>et</strong>ecode. The logic<strong>al</strong> conclusion is that section C is unusable, and youmay <strong>al</strong>ways leave it blank (00) . However, in certain cases section C can beused; the left hand bit of any code in section C is assumed to be 0, andonly the two bits on the right (the direction bits) are entered. For example,10 000 101 would cause the <strong>computer</strong> to execute PR (101), SU (000), andthen SD (10).Any vector placed in section C must be a "skip" vector; the third vectorin our shape is a plot vector so it will not fit in section C. Therefore, it mustbe placed in section A of the next byte. When plotting the shape, the<strong>computer</strong> will ignore the two zeros at the left end of a byte. In fact, anyzero section of a byte is ignored if <strong>al</strong>l of the following sections of that byteare zero <strong>al</strong>so. For example, with 00 000 01 1, the <strong>computer</strong> will skip andmove left (01 1 ), then ignore the rest of the byte, and begin the followingbyte. It fo llows, then, that section C can never execute an up vector (00),since it would be ignored as in -00 111 000 where the <strong>computer</strong> wouldskip-up (000), plot left (1 11 ), and theri ignore section C. In that case, theskip-up vector would have to be placed in section A of the next byte.Refer to Figure 10-4 as we group the vectors for our shape.C B A C B A HEXBYTE # 1SR PU2341-----1SLPLPUSUFigure 18-4.00000000001011111000100100011000oc1C3B00

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!