Acorn Computers BBC Micro Model B w/8271 — Acorn BBC Micro Model B w/8271 User Guide Manual PDF

356 The left hand edge of the graphics area has an X value of (about) 150. The bottom of the area has a Y value of 300. The right hand side has X=1100 and the top has Y=700. The full statement to set this area is VDU 24,150;300;1100;700; Notice that the edges must be given in the order left X, bottom Y, right X, top Y and that when defining graphics windows the numbers must be followed by a semi-colon. For those who wish to know why trailing semi-colons are used the reason is as follows: X and Y graphics coordinates have to be sent to the VDU software as two bytes since the values may well be greater than 255.

The semi-colon punctuation in the VDU statement sends the number as a two byte pair with low byte first followed by the high byte. 25 This VDU code is identical to the BASIC PLOT statement. Only those writing machine code graphics will need to use it. VDU25 is followed by five bytes. The first gives the value of K referred to in the explanation of PLOT in the BASIC keywords chapter. The next two bytes give the X coordinate and the last two bytes give the Y coordinate. Refer to the entry for VDU24 for an explanation of the semi-colon syntax used. For example VDU 25,4,100;500; would move to absolute position 100,500.

The above is completely equivalent to VDU 25,4,100,0,244,1 26 The code VDU26 CTRL Z ) returns both the graphics and text windows to their initial values where they occupy the whole screen. This code repositions the text cursor at the top left of the screen, the graphics cursor at the bottom left and sets the graphics origin to the bottom left of the screen. In this state it is possible to write text and to draw graphics anywhere on the screen. 27 This code does nothing.