Fill Routine



Below is a machine-code fill routine. It is possible to

break it with Symbol Shift and Stop. The routine also

sometimes breaks itself to prevent a crash. When you run

the program, it asks you where to place the routine.

Remember to put it above Ramtop.

  Example: Putting the routine at 32000.

Type CLEAR 31999: RUN

Type 32000

SAVE example: (still 32000)

SAVE "fill"CODE 32000,95

LOAD example:

LOAD "fill"CODE 32000

Use the routine this way:

PLOT INVERSE 1;x,y: LET l=USR routine address.



[In fact, the routine contains hard-coded CALL instructions

to call itself recursively, so it will not work if put

anywhere other than at 32000. Unfortunately, this means

that there is not enough space left below RAMtop to fill,

e.g., a circle with radius 55, even with no Basic program

taking up memory.

On the TZX I've first put the fill code, loaded at 32000.

I've also provided the loader program, because it would be

quite possible to change this so that the code does work

from any other address, should you want it to.]