From: IrgendwerA8 Date: Sat, 27 Aug 2016 20:02:08 +0000 (+0200) Subject: Internal/screen character mapping: Supressed warnings for re-map and added documentation. X-Git-Tag: V2.16~76^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=refs%2Fpull%2F338%2Fhead;p=cc65 Internal/screen character mapping: Supressed warnings for re-map and added documentation. --- diff --git a/doc/atari.sgml b/doc/atari.sgml index e65a7869e..54f3aab78 100644 --- a/doc/atari.sgml +++ b/doc/atari.sgml @@ -318,6 +318,58 @@ chip registers.

+Character mapping

+ +The Atari has two representations for characters: + + ATASCII is character mapping which is similar to ASCII and used +by the CIO system of the OS. This is the default mapping of cc65 when +producing code for the atari target. + The internal/screen mapping represents the real value of the +screen ram when showing a character. + + +For direct memory access (simplicity and speed) enabling the internal +mapping can be useful. This can be achieved by including the +"For assembler sources the macro " + +You can switch back to the ATASCII mapping by including +" +#include <atari\_screen\_charmap.h> +char pcScreenMappingString[] = "Hello Atari!"; + +#include <atari_atascii_charmap.h> +char pcAtasciiMappingString[] = "Hello Atari!"; + + +delivers correct results, while + + +#include <atari_screen_charmap.h> +char* pcScreenMappingString = "Hello Atari!"; + +#include <atari_atascii_charmap.h> +char* pcAtasciiMappingString = "Hello Atari!"; + + +does not. + Loadable drivers

diff --git a/include/atari_screen_charmap.h b/include/atari_screen_charmap.h index 4a76d479a..78051584f 100644 --- a/include/atari_screen_charmap.h +++ b/include/atari_screen_charmap.h @@ -30,7 +30,10 @@ /* No include guard here! Multiple use in one file may be intentional. */ +#pragma warn (remap-zero, push, off) #pragma charmap (0x00, 0x40) +#pragma warn (remap-zero, pop) + #pragma charmap (0x01, 0x41) #pragma charmap (0x02, 0x42) #pragma charmap (0x03, 0x43) @@ -64,7 +67,10 @@ #pragma charmap (0x1E, 0x5E) #pragma charmap (0x1F, 0x5F) -#pragma charmap (0x20, 0x00) +#pragma warn (remap-zero, push, off) +#pragma charmap (0x20, 0x00) +#pragma warn (remap-zero, pop) + #pragma charmap (0x21, 0x01) #pragma charmap (0x22, 0x02) #pragma charmap (0x23, 0x03)