Jump to content

Moj Mikro magazine listings: Character sets - fonts


  • You cannot reply to this topic
No replies to this topic

#1  

    Dragonstomper

  • 771 posts
  • Joined: 13-July 05

Posted Wed Mar 3, 2010 6:23 PM

Hello all,

This time I am introducing two interesting ways of redefining character set. New character sets are not defined on definitions in DATA tables, but other approaches are used, by shifting bytes, which reflects to all characters in a set.

Moj Mikro magazine article listings are available as zipped file in dowload section. It also contains ATR disk image file with Atari DOS system for using with disk based, real Atari machine or any Atari 8-bit emulator. Files on disk are Atari BASIC listings. To load programs properly, Atari must be powered with Atari BASIC enabled, or you can try programs with any compatible BASIC, for example Turbo BASIC XL, for faster execution.

You can try, use and modify the programs and routines for whatever purpose you want.

Moj Mikro magazine ex-YU Racunalniska Scena - Scanned Moj Mikro magazines
Posted Image Posted Image


Italic fonts

Moj Mikro magazine: year 1988, no. 6, page 42 - 44
Author: Zlatko Bleha
Atari BASIC program on disk (tokenized): M8806424.BAS
Scanned Moj mikro magazine article is available here and assembly language listing of the main routine is here and here.

This program shows redefined characters in many different ways. When program is run, menu appears. It offers you four options: 1 - left italic font, 2 - right italic font, 3 - normal font and 4 - exit program. The routine affects both uppercase and lowercase letters. Original program from the magazine is combined by two programs, main program with machine language routine in DATA lines, and demo program. I modified those programs to work as one program, but you can use main routine for your own purposes.

Posted Image Posted Image Posted Image Posted Image

Anyway, by choosing any of first three options, you can watch characters in action. Characters appear in left, right italic and normal shape. You can, for example, make a simulation where characters are dancing :)

You can use the routine from Atari BASIC by typing something like:

A=USR(1600,X,Y,Z)

Description of parameters:

X - Affects first three bytes of a character
Y - Affects middle two bytes of a character
Z - Affects remaining three bytes of a character

The meaning of example values:

173 - Nothing changes
78 - Right shift
14 - Left shift

New character set is on top of free RAM, starting at 38912, and takes usual 1024 bytes of memory. You can get it by typing POKE 756,152 (152 * 256 = 38912). By pressing Reset button old set is returned. Memory location 756 automatically gets value 224, which points to starting address of character set in ROM. New character set is returned by typing POKE 756,152. You can define new set in other location, if you want. Just be careful to define it in 1K boundary.

Usage:

Load program from disk by typing:

LOAD "D:M8806424.BAS"

When program is loaded, type RUN. Select any of the four options, which the program offers you. To exit the program, press option 4, or 1 to 3 to watch characters in left, right italic or normal shape.


Bold characters

Moj Mikro magazine: year 1988, no. 5, page 26 - 27
Author: Zlatko Bleha
Atari BASIC program on disk (tokenized): M8805255.BAS

With this program you get bold characters of whole character set. The machine language routine in DATA lines substitutes characters in location 28100 and accumulator, operating with logical OR operator. When operation is over, the contents of character set from memory location 28100 is copied to reserved location for character sets. You can get new character set anytime by typing POKE 756,152.

Posted Image Posted Image

Usage:

Load program from disk by typing:

LOAD "D:M8805255.BAS"

When program is loaded, type RUN. Wait for some seconds for characters to change their shape. Then you can use new character set.

Greetings,
Gury

Attached Files


Edited by Gury, Wed Mar 3, 2010 7:14 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users