PROPORTIONAL PRINTING (Arcade Antics)

by David McCandless

from Your Sinclair #29 (May 1988)

[files PROPPRNT.*]



Letters are a little like people in a way. You know, fat, tall, thin,

small, straight, curved, wiggly! But the Speccy treats them all the same

way - as if they were one byte wide. But this is where I come in. I've

developed a routine that prints a string of letters proportionally,

without the extra 768 bytes a slick character set would need. Cool eh?



Method



Right, let's get going. Use the Hex Loader (from Recover +3) to input

the short routine, saving it with SAVE "print" CODE 40136,216. Then

follow it up with the little demo program that'll have effective 42

column text spurting about all over the screen. Brill!

[There should have been 217 bytes in the m/code; 40352=9C(156)]

[completes the return JP address after dealing with CHR$ 13.  ]



Fat, slim, thin



To use the routine as it stands, you need to prepare a string in memory.

So, let's say your string is at 40000. POKE this address into the

routine with:



POKE 40153,40000-256*INT (40000/256)

POKE 40154,INT (40000/256)



Then if you're feeling cocky (oo-er), you can use these specialist

control codes in your string:



Codes



22 - PRINT AT. You must follow it with two numbers, the X and Y co-ordinates.

[The following two numbers should be: Y line offset, X pixel offset.]

13 - RETURN. This'll make the string begin again on the next line down.

00 - This tells the routine that it's reached the end of the string.



Should you be an artistic type and have your own font in memory, then

POKE its address into 40139 and 40140 in the same way as you POKEd the

message address. The default address is 15360 (#3C00 in Hex).



After doing that, just type RANDOMIZE USR 40136 to see your string

deposited on the screen. If you're still lost then examine the demo

program for further info. Got it?

