Re: [cc65] Apple 2 ASCII with MSB on

Date view Thread view Subject view

From: Justin England (jengland_at_enetis.net)
Date: 2003-05-11 00:51:33


>
> On Fri, May 09, 2003 at 08:38:22PM -0600, Justin England wrote:
> > Is there an equivalent to 'msb on' in ca65?  I have looked though the
> > docs, but couldn't find anything that looked like it was what I needed.
>
> This would mean that the translation table used in the assembler is wrong. A
> quick fix is to encode the strings as numbers, or to write a macro
>
>         .macro  string  s
>                 .repeat .strlen(s), i
>                         .byte   .strat(s,i) | $80
>                  .endrepeat
>         .endmacro
>
> Can someone explain me how characters work in the apple? This is the first
> time I hear something about the usage of bit 7.
>
> Regards
>
>
It didn't take me as long as I thought to find the info.  Here it is from
the //c Tech Ref Manual, which should work for the enahanced //e and
later machines:

5.2 TEXT MODES

Either of the apple //c's two text modes can display all 96 ASCII
characters: uppercase and lowercase letters, the ten digits, punctuation
marks, and special characters.  Each character is displayed in an area of
the screen that is seven dots wide by eight dots high.  The characters are
formed by a dot matric five dots wide (with a few exceptions, such as
underscore), leaving two blank columns of dots between characters in a
row.  Except for lowercase letters with decenders, the characters are only
seven dots high, leaving one blank line of dots between rows of
characters.

The normal display has white (or other monochrome color used by your
monitor) dots on a dark background.  Characters can also be displayed as
black dots on a white background; this is called inverse format.


5.2.1 TEXT CHARACTER SETS

The Apple //c can display either of two text character sets: the primary
set and an alternate set (Table 5-3).  The forms of the characters in the
two sets are actually the same, but the available display formats are
different.  The display formats are

	normal, with white dots on a black screen

	inverse, with black dots on a white screen

	flashing, alternating between normal and inverse

The Apple //c can display uppercase characters in all theee formats --
normal, inverse, and flashing -- with the primary character set.
Lowercase letters can only be displayed in normal format.  This makes the
primary character set compatible with most software written for the Apple
II and II Plus, which can display text in flashing format, but don't have
lowercase characters.

The alternate character set trades the flashing format for a complete set
of inverse characters.  With the alternate character set, the Apple //c
can display uppercase letters, lowercase letters, numbers, and special
characters in either normal format or invers format.  It can also display
MouseText.

You can select between character sets with the alternate-text soft switch,
described in Section 5.6.  Table 5-3 shows the character codes in decimal
and hexadecimal for the Apple //c primary and alternate character sets in
normal, inverse and flashing formats.

Table 5-3.  The Display Character Sets

Hex Values	Primary Character Set		Alternate Character Set

		CHARACTER TYPE	   FORMAT	CHARACTER TYPE	   FORMAT

$00-$1F		Uppercase letters  Inverse	Uppercase Letters  Inverse

$20-$3F		Special characters Inverse	Special characters Inverse

$40-$5F		Uppercase letters  Flashing	MouseText

$60-$7F		Special characters Flashing	Lowercase letters  Inverse

$80-$9F		Uppercase letters  Normal	Uppercase letters  Normal

$A0-$BF		Special characters Normal	Special characters Normal

$C0-$DF		Uppercase letters  Normal	Uppercase letters  Normal

$E0-$FF		Lowercase letters  Normal	Lowercase letters  Normal

(To identify paticular characters and values, refer to Table 4-2).


Each character on the screen is stored as one byte of display data.  The
low-order six bits make up the ASCII code of the character being
displayed.  The remaining two (high-order) bits select format and the
group within ASCII (Section 3.3.6).

Hope this helps,

Justin

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-05-11 01:09:17 CEST