home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 234
/
234.d81
/
t.fontstar
< prev
next >
Wrap
Text File
|
2022-08-26
|
4KB
|
201 lines
u
F O N T S T A R
by Dave Moorman
As mentioned elsewhere, sometimes
one must build tools in order to build
tools. The Golem Editor became a case
in point. I needed an ML module to
display and manipulate the font. It
turned out to be exactly 1024 bytes in
size, and I figured some of you might
enjoy having it in your arsenal of
WMDs (Welcomed Modules of Design).
I have included two versions, FONT
192.ML and FONT 156.ML. The number
indicates the page to which the file
is BLOADED. For example:
SYS57812"FONT 192.ML",DV,0
POKE 780, 0
POKE 781, 0
POKE 782, 192 :REM PAGE!
SYS65493
The beginning address (AD below) is
AD = 192 * 256
FONT DISPLAY:
SYS AD,ADDR,SCRROW
ADDR = Memory Address where Font
resides.
SCRROW = Screen Row (0 - 17) where
first line of Font is
displayed.
This command MUST be given first,
since it tells FontStar where in
memory (ADDR) your font resides, and
where on the screen to display the
font and edit box. The command puts a
32 x 8 Font display on the screen,
with an 8 x 8 edit window.
EDIT:
SYS AD+3,SC
SC = Screen Code
This command puts the character of
SC in the edit window. It is also
called by other commands after
they do their work on a character.
CLEAR:
SYS AD+6,SC
Turns off all pixels of character
SC.
REVERSE:
SYS AD+9,SC
Flips all pixels of character SC.
Use CLEAR and REVERSE to turn on
all pixels.
SCROLL UP:
SYS AD+12,SC
Scrolls the pixels of character SC
up one pixel row.
SCROLL DOWN:
SYS AD+15,SC
Scrolls the pixels of character SC
down one pixel row.
SCROLL RIGHT:
SYS AD+18,SC
Scrolls the pixels of character SC
right one pixel column.
SCROLL LEFT:
SYS AD+21,SC
Scrolls the pixels of character SC
left one pixel column.
TWIST LEFT:
SYS AD+24,SC
Twists the pixels of character SC
90 degrees counter-clockwise.
TWIST RIGHT:
SYS AD+27,SC
Twists the pixels of character SC
90 degrees clockwise.
FLIP VERTICALLY:
SYS AD+30,SC
Turns character SC upside down.
FLIP HORIZONALLY:
SYS AD+33,SC
Makes mirror image of character
SC.
COPY:
SYS AD+36,FROM,TO
FROM = Screen Code of character to
be copied.
TO = Screen Code of character to
receive copy.
Makes character TO look like
character FROM.
ROW TO BUFF:
SYS AD+39,ROW
ROW = Thirty-two character Font
Row as displayed.
Copies all 32 characters of ROW
into a buffer.
BUFF TO ROW:
SYS AD+42,ROW
Copies all 32 characters of buffer
into ROW.
The BUFFER commands are extremely
useful for copying parts of one
font to another.
TOGGLE:
SYS AD+45,SC,CX,CY
SC = Screen Code
CX = Cell X-coordinate.
CY = Cell Y-coordinate.
This is the pixel edit command for
FontStar. The coordinates are
actual screen character cell
coordinates. This makes it easy to
use FontStar with Mr. Mouse! When
you call ASK BASIC (SYS MM+9), the
character cell coordinates of the
mouse arrow are returned in CX%
and CY%. All you need to do to
toggle one of the pixels in the
edit box is point and click. Here
is the BASIC code:
(SC holds screen code of character
being edited. RO is the screen row
where the first row of the Font is
displayed.)
900 REM DEFINE REGION 1 AS THE PIXEL
EDIT BOX
901 SYS MM+15, 1, 32, 39, RO, RO+7
999 REM MAIN LOOP...
1000 SYS MM+9
1010 IF RG% = 1 THEN
SYS AD+45, SC, CX%, CY%
I think this pretty well covers
it! Now let us see your Font Editor
utilities!
DMM