Vectrex Programming TOC

Vector beam positioning functions

There are quite a few positioning functions available, some absolut, some relative and some reset functions. Here is a program that will plot some dots using positioning functions.

Here a screenshot:


First we draw a dot at the center, like we used to in one of the above examples. Than we set a scaling factor of 100. Next we prepare for the function call of Moveto_d ($F312). This functions positions our vector beam relative to the current position. The coordinates are expected in the A (Y position) and B (X position) registers (that is the D register). After calling the function we plot the dot. Notice, this is the dot on the screen on the bottom left side, the coordinates we used for positioning were (-100, -50) (Y, X).

Now we take the invers position (100, 50) (Y, X) and only half the scale factor. Notice, that with the same positioning information and half the scale factor (50 instead of 100), we move exactly half the way back!

The last position example in the above program is via indexed positioning. The function we will call is named Moveto_ix_b ($F30E). The function expects an address to a position information in the X register and a scaling factor in the B register. We have stored another (100, 50) (Y, X) at the address of 'position', the X register is pointing to that address. Furthermore we moved 200 to B register for scaling information. Notice this dot is the one on the top right of the screen.

Further information about positoning functions can be found in appendix A:

Moveto_d ($F312)
Moveto_d_7F ($F2FC)
Moveto_ix ($F310)
Moveto_ix_7F ($F30C)
Moveto_ix_b ($F30E)
Moveto_ix_FF ($F308)
Moveto_x_7F ($F2F2)


Next page Last Page

Vectrex Programming TOC