From 15a573e398f316c11bb3aec11f1d398d958a9c9d Mon Sep 17 00:00:00 2001 From: Zachary Wassall Date: Thu, 9 Feb 2017 15:30:10 -0500 Subject: [PATCH] CR purge --- .gitattributes | 1 + .../graphics/demo_11/GRAPHX11_test.json | 122 ++++++++-------- .../graphics/demo_11/src/main.c | 132 +++++++++--------- CEdev/lib/src/std/shared/isalnum.asm | 56 ++++---- CEdev/lib/src/std/shared/isalpha.asm | 54 +++---- CEdev/lib/src/std/shared/iscntrl.asm | 54 +++---- CEdev/lib/src/std/shared/isdigit.asm | 54 +++---- CEdev/lib/src/std/shared/isgraph.asm | 56 ++++---- CEdev/lib/src/std/shared/islower.asm | 58 ++++---- CEdev/lib/src/std/shared/isprint.asm | 56 ++++---- CEdev/lib/src/std/shared/ispunct.asm | 56 ++++---- CEdev/lib/src/std/shared/isspace.asm | 56 ++++---- CEdev/lib/src/std/shared/isupper.asm | 56 ++++---- CEdev/lib/src/std/shared/isxdigit.asm | 56 ++++---- CEdev/lib/src/std/shared/maptab.c | 76 +++++----- 15 files changed, 472 insertions(+), 471 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..21ee7fabc --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text eol=lf diff --git a/CEdev/examples/library_examples/graphics/demo_11/GRAPHX11_test.json b/CEdev/examples/library_examples/graphics/demo_11/GRAPHX11_test.json index 2daf3579c..f4af9b249 100644 --- a/CEdev/examples/library_examples/graphics/demo_11/GRAPHX11_test.json +++ b/CEdev/examples/library_examples/graphics/demo_11/GRAPHX11_test.json @@ -1,62 +1,62 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/GRAPHX11.8xp" - ], - "target": { - "name": "GRAPHX11", - "isASM": true - }, - "sequence": [ - "action|launch", "delay|300", "hash|rectangles", "hash|palette_0", - "key|enter", "delay|1000", "hash|palette_25", - "key|enter", "delay|1000", "hash|palette_50", - "key|enter", "delay|1000", "hash|palette_75", - "key|enter", "delay|1000", "hash|palette_100", - "key|enter", "delay|300", "hash|after_exit" - ], - "hashes": { - "rectangles": { - "description": "Test rectangles", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "328D511E" ] - }, - "palette_0": { - "description": "Test lighten/darken fade, 0% progress", - "start": "lcdPalette", - "size": "8", - "expected_CRCs": [ "41C3BFF8" ] - }, - "palette_25": { - "description": "Test lighten/darken fade, 25% progress", - "start": "lcdPalette", - "size": "8", - "expected_CRCs": [ "5F64F889" ] - }, - "palette_50": { - "description": "Test lighten/darken fade, 50% progress", - "start": "lcdPalette", - "size": "8", - "expected_CRCs": [ "C48CEF7C" ] - }, - "palette_75": { - "description": "Test lighten/darken fade, 75% progress", - "start": "lcdPalette", - "size": "8", - "expected_CRCs": [ "81FEDD4E" ] - }, - "palette_100": { - "description": "Test lighten/darken fade, 100% progress", - "start": "lcdPalette", - "size": "8", - "expected_CRCs": [ "B451E096" ] - }, - "after_exit": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5" ] - } - } +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/GRAPHX11.8xp" + ], + "target": { + "name": "GRAPHX11", + "isASM": true + }, + "sequence": [ + "action|launch", "delay|300", "hash|rectangles", "hash|palette_0", + "key|enter", "delay|1000", "hash|palette_25", + "key|enter", "delay|1000", "hash|palette_50", + "key|enter", "delay|1000", "hash|palette_75", + "key|enter", "delay|1000", "hash|palette_100", + "key|enter", "delay|300", "hash|after_exit" + ], + "hashes": { + "rectangles": { + "description": "Test rectangles", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "328D511E" ] + }, + "palette_0": { + "description": "Test lighten/darken fade, 0% progress", + "start": "lcdPalette", + "size": "8", + "expected_CRCs": [ "41C3BFF8" ] + }, + "palette_25": { + "description": "Test lighten/darken fade, 25% progress", + "start": "lcdPalette", + "size": "8", + "expected_CRCs": [ "5F64F889" ] + }, + "palette_50": { + "description": "Test lighten/darken fade, 50% progress", + "start": "lcdPalette", + "size": "8", + "expected_CRCs": [ "C48CEF7C" ] + }, + "palette_75": { + "description": "Test lighten/darken fade, 75% progress", + "start": "lcdPalette", + "size": "8", + "expected_CRCs": [ "81FEDD4E" ] + }, + "palette_100": { + "description": "Test lighten/darken fade, 100% progress", + "start": "lcdPalette", + "size": "8", + "expected_CRCs": [ "B451E096" ] + }, + "after_exit": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5" ] + } + } } \ No newline at end of file diff --git a/CEdev/examples/library_examples/graphics/demo_11/src/main.c b/CEdev/examples/library_examples/graphics/demo_11/src/main.c index 057842b40..3ff0c5994 100644 --- a/CEdev/examples/library_examples/graphics/demo_11/src/main.c +++ b/CEdev/examples/library_examples/graphics/demo_11/src/main.c @@ -1,66 +1,66 @@ -/* Keep these headers */ -#include -#include -#include -#include - -/* Standard headers - it's recommended to leave them included */ -#include -#include -#include -#include - -/* Shared libraries */ -#include - -#define color gfx_RGBTo1555(34, 55, 89) - -/* Put function prototypes here */ - -/* Put all your code here */ -void main(void) { - uint8_t i = 0; - - /* Initialize the 8bpp graphics */ - gfx_Begin( gfx_8bpp ); - - /* For i in 0..255 */ - do { - - /* Fade out to black */ - gfx_palette[0] = gfx_Darken(color, i); - /* Fade in from black */ - gfx_palette[1] = gfx_Darken(color, ~i); - /* Fade in from white */ - gfx_palette[3] = gfx_Lighten(color, ~i); - /* Fade out to white */ - gfx_palette[2] = gfx_Lighten(color, i); - - /* Fade out to black */ - gfx_SetColor(0); - gfx_FillRectangle_NoClip(0,0,160,120); - /* Fade in from black */ - gfx_SetColor(1); - gfx_FillRectangle_NoClip(160,0,160,120); - /* Fade in from white */ - gfx_SetColor(2); - gfx_FillRectangle_NoClip(0,120,160,120); - /* Fade out to white */ - gfx_SetColor(3); - gfx_FillRectangle_NoClip(160,120,160,120); - - /* Wait for a keypress at the start of each quarter of the fade */ - if (!(i & 0x3f)) { - while(!os_GetCSC()); - } - - /* Loop until i is 0 again because of 8 bit range */ - } while(++i); - - /* Wait for a keypress */ - while(!os_GetCSC()); - - /* Usual cleanup */ - gfx_End(); - prgm_CleanUp(); -} +/* Keep these headers */ +#include +#include +#include +#include + +/* Standard headers - it's recommended to leave them included */ +#include +#include +#include +#include + +/* Shared libraries */ +#include + +#define color gfx_RGBTo1555(34, 55, 89) + +/* Put function prototypes here */ + +/* Put all your code here */ +void main(void) { + uint8_t i = 0; + + /* Initialize the 8bpp graphics */ + gfx_Begin( gfx_8bpp ); + + /* For i in 0..255 */ + do { + + /* Fade out to black */ + gfx_palette[0] = gfx_Darken(color, i); + /* Fade in from black */ + gfx_palette[1] = gfx_Darken(color, ~i); + /* Fade in from white */ + gfx_palette[3] = gfx_Lighten(color, ~i); + /* Fade out to white */ + gfx_palette[2] = gfx_Lighten(color, i); + + /* Fade out to black */ + gfx_SetColor(0); + gfx_FillRectangle_NoClip(0,0,160,120); + /* Fade in from black */ + gfx_SetColor(1); + gfx_FillRectangle_NoClip(160,0,160,120); + /* Fade in from white */ + gfx_SetColor(2); + gfx_FillRectangle_NoClip(0,120,160,120); + /* Fade out to white */ + gfx_SetColor(3); + gfx_FillRectangle_NoClip(160,120,160,120); + + /* Wait for a keypress at the start of each quarter of the fade */ + if (!(i & 0x3f)) { + while(!os_GetCSC()); + } + + /* Loop until i is 0 again because of 8 bit range */ + } while(++i); + + /* Wait for a keypress */ + while(!os_GetCSC()); + + /* Usual cleanup */ + gfx_End(); + prgm_CleanUp(); +} diff --git a/CEdev/lib/src/std/shared/isalnum.asm b/CEdev/lib/src/std/shared/isalnum.asm index 7c383508f..12c28a1a7 100644 --- a/CEdev/lib/src/std/shared/isalnum.asm +++ b/CEdev/lib/src/std/shared/isalnum.asm @@ -1,28 +1,28 @@ - .def _isalnum - .ref ___maptab - .assume adl=1 - -; original source -; int isalnum(int c) { -; if( (unsigned char)c & (unsigned char)0x80 ) -; return (0); -; return(__maptab[c] & (unsigned char)(UC|LC|DIG)); -; } - -_isalnum: - pop hl - pop de - push de - push hl - or a,a - sbc hl,hl - bit 7,e - ret nz - ex de,hl - ld de,___maptab - add hl,de - ld a,(hl) - and a,13 - sbc hl,hl - ld l,a - ret + .def _isalnum + .ref ___maptab + .assume adl=1 + +; original source +; int isalnum(int c) { +; if( (unsigned char)c & (unsigned char)0x80 ) +; return (0); +; return(__maptab[c] & (unsigned char)(UC|LC|DIG)); +; } + +_isalnum: + pop hl + pop de + push de + push hl + or a,a + sbc hl,hl + bit 7,e + ret nz + ex de,hl + ld de,___maptab + add hl,de + ld a,(hl) + and a,13 + sbc hl,hl + ld l,a + ret diff --git a/CEdev/lib/src/std/shared/isalpha.asm b/CEdev/lib/src/std/shared/isalpha.asm index 56bfc470c..94627baf7 100644 --- a/CEdev/lib/src/std/shared/isalpha.asm +++ b/CEdev/lib/src/std/shared/isalpha.asm @@ -1,27 +1,27 @@ - .def _isalpha - .ref ___maptab - .assume adl=1 - -; original source -; int isalnum(int c) { -; if( (unsigned char)c & (unsigned char)0x80 ) -; return (0); -; return(__maptab[c] & (unsigned char)(UC|LC)); - -_isalpha: - pop hl - pop de - push de - push hl - or a,a - sbc hl,hl - bit 7,e - ret nz - ex de,hl - ld de,___maptab - add hl,de - ld a,(hl) - and a,12 - sbc hl,hl - ld l,a - ret + .def _isalpha + .ref ___maptab + .assume adl=1 + +; original source +; int isalnum(int c) { +; if( (unsigned char)c & (unsigned char)0x80 ) +; return (0); +; return(__maptab[c] & (unsigned char)(UC|LC)); + +_isalpha: + pop hl + pop de + push de + push hl + or a,a + sbc hl,hl + bit 7,e + ret nz + ex de,hl + ld de,___maptab + add hl,de + ld a,(hl) + and a,12 + sbc hl,hl + ld l,a + ret diff --git a/CEdev/lib/src/std/shared/iscntrl.asm b/CEdev/lib/src/std/shared/iscntrl.asm index d6205c707..a8e786416 100644 --- a/CEdev/lib/src/std/shared/iscntrl.asm +++ b/CEdev/lib/src/std/shared/iscntrl.asm @@ -1,27 +1,27 @@ - .def _iscntrl - .ref ___maptab - .assume adl=1 - -;int iscntrl(int c) { -; if( (unsigned char)c & (unsigned char)0x80 ) -; return (0); -; return(__maptab[c] & (unsigned char)(CTL)); -;} - -_iscntrl: - pop hl - pop de - push de - push hl - or a,a - sbc hl,hl - bit 7,e - ret nz - ex de,hl - ld de,___maptab - add hl,de - ld a,(hl) - and a,128 - sbc hl,hl - ld l,a - ret + .def _iscntrl + .ref ___maptab + .assume adl=1 + +;int iscntrl(int c) { +; if( (unsigned char)c & (unsigned char)0x80 ) +; return (0); +; return(__maptab[c] & (unsigned char)(CTL)); +;} + +_iscntrl: + pop hl + pop de + push de + push hl + or a,a + sbc hl,hl + bit 7,e + ret nz + ex de,hl + ld de,___maptab + add hl,de + ld a,(hl) + and a,128 + sbc hl,hl + ld l,a + ret diff --git a/CEdev/lib/src/std/shared/isdigit.asm b/CEdev/lib/src/std/shared/isdigit.asm index 85179673d..bbd555a8e 100644 --- a/CEdev/lib/src/std/shared/isdigit.asm +++ b/CEdev/lib/src/std/shared/isdigit.asm @@ -1,27 +1,27 @@ - .def _isdigit - .ref ___maptab - .assume adl=1 - -;int isdigit(int c) { -; if( (unsigned char)c & (unsigned char)0x80 ) -; return (0); -; return(__maptab[c] & (unsigned char)(DIG)); -;} - -_isdigit: - pop hl - pop de - push de - push hl - or a,a - sbc hl,hl - bit 7,e - ret nz - ex de,hl - ld de,___maptab - add hl,de - ld a,(hl) - and a,1 - sbc hl,hl - ld l,a - ret + .def _isdigit + .ref ___maptab + .assume adl=1 + +;int isdigit(int c) { +; if( (unsigned char)c & (unsigned char)0x80 ) +; return (0); +; return(__maptab[c] & (unsigned char)(DIG)); +;} + +_isdigit: + pop hl + pop de + push de + push hl + or a,a + sbc hl,hl + bit 7,e + ret nz + ex de,hl + ld de,___maptab + add hl,de + ld a,(hl) + and a,1 + sbc hl,hl + ld l,a + ret diff --git a/CEdev/lib/src/std/shared/isgraph.asm b/CEdev/lib/src/std/shared/isgraph.asm index 063009d50..59bc61e0e 100644 --- a/CEdev/lib/src/std/shared/isgraph.asm +++ b/CEdev/lib/src/std/shared/isgraph.asm @@ -1,28 +1,28 @@ - .def _isgraph - .ref ___maptab - .assume adl=1 - -; original source -; int isgraph(int c) { -; if( (unsigned char)c & (unsigned char)0x80 ) -; return (0); -; return(__maptab[c] & (unsigned char)(UC|LC|DIG|PUN)); -; } - -_isgraph: - pop hl - pop de - push de - push hl - or a,a - sbc hl,hl - bit 7,e - ret nz - ex de,hl - ld de,___maptab - add hl,de - ld a,(hl) - and a,15 - sbc hl,hl - ld l,a - ret + .def _isgraph + .ref ___maptab + .assume adl=1 + +; original source +; int isgraph(int c) { +; if( (unsigned char)c & (unsigned char)0x80 ) +; return (0); +; return(__maptab[c] & (unsigned char)(UC|LC|DIG|PUN)); +; } + +_isgraph: + pop hl + pop de + push de + push hl + or a,a + sbc hl,hl + bit 7,e + ret nz + ex de,hl + ld de,___maptab + add hl,de + ld a,(hl) + and a,15 + sbc hl,hl + ld l,a + ret diff --git a/CEdev/lib/src/std/shared/islower.asm b/CEdev/lib/src/std/shared/islower.asm index 260a1d0c6..3f72f9ced 100644 --- a/CEdev/lib/src/std/shared/islower.asm +++ b/CEdev/lib/src/std/shared/islower.asm @@ -1,29 +1,29 @@ - .def _islower - .ref ___maptab - .assume adl=1 - -; original source -; int islower(int c) { -; if( (unsigned char)c & (unsigned char)0x80 ) -; return (0); -; return(__maptab[c] & (unsigned char)(LC)); -; } - -_islower: - pop hl - pop de - push de - push hl - or a,a - sbc hl,hl - ld a,e - and a,128 - ret nz - ex de,hl - ld de,___maptab - add hl,de - ld a,(hl) - and a,4 - sbc hl,hl - ld l,a - ret + .def _islower + .ref ___maptab + .assume adl=1 + +; original source +; int islower(int c) { +; if( (unsigned char)c & (unsigned char)0x80 ) +; return (0); +; return(__maptab[c] & (unsigned char)(LC)); +; } + +_islower: + pop hl + pop de + push de + push hl + or a,a + sbc hl,hl + ld a,e + and a,128 + ret nz + ex de,hl + ld de,___maptab + add hl,de + ld a,(hl) + and a,4 + sbc hl,hl + ld l,a + ret diff --git a/CEdev/lib/src/std/shared/isprint.asm b/CEdev/lib/src/std/shared/isprint.asm index ed19c412e..79b7bbfe7 100644 --- a/CEdev/lib/src/std/shared/isprint.asm +++ b/CEdev/lib/src/std/shared/isprint.asm @@ -1,28 +1,28 @@ - .def _isprint - .ref ___maptab - .assume adl=1 - -; original source -; int isprint(int c) { -; if( (unsigned char)c & (unsigned char)0x80 ) -; return (0); -; return(__maptab[c] & (unsigned char)(UC|LC|DIG|PUN|SP)); -; } - -_isprint: - pop hl - pop de - push de - push hl - or a,a - sbc hl,hl - bit 7,e - ret nz - ex de,hl - ld de,___maptab - add hl,de - ld a,(hl) - and a,47 - sbc hl,hl - ld l,a - ret + .def _isprint + .ref ___maptab + .assume adl=1 + +; original source +; int isprint(int c) { +; if( (unsigned char)c & (unsigned char)0x80 ) +; return (0); +; return(__maptab[c] & (unsigned char)(UC|LC|DIG|PUN|SP)); +; } + +_isprint: + pop hl + pop de + push de + push hl + or a,a + sbc hl,hl + bit 7,e + ret nz + ex de,hl + ld de,___maptab + add hl,de + ld a,(hl) + and a,47 + sbc hl,hl + ld l,a + ret diff --git a/CEdev/lib/src/std/shared/ispunct.asm b/CEdev/lib/src/std/shared/ispunct.asm index baefad2ee..52a2e79e5 100644 --- a/CEdev/lib/src/std/shared/ispunct.asm +++ b/CEdev/lib/src/std/shared/ispunct.asm @@ -1,28 +1,28 @@ - .def _ispunct - .ref ___maptab - .assume adl=1 - -; original source -; int ispunct(int c) { -; if( (unsigned char)c & (unsigned char)0x80 ) -; return (0); -; return(__maptab[c] & (unsigned char)(PUN)); -; } - -_ispunct: - pop hl - pop de - push de - push hl - or a,a - sbc hl,hl - bit 7,e - ret nz - ex de,hl - ld de,___maptab - add hl,de - ld a,(hl) - and a,2 - sbc hl,hl - ld l,a - ret + .def _ispunct + .ref ___maptab + .assume adl=1 + +; original source +; int ispunct(int c) { +; if( (unsigned char)c & (unsigned char)0x80 ) +; return (0); +; return(__maptab[c] & (unsigned char)(PUN)); +; } + +_ispunct: + pop hl + pop de + push de + push hl + or a,a + sbc hl,hl + bit 7,e + ret nz + ex de,hl + ld de,___maptab + add hl,de + ld a,(hl) + and a,2 + sbc hl,hl + ld l,a + ret diff --git a/CEdev/lib/src/std/shared/isspace.asm b/CEdev/lib/src/std/shared/isspace.asm index e6b8ec6d9..4e670f2ca 100644 --- a/CEdev/lib/src/std/shared/isspace.asm +++ b/CEdev/lib/src/std/shared/isspace.asm @@ -1,28 +1,28 @@ - .def _isspace - .ref ___maptab - .assume adl=1 - -; original source -; int isspace(int c) { -; if( (unsigned char)c & (unsigned char)0x80 ) -; return (0); -; return(__maptab[c] & (unsigned char)(WS)); -; } - -_isspace: - pop hl - pop de - push de - push hl - or a,a - sbc hl,hl - bit 7,e - ret nz - ex de,hl - ld de,___maptab - add hl,de - ld a,(hl) - and a,64 - sbc hl,hl - ld l,a - ret + .def _isspace + .ref ___maptab + .assume adl=1 + +; original source +; int isspace(int c) { +; if( (unsigned char)c & (unsigned char)0x80 ) +; return (0); +; return(__maptab[c] & (unsigned char)(WS)); +; } + +_isspace: + pop hl + pop de + push de + push hl + or a,a + sbc hl,hl + bit 7,e + ret nz + ex de,hl + ld de,___maptab + add hl,de + ld a,(hl) + and a,64 + sbc hl,hl + ld l,a + ret diff --git a/CEdev/lib/src/std/shared/isupper.asm b/CEdev/lib/src/std/shared/isupper.asm index 79b812edf..300474e67 100644 --- a/CEdev/lib/src/std/shared/isupper.asm +++ b/CEdev/lib/src/std/shared/isupper.asm @@ -1,28 +1,28 @@ - .def _isupper - .ref ___maptab - .assume adl=1 - -; original source -; int isupper(int c) { -; if( (unsigned char)c & (unsigned char)0x80 ) -; return (0); -; return(__maptab[c] & (unsigned char)(UC)); -; } - -_isupper: - pop hl - pop de - push de - push hl - or a,a - sbc hl,hl - bit 7,e - ret nz - ex de,hl - ld de,___maptab - add hl,de - ld a,(hl) - and a,8 - sbc hl,hl - ld l,a - ret + .def _isupper + .ref ___maptab + .assume adl=1 + +; original source +; int isupper(int c) { +; if( (unsigned char)c & (unsigned char)0x80 ) +; return (0); +; return(__maptab[c] & (unsigned char)(UC)); +; } + +_isupper: + pop hl + pop de + push de + push hl + or a,a + sbc hl,hl + bit 7,e + ret nz + ex de,hl + ld de,___maptab + add hl,de + ld a,(hl) + and a,8 + sbc hl,hl + ld l,a + ret diff --git a/CEdev/lib/src/std/shared/isxdigit.asm b/CEdev/lib/src/std/shared/isxdigit.asm index 354a161aa..9db54a47c 100644 --- a/CEdev/lib/src/std/shared/isxdigit.asm +++ b/CEdev/lib/src/std/shared/isxdigit.asm @@ -1,28 +1,28 @@ - .def _isxdigit - .ref ___maptab - .assume adl=1 - -; original source -; int isxdigit(int c) { -; if( (unsigned char)c & (unsigned char)0x80 ) -; return (0); -; return(__maptab[c] & (unsigned char)(DIG|HEX)); -; } - -_isxdigit: - pop hl - pop de - push de - push hl - or a,a - sbc hl,hl - bit 7,e - ret nz - ex de,hl - ld de,___maptab - add hl,de - ld a,(hl) - and a,17 - sbc hl,hl - ld l,a - ret + .def _isxdigit + .ref ___maptab + .assume adl=1 + +; original source +; int isxdigit(int c) { +; if( (unsigned char)c & (unsigned char)0x80 ) +; return (0); +; return(__maptab[c] & (unsigned char)(DIG|HEX)); +; } + +_isxdigit: + pop hl + pop de + push de + push hl + or a,a + sbc hl,hl + bit 7,e + ret nz + ex de,hl + ld de,___maptab + add hl,de + ld a,(hl) + and a,17 + sbc hl,hl + ld l,a + ret diff --git a/CEdev/lib/src/std/shared/maptab.c b/CEdev/lib/src/std/shared/maptab.c index 75ad5e950..cc6b6e9b0 100644 --- a/CEdev/lib/src/std/shared/maptab.c +++ b/CEdev/lib/src/std/shared/maptab.c @@ -1,38 +1,38 @@ -/************************************************************************/ -/* */ -/* Copyright (C)1987-2008 by */ -/* Zilog, Inc. */ -/* */ -/* San Jose, California */ -/* */ -/************************************************************************/ - -/* Mapping table for isxxx functions */ - -#define CTL 0x80 /* control character */ -#define WS 0x40 /* whitespace character */ -#define SP 0x20 /* space character */ -#define HEX 0x10 /* hex digit (A-Z,a-z) */ -#define UC 0x08 /* uppercase letter */ -#define LC 0x04 /* lowercase letter */ -#define PUN 0x02 /* punctuation */ -#define DIG 0x01 /* decimal digit (0-9) */ - -__rom unsigned char __maptab[128] = { -/* 0 */ CTL,PUN,PUN,PUN,PUN,PUN,PUN,PUN, -/* 8 */ PUN,PUN,PUN,PUN,PUN,PUN,PUN,PUN, -/* 10 */ PUN,PUN,PUN,PUN,PUN,PUN,PUN,PUN, -/* 18 */ PUN,PUN,PUN,PUN,PUN,PUN,PUN,PUN, -/* 20 */ WS|SP,PUN,PUN,PUN,PUN,PUN,PUN,PUN, -/* 28 */ PUN,PUN,PUN,PUN,PUN,PUN,PUN,PUN, -/* 30 */ DIG,DIG,DIG,DIG,DIG,DIG,DIG,DIG, -/* 38 */ DIG,DIG,PUN,PUN,PUN,PUN,PUN,PUN, -/* 40 */ PUN,UC|HEX,UC|HEX,UC|HEX,UC|HEX,UC|HEX,UC|HEX,UC, -/* 48 */ UC,UC,UC,UC,UC,UC,UC,UC, -/* 50 */ UC,UC,UC,UC,UC,UC,UC,UC, -/* 58 */ UC,UC,UC,PUN,PUN,PUN,PUN,PUN, -/* 60 */ PUN,LC|HEX,LC|HEX,LC|HEX,LC|HEX,LC|HEX,LC|HEX,LC, -/* 68 */ LC,LC,LC,LC,LC,LC,LC,LC, -/* 70 */ LC,LC,LC,LC,LC,LC,LC,LC, -/* 78 */ LC,LC,LC,PUN,PUN,PUN,PUN,PUN -}; +/************************************************************************/ +/* */ +/* Copyright (C)1987-2008 by */ +/* Zilog, Inc. */ +/* */ +/* San Jose, California */ +/* */ +/************************************************************************/ + +/* Mapping table for isxxx functions */ + +#define CTL 0x80 /* control character */ +#define WS 0x40 /* whitespace character */ +#define SP 0x20 /* space character */ +#define HEX 0x10 /* hex digit (A-Z,a-z) */ +#define UC 0x08 /* uppercase letter */ +#define LC 0x04 /* lowercase letter */ +#define PUN 0x02 /* punctuation */ +#define DIG 0x01 /* decimal digit (0-9) */ + +__rom unsigned char __maptab[128] = { +/* 0 */ CTL,PUN,PUN,PUN,PUN,PUN,PUN,PUN, +/* 8 */ PUN,PUN,PUN,PUN,PUN,PUN,PUN,PUN, +/* 10 */ PUN,PUN,PUN,PUN,PUN,PUN,PUN,PUN, +/* 18 */ PUN,PUN,PUN,PUN,PUN,PUN,PUN,PUN, +/* 20 */ WS|SP,PUN,PUN,PUN,PUN,PUN,PUN,PUN, +/* 28 */ PUN,PUN,PUN,PUN,PUN,PUN,PUN,PUN, +/* 30 */ DIG,DIG,DIG,DIG,DIG,DIG,DIG,DIG, +/* 38 */ DIG,DIG,PUN,PUN,PUN,PUN,PUN,PUN, +/* 40 */ PUN,UC|HEX,UC|HEX,UC|HEX,UC|HEX,UC|HEX,UC|HEX,UC, +/* 48 */ UC,UC,UC,UC,UC,UC,UC,UC, +/* 50 */ UC,UC,UC,UC,UC,UC,UC,UC, +/* 58 */ UC,UC,UC,PUN,PUN,PUN,PUN,PUN, +/* 60 */ PUN,LC|HEX,LC|HEX,LC|HEX,LC|HEX,LC|HEX,LC|HEX,LC, +/* 68 */ LC,LC,LC,LC,LC,LC,LC,LC, +/* 70 */ LC,LC,LC,LC,LC,LC,LC,LC, +/* 78 */ LC,LC,LC,PUN,PUN,PUN,PUN,PUN +};