mirror of
https://github.com/cc65/cc65.git
synced 2025-01-29 21:31:53 +00:00
Added .charmap
git-svn-id: svn://svn.cc65.org/cc65/trunk@1163 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
3b5808788b
commit
208090ea36
@ -6,7 +6,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* (C) 1998-2000 Ullrich von Bassewitz */
|
/* (C) 1998-2002 Ullrich von Bassewitz */
|
||||||
/* Wacholderweg 14 */
|
/* Wacholderweg 14 */
|
||||||
/* D-70597 Stuttgart */
|
/* D-70597 Stuttgart */
|
||||||
/* EMail: uz@musoftware.de */
|
/* EMail: uz@musoftware.de */
|
||||||
@ -373,6 +373,37 @@ static void DoCase (void)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void DoCharMap (void)
|
||||||
|
/* Allow custome character mappings */
|
||||||
|
{
|
||||||
|
long Index;
|
||||||
|
long Code;
|
||||||
|
|
||||||
|
/* Read the index as numerical value */
|
||||||
|
Index = ConstExpression ();
|
||||||
|
if (Index < 1 || Index > 255) {
|
||||||
|
/* Value out of range */
|
||||||
|
ErrorSkip (ERR_RANGE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Comma follows */
|
||||||
|
ConsumeComma ();
|
||||||
|
|
||||||
|
/* Read the character code */
|
||||||
|
Code = ConstExpression ();
|
||||||
|
if (Code < 1 || Code > 255) {
|
||||||
|
/* Value out of range */
|
||||||
|
ErrorSkip (ERR_RANGE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Set the character translation */
|
||||||
|
TgtTranslateSet ((unsigned) Index, (unsigned char) Code);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void DoCode (void)
|
static void DoCode (void)
|
||||||
/* Switch to the code segment */
|
/* Switch to the code segment */
|
||||||
{
|
{
|
||||||
@ -1317,6 +1348,7 @@ static CtrlDesc CtrlCmdTab [] = {
|
|||||||
{ ccNone, DoBss },
|
{ ccNone, DoBss },
|
||||||
{ ccNone, DoByte },
|
{ ccNone, DoByte },
|
||||||
{ ccNone, DoCase },
|
{ ccNone, DoCase },
|
||||||
|
{ ccNone, DoCharMap },
|
||||||
{ ccNone, DoCode },
|
{ ccNone, DoCode },
|
||||||
{ ccNone, DoUnexpected, }, /* .CONCAT */
|
{ ccNone, DoUnexpected, }, /* .CONCAT */
|
||||||
{ ccNone, DoConDes },
|
{ ccNone, DoConDes },
|
||||||
|
@ -133,6 +133,7 @@ struct DotKeyword {
|
|||||||
{ ".BYT", TOK_BYTE },
|
{ ".BYT", TOK_BYTE },
|
||||||
{ ".BYTE", TOK_BYTE },
|
{ ".BYTE", TOK_BYTE },
|
||||||
{ ".CASE", TOK_CASE },
|
{ ".CASE", TOK_CASE },
|
||||||
|
{ ".CHARMAP", TOK_CHARMAP },
|
||||||
{ ".CODE", TOK_CODE },
|
{ ".CODE", TOK_CODE },
|
||||||
{ ".CONCAT", TOK_CONCAT },
|
{ ".CONCAT", TOK_CONCAT },
|
||||||
{ ".CONDES", TOK_CONDES },
|
{ ".CONDES", TOK_CONDES },
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* (C) 1998-2000 Ullrich von Bassewitz */
|
/* (C) 1998-2002 Ullrich von Bassewitz */
|
||||||
/* Wacholderweg 14 */
|
/* Wacholderweg 14 */
|
||||||
/* D-70597 Stuttgart */
|
/* D-70597 Stuttgart */
|
||||||
/* EMail: uz@musoftware.de */
|
/* EMail: uz@musoftware.de */
|
||||||
@ -119,6 +119,7 @@ enum Token {
|
|||||||
TOK_BSS,
|
TOK_BSS,
|
||||||
TOK_BYTE,
|
TOK_BYTE,
|
||||||
TOK_CASE,
|
TOK_CASE,
|
||||||
|
TOK_CHARMAP,
|
||||||
TOK_CODE,
|
TOK_CODE,
|
||||||
TOK_CONCAT,
|
TOK_CONCAT,
|
||||||
TOK_CONDES,
|
TOK_CONDES,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user