home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Sleeping Beauty - A Multimedia Storybook
/
EBOOK_SB.bin
/
sb
/
sb.tbl
< prev
next >
Wrap
Text File
|
1991-05-01
|
12KB
|
252 lines
;*****************************************************************************
; *
; Generic.TBL (tabs @ 3,5,7,etc). *
; *
; Copyright (C) Microsoft Corporation 1990. *
; All Rights reserved. *
; *
;*****************************************************************************
; *
; Module Description: Default character interpretation tables *
; Used by W_SCAN, INDEX and FTENGINE runtime. *
; These tables are build into a binary file for the *
; 'longhorn' feature- custom table loading. *
;
; SEE REL NOTES FOR MORE INFO.
; *
;*****************************************************************************
TITLE RAWHIDE default character tables
AE equ 255 ; anything that maps to 255 is treated as two chars: 'AE'
; in the second stage lookup.
;----------------------------------
DIGIT equ 0
TERM equ 1
PERIOD equ 2
NUKE equ 3
NORM equ 4
COMMA equ 5
C_EOF equ 6
;----------------------------------
_TEXT SEGMENT
ORG 0h
;--------------------------------------------------------------------
Header equ $
dwMagic DW 70FDh ; Don't mess with any of the header values
dwMajor DW 0 ; or W_scan and Index will reject the file.
dwMinor DW 0 ;
dwReserved DW 0 ;
;--------------------------------------------------------------------
;
aucNormTab DB 0, 1, 2, 3, 4, 5, 6, 7
DB 8, 9, 10, 11, 12, 13, 14, 15
DB 16, 17, 18, 19, 20, 21, 22, 23
DB 24, 25, 26, 27, 28, 29, 30, 31
DB ' ', '!', '"', '#', '$', '%', '&', "'"
DB '(', ')', '*', '+', ',', '-', '.', '/'
DB '0', '1', '2', '3', '4', '5', '6', '7'
DB '8', '9', ':', ';', '<', '=', '>', '?'
DB '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G'
DB 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O'
DB 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W'
DB 'X', 'Y', 'Z', '[', '\', ']', '^', '_'
DB '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G'
DB 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O'
DB 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W'
DB 'X', 'Y', 'Z', '{', '|', '}', '~', ''
DB 128, 129, 130, 131, 132, 133, 134, 135
DB 136, 137, 138, 139, 140, 141, 142, 143
DB 144, 145, 146, 147, 148, 149, 150, 151
DB 152, 153, 154, 155, 156, 157, 158, 159
DB 160, 161, 'C', 'L', 'O', 'Y', '|', 167
DB '"', 'C', 'A', 171, 172, '-', 'R', '-'
DB 'O', 177, '2', '3', "'", 'M', 'P', '.'
DB 184, '1', 'O', 187, 188, 189, 190, 191
DB 'A', 'A', 'A', 'A', 'A', 'A', AE, 'C'
DB 'E', 'E', 'E', 'E', 'I', 'I', 'I', 'I'
DB 'D', 'N', 'O', 'O', 'O', 'O', 'O', 215
DB '0', 'U', 'U', 'U', 'U', 'Y', 'P', 'B'
DB 'A', 'A', 'A', 'A', 'A', 'A', AE, 'C'
DB 'E', 'E', 'E', 'E', 'I', 'I', 'I', 'I'
DB 'O', 'N', 'O', 'O', 'O', 'O', 'O', 247
DB '0', 'U', 'U', 'U', 'U', 'Y', 'B', 'Y'
;------------------------------------------------------------------
aucCharTab EQU $
; 0 1 2 3 4 5 6 7
DB TERM ,TERM ,TERM ,TERM ,TERM ,TERM ,TERM ,TERM
; 8 9 10 11 12 13 14 15
DB TERM ,TERM ,TERM ,TERM ,TERM ,TERM ,TERM ,TERM
; 16 -23
DB TERM, TERM, TERM, TERM, TERM, TERM, TERM, TERM
; TERM, /* 16 */ TERM, /* 17 */ TERM, /* 18 */ TERM, /* 19 */
; TERM, /* 20 */ TERM, /* 21 */ TERM, /* 22 */ TERM, /* 23 */
; TERM, /* 24 */ TERM, /* 25 */ TERM, /* 26 */ TERM, /* 27 */
; TERM, /* 28 */ TERM, /* 29 */ TERM, /* 30 */ TERM, /* 31 */
; 24-31
DB TERM, TERM, TERM, TERM, TERM, TERM, TERM, TERM
; TERM, /* */ TERM, /* ! */ TERM, /* " */ TERM, /* # */
DB TERM, TERM, TERM, TERM
; TERM, /* $ */ TERM, /* % */ TERM, /* & */ NUKE, /* ' */
; TERM, /* ( */ TERM, /* ) */ TERM, /* * */ TERM, /* + */
DB TERM, TERM, TERM, NUKE, TERM, TERM, TERM, TERM
; COMMA,/* , */ TERM, /* - */ PERIOD, /* . */ TERM, /* / */
; DIGIT,/* #0 */ DIGIT, /* #1 */ DIGIT, /* #2 */ DIGIT, /* #3 */
DB COMMA, TERM, PERIOD, TERM, DIGIT, DIGIT, DIGIT, DIGIT
; DIGIT,/* #4 */ DIGIT, /* #5 */ DIGIT, /* #6 */ DIGIT, /* #7 */
; DIGIT,/* #8 */ DIGIT, /* #9 */ TERM, /* : */ TERM, /* ; */
DB DIGIT,DIGIT, DIGIT, DIGIT, DIGIT, DIGIT, TERM, TERM
; TERM, /* < */ TERM, /* = */ TERM, /* > */ TERM, /* ? */
; TERM, /* @ */ NORM, /* A */ NORM, /* B */ NORM, /* C */
DB TERM, TERM, TERM, TERM, TERM, NORM, NORM, NORM
; NORM, /* D */ NORM, /* E */ NORM, /* F */ NORM, /* G */
; NORM, /* H */ NORM, /* I */ NORM, /* J */ NORM, /* K */
DB NORM, NORM, NORM, NORM, NORM, NORM, NORM, NORM
; NORM, /* L */ NORM, /* M */ NORM, /* N */ NORM, /* O */
; NORM, /* P */ NORM, /* Q */ NORM, /* R */ NORM, /* S */
DB NORM, NORM, NORM, NORM, NORM, NORM, NORM, NORM
; NORM, /* T */ NORM, /* U */ NORM, /* V */ NORM, /* W */
; NORM, /* X */ NORM, /* Y */ NORM, /* Z */ TERM, /* [ */
DB NORM, NORM, NORM, NORM, NORM, NORM, NORM, TERM
; TERM, /* \ */ TERM, /* ] */ TERM, /* ^ */ NORM, /* _ */
; TERM, /* ` */ NORM, /* a */ NORM, /* b */ NORM, /* c */
DB TERM, TERM, TERM, NORM, TERM, NORM, NORM, NORM
; NORM, /* d */ NORM, /* e */ NORM, /* f */ NORM, /* g */
; NORM, /* h */ NORM, /* i */ NORM, /* j */ NORM, /* k */
DB NORM, NORM, NORM, NORM, NORM, NORM, NORM, NORM
; NORM, /* l */ NORM, /* m */ NORM, /* n */ NORM, /* o */
; NORM, /* p */ NORM, /* q */ NORM, /* r */ NORM, /* s */
DB NORM, NORM, NORM, NORM, NORM, NORM, NORM, NORM
; NORM, /* t */ NORM, /* u */ NORM, /* v */ NORM, /* w */
; NORM, /* x */ NORM, /* y */ NORM, /* z */ TERM, /* { */
DB NORM, NORM, NORM, NORM, NORM, NORM, NORM, TERM
; TERM, /* | */ TERM, /* } */ TERM, /* ~ */ NORM, /* 127 */
; NORM, /* 128 */ NORM, /* 129 */ NORM, /* 130 */ NORM, /* 131 */
DB TERM, TERM, TERM, NORM, NORM, NORM, NORM, NORM
; NORM, /* 132 */ NORM, /* 133 */ NORM, /* 134 */ NORM, /* 135 */
; NORM, /* 136 */ NORM, /* 137 */ NORM, /* 138 */ NORM, /* 139 */
DB NORM, NORM, NORM, NORM, NORM, NORM, NORM, NORM
; NORM, /* 140 */ NORM, /* 141 */ NORM, /* 142 */ NORM, /* 143 */
; NORM, /* 144 */ NORM, /* 145 */ NORM, /* 146 */ NORM, /* 147 */
DB NORM, NORM, NORM, NORM, NORM, NORM, NORM, NORM
; NORM, /* 148 */ NORM, /* 149 */ NORM, /* 150 */ NORM, /* 151 */
; NORM, /* 152 */ NORM, /* 153 */ NORM, /* 154 */ NORM, /* 155 */
DB NORM, NORM, NORM, NORM, NORM, NORM, NORM, NORM
; NORM, /* 156 */ NORM, /* 157 */ NORM, /* 158 */ NORM, /* 159 */
; NORM, /* 160 */ NORM, /* 161 */ NORM, /* 162 */ NORM, /* 163 */
DB NORM, NORM, NORM, NORM, NORM, NORM, NORM, NORM
; NORM, /* 164 */ NORM, /* 165 */ NORM, /* 166 */ NORM, /* 167 */
; NORM, /* 168 */ NORM, /* 169 */ NORM, /* 170 */ NORM, /* 171 */
DB NORM, NORM, NORM, NORM, NORM, NORM, NORM, NORM
; NORM, /* 172 */ NORM, /* 173 */ NORM, /* 174 */ NORM, /* 175 */
; NORM, /* 176 */ NORM, /* 177 */ NORM, /* 178 */ NORM, /* 179 */
DB NORM, NORM, NORM, NORM, NORM, NORM, NORM, NORM
; NORM, /* 180 */ NORM, /* 181 */ NORM, /* 182 */ NORM, /* 183 */
; NORM, /* 184 */ NORM, /* 185 */ NORM, /* 186 */ NORM, /* 187 */
DB NORM, NORM, NORM, NORM, NORM, NORM, NORM, NORM
; NORM, /* 188 */ NORM, /* 189 */ NORM, /* 190 */ NORM, /* 191 */
; NORM, /* 192 */ NORM, /* 193 */ NORM, /* 194 */ NORM, /* 195 */
DB NORM, NORM, NORM, NORM, NORM, NORM, NORM, NORM
; NORM, /* 196 */ NORM, /* 197 */ NORM, /* 198 */ NORM, /* 199 */
; NORM, /* 200 */ NORM, /* 201 */ NORM, /* 202 */ NORM, /* 203 */
DB NORM, NORM, NORM, NORM, NORM, NORM, NORM, NORM
; NORM, /* 204 */ NORM, /* 205 */ NORM, /* 206 */ NORM, /* 207 */
; NORM, /* 208 */ NORM, /* 209 */ NORM, /* 210 */ NORM, /* 211 */
DB NORM, NORM, NORM, NORM, NORM, NORM, NORM, NORM
; NORM, /* 212 */ NORM, /* 213 */ NORM, /* 214 */ NORM, /* 215 */
; NORM, /* 216 */ NORM, /* 217 */ NORM, /* 218 */ NORM, /* 219 */
DB NORM, NORM, NORM, NORM, NORM, NORM, NORM, NORM
; NORM, /* 220 */ NORM, /* 221 */ NORM, /* 222 */ NORM, /* 223 */
; NORM, /* 224 */ NORM, /* 225 */ NORM, /* 226 */ NORM, /* 227 */
DB NORM, NORM, NORM, NORM, NORM, NORM, NORM, NORM
; NORM, /* 228 */ NORM, /* 229 */ NORM, /* 230 */ NORM, /* 231 */
; NORM, /* 232 */ NORM, /* 233 */ NORM, /* 234 */ NORM, /* 235 */
DB NORM, NORM, NORM, NORM, NORM, NORM, NORM, NORM
; NORM, /* 236 */ NORM, /* 237 */ NORM, /* 238 */ NORM, /* 239 */
; NORM, /* 240 */ NORM, /* 241 */ NORM, /* 242 */ NORM, /* 243 */
DB NORM, NORM, NORM, NORM, NORM, NORM, NORM, NORM
; NORM, /* 244 */ NORM, /* 245 */ NORM, /* 246 */ NORM, /* 247 */
; NORM, /* 248 */ NORM, /* 249 */ NORM, /* 250 */ NORM, /* 251 */
DB NORM, NORM, NORM, NORM, NORM, NORM, NORM, NORM
; NORM, /* 252 */ NORM, /* 253 */ NORM, /* 254 */ NORM, /* 255 */
DB NORM, NORM, NORM, NORM
;************************************************************************
aucConvertClass equ $
;
;
;char aucConvertClass[NUM_STATES][NUM_CLASSES] = {
;
;// Characters in certain contexts have different classifications.
;// Classification is a two step process. After initial classification
;// using the table above, the table below is used to determine if the character's
;// initial classification should be changed after considering the type of
;// the word the character is found in. (Word types [numeric, numeric with
;// a decimal place, and mixed alphanumeric] are also referred to as
;// 'states'.
;//
;// EG: char in parse is '.', using aucCharTab, it is classed as PERIOD, If
;// char is the first in the word (no word type set yet) the character is
;// dropped, because the aucConvertClass table said to NUKE it. (!jjm)
;// If the period were found in a "Numeric" word with numbers only and no decimal had
;// yet occured it remains as a "PERIOD" (state switching is not table driven- this is
;// done by program logic.
;//
;// Word Type /<----- Initial Character Classification ----->\
;// | | || DIGIT, TERM, PERIOD, NUKE, NORM, COMMA, C_EOF
;// V V || V V V V V V V
;//---------------------------------------------------------------------
;/* -None- || */ DIGIT, NUKE, NUKE, NUKE, NORM, NUKE, C_EOF,
;/* Numeric || */ DIGIT, TERM, PERIOD, TERM, NORM, COMMA, C_EOF,
;/* Numeric+Decimal || */ DIGIT, TERM, TERM, TERM, NORM, TERM, C_EOF,
;/* AlphaNumeric || */ DIGIT, TERM, TERM, NUKE, NORM, TERM, C_EOF,
;};
DB DIGIT, NUKE, NUKE, NUKE, NORM, NUKE, C_EOF
DB DIGIT, TERM, PERIOD, TERM, NORM, COMMA, C_EOF
DB DIGIT, TERM, TERM, TERM, NORM, TERM, C_EOF
DB DIGIT, TERM, TERM, NUKE, NORM, TERM, C_EOF
;-------------------------------------------------------------------------
endofTables equ $
;*************************************************************************
IF2
%OUT ......Header Check...
.ERRE aucNormTab - Header EQ 8
%OUT
%OUT ......Character Replacement Table (aucNormTab) Check...
.ERRE aucCharTab - aucNormTab EQ 256
%OUT
%OUT ......Character Classification Table (aucCharTab) Check...
.ERRE aucConvertCLASS - aucCharTab EQ 256
%OUT
%OUT ......Character ReClassification Table (aucConvertClass) Check...
.ERRE endofTables - aucConvertClass EQ 28
%OUT
ENDIF
_TEXT ENDS
end