From fd8d51497c0867f42e3e9ff0a472cb9ad63ecd18 Mon Sep 17 00:00:00 2001 From: empathicqubit Date: Fri, 10 Sep 2021 21:09:22 +0200 Subject: [PATCH 001/101] Add --debug-tables option and output struct and union fields --- src/cc65/global.c | 7 +++-- src/cc65/global.h | 1 + src/cc65/main.c | 8 ++++- src/cc65/symtab.c | 74 +++++++++++++++++++++++++++++++++++++++++------ 4 files changed, 77 insertions(+), 13 deletions(-) diff --git a/src/cc65/global.c b/src/cc65/global.c index a337549fe..8b9838dc5 100644 --- a/src/cc65/global.c +++ b/src/cc65/global.c @@ -66,6 +66,7 @@ IntStack CodeSizeFactor = INTSTACK(100);/* Size factor for generated code */ IntStack DataAlignment = INTSTACK(1); /* Alignment for data */ /* File names */ -StrBuf DepName = STATIC_STRBUF_INITIALIZER; /* Name of dependencies file */ -StrBuf FullDepName = STATIC_STRBUF_INITIALIZER; /* Name of full dependencies file */ -StrBuf DepTarget = STATIC_STRBUF_INITIALIZER; /* Name of dependency target */ +StrBuf DepName = STATIC_STRBUF_INITIALIZER; /* Name of dependencies file */ +StrBuf FullDepName = STATIC_STRBUF_INITIALIZER; /* Name of full dependencies file */ +StrBuf DepTarget = STATIC_STRBUF_INITIALIZER; /* Name of dependency target */ +StrBuf DebugTableName = STATIC_STRBUF_INITIALIZER; /* Name of debug table dump file */ diff --git a/src/cc65/global.h b/src/cc65/global.h index b9bcf5550..266035346 100644 --- a/src/cc65/global.h +++ b/src/cc65/global.h @@ -77,6 +77,7 @@ extern IntStack DataAlignment; /* Alignment for data */ extern StrBuf DepName; /* Name of dependencies file */ extern StrBuf FullDepName; /* Name of full dependencies file */ extern StrBuf DepTarget; /* Name of dependency target */ +extern StrBuf DebugTableName; /* Name of debug table dump file */ diff --git a/src/cc65/main.c b/src/cc65/main.c index 5d1fd7487..38c4b4c9d 100644 --- a/src/cc65/main.c +++ b/src/cc65/main.c @@ -114,6 +114,7 @@ static void Usage (void) " --create-full-dep name\tCreate a full make dependency file\n" " --data-name seg\t\tSet the name of the DATA segment\n" " --debug\t\t\tDebug mode\n" + " --debug-tables name\t\tWrite symbol table debug info to a file\n" " --debug-info\t\t\tAdd debug info to object file\n" " --debug-opt name\t\tDebug optimization steps\n" " --debug-opt-output\t\tDebug output of each optimization step\n" @@ -490,7 +491,11 @@ static void OptDebug (const char* Opt attribute ((unused)), ++Debug; } - +static void OptDebugTables (const char* Opt, const char* Arg) +/* Dump tables to file */ +{ + FileNameOption (Opt, Arg, &DebugTableName); +} static void OptDebugInfo (const char* Opt attribute ((unused)), const char* Arg attribute ((unused))) @@ -861,6 +866,7 @@ int main (int argc, char* argv[]) { "--create-full-dep", 1, OptCreateFullDep }, { "--data-name", 1, OptDataName }, { "--debug", 0, OptDebug }, + { "--debug-tables", 1, OptDebugTables }, { "--debug-info", 0, OptDebugInfo }, { "--debug-opt", 1, OptDebugOpt }, { "--debug-opt-output", 0, OptDebugOptOutput }, diff --git a/src/cc65/symtab.c b/src/cc65/symtab.c index 5d7bd1436..64016339c 100644 --- a/src/cc65/symtab.c +++ b/src/cc65/symtab.c @@ -37,6 +37,7 @@ #include #include #include +#include /* common */ #include "check.h" @@ -68,8 +69,6 @@ /* Data */ /*****************************************************************************/ - - /* An empty symbol table */ SymTable EmptySymTab = { 0, /* PrevTab */ @@ -98,6 +97,7 @@ static SymTable* LabelTab = 0; static SymTable* SPAdjustTab = 0; static SymTable* FailSafeTab = 0; /* For errors */ +static FILE* DebugTableFile = 0; /*****************************************************************************/ /* struct SymTable */ @@ -219,11 +219,25 @@ unsigned GetLexicalLevel (void) return LexicalLevel; } - - void EnterGlobalLevel (void) /* Enter the program global lexical level */ { + const char* OutName = NULL; + if (!SB_IsEmpty (&DebugTableName)) { + OutName = SB_GetConstBuf (&DebugTableName); + } + + if (OutName) { + /* Open the table file */ + DebugTableFile = fopen (OutName, "w"); + if (DebugTableFile == 0) { + Error ("Cannot create table dump file '%s': %s", OutName, strerror (errno)); + } + } + else if (Debug) { + DebugTableFile = stdout; + } + /* Safety */ PRECONDITION (++LexicalLevel == LEX_LEVEL_GLOBAL); @@ -240,8 +254,6 @@ void EnterGlobalLevel (void) FailSafeTab = NewSymTable (SYMTAB_SIZE_GLOBAL); } - - void LeaveGlobalLevel (void) /* Leave the program global lexical level */ { @@ -252,9 +264,41 @@ void LeaveGlobalLevel (void) CheckSymTable (SymTab0); /* Dump the tables if requested */ - if (Debug) { - PrintSymTable (SymTab0, stdout, "Global symbol table"); - PrintSymTable (TagTab0, stdout, "Global tag table"); + if (DebugTableFile) { + SymEntry* Entry; + StrBuf* Header; + + PrintSymTable (SymTab0, DebugTableFile, "Global symbol table"); + PrintSymTable (TagTab0, DebugTableFile, "Global tag table"); + + Entry = TagTab0->SymHead; + if (Entry) { + fputs ("\nGlobal struct and union definitions", DebugTableFile); + fputs ("\n=========================\n", DebugTableFile); + + do { + if (!((Entry->Flags & SC_STRUCT) || (Entry->Flags & SC_UNION)) || !Entry->V.S.SymTab) { + continue; + } + + Header = NewStrBuf(); + if(Entry->Flags & SC_STRUCT) { + SB_AppendStr (Header, "SC_STRUCT: "); + } + else { + SB_AppendStr (Header, "SC_UNION: "); + } + SB_AppendStr (Header, Entry->Name); + SB_Terminate (Header); + + PrintSymTable (Entry->V.S.SymTab, DebugTableFile, SB_GetConstBuf (Header)); + } while ((Entry = Entry->NextSym)); + } + + /* Close the file */ + if (DebugTableFile != stdout && fclose (DebugTableFile) != 0) { + Error ("Error closing table dump file '%s': %s", SB_GetConstBuf(&DebugTableName), strerror (errno)); + } } /* Don't delete the symbol and struct tables! */ @@ -337,6 +381,18 @@ void LeaveFunctionLevel (void) CheckSymTable (SymTab); CheckSymTable (LabelTab); + /* Dump the tables if requested */ + if (DebugTableFile) { + StrBuf* SymbolHeader = NewStrBuf(); + + SB_AppendStr (SymbolHeader, "SC_FUNC: "); + SB_AppendStr (SymbolHeader, CurrentFunc->FuncEntry->AsmName); + SB_AppendStr (SymbolHeader, ": Symbol table"); + SB_Terminate (SymbolHeader); + + PrintSymTable (SymTab, DebugTableFile, SB_GetConstBuf(SymbolHeader)); + } + /* Drop the label table if it is empty */ if (LabelTab->SymCount == 0) { FreeSymTable (LabelTab); From 2d96f79bc732bf5ba36f9dc05cf425aa0e54a9da Mon Sep 17 00:00:00 2001 From: acqn Date: Wed, 1 Dec 2021 09:45:17 +0800 Subject: [PATCH 002/101] Added and used new utility type functions for bit-fields. Fixed GetUnderlyingTypeCode() for bit-fields with widths > 16. --- src/cc65/assignment.c | 34 ++++------------------ src/cc65/datatype.c | 66 ++++++++++++++++++++++++++++++++++++++++--- src/cc65/datatype.h | 6 ++++ src/cc65/expr.c | 4 +-- src/cc65/loadexpr.c | 36 ++++++++++------------- src/cc65/loadexpr.h | 5 +++- 6 files changed, 95 insertions(+), 56 deletions(-) diff --git a/src/cc65/assignment.c b/src/cc65/assignment.c index 05a6d9a96..e6d1e4526 100644 --- a/src/cc65/assignment.c +++ b/src/cc65/assignment.c @@ -156,19 +156,8 @@ void DoIncDecBitField (ExprDesc* Expr, long Val, unsigned KeepResult) unsigned ChunkFlags; const Type* ChunkType; - /* If the bit-field fits within one byte, do the following operations - ** with bytes. - */ - if ((Expr->Type->A.B.Width - 1U) / CHAR_BITS == - (Expr->Type->A.B.Offs + Expr->Type->A.B.Width - 1U) / CHAR_BITS) { - ChunkType = GetUnderlyingType (Expr->Type); - } else { - /* We use the declarartion integer type as the chunk type. - ** Note: A bit-field will not occupy bits located in bytes more than - ** that of its declaration type in cc65. So this is OK. - */ - ChunkType = Expr->Type + 1; - } + /* Determine the type to operate on the whole byte chunk containing the bit-field */ + ChunkType = GetBitFieldChunkType (Expr->Type); /* Determine code generator flags */ Flags = TypeOf (Expr->Type) | CF_FORCECHAR; @@ -254,19 +243,8 @@ static void OpAssignBitField (const GenDesc* Gen, ExprDesc* Expr, const char* Op ED_Init (&Expr2); Expr2.Flags |= Expr->Flags & E_MASK_KEEP_SUBEXPR; - /* If the bit-field fits within one byte, do the following operations - ** with bytes. - */ - if ((Expr->Type->A.B.Width - 1U) / CHAR_BITS == - (Expr->Type->A.B.Offs + Expr->Type->A.B.Width - 1U) / CHAR_BITS) { - ChunkType = GetUnderlyingType (Expr->Type); - } else { - /* We use the declarartion integer type as the chunk type. - ** Note: A bit-field will not occupy bits located in bytes more than - ** that of its declaration type in cc65. So this is OK. - */ - ChunkType = Expr->Type + 1; - } + /* Determine the type to operate on the whole byte chunk containing the bit-field */ + ChunkType = GetBitFieldChunkType (Expr->Type); /* Determine code generator flags */ Flags = TypeOf (Expr->Type) | CF_FORCECHAR; @@ -620,8 +598,8 @@ void OpAssign (const GenDesc* Gen, ExprDesc* Expr, const char* Op) if (IsClassStruct (ltype)) { /* Copy the struct or union by value */ CopyStruct (Expr, &Expr2); - } else if (IsTypeBitField (ltype)) { - /* Special care is needed for bit-field 'op=' */ + } else if (IsTypeFragBitField (ltype)) { + /* Special care is needed for bit-fields if they don't fit in full bytes */ OpAssignBitField (Gen, Expr, Op); } else { /* Normal straight 'op=' */ diff --git a/src/cc65/datatype.c b/src/cc65/datatype.c index cc313bd21..bb7c40476 100644 --- a/src/cc65/datatype.c +++ b/src/cc65/datatype.c @@ -551,6 +551,24 @@ unsigned long GetIntegerTypeMax (const Type* Type) +static unsigned GetBitFieldMinimalTypeSize (unsigned BitWidth) +/* Return the size of the smallest integer type that may have BitWidth bits */ +{ + /* Since all integer types supported in cc65 for bit-fields have sizes that + ** are powers of 2, we can just use this bit-twiddling trick. + */ + unsigned V = (int)(BitWidth - 1U) / (int)CHAR_BITS; + V |= V >> 1; + V |= V >> 2; + V |= V >> 4; + V |= V >> 8; + V |= V >> 16; + + /* Return the result size */ + return V + 1U; +} + + static unsigned TypeOfBySize (unsigned Size) /* Get the code generator replacement type of the object by its size */ { @@ -591,8 +609,7 @@ const Type* GetUnderlyingType (const Type* Type) ** bit-field, instead of the type used in the declaration, the truly ** underlying of the bit-field. */ - unsigned Size = (int)(Type->A.B.Width - 1) / (int)CHAR_BITS + 1; - switch (Size) { + switch (GetBitFieldMinimalTypeSize (Type->A.B.Width)) { case SIZEOF_CHAR: Type = IsSignSigned (Type) ? type_schar : type_uchar; break; case SIZEOF_INT: Type = IsSignSigned (Type) ? type_int : type_uint; break; case SIZEOF_LONG: Type = IsSignSigned (Type) ? type_long : type_ulong; break; @@ -646,8 +663,7 @@ TypeCode GetUnderlyingTypeCode (const Type* Type) ** bit-field, instead of the type used in the declaration, the truly ** underlying of the bit-field. */ - unsigned Size = (int)(Type->A.B.Width - 1) / (int)CHAR_BITS + 1; - switch (Size) { + switch (GetBitFieldMinimalTypeSize (Type->A.B.Width)) { case SIZEOF_CHAR: Underlying = T_CHAR; break; case SIZEOF_INT: Underlying = T_INT; break; case SIZEOF_LONG: Underlying = T_LONG; break; @@ -663,6 +679,39 @@ TypeCode GetUnderlyingTypeCode (const Type* Type) +const Type* GetBitFieldChunkType (const Type* Type) +/* Get the type needed to operate on the byte chunk containing the bit-field */ +{ + unsigned ChunkSize; + if ((Type->A.B.Width - 1U) / CHAR_BITS == + (Type->A.B.Offs + Type->A.B.Width - 1U) / CHAR_BITS) { + /* T bit-field fits within its underlying type */ + return GetUnderlyingType (Type); + } + + ChunkSize = GetBitFieldMinimalTypeSize (Type->A.B.Offs + Type->A.B.Width); + if (ChunkSize < SizeOf (Type + 1)) { + /* The end of the bit-field is offset by some bits so that it requires + ** more bytes to be accessed as a whole than its underlying type does. + ** Note: In cc65 the bit offset is always less than CHAR_BITS. + */ + switch (ChunkSize) { + case SIZEOF_CHAR: return IsSignSigned (Type) ? type_schar : type_uchar; + case SIZEOF_INT: return IsSignSigned (Type) ? type_int : type_uint; + case SIZEOF_LONG: return IsSignSigned (Type) ? type_long : type_ulong; + default: return IsSignSigned (Type) ? type_int : type_uint; + } + } + + /* We can always use the declarartion integer type as the chunk type. + ** Note: A bit-field will not occupy bits located in bytes more than that + ** of its declaration type in cc65. So this is OK. + */ + return Type + 1; +} + + + unsigned SizeOf (const Type* T) /* Compute size of object represented by type array. */ { @@ -1127,6 +1176,15 @@ Type* NewBitFieldType (const Type* T, unsigned BitOffs, unsigned BitWidth) +int IsTypeFragBitField (const Type* T) +/* Return true if this is a bit-field that shares byte space with other fields */ +{ + return IsTypeBitField (T) && + (T->A.B.Offs != 0 || T->A.B.Width != CHAR_BITS * SizeOf (T)); +} + + + int IsClassObject (const Type* T) /* Return true if this is a fully described object type */ { diff --git a/src/cc65/datatype.h b/src/cc65/datatype.h index e36d7c82e..c60023944 100644 --- a/src/cc65/datatype.h +++ b/src/cc65/datatype.h @@ -313,6 +313,9 @@ TypeCode GetUnderlyingTypeCode (const Type* Type); ** Return TCode if it is not scalar. */ +const Type* GetBitFieldChunkType (const Type* Type); +/* Get the type needed to operate on the byte chunk containing the bit-field */ + unsigned SizeOf (const Type* T); /* Compute size of object represented by type array. */ @@ -556,6 +559,9 @@ INLINE int IsTypeBitField (const Type* T) # define IsTypeBitField(T) (IsTypeSignedBitField (T) || IsTypeUnsignedBitField (T)) #endif +int IsTypeFragBitField (const Type* T); +/* Return true if this is a bit-field that shares byte space with other fields */ + #if defined(HAVE_INLINE) INLINE int IsTypeStruct (const Type* T) /* Return true if this is a struct type */ diff --git a/src/cc65/expr.c b/src/cc65/expr.c index 7343702ea..3b3754665 100644 --- a/src/cc65/expr.c +++ b/src/cc65/expr.c @@ -398,7 +398,7 @@ static void DoInc (ExprDesc* Expr, unsigned KeepResult) Val = IsTypePtr (Expr->Type) ? CheckedSizeOf (Expr->Type + 1) : 1; /* Special treatment is needed for bit-fields */ - if (IsTypeBitField (Expr->Type)) { + if (IsTypeFragBitField (Expr->Type)) { DoIncDecBitField (Expr, Val, KeepResult); return; } @@ -485,7 +485,7 @@ static void DoDec (ExprDesc* Expr, unsigned KeepResult) Val = IsTypePtr (Expr->Type) ? CheckedSizeOf (Expr->Type + 1) : 1; /* Special treatment is needed for bit-fields */ - if (IsTypeBitField (Expr->Type)) { + if (IsTypeFragBitField (Expr->Type)) { DoIncDecBitField (Expr, -Val, KeepResult); return; } diff --git a/src/cc65/loadexpr.c b/src/cc65/loadexpr.c index a742087b7..4b7f8e279 100644 --- a/src/cc65/loadexpr.c +++ b/src/cc65/loadexpr.c @@ -110,6 +110,8 @@ static void LoadAddress (unsigned Flags, ExprDesc* Expr) void LoadExpr (unsigned Flags, struct ExprDesc* Expr) /* Load an expression into the primary register if it is not already there. +** If Flags contains any CF_TYPEMASK bits, it then overrides the codegen type +** info that would be otherwise taken from the expression type. ** Note: This function can't modify the content in Expr since there are many ** instances of the "GetCodePos + LoadExpr (maybe indirectly) + RemoveCode" ** code pattern here and there which assumes that Expr should be unchanged, @@ -125,32 +127,24 @@ void LoadExpr (unsigned Flags, struct ExprDesc* Expr) int AdjustBitField = 0; unsigned BitFieldFullWidthFlags = 0; if ((Flags & CF_TYPEMASK) == 0) { - if (IsTypeBitField (Expr->Type)) { - unsigned EndBit = Expr->Type->A.B.Offs + Expr->Type->A.B.Width; - AdjustBitField = Expr->Type->A.B.Offs != 0 || (EndBit != CHAR_BITS && EndBit != INT_BITS); - - /* TODO: This probably needs to be guarded by AdjustBitField when long bit-fields are - ** supported. - */ - Flags |= (EndBit <= CHAR_BITS) ? CF_CHAR : CF_INT; - if (IsSignUnsigned (Expr->Type)) { - Flags |= CF_UNSIGNED; - } + if (IsTypeFragBitField (Expr->Type)) { + /* We need to adjust the bits in this case. */ + AdjustBitField = 1; /* Flags we need operate on the whole bit-field, without CF_FORCECHAR. */ - BitFieldFullWidthFlags = Flags; + BitFieldFullWidthFlags = Flags | TypeOf (Expr->Type); + + /* Flags we need operate on the whole chunk containing the bit-field. */ + Flags |= TypeOf (GetBitFieldChunkType (Expr->Type)); /* If we're adjusting, then only load a char (not an int) and do only char ops; - ** We will clear the high byte in the adjustment. CF_FORCECHAR does nothing if the - ** type is not CF_CHAR. + ** We will clear the high byte in the adjustment. CF_FORCECHAR does nothing if + ** the type is not CF_CHAR; + ** If adjusting, then we're sign extending manually, so do everything unsigned + ** to make shifts faster. */ - if (AdjustBitField) { - /* If adjusting, then we're sign extending manually, so do everything unsigned - ** to make shifts faster. - */ - Flags |= CF_UNSIGNED | CF_FORCECHAR; - BitFieldFullWidthFlags |= CF_UNSIGNED; - } + Flags |= CF_UNSIGNED | CF_FORCECHAR; + BitFieldFullWidthFlags |= CF_UNSIGNED; } else { /* If Expr is an incomplete ESY type, bail out */ if (IsIncompleteESUType (Expr->Type)) { diff --git a/src/cc65/loadexpr.h b/src/cc65/loadexpr.h index c9e70e1f6..90862e33a 100644 --- a/src/cc65/loadexpr.h +++ b/src/cc65/loadexpr.h @@ -55,7 +55,10 @@ struct ExprDesc; void LoadExpr (unsigned Flags, struct ExprDesc* Expr); -/* Load an expression into the primary register if it is not already there. */ +/* Load an expression into the primary register if it is not already there. +** If Flags contains any CF_TYPEMASK bits, it then overrides the codegen type +** info that would be otherwise taken from the expression type. +*/ From 970607cde5c0afc96fd8af35b4fdf27173a2a986 Mon Sep 17 00:00:00 2001 From: acqn Date: Sun, 5 Dec 2021 12:21:01 +0800 Subject: [PATCH 003/101] Optimized g_testbitfield() and g_extractbitfield() with enhanced support for long bit-fields. --- src/cc65/codegen.c | 295 ++++++++++++++++++++++++++++++++++----------- src/cc65/codegen.h | 4 +- 2 files changed, 229 insertions(+), 70 deletions(-) diff --git a/src/cc65/codegen.c b/src/cc65/codegen.c index 5bfc6696b..c79863d0e 100644 --- a/src/cc65/codegen.c +++ b/src/cc65/codegen.c @@ -43,6 +43,7 @@ #include "addrsize.h" #include "check.h" #include "cpu.h" +#include "shift.h" #include "strbuf.h" #include "xmalloc.h" #include "xsprintf.h" @@ -4560,110 +4561,268 @@ void g_initstatic (unsigned InitLabel, unsigned VarLabel, unsigned Size) void g_testbitfield (unsigned Flags, unsigned BitOffs, unsigned BitWidth) -/* Test bit-field in ax. */ +/* Test bit-field in primary. */ { - unsigned EndBit = BitOffs + BitWidth; + /* Since the end is inclusive and cannot be negative here, we subtract 1 from the sum */ + unsigned MSBit = BitOffs + BitWidth - 1U; + unsigned Bytes = MSBit / CHAR_BITS + 1U - BitOffs / CHAR_BITS; + unsigned HeadMask = (0xFF << (BitOffs % CHAR_BITS)) & 0xFF; + unsigned TailMask = ((1U << (MSBit % CHAR_BITS + 1U)) - 1U) & 0xFF; + unsigned UntestedBytes = ((1U << Bytes) - 1U) << (BitOffs / CHAR_BITS); + + /* We don't use these flags for now. Could CF_NOKEEP be potentially interesting? */ + Flags &= ~CF_STYPEMASK; /* If we need to do a test, then we avoid shifting (ASR only shifts one bit at a time, - ** so is slow) and just AND with the appropriate mask, then test the result of that. + ** so is slow) and just AND the head and tail bytes with the appropriate mask, then + ** OR the results with the rest bytes. */ - - /* Avoid overly large shift on host platform. */ - if (EndBit == sizeof (unsigned long) * CHAR_BIT) { - g_and (Flags | CF_CONST, (~0UL << BitOffs)); - } else { - g_and (Flags | CF_CONST, ((1UL << EndBit) - 1) & (~0UL << BitOffs)); + if (Bytes == 1) { + HeadMask = TailMask = HeadMask & TailMask; } - /* TODO: When long bit-fields are supported, an optimization to test only 3 bytes when - ** EndBit <= 24 is possible. - */ - g_test (Flags | CF_CONST); + /* Get the head byte */ + switch (BitOffs / CHAR_BITS) { + case 0: + if (HeadMask == 0xFF && Bytes == 1) { + AddCodeLine ("tax"); + UntestedBytes &= ~0x1; + } + break; + case 1: + if (HeadMask != 0xFF || TailMask == 0xFF) { + AddCodeLine ("txa"); + UntestedBytes &= ~0x2; + } + break; + case 2: + if (HeadMask != 0xFF || TailMask == 0xFF) { + AddCodeLine ("lda sreg"); + UntestedBytes &= ~0x4; + } + break; + case 3: + /* In this case we'd have HeadMask == TailMask and only 1 byte, but anyways... */ + if (HeadMask != 0xFF || TailMask == 0xFF) { + AddCodeLine ("lda sreg+1"); + UntestedBytes &= ~0x8; + } + break; + default: + break; + } + + /* Keep in mind that the head is NOT always "Byte 0" */ + if (HeadMask != 0xFF) { + AddCodeLine ("and #$%02X", HeadMask); + /* Abuse the "Byte 0" flag so that this head content will be saved by the routine */ + UntestedBytes |= 0x1; + } + + /* If there is only 1 byte to test, we have done with it */ + if (Bytes == 1) { + return; + } + + /* Handle the tail byte */ + if (TailMask != 0xFF) { + /* If we have to do any more masking operation, register A will be used for that, + ** and its current content in it must be saved. + */ + if (UntestedBytes & 0x1) { + AddCodeLine ("sta tmp1"); + } + + /* Test the tail byte */ + switch (MSBit / CHAR_BITS) { + case 1: + AddCodeLine ("txa"); + UntestedBytes &= ~0x2; + break; + case 2: + AddCodeLine ("lda sreg"); + UntestedBytes &= ~0x4; + break; + case 3: + AddCodeLine ("lda sreg+1"); + UntestedBytes &= ~0x8; + break; + default: + break; + } + AddCodeLine ("and #$%02X", TailMask); + + if (UntestedBytes & 0x1) { + AddCodeLine ("ora tmp1"); + } + } + + /* OR the rest bytes together, which could never need masking */ + if (UntestedBytes & 0x2) { + AddCodeLine ("stx tmp1"); + AddCodeLine ("ora tmp1"); + } + if (UntestedBytes & 0x4) { + AddCodeLine ("ora sreg"); + } + if (UntestedBytes & 0x8) { + AddCodeLine ("ora sreg+1"); + } } void g_extractbitfield (unsigned Flags, unsigned FullWidthFlags, int IsSigned, unsigned BitOffs, unsigned BitWidth) -/* Extract bits from bit-field in ax. */ +/* Extract bits from bit-field in primary. */ { unsigned EndBit = BitOffs + BitWidth; + unsigned long ZeroExtendMask = 0; /* Zero if we don't need to zero-extend. */ /* Shift right by the bit offset; no code is emitted if BitOffs is zero */ g_asr (Flags | CF_CONST, BitOffs); - /* Since we have now shifted down, we could do char ops when the width fits in a char, but we - ** also need to clear (or set) the high byte since we've been using CF_FORCECHAR up to now. - */ - unsigned Mask = (1U << BitWidth) - 1; - /* To zero-extend, we will and by the width if the field doesn't end on a char or ** int boundary. If it does end on a boundary, then zeros will have already been shifted in, ** but we need to clear the high byte for char. g_and emits no code if the mask is all ones. ** This is here so the signed and unsigned branches can use it. */ - unsigned ZeroExtendMask = 0; /* Zero if we don't need to zero-extend. */ if (EndBit == CHAR_BITS) { /* We need to clear the high byte, since CF_FORCECHAR was set. */ ZeroExtendMask = 0xFF; - } else if (EndBit != INT_BITS) { - ZeroExtendMask = (1U << BitWidth) - 1; + } else if (EndBit != INT_BITS && EndBit != LONG_BITS) { + ZeroExtendMask = shl_l (1UL, BitWidth) - 1UL; } /* Handle signed bit-fields. */ if (IsSigned) { - /* Save .A because the sign-bit test will destroy it. */ - AddCodeLine ("tay"); - - /* Check sign bit */ unsigned SignBitPos = BitWidth - 1U; unsigned SignBitByte = SignBitPos / CHAR_BITS; unsigned SignBitPosInByte = SignBitPos % CHAR_BITS; - unsigned SignBitMask = 1U << SignBitPosInByte; - /* Move the correct byte to .A. This can be only .X for now, - ** but more cases will be needed to support long. - */ - switch (SignBitByte) { - case 0: - break; - case 1: - AddCodeLine ("txa"); - break; - default: - FAIL ("Invalid Byte for sign bit"); - } - - /* Test the sign bit */ - AddCodeLine ("and #$%02X", SignBitMask); - unsigned ZeroExtendLabel = GetLocalLabel (); - AddCodeLine ("beq %s", LocalLabelName (ZeroExtendLabel)); - - /* Get back .A and sign-extend if required; operating on the full result needs - ** to sign-extend into the high byte, too. - */ - AddCodeLine ("tya"); - g_or (FullWidthFlags | CF_CONST, ~Mask); - - /* We can generate a branch, instead of a jump, here because we know - ** that only a few instructions will be put between here and where - ** DoneLabel will be defined. - */ - unsigned DoneLabel = GetLocalLabel (); - g_branch (DoneLabel); - - /* Get back .A, then zero-extend. We need to duplicate the TYA, rather than move it before - ** the branch to share with the other label, because TYA changes some condition codes. - */ - g_defcodelabel (ZeroExtendLabel); - AddCodeLine ("tya"); - - /* Zero the upper bits, the same as the unsigned path. */ if (ZeroExtendMask != 0) { - g_and (FullWidthFlags | CF_CONST, ZeroExtendMask); - } + /* The universal trick is: + ** x = bits & bit_mask + ** m = 1 << (bit_width - 1) + ** r = (x ^ m) - m + ** which works for long as well. + */ - g_defcodelabel (DoneLabel); + if (SignBitByte + 1U == sizeofarg (FullWidthFlags)) { + /* We can just sign-extend on the high byte if it is the only affected one */ + unsigned char SignBitMask = (1UL << SignBitPosInByte) & 0xFF; + unsigned char Mask = ((2UL << (SignBitPos % CHAR_BITS)) - 1UL) & 0xFF; + + /* Move the correct byte to .A */ + switch (SignBitByte) { + case 0: + break; + case 1: + AddCodeLine ("tay"); + AddCodeLine ("txa"); + break; + case 3: + AddCodeLine ("tay"); + AddCodeLine ("lda sreg+1"); + break; + default: + FAIL ("Invalid Byte for sign bit"); + } + + /* Use .A to do the ops on the correct byte */ + AddCodeLine ("and #$%02X", Mask); + AddCodeLine ("eor #$%02X", SignBitMask); + AddCodeLine ("sec"); + AddCodeLine ("sbc #$%02X", SignBitMask); + + /* Move the correct byte from .A */ + switch (SignBitByte) { + case 0: + break; + case 1: + AddCodeLine ("tax"); + AddCodeLine ("tya"); + break; + case 3: + AddCodeLine ("sta sreg+1"); + AddCodeLine ("tya"); + break; + default: + FAIL ("Invalid Byte for sign bit"); + } + } else { + unsigned long SignBitMask = 1UL << SignBitPos; + unsigned long Mask = (2UL << SignBitPos) - 1UL; + g_and (FullWidthFlags | CF_CONST, Mask); + g_xor (FullWidthFlags | CF_CONST, SignBitMask); + g_dec (FullWidthFlags | CF_CONST, SignBitMask); + } + } else { + unsigned char SignBitMask = (1UL << SignBitPosInByte) & 0xFF; + unsigned ZeroExtendLabel = GetLocalLabel (); + + /* Save .A because the sign-bit test will destroy it. */ + AddCodeLine ("tay"); + + /* Move the correct byte to .A */ + switch (SignBitByte) { + case 0: + break; + case 1: + AddCodeLine ("txa"); + break; + case 3: + AddCodeLine ("lda sreg+1"); + break; + default: + FAIL ("Invalid Byte for sign bit"); + } + + /* Test the sign bit */ + AddCodeLine ("and #$%02X", SignBitMask); + AddCodeLine ("beq %s", LocalLabelName (ZeroExtendLabel)); + + if (SignBitByte + 1U == sizeofarg (FullWidthFlags)) { + /* We can just sign-extend on the high byte if it is the only affected one */ + unsigned char Mask = ~((2UL << (SignBitPos % CHAR_BITS)) - 1UL) & 0xFF; + + /* Use .A to do the ops on the correct byte */ + switch (SignBitByte) { + case 0: + AddCodeLine ("tya"); + AddCodeLine ("ora #$%02X", Mask); + /* We could jump over the following tya instead, but that wouldn't be faster + ** than taking this extra tay and then the tya. + */ + AddCodeLine ("tay"); + break; + case 1: + AddCodeLine ("txa"); + AddCodeLine ("ora #$%02X", Mask); + AddCodeLine ("tax"); + break; + case 3: + AddCodeLine ("lda sreg+1"); + AddCodeLine ("ora #$%02X", Mask); + AddCodeLine ("sta sreg+1"); + break; + default: + FAIL ("Invalid Byte for sign bit"); + } + } else { + /* Since we are going to get back .A later anyways, we may just do the op on the + ** higher bytes with whatever content currently in it. + */ + unsigned long Mask = ~((2UL << SignBitPos) - 1UL); + g_or (FullWidthFlags | CF_CONST, Mask); + } + + /* Get back .A. We need to duplicate the TYA, rather than move it before + ** the branch to share with the other label, because TYA changes some condition codes. + */ + g_defcodelabel (ZeroExtendLabel); + AddCodeLine ("tya"); + } } else { /* Unsigned bit-field, needs only zero-extension. */ if (ZeroExtendMask != 0) { diff --git a/src/cc65/codegen.h b/src/cc65/codegen.h index 1de71e7d3..cb62d78bd 100644 --- a/src/cc65/codegen.h +++ b/src/cc65/codegen.h @@ -486,11 +486,11 @@ void g_initstatic (unsigned InitLabel, unsigned VarLabel, unsigned Size); /*****************************************************************************/ void g_testbitfield (unsigned Flags, unsigned BitOffs, unsigned BitWidth); -/* Test bit-field in ax. */ +/* Test bit-field in primary. */ void g_extractbitfield (unsigned Flags, unsigned FullWidthFlags, int IsSigned, unsigned BitOffs, unsigned BitWidth); -/* Extract bits from bit-field in ax. */ +/* Extract bits from bit-field in primary. */ /*****************************************************************************/ /* Switch statement */ From 21858b52e7a7b1574c9bc68a441be1ed983a31c4 Mon Sep 17 00:00:00 2001 From: acqn Date: Mon, 3 Jan 2022 13:10:32 +0800 Subject: [PATCH 004/101] Separated data initializer stuff from declaration stuff. --- src/cc65.vcxproj | 2 + src/cc65/compile.c | 1 + src/cc65/declare.c | 720 --------------------------------------- src/cc65/declare.h | 5 - src/cc65/expr.c | 1 + src/cc65/initdata.c | 800 ++++++++++++++++++++++++++++++++++++++++++++ src/cc65/initdata.h | 61 ++++ src/cc65/locals.c | 1 + 8 files changed, 866 insertions(+), 725 deletions(-) create mode 100644 src/cc65/initdata.c create mode 100644 src/cc65/initdata.h diff --git a/src/cc65.vcxproj b/src/cc65.vcxproj index 14500296d..5cddc1862 100644 --- a/src/cc65.vcxproj +++ b/src/cc65.vcxproj @@ -93,6 +93,7 @@ + @@ -170,6 +171,7 @@ + diff --git a/src/cc65/compile.c b/src/cc65/compile.c index 94dfc3ffb..85c9bd5a4 100644 --- a/src/cc65/compile.c +++ b/src/cc65/compile.c @@ -56,6 +56,7 @@ #include "funcdesc.h" #include "function.h" #include "global.h" +#include "initdata.h" #include "input.h" #include "litpool.h" #include "macrotab.h" diff --git a/src/cc65/declare.c b/src/cc65/declare.c index 017a69874..67e9a1783 100644 --- a/src/cc65/declare.c +++ b/src/cc65/declare.c @@ -66,22 +66,6 @@ -/*****************************************************************************/ -/* Data */ -/*****************************************************************************/ - - - -typedef struct StructInitData StructInitData; -struct StructInitData { - unsigned Size; /* Size of struct */ - unsigned Offs; /* Current offset in struct */ - unsigned BitVal; /* Summed up bit-field value */ - unsigned ValBits; /* Valid bits in Val */ -}; - - - /*****************************************************************************/ /* Forwards */ /*****************************************************************************/ @@ -92,9 +76,6 @@ static void ParseTypeSpec (DeclSpec* D, long Default, TypeCode Qualifiers, int* SignednessSpecified); /* Parse a type specifier */ -static unsigned ParseInitInternal (Type* T, int* Braces, int AllowFlexibleMembers); -/* Parse initialization of variables. Return the number of data bytes. */ - /*****************************************************************************/ @@ -2121,704 +2102,3 @@ void CheckEmptyDecl (const DeclSpec* D) Warning ("Useless declaration"); } } - - - -static void SkipInitializer (int BracesExpected) -/* Skip the remainder of an initializer in case of errors. Try to be somewhat -** smart so we don't have too many following errors. -*/ -{ - while (CurTok.Tok != TOK_CEOF && CurTok.Tok != TOK_SEMI && BracesExpected >= 0) { - switch (CurTok.Tok) { - case TOK_RCURLY: --BracesExpected; break; - case TOK_LCURLY: ++BracesExpected; break; - default: break; - } - if (BracesExpected >= 0) { - NextToken (); - } - } -} - - - -static unsigned OpeningCurlyBraces (unsigned BracesNeeded) -/* Accept any number of opening curly braces around an initialization, skip -** them and return the number. If the number of curly braces is less than -** BracesNeeded, issue a warning. -*/ -{ - unsigned BraceCount = 0; - while (CurTok.Tok == TOK_LCURLY) { - ++BraceCount; - NextToken (); - } - if (BraceCount < BracesNeeded) { - Error ("'{' expected"); - } - return BraceCount; -} - - - -static void ClosingCurlyBraces (unsigned BracesExpected) -/* Accept and skip the given number of closing curly braces together with -** an optional comma. Output an error messages, if the input does not contain -** the expected number of braces. -*/ -{ - while (BracesExpected) { - /* TODO: Skip all excess initializers until next closing curly brace */ - if (CurTok.Tok == TOK_RCURLY) { - NextToken (); - } else if (CurTok.Tok == TOK_COMMA && NextTok.Tok == TOK_RCURLY) { - NextToken (); - NextToken (); - } else { - Error ("'}' expected"); - return; - } - --BracesExpected; - } -} - - - -static void DefineData (ExprDesc* Expr) -/* Output a data definition for the given expression */ -{ - switch (ED_GetLoc (Expr)) { - - case E_LOC_NONE: - /* Immediate numeric value with no storage */ - g_defdata (CF_IMM | TypeOf (Expr->Type) | CF_CONST, Expr->IVal, 0); - break; - - case E_LOC_ABS: - /* Absolute numeric address */ - g_defdata (CF_ABSOLUTE | TypeOf (Expr->Type) | CF_CONST, Expr->IVal, 0); - break; - - case E_LOC_GLOBAL: - /* Global variable */ - g_defdata (CF_EXTERNAL, Expr->Name, Expr->IVal); - break; - - case E_LOC_STATIC: - /* Static variable */ - g_defdata (CF_STATIC, Expr->Name, Expr->IVal); - break; - - case E_LOC_LITERAL: - /* Literal in the literal pool */ - g_defdata (CF_LITERAL, Expr->Name, Expr->IVal); - break; - - case E_LOC_REGISTER: - /* Register variable. Taking the address is usually not - ** allowed. - */ - if (IS_Get (&AllowRegVarAddr) == 0) { - Error ("Cannot take the address of a register variable"); - } - g_defdata (CF_REGVAR, Expr->Name, Expr->IVal); - break; - - case E_LOC_CODE: - /* Code label location */ - g_defdata (CF_CODE, Expr->Name, Expr->IVal); - break; - - case E_LOC_STACK: - case E_LOC_PRIMARY: - case E_LOC_EXPR: - Error ("Non constant initializer"); - break; - - default: - Internal ("Unknown constant type: 0x%04X", ED_GetLoc (Expr)); - } -} - - - -static void DefineBitFieldData (StructInitData* SI) -/* Output bit field data */ -{ - /* Ignore if we have no data */ - if (SI->ValBits > 0) { - - /* Output the data */ - g_defdata (CF_CHAR | CF_UNSIGNED | CF_CONST, SI->BitVal, 0); - - /* Update the data from SI and account for the size */ - if (SI->ValBits >= CHAR_BITS) { - SI->BitVal >>= CHAR_BITS; - SI->ValBits -= CHAR_BITS; - } else { - SI->BitVal = 0; - SI->ValBits = 0; - } - SI->Offs += SIZEOF_CHAR; - } -} - - - -static void DefineStrData (Literal* Lit, unsigned Count) -{ - /* Translate into target charset */ - TranslateLiteral (Lit); - - /* Output the data */ - g_defbytes (GetLiteralStr (Lit), Count); -} - - - -static ExprDesc ParseScalarInitInternal (const Type* T) -/* Parse initializaton for scalar data types. This function will not output the -** data but return it in ED. -*/ -{ - /* Optional opening brace */ - unsigned BraceCount = OpeningCurlyBraces (0); - - /* We warn if an initializer for a scalar contains braces, because this is - ** quite unusual and often a sign for some problem in the input. - */ - if (BraceCount > 0) { - Warning ("Braces around scalar initializer"); - } - - /* Get the expression and convert it to the target type */ - ExprDesc ED = NoCodeConstExpr (hie1); - TypeConversion (&ED, T); - - /* Close eventually opening braces */ - ClosingCurlyBraces (BraceCount); - - return ED; -} - - - -static unsigned ParseScalarInit (const Type* T) -/* Parse initializaton for scalar data types. Return the number of data bytes. */ -{ - /* Parse initialization */ - ExprDesc ED = ParseScalarInitInternal (T); - - /* Output the data */ - DefineData (&ED); - - /* Do this anyways for safety */ - DoDeferred (SQP_KEEP_NONE, &ED); - - /* Done */ - return SizeOf (T); -} - - - -static unsigned ParsePointerInit (const Type* T) -/* Parse initializaton for pointer data types. Return the number of data bytes. */ -{ - /* Optional opening brace */ - unsigned BraceCount = OpeningCurlyBraces (0); - - /* Expression */ - ExprDesc ED = NoCodeConstExpr (hie1); - TypeConversion (&ED, T); - - /* Output the data */ - DefineData (&ED); - - /* Do this anyways for safety */ - DoDeferred (SQP_KEEP_NONE, &ED); - - /* Close eventually opening braces */ - ClosingCurlyBraces (BraceCount); - - /* Done */ - return SIZEOF_PTR; -} - - - -static unsigned ParseArrayInit (Type* T, int* Braces, int AllowFlexibleMembers) -/* Parse initializaton for arrays. Return the number of data bytes. */ -{ - int Count; - int HasCurly = 0; - - /* Get the array data */ - Type* ElementType = IndirectModifiable (T); - unsigned ElementSize = SizeOf (ElementType); - long ElementCount = GetElementCount (T); - - /* Special handling for a character array initialized by a literal */ - if (IsClassChar (ElementType) && - (CurTok.Tok == TOK_SCONST || CurTok.Tok == TOK_WCSCONST || - (CurTok.Tok == TOK_LCURLY && - (NextTok.Tok == TOK_SCONST || NextTok.Tok == TOK_WCSCONST)))) { - - /* Char array initialized by string constant */ - int NeedParen; - - /* If we initializer is enclosed in brackets, remember this fact and - ** skip the opening bracket. - */ - NeedParen = (CurTok.Tok == TOK_LCURLY); - if (NeedParen) { - NextToken (); - } - - /* If the array is one too small for the string literal, omit the - ** trailing zero. - */ - Count = GetLiteralSize (CurTok.SVal); - if (ElementCount != UNSPECIFIED && - ElementCount != FLEXIBLE && - Count == ElementCount + 1) { - /* Omit the trailing zero */ - --Count; - } - - /* Output the data */ - DefineStrData (CurTok.SVal, Count); - - /* Skip the string */ - NextToken (); - - /* If the initializer was enclosed in curly braces, we need a closing - ** one. - */ - if (NeedParen) { - ConsumeRCurly (); - } - - } else { - - /* Arrays can be initialized without a pair of curly braces */ - if (*Braces == 0 || CurTok.Tok == TOK_LCURLY) { - /* Consume the opening curly brace */ - HasCurly = ConsumeLCurly (); - *Braces += HasCurly; - } - - /* Initialize the array members */ - Count = 0; - while (CurTok.Tok != TOK_RCURLY) { - /* Flexible array members may not be initialized within - ** an array (because the size of each element may differ - ** otherwise). - */ - ParseInitInternal (ElementType, Braces, 0); - ++Count; - if (CurTok.Tok != TOK_COMMA) - break; - NextToken (); - } - - if (HasCurly) { - /* Closing curly braces */ - ConsumeRCurly (); - } - } - - /* Size of 'void' elements are determined after initialization */ - if (ElementSize == 0) { - ElementSize = SizeOf (ElementType); - } - - if (ElementCount == UNSPECIFIED) { - /* Number of elements determined by initializer */ - SetElementCount (T, Count); - ElementCount = Count; - } else if (ElementCount == FLEXIBLE) { - if (AllowFlexibleMembers) { - /* In non ANSI mode, allow initialization of flexible array - ** members. - */ - ElementCount = Count; - } else { - /* Forbid */ - Error ("Initializing flexible array member is forbidden"); - ElementCount = Count; - } - } else if (Count < ElementCount) { - g_zerobytes ((ElementCount - Count) * ElementSize); - } else if (Count > ElementCount && HasCurly) { - Error ("Excess elements in array initializer"); - } - return ElementCount * ElementSize; -} - - - -static unsigned ParseStructInit (Type* T, int* Braces, int AllowFlexibleMembers) -/* Parse initialization of a struct or union. Return the number of data bytes. */ -{ - SymEntry* Sym; - SymTable* Tab; - StructInitData SI; - int HasCurly = 0; - int SkipComma = 0; - - - /* Fields can be initialized without a pair of curly braces */ - if (*Braces == 0 || CurTok.Tok == TOK_LCURLY) { - /* Consume the opening curly brace */ - HasCurly = ConsumeLCurly (); - *Braces += HasCurly; - } - - /* Get a pointer to the struct entry from the type */ - Sym = GetESUSymEntry (T); - - /* Get the size of the struct from the symbol table entry */ - SI.Size = Sym->V.S.Size; - - /* Check if this struct definition has a field table. If it doesn't, it - ** is an incomplete definition. - */ - Tab = Sym->V.S.SymTab; - if (Tab == 0) { - Error ("Cannot initialize variables with incomplete type"); - /* Try error recovery */ - SkipInitializer (HasCurly); - /* Nothing initialized */ - return 0; - } - - /* Get a pointer to the list of symbols */ - Sym = Tab->SymHead; - - /* Initialize fields */ - SI.Offs = 0; - SI.BitVal = 0; - SI.ValBits = 0; - while (CurTok.Tok != TOK_RCURLY) { - - /* Check for excess elements */ - if (Sym == 0) { - /* Is there just one trailing comma before a closing curly? */ - if (NextTok.Tok == TOK_RCURLY && CurTok.Tok == TOK_COMMA) { - /* Skip comma and exit scope */ - NextToken (); - break; - } - - if (HasCurly) { - Error ("Excess elements in %s initializer", GetBasicTypeName (T)); - SkipInitializer (HasCurly); - } - return SI.Offs; - } - - /* Check for special members that don't consume the initializer */ - if ((Sym->Flags & SC_ALIAS) == SC_ALIAS) { - /* Just skip */ - goto NextMember; - } - - /* This may be an anonymous bit-field, in which case it doesn't - ** have an initializer. - */ - if (SymIsBitField (Sym) && (IsAnonName (Sym->Name))) { - /* Account for the data and output it if we have at least a full - ** word. We may have more if there was storage unit overlap, for - ** example two consecutive 10 bit fields. These will be packed - ** into 3 bytes. - */ - SI.ValBits += Sym->Type->A.B.Width; - /* TODO: Generalize this so any type can be used. */ - CHECK (SI.ValBits <= CHAR_BITS + INT_BITS - 2); - while (SI.ValBits >= CHAR_BITS) { - DefineBitFieldData (&SI); - } - /* Avoid consuming the comma if any */ - goto NextMember; - } - - /* Skip comma this round */ - if (SkipComma) { - NextToken (); - SkipComma = 0; - } - - if (SymIsBitField (Sym)) { - - /* Parse initialization of one field. Bit-fields need a special - ** handling. - */ - ExprDesc ED; - ED_Init (&ED); - unsigned Val; - unsigned Shift; - - /* Calculate the bitmask from the bit-field data */ - unsigned Mask = (1U << Sym->Type->A.B.Width) - 1U; - - /* Safety ... */ - CHECK (Sym->V.Offs * CHAR_BITS + Sym->Type->A.B.Offs == - SI.Offs * CHAR_BITS + SI.ValBits); - - /* Read the data, check for a constant integer, do a range check */ - ED = ParseScalarInitInternal (IntPromotion (Sym->Type)); - if (!ED_IsConstAbsInt (&ED)) { - Error ("Constant initializer expected"); - ED_MakeConstAbsInt (&ED, 1); - } - - /* Truncate the initializer value to the width of the bit-field and check if we lost - ** any useful bits. - */ - Val = (unsigned) ED.IVal & Mask; - if (IsSignUnsigned (Sym->Type)) { - if (ED.IVal < 0 || (unsigned long) ED.IVal != Val) { - Warning ("Implicit truncation from '%s' to '%s : %u' in bit-field initializer" - " changes value from %ld to %u", - GetFullTypeName (ED.Type), GetFullTypeName (Sym->Type), - Sym->Type->A.B.Width, ED.IVal, Val); - } - } else { - /* Sign extend back to full width of host long. */ - unsigned ShiftBits = sizeof (long) * CHAR_BIT - Sym->Type->A.B.Width; - long RestoredVal = asr_l(asl_l (Val, ShiftBits), ShiftBits); - if (ED.IVal != RestoredVal) { - Warning ("Implicit truncation from '%s' to '%s : %u' in bit-field initializer " - "changes value from %ld to %ld", - GetFullTypeName (ED.Type), GetFullTypeName (Sym->Type), - Sym->Type->A.B.Width, ED.IVal, RestoredVal); - } - } - - /* Add the value to the currently stored bit-field value */ - Shift = (Sym->V.Offs - SI.Offs) * CHAR_BITS + Sym->Type->A.B.Offs; - SI.BitVal |= (Val << Shift); - - /* Account for the data and output any full bytes we have. */ - SI.ValBits += Sym->Type->A.B.Width; - /* Make sure unsigned is big enough to hold the value, 22 bits. - ** This is 22 bits because the most we can have is 7 bits left - ** over from the previous OutputBitField call, plus 15 bits - ** from this field. A 16-bit bit-field will always be byte - ** aligned, so will have padding before it. - */ - CHECK (SI.ValBits <= CHAR_BIT * sizeof(SI.BitVal)); - /* TODO: Generalize this so any type can be used. */ - CHECK (SI.ValBits <= CHAR_BITS + INT_BITS - 2); - while (SI.ValBits >= CHAR_BITS) { - DefineBitFieldData (&SI); - } - - } else { - - /* Standard member. We should never have stuff from a - ** bit-field left because an anonymous member was added - ** for padding by ParseStructDecl. - */ - CHECK (SI.ValBits == 0); - - /* Flexible array members may only be initialized if they are - ** the last field (or part of the last struct field). - */ - SI.Offs += ParseInitInternal (Sym->Type, Braces, AllowFlexibleMembers && Sym->NextSym == 0); - } - - /* More initializers? */ - if (CurTok.Tok != TOK_COMMA) { - break; - } - - /* Skip the comma next round */ - SkipComma = 1; - -NextMember: - /* Next member. For unions, only the first one can be initialized */ - if (IsTypeUnion (T)) { - /* Union */ - Sym = 0; - } else { - /* Struct */ - Sym = Sym->NextSym; - } - } - - if (HasCurly) { - /* Consume the closing curly brace */ - ConsumeRCurly (); - } - - /* If we have data from a bit-field left, output it now */ - CHECK (SI.ValBits < CHAR_BITS); - DefineBitFieldData (&SI); - - /* If there are struct fields left, reserve additional storage */ - if (SI.Offs < SI.Size) { - g_zerobytes (SI.Size - SI.Offs); - SI.Offs = SI.Size; - } - - /* Return the actual number of bytes initialized. This number may be - ** larger than sizeof (Struct) if flexible array members are present and - ** were initialized (possible in non ANSI mode). - */ - return SI.Offs; -} - - - -static unsigned ParseVoidInit (Type* T) -/* Parse an initialization of a void variable (special cc65 extension). -** Return the number of bytes initialized. -*/ -{ - unsigned Size; - - /* Opening brace */ - ConsumeLCurly (); - - /* Allow an arbitrary list of values */ - Size = 0; - do { - ExprDesc Expr = NoCodeConstExpr (hie1); - switch (GetUnderlyingTypeCode (&Expr.Type[0])) { - - case T_SCHAR: - case T_UCHAR: - if (ED_IsConstAbsInt (&Expr)) { - /* Make it byte sized */ - Expr.IVal &= 0xFF; - } - DefineData (&Expr); - Size += SIZEOF_CHAR; - break; - - case T_SHORT: - case T_USHORT: - case T_INT: - case T_UINT: - case T_PTR: - case T_ARRAY: - if (ED_IsConstAbsInt (&Expr)) { - /* Make it word sized */ - Expr.IVal &= 0xFFFF; - } - DefineData (&Expr); - Size += SIZEOF_INT; - break; - - case T_LONG: - case T_ULONG: - if (ED_IsConstAbsInt (&Expr)) { - /* Make it dword sized */ - Expr.IVal &= 0xFFFFFFFF; - } - DefineData (&Expr); - Size += SIZEOF_LONG; - break; - - default: - Error ("Illegal type in initialization"); - break; - - } - - if (CurTok.Tok != TOK_COMMA) { - break; - } - NextToken (); - - } while (CurTok.Tok != TOK_RCURLY); - - /* Closing brace */ - ConsumeRCurly (); - - /* Number of bytes determined by initializer */ - if (T->A.U != 0 && T->A.U != Size) { - Error ("'void' array initialized with elements of variant sizes"); - } else { - T->A.U = Size; - } - - /* Return the number of bytes initialized */ - return Size; -} - - - -static unsigned ParseInitInternal (Type* T, int *Braces, int AllowFlexibleMembers) -/* Parse initialization of variables. Return the number of data bytes. */ -{ - switch (GetUnderlyingTypeCode (T)) { - - case T_SCHAR: - case T_UCHAR: - case T_SHORT: - case T_USHORT: - case T_INT: - case T_UINT: - case T_LONG: - case T_ULONG: - case T_FLOAT: - case T_DOUBLE: - return ParseScalarInit (T); - - case T_PTR: - return ParsePointerInit (T); - - case T_ARRAY: - return ParseArrayInit (T, Braces, AllowFlexibleMembers); - - case T_STRUCT: - case T_UNION: - return ParseStructInit (T, Braces, AllowFlexibleMembers); - - case T_ENUM: - /* Incomplete enum type must have already raised errors. - ** Just proceed to consume the value. - */ - return ParseScalarInit (T); - - case T_VOID: - if (IS_Get (&Standard) == STD_CC65) { - /* Special cc65 extension in non-ANSI mode */ - return ParseVoidInit (T); - } - /* FALLTHROUGH */ - - default: - Error ("Illegal type"); - return SIZEOF_CHAR; - - } -} - - - -unsigned ParseInit (Type* T) -/* Parse initialization of variables. Return the number of data bytes. */ -{ - /* Current curly braces layers */ - int Braces = 0; - - /* Parse the initialization. Flexible array members can only be initialized - ** in cc65 mode. - */ - unsigned Size = ParseInitInternal (T, &Braces, IS_Get (&Standard) == STD_CC65); - - /* The initialization may not generate code on global level, because code - ** outside function scope will never get executed. - */ - if (HaveGlobalCode ()) { - Error ("Non constant initializers"); - RemoveGlobalCode (); - } - - /* Return the size needed for the initialization */ - return Size; -} diff --git a/src/cc65/declare.h b/src/cc65/declare.h index 3293a0dcb..2b8b36f1c 100644 --- a/src/cc65/declare.h +++ b/src/cc65/declare.h @@ -114,11 +114,6 @@ void CheckEmptyDecl (const DeclSpec* D); ** warning if not. */ -unsigned ParseInit (Type* T); -/* Parse initialization of variables. Return the number of initialized data -** bytes. -*/ - /* End of declare.h */ diff --git a/src/cc65/expr.c b/src/cc65/expr.c index 3b3754665..0275e61a3 100644 --- a/src/cc65/expr.c +++ b/src/cc65/expr.c @@ -25,6 +25,7 @@ #include "funcdesc.h" #include "function.h" #include "global.h" +#include "initdata.h" #include "litpool.h" #include "loadexpr.h" #include "macrotab.h" diff --git a/src/cc65/initdata.c b/src/cc65/initdata.c new file mode 100644 index 000000000..1f8b35ce4 --- /dev/null +++ b/src/cc65/initdata.c @@ -0,0 +1,800 @@ +/*****************************************************************************/ +/* */ +/* initdata.c */ +/* */ +/* Parse and generate initializer data */ +/* */ +/* */ +/* */ +/* (C) 1998-2015, Ullrich von Bassewitz */ +/* Roemerstrasse 52 */ +/* D-70794 Filderstadt */ +/* EMail: uz@cc65.org */ +/* */ +/* */ +/* This software is provided 'as-is', without any expressed or implied */ +/* warranty. In no event will the authors be held liable for any damages */ +/* arising from the use of this software. */ +/* */ +/* Permission is granted to anyone to use this software for any purpose, */ +/* including commercial applications, and to alter it and redistribute it */ +/* freely, subject to the following restrictions: */ +/* */ +/* 1. The origin of this software must not be misrepresented; you must not */ +/* claim that you wrote the original software. If you use this software */ +/* in a product, an acknowledgment in the product documentation would be */ +/* appreciated but is not required. */ +/* 2. Altered source versions must be plainly marked as such, and must not */ +/* be misrepresented as being the original software. */ +/* 3. This notice may not be removed or altered from any source */ +/* distribution. */ +/* */ +/*****************************************************************************/ + + + +#include +#include +#include +#include + +/* common */ +#include "addrsize.h" +#include "mmodel.h" +#include "shift.h" +#include "xmalloc.h" + +/* cc65 */ +#include "anonname.h" +#include "codegen.h" +#include "datatype.h" +#include "declattr.h" +#include "error.h" +#include "expr.h" +#include "exprdesc.h" +#include "funcdesc.h" +#include "function.h" +#include "global.h" +#include "litpool.h" +#include "pragma.h" +#include "scanner.h" +#include "shift.h" +#include "standard.h" +#include "symtab.h" +#include "wrappedcall.h" +#include "typeconv.h" +#include "initdata.h" + + + +/*****************************************************************************/ +/* Data */ +/*****************************************************************************/ + + + +typedef struct StructInitData StructInitData; +struct StructInitData { + unsigned Size; /* Size of struct */ + unsigned Offs; /* Current offset in struct */ + unsigned BitVal; /* Summed up bit-field value */ + unsigned ValBits; /* Valid bits in Val */ +}; + + + +/*****************************************************************************/ +/* Forwards */ +/*****************************************************************************/ + + + +static unsigned ParseInitInternal (Type* T, int* Braces, int AllowFlexibleMembers); +/* Parse initialization of variables. Return the number of data bytes. */ + + + +/*****************************************************************************/ +/* code */ +/*****************************************************************************/ + + + +static void SkipInitializer (int BracesExpected) +/* Skip the remainder of an initializer in case of errors. Try to be somewhat +** smart so we don't have too many following errors. +*/ +{ + while (CurTok.Tok != TOK_CEOF && CurTok.Tok != TOK_SEMI && BracesExpected >= 0) { + switch (CurTok.Tok) { + case TOK_RCURLY: --BracesExpected; break; + case TOK_LCURLY: ++BracesExpected; break; + default: break; + } + if (BracesExpected >= 0) { + NextToken (); + } + } +} + + + +static unsigned OpeningCurlyBraces (unsigned BracesNeeded) +/* Accept any number of opening curly braces around an initialization, skip +** them and return the number. If the number of curly braces is less than +** BracesNeeded, issue a warning. +*/ +{ + unsigned BraceCount = 0; + while (CurTok.Tok == TOK_LCURLY) { + ++BraceCount; + NextToken (); + } + if (BraceCount < BracesNeeded) { + Error ("'{' expected"); + } + return BraceCount; +} + + + +static void ClosingCurlyBraces (unsigned BracesExpected) +/* Accept and skip the given number of closing curly braces together with +** an optional comma. Output an error messages, if the input does not contain +** the expected number of braces. +*/ +{ + while (BracesExpected) { + /* TODO: Skip all excess initializers until next closing curly brace */ + if (CurTok.Tok == TOK_RCURLY) { + NextToken (); + } else if (CurTok.Tok == TOK_COMMA && NextTok.Tok == TOK_RCURLY) { + NextToken (); + NextToken (); + } else { + Error ("'}' expected"); + return; + } + --BracesExpected; + } +} + + + +static void DefineData (ExprDesc* Expr) +/* Output a data definition for the given expression */ +{ + switch (ED_GetLoc (Expr)) { + + case E_LOC_NONE: + /* Immediate numeric value with no storage */ + g_defdata (CF_IMM | TypeOf (Expr->Type) | CF_CONST, Expr->IVal, 0); + break; + + case E_LOC_ABS: + /* Absolute numeric address */ + g_defdata (CF_ABSOLUTE | TypeOf (Expr->Type) | CF_CONST, Expr->IVal, 0); + break; + + case E_LOC_GLOBAL: + /* Global variable */ + g_defdata (CF_EXTERNAL, Expr->Name, Expr->IVal); + break; + + case E_LOC_STATIC: + /* Static variable */ + g_defdata (CF_STATIC, Expr->Name, Expr->IVal); + break; + + case E_LOC_LITERAL: + /* Literal in the literal pool */ + g_defdata (CF_LITERAL, Expr->Name, Expr->IVal); + break; + + case E_LOC_REGISTER: + /* Register variable. Taking the address is usually not + ** allowed. + */ + if (IS_Get (&AllowRegVarAddr) == 0) { + Error ("Cannot take the address of a register variable"); + } + g_defdata (CF_REGVAR, Expr->Name, Expr->IVal); + break; + + case E_LOC_CODE: + /* Code label location */ + g_defdata (CF_CODE, Expr->Name, Expr->IVal); + break; + + case E_LOC_STACK: + case E_LOC_PRIMARY: + case E_LOC_EXPR: + Error ("Non constant initializer"); + break; + + default: + Internal ("Unknown constant type: 0x%04X", ED_GetLoc (Expr)); + } +} + + + +static void DefineBitFieldData (StructInitData* SI) +/* Output bit field data */ +{ + /* Ignore if we have no data */ + if (SI->ValBits > 0) { + + /* Output the data */ + g_defdata (CF_CHAR | CF_UNSIGNED | CF_CONST, SI->BitVal, 0); + + /* Update the data from SI and account for the size */ + if (SI->ValBits >= CHAR_BITS) { + SI->BitVal >>= CHAR_BITS; + SI->ValBits -= CHAR_BITS; + } else { + SI->BitVal = 0; + SI->ValBits = 0; + } + SI->Offs += SIZEOF_CHAR; + } +} + + + +static void DefineStrData (Literal* Lit, unsigned Count) +{ + /* Translate into target charset */ + TranslateLiteral (Lit); + + /* Output the data */ + g_defbytes (GetLiteralStr (Lit), Count); +} + + + +static ExprDesc ParseScalarInitInternal (const Type* T) +/* Parse initializaton for scalar data types. This function will not output the +** data but return it in ED. +*/ +{ + /* Optional opening brace */ + unsigned BraceCount = OpeningCurlyBraces (0); + + /* We warn if an initializer for a scalar contains braces, because this is + ** quite unusual and often a sign for some problem in the input. + */ + if (BraceCount > 0) { + Warning ("Braces around scalar initializer"); + } + + /* Get the expression and convert it to the target type */ + ExprDesc ED = NoCodeConstExpr (hie1); + TypeConversion (&ED, T); + + /* Close eventually opening braces */ + ClosingCurlyBraces (BraceCount); + + return ED; +} + + + +static unsigned ParseScalarInit (const Type* T) +/* Parse initializaton for scalar data types. Return the number of data bytes. */ +{ + /* Parse initialization */ + ExprDesc ED = ParseScalarInitInternal (T); + + /* Output the data */ + DefineData (&ED); + + /* Do this anyways for safety */ + DoDeferred (SQP_KEEP_NONE, &ED); + + /* Done */ + return SizeOf (T); +} + + + +static unsigned ParsePointerInit (const Type* T) +/* Parse initializaton for pointer data types. Return the number of data bytes. */ +{ + /* Optional opening brace */ + unsigned BraceCount = OpeningCurlyBraces (0); + + /* Expression */ + ExprDesc ED = NoCodeConstExpr (hie1); + TypeConversion (&ED, T); + + /* Output the data */ + DefineData (&ED); + + /* Do this anyways for safety */ + DoDeferred (SQP_KEEP_NONE, &ED); + + /* Close eventually opening braces */ + ClosingCurlyBraces (BraceCount); + + /* Done */ + return SIZEOF_PTR; +} + + + +static unsigned ParseArrayInit (Type* T, int* Braces, int AllowFlexibleMembers) +/* Parse initializaton for arrays. Return the number of data bytes. */ +{ + int Count; + int HasCurly = 0; + + /* Get the array data */ + Type* ElementType = IndirectModifiable (T); + unsigned ElementSize = SizeOf (ElementType); + long ElementCount = GetElementCount (T); + + /* Special handling for a character array initialized by a literal */ + if (IsClassChar (ElementType) && + (CurTok.Tok == TOK_SCONST || CurTok.Tok == TOK_WCSCONST || + (CurTok.Tok == TOK_LCURLY && + (NextTok.Tok == TOK_SCONST || NextTok.Tok == TOK_WCSCONST)))) { + + /* Char array initialized by string constant */ + int NeedParen; + + /* If we initializer is enclosed in brackets, remember this fact and + ** skip the opening bracket. + */ + NeedParen = (CurTok.Tok == TOK_LCURLY); + if (NeedParen) { + NextToken (); + } + + /* If the array is one too small for the string literal, omit the + ** trailing zero. + */ + Count = GetLiteralSize (CurTok.SVal); + if (ElementCount != UNSPECIFIED && + ElementCount != FLEXIBLE && + Count == ElementCount + 1) { + /* Omit the trailing zero */ + --Count; + } + + /* Output the data */ + DefineStrData (CurTok.SVal, Count); + + /* Skip the string */ + NextToken (); + + /* If the initializer was enclosed in curly braces, we need a closing + ** one. + */ + if (NeedParen) { + ConsumeRCurly (); + } + + } else { + + /* Arrays can be initialized without a pair of curly braces */ + if (*Braces == 0 || CurTok.Tok == TOK_LCURLY) { + /* Consume the opening curly brace */ + HasCurly = ConsumeLCurly (); + *Braces += HasCurly; + } + + /* Initialize the array members */ + Count = 0; + while (CurTok.Tok != TOK_RCURLY) { + /* Flexible array members may not be initialized within + ** an array (because the size of each element may differ + ** otherwise). + */ + ParseInitInternal (ElementType, Braces, 0); + ++Count; + if (CurTok.Tok != TOK_COMMA) + break; + NextToken (); + } + + if (HasCurly) { + /* Closing curly braces */ + ConsumeRCurly (); + } + } + + /* Size of 'void' elements are determined after initialization */ + if (ElementSize == 0) { + ElementSize = SizeOf (ElementType); + } + + if (ElementCount == UNSPECIFIED) { + /* Number of elements determined by initializer */ + SetElementCount (T, Count); + ElementCount = Count; + } else if (ElementCount == FLEXIBLE) { + if (AllowFlexibleMembers) { + /* In non ANSI mode, allow initialization of flexible array + ** members. + */ + ElementCount = Count; + } else { + /* Forbid */ + Error ("Initializing flexible array member is forbidden"); + ElementCount = Count; + } + } else if (Count < ElementCount) { + g_zerobytes ((ElementCount - Count) * ElementSize); + } else if (Count > ElementCount && HasCurly) { + Error ("Excess elements in array initializer"); + } + return ElementCount * ElementSize; +} + + + +static unsigned ParseStructInit (Type* T, int* Braces, int AllowFlexibleMembers) +/* Parse initialization of a struct or union. Return the number of data bytes. */ +{ + SymEntry* Sym; + SymTable* Tab; + StructInitData SI; + int HasCurly = 0; + int SkipComma = 0; + + + /* Fields can be initialized without a pair of curly braces */ + if (*Braces == 0 || CurTok.Tok == TOK_LCURLY) { + /* Consume the opening curly brace */ + HasCurly = ConsumeLCurly (); + *Braces += HasCurly; + } + + /* Get a pointer to the struct entry from the type */ + Sym = GetESUSymEntry (T); + + /* Get the size of the struct from the symbol table entry */ + SI.Size = Sym->V.S.Size; + + /* Check if this struct definition has a field table. If it doesn't, it + ** is an incomplete definition. + */ + Tab = Sym->V.S.SymTab; + if (Tab == 0) { + Error ("Cannot initialize variables with incomplete type"); + /* Try error recovery */ + SkipInitializer (HasCurly); + /* Nothing initialized */ + return 0; + } + + /* Get a pointer to the list of symbols */ + Sym = Tab->SymHead; + + /* Initialize fields */ + SI.Offs = 0; + SI.BitVal = 0; + SI.ValBits = 0; + while (CurTok.Tok != TOK_RCURLY) { + + /* Check for excess elements */ + if (Sym == 0) { + /* Is there just one trailing comma before a closing curly? */ + if (NextTok.Tok == TOK_RCURLY && CurTok.Tok == TOK_COMMA) { + /* Skip comma and exit scope */ + NextToken (); + break; + } + + if (HasCurly) { + Error ("Excess elements in %s initializer", GetBasicTypeName (T)); + SkipInitializer (HasCurly); + } + return SI.Offs; + } + + /* Check for special members that don't consume the initializer */ + if ((Sym->Flags & SC_ALIAS) == SC_ALIAS) { + /* Just skip */ + goto NextMember; + } + + /* This may be an anonymous bit-field, in which case it doesn't + ** have an initializer. + */ + if (SymIsBitField (Sym) && (IsAnonName (Sym->Name))) { + /* Account for the data and output it if we have at least a full + ** word. We may have more if there was storage unit overlap, for + ** example two consecutive 10 bit fields. These will be packed + ** into 3 bytes. + */ + SI.ValBits += Sym->Type->A.B.Width; + /* TODO: Generalize this so any type can be used. */ + CHECK (SI.ValBits <= CHAR_BITS + INT_BITS - 2); + while (SI.ValBits >= CHAR_BITS) { + DefineBitFieldData (&SI); + } + /* Avoid consuming the comma if any */ + goto NextMember; + } + + /* Skip comma this round */ + if (SkipComma) { + NextToken (); + SkipComma = 0; + } + + if (SymIsBitField (Sym)) { + + /* Parse initialization of one field. Bit-fields need a special + ** handling. + */ + ExprDesc ED; + ED_Init (&ED); + unsigned Val; + unsigned Shift; + + /* Calculate the bitmask from the bit-field data */ + unsigned Mask = (1U << Sym->Type->A.B.Width) - 1U; + + /* Safety ... */ + CHECK (Sym->V.Offs * CHAR_BITS + Sym->Type->A.B.Offs == + SI.Offs * CHAR_BITS + SI.ValBits); + + /* Read the data, check for a constant integer, do a range check */ + ED = ParseScalarInitInternal (IntPromotion (Sym->Type)); + if (!ED_IsConstAbsInt (&ED)) { + Error ("Constant initializer expected"); + ED_MakeConstAbsInt (&ED, 1); + } + + /* Truncate the initializer value to the width of the bit-field and check if we lost + ** any useful bits. + */ + Val = (unsigned) ED.IVal & Mask; + if (IsSignUnsigned (Sym->Type)) { + if (ED.IVal < 0 || (unsigned long) ED.IVal != Val) { + Warning ("Implicit truncation from '%s' to '%s : %u' in bit-field initializer" + " changes value from %ld to %u", + GetFullTypeName (ED.Type), GetFullTypeName (Sym->Type), + Sym->Type->A.B.Width, ED.IVal, Val); + } + } else { + /* Sign extend back to full width of host long. */ + unsigned ShiftBits = sizeof (long) * CHAR_BIT - Sym->Type->A.B.Width; + long RestoredVal = asr_l(asl_l (Val, ShiftBits), ShiftBits); + if (ED.IVal != RestoredVal) { + Warning ("Implicit truncation from '%s' to '%s : %u' in bit-field initializer " + "changes value from %ld to %ld", + GetFullTypeName (ED.Type), GetFullTypeName (Sym->Type), + Sym->Type->A.B.Width, ED.IVal, RestoredVal); + } + } + + /* Add the value to the currently stored bit-field value */ + Shift = (Sym->V.Offs - SI.Offs) * CHAR_BITS + Sym->Type->A.B.Offs; + SI.BitVal |= (Val << Shift); + + /* Account for the data and output any full bytes we have. */ + SI.ValBits += Sym->Type->A.B.Width; + /* Make sure unsigned is big enough to hold the value, 22 bits. + ** This is 22 bits because the most we can have is 7 bits left + ** over from the previous OutputBitField call, plus 15 bits + ** from this field. A 16-bit bit-field will always be byte + ** aligned, so will have padding before it. + */ + CHECK (SI.ValBits <= CHAR_BIT * sizeof(SI.BitVal)); + /* TODO: Generalize this so any type can be used. */ + CHECK (SI.ValBits <= CHAR_BITS + INT_BITS - 2); + while (SI.ValBits >= CHAR_BITS) { + DefineBitFieldData (&SI); + } + + } else { + + /* Standard member. We should never have stuff from a + ** bit-field left because an anonymous member was added + ** for padding by ParseStructDecl. + */ + CHECK (SI.ValBits == 0); + + /* Flexible array members may only be initialized if they are + ** the last field (or part of the last struct field). + */ + SI.Offs += ParseInitInternal (Sym->Type, Braces, AllowFlexibleMembers && Sym->NextSym == 0); + } + + /* More initializers? */ + if (CurTok.Tok != TOK_COMMA) { + break; + } + + /* Skip the comma next round */ + SkipComma = 1; + +NextMember: + /* Next member. For unions, only the first one can be initialized */ + if (IsTypeUnion (T)) { + /* Union */ + Sym = 0; + } else { + /* Struct */ + Sym = Sym->NextSym; + } + } + + if (HasCurly) { + /* Consume the closing curly brace */ + ConsumeRCurly (); + } + + /* If we have data from a bit-field left, output it now */ + CHECK (SI.ValBits < CHAR_BITS); + DefineBitFieldData (&SI); + + /* If there are struct fields left, reserve additional storage */ + if (SI.Offs < SI.Size) { + g_zerobytes (SI.Size - SI.Offs); + SI.Offs = SI.Size; + } + + /* Return the actual number of bytes initialized. This number may be + ** larger than sizeof (Struct) if flexible array members are present and + ** were initialized (possible in non ANSI mode). + */ + return SI.Offs; +} + + + +static unsigned ParseVoidInit (Type* T) +/* Parse an initialization of a void variable (special cc65 extension). +** Return the number of bytes initialized. +*/ +{ + unsigned Size; + + /* Opening brace */ + ConsumeLCurly (); + + /* Allow an arbitrary list of values */ + Size = 0; + do { + ExprDesc Expr = NoCodeConstExpr (hie1); + switch (GetUnderlyingTypeCode (&Expr.Type[0])) { + + case T_SCHAR: + case T_UCHAR: + if (ED_IsConstAbsInt (&Expr)) { + /* Make it byte sized */ + Expr.IVal &= 0xFF; + } + DefineData (&Expr); + Size += SIZEOF_CHAR; + break; + + case T_SHORT: + case T_USHORT: + case T_INT: + case T_UINT: + case T_PTR: + case T_ARRAY: + if (ED_IsConstAbsInt (&Expr)) { + /* Make it word sized */ + Expr.IVal &= 0xFFFF; + } + DefineData (&Expr); + Size += SIZEOF_INT; + break; + + case T_LONG: + case T_ULONG: + if (ED_IsConstAbsInt (&Expr)) { + /* Make it dword sized */ + Expr.IVal &= 0xFFFFFFFF; + } + DefineData (&Expr); + Size += SIZEOF_LONG; + break; + + default: + Error ("Illegal type in initialization"); + break; + + } + + if (CurTok.Tok != TOK_COMMA) { + break; + } + NextToken (); + + } while (CurTok.Tok != TOK_RCURLY); + + /* Closing brace */ + ConsumeRCurly (); + + /* Number of bytes determined by initializer */ + if (T->A.U != 0 && T->A.U != Size) { + Error ("'void' array initialized with elements of variant sizes"); + } else { + T->A.U = Size; + } + + /* Return the number of bytes initialized */ + return Size; +} + + + +static unsigned ParseInitInternal (Type* T, int *Braces, int AllowFlexibleMembers) +/* Parse initialization of variables. Return the number of data bytes. */ +{ + switch (GetUnderlyingTypeCode (T)) { + + case T_SCHAR: + case T_UCHAR: + case T_SHORT: + case T_USHORT: + case T_INT: + case T_UINT: + case T_LONG: + case T_ULONG: + case T_FLOAT: + case T_DOUBLE: + return ParseScalarInit (T); + + case T_PTR: + return ParsePointerInit (T); + + case T_ARRAY: + return ParseArrayInit (T, Braces, AllowFlexibleMembers); + + case T_STRUCT: + case T_UNION: + return ParseStructInit (T, Braces, AllowFlexibleMembers); + + case T_ENUM: + /* Incomplete enum type must have already raised errors. + ** Just proceed to consume the value. + */ + return ParseScalarInit (T); + + case T_VOID: + if (IS_Get (&Standard) == STD_CC65) { + /* Special cc65 extension in non-ANSI mode */ + return ParseVoidInit (T); + } + /* FALLTHROUGH */ + + default: + Error ("Illegal type"); + return SIZEOF_CHAR; + + } +} + + + +unsigned ParseInit (Type* T) +/* Parse initialization of variables. Return the number of data bytes. */ +{ + /* Current curly braces layers */ + int Braces = 0; + + /* Parse the initialization. Flexible array members can only be initialized + ** in cc65 mode. + */ + unsigned Size = ParseInitInternal (T, &Braces, IS_Get (&Standard) == STD_CC65); + + /* The initialization may not generate code on global level, because code + ** outside function scope will never get executed. + */ + if (HaveGlobalCode ()) { + Error ("Non constant initializers"); + RemoveGlobalCode (); + } + + /* Return the size needed for the initialization */ + return Size; +} diff --git a/src/cc65/initdata.h b/src/cc65/initdata.h new file mode 100644 index 000000000..6fa3f20b3 --- /dev/null +++ b/src/cc65/initdata.h @@ -0,0 +1,61 @@ +/*****************************************************************************/ +/* */ +/* initdata.h */ +/* */ +/* Parse and generate initializer data */ +/* */ +/* */ +/* */ +/* (C) 1998-2009, Ullrich von Bassewitz */ +/* Roemerstrasse 52 */ +/* D-70794 Filderstadt */ +/* EMail: uz@cc65.org */ +/* */ +/* */ +/* This software is provided 'as-is', without any expressed or implied */ +/* warranty. In no event will the authors be held liable for any damages */ +/* arising from the use of this software. */ +/* */ +/* Permission is granted to anyone to use this software for any purpose, */ +/* including commercial applications, and to alter it and redistribute it */ +/* freely, subject to the following restrictions: */ +/* */ +/* 1. The origin of this software must not be misrepresented; you must not */ +/* claim that you wrote the original software. If you use this software */ +/* in a product, an acknowledgment in the product documentation would be */ +/* appreciated but is not required. */ +/* 2. Altered source versions must be plainly marked as such, and must not */ +/* be misrepresented as being the original software. */ +/* 3. This notice may not be removed or altered from any source */ +/* distribution. */ +/* */ +/*****************************************************************************/ + + + +#ifndef INITDATA_H +#define INITDATA_H + + + +/* cc65 */ +#include "datatype.h" + + + +/*****************************************************************************/ +/* Code */ +/*****************************************************************************/ + + + +unsigned ParseInit (Type* T); +/* Parse initialization of variables. Return the number of initialized data +** bytes. +*/ + + + +/* End of initdata.h */ + +#endif diff --git a/src/cc65/locals.c b/src/cc65/locals.c index d3902f329..297994455 100644 --- a/src/cc65/locals.c +++ b/src/cc65/locals.c @@ -46,6 +46,7 @@ #include "expr.h" #include "function.h" #include "global.h" +#include "initdata.h" #include "loadexpr.h" #include "locals.h" #include "stackptr.h" From 4f4487cb032a26478a0ac27fcaf0d29812118d7f Mon Sep 17 00:00:00 2001 From: acqn Date: Tue, 4 Jan 2022 18:23:04 +0800 Subject: [PATCH 005/101] Added supports for long bit-fields. --- src/cc65/datatype.c | 13 +++++++-- src/cc65/declare.c | 10 +++---- src/cc65/initdata.c | 65 +++++++++++++++++++++++++-------------------- 3 files changed, 51 insertions(+), 37 deletions(-) diff --git a/src/cc65/datatype.c b/src/cc65/datatype.c index bb7c40476..e43af238e 100644 --- a/src/cc65/datatype.c +++ b/src/cc65/datatype.c @@ -1016,9 +1016,18 @@ const Type* IntPromotion (const Type* T) */ if (IsTypeBitField (T)) { - /* The standard rule is OK for now as we don't support bit-fields with widths > 16. + /* As we now support long bit-fields, we need modified rules for them: + ** - If an int can represent all values of the bit-field, the bit-field is converted + ** to an int; + ** - Otherwise, if an unsigned int can represent all values of the bit-field, the + ** bit-field is converted to an unsigned int; + ** - Otherwise, the bit-field will have its declared integer type. + ** These rules are borrowed from C++ and seem to be consistent with GCC/Clang's. */ - return T->A.B.Width >= INT_BITS && IsSignUnsigned (T) ? type_uint : type_int; + if (T->A.B.Width > INT_BITS) { + return IsSignUnsigned (T) ? type_ulong : type_long; + } + return T->A.B.Width == INT_BITS && IsSignUnsigned (T) ? type_uint : type_int; } else if (IsTypeChar (T)) { /* An integer can represent all values from either signed or unsigned char, so convert ** chars to int. diff --git a/src/cc65/declare.c b/src/cc65/declare.c index 67e9a1783..7cc7444b6 100644 --- a/src/cc65/declare.c +++ b/src/cc65/declare.c @@ -746,12 +746,10 @@ static int ParseFieldWidth (Declaration* D) D->Type[0].C = T_INT; } - /* TODO: This can be relaxed to be any integral type, but - ** ParseStructInit currently supports only up to int. - */ - if (SizeOf (D->Type) > SizeOf (type_uint)) { - /* Only int-sized or smaller types may be used for bit-fields, for now */ - Error ("cc65 currently supports only char-sized and int-sized bit-field types"); + /* We currently support integral types up to long */ + if (SizeOf (D->Type) > SizeOf (type_ulong)) { + /* Only long-sized or smaller types may be used for bit-fields, for now */ + Error ("cc65 currently supports only long-sized and smaller bit-field types"); /* Avoid a diagnostic storm */ D->Type[0].C = T_INT; diff --git a/src/cc65/initdata.c b/src/cc65/initdata.c index 1f8b35ce4..99dacdca9 100644 --- a/src/cc65/initdata.c +++ b/src/cc65/initdata.c @@ -505,13 +505,14 @@ static unsigned ParseStructInit (Type* T, int* Braces, int AllowFlexibleMembers) */ if (SymIsBitField (Sym) && (IsAnonName (Sym->Name))) { /* Account for the data and output it if we have at least a full - ** word. We may have more if there was storage unit overlap, for - ** example two consecutive 10 bit fields. These will be packed - ** into 3 bytes. + ** byte. We may have more if there was storage unit overlap, for + ** example two consecutive 7 bit fields. Those would be packed + ** into 2 bytes. */ SI.ValBits += Sym->Type->A.B.Width; + CHECK (SI.ValBits <= CHAR_BIT * sizeof(SI.BitVal)); /* TODO: Generalize this so any type can be used. */ - CHECK (SI.ValBits <= CHAR_BITS + INT_BITS - 2); + CHECK (SI.ValBits <= LONG_BITS); while (SI.ValBits >= CHAR_BITS) { DefineBitFieldData (&SI); } @@ -530,45 +531,51 @@ static unsigned ParseStructInit (Type* T, int* Braces, int AllowFlexibleMembers) /* Parse initialization of one field. Bit-fields need a special ** handling. */ - ExprDesc ED; - ED_Init (&ED); - unsigned Val; + ExprDesc Field; + ED_Init (&Field); + unsigned long Val; unsigned Shift; /* Calculate the bitmask from the bit-field data */ - unsigned Mask = (1U << Sym->Type->A.B.Width) - 1U; + unsigned long Mask = shl_l (1UL, Sym->Type->A.B.Width) - 1UL; /* Safety ... */ CHECK (Sym->V.Offs * CHAR_BITS + Sym->Type->A.B.Offs == SI.Offs * CHAR_BITS + SI.ValBits); /* Read the data, check for a constant integer, do a range check */ - ED = ParseScalarInitInternal (IntPromotion (Sym->Type)); - if (!ED_IsConstAbsInt (&ED)) { + Field = ParseScalarInitInternal (IntPromotion (Sym->Type)); + if (!ED_IsConstAbsInt (&Field)) { Error ("Constant initializer expected"); - ED_MakeConstAbsInt (&ED, 1); + ED_MakeConstAbsInt (&Field, 1); } /* Truncate the initializer value to the width of the bit-field and check if we lost ** any useful bits. */ - Val = (unsigned) ED.IVal & Mask; + Val = (unsigned long) Field.IVal & Mask; if (IsSignUnsigned (Sym->Type)) { - if (ED.IVal < 0 || (unsigned long) ED.IVal != Val) { - Warning ("Implicit truncation from '%s' to '%s : %u' in bit-field initializer" - " changes value from %ld to %u", - GetFullTypeName (ED.Type), GetFullTypeName (Sym->Type), - Sym->Type->A.B.Width, ED.IVal, Val); + if (Field.IVal < 0 || (unsigned long) Field.IVal != Val) { + Warning (IsSignUnsigned (Field.Type) ? + "Implicit truncation from '%s' to '%s : %u' in bit-field initializer" + " changes value from %lu to %lu" : + "Implicit truncation from '%s' to '%s : %u' in bit-field initializer" + " changes value from %ld to %lu", + GetFullTypeName (Field.Type), GetFullTypeName (Sym->Type), + Sym->Type->A.B.Width, Field.IVal, Val); } } else { /* Sign extend back to full width of host long. */ unsigned ShiftBits = sizeof (long) * CHAR_BIT - Sym->Type->A.B.Width; - long RestoredVal = asr_l(asl_l (Val, ShiftBits), ShiftBits); - if (ED.IVal != RestoredVal) { - Warning ("Implicit truncation from '%s' to '%s : %u' in bit-field initializer " - "changes value from %ld to %ld", - GetFullTypeName (ED.Type), GetFullTypeName (Sym->Type), - Sym->Type->A.B.Width, ED.IVal, RestoredVal); + long RestoredVal = asr_l (asl_l (Val, ShiftBits), ShiftBits); + if (Field.IVal != RestoredVal) { + Warning (IsSignUnsigned (Field.Type) ? + "Implicit truncation from '%s' to '%s : %u' in bit-field initializer" + " changes value from %lu to %ld" : + "Implicit truncation from '%s' to '%s : %u' in bit-field initializer" + " changes value from %ld to %ld", + GetFullTypeName (Field.Type), GetFullTypeName (Sym->Type), + Sym->Type->A.B.Width, Field.IVal, RestoredVal); } } @@ -578,15 +585,15 @@ static unsigned ParseStructInit (Type* T, int* Braces, int AllowFlexibleMembers) /* Account for the data and output any full bytes we have. */ SI.ValBits += Sym->Type->A.B.Width; - /* Make sure unsigned is big enough to hold the value, 22 bits. - ** This is 22 bits because the most we can have is 7 bits left - ** over from the previous OutputBitField call, plus 15 bits - ** from this field. A 16-bit bit-field will always be byte - ** aligned, so will have padding before it. + /* Make sure unsigned is big enough to hold the value, 32 bits. + ** This cannot be more than 32 bits because a 16-bit or 32-bit + ** bit-field will always be byte-aligned with padding before it + ** if there are bits from prior fields that haven't been output + ** yet. */ CHECK (SI.ValBits <= CHAR_BIT * sizeof(SI.BitVal)); /* TODO: Generalize this so any type can be used. */ - CHECK (SI.ValBits <= CHAR_BITS + INT_BITS - 2); + CHECK (SI.ValBits <= LONG_BITS); while (SI.ValBits >= CHAR_BITS) { DefineBitFieldData (&SI); } From 14988f5dda131cb532ad13a901c85c227c6ace81 Mon Sep 17 00:00:00 2001 From: acqn Date: Wed, 16 Feb 2022 20:10:54 +0800 Subject: [PATCH 006/101] Fixed bitwise shift with numeric constant operand(s). --- src/cc65/shiftexpr.c | 54 ++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/src/cc65/shiftexpr.c b/src/cc65/shiftexpr.c index 168574a1b..f7385ace1 100644 --- a/src/cc65/shiftexpr.c +++ b/src/cc65/shiftexpr.c @@ -64,11 +64,11 @@ void ShiftExpr (struct ExprDesc* Expr) CodeMark Mark1; CodeMark Mark2; token_t Tok; /* The operator token */ - const Type* EffType; /* Effective lhs type */ const Type* ResultType; /* Type of the result */ unsigned ExprBits; /* Bits of the lhs operand */ unsigned GenFlags; /* Generator flags */ unsigned ltype; + int lconst; /* Operand is a constant */ int rconst; /* Operand is a constant */ @@ -92,7 +92,7 @@ void ShiftExpr (struct ExprDesc* Expr) NextToken (); /* Get the type of the result */ - ResultType = EffType = IntPromotion (Expr->Type); + ResultType = IntPromotion (Expr->Type); /* Prepare the code generator flags */ GenFlags = TypeOf (ResultType); @@ -103,7 +103,8 @@ void ShiftExpr (struct ExprDesc* Expr) /* Get the lhs on stack */ GetCodePos (&Mark1); ltype = TypeOf (Expr->Type); - if (ED_IsConstAbs (Expr)) { + lconst = ED_IsConstAbs (Expr); + if (lconst) { /* Constant value */ GetCodePos (&Mark2); g_push (ltype | CF_CONST, Expr->IVal); @@ -115,7 +116,7 @@ void ShiftExpr (struct ExprDesc* Expr) } /* Get the right hand side */ - ExprWithCheck (hie8, &Expr2); + MarkedExprWithCheck (hie8, &Expr2); /* Check the type of the rhs */ if (!IsClassInt (Expr2.Type)) { @@ -124,7 +125,7 @@ void ShiftExpr (struct ExprDesc* Expr) } /* Check for a constant right side expression */ - rconst = ED_IsConstAbs (&Expr2); + rconst = ED_IsConstAbs (&Expr2) && ED_CodeRangeIsEmpty (&Expr2); if (!rconst) { /* Not constant, load into the primary */ @@ -154,31 +155,32 @@ void ShiftExpr (struct ExprDesc* Expr) } - /* If the shift count is zero, nothing happens */ - if (Expr2.IVal == 0) { + /* If the shift count is zero, nothing happens. If the left hand + ** side is a constant, the result is constant. + */ + if (Expr2.IVal == 0 || lconst) { - /* Result is already in Expr, remove the generated code */ - RemoveCode (&Mark1); + /* Set the type */ + Expr->Type = ResultType; - /* Done */ - goto Next; - } + if (lconst) { - /* If the left hand side is a constant, the result is constant */ - if (ED_IsConstAbs (Expr)) { + /* Evaluate the result */ + switch (Tok) { + case TOK_SHL: Expr->IVal <<= Expr2.IVal; break; + case TOK_SHR: Expr->IVal >>= Expr2.IVal; break; + default: /* Shutup gcc */ break; + } - /* Evaluate the result */ - switch (Tok) { - case TOK_SHL: Expr->IVal <<= Expr2.IVal; break; - case TOK_SHR: Expr->IVal >>= Expr2.IVal; break; - default: /* Shutup gcc */ break; + /* Limit the calculated value to the range of its type */ + LimitExprValue (Expr); } - /* Both operands are constant, remove the generated code */ + /* Result is already got, remove the generated code */ RemoveCode (&Mark1); /* Done */ - goto Next; + continue; } /* If we're shifting an integer or unsigned to the right, the lhs @@ -188,13 +190,12 @@ void ShiftExpr (struct ExprDesc* Expr) ** shift count is zero, we're done. */ if (Tok == TOK_SHR && - IsTypeInt (Expr->Type) && + IsClassInt (Expr->Type) && + SizeOf (Expr->Type) == SIZEOF_INT && ED_IsLVal (Expr) && ED_IsLocQuasiConst (Expr) && Expr2.IVal >= 8) { - const Type* OldType; - /* Increase the address by one and decrease the shift count */ ++Expr->IVal; Expr2.IVal -= 8; @@ -202,7 +203,6 @@ void ShiftExpr (struct ExprDesc* Expr) /* Replace the type of the expression temporarily by the ** corresponding char type. */ - OldType = Expr->Type; if (IsSignUnsigned (Expr->Type)) { Expr->Type = type_uchar; } else { @@ -215,9 +215,6 @@ void ShiftExpr (struct ExprDesc* Expr) /* Generate again code for the load, this time with the new type */ LoadExpr (CF_NONE, Expr); - /* Reset the type */ - Expr->Type = OldType; - /* If the shift count is now zero, we're done */ if (Expr2.IVal == 0) { /* Be sure to mark the value as in the primary */ @@ -238,7 +235,6 @@ MakeRVal: /* We have an rvalue in the primary now */ ED_FinalizeRValLoad (Expr); -Next: /* Set the type of the result */ Expr->Type = ResultType; } From 2bda128ef183c6b1a26a5d8a1586af25114e629f Mon Sep 17 00:00:00 2001 From: acqn Date: Sat, 26 Feb 2022 23:02:51 +0800 Subject: [PATCH 007/101] Fixed LimitExprValue() for 64-bit long env. --- src/cc65/expr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cc65/expr.c b/src/cc65/expr.c index 3b9307a37..8920d5c40 100644 --- a/src/cc65/expr.c +++ b/src/cc65/expr.c @@ -216,8 +216,11 @@ void LimitExprValue (ExprDesc* Expr) break; case T_LONG: + Expr->IVal = (int32_t)Expr->IVal; + break; + case T_ULONG: - /* No need to do anything */ + Expr->IVal = (uint32_t)Expr->IVal; break; case T_SCHAR: From 904a77e03c960cd226882d579f2b3365f62bd6c7 Mon Sep 17 00:00:00 2001 From: acqn Date: Fri, 18 Feb 2022 15:20:01 +0800 Subject: [PATCH 008/101] Testcase for #1675. --- test/val/bug1675-ub.c | 60 +++++++++++++++++++++++++ test/val/bug1675.c | 101 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 161 insertions(+) create mode 100644 test/val/bug1675-ub.c create mode 100644 test/val/bug1675.c diff --git a/test/val/bug1675-ub.c b/test/val/bug1675-ub.c new file mode 100644 index 000000000..72e372308 --- /dev/null +++ b/test/val/bug1675-ub.c @@ -0,0 +1,60 @@ +/* #1675 - Some UB cases of bit-shifts */ + +#include + +int unexpected = 0; + +void Test_UB(void) +{ + { + /* UB per standard, lhs expected in cc65: (int)-32768 */ + if (!((0x4000 << 1) < 0)) { + ++unexpected; + printf("Expected: (0x4000 << 1) < 0, got lhs: %ld\n", (long)(0x4000 << 1)); + } + } + + { + /* UB per standard, lhs expected in cc65: (long)-2147483648L */ + if (!((0x40000000 << 1) < 0)) { + ++unexpected; + printf("Expected: (0x40000000 << 1) < 0, got lhs: %ld\n", (long)(0x40000000 << 1)); + } + } + + { + /* UB per standard, lhs expected in cc65: (int)-32768 */ + if (!(((unsigned char)0x80 << 8) < 0)) { + ++unexpected; + printf("Expected: ((unsigned char)0x80 << 8) < 0, got lhs: %ld\n", (long)((unsigned char)0x80 << 8)); + } + } + + { + /* UB per standard, lhs expected in cc65: (int)-32768 */ + if (!(((short)0x4000L << 1) < 0)) { + ++unexpected; + printf("Expected: ((short)0x4000L << 1) < 0, got lhs: %ld\n", (long)((short)0x4000L << 1)); + } + } + + { + const signed short x = 0x4000; + /* UB per standard, lhs expected in cc65: (int)-32768 */ + if (!((x << 1) < 0)) { + ++unexpected; + printf("Expected: (x << 1) < 0, got lhs: %ld\n", (long)(x << 1)); + } + } +} + +int main(void) +{ + Test_UB(); + + if (unexpected != 0) { + printf("Unexpected: %d\n", unexpected); + } + + return unexpected; +} diff --git a/test/val/bug1675.c b/test/val/bug1675.c new file mode 100644 index 000000000..ee24425df --- /dev/null +++ b/test/val/bug1675.c @@ -0,0 +1,101 @@ +/* #1675 - Some corner cases of bit-shifts */ + +#include + +int failures = 0; + +void Test_Defined(void) +{ + { + /* Well-defined per standard, lhs expected in cc65: (int)-256 */ + if (!(((signed char)0x80 << 1) < 0)) { + ++failures; + printf("Expected: ((signed char)0x80 << 1) < 0, got lhs: %ld\n", (long)((signed char)0x80 << 1)); + } + } + + { + /* Implementation-defined per standard, lhs expected in cc65: (int)-128 */ + if (!(((signed char)0x80 >> 1 << 1) < 0)) { + ++failures; + printf("Expected: ((signed char)0x80 >> 1 << 1) < 0, got lhs: %ld\n", (long)((signed char)0x80 >> 1 << 1)); + } + } + + { + int x = 0; + /* Well-defined per standard, lhs expected in cc65: (int)1 */ + if (!((1 << (x++, 0)) == 1)) { + ++failures; + x = 0; + printf("Expected: (1 << (x++, 0)) == 1, got lhs: %ld\n", (long)(1 << (x++, 0))); + } + + /* Well-defined per standard, lhs expected in cc65: (int)1 */ + if (!(x == 1)) { + ++failures; + printf("Expected: (1 << (x++, 0)) == 1 && x == 1, got x: %d\n", x); + } + } + + { + int x = 0, y = 0x100; + /* Well-defined per standard, lhs expected in cc65: (int)128 */ + if (!((y >> (x++, 0) >> 1) == 0x80)) { + ++failures; + x = 0; + printf("Expected: (y >> (x++, 0) >> 1) == 0x80, got lhs: %ld\n", (long)(y >> (x++, 0) >> 1)); + } + + /* Well-defined per standard, lhs expected in cc65: (int)1 */ + if (!(x == 1)) { + ++failures; + printf("Expected: (y >> (x++, 0) >> 1) == 0x80 && x == 1, got x: %d\n", x); + } + } + + { + int x = 0, y = 0x100; + /* Well-defined per standard, lhs expected in cc65: (int)1 */ + if (!((y >> (x++, 8)) == 1)) { + ++failures; + x = 0; + printf("Expected: (y >> (x++, 8)) == 1, got lhs: %ld\n", (long)(y >> (x++, 8))); + } + + /* Well-defined per standard, lhs expected in cc65: (int)1 */ + if (!(x == 1)) { + ++failures; + printf("Expected: (y >> (x++, 8)) == 1 && x == 1, got x: %d\n", x); + } + } + + { + const signed char x = 0x80; + /* Well-defined per standard, lhs expected in cc65: (int)-256 */ + if (!((x << 1) < 0)) { + ++failures; + printf("Expected: (x << 1) < 0, got lhs: %ld\n", (long)(x << 1)); + } + } + + { + const signed char x = 0x40; + /* Well-defined per standard, lhs expected in cc65: (int)128 */ + if (!((x << 1) >= 0)) { + ++failures; + printf("Expected: (x << 1) >= 0, got lhs: %ld\n", (long)(x << 1)); + } + } +} + +int main(void) +{ + Test_Defined(); + + if (failures != 0) { + printf("Failures: %d\n", failures); + } + + return failures; +} From 388ae87cb384d1ef4bf4e01f5d683b0471386b2d Mon Sep 17 00:00:00 2001 From: Spiro Trikaliotis Date: Sat, 19 Feb 2022 12:44:20 +0100 Subject: [PATCH 009/101] Reorganized test/asm --- test/asm/Makefile | 71 +++----------- test/asm/{ => cpudetect}/4510-cpudetect.ref | Bin test/asm/{ => cpudetect}/6502-cpudetect.ref | Bin .../asm/{ => cpudetect}/6502dtv-cpudetect.ref | Bin test/asm/{ => cpudetect}/6502x-cpudetect.ref | Bin test/asm/{ => cpudetect}/65816-cpudetect.ref | Bin test/asm/{ => cpudetect}/65c02-cpudetect.ref | Bin test/asm/{ => cpudetect}/65sc02-cpudetect.ref | Bin test/asm/cpudetect/Makefile | 61 ++++++++++++ test/asm/{ => cpudetect}/cpudetect.s | 0 .../asm/{ => cpudetect}/huc6280-cpudetect.ref | Bin test/asm/listing/Makefile | 89 ++++++++++++++++++ test/asm/{ => listing}/paramcount.s | 0 test/asm/{ => opcodes}/4510-opcodes.ref | Bin test/asm/{ => opcodes}/4510-opcodes.s | 0 test/asm/{ => opcodes}/6502-opcodes.ref | Bin test/asm/{ => opcodes}/6502-opcodes.s | 0 test/asm/{ => opcodes}/6502dtv-opcodes.ref | Bin test/asm/{ => opcodes}/6502dtv-opcodes.s | 0 test/asm/{ => opcodes}/6502x-opcodes.ref | Bin test/asm/{ => opcodes}/6502x-opcodes.s | 0 test/asm/{ => opcodes}/65c02-opcodes.ref | Bin test/asm/{ => opcodes}/65c02-opcodes.s | 0 test/asm/{ => opcodes}/65sc02-opcodes.ref | Bin test/asm/{ => opcodes}/65sc02-opcodes.s | 0 test/asm/opcodes/Makefile | 61 ++++++++++++ test/asm/{ => opcodes}/huc6280-opcodes.ref | Bin test/asm/{ => opcodes}/huc6280-opcodes.s | 0 test/asm/{ => opcodes}/m740-opcodes.s | 0 29 files changed, 225 insertions(+), 57 deletions(-) rename test/asm/{ => cpudetect}/4510-cpudetect.ref (100%) rename test/asm/{ => cpudetect}/6502-cpudetect.ref (100%) rename test/asm/{ => cpudetect}/6502dtv-cpudetect.ref (100%) rename test/asm/{ => cpudetect}/6502x-cpudetect.ref (100%) rename test/asm/{ => cpudetect}/65816-cpudetect.ref (100%) rename test/asm/{ => cpudetect}/65c02-cpudetect.ref (100%) rename test/asm/{ => cpudetect}/65sc02-cpudetect.ref (100%) create mode 100644 test/asm/cpudetect/Makefile rename test/asm/{ => cpudetect}/cpudetect.s (100%) rename test/asm/{ => cpudetect}/huc6280-cpudetect.ref (100%) create mode 100644 test/asm/listing/Makefile rename test/asm/{ => listing}/paramcount.s (100%) rename test/asm/{ => opcodes}/4510-opcodes.ref (100%) rename test/asm/{ => opcodes}/4510-opcodes.s (100%) rename test/asm/{ => opcodes}/6502-opcodes.ref (100%) rename test/asm/{ => opcodes}/6502-opcodes.s (100%) rename test/asm/{ => opcodes}/6502dtv-opcodes.ref (100%) rename test/asm/{ => opcodes}/6502dtv-opcodes.s (100%) rename test/asm/{ => opcodes}/6502x-opcodes.ref (100%) rename test/asm/{ => opcodes}/6502x-opcodes.s (100%) rename test/asm/{ => opcodes}/65c02-opcodes.ref (100%) rename test/asm/{ => opcodes}/65c02-opcodes.s (100%) rename test/asm/{ => opcodes}/65sc02-opcodes.ref (100%) rename test/asm/{ => opcodes}/65sc02-opcodes.s (100%) create mode 100644 test/asm/opcodes/Makefile rename test/asm/{ => opcodes}/huc6280-opcodes.ref (100%) rename test/asm/{ => opcodes}/huc6280-opcodes.s (100%) rename test/asm/{ => opcodes}/m740-opcodes.s (100%) diff --git a/test/asm/Makefile b/test/asm/Makefile index e951c2015..d722c47db 100644 --- a/test/asm/Makefile +++ b/test/asm/Makefile @@ -1,77 +1,34 @@ -# Makefile for the assembler regression tests +# top-level Makefile for the regression tests ifneq ($(shell echo),) CMD_EXE = 1 endif ifdef CMD_EXE - EXE = .exe - MKDIR = mkdir $(subst /,\,$1) - RMDIR = -rmdir /q /s $(subst /,\,$1) + RMDIR = -rmdir /s /q $(subst /,\,$1) else - EXE = - MKDIR = mkdir -p $1 RMDIR = $(RM) -r $1 endif -ifdef QUIET - .SILENT: -endif +WORKDIR = ../testwrk/asm -CA65 := $(if $(wildcard ../../bin/ca65*),../../bin/ca65,ca65) -LD65 := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65) +SUBDIRS = cpudetect opcodes listing -WORKDIR = ../../testwrk/asm +.PHONY: test continue mostlyclean clean -ISEQUAL = ../../testwrk/isequal$(EXE) +test: mostlyclean continue -CC = gcc -CFLAGS = -O2 +define CALL_template -.PHONY: all clean +continue:: + @$(MAKE) -C $1 all -OPCODE_REFS := $(wildcard *-opcodes.ref) -OPCODE_BINS = $(OPCODE_REFS:%.ref=$(WORKDIR)/%.bin) -OPCODE_CPUS = $(OPCODE_REFS:%-opcodes.ref=%) +mostlyclean:: + @$(MAKE) -C $1 clean -CPUDETECT_REFS := $(wildcard *-cpudetect.ref) -CPUDETECT_BINS = $(CPUDETECT_REFS:%.ref=$(WORKDIR)/%.bin) -CPUDETECT_CPUS = $(CPUDETECT_REFS:%-cpudetect.ref=%) +endef -all: $(OPCODE_BINS) $(CPUDETECT_BINS) $(WORKDIR)/paramcount.o +$(foreach subdir,$(SUBDIRS),$(eval $(call CALL_template,$(subdir)))) -$(WORKDIR): - $(call MKDIR,$(WORKDIR)) - -$(ISEQUAL): ../isequal.c | $(WORKDIR) - $(CC) $(CFLAGS) -o $@ $< - -define OPCODE_template - -$(WORKDIR)/$1-opcodes.bin: $1-opcodes.s $(ISEQUAL) - $(if $(QUIET),echo asm/$1-opcodes.bin) - $(CA65) -t none --cpu $1 -l $$(@:.bin=.lst) -o $$(@:.bin=.o) $$< - $(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib - $(ISEQUAL) $1-opcodes.ref $$@ - -endef # OPCODE_template - -$(foreach cpu,$(OPCODE_CPUS),$(eval $(call OPCODE_template,$(cpu)))) - -define CPUDETECT_template - -$(WORKDIR)/$1-cpudetect.bin: cpudetect.s $1-cpudetect.ref $(ISEQUAL) - $(if $(QUIET),echo asm/$1-cpudetect.bin) - $(CA65) -t none --cpu $1 -l $$(@:.bin=.lst) -o $$(@:.bin=.o) $$< - $(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib - $(ISEQUAL) $1-cpudetect.ref $$@ - -endef # CPUDETECT_template - -$(foreach cpu,$(CPUDETECT_CPUS),$(eval $(call CPUDETECT_template,$(cpu)))) - -$(WORKDIR)/%.o: %.s | $(WORKDIR) - $(CA65) -l $(@:.o=.lst) -o $@ $< - -clean: +clean: mostlyclean @$(call RMDIR,$(WORKDIR)) diff --git a/test/asm/4510-cpudetect.ref b/test/asm/cpudetect/4510-cpudetect.ref similarity index 100% rename from test/asm/4510-cpudetect.ref rename to test/asm/cpudetect/4510-cpudetect.ref diff --git a/test/asm/6502-cpudetect.ref b/test/asm/cpudetect/6502-cpudetect.ref similarity index 100% rename from test/asm/6502-cpudetect.ref rename to test/asm/cpudetect/6502-cpudetect.ref diff --git a/test/asm/6502dtv-cpudetect.ref b/test/asm/cpudetect/6502dtv-cpudetect.ref similarity index 100% rename from test/asm/6502dtv-cpudetect.ref rename to test/asm/cpudetect/6502dtv-cpudetect.ref diff --git a/test/asm/6502x-cpudetect.ref b/test/asm/cpudetect/6502x-cpudetect.ref similarity index 100% rename from test/asm/6502x-cpudetect.ref rename to test/asm/cpudetect/6502x-cpudetect.ref diff --git a/test/asm/65816-cpudetect.ref b/test/asm/cpudetect/65816-cpudetect.ref similarity index 100% rename from test/asm/65816-cpudetect.ref rename to test/asm/cpudetect/65816-cpudetect.ref diff --git a/test/asm/65c02-cpudetect.ref b/test/asm/cpudetect/65c02-cpudetect.ref similarity index 100% rename from test/asm/65c02-cpudetect.ref rename to test/asm/cpudetect/65c02-cpudetect.ref diff --git a/test/asm/65sc02-cpudetect.ref b/test/asm/cpudetect/65sc02-cpudetect.ref similarity index 100% rename from test/asm/65sc02-cpudetect.ref rename to test/asm/cpudetect/65sc02-cpudetect.ref diff --git a/test/asm/cpudetect/Makefile b/test/asm/cpudetect/Makefile new file mode 100644 index 000000000..ffddb1ad8 --- /dev/null +++ b/test/asm/cpudetect/Makefile @@ -0,0 +1,61 @@ +# Makefile for the assembler regression tests + +ifneq ($(shell echo),) + CMD_EXE = 1 +endif + +ifdef CMD_EXE + EXE = .exe + MKDIR = mkdir $(subst /,\,$1) + RMDIR = -rmdir /q /s $(subst /,\,$1) +else + EXE = + MKDIR = mkdir -p $1 + RMDIR = $(RM) -r $1 +endif + +ifdef QUIET + .SILENT: +endif + +CA65 := $(if $(wildcard ../../../bin/ca65*),../../../bin/ca65,ca65) +LD65 := $(if $(wildcard ../../../bin/ld65*),../../../bin/ld65,ld65) + +WORKDIR = ../../../testwrk/asm/cpudetect + +ISEQUAL = ../../../testwrk/isequal$(EXE) + +CC = gcc +CFLAGS = -O2 + +.PHONY: all clean + +CPUDETECT_REFS := $(wildcard *-cpudetect.ref) +CPUDETECT_BINS = $(CPUDETECT_REFS:%.ref=$(WORKDIR)/%.bin) +CPUDETECT_CPUS = $(CPUDETECT_REFS:%-cpudetect.ref=%) + +all: $(CPUDETECT_BINS) + +$(WORKDIR): + $(call MKDIR,$(WORKDIR)) + +$(ISEQUAL): ../../isequal.c | $(WORKDIR) + $(CC) $(CFLAGS) -o $@ $< + +define CPUDETECT_template + +$(WORKDIR)/$1-cpudetect.bin: cpudetect.s $1-cpudetect.ref $(ISEQUAL) + $(if $(QUIET),echo asm/$1-cpudetect.bin) + $(CA65) -t none --cpu $1 -l $$(@:.bin=.lst) -o $$(@:.bin=.o) $$< + $(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib + $(ISEQUAL) $1-cpudetect.ref $$@ + +endef # CPUDETECT_template + +$(foreach cpu,$(CPUDETECT_CPUS),$(eval $(call CPUDETECT_template,$(cpu)))) + +$(WORKDIR)/%.o: %.s | $(WORKDIR) + $(CA65) -l $(@:.o=.lst) -o $@ $< + +clean: + @$(call RMDIR,$(WORKDIR)) diff --git a/test/asm/cpudetect.s b/test/asm/cpudetect/cpudetect.s similarity index 100% rename from test/asm/cpudetect.s rename to test/asm/cpudetect/cpudetect.s diff --git a/test/asm/huc6280-cpudetect.ref b/test/asm/cpudetect/huc6280-cpudetect.ref similarity index 100% rename from test/asm/huc6280-cpudetect.ref rename to test/asm/cpudetect/huc6280-cpudetect.ref diff --git a/test/asm/listing/Makefile b/test/asm/listing/Makefile new file mode 100644 index 000000000..f4a7df81c --- /dev/null +++ b/test/asm/listing/Makefile @@ -0,0 +1,89 @@ +# Makefile for the assembler regression tests + +ifneq ($(shell echo),) + CMD_EXE = 1 +endif + +ifdef CMD_EXE + EXE = .exe + MKDIR = mkdir $(subst /,\,$1) + RMDIR = -rmdir /q /s $(subst /,\,$1) +else + EXE = + MKDIR = mkdir -p $1 + RMDIR = $(RM) -r $1 +endif + +ifdef QUIET + .SILENT: +endif + +CA65 := $(if $(wildcard ../../../bin/ca65*),../../../bin/ca65,ca65) +LD65 := $(if $(wildcard ../../../bin/ld65*),../../../bin/ld65,ld65) + +WORKDIR = ../../../testwrk/asm/listing + +ISEQUAL = ../../../testwrk/isequal$(EXE) + +CC = gcc +CFLAGS = -O2 + +.PHONY: all clean + +LISTING_SRC := $(wildcard *.s) +LISTING_TESTS = $(LISTING_SRC:%.s=%) +LISTING_BINS = $(LISTING_SRC:%.s=$(WORKDIR)/%.bin) + +all: $(LISTING_BINS) + +$(WORKDIR): + $(call MKDIR,$(WORKDIR)) + +$(ISEQUAL): ../../isequal.c | $(WORKDIR) + $(CC) $(CFLAGS) -o $@ $< + + +define LISTING_template + +$(WORKDIR)/$1.bin: $1.s $(ISEQUAL) + $(if $(QUIET),echo asm/$1.bin) + + # compile without generating listing + $(CA65) -t none -o $$(@:.bin=.o) $$< + $(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib + +ifneq ($(wildcard $1.bin-ref),) + $(ISEQUAL) $1.bin-ref $$@ +endif + + $(CA65) -t none -l $$(@:.bin=.list.orig) -o $$(@:.bin=.list-o) $$< + $(LD65) -t none -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) none.lib + + # check if the result bin is the same as without listing file + $(ISEQUAL) $$@ $$(@:.bin=.list-bin) + +ifneq ($(wildcard $1.list-ref),) + # we have a reference file, compare that, too + + # remove first line which contains a version number + tail -n +2 $$(@:.bin=.lst.orig) > $$(@:.bin=.lst) + $(ISEQUAL) $1.list-ref $$(@:.bin=.lst) +endif + +# $(CA65) -t none -f -l $$(@:.bin=.flist.orig) -o $$(@:.bin=.flist-o) $$< +# $(LD65) -t none -o $$(@:.bin=.flist-bin) $$(@:.bin=.flist-o) none.lib + +# # check if the result bin is the same as without listing file +# $(ISEQUAL) $$@ $$(@:.bin=.flist-bin) + +endef # LISTING_template + + +$(foreach listing,$(LISTING_TESTS),$(eval $(call LISTING_template,$(listing)))) + + +$(WORKDIR)/%.o: %.s | $(WORKDIR) + $(CA65) -l $(@:.o=.lst) -o $@ $< + +clean: + @$(call RMDIR,$(WORKDIR)) diff --git a/test/asm/paramcount.s b/test/asm/listing/paramcount.s similarity index 100% rename from test/asm/paramcount.s rename to test/asm/listing/paramcount.s diff --git a/test/asm/4510-opcodes.ref b/test/asm/opcodes/4510-opcodes.ref similarity index 100% rename from test/asm/4510-opcodes.ref rename to test/asm/opcodes/4510-opcodes.ref diff --git a/test/asm/4510-opcodes.s b/test/asm/opcodes/4510-opcodes.s similarity index 100% rename from test/asm/4510-opcodes.s rename to test/asm/opcodes/4510-opcodes.s diff --git a/test/asm/6502-opcodes.ref b/test/asm/opcodes/6502-opcodes.ref similarity index 100% rename from test/asm/6502-opcodes.ref rename to test/asm/opcodes/6502-opcodes.ref diff --git a/test/asm/6502-opcodes.s b/test/asm/opcodes/6502-opcodes.s similarity index 100% rename from test/asm/6502-opcodes.s rename to test/asm/opcodes/6502-opcodes.s diff --git a/test/asm/6502dtv-opcodes.ref b/test/asm/opcodes/6502dtv-opcodes.ref similarity index 100% rename from test/asm/6502dtv-opcodes.ref rename to test/asm/opcodes/6502dtv-opcodes.ref diff --git a/test/asm/6502dtv-opcodes.s b/test/asm/opcodes/6502dtv-opcodes.s similarity index 100% rename from test/asm/6502dtv-opcodes.s rename to test/asm/opcodes/6502dtv-opcodes.s diff --git a/test/asm/6502x-opcodes.ref b/test/asm/opcodes/6502x-opcodes.ref similarity index 100% rename from test/asm/6502x-opcodes.ref rename to test/asm/opcodes/6502x-opcodes.ref diff --git a/test/asm/6502x-opcodes.s b/test/asm/opcodes/6502x-opcodes.s similarity index 100% rename from test/asm/6502x-opcodes.s rename to test/asm/opcodes/6502x-opcodes.s diff --git a/test/asm/65c02-opcodes.ref b/test/asm/opcodes/65c02-opcodes.ref similarity index 100% rename from test/asm/65c02-opcodes.ref rename to test/asm/opcodes/65c02-opcodes.ref diff --git a/test/asm/65c02-opcodes.s b/test/asm/opcodes/65c02-opcodes.s similarity index 100% rename from test/asm/65c02-opcodes.s rename to test/asm/opcodes/65c02-opcodes.s diff --git a/test/asm/65sc02-opcodes.ref b/test/asm/opcodes/65sc02-opcodes.ref similarity index 100% rename from test/asm/65sc02-opcodes.ref rename to test/asm/opcodes/65sc02-opcodes.ref diff --git a/test/asm/65sc02-opcodes.s b/test/asm/opcodes/65sc02-opcodes.s similarity index 100% rename from test/asm/65sc02-opcodes.s rename to test/asm/opcodes/65sc02-opcodes.s diff --git a/test/asm/opcodes/Makefile b/test/asm/opcodes/Makefile new file mode 100644 index 000000000..00be96d91 --- /dev/null +++ b/test/asm/opcodes/Makefile @@ -0,0 +1,61 @@ +# Makefile for the assembler regression tests + +ifneq ($(shell echo),) + CMD_EXE = 1 +endif + +ifdef CMD_EXE + EXE = .exe + MKDIR = mkdir $(subst /,\,$1) + RMDIR = -rmdir /q /s $(subst /,\,$1) +else + EXE = + MKDIR = mkdir -p $1 + RMDIR = $(RM) -r $1 +endif + +ifdef QUIET + .SILENT: +endif + +CA65 := $(if $(wildcard ../../../bin/ca65*),../../../bin/ca65,ca65) +LD65 := $(if $(wildcard ../../../bin/ld65*),../../../bin/ld65,ld65) + +WORKDIR = ../../../testwrk/asm/opcodes + +ISEQUAL = ../../../testwrk/isequal$(EXE) + +CC = gcc +CFLAGS = -O2 + +.PHONY: all clean + +OPCODE_REFS := $(wildcard *-opcodes.ref) +OPCODE_BINS = $(OPCODE_REFS:%.ref=$(WORKDIR)/%.bin) +OPCODE_CPUS = $(OPCODE_REFS:%-opcodes.ref=%) + +all: $(OPCODE_BINS) + +$(WORKDIR): + $(call MKDIR,$(WORKDIR)) + +$(ISEQUAL): ../../isequal.c | $(WORKDIR) + $(CC) $(CFLAGS) -o $@ $< + +define OPCODE_template + +$(WORKDIR)/$1-opcodes.bin: $1-opcodes.s $(ISEQUAL) + $(if $(QUIET),echo asm/$1-opcodes.bin) + $(CA65) -t none --cpu $1 -l $$(@:.bin=.lst) -o $$(@:.bin=.o) $$< + $(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib + $(ISEQUAL) $1-opcodes.ref $$@ + +endef # OPCODE_template + +$(foreach cpu,$(OPCODE_CPUS),$(eval $(call OPCODE_template,$(cpu)))) + +$(WORKDIR)/%.o: %.s | $(WORKDIR) + $(CA65) -l $(@:.o=.lst) -o $@ $< + +clean: + @$(call RMDIR,$(WORKDIR)) diff --git a/test/asm/huc6280-opcodes.ref b/test/asm/opcodes/huc6280-opcodes.ref similarity index 100% rename from test/asm/huc6280-opcodes.ref rename to test/asm/opcodes/huc6280-opcodes.ref diff --git a/test/asm/huc6280-opcodes.s b/test/asm/opcodes/huc6280-opcodes.s similarity index 100% rename from test/asm/huc6280-opcodes.s rename to test/asm/opcodes/huc6280-opcodes.s diff --git a/test/asm/m740-opcodes.s b/test/asm/opcodes/m740-opcodes.s similarity index 100% rename from test/asm/m740-opcodes.s rename to test/asm/opcodes/m740-opcodes.s From 0e45976f9b0c07b1fbdb491fff4d8f95ed8f7493 Mon Sep 17 00:00:00 2001 From: Spiro Trikaliotis Date: Sat, 19 Feb 2022 12:52:02 +0100 Subject: [PATCH 010/101] Rename target test to asm --- test/asm/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/asm/Makefile b/test/asm/Makefile index d722c47db..b35c30c9f 100644 --- a/test/asm/Makefile +++ b/test/asm/Makefile @@ -14,9 +14,9 @@ WORKDIR = ../testwrk/asm SUBDIRS = cpudetect opcodes listing -.PHONY: test continue mostlyclean clean +.PHONY: all continue mostlyclean clean -test: mostlyclean continue +all: mostlyclean continue define CALL_template From 0f6cb5b114b0cfe6331dab38c4d19d499b712722 Mon Sep 17 00:00:00 2001 From: Spiro Trikaliotis Date: Sun, 20 Feb 2022 11:20:20 +0100 Subject: [PATCH 011/101] Add proper readmes --- test/asm/cpudetect/readme.txt | 15 ++++++++++++++ test/asm/listing/readme.txt | 27 +++++++++++++++++++++++++ test/asm/opcodes/readme.txt | 29 ++++++++++++++++++++++++++ test/asm/readme.txt | 38 +++++------------------------------ 4 files changed, 76 insertions(+), 33 deletions(-) create mode 100644 test/asm/cpudetect/readme.txt create mode 100644 test/asm/listing/readme.txt create mode 100644 test/asm/opcodes/readme.txt diff --git a/test/asm/cpudetect/readme.txt b/test/asm/cpudetect/readme.txt new file mode 100644 index 000000000..6a1adf480 --- /dev/null +++ b/test/asm/cpudetect/readme.txt @@ -0,0 +1,15 @@ +CPU Detect Tests +---------------- + +These tests all assemble the same file "cpudetect.s" which contains several +conditionals for several CPUs, only using every option known to the "--cpu" +command-line switch of ca65/cl65. + +Reference (".ref") Files +------------------------ + +Some hints about creating new files: +Make an empty file with the CPU's name prepended to "-cpudetect.ref". Run the +tests; one of them will fail due to a mismatch. Review the output of the +".lst" file pedantically, then copy the ".bin" over the empty ".ref" file. + diff --git a/test/asm/listing/readme.txt b/test/asm/listing/readme.txt new file mode 100644 index 000000000..e43f2008a --- /dev/null +++ b/test/asm/listing/readme.txt @@ -0,0 +1,27 @@ +Overall test: +------------- + +These testcases can be used to test different aspects of the assembler. +The name of a test is everything in the form .s. + +The following reference files can be added: + +- .bin-ref: + This is a reference for the resulting binary. + The binary as binary tested against this file. + If they are not equal, the test fails. + +- .list-ref + This is a reference for the resulting listing output + This file *must* have the first line of the listing removed, as that + contains a ca65 version string, and almost always this will be changed! + + +Note that the resulting .bin file is generated twice: Once with no listing +file, and once with listing file. This way, one can find out if the listing +file generation changes anything with the resulting binary output. + + +TODO: +- add the possibility to test for specific error output that are to be + expected diff --git a/test/asm/opcodes/readme.txt b/test/asm/opcodes/readme.txt new file mode 100644 index 000000000..098dd549a --- /dev/null +++ b/test/asm/opcodes/readme.txt @@ -0,0 +1,29 @@ +Opcode Tests: +------------- + +These testcases are inspired by the ones now removed from test/assembler. +The main purpose is to have each possible opcode generated at least once, +either by an Assembly instruction or a ".byte"-placeholder. Typically +generated by disassembling a binary dump that contains data in the form +of the pattern that each opcode is stated once in order followed by easy +to recognise: + +00 00 EA 00 +01 00 EA 00 +02 00 EA 00 +[...] +fe 00 EA 00 +ff 00 EA 00 + +The disassembly is then put in a better readable form by replacing the +leftover dummy opcode parameters with something more recognizable. + +The testcases for 6502, 6502x, 65sc02, 65c02, 4510, and huc6280 have been +put together by Sven Oliver ("SvOlli") Moll, as well as a template for the +m740 instructions set. Later 6502dtv support was also added. + +Still to do is to find a way to implement an opcode testcase for the 65816 +processor, since it's capable of executing instructions with an 8-bit and +a 16-bit operator alike, distinguished by only one processor flag. + + diff --git a/test/asm/readme.txt b/test/asm/readme.txt index 1d135c895..18354bb47 100644 --- a/test/asm/readme.txt +++ b/test/asm/readme.txt @@ -4,44 +4,16 @@ Assembler Testcases Opcode Tests: ------------- -These testcases are inspired by the ones now removed from test/assembler. -The main purpose is to have each possible opcode generated at least once, -either by an Assembly instruction or a ".byte"-placeholder. Typically -generated by disassembling a binary dump that contains data in the form -of the pattern that each opcode is stated once in order followed by easy -to recognise: - -00 00 EA 00 -01 00 EA 00 -02 00 EA 00 -[...] -fe 00 EA 00 -ff 00 EA 00 - -The disassembly is then put in a better readable form by replacing the -leftover dummy opcode parameters with something more recognizable. - -The testcases for 6502, 6502x, 65sc02, 65c02, 4510, and huc6280 have been -put together by Sven Oliver ("SvOlli") Moll, as well as a template for the -m740 instructions set. Later 6502dtv support was also added. - -Still to do is to find a way to implement an opcode testcase for the 65816 -processor, since it's capable of executing instructions with an 8-bit and -a 16-bit operator alike, distinguished by only one processor flag. +these go into opcodes/. Refer to opcodes/readme.txt CPU Detect Tests ---------------- -These tests all assemble the same file "cpudetect.s" which contains several -conditionals for several CPUs, only using every option known to the "--cpu" -command-line switch of ca65/cl65. +these go into cpudetect/. Refer to cpudetect/readme.txt -Reference (".ref") Files ------------------------- +Overall tests: +-------------- -Some hints about creating new files: -Make an empty file with the CPU's name prepended to "-cpudetect.ref". Run the -tests; one of them will fail due to a mismatch. Review the output of the -".lst" file pedantically, then copy the ".bin" over the empty ".ref" file. +These go into listing/. Refer to listing/readme.txt From 49b4a57add8029ce1f2cc270c3689def36bb2cbb Mon Sep 17 00:00:00 2001 From: empathicqubit Date: Sun, 20 Feb 2022 11:44:08 +0100 Subject: [PATCH 012/101] Documentation --- doc/cc65.sgml | 183 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 183 insertions(+) diff --git a/doc/cc65.sgml b/doc/cc65.sgml index 821e76586..94d9b8a48 100644 --- a/doc/cc65.sgml +++ b/doc/cc65.sgml @@ -198,6 +198,189 @@ Here is a description of all the command line options: Enables debug mode, for debugging the behavior of cc65. + --debug-tables name + + Writes symbol table information to a file, which includes details on structs, unions + functions, and global variables. For example, given the following code: + + + struct l { + unsigned char m; + unsigned char n; + }; + + struct hello { + unsigned char j; + unsigned char k; + struct l l; + }; + + struct sub { + unsigned char x; + unsigned char y; + }; + + union xy { + struct sub xy; + unsigned int mem; + }; + + typedef struct hello thingy; + + unsigned char single; + + unsigned char test_local_vars_main(void) { + static unsigned char wahoo; + static unsigned char bonanza = 0x42; + unsigned char i; + unsigned int j; + unsigned int *random; + unsigned char *lol; + signed char whoa; + struct hello wow; + thingy *cool; + union xy xy; + + return 0; + } + + + The following output would be produced: + + + SC_FUNC: _test_local_vars_main: Symbol table + ============================================ + __fixargs__: + Flags: SC_CONST SC_DEF + Type: unsigned int + __argsize__: + Flags: SC_CONST SC_DEF + Type: unsigned char + wahoo: + AsmName: M0001 + Flags: SC_STATIC SC_DEF SC_REF + Type: unsigned char + bonanza: + AsmName: M0002 + Flags: SC_STATIC SC_DEF SC_REF + Type: unsigned char + i: + Flags: SC_AUTO SC_DEF SC_REF + Type: unsigned char + j: + Flags: SC_AUTO SC_DEF SC_REF + Type: unsigned int + random: + Flags: SC_AUTO SC_DEF SC_REF + Type: unsigned int * + lol: + Flags: SC_AUTO SC_DEF SC_REF + Type: unsigned char * + whoa: + Flags: SC_AUTO SC_DEF SC_REF + Type: signed char + wow: + Flags: SC_AUTO SC_DEF SC_REF + Type: struct hello + cool: + Flags: SC_AUTO SC_DEF SC_REF + Type: struct hello * + xy: + Flags: SC_AUTO SC_DEF SC_REF + Type: union xy + + + + + Global symbol table + =================== + thingy: + AsmName: _thingy + Flags: SC_TYPEDEF 0x100000 + Type: struct hello + single: + AsmName: _single + Flags: SC_STATIC SC_EXTERN SC_STORAGE SC_DEF SC_REF 0x100000 + Type: unsigned char + test_local_vars_main: + AsmName: _test_local_vars_main + Flags: SC_FUNC SC_STATIC SC_EXTERN SC_DEF 0x100000 + Type: unsigned char (void) + + + + + Global tag table + ================ + l: + Flags: SC_STRUCT SC_DEF + Type: (none) + hello: + Flags: SC_STRUCT SC_DEF + Type: (none) + sub: + Flags: SC_STRUCT SC_DEF + Type: (none) + xy: + Flags: SC_UNION SC_DEF + Type: (none) + + + + + Global struct and union definitions + ========================= + + SC_STRUCT: l + ============ + m: + Flags: SC_STRUCTFIELD + Type: unsigned char + n: + Flags: SC_STRUCTFIELD + Type: unsigned char + + + + + SC_STRUCT: hello + ================ + j: + Flags: SC_STRUCTFIELD + Type: unsigned char + k: + Flags: SC_STRUCTFIELD + Type: unsigned char + l: + Flags: SC_STRUCTFIELD + Type: struct l + + + + + SC_STRUCT: sub + ============== + x: + Flags: SC_STRUCTFIELD + Type: unsigned char + y: + Flags: SC_STRUCTFIELD + Type: unsigned char + + + + + SC_UNION: xy + ============ + xy: + Flags: SC_STRUCTFIELD + Type: struct sub + mem: + Flags: SC_STRUCTFIELD + Type: unsigned int + + + --debug-opt name The named file contains a list of specific optimization steps to enable or disable. From 2bf8be5b3bd1b3f9f784464a3568c9e507604735 Mon Sep 17 00:00:00 2001 From: Jeff Tranter Date: Mon, 21 Feb 2022 15:44:31 -0500 Subject: [PATCH 013/101] Fix some commonly made spelling errors in comments. --- asminc/telestrat.inc | 2 +- doc/apple2.sgml | 2 +- doc/apple2enh.sgml | 2 +- doc/c64.sgml | 2 +- doc/ca65.sgml | 8 ++++---- doc/funcref.sgml | 2 +- include/_atarios.h | 2 +- include/cc65.h | 10 +++++----- libsrc/apple2/exec.s | 6 +++--- libsrc/c128/emd/c128-reu.s | 2 +- libsrc/c64/emd/c64-reu.s | 2 +- libsrc/cbm/open.s | 4 ++-- libsrc/common/freopen.c | 2 +- libsrc/common/itoa.s | 2 +- libsrc/common/ltoa.s | 2 +- libsrc/dbg/dbgsupp.s | 2 +- libsrc/telestrat/gotoxy.s | 2 +- libsrc/telestrat/tgi/telestrat-228-200-3.s | 2 +- libsrc/telestrat/tgi/telestrat-240-200-2.s | 2 +- libsrc/tgi/tgi_clippedline.s | 8 ++++---- libsrc/tgi/tgi_imulround.s | 2 +- libsrc/tgi/tgi_vectorchar.s | 6 +++--- samples/geos/grc/Makefile | 4 ++-- samples/multidemo.c | 2 +- samples/overlaydemo.c | 2 +- src/ca65/expr.c | 2 +- src/ca65/expr.h | 2 +- src/ca65/lineinfo.c | 2 +- src/ca65/macro.c | 2 +- src/ca65/studyexpr.c | 4 ++-- src/cc65/casenode.c | 2 +- src/cc65/casenode.h | 2 +- src/cc65/codegen.c | 2 +- src/cc65/codegen.h | 2 +- src/cc65/expr.c | 2 +- src/cl65/main.c | 4 ++-- src/common/fp.c | 4 ++-- src/common/fp.h | 4 ++-- targettest/ft.c | 2 +- test/val/cc65150311.c | 2 +- test/val/sub1.c | 2 +- test/val/sub2.c | 2 +- 42 files changed, 62 insertions(+), 62 deletions(-) diff --git a/asminc/telestrat.inc b/asminc/telestrat.inc index 7d4c1e31d..79ac2d566 100644 --- a/asminc/telestrat.inc +++ b/asminc/telestrat.inc @@ -275,7 +275,7 @@ XFWRITE = $3B ; Only in TELEMON 3.x write file (bank 7 of Orix ; Clock primitive XRECLK = $3C ; Reset clock XCLCL = $3D ; Close clock -XWRCLK = $3E ; Displays clock in the adress in A & Y registers +XWRCLK = $3E ; Displays clock in the address in A & Y registers ; Sound primitives XSONPS = $40 ; Send data to PSG register (14 values) diff --git a/doc/apple2.sgml b/doc/apple2.sgml index 09052ade1..63b40c6f8 100644 --- a/doc/apple2.sgml +++ b/doc/apple2.sgml @@ -370,7 +370,7 @@ The names in the parentheses denote the symbols to be used for static linking of In memory constrained situations the memory from $803 to $1FFF can be made available to a program by calling

diff --git a/doc/apple2enh.sgml b/doc/apple2enh.sgml index a105cb47a..15ceed04f 100644 --- a/doc/apple2enh.sgml +++ b/doc/apple2enh.sgml @@ -376,7 +376,7 @@ The names in the parentheses denote the symbols to be used for static linking of In memory constrained situations the memory from $803 to $1FFF can be made available to a program by calling

diff --git a/doc/c64.sgml b/doc/c64.sgml index de37ed4b7..8c1b3754e 100644 --- a/doc/c64.sgml +++ b/doc/c64.sgml @@ -126,7 +126,7 @@ and $FF3F. In memory constrained situations the memory from $400 to $7FF can be made available to a program by calling ,

Conditional assembly: Check if a symbol is defined. Must be followed by - a symbol name. The condition is true if the the given symbol is already + a symbol name. The condition is true if the given symbol is already defined, and false otherwise. See also: @@ -3143,7 +3143,7 @@ See: ,

Conditional assembly: Check if a symbol is defined. Must be followed by - a symbol name. The condition is true if the the given symbol is not + a symbol name. The condition is true if the given symbol is not defined, and false otherwise. See also: @@ -3152,7 +3152,7 @@ See: ,

Conditional assembly: Check if a symbol is referenced. Must be followed - by a symbol name. The condition is true if if the the given symbol was + by a symbol name. The condition is true if if the given symbol was not referenced before, and false otherwise. See also: @@ -3197,7 +3197,7 @@ See: ,

Conditional assembly: Check if a symbol is referenced. Must be followed - by a symbol name. The condition is true if if the the given symbol was + by a symbol name. The condition is true if if the given symbol was referenced before, and false otherwise. This command may be used to build subroutine libraries in include files diff --git a/doc/funcref.sgml b/doc/funcref.sgml index 1a9dcaa77..a8593ebb5 100644 --- a/doc/funcref.sgml +++ b/doc/funcref.sgml @@ -6127,7 +6127,7 @@ pointer you're passing somewhere else, otherwise ptr = realloc (ptr, size); -will loose your only copy of The function is only available as fastcall function, so it may only be used in presence of a prototype. diff --git a/include/_atarios.h b/include/_atarios.h index 5e1374fa5..986092659 100644 --- a/include/_atarios.h +++ b/include/_atarios.h @@ -105,7 +105,7 @@ struct __dos2x { unsigned char* zbufp; /* points to user filename */ unsigned char* zdrva; /* points to serveral buffers (mostly VTOC) */ unsigned char* zsba; /* points to sector buffer */ - unsigned char errno; /* number of occured error */ + unsigned char errno; /* number of occurred error */ }; typedef struct __dos2x dos2x_t; diff --git a/include/cc65.h b/include/cc65.h index 7e9c2cae2..2b05cc17a 100644 --- a/include/cc65.h +++ b/include/cc65.h @@ -59,21 +59,21 @@ unsigned long __fastcall__ udiv32by16r16 (unsigned long rhs, unsigned lhs); */ int __fastcall__ imul8x8r16 (signed char lhs, signed char rhs); -/* Multiplicate two signed 8 bit to yield an signed 16 bit result */ +/* Multiply two signed 8 bit to yield an signed 16 bit result */ long __fastcall__ imul16x16r32 (int lhs, int rhs); -/* Multiplicate two signed 16 bit to yield a signed 32 bit result */ +/* Multiply two signed 16 bit to yield a signed 32 bit result */ unsigned __fastcall__ umul8x8r16 (unsigned char lhs, unsigned char rhs); -/* Multiplicate two unsigned 8 bit to yield an unsigned 16 bit result */ +/* Multiply two unsigned 8 bit to yield an unsigned 16 bit result */ unsigned long __fastcall__ umul16x8r32 (unsigned lhs, unsigned char rhs); -/* Multiplicate an unsigned 16 bit by an unsigned 8 bit number yielding a 24 +/* Multiply an unsigned 16 bit by an unsigned 8 bit number yielding a 24 ** bit unsigned result that is extended to 32 bits for easier handling from C. */ unsigned long __fastcall__ umul16x16r32 (unsigned lhs, unsigned rhs); -/* Multiplicate two unsigned 16 bit to yield an unsigned 32 bit result */ +/* Multiply two unsigned 16 bit to yield an unsigned 32 bit result */ unsigned int __fastcall__ mul20 (unsigned char value); /* Multiply an 8 bit unsigned value by 20 and return the 16 bit unsigned diff --git a/libsrc/apple2/exec.s b/libsrc/apple2/exec.s index c0cd98650..9212ecb8a 100644 --- a/libsrc/apple2/exec.s +++ b/libsrc/apple2/exec.s @@ -129,7 +129,7 @@ setbuf: lda #$00 ; Low byte .assert MLI::OPEN::PATHNAME = MLI::INFO::PATHNAME, error ; Lower file level to avoid program file - ; being closed by C libary shutdown code + ; being closed by C library shutdown code ldx LEVEL stx level beq :+ @@ -185,13 +185,13 @@ setbuf: lda #$00 ; Low byte lda #$00 ; '\0' beq :- ; Branch always - ; Call loader stub after C libary shutdown + ; Call loader stub after C library shutdown : lda #target sta done+1 stx done+2 - ; Initiate C libary shutdown + ; Initiate C library shutdown jmp _exit .bss diff --git a/libsrc/c128/emd/c128-reu.s b/libsrc/c128/emd/c128-reu.s index 3ded00d67..84e7cb695 100644 --- a/libsrc/c128/emd/c128-reu.s +++ b/libsrc/c128/emd/c128-reu.s @@ -72,7 +72,7 @@ reu_params: .word $0000 ; Host address, lo, hi .byte $00 ; Expansion bank no. .word $0000 ; # bytes to move, lo, hi .byte $00 ; Interrupt mask reg. - .byte $00 ; Adress control reg. + .byte $00 ; Address control reg. .code diff --git a/libsrc/c64/emd/c64-reu.s b/libsrc/c64/emd/c64-reu.s index a563305ce..07ac1fbed 100644 --- a/libsrc/c64/emd/c64-reu.s +++ b/libsrc/c64/emd/c64-reu.s @@ -73,7 +73,7 @@ reu_params: .word $0000 ; Host address, lo, hi .byte $00 ; Expansion bank no. .word $0000 ; # bytes to move, lo, hi .byte $00 ; Interrupt mask reg. - .byte $00 ; Adress control reg. + .byte $00 ; Address control reg. .code diff --git a/libsrc/cbm/open.s b/libsrc/cbm/open.s index 317f9eaa2..e9f0237cc 100644 --- a/libsrc/cbm/open.s +++ b/libsrc/cbm/open.s @@ -130,7 +130,7 @@ dowrite: beq notrunc jsr scratch -; Complete the the file name. Check for append mode here. +; Complete the file name. Check for append mode here. notrunc: lda tmp3 ; Get the mode again @@ -168,7 +168,7 @@ nofile: ; ... else use SA=0 (read) jsr OPEN bcs oserror -; Open the the drive command channel and read it +; Open the drive command channel and read it ldx fnunit jsr opencmdchannel diff --git a/libsrc/common/freopen.c b/libsrc/common/freopen.c index d79d3cf15..41b0b094b 100644 --- a/libsrc/common/freopen.c +++ b/libsrc/common/freopen.c @@ -31,7 +31,7 @@ FILE* __fastcall__ freopen (const char* name, const char* mode, FILE* f) ** overwritten by _fopen. */ if (close (f->f_fd) < 0) { - /* An error occured, errno is already set */ + /* An error occurred, errno is already set */ return 0; } diff --git a/libsrc/common/itoa.s b/libsrc/common/itoa.s index 176bc2ddd..808f9bc33 100644 --- a/libsrc/common/itoa.s +++ b/libsrc/common/itoa.s @@ -19,7 +19,7 @@ specval: ; Common subroutine to pop the parameters and put them into core ; -dopop: sta tmp1 ; will loose high byte +dopop: sta tmp1 ; will lose high byte ldy #0 lda (sp),y sta ptr2 diff --git a/libsrc/common/ltoa.s b/libsrc/common/ltoa.s index 54b693ecc..d8d8c988d 100644 --- a/libsrc/common/ltoa.s +++ b/libsrc/common/ltoa.s @@ -18,7 +18,7 @@ ; Common subroutine to pop the parameters and put them into core ; -dopop: sta tmp1 ; will loose high byte +dopop: sta tmp1 ; will lose high byte jsr popax ; get s to ptr2 sta ptr2 stx ptr2+1 diff --git a/libsrc/dbg/dbgsupp.s b/libsrc/dbg/dbgsupp.s index 07ab9e25a..b1f122013 100644 --- a/libsrc/dbg/dbgsupp.s +++ b/libsrc/dbg/dbgsupp.s @@ -58,7 +58,7 @@ DbgBreak: .res 256 DbgStack: -; Swap space for the the C temporaries +; Swap space for the C temporaries CTemp: _DbgCS: .res 2 ; sp diff --git a/libsrc/telestrat/gotoxy.s b/libsrc/telestrat/gotoxy.s index ea7ed5623..3fbdc25e0 100644 --- a/libsrc/telestrat/gotoxy.s +++ b/libsrc/telestrat/gotoxy.s @@ -24,7 +24,7 @@ gotoxy: jsr popa ; Get Y jsr popa sta SCRX -; Update adress video ram position when SCRY is modified (update_adscr) +; Update address video ram position when SCRY is modified (update_adscr) ; Fall through .endproc diff --git a/libsrc/telestrat/tgi/telestrat-228-200-3.s b/libsrc/telestrat/tgi/telestrat-228-200-3.s index 34af597eb..7eda27bc9 100644 --- a/libsrc/telestrat/tgi/telestrat-228-200-3.s +++ b/libsrc/telestrat/tgi/telestrat-228-200-3.s @@ -379,7 +379,7 @@ out: tya tax - lda ptr3 ; XSCHAR needs in A and Y the adress of the string + lda ptr3 ; XSCHAR needs in A and Y the address of the string ldy ptr3+1 BRK_TELEMON(XSCHAR) rts diff --git a/libsrc/telestrat/tgi/telestrat-240-200-2.s b/libsrc/telestrat/tgi/telestrat-240-200-2.s index 345f80e0e..7a6bb8a4c 100644 --- a/libsrc/telestrat/tgi/telestrat-240-200-2.s +++ b/libsrc/telestrat/tgi/telestrat-240-200-2.s @@ -372,7 +372,7 @@ out: tya tax - lda ptr3 ; XSCHAR needs in A and Y the adress of the string + lda ptr3 ; XSCHAR needs in A and Y the address of the string ldy ptr3+1 BRK_TELEMON(XSCHAR) rts diff --git a/libsrc/tgi/tgi_clippedline.s b/libsrc/tgi/tgi_clippedline.s index b32b819ec..b0f1dd456 100644 --- a/libsrc/tgi/tgi_clippedline.s +++ b/libsrc/tgi/tgi_clippedline.s @@ -159,7 +159,7 @@ tgi_clip_sign: .res 1 ;---------------------------------------------------------------------------- -; Multiplicate value in y/a by dy, then divide by dx. +; Multiply value in y/a by dy, then divide by dx. ; .code @@ -176,7 +176,7 @@ tgi_clip_sign: .res 1 lda tgi_clip_dy ldx tgi_clip_dy+1 ; rhs - jsr umul16x16r32 ; Multiplicate + jsr umul16x16r32 ; Multiply ; Move the result of the multiplication into ptr1:ptr2 @@ -199,7 +199,7 @@ done: bit tmp1 ;---------------------------------------------------------------------------- -; Multiplicate value in y/a by dx, then divide by dy. +; Multiply value in y/a by dx, then divide by dy. ; .code @@ -216,7 +216,7 @@ done: bit tmp1 lda tgi_clip_dx ldx tgi_clip_dx+1 ; rhs - jsr umul16x16r32 ; Multiplicate + jsr umul16x16r32 ; Multiply ; Move the result of the multiplication into ptr1:ptr2 diff --git a/libsrc/tgi/tgi_imulround.s b/libsrc/tgi/tgi_imulround.s index 238c69fc8..112f2930f 100644 --- a/libsrc/tgi/tgi_imulround.s +++ b/libsrc/tgi/tgi_imulround.s @@ -33,7 +33,7 @@ _tgi_imulround: ; ASM callable entry point tgi_imulround: -; Multiplicate +; Multiply jsr imul16x16r32 diff --git a/libsrc/tgi/tgi_vectorchar.s b/libsrc/tgi/tgi_vectorchar.s index bd4cc84c4..3e5e6a3dc 100644 --- a/libsrc/tgi/tgi_vectorchar.s +++ b/libsrc/tgi/tgi_vectorchar.s @@ -79,9 +79,9 @@ GetProcessedCoord: jsr GetOp -; Multiplicate with the scale factor. +; Multiply with the scale factor. - jmp tgi_imulround ; Multiplicate, round and scale + jmp tgi_imulround ; Multiply, round and scale ;---------------------------------------------------------------------------- ; Add the base coordinate with offset in Y to the value in A/X @@ -133,7 +133,7 @@ GetProcessedCoord: .code .proc _tgi_vectorchar -; Multiplicate the char value by two and save into Y +; Multiply the char value by two and save into Y asl a tay diff --git a/samples/geos/grc/Makefile b/samples/geos/grc/Makefile index 9dd9ebc5e..ef30a6e03 100644 --- a/samples/geos/grc/Makefile +++ b/samples/geos/grc/Makefile @@ -53,7 +53,7 @@ test.s: test.grc $(GRC) -s test.s test.grc vlir.cvt: vlir.grc vlir0.s vlir1.s vlir2.s -# using seperate calls here for demonstration purposes: +# using separate calls here for demonstration purposes: $(GRC) -t $(SYS) -s vlir.s vlir.grc $(AS) -t $(SYS) vlir.s $(AS) -t $(SYS) vlir0.s @@ -63,7 +63,7 @@ vlir.cvt: vlir.grc vlir0.s vlir1.s vlir2.s # you can also do the above in one command: # $(CL) -t $(SYS) -o vlir.cvt vlir.grc vlir0.s vlir1.s vlir2.s - + clean: @$(DEL) test.s test.h 2>$(NULLDEV) @$(DEL) vlir.s vlir.cvt vlir.c vlir.h 2>$(NULLDEV) diff --git a/samples/multidemo.c b/samples/multidemo.c index 396d7344a..02bb6fcac 100644 --- a/samples/multidemo.c +++ b/samples/multidemo.c @@ -237,7 +237,7 @@ void main (void) /* The linker makes sure that the call to foo() ends up at the right mem ** addr. However it's up to user to make sure that the - right - overlay - ** is actually loaded before making the the call. + ** is actually loaded before making the call. */ foo (); } diff --git a/samples/overlaydemo.c b/samples/overlaydemo.c index 7553f3d0e..dde6b70ab 100644 --- a/samples/overlaydemo.c +++ b/samples/overlaydemo.c @@ -112,7 +112,7 @@ void main (void) /* The linker makes sure that the call to foo() ends up at the right mem ** addr. However it's up to user to make sure that the - right - overlay - ** is actually loaded before making the the call. + ** is actually loaded before making the call. */ foo (); } diff --git a/src/ca65/expr.c b/src/ca65/expr.c index 74133d533..812b6e90c 100644 --- a/src/ca65/expr.c +++ b/src/ca65/expr.c @@ -1708,7 +1708,7 @@ ExprNode* GenLiteralExpr (long Val) ExprNode* GenLiteral0 (void) -/* Return an expression tree that encodes the the number zero */ +/* Return an expression tree that encodes the number zero */ { return GenLiteralExpr (0); } diff --git a/src/ca65/expr.h b/src/ca65/expr.h index 16dffd901..b18fabb01 100644 --- a/src/ca65/expr.h +++ b/src/ca65/expr.h @@ -81,7 +81,7 @@ ExprNode* GenLiteralExpr (long Val); /* Return an expression tree that encodes the given literal value */ ExprNode* GenLiteral0 (void); -/* Return an expression tree that encodes the the number zero */ +/* Return an expression tree that encodes the number zero */ ExprNode* GenSymExpr (struct SymEntry* Sym); /* Return an expression node that encodes the given symbol */ diff --git a/src/ca65/lineinfo.c b/src/ca65/lineinfo.c index e6707dac4..4f29a29d2 100644 --- a/src/ca65/lineinfo.c +++ b/src/ca65/lineinfo.c @@ -429,7 +429,7 @@ void ReleaseFullLineInfo (Collection* LineInfos) /* Walk over all entries */ for (I = 0; I < CollCount (LineInfos); ++I) { - /* Release the the line info */ + /* Release the line info */ ReleaseLineInfo (CollAt (LineInfos, I)); } diff --git a/src/ca65/macro.c b/src/ca65/macro.c index d6c807035..0bdc89b5b 100644 --- a/src/ca65/macro.c +++ b/src/ca65/macro.c @@ -637,7 +637,7 @@ void MacUndef (const StrBuf* Name, unsigned char Style) static int MacExpand (void* Data) -/* If we're currently expanding a macro, set the the scanner token and +/* If we're currently expanding a macro, set the scanner token and ** attribute to the next value and return true. If we are not expanding ** a macro, return false. */ diff --git a/src/ca65/studyexpr.c b/src/ca65/studyexpr.c index 6d8734c9e..2a345a07c 100644 --- a/src/ca65/studyexpr.c +++ b/src/ca65/studyexpr.c @@ -711,7 +711,7 @@ static void StudyMul (ExprNode* Expr, ExprDesc* D) */ if (ED_IsConst (D) && ED_IsValid (&Right)) { - /* Multiplicate both, result goes into Right */ + /* Multiply both, result goes into Right */ ED_Mul (&Right, D); /* Move result into D */ @@ -719,7 +719,7 @@ static void StudyMul (ExprNode* Expr, ExprDesc* D) } else if (ED_IsConst (&Right) && ED_IsValid (D)) { - /* Multiplicate both */ + /* Multiply both */ ED_Mul (D, &Right); } else { diff --git a/src/cc65/casenode.c b/src/cc65/casenode.c index f5e751f08..e7da64995 100644 --- a/src/cc65/casenode.c +++ b/src/cc65/casenode.c @@ -95,7 +95,7 @@ void FreeCaseNodeColl (Collection* Nodes) int SearchCaseNode (const Collection* Nodes, unsigned char Key, int* Index) /* Search for a node in the given collection. If the node has been found, ** set Index to the index of the node and return true. If the node was not -** found, set Index the the insertion position of the node and return +** found, set Index the insertion position of the node and return ** false. */ { diff --git a/src/cc65/casenode.h b/src/cc65/casenode.h index aef546f19..df80e62fd 100644 --- a/src/cc65/casenode.h +++ b/src/cc65/casenode.h @@ -116,7 +116,7 @@ void FreeCaseNodeColl (Collection* Nodes); int SearchCaseNode (const Collection* Nodes, unsigned char Key, int* Index); /* Search for a node in the given collection. If the node has been found, ** set Index to the index of the node and return true. If the node was not -** found, set Index the the insertion position of the node and return +** found, set Index to the insertion position of the node and return ** false. */ diff --git a/src/cc65/codegen.c b/src/cc65/codegen.c index cf10314b9..3a98f5e63 100644 --- a/src/cc65/codegen.c +++ b/src/cc65/codegen.c @@ -1409,7 +1409,7 @@ static unsigned g_intpromotion (unsigned flags) unsigned g_typeadjust (unsigned lhs, unsigned rhs) /* Adjust the integer operands before doing a binary operation. lhs is a flags ** value, that corresponds to the value on TOS, rhs corresponds to the value -** in (e)ax. The return value is the the flags value for the resulting type. +** in (e)ax. The return value is the flags value for the resulting type. */ { /* Get the type spec from the flags */ diff --git a/src/cc65/codegen.h b/src/cc65/codegen.h index d6d3d2370..b0cf9858d 100644 --- a/src/cc65/codegen.h +++ b/src/cc65/codegen.h @@ -217,7 +217,7 @@ void g_reglong (unsigned Flags); unsigned g_typeadjust (unsigned lhs, unsigned rhs); /* Adjust the integer operands before doing a binary operation. lhs is a flags ** value, that corresponds to the value on TOS, rhs corresponds to the value -** in (e)ax. The return value is the the flags value for the resulting type. +** in (e)ax. The return value is the flags value for the resulting type. */ unsigned g_typecast (unsigned lhs, unsigned rhs); diff --git a/src/cc65/expr.c b/src/cc65/expr.c index 3b9307a37..8c1ce6bcb 100644 --- a/src/cc65/expr.c +++ b/src/cc65/expr.c @@ -846,7 +846,7 @@ static unsigned FunctionArgList (FuncDesc* Func, int IsFastcall, ExprDesc* ED) /* The function returns the size of all arguments pushed onto the stack. ** However, if there are parameters missed (which is an error, and was ** flagged by the compiler), AND a stack frame was preallocated above, - ** we would loose track of the stackpointer, and generate an internal error + ** we would lose track of the stackpointer, and generate an internal error ** later. So we correct the value by the parameters that should have been ** pushed into, to avoid an internal compiler error. Since an error was ** generated before, no code will be output anyway. diff --git a/src/cl65/main.c b/src/cl65/main.c index dba4915f2..023e111e0 100644 --- a/src/cl65/main.c +++ b/src/cl65/main.c @@ -538,7 +538,7 @@ static void AssembleFile (const char* File, unsigned ArgCount) /* Check if this is the last processing step */ if (DoLink) { /* We're linking later. Add the output file of the assembly - ** the the file list of the linker. The name of the output + ** to the file list of the linker. The name of the output ** file is that of the input file with ".s" replaced by ".o". */ char* ObjName = MakeFilename (File, ".o"); @@ -1627,7 +1627,7 @@ int main (int argc, char* argv []) break; case FILETYPE_O65: - /* Add the the object file converter files */ + /* Add the object file converter files */ ConvertO65 (Arg); break; diff --git a/src/common/fp.c b/src/common/fp.c index 0c4d2790c..0682f9f9e 100644 --- a/src/common/fp.c +++ b/src/common/fp.c @@ -134,7 +134,7 @@ Float FP_F_Sub (Float Left, Float Right) Float FP_F_Mul (Float Left, Float Right) -/* Multiplicate two floats */ +/* Multiply two floats */ { Float D; D.V = Left.V * Right.V; @@ -220,7 +220,7 @@ Double FP_D_Sub (Double Left, Double Right) Double FP_D_Mul (Double Left, Double Right) -/* Multiplicate two floats */ +/* Multiply two floats */ { Double D; D.V = Left.V * Right.V; diff --git a/src/common/fp.h b/src/common/fp.h index 978359b8b..4e89e2316 100644 --- a/src/common/fp.h +++ b/src/common/fp.h @@ -102,7 +102,7 @@ Float FP_F_Sub (Float Left, Float Right); /* Subtract two floats */ Float FP_F_Mul (Float Left, Float Right); -/* Multiplicate two floats */ +/* Multiply two floats */ Float FP_F_Div (Float Left, Float Right); /* Divide two floats */ @@ -129,7 +129,7 @@ Double FP_D_Sub (Double Left, Double Right); /* Subtract two floats */ Double FP_D_Mul (Double Left, Double Right); -/* Multiplicate two floats */ +/* Multiply two floats */ Double FP_D_Div (Double Left, Double Right); /* Divide two floats */ diff --git a/targettest/ft.c b/targettest/ft.c index 880df6369..3dfa0e37b 100644 --- a/targettest/ft.c +++ b/targettest/ft.c @@ -8,7 +8,7 @@ ** ** The program asks for a filename (if it hasn't ** got one from argv). I then opens the file, -** reads the the first 16 bytes and displays them +** reads the first 16 bytes and displays them ** (as hex values). ** The values of sp (cc65 runtime stack pointer) ** are displayed at some places. The displayed diff --git a/test/val/cc65150311.c b/test/val/cc65150311.c index cd644f491..10676d679 100644 --- a/test/val/cc65150311.c +++ b/test/val/cc65150311.c @@ -20,7 +20,7 @@ int main(void) { n = (p == &func); n = (p == func); -/* the following are not valid C and should go into seperate tests that MUST fail */ +/* the following are not valid C and should go into separate tests that MUST fail */ /* ++p; n = (p > &func); diff --git a/test/val/sub1.c b/test/val/sub1.c index 5dbba97df..06e5cf463 100644 --- a/test/val/sub1.c +++ b/test/val/sub1.c @@ -1,5 +1,5 @@ /* - !!DESCRIPTION!! Substraction Test + !!DESCRIPTION!! Subtraction Test !!ORIGIN!! SDCC regression tests !!LICENCE!! GPL, read COPYING.GPL */ diff --git a/test/val/sub2.c b/test/val/sub2.c index 835e65733..d3ea2a05b 100644 --- a/test/val/sub2.c +++ b/test/val/sub2.c @@ -1,5 +1,5 @@ /* - !!DESCRIPTION!! Substraction Test + !!DESCRIPTION!! Subtraction Test !!ORIGIN!! SDCC regression tests !!LICENCE!! GPL, read COPYING.GPL */ From 5d8cf4ec4849fd1f32b78ce7a3f7af71be9e986c Mon Sep 17 00:00:00 2001 From: Jeff Tranter Date: Mon, 21 Feb 2022 15:54:47 -0500 Subject: [PATCH 014/101] A couple of addtional fixes. --- doc/ca65.sgml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/ca65.sgml b/doc/ca65.sgml index de30f4147..8797f2c60 100644 --- a/doc/ca65.sgml +++ b/doc/ca65.sgml @@ -3152,7 +3152,7 @@ See: ,

Conditional assembly: Check if a symbol is referenced. Must be followed - by a symbol name. The condition is true if if the given symbol was + by a symbol name. The condition is true if the given symbol was not referenced before, and false otherwise. See also: @@ -3197,7 +3197,7 @@ See: ,

Conditional assembly: Check if a symbol is referenced. Must be followed - by a symbol name. The condition is true if if the given symbol was + by a symbol name. The condition is true if the given symbol was referenced before, and false otherwise. This command may be used to build subroutine libraries in include files From a49bf13b2533e1924becce08ed6447135f76e666 Mon Sep 17 00:00:00 2001 From: Greg King Date: Mon, 21 Feb 2022 15:46:13 -0500 Subject: [PATCH 015/101] Reverted "do not use cl65 to prevent tests from failing randomly because of one process deleting the temp files from another". This reverted commit 02a46e02379dbeb86dc6b44bbcfa6d6fa1267528. That commit didn't fix the real bug (a program name in the wrong list). --- targettest/accelerator/Makefile | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/targettest/accelerator/Makefile b/targettest/accelerator/Makefile index bcddac1fa..a46ec43c0 100644 --- a/targettest/accelerator/Makefile +++ b/targettest/accelerator/Makefile @@ -1,7 +1,3 @@ -# Run 'make SYS='; or, set a SYS env. -# var. to build for another target system. -SYS ?= c64 - # Just the usual way to find out if we're # using cmd.exe to execute make rules. ifneq ($(shell echo),) @@ -58,18 +54,10 @@ else endif c64-scpu-test.prg: c64-c128-scpu-test.c -# do not use cl65 to prevent tests from failing randomly because of one process -# deleting the temp files from another -# $(CL) -t c64 c64-c128-scpu-test.c -o c64-scpu-test.prg - $(CC) -t c64 c64-c128-scpu-test.c -o c64-scpu-test.s - $(CL) -t c64 c64-scpu-test.s -o c64-scpu-test.prg + $(CL) -t c64 c64-c128-scpu-test.c -o c64-scpu-test.prg c128-scpu-test.prg: c64-c128-scpu-test.c -# do not use cl65 to prevent tests from failing randomly because of one process -# deleting the temp files from another -# $(CL) -t c128 c64-c128-scpu-test.c -o c128-scpu-test.prg - $(CC) -t c128 c64-c128-scpu-test.c -o c128-scpu-test.s - $(CL) -t c128 c128-scpu-test.s -o c128-scpu-test.prg + $(CL) -t c128 c64-c128-scpu-test.c -o c128-scpu-test.prg c64dtv-test.prg: c64dtv-test.c $(CL) -t c64 c64dtv-test.c -o c64dtv-test.prg @@ -91,4 +79,3 @@ turbomaster-test.prg: turbomaster-test.c clean: @$(DEL) *.prg 2>$(NULLDEV) - @$(DEL) *.s 2>$(NULLDEV) From 39df6f8f66365c4086fec82d14d2352f1dff93df Mon Sep 17 00:00:00 2001 From: Greg King Date: Mon, 21 Feb 2022 16:07:22 -0500 Subject: [PATCH 016/101] Made the c128, not the c64, target build the c128 version of "c64-c128-scpu-test.c". Its placement in the wrong list caused a parallel race condition that sometimes led to failed test builds. --- targettest/accelerator/Makefile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/targettest/accelerator/Makefile b/targettest/accelerator/Makefile index a46ec43c0..dd5011459 100644 --- a/targettest/accelerator/Makefile +++ b/targettest/accelerator/Makefile @@ -1,3 +1,7 @@ +# Run 'make SYS='; or, set a SYS env. +# var. to build for another target system. +SYS ?= c64 + # Just the usual way to find out if we're # using cmd.exe to execute make rules. ifneq ($(shell echo),) @@ -28,16 +32,16 @@ endif EXELIST_c64 = \ c64-scpu-test.prg \ - c128-scpu-test.prg \ c64dtv-test.prg \ - c64-c128-test.prg \ + c64-test.prg \ chameleon-test.prg \ c65-test.prg \ turbomaster-test.prg - + EXELIST_c128 = \ + c128-scpu-test.prg \ c128-test.prg - + ifneq ($(EXELIST_$(SYS)),) testcode: $(EXELIST_$(SYS)) else @@ -62,8 +66,8 @@ c128-scpu-test.prg: c64-c128-scpu-test.c c64dtv-test.prg: c64dtv-test.c $(CL) -t c64 c64dtv-test.c -o c64dtv-test.prg -c64-c128-test.prg: c64-c128-test.c - $(CL) -t c64 c64-c128-test.c -o c64-c128-test.prg +c64-test.prg: c64-c128-test.c + $(CL) -t c64 c64-c128-test.c -o c64-test.prg c128-test.prg: c64-c128-test.c $(CL) -t c128 c64-c128-test.c -o c128-test.prg From 4e406b744c174a6b2c1b4fa65c0c9b5980b614ed Mon Sep 17 00:00:00 2001 From: Karri Kaksonen Date: Thu, 24 Feb 2022 08:50:36 +0200 Subject: [PATCH 017/101] Mark index 0 as TRANSPARENT. Let palette start from index 1 --- include/lynx.h | 26 +++++++++++++------------- libsrc/lynx/tgi/lynx-160-102-16.s | 16 ++++++---------- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/include/lynx.h b/include/lynx.h index 4b0390a13..e5ff88a99 100644 --- a/include/lynx.h +++ b/include/lynx.h @@ -52,24 +52,25 @@ /* Color defines */ -#define COLOR_BLACK 0x00 -#define COLOR_RED 0x01 -#define COLOR_PINK 0x02 -#define COLOR_LIGHTGREY 0x03 -#define COLOR_GREY 0x04 -#define COLOR_DARKGREY 0x05 -#define COLOR_BROWN 0x06 -#define COLOR_PEACH 0x07 -#define COLOR_YELLOW 0x08 -#define COLOR_LIGHTGREEN 0x09 -#define COLOR_GREEN 0x0A -#define COLOR_DARKBROWN 0x0B +#define COLOR_TRANSPARENT 0x00 +#define COLOR_BLACK 0x01 +#define COLOR_RED 0x02 +#define COLOR_PINK 0x03 +#define COLOR_LIGHTGREY 0x04 +#define COLOR_GREY 0x05 +#define COLOR_DARKGREY 0x06 +#define COLOR_BROWN 0x07 +#define COLOR_PEACH 0x08 +#define COLOR_YELLOW 0x09 +#define COLOR_LIGHTGREEN 0x0A +#define COLOR_GREEN 0x0B #define COLOR_VIOLET 0x0C #define COLOR_BLUE 0x0D #define COLOR_LIGHTBLUE 0x0E #define COLOR_WHITE 0x0F /* TGI color defines (default palette) */ +#define TGI_COLOR_TRANSPARENT COLOR_TRANSPARENT #define TGI_COLOR_BLACK COLOR_BLACK #define TGI_COLOR_RED COLOR_RED #define TGI_COLOR_PINK COLOR_PINK @@ -81,7 +82,6 @@ #define TGI_COLOR_YELLOW COLOR_YELLOW #define TGI_COLOR_LIGHTGREEN COLOR_LIGHTGREEN #define TGI_COLOR_GREEN COLOR_GREEN -#define TGI_COLOR_DARKBROWN COLOR_DARKBROWN #define TGI_COLOR_VIOLET COLOR_VIOLET #define TGI_COLOR_BLUE COLOR_BLUE #define TGI_COLOR_LIGHTBLUE COLOR_LIGHTBLUE diff --git a/libsrc/lynx/tgi/lynx-160-102-16.s b/libsrc/lynx/tgi/lynx-160-102-16.s index 903d8f25e..c35b6a5aa 100644 --- a/libsrc/lynx/tgi/lynx-160-102-16.s +++ b/libsrc/lynx/tgi/lynx-160-102-16.s @@ -113,7 +113,8 @@ text_bitmap: .res 8*(1+20+1)+1 .rodata -DEFPALETTE: .byte >$011 +DEFPALETTE: .byte >$223 + .byte >$011 .byte >$34d .byte >$9af .byte >$9b8 @@ -124,11 +125,11 @@ DEFPALETTE: .byte >$011 .byte >$d5f .byte >$c53 .byte >$822 - .byte >$223 .byte >$484 .byte >$8e5 .byte >$cf5 .byte >$fff + .byte <$223 .byte <$011 .byte <$34d .byte <$9af @@ -140,7 +141,6 @@ DEFPALETTE: .byte >$011 .byte <$d5f .byte <$c53 .byte <$822 - .byte <$223 .byte <$484 .byte <$8e5 .byte <$cf5 @@ -162,6 +162,7 @@ INSTALL: lda #1 sta TEXTMAGX sta TEXTMAGY + sta DRAWINDEX stz BGINDEX stz DRAWPAGE stz SWAPREQUEST @@ -418,7 +419,7 @@ cls_sprite: .word 0 .word $a000 ; 160 .word $6600 ; 102 - .byte $00 + .byte $11 .code CLEAR: lda # Date: Fri, 25 Feb 2022 16:00:03 +0200 Subject: [PATCH 018/101] Fix black index in tgi_colors.s --- libsrc/lynx/tgi_colors.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsrc/lynx/tgi_colors.s b/libsrc/lynx/tgi_colors.s index c7aefb417..ebc8c2889 100644 --- a/libsrc/lynx/tgi_colors.s +++ b/libsrc/lynx/tgi_colors.s @@ -4,5 +4,5 @@ .include "tgi-kernel.inc" - .export tgi_color_black:zp = $00 + .export tgi_color_black:zp = $01 .export tgi_color_white:zp = $0F From 5ef420af5a4be4350780b335354093bedc81b5c0 Mon Sep 17 00:00:00 2001 From: acqn Date: Tue, 1 Mar 2022 10:40:01 +0800 Subject: [PATCH 019/101] Fixed OptCmp1 with certain code patterns with labels. --- src/cc65/coptcmp.c | 4 ++-- test/val/bug1690.c | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 test/val/bug1690.c diff --git a/src/cc65/coptcmp.c b/src/cc65/coptcmp.c index fda23ae0a..92401a858 100644 --- a/src/cc65/coptcmp.c +++ b/src/cc65/coptcmp.c @@ -309,10 +309,10 @@ unsigned OptCmp1 (CodeSeg* S) /* Insert the ora instead */ X = NewCodeEntry (OP65_ORA, L[0]->AM, L[0]->Arg, 0, L[0]->LI); - CS_InsertEntry (S, X, I); + CS_InsertEntry (S, X, I+3); /* Remove all other instructions */ - CS_DelEntries (S, I+1, 3); + CS_DelEntries (S, I, 3); /* Remember, we had changes */ ++Changes; diff --git a/test/val/bug1690.c b/test/val/bug1690.c new file mode 100644 index 000000000..317913634 --- /dev/null +++ b/test/val/bug1690.c @@ -0,0 +1,23 @@ +/* OptCmp1 messed up with labels */ + +#include + +int main(void) +{ + register unsigned int x = 0x200; + register unsigned int y = 0; + + do + { + ++y; + } + while (--x); + + if (y != 0x200) + { + printf("0x%X\n", y); + return 1; + } + + return 0; +} From 328781bf8a33991b23c82c5334b779fda0f28b15 Mon Sep 17 00:00:00 2001 From: Karri Kaksonen Date: Tue, 1 Mar 2022 06:44:26 +0200 Subject: [PATCH 020/101] Add target atari7800 --- asminc/atari7800.inc | 8 +++ asminc/atari7800_maria.inc | 39 ++++++++++++ asminc/atari7800_riot.inc | 20 ++++++ asminc/atari7800_tia.inc | 69 +++++++++++++++++++++ cfg/atari7800.cfg | 50 +++++++++++++++ doc/atari7800.sgml | 122 +++++++++++++++++++++++++++++++++++++ include/_maria.h | 63 +++++++++++++++++++ include/atari7800.h | 105 +++++++++++++++++++++++++++++++ 8 files changed, 476 insertions(+) create mode 100644 asminc/atari7800.inc create mode 100644 asminc/atari7800_maria.inc create mode 100644 asminc/atari7800_riot.inc create mode 100644 asminc/atari7800_tia.inc create mode 100644 cfg/atari7800.cfg create mode 100644 doc/atari7800.sgml create mode 100644 include/_maria.h create mode 100644 include/atari7800.h diff --git a/asminc/atari7800.inc b/asminc/atari7800.inc new file mode 100644 index 000000000..a7625aa8a --- /dev/null +++ b/asminc/atari7800.inc @@ -0,0 +1,8 @@ +; Atari 7800 TIA & RIOT read / write registers +; +; Karri Kaksonen (karri@sipo.fi), 2022 + +; TIA, RIOT & MARIA registers mapping +.include "atari7800_tia.inc" +.include "atari7800_riot.inc" +.include "atari7800_maria.inc" diff --git a/asminc/atari7800_maria.inc b/asminc/atari7800_maria.inc new file mode 100644 index 000000000..a8857812d --- /dev/null +++ b/asminc/atari7800_maria.inc @@ -0,0 +1,39 @@ +; Atari 7800 MARIA read / write registers +; + +; Read registers +BKGRND := $00 +P0C1 := $01 +P0C2 := $02 +P0C3 := $03 +MWSYNC := $04 +P1C1 := $05 +P1C2 := $06 +P1C3 := $07 +MSTAT := $08 +P2C1 := $09 +P2C2 := $0A +P2C3 := $0B +DPPH := $0C +P3C1 := $0D +P3C2 := $0E +P3C3 := $0F +DPPL := $10 +P4C1 := $11 +P4C2 := $12 +P4C3 := $13 +CHBASE := $14 +P5C1 := $15 +P5C2 := $16 +P5C3 := $17 +OFFSET := $18 +P6C1 := $19 +P6C2 := $1A +P6C3 := $1B +CTRL := $1C +P7C1 := $1D +P7C2 := $1E +P7C3 := $1F + +; Write registers + diff --git a/asminc/atari7800_riot.inc b/asminc/atari7800_riot.inc new file mode 100644 index 000000000..780e34df3 --- /dev/null +++ b/asminc/atari7800_riot.inc @@ -0,0 +1,20 @@ +; Atari 7800 RIOT read / write registers +; +; Source: DASM - vcs.h +; Details available in: Stella Programmer's Guide by Steve Wright +; +; Florent Flament (contact@florentflament.com), 2017 + +; Read registers +SWCHA := $0280 +CTLSWA := $0281 +SWCHB := $0282 +CTLSWB := $0283 +INTIM := $0284 +TIMINT := $0285 + +; Write registers +TIM1T := $0294 +TIM8T := $0295 +TIM64T := $0296 +T1024T := $0297 diff --git a/asminc/atari7800_tia.inc b/asminc/atari7800_tia.inc new file mode 100644 index 000000000..f4439e421 --- /dev/null +++ b/asminc/atari7800_tia.inc @@ -0,0 +1,69 @@ +; Atari 7800 TIA read / write registers +; +; Source: DASM - vcs.h +; Details available in: Stella Programmer's Guide by Steve Wright +; +; Florent Flament (contact@florentflament.com), 2017 + +; Read registers +VSYNC := $00 +VBLANK := $01 +WSYNC := $02 +RSYNC := $03 +NUSIZ0 := $04 +NUSIZ1 := $05 +COLUP0 := $06 +COLUP1 := $07 +COLUPF := $08 +COLUBK := $09 +CTRLPF := $0A +REFP0 := $0B +REFP1 := $0C +PF0 := $0D +PF1 := $0E +PF2 := $0F +RESP0 := $10 +RESP1 := $11 +RESM0 := $12 +RESM1 := $13 +RESBL := $14 +AUDC0 := $15 +AUDC1 := $16 +AUDF0 := $17 +AUDF1 := $18 +AUDV0 := $19 +AUDV1 := $1A +GRP0 := $1B +GRP1 := $1C +ENAM0 := $1D +ENAM1 := $1E +ENABL := $1F +HMP0 := $20 +HMP1 := $21 +HMM0 := $22 +HMM1 := $23 +HMBL := $24 +VDELP0 := $25 +VDELP1 := $26 +VDELBL := $27 +RESMP0 := $28 +RESMP1 := $29 +HMOVE := $2A +HMCLR := $2B +CXCLR := $2C + +; Write registers +CXM0P := $00 +CXM1P := $01 +CXP0FB := $02 +CXP1FB := $03 +CXM0FB := $04 +CXM1FB := $05 +CXBLPF := $06 +CXPPMM := $07 +INPT0 := $08 +INPT1 := $09 +INPT2 := $0A +INPT3 := $0B +INPT4 := $0C +INPT5 := $0D diff --git a/cfg/atari7800.cfg b/cfg/atari7800.cfg new file mode 100644 index 000000000..a2aa7b36c --- /dev/null +++ b/cfg/atari7800.cfg @@ -0,0 +1,50 @@ +# Atari VCS 7800 linker configuration file for cc65 + +SYMBOLS { + __STACKSIZE__: type = weak, value = $0010; # 16 bytes stack +} + +MEMORY { + ZP: file = "", define = yes, start = $0040, size = $00C0, type = rw; + SP: file = "", define = yes, start = $0140, size = $00C0, type = rw; + RAM1: file = "", define = yes, start = $1800, size = $0840, type = rw; + RAM2: file = "", define = yes, start = $2100, size = $0040, type = rw; + RAM3: file = "", define = yes, start = $2200, size = $0600, type = rw; + # "Normal" cartridge rom. Multiple banks arent supported + # by this script. You may change the rom size, but keep + # two things in mind: + # - start must be a multiple of $1000 + # - ROM must end at $ff79 + ROM: file = %O, define = yes, start = $8000, size = $7f7a, type = ro, fill = yes, fillval = $ff; + # Encryption stuff + ROME: file = %O, start = $ff7a, size = $80, type = ro, fill = yes, fillval = $ff; + # Interrupt vectors + ROMV: file = %O, start = $fffa, size = $6, type = ro, fill = yes, fillval = $ff; +} + +SEGMENTS { + ZEROPAGE: load = ZP, type = zp; + STARTUP: load = ROM, type = ro, define = yes; + CODE: load = ROM, type = ro, define = yes; + RODATA: load = ROM, type = ro, define = yes, align = 256; + DATA: load = ROM, run = RAM1, type = rw, define = yes; + BSS: load = RAM1, type = bss, define = yes; + VECTORS: load = ROM, type = ro, define = yes; + ENCRYPTION: load = ROME, type = ro define = yes; +} + +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = ONCE; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/doc/atari7800.sgml b/doc/atari7800.sgml new file mode 100644 index 000000000..95868bbd9 --- /dev/null +++ b/doc/atari7800.sgml @@ -0,0 +1,122 @@ + + +

+Atari 7800 specific information for cc65 +<author> +<url url="mailto:contact@florentflament.com" name="Florent Flament"><newline> + +<abstract> +An overview over the Atari 7800 runtime system as it is implemented +for the cc65 C compiler. +</abstract> + +<!-- Table of contents --> +<toc> + +<!-- Begin the document --> + +<sect>Overview<p> + +This file contains an overview of the Atari 7800 runtime system as it +comes with the cc65 C compiler. It describes the memory layout, Atari +7800 specific header files and any pitfalls specific to that platform. + +<sect>Binary format<p> + +The default binary output format generated by the linker for the Atari +7800 target is a 4K cartridge image. + +<sect>Memory layout<p> + +cc65 generated programs with the default setup can use RAM from +$0080 to $00FF - __STACKSIZE__, where __STACKSIZE__ is +the size of the system stack with a default value of 16 bytes. The +size of the system stack can be customized by defining the +__STACKSIZE__ linker variable. + +Special locations: + +<descrip> + <tag/Stack/ The C runtime stack is located at $00FF - + __STACKSIZE__ and growing downwards. + + <tag/Heap/ The C heap is located at $0080 and grows upwards. + +</descrip><p> + +<sect>Start-up condition<p> + +When powered-up, the Atari 7800 TIA registers contain random +values. During the initialization phase, the start-up code needs to +initialize the TIA registers to sound values (or else the console has +an unpredictable behavior). In this implementation, zeros are written +to all of TIA registers during the start-up phase. + +Note that RIOT registers (mostly timers) are left uninitialized, as +they don't have any consequence on the console behavior. + +<sect>Platform specific header files<p> + +Programs containing Atari 7800 specific code may use the +<tt/atari7800.h/ header file. + +The following pseudo variables declared in the <tt/atari7800.h/ header +file allow access to the Atari 7800 TIA & RIOT chips registers. + +<descrip> + + <tag><tt/TIA/</tag> The <tt/TIA/ structure allows read/write access + to the Atari 7800 TIA chip registers. See the <tt/_tia.h/ header + file located in the include directory for the declaration of the + structure. Also refer to the Stella Programmer's Guide by Steve + Wright for a detailed description of the chip and its registers. + + <tag><tt/RIOT/</tag> The <tt/RIOT/ structure allows read/write + access to the Atari 7800 RIOT chip registers. See the + <tt/_riot.h/ header file located in the include directory for the + declaration of the structure. Also refer to the Stella Programmer's + Guide by Steve Wright for a detailed description of the chip and its + registers. + +</descrip><p> + + +<sect>Loadable drivers<p> + +There are no drivers for the Atari 7800. + + +<sect>Limitations<p> + +TBD + + +<sect>Other hints<p> + +One may write a custom linker configuration file to tune the memory +layout of a program. See the <tt/atari7800.cfg/ file in the cfg +directory as a starting point. + + +<sect>License<p> + +This software is provided 'as-is', without any expressed or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +<enum> +<item> The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +<item> Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. +<item> This notice may not be removed or altered from any source + distribution. +</enum> + +</article> diff --git a/include/_maria.h b/include/_maria.h new file mode 100644 index 000000000..461119fda --- /dev/null +++ b/include/_maria.h @@ -0,0 +1,63 @@ +/*****************************************************************************/ +/* */ +/* _maria.h */ +/* */ +/* Atari 7800, Maria chip register hardware structures */ +/* */ +/* */ +/* This software is provided 'as-is', without any expressed or implied */ +/* warranty. In no event will the authors be held liable for any damages */ +/* arising from the use of this software. */ +/* */ +/* Permission is granted to anyone to use this software for any purpose, */ +/* including commercial applications, and to alter it and redistribute it */ +/* freely, subject to the following restrictions: */ +/* */ +/* 1. The origin of this software must not be misrepresented; you must not */ +/* claim that you wrote the original software. If you use this software */ +/* in a product, an acknowledgment in the product documentation would be */ +/* appreciated but is not required. */ +/* 2. Altered source versions must be plainly marked as such, and must not */ +/* be misrepresented as being the original software. */ +/* 3. This notice may not be removed or altered from any source */ +/* distribution. */ +/* */ +/*****************************************************************************/ + +/* + * MARIA registers + */ +struct __maria { + unsigned char bkgrnd; + unsigned char p0c1; + unsigned char p0c2; + unsigned char p0c3; + unsigned char wsync; + unsigned char p1c1; + unsigned char p1c2; + unsigned char p1c3; + unsigned char mstat; + unsigned char p2c1; + unsigned char p2c2; + unsigned char p2c3; + unsigned char dpph; + unsigned char p3c1; + unsigned char p3c2; + unsigned char p3c3; + unsigned char dppl; + unsigned char p4c1; + unsigned char p4c2; + unsigned char p4c3; + unsigned char chbase; + unsigned char p5c1; + unsigned char p5c2; + unsigned char p5c3; + unsigned char offset; + unsigned char p6c1; + unsigned char p6c2; + unsigned char p6c3; + unsigned char ctrl; + unsigned char p7c1; + unsigned char p7c2; + unsigned char p7c3; +}; diff --git a/include/atari7800.h b/include/atari7800.h new file mode 100644 index 000000000..378f8786a --- /dev/null +++ b/include/atari7800.h @@ -0,0 +1,105 @@ +/*****************************************************************************/ +/* */ +/* Atari VCS 7800 TIA & RIOT registers addresses */ +/* */ +/* Karri Kaksonen (karri@sipo.fi), 2022 */ +/* */ +/* */ +/*****************************************************************************/ + + + +#ifndef _ATARI7800_H +#define _ATARI7800_H + +/* Check for errors */ +#if !defined(__ATARI7800__) +# error This module may only be used when compiling for the Atari 7800! +#endif + +/*****************************************************************************/ +/* Data */ +/*****************************************************************************/ + + + +/* Color defines */ +#define COLOR_BLACK 0x00 +#define COLOR_WHITE 0x0F + +/* TGI color defines (default palette) */ +#define TGI_COLOR_BLACK COLOR_BLACK +#define TGI_COLOR_WHITE COLOR_WHITE + +/* Masks for joy_read */ +#define JOY_RIGHT_MASK 0x80 +#define JOY_LEFT_MASK 0x40 +#define JOY_DOWN_MASK 0x20 +#define JOY_UP_MASK 0x10 +#define JOY_BTN_1_MASK 0x01 +#define JOY_BTN_2_MASK 0x02 + +#define JOY_BTN_A_MASK JOY_BTN_1_MASK +#define JOY_BTN_B_MASK JOY_BTN_2_MASK + +#define JOY_BTN_A(v) ((v) & JOY_BTN_A_MASK) +#define JOY_BTN_B(v) ((v) & JOY_BTN_B_MASK) + +/* No support for dynamically loadable drivers */ +#define DYN_DRV 0 + +#include <_tia.h> +#define TIA (*(struct __tia*)0x0000) + +#include <_riot.h> +#define RIOT (*(struct __riot*)0x0280) + +#include <_maria.h> +#define MARIA (*(struct __maria*)0x0020) + +/* + * Alternative MARIA register definitions. + */ +#define BKGRND MARIA.bkgrnd +#define BACKGRND MARIA.bkgrnd +#define P0C1 MARIA.p0c1 +#define P0C2 MARIA.p0c2 +#define P0C3 MARIA.p0c3 +#define WSYNC MARIA.wsync +#define P1C1 MARIA.p1c1 +#define P1C2 MARIA.p1c2 +#define P1C3 MARIA.p1c3 +#define MSTAT MARIA.mstat +#define P2C1 MARIA.p2c1 +#define P2C2 MARIA.p2c2 +#define P2C3 MARIA.p2c3 +#define DPPH MARIA.dpph +#define DPH MARIA.dpph +#define P3C1 MARIA.p3c1 +#define P3C2 MARIA.p3c2 +#define P3C3 MARIA.p3c3 +#define DPPL MARIA.dppl +#define DPL MARIA.dppl +#define P4C1 MARIA.p4c1 +#define P4C2 MARIA.p4c2 +#define P4C3 MARIA.p4c3 +#define CHBASE MARIA.chbase +#define P5C1 MARIA.p5c1 +#define P5C2 MARIA.p5c2 +#define P5C3 MARIA.p5c3 +#define OFFSET MARIA.offset +#define P6C1 MARIA.p6c1 +#define P6C2 MARIA.p6c2 +#define P6C3 MARIA.p6c3 +#define CTRL MARIA.ctrl +#define P7C1 MARIA.p7c1 +#define P7C2 MARIA.p7c2 +#define P7C3 MARIA.p7c3 + +/* + * MSTAT register constants + */ +#define MSTAT_VBLANK 0x80 /* vblank is on when bit 7 is set */ + +/* End of atari7800.h */ +#endif From 3266e70de4431a8994d922d119009b56a0b73690 Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Tue, 1 Mar 2022 06:44:55 +0200 Subject: [PATCH 021/101] Add target atari7800 --- README.md | 1 + doc/ca65.sgml | 1 + doc/index.sgml | 3 +++ doc/ld65.sgml | 1 + include/target.h | 2 ++ libsrc/Makefile | 1 + src/ca65/main.c | 4 ++++ src/cc65/main.c | 4 ++++ src/common/target.c | 2 ++ src/common/target.h | 1 + targettest/Makefile | 4 ++++ 11 files changed, 24 insertions(+) diff --git a/README.md b/README.md index 93b91aa80..009fca78b 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ including - the Atari 8-bit machines. - the Atari 2600 console. - the Atari 5200 console. +- the Atari 7800 console. - GEOS for the C64, C128 and Apple //e. - the Bit Corporation Gamate console. - the NEC PC-Engine (aka TurboGrafx-16) console. diff --git a/doc/ca65.sgml b/doc/ca65.sgml index 8797f2c60..c0ebe3688 100644 --- a/doc/ca65.sgml +++ b/doc/ca65.sgml @@ -4763,6 +4763,7 @@ compiler, depending on the target system selected: <item><tt/__APPLE2ENH__/ - Target system is <tt/apple2enh/ <item><tt/__ATARI2600__/ - Target system is <tt/atari2600/ <item><tt/__ATARI5200__/ - Target system is <tt/atari5200/ +<item><tt/__ATARI7800__/ - Target system is <tt/atari7800/ <item><tt/__ATARI__/ - Target system is <tt/atari/ or <tt/atarixl/ <item><tt/__ATARIXL__/ - Target system is <tt/atarixl/ <item><tt/__ATMOS__/ - Target system is <tt/atmos/ diff --git a/doc/index.sgml b/doc/index.sgml index 3bb085bf6..bb3ad5357 100644 --- a/doc/index.sgml +++ b/doc/index.sgml @@ -124,6 +124,9 @@ <tag><htmlurl url="atari5200.html" name="atari5200.html"></tag> Topics specific to the Atari 5200 Game Console. + <tag><htmlurl url="atari7800.html" name="atari7800.html"></tag> + Topics specific to the Atari 7800 Game Console. + <tag><htmlurl url="atmos.html" name="atmos.html"></tag> Topics specific to the Oric Atmos. diff --git a/doc/ld65.sgml b/doc/ld65.sgml index 87c2cae51..307caeaa4 100644 --- a/doc/ld65.sgml +++ b/doc/ld65.sgml @@ -166,6 +166,7 @@ Here is a description of all of the command-line options: <item>apple2 <item>apple2enh <item>atari2600 + <item>atari7800 <item>atari <item>atarixl <item>atmos diff --git a/include/target.h b/include/target.h index af401ec35..7663a39dd 100644 --- a/include/target.h +++ b/include/target.h @@ -43,6 +43,8 @@ # include <atari2600.h> #elif defined(__ATARI5200__) # include <atari5200.h> +#elif defined(__ATARI7800__) +# include <atari7800.h> #elif defined(__ATMOS__) # include <atmos.h> #elif defined(__CBM__) diff --git a/libsrc/Makefile b/libsrc/Makefile index 60946b59f..177314bdf 100644 --- a/libsrc/Makefile +++ b/libsrc/Makefile @@ -21,6 +21,7 @@ TARGETS = apple2 \ atarixl \ atari2600 \ atari5200 \ + atari7800 \ atmos \ creativision \ $(CBMS) \ diff --git a/src/ca65/main.c b/src/ca65/main.c index 0eaf4ba6b..b1ef3a3db 100644 --- a/src/ca65/main.c +++ b/src/ca65/main.c @@ -212,6 +212,10 @@ static void SetSys (const char* Sys) NewSymbol ("__ATARI5200__", 1); break; + case TGT_ATARI7800: + NewSymbol ("__ATARI7800__", 1); + break; + case TGT_ATARI: NewSymbol ("__ATARI__", 1); break; diff --git a/src/cc65/main.c b/src/cc65/main.c index 0ed5af986..4a5729063 100644 --- a/src/cc65/main.c +++ b/src/cc65/main.c @@ -172,6 +172,10 @@ static void SetSys (const char* Sys) DefineNumericMacro ("__ATARI5200__", 1); break; + case TGT_ATARI7800: + DefineNumericMacro ("__ATARI7800__", 1); + break; + case TGT_ATARI: DefineNumericMacro ("__ATARI__", 1); break; diff --git a/src/common/target.c b/src/common/target.c index a35bf67a8..4a851034a 100644 --- a/src/common/target.c +++ b/src/common/target.c @@ -147,6 +147,7 @@ static const TargetEntry TargetMap[] = { { "atari", TGT_ATARI }, { "atari2600", TGT_ATARI2600 }, { "atari5200", TGT_ATARI5200 }, + { "atari7800", TGT_ATARI7800 }, { "atarixl", TGT_ATARIXL }, { "atmos", TGT_ATMOS }, { "bbc", TGT_BBC }, @@ -188,6 +189,7 @@ static const TargetProperties PropertyTable[TGT_COUNT] = { { "atari", CPU_6502, BINFMT_BINARY, CTAtari }, { "atari2600", CPU_6502, BINFMT_BINARY, CTNone }, { "atari5200", CPU_6502, BINFMT_BINARY, CTAtari }, + { "atari7800", CPU_6502, BINFMT_BINARY, CTNone }, { "atarixl", CPU_6502, BINFMT_BINARY, CTAtari }, { "vic20", CPU_6502, BINFMT_BINARY, CTPET }, { "c16", CPU_6502, BINFMT_BINARY, CTPET }, diff --git a/src/common/target.h b/src/common/target.h index 7f85713cf..7087048e2 100644 --- a/src/common/target.h +++ b/src/common/target.h @@ -57,6 +57,7 @@ typedef enum { TGT_ATARI, TGT_ATARI2600, TGT_ATARI5200, + TGT_ATARI7800, TGT_ATARIXL, TGT_VIC20, TGT_C16, diff --git a/targettest/Makefile b/targettest/Makefile index 806f6b445..0450bfd4e 100644 --- a/targettest/Makefile +++ b/targettest/Makefile @@ -673,6 +673,9 @@ EXELIST_atari2600 = \ EXELIST_atari5200 = \ minimal +EXELIST_atari7800 = \ + minimal + EXELIST_gamate = \ minimal @@ -728,6 +731,7 @@ TARGETS := \ atarixl \ atari2600 \ atari5200 \ + atari7800 \ atmos \ bbc \ c128 \ From 8c975dfb36c43a25443879f218ff102f0e86e354 Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Tue, 1 Mar 2022 07:03:29 +0200 Subject: [PATCH 022/101] Remove garbage --- include/atari7800.h | 50 +++++---------------------------------------- 1 file changed, 5 insertions(+), 45 deletions(-) diff --git a/include/atari7800.h b/include/atari7800.h index 378f8786a..4fdaacfcc 100644 --- a/include/atari7800.h +++ b/include/atari7800.h @@ -25,10 +25,14 @@ /* Color defines */ #define COLOR_BLACK 0x00 -#define COLOR_WHITE 0x0F +#define COLOR_GREY 0x01 +#define COLOR_LIGHTGREY 0x02 +#define COLOR_WHITE 0x03 /* TGI color defines (default palette) */ #define TGI_COLOR_BLACK COLOR_BLACK +#define TGI_COLOR_GREY COLOR_GREY +#define TGI_COLOR_LIGHTGREY COLOR_LIGHTGREY #define TGI_COLOR_WHITE COLOR_WHITE /* Masks for joy_read */ @@ -57,49 +61,5 @@ #include <_maria.h> #define MARIA (*(struct __maria*)0x0020) -/* - * Alternative MARIA register definitions. - */ -#define BKGRND MARIA.bkgrnd -#define BACKGRND MARIA.bkgrnd -#define P0C1 MARIA.p0c1 -#define P0C2 MARIA.p0c2 -#define P0C3 MARIA.p0c3 -#define WSYNC MARIA.wsync -#define P1C1 MARIA.p1c1 -#define P1C2 MARIA.p1c2 -#define P1C3 MARIA.p1c3 -#define MSTAT MARIA.mstat -#define P2C1 MARIA.p2c1 -#define P2C2 MARIA.p2c2 -#define P2C3 MARIA.p2c3 -#define DPPH MARIA.dpph -#define DPH MARIA.dpph -#define P3C1 MARIA.p3c1 -#define P3C2 MARIA.p3c2 -#define P3C3 MARIA.p3c3 -#define DPPL MARIA.dppl -#define DPL MARIA.dppl -#define P4C1 MARIA.p4c1 -#define P4C2 MARIA.p4c2 -#define P4C3 MARIA.p4c3 -#define CHBASE MARIA.chbase -#define P5C1 MARIA.p5c1 -#define P5C2 MARIA.p5c2 -#define P5C3 MARIA.p5c3 -#define OFFSET MARIA.offset -#define P6C1 MARIA.p6c1 -#define P6C2 MARIA.p6c2 -#define P6C3 MARIA.p6c3 -#define CTRL MARIA.ctrl -#define P7C1 MARIA.p7c1 -#define P7C2 MARIA.p7c2 -#define P7C3 MARIA.p7c3 - -/* - * MSTAT register constants - */ -#define MSTAT_VBLANK 0x80 /* vblank is on when bit 7 is set */ - /* End of atari7800.h */ #endif From d059682692cbb8c281334a1d94f7f5055b3b8264 Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Tue, 1 Mar 2022 07:37:07 +0200 Subject: [PATCH 023/101] Add crt0.s and ctype.s --- libsrc/atari7800/crt0.s | 71 ++++++++++++++++++++++++++++++++++++++++ libsrc/atari7800/ctype.s | 5 +++ 2 files changed, 76 insertions(+) create mode 100644 libsrc/atari7800/crt0.s create mode 100644 libsrc/atari7800/ctype.s diff --git a/libsrc/atari7800/crt0.s b/libsrc/atari7800/crt0.s new file mode 100644 index 000000000..3d53abfa8 --- /dev/null +++ b/libsrc/atari7800/crt0.s @@ -0,0 +1,71 @@ + .export _zonecounter + .export __STARTUP__ : absolute = 1 + .export _exit + .import __ROM_START__ + .import __RAM3_START__, __RAM3_SIZE__ + .import initlib, donelib + .import zerobss, copydata + .import push0, _main + .include "zeropage.inc" + +INPTCTRL = $01 +OFFSET = $38 +CTRL = $3c + + .segment "STARTUP" +start: + ; Startup sequence recommended by Atari. + ; See the 7800 standards document. + sei ; Initialize 6502 + cld + lda #$07 ; Lock machine in 7800 mode + sta INPTCTRL + lda #$7f ; DMA off + sta CTRL + ldx #0 ; OFFSET must always be 0 + stx OFFSET + stx INPTCTRL ; Make sure joysticks don't freeze + dex ; Stack pointer = $ff + txs + + ; Set up parameter stack + lda #<(__RAM3_START__ + __RAM3_SIZE__) + sta sp + lda #>(__RAM3_START__ + __RAM3_SIZE__) + sta sp+1 + + jsr copydata + jsr zerobss + jsr initlib + + ; Call main program (pass empty command line) + jsr push0 ; argc + jsr push0 ; argv + ldy #4 ; Argument size + jsr _main + +_exit: + jsr donelib + jmp start + +NMIHandler: + inc _zonecounter + rti + +IRQHandler: + rti + + .segment "DATA" +_zonecounter: + .byte 0 + + .segment "ENCRYPTION" + .res 126, $ff ; Reserved for encryption +Lfff8: .byte $ff ; Region verification (always $ff) +Lfff9: .byte $f7 ; Use last 4096 bytes only for encryption +;;;Lfff9: .byte <(((__ROM_START__/4096)<<4) | 7) + + .segment "VECTORS" + .word NMIHandler + .word start + .word IRQHandler diff --git a/libsrc/atari7800/ctype.s b/libsrc/atari7800/ctype.s new file mode 100644 index 000000000..1301965eb --- /dev/null +++ b/libsrc/atari7800/ctype.s @@ -0,0 +1,5 @@ +; Character specification table. +; +; uses the "common" definition + + .include "ctype_common.inc" From c293b299d8dcfb13589f6ea9a8a457019130dca8 Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Tue, 1 Mar 2022 07:44:47 +0200 Subject: [PATCH 024/101] Add segment ONCE --- cfg/atari7800.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/cfg/atari7800.cfg b/cfg/atari7800.cfg index a2aa7b36c..cf663be3d 100644 --- a/cfg/atari7800.cfg +++ b/cfg/atari7800.cfg @@ -25,6 +25,7 @@ MEMORY { SEGMENTS { ZEROPAGE: load = ZP, type = zp; STARTUP: load = ROM, type = ro, define = yes; + ONCE: load = ROM, type = ro, define = yes; CODE: load = ROM, type = ro, define = yes; RODATA: load = ROM, type = ro, define = yes, align = 256; DATA: load = ROM, run = RAM1, type = rw, define = yes; From b861f6df8f62907fa86ca978372c10f142271670 Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Tue, 1 Mar 2022 09:28:06 +0200 Subject: [PATCH 025/101] Add exehdr --- libsrc/atari7800/exehdr.s | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 libsrc/atari7800/exehdr.s diff --git a/libsrc/atari7800/exehdr.s b/libsrc/atari7800/exehdr.s new file mode 100644 index 000000000..15ce7ea29 --- /dev/null +++ b/libsrc/atari7800/exehdr.s @@ -0,0 +1,39 @@ +; ------------------------------------------------------------------------ +; EXE header + .segment "EXEHDR" + .byte 3 ; version + .byte 'A','T','A','R','I','7','8','0','0',' ',' ',' ',' ',' ',' ',' ' + .byte 'G','a','m','e',' ','n','a','m','e',0,0,0,0,0,0,0 + .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + .byte 0,0,$80,0 ; Size + ; bit 0 - pokey at 4000 + ; bit 1 - supergame bank switched + ; bit 2 - supergame ram at $4000 + ; bit 3 - rom at $4000 + ; bit 4 - bank 6 at $4000 + ; bit 5 - supergame banked ram + ; bit 6 - pokey at $450 + ; bit 7 - mirror ram at $4000 + ; bit 8 - activision banking + ; bit 9 - absolute banking + ; bit 10 - pokey at $440 + ; bit 11 - ym2151 at $461/462 + ; bit 12 - souper + ; bit 13-15 - Special + ; 0 = Normal cart + .byte 0,0 ; 0 = Normal cart + .byte 1 ; 1 = Joystick, 2 = lightgun + .byte 0 ; No joystick 2 + .byte 0 ; bit0 = 0:NTSC,1:PAL bit1 = 0:component,1:composite + .byte 0 ; Save data peripheral - 1 byte (version 2) + ; 0 = None / unknown (default) + ; 1 = High Score Cart (HSC) + ; 2 = SaveKey + + .byte 0 ; 63 Expansion module + ; 0 = No expansion module (default on all currently released games) + ; 1 = Expansion module required + .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + .byte 0,0,0,0,0,0,0,0 + .byte 'A','C','T','U','A','L',' ','C','A','R','T',' ','D','A','T','A',' ','S','T','A','R','T','S',' ','H','E','R','E' From d679faaf2221cdc2336c0b207a736e878b3a3445 Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Tue, 1 Mar 2022 09:28:15 +0200 Subject: [PATCH 026/101] Add exehdr --- cfg/atari7800.cfg | 26 ++++++++++++++++++++------ libsrc/atari7800/exehdr.s | 7 +++++++ 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/cfg/atari7800.cfg b/cfg/atari7800.cfg index cf663be3d..8029ca674 100644 --- a/cfg/atari7800.cfg +++ b/cfg/atari7800.cfg @@ -2,6 +2,16 @@ SYMBOLS { __STACKSIZE__: type = weak, value = $0010; # 16 bytes stack + __EXEHDR__: type = import; + __VEC_BOTTOM__: value = $fffa, type = export; + __VEC_SIZE__: value = $6, type = export; + __ENCRYPT_BOTTOM__: value = $ff7a, type = export; + __ENCRYPT_SIZE__: value = $80, type = export; + __MEMORY_TOP__: value = __ENCRYPT_BOTTOM__, type = export; + __INIT_SIZE__: value = 69, type = export; + __MEMORY_INIT__: value = __MEMORY_TOP__ - __INIT_SIZE__, type = export; + __MEMORY_BOTTOM__: value = $8000, type = export; + __FREE_ROM_SIZE__: value = __MEMORY_INIT__ - __MEMORY_BOTTOM__, type = export; } MEMORY { @@ -10,27 +20,31 @@ MEMORY { RAM1: file = "", define = yes, start = $1800, size = $0840, type = rw; RAM2: file = "", define = yes, start = $2100, size = $0040, type = rw; RAM3: file = "", define = yes, start = $2200, size = $0600, type = rw; + # For emulators you also need a header file + HEADER: file = %O, start = $0000, size = 128; # "Normal" cartridge rom. Multiple banks arent supported # by this script. You may change the rom size, but keep # two things in mind: # - start must be a multiple of $1000 # - ROM must end at $ff79 - ROM: file = %O, define = yes, start = $8000, size = $7f7a, type = ro, fill = yes, fillval = $ff; + ROM: file = %O, define = yes, start = __MEMORY_BOTTOM__, size = __FREE_ROM_SIZE__, type = ro, fill = yes, fillval = $ff; + ROMS: file = %O, define = yes, start = __MEMORY_INIT__, size = __INIT_SIZE__, type = ro, fill = yes, fillval = $ff; # Encryption stuff - ROME: file = %O, start = $ff7a, size = $80, type = ro, fill = yes, fillval = $ff; + ROME: file = %O, start = __ENCRYPT_BOTTOM__, size = __ENCRYPT_SIZE__, type = ro, fill = yes, fillval = $ff; # Interrupt vectors - ROMV: file = %O, start = $fffa, size = $6, type = ro, fill = yes, fillval = $ff; + ROMV: file = %O, start = __VEC_BOTTOM__, size = __VEC_SIZE__, type = ro, fill = yes, fillval = $ff; } SEGMENTS { ZEROPAGE: load = ZP, type = zp; - STARTUP: load = ROM, type = ro, define = yes; - ONCE: load = ROM, type = ro, define = yes; + EXEHDR: load = HEADER, type = ro, define = yes; + STARTUP: load = ROMS, type = ro, define = yes; + ONCE: load = ROMS, type = ro, define = yes; CODE: load = ROM, type = ro, define = yes; RODATA: load = ROM, type = ro, define = yes, align = 256; DATA: load = ROM, run = RAM1, type = rw, define = yes; BSS: load = RAM1, type = bss, define = yes; - VECTORS: load = ROM, type = ro, define = yes; + VECTORS: load = ROMV, type = ro, define = yes; ENCRYPTION: load = ROME, type = ro define = yes; } diff --git a/libsrc/atari7800/exehdr.s b/libsrc/atari7800/exehdr.s index 15ce7ea29..6f3023040 100644 --- a/libsrc/atari7800/exehdr.s +++ b/libsrc/atari7800/exehdr.s @@ -1,3 +1,10 @@ +; +; Karri Kaksonen, 2022 +; +; This header contains data for emulators +; + .export __EXEHDR__: absolute = 1 + ; ------------------------------------------------------------------------ ; EXE header .segment "EXEHDR" From bca8fcb9478f47221e2a3f7d1ecdf5717c72899c Mon Sep 17 00:00:00 2001 From: Greg King <gregdk@users.sf.net> Date: Tue, 1 Mar 2022 12:56:34 -0500 Subject: [PATCH 027/101] Added a more general test to test/val/bug1690.c --- test/val/bug1690.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/test/val/bug1690.c b/test/val/bug1690.c index 317913634..499dc6b35 100644 --- a/test/val/bug1690.c +++ b/test/val/bug1690.c @@ -2,22 +2,29 @@ #include <stdio.h> +static int failures = 0; +static unsigned int z = 0xFF23; + int main(void) { register unsigned int x = 0x200; register unsigned int y = 0; - do - { + do { ++y; + } while (--x); + if (y != 0x200) { + printf("y should be 0x200, not 0x%X.\n", y); + ++failures;; } - while (--x); - if (y != 0x200) - { - printf("0x%X\n", y); - return 1; - } + if ((z -= 0x23)) { + /* Passed -- non-zero z looks like non-zero. */ + } else { + /* Failed -- only the low byte of z was tested. */ + printf("Test thinks non-zero z is zero.\n"); + ++failures; + } - return 0; + return failures; } From 1ba39b678c6efa565736d115efb080d94ccd99a3 Mon Sep 17 00:00:00 2001 From: acqn <acqn163@outlook.com> Date: Thu, 3 Mar 2022 14:03:01 +0800 Subject: [PATCH 028/101] Fixed test/asm/listing/Makefile with mingw32-make.exe that has problems with comments lead with tabulators. --- test/asm/listing/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/asm/listing/Makefile b/test/asm/listing/Makefile index f4a7df81c..c152db7be 100644 --- a/test/asm/listing/Makefile +++ b/test/asm/listing/Makefile @@ -48,7 +48,7 @@ define LISTING_template $(WORKDIR)/$1.bin: $1.s $(ISEQUAL) $(if $(QUIET),echo asm/$1.bin) - # compile without generating listing +# compile without generating listing $(CA65) -t none -o $$(@:.bin=.o) $$< $(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib @@ -59,13 +59,13 @@ endif $(CA65) -t none -l $$(@:.bin=.list.orig) -o $$(@:.bin=.list-o) $$< $(LD65) -t none -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) none.lib - # check if the result bin is the same as without listing file +# check if the result bin is the same as without listing file $(ISEQUAL) $$@ $$(@:.bin=.list-bin) ifneq ($(wildcard $1.list-ref),) - # we have a reference file, compare that, too +# we have a reference file, compare that, too - # remove first line which contains a version number +# remove first line which contains a version number tail -n +2 $$(@:.bin=.lst.orig) > $$(@:.bin=.lst) $(ISEQUAL) $1.list-ref $$(@:.bin=.lst) endif From 67594cca70e21cf29caf16b1cda065d2b5858814 Mon Sep 17 00:00:00 2001 From: acqn <acqn163@outlook.com> Date: Thu, 3 Mar 2022 16:14:26 +0800 Subject: [PATCH 029/101] Testcases for long bit-fields. --- test/val/{enum-bitfield.c => bitfield-enum.c} | 162 ++++++++- test/val/bitfield-packing-char.c | 278 ++++++++++++++++ test/val/bitfield-packing-long.c | 315 ++++++++++++++++++ test/val/{bitfield.c => bitfield-packing.c} | 18 +- test/val/bitfield-plain.c | 180 ++++++++++ test/val/bitfield-signed.c | 180 ++++++++++ test/val/plain-int-bitfield.c | 63 ---- 7 files changed, 1123 insertions(+), 73 deletions(-) rename test/val/{enum-bitfield.c => bitfield-enum.c} (61%) create mode 100644 test/val/bitfield-packing-char.c create mode 100644 test/val/bitfield-packing-long.c rename test/val/{bitfield.c => bitfield-packing.c} (93%) create mode 100644 test/val/bitfield-plain.c create mode 100644 test/val/bitfield-signed.c delete mode 100644 test/val/plain-int-bitfield.c diff --git a/test/val/enum-bitfield.c b/test/val/bitfield-enum.c similarity index 61% rename from test/val/enum-bitfield.c rename to test/val/bitfield-enum.c index 5669978c9..ce74b062e 100644 --- a/test/val/enum-bitfield.c +++ b/test/val/bitfield-enum.c @@ -1,5 +1,5 @@ /* - Copyright 2020 The cc65 Authors + Copyright 2020-2022 The cc65 Authors This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -247,7 +247,7 @@ static void test_enum_bitfield_char(void) failures++; } if (e8scbf.y != 5) { - printf ("Got e8scbf.y = %d, expected 10.\n", e8scbf.y); + printf ("Got e8scbf.y = %d, expected 5.\n", e8scbf.y); failures++; } if (e8scbf.z != 100) { @@ -273,12 +273,170 @@ static void test_enum_bitfield_char(void) } } +/* Enum with underlying type unsigned long. */ +enum e20ul { + E20UL_10 = 10, + E20UL_1000 = 1000, + E20UL_1000000000 = 1000000000L, +}; + +static struct enum_bitfield_ulong { + enum e20ul x : 4; + enum e20ul y : 16; + enum e20ul z : CHAR_BIT * sizeof (enum e20ul); +} e20ulbf = {E20UL_10, E20UL_1000, E20UL_1000000000}; + +static void test_enum_bitfield_ulong(void) +{ + if (sizeof (struct enum_bitfield_ulong) != 7) { + printf ("Got sizeof(struct enum_bitfield_ulong) = %zu, expected 7.\n", + sizeof(struct enum_bitfield_ulong)); + failures++; + } + + if (e20ulbf.x != 10) { + printf ("Got e20ulbf.x = %u, expected 10.\n", e20ulbf.x); + failures++; + } + if (e20ulbf.y != 1000) { + printf ("Got e20ulbf.y = %u, expected 1000.\n", e20ulbf.y); + failures++; + } + if (e20ulbf.z != 1000000000L) { + printf ("Got e20ulbf.z = %ul, expected 1000000000.\n", e20ulbf.z); + failures++; + } + + e20ulbf.x = 8; + e20ulbf.y = -1; /* Will store 65535. */ + e20ulbf.z = 1048575L; + + if (e20ulbf.x != 8) { + printf ("Got e20ulbf.x = %ld, expected 8.\n", (long)e20ulbf.x); + failures++; + } + + /* Check signedness, should be signed. */ + { + if (e20ulbf.x - 9 >= 0) { + printf ("Got non-negative e20ulbf.x - 9 = %lu, expected negative.\n", (unsigned long)(e20ulbf.x - 9)); + failures++; + } + } + + if (e20ulbf.y != 65535L) { + printf ("Got e20ulbf.y = %ld, expected 65535.\n", (long)e20ulbf.y); + failures++; + } + + /* Check signedness, should be signed. */ + { + if (e20ulbf.y - 65536L >= 0) { + printf ("Got non-negative e20ulbf.y - 65536L = %lu, expected negative.\n", (unsigned long)(e20ulbf.y - 65536L)); + failures++; + } + } + + if (e20ulbf.z != 1048575L) { + printf ("Got e20ulbf.z = %lu, expected 1048575.\n", (unsigned long)e20ulbf.z); + failures++; + } + + /* Check signedness, should be unsigned. */ + { + if (e20ulbf.z - 1048576L < 0) { + printf ("Got negative e20ulbf.z - 1048576 = %ld, expected positive.\n", (long)(e20ulbf.z - 1048576L)); + failures++; + } + } +} + +/* Enum with underlying type signed long. */ +enum e20sl { + E20SL_M1 = -1, + E20SL_1000 = 1000, + E20SL_1000000000 = 1000000000L, +}; + +static struct enum_bitfield_long { + enum e20sl x : 2; + enum e20sl y : 16; + enum e20sl z : CHAR_BIT * sizeof (enum e20sl); +} e20slbf = {E20SL_M1, E20SL_1000, E20SL_1000000000}; + +static void test_enum_bitfield_long(void) +{ + if (sizeof (struct enum_bitfield_long) != 7) { + printf ("Got sizeof(struct enum_bitfield_long) = %zu, expected 8.\n", + sizeof(struct enum_bitfield_long)); + failures++; + } + + if (e20slbf.x != -1) { + printf ("Got e20slbf.x = %ld, expected -1.\n", (long)e20slbf.x); + failures++; + } + if (e20slbf.y != 1000) { + printf ("Got e20slbf.y = %ld, expected 1000.\n", (long)e20slbf.y); + failures++; + } + if (e20slbf.z != 1000000000L) { + printf ("Got e20slbf.z = %ld, expected 1000000000.\n", (long)e20slbf.z); + failures++; + } + + e20slbf.x = 1; + e20slbf.y = 257; + e20slbf.z = 1048575L; + + if (e20slbf.x != 1) { + printf ("Got e20slbf.x = %d, expected 1.\n", e20slbf.x); + failures++; + } + + /* Check signedness, should be signed. */ + { + if (e20slbf.x - 2 >= 0) { + printf ("Got non-negative e20slbf.x - 2 = %lu, expected negative.\n", (unsigned long)(e20slbf.x - 2)); + failures++; + } + } + + if (e20slbf.y != 257) { + printf ("Got e20slbf.y = %ld, expected 257.\n", (long)e20slbf.y); + failures++; + } + + /* Check signedness, should be signed. */ + { + if (e20slbf.y - 258 >= 0) { + printf ("Got non-negative e20slbf.y - 258 = %lu, expected negative.\n", (unsigned long)(e20slbf.y - 258)); + failures++; + } + } + + if (e20slbf.z != 1048575L) { + printf ("Got e20slbf.z = %ld, expected 1048575.\n", (long)e20slbf.z); + failures++; + } + + /* Check signedness, should be signed. */ + { + if (e20slbf.z - 1048576L >= 0) { + printf ("Got non-negative e20slbf.z - 1048576L = %ld, expected negative.\n", (long)(e20slbf.z - 1048576L)); + failures++; + } + } +} + int main(void) { test_enum_bitfield_uint(); test_enum_bitfield_int(); test_enum_bitfield_uchar(); test_enum_bitfield_char(); + test_enum_bitfield_ulong(); + test_enum_bitfield_long(); printf("failures: %u\n", failures); return failures; } diff --git a/test/val/bitfield-packing-char.c b/test/val/bitfield-packing-char.c new file mode 100644 index 000000000..18621e0eb --- /dev/null +++ b/test/val/bitfield-packing-char.c @@ -0,0 +1,278 @@ +/* + Copyright 2020-2022 The cc65 Authors + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +/* + Tests of char bit-field packing and typedef works with them; see issues below + - packing issue: https://github.com/cc65/cc65/issues/1054 + - typedef issue: https://github.com/cc65/cc65/pull/1662 + - char bit-field support: https://github.com/cc65/cc65/issues/1047 +*/ + +#include <stdio.h> + +static unsigned char failures = 0; + +typedef unsigned char field_type; + +static struct four_bits { + field_type x : 4; +} fb = {1}; + +static void test_four_bits(void) +{ + if (sizeof(struct four_bits) != 1) { + printf("Got sizeof(struct four_bits) = %zu, expected 1.\n", + sizeof(struct four_bits)); + failures++; + } + + if (fb.x != 1) { + printf("Got fb.x = %u, expected 1.\n", fb.x); + failures++; + } + + fb.x = 3; + + if (fb.x != 3) { + printf("Got fb.x = %u, expected 3.\n", fb.x); + failures++; + } +} + +/* + Logic is somewhat diferent for bit-fields that end a struct vs + having additional fields. +*/ + +static struct four_bits_with_char { + field_type x : 4; + field_type y; +} fbi = {1, 2}; + +static void test_four_bits_with_char(void) +{ + /* The first 4-bit bit-field just takes one byte, so the size is 2. */ + if (sizeof(struct four_bits_with_char) != 2) { + printf("Got sizeof(struct four_bits_with_char) = %zu, expected 2.\n", + sizeof(struct four_bits_with_char)); + failures++; + } + + if (fbi.x != 1) { + printf("Got fbi.x = %u, expected 1.\n", fbi.x); + failures++; + } + + if (fbi.y != 2) { + printf("Got fbi.y = %u, expected 2.\n", fbi.y); + failures++; + } + + fbi.x = 3; + fbi.y = 17; + + if (fbi.x != 3) { + printf("Got fbi.x = %u, expected 3.\n", fbi.x); + failures++; + } + + if (fbi.y != 17) { + printf("Got fbi.y = %u, expected 17.\n", fbi.y); + failures++; + } +} + +static struct overlap { + field_type x : 6; + field_type y : 6; +} o = {11, 22}; + +/* Tests that bit-fields can share allocation units. */ +static void test_overlap(void) +{ + if (sizeof(struct overlap) != 2) { + printf("Got sizeof(struct overlap) = %zu, expected 2.\n", + sizeof(struct overlap)); + failures++; + } + + if (o.x != 11) { + printf("Got o.x = %u, expected 11.\n", o.x); + failures++; + } + + if (o.y != 22) { + printf("Got o.y = %u, expected 22.\n", o.y); + failures++; + } + + o.x = 33; + o.y = 44; + + if (o.x != 33) { + printf("Got o.x = %u, expected 33.\n", o.x); + failures++; + } + + if (o.y != 44) { + printf("Got o.y = %u, expected 44.\n", o.y); + failures++; + } +} + +static struct overlap_with_char { + field_type x : 6; + field_type y : 6; + field_type z; +} oi = {11, 22, 33}; + +static void test_overlap_with_char(void) +{ + /* First two fields in 2 bytes, then another 1 byte. */ + if (sizeof(struct overlap_with_char) != 3) { + printf("Got sizeof(struct overlap_with_char) = %zu, expected 3.\n", + sizeof(struct overlap_with_char)); + failures++; + } + + if (oi.x != 11) { + printf("Got oi.x = %u, expected 11.\n", oi.x); + failures++; + } + + if (oi.y != 22) { + printf("Got oi.y = %u, expected 22.\n", oi.y); + failures++; + } + + if (oi.z != 33) { + printf("Got oi.z = %u, expected 33.\n", oi.z); + failures++; + } + + oi.x = 44; + oi.y = 55; + oi.z = 66; + + if (oi.x != 44) { + printf("Got oi.x = %u, expected 44.\n", oi.x); + failures++; + } + + if (oi.y != 55) { + printf("Got oi.y = %u, expected 55.\n", oi.y); + failures++; + } + + if (oi.z != 66) { + printf("Got oi.z = %u, expected 66.\n", oi.z); + failures++; + } +} + +static struct full_width { + field_type x : 8; + field_type y : 8; +} fw = {255, 17}; + +static void test_full_width(void) +{ + if (sizeof(struct full_width) != 2) { + printf("Got sizeof(struct full_width) = %zu, expected 2.\n", + sizeof(struct full_width)); + failures++; + } + + if (fw.x != 255) { + printf("Got fw.x = %u, expected 255.\n", fw.x); + failures++; + } + + if (fw.y != 17) { + printf("Got fw.y = %u, expected 17.\n", fw.y); + failures++; + } + + fw.x = 42; + fw.y = 255; + + if (fw.x != 42) { + printf("Got fw.x = %u, expected 42.\n", fw.x); + failures++; + } + + if (fw.y != 255) { + printf("Got fw.y = %u, expected 255.\n", fw.y); + failures++; + } +} + +static struct aligned_end { + field_type : 2; + field_type x : 6; + /* y crosses a byte boundary, but fits in a byte when shifted. */ + field_type : 6; + field_type y : 7; +} ae = {63, 17}; + +static void test_aligned_end(void) +{ + if (sizeof(struct aligned_end) != 3) { + printf("Got sizeof(struct aligned_end) = %zu, expected 3.\n", + sizeof(struct aligned_end)); + failures++; + } + + if (ae.x != 63) { + printf("Got ae.x = %u, expected 63.\n", ae.x); + failures++; + } + + if (ae.y != 17) { + printf("Got ae.y = %u, expected 17.\n", ae.y); + failures++; + } + + ae.x = 42; + ae.y = 127; + + if (ae.x != 42) { + printf("Got ae.x = %u, expected 42.\n", ae.x); + failures++; + } + + if (ae.y != 127) { + printf("Got ae.y = %u, expected 127.\n", ae.y); + failures++; + } + +} + +int main(void) +{ + test_four_bits(); + test_four_bits_with_char(); + test_overlap(); + test_overlap_with_char(); + test_full_width(); + test_aligned_end(); + printf("failures: %u\n", failures); + return failures; +} diff --git a/test/val/bitfield-packing-long.c b/test/val/bitfield-packing-long.c new file mode 100644 index 000000000..fcc8eb7fe --- /dev/null +++ b/test/val/bitfield-packing-long.c @@ -0,0 +1,315 @@ +/* + Copyright 2020-2022 The cc65 Authors + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +/* + Tests of long bit-field packing and typedef works with them; see issues below + - packing: https://github.com/cc65/cc65/issues/1054 + - typedef: https://github.com/cc65/cc65/pull/1662 + - long bit-field support: https://github.com/cc65/cc65/issues/1131 +*/ + +#include <stdio.h> + +static unsigned char failures = 0; + +typedef unsigned long field_type; + +static struct four_bits { + field_type x : 4; +} fb = {1}; + +static void test_four_bits(void) +{ + if (sizeof(struct four_bits) != 1) { + printf("Got sizeof(struct four_bits) = %zu, expected 1.\n", + sizeof(struct four_bits)); + failures++; + } + + if (fb.x != 1) { + printf("Got fb.x = %u, expected 1.\n", fb.x); + failures++; + } + + fb.x = 3; + + if (fb.x != 3) { + printf("Got fb.x = %u, expected 3.\n", fb.x); + failures++; + } +} + +/* + Logic is somewhat diferent for bit-fields that end a struct vs + having additional fields. +*/ + +static struct four_bits_with_long { + field_type x : 4; + field_type y; +} fbi = {1, 2}; + +static void test_four_bits_with_long(void) +{ + /* The first 4-bit bit-field just takes one byte, so the size is 5. */ + if (sizeof(struct four_bits_with_long) != 5) { + printf("Got sizeof(struct four_bits_with_long) = %zu, expected 5.\n", + sizeof(struct four_bits_with_long)); + failures++; + } + + if (fbi.x != 1) { + printf("Got fbi.x = %u, expected 1.\n", fbi.x); + failures++; + } + + if (fbi.y != 2) { + printf("Got fbi.y = %lu, expected 2.\n", fbi.y); + failures++; + } + + fbi.x = 3; + fbi.y = 65537; + + if (fbi.x != 3) { + printf("Got fbi.x = %u, expected 3.\n", fbi.x); + failures++; + } + + if (fbi.y != 65537) { + printf("Got fbi.y = %lu, expected 65537.\n", fbi.y); + failures++; + } +} + +static struct overlap { + field_type x : 10; + field_type y : 10; +} o = {11, 22}; + +/* Tests that bit-fields can share allocation units. */ +static void test_overlap(void) +{ + if (sizeof(struct overlap) != 3) { + printf("Got sizeof(struct overlap) = %zu, expected 3.\n", + sizeof(struct overlap)); + failures++; + } + + if (o.x != 11) { + printf("Got o.x = %u, expected 11.\n", o.x); + failures++; + } + + if (o.y != 22) { + printf("Got o.y = %u, expected 22.\n", o.y); + failures++; + } + + o.x = 33; + o.y = 44; + + if (o.x != 33) { + printf("Got o.x = %u, expected 33.\n", o.x); + failures++; + } + + if (o.y != 44) { + printf("Got o.y = %u, expected 44.\n", o.y); + failures++; + } +} + +static struct overlap_with_long { + field_type x : 10; + field_type y : 10; + field_type z; +} oi = {111, 222, 333}; + +static void test_overlap_with_long(void) +{ + /* First two fields in 3 bytes, then another 4 bytes. */ + if (sizeof(struct overlap_with_long) != 7) { + printf("Got sizeof(struct overlap_with_long) = %zu, expected 7.\n", + sizeof(struct overlap_with_long)); + failures++; + } + + if (oi.x != 111) { + printf("Got oi.x = %u, expected 111.\n", oi.x); + failures++; + } + + if (oi.y != 222) { + printf("Got oi.y = %u, expected 222.\n", oi.y); + failures++; + } + + if (oi.z != 333) { + printf("Got oi.z = %u, expected 333.\n", oi.z); + failures++; + } + + oi.x = 444; + oi.y = 555; + oi.z = 4294967295; + + if (oi.x != 444) { + printf("Got oi.x = %u, expected 444.\n", oi.x); + failures++; + } + + if (oi.y != 555) { + printf("Got oi.y = %u, expected 555.\n", oi.y); + failures++; + } + + if (oi.z != 4294967295) { + printf("Got oi.z = %lu, expected 4294967295.\n", oi.z); + failures++; + } +} + +static struct full_width { + field_type x : 8; + field_type y : 16; + field_type z : 32; +} fw = {255, 17, 1}; + +static void test_full_width(void) +{ + if (sizeof(struct full_width) != 7) { + printf("Got sizeof(struct full_width) = %zu, expected 7.\n", + sizeof(struct full_width)); + failures++; + } + + if (fw.x != 255) { + printf("Got fw.x = %u, expected 255.\n", fw.x); + failures++; + } + + if (fw.y != 17) { + printf("Got fw.y = %u, expected 17.\n", fw.y); + failures++; + } + + if (fw.z != 1) { + printf("Got fw.z = %lu, expected 1.\n", fw.z); + failures++; + } + + fw.x = 42; + fw.y = 1023; + fw.z = 65537; + + if (fw.x != 42) { + printf("Got fw.x = %u, expected 42.\n", fw.x); + failures++; + } + + if (fw.y != 1023) { + printf("Got fw.y = %u, expected 1023.\n", fw.y); + failures++; + } + + if (fw.z != 65537) { + printf("Got fw.z = %lu, expected 65537.\n", fw.z); + failures++; + } +} + +static struct aligned_end { + field_type : 2; + field_type x : 6; + field_type : 3; + field_type y : 13; + field_type : 14; + field_type z : 18; + /* w crosses a byte boundary, but fits in a byte when shifted. */ + field_type : 6; + field_type w : 7; +} ae = {63, 17, 1, 100}; + +static void test_aligned_end(void) +{ + if (sizeof(struct aligned_end) != 9) { + printf("Got sizeof(struct aligned_end) = %zu, expected 9.\n", + sizeof(struct aligned_end)); + failures++; + } + + if (ae.x != 63) { + printf("Got ae.x = %u, expected 63.\n", ae.x); + failures++; + } + + if (ae.y != 17) { + printf("Got ae.y = %u, expected 17.\n", ae.y); + failures++; + } + + if (ae.z != 1) { + printf("Got ae.z = %lu, expected 1.\n", ae.z); + failures++; + } + + if (ae.w != 100) { + printf("Got ae.w = %u, expected 100.\n", ae.w); + failures++; + } + + ae.x = 42; + ae.y = 1023; + ae.z = 262143; + ae.w = 66; + + if (ae.x != 42) { + printf("Got ae.x = %u, expected 42.\n", ae.x); + failures++; + } + + if (ae.y != 1023) { + printf("Got ae.y = %u, expected 1023.\n", ae.y); + failures++; + } + + if (ae.z != 262143) { + printf("Got ae.z = %lu, expected 262143.\n", ae.z); + failures++; + } + + if (ae.w != 66) { + printf("Got ae.w = %u, expected 66.\n", ae.w); + failures++; + } +} + +int main(void) +{ + test_four_bits(); + test_four_bits_with_long(); + test_overlap(); + test_overlap_with_long(); + test_full_width(); + test_aligned_end(); + printf("failures: %u\n", failures); + return failures; +} diff --git a/test/val/bitfield.c b/test/val/bitfield-packing.c similarity index 93% rename from test/val/bitfield.c rename to test/val/bitfield-packing.c index 1de19777a..5786d6906 100644 --- a/test/val/bitfield.c +++ b/test/val/bitfield-packing.c @@ -1,5 +1,5 @@ /* - Copyright 2020 The cc65 Authors + Copyright 2020-2022 The cc65 Authors This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -19,7 +19,9 @@ */ /* - Tests of bit-field packing; see https://github.com/cc65/cc65/issues/1054 + Tests of int bit-field packing and typedef works with them; see issues below + - packing issue: https://github.com/cc65/cc65/issues/1054 + - typedef issue: https://github.com/cc65/cc65/pull/1662 */ #include <stdio.h> @@ -83,15 +85,15 @@ static void test_four_bits_with_int(void) } fbi.x = 3; - fbi.y = 17; + fbi.y = 257; if (fbi.x != 3) { printf("Got fbi.x = %u, expected 3.\n", fbi.x); failures++; } - if (fbi.y != 17) { - printf("Got fbi.y = %u, expected 17.\n", fbi.y); + if (fbi.y != 257) { + printf("Got fbi.y = %u, expected 257.\n", fbi.y); failures++; } } @@ -166,7 +168,7 @@ static void test_overlap_with_int(void) oi.x = 444; oi.y = 555; - oi.z = 666; + oi.z = 65535; if (oi.x != 444) { printf("Got oi.x = %u, expected 444.\n", oi.x); @@ -178,8 +180,8 @@ static void test_overlap_with_int(void) failures++; } - if (oi.z != 666) { - printf("Got oi.z = %u, expected 666.\n", oi.z); + if (oi.z != 65535) { + printf("Got oi.z = %u, expected 65535.\n", oi.z); failures++; } } diff --git a/test/val/bitfield-plain.c b/test/val/bitfield-plain.c new file mode 100644 index 000000000..735f3dc87 --- /dev/null +++ b/test/val/bitfield-plain.c @@ -0,0 +1,180 @@ +/* + Copyright 2020-2022 The cc65 Authors + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +/* + Tests that plain bit-fields are unsigned; see issues below + - unsigned integer types by default: https://github.com/cc65/cc65/issues/1095 + - char bit-field support: https://github.com/cc65/cc65/issues/1047 + - long bit-field support: https://github.com/cc65/cc65/issues/1131 +*/ + +#include <stdio.h> + +static unsigned char failures = 0; + +static struct plain_ints { + int x : 4; + int y : 10; +} pi = {15, 700}; + +static void test_plain_int_bitfields (void) +{ + if (pi.x != 15) { + printf ("Got pi.x = %ld, expected 15.\n", (long)pi.x); + failures++; + } + if (pi.y != 700) { + printf ("Got pi.y = %ld, expected 700.\n", (long)pi.y); + failures++; + } + + pi.x = 3; + pi.y = 1023; + + if (pi.x != 3) { + printf ("Got pi.x = %ld, expected 3.\n", (long)pi.x); + failures++; + } + if (pi.y != 1023) { + printf ("Got pi.y = %ld, expected 1023.\n", (long)pi.y); + failures++; + } +} + +static struct plain_shorts { + short x : 4; + short y : 10; +} ps = {15, 700}; + +static void test_plain_short_bitfields (void) +{ + if (ps.x != 15) { + printf ("Got ps.x = %ld, expected 15.\n", (long)ps.x); + failures++; + } + if (ps.y != 700) { + printf ("Got ps.y = %ld, expected 700.\n", (long)ps.y); + failures++; + } + + ps.x = 3; + ps.y = 1023; + + if (ps.x != 3) { + printf ("Got ps.x = %ld, expected 3.\n", (long)ps.x); + failures++; + } + if (ps.y != 1023) { + printf ("Got ps.y = %ld, expected 1023.\n", (long)ps.y); + failures++; + } +} + +static struct plain_chars { + char x : 4; +} pc = {15}; + +static void test_plain_char_bitfields (void) +{ + if (pc.x != 15) { + printf ("Got pc.x = %ld, expected 15.\n", (long)pc.x); + failures++; + } + + pc.x = 3; + + if (pc.x != 3) { + printf ("Got pc.x = %ld, expected 3.\n", (long)pc.x); + failures++; + } +} + +static struct plain_longs { + long x : 4; + long y : 10; + long z : 18; +} pl = {15, 700, 200000}; + +static void test_plain_long_bitfields (void) +{ + if (pl.x != 15) { + if (pl.x < 0) { + printf ("Got pl.x = %ld, expected 15.\n", (long)pl.x); + } else { + printf ("Got pl.x = %lu, expected 15.\n", (unsigned long)pl.x); + } + failures++; + } + if (pl.y != 700) { + if (pl.y < 0) { + printf ("Got pl.y = %ld, expected 700.\n", (long)pl.y); + } else { + printf ("Got pl.y = %lu, expected 700.\n", (unsigned long)pl.y); + } + failures++; + } + if (pl.z != 200000) { + if (pl.z < 0) { + printf ("Got pl.z = %ld, expected 200000.\n", (long)pl.z); + } else { + printf ("Got pl.z = %lu, expected 200000.\n", (unsigned long)pl.z); + } + failures++; + } + + pl.x = 3; + pl.y = 1023; + pl.z = 262143; + + if (pl.x != 3) { + if (pl.x < 0) { + printf ("Got pl.x = %ld, expected 3.\n", (long)pl.x); + } else { + printf ("Got pl.x = %lu, expected 3.\n", (unsigned long)pl.x); + } + failures++; + } + if (pl.y != 1023) { + if (pl.y < 0) { + printf ("Got pl.y = %ld, expected 1023.\n", (long)pl.y); + } else { + printf ("Got pl.y = %lu, expected 1023.\n", (unsigned long)pl.y); + } + failures++; + } + if (pl.z != 262143) { + if (pl.z < 0) { + printf ("Got pl.z = %ld, expected 262143.\n", (long)pl.z); + } else { + printf ("Got pl.z = %lu, expected 262143.\n", (unsigned long)pl.z); + } + failures++; + } +} + +int main (void) +{ + test_plain_int_bitfields (); + test_plain_short_bitfields (); + test_plain_char_bitfields (); + test_plain_long_bitfields (); + printf ("failures: %u\n", failures); + return failures; +} diff --git a/test/val/bitfield-signed.c b/test/val/bitfield-signed.c new file mode 100644 index 000000000..68f36f92a --- /dev/null +++ b/test/val/bitfield-signed.c @@ -0,0 +1,180 @@ +/* + Copyright 2020-2022 The cc65 Authors + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be signedly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +/* + Tests that signed bit-fields are indeed signed; see issues below + - unsigned integer types by default: https://github.com/cc65/cc65/issues/1095 + - char bit-field support: https://github.com/cc65/cc65/issues/1047 + - long bit-field support: https://github.com/cc65/cc65/issues/1131 +*/ + +#include <stdio.h> + +static unsigned char failures = 0; + +static struct signed_ints { + signed int x : 4; + signed int y : 10; +} pi = {-8, -500}; + +static void test_signed_int_bitfields (void) +{ + if (pi.x != -8) { + printf ("Got pi.x = %ld, expected -8.\n", (long)pi.x); + failures++; + } + if (pi.y != -500) { + printf ("Got pi.y = %ld, expected -500.\n", (long)pi.y); + failures++; + } + + pi.x = -3; + pi.y = -512; + + if (pi.x != -3) { + printf ("Got pi.x = %ld, expected -3.\n", (long)pi.x); + failures++; + } + if (pi.y != -512) { + printf ("Got pi.y = %ld, expected -512.\n", (long)pi.y); + failures++; + } +} + +static struct signed_shorts { + signed short x : 4; + signed short y : 10; +} ps = {-8, -500}; + +static void test_signed_short_bitfields (void) +{ + if (ps.x != -8) { + printf ("Got ps.x = %ld, expected -8.\n", (long)ps.x); + failures++; + } + if (ps.y != -500) { + printf ("Got ps.y = %ld, expected -500.\n", (long)ps.y); + failures++; + } + + ps.x = -3; + ps.y = -512; + + if (ps.x != -3) { + printf ("Got ps.x = %ld, expected -3.\n", (long)ps.x); + failures++; + } + if (ps.y != -512) { + printf ("Got ps.y = %ld, expected -512.\n", (long)ps.y); + failures++; + } +} + +static struct signed_chars { + signed char x : 4; +} pc = {-8}; + +static void test_signed_char_bitfields (void) +{ + if (pc.x != -8) { + printf ("Got pc.x = %ld, expected -8.\n", (long)pc.x); + failures++; + } + + pc.x = -3; + + if (pc.x != -3) { + printf ("Got pc.x = %ld, expected -3.\n", (long)pc.x); + failures++; + } +} + +static struct signed_longs { + signed long x : 4; + signed long y : 10; + signed long z : 18; +} pl = {-8, -500, -70000}; + +static void test_signed_long_bitfields (void) +{ + if (pl.x != -8) { + if (pl.x < 0) { + printf ("Got pl.x = %ld, expected -8.\n", (long)pl.x); + } else { + printf ("Got pl.x = %lu, expected -8.\n", (unsigned long)pl.x); + } + failures++; + } + if (pl.y != -500) { + if (pl.y < 0) { + printf ("Got pl.y = %ld, expected -500.\n", (long)pl.y); + } else { + printf ("Got pl.y = %lu, expected -500.\n", (unsigned long)pl.y); + } + failures++; + } + if (pl.z != -70000) { + if (pl.z < 0) { + printf ("Got pl.z = %ld, expected -70000.\n", (long)pl.z); + } else { + printf ("Got pl.z = %lu, expected -70000.\n", (unsigned long)pl.z); + } + failures++; + } + + pl.x = -3; + pl.y = -512; + pl.z = -131072; + + if (pl.x != -3) { + if (pl.x < 0) { + printf ("Got pl.x = %ld, expected -3.\n", (long)pl.x); + } else { + printf ("Got pl.x = %lu, expected -3.\n", (unsigned long)pl.x); + } + failures++; + } + if (pl.y != -512) { + if (pl.y < 0) { + printf ("Got pl.y = %ld, expected -512.\n", (long)pl.y); + } else { + printf ("Got pl.y = %lu, expected -512.\n", (unsigned long)pl.y); + } + failures++; + } + if (pl.z != -131072) { + if (pl.z < 0) { + printf ("Got pl.z = %ld, expected -131072.\n", (long)pl.z); + } else { + printf ("Got pl.z = %lu, expected -131072.\n", (unsigned long)pl.z); + } + failures++; + } +} + +int main (void) +{ + test_signed_int_bitfields (); + test_signed_short_bitfields (); + test_signed_char_bitfields (); + test_signed_long_bitfields (); + printf ("failures: %u\n", failures); + return failures; +} diff --git a/test/val/plain-int-bitfield.c b/test/val/plain-int-bitfield.c deleted file mode 100644 index 4d158eca9..000000000 --- a/test/val/plain-int-bitfield.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - Copyright 2020 The cc65 Authors - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -/* - Tests that plain int bit-fields are unsigned. -*/ - -#include <stdio.h> - -static unsigned char failures = 0; - -static struct plain_ints { - int x : 4; - int y : 10; -} pi = {15, 700}; - -static void test_plain_int_bitfields (void) -{ - if (pi.x != 15) { - printf ("Got pi.x = %u, expected 15.\n", pi.x); - failures++; - } - if (pi.y != 700) { - printf ("Got pi.y = %u, expected 700.\n", pi.y); - failures++; - } - - pi.x = 3; - pi.y = 1023; - - if (pi.x != 3) { - printf ("Got pi.x = %u, expected 3.\n", pi.x); - failures++; - } - if (pi.y != 1023) { - printf ("Got pi.y = %u, expected 1023.\n", pi.y); - failures++; - } -} - -int main (void) -{ - test_plain_int_bitfields (); - printf ("failures: %u\n", failures); - return failures; -} From c8956ce19b4581c00ac0914db12e36f2ba9b3190 Mon Sep 17 00:00:00 2001 From: acqn <acqn163@outlook.com> Date: Thu, 3 Mar 2022 20:24:14 +0800 Subject: [PATCH 030/101] Fixed signed long comparisons with smaller unsigned types. --- src/cc65/expr.c | 5 +---- test/val/bug1696.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 test/val/bug1696.c diff --git a/src/cc65/expr.c b/src/cc65/expr.c index b3e97ef99..ab48a4554 100644 --- a/src/cc65/expr.c +++ b/src/cc65/expr.c @@ -2587,12 +2587,9 @@ static void hie_compare (const GenDesc* Ops, /* List of generators */ CmpSigned = 0; flags |= CF_UNSIGNED; } + } else { unsigned rtype = TypeOf (Expr2.Type) | (flags & CF_CONST); - if (CmpSigned) { - ltype &= ~CF_UNSIGNED; - rtype &= ~CF_UNSIGNED; - } flags |= g_typeadjust (ltype, rtype); } diff --git a/test/val/bug1696.c b/test/val/bug1696.c new file mode 100644 index 000000000..c31dc257b --- /dev/null +++ b/test/val/bug1696.c @@ -0,0 +1,44 @@ +/* + Copyright 2022 The cc65 Authors + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +/* + Tests of unsigned short/unsigned int vs signed long comparisons; + see https://github.com/cc65/cc65/issues/1696 +*/ + +#include <stdio.h> + +static unsigned char failures = 0; + +int main(void) +{ + unsigned int x = 65535; + unsigned short y = 65535; + if (!(x > 1L)) { + printf("x = %ld but x > 1L failed\n", (long)x); + ++failures; + } + if (!(y == 65535L)) { + printf("y = %ld but y == 65535L failed\n", (long)y); + ++failures; + } + printf("failures: %u\n", failures); + return failures; +} From 1cb18182edc74f099ab359bb05f5a95ebff8e186 Mon Sep 17 00:00:00 2001 From: Wayne Parham <wayne@parhamdata.com> Date: Thu, 3 Mar 2022 12:06:15 -0600 Subject: [PATCH 031/101] Corrected size of BASROM definition --- cfg/sym1-32k.cfg | 2 +- cfg/sym1-4k.cfg | 2 +- cfg/sym1.cfg | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cfg/sym1-32k.cfg b/cfg/sym1-32k.cfg index ad0d760f3..7949375d3 100644 --- a/cfg/sym1-32k.cfg +++ b/cfg/sym1-32k.cfg @@ -29,7 +29,7 @@ MEMORY { EXT: file = "", define = yes, start = $9000, size = $1000; IO: file = "", define = yes, start = $A000, size = $1000; RAE1: file = "", define = yes, start = $B000, size = $1000; - BASROM: file = "", define = yes, start = $C000, size = $1000; + BASROM: file = "", define = yes, start = $C000, size = $2000; RAE2: file = "", define = yes, start = $E000, size = $1000; TOP: file = "", define = yes, start = $F000, size = $1000; } diff --git a/cfg/sym1-4k.cfg b/cfg/sym1-4k.cfg index 32d3cbb3a..468a76fe0 100644 --- a/cfg/sym1-4k.cfg +++ b/cfg/sym1-4k.cfg @@ -29,7 +29,7 @@ MEMORY { EXT: file = "", define = yes, start = $9000, size = $1000; IO: file = "", define = yes, start = $A000, size = $1000; RAE1: file = "", define = yes, start = $B000, size = $1000; - BASROM: file = "", define = yes, start = $C000, size = $1000; + BASROM: file = "", define = yes, start = $C000, size = $2000; RAE2: file = "", define = yes, start = $E000, size = $1000; TOP: file = "", define = yes, start = $F000, size = $1000; } diff --git a/cfg/sym1.cfg b/cfg/sym1.cfg index 32d3cbb3a..468a76fe0 100644 --- a/cfg/sym1.cfg +++ b/cfg/sym1.cfg @@ -29,7 +29,7 @@ MEMORY { EXT: file = "", define = yes, start = $9000, size = $1000; IO: file = "", define = yes, start = $A000, size = $1000; RAE1: file = "", define = yes, start = $B000, size = $1000; - BASROM: file = "", define = yes, start = $C000, size = $1000; + BASROM: file = "", define = yes, start = $C000, size = $2000; RAE2: file = "", define = yes, start = $E000, size = $1000; TOP: file = "", define = yes, start = $F000, size = $1000; } From 81338a61c3a8576ff29408c3bc372c8f95d33621 Mon Sep 17 00:00:00 2001 From: Wayne Parham <wayne@parhamdata.com> Date: Thu, 3 Mar 2022 17:47:31 -0600 Subject: [PATCH 032/101] Added Sym-1 extended memory sample program and documentation --- doc/sym1.sgml | 9 +-- samples/sym1/Makefile | 7 ++- samples/sym1/symExtendedMemory.c | 95 ++++++++++++++++++++++++++++++++ 3 files changed, 106 insertions(+), 5 deletions(-) create mode 100644 samples/sym1/symExtendedMemory.c diff --git a/doc/sym1.sgml b/doc/sym1.sgml index 5961984bd..c2265ba7b 100644 --- a/doc/sym1.sgml +++ b/doc/sym1.sgml @@ -29,7 +29,7 @@ Included with this distribution is a 4k configuration file and a 32k config file <sect>Memory layout<p> -The ROMs and I/O areas are defined in the configuration files, as are most of the entry points for useful subroutines in the Sym-1 monitor ROM. cc65 generated programs compiled and linked using 4k config run in the memory range of $200 - $0FFF. The 32k config expands this range to $7FFF. The starting memory location and entry point for running the program is $200, so when the program is transferred to the Sym-1, it is executed by typing 'g 200'. The system returns control back to the monitor ROM when the program terminates, providing the '.' prompt. +The ROMs and I/O areas are defined in the configuration files, as are most of the entry points for useful subroutines in the Sym-1 monitor ROM. cc65 generated programs compiled and linked using 4k config run in the memory range of $200 - $0FFF. The 32k config expands this range to $7FFF. Memory above 32K can be used to extend the heap, as described below. The starting memory location and entry point for running the program is $200, so when the program is transferred to the Sym-1, it is executed by typing 'g 200'. The system returns control back to the monitor ROM when the program terminates, providing the '.' prompt. Special locations: @@ -41,7 +41,7 @@ Special locations: The C runtime stack is located at $0FFF on 4KB Syms, or at $7FFF for 32KB systems. The stack always grows downwards. <tag/Heap/ - The C heap is located at the end of the program and grows towards the C runtime stack. + The C heap is located at the end of the program and grows towards the C runtime stack. Extended memory can be added to the heap, as described below. </descrip><p> @@ -61,7 +61,7 @@ No graphics drivers are currently available for the Sym-1. <sect1>Extended memory drivers<p> -No extended memory drivers are currently available for the Sym-1. +See the example program, symExtendedMemory, in the samples directory. <sect1>Joystick drivers<p> @@ -102,7 +102,7 @@ As stated earlier, there are config files for 4KB and 32KB systems. If you have <sect3>Sample programs<p> -All the samples will run on the "stock" 4KB Sym-1, except for symIO and symNotepad, which require 32KB. These sample programs can be found in the samples/sym1 directory: +All the samples will run on the "stock" 4KB Sym-1, except for symIO and symNotepad, which require 32KB. Additionally, symExtendedMemory shows how to access memory above 32KB, so it expects more than 32KB. These sample programs can be found in the samples/sym1 directory: <itemize> <item>symHello prints "Hello World!" and then inputs characters, which are echoed on the screen. It also makes a "beep" sound.</item> @@ -110,6 +110,7 @@ All the samples will run on the "stock" 4KB Sym-1, except for symIO an <item>symDisplay allows entry of a message, which is then displayed by scrolling it across the front panel display.</item> <item>symIO allows access to the Sym-1 digital I/O ports.</item> <item>symNotepad is a simple text entry/retrieval program that uses tape storage.</item> +<item>symExtendedMemory demonstrates how to access upper-memory and add it to the heap.</item> </itemize> <sect>License<p> diff --git a/samples/sym1/Makefile b/samples/sym1/Makefile index 14da90ad3..281b5bcd0 100644 --- a/samples/sym1/Makefile +++ b/samples/sym1/Makefile @@ -32,7 +32,7 @@ else endif EXELIST_sym1 = \ - symHello.bin symTiny.bin symDisplay.bin symIO.bin symNotepad.bin + symHello.bin symTiny.bin symDisplay.bin symIO.bin symNotepad.bin symExtendedMemory.bin ifneq ($(EXELIST_$(SYS)),) samples: $(EXELIST_$(SYS)) @@ -64,9 +64,14 @@ symIO.bin: symIO.c symNotepad.bin: symNotepad.c $(CL) -t sym1 -C sym1-32k.cfg -O -o symNotepad.bin symNotepad.c +symExtendedMemory.bin: symExtendedMemory.c + $(CL) -t sym1 -C sym1-32k.cfg -O -o symExtendedMemory.bin symExtendedMemory.c + + clean: @$(DEL) symHello.bin 2>$(NULLDEV) @$(DEL) symTiny.bin 2>$(NULLDEV) @$(DEL) symDisplay.bin 2>$(NULLDEV) @$(DEL) symIO.bin 2>$(NULLDEV) @$(DEL) symNotepad.bin 2>$(NULLDEV) + @$(DEL) symExtendedMemory.bin 2>$(NULLDEV) diff --git a/samples/sym1/symExtendedMemory.c b/samples/sym1/symExtendedMemory.c new file mode 100644 index 000000000..81902382f --- /dev/null +++ b/samples/sym1/symExtendedMemory.c @@ -0,0 +1,95 @@ +// -------------------------------------------------------------------------- +// Sym-1 Extended Memory +// +// Wayne Parham +// +// wayne@parhamdata.com +// -------------------------------------------------------------------------- +// +// Note: This program examines memory above the monitor ROM (8000-8FFF) to +// Determine what, if any, memory is available. It then adds whatever +// 4K segments it finds to the heap. +// +// Memory Segment Remark +// 0x9000 Usually available +// 0xA000 System I/O, always unavailable +// 0xB000 Used by RAE, but normally available +// 0xC000 Used by BASIC, normally unavailable +// 0xD000 Used by BASIC, normally unavailable +// 0xE000 Used by RAE, but normally available +// 0xF000 Normally available, but only to FF7F +// +// -------------------------------------------------------------------------- + +#include <sym1.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#define SEGMENT 0x9000 // First 4K segment of extended memory +#define SEG_END 0x0FFF // Last location of segment +#define BLOCK_SIZE 0x1000 // Size of segment +#define TOP_END 0x0F7F // Last location of memory +#define TOP_SIZE 0x0F80 // Size of top segment +#define UNAVAILABLE 0xA000 // System I/O area + +int main (void) { + int error = 0; + unsigned heap_size = 0x0000; + char* segment = (char*) SEGMENT; + + printf ( "Analyzing memory.\n\n" ); + + heap_size = _heapmemavail(); + + printf ( "Main memory has %d bytes available.\n", heap_size ); + + while ( (int) segment < 0xEFFF ) { // Iterate through 4K memory blocks + if( (int) segment != UNAVAILABLE ) { + segment[0] = 0x00; // Check beginning of segment + if ( segment[0] != 0x00 ) + error = 1; + segment[0] = 0xFF; + if ( segment[0] != 0xFF ) + error = 1; + segment[SEG_END] = 0x00; // Check end of segment + if ( segment[SEG_END] != 0x00 ) + error = 1; + segment[SEG_END] = 0xFF; + if ( segment[SEG_END] != 0xFF ) + error = 1; + if ( ! error ) { // If memory found, add to the heap + printf ( "Memory found at location %p, ", segment ); + _heapadd ( segment, BLOCK_SIZE ); + heap_size = _heapmemavail(); + printf( "so the system now has %u bytes available.\n", heap_size ); + } else { + error = 0; + } + } + segment += 0x1000; // Increment to next segment + } + + segment[0] = 0x00; // Check beginning of top memory segment + if ( segment[0] != 0x00 ) + error = 1; + segment[0] = 0xFF; + if ( segment[0] != 0xFF ) + error = 1; + segment[TOP_END] = 0x00; // Check end of usable memory + if ( segment[TOP_END] != 0x00 ) + error = 1; + segment[TOP_END] = 0xFF; + if ( segment[TOP_END] != 0xFF ) + error = 1; + if ( ! error ) { // If memory found, add to the heap + printf ( "Memory found at location %p, ", segment ); + _heapadd ( segment, TOP_SIZE ); + heap_size = _heapmemavail(); + printf( "so the system now has %u bytes available.\n", heap_size ); + } + + puts ("\nEnjoy your day!\n"); + + return 0; +} From dc9c0fe90ba3aead76838dbf39041fff91e819a3 Mon Sep 17 00:00:00 2001 From: Wayne Parham <wayne@parhamdata.com> Date: Thu, 3 Mar 2022 19:57:43 -0600 Subject: [PATCH 033/101] unsigned int format specifier --- samples/sym1/symExtendedMemory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/sym1/symExtendedMemory.c b/samples/sym1/symExtendedMemory.c index 81902382f..db0231236 100644 --- a/samples/sym1/symExtendedMemory.c +++ b/samples/sym1/symExtendedMemory.c @@ -42,7 +42,7 @@ int main (void) { heap_size = _heapmemavail(); - printf ( "Main memory has %d bytes available.\n", heap_size ); + printf ( "Main memory has %u bytes available.\n", heap_size ); while ( (int) segment < 0xEFFF ) { // Iterate through 4K memory blocks if( (int) segment != UNAVAILABLE ) { From 7664a2f61e5d30716bafbeafb4d2abda0b8bd398 Mon Sep 17 00:00:00 2001 From: Wayne Parham <wayne@parhamdata.com> Date: Thu, 3 Mar 2022 20:51:16 -0600 Subject: [PATCH 034/101] Documentation clarifications --- doc/sym1.sgml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/sym1.sgml b/doc/sym1.sgml index c2265ba7b..565f11e43 100644 --- a/doc/sym1.sgml +++ b/doc/sym1.sgml @@ -61,7 +61,7 @@ No graphics drivers are currently available for the Sym-1. <sect1>Extended memory drivers<p> -See the example program, symExtendedMemory, in the samples directory. +There are no extended memory drivers for the Sym-1. However, there is a way to access memory beyond the 32k boundary, if memory is physically present in the system. See the example program, symExtendedMemory, in the samples directory. <sect1>Joystick drivers<p> @@ -100,7 +100,11 @@ This header exposes Sym-specific I/O functions that are useful for reading and w As stated earlier, there are config files for 4KB and 32KB systems. If you have 32KB RAM, then you will probably want to use the sym1-32k configuration, but if not - if you are using the sym1-4k configuration - then you may want to use functions like getchar, putchar, gets and puts rather than functions like scanf and printf. Printf, for example, requires about 1KB because it needs to know how to process all the format specifiers. -<sect3>Sample programs<p> +<sect3>Using extended memory<p> + +Memory may be physically present that is addressed at locations above the monitor ROM at $8000. This extended memory is accessible by adding to the heap, as described in the symExtendedMemory sample program. + +<sect4>Sample programs<p> All the samples will run on the "stock" 4KB Sym-1, except for symIO and symNotepad, which require 32KB. Additionally, symExtendedMemory shows how to access memory above 32KB, so it expects more than 32KB. These sample programs can be found in the samples/sym1 directory: From 3cb85fd5e8803c27cd50658d2fba381ebdcc969b Mon Sep 17 00:00:00 2001 From: Wayne Parham <wayne@parhamdata.com> Date: Fri, 4 Mar 2022 06:23:06 -0600 Subject: [PATCH 035/101] Minor updates --- doc/sym1.sgml | 72 ++++++++++++++++------ samples/sym1/symExtendedMemory.c | 102 ++++++++++++++++--------------- 2 files changed, 108 insertions(+), 66 deletions(-) diff --git a/doc/sym1.sgml b/doc/sym1.sgml index 565f11e43..b97f94720 100644 --- a/doc/sym1.sgml +++ b/doc/sym1.sgml @@ -15,21 +15,40 @@ An overview over the Sym-1 runtime system as it is implemented for the cc65 C co <sect>Overview<p> -This file contains an overview of the Sym-1 runtime system as it comes with the cc65 C compiler. It describes the memory layout, Sym-1 specific header files, available drivers, and any pitfalls specific to the platform. +This file contains an overview of the Sym-1 runtime system as it comes with the cc65 C compiler. +It describes the memory layout, Sym-1 specific header files, available drivers, and any pitfalls +specific to the platform. -Please note that Sym-1 specific functions are just mentioned here, they are described in detail in the separate <url url="funcref.html" name="function reference">. Even functions marked as "platform dependent" may be available on more than one platform. Please see the function reference for more information. +Please note that Sym-1 specific functions are just mentioned here, they are described in detail +in the separate <url url="funcref.html" name="function reference">. Even functions marked as +"platform dependent" may be available on more than one platform. Please see the +function reference for more information. <sect>Binary format<p> -The output format generated by the linker for the Sym-1 target is a raw binary BIN file, which is essentially a memory image. You can convert this to a HEX file using BIN2HEX, which is a popular open-source conversion utility program. A HEX file has ASCII representations of the hexadecimal byte values of the machine-language program. So the HEX file can be transferred to the Sym-1 using the RS-232 terminal port, just as if the machine-code was entered by hand. Enter 'm 200' in the monitor and start the HEX file transfer. +The output format generated by the linker for the Sym-1 target is a raw binary BIN file, which +is essentially a memory image. You can convert this to a HEX file using BIN2HEX, which is a +popular open-source conversion utility program. A HEX file has ASCII representations of the +hexadecimal byte values of the machine-language program. So the HEX file can be transferred +to the Sym-1 using the RS-232 terminal port, just as if the machine-code was entered by hand. +Enter 'm 200' in the monitor and start the HEX file transfer. <p> -Included with this distribution is a 4k configuration file and a 32k config file. The Sym-1 on-board memory is limited to 4 kbytes but system memory can be increased to 32 kbytes of contiguous RAM with aftermarket add-on boards. So choose the config file that matches your system configuration before compiling and linking user programs. +Included with this distribution is a 4k configuration file and a 32k config file. The Sym-1 +on-board memory is limited to 4 kbytes but system memory can be increased to 32 kbytes of +contiguous RAM with aftermarket add-on boards. So choose the config file that matches your +system configuration before compiling and linking user programs. <sect>Memory layout<p> -The ROMs and I/O areas are defined in the configuration files, as are most of the entry points for useful subroutines in the Sym-1 monitor ROM. cc65 generated programs compiled and linked using 4k config run in the memory range of $200 - $0FFF. The 32k config expands this range to $7FFF. Memory above 32K can be used to extend the heap, as described below. The starting memory location and entry point for running the program is $200, so when the program is transferred to the Sym-1, it is executed by typing 'g 200'. The system returns control back to the monitor ROM when the program terminates, providing the '.' prompt. +The ROMs and I/O areas are defined in the configuration files, as are most of the entry points +for useful subroutines in the Sym-1 monitor ROM. cc65 generated programs compiled and linked +using 4k config run in the memory range of $200 - $0FFF. The 32k config expands +this range to $7FFF. Memory above 32k can be used to extend the heap, as described below. +The starting memory location and entry point for running the program is $200, so when the +program is transferred to the Sym-1, it is executed by typing 'g 200'. The system returns control +back to the monitor ROM when the program terminates, providing the '.' prompt. Special locations: @@ -38,10 +57,12 @@ Special locations: Conio support is not currently available for the Sym-1. But stdio console functions are available. <tag/Stack/ - The C runtime stack is located at $0FFF on 4KB Syms, or at $7FFF for 32KB systems. The stack always grows downwards. + The C runtime stack is located at $0FFF on 4kb Syms, or at $7FFF for 32kb systems. + The stack always grows downwards. <tag/Heap/ - The C heap is located at the end of the program and grows towards the C runtime stack. Extended memory can be added to the heap, as described below. + The C heap is located at the end of the program and grows towards the C runtime stack. Extended + memory can be added to the heap, as described below. </descrip><p> @@ -51,7 +72,8 @@ Programs containing Sym-1 code may use the <tt/sym1.h/ header file. See the hea <sect1>Hardware access<p> -The pseudo variables declared in the <tt/sym1.inc/ include file allow access to hardware located in the address space. See the include file for more information. +The pseudo variables declared in the <tt/sym1.inc/ include file allow access to hardware located in the +address space. See the include file for more information. <sect>Loadable drivers<p> @@ -61,7 +83,9 @@ No graphics drivers are currently available for the Sym-1. <sect1>Extended memory drivers<p> -There are no extended memory drivers for the Sym-1. However, there is a way to access memory beyond the 32k boundary, if memory is physically present in the system. See the example program, symExtendedMemory, in the samples directory. +There are no extended memory drivers for the Sym-1. However, there is a way to access memory beyond the +32kb boundary, if extended memory is physically present in the system. See the example program, +symExtendedMemory, in the samples directory. <sect1>Joystick drivers<p> @@ -73,7 +97,8 @@ No mouse drivers are currently available for the Sym-1. <sect1>RS232 device drivers<p> -No communication port drivers are currently available for the Sym-1. It has only the "master console" e.g. stdin and stdout. +No communication port drivers are currently available for the Sym-1. It has only the "master console" +e.g. stdin and stdout. <sect>Limitations<p> @@ -94,23 +119,32 @@ To be more specific, this limitation means that you cannot use any of the follow <sect>Other hints<p> <sect1>sym1.h<p> -This header exposes Sym-specific I/O functions that are useful for reading and writing its ports and front panel. See the <tt/sym1.h/ include file for a list of the functions available. +This header exposes Sym-specific I/O functions that are useful for reading and writing its ports and front panel. +See the <tt/sym1.h/ include file for a list of the functions available. <sect2>Limited memory applications<p> -As stated earlier, there are config files for 4KB and 32KB systems. If you have 32KB RAM, then you will probably want to use the sym1-32k configuration, but if not - if you are using the sym1-4k configuration - then you may want to use functions like getchar, putchar, gets and puts rather than functions like scanf and printf. Printf, for example, requires about 1KB because it needs to know how to process all the format specifiers. +As stated earlier, there are config files for 4kb and 32kb systems. If you have 32kb RAM, then you will probably +want to use the sym1-32k configuration, but if not - if you are using the sym1-4k configuration - then you may +want to use functions like getchar, putchar, gets and puts rather than functions like scanf and printf. +Printf, for example, requires about 1KB because it needs to know how to process all the format specifiers. <sect3>Using extended memory<p> -Memory may be physically present that is addressed at locations above the monitor ROM at $8000. This extended memory is accessible by adding to the heap, as described in the symExtendedMemory sample program. +Memory may be physically present that is addressed at locations above the monitor ROM at $8000. This extended +memory is accessible by adding to the heap, as described in the symExtendedMemory sample program. <sect4>Sample programs<p> -All the samples will run on the "stock" 4KB Sym-1, except for symIO and symNotepad, which require 32KB. Additionally, symExtendedMemory shows how to access memory above 32KB, so it expects more than 32KB. These sample programs can be found in the samples/sym1 directory: +All the samples will run on the "stock" 4kb Sym-1, except for symIO and symNotepad, which require 32kb. +Additionally, symExtendedMemory shows how to access memory above 32kb, so it expects more than 32kb. +These sample programs can be found in the samples/sym1 directory: <itemize> -<item>symHello prints "Hello World!" and then inputs characters, which are echoed on the screen. It also makes a "beep" sound.</item> -<item>symTiny does the same as symHello, but does it with puts() rather than printf() to show the difference in compiled binary size.</item> +<item>symHello prints "Hello World!" and then inputs characters, which are echoed on the screen. + It also makes a "beep" sound.</item> +<item>symTiny does the same as symHello, but does it with puts() rather than printf() to show the difference + in compiled binary size.</item> <item>symDisplay allows entry of a message, which is then displayed by scrolling it across the front panel display.</item> <item>symIO allows access to the Sym-1 digital I/O ports.</item> <item>symNotepad is a simple text entry/retrieval program that uses tape storage.</item> @@ -119,9 +153,11 @@ All the samples will run on the "stock" 4KB Sym-1, except for symIO an <sect>License<p> -This software is provided 'as-is', without any expressed or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. +This software is provided 'as-is', without any expressed or implied warranty. In no event will the authors be held +liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter +it and redistribute it freely, subject to the following restrictions: <enum> <item> The origin of this software must not be misrepresented; you must not diff --git a/samples/sym1/symExtendedMemory.c b/samples/sym1/symExtendedMemory.c index db0231236..cc01da353 100644 --- a/samples/sym1/symExtendedMemory.c +++ b/samples/sym1/symExtendedMemory.c @@ -26,12 +26,13 @@ #include <stdlib.h> #include <string.h> -#define SEGMENT 0x9000 // First 4K segment of extended memory -#define SEG_END 0x0FFF // Last location of segment -#define BLOCK_SIZE 0x1000 // Size of segment -#define TOP_END 0x0F7F // Last location of memory -#define TOP_SIZE 0x0F80 // Size of top segment -#define UNAVAILABLE 0xA000 // System I/O area +#define STD_MEM 0x7FFF // Last address of standard memory +#define SEGMENT 0x9000 // First 4K segment of extended memory +#define SEG_END 0x0FFF // Last location of segment +#define BLOCK_SIZE 0x1000 // Size of segment +#define TOP_END 0x0F7F // Last location of memory +#define TOP_SIZE 0x0F80 // Size of top segment +#define UNAVAILABLE 0xA000 // System I/O area int main (void) { int error = 0; @@ -44,49 +45,54 @@ int main (void) { printf ( "Main memory has %u bytes available.\n", heap_size ); - while ( (int) segment < 0xEFFF ) { // Iterate through 4K memory blocks - if( (int) segment != UNAVAILABLE ) { - segment[0] = 0x00; // Check beginning of segment - if ( segment[0] != 0x00 ) - error = 1; - segment[0] = 0xFF; - if ( segment[0] != 0xFF ) - error = 1; - segment[SEG_END] = 0x00; // Check end of segment - if ( segment[SEG_END] != 0x00 ) - error = 1; - segment[SEG_END] = 0xFF; - if ( segment[SEG_END] != 0xFF ) - error = 1; - if ( ! error ) { // If memory found, add to the heap - printf ( "Memory found at location %p, ", segment ); - _heapadd ( segment, BLOCK_SIZE ); - heap_size = _heapmemavail(); - printf( "so the system now has %u bytes available.\n", heap_size ); - } else { - error = 0; - } - } - segment += 0x1000; // Increment to next segment - } + if ( heap_size > STD_MEM ) { + printf ( "Extended memory already installed.\n" ); + } else { - segment[0] = 0x00; // Check beginning of top memory segment - if ( segment[0] != 0x00 ) - error = 1; - segment[0] = 0xFF; - if ( segment[0] != 0xFF ) - error = 1; - segment[TOP_END] = 0x00; // Check end of usable memory - if ( segment[TOP_END] != 0x00 ) - error = 1; - segment[TOP_END] = 0xFF; - if ( segment[TOP_END] != 0xFF ) - error = 1; - if ( ! error ) { // If memory found, add to the heap - printf ( "Memory found at location %p, ", segment ); - _heapadd ( segment, TOP_SIZE ); - heap_size = _heapmemavail(); - printf( "so the system now has %u bytes available.\n", heap_size ); + while ( (int) segment < 0xEFFF ) { // Iterate through 4K memory blocks + if( (int) segment != UNAVAILABLE ) { + segment[0] = 0x00; // Check beginning of segment + if ( segment[0] != 0x00 ) + error = 1; + segment[0] = 0xFF; + if ( segment[0] != 0xFF ) + error = 1; + segment[SEG_END] = 0x00; // Check end of segment + if ( segment[SEG_END] != 0x00 ) + error = 1; + segment[SEG_END] = 0xFF; + if ( segment[SEG_END] != 0xFF ) + error = 1; + if ( ! error ) { // If memory found, add to the heap + printf ( "Memory found at location %p, ", segment ); + _heapadd ( segment, BLOCK_SIZE ); + heap_size = _heapmemavail(); + printf( "so the system now has %u bytes available.\n", heap_size ); + } else { + error = 0; + } + } + segment += 0x1000; // Increment to next segment + } + + segment[0] = 0x00; // Check beginning of top memory segment + if ( segment[0] != 0x00 ) + error = 1; + segment[0] = 0xFF; + if ( segment[0] != 0xFF ) + error = 1; + segment[TOP_END] = 0x00; // Check end of usable memory + if ( segment[TOP_END] != 0x00 ) + error = 1; + segment[TOP_END] = 0xFF; + if ( segment[TOP_END] != 0xFF ) + error = 1; + if ( ! error ) { // If memory found, add to the heap + printf ( "Memory found at location %p, ", segment ); + _heapadd ( segment, TOP_SIZE ); + heap_size = _heapmemavail(); + printf( "so the system now has %u bytes available.\n", heap_size ); + } } puts ("\nEnjoy your day!\n"); From cc9535e82f379ff5b5001072142d28737e7541aa Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Fri, 4 Mar 2022 20:21:20 +0200 Subject: [PATCH 036/101] Update docs --- doc/atari7800.sgml | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/doc/atari7800.sgml b/doc/atari7800.sgml index 95868bbd9..85f6e4f9f 100644 --- a/doc/atari7800.sgml +++ b/doc/atari7800.sgml @@ -3,7 +3,7 @@ <article> <title>Atari 7800 specific information for cc65 <author> -<url url="mailto:contact@florentflament.com" name="Florent Flament"><newline> +<url url="mailto:karri@sipo.fi" name="Karri Kaksonen"><newline> <abstract> An overview over the Atari 7800 runtime system as it is implemented @@ -24,23 +24,31 @@ comes with the cc65 C compiler. It describes the memory layout, Atari <sect>Binary format<p> The default binary output format generated by the linker for the Atari -7800 target is a 4K cartridge image. +7800 target is a 32K cartridge image. <sect>Memory layout<p> cc65 generated programs with the default setup can use RAM from -$0080 to $00FF - __STACKSIZE__, where __STACKSIZE__ is -the size of the system stack with a default value of 16 bytes. The +from $1800 to $203f. +The 4k RAM is then mapped to zero page area. +$2040 to $20ff is visible as zero page. +After that we have a vero small RAM area that is unused. +$2100 to $213f. +Then we mirror a second block from the RAM to become the hardware stack. +This would be from $2140 to $21ff. + +The C-stack starts at $2800 and it can grow down to $2200. + size of the system stack can be customized by defining the __STACKSIZE__ linker variable. Special locations: <descrip> - <tag/Stack/ The C runtime stack is located at $00FF - + <tag/Stack/ The C runtime stack is located at $2800 - __STACKSIZE__ and growing downwards. - <tag/Heap/ The C heap is located at $0080 and grows upwards. + <tag/Heap/ The C heap is located at $2200 and grows upwards. </descrip><p> @@ -61,7 +69,7 @@ Programs containing Atari 7800 specific code may use the <tt/atari7800.h/ header file. The following pseudo variables declared in the <tt/atari7800.h/ header -file allow access to the Atari 7800 TIA & RIOT chips registers. +file allow access to the Atari 7800 TIA, MARIA & RIOT chips registers. <descrip> @@ -78,6 +86,11 @@ file allow access to the Atari 7800 TIA & RIOT chips registers. Guide by Steve Wright for a detailed description of the chip and its registers. + <tag><tt/MARIA/</tag> The <tt/MARIA/ structure allows read/write + access to the Atari 7800 MARIA chip registers. See the + <tt/_maria.h/ header file located in the include directory for the + declaration of the structure. + </descrip><p> @@ -91,6 +104,12 @@ There are no drivers for the Atari 7800. TBD +<sect>Encryption<p> + +In order to boot the game in a mode that supports atari7800 functions +the cart must be encrypted after the linking phase. +There is a program called sign7800 that can be used to sign the cart. + <sect>Other hints<p> One may write a custom linker configuration file to tune the memory From f36b9b544dd16070813782e8c566a9b9fa2a8e77 Mon Sep 17 00:00:00 2001 From: nyanpasu64 <nyanpasu64@tuta.io> Date: Mon, 21 Feb 2022 21:15:43 -0800 Subject: [PATCH 037/101] Fix segfault on 64-bit LLP64 Windows builds There are many occurrences of unsigned long in codegen.h's function arguments. Changing g_getimmed and g_defdata makes `make` succeed without segfaulting. I don't know if it makes cc65 behave correctly in all cases, or if there are more unsigned long that need to be changed. --- src/cc65/codegen.c | 4 ++-- src/cc65/codegen.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cc65/codegen.c b/src/cc65/codegen.c index 3a98f5e63..59be677fd 100644 --- a/src/cc65/codegen.c +++ b/src/cc65/codegen.c @@ -689,7 +689,7 @@ void g_restore_regvars (int StackOffs, int RegOffs, unsigned Bytes) -void g_getimmed (unsigned Flags, unsigned long Val, long Offs) +void g_getimmed (unsigned Flags, uintptr_t Val, long Offs) /* Load a constant into the primary register */ { unsigned char B1, B2, B3, B4; @@ -4394,7 +4394,7 @@ void g_res (unsigned n) -void g_defdata (unsigned flags, unsigned long val, long offs) +void g_defdata (unsigned flags, uintptr_t val, long offs) /* Define data with the size given in flags */ { if (flags & CF_CONST) { diff --git a/src/cc65/codegen.h b/src/cc65/codegen.h index b0cf9858d..0a5384578 100644 --- a/src/cc65/codegen.h +++ b/src/cc65/codegen.h @@ -271,7 +271,7 @@ void g_restore_regvars (int StackOffs, int RegOffs, unsigned Bytes); -void g_getimmed (unsigned Flags, unsigned long Val, long Offs); +void g_getimmed (unsigned Flags, uintptr_t Val, long Offs); /* Load a constant into the primary register */ void g_getstatic (unsigned Flags, uintptr_t Label, long Offs); @@ -461,7 +461,7 @@ void g_ge (unsigned flags, unsigned long val); void g_res (unsigned n); /* Reserve static storage, n bytes */ -void g_defdata (unsigned flags, unsigned long val, long offs); +void g_defdata (unsigned flags, uintptr_t val, long offs); /* Define data with the size given in flags */ void g_defbytes (const void* bytes, unsigned count); From 2feba696223537371b5f8ac853a653fddcdf7a6d Mon Sep 17 00:00:00 2001 From: nyanpasu64 <nyanpasu64@tuta.io> Date: Sat, 5 Mar 2022 03:23:51 -0800 Subject: [PATCH 038/101] Remove broken inttypes.h src/common/inttypes.h is a shim to fix building cc65 on non-C99-compliant compilers missing inttypes.h (like VS2012 and earlier). The shim is actually incomplete and does not define the PRI... macros supplied by the actual compiler headers. Since we're planning to use those macros, delete this header so cc65's source files instead use host-supplied inttypes.h containing macro definitions. --- src/common.vcxproj | 1 - src/common/inttypes.h | 123 ------------------------------------------ 2 files changed, 124 deletions(-) delete mode 100644 src/common/inttypes.h diff --git a/src/common.vcxproj b/src/common.vcxproj index f7929df2b..df99fc4a9 100644 --- a/src/common.vcxproj +++ b/src/common.vcxproj @@ -74,7 +74,6 @@ <ClInclude Include="common\inline.h" /> <ClInclude Include="common\intptrstack.h" /> <ClInclude Include="common\intstack.h" /> - <ClInclude Include="common\inttypes.h" /> <ClInclude Include="common\libdefs.h" /> <ClInclude Include="common\lidefs.h" /> <ClInclude Include="common\matchpat.h" /> diff --git a/src/common/inttypes.h b/src/common/inttypes.h deleted file mode 100644 index 28ffb2cc5..000000000 --- a/src/common/inttypes.h +++ /dev/null @@ -1,123 +0,0 @@ -/*****************************************************************************/ -/* */ -/* inttypes.h */ -/* */ -/* Define integer types */ -/* */ -/* */ -/* */ -/* (C) 2004 Ullrich von Bassewitz */ -/* Roemerstrasse 52 */ -/* D-70794 Filderstadt */ -/* EMail: uz@cc65.org */ -/* */ -/* */ -/* This software is provided 'as-is', without any expressed or implied */ -/* warranty. In no event will the authors be held liable for any damages */ -/* arising from the use of this software. */ -/* */ -/* Permission is granted to anyone to use this software for any purpose, */ -/* including commercial applications, and to alter it and redistribute it */ -/* freely, subject to the following restrictions: */ -/* */ -/* 1. The origin of this software must not be misrepresented; you must not */ -/* claim that you wrote the original software. If you use this software */ -/* in a product, an acknowledgment in the product documentation would be */ -/* appreciated but is not required. */ -/* 2. Altered source versions must be plainly marked as such, and must not */ -/* be misrepresented as being the original software. */ -/* 3. This notice may not be removed or altered from any source */ -/* distribution. */ -/* */ -/*****************************************************************************/ - - - -#ifndef INTTYPES_H -#define INTTYPES_H - - - -/* If we have <stdint.h>, include it; otherwise, adapt types from <stddef.h> -** and define integer boundary constants. -** gcc and msvc don't define __STDC_VERSION__ without special flags, so check -** for them explicitly. Undefined symbols are replaced by zero; so, checks for -** defined(__GNUC__) and defined(_MSC_VER) aren't necessary. -*/ -#if (__STDC_VERSION__ >= 199901) || (__GNUC__ >= 3) || (_MSC_VER >= 1600) -#include <stdint.h> -#else - -/* Assume that ptrdiff_t and size_t are wide enough to hold pointers. -** Assume that they are the widest type. -*/ -#include <limits.h> -#include <stddef.h> - -typedef ptrdiff_t intptr_t; -typedef size_t uintptr_t; -typedef ptrdiff_t intmax_t; -typedef size_t uintmax_t; - -#define INT8_MAX (0x7F) -#define INT16_MAX (0x7FFF) -#define INT32_MAX (0x7FFFFFFF) - -#define INT8_MIN (-INT8_MAX - 1) -#define INT16_MIN (-INT16_MAX - 1) -#define INT32_MIN (-INT32_MAX - 1) - -#define UINT8_MAX (0xFF) -#define UINT16_MAX (0xFFFF) -#define UINT32_MAX (0xFFFFFFFF) - -#if UCHAR_MAX == UINT8_MAX -typedef unsigned char uint8_t; -#else -#error "No suitable type for uint8_t found." -#endif - -#if SCHAR_MIN == INT8_MIN && SCHAR_MAX == INT8_MAX -typedef signed char int8_t; -#else -#error "No suitable type for int8_t found." -#endif - -#if UINT_MAX == UINT16_MAX -typedef unsigned int uint16_t; -#elif USHRT_MAX == UINT16_MAX -typedef unsigned short uint16_t; -#else -#error "No suitable type for uint16_t found." -#endif - -#if INT_MIN == INT16_MIN && INT_MAX == INT16_MAX -typedef int int16_t; -#elif SHRT_MIN == INT16_MIN && SHRT_MAX == INT16_MAX -typedef short int16_t; -#else -#error "No suitable type for int16_t found." -#endif - -#if UINT_MAX == UINT32_MAX -typedef unsigned int uint32_t; -#elif ULONG_MAX == UINT32_MAX -typedef unsigned long uint32_t; -#else -#error "No suitable type for uint32_t found." -#endif - -#if INT_MIN == INT32_MIN && INT_MAX == INT32_MAX -typedef int int32_t; -#elif LONG_MIN == INT32_MIN && LONG_MAX == INT32_MAX -typedef long int32_t; -#else -#error "No suitable type for int32_t found." -#endif - -#endif - - - -/* End of inttypes.h */ -#endif From 3466abc60cb768db4b46444255e45fd5ea69faa8 Mon Sep 17 00:00:00 2001 From: nyanpasu64 <nyanpasu64@tuta.io> Date: Sat, 5 Mar 2022 03:30:14 -0800 Subject: [PATCH 039/101] Fix format strings to properly format uintptr_t --- src/cc65/codegen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cc65/codegen.c b/src/cc65/codegen.c index 59be677fd..4f737555c 100644 --- a/src/cc65/codegen.c +++ b/src/cc65/codegen.c @@ -4403,15 +4403,15 @@ void g_defdata (unsigned flags, uintptr_t val, long offs) switch (flags & CF_TYPEMASK) { case CF_CHAR: - AddDataLine ("\t.byte\t$%02lX", val & 0xFF); + AddDataLine ("\t.byte\t$%02"PRIXPTR, val & 0xFF); break; case CF_INT: - AddDataLine ("\t.word\t$%04lX", val & 0xFFFF); + AddDataLine ("\t.word\t$%04"PRIXPTR, val & 0xFFFF); break; case CF_LONG: - AddDataLine ("\t.dword\t$%08lX", val & 0xFFFFFFFF); + AddDataLine ("\t.dword\t$%08"PRIXPTR, val & 0xFFFFFFFF); break; default: From 9cb81f1410c768562c56c75e665b31bed4bdc055 Mon Sep 17 00:00:00 2001 From: nyanpasu64 <nyanpasu64@tuta.io> Date: Sun, 6 Mar 2022 14:46:56 -0800 Subject: [PATCH 040/101] Replace #include "inttypes.h" with <inttypes.h> --- src/cc65/codegen.c | 2 +- src/cc65/codegen.h | 2 +- src/cc65/exprdesc.h | 2 +- src/common/xsprintf.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cc65/codegen.c b/src/cc65/codegen.c index 4f737555c..5bfc6696b 100644 --- a/src/cc65/codegen.c +++ b/src/cc65/codegen.c @@ -33,6 +33,7 @@ +#include <inttypes.h> #include <limits.h> #include <stdio.h> #include <string.h> @@ -42,7 +43,6 @@ #include "addrsize.h" #include "check.h" #include "cpu.h" -#include "inttypes.h" #include "strbuf.h" #include "xmalloc.h" #include "xsprintf.h" diff --git a/src/cc65/codegen.h b/src/cc65/codegen.h index 0a5384578..1de71e7d3 100644 --- a/src/cc65/codegen.h +++ b/src/cc65/codegen.h @@ -37,10 +37,10 @@ #define CODEGEN_H +#include <inttypes.h> /* common */ #include "coll.h" -#include "inttypes.h" /* cc65 */ #include "segments.h" diff --git a/src/cc65/exprdesc.h b/src/cc65/exprdesc.h index a1487a0bd..13eb36e5e 100644 --- a/src/cc65/exprdesc.h +++ b/src/cc65/exprdesc.h @@ -38,12 +38,12 @@ +#include <inttypes.h> #include <string.h> /* common */ #include "fp.h" #include "inline.h" -#include "inttypes.h" /* cc65 */ #include "asmcode.h" diff --git a/src/common/xsprintf.c b/src/common/xsprintf.c index a7d26d5ef..5994bb604 100644 --- a/src/common/xsprintf.c +++ b/src/common/xsprintf.c @@ -33,6 +33,7 @@ +#include <inttypes.h> #include <stdio.h> #include <stddef.h> #include <string.h> @@ -41,7 +42,6 @@ /* common */ #include "chartype.h" #include "check.h" -#include "inttypes.h" #include "strbuf.h" #include "va_copy.h" #include "xsprintf.h" From eb86bc33b94144c9001846c195622025edabebf0 Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Mon, 7 Mar 2022 08:48:59 +0200 Subject: [PATCH 041/101] Add CARTSIZE to cfg file for configuring the a78 header. Add descriptions of usage. --- cfg/atari7800.cfg | 11 ++++++++--- doc/atari7800.sgml | 30 +++++++++++++++++++++++------- libsrc/atari7800/exehdr.s | 4 ++-- 3 files changed, 33 insertions(+), 12 deletions(-) diff --git a/cfg/atari7800.cfg b/cfg/atari7800.cfg index 8029ca674..d7b166809 100644 --- a/cfg/atari7800.cfg +++ b/cfg/atari7800.cfg @@ -1,7 +1,12 @@ # Atari VCS 7800 linker configuration file for cc65 +# This cfg file adds the a78 header in front of the image +# If you want just the ROM you can mark the __EXEHDR__ as weak instead of import +# But for the most common use we add the a78 automatically as it +# contains info about what kind of cart the build supports SYMBOLS { - __STACKSIZE__: type = weak, value = $0010; # 16 bytes stack + __STACKSIZE__: type = weak, value = $0600; # C stack + __CARTSIZE__: type = weak, value = $c000; __EXEHDR__: type = import; __VEC_BOTTOM__: value = $fffa, type = export; __VEC_SIZE__: value = $6, type = export; @@ -21,7 +26,7 @@ MEMORY { RAM2: file = "", define = yes, start = $2100, size = $0040, type = rw; RAM3: file = "", define = yes, start = $2200, size = $0600, type = rw; # For emulators you also need a header file - HEADER: file = %O, start = $0000, size = 128; + HEADER: file = %O, start = $0000, size = 128; # "Normal" cartridge rom. Multiple banks arent supported # by this script. You may change the rom size, but keep # two things in mind: @@ -37,7 +42,7 @@ MEMORY { SEGMENTS { ZEROPAGE: load = ZP, type = zp; - EXEHDR: load = HEADER, type = ro, define = yes; + EXEHDR: load = HEADER, type = ro; STARTUP: load = ROMS, type = ro, define = yes; ONCE: load = ROMS, type = ro, define = yes; CODE: load = ROM, type = ro, define = yes; diff --git a/doc/atari7800.sgml b/doc/atari7800.sgml index 85f6e4f9f..b6551614c 100644 --- a/doc/atari7800.sgml +++ b/doc/atari7800.sgml @@ -24,7 +24,29 @@ comes with the cc65 C compiler. It describes the memory layout, Atari <sect>Binary format<p> The default binary output format generated by the linker for the Atari -7800 target is a 32K cartridge image. +7800 target is a 48K cartridge image. + +<sect>A78 header<p> + +There is lots of different cart hardware available for the atari7800. +Some carts have ROM, RAM, sound hardware, non-volatile high score chips. +In order to know what kind of hardware the cart build requires there is +a header file of 128 bytes in front of the binary. + +The default build creates a cart file for a 48K rom cart without any +extra features like the pokey audio chip or extra RAM. + +In order to make cc65 more user friendly the build will add the a78 +header automatically. This allows you to run the binary on emulators +and flash carts on the real console. + +<sect>Encryption<p> + +In order to boot the game in a mode that supports atari7800 functions +the cart must be encrypted after the linking phase. +There is a program called sign7800 that can be used to sign the cart. +The encryption is not required for running the cart on emulators. +You can also run atari2600 games without encryption. <sect>Memory layout<p> @@ -104,12 +126,6 @@ There are no drivers for the Atari 7800. TBD -<sect>Encryption<p> - -In order to boot the game in a mode that supports atari7800 functions -the cart must be encrypted after the linking phase. -There is a program called sign7800 that can be used to sign the cart. - <sect>Other hints<p> One may write a custom linker configuration file to tune the memory diff --git a/libsrc/atari7800/exehdr.s b/libsrc/atari7800/exehdr.s index 6f3023040..618164cd4 100644 --- a/libsrc/atari7800/exehdr.s +++ b/libsrc/atari7800/exehdr.s @@ -4,7 +4,7 @@ ; This header contains data for emulators ; .export __EXEHDR__: absolute = 1 - + .import __CARTSIZE__ ; ------------------------------------------------------------------------ ; EXE header .segment "EXEHDR" @@ -12,7 +12,7 @@ .byte 'A','T','A','R','I','7','8','0','0',' ',' ',' ',' ',' ',' ',' ' .byte 'G','a','m','e',' ','n','a','m','e',0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - .byte 0,0,$80,0 ; Size + .byte 0,0,>__CARTSIZE__,0 ; Set the cart size in the cfg file ; bit 0 - pokey at 4000 ; bit 1 - supergame bank switched ; bit 2 - supergame ram at $4000 From 6001d3eab9160629d14f8f538c9ae7645916f1d3 Mon Sep 17 00:00:00 2001 From: mrdudz <mrdudz@users.noreply.github.com> Date: Mon, 7 Mar 2022 14:48:55 +0100 Subject: [PATCH 042/101] fix #warning directive so the test could actually compile :) --- test/misc/sitest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/misc/sitest.c b/test/misc/sitest.c index d13acf92c..2f1d7df4d 100644 --- a/test/misc/sitest.c +++ b/test/misc/sitest.c @@ -38,7 +38,7 @@ #ifdef NO_WCHAR -#warn "this test checks C99 features, but NO_WCHAR is defined so the test will most definitely fail." +#warning "this test checks C99 features, but NO_WCHAR is defined so the test will most definitely fail." #endif From b2ae73879bdf4148963b3df80cc200dd95ec2b64 Mon Sep 17 00:00:00 2001 From: Greg King <gregdk@users.sf.net> Date: Sat, 12 Mar 2022 01:35:33 -0500 Subject: [PATCH 043/101] Added a URL to the snapshot's commit history as a comment in the Windows snapshot ZIPs. --- src/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Makefile b/src/Makefile index 87f1e8236..c8028204b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -119,6 +119,7 @@ endif # CMD_EXE zip: @cd .. && zip cc65 bin/* + @echo 'https://github.com/cc65/cc65/commits/'$(word 2,$(BUILD_ID))|zip -zq ../cc65 define OBJS_template From 52d7991b9bf07997cd3b919a1829340ca7a6e62e Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Sun, 13 Mar 2022 12:32:13 +0200 Subject: [PATCH 044/101] Remove the EXEHDR from the default build --- cfg/atari7800.cfg | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/cfg/atari7800.cfg b/cfg/atari7800.cfg index d7b166809..85abc24ee 100644 --- a/cfg/atari7800.cfg +++ b/cfg/atari7800.cfg @@ -1,13 +1,10 @@ # Atari VCS 7800 linker configuration file for cc65 -# This cfg file adds the a78 header in front of the image -# If you want just the ROM you can mark the __EXEHDR__ as weak instead of import -# But for the most common use we add the a78 automatically as it -# contains info about what kind of cart the build supports +# In order to add the a78 header to the build you can add +# "--force-import __EXEHDR__" to the command line SYMBOLS { __STACKSIZE__: type = weak, value = $0600; # C stack __CARTSIZE__: type = weak, value = $c000; - __EXEHDR__: type = import; __VEC_BOTTOM__: value = $fffa, type = export; __VEC_SIZE__: value = $6, type = export; __ENCRYPT_BOTTOM__: value = $ff7a, type = export; @@ -42,9 +39,9 @@ MEMORY { SEGMENTS { ZEROPAGE: load = ZP, type = zp; - EXEHDR: load = HEADER, type = ro; - STARTUP: load = ROMS, type = ro, define = yes; - ONCE: load = ROMS, type = ro, define = yes; + EXEHDR: load = HEADER, type = ro, optional = yes; + STARTUP: load = ROMS, type = ro, define = yes; + ONCE: load = ROMS, type = ro, define = yes; CODE: load = ROM, type = ro, define = yes; RODATA: load = ROM, type = ro, define = yes, align = 256; DATA: load = ROM, run = RAM1, type = rw, define = yes; From 38b330482d57f5db92d74855267003ac08a114ce Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Sun, 13 Mar 2022 13:31:11 +0200 Subject: [PATCH 045/101] Make start of ROM depend on CARTSIZE --- cfg/atari7800.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cfg/atari7800.cfg b/cfg/atari7800.cfg index 85abc24ee..562dd3857 100644 --- a/cfg/atari7800.cfg +++ b/cfg/atari7800.cfg @@ -4,7 +4,7 @@ SYMBOLS { __STACKSIZE__: type = weak, value = $0600; # C stack - __CARTSIZE__: type = weak, value = $c000; + __CARTSIZE__: type = weak, value = $8000; __VEC_BOTTOM__: value = $fffa, type = export; __VEC_SIZE__: value = $6, type = export; __ENCRYPT_BOTTOM__: value = $ff7a, type = export; @@ -12,7 +12,7 @@ SYMBOLS { __MEMORY_TOP__: value = __ENCRYPT_BOTTOM__, type = export; __INIT_SIZE__: value = 69, type = export; __MEMORY_INIT__: value = __MEMORY_TOP__ - __INIT_SIZE__, type = export; - __MEMORY_BOTTOM__: value = $8000, type = export; + __MEMORY_BOTTOM__: value = $10000 - __CARTSIZE__, type = weak; __FREE_ROM_SIZE__: value = __MEMORY_INIT__ - __MEMORY_BOTTOM__, type = export; } From 266f35ee3742e05690fad267cc2b41a83c1597ac Mon Sep 17 00:00:00 2001 From: Greg King <gregdk@users.sf.net> Date: Fri, 18 Mar 2022 01:06:48 -0400 Subject: [PATCH 046/101] Made tgidemo draw circles in blue instead of orange. That change lets it be built on two more platforms (Atmos, Telestrat). --- samples/Makefile | 7 ++++--- samples/tgidemo.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/samples/Makefile b/samples/Makefile index 5c44d1947..86be30a83 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -199,7 +199,8 @@ EXELIST_atmos = \ ascii \ hello \ mandelbrot \ - sieve + sieve \ + tgidemo EXELIST_bbc = \ notavailable @@ -311,7 +312,7 @@ EXELIST_sim65c02 = $(EXELIST_sim6502) EXELIST_supervision = \ notavailable - + EXELIST_sym1 = \ notavailable @@ -321,7 +322,7 @@ EXELIST_telestrat = \ hello \ mandelbrot \ sieve \ -# tgidemo + tgidemo EXELIST_vic20 = \ ascii \ diff --git a/samples/tgidemo.c b/samples/tgidemo.c index b431cfb98..f193a1b83 100644 --- a/samples/tgidemo.c +++ b/samples/tgidemo.c @@ -68,7 +68,7 @@ static void DoWarning (void) static void DoCircles (void) { - static const unsigned char Palette[2] = { TGI_COLOR_WHITE, TGI_COLOR_ORANGE }; + static const unsigned char Palette[2] = { TGI_COLOR_WHITE, TGI_COLOR_BLUE }; unsigned char I; unsigned char Color = COLOR_BACK; const unsigned X = MaxX / 2; From 9f2d27d9c152e7acf40d0eda5df30577a45e8dfe Mon Sep 17 00:00:00 2001 From: Greg King <gregdk@users.sf.net> Date: Sat, 19 Mar 2022 01:21:52 -0400 Subject: [PATCH 047/101] Added Atari Lynx versions of three sample programs. The Lynx target can't build the usual versions because its library doesn't have conio output and stdio. --- samples/Makefile | 2 +- samples/lynx/Makefile | 59 +++++++++++++ samples/lynx/hello.c | 43 +++++++++ samples/lynx/mandelbrot.c | 86 ++++++++++++++++++ samples/lynx/tgidemo.c | 179 ++++++++++++++++++++++++++++++++++++++ samples/readme.txt | 23 ++++- 6 files changed, 390 insertions(+), 2 deletions(-) create mode 100644 samples/lynx/Makefile create mode 100644 samples/lynx/hello.c create mode 100644 samples/lynx/mandelbrot.c create mode 100644 samples/lynx/tgidemo.c diff --git a/samples/Makefile b/samples/Makefile index 86be30a83..9732cfac7 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -154,7 +154,7 @@ endif # Lists of subdirectories # disasm depends on cpp -DIRLIST = tutorial geos atari2600 atari5200 apple2 gamate supervision sym1 cbm +DIRLIST = tutorial geos atari2600 atari5200 apple2 gamate lynx supervision sym1 cbm # -------------------------------------------------------------------------- # Lists of executables diff --git a/samples/lynx/Makefile b/samples/lynx/Makefile new file mode 100644 index 000000000..b4ef64af0 --- /dev/null +++ b/samples/lynx/Makefile @@ -0,0 +1,59 @@ + +# Run 'make SYS=<target>'; or, set a SYS env. +# var. to build for another target system. +SYS ?= lynx + +# Just the usual way to find out if we're +# using cmd.exe to execute make rules. +ifneq ($(shell echo),) + CMD_EXE = 1 +endif + +ifdef CMD_EXE + NULLDEV = nul: + DEL = -del /f +else + NULLDEV = /dev/null + DEL = $(RM) +endif + +ifdef CC65_HOME + AS = $(CC65_HOME)/bin/ca65 + CC = $(CC65_HOME)/bin/cc65 + CL = $(CC65_HOME)/bin/cl65 + LD = $(CC65_HOME)/bin/ld65 +else + AS := $(if $(wildcard ../../bin/ca65*),../../bin/ca65,ca65) + CC := $(if $(wildcard ../../bin/cc65*),../../bin/cc65,cc65) + CL := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65) + LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65) +endif + +EXELIST_lynx = \ + hello.lnx \ + mandelbrot.lnx \ + tgidemo.lnx + +.PHONY: samples clean + +ifneq ($(EXELIST_$(SYS)),) +samples: $(EXELIST_$(SYS)) +else +samples: +# recipe used to skip systems that will not work with any program in this dir +ifeq ($(MAKELEVEL),0) + @echo "info: Lynx tests not available for" $(SYS) +else +# Suppress the "nothing to be done for 'samples' message. + @echo "" > $(NULLDEV) +endif +endif + +.SUFFIXES: +.SUFFIXES: .c .lnx + +%.lnx : %.c + $(CL) -t $(SYS) -Oris -m $*.map -o $@ $< + +clean: + @$(DEL) *.o *.map *.lnx 2>$(NULLDEV) diff --git a/samples/lynx/hello.c b/samples/lynx/hello.c new file mode 100644 index 000000000..5e6832514 --- /dev/null +++ b/samples/lynx/hello.c @@ -0,0 +1,43 @@ +/* Atari Lynx version of samples/hello.c, using TGI instead of conio */ + +#include <tgi.h> + + +/*****************************************************************************/ +/* Data */ +/*****************************************************************************/ + +static const char Text[] = "Hello world!"; + + +/*****************************************************************************/ +/* Code */ +/*****************************************************************************/ + +void main (void) +{ + unsigned int XMax, YMax; + + tgi_install (tgi_static_stddrv); + tgi_init (); + + /* Set screen color. */ + tgi_setcolor (TGI_COLOR_WHITE); + + /* Clear the screen. */ + tgi_clear(); + + /* Ask for the screen size. */ + XMax = tgi_getmaxx (); + YMax = tgi_getmaxy (); + + /* Draw a frame around the screen. */ + tgi_line (0, 0, XMax, 0); + tgi_lineto (XMax, YMax); + tgi_lineto (0, YMax); + tgi_lineto (0, 0); + + /* Write the greeting in the middle of the screen. */ + tgi_outtextxy ((tgi_getxres () - tgi_gettextwidth (Text)) / 2, + (tgi_getyres () - tgi_gettextheight (Text)) / 2, Text); +} diff --git a/samples/lynx/mandelbrot.c b/samples/lynx/mandelbrot.c new file mode 100644 index 000000000..ce49fbf7a --- /dev/null +++ b/samples/lynx/mandelbrot.c @@ -0,0 +1,86 @@ +/*****************************************************************************\ +** mandelbrot sample program for Atari Lynx ** +** ** +** (w) 2002 by groepaz/hitmen, TGI support by Stefan Haubenthal ** +\*****************************************************************************/ + + + +#include <stdlib.h> +#include <tgi.h> + + + +/* Graphics definitions */ +#define SCREEN_X (tgi_getxres()) +#define SCREEN_Y (tgi_getyres()) +#define MAXCOL (tgi_getcolorcount()) + +#define maxiterations 32 +#define fpshift (10) +#define tofp(_x) ((_x)<<fpshift) +#define fromfp(_x) ((_x)>>fpshift) +#define fpabs(_x) (abs(_x)) + +#define mulfp(_a,_b) ((((signed long)_a)*(_b))>>fpshift) +#define divfp(_a,_b) ((((signed long)_a)<<fpshift)/(_b)) + +/* Use static local variables for speed */ +#pragma static-locals (1); + + + +static void mandelbrot (signed short x1, signed short y1, signed short x2, + signed short y2) +{ + /* */ + register signed short r, r1, i; + register signed short xs, ys, xx, yy; + register signed short x, y; + register unsigned char count; + register unsigned char maxcol = MAXCOL; + + /* Calc stepwidth */ + xs = ((x2 - x1) / (SCREEN_X)); + ys = ((y2 - y1) / (SCREEN_Y)); + + yy = y1; + for (y = 0; y < (SCREEN_Y); y++) { + yy += ys; + xx = x1; + for (x = 0; x < (SCREEN_X); x++) { + xx += xs; + /* Do iterations */ + r = 0; + i = 0; + for (count = 0; (count < maxiterations) && + (fpabs (r) < tofp (2)) && (fpabs (i) < tofp (2)); + ++count) { + r1 = (mulfp (r, r) - mulfp (i, i)) + xx; + /* i = (mulfp(mulfp(r,i),tofp(2)))+yy; */ + i = (((signed long) r * i) >> (fpshift - 1)) + yy; + r = r1; + } + if (count == maxiterations) { + tgi_setcolor (0); + } else { + tgi_setcolor (count % maxcol); + } + /* Set pixel */ + tgi_setpixel (x, y); + } + } +} + +void main (void) +{ + /* Install the graphics driver */ + tgi_install (tgi_static_stddrv); + + /* Initialize graphics */ + tgi_init (); + tgi_clear (); + + /* Calc mandelbrot set */ + mandelbrot (tofp (-2), tofp (-2), tofp (2), tofp (2)); +} diff --git a/samples/lynx/tgidemo.c b/samples/lynx/tgidemo.c new file mode 100644 index 000000000..e92a078dc --- /dev/null +++ b/samples/lynx/tgidemo.c @@ -0,0 +1,179 @@ +/* Tgidemo modified for the Atari Lynx. +** +** Press any of the Lynx's option buttons to go to the next screen. +*/ + +#include <cc65.h> +#include <conio.h> +#include <tgi.h> +#include <time.h> + + +#define COLOR_BACK TGI_COLOR_BLACK +#define COLOR_FORE TGI_COLOR_WHITE + + +/*****************************************************************************/ +/* Data */ +/*****************************************************************************/ + + + +/* Driver stuff */ +static unsigned MaxX; +static unsigned MaxY; +static unsigned AspectRatio; + + + +/*****************************************************************************/ +/* Code */ +/*****************************************************************************/ + + + +/* The Lynx draws too fast. This function delays +** the drawing so that we can watch it. +*/ +static void wait (unsigned char ticks) +{ + clock_t T = clock () + ticks; + + while (clock () < T) {} +} + + + +static void DoCircles (void) +{ + unsigned char I; + unsigned char Color = COLOR_BACK; + const unsigned X = MaxX / 2; + const unsigned Y = MaxY / 2; + const unsigned Limit = (X < Y) ? Y : X; + + tgi_setcolor (COLOR_FORE); + tgi_clear (); + + tgi_line (0, 0, MaxX, MaxY); + tgi_line (0, MaxY, MaxX, 0); + while (!kbhit ()) { + Color = (Color == COLOR_FORE) ? COLOR_BACK : COLOR_FORE; + tgi_setcolor (Color); + for (I = 10; I <= Limit; I += 10) { + tgi_ellipse (X, Y, I, tgi_imulround (I, AspectRatio)); + wait (9); + } + } + + cgetc (); +} + + + +static void DoCheckerboard (void) +{ + unsigned X, Y; + unsigned char Color = COLOR_BACK; + + tgi_clear (); + + while (1) { + for (Y = 0; Y <= MaxY - 2; Y += 10) { + for (X = 0; X <= MaxX; X += 10) { + Color = (Color == COLOR_FORE) ? COLOR_BACK : COLOR_FORE; + tgi_setcolor (Color); + tgi_bar (X, Y, X+9, Y+9); + if (kbhit ()) { + cgetc (); + return; + } + wait (1); + } + Color = Color == COLOR_FORE ? COLOR_BACK : COLOR_FORE; + } + Color = Color == COLOR_FORE ? COLOR_BACK : COLOR_FORE; + } +} + + + +static void DoDiagram (void) +{ + int XOrigin, YOrigin; + int Amp; + int X, Y; + unsigned I; + + tgi_setcolor (COLOR_FORE); + tgi_clear (); + + /* Determine zero and amplitude */ + YOrigin = MaxY / 2; + XOrigin = 10; + Amp = (MaxY - 19) / 2; + + /* Y axis */ + tgi_line (XOrigin, 10, XOrigin, MaxY-10); + tgi_line (XOrigin-2, 12, XOrigin, 10); + tgi_lineto (XOrigin+2, 12); + + /* X axis */ + tgi_line (XOrigin, YOrigin, MaxX-10, YOrigin); + tgi_line (MaxX-12, YOrigin-2, MaxX-10, YOrigin); + tgi_lineto (MaxX-12, YOrigin+2); + + /* Sine */ + tgi_gotoxy (XOrigin, YOrigin); + for (I = 0; I <= 360; ++I) { + /* Calculate the next points */ + X = (int)(((long)(MaxX - 19) * I) / 360); + Y = (int)(((long)Amp * -_sin (I)) / 256); + + /* Draw the line */ + tgi_lineto (XOrigin + X, YOrigin + Y); + } + + cgetc (); +} + + + +static void DoLines (void) +{ + unsigned X; + const unsigned Min = (MaxX < MaxY) ? MaxX : MaxY; + + tgi_setcolor (COLOR_FORE); + tgi_clear (); + + for (X = 0; X <= Min; X += 10) { + tgi_line (0, 0, Min, X); + tgi_line (0, 0, X, Min); + tgi_line (Min, Min, 0, Min-X); + tgi_line (Min, Min, Min-X, 0); + wait (9); + } + + cgetc (); +} + + + +void main (void) +{ + /* Install the driver */ + tgi_install (tgi_static_stddrv); + tgi_init (); + + /* Get stuff from the driver */ + MaxX = tgi_getmaxx (); + MaxY = tgi_getmaxy (); + AspectRatio = tgi_getaspectratio (); + + /* Do graphics stuff */ + DoCircles (); + DoCheckerboard (); + DoDiagram (); + DoLines (); +} diff --git a/samples/readme.txt b/samples/readme.txt index 506cd5d43..1a5b1c9ff 100644 --- a/samples/readme.txt +++ b/samples/readme.txt @@ -128,7 +128,7 @@ Platforms: Runs on all platforms that have TGI support: ============================================================================= -Platform specific samples follow: +Platform-specific samples follow: atari 2600: ----------- @@ -198,6 +198,27 @@ Name: nachtm Description: Plays "Eine kleine Nachtmusik" by Wolfgang Amadeus Mozart. ----------------------------------------------------------------------------- +lynx: +----- + +These programs are adapted for the Atari Lynx because its library has no conio +output or stdio. + +Name: hello +Description: A nice "Hello world" type program that uses the TGI graphics + library for output. + +Name: mandelbrot +Description: A mandelbrot demo using integer arithmetic. The demo was + written by groepaz, and converted to cc65 using TGI graphics + by Stefan Haubenthal. + +Name: tgidemo +Description: Shows some of the graphics capabilities of the "Tiny Graphics + Interface". + +----------------------------------------------------------------------------- + sym1: ----- From d12c2d68104f6ad5eca9214ebcad9af29e5abc9e Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Sat, 19 Mar 2022 09:09:50 +0200 Subject: [PATCH 048/101] Fix offset for MARIA --- asminc/atari7800_maria.inc | 64 +++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/asminc/atari7800_maria.inc b/asminc/atari7800_maria.inc index a8857812d..39624d21d 100644 --- a/asminc/atari7800_maria.inc +++ b/asminc/atari7800_maria.inc @@ -2,38 +2,38 @@ ; ; Read registers -BKGRND := $00 -P0C1 := $01 -P0C2 := $02 -P0C3 := $03 -MWSYNC := $04 -P1C1 := $05 -P1C2 := $06 -P1C3 := $07 -MSTAT := $08 -P2C1 := $09 -P2C2 := $0A -P2C3 := $0B -DPPH := $0C -P3C1 := $0D -P3C2 := $0E -P3C3 := $0F -DPPL := $10 -P4C1 := $11 -P4C2 := $12 -P4C3 := $13 -CHBASE := $14 -P5C1 := $15 -P5C2 := $16 -P5C3 := $17 -OFFSET := $18 -P6C1 := $19 -P6C2 := $1A -P6C3 := $1B -CTRL := $1C -P7C1 := $1D -P7C2 := $1E -P7C3 := $1F +BKGRND := $20 +P0C1 := $21 +P0C2 := $22 +P0C3 := $23 +MWSYNC := $24 +P1C1 := $25 +P1C2 := $26 +P1C3 := $27 +MSTAT := $28 +P2C1 := $29 +P2C2 := $2A +P2C3 := $2B +DPPH := $2C +P3C1 := $2D +P3C2 := $2E +P3C3 := $2F +DPPL := $30 +P4C1 := $31 +P4C2 := $32 +P4C3 := $33 +CHBASE := $34 +P5C1 := $35 +P5C2 := $36 +P5C3 := $37 +OFFSET := $38 +P6C1 := $39 +P6C2 := $3A +P6C3 := $3B +CTRL := $3C +P7C1 := $3D +P7C2 := $3E +P7C3 := $3F ; Write registers From 79c243ccef527fd71b281b6430b1c524739575ed Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Mon, 21 Mar 2022 08:37:49 +0200 Subject: [PATCH 049/101] Clear hw palette and set AUDIN low at startup --- libsrc/lynx/bootldr.s | 72 ++++++++++++++++++++++++++----------------- 1 file changed, 44 insertions(+), 28 deletions(-) diff --git a/libsrc/lynx/bootldr.s b/libsrc/lynx/bootldr.s index 64569e6ee..58f04afc6 100644 --- a/libsrc/lynx/bootldr.s +++ b/libsrc/lynx/bootldr.s @@ -18,44 +18,60 @@ ; The idea is to make the smalles possible encrypted loader as decryption ; is very slow. The minimum size is 49 bytes plus a zero byte. ;********************************** -; EXE = $fb68 +; EXE = $fb68 ; -; .org $0200 +; .org $0200 ; -; ; 1. force Mikey to be in memory -; stz MAPCTL +; ; 1. force Mikey to be in memory +; 9C F9 FF stz MAPCTL ; -; ; 3. set ComLynx to open collector -; lda #4 ; a = 00000100 -; sta SERCTL ; set the ComLynx to open collector +; ; 2. clear palette +; A0 1F ldy #31 +; A9 00 lda #0 +; 99 A0 FD nextc: sta GCOLMAP, y +; 88 dey +; 10 FA bpl nextc ; -; ; 4. make sure the ROM is powered on -; lda #8 ; a = 00001000 -; sta IODAT ; set the ROM power to on +; ; 3. set ComLynx to open collector +; A9 04 lda #4 ; a = 00000100 +; 8D 8C FD sta SERCTL ; set the ComLynx to open collector ; -; ; 5. read in secondary exe + 8 bytes from the cart and store it in $f000 -; ldx #0 ; x = 0 -; ldy #$97 ; y = secondary loader size (151 bytes) -;rloop1: lda RCART0 ; read a byte from the cart -; sta EXE,X ; EXE[X] = a -; inx ; x++ -; dey ; y-- -; bne rloop1 ; loops until y wraps +; ; 4. set AUDIN to output +; A9 1A lda #$1a ; audin = out, rest = out, +; ; noexp = in, cart addr = out, ext pwd = in +; 8D 8A FD sta IODIR ; -; ; 6. jump to secondary loader -; jmp EXE ; run the secondary loader +; ; 5. set AUDIN to LOW +; A9 0B lda #$0B ; Set AUDIN low +; 85 1A sta $1a ; Save local copy to ZP +; 8D 8B FD sta IODAT ; -; .reloc +; ; 6. read in secondary exe + 8 bytes from the cart +; ; and store it in $f000 +; A2 00 ldx #0 ; x = 0 +; A0 97 ldy #$97 ; y = secondary loader size (151 bytes) +; AD B2 FC rloop1: lda RCART0 ; read a byte from the cart +; 9D 68 FB sta EXE,X ; EXE[X] = a +; E8 inx ; x++ +; 88 dey ; y-- +; D0 F6 bne rloop1 ; loops until y wraps +; +; ; 7. jump to secondary loader +; 4C 68 FB jmp EXE +; 00 00 00 00 ; spares +; 00 ; End of encrypted header mark +; +; .reloc ;********************************** ; After compilation, encryption and obfuscation it turns into this. ;********************************** - .byte $ff, $81, $ca, $33, $be, $80, $a2, $c4 - .byte $6d, $98, $fe, $8d, $bc, $66, $c0, $7a - .byte $09, $50, $23, $28, $18, $c8, $06, $70 - .byte $58, $4f, $1b, $e1, $c7, $90, $08, $cd - .byte $1a, $6e, $5a, $45, $32, $d7, $6d, $c6 - .byte $8a, $e5, $d8, $5c, $a0, $e8, $4f, $7a - .byte $5f, $73, $8d, $22 + .byte $ff, $b6, $bb, $82, $d5, $9f, $48, $cf + .byte $23, $37, $8e, $07, $38, $f5, $b6, $30 + .byte $d6, $2f, $12, $29, $9f, $43, $5b, $2e + .byte $f5, $66, $5c, $db, $93, $1a, $78, $55 + .byte $5e, $c9, $0d, $72, $1b, $e9, $d8, $4d + .byte $2f, $e4, $95, $c0, $4f, $7f, $1b, $66 + .byte $8b, $a7, $fc, $21 ;********************************** ; Now we have the secondary loader From 220171d0da0b6c43933994be264853a7f2a9fd3d Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Tue, 22 Mar 2022 20:02:46 +0200 Subject: [PATCH 050/101] Add irq handling, PAL/NTSC detection and clock() --- libsrc/atari7800/clock.s | 89 ++++++++++++++++++++++++++++++++++++++++ libsrc/atari7800/irq.s | 36 ++++++++++++++++ 2 files changed, 125 insertions(+) create mode 100644 libsrc/atari7800/clock.s create mode 100644 libsrc/atari7800/irq.s diff --git a/libsrc/atari7800/clock.s b/libsrc/atari7800/clock.s new file mode 100644 index 000000000..814defceb --- /dev/null +++ b/libsrc/atari7800/clock.s @@ -0,0 +1,89 @@ +; +; 2022-03-15, Karri Kaksonen +; +; clock_t clock (void); +; clock_t _clocks_per_sec (void); +; + + .export _clock, __clocks_per_sec, clock_count + .interruptor update_clock, 2 ; (low priority) + .constructor init_clock + + .import sreg: zp + .import _zonecounter + .import _paldetected + .include "atari7800.inc" + + .macpack generic + + .code + +;----------------------------------------------------------------------------- +; Read the clock counter. +; + .proc _clock + + lda #0 + sta sreg+1 ; Promote 24 bits up to 32 bits + lda clock_count+2 + sta sreg + ldx clock_count+1 + lda clock_count + + rts + .endproc + +;----------------------------------------------------------------------------- +; Return the number of clock ticks in one second. +; + .proc __clocks_per_sec + + lda #0 + tax + sta sreg ; return 32 bits + sta sreg+1 + lda _paldetected + bne pal + lda #60 ; NTSC - 60Hz + rts +pal: + lda #50 ; PAL - 50Hz + rts + .endproc + +;----------------------------------------------------------------------------- +; This interrupt handler increments a 24-bit counter at every video +; vertical-blanking time. +; Update the clock only on interrupt while the drawing on screen is on +; _zonecounter == 1 (from 1st visible scanline to last visible scanline) +; +update_clock: + lda _zonecounter + and #01 + beq @L1 + inc clock_count + bne @L1 + inc clock_count+1 + bne @L1 + inc clock_count+2 +@L1: ;clc ; General interrupt was not reset + rts + +;----------------------------------------------------------------------------- +; Set time to zero at startup +; + .segment "ONCE" +init_clock: + lda #0 + sta clock_count+2 + sta clock_count+1 + sta clock_count + rts + +;----------------------------------------------------------------------------- +; Store time in 3 bytes +; + .bss +clock_count: + .res 3 + diff --git a/libsrc/atari7800/irq.s b/libsrc/atari7800/irq.s new file mode 100644 index 000000000..ed315a1b7 --- /dev/null +++ b/libsrc/atari7800/irq.s @@ -0,0 +1,36 @@ +; +; IRQ handling (Atari 7800 version) +; + + .export initirq, doneirq, IRQStub + + .import __INTERRUPTOR_COUNT__, callirq + + .include "atari7800.inc" + + .code +; ------------------------------------------------------------------------ + +initirq: +doneirq: + rts + +; ------------------------------------------------------------------------ + +IRQStub: + cld ; Just to be sure + pha + lda #<(__INTERRUPTOR_COUNT__ * 2) + beq @L1 + txa + pha + tya + pha + jsr callirq ; Call the functions + pla + tay + pla + tax +@L1: pla + rti + From d6009721d42036eeb3ffad610c3e8db28307303f Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Tue, 22 Mar 2022 20:02:54 +0200 Subject: [PATCH 051/101] Add irq handling, PAL/NTSC detection and clock() --- libsrc/atari7800/crt0.s | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/libsrc/atari7800/crt0.s b/libsrc/atari7800/crt0.s index 3d53abfa8..bd8a57525 100644 --- a/libsrc/atari7800/crt0.s +++ b/libsrc/atari7800/crt0.s @@ -1,16 +1,17 @@ .export _zonecounter + .export _paldetected .export __STARTUP__ : absolute = 1 .export _exit .import __ROM_START__ .import __RAM3_START__, __RAM3_SIZE__ .import initlib, donelib .import zerobss, copydata + .import IRQStub .import push0, _main + .include "atari7800.inc" .include "zeropage.inc" INPTCTRL = $01 -OFFSET = $38 -CTRL = $3c .segment "STARTUP" start: @@ -38,6 +39,29 @@ start: jsr zerobss jsr initlib + ; Examine machine type as we need the info early +vboff: lda MSTAT + bmi vboff +vbon: lda MSTAT + bpl vbon +vboff2: lda MSTAT + bmi vboff2 + lda #$00 + sta _paldetected + jmp mtsta +count: sta WSYNC + sta WSYNC + dec _paldetected +mtsta: lda MSTAT + bpl count + lda _paldetected + cmp #$78 + bcc mtntsc + lda #$01 + jmp mtpal +mtntsc: lda #$00 +mtpal: sta _paldetected + ; Call main program (pass empty command line) jsr push0 ; argc jsr push0 ; argv @@ -50,7 +74,7 @@ _exit: NMIHandler: inc _zonecounter - rti + jmp IRQStub IRQHandler: rti @@ -58,6 +82,9 @@ IRQHandler: .segment "DATA" _zonecounter: .byte 0 +_paldetected: + .byte 0 ; 0 = NTSC, 1 = PAL + .segment "ENCRYPTION" .res 126, $ff ; Reserved for encryption From c577ec1383e16fa0e178f6b7d1e302ed2eeb7fea Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Tue, 22 Mar 2022 21:16:56 +0200 Subject: [PATCH 052/101] Add more space to init segmen --- cfg/atari7800.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfg/atari7800.cfg b/cfg/atari7800.cfg index 562dd3857..b27353307 100644 --- a/cfg/atari7800.cfg +++ b/cfg/atari7800.cfg @@ -10,7 +10,7 @@ SYMBOLS { __ENCRYPT_BOTTOM__: value = $ff7a, type = export; __ENCRYPT_SIZE__: value = $80, type = export; __MEMORY_TOP__: value = __ENCRYPT_BOTTOM__, type = export; - __INIT_SIZE__: value = 69, type = export; + __INIT_SIZE__: value = 107, type = export; __MEMORY_INIT__: value = __MEMORY_TOP__ - __INIT_SIZE__, type = export; __MEMORY_BOTTOM__: value = $10000 - __CARTSIZE__, type = weak; __FREE_ROM_SIZE__: value = __MEMORY_INIT__ - __MEMORY_BOTTOM__, type = export; From d0d0941a649e392e57fabde0310f2d176ed4224b Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Tue, 22 Mar 2022 21:28:35 +0200 Subject: [PATCH 053/101] Add get_tv.s --- libsrc/atari7800/get_tv.s | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 libsrc/atari7800/get_tv.s diff --git a/libsrc/atari7800/get_tv.s b/libsrc/atari7800/get_tv.s new file mode 100644 index 000000000..307a5c58d --- /dev/null +++ b/libsrc/atari7800/get_tv.s @@ -0,0 +1,26 @@ +; +; Stefan Haubenthal, 2007-01-21 +; +; unsigned char get_tv (void); +; /* Return the video mode the machine is using */ +; + + .include "atari7800.inc" + .include "get_tv.inc" + .importzp tmp1, tmp2 + .import _paldetected + +;-------------------------------------------------------------------------- +; _get_tv + +.proc _get_tv + + lda _paldetected + beq ntsc + lda #TV::PAL + rts +ntsc: + lda #TV::NTSC + rts + +.endproc From 865be55e66af59aab3366618f9f2bb19439e6ea1 Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Tue, 22 Mar 2022 21:29:06 +0200 Subject: [PATCH 054/101] Split clock file to components --- libsrc/atari7800/clock.s | 22 +------------------- libsrc/atari7800/clocks_per_sec.s | 34 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 21 deletions(-) create mode 100644 libsrc/atari7800/clocks_per_sec.s diff --git a/libsrc/atari7800/clock.s b/libsrc/atari7800/clock.s index 814defceb..3b259cfcf 100644 --- a/libsrc/atari7800/clock.s +++ b/libsrc/atari7800/clock.s @@ -2,16 +2,14 @@ ; 2022-03-15, Karri Kaksonen ; ; clock_t clock (void); -; clock_t _clocks_per_sec (void); ; - .export _clock, __clocks_per_sec, clock_count + .export _clock, clock_count .interruptor update_clock, 2 ; (low priority) .constructor init_clock .import sreg: zp .import _zonecounter - .import _paldetected .include "atari7800.inc" .macpack generic @@ -33,24 +31,6 @@ rts .endproc -;----------------------------------------------------------------------------- -; Return the number of clock ticks in one second. -; - .proc __clocks_per_sec - - lda #0 - tax - sta sreg ; return 32 bits - sta sreg+1 - lda _paldetected - bne pal - lda #60 ; NTSC - 60Hz - rts -pal: - lda #50 ; PAL - 50Hz - rts - .endproc - ;----------------------------------------------------------------------------- ; This interrupt handler increments a 24-bit counter at every video ; vertical-blanking time. diff --git a/libsrc/atari7800/clocks_per_sec.s b/libsrc/atari7800/clocks_per_sec.s new file mode 100644 index 000000000..dc09c4396 --- /dev/null +++ b/libsrc/atari7800/clocks_per_sec.s @@ -0,0 +1,34 @@ +; +; 2022-03-15, Karri Kaksonen +; +; clock_t _clocks_per_sec (void); +; + + .export __clocks_per_sec + + .import sreg: zp + .import _paldetected + .include "atari7800.inc" + + .macpack generic + + .code + +;----------------------------------------------------------------------------- +; Return the number of clock ticks in one second. +; + .proc __clocks_per_sec + + lda #0 + tax + sta sreg ; return 32 bits + sta sreg+1 + lda _paldetected + bne pal + lda #60 ; NTSC - 60Hz + rts +pal: + lda #50 ; PAL - 50Hz + rts + .endproc + From 4c3120b93536f1b6020695d7922fc3c797356b65 Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Tue, 22 Mar 2022 21:41:12 +0200 Subject: [PATCH 055/101] Make STARTUP segment larger --- cfg/atari7800.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfg/atari7800.cfg b/cfg/atari7800.cfg index b27353307..4d20ab0d9 100644 --- a/cfg/atari7800.cfg +++ b/cfg/atari7800.cfg @@ -10,7 +10,7 @@ SYMBOLS { __ENCRYPT_BOTTOM__: value = $ff7a, type = export; __ENCRYPT_SIZE__: value = $80, type = export; __MEMORY_TOP__: value = __ENCRYPT_BOTTOM__, type = export; - __INIT_SIZE__: value = 107, type = export; + __INIT_SIZE__: value = 121, type = export; __MEMORY_INIT__: value = __MEMORY_TOP__ - __INIT_SIZE__, type = export; __MEMORY_BOTTOM__: value = $10000 - __CARTSIZE__, type = weak; __FREE_ROM_SIZE__: value = __MEMORY_INIT__ - __MEMORY_BOTTOM__, type = export; From 8d0b0e6ffcad7d6d63ccfc212e230d4cab484fa1 Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Fri, 25 Mar 2022 14:44:54 +0200 Subject: [PATCH 056/101] Separate machine detection from crt0 and put it in get_tv --- libsrc/atari7800/crt0.s | 27 --------------- libsrc/atari7800/get_tv.s | 69 ++++++++++++++++++++++++++++++--------- 2 files changed, 53 insertions(+), 43 deletions(-) diff --git a/libsrc/atari7800/crt0.s b/libsrc/atari7800/crt0.s index bd8a57525..d7cf307ee 100644 --- a/libsrc/atari7800/crt0.s +++ b/libsrc/atari7800/crt0.s @@ -1,5 +1,4 @@ .export _zonecounter - .export _paldetected .export __STARTUP__ : absolute = 1 .export _exit .import __ROM_START__ @@ -39,29 +38,6 @@ start: jsr zerobss jsr initlib - ; Examine machine type as we need the info early -vboff: lda MSTAT - bmi vboff -vbon: lda MSTAT - bpl vbon -vboff2: lda MSTAT - bmi vboff2 - lda #$00 - sta _paldetected - jmp mtsta -count: sta WSYNC - sta WSYNC - dec _paldetected -mtsta: lda MSTAT - bpl count - lda _paldetected - cmp #$78 - bcc mtntsc - lda #$01 - jmp mtpal -mtntsc: lda #$00 -mtpal: sta _paldetected - ; Call main program (pass empty command line) jsr push0 ; argc jsr push0 ; argv @@ -82,9 +58,6 @@ IRQHandler: .segment "DATA" _zonecounter: .byte 0 -_paldetected: - .byte 0 ; 0 = NTSC, 1 = PAL - .segment "ENCRYPTION" .res 126, $ff ; Reserved for encryption diff --git a/libsrc/atari7800/get_tv.s b/libsrc/atari7800/get_tv.s index 307a5c58d..5438b2b95 100644 --- a/libsrc/atari7800/get_tv.s +++ b/libsrc/atari7800/get_tv.s @@ -1,26 +1,63 @@ ; -; Stefan Haubenthal, 2007-01-21 +; Karri Kaksonen, 2022-03-25 ; -; unsigned char get_tv (void); -; /* Return the video mode the machine is using */ +; unsigned char get_tv (void) ; + .include "atari7800.inc" + .export _get_tv - .include "atari7800.inc" - .include "get_tv.inc" - .importzp tmp1, tmp2 - .import _paldetected +.segment "DATA" -;-------------------------------------------------------------------------- -; _get_tv +_paldetected: + .byte $FF -.proc _get_tv +; --------------------------------------------------------------- +; unsigned char get_tv (void) +; --------------------------------------------------------------- - lda _paldetected - beq ntsc - lda #TV::PAL - rts -ntsc: - lda #TV::NTSC +.segment "CODE" + +.proc _get_tv: near + +.segment "CODE" + + ldx #$00 + lda #$FF + cmp _paldetected + bne L8 +L1: lda $0028 + and #$80 + bne L1 +L2: lda $0028 + and #$80 + beq L2 +L3: lda $0028 + and #$80 + bne L3 + lda #$00 + sta M0001 + jmp L5 +L4: sta $0024 + sta $0024 + dec M0001 +L5: lda $0028 + and #$80 + beq L4 + lda M0001 + cmp #$78 + bcc L6 + lda #$00 + jmp L7 +L6: lda #$01 +L7: sta _paldetected + ldx #$00 +L8: lda _paldetected rts +.segment "BSS" + +M0001: + .res 1,$00 + .endproc + From 4a71a1fbb20117b6ad438481d01c228f1943350a Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Fri, 25 Mar 2022 15:02:43 +0200 Subject: [PATCH 057/101] Use proper mnemonics --- libsrc/atari7800/get_tv.s | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/libsrc/atari7800/get_tv.s b/libsrc/atari7800/get_tv.s index 5438b2b95..995b5c652 100644 --- a/libsrc/atari7800/get_tv.s +++ b/libsrc/atari7800/get_tv.s @@ -4,6 +4,7 @@ ; unsigned char get_tv (void) ; .include "atari7800.inc" + .include "get_tv.inc" .export _get_tv .segment "DATA" @@ -25,30 +26,30 @@ _paldetected: lda #$FF cmp _paldetected bne L8 -L1: lda $0028 +L1: lda MSTAT and #$80 bne L1 -L2: lda $0028 +L2: lda MSTAT and #$80 beq L2 -L3: lda $0028 +L3: lda MSTAT and #$80 bne L3 lda #$00 sta M0001 jmp L5 -L4: sta $0024 - sta $0024 +L4: sta MWSYNC + sta MWSYNC dec M0001 -L5: lda $0028 +L5: lda MSTAT and #$80 beq L4 lda M0001 cmp #$78 bcc L6 - lda #$00 + lda #TV::NTSC jmp L7 -L6: lda #$01 +L6: lda #TV::PAL L7: sta _paldetected ldx #$00 L8: lda _paldetected From 5115a1b50f1578fe51b06e66f46d1ec72c364052 Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Fri, 25 Mar 2022 15:08:14 +0200 Subject: [PATCH 058/101] Export paldetected --- libsrc/atari7800/get_tv.s | 1 + 1 file changed, 1 insertion(+) diff --git a/libsrc/atari7800/get_tv.s b/libsrc/atari7800/get_tv.s index 995b5c652..3eb94d54d 100644 --- a/libsrc/atari7800/get_tv.s +++ b/libsrc/atari7800/get_tv.s @@ -6,6 +6,7 @@ .include "atari7800.inc" .include "get_tv.inc" .export _get_tv + .export _paldetected .segment "DATA" From 2c00f1e898e8d7131856f78fcda4a58fd41414a5 Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Thu, 31 Mar 2022 07:44:26 +0300 Subject: [PATCH 059/101] Add atari7800-stdjoy --- libsrc/atari7800/joy/atari7800-stdjoy.s | 164 ++++++++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 libsrc/atari7800/joy/atari7800-stdjoy.s diff --git a/libsrc/atari7800/joy/atari7800-stdjoy.s b/libsrc/atari7800/joy/atari7800-stdjoy.s new file mode 100644 index 000000000..a2bcd4a3a --- /dev/null +++ b/libsrc/atari7800/joy/atari7800-stdjoy.s @@ -0,0 +1,164 @@ +; +; Standard joystick driver for the Atari 7800. +; This version tries to use 7800 and 2600 joysticks. +; But assumes that both joysticks are of same type. +; +; Modified by Karri Kaksonen, 2022-02-27 +; Ullrich von Bassewitz, 2002-12-20 +; Using code from Steve Schmidtke +; + + .include "zeropage.inc" + + .include "joy-kernel.inc" + .include "joy-error.inc" + .include "atari7800.inc" + + .macpack generic + .macpack module + + +; ------------------------------------------------------------------------ +; Header. Includes jump table + + module_header _atari7800_stdjoy_joy + +; Driver signature + + .byte $6A, $6F, $79 ; "joy" + .byte JOY_API_VERSION ; Driver API version number + +; Library reference + + .addr $0000 + +; Jump table. + + .addr INSTALL + .addr UNINSTALL + .addr COUNT + .addr READ + +; ------------------------------------------------------------------------ +; Constants + +JOY_COUNT = 2 ; Number of joysticks we support + +.code + +; ------------------------------------------------------------------------ +; INSTALL routine. Is called after the driver is loaded into memory. If +; possible, check if the hardware is present and determine the amount of +; memory available. +; Must return an JOY_ERR_xx code in a/x. +; + +INSTALL: + ; Assume 7800 2-button controller, can change + ; to 2600 1-button later + lda #$14 + sta CTLSWB ; enable 2-button 7800 controller 1: set pin 6 to output + ldy #$00 + sty SWCHB ; enable 2-button 7800 controller 2: pull pin 6 (INPT4) high + +reset: + lda #<JOY_ERR_OK + ldx #>JOY_ERR_OK +; rts ; Run into UNINSTALL instead + +; ------------------------------------------------------------------------ +; UNINSTALL routine. Is called before the driver is removed from memory. +; Can do cleanup or whatever. Must not return anything. +; + +UNINSTALL: + rts + + +; ------------------------------------------------------------------------ +; COUNT: Return the total number of available joysticks in a/x. +; + +COUNT: + lda #<JOY_COUNT + ldx #>JOY_COUNT + rts + +; ------------------------------------------------------------------------ +; READ: Read a particular joystick passed in A for 2 fire buttons. + +readbuttons: + ; Y has joystick of interest 0/1 + ; return value: + ; $00: no button, + ; $80: left/B button, + ; $40: right/A button, + ; $c0: both buttons + ; preserves X + tya + beq L5 + ; Joystick 1 processing + ; 7800 joystick 1 buttons + ldy #0 ; ........ + bit INPT2 ; Check for right button + bpl L1 + ldy #2 ; ......2. +L1: bit INPT3 ;Check for left button + bpl L2 + iny ; ......21 +L2: tya + bne L4 ; Joystick worked + ; 2600 Joystick 1 + bit INPT5 + bpl L4 +L3: iny ; .......1 + lda #0 ; Fallback to 2600 joystick mode + sta CTLSWB +L4: tya + ror ; .......2 1 + ror ; 1....... 2 + ror ; 21...... + rts + +L5: ; Joystick 0 processing + ; 7800 joystick 0 buttons + ldy #0 ; ........ + bit INPT0 ; Check for right button + bpl L6 + ldy #2 ; ......2. +L6: bit INPT1 ;Check for left button + bpl L7 + iny ; ......21 +L7: tya + bne L4 ; Joystick worked + ; 2600 Joystick 0 + bit INPT4 + bpl L4 + bmi L3 + +READ: + tay ; Store joystick 0/1 in Y + beq L8 + lda SWCHA + rol ; ...RLDU. + rol ; ..RLDU.. + rol ; .RLDU... - joystick 1 + jmp L9 +L8: lda SWCHA ; Read joystick + ror ; .RLDU... - joystick 0 +L9: tax + jsr readbuttons ; A = 21......, X = .RLDU... + rol ; A = 1 .......2 + tay ; Y = .......2 + txa ; A = .RLDU... + ror ; A = 1.RLDU.. + tax ; X = 1.RLDU.. + tya ; A = .......2 + ror ; A = ........ 2 + txa ; A = 1.RLDU.. + rol ; A = .RLDU..2 1 + rol ; A = RLDU..21 + eor #$F0 ; The direction buttons were inversed + and #$F3 + rts + From 67def0ca0d94d1720d1c5c834f14f8dadadbcfbe Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Thu, 31 Mar 2022 08:05:41 +0300 Subject: [PATCH 060/101] Fixed logic flaw --- libsrc/atari7800/joy/atari7800-stdjoy.s | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/libsrc/atari7800/joy/atari7800-stdjoy.s b/libsrc/atari7800/joy/atari7800-stdjoy.s index a2bcd4a3a..ec3806dde 100644 --- a/libsrc/atari7800/joy/atari7800-stdjoy.s +++ b/libsrc/atari7800/joy/atari7800-stdjoy.s @@ -91,9 +91,9 @@ readbuttons: ; Y has joystick of interest 0/1 ; return value: ; $00: no button, - ; $80: left/B button, - ; $40: right/A button, - ; $c0: both buttons + ; $01: left/B button, + ; $02: right/A button, + ; $03: both buttons ; preserves X tya beq L5 @@ -114,10 +114,7 @@ L2: tya L3: iny ; .......1 lda #0 ; Fallback to 2600 joystick mode sta CTLSWB -L4: tya - ror ; .......2 1 - ror ; 1....... 2 - ror ; 21...... +L4: tya ; ......21 rts L5: ; Joystick 0 processing @@ -147,8 +144,8 @@ READ: L8: lda SWCHA ; Read joystick ror ; .RLDU... - joystick 0 L9: tax - jsr readbuttons ; A = 21......, X = .RLDU... - rol ; A = 1 .......2 + jsr readbuttons ; A = ......21, X = .RLDU... + ror ; A = .......2 1 tay ; Y = .......2 txa ; A = .RLDU... ror ; A = 1.RLDU.. From 4e8f62fb96b16e5b6b50eeabd980dfcace156f9a Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Thu, 31 Mar 2022 09:08:40 +0300 Subject: [PATCH 061/101] Add stdjoy driver --- libsrc/atari7800/joy_stat_stddrv.s | 14 ++++++++++++++ libsrc/atari7800/libref.s | 8 ++++++++ 2 files changed, 22 insertions(+) create mode 100644 libsrc/atari7800/joy_stat_stddrv.s create mode 100644 libsrc/atari7800/libref.s diff --git a/libsrc/atari7800/joy_stat_stddrv.s b/libsrc/atari7800/joy_stat_stddrv.s new file mode 100644 index 000000000..eafe0d314 --- /dev/null +++ b/libsrc/atari7800/joy_stat_stddrv.s @@ -0,0 +1,14 @@ +; +; Address of the static standard joystick driver +; +; Oliver Schmidt, 2012-11-01 +; +; const void joy_static_stddrv[]; +; + + .export _joy_static_stddrv + .import _atari7800_stdjoy_joy + +.rodata + +_joy_static_stddrv := _atari7800_stdjoy_joy diff --git a/libsrc/atari7800/libref.s b/libsrc/atari7800/libref.s new file mode 100644 index 000000000..e4afa7eb1 --- /dev/null +++ b/libsrc/atari7800/libref.s @@ -0,0 +1,8 @@ +; +; Oliver Schmidt, 2013-05-31 +; + + .export joy_libref + .import _exit + +joy_libref := _exit From e4193451d4d4f8a58f2fcaeb5b1e394a8719e677 Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Thu, 31 Mar 2022 09:09:11 +0300 Subject: [PATCH 062/101] Add comments --- libsrc/atari7800/joy/atari7800-stdjoy.s | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libsrc/atari7800/joy/atari7800-stdjoy.s b/libsrc/atari7800/joy/atari7800-stdjoy.s index ec3806dde..1ad7bff0d 100644 --- a/libsrc/atari7800/joy/atari7800-stdjoy.s +++ b/libsrc/atari7800/joy/atari7800-stdjoy.s @@ -3,7 +3,7 @@ ; This version tries to use 7800 and 2600 joysticks. ; But assumes that both joysticks are of same type. ; -; Modified by Karri Kaksonen, 2022-02-27 +; Modified by Karri Kaksonen, 2022-03-31 ; Ullrich von Bassewitz, 2002-12-20 ; Using code from Steve Schmidtke ; @@ -107,7 +107,7 @@ L1: bit INPT3 ;Check for left button bpl L2 iny ; ......21 L2: tya - bne L4 ; Joystick worked + bne L4 ; 7800 mode joystick worked ; 2600 Joystick 1 bit INPT5 bpl L4 @@ -127,7 +127,7 @@ L6: bit INPT1 ;Check for left button bpl L7 iny ; ......21 L7: tya - bne L4 ; Joystick worked + bne L4 ; 7800 mode joystick worked ; 2600 Joystick 0 bit INPT4 bpl L4 @@ -136,12 +136,12 @@ L7: tya READ: tay ; Store joystick 0/1 in Y beq L8 - lda SWCHA + lda SWCHA ; Read directions of joystick 1 rol ; ...RLDU. rol ; ..RLDU.. rol ; .RLDU... - joystick 1 jmp L9 -L8: lda SWCHA ; Read joystick +L8: lda SWCHA ; Read directions of joystick 0 ror ; .RLDU... - joystick 0 L9: tax jsr readbuttons ; A = ......21, X = .RLDU... From 26ab64f207774215ac97a52ecd52e050f214f5fe Mon Sep 17 00:00:00 2001 From: Karri Kaksonen <karri@sipo.fi> Date: Thu, 31 Mar 2022 11:04:10 +0300 Subject: [PATCH 063/101] Change polarity for 2600 buttons --- libsrc/atari7800/joy/atari7800-stdjoy.s | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libsrc/atari7800/joy/atari7800-stdjoy.s b/libsrc/atari7800/joy/atari7800-stdjoy.s index 1ad7bff0d..00bb57dcf 100644 --- a/libsrc/atari7800/joy/atari7800-stdjoy.s +++ b/libsrc/atari7800/joy/atari7800-stdjoy.s @@ -110,7 +110,7 @@ L2: tya bne L4 ; 7800 mode joystick worked ; 2600 Joystick 1 bit INPT5 - bpl L4 + bmi L4 L3: iny ; .......1 lda #0 ; Fallback to 2600 joystick mode sta CTLSWB @@ -130,8 +130,8 @@ L7: tya bne L4 ; 7800 mode joystick worked ; 2600 Joystick 0 bit INPT4 - bpl L4 - bmi L3 + bmi L4 + bpl L3 READ: tay ; Store joystick 0/1 in Y From 426e93b4bfcfffff4cffcfbb0c14d80668b8130b Mon Sep 17 00:00:00 2001 From: Fabrizio Caruso <fabrizio_caruso@hotmail.com> Date: Sat, 2 Apr 2022 12:44:27 +0200 Subject: [PATCH 064/101] Fix Gamate CONIO: non-solid characters bug --- libsrc/gamate/cputc.s | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/libsrc/gamate/cputc.s b/libsrc/gamate/cputc.s index 84742cb9d..435bebfad 100644 --- a/libsrc/gamate/cputc.s +++ b/libsrc/gamate/cputc.s @@ -89,28 +89,32 @@ putchar: adc #>(fontdata-$f8) sta ptr3+1 - lda CHARCOLOR - and #1 - beq @skip_plane1 - lda #LCD_XPOS_PLANE1 clc adc CURS_X sta LCD_X - ldy #$f8 + lda CHARCOLOR + and #1 + beq @delete1 + + ldy #$F8 @copylp1: lda (ptr3),y eor RVS sta LCD_DATA iny bne @copylp1 + + beq @skip_delete1 -@skip_plane1: +@delete1: + lda #$00 + sta LCD_DATA + iny + bne @delete1 - lda CHARCOLOR - and #2 - beq @skip_plane2 +@skip_delete1: lda #LCD_XPOS_PLANE2 clc @@ -120,16 +124,29 @@ putchar: ldx CURS_Y lda _plotlo,x sta LCD_Y + + lda CHARCOLOR + and #2 + beq @delete2 + + ldy #$F8 - ldy #$f8 @copylp2: lda (ptr3),y eor RVS sta LCD_DATA iny bne @copylp2 + + beq @skip_delete2 + +@delete2: + lda #$00 + sta LCD_DATA + iny + bne @delete2 -@skip_plane2: +@skip_delete2: pla tax ldy CURS_X From 885b360a41e56b056372acadfdd517ede327338e Mon Sep 17 00:00:00 2001 From: Fabrizio Caruso <fabrizio_caruso@hotmail.com> Date: Sat, 2 Apr 2022 23:09:05 +0200 Subject: [PATCH 065/101] Fix color 1 and 2 (grey/green levels) --- libsrc/gamate/cputc.s | 7 ++++--- util/atari/ataricvt.exe | Bin 0 -> 65526 bytes util/gamate/gamate-fixcart.exe | Bin 0 -> 67781 bytes 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100755 util/atari/ataricvt.exe create mode 100755 util/gamate/gamate-fixcart.exe diff --git a/libsrc/gamate/cputc.s b/libsrc/gamate/cputc.s index 435bebfad..7f407ea00 100644 --- a/libsrc/gamate/cputc.s +++ b/libsrc/gamate/cputc.s @@ -94,11 +94,12 @@ putchar: adc CURS_X sta LCD_X + ldy #$F8 + lda CHARCOLOR and #1 beq @delete1 - ldy #$F8 @copylp1: lda (ptr3),y eor RVS @@ -125,11 +126,11 @@ putchar: lda _plotlo,x sta LCD_Y + ldy #$F8 + lda CHARCOLOR and #2 beq @delete2 - - ldy #$F8 @copylp2: lda (ptr3),y diff --git a/util/atari/ataricvt.exe b/util/atari/ataricvt.exe new file mode 100755 index 0000000000000000000000000000000000000000..78c628e3e6d1719bbbcbe18871bc5b58da420604 GIT binary patch literal 65526 zcmeHw3t(Kub@tqSUg^quS+Zqp<CT%Yfc0L<GT5+sOQ2WuFouMzSJFxrmL+9(<p<Ej z#gO0viPMmVB>oc!<PS+mOIw<fM;kXUCk^dS(=>h27V;-8B(xzdq$K$h|KB%rpSzM} z2&7HJmG0e{GiT1soO9-JXU@#+zwU(a3n2oy&zuqBQT+0X$>-T0M-g1O>C=Vck-R^v zd{pcEv&zwZGwH}eYJNJEI1rgg%+1YbBIC(OYH=<yGZ*O?9Elv5pG?-QT9sdAk{;?5 zqE9Opm%XohTzpxG-|`9Zq_|KsG~X7X11W+VFi~vY^fPz#1I~PFxcMuuqwvA=#vK~V zbyN}{E+fca`$wXS1tEq=|ELg8+eB25e4Y^E2|8jzY><F+d)!I7XF;vWBoAj0es>s; zV%#iiR{DE|*jqE1$RrRH!)^1TfF9?H32~|>r4S!uS?X|;Rv~WJ6$6=?@x__h$(hL} z!T}J(FU9S;VhE{?DnJjFg9RbIG6l1qF-b3-roWg%*h^RLb(Hy=QTda+UH}g1Rd{h@ zvK;Bu1i(@jN8t$J&SHE_;w5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(K<N^cBCnS9EdHy>{bGGXKKDCD|?DJ3$83m zwJ={8ZFVl0qZkZ6XXe2A`Lu`UGY1mW$v8L7OA#m%^XZwx@dHVWZSb*jP)a8!G8B^Z zAHeYh#O(vKO*L0Mm2tC`Ujn@f-rG8A<;m1doCTIl;j8GmT86%8c`aLBB6g*;)WrRb zCM8)bM6q$g%8{vr6AoLm4p)p*LGZOmJoh8h$yvA)5D@!9sG~O_PvwPn<P;FYis7qA zGCS-O7?&-rVpYA_l&aLAXp?6BmH|tVUzVV1Ma*}Sc$|w>9s%3hXtpLC7o1~W6=`#5 zY&AfxhKh-@8OYH^G;8b)?7FK6nePQ)FIC5B8kKG_0&98<J*L86vc`KGVHMTe6nm<# zyUkK6l5wRR?`5@VL#<)$up2X~ouq8Ok6FGW)7%_lYdO?}ZM>s_Djdg@fG_ez&Wt#% zUdM99dgxrWMrB7%?69p&&&T&!9d+*DMKyw^Y*fSGZl2X)C-JG-#I))vr1~vU8^8rQ zd*Rg<K;6{=r3XZ{Ne&0y>2b`RLqbK!&72&z=3q-<WHnSddX1jU8*%w6vwVxA`T!Sg T_vr5|?RUmj1HKw~^CA8}rG&Fa literal 0 HcmV?d00001 diff --git a/util/gamate/gamate-fixcart.exe b/util/gamate/gamate-fixcart.exe new file mode 100755 index 0000000000000000000000000000000000000000..8d9d698683a9c262e463f92af677e136e301b674 GIT binary patch literal 67781 zcmeIb3t$~bbvHhHpDV4bmnB<{?fBY}6DP4`J+2;3?BvRNC$c2;aGXF`UrAT8uq+8( z$&ZkNixY@z9;O5uAccgae*y%WmJ|Y{#U%mrNL!btke0MfXlNbC_hD#~h5+^V`_1h0 zUdfgr;olZk+Pynx&YU@O&Y8!~oSof%!!Z#QLWFRhIU~eF_~nt1*Rx*^Av%A}7xKk} zIe)eGA+77L)(-3*PsgTbrp9KHdt<}N$;qkN*ib4qGdCF<pNzHi^vCv2jif4<EXggm zNcXl1(WMoND?ZphB)%rZ>3|SViHkKu3#=EpKw5_rFi~ioG5nG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^T33s@Cq_M4@3<x zkY?l{78%Dm_&aFIEnY^HxxuRV&W14CQ?uKrM&>3`%0!!#PBN4(+beT7Mu(<a&H_7F z2JmDoWv-rwkn6(sU>TKZi(of)IB~^j=?*;g&P)wAjf_AxY3d^j;wUq-$v{OKovO^> zRS9a^!><jo1%;&}2!1N<llb^vyf<fZ8y2YmSw_n+<$cCxwWgU)4bM_t$%*l?$-UV8 zhUvPdk|UPEE9uI#nbklEP!78+DfsQavuVH@HrghOM~BqRWO5?g_|QcyY<vsr#;L2e zP`sZ5R0_9al=y~ijx5_8b_JXz8rTg!OpNOuFrAvfeG;l-7YTduXJlgNEB8=9l&^lH z?qwAgqm#aC`)4;h8~-j?a#ho-t=3lM4D%bY<S8SNqf!J|7@jY$1*xla)-#@IatYjL z29Cj6tq;c$i)37pwub+<_B{<7Gi9@pWxZ$y*?Ty3T@kXLk5E+Fl-rcbg3APK84_q4 z>@s=uA(2oUv)c@RGp?j)4b~h&zP4SVs0S8Q9jjrL4T85xRHioTVbttoz1)Us2^QV9 zlIAOET93N6D&?cF9d&RF+jYS3tf~XsV}IhBwTj0!Tac-IV9wMVMzQCmHuWfuPrcjh zaJG&Ob9&0$ZI24FM@p*2wG^w`A#Y!xcIz@nCz4~TUy=oP#4XKwo*IXY<y4cu1b}+0 z8H53dY7kxNdUNL^K^6&>Ae&V=V$Q;r{ARR_nWAPV>QA_E?OV82Q$3D{ws+upmfm94 Mu?jx9`1uh34=rG${{R30 literal 0 HcmV?d00001 From 2414a832d71630fd5fef3fea51daebcf0ac6c99c Mon Sep 17 00:00:00 2001 From: Fabrizio Caruso <fabrizio_caruso@hotmail.com> Date: Sat, 2 Apr 2022 23:47:36 +0200 Subject: [PATCH 066/101] Make the intermediate gray/green levels available --- include/gamate.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/gamate.h b/include/gamate.h index 8b9790e39..bc6de3f98 100644 --- a/include/gamate.h +++ b/include/gamate.h @@ -145,6 +145,8 @@ /* constants for the conio implementation */ #define COLOR_BLACK 0x03 +#define COLOR_GRAY2 0x02 +#define COLOR_GRAY1 0x01 #define COLOR_WHITE 0x00 #define CH_HLINE 1 From b7ba02d76fc27ec287eedb8c173e2b91cf9adf7b Mon Sep 17 00:00:00 2001 From: Fabrizio Caruso <fabrizio_caruso@hotmail.com> Date: Sat, 2 Apr 2022 23:58:35 +0200 Subject: [PATCH 067/101] Remove executables --- util/atari/ataricvt.exe | Bin 65526 -> 0 bytes util/gamate/gamate-fixcart.exe | Bin 67781 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100755 util/atari/ataricvt.exe delete mode 100755 util/gamate/gamate-fixcart.exe diff --git a/util/atari/ataricvt.exe b/util/atari/ataricvt.exe deleted file mode 100755 index 78c628e3e6d1719bbbcbe18871bc5b58da420604..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 65526 zcmeHw3t(Kub@tqSUg^quS+Zqp<CT%Yfc0L<GT5+sOQ2WuFouMzSJFxrmL+9(<p<Ej z#gO0viPMmVB>oc!<PS+mOIw<fM;kXUCk^dS(=>h27V;-8B(xzdq$K$h|KB%rpSzM} z2&7HJmG0e{GiT1soO9-JXU@#+zwU(a3n2oy&zuqBQT+0X$>-T0M-g1O>C=Vck-R^v zd{pcEv&zwZGwH}eYJNJEI1rgg%+1YbBIC(OYH=<yGZ*O?9Elv5pG?-QT9sdAk{;?5 zqE9Opm%XohTzpxG-|`9Zq_|KsG~X7X11W+VFi~vY^fPz#1I~PFxcMuuqwvA=#vK~V zbyN}{E+fca`$wXS1tEq=|ELg8+eB25e4Y^E2|8jzY><F+d)!I7XF;vWBoAj0es>s; zV%#iiR{DE|*jqE1$RrRH!)^1TfF9?H32~|>r4S!uS?X|;Rv~WJ6$6=?@x__h$(hL} z!T}J(FU9S;VhE{?DnJjFg9RbIG6l1qF-b3-roWg%*h^RLb(Hy=QTda+UH}g1Rd{h@ zvK;Bu1i(@jN8t$J&SHE_;w5M2fhc8j0yr$kX56kTC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bGGXKKDCD|?DJ3$83m zwJ={8ZFVl0qZkZ6XXe2A`Lu`UGY1mW$v8L7OA#m%^XZwx@dHVWZSb*jP)a8!G8B^Z zAHeYh#O(vKO*L0Mm2tC`Ujn@f-rG8A<;m1doCTIl;j8GmT86%8c`aLBB6g*;)WrRb zCM8)bM6q$g%8{vr6AoLm4p)p*LGZOmJoh8h$yvA)5D@!9sG~O_PvwPn<P;FYis7qA zGCS-O7?&-rVpYA_l&aLAXp?6BmH|tVUzVV1Ma*}Sc$|w>9s%3hXtpLC7o1~W6=`#5 zY&AfxhKh-@8OYH^G;8b)?7FK6nePQ)FIC5B8kKG_0&98<J*L86vc`KGVHMTe6nm<# zyUkK6l5wRR?`5@VL#<)$up2X~ouq8Ok6FGW)7%_lYdO?}ZM>s_Djdg@fG_ez&Wt#% zUdM99dgxrWMrB7%?69p&&&T&!9d+*DMKyw^Y*fSGZl2X)C-JG-#I))vr1~vU8^8rQ zd*Rg<K;6{=r3XZ{Ne&0y>2b`RLqbK!&72&z=3q-<WHnSddX1jU8*%w6vwVxA`T!Sg T_vr5|?RUmj1HKw~^CA8}rG&Fa diff --git a/util/gamate/gamate-fixcart.exe b/util/gamate/gamate-fixcart.exe deleted file mode 100755 index 8d9d698683a9c262e463f92af677e136e301b674..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 67781 zcmeIb3t$~bbvHhHpDV4bmnB<{?fBY}6DP4`J+2;3?BvRNC$c2;aGXF`UrAT8uq+8( z$&ZkNixY@z9;O5uAccgae*y%WmJ|Y{#U%mrNL!btke0MfXlNbC_hD#~h5+^V`_1h0 zUdfgr;olZk+Pynx&YU@O&Y8!~oSof%!!Z#QLWFRhIU~eF_~nt1*Rx*^Av%A}7xKk} zIe)eGA+77L)(-3*PsgTbrp9KHdt<}N$;qkN*ib4qGdCF<pNzHi^vCv2jif4<EXggm zNcXl1(WMoND?ZphB)%rZ>3|SViHkKu3#=EpKw5_rFi~ioG5nG{h5;wv8czPo;}Aj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zkY?l{78%Dm_&aFIEnY^HxxuRV&W14CQ?uKrM&>3`%0!!#PBN4(+beT7Mu(<a&H_7F z2JmDoWv-rwkn6(sU>TKZi(of)IB~^j=?*;g&P)wAjf_AxY3d^j;wUq-$v{OKovO^> zRS9a^!><jo1%;&}2!1N<llb^vyf<fZ8y2YmSw_n+<$cCxwWgU)4bM_t$%*l?$-UV8 zhUvPdk|UPEE9uI#nbklEP!78+DfsQavuVH@HrghOM~BqRWO5?g_|QcyY<vsr#;L2e zP`sZ5R0_9al=y~ijx5_8b_JXz8rTg!OpNOuFrAvfeG;l-7YTduXJlgNEB8=9l&^lH z?qwAgqm#aC`)4;h8~-j?a#ho-t=3lM4D%bY<S8SNqf!J|7@jY$1*xla)-#@IatYjL z29Cj6tq;c$i)37pwub+<_B{<7Gi9@pWxZ$y*?Ty3T@kXLk5E+Fl-rcbg3APK84_q4 z>@s=uA(2oUv)c@RGp?j)4b~h&zP4SVs0S8Q9jjrL4T85xRHioTVbttoz1)Us2^QV9 zlIAOET93N6D&?cF9d&RF+jYS3tf~XsV}IhBwTj0!Tac-IV9wMVMzQCmHuWfuPrcjh zaJG&Ob9&0$ZI24FM@p*2wG^w`A#Y!xcIz@nCz4~TUy=oP#4XKwo*IXY<y4cu1b}+0 z8H53dY7kxNdUNL^K^6&>Ae&V=V$Q;r{ARR_nWAPV>QA_E?OV82Q$3D{ws+upmfm94 Mu?jx9`1uh34=rG${{R30 From 4121c64295fcf8943171b8eddf4e550c2d19cf86 Mon Sep 17 00:00:00 2001 From: Fabrizio Caruso <fabrizio_caruso@hotmail.com> Date: Sun, 3 Apr 2022 00:02:00 +0200 Subject: [PATCH 068/101] Ignore executables in util directory --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index ad4d26c3f..9112484b8 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,6 @@ /testwrk/ /wrk/ /cc65.zip +/util/atari/*.exe +/util/gamate/*.exe + From 91a5eb3770e3c8efc6600ad3e3ec28f50d83a9bb Mon Sep 17 00:00:00 2001 From: polluks2 <74630735+polluks2@users.noreply.github.com> Date: Sun, 3 Apr 2022 08:21:31 +0200 Subject: [PATCH 069/101] Fixed documentation typo --- doc/intro.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/intro.sgml b/doc/intro.sgml index 5d1889d76..4713de136 100644 --- a/doc/intro.sgml +++ b/doc/intro.sgml @@ -500,7 +500,7 @@ prompt. Before you can run the cartridge image produced by the linker, the binary has to be patched using the <bf/gamate-fixcart/ tool that is included in the cc65 -package in the util/gamata directory. +package in the util/gamate/ directory. <tscreen><verb> gamate-fixcart <image.bin> From b65084b459bd3116b18fe1776d421461f31e9480 Mon Sep 17 00:00:00 2001 From: Fabrizio Caruso <fabrizio_caruso@hotmail.com> Date: Sun, 3 Apr 2022 15:28:37 +0200 Subject: [PATCH 070/101] Use lsr --- libsrc/gamate/cputc.s | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsrc/gamate/cputc.s b/libsrc/gamate/cputc.s index 7f407ea00..b972535c5 100644 --- a/libsrc/gamate/cputc.s +++ b/libsrc/gamate/cputc.s @@ -97,8 +97,8 @@ putchar: ldy #$F8 lda CHARCOLOR - and #1 - beq @delete1 + lsr + bcc @delete1 @copylp1: lda (ptr3),y From 412fd70404e00947c035bfd00c74d72a3ba1a179 Mon Sep 17 00:00:00 2001 From: Fabrizio Caruso <fabrizio_caruso@hotmail.com> Date: Sun, 3 Apr 2022 17:23:36 +0200 Subject: [PATCH 071/101] Optimize delete cycles --- libsrc/gamate/cputc.s | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libsrc/gamate/cputc.s b/libsrc/gamate/cputc.s index b972535c5..d80e8b41a 100644 --- a/libsrc/gamate/cputc.s +++ b/libsrc/gamate/cputc.s @@ -111,9 +111,10 @@ putchar: @delete1: lda #$00 +@del1: sta LCD_DATA iny - bne @delete1 + bne @del1 @skip_delete1: @@ -143,9 +144,10 @@ putchar: @delete2: lda #$00 +@del2: sta LCD_DATA iny - bne @delete2 + bne @del2 @skip_delete2: pla From f74ce463b2cda253568b48ea6f23c5469984652b Mon Sep 17 00:00:00 2001 From: mrdudz <mrdudz@users.noreply.github.com> Date: Sat, 16 Apr 2022 15:24:41 +0200 Subject: [PATCH 072/101] add gitignores --- util/.gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 util/.gitignore diff --git a/util/.gitignore b/util/.gitignore new file mode 100644 index 000000000..4da436acb --- /dev/null +++ b/util/.gitignore @@ -0,0 +1,3 @@ +/atari/ataricvt +/gamate/gamate-fixcart +/zlib/deflater From e385ec1b5ed4c32b97111ca74e072a67ba838263 Mon Sep 17 00:00:00 2001 From: Bob Andrews <mrdudz@users.noreply.github.com> Date: Sat, 16 Apr 2022 16:17:50 +0200 Subject: [PATCH 073/101] Create Contributing.md Starting to move info hidden elsewhere into this file --- Contributing.md | 89 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 Contributing.md diff --git a/Contributing.md b/Contributing.md new file mode 100644 index 000000000..1aeae7786 --- /dev/null +++ b/Contributing.md @@ -0,0 +1,89 @@ +This document contains all kinds of information that you should know if you want to contribute to the cc65 project. Before you start, please read all of it. If something is not clear to you, please ask - this document is an ongoing effort and may well be incomplete. + +(''Note:'' The word "must" indicates a requirement. The word "should" indicates a recomendation.) + +# generally + +* You must obey these rules when contributing new code or documentation to cc65. We are well aware that not all existing code may respect all rules outlined here - but this is no reason for you not to respect them. +* One commit/patch/PR per issue. Do not mix several things unless they are very closely related. + +# Codestyle rules + +## All Sources + +* TAB characters must be expanded to spaces. +* All text files must end with new-line characters. Don't leave the last line "dangling". +* 80 characters is the desired maximum width of files. But, it isn't a "strong" rule; sometimes, you will want to type longer lines, in order to keep the parts of expressions or comments together on the same line. +* You should avoid typing non-ASCII characters. +* If you change "normal" source code into comments, then you must add a comment about why that code is a comment. +* When you want to create a comment from several lines of code, you should use preprocessor lines, instead of ```/* */``` or "```;```". Example: +<pre> +#if 0 + one (); + two (); + three = two () + one (); +#endif +</pre> +* You should type upper case characters for hex values. +* When you type zero-page addresses in hexadecimal, you should type two hex characters (after the hex prefix). When you type non-zero-page addresses in hex, you should type four hex characters. +* When you type lists of addresses, it is a good idea to sort them in ascending numerical order. That makes it easier for readers to build mental pictures of where things are in an address space. And, it is easier to see how big the variables and buffers are. Example: +<pre> +xCoord := $0703 +yCoord := $0705 ; (this address implies that xCoord is 16 bits) +cmdbuf := $0706 ; (this address implies that yCoord is 8 bits) +cmdlen := $0786 ; (this address implies that cmdbuf is 128 bytes) +color := $0787 +</pre> + +## C Sources + +* Your files should obey the C89 standard. +* All declarations in a block must be at the beginning of that block. +* You should put a blank line between a list of local variable declarations and the first line of code. +* You must use ANSI C comments (```/* */```); you must not use C++ comments (```//```). +* The normal indentation width should be four spaces. +* When a function's argument list wraps around to a next line, you should indent that next line by either the normal width or enough spaces to align it with the arguments on the previous line. +* When you add functions to an existing file, you should separate them by the same number of blank lines that separate the functions that already are in that file. + +(The next two rules will be changed at some time in the future; but, for now:) + +* You must separate function names and parameter/argument lists by one space. +* When declaring/defining pointers, you must put the asterisk (```*```) next to the data type, with a space between it and the variable's name. Examples: +<pre> + int* namedPtr[5]; + char* nextLine (FILE* f); +</pre> + +## Assembly Sources + +* Op-code mnemonics must have lower-case letters. The names of instruction macroes may have upper-case letters. +* Hexadecimal number constants should be used except where decimal or binary numbers make much more sense in that constant's context. +* Hexadecimal letters should be upper-case. +* When you set two registers or two memory locations to an immediate 16-bit zero, you should use the expressions ```#<$0000``` and ```#>$0000``` (they make it obvious where you are putting the lower and upper bytes). +* If a function is declared to return a char-sized value, it actually must return an integer-sized value. (When cc65 promotes a returned value, it sometimes assumes that the value already is an integer.) +* Functions, that are intended for a platform's system library, should be optimized as much as possible. +* Sometimes, there must be a trade-off between size and speed. If you think that a library function won't be used often, then you should make it small. Otherwise, you should make it fast. +* Comments that are put on the right side of instructions must be aligned (start in the same character columns). +* Assembly source fields (label, operation, operand, comment) should start ''after'' character columns that are multiples of eight (such as 1, 9, 17, 33, and 41). + +## LinuxDoc Sources + +* TAB characters must be expanded to spaces. +* All text files must end with new-line characters. Don't leave the last line "dangling". +* 80 characters is the desired maximum width of files. +* You should avoid typing non-ASCII characters. + +* You should put blank lines between LinuxDoc sections: + * Three blank lines between ```<sect>``` sections. + * Two blank lines between ```<sect1>``` sections. + * One blank line between other sections. + +# Documentation rules + +## User manual (LinuxDoc) + +* This is the primary documentation. + +## Wiki + +* The Wiki is strictly for additional information that does not fit into the regular user manual (LinuxDoc). The wiki must not duplicate any information that is present in the user manual From 72e548fa84af596ecc268f658d5f5152ecc38b7c Mon Sep 17 00:00:00 2001 From: Bob Andrews <mrdudz@users.noreply.github.com> Date: Sat, 16 Apr 2022 16:20:48 +0200 Subject: [PATCH 074/101] Update README.md link Contributing.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 009fca78b..fa23b1be2 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,9 @@ [Documentation](https://cc65.github.io/doc) -[Wiki](https://github.com/cc65/wiki/wiki) +[Contributing](Contributing.md) to the CC65 project. + +The [Wiki](https://github.com/cc65/wiki/wiki) contains extra info that does not fit into the regular documentation. [![Snapshot Build](https://github.com/cc65/cc65/actions/workflows/snapshot-on-push-master.yml/badge.svg?branch=master)](https://github.com/cc65/cc65/actions/workflows/snapshot-on-push-master.yml) From 3dd9ed0414a3fcfc695a70dad14f6f0499dfcb3b Mon Sep 17 00:00:00 2001 From: mrdudz <mrdudz@users.noreply.github.com> Date: Sat, 16 Apr 2022 17:36:25 +0200 Subject: [PATCH 075/101] remove literal TABs --- doc/using-make.sgml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/using-make.sgml b/doc/using-make.sgml index e324b7484..9898e9626 100644 --- a/doc/using-make.sgml +++ b/doc/using-make.sgml @@ -76,13 +76,13 @@ ifneq ($(MAKECMDGOALS),clean) endif %.o: %.c - $(CC) -c $(CFLAGS) -o $@ $< + $(CC) -c $(CFLAGS) -o $@ $< $(PROGRAM): $(SOURCES:.c=.o) - $(CC) $(LDFLAGS) -o $@ $^ + $(CC) $(LDFLAGS) -o $@ $^ clean: - $(RM) $(SOURCES:.c=.o) $(SOURCES:.c=.d) $(PROGRAM) $(PROGRAM).map + $(RM) $(SOURCES:.c=.o) $(SOURCES:.c=.d) $(PROGRAM) $(PROGRAM).map </verb></tscreen> <bf/Important:/ When using the sample Makefile above via copy & paste it is From 2eb20b3e8a707f22b168f74eccad7c9e28bea392 Mon Sep 17 00:00:00 2001 From: mrdudz <mrdudz@users.noreply.github.com> Date: Sat, 16 Apr 2022 18:16:14 +0200 Subject: [PATCH 076/101] remove a bunch of TABs --- libsrc/atari7800/clock.s | 18 ++-- libsrc/atari7800/clocks_per_sec.s | 14 +-- libsrc/atari7800/crt0.s | 24 ++--- libsrc/atari7800/exehdr.s | 34 +++--- libsrc/atari7800/get_tv.s | 86 +++++++-------- libsrc/atari7800/irq.s | 6 +- libsrc/atari7800/joy/atari7800-stdjoy.s | 134 ++++++++++++------------ libsrc/lynx/bootldr.s | 2 +- samples/sym1/symNotepad.c | 26 ++--- test/val/bug1696.c | 20 ++-- 10 files changed, 182 insertions(+), 182 deletions(-) diff --git a/libsrc/atari7800/clock.s b/libsrc/atari7800/clock.s index 3b259cfcf..03ae1e970 100644 --- a/libsrc/atari7800/clock.s +++ b/libsrc/atari7800/clock.s @@ -9,12 +9,12 @@ .constructor init_clock .import sreg: zp - .import _zonecounter + .import _zonecounter .include "atari7800.inc" .macpack generic - .code + .code ;----------------------------------------------------------------------------- ; Read the clock counter. @@ -38,9 +38,9 @@ ; _zonecounter == 1 (from 1st visible scanline to last visible scanline) ; update_clock: - lda _zonecounter - and #01 - beq @L1 + lda _zonecounter + and #01 + beq @L1 inc clock_count bne @L1 inc clock_count+1 @@ -54,10 +54,10 @@ update_clock: ; .segment "ONCE" init_clock: - lda #0 - sta clock_count+2 - sta clock_count+1 - sta clock_count + lda #0 + sta clock_count+2 + sta clock_count+1 + sta clock_count rts ;----------------------------------------------------------------------------- diff --git a/libsrc/atari7800/clocks_per_sec.s b/libsrc/atari7800/clocks_per_sec.s index dc09c4396..e2c7d9d8d 100644 --- a/libsrc/atari7800/clocks_per_sec.s +++ b/libsrc/atari7800/clocks_per_sec.s @@ -7,12 +7,12 @@ .export __clocks_per_sec .import sreg: zp - .import _paldetected + .import _paldetected .include "atari7800.inc" .macpack generic - .code + .code ;----------------------------------------------------------------------------- ; Return the number of clock ticks in one second. @@ -20,15 +20,15 @@ .proc __clocks_per_sec lda #0 - tax + tax sta sreg ; return 32 bits sta sreg+1 lda _paldetected - bne pal - lda #60 ; NTSC - 60Hz - rts + bne pal + lda #60 ; NTSC - 60Hz + rts pal: - lda #50 ; PAL - 50Hz + lda #50 ; PAL - 50Hz rts .endproc diff --git a/libsrc/atari7800/crt0.s b/libsrc/atari7800/crt0.s index d7cf307ee..cefe16730 100644 --- a/libsrc/atari7800/crt0.s +++ b/libsrc/atari7800/crt0.s @@ -1,14 +1,14 @@ - .export _zonecounter - .export __STARTUP__ : absolute = 1 - .export _exit - .import __ROM_START__ - .import __RAM3_START__, __RAM3_SIZE__ - .import initlib, donelib - .import zerobss, copydata - .import IRQStub - .import push0, _main - .include "atari7800.inc" - .include "zeropage.inc" + .export _zonecounter + .export __STARTUP__ : absolute = 1 + .export _exit + .import __ROM_START__ + .import __RAM3_START__, __RAM3_SIZE__ + .import initlib, donelib + .import zerobss, copydata + .import IRQStub + .import push0, _main + .include "atari7800.inc" + .include "zeropage.inc" INPTCTRL = $01 @@ -50,7 +50,7 @@ _exit: NMIHandler: inc _zonecounter - jmp IRQStub + jmp IRQStub IRQHandler: rti diff --git a/libsrc/atari7800/exehdr.s b/libsrc/atari7800/exehdr.s index 618164cd4..99e62e3d6 100644 --- a/libsrc/atari7800/exehdr.s +++ b/libsrc/atari7800/exehdr.s @@ -4,15 +4,15 @@ ; This header contains data for emulators ; .export __EXEHDR__: absolute = 1 - .import __CARTSIZE__ + .import __CARTSIZE__ ; ------------------------------------------------------------------------ ; EXE header - .segment "EXEHDR" - .byte 3 ; version - .byte 'A','T','A','R','I','7','8','0','0',' ',' ',' ',' ',' ',' ',' ' - .byte 'G','a','m','e',' ','n','a','m','e',0,0,0,0,0,0,0 - .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - .byte 0,0,>__CARTSIZE__,0 ; Set the cart size in the cfg file + .segment "EXEHDR" + .byte 3 ; version + .byte 'A','T','A','R','I','7','8','0','0',' ',' ',' ',' ',' ',' ',' ' + .byte 'G','a','m','e',' ','n','a','m','e',0,0,0,0,0,0,0 + .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + .byte 0,0,>__CARTSIZE__,0 ; Set the cart size in the cfg file ; bit 0 - pokey at 4000 ; bit 1 - supergame bank switched ; bit 2 - supergame ram at $4000 @@ -28,19 +28,19 @@ ; bit 12 - souper ; bit 13-15 - Special ; 0 = Normal cart - .byte 0,0 ; 0 = Normal cart - .byte 1 ; 1 = Joystick, 2 = lightgun - .byte 0 ; No joystick 2 - .byte 0 ; bit0 = 0:NTSC,1:PAL bit1 = 0:component,1:composite - .byte 0 ; Save data peripheral - 1 byte (version 2) + .byte 0,0 ; 0 = Normal cart + .byte 1 ; 1 = Joystick, 2 = lightgun + .byte 0 ; No joystick 2 + .byte 0 ; bit0 = 0:NTSC,1:PAL bit1 = 0:component,1:composite + .byte 0 ; Save data peripheral - 1 byte (version 2) ; 0 = None / unknown (default) ; 1 = High Score Cart (HSC) ; 2 = SaveKey - .byte 0 ; 63 Expansion module + .byte 0 ; 63 Expansion module ; 0 = No expansion module (default on all currently released games) ; 1 = Expansion module required - .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - .byte 0,0,0,0,0,0,0,0 - .byte 'A','C','T','U','A','L',' ','C','A','R','T',' ','D','A','T','A',' ','S','T','A','R','T','S',' ','H','E','R','E' + .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + .byte 0,0,0,0,0,0,0,0 + .byte 'A','C','T','U','A','L',' ','C','A','R','T',' ','D','A','T','A',' ','S','T','A','R','T','S',' ','H','E','R','E' diff --git a/libsrc/atari7800/get_tv.s b/libsrc/atari7800/get_tv.s index 3eb94d54d..12c54f807 100644 --- a/libsrc/atari7800/get_tv.s +++ b/libsrc/atari7800/get_tv.s @@ -3,63 +3,63 @@ ; ; unsigned char get_tv (void) ; - .include "atari7800.inc" - .include "get_tv.inc" - .export _get_tv - .export _paldetected + .include "atari7800.inc" + .include "get_tv.inc" + .export _get_tv + .export _paldetected -.segment "DATA" +.segment "DATA" _paldetected: - .byte $FF + .byte $FF ; --------------------------------------------------------------- ; unsigned char get_tv (void) ; --------------------------------------------------------------- -.segment "CODE" +.segment "CODE" -.proc _get_tv: near +.proc _get_tv: near -.segment "CODE" +.segment "CODE" - ldx #$00 - lda #$FF - cmp _paldetected - bne L8 -L1: lda MSTAT - and #$80 - bne L1 -L2: lda MSTAT - and #$80 - beq L2 -L3: lda MSTAT - and #$80 - bne L3 - lda #$00 - sta M0001 - jmp L5 -L4: sta MWSYNC - sta MWSYNC - dec M0001 -L5: lda MSTAT - and #$80 - beq L4 - lda M0001 - cmp #$78 - bcc L6 - lda #TV::NTSC - jmp L7 -L6: lda #TV::PAL -L7: sta _paldetected - ldx #$00 -L8: lda _paldetected - rts + ldx #$00 + lda #$FF + cmp _paldetected + bne L8 +L1: lda MSTAT + and #$80 + bne L1 +L2: lda MSTAT + and #$80 + beq L2 +L3: lda MSTAT + and #$80 + bne L3 + lda #$00 + sta M0001 + jmp L5 +L4: sta MWSYNC + sta MWSYNC + dec M0001 +L5: lda MSTAT + and #$80 + beq L4 + lda M0001 + cmp #$78 + bcc L6 + lda #TV::NTSC + jmp L7 +L6: lda #TV::PAL +L7: sta _paldetected + ldx #$00 +L8: lda _paldetected + rts -.segment "BSS" +.segment "BSS" M0001: - .res 1,$00 + .res 1,$00 .endproc diff --git a/libsrc/atari7800/irq.s b/libsrc/atari7800/irq.s index ed315a1b7..3cfc74541 100644 --- a/libsrc/atari7800/irq.s +++ b/libsrc/atari7800/irq.s @@ -8,7 +8,7 @@ .include "atari7800.inc" - .code + .code ; ------------------------------------------------------------------------ initirq: @@ -27,10 +27,10 @@ IRQStub: tya pha jsr callirq ; Call the functions - pla + pla tay pla tax -@L1: pla +@L1: pla rti diff --git a/libsrc/atari7800/joy/atari7800-stdjoy.s b/libsrc/atari7800/joy/atari7800-stdjoy.s index 00bb57dcf..cea6625a4 100644 --- a/libsrc/atari7800/joy/atari7800-stdjoy.s +++ b/libsrc/atari7800/joy/atari7800-stdjoy.s @@ -88,74 +88,74 @@ COUNT: ; READ: Read a particular joystick passed in A for 2 fire buttons. readbuttons: - ; Y has joystick of interest 0/1 - ; return value: - ; $00: no button, - ; $01: left/B button, - ; $02: right/A button, - ; $03: both buttons - ; preserves X - tya - beq L5 - ; Joystick 1 processing - ; 7800 joystick 1 buttons - ldy #0 ; ........ - bit INPT2 ; Check for right button - bpl L1 - ldy #2 ; ......2. -L1: bit INPT3 ;Check for left button - bpl L2 - iny ; ......21 -L2: tya - bne L4 ; 7800 mode joystick worked - ; 2600 Joystick 1 - bit INPT5 - bmi L4 -L3: iny ; .......1 - lda #0 ; Fallback to 2600 joystick mode - sta CTLSWB -L4: tya ; ......21 - rts + ; Y has joystick of interest 0/1 + ; return value: + ; $00: no button, + ; $01: left/B button, + ; $02: right/A button, + ; $03: both buttons + ; preserves X + tya + beq L5 + ; Joystick 1 processing + ; 7800 joystick 1 buttons + ldy #0 ; ........ + bit INPT2 ; Check for right button + bpl L1 + ldy #2 ; ......2. +L1: bit INPT3 ;Check for left button + bpl L2 + iny ; ......21 +L2: tya + bne L4 ; 7800 mode joystick worked + ; 2600 Joystick 1 + bit INPT5 + bmi L4 +L3: iny ; .......1 + lda #0 ; Fallback to 2600 joystick mode + sta CTLSWB +L4: tya ; ......21 + rts -L5: ; Joystick 0 processing - ; 7800 joystick 0 buttons - ldy #0 ; ........ - bit INPT0 ; Check for right button - bpl L6 - ldy #2 ; ......2. -L6: bit INPT1 ;Check for left button - bpl L7 - iny ; ......21 -L7: tya - bne L4 ; 7800 mode joystick worked - ; 2600 Joystick 0 - bit INPT4 - bmi L4 - bpl L3 +L5: ; Joystick 0 processing + ; 7800 joystick 0 buttons + ldy #0 ; ........ + bit INPT0 ; Check for right button + bpl L6 + ldy #2 ; ......2. +L6: bit INPT1 ;Check for left button + bpl L7 + iny ; ......21 +L7: tya + bne L4 ; 7800 mode joystick worked + ; 2600 Joystick 0 + bit INPT4 + bmi L4 + bpl L3 READ: - tay ; Store joystick 0/1 in Y - beq L8 - lda SWCHA ; Read directions of joystick 1 - rol ; ...RLDU. - rol ; ..RLDU.. - rol ; .RLDU... - joystick 1 - jmp L9 -L8: lda SWCHA ; Read directions of joystick 0 - ror ; .RLDU... - joystick 0 -L9: tax - jsr readbuttons ; A = ......21, X = .RLDU... - ror ; A = .......2 1 - tay ; Y = .......2 - txa ; A = .RLDU... - ror ; A = 1.RLDU.. - tax ; X = 1.RLDU.. - tya ; A = .......2 - ror ; A = ........ 2 - txa ; A = 1.RLDU.. - rol ; A = .RLDU..2 1 - rol ; A = RLDU..21 - eor #$F0 ; The direction buttons were inversed - and #$F3 - rts + tay ; Store joystick 0/1 in Y + beq L8 + lda SWCHA ; Read directions of joystick 1 + rol ; ...RLDU. + rol ; ..RLDU.. + rol ; .RLDU... - joystick 1 + jmp L9 +L8: lda SWCHA ; Read directions of joystick 0 + ror ; .RLDU... - joystick 0 +L9: tax + jsr readbuttons ; A = ......21, X = .RLDU... + ror ; A = .......2 1 + tay ; Y = .......2 + txa ; A = .RLDU... + ror ; A = 1.RLDU.. + tax ; X = 1.RLDU.. + tya ; A = .......2 + ror ; A = ........ 2 + txa ; A = 1.RLDU.. + rol ; A = .RLDU..2 1 + rol ; A = RLDU..21 + eor #$F0 ; The direction buttons were inversed + and #$F3 + rts diff --git a/libsrc/lynx/bootldr.s b/libsrc/lynx/bootldr.s index 58f04afc6..c8b4ca402 100644 --- a/libsrc/lynx/bootldr.s +++ b/libsrc/lynx/bootldr.s @@ -61,7 +61,7 @@ ; 00 00 00 00 ; spares ; 00 ; End of encrypted header mark ; -; .reloc +; .reloc ;********************************** ; After compilation, encryption and obfuscation it turns into this. ;********************************** diff --git a/samples/sym1/symNotepad.c b/samples/sym1/symNotepad.c index 1d0541ab6..6fb6db902 100644 --- a/samples/sym1/symNotepad.c +++ b/samples/sym1/symNotepad.c @@ -68,7 +68,7 @@ int main (void) { } else { memset ( tapio, 0, TAPIO_MAX_SIZE ); - } + } while ( running ) { @@ -138,21 +138,21 @@ int main (void) { } else { - for ( l = 0; l <= heap_size; l++ ) { - buffer[l] = tapio[l]; - } + for ( l = 0; l <= heap_size; l++ ) { + buffer[l] = tapio[l]; + } - p = strlen ( buffer ); + p = strlen ( buffer ); - putchar ( '\r' ); - for ( l = 0; l < 25; l++ ) { - putchar ( '\n' ); - } - puts ("===================== Sym-1 Notepad ====================\n"); + putchar ( '\r' ); + for ( l = 0; l < 25; l++ ) { + putchar ( '\n' ); + } + puts ("===================== Sym-1 Notepad ====================\n"); - for ( l = 0; l <= p; l++ ) { - putchar ( buffer[l] ); - } + for ( l = 0; l <= p; l++ ) { + putchar ( buffer[l] ); + } } } else if ( c == 0x03 ) { // Clear diff --git a/test/val/bug1696.c b/test/val/bug1696.c index c31dc257b..72cf9cc7e 100644 --- a/test/val/bug1696.c +++ b/test/val/bug1696.c @@ -29,16 +29,16 @@ static unsigned char failures = 0; int main(void) { - unsigned int x = 65535; - unsigned short y = 65535; - if (!(x > 1L)) { - printf("x = %ld but x > 1L failed\n", (long)x); - ++failures; - } - if (!(y == 65535L)) { - printf("y = %ld but y == 65535L failed\n", (long)y); - ++failures; - } + unsigned int x = 65535; + unsigned short y = 65535; + if (!(x > 1L)) { + printf("x = %ld but x > 1L failed\n", (long)x); + ++failures; + } + if (!(y == 65535L)) { + printf("y = %ld but y == 65535L failed\n", (long)y); + ++failures; + } printf("failures: %u\n", failures); return failures; } From 4b492ed4e56a449d3439ea892631b121bbeb66bd Mon Sep 17 00:00:00 2001 From: mrdudz <mrdudz@users.noreply.github.com> Date: Sat, 16 Apr 2022 18:18:51 +0200 Subject: [PATCH 077/101] added TAB checker script, to be added to the PR checker action --- .github/checks/Makefile | 7 +++++++ .github/checks/tabs.sh | 16 ++++++++++++++++ Makefile | 5 ++++- 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .github/checks/Makefile create mode 100755 .github/checks/tabs.sh diff --git a/.github/checks/Makefile b/.github/checks/Makefile new file mode 100644 index 000000000..3e85c0fd7 --- /dev/null +++ b/.github/checks/Makefile @@ -0,0 +1,7 @@ + +.PHONY: tabs + +check: tabs + +tabs: tabs.sh + @./tabs.sh diff --git a/.github/checks/tabs.sh b/.github/checks/tabs.sh new file mode 100755 index 000000000..ad10dfe14 --- /dev/null +++ b/.github/checks/tabs.sh @@ -0,0 +1,16 @@ +#! /bin/bash +OLDCWD=`pwd` +SCRIPT_PATH=`dirname $0` +cd $SCRIPT_PATH/../../ + +FILES=`find $CHECK_PATH -type f \( \( -name \*.inc -a \! -name Makefile.inc \) -o -name \*.cfg -o -name \*.c -o -name \*.s -o -name \*.h -o -name \*.asm -o -name \*.sgml \) -print | xargs grep -l $'\t' | grep -v "libwrk/" | grep -v "testwrk/"` + +cd $OLDCWD + +if [ x"$FILES"x != xx ]; then + echo "error: found TABs in the following files:" + for n in $FILES; do + echo $n + done + exit -1 +fi diff --git a/Makefile b/Makefile index 540c214fc..f565727e6 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: all mostlyclean clean install zip avail unavail bin lib doc html info samples test util +.PHONY: all mostlyclean clean install zip avail unavail bin lib doc html info samples test util check .SUFFIXES: @@ -24,6 +24,9 @@ samples: test: @$(MAKE) -C test --no-print-directory $@ +check: + @$(MAKE) -C .github/checks --no-print-directory $@ + util: @$(MAKE) -C util --no-print-directory $@ From 4c5875706408f36dbfca755c9422101339f7f5b9 Mon Sep 17 00:00:00 2001 From: mrdudz <mrdudz@users.noreply.github.com> Date: Sat, 16 Apr 2022 18:21:57 +0200 Subject: [PATCH 078/101] run style checks on PR --- .github/workflows/build-on-pull-request.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-on-pull-request.yml b/.github/workflows/build-on-pull-request.yml index 6ab8543de..e9176f8c4 100644 --- a/.github/workflows/build-on-pull-request.yml +++ b/.github/workflows/build-on-pull-request.yml @@ -21,6 +21,9 @@ jobs: - name: Checkout Source uses: actions/checkout@v2 + - name: Do some simple style checks + shell: bash + run: make -j2 check - name: Build the tools. shell: bash run: make -j2 bin USER_CFLAGS=-Werror From fd6662bb6499f7c1be5152aca38c2fd811d8ef18 Mon Sep 17 00:00:00 2001 From: mrdudz <mrdudz@users.noreply.github.com> Date: Sat, 16 Apr 2022 18:32:49 +0200 Subject: [PATCH 079/101] add check action also to the snapshot build --- .github/workflows/snapshot-on-push-master.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/snapshot-on-push-master.yml b/.github/workflows/snapshot-on-push-master.yml index fb4b3aa13..47abc3564 100644 --- a/.github/workflows/snapshot-on-push-master.yml +++ b/.github/workflows/snapshot-on-push-master.yml @@ -46,6 +46,9 @@ jobs: - name: Checkout Source uses: actions/checkout@v2 + - name: Do some simple style checks + shell: bash + run: make -j2 check - name: Build the tools. shell: bash run: | From 8cacfa70d5dc99077f08bdc77f45afaf0162b943 Mon Sep 17 00:00:00 2001 From: mrdudz <mrdudz@users.noreply.github.com> Date: Sat, 16 Apr 2022 19:51:48 +0200 Subject: [PATCH 080/101] add missing newline to a bunch of files --- libsrc/apple2/color.s | 2 +- libsrc/geos-cbm/system/initdoneio.s | 4 ++-- libsrc/geos-cbm/system/tobasic.s | 2 +- libsrc/geos-common/memory/crc.s | 1 - libsrc/geos-common/menuicon/doicons.s | 2 +- libsrc/geos-common/menuicon/domenu.s | 2 +- libsrc/geos-common/menuicon/dopreviousmenu.s | 2 +- libsrc/geos-common/menuicon/gotofirstmenu.s | 2 +- libsrc/geos-common/menuicon/recoverallmenus.s | 2 +- libsrc/geos-common/menuicon/recovermenu.s | 2 +- libsrc/geos-common/menuicon/redomenu.s | 2 +- .../geos-common/mousesprite/clearmousemode.s | 2 +- libsrc/geos-common/mousesprite/disablsprite.s | 2 +- libsrc/geos-common/mousesprite/drawsprite.s | 2 +- libsrc/geos-common/mousesprite/enablsprite.s | 2 +- .../geos-common/mousesprite/inittextprompt.s | 2 +- libsrc/geos-common/mousesprite/mouseoff.s | 2 +- libsrc/geos-common/mousesprite/mouseup.s | 2 +- libsrc/geos-common/mousesprite/possprite.s | 2 +- .../geos-common/mousesprite/startmousemode.s | 2 +- libsrc/geos-common/system/callroutine.s | 2 +- libsrc/geos-common/system/firstinit.s | 2 +- libsrc/geos-common/system/panic.s | 2 +- libsrc/osic1p/osiscreen.inc | 23 ++++++++++--------- test/err/cc65091001.c | 2 +- test/ref/cc65070303.c | 2 +- test/ref/cc65080227.c | 2 +- test/ref/cc65101209.c | 2 +- test/ref/cc65101216.c | 2 +- test/val/cc65091020.c | 2 +- 30 files changed, 41 insertions(+), 41 deletions(-) diff --git a/libsrc/apple2/color.s b/libsrc/apple2/color.s index 3b0c5b6d4..c54207288 100644 --- a/libsrc/apple2/color.s +++ b/libsrc/apple2/color.s @@ -13,4 +13,4 @@ _textcolor := return1 _bgcolor := return0 -_bordercolor := return0 \ No newline at end of file +_bordercolor := return0 diff --git a/libsrc/geos-cbm/system/initdoneio.s b/libsrc/geos-cbm/system/initdoneio.s index b5e51524a..4b8762bad 100644 --- a/libsrc/geos-cbm/system/initdoneio.s +++ b/libsrc/geos-cbm/system/initdoneio.s @@ -11,5 +11,5 @@ .include "jumptab.inc" _InitForIO = InitForIO - -_DoneWithIO = DoneWithIO \ No newline at end of file + +_DoneWithIO = DoneWithIO diff --git a/libsrc/geos-cbm/system/tobasic.s b/libsrc/geos-cbm/system/tobasic.s index cb47da531..59bdc2936 100644 --- a/libsrc/geos-cbm/system/tobasic.s +++ b/libsrc/geos-cbm/system/tobasic.s @@ -9,4 +9,4 @@ .include "jumptab.inc" -_ToBASIC = ToBASIC \ No newline at end of file +_ToBASIC = ToBASIC diff --git a/libsrc/geos-common/memory/crc.s b/libsrc/geos-common/memory/crc.s index 9ec2feb0c..94ab98f34 100644 --- a/libsrc/geos-common/memory/crc.s +++ b/libsrc/geos-common/memory/crc.s @@ -17,4 +17,3 @@ _CRC: lda r2L ldx r2H rts - \ No newline at end of file diff --git a/libsrc/geos-common/menuicon/doicons.s b/libsrc/geos-common/menuicon/doicons.s index 5ddf06d01..b0456e67f 100644 --- a/libsrc/geos-common/menuicon/doicons.s +++ b/libsrc/geos-common/menuicon/doicons.s @@ -13,4 +13,4 @@ _DoIcons: sta r0L stx r0H - jmp DoIcons \ No newline at end of file + jmp DoIcons diff --git a/libsrc/geos-common/menuicon/domenu.s b/libsrc/geos-common/menuicon/domenu.s index 1624a3852..43a2b5a0c 100644 --- a/libsrc/geos-common/menuicon/domenu.s +++ b/libsrc/geos-common/menuicon/domenu.s @@ -14,4 +14,4 @@ _DoMenu: sta r0L stx r0H lda #0 - jmp DoMenu \ No newline at end of file + jmp DoMenu diff --git a/libsrc/geos-common/menuicon/dopreviousmenu.s b/libsrc/geos-common/menuicon/dopreviousmenu.s index 5ac19b57a..1a92e1fe1 100644 --- a/libsrc/geos-common/menuicon/dopreviousmenu.s +++ b/libsrc/geos-common/menuicon/dopreviousmenu.s @@ -9,4 +9,4 @@ .include "jumptab.inc" -_DoPreviousMenu = DoPreviousMenu \ No newline at end of file +_DoPreviousMenu = DoPreviousMenu diff --git a/libsrc/geos-common/menuicon/gotofirstmenu.s b/libsrc/geos-common/menuicon/gotofirstmenu.s index b5f2306db..a8d00b132 100644 --- a/libsrc/geos-common/menuicon/gotofirstmenu.s +++ b/libsrc/geos-common/menuicon/gotofirstmenu.s @@ -9,4 +9,4 @@ .include "jumptab.inc" -_GotoFirstMenu = GotoFirstMenu \ No newline at end of file +_GotoFirstMenu = GotoFirstMenu diff --git a/libsrc/geos-common/menuicon/recoverallmenus.s b/libsrc/geos-common/menuicon/recoverallmenus.s index 03a8368bf..0420e88be 100644 --- a/libsrc/geos-common/menuicon/recoverallmenus.s +++ b/libsrc/geos-common/menuicon/recoverallmenus.s @@ -9,4 +9,4 @@ .include "jumptab.inc" -_RecoverAllMenus = RecoverAllMenus \ No newline at end of file +_RecoverAllMenus = RecoverAllMenus diff --git a/libsrc/geos-common/menuicon/recovermenu.s b/libsrc/geos-common/menuicon/recovermenu.s index 638d03d16..a8a6870c7 100644 --- a/libsrc/geos-common/menuicon/recovermenu.s +++ b/libsrc/geos-common/menuicon/recovermenu.s @@ -9,4 +9,4 @@ .include "jumptab.inc" -_RecoverMenu = RecoverMenu \ No newline at end of file +_RecoverMenu = RecoverMenu diff --git a/libsrc/geos-common/menuicon/redomenu.s b/libsrc/geos-common/menuicon/redomenu.s index 44d62e807..818102f8b 100644 --- a/libsrc/geos-common/menuicon/redomenu.s +++ b/libsrc/geos-common/menuicon/redomenu.s @@ -9,4 +9,4 @@ .include "jumptab.inc" -_ReDoMenu = ReDoMenu \ No newline at end of file +_ReDoMenu = ReDoMenu diff --git a/libsrc/geos-common/mousesprite/clearmousemode.s b/libsrc/geos-common/mousesprite/clearmousemode.s index 01e659567..635a0fcd4 100644 --- a/libsrc/geos-common/mousesprite/clearmousemode.s +++ b/libsrc/geos-common/mousesprite/clearmousemode.s @@ -9,4 +9,4 @@ .include "jumptab.inc" -_ClearMouseMode = ClearMouseMode \ No newline at end of file +_ClearMouseMode = ClearMouseMode diff --git a/libsrc/geos-common/mousesprite/disablsprite.s b/libsrc/geos-common/mousesprite/disablsprite.s index 95d298094..e6c769e29 100644 --- a/libsrc/geos-common/mousesprite/disablsprite.s +++ b/libsrc/geos-common/mousesprite/disablsprite.s @@ -12,4 +12,4 @@ _DisablSprite: sta r3L - jmp DisablSprite \ No newline at end of file + jmp DisablSprite diff --git a/libsrc/geos-common/mousesprite/drawsprite.s b/libsrc/geos-common/mousesprite/drawsprite.s index 0f4d611c0..90382c63c 100644 --- a/libsrc/geos-common/mousesprite/drawsprite.s +++ b/libsrc/geos-common/mousesprite/drawsprite.s @@ -16,4 +16,4 @@ _DrawSprite: stx r4H jsr popa sta r3L - jmp DrawSprite \ No newline at end of file + jmp DrawSprite diff --git a/libsrc/geos-common/mousesprite/enablsprite.s b/libsrc/geos-common/mousesprite/enablsprite.s index a271d2cdb..404a7cb05 100644 --- a/libsrc/geos-common/mousesprite/enablsprite.s +++ b/libsrc/geos-common/mousesprite/enablsprite.s @@ -12,4 +12,4 @@ _EnablSprite: sta r3L - jmp EnablSprite \ No newline at end of file + jmp EnablSprite diff --git a/libsrc/geos-common/mousesprite/inittextprompt.s b/libsrc/geos-common/mousesprite/inittextprompt.s index 2fc5e58fc..e0c4cc1cd 100644 --- a/libsrc/geos-common/mousesprite/inittextprompt.s +++ b/libsrc/geos-common/mousesprite/inittextprompt.s @@ -9,4 +9,4 @@ .include "jumptab.inc" -_InitTextPrompt = InitTextPrompt \ No newline at end of file +_InitTextPrompt = InitTextPrompt diff --git a/libsrc/geos-common/mousesprite/mouseoff.s b/libsrc/geos-common/mousesprite/mouseoff.s index a918bb612..b48d30807 100644 --- a/libsrc/geos-common/mousesprite/mouseoff.s +++ b/libsrc/geos-common/mousesprite/mouseoff.s @@ -9,4 +9,4 @@ .include "jumptab.inc" -_MouseOff = MouseOff \ No newline at end of file +_MouseOff = MouseOff diff --git a/libsrc/geos-common/mousesprite/mouseup.s b/libsrc/geos-common/mousesprite/mouseup.s index 45b4e83c2..8f7b4e0f6 100644 --- a/libsrc/geos-common/mousesprite/mouseup.s +++ b/libsrc/geos-common/mousesprite/mouseup.s @@ -9,4 +9,4 @@ .include "jumptab.inc" -_MouseUp = MouseUp \ No newline at end of file +_MouseUp = MouseUp diff --git a/libsrc/geos-common/mousesprite/possprite.s b/libsrc/geos-common/mousesprite/possprite.s index 24e8bd14c..5543cb3c6 100644 --- a/libsrc/geos-common/mousesprite/possprite.s +++ b/libsrc/geos-common/mousesprite/possprite.s @@ -26,4 +26,4 @@ _PosSprite: sta r5L jsr popa sta r3L - jmp PosSprite \ No newline at end of file + jmp PosSprite diff --git a/libsrc/geos-common/mousesprite/startmousemode.s b/libsrc/geos-common/mousesprite/startmousemode.s index 06a547714..26d969744 100644 --- a/libsrc/geos-common/mousesprite/startmousemode.s +++ b/libsrc/geos-common/mousesprite/startmousemode.s @@ -11,4 +11,4 @@ _StartMouseMode: clc - jmp StartMouseMode \ No newline at end of file + jmp StartMouseMode diff --git a/libsrc/geos-common/system/callroutine.s b/libsrc/geos-common/system/callroutine.s index 54de4cac7..3213d507e 100644 --- a/libsrc/geos-common/system/callroutine.s +++ b/libsrc/geos-common/system/callroutine.s @@ -9,4 +9,4 @@ .include "jumptab.inc" -_CallRoutine = CallRoutine \ No newline at end of file +_CallRoutine = CallRoutine diff --git a/libsrc/geos-common/system/firstinit.s b/libsrc/geos-common/system/firstinit.s index c0695ee47..617ecf4d6 100644 --- a/libsrc/geos-common/system/firstinit.s +++ b/libsrc/geos-common/system/firstinit.s @@ -9,4 +9,4 @@ .include "jumptab.inc" -_FirstInit = FirstInit \ No newline at end of file +_FirstInit = FirstInit diff --git a/libsrc/geos-common/system/panic.s b/libsrc/geos-common/system/panic.s index 9ea916023..d34b74a5a 100644 --- a/libsrc/geos-common/system/panic.s +++ b/libsrc/geos-common/system/panic.s @@ -9,4 +9,4 @@ .include "jumptab.inc" -_Panic = Panic \ No newline at end of file +_Panic = Panic diff --git a/libsrc/osic1p/osiscreen.inc b/libsrc/osic1p/osiscreen.inc index 9399d7eee..ee2e52174 100644 --- a/libsrc/osic1p/osiscreen.inc +++ b/libsrc/osic1p/osiscreen.inc @@ -3,7 +3,7 @@ ; .include "extzp.inc" - + .linecont + ; @@ -13,7 +13,7 @@ ; Macro implementation of internal screensize ; function for given width and height in ; characters - + .export screensize .proc screensize @@ -34,11 +34,11 @@ lda #<ScrBase ; Fill whole video RAM with blanks by calling ldx #>ScrBase ; memset appropriately jsr pushax - + lda #' ' ldx #$00 jsr pushax - + lda #<ScrRamSize ldx #>ScrRamSize jsr _memset @@ -46,7 +46,7 @@ lda #$00 ; Cursor in upper left corner sta CURS_X sta CURS_Y - + jmp plot ; Set the cursor position .endproc @@ -112,12 +112,12 @@ newline: lda #<(ScrBase + ScrFirstChar) ldx #>(ScrBase + ScrFirstChar) jsr pushax - + ; Scroll source address lda #<(ScrBase + ScrFirstChar + ScrollDist) ldx #>(ScrBase + ScrFirstChar + ScrollDist) jsr pushax - + ; Number of characters to move lda #<ScrollLength ldx #>ScrollLength @@ -129,7 +129,7 @@ newline: sta ptr1 lda #>(ScrBase + ScrFirstChar + ScrollLength) sta ptr1+1 - + ldy #ScrWidth ; Fill last line with blanks lda #' ' clrln: sta (ptr1),y @@ -150,7 +150,7 @@ putchar: ldy CURS_X sta (SCREEN_PTR),y ; Set char rts - + .endmacro .macro osi_screen_funcs ScrBase, ScrRamSize, ScrFirstChar, \ @@ -167,12 +167,13 @@ ScrTabLo: .repeat ScrHeight, I .byte <(ScrBase + ScrFirstChar + I * ScrollDist) .endrep - + ScrTabHi: .repeat ScrHeight, I .byte >(ScrBase + ScrFirstChar + I * ScrollDist) .endrep + .code osi_cputfuncs ScrBase, ScrFirstChar, ScrWidth, ScrHeight, \ @@ -180,4 +181,4 @@ osi_cputfuncs ScrBase, ScrFirstChar, ScrWidth, ScrHeight, \ osi_screensize ScrWidth, ScrHeight osi_clrscr ScrBase, ScrRamSize -.endmacro \ No newline at end of file +.endmacro diff --git a/test/err/cc65091001.c b/test/err/cc65091001.c index 65ce6ec83..8bcf158ac 100644 --- a/test/err/cc65091001.c +++ b/test/err/cc65091001.c @@ -27,4 +27,4 @@ int main() { printf("it works :)\n"); return 0; -} \ No newline at end of file +} diff --git a/test/ref/cc65070303.c b/test/ref/cc65070303.c index 6dbceeefc..049f14c40 100644 --- a/test/ref/cc65070303.c +++ b/test/ref/cc65070303.c @@ -35,4 +35,4 @@ seems to work. greetings,    Andreas -*/ \ No newline at end of file +*/ diff --git a/test/ref/cc65080227.c b/test/ref/cc65080227.c index 78afbb2c2..b6d068b2a 100644 --- a/test/ref/cc65080227.c +++ b/test/ref/cc65080227.c @@ -36,4 +36,4 @@ int main(void) 000023r 1 A4 rr ldy sreg 000025r 1 8C rr rr sty _b+2 000028r 1 8C rr rr sty _b+3 ; lost 4th BYTE ! -*/ \ No newline at end of file +*/ diff --git a/test/ref/cc65101209.c b/test/ref/cc65101209.c index c14543640..daeab8509 100644 --- a/test/ref/cc65101209.c +++ b/test/ref/cc65101209.c @@ -35,4 +35,4 @@ So testing with 999 gives: 999 mod 999 is 0 This seems to be systematic. -*/ \ No newline at end of file +*/ diff --git a/test/ref/cc65101216.c b/test/ref/cc65101216.c index eaaf0b3e4..1f6101afa 100644 --- a/test/ref/cc65101216.c +++ b/test/ref/cc65101216.c @@ -24,4 +24,4 @@ int main() printf("a / b = %d", c); return 0; -} \ No newline at end of file +} diff --git a/test/val/cc65091020.c b/test/val/cc65091020.c index d23b70a06..8f6b11761 100644 --- a/test/val/cc65091020.c +++ b/test/val/cc65091020.c @@ -24,4 +24,4 @@ int main() { return 0; } -/* Assert fails. (SVN rev 4381) */ \ No newline at end of file +/* Assert fails. (SVN rev 4381) */ From c977afe0b82884c32030e0e4d8764bd9e3a481c8 Mon Sep 17 00:00:00 2001 From: mrdudz <mrdudz@users.noreply.github.com> Date: Sat, 16 Apr 2022 19:59:25 +0200 Subject: [PATCH 081/101] add comment explaining what the empty file is about --- libsrc/cx16/cpeeks.s | 1 + 1 file changed, 1 insertion(+) diff --git a/libsrc/cx16/cpeeks.s b/libsrc/cx16/cpeeks.s index e69de29bb..281cbd75d 100644 --- a/libsrc/cx16/cpeeks.s +++ b/libsrc/cx16/cpeeks.s @@ -0,0 +1 @@ +; empty file to prevent cbm/cpeeks.s being pulled into the cx16 lib From eb04ce8190260e6add52730f35fba3fe864bf5be Mon Sep 17 00:00:00 2001 From: mrdudz <mrdudz@users.noreply.github.com> Date: Sat, 16 Apr 2022 20:00:10 +0200 Subject: [PATCH 082/101] add more style checks --- .github/checks/Makefile | 10 +++++++++- .github/checks/lastline.sh | 22 ++++++++++++++++++++++ .github/checks/spaces.sh | 16 ++++++++++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100755 .github/checks/lastline.sh create mode 100755 .github/checks/spaces.sh diff --git a/.github/checks/Makefile b/.github/checks/Makefile index 3e85c0fd7..827606d01 100644 --- a/.github/checks/Makefile +++ b/.github/checks/Makefile @@ -1,7 +1,15 @@ .PHONY: tabs -check: tabs +check: tabs lastline tabs: tabs.sh @./tabs.sh + +lastline: lastline.sh + @./lastline.sh + +# checks that will currently fail (on a lot of files), so they are not included +# in the general "check" action +spaces: spaces.sh + @./spaces.sh diff --git a/.github/checks/lastline.sh b/.github/checks/lastline.sh new file mode 100755 index 000000000..d455481d1 --- /dev/null +++ b/.github/checks/lastline.sh @@ -0,0 +1,22 @@ +#! /bin/bash +OLDCWD=`pwd` +SCRIPT_PATH=`dirname $0` +cd $SCRIPT_PATH/../../ + +nl=' +' +nl=$'\n' +FILES=`find $CHECK_PATH -type f \( \( -name \*.inc -a \! -name Makefile.inc \) -o -name \*.cfg -o -name \*.c -o -name \*.s -o -name \*.h -o -name \*.asm -o -name \*.sgml \) -print | while read f; do + t=$(tail -c2 $f; printf x); r1="${nl}$"; + [[ ${t%x} =~ $r1 ]] || echo "$f" +done` + +cd $OLDCWD + +if [ x"$FILES"x != xx ]; then + echo "error: found following files that have no newline at the end:" + for n in $FILES; do + echo $n + done + exit -1 +fi diff --git a/.github/checks/spaces.sh b/.github/checks/spaces.sh new file mode 100755 index 000000000..309ba9ac1 --- /dev/null +++ b/.github/checks/spaces.sh @@ -0,0 +1,16 @@ +#! /bin/bash +OLDCWD=`pwd` +SCRIPT_PATH=`dirname $0` +cd $SCRIPT_PATH/../../ + +FILES=`find $CHECK_PATH -type f \( \( -name \*.inc -a \! -name Makefile.inc \) -o -name \*.cfg -o -name \*.c -o -name \*.s -o -name \*.h -o -name \*.asm -o -name \*.sgml \) -print | xargs grep -l ' $' | grep -v "libwrk/" | grep -v "testwrk/"` + +cd $OLDCWD + +if [ x"$FILES"x != xx ]; then + echo "error: found dangling spaces in the following files:" + for n in $FILES; do + echo $n + done + exit -1 +fi From 945291fd69d9eed21a4ccd1b1859423222d0a250 Mon Sep 17 00:00:00 2001 From: mrdudz <mrdudz@users.noreply.github.com> Date: Sat, 16 Apr 2022 22:08:03 +0200 Subject: [PATCH 083/101] updated a bit --- Contributing.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Contributing.md b/Contributing.md index 1aeae7786..c8681c7ee 100644 --- a/Contributing.md +++ b/Contributing.md @@ -11,8 +11,19 @@ This document contains all kinds of information that you should know if you want ## All Sources +### TABs and spaces + +This is an ongoing controversial topic - everyone knows that. However, the following is how we do it :) + * TAB characters must be expanded to spaces. +* 4 spaces per indention level (rather than 8) are preferred, especially if there are many different levels. +* No extra spaces at the end of lines. * All text files must end with new-line characters. Don't leave the last line "dangling". + +The (bash) scipts used to check the above rules can be found in ```.github/check``` + +### misc + * 80 characters is the desired maximum width of files. But, it isn't a "strong" rule; sometimes, you will want to type longer lines, in order to keep the parts of expressions or comments together on the same line. * You should avoid typing non-ASCII characters. * If you change "normal" source code into comments, then you must add a comment about why that code is a comment. @@ -78,6 +89,19 @@ color := $0787 * Two blank lines between ```<sect1>``` sections. * One blank line between other sections. +# Library implementation rules + +* By default the toolchain must output a "standard" binary for the platform, no emulator formats, no extra headers used by tools. If the resulting binaries can not be run as is on emulators or eg flash cartridges, the process of converting them to something that can be used with these should be documented in the user manual. +* Generally every function should live in a seperate source file - unless the functions are so closely related that splitting makes no sense. +* Source files should not contain commented out code - if they do, there should be a comment that explains why that commented out code exists. + +# Makefile rules + +* Makefiles must generally work on both *nix (ba)sh and windows cmd.exe. +* Makefiles must not use external tools that are not provided by the cc65 toolchain itself. + +The only exception to the above are actions that are exclusive to the github actions - those may rely on bash and/or linux tools. + # Documentation rules ## User manual (LinuxDoc) From bfb8568a5f45e9138bd3850be22675615c650265 Mon Sep 17 00:00:00 2001 From: mrdudz <mrdudz@users.noreply.github.com> Date: Sun, 17 Apr 2022 16:04:58 +0200 Subject: [PATCH 084/101] remove dangling spaces --- asminc/_file.inc | 2 +- asminc/atari5200.inc | 14 ++++++------ asminc/atari_antic.inc | 14 ++++++------ asminc/em-kernel.inc | 2 +- asminc/errno.inc | 2 +- asminc/lynx.inc | 16 ++++++------- asminc/opcodes.inc | 34 +++++++++++++-------------- asminc/telestrat.inc | 48 +++++++++++++++++++-------------------- asminc/tgi-vectorfont.inc | 2 +- asminc/utsname.inc | 2 +- asminc/zeropage.inc | 2 +- 11 files changed, 69 insertions(+), 69 deletions(-) diff --git a/asminc/_file.inc b/asminc/_file.inc index 2f9938a3e..a9ac1e34a 100644 --- a/asminc/_file.inc +++ b/asminc/_file.inc @@ -24,4 +24,4 @@ _FPUSHBACK = $08 ; File table .global __filetab - + diff --git a/asminc/atari5200.inc b/asminc/atari5200.inc index a17268de2..b560c06af 100644 --- a/asminc/atari5200.inc +++ b/asminc/atari5200.inc @@ -7,7 +7,7 @@ ;------------------------------------------------------------------------- ; ATASCII CHARACTER DEFS ;------------------------------------------------------------------------- - + ATEOL = $9B ; END-OF-LINE, used by CONIO ;------------------------------------------------------------------------- @@ -27,9 +27,9 @@ CH_VLINE = $01 ; exclamation mark POKMSK = $00 ; Mask for Pokey IRQ enable RTCLOK = $01 ; 60 hz. clock -JUMP = $01 +JUMP = $01 CRITIC = $03 ; Critical section -ATRACT = $04 ; Attract Mode +ATRACT = $04 ; Attract Mode SDLSTL = $05 ; DLISTL Shadow SDLSTH = $06 ; DLISTH " @@ -66,20 +66,20 @@ SAVMSC = $1B ; pointer to screen memory (conio) ;------------------------------------------------------------------------- ;Interrupt Vectors - -VIMIRQ = $0200 ; Immediate IRQ + +VIMIRQ = $0200 ; Immediate IRQ ; Preset $FC03 (SYSIRQ) VVBLKI = $0202 ; Vblank immediate ; Preset $FCB8 (SYSVBL) VVBLKD = $0204 ; Vblank deferred ; Preset $FCB2 (XITVBL) -VDSLST = $0206 ; Display List +VDSLST = $0206 ; Display List ; Preset $FEA1 (OSDLI) VKYBDI = $0208 ; Keyboard immediate ; Preset $FD02 (SYSKBD) VKYBDF = $020A ; Deferred Keyboard ; Preset $FCB2 (XITVBL) -VTRIGR = $020C ; Soft Trigger +VTRIGR = $020C ; Soft Trigger VBRKOP = $020E ; BRK Opcode VSERIN = $0210 ; Serial in Ready VSEROR = $0212 ; Serial Out Ready diff --git a/asminc/atari_antic.inc b/asminc/atari_antic.inc index a4557c7b4..9a097e05a 100644 --- a/asminc/atari_antic.inc +++ b/asminc/atari_antic.inc @@ -76,13 +76,13 @@ DL_CHR20x8x2 = 6 ; colour (duochrome per character), 20 character DL_CHR20x16x2 = 7 ; colour (duochrome per character), 20 character & 16 scanlines per mode line (GR. 2) DL_MAP40x8x4 = 8 ; colour, 40 pixel & 8 scanlines per mode line (GR. 3) -DL_MAP80x4x2 = 9 ; 'duochrome', 80 pixel & 4 scanlines per mode line (GR.4) -DL_MAP80x4x4 = 10 ; colour, 80 pixel & 4 scanlines per mode line (GR.5) -DL_MAP160x2x2 = 11 ; 'duochrome', 160 pixel & 2 scanlines per mode line (GR.6) -DL_MAP160x1x2 = 12 ; 'duochrome', 160 pixel & 1 scanline per mode line (GR.14) -DL_MAP160x2x4 = 13 ; 4 colours, 160 pixel & 2 scanlines per mode line (GR.7) -DL_MAP160x1x4 = 14 ; 4 colours, 160 pixel & 1 scanline per mode line (GR.15) -DL_MAP320x1x1 = 15 ; monochrome, 320 pixel & 1 scanline per mode line (GR.8) +DL_MAP80x4x2 = 9 ; 'duochrome', 80 pixel & 4 scanlines per mode line (GR.4) +DL_MAP80x4x4 = 10 ; colour, 80 pixel & 4 scanlines per mode line (GR.5) +DL_MAP160x2x2 = 11 ; 'duochrome', 160 pixel & 2 scanlines per mode line (GR.6) +DL_MAP160x1x2 = 12 ; 'duochrome', 160 pixel & 1 scanline per mode line (GR.14) +DL_MAP160x2x4 = 13 ; 4 colours, 160 pixel & 2 scanlines per mode line (GR.7) +DL_MAP160x1x4 = 14 ; 4 colours, 160 pixel & 1 scanline per mode line (GR.15) +DL_MAP320x1x1 = 15 ; monochrome, 320 pixel & 1 scanline per mode line (GR.8) ; modifiers on mode lines... diff --git a/asminc/em-kernel.inc b/asminc/em-kernel.inc index 889ffba98..9e89b6f4e 100644 --- a/asminc/em-kernel.inc +++ b/asminc/em-kernel.inc @@ -75,7 +75,7 @@ EMD_API_VERSION = $02 ;------------------------------------------------------------------------------ ; Driver entry points - + .global emd_install .global emd_uninstall .global emd_pagecount diff --git a/asminc/errno.inc b/asminc/errno.inc index 6e5cce42b..1efe88cda 100644 --- a/asminc/errno.inc +++ b/asminc/errno.inc @@ -1,4 +1,4 @@ -; +; ; Ullrich von Bassewitz, 16.05.2000 ; diff --git a/asminc/lynx.inc b/asminc/lynx.inc index 81a60bf2e..403d15d07 100644 --- a/asminc/lynx.inc +++ b/asminc/lynx.inc @@ -135,35 +135,35 @@ STIMCTLB = $FD1F TIM0BKUP = $FD00 TIM0CTLA = $FD01 TIM0CNT = $FD02 -TIM0CTLB = $FD03 +TIM0CTLB = $FD03 TIM1BKUP = $FD04 TIM1CTLA = $FD05 TIM1CNT = $FD06 -TIM1CTLB = $FD07 +TIM1CTLB = $FD07 TIM2BKUP = $FD08 TIM2CTLA = $FD09 TIM2CNT = $FD0A -TIM2CTLB = $FD0B +TIM2CTLB = $FD0B TIM3BKUP = $FD0C TIM3CTLA = $FD0D TIM3CNT = $FD0E -TIM3CTLB = $FD0F +TIM3CTLB = $FD0F TIM4BKUP = $FD10 TIM4CTLA = $FD11 TIM4CNT = $FD12 -TIM4CTLB = $FD13 +TIM4CTLB = $FD13 TIM5BKUP = $FD14 TIM5CTLA = $FD15 TIM5CNT = $FD16 -TIM5CTLB = $FD17 +TIM5CTLB = $FD17 TIM6BKUP = $FD18 TIM6CTLA = $FD19 TIM6CNT = $FD1A -TIM6CTLB = $FD1B +TIM6CTLB = $FD1B TIM7BKUP = $FD1C TIM7CTLA = $FD1D TIM7CNT = $FD1E -TIM7CTLB = $FD1F +TIM7CTLB = $FD1F ; Mikey Audio diff --git a/asminc/opcodes.inc b/asminc/opcodes.inc index e6b7e73df..b610360e1 100644 --- a/asminc/opcodes.inc +++ b/asminc/opcodes.inc @@ -3,23 +3,23 @@ ; ; Christian Krüger, latest change: 18-Sep-2010 ; -; This software is provided 'as-is', without any expressed or implied -; warranty. In no event will the authors be held liable for any damages -; arising from the use of this software. -; -; Permission is granted to anyone to use this software for any purpose, -; including commercial applications, and to alter it and redistribute it -; freely, subject to the following restrictions: -; -; 1. The origin of this software must not be misrepresented; you must not -; claim that you wrote the original software. If you use this software -; in a product, an acknowledgment in the product documentation would be -; appreciated but is not required. -; 2. Altered source versions must be plainly marked as such, and must not -; be misrepresented as being the original software. -; 3. This notice may not be removed or altered from any source -; distribution. -; +; This software is provided 'as-is', without any expressed or implied +; warranty. In no event will the authors be held liable for any damages +; arising from the use of this software. +; +; Permission is granted to anyone to use this software for any purpose, +; including commercial applications, and to alter it and redistribute it +; freely, subject to the following restrictions: +; +; 1. The origin of this software must not be misrepresented; you must not +; claim that you wrote the original software. If you use this software +; in a product, an acknowledgment in the product documentation would be +; appreciated but is not required. +; 2. Altered source versions must be plainly marked as such, and must not +; be misrepresented as being the original software. +; 3. This notice may not be removed or altered from any source +; distribution. +; ; Opcode-Table ; ------------ diff --git a/asminc/telestrat.inc b/asminc/telestrat.inc index 79ac2d566..703dbaa3b 100644 --- a/asminc/telestrat.inc +++ b/asminc/telestrat.inc @@ -17,7 +17,7 @@ FNAME_LEN = 11 ; Maximum length of file-name ; --------------------------------------------------------------------------- ; I/O Identifier ; Theses identifers are used for channel management -; +; XKBD = $80 ; Keyboard XRSE = $83 ; RS232 in @@ -87,27 +87,27 @@ HRSFB := $57 VABKP1 := $58 ; RS232T -; b0-b3 : speed +; b0-b3 : speed ; 1111 => 19200 bps (please note that telestrat can't handle this speed without stopping all IRQ except ACIA's one) ; 1100 => 9600 bps (default from TELEMON) -; 1110 => 4800 bps -; 1010 => 2400 bps -; 1000 => 1200 bps -; 0111 => 600 bps -; 0110 => 300 bps -; 0101 => 150 bps -; 0010 => 75 bps +; 1110 => 4800 bps +; 1010 => 2400 bps +; 1000 => 1200 bps +; 0111 => 600 bps +; 0110 => 300 bps +; 0101 => 150 bps +; 0010 => 75 bps ; b4 : 0 external clock, 1 internal clock ; b6-b5 : 00 8 bits ; 01 7 bits ; 10 6 bits ; 11 5 bits -; b7 : 0 a stop +; b7 : 0 a stop RS232T := $59 -; RS232C +; RS232C ; b0-b3 : 0 ; b4 : 1 if echo ; b5 : 1 if parity @@ -218,7 +218,7 @@ SCREEN := $BB80 ; TELEMON primitives (2.4 & 3.x) -; all values are used to call bank 7 of telestrat cardridge. It works with 'brk value' +; all values are used to call bank 7 of telestrat cardridge. It works with 'brk value' XOP0 = $00 ; Open device on channel 0 XOP1 = $01 ; Open device on channel 1 XOP2 = $02 ; Open device on channel 2 @@ -281,8 +281,8 @@ XWRCLK = $3E ; Displays clock in the address in A & Y registe XSONPS = $40 ; Send data to PSG register (14 values) XOUPS = $42 ; Send Oups sound into PSG XPLAY = $43 ; Play a sound -XSOUND = $44 -XMUSIC = $45 +XSOUND = $44 +XMUSIC = $45 XZAP = $46 ; Send Zap sound to PSG XSHOOT = $47 @@ -303,13 +303,13 @@ XFWR = $4E ; Put a char on the first screen. Only available ; Keyboard primitives XALLKB = $50 ; Read Keyboard, and populate KBDCOL XKBDAS = $51 ; Ascii conversion -XGOKBD = $52 ; Swap keyboard type (Qwerty, French ...) +XGOKBD = $52 ; Swap keyboard type (Qwerty, French ...) ; Buffer management XECRBU = $54 ; Write A or AY in the buffer XLISBU = $55 ; Read A or AY in the buffer XTSTBU = $56 -XVIDBU = $57 ; Flush the buffer +XVIDBU = $57 ; Flush the buffer XINIBU = $58 ; Initialize the buffer X XDEFBU = $59 ; Reset all value of the buffer XBUSY = $5A ; Test if the buffer is empty @@ -328,7 +328,7 @@ XMSAVE = $61 ; Write a file to Minitel XFREE = $62 ; Only in TELEMON 3.x (bank 7 of Orix) -; Next Minitel primitives +; Next Minitel primitives XWCXFI = $63 ; Wait connection XLIGNE = $64 ; XDECON = $65 ; Minitel disconnection @@ -340,7 +340,7 @@ XHRSSE = $8C ; Set hires position cursor XDRAWA = $8D ; Draw a line absolute XDRAWR = $8E ; Draw a line (relative) XCIRCL = $8F ; Draw a circle -XCURSE = $90 ; Plot a pixel +XCURSE = $90 ; Plot a pixel XCURMO = $91 ; Move to x,y pos in Hires XPAPER = $92 XINK = $93 @@ -358,8 +358,8 @@ XPING = $9D ; Send Ping sound to PSG PWD_PTR = $00 ; --------------------------------------------------------------------------- -; -BUFTRV := $100 +; +BUFTRV := $100 ; --------------------------------------------------------------------------- @@ -377,7 +377,7 @@ TIMES := $211 TIMEM := $212 TIMEH := $213 FLGCLK := $214 -FLGCLK_FLAG := $215 +FLGCLK_FLAG := $215 FLGCUR := $216 ; Cursor management flag ; screens position managements @@ -466,7 +466,7 @@ DESALO := $52D FISALO := $52F EXSALO := $531 EXTDEF := $55D ; Default extension. At the start of telemon, it's set to ".COM" -BUFEDT := $590 ; Buffer edition +BUFEDT := $590 ; Buffer edition MAX_BUFEDT_LENGTH=110 @@ -480,7 +480,7 @@ BUFBUF := $c080 ; --------------------------------------------------------------------------- ; Stratsed vectors -; Stratsed is the main OS for Telestrat +; Stratsed is the main OS for Telestrat XMERGE := $FF0E XFST := $FF11 XSPUT := $FF14 @@ -532,7 +532,7 @@ XPMAP := $FFA7 XRWTS := $FFAA ; --------------------------------------------------------------------------- -; MACRO +; MACRO .macro BRK_TELEMON value .byte $00,value diff --git a/asminc/tgi-vectorfont.inc b/asminc/tgi-vectorfont.inc index ffe6ac686..124fe93cc 100644 --- a/asminc/tgi-vectorfont.inc +++ b/asminc/tgi-vectorfont.inc @@ -54,7 +54,7 @@ TGI_VF_CCOUNT = (TGI_VF_LASTCHAR - TGI_VF_FIRSTCHAR + 1) ; Font data loaded directly from file .struct TGI_VECTORFONT TOP .byte ; Height of char - BOTTOM .byte ; Descender + BOTTOM .byte ; Descender HEIGHT .byte ; Maximum char height WIDTHS .byte ::TGI_VF_CCOUNT ; Char widths CHARS .word ::TGI_VF_CCOUNT ; Pointer to character defs diff --git a/asminc/utsname.inc b/asminc/utsname.inc index 2c7052ce1..6d978dd21 100644 --- a/asminc/utsname.inc +++ b/asminc/utsname.inc @@ -33,7 +33,7 @@ -; Struct utsname +; Struct utsname .struct utsname sysname .byte 17 nodename .byte 9 diff --git a/asminc/zeropage.inc b/asminc/zeropage.inc index 1ba035868..6627d86b6 100644 --- a/asminc/zeropage.inc +++ b/asminc/zeropage.inc @@ -12,7 +12,7 @@ .globalzp ptr1, ptr2, ptr3, ptr4 .globalzp tmp1, tmp2, tmp3, tmp4 .globalzp regbank - + ; The size of the register bank regbanksize = 6 From 680f0c17f5175d4b67e276345b9d72b19ada525d Mon Sep 17 00:00:00 2001 From: mrdudz <mrdudz@users.noreply.github.com> Date: Sun, 17 Apr 2022 16:05:10 +0200 Subject: [PATCH 085/101] remove dangling spaces --- doc/atari5200.sgml | 4 ++-- doc/ca65.sgml | 2 +- doc/da65.sgml | 10 +++++----- doc/geos.sgml | 2 +- doc/intro.sgml | 4 ++-- doc/lynx.sgml | 2 +- doc/sim65.sgml | 2 +- doc/sym1.sgml | 4 ++-- doc/telestrat.sgml | 14 +++++++------- 9 files changed, 22 insertions(+), 22 deletions(-) diff --git a/doc/atari5200.sgml b/doc/atari5200.sgml index 599ffe3c9..29e6aadb3 100644 --- a/doc/atari5200.sgml +++ b/doc/atari5200.sgml @@ -84,7 +84,7 @@ The names are the usual ones you can find in system reference manuals. Example: tics = OS.rtclok[1] // get ticks ... </verb></tscreen> - + <sect1>Atari 5200 specific functions<p> <itemize> @@ -221,7 +221,7 @@ you cannot use any of the following functions (and a few others): <sect1>CAR format<p> -AtariROMMaker (<url url="https://www.wudsn.com/index.php/productions-atari800/tools/atarirommaker"> ) +AtariROMMaker (<url url="https://www.wudsn.com/index.php/productions-atari800/tools/atarirommaker"> ) can be used to create a <tt/.CAR/ file from the binary ROM image cc65 generates. This might be more convenient when working with emulators. diff --git a/doc/ca65.sgml b/doc/ca65.sgml index c0ebe3688..19fd3aa2a 100644 --- a/doc/ca65.sgml +++ b/doc/ca65.sgml @@ -3622,7 +3622,7 @@ See: <tt><ref id=".ASCIIZ" name=".ASCIIZ"></tt>,<tt><ref id=".BYTE" name=".BYTE" <sect1><tt>.PDTV</tt><label id=".PDTV"><p> - Enable the 6502DTV instruction set. This is a superset of the 6502 + Enable the 6502DTV instruction set. This is a superset of the 6502 instruction set. See: <tt><ref id=".P02" name=".P02"></tt> diff --git a/doc/da65.sgml b/doc/da65.sgml index 1702694a0..bf074a667 100644 --- a/doc/da65.sgml +++ b/doc/da65.sgml @@ -119,9 +119,9 @@ Here is a description of all the command line options: <item>4510 </itemize> - 6502x is for the NMOS 6502 with unofficial opcodes. 6502dtv is for the - emulated CPU of the C64DTV device. huc6280 is the CPU of the PC engine. - 4510 is the CPU of the Commodore C65. Support for the 65816 currently + 6502x is for the NMOS 6502 with unofficial opcodes. 6502dtv is for the + emulated CPU of the C64DTV device. huc6280 is the CPU of the PC engine. + 4510 is the CPU of the Commodore C65. Support for the 65816 currently is not available. @@ -253,8 +253,8 @@ for this CPU. Invalid opcodes are translated into <tt/.byte/ commands. With the command line option <tt><ref id="option--cpu" name="--cpu"></tt>, the disassembler may be told to recognize either the 65SC02 or 65C02 CPUs. The latter understands the same opcodes as the former, plus 16 additional bit -manipulation and bit test-and-branch commands. Using 6502x as CPU the illegal -opcodes of 6502 CPU are detected and displayed. 6502dtv setting recognizes the +manipulation and bit test-and-branch commands. Using 6502x as CPU the illegal +opcodes of 6502 CPU are detected and displayed. 6502dtv setting recognizes the emulated CPU instructons of the C64DTV device. diff --git a/doc/geos.sgml b/doc/geos.sgml index c3601e741..8a43d134b 100644 --- a/doc/geos.sgml +++ b/doc/geos.sgml @@ -1332,7 +1332,7 @@ This function returns the GEOS Kernal version combined (by logical OR) with the <p> This function returns the PAL/NTSC flag combined (by logical OR) with the 40/80 columns flag. This is not the best way to check if the screen has 40 or 80 columns since a PAL/NTSC check is always -performed and it can take as long as a full raster frame. If you just want to know if the +performed and it can take as long as a full raster frame. If you just want to know if the screen has 40 or 80 columns use the expression <tt/graphMode & 0x80/ which returns <tt/0/ for 40 columns and <tt/0x80/ for 80 columns. Remember that this value can be changed during runtime. It is unclear if this will work for GEOS 64 so you probably do not want to test diff --git a/doc/intro.sgml b/doc/intro.sgml index 4713de136..1eebe24c4 100644 --- a/doc/intro.sgml +++ b/doc/intro.sgml @@ -410,7 +410,7 @@ Available at <url url="https://github.com/commanderx16/x16-emulator/releases">: Emulates the Commander X16 Single Board Computer, with sound, SD card images, -VGA and NTSC video, and a NES game controller emulation. Includes a monitor. +VGA and NTSC video, and a NES game controller emulation. Includes a monitor. It runs on all SDL2 platforms. Compile the tutorial with @@ -459,7 +459,7 @@ Substitute the name of a Commodore computer for that <tt/<sys>/: Start the desired version of the emulator (CBM610 programs run on the CBM II [<tt/xcbm2/] emulator). -Choose <bf>File>Autostart disk/tape image...</bf>, choose your executable, +Choose <bf>File>Autostart disk/tape image...</bf>, choose your executable, and click <bf/OK/. The file has a 14-byte header which corresponds to a PRG-format BASIC program, diff --git a/doc/lynx.sgml b/doc/lynx.sgml index 0eef70535..76cfb377c 100644 --- a/doc/lynx.sgml +++ b/doc/lynx.sgml @@ -36,7 +36,7 @@ Here is a small traditional Hello World program for the Atari Lynx. <tscreen><verb> #include <lynx.h> #include <tgi.h> -#include <6502.h> +#include <6502.h> void main(void) { tgi_install(tgi_static_stddrv); diff --git a/doc/sim65.sgml b/doc/sim65.sgml index 075d95849..310de4667 100644 --- a/doc/sim65.sgml +++ b/doc/sim65.sgml @@ -112,7 +112,7 @@ For a C test compiled and linked with <tt/--target sim6502/ the command line arguments to <tt/sim65/ will be passed to <tt/main/, and the return value from <tt/main/ will become sim65's exit code. The <tt/exit/ function may also be used to terminate with an exit code. - + Exit codes are limited to 8 bits. The standard C library high level file input and output is functional. diff --git a/doc/sym1.sgml b/doc/sym1.sgml index b97f94720..0d4cc8a20 100644 --- a/doc/sym1.sgml +++ b/doc/sym1.sgml @@ -48,7 +48,7 @@ using 4k config run in the memory range of $200 - $0FFF. The 32k this range to $7FFF. Memory above 32k can be used to extend the heap, as described below. The starting memory location and entry point for running the program is $200, so when the program is transferred to the Sym-1, it is executed by typing 'g 200'. The system returns control -back to the monitor ROM when the program terminates, providing the '.' prompt. +back to the monitor ROM when the program terminates, providing the '.' prompt. Special locations: @@ -58,7 +58,7 @@ Special locations: <tag/Stack/ The C runtime stack is located at $0FFF on 4kb Syms, or at $7FFF for 32kb systems. - The stack always grows downwards. + The stack always grows downwards. <tag/Heap/ The C heap is located at the end of the program and grows towards the C runtime stack. Extended diff --git a/doc/telestrat.sgml b/doc/telestrat.sgml index 385bd69f9..e12846091 100644 --- a/doc/telestrat.sgml +++ b/doc/telestrat.sgml @@ -192,9 +192,9 @@ port cardridge. Telemon 2.4 returns in keyboard buffer the direction of the joysticks. This means that if you get input from keyboard by conio cgetc function, you will get direction from joysticks. -Anyway, if you don't want to use ROM, you can use joysticks standard drivers in your code. +Anyway, if you don't want to use ROM, you can use joysticks standard drivers in your code. -The standard driver manages two joysticks. Only one button is managed for these joysticks. +The standard driver manages two joysticks. Only one button is managed for these joysticks. Telestrat can handle one button for the left port, and three buttons for the right port (but this port was designed for a mouse). @@ -217,7 +217,7 @@ RS232 port with Telemon calls (see XSOUT primitive for example) Telemon 3.0 handles fopen, fread, fclose primitives. It means that this function will crash the Telestrat because Telemon 2.4 does not have these primitives. By the way, Telemon 3.0 uses an extension "ch376 card" which -handles sdcard and FAT 32 usb key. In the next version of Telemon, FT DOS, +handles sdcard and FAT 32 usb key. In the next version of Telemon, FT DOS, Sedoric, Stratsed will be handled in these 3 primitives (fopen, fread, fclose). <itemize> @@ -227,10 +227,10 @@ Sedoric, Stratsed will be handled in these 3 primitives (fopen, fread, fclose). </itemize> <sect1>conio<p> -Functions textcolor and bgcolor are available only with Telemon 3.0 (Orix). -Telemon 2.4 primitives can't handle any change of colors in text mode except with XINK or -XPAPER primitives which put on the first and second columns ink and paper attributes. -The only way to change color on the same line for text is to handle it in pure assembly +Functions textcolor and bgcolor are available only with Telemon 3.0 (Orix). +Telemon 2.4 primitives can't handle any change of colors in text mode except with XINK or +XPAPER primitives which put on the first and second columns ink and paper attributes. +The only way to change color on the same line for text is to handle it in pure assembly without systems calls. <sect>Other hints<p> From 3c1641e3e31925f6f686b5f29312d5f12b166a93 Mon Sep 17 00:00:00 2001 From: mrdudz <mrdudz@users.noreply.github.com> Date: Sun, 17 Apr 2022 16:05:19 +0200 Subject: [PATCH 086/101] remove dangling spaces --- include/_antic.h | 2 +- include/_atari5200os.h | 16 ++-- include/_atarios.h | 210 ++++++++++++++++++++--------------------- include/_pokey.h | 4 +- include/accelerator.h | 2 +- include/apple2.h | 4 +- include/dbg.h | 4 +- include/errno.h | 2 +- include/geos/gmemory.h | 2 +- include/stdlib.h | 4 +- include/sys/utsname.h | 2 +- 11 files changed, 126 insertions(+), 126 deletions(-) diff --git a/include/_antic.h b/include/_antic.h index 717f7f820..742237332 100644 --- a/include/_antic.h +++ b/include/_antic.h @@ -137,7 +137,7 @@ struct __antic { ** Called during every vertical blank; see SYSVBV, VVBLKI, CRITIC, and VVBLKD, ** as well as the SETVBV routine. */ -#define NMIEN_VBI 0x40 +#define NMIEN_VBI 0x40 /* [Reset] key pressed */ #define NMIEN_RESET 0x20 diff --git a/include/_atari5200os.h b/include/_atari5200os.h index db0f7f0c9..5bba43016 100644 --- a/include/_atari5200os.h +++ b/include/_atari5200os.h @@ -31,19 +31,19 @@ struct __os { /*Page zero*/ - unsigned char pokmsk; // = $00 System mask for POKEY IRQ enable + unsigned char pokmsk; // = $00 System mask for POKEY IRQ enable unsigned char rtclok[2]; // = $01,$02 Real time clock - unsigned char critic; // = $03 Critical section flag + unsigned char critic; // = $03 Critical section flag unsigned char atract; // = $04 Attract mode counter - + union { struct { unsigned char sdlstl; // = $05 Save display list LO unsigned char sdlsth; // = $06 Save display list HI }; void* sdlst; // = $05,$06 Display list shadow - }; - + }; + unsigned char sdmctl; // = $07 DMACTL shadow unsigned char pcolr0; // = $08 PM color 0 unsigned char pcolr1; // = $09 PM color 1 @@ -55,10 +55,10 @@ struct __os { unsigned char color3; // = $0F PF color 3 unsigned char color4; // = $10 PF color 4 unsigned char _free_1[0xEF]; // = $11-$FF User space - + /*Stack*/ unsigned char stack[0x100]; // = $100-$1FF Stack - + /*Page 2 OS variables*/ void (*vinter)(void); // = $200 Immediate IRQ vector void (*vvblki)(void); // = $202 Immediate VBI vector @@ -74,7 +74,7 @@ struct __os { void (*vtimr1)(void); // = $216 POKEY timer 1 IRQ vector void (*vtimr2)(void); // = $218 POKEY timer 2 IRQ vector void (*vtimr4)(void); // = $21A POKEY timer 4 IRQ vector - + }; #endif diff --git a/include/_atarios.h b/include/_atarios.h index 986092659..ec33b98c9 100644 --- a/include/_atarios.h +++ b/include/_atarios.h @@ -66,7 +66,7 @@ struct __dcb { unsigned char dtimlo; /* device timeout in seconds */ unsigned char dunuse; /* - unused - */ unsigned int dbyt; /* # of bytes to transfer */ - union { + union { struct { unsigned char daux1; /* 1st command auxiliary byte */ unsigned char daux2; /* 2nd command auxiliary byte */ @@ -167,28 +167,28 @@ struct __os { #ifdef OSA unsigned char* linzbs; // = $00/$01 LINBUG RAM (WILL BE REPLACED BY MONITOR RAM) -#else +#else unsigned char linflg; // = $00 LNBUG FLAG (0 = NOT LNBUG) unsigned char ngflag; // = $01 MEMORY STATUS (0 = FAILURE) -#endif +#endif unsigned char* casini; // = $02/$03 CASSETTE INIT LOCATION unsigned char* ramlo; // = $04/$05 RAM POINTER FOR MEMORY TEST - -#ifdef OSA + +#ifdef OSA unsigned char tramsz; // = $06 FLAG FOR LEFT CARTRIDGE unsigned char tstdat; // = $07 FLAG FOR RIGHT CARTRIDGE -#else +#else unsigned char trnsmz; // = $06 TEMPORARY REGISTER FOR RAM SIZE unsigned char tstdat; // = $07 UNUSED (NOT TOUCHED DURING RESET/COLD START) #endif - - // Cleared upon Coldstart only - + + // Cleared upon Coldstart only + unsigned char warmst; // = $08 WARM START FLAG - unsigned char bootq; // = $09 SUCCESSFUL BOOT FLAG + unsigned char bootq; // = $09 SUCCESSFUL BOOT FLAG void (*dosvec)(void); // = $0A/$0B DISK SOFTWARE START VECTOR void (*dosini)(void); // = $0C/$0D DISK SOFTWARE INIT ADDRESS - unsigned char* appmhi; // = $0E/$0F APPLICATIONS MEMORY HI LIMIT + unsigned char* appmhi; // = $0E/$0F APPLICATIONS MEMORY HI LIMIT // Cleared upon Coldstart or Warmstart @@ -199,26 +199,26 @@ struct __os { unsigned char iccomt; // = $17 COMMAND FOR VECTOR unsigned char* dskfms; // = $18/$19 DISK FILE MANAGER POINTER unsigned char* dskutl; // = $1A/$1B DISK UTILITIES POINTER -#ifdef OSA +#ifdef OSA unsigned char ptimot; // = $1C PRINTER TIME OUT REGISTER unsigned char pbpnt; // = $1D PRINT BUFFER POINTER unsigned char pbufsz; // = $1E PRINT BUFFER SIZE unsigned char ptemp; // = $1F TEMPORARY REGISTER -#else +#else unsigned char abufpt[4]; // = $1C-$1F ACMI BUFFER POINTER AREA -#endif +#endif iocb_t ziocb; // = $20-$2F ZERO PAGE I/O CONTROL BLOCK - + unsigned char status; // = $30 INTERNAL STATUS STORAGE unsigned char chksum; // = $31 CHECKSUM (SINGLE BYTE SUM WITH CARRY) unsigned char* bufr; // = $32/$33 POINTER TO DATA BUFFER unsigned char* bfen; // = $34/$35 NEXT BYTE PAST END OF THE DATA BUFFER LO -#ifdef OSA +#ifdef OSA unsigned char cretry; // = $36 NUMBER OF COMMAND FRAME RETRIES unsigned char dretry; // = $37 NUMBER OF DEVICE RETRIES -#else +#else unsigned int ltemp; // = $36/$37 LOADER TEMPORARY -#endif +#endif unsigned char bufrfl; // = $38 DATA BUFFER FULL FLAG unsigned char recvdn; // = $39 RECEIVE DONE FLAG unsigned char xmtdon; // = $3A TRANSMISSION DONE FLAG @@ -227,22 +227,22 @@ struct __os { unsigned char bptr; // = $3D CASSETTE BUFFER POINTER unsigned char ftype; // = $3E CASSETTE IRG TYPE unsigned char feof; // = $3F CASSETTE EOF FLAG (0 // = QUIET) - + unsigned char freq; // = $40 CASSETTE BEEP COUNTER unsigned char soundr; // = $41 NOISY I/0 FLAG. (ZERO IS QUIET) unsigned char critic; // = $42 DEFINES CRITICAL SECTION (CRITICAL IF NON-Z) dos2x_t fmszpg; // = $43-$49 DISK FILE MANAGER SYSTEM ZERO PAGE -#ifdef OSA +#ifdef OSA unsigned char ckey; // = $4A FLAG SET WHEN GAME START PRESSED unsigned char cassbt; // = $4B CASSETTE BOOT FLAG -#else +#else void* zchain; // = $4A/$4B HANDLER LINKAGE CHAIN POINTER -#endif +#endif unsigned char dstat; // = $4C DISPLAY STATUS unsigned char atract; // = $4D ATRACT FLAG unsigned char drkmsk; // = $4E DARK ATRACT MASK unsigned char colrsh; // = $4F ATRACT COLOR SHIFTER (EOR'ED WITH PLAYFIELD - + unsigned char tmpchr; // = $50 TEMPORARY CHARACTER unsigned char hold1; // = $51 TEMPORARY unsigned char lmargn; // = $52 LEFT MARGIN (NORMALLY 2, CC65 C STARTUP CODE SETS IT TO 0) @@ -255,68 +255,68 @@ struct __os { unsigned int oldcol; // = $5B/$5C PRIOR COLUMN unsigned char oldchr; // = $5D DATA UNDER CURSOR unsigned char* oldadr; // = $5E/$5F SAVED CURSOR MEMORY ADDRESS - -#ifdef OSA + +#ifdef OSA unsigned char newrow; // = $60 POINT DRAW GOES TO unsigned int newcol; // = $61/$62 COLUMN DRAW GOES TO -#else +#else unsigned char* fkdef; // = $60/$61 FUNCTION KEY DEFINITION TABLE unsigned char palnts; // = $62 PAL/NTSC INDICATOR (0 // = NTSC) -#endif +#endif unsigned char logcol; // = $63 POINTS AT COLUMN IN LOGICAL LINE unsigned char* adress; // = $64/$65 TEMPORARY ADDRESS - unsigned int mlttmp; // = $66/$67 TEMPORARY / FIRST BYTE IS USED IN OPEN AS TEMP - unsigned int savadr; // = $68/$69 SAVED ADDRESS + unsigned int mlttmp; // = $66/$67 TEMPORARY / FIRST BYTE IS USED IN OPEN AS TEMP + unsigned int savadr; // = $68/$69 SAVED ADDRESS unsigned char ramtop; // = $6A RAM SIZE DEFINED BY POWER ON LOGIC unsigned char bufcnt; // = $6B BUFFER COUNT unsigned char* bufstr; // = $6C/$6D EDITOR GETCH POINTER unsigned char bitmsk; // = $6E BIT MASK unsigned char shfamt; // = $6F SHIFT AMOUNT FOR PIXEL JUSTIFUCATION - + unsigned int rowac; // = $70/$71 DRAW WORKING ROW unsigned int colac; // = $72/$73 DRAW WORKING COLUMN unsigned char* endpt; // = $74/$75 END POINT unsigned char deltar; // = $76 ROW DIFFERENCE unsigned int deltac; // = $77/$78 COLUMN DIFFERENCE -#ifdef OSA - unsigned char rowinc; // = $79 ROWINC +#ifdef OSA + unsigned char rowinc; // = $79 ROWINC unsigned char colinc; // = $7A COLINC -#else +#else unsigned char* keydef; // = $79/$7A 2-BYTE KEY DEFINITION TABLE ADDRESS -#endif +#endif unsigned char swpflg; // = $7B NON-0 1F TXT AND REGULAR RAM IS SWAPPED unsigned char holdch; // = $7C CH IS MOVED HERE IN KGETCH BEFORE CNTL & SH unsigned char insdat; // = $7D 1-BYTE TEMPORARY unsigned int countr; // = $7E/$7F 2-BYTE DRAW ITERATION COUNT - + unsigned char _free_1[0xD4-0x7F-1]; // USER SPACE - + // Floating Point Package Page Zero Address Equates - fpreg_t fpreg[4]; // = $D4-$EB 4 REGSITERS, ACCCESS LIKE "fpreg[FPIDX_R0].fr" - unsigned char frx; // = $EC 1-BYTE TEMPORARY + fpreg_t fpreg[4]; // = $D4-$EB 4 REGSITERS, ACCCESS LIKE "fpreg[FPIDX_R0].fr" + unsigned char frx; // = $EC 1-BYTE TEMPORARY unsigned char eexp; // = $ED VALUE OF EXP -#ifdef OS_REV2 +#ifdef OS_REV2 unsigned char frsign; // = $EE ##REV2## 1-BYTE FLOATING POINT SIGN unsigned char plycnt; // = $EF ##REV2## 1-BYTE POLYNOMIAL DEGREE unsigned char sgnflg; // = $F0 ##REV2## 1-BYTE SIGN FLAG unsigned char xfmflg; // = $F1 ##REV2## 1-BYTE TRANSFORM FLAG -#else +#else unsigned char nsign; // = $EE SIGN OF # unsigned char esign; // = $EF SIGN OF EXPONENT unsigned char fchrflg; // = $F0 1ST CHAR FLAG unsigned char digrt; // = $F1 # OF DIGITS RIGHT OF DECIMAL -#endif +#endif unsigned char cix; // = $F2 CURRENT INPUT INDEX - unsigned char* inbuff; // = $F3/$F4 POINTS TO USER'S LINE INPUT BUFFER + unsigned char* inbuff; // = $F3/$F4 POINTS TO USER'S LINE INPUT BUFFER unsigned int ztemp1; // = $F5/$F6 2-BYTE TEMPORARY unsigned int ztemp4; // = $F7/$F8 2-BYTE TEMPORARY unsigned int ztemp3; // = $F9/$FA 2-BYTE TEMPORARY - - union { + + union { unsigned char degflg; // = $FB ##OLD## SAME AS RADFLG unsigned char radflg; // = $FB ##OLD## 0=RADIANS, 6=DEGREES }; - + fpreg_t* flptr; // = $FC/$FD 2-BYTE FLOATING POINT NUMBER POINTER fpreg_t* fptr2; // = $FE/$FF 2-BYTE FLOATING POINT NUMBER POINTER @@ -356,28 +356,28 @@ struct __os { union { struct { unsigned char sdlstl; // = $0230 SAVE DISPLAY LIST LOW BYTE - unsigned char sdlsth; // = $0231 SAVE DISPLAY LIST HI BYTE + unsigned char sdlsth; // = $0231 SAVE DISPLAY LIST HI BYTE }; void* sdlst; // = $0230/$0231 (same as above as pointer) }; unsigned char sskctl; // = $0232 SKCTL REGISTER RAM -#ifdef OSA +#ifdef OSA unsigned char _spare_1; // = $0233 No OS use. #else unsigned char lcount; // = $0233 ##1200xl## 1-byte relocating loader record -#endif +#endif unsigned char lpenh; // = $0234 LIGHT PEN HORIZONTAL VALUE unsigned char lpenv; // = $0235 LIGHT PEN VERTICAL VALUE void (*brkky)(void); // = $0236/$0237 BREAK KEY VECTOR -#ifdef OSA +#ifdef OSA unsigned char spare2[2]; // = $0238/$0239 No OS use. -#else +#else void (*vpirq)(void); // = $0238/$0239 ##rev2## 2-byte parallel device IRQ vector -#endif +#endif unsigned char cdevic; // = $023A COMMAND FRAME BUFFER - DEVICE unsigned char ccomnd; // = $023B COMMAND union { - struct { + struct { unsigned char caux1; // = $023C COMMAND AUX BYTE 1 unsigned char caux2; // = $023D COMMAND AUX BYTE 2 }; @@ -389,15 +389,15 @@ struct __os { unsigned char dbsect; // = $0241 NUMBER OF DISK BOOT SECTORS unsigned char* bootad; // = $0242/$0243 ADDRESS WHERE DISK BOOT LOADER WILL BE PUT unsigned char coldst; // = $0244 COLDSTART FLAG (1=IN MIDDLE OF COLDSTART> -#ifdef OSA +#ifdef OSA unsigned char spare3; // = $0245 No OS use. -#else +#else unsigned char reclen; // = $0245 ##1200xl## 1-byte relocating loader record length -#endif +#endif unsigned char dsktim; // = $0246 DISK TIME OUT REGISTER -#ifdef OSA +#ifdef OSA unsigned char linbuf[40]; // = $0247-$026E ##old## CHAR LINE BUFFER -#else +#else unsigned char pdvmsk; // = $0247 ##rev2## 1-byte parallel device selection mask unsigned char shpdvs; // = $0248 ##rev2## 1-byte PDVS (parallel device select) unsigned char pdimsk; // = $0249 ##rev2## 1-byte parallel device IRQ selection @@ -409,7 +409,7 @@ struct __os { unsigned char vsflag; // = $026C ##1200xl## 1-byte fine vertical scroll count unsigned char keydis; // = $026D ##1200xl## 1-byte keyboard disable unsigned char fine; // = $026E ##1200xl## 1-byte fine scrolling mode -#endif +#endif unsigned char gprior; // = $026F GLOBAL PRIORITY CELL unsigned char paddl0; // = $0270 1-BYTE POTENTIOMETER 0 unsigned char paddl1; // = $0271 1-BYTE POTENTIOMETER 1 @@ -435,30 +435,30 @@ struct __os { unsigned char strig1; // = $0285 1-BYTE JOYSTICK TRIGGER 1 unsigned char strig2; // = $0286 1-BYTE JOYSTICK TRIGGER 2 unsigned char strig3; // = $0287 1-BYTE JOYSTICK TRIGGER 3 -#ifdef OSA +#ifdef OSA unsigned char cstat; // = $0288 ##old## cassette status register -#else +#else unsigned char hibyte; // = $0288 ##1200xl## 1-byte relocating loader high byte -#endif +#endif unsigned char wmode; // = $0289 1-byte cassette WRITE mode unsigned char blim; // = $028A 1-byte cassette buffer limit #ifdef OSA unsigned char _reserved_2[5]; // = $028B-$028F RESERVED -#else +#else unsigned char imask; // = $028B ##rev2## (not used) void (*jveck)(void); // = $028C/$028D 2-byte jump vector unsigned newadr; // = $028E/028F ##1200xl## 2-byte relocating address -#endif +#endif unsigned char txtrow; // = $0290 TEXT ROWCRS unsigned txtcol; // = $0291/$0292 TEXT COLCRS unsigned char tindex; // = $0293 TEXT INDEX unsigned char* txtmsc; // = $0294/$0295 FOOLS CONVRT INTO NEW MSC unsigned char txtold[6]; // = $0296-$029B OLDROW & OLDCOL FOR TEXT (AND THEN SOME) -#ifdef OSA +#ifdef OSA unsigned char tmpx1; // = $029C ##old## 1--byte temporary register -#else +#else unsigned char cretry; // = $029C ##1200xl## 1-byte number of command frame retries -#endif +#endif unsigned char hold3; // = $029D 1-byte temporary unsigned char subtmp; // = $029E 1-byte temporary unsigned char hold2; // = $029F 1-byte (not used) @@ -473,41 +473,41 @@ struct __os { unsigned tmpcol; // = $02B9/$02BA 2-byte temporary column unsigned char scrflg; // = $02BB SET IF SCROLL OCCURS unsigned char hold4; // = $02BC TEMP CELL USED IN DRAW ONLY -#ifdef OSA +#ifdef OSA unsigned char hold5; // = $02BD ##old## DITTO -#else +#else unsigned char dretry; // = $02BD ##1200xl## 1-byte number of device retries -#endif +#endif unsigned char shflok; // = $02BE 1-byte shift/control lock flags unsigned char botscr; // = $02BF BOTTOM OF SCREEN 24 NORM 4 SPLIT unsigned char pcolr0; // = $02C0 1-byte player-missile 0 color/luminance unsigned char pcolr1; // = $02C1 1-byte player-missile 1 color/luminance unsigned char pcolr2; // = $02C2 1-byte player-missile 2 color/luminance - unsigned char pcolr3; // = $02C3 1-byte player-missile 3 color/luminance + unsigned char pcolr3; // = $02C3 1-byte player-missile 3 color/luminance unsigned char color0; // = $02C4 1-byte playfield 0 color/luminance unsigned char color1; // = $02C5 1-byte playfield 1 color/luminance unsigned char color2; // = $02C6 1-byte playfield 2 color/luminance unsigned char color3; // = $02C7 1-byte playfield 3 color/luminance unsigned char color4; // = $02C8 1-byte background color/luminance -#ifdef OSA +#ifdef OSA unsigned char _spare_2[23]; // = $02C9-$02DF No OS use. #else union { unsigned char parmbl[6]; // = $02C9 ##rev2## 6-byte relocating loader parameter - struct { + struct { void (*runadr)(void); // = $02C9 ##1200xl## 2-byte run address unsigned int hiused; // = $02CB ##1200xl## 2-byte highest non-zero page address unsigned int zhiuse; // = $02CD ##1200xl## 2-byte highest zero page address - }; - }; - union { + }; + }; + union { unsigned char oldpar[6]; // = $02CF ##rev2## 6-byte relocating loader parameter - struct { + struct { void (*gbytea)(void); // = $02CF ##1200xl## 2-byte GET-BYTE routine address unsigned int loadad; // = $02D1 ##1200xl## 2-byte non-zero page load address unsigned int zloada; // = $02D3 ##1200xl## 2-byte zero page load address - }; - }; + }; + }; unsigned int dsctln; // = $02D5 ##1200xl## 2-byte disk sector length unsigned int acmisr; // = $02D7 ##1200xl## 2-byte ACMI interrupt service routine unsigned char krpdel; // = $02D9 ##1200xl## 1-byte auto-repeat delay @@ -517,78 +517,78 @@ struct __os { unsigned char dmasav; // = $02DD ##1200xl## 1-byte SDMCTL save/restore unsigned char pbpnt; // = $02DE ##1200xl## 1-byte printer buffer pointer unsigned char pbufsz; // = $02DF ##1200xl## 1-byte printer buffer size -#endif - union { +#endif + union { unsigned char glbabs[4]; // = $02E0-$02E3 byte global variables for non-DOS users - struct { + struct { void (*runad)(void); // = $02E0 ##map## 2-byte binary file run address void (*initad)(void); // = $02E2 ##map## 2-byte binary file initialization address - }; - }; + }; + }; unsigned char ramsiz; // = $02E4 RAM SIZE (HI BYTE ONLY) void* memtop; // = $02E5 TOP OF AVAILABLE USER MEMORY void* memlo; // = $02E7 BOTTOM OF AVAILABLE USER MEMORY -#ifdef OSA +#ifdef OSA unsigned char _spare_3; // = $02E9 No OS use. -#else +#else unsigned char hndlod; // = $02E9 ##1200xl## 1-byte user load flag -#endif +#endif unsigned char dvstat[4]; // = $02EA-$02ED STATUS BUFFER - union { + union { unsigned int cbaud; // = $02EE/$02EF 2-byte cassette baud rate - struct { + struct { unsigned char cbaudl; // = $02EE 1-byte low cassette baud rate unsigned char cbaudh; // = $02EF 1-byte high cassette baud rate - }; - }; + }; + }; unsigned char crsinh; // = $02F0 CURSOR INHIBIT (00 = CURSOR ON) unsigned char keydel; // = $02F1 KEY DELAY unsigned char ch1; // = $02F2 1-byte prior keyboard character unsigned char chact; // = $02F3 CHACTL REGISTER RAM unsigned char chbas; // = $02F4 CHBAS REGISTER RAM -#ifdef OSA +#ifdef OSA unsigned char _spare_4[5]; // = $02F5-$02F9 No OS use. -#else +#else unsigned char newrow; // = $02F5 ##1200xl## 1-byte draw destination row unsigned int newcol; // = $02F6/$02F7 ##1200xl## 2-byte draw destination column unsigned char rowinc; // = $02F8 ##1200xl## 1-byte draw row increment unsigned char colinc; // = $02F9 ##1200xl## 1-byte draw column increment -#endif +#endif unsigned char char_; // = $02FA 1-byte internal character (naming changed due to do keyword conflict) unsigned char atachr; // = $02FB ATASCII CHARACTER unsigned char ch; // = $02FC GLOBAL VARIABLE FOR KEYBOARD unsigned char fildat; // = $02FD RIGHT FILL DATA <DRAW> unsigned char dspflg; // = $02FE DISPLAY FLAG DISPLAY CNTLS IF NON-ZERO unsigned char ssflag; // = $02FF START/STOP FLAG FOR PAGING (CNTL 1). CLEARE - + // --- Page 3 --- dcb_t dcb; // = $0300-$030B DEVICE CONTROL BLOCK unsigned int timer1; // = $030C/$030D INITIAL TIMER VALUE -#ifdef OSA +#ifdef OSA unsigned char addcor; // = $030E ##old## ADDITION CORRECTION -#else +#else unsigned char jmpers; // = $030E ##1200xl## 1-byte jumper options -#endif +#endif unsigned char casflg; // = $030F CASSETTE MODE WHEN SET unsigned int timer2; // = $0310/$0311 2-byte final baud rate timer value unsigned char temp1; // = $0312 TEMPORARY STORAGE REGISTER -#ifdef OSA +#ifdef OSA unsigned char _spare_5; // = $0313 unused unsigned char temp2; // = $0314 ##old## TEMPORARY STORAGE REGISTER -#else +#else unsigned char temp2; // = $0313 ##1200xl## 1-byte temporary unsigned char ptimot; // = $0314 ##1200xl## 1-byte printer timeout -#endif +#endif unsigned char temp3; // = $0315 TEMPORARY STORAGE REGISTER unsigned char savio; // = $0316 SAVE SERIAL IN DATA PORT unsigned char timflg; // = $0317 TIME OUT FLAG FOR BAUD RATE CORRECTION unsigned char stackp; // = $0318 SIO STACK POINTER SAVE CELL unsigned char tstat; // = $0319 TEMPORARY STATUS HOLDER -#ifdef OSA +#ifdef OSA hatabs_t hatabs[12]; // = $031A-$033D handler address table unsigned int zeropad; // = $033E/$033F zero padding -#else +#else hatabs_t hatabs[11]; // = $031A-$033A handler address table unsigned int zeropad; // = $033B/$033C zero padding unsigned char pupbt1; // = $033D ##1200xl## 1-byte power-up validation byte 1 @@ -598,9 +598,9 @@ struct __os { iocb_t iocb[8]; // = $0340-$03BF 8 I/O Control Blocks unsigned char prnbuf[40]; // = $03C0-$3E7 PRINTER BUFFER -#ifdef OSA +#ifdef OSA unsigned char _spare_6[151]; // = $03E8-$047F unused -#else +#else unsigned char superf; // = $03E8 ##1200xl## 1-byte editor super function flag unsigned char ckey; // = $03E9 ##1200xl## 1-byte cassette boot request flag unsigned char cassbt; // = $03EA ##1200xl## 1-byte cassette boot flag @@ -639,7 +639,7 @@ struct __basic { void* starp; // = $8C/$8D ADDRESS FOR THE STRING AND ARRAY TABLE void* runstk; // = $8E/$8F ADDRESS OF THE RUNTIME STACK void* memtop; // = $90/$91 POINTER TO THE TOP OF BASIC MEMORY - + unsigned char _internal_1[0xBA-0x91-1]; // INTERNAL DATA unsigned int stopln; // = $BA/$BB LINE WHERE A PROGRAM WAS STOPPED diff --git a/include/_pokey.h b/include/_pokey.h index 88d6949aa..15af4919e 100644 --- a/include/_pokey.h +++ b/include/_pokey.h @@ -131,7 +131,7 @@ struct __pokey_write { #define SKCTL_KEYBOARD_SCANNING 0x02 /* Enable keyboard scanning circuit */ /* Fast pot scan -** The pot scan counter completes its sequence in two TV line times instead of +** The pot scan counter completes its sequence in two TV line times instead of ** one frame time (228 scan lines). Not as accurate as the normal pot scan */ #define SKCTL_FAST_POT_SCAN 0x04 @@ -204,7 +204,7 @@ struct __pokey_read { #define SKSTAT_DATA_READ_INGORING_SHIFTREG 0x10 /* Data can be read directly from the serial input port, ignoring the shift register. */ #define SKSTAT_KEYBOARD_OVERRUN 0x20 /* Keyboard over-run; Reset BITs 7, 6 and 5 (latches) to 1, using SKREST */ #define SKSTAT_INPUT_OVERRUN 0x40 /* Serial data input over-run. Reset latches as above. */ -#define SKSTAT_INPUT_FRAMEERROR 0x80 /* Serial data input frame error caused by missing or extra bits. Reset latches as above. */ +#define SKSTAT_INPUT_FRAMEERROR 0x80 /* Serial data input frame error caused by missing or extra bits. Reset latches as above. */ /* KBCODE, internal keyboard codes for Atari 8-bit computers, diff --git a/include/accelerator.h b/include/accelerator.h index fdd2ebaf7..b5d8d0194 100644 --- a/include/accelerator.h +++ b/include/accelerator.h @@ -180,7 +180,7 @@ unsigned char detect_c128 (void); unsigned char __fastcall__ set_chameleon_speed (unsigned char speed); /* Set the speed of the C64 Chameleon cartridge, the following inputs - * are accepted: + * are accepted: * SPEED_SLOW : 1 Mhz mode * SPEED_1X : 1 Mhz mode * SPEED_2X : 2 Mhz mode diff --git a/include/apple2.h b/include/apple2.h index 57d7086ce..015e8f378 100644 --- a/include/apple2.h +++ b/include/apple2.h @@ -159,11 +159,11 @@ extern struct { unsigned day :5; unsigned mon :4; unsigned year :7; - } createdate; /* Current date: 0 */ + } createdate; /* Current date: 0 */ struct { unsigned char min; unsigned char hour; - } createtime; /* Current time: 0 */ + } createtime; /* Current time: 0 */ } _datetime; /* The addresses of the static drivers */ diff --git a/include/dbg.h b/include/dbg.h index 7b4f67e31..4cca826ec 100644 --- a/include/dbg.h +++ b/include/dbg.h @@ -39,7 +39,7 @@ ** are declared here. ** ** To use the debugger, just call DbgInit in your application. Once it has -** been called, the debugger will catch any BRK opcode. Use the BREAK macro +** been called, the debugger will catch any BRK opcode. Use the BREAK macro ** defined below to insert breakpoints into your code. ** ** There are currently a lot of things that cannot be debugged, graphical @@ -121,4 +121,4 @@ void __fastcall__ DbgInit (unsigned unused); - + diff --git a/include/errno.h b/include/errno.h index ae76b6c05..92d304938 100644 --- a/include/errno.h +++ b/include/errno.h @@ -84,7 +84,7 @@ extern int _errno; int __fastcall__ _osmaperrno (unsigned char oserror); -/* Map an operating system specific error code (for example from _oserror) +/* Map an operating system specific error code (for example from _oserror) ** into one of the E... codes above. It is user callable. */ diff --git a/include/geos/gmemory.h b/include/geos/gmemory.h index ba8e9f211..1e9ca83b4 100644 --- a/include/geos/gmemory.h +++ b/include/geos/gmemory.h @@ -12,7 +12,7 @@ void __fastcall__ CopyString(char *dest, const char *source); char __fastcall__ CmpString(const char *dest, const char *source); void __fastcall__ CopyFString(char len, char *dest, const char *source); -char __fastcall__ CmpFString(char len, char *dest, const char *source); +char __fastcall__ CmpFString(char len, char *dest, const char *source); unsigned __fastcall__ CRC(const char *buffer, unsigned len); void* __fastcall__ ClearRam(char *dest, unsigned len); diff --git a/include/stdlib.h b/include/stdlib.h index b929e8f02..99151317f 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -52,8 +52,8 @@ typedef unsigned size_t; /* Those non-standard cc65 exit constants definitions are in addition ** to the EXIT_SUCCESS and EXIT_FAILURE constants, which should not be -** redefined -*/ +** redefined +*/ #define EXIT_ASSERT 2 #define EXIT_ABORT 3 diff --git a/include/sys/utsname.h b/include/sys/utsname.h index a601d9eed..fdd87dec3 100644 --- a/include/sys/utsname.h +++ b/include/sys/utsname.h @@ -41,7 +41,7 @@ /*****************************************************************************/ /* Data */ /*****************************************************************************/ - + /* From f8f901b05e0bed721192132d85e50d14d2068adb Mon Sep 17 00:00:00 2001 From: mrdudz <mrdudz@users.noreply.github.com> Date: Sun, 17 Apr 2022 16:06:22 +0200 Subject: [PATCH 087/101] remove dangling spaces --- libsrc/apple2/exec.s | 2 +- libsrc/apple2/iobuf.s | 2 +- libsrc/apple2/mcbdefault.s | 4 +- libsrc/apple2/mou/a2.stdmou.s | 16 +++--- libsrc/apple2/opendir.c | 2 +- libsrc/apple2/write.s | 2 +- libsrc/atari/break.s | 2 +- libsrc/atari/cclear.s | 2 +- libsrc/atari/ctype.s | 2 +- libsrc/atari/cvline.s | 2 +- libsrc/atari/diopncls.s | 2 +- libsrc/atari/dioqsize.s | 2 +- libsrc/atari/doesclrscr.s | 2 +- libsrc/atari/emd/atr130.s | 50 +++++++++---------- libsrc/atari/mcbtxtchar.s | 2 +- libsrc/atari/randomize.s | 2 +- libsrc/atari/revers.s | 2 +- libsrc/atari/shadow_ram_handlers.s | 6 +-- libsrc/atari/system_check.s | 2 +- libsrc/atari/xlmemchk.inc | 2 +- libsrc/atari5200/conioscreen.s | 2 +- libsrc/atari5200/cvline.s | 2 +- libsrc/atari5200/extra/conioscreen-20x12.s | 2 +- libsrc/atari5200/joy/atr5200std.s | 2 +- libsrc/atari5200/randomize.s | 2 +- libsrc/atari5200/y2k.inc | 14 +++--- libsrc/atari7800/crt0.s | 6 +-- libsrc/atari7800/joy/atari7800-stdjoy.s | 2 +- libsrc/atmos/cclear.s | 4 +- libsrc/atmos/ctype.s | 2 +- libsrc/c128/emd/c128-vdc.s | 18 +++---- libsrc/c64/sysuname.s | 2 +- libsrc/cbm/cbm_save.c | 4 +- libsrc/cbm/ctype.s | 2 +- libsrc/cbm/opendir.c | 2 +- libsrc/cbm610/revers.s | 2 +- libsrc/common/_heap.s | 2 +- libsrc/common/_heapmaxavail.s | 2 +- libsrc/common/_longminstr.c | 4 +- libsrc/common/_seterrno.s | 2 +- libsrc/common/abort.c | 2 +- libsrc/common/ctypemask.s | 2 +- libsrc/common/divt.s | 4 +- libsrc/common/doesclrscr.s | 2 +- libsrc/common/fread.s | 2 +- libsrc/common/free.s | 2 +- libsrc/common/fsetpos.c | 2 +- libsrc/common/fwrite.s | 2 +- libsrc/common/getcwd.s | 2 +- libsrc/common/ltoa.s | 6 +-- libsrc/common/memcpy.s | 2 +- libsrc/common/memset.s | 4 +- libsrc/common/mul20.s | 4 +- libsrc/common/mul40.s | 4 +- libsrc/common/putenv.s | 2 +- libsrc/common/raise.s | 6 +-- libsrc/common/rewind.c | 2 +- libsrc/common/strcspn.s | 2 +- libsrc/common/strncat.s | 6 +-- libsrc/common/strrchr.s | 4 +- libsrc/common/ungetc.s | 2 +- libsrc/common/vsprintf.s | 2 +- libsrc/conio/cputs.s | 2 +- libsrc/conio/scrsize.s | 4 +- libsrc/creativision/_scrsize.s | 6 +-- libsrc/creativision/boxchars.inc | 10 ++-- libsrc/dbg/asmtab.s | 2 +- libsrc/dbg/dbg.c | 6 +-- libsrc/dbg/dbgdasm.s | 2 +- libsrc/em/em_load.s | 2 +- libsrc/gamate/cputc.s | 14 +++--- libsrc/geos-apple/disk/exitturbo.s | 4 +- libsrc/geos-cbm/disk/changediskdevice.s | 2 +- libsrc/geos-cbm/disk/chkdkgeos.s | 2 +- libsrc/geos-cbm/disk/dio_cts.s | 16 +++--- libsrc/geos-cbm/disk/dio_openclose.s | 4 +- libsrc/geos-cbm/disk/dio_stc.s | 48 +++++++++--------- libsrc/geos-cbm/disk/enterturbo.s | 2 +- libsrc/geos-cbm/disk/exitturbo.s | 2 +- libsrc/geos-cbm/disk/findbambit.s | 2 +- libsrc/geos-cbm/disk/newdisk.s | 2 +- libsrc/geos-cbm/disk/purgeturbo.s | 2 +- libsrc/geos-cbm/disk/readblock.s | 2 +- libsrc/geos-cbm/disk/readbuff.s | 2 +- libsrc/geos-cbm/disk/verwriteblock.s | 2 +- libsrc/geos-cbm/disk/writeblock.s | 2 +- libsrc/geos-cbm/disk/writebuff.s | 2 +- libsrc/geos-cbm/emd/geos-vdc.s | 36 ++++++------- libsrc/geos-cbm/file/followchain.s | 2 +- libsrc/geos-cbm/graph/setnewmode.s | 2 +- libsrc/geos-cbm/system/setdevice.s | 2 +- libsrc/geos-cbm/tgi/geos-tgi.s | 6 +-- libsrc/geos-common/common/zerobss.s | 2 +- libsrc/geos-common/conio/_scrsize.s | 4 +- libsrc/geos-common/conio/cputc.s | 2 +- libsrc/geos-common/conio/cvline.s | 2 +- libsrc/geos-common/disk/blkalloc.s | 2 +- libsrc/geos-common/disk/calcblksfree.s | 2 +- libsrc/geos-common/disk/freeblock.s | 2 +- libsrc/geos-common/disk/getblock.s | 2 +- libsrc/geos-common/disk/getptrcurdknm.s | 4 +- libsrc/geos-common/disk/nxtblkalloc.s | 2 +- libsrc/geos-common/disk/opendisk.s | 2 +- libsrc/geos-common/disk/putblock.s | 2 +- libsrc/geos-common/disk/putdirhead.s | 2 +- libsrc/geos-common/disk/setnextfree.s | 2 +- libsrc/geos-common/dlgbox/rstrfrmdialogue.s | 2 +- libsrc/geos-common/drivers/fio_module.s | 8 +-- libsrc/geos-common/drivers/geos-stdmou.s | 2 +- libsrc/geos-common/file/appendrecord.s | 2 +- libsrc/geos-common/file/closerecordfile.s | 2 +- libsrc/geos-common/file/deletefile.s | 2 +- libsrc/geos-common/file/deleterecord.s | 2 +- libsrc/geos-common/file/findfile.s | 2 +- libsrc/geos-common/file/freefile.s | 2 +- libsrc/geos-common/file/getfhdrinfo.s | 2 +- libsrc/geos-common/file/getfile.s | 2 +- libsrc/geos-common/file/openrecordfile.s | 2 +- libsrc/geos-common/file/pointrecord.s | 2 +- libsrc/geos-common/file/readfile.s | 2 +- libsrc/geos-common/file/readrecord.s | 2 +- libsrc/geos-common/file/writerecord.s | 2 +- libsrc/geos-common/geosmac.inc | 4 +- libsrc/geos-common/graph/bitotherclip.s | 2 +- libsrc/geos-common/graph/framerectangle.s | 2 +- libsrc/geos-common/graph/imprintrectangle.s | 4 +- libsrc/geos-common/graph/invertline.s | 2 +- libsrc/geos-common/graph/invertrectangle.s | 2 +- libsrc/geos-common/graph/recoverline.s | 2 +- libsrc/geos-common/graph/recoverrectangle.s | 4 +- libsrc/geos-common/graph/rectangle.s | 2 +- libsrc/geos-common/graph/testpoint.s | 2 +- libsrc/geos-common/graph/verticalline.s | 4 +- .../geos-common/mousesprite/ismseinregion.s | 2 +- libsrc/geos-common/process/processblock.s | 4 +- libsrc/geos-common/process/processfreeze.s | 4 +- .../process/processinitrestartenable.s | 4 +- libsrc/joystick/joy_load.s | 2 +- libsrc/lynx/bllhdr.s | 2 +- libsrc/lynx/bootldr.s | 2 +- libsrc/lynx/cgetc.s | 2 +- libsrc/lynx/eeprom.s | 2 +- libsrc/lynx/eeprom46.s | 2 +- libsrc/lynx/eeprom66.s | 2 +- libsrc/lynx/eeprom86.s | 2 +- libsrc/lynx/exec.s | 2 +- libsrc/lynx/kbhit.s | 2 +- libsrc/lynx/lynx-cart.s | 6 +-- libsrc/mouse/mouse_load.s | 2 +- libsrc/mouse/mouse_move.s | 2 +- libsrc/nes/cclear.s | 2 +- libsrc/nes/chline.s | 2 +- libsrc/nes/gotoy.s | 2 +- libsrc/nes/ppubuf.s | 2 +- libsrc/nes/sysuname.s | 2 +- libsrc/osic1p/cclear.s | 2 +- libsrc/pce/cclear.s | 2 +- libsrc/plus4/randomize.s | 2 +- libsrc/runtime/add.s | 4 +- libsrc/runtime/aslax1.s | 2 +- libsrc/runtime/decsp1.s | 2 +- libsrc/runtime/incsp1.s | 2 +- libsrc/runtime/incsp3.s | 2 +- libsrc/runtime/incsp4.s | 2 +- libsrc/runtime/incsp5.s | 2 +- libsrc/runtime/incsp6.s | 2 +- libsrc/runtime/incsp7.s | 2 +- libsrc/runtime/land.s | 6 +-- libsrc/runtime/ldauisp.s | 2 +- libsrc/runtime/leave.s | 2 +- libsrc/runtime/leq.s | 2 +- libsrc/runtime/lmod.s | 2 +- libsrc/runtime/lmul.s | 6 +-- libsrc/runtime/lor.s | 6 +-- libsrc/runtime/lpop.s | 2 +- libsrc/runtime/lpush.s | 4 +- libsrc/runtime/lrsub.s | 2 +- libsrc/runtime/lsub.s | 2 +- libsrc/runtime/lsubeq.s | 10 ++-- libsrc/runtime/ltest.s | 2 +- libsrc/runtime/ludiv.s | 2 +- libsrc/runtime/lumod.s | 2 +- libsrc/runtime/lxor.s | 2 +- libsrc/runtime/mul.s | 4 +- libsrc/runtime/mulax3.s | 2 +- libsrc/runtime/or.s | 2 +- libsrc/runtime/pushaff.s | 2 +- libsrc/runtime/pushax.s | 2 +- libsrc/runtime/return0.s | 2 +- libsrc/runtime/return1.s | 2 +- libsrc/runtime/swap.s | 6 +-- libsrc/runtime/umod.s | 2 +- libsrc/runtime/umul16x16r32.s | 2 +- libsrc/sym1/read.s | 2 +- libsrc/sym1/write.s | 2 +- libsrc/telestrat/cclear.s | 4 +- libsrc/telestrat/chline.s | 4 +- libsrc/telestrat/clrscr.s | 8 +-- libsrc/telestrat/cputc.s | 12 ++--- libsrc/telestrat/gotoxy.s | 4 +- libsrc/telestrat/joy/telestrat.s | 12 ++--- libsrc/telestrat/orixhdr.s | 2 +- libsrc/telestrat/sound.s | 2 +- libsrc/telestrat/syschdir.s | 6 +-- libsrc/telestrat/sysmkdir.s | 8 +-- libsrc/telestrat/tgi/telestrat-228-200-3.s | 38 +++++++------- libsrc/telestrat/tgi/telestrat-240-200-2.s | 44 ++++++++-------- libsrc/tgi/tgi_gettextheight.s | 2 +- libsrc/tgi/tgi_imulround.s | 4 +- libsrc/tgi/tgi_lineto.s | 2 +- libsrc/tgi/tgi_outtext.s | 2 +- libsrc/tgi/tgidrv_line.inc | 2 +- 212 files changed, 432 insertions(+), 432 deletions(-) diff --git a/libsrc/apple2/exec.s b/libsrc/apple2/exec.s index 9212ecb8a..0ff4bc6f0 100644 --- a/libsrc/apple2/exec.s +++ b/libsrc/apple2/exec.s @@ -18,7 +18,7 @@ typerr: lda #$4A ; "Incompatible file format" ; Cleanup name oserr: jsr popname ; Preserves A - + ; Set __oserror jmp __mappederrno diff --git a/libsrc/apple2/iobuf.s b/libsrc/apple2/iobuf.s index 77433ce61..f5aacb74a 100644 --- a/libsrc/apple2/iobuf.s +++ b/libsrc/apple2/iobuf.s @@ -2,7 +2,7 @@ ; Oliver Schmidt, 10.9.2009 ; ; Default ProDOS 8 I/O buffer management -; +; .export iobuf_alloc, iobuf_free .import _posix_memalign, _free diff --git a/libsrc/apple2/mcbdefault.s b/libsrc/apple2/mcbdefault.s index c24c5df56..556a9d8fb 100644 --- a/libsrc/apple2/mcbdefault.s +++ b/libsrc/apple2/mcbdefault.s @@ -8,13 +8,13 @@ ; .export _mouse_def_callbacks - + .include "apple2.inc" ; ------------------------------------------------------------------------ .bss - + backup: .res 1 visible:.res 1 diff --git a/libsrc/apple2/mou/a2.stdmou.s b/libsrc/apple2/mou/a2.stdmou.s index c3d10f057..dfc69a942 100644 --- a/libsrc/apple2/mou/a2.stdmou.s +++ b/libsrc/apple2/mou/a2.stdmou.s @@ -152,7 +152,7 @@ next: inc ptr1+1 sta xparam+1 sta jump+2 - ; Disable interrupts now because setting the slot number makes + ; Disable interrupts now because setting the slot number makes ; the IRQ handler (maybe called due to some non-mouse IRQ) try ; calling the firmware which isn't correctly set up yet sei @@ -167,7 +167,7 @@ next: inc ptr1+1 asl asl sta yparam+1 - + ; The AppleMouse II Card needs the ROM switched in ; to be able to detect an Apple //e and use RDVBL bit $C082 @@ -175,7 +175,7 @@ next: inc ptr1+1 ; Reset mouse hardware ldx #INITMOUSE jsr firmware - + ; Switch in LC bank 2 for R/O bit $C080 @@ -236,12 +236,12 @@ UNINSTALL: SETBOX: sta ptr1 stx ptr1+1 - + ; Set x clamps ldx #$00 ldy #MOUSE_BOX::MINX jsr :+ - + ; Set y clamps ldx #$01 ldy #MOUSE_BOX::MINY @@ -257,7 +257,7 @@ SETBOX: sta pos1_lo iny lda (ptr1),y - sta box,y + sta box,y sta pos1_hi ; Skip one word @@ -267,11 +267,11 @@ SETBOX: ; Set high clamp iny lda (ptr1),y - sta box,y + sta box,y sta pos2_lo iny lda (ptr1),y - sta box,y + sta box,y sta pos2_hi txa diff --git a/libsrc/apple2/opendir.c b/libsrc/apple2/opendir.c index 040593118..1144d8511 100644 --- a/libsrc/apple2/opendir.c +++ b/libsrc/apple2/opendir.c @@ -57,7 +57,7 @@ extern char _cwd[FILENAME_MAX]; -DIR* __fastcall__ opendir (register const char* name) +DIR* __fastcall__ opendir (register const char* name) { register DIR* dir; diff --git a/libsrc/apple2/write.s b/libsrc/apple2/write.s index 21f4a45a4..d9dd73ca9 100644 --- a/libsrc/apple2/write.s +++ b/libsrc/apple2/write.s @@ -111,4 +111,4 @@ errno: jmp __directerrno ; Set __oserror oserr: jmp __mappederrno - + diff --git a/libsrc/atari/break.s b/libsrc/atari/break.s index 0cfba1c5a..ae4c8e007 100644 --- a/libsrc/atari/break.s +++ b/libsrc/atari/break.s @@ -63,7 +63,7 @@ L1: lda #<brk_handler ; Set the break vector to our routine lda #$00 sta oldvec ; Clear the old vector stx oldvec+1 -@L9: rts +@L9: rts .endproc diff --git a/libsrc/atari/cclear.s b/libsrc/atari/cclear.s index 7fe3f0f1b..3d3b841cf 100644 --- a/libsrc/atari/cclear.s +++ b/libsrc/atari/cclear.s @@ -17,7 +17,7 @@ _cclearxy: _cclear: cmp #0 ; Is the length zero? beq L9 ; Jump if done - sta tmp1 + sta tmp1 L1: lda #0 ; Blank - screen code jsr cputdirect ; Direct output dec tmp1 diff --git a/libsrc/atari/ctype.s b/libsrc/atari/ctype.s index 2f219f8c3..ca2d3a67f 100644 --- a/libsrc/atari/ctype.s +++ b/libsrc/atari/ctype.s @@ -12,7 +12,7 @@ .include "ctypetable.inc" .export __ctypeidx - + ; The tables are readonly, put them into the rodata segment .rodata diff --git a/libsrc/atari/cvline.s b/libsrc/atari/cvline.s index 735e47dd2..96ceef5c1 100644 --- a/libsrc/atari/cvline.s +++ b/libsrc/atari/cvline.s @@ -5,7 +5,7 @@ ; void cvline (unsigned char length); ; .include "atari.inc" - + .export _cvlinexy, _cvline .import gotoxy, putchar, setcursor .importzp tmp1 diff --git a/libsrc/atari/diopncls.s b/libsrc/atari/diopncls.s index 2cdeba78b..528c0fad8 100644 --- a/libsrc/atari/diopncls.s +++ b/libsrc/atari/diopncls.s @@ -137,7 +137,7 @@ _dio_open: iny lda #1 -finish: sta (ptr2),y ; set default sector size +finish: sta (ptr2),y ; set default sector size fini2: lda ptr2 ldx ptr2+1 rts diff --git a/libsrc/atari/dioqsize.s b/libsrc/atari/dioqsize.s index f26667af7..caef0588f 100644 --- a/libsrc/atari/dioqsize.s +++ b/libsrc/atari/dioqsize.s @@ -12,7 +12,7 @@ .proc _dio_query_sectsize sta ptr1 ; handle - stx ptr1+1 + stx ptr1+1 lda #0 sta __oserror diff --git a/libsrc/atari/doesclrscr.s b/libsrc/atari/doesclrscr.s index f937f9ac5..4b2f30b2a 100644 --- a/libsrc/atari/doesclrscr.s +++ b/libsrc/atari/doesclrscr.s @@ -12,7 +12,7 @@ .ifdef __ATARIXL__ _doesclrscrafterexit = return1 ; the c65 runtime always clears the screen at program termination -.else +.else _doesclrscrafterexit: jsr __is_cmdline_dos ; currently (unless a DOS behaving differently is popping up) eor #$01 ; we can get by with the inverse of __is_cmdline_dos diff --git a/libsrc/atari/emd/atr130.s b/libsrc/atari/emd/atr130.s index f2d5777d5..7f4d51590 100644 --- a/libsrc/atari/emd/atr130.s +++ b/libsrc/atari/emd/atr130.s @@ -11,7 +11,7 @@ ; Bit 2: bank control ; Bit 1: BASIC on/off ; Bit 0: OS RAM on/off -; +; ; Masks: %11100011 $E3 Bank 0 ; %11100111 $E7 Bank 1 ; %11101011 $EB Bank 2 @@ -67,7 +67,7 @@ ; Constants BANK = $4000 ; bank window -STACK = $0100 ; stack location +STACK = $0100 ; stack location PAGES = 256 ; 4 x 16k banks @@ -93,17 +93,17 @@ stacktest: sei @2: sta $4000 ; restore cli rts -stacktest_end: +stacktest_end: stackcopy: sei ; disable interrupts @1: dex ; pre-decrement (full page x=0) ldy #$FF ; this will be replaced STACK+3 - sty $D301 ; set bank + sty $D301 ; set bank lda $FF00,x ; address to copy from STACK+8,+9 ldy #$FF ; this will be replaced STACK+11 - sty $D301 + sty $D301 sta $FF00,x ; address to copy to STACK+16,+17 - cpx #0 + cpx #0 bne @1 ldy #$FF ; portb_save STACK+23 sty $D301 @@ -122,7 +122,7 @@ stackcopy_byte: sei sty $D301 cli rts -stackcopy_byte_end: +stackcopy_byte_end: .data @@ -186,14 +186,14 @@ setpage: INSTALL: lda $D301 ; save state of portb sta portb_save - tay + tay jsr install_test ; doesn't touch Y sty STACK+13 lda $4000 ; test for extended memory jsr STACK - bcs @1 + bcs @1 lda #EM_ERR_OK rts @1: lda #EM_ERR_NO_DEVICE @@ -242,7 +242,7 @@ MAP: jsr setpage ; extract the bank/page lda banks,x sta STACK+3 ; set bank to copy from ; lda ptr1 -; sta STACK+8 +; sta STACK+8 lda ptr1+1 sta STACK+9 ; set copy from address lda portb_save @@ -251,10 +251,10 @@ MAP: jsr setpage ; extract the bank/page lda ptr2 sta STACK+16 lda ptr2+1 - sta STACK+17 ; set copy to address + sta STACK+17 ; set copy to address ldx #0 ; full page copy - jsr STACK ; do the copy! + jsr STACK ; do the copy! ; Return the memory window @@ -298,7 +298,7 @@ COMMIT: lda curpage ; Get the current page sta STACK+3 ; set bank to copy from sta STACK+23 ; set final portb restore lda ptr1 - sta STACK+8 + sta STACK+8 lda ptr1+1 sta STACK+9 ; set copy from address ldx curbank @@ -307,10 +307,10 @@ COMMIT: lda curpage ; Get the current page ;lda ptr2 ;sta STACK+16 lda ptr2+1 - sta STACK+17 ; set copy to address + sta STACK+17 ; set copy to address ldx #0 ; full page copy - jsr STACK ; do the copy! + jsr STACK ; do the copy! commit_done: rts @@ -329,7 +329,7 @@ COPYFROM: ldy #EM_COPY::OFFS lda (ptr3),y - sta STACK+7 ; offset goes into BANK low + sta STACK+7 ; offset goes into BANK low ldy #EM_COPY::PAGE lda (ptr3),y @@ -357,9 +357,9 @@ COPYFROM: add #>BANK ; add to BANK address sta STACK+8 ; current page in bank ldx curbank - lda banks,x - sta STACK+2 ; set bank in stack - lda portb_save + lda banks,x + sta STACK+2 ; set bank in stack + lda portb_save sta STACK+10 ; set bank restore in stack sta STACK+18 ; set final restore too @@ -399,7 +399,7 @@ copyfrom_copy: bne @3 inc STACK+16 -@3: jmp copyfrom_copy ; copy another byte +@3: jmp copyfrom_copy ; copy another byte done: rts @@ -418,7 +418,7 @@ COPYTO: ldy #EM_COPY::OFFS lda (ptr3),y - sta STACK+15 ; offset goes into BANK low + sta STACK+15 ; offset goes into BANK low ldy #EM_COPY::PAGE lda (ptr3),y @@ -446,9 +446,9 @@ COPYTO: add #>BANK ; add to BANK address sta STACK+16 ; current page in bank ldx curbank - lda banks,x - sta STACK+10 ; set bank in stack - lda portb_save + lda banks,x + sta STACK+10 ; set bank in stack + lda portb_save sta STACK+2 ; set bank restore in stack sta STACK+18 ; set final restore too @@ -488,5 +488,5 @@ copyto_copy: bne @3 inc STACK+8 -@3: jmp copyto_copy ; copy another byte +@3: jmp copyto_copy ; copy another byte diff --git a/libsrc/atari/mcbtxtchar.s b/libsrc/atari/mcbtxtchar.s index 4ff79c651..95dd1651a 100644 --- a/libsrc/atari/mcbtxtchar.s +++ b/libsrc/atari/mcbtxtchar.s @@ -74,7 +74,7 @@ prep: jsr getcursor ; Get character at cursor position cmp #mouse_txt_char ; "mouse" character bne overwr ; no, probably program has overwritten it - lda backup ; + lda backup ; jmp setcursor ; Draw character overwr: sta backup rts diff --git a/libsrc/atari/randomize.s b/libsrc/atari/randomize.s index ed4400b55..915fee3bd 100644 --- a/libsrc/atari/randomize.s +++ b/libsrc/atari/randomize.s @@ -10,7 +10,7 @@ .include "atari.inc" -__randomize: +__randomize: ldx VCOUNT ; Use vertical line counter as high byte lda RTCLOK+2 ; Use clock as low byte jmp _srand ; Initialize generator diff --git a/libsrc/atari/revers.s b/libsrc/atari/revers.s index 719503940..23126a88f 100644 --- a/libsrc/atari/revers.s +++ b/libsrc/atari/revers.s @@ -4,7 +4,7 @@ ; unsigned char revers (unsigned char onoff); ; .include "atari.inc" - + .export _revers .export _revflag diff --git a/libsrc/atari/shadow_ram_handlers.s b/libsrc/atari/shadow_ram_handlers.s index a8ba611b6..eaea35195 100644 --- a/libsrc/atari/shadow_ram_handlers.s +++ b/libsrc/atari/shadow_ram_handlers.s @@ -737,9 +737,9 @@ fn_cont:jsr get_fn_len lda #0 sta ICBLH,x jsr chk_CIO_buf - pla + pla sta ICBLH,x - pla + pla sta ICBLL,x pla tay @@ -756,7 +756,7 @@ chk_CIO_buf: lda ICBAH,x cmp #$c0 bcc @cont -@ret: +@ret: .ifdef DEBUG jsr CIO_buf_noti .endif diff --git a/libsrc/atari/system_check.s b/libsrc/atari/system_check.s index df7c433a4..762fc954f 100644 --- a/libsrc/atari/system_check.s +++ b/libsrc/atari/system_check.s @@ -93,7 +93,7 @@ sdnobw: lda DOS+1 ; SD version ldy #31 ; offset for OSRMFLG lda (DOSVEC),y ; get OSRMFLG bne sdcrts1 - + sdcrts0:clc rts sdcrts1:sec diff --git a/libsrc/atari/xlmemchk.inc b/libsrc/atari/xlmemchk.inc index f8be1c137..ecb874799 100644 --- a/libsrc/atari/xlmemchk.inc +++ b/libsrc/atari/xlmemchk.inc @@ -7,7 +7,7 @@ ; It calculates the value to put into RAMTOP for a subsequent ; "GRAPHICS 0" call, and the lowest address which will be used ; by the screen memory afterwards. -; +; ; inputs: ; __STARTADDRESS__ - load address of the program ; outputs: diff --git a/libsrc/atari5200/conioscreen.s b/libsrc/atari5200/conioscreen.s index 1311e874c..8c78fd44f 100644 --- a/libsrc/atari5200/conioscreen.s +++ b/libsrc/atari5200/conioscreen.s @@ -74,7 +74,7 @@ conio_color: .res 1 dlist: .repeat 3 .byte DL_BLK8 .endrepeat - + .byte DL_CHR20x8x2 | DL_LMS .word SCREEN_BUF diff --git a/libsrc/atari5200/cvline.s b/libsrc/atari5200/cvline.s index 204d90382..b4b3f1a3e 100644 --- a/libsrc/atari5200/cvline.s +++ b/libsrc/atari5200/cvline.s @@ -5,7 +5,7 @@ ; void cvline (unsigned char length); ; .include "atari5200.inc" - + .export _cvlinexy, _cvline .import gotoxy, putchar .importzp tmp1 diff --git a/libsrc/atari5200/extra/conioscreen-20x12.s b/libsrc/atari5200/extra/conioscreen-20x12.s index e591bf05a..aeb11cb43 100644 --- a/libsrc/atari5200/extra/conioscreen-20x12.s +++ b/libsrc/atari5200/extra/conioscreen-20x12.s @@ -74,7 +74,7 @@ conio_color: .res 1 dlist: .repeat 3 .byte DL_BLK8 .endrepeat - + .byte DL_CHR20x16x2 | DL_LMS .word SCREEN_BUF diff --git a/libsrc/atari5200/joy/atr5200std.s b/libsrc/atari5200/joy/atr5200std.s index 989bc5ee0..fb7946bea 100644 --- a/libsrc/atari5200/joy/atr5200std.s +++ b/libsrc/atari5200/joy/atr5200std.s @@ -44,7 +44,7 @@ ; INSTALL: - lda #$04 ; enable POT input from the joystick ports, see section "GTIA" in + lda #$04 ; enable POT input from the joystick ports, see section "GTIA" in sta CONSOL ; http://www.atarimuseum.com/videogames/consoles/5200/conv_to_5200.html lda #JOY_ERR_OK ldx #0 diff --git a/libsrc/atari5200/randomize.s b/libsrc/atari5200/randomize.s index ef462827e..978ccf3f3 100644 --- a/libsrc/atari5200/randomize.s +++ b/libsrc/atari5200/randomize.s @@ -10,7 +10,7 @@ .include "atari5200.inc" -__randomize: +__randomize: ldx VCOUNT ; Use vertical line counter as high byte lda RTCLOK+1 ; Use clock as low byte jmp _srand ; Initialize generator diff --git a/libsrc/atari5200/y2k.inc b/libsrc/atari5200/y2k.inc index f8531451c..9f7917cd3 100644 --- a/libsrc/atari5200/y2k.inc +++ b/libsrc/atari5200/y2k.inc @@ -9,16 +9,16 @@ Y2K LDY #$00 ; Copy BIOS opening screen to RAM CPX #$E8 ; Is this a 4 port? BNE Y2K0 ; Jump if not LDA #$42 ; Yes, 4 port system -Y2K0 STA TEMPL -Y2K1 LDA (TEMPL),Y +Y2K0 STA TEMPL +Y2K1 LDA (TEMPL),Y STA $0600,Y - INY + INY BNE Y2K1 LDY #$50 INC TEMPH -Y2K2 LDA (TEMPL),Y +Y2K2 LDA (TEMPL),Y STA $0700,Y - DEY + DEY BPL Y2K2 LDA #$D4 ; Point to copyright string STA $0724 @@ -26,8 +26,8 @@ Y2K2 LDA (TEMPL),Y STA $0725 LDX #$0B ; Store NOP's @ end LDA #$EA -Y2K3 STA $0732,X - DEX +Y2K3 STA $0732,X + DEX BPL Y2K3 LDA #$60 ; Store RTS opcode @ end STA $0750 diff --git a/libsrc/atari7800/crt0.s b/libsrc/atari7800/crt0.s index cefe16730..e791179f3 100644 --- a/libsrc/atari7800/crt0.s +++ b/libsrc/atari7800/crt0.s @@ -19,7 +19,7 @@ start: sei ; Initialize 6502 cld lda #$07 ; Lock machine in 7800 mode - sta INPTCTRL + sta INPTCTRL lda #$7f ; DMA off sta CTRL ldx #0 ; OFFSET must always be 0 @@ -28,7 +28,7 @@ start: dex ; Stack pointer = $ff txs - ; Set up parameter stack + ; Set up parameter stack lda #<(__RAM3_START__ + __RAM3_SIZE__) sta sp lda #>(__RAM3_START__ + __RAM3_SIZE__) @@ -48,7 +48,7 @@ _exit: jsr donelib jmp start -NMIHandler: +NMIHandler: inc _zonecounter jmp IRQStub diff --git a/libsrc/atari7800/joy/atari7800-stdjoy.s b/libsrc/atari7800/joy/atari7800-stdjoy.s index cea6625a4..d76e1d105 100644 --- a/libsrc/atari7800/joy/atari7800-stdjoy.s +++ b/libsrc/atari7800/joy/atari7800-stdjoy.s @@ -85,7 +85,7 @@ COUNT: rts ; ------------------------------------------------------------------------ -; READ: Read a particular joystick passed in A for 2 fire buttons. +; READ: Read a particular joystick passed in A for 2 fire buttons. readbuttons: ; Y has joystick of interest 0/1 diff --git a/libsrc/atmos/cclear.s b/libsrc/atmos/cclear.s index 9d356a8ab..f6416363c 100644 --- a/libsrc/atmos/cclear.s +++ b/libsrc/atmos/cclear.s @@ -6,7 +6,7 @@ ; .export _cclearxy, _cclear - .import setscrptr + .import setscrptr .import rvs .import popax .importzp ptr2 @@ -25,7 +25,7 @@ _cclear: tax ; Is the length zero? beq @L9 ; Jump if done jsr setscrptr ; Set ptr2 to screen, won't use X - lda #' ' + lda #' ' ora rvs @L1: sta (ptr2),y ; Write one char iny ; Next char diff --git a/libsrc/atmos/ctype.s b/libsrc/atmos/ctype.s index 90a3baa6e..57ad8c1a3 100644 --- a/libsrc/atmos/ctype.s +++ b/libsrc/atmos/ctype.s @@ -119,7 +119,7 @@ __ctypeidx: ct_mix CT_NONE_IDX, CT_NONE_IDX ; 186/ba ___________, 187/bb ___________ ct_mix CT_NONE_IDX, CT_NONE_IDX ; 188/bc ___________, 189/bd ___________ ct_mix CT_NONE_IDX, CT_NONE_IDX ; 190/be ___________, 191/bf ___________ - + ct_mix CT_UPPER_IDX, CT_UPPER_IDX ; 192/c0 ___________, 193/c1 ___________ ct_mix CT_UPPER_IDX, CT_UPPER_IDX ; 194/c2 ___________, 195/c3 ___________ ct_mix CT_UPPER_IDX, CT_UPPER_IDX ; 196/c4 ___________, 197/c5 ___________ diff --git a/libsrc/c128/emd/c128-vdc.s b/libsrc/c128/emd/c128-vdc.s index e294ddc18..accb82154 100644 --- a/libsrc/c128/emd/c128-vdc.s +++ b/libsrc/c128/emd/c128-vdc.s @@ -73,7 +73,7 @@ INSTALL: lda #$ff sta curpage sta curpage+1 - + ; do test for VDC presence here??? ldx #VDC_CSET ; determine size of RAM... jsr vdcgetreg @@ -97,29 +97,29 @@ INSTALL: jsr vdcputbyte ; restore original value of test byte ldx #0 ; prepare x with hi of default pagecount - + lda ptr1 ; do bytes match? cmp ptr1+1 bne @have64k lda ptr2 cmp ptr2+1 bne @have64k - + lda #64 ; assumes x = 0, here -> p.c = 64 bne @setpagecnt -@have64k: +@have64k: txa ; assumes x = 0, here inx ; so that a/x becomes 0/1 -> p.c. = 256 -@setpagecnt: +@setpagecnt: sta pagecount stx pagecount+1 txa - bne @keep64kBit - + bne @keep64kBit + ldx #VDC_CSET ; restore 16/64k flag - lda vdc_cset_save - jsr vdcputreg + lda vdc_cset_save + jsr vdcputreg @keep64kBit: lda #<EM_ERR_OK ldx #>EM_ERR_OK diff --git a/libsrc/c64/sysuname.s b/libsrc/c64/sysuname.s index 2d185a1c8..1903986c9 100644 --- a/libsrc/c64/sysuname.s +++ b/libsrc/c64/sysuname.s @@ -12,7 +12,7 @@ ;-------------------------------------------------------------------------- ; Data. We define a fixed utsname struct here and just copy it. - + .rodata utsdata: diff --git a/libsrc/cbm/cbm_save.c b/libsrc/cbm/cbm_save.c index 7f774b1b6..2e22b89fc 100644 --- a/libsrc/cbm/cbm_save.c +++ b/libsrc/cbm/cbm_save.c @@ -12,9 +12,9 @@ /* saves a memory area from start to end-1 to a file. */ -unsigned char __fastcall__ cbm_save (const char* name, +unsigned char __fastcall__ cbm_save (const char* name, unsigned char device, - const void* data, + const void* data, unsigned int size) { cbm_k_setlfs(0, device, 0); diff --git a/libsrc/cbm/ctype.s b/libsrc/cbm/ctype.s index 7388f68b8..a66905fe7 100644 --- a/libsrc/cbm/ctype.s +++ b/libsrc/cbm/ctype.s @@ -13,7 +13,7 @@ .include "ctypetable.inc" .export __ctypeidx - + ; The tables are readonly, put them into the rodata segment .rodata diff --git a/libsrc/cbm/opendir.c b/libsrc/cbm/opendir.c index b39e6b77e..87b9ab73d 100644 --- a/libsrc/cbm/opendir.c +++ b/libsrc/cbm/opendir.c @@ -38,7 +38,7 @@ DIR* __fastcall__ opendir (register const char* name) d.fd = open (d.name, O_RDONLY); if (d.fd >= 0) { - /* Skip the load address */ + /* Skip the load address */ if (_dirread (&d, buf, sizeof (buf))) { /* Allocate memory for the DIR structure returned */ diff --git a/libsrc/cbm610/revers.s b/libsrc/cbm610/revers.s index eb44f0282..78b8a0591 100644 --- a/libsrc/cbm610/revers.s +++ b/libsrc/cbm610/revers.s @@ -9,7 +9,7 @@ .import RVS: zp .include "cbm610.inc" - + .proc _revers diff --git a/libsrc/common/_heap.s b/libsrc/common/_heap.s index e2470577a..4ec8c80cd 100644 --- a/libsrc/common/_heap.s +++ b/libsrc/common/_heap.s @@ -39,4 +39,4 @@ initheap: sta __heapend+1 rts - + diff --git a/libsrc/common/_heapmaxavail.s b/libsrc/common/_heapmaxavail.s index 4d44fadc1..19ae18b8d 100644 --- a/libsrc/common/_heapmaxavail.s +++ b/libsrc/common/_heapmaxavail.s @@ -6,7 +6,7 @@ ; size_t _heapmaxavail (void); ; ; - + .importzp ptr1, ptr2 .export __heapmaxavail diff --git a/libsrc/common/_longminstr.c b/libsrc/common/_longminstr.c index ffc35aa77..28a19f39b 100644 --- a/libsrc/common/_longminstr.c +++ b/libsrc/common/_longminstr.c @@ -1,9 +1,9 @@ /* ** Ullrich von Bassewitz, 2012-11-26 ** -** Minimum value of a long. Is used in ascii conversions, since this value +** Minimum value of a long. Is used in ascii conversions, since this value ** has no positive counterpart than can be represented in 32 bits. In C, -** since the compiler will convert to the correct character set for the +** since the compiler will convert to the correct character set for the ** target platform. */ diff --git a/libsrc/common/_seterrno.s b/libsrc/common/_seterrno.s index e35c0b342..79021143a 100644 --- a/libsrc/common/_seterrno.s +++ b/libsrc/common/_seterrno.s @@ -2,7 +2,7 @@ ; Ullrich von Bassewitz, 2004-05-13 ; ; __seterrno: Will set __errno to the value in A and return zero in A. Other -; registers aren't changed. The function is C callable, but +; registers aren't changed. The function is C callable, but ; currently only called from asm code. ; diff --git a/libsrc/common/abort.c b/libsrc/common/abort.c index 1dda559bb..1100d33a3 100644 --- a/libsrc/common/abort.c +++ b/libsrc/common/abort.c @@ -7,7 +7,7 @@ #include <stdio.h> -#include <stdlib.h> +#include <stdlib.h> #include <signal.h> diff --git a/libsrc/common/ctypemask.s b/libsrc/common/ctypemask.s index b518a10c0..9238f24e9 100644 --- a/libsrc/common/ctypemask.s +++ b/libsrc/common/ctypemask.s @@ -9,7 +9,7 @@ ; ; ctypemask(int c) ; -; converts a character to test via the is*-functions to the matching ctype-masks +; converts a character to test via the is*-functions to the matching ctype-masks ; If c is out of the 8-bit range, the function returns with carry set and accu cleared. ; Return value is in accu and x has to be always clear when returning ; (makes calling code shorter)! diff --git a/libsrc/common/divt.s b/libsrc/common/divt.s index 914eb569d..7f2b4e1bb 100644 --- a/libsrc/common/divt.s +++ b/libsrc/common/divt.s @@ -18,10 +18,10 @@ .importzp sreg, ptr1, tmp1 _div: jsr tosdivax ; Division-operator does most of the work - + ldy sreg ; low byte remainder from sreg sta sreg ; store low byte quotient to sreg - + lda sreg+1 ; high byte remainder from sreg stx sreg+1 ; store high byte quotient to sreg diff --git a/libsrc/common/doesclrscr.s b/libsrc/common/doesclrscr.s index 49ce2fd12..14d9ab804 100644 --- a/libsrc/common/doesclrscr.s +++ b/libsrc/common/doesclrscr.s @@ -7,6 +7,6 @@ ; .export _doesclrscrafterexit - .import return0 + .import return0 _doesclrscrafterexit = return0 diff --git a/libsrc/common/fread.s b/libsrc/common/fread.s index 91d692985..c0733994e 100644 --- a/libsrc/common/fread.s +++ b/libsrc/common/fread.s @@ -161,7 +161,7 @@ bne @L8 ; Error in read. Set the stream error flag and bail out. errno has already -; been set by read(). On entry to label @L7, X must be zero. +; been set by read(). On entry to label @L7, X must be zero. inx ; X = 0 lda #_FERROR diff --git a/libsrc/common/free.s b/libsrc/common/free.s index 00b5e63f8..53796303c 100644 --- a/libsrc/common/free.s +++ b/libsrc/common/free.s @@ -274,7 +274,7 @@ _free: sta ptr2 ; } ; } ; -; +; ; On entry, ptr2 must contain a pointer to the block, which must be at least ; HEAP_MIN_BLOCKSIZE bytes in size, and ptr1 contains the total size of the ; block. diff --git a/libsrc/common/fsetpos.c b/libsrc/common/fsetpos.c index 14690f520..a0cf8d31f 100644 --- a/libsrc/common/fsetpos.c +++ b/libsrc/common/fsetpos.c @@ -21,4 +21,4 @@ int __fastcall__ fsetpos (FILE* f, const fpos_t *pos) return fseek (f, (fpos_t)*pos, SEEK_SET); } - + diff --git a/libsrc/common/fwrite.s b/libsrc/common/fwrite.s index dc0bad1b6..b0fa7ec42 100644 --- a/libsrc/common/fwrite.s +++ b/libsrc/common/fwrite.s @@ -19,7 +19,7 @@ ; ------------------------------------------------------------------------ ; Code - + .proc _fwrite ; Save file and place it into ptr1 diff --git a/libsrc/common/getcwd.s b/libsrc/common/getcwd.s index 4bfc0a5b6..9b856ea7c 100644 --- a/libsrc/common/getcwd.s +++ b/libsrc/common/getcwd.s @@ -53,7 +53,7 @@ overflow: lda #<ERANGE jsr __seterrno ; Returns 0 in A tax ; Return zero - rts + rts ; Success, return buf diff --git a/libsrc/common/ltoa.s b/libsrc/common/ltoa.s index d8d8c988d..78e43e23f 100644 --- a/libsrc/common/ltoa.s +++ b/libsrc/common/ltoa.s @@ -56,7 +56,7 @@ L1: lda __longminstr,y ; copy -2147483648 dey bpl L1 jmp L10 - + ; Check if the value is negative. If so, write a - sign and negate the ; number. @@ -66,7 +66,7 @@ L2: txa ; get high byte .if (.cpu .bitand CPU_ISET_65SC02) sta (ptr2) -.else +.else ldy #0 sta (ptr2),y ; store sign .endif @@ -79,7 +79,7 @@ L3: lda ptr1 ; negate val ldx ptr1+1 jsr negeax - + sta ptr1 stx ptr1+1 jmp ultoa diff --git a/libsrc/common/memcpy.s b/libsrc/common/memcpy.s index 1ee53be07..fd090c788 100644 --- a/libsrc/common/memcpy.s +++ b/libsrc/common/memcpy.s @@ -67,7 +67,7 @@ memcpy_getparams: ; IMPORTANT! Function has to leave with Y=0! jsr popptr1 ; save src to ptr1 ; save dest to ptr2 - iny ; Y=0 guaranteed by popptr1, we need '1' here... + iny ; Y=0 guaranteed by popptr1, we need '1' here... ; (direct stack access is three cycles faster ; (total cycle count with return)) lda (sp),y diff --git a/libsrc/common/memset.s b/libsrc/common/memset.s index 96f5d9e11..a57a90e5c 100644 --- a/libsrc/common/memset.s +++ b/libsrc/common/memset.s @@ -87,7 +87,7 @@ L3: dey sta (ptr1),y ; set bytes in low sta (ptr2),y ; and high section bne L3 ; flags still up to date from dey! -leave: +leave: jmp popax ; Pop ptr and return as result - + diff --git a/libsrc/common/mul20.s b/libsrc/common/mul20.s index 5b3bbf830..ba29b94dd 100644 --- a/libsrc/common/mul20.s +++ b/libsrc/common/mul20.s @@ -9,7 +9,7 @@ ; ; ; unsigned int __fastcall__ mul20(unsigned char value); -; +; ; REMARKS: Function is defined to return with carry-flag cleared @@ -34,7 +34,7 @@ mul5: adc tmp4 ; * 5 inx ; yes, correct... mul10: stx tmp4 ; continue with classic shifting... - + asl a ; * 10 rol tmp4 diff --git a/libsrc/common/mul40.s b/libsrc/common/mul40.s index 07d6164b5..06780a6e0 100644 --- a/libsrc/common/mul40.s +++ b/libsrc/common/mul40.s @@ -9,7 +9,7 @@ ; ; ; unsigned int __fastcall__ mul40(unsigned char value); -; +; ; REMARKS: Function is defined to return with carry-flag cleared @@ -34,7 +34,7 @@ mul5: adc tmp4 ; * 5 inx ; yes, correct... mul10: stx tmp4 ; continue with classic shifting... - + asl a ; * 10 rol tmp4 diff --git a/libsrc/common/putenv.s b/libsrc/common/putenv.s index 7e44a7cd8..c68d20a32 100644 --- a/libsrc/common/putenv.s +++ b/libsrc/common/putenv.s @@ -185,4 +185,4 @@ error: jsr __seterrno name: .addr 0 ; Pointer to name newsize: .byte 0 ; New environment size - + diff --git a/libsrc/common/raise.s b/libsrc/common/raise.s index db96cdcd0..07898ef90 100644 --- a/libsrc/common/raise.s +++ b/libsrc/common/raise.s @@ -28,9 +28,9 @@ _raise: sta jmpvec+1 lda sigtable+1,x sta jmpvec+2 - + ; Reset the signal handler to SIG_DFL (I don't like this because it may -; introduce race conditions, but it's the simplest way to satisfy the +; introduce race conditions, but it's the simplest way to satisfy the ; standard). lda #<__sig_dfl @@ -51,4 +51,4 @@ _raise: invalidsig: rts - + diff --git a/libsrc/common/rewind.c b/libsrc/common/rewind.c index a4cdfa97c..333230b74 100644 --- a/libsrc/common/rewind.c +++ b/libsrc/common/rewind.c @@ -22,4 +22,4 @@ void __fastcall__ rewind (FILE* f) clearerr(f); } - + diff --git a/libsrc/common/strcspn.s b/libsrc/common/strcspn.s index 9cf159218..4bb01479a 100644 --- a/libsrc/common/strcspn.s +++ b/libsrc/common/strcspn.s @@ -20,7 +20,7 @@ _strcspn: sta tmp1 ; tmp1 = strlen of test chars jsr popptr1 ; get and save s1 to ptr1 - + ldx #0 ; low counter byte stx tmp2 ; high counter byte diff --git a/libsrc/common/strncat.s b/libsrc/common/strncat.s index 060378442..75572db7c 100644 --- a/libsrc/common/strncat.s +++ b/libsrc/common/strncat.s @@ -9,19 +9,19 @@ .import popax, popptr1 .importzp ptr1, ptr2, ptr3, tmp1, tmp2 .macpack cpu - + _strncat: inx stx tmp2 tax inx stx tmp1 ; save count with each byte incremented separately - + jsr popptr1 ; get src jsr popax ; get dest sta ptr3 ; remember for function return - stx ptr3+1 + stx ptr3+1 stx ptr2+1 tay ; low byte as offset in Y .if (.cpu .bitand ::CPU_ISET_65SC02) diff --git a/libsrc/common/strrchr.s b/libsrc/common/strrchr.s index 3e4fb0810..2858337b5 100644 --- a/libsrc/common/strrchr.s +++ b/libsrc/common/strrchr.s @@ -16,8 +16,8 @@ _strrchr: stx ptr1+1 ldx #0 ; default function result is NULL, X is high byte... stx tmp2 ; tmp2 is low-byte - stx ptr1 ; low-byte of source string is in Y, so clear real one... - + stx ptr1 ; low-byte of source string is in Y, so clear real one... + testChar: lda (ptr1),y ; get char beq finished ; jump if end of string diff --git a/libsrc/common/ungetc.s b/libsrc/common/ungetc.s index 386c450a8..88595068c 100644 --- a/libsrc/common/ungetc.s +++ b/libsrc/common/ungetc.s @@ -68,4 +68,4 @@ error: lda #EINVAL rts .endproc - + diff --git a/libsrc/common/vsprintf.s b/libsrc/common/vsprintf.s index eb47dae18..b4cb9c419 100644 --- a/libsrc/common/vsprintf.s +++ b/libsrc/common/vsprintf.s @@ -30,7 +30,7 @@ _vsprintf: ldy #2 jsr staxysp -; Contine by jumping to vsnprintf, which expects ap on the CPU stack and will +; Contine by jumping to vsnprintf, which expects ap on the CPU stack and will ; cleanup the C stack jmp vsnprintf diff --git a/libsrc/conio/cputs.s b/libsrc/conio/cputs.s index ef7c65462..41191a0b0 100644 --- a/libsrc/conio/cputs.s +++ b/libsrc/conio/cputs.s @@ -8,7 +8,7 @@ .export _cputsxy, _cputs .import gotoxy, _cputc .importzp ptr1, tmp1 - + _cputsxy: sta ptr1 ; Save s for later stx ptr1+1 diff --git a/libsrc/conio/scrsize.s b/libsrc/conio/scrsize.s index 014b6f08b..834c14820 100644 --- a/libsrc/conio/scrsize.s +++ b/libsrc/conio/scrsize.s @@ -10,7 +10,7 @@ .import screensize .importzp ptr1, ptr2 - .macpack cpu + .macpack cpu .proc _screensize @@ -29,7 +29,7 @@ sta (ptr2),y txa sta (ptr1),y -.endif +.endif rts .endproc diff --git a/libsrc/creativision/_scrsize.s b/libsrc/creativision/_scrsize.s index 9e4ce53c7..b1b05efea 100644 --- a/libsrc/creativision/_scrsize.s +++ b/libsrc/creativision/_scrsize.s @@ -3,13 +3,13 @@ ;* .export screensize - + .include "creativision.inc" - + .proc screensize ldx #SCREEN_COLS ldy #SCREEN_ROWS rts - + .endproc diff --git a/libsrc/creativision/boxchars.inc b/libsrc/creativision/boxchars.inc index 45484a5d2..5fbb3409d 100644 --- a/libsrc/creativision/boxchars.inc +++ b/libsrc/creativision/boxchars.inc @@ -2,7 +2,7 @@ boxchars: ; Vertical Line - .byte $18 + .byte $18 .byte $18 .byte $18 .byte $18 @@ -29,7 +29,7 @@ boxchars: .byte $18 .byte $18 .byte $18 - .byte $18 + .byte $18 ; Top Right .byte $00 @@ -39,7 +39,7 @@ boxchars: .byte $18 .byte $18 .byte $18 - .byte $18 + .byte $18 ; Bottom Left .byte $18 @@ -49,7 +49,7 @@ boxchars: .byte $00 .byte $00 .byte $00 - .byte $00 + .byte $00 ; Bottom Right .byte $18 @@ -59,4 +59,4 @@ boxchars: .byte $00 .byte $00 .byte $00 - .byte $00 + .byte $00 diff --git a/libsrc/dbg/asmtab.s b/libsrc/dbg/asmtab.s index 3d27aea1f..fdeedaa48 100644 --- a/libsrc/dbg/asmtab.s +++ b/libsrc/dbg/asmtab.s @@ -57,5 +57,5 @@ MnemoTab2: .byte $C4,$CA,$26,$48,$44,$44,$A2,$C8 - + diff --git a/libsrc/dbg/dbg.c b/libsrc/dbg/dbg.c index 27f2086eb..832ed0a20 100644 --- a/libsrc/dbg/dbg.c +++ b/libsrc/dbg/dbg.c @@ -1579,12 +1579,12 @@ void DbgEntry (void) case 'q': /* Quit program */ clrscr (); - + /* Exit intentionally with error because one may - ** say that DbgEntry is always abnormal. + ** say that DbgEntry is always abnormal. */ exit (EXIT_FAILURE); - + } } } diff --git a/libsrc/dbg/dbgdasm.s b/libsrc/dbg/dbgdasm.s index 9899c0add..cd1287a8a 100644 --- a/libsrc/dbg/dbgdasm.s +++ b/libsrc/dbg/dbgdasm.s @@ -77,7 +77,7 @@ disassret: inx ; Adjust for opcode byte txa ldx #$00 ; Clear high byte - rts + rts ; ------------------------------------------------------------------------- ; Helper functions diff --git a/libsrc/em/em_load.s b/libsrc/em/em_load.s index 1e4a364e2..39abbc8a5 100644 --- a/libsrc/em/em_load.s +++ b/libsrc/em/em_load.s @@ -29,7 +29,7 @@ ctrl: .addr _read .res 2 ; MODULE .res 2 ; MODULE_SIZE .res 2 ; MODULE_ID - + ;---------------------------------------------------------------------------- ; Code diff --git a/libsrc/gamate/cputc.s b/libsrc/gamate/cputc.s index d80e8b41a..a5d591d1e 100644 --- a/libsrc/gamate/cputc.s +++ b/libsrc/gamate/cputc.s @@ -97,7 +97,7 @@ putchar: ldy #$F8 lda CHARCOLOR - lsr + lsr bcc @delete1 @copylp1: @@ -106,7 +106,7 @@ putchar: sta LCD_DATA iny bne @copylp1 - + beq @skip_delete1 @delete1: @@ -126,9 +126,9 @@ putchar: ldx CURS_Y lda _plotlo,x sta LCD_Y - - ldy #$F8 - + + ldy #$F8 + lda CHARCOLOR and #2 beq @delete2 @@ -139,9 +139,9 @@ putchar: sta LCD_DATA iny bne @copylp2 - + beq @skip_delete2 - + @delete2: lda #$00 @del2: diff --git a/libsrc/geos-apple/disk/exitturbo.s b/libsrc/geos-apple/disk/exitturbo.s index 7098a56c4..14164d2e9 100644 --- a/libsrc/geos-apple/disk/exitturbo.s +++ b/libsrc/geos-apple/disk/exitturbo.s @@ -9,5 +9,5 @@ .import return0 _ExitTurbo = return0 - - + + diff --git a/libsrc/geos-cbm/disk/changediskdevice.s b/libsrc/geos-cbm/disk/changediskdevice.s index c3035deee..dd9c91609 100644 --- a/libsrc/geos-cbm/disk/changediskdevice.s +++ b/libsrc/geos-cbm/disk/changediskdevice.s @@ -9,7 +9,7 @@ .import setoserror .include "jumptab.inc" - + _ChangeDiskDevice: jsr ChangeDiskDevice jmp setoserror diff --git a/libsrc/geos-cbm/disk/chkdkgeos.s b/libsrc/geos-cbm/disk/chkdkgeos.s index c2b4821a4..a091916d7 100644 --- a/libsrc/geos-cbm/disk/chkdkgeos.s +++ b/libsrc/geos-cbm/disk/chkdkgeos.s @@ -10,7 +10,7 @@ .include "jumptab.inc" .include "geossym.inc" - + _ChkDkGEOS: jsr ChkDkGEOS jsr setoserror diff --git a/libsrc/geos-cbm/disk/dio_cts.s b/libsrc/geos-cbm/disk/dio_cts.s index 043e1f8d8..478181b69 100644 --- a/libsrc/geos-cbm/disk/dio_cts.s +++ b/libsrc/geos-cbm/disk/dio_cts.s @@ -20,21 +20,21 @@ _dio_phys_to_log: sta ptr1 stx ptr1+1 ; pointer to result - + jsr popax sta ptr2 stx ptr2+1 ; pointer to input structure - + jsr popax sta ptr3 stx ptr3+1 ; pointer to handle - + ldy #sst_flag lda (ptr3),y and #128 beq _inv_hand ; handle not open or invalid - - + + ldy #diopp_head lda (ptr2),y bne _inv_data ; there is only head 0 @@ -66,7 +66,7 @@ _dio_phys_to_log: beq dio_cts1571 cmp #DRV_1581 beq dio_cts1581 - + lda #INCOMPATIBLE ; unsupported device ldx #0 beq ret @@ -78,10 +78,10 @@ dio_ctsend: dey lda tmp1 sta (ptr1),y - + ldx #0 txa -ret: +ret: sta __oserror rts ; return success diff --git a/libsrc/geos-cbm/disk/dio_openclose.s b/libsrc/geos-cbm/disk/dio_openclose.s index 72e3e32e9..327503017 100644 --- a/libsrc/geos-cbm/disk/dio_openclose.s +++ b/libsrc/geos-cbm/disk/dio_openclose.s @@ -45,7 +45,7 @@ _dio_open: asl a ; make index from drive id asl a tax - + lda #0 sta sectsizetab+sst_sectsize,x lda #128 @@ -54,7 +54,7 @@ _dio_open: sta sectsizetab+sst_sectsize+1,x tya sta sectsizetab+sst_driveno,x - + stx tmp1 lda #<sectsizetab clc diff --git a/libsrc/geos-cbm/disk/dio_stc.s b/libsrc/geos-cbm/disk/dio_stc.s index 7398edb63..469df93ca 100644 --- a/libsrc/geos-cbm/disk/dio_stc.s +++ b/libsrc/geos-cbm/disk/dio_stc.s @@ -20,15 +20,15 @@ _dio_log_to_phys: ; check device type sta ptr1 stx ptr1+1 ; pointer to result (struct dio_phys_pos) - + jsr popax sta ptr2 stx ptr2+1 ; pointer to input structure (pointer to int) - + jsr popax sta ptr3 stx ptr3+1 ; pointer to handle - + ldy #sst_flag lda (ptr3),y and #128 @@ -42,18 +42,18 @@ _dio_log_to_phys: sta (ptr1),y ; track <256 ldy #diopp_sector+1 sta (ptr1),y ; sector <256 - + ldy #0 lda (ptr2),y sta tmp1 - iny + iny lda (ptr2),y sta tmp2 ; get drive info ldy #sst_driveno lda (ptr3),y - tay + tay lda driveType,y and #%00001111 ; remove ramDisk flags cmp #DRV_1541 @@ -62,7 +62,7 @@ _dio_log_to_phys: beq dio_stc1571 cmp #DRV_1581 beq dio_stc1581 - + lda #INCOMPATIBLE ; unsupported device ldx #0 beq _ret @@ -74,10 +74,10 @@ dio_stcend: ldy #diopp_sector lda tmp2 sta (ptr1),y - + ldx #0 - txa -_ret: + txa +_ret: sta __oserror rts ; return success @@ -107,14 +107,14 @@ _nxt: bcc _found cpx #35 bne _loop41 beq _inv_data - -_found: + +_found: lda tmp1 - sec + sec sbc sectab_1541_l,x sta tmp2 -_fndend: - inx +_fndend: + inx stx tmp1 jmp dio_stcend @@ -128,9 +128,9 @@ dio_stc1571: lda tmp1 cmp #<683 _if71: bcc dio_stc1541 - + lda tmp1 - sec + sec sbc #<683 sta tmp1 lda tmp2 @@ -139,10 +139,10 @@ _if71: bcc dio_stc1541 jsr dio_stc1541 ; will fall through here tay bne _ret ; result beyond track 70 - + ldy #diopp_track lda (ptr1),y - clc + clc adc #35 sta (ptr1),y lda #0 @@ -153,26 +153,26 @@ _if71: bcc dio_stc1541 ; - the remainder is sector dio_stc1581: ldx #0 ; index=(track-1) -_loop81: +_loop81: lda tmp2 bne _sub81 lda tmp1 cmp #40 bcc _got81 _sub81: lda tmp1 - sec + sec sbc #40 sta tmp1 lda tmp2 sbc #0 sta tmp2 - inx + inx cpx #80 bne _loop81 beq _inv_data - + _got81: lda tmp1 sta tmp2 - inx + inx stx tmp1 jmp dio_stcend diff --git a/libsrc/geos-cbm/disk/enterturbo.s b/libsrc/geos-cbm/disk/enterturbo.s index 777822bae..31864e32f 100644 --- a/libsrc/geos-cbm/disk/enterturbo.s +++ b/libsrc/geos-cbm/disk/enterturbo.s @@ -8,5 +8,5 @@ .export _EnterTurbo .include "jumptab.inc" - + _EnterTurbo = EnterTurbo diff --git a/libsrc/geos-cbm/disk/exitturbo.s b/libsrc/geos-cbm/disk/exitturbo.s index ab894aeff..5a37b4682 100644 --- a/libsrc/geos-cbm/disk/exitturbo.s +++ b/libsrc/geos-cbm/disk/exitturbo.s @@ -8,5 +8,5 @@ .export _ExitTurbo .include "jumptab.inc" - + _ExitTurbo = ExitTurbo diff --git a/libsrc/geos-cbm/disk/findbambit.s b/libsrc/geos-cbm/disk/findbambit.s index 3bb566f4d..3a6ffab21 100644 --- a/libsrc/geos-cbm/disk/findbambit.s +++ b/libsrc/geos-cbm/disk/findbambit.s @@ -12,7 +12,7 @@ .include "jumptab.inc" .include "geossym.inc" - + _FindBAMBit: jsr gettrse sta r6L diff --git a/libsrc/geos-cbm/disk/newdisk.s b/libsrc/geos-cbm/disk/newdisk.s index 30c7283ae..99e39604f 100644 --- a/libsrc/geos-cbm/disk/newdisk.s +++ b/libsrc/geos-cbm/disk/newdisk.s @@ -9,7 +9,7 @@ .import setoserror .include "jumptab.inc" - + _NewDisk: jsr NewDisk jmp setoserror diff --git a/libsrc/geos-cbm/disk/purgeturbo.s b/libsrc/geos-cbm/disk/purgeturbo.s index f0a293423..26b61a4fd 100644 --- a/libsrc/geos-cbm/disk/purgeturbo.s +++ b/libsrc/geos-cbm/disk/purgeturbo.s @@ -8,5 +8,5 @@ .export _PurgeTurbo .include "jumptab.inc" - + _PurgeTurbo = PurgeTurbo diff --git a/libsrc/geos-cbm/disk/readblock.s b/libsrc/geos-cbm/disk/readblock.s index 977860d91..d9a25f254 100644 --- a/libsrc/geos-cbm/disk/readblock.s +++ b/libsrc/geos-cbm/disk/readblock.s @@ -11,7 +11,7 @@ .include "jumptab.inc" .include "geossym.inc" - + _ReadBlock: sta r4L stx r4H diff --git a/libsrc/geos-cbm/disk/readbuff.s b/libsrc/geos-cbm/disk/readbuff.s index 149eae1b9..0c0c90108 100644 --- a/libsrc/geos-cbm/disk/readbuff.s +++ b/libsrc/geos-cbm/disk/readbuff.s @@ -11,7 +11,7 @@ .include "diskdrv.inc" .include "geossym.inc" - + _ReadBuff: jsr gettrse sta r1L diff --git a/libsrc/geos-cbm/disk/verwriteblock.s b/libsrc/geos-cbm/disk/verwriteblock.s index 74243f13f..bb4eabdda 100644 --- a/libsrc/geos-cbm/disk/verwriteblock.s +++ b/libsrc/geos-cbm/disk/verwriteblock.s @@ -11,7 +11,7 @@ .include "jumptab.inc" .include "geossym.inc" - + _VerWriteBlock: sta r4L stx r4H diff --git a/libsrc/geos-cbm/disk/writeblock.s b/libsrc/geos-cbm/disk/writeblock.s index c5a3b3f7a..7b257e79c 100644 --- a/libsrc/geos-cbm/disk/writeblock.s +++ b/libsrc/geos-cbm/disk/writeblock.s @@ -11,7 +11,7 @@ .include "jumptab.inc" .include "geossym.inc" - + _WriteBlock: sta r4L stx r4H diff --git a/libsrc/geos-cbm/disk/writebuff.s b/libsrc/geos-cbm/disk/writebuff.s index 34e7b137b..52194ebb1 100644 --- a/libsrc/geos-cbm/disk/writebuff.s +++ b/libsrc/geos-cbm/disk/writebuff.s @@ -11,7 +11,7 @@ .include "diskdrv.inc" .include "geossym.inc" - + _WriteBuff: jsr gettrse sta r1L diff --git a/libsrc/geos-cbm/emd/geos-vdc.s b/libsrc/geos-cbm/emd/geos-vdc.s index 791d2a0a8..27316e1a0 100644 --- a/libsrc/geos-cbm/emd/geos-vdc.s +++ b/libsrc/geos-cbm/emd/geos-vdc.s @@ -82,54 +82,54 @@ INSTALL: pha lda #$35 sta $01 - + ldx #VDC_CSET ; determine size of RAM... jsr vdcgetreg sta tmp1 ora #%00010000 jsr vdcputreg ; turn on 64k - + jsr settestadr1 ; save original value of test byte jsr vdcgetbyte sta tmp2 - + lda #$55 ; write $55 here ldy #ptr1 jsr test64k ; read it here and there lda #$aa ; write $aa here ldy #ptr2 jsr test64k ; read it here and there - + jsr settestadr1 lda tmp2 jsr vdcputbyte ; restore original value of test byte - + lda ptr1 ; do bytes match? cmp ptr1+1 bne @have64k lda ptr2 cmp ptr2+1 bne @have64k - + ldx #VDC_CSET lda tmp1 jsr vdcputreg ; restore 16/64k flag jmp @endok ; and leave default values for 16k - -@have64k: + +@have64k: lda #<256 ldx #>256 sta pagecount stx pagecount+1 -@endok: +@endok: pla sta $01 plp lda #<EM_ERR_OK ldx #>EM_ERR_OK - rts - -test64k: + rts + +test64k: sta tmp1 sty ptr3 lda #0 @@ -186,14 +186,14 @@ MAP: sta curpage sta ptr1+1 ldy #0 sty ptr1 - + lda #<window sta ptr2 lda #>window sta ptr2+1 - + jsr transferin - + lda #<window ldx #>window rts @@ -299,7 +299,7 @@ COPYFROM: bne @L1 ; Copy the remainder of the page - + @L2: ldy #EM_COPY::COUNT lda (ptr3),y ; Get bytes in last page beq @L4 @@ -391,9 +391,9 @@ vdcgetreg: @L0: bit VDC_ADDR_REG bpl @L0 lda VDC_DATA_REG - rts + rts -vdcputbyte: +vdcputbyte: ldx #VDC_DATA vdcputreg: stx VDC_ADDR_REG diff --git a/libsrc/geos-cbm/file/followchain.s b/libsrc/geos-cbm/file/followchain.s index df20bcaac..9b882d59a 100644 --- a/libsrc/geos-cbm/file/followchain.s +++ b/libsrc/geos-cbm/file/followchain.s @@ -11,7 +11,7 @@ .include "jumptab.inc" .include "geossym.inc" - + _FollowChain: sta r3L stx r3H diff --git a/libsrc/geos-cbm/graph/setnewmode.s b/libsrc/geos-cbm/graph/setnewmode.s index 1d63cf78e..56fc123f7 100644 --- a/libsrc/geos-cbm/graph/setnewmode.s +++ b/libsrc/geos-cbm/graph/setnewmode.s @@ -9,7 +9,7 @@ .include "jumptab.inc" .include "geossym.inc" - + _SetNewMode: lda graphMode eor #$80 diff --git a/libsrc/geos-cbm/system/setdevice.s b/libsrc/geos-cbm/system/setdevice.s index 37a162303..a67c10228 100644 --- a/libsrc/geos-cbm/system/setdevice.s +++ b/libsrc/geos-cbm/system/setdevice.s @@ -8,5 +8,5 @@ .export _SetDevice .include "jumptab.inc" - + _SetDevice = SetDevice diff --git a/libsrc/geos-cbm/tgi/geos-tgi.s b/libsrc/geos-cbm/tgi/geos-tgi.s index 08927e6c1..c04742fb6 100644 --- a/libsrc/geos-cbm/tgi/geos-tgi.s +++ b/libsrc/geos-cbm/tgi/geos-tgi.s @@ -93,7 +93,7 @@ Y2 = ptr4 SCRBASE: .res 1 ; High byte of screen base (64k VDC only) -ERROR: +ERROR: .res 1 ; Error code PALETTE: .res 2 ; The current palette @@ -199,9 +199,9 @@ INSTALL: @endok: lda #0 sta SCRBASE ; draw page 0 as default - rts + rts -test64k: +test64k: sta tmp1 sty ptr3 lda #0 diff --git a/libsrc/geos-common/common/zerobss.s b/libsrc/geos-common/common/zerobss.s index 48fc5a89a..85d3e03eb 100644 --- a/libsrc/geos-common/common/zerobss.s +++ b/libsrc/geos-common/common/zerobss.s @@ -7,7 +7,7 @@ .export zerobss .import __BSS_RUN__, __BSS_SIZE__ - + .include "jumptab.inc" .include "geossym.inc" diff --git a/libsrc/geos-common/conio/_scrsize.s b/libsrc/geos-common/conio/_scrsize.s index 494182b9d..ffb17dec6 100644 --- a/libsrc/geos-common/conio/_scrsize.s +++ b/libsrc/geos-common/conio/_scrsize.s @@ -11,7 +11,7 @@ .importzp cursor_r, cursor_c .import _cursor .constructor initscrsize - + .include "geossym.inc" .segment "ONCE" @@ -38,7 +38,7 @@ L1: lda #40 ; 40 columns (more or less) .code -screensize: +screensize: ldx xsize ldy ysize rts diff --git a/libsrc/geos-common/conio/cputc.s b/libsrc/geos-common/conio/cputc.s index 014c2ed0b..af4194312 100644 --- a/libsrc/geos-common/conio/cputc.s +++ b/libsrc/geos-common/conio/cputc.s @@ -19,7 +19,7 @@ ; ESC_GRAPHICS, ESC_RULER, GOTOX, GOTOY, GOTOXY, NEWCARDSET, all 1..8 ; ; note that there are conflicts between control characters and keyboard: -; HOME = KEY_ENTER, KEY_HOME = REV_ON, +; HOME = KEY_ENTER, KEY_HOME = REV_ON, ; UPLINE = ?, KEY_UPARROW = GOTOY, ... .export _cputcxy, _cputc diff --git a/libsrc/geos-common/conio/cvline.s b/libsrc/geos-common/conio/cvline.s index c12b8764b..9aa3d3eee 100644 --- a/libsrc/geos-common/conio/cvline.s +++ b/libsrc/geos-common/conio/cvline.s @@ -18,7 +18,7 @@ _cvlinexy: jsr gotoxy ; Call this one, will pop params pla ; Restore the length -_cvline: +_cvline: cmp #0 ; Is the length zero? beq L9 ; Jump if done tax diff --git a/libsrc/geos-common/disk/blkalloc.s b/libsrc/geos-common/disk/blkalloc.s index 6bfcb312c..bace80098 100644 --- a/libsrc/geos-common/disk/blkalloc.s +++ b/libsrc/geos-common/disk/blkalloc.s @@ -11,7 +11,7 @@ .include "jumptab.inc" .include "diskdrv.inc" .include "geossym.inc" - + _BlkAlloc: sta r2L stx r2H diff --git a/libsrc/geos-common/disk/calcblksfree.s b/libsrc/geos-common/disk/calcblksfree.s index 5d7b98aba..7e1bb4f52 100644 --- a/libsrc/geos-common/disk/calcblksfree.s +++ b/libsrc/geos-common/disk/calcblksfree.s @@ -11,7 +11,7 @@ .include "jumptab.inc" .include "diskdrv.inc" .include "geossym.inc" - + _CalcBlksFree: lda #<curDirHead ldx #>curDirHead diff --git a/libsrc/geos-common/disk/freeblock.s b/libsrc/geos-common/disk/freeblock.s index cd8b08d2f..da9a83f86 100644 --- a/libsrc/geos-common/disk/freeblock.s +++ b/libsrc/geos-common/disk/freeblock.s @@ -11,7 +11,7 @@ .include "jumptab.inc" .include "diskdrv.inc" .include "geossym.inc" - + _FreeBlock: jsr gettrse sta r6L diff --git a/libsrc/geos-common/disk/getblock.s b/libsrc/geos-common/disk/getblock.s index cef7ece6f..bb1690827 100644 --- a/libsrc/geos-common/disk/getblock.s +++ b/libsrc/geos-common/disk/getblock.s @@ -12,7 +12,7 @@ .include "jumptab.inc" .include "diskdrv.inc" .include "geossym.inc" - + _GetBlock: sta r4L stx r4H diff --git a/libsrc/geos-common/disk/getptrcurdknm.s b/libsrc/geos-common/disk/getptrcurdknm.s index 7a99225ef..d92e5d91e 100644 --- a/libsrc/geos-common/disk/getptrcurdknm.s +++ b/libsrc/geos-common/disk/getptrcurdknm.s @@ -12,8 +12,8 @@ .include "jumptab.inc" .include "geossym.inc" - -_GetPtrCurDkNm: + +_GetPtrCurDkNm: sta ptr3 stx ptr3+1 ldx #ptr4 diff --git a/libsrc/geos-common/disk/nxtblkalloc.s b/libsrc/geos-common/disk/nxtblkalloc.s index 7427f3de0..560eb0945 100644 --- a/libsrc/geos-common/disk/nxtblkalloc.s +++ b/libsrc/geos-common/disk/nxtblkalloc.s @@ -13,7 +13,7 @@ .include "jumptab.inc" .include "diskdrv.inc" .include "geossym.inc" - + _NxtBlkAlloc: sta r2L stx r2H diff --git a/libsrc/geos-common/disk/opendisk.s b/libsrc/geos-common/disk/opendisk.s index 66bd24d30..9de5fb1d7 100644 --- a/libsrc/geos-common/disk/opendisk.s +++ b/libsrc/geos-common/disk/opendisk.s @@ -10,7 +10,7 @@ .include "jumptab.inc" .include "diskdrv.inc" - + _OpenDisk: jsr OpenDisk jmp setoserror diff --git a/libsrc/geos-common/disk/putblock.s b/libsrc/geos-common/disk/putblock.s index df1af9f19..4c17274e1 100644 --- a/libsrc/geos-common/disk/putblock.s +++ b/libsrc/geos-common/disk/putblock.s @@ -12,7 +12,7 @@ .include "jumptab.inc" .include "diskdrv.inc" .include "geossym.inc" - + _PutBlock: sta r4L stx r4H diff --git a/libsrc/geos-common/disk/putdirhead.s b/libsrc/geos-common/disk/putdirhead.s index 411b64307..afd7f9b39 100644 --- a/libsrc/geos-common/disk/putdirhead.s +++ b/libsrc/geos-common/disk/putdirhead.s @@ -10,7 +10,7 @@ .include "jumptab.inc" .include "diskdrv.inc" - + _PutDirHead: jsr PutDirHead jmp setoserror diff --git a/libsrc/geos-common/disk/setnextfree.s b/libsrc/geos-common/disk/setnextfree.s index 410532cea..b24f16f6f 100644 --- a/libsrc/geos-common/disk/setnextfree.s +++ b/libsrc/geos-common/disk/setnextfree.s @@ -12,7 +12,7 @@ .include "jumptab.inc" .include "diskdrv.inc" .include "geossym.inc" - + _SetNextFree: jsr gettrse sta r3L diff --git a/libsrc/geos-common/dlgbox/rstrfrmdialogue.s b/libsrc/geos-common/dlgbox/rstrfrmdialogue.s index efee17465..9119770a0 100644 --- a/libsrc/geos-common/dlgbox/rstrfrmdialogue.s +++ b/libsrc/geos-common/dlgbox/rstrfrmdialogue.s @@ -8,5 +8,5 @@ .export _RstrFrmDialogue .include "jumptab.inc" - + _RstrFrmDialogue = RstrFrmDialogue diff --git a/libsrc/geos-common/drivers/fio_module.s b/libsrc/geos-common/drivers/fio_module.s index 937ef292e..1314fc4c5 100644 --- a/libsrc/geos-common/drivers/fio_module.s +++ b/libsrc/geos-common/drivers/fio_module.s @@ -38,21 +38,21 @@ _open: jsr popax ; Get flags sta tmp1 jsr popptr1 ; Get name - + lda filedesc ; is there a file already open? bne @alreadyopen - + lda tmp1 ; check open mode and #(O_RDWR | O_CREAT) cmp #O_RDONLY ; only O_RDONLY is valid bne @badmode - + lda ptr1 ldx ptr1+1 jsr _FindFile ; try to find the file tax bne @oserror - + lda dirEntryBuf + OFF_DE_TR_SC ; tr&se for ReadByte (r1) sta f_track lda dirEntryBuf + OFF_DE_TR_SC + 1 diff --git a/libsrc/geos-common/drivers/geos-stdmou.s b/libsrc/geos-common/drivers/geos-stdmou.s index 7e544ba82..88bbc7df9 100644 --- a/libsrc/geos-common/drivers/geos-stdmou.s +++ b/libsrc/geos-common/drivers/geos-stdmou.s @@ -5,7 +5,7 @@ ; ; Driver for GEOS standard input device interface ; - + .export _mouse_init, _mouse_done .export _mouse_hide, _mouse_show .export _mouse_box diff --git a/libsrc/geos-common/file/appendrecord.s b/libsrc/geos-common/file/appendrecord.s index 2a7864a13..1ec1e8869 100644 --- a/libsrc/geos-common/file/appendrecord.s +++ b/libsrc/geos-common/file/appendrecord.s @@ -10,7 +10,7 @@ .include "jumptab.inc" .include "diskdrv.inc" - + _AppendRecord: jsr AppendRecord diff --git a/libsrc/geos-common/file/closerecordfile.s b/libsrc/geos-common/file/closerecordfile.s index ee0778d7b..1c8b19b01 100644 --- a/libsrc/geos-common/file/closerecordfile.s +++ b/libsrc/geos-common/file/closerecordfile.s @@ -10,7 +10,7 @@ .include "jumptab.inc" .include "diskdrv.inc" - + _CloseRecordFile: jsr CloseRecordFile jmp setoserror diff --git a/libsrc/geos-common/file/deletefile.s b/libsrc/geos-common/file/deletefile.s index 730569e55..b9d994142 100644 --- a/libsrc/geos-common/file/deletefile.s +++ b/libsrc/geos-common/file/deletefile.s @@ -11,7 +11,7 @@ .include "jumptab.inc" .include "diskdrv.inc" .include "geossym.inc" - + _DeleteFile: sta r0L stx r0H diff --git a/libsrc/geos-common/file/deleterecord.s b/libsrc/geos-common/file/deleterecord.s index 7ffe5d739..fac73f665 100644 --- a/libsrc/geos-common/file/deleterecord.s +++ b/libsrc/geos-common/file/deleterecord.s @@ -11,7 +11,7 @@ .include "jumptab.inc" .include "diskdrv.inc" .include "geossym.inc" - + _DeleteRecord: jsr DeleteRecord jmp setoserror diff --git a/libsrc/geos-common/file/findfile.s b/libsrc/geos-common/file/findfile.s index 0f58e99e6..285e8d650 100644 --- a/libsrc/geos-common/file/findfile.s +++ b/libsrc/geos-common/file/findfile.s @@ -11,7 +11,7 @@ .include "jumptab.inc" .include "diskdrv.inc" .include "geossym.inc" - + _FindFile: sta r6L stx r6H diff --git a/libsrc/geos-common/file/freefile.s b/libsrc/geos-common/file/freefile.s index 791f3f31c..03a8b9d88 100644 --- a/libsrc/geos-common/file/freefile.s +++ b/libsrc/geos-common/file/freefile.s @@ -11,7 +11,7 @@ .include "jumptab.inc" .include "diskdrv.inc" .include "geossym.inc" - + _FreeFile: sta r9L stx r9H diff --git a/libsrc/geos-common/file/getfhdrinfo.s b/libsrc/geos-common/file/getfhdrinfo.s index a9a843e74..1503b1cf1 100644 --- a/libsrc/geos-common/file/getfhdrinfo.s +++ b/libsrc/geos-common/file/getfhdrinfo.s @@ -11,7 +11,7 @@ .include "jumptab.inc" .include "diskdrv.inc" .include "geossym.inc" - + _GetFHdrInfo: sta r9L stx r9H diff --git a/libsrc/geos-common/file/getfile.s b/libsrc/geos-common/file/getfile.s index 9c8011542..24f87e859 100644 --- a/libsrc/geos-common/file/getfile.s +++ b/libsrc/geos-common/file/getfile.s @@ -11,7 +11,7 @@ .include "jumptab.inc" .include "diskdrv.inc" .include "geossym.inc" - + _GetFile: sta r3L stx r3H diff --git a/libsrc/geos-common/file/openrecordfile.s b/libsrc/geos-common/file/openrecordfile.s index cdab3dd6c..cba5d7c08 100644 --- a/libsrc/geos-common/file/openrecordfile.s +++ b/libsrc/geos-common/file/openrecordfile.s @@ -11,7 +11,7 @@ .include "jumptab.inc" .include "diskdrv.inc" .include "geossym.inc" - + _OpenRecordFile: sta r0L stx r0H diff --git a/libsrc/geos-common/file/pointrecord.s b/libsrc/geos-common/file/pointrecord.s index 82b88c4c6..29294737d 100644 --- a/libsrc/geos-common/file/pointrecord.s +++ b/libsrc/geos-common/file/pointrecord.s @@ -10,7 +10,7 @@ .include "jumptab.inc" .include "diskdrv.inc" - + _PointRecord: jsr PointRecord jmp setoserror diff --git a/libsrc/geos-common/file/readfile.s b/libsrc/geos-common/file/readfile.s index 3b43cffd4..d8b941cde 100644 --- a/libsrc/geos-common/file/readfile.s +++ b/libsrc/geos-common/file/readfile.s @@ -12,7 +12,7 @@ .include "jumptab.inc" .include "diskdrv.inc" .include "geossym.inc" - + _ReadFile: sta r2L stx r2H diff --git a/libsrc/geos-common/file/readrecord.s b/libsrc/geos-common/file/readrecord.s index dd464e0b1..be155c718 100644 --- a/libsrc/geos-common/file/readrecord.s +++ b/libsrc/geos-common/file/readrecord.s @@ -11,7 +11,7 @@ .include "jumptab.inc" .include "diskdrv.inc" .include "geossym.inc" - + _ReadRecord: sta r2L stx r2H diff --git a/libsrc/geos-common/file/writerecord.s b/libsrc/geos-common/file/writerecord.s index e0d4c86d4..33b5fef31 100644 --- a/libsrc/geos-common/file/writerecord.s +++ b/libsrc/geos-common/file/writerecord.s @@ -11,7 +11,7 @@ .include "jumptab.inc" .include "diskdrv.inc" .include "geossym.inc" - + _WriteRecord: sta r2L stx r2H diff --git a/libsrc/geos-common/geosmac.inc b/libsrc/geos-common/geosmac.inc index 5ce20ff7f..6398b7a0b 100644 --- a/libsrc/geos-common/geosmac.inc +++ b/libsrc/geos-common/geosmac.inc @@ -136,7 +136,7 @@ Skip: ;------------------------------------------------------------------------- .macro CmpW source, dest -.local Skip +.local Skip CmpB source+1, dest+1 bne Skip CmpB source+0, dest+0 @@ -203,7 +203,7 @@ Skip: .macro rmb bitNumber, dest pha - lda #(1 << bitNumber) ^ $ff + lda #(1 << bitNumber) ^ $ff and dest sta dest pla diff --git a/libsrc/geos-common/graph/bitotherclip.s b/libsrc/geos-common/graph/bitotherclip.s index ef849f6d7..020139da8 100644 --- a/libsrc/geos-common/graph/bitotherclip.s +++ b/libsrc/geos-common/graph/bitotherclip.s @@ -3,7 +3,7 @@ ; ; 21.12.99 -; void BitOtherClip (void *proc1, void* proc2, char skipl, char skipr, int skipy, +; void BitOtherClip (void *proc1, void* proc2, char skipl, char skipr, int skipy, ; struct iconpic *myGfx); ; both proc1, proc2 should be: char __fastcall something (void); diff --git a/libsrc/geos-common/graph/framerectangle.s b/libsrc/geos-common/graph/framerectangle.s index c5f9de04c..eb3ea8df6 100644 --- a/libsrc/geos-common/graph/framerectangle.s +++ b/libsrc/geos-common/graph/framerectangle.s @@ -8,5 +8,5 @@ .export _FrameRectangle .include "jumptab.inc" - + _FrameRectangle = FrameRectangle diff --git a/libsrc/geos-common/graph/imprintrectangle.s b/libsrc/geos-common/graph/imprintrectangle.s index fc327e9d3..08b28690d 100644 --- a/libsrc/geos-common/graph/imprintrectangle.s +++ b/libsrc/geos-common/graph/imprintrectangle.s @@ -4,10 +4,10 @@ ; 21.12.99 ; void ImprintRectangle (void); - + .export _ImprintRectangle .include "jumptab.inc" - + _ImprintRectangle = ImprintRectangle diff --git a/libsrc/geos-common/graph/invertline.s b/libsrc/geos-common/graph/invertline.s index baa4a6e5a..72fb87afb 100644 --- a/libsrc/geos-common/graph/invertline.s +++ b/libsrc/geos-common/graph/invertline.s @@ -9,7 +9,7 @@ .export _InvertLine .include "jumptab.inc" - + _InvertLine: jsr HLineRegs jmp InvertLine diff --git a/libsrc/geos-common/graph/invertrectangle.s b/libsrc/geos-common/graph/invertrectangle.s index 084187255..52750a8e9 100644 --- a/libsrc/geos-common/graph/invertrectangle.s +++ b/libsrc/geos-common/graph/invertrectangle.s @@ -6,7 +6,7 @@ ; void InvertRectangle (void); .export _InvertRectangle - + .include "jumptab.inc" _InvertRectangle = InvertRectangle diff --git a/libsrc/geos-common/graph/recoverline.s b/libsrc/geos-common/graph/recoverline.s index edc366114..8214242d3 100644 --- a/libsrc/geos-common/graph/recoverline.s +++ b/libsrc/geos-common/graph/recoverline.s @@ -7,7 +7,7 @@ .import HLineRegs .export _RecoverLine - + .include "jumptab.inc" _RecoverLine: diff --git a/libsrc/geos-common/graph/recoverrectangle.s b/libsrc/geos-common/graph/recoverrectangle.s index 009ca81eb..2e494fcbe 100644 --- a/libsrc/geos-common/graph/recoverrectangle.s +++ b/libsrc/geos-common/graph/recoverrectangle.s @@ -4,10 +4,10 @@ ; 29.10.99 ; void RecoverRectangle (void); - + .export _RecoverRectangle .include "jumptab.inc" - + _RecoverRectangle = RecoverRectangle diff --git a/libsrc/geos-common/graph/rectangle.s b/libsrc/geos-common/graph/rectangle.s index a9351c47e..6dc283024 100644 --- a/libsrc/geos-common/graph/rectangle.s +++ b/libsrc/geos-common/graph/rectangle.s @@ -6,7 +6,7 @@ ; void Rectangle (void); .export _Rectangle - + .include "jumptab.inc" _Rectangle = Rectangle diff --git a/libsrc/geos-common/graph/testpoint.s b/libsrc/geos-common/graph/testpoint.s index f2dfb7b5d..ad1dd3fee 100644 --- a/libsrc/geos-common/graph/testpoint.s +++ b/libsrc/geos-common/graph/testpoint.s @@ -10,7 +10,7 @@ .export _TestPoint .include "jumptab.inc" - + _TestPoint: jsr PointRegs jsr TestPoint diff --git a/libsrc/geos-common/graph/verticalline.s b/libsrc/geos-common/graph/verticalline.s index 01fb0b725..1ec89a9d7 100644 --- a/libsrc/geos-common/graph/verticalline.s +++ b/libsrc/geos-common/graph/verticalline.s @@ -5,12 +5,12 @@ ; void VerticalLine (char pattern, char ystart, char yend, int x); - .import popa + .import popa .export _VerticalLine .include "jumptab.inc" .include "geossym.inc" - + _VerticalLine: stx r4H sta r4L diff --git a/libsrc/geos-common/mousesprite/ismseinregion.s b/libsrc/geos-common/mousesprite/ismseinregion.s index 0617490c5..da14c9fe8 100644 --- a/libsrc/geos-common/mousesprite/ismseinregion.s +++ b/libsrc/geos-common/mousesprite/ismseinregion.s @@ -7,7 +7,7 @@ .import _InitDrawWindow .export _IsMseInRegion - + .include "jumptab.inc" _IsMseInRegion: diff --git a/libsrc/geos-common/process/processblock.s b/libsrc/geos-common/process/processblock.s index 84ead5993..17f07f28c 100644 --- a/libsrc/geos-common/process/processblock.s +++ b/libsrc/geos-common/process/processblock.s @@ -12,11 +12,11 @@ .export _UnblockProcess .include "jumptab.inc" - + _BlockProcess: tax jmp BlockProcess - + _UnblockProcess: tax jmp UnblockProcess diff --git a/libsrc/geos-common/process/processfreeze.s b/libsrc/geos-common/process/processfreeze.s index bda914bdc..e77bec2d7 100644 --- a/libsrc/geos-common/process/processfreeze.s +++ b/libsrc/geos-common/process/processfreeze.s @@ -10,11 +10,11 @@ .export _UnfreezeProcess .include "jumptab.inc" - + _FreezeProcess: tax jmp FreezeProcess - + _UnfreezeProcess: tax jmp UnfreezeProcess diff --git a/libsrc/geos-common/process/processinitrestartenable.s b/libsrc/geos-common/process/processinitrestartenable.s index 800c2dc5f..73f030d56 100644 --- a/libsrc/geos-common/process/processinitrestartenable.s +++ b/libsrc/geos-common/process/processinitrestartenable.s @@ -20,11 +20,11 @@ _InitProcesses: stx r0H jsr popa jmp InitProcesses - + _RestartProcess: tax jmp RestartProcess - + _EnableProcess: tax jmp EnableProcess diff --git a/libsrc/joystick/joy_load.s b/libsrc/joystick/joy_load.s index 7115f5d07..97ba7a0cd 100644 --- a/libsrc/joystick/joy_load.s +++ b/libsrc/joystick/joy_load.s @@ -87,7 +87,7 @@ ctrl: .addr _read ; Check the driver signature, install the driver. c is already on stack and ; will get removed by joy_install(). -; Res = joy_install (ctrl.module); +; Res = joy_install (ctrl.module); lda ctrl + MOD_CTRL::MODULE ldx ctrl + MOD_CTRL::MODULE+1 diff --git a/libsrc/lynx/bllhdr.s b/libsrc/lynx/bllhdr.s index 07ed06ffb..c34d7b53b 100644 --- a/libsrc/lynx/bllhdr.s +++ b/libsrc/lynx/bllhdr.s @@ -6,7 +6,7 @@ .import __BSS_LOAD__ .import __MAIN_START__ .export __BLLHDR__: absolute = 1 - + ; ------------------------------------------------------------------------ ; BLL header (BLL header) diff --git a/libsrc/lynx/bootldr.s b/libsrc/lynx/bootldr.s index c8b4ca402..ddc24faed 100644 --- a/libsrc/lynx/bootldr.s +++ b/libsrc/lynx/bootldr.s @@ -155,7 +155,7 @@ secreadbyte0: bne exit ;********************************** -; Select a block +; Select a block ;********************************** seclynxblock: pha diff --git a/libsrc/lynx/cgetc.s b/libsrc/lynx/cgetc.s index 362371ec3..d940b2b94 100644 --- a/libsrc/lynx/cgetc.s +++ b/libsrc/lynx/cgetc.s @@ -19,7 +19,7 @@ ; and Opt1 + Opt2 pressed '3'. ; So the keyboard returns '1', '2', '3', 'P', 'R', 'F' or '?'. -_cgetc: +_cgetc: jsr _kbhit ; Check for char available beq _cgetc ora KBSTL diff --git a/libsrc/lynx/eeprom.s b/libsrc/lynx/eeprom.s index 978220cfd..fb0247e90 100644 --- a/libsrc/lynx/eeprom.s +++ b/libsrc/lynx/eeprom.s @@ -252,4 +252,4 @@ EEloop4: rts - + diff --git a/libsrc/lynx/eeprom46.s b/libsrc/lynx/eeprom46.s index 55d9037c0..2b2277e45 100644 --- a/libsrc/lynx/eeprom46.s +++ b/libsrc/lynx/eeprom46.s @@ -4,7 +4,7 @@ ; ; created : 11.05.95 ; last modified : -; +; ; 16.02.96 leaner (thanks to Harry) ; 12.03.96 test for busy after write and erase (well, Harry ;)) ) ; 22.08.97 ported to ra65 for use with cc65 diff --git a/libsrc/lynx/eeprom66.s b/libsrc/lynx/eeprom66.s index 680db8166..6511cf8af 100644 --- a/libsrc/lynx/eeprom66.s +++ b/libsrc/lynx/eeprom66.s @@ -4,7 +4,7 @@ ; ; created : 11.05.95 ; last modified : -; +; ; 16.02.96 leaner (thanks to Harry) ; 12.03.96 test for busy after write and erase (well, Harry ;)) ) ; 22.08.97 ported to ra65 for use with cc65 diff --git a/libsrc/lynx/eeprom86.s b/libsrc/lynx/eeprom86.s index f753b73c3..73b342fae 100644 --- a/libsrc/lynx/eeprom86.s +++ b/libsrc/lynx/eeprom86.s @@ -4,7 +4,7 @@ ; ; created : 11.05.95 ; last modified : -; +; ; 16.02.96 leaner (thanks to Harry) ; 12.03.96 test for busy after write and erase (well, Harry ;)) ) ; 22.08.97 ported to ra65 for use with cc65 diff --git a/libsrc/lynx/exec.s b/libsrc/lynx/exec.s index c0a630a72..307475f1d 100644 --- a/libsrc/lynx/exec.s +++ b/libsrc/lynx/exec.s @@ -6,7 +6,7 @@ ; ; lynx_exec is often used in compilation carts when you run small demos ; created with various (non-cc65) compilers. -; +; ; void lynx_exec(int fileno) ; .importzp _FileDestAddr diff --git a/libsrc/lynx/kbhit.s b/libsrc/lynx/kbhit.s index 90d9061cd..d5b3d1cde 100644 --- a/libsrc/lynx/kbhit.s +++ b/libsrc/lynx/kbhit.s @@ -30,7 +30,7 @@ KBNPR: .byte 0 .code _kbhit: lda KBEDG - bne L1 + bne L1 lda $FCB0 ; Read the Opt buttons and #$0c sta KBTMP diff --git a/libsrc/lynx/lynx-cart.s b/libsrc/lynx/lynx-cart.s index 86e907348..94edff677 100644 --- a/libsrc/lynx/lynx-cart.s +++ b/libsrc/lynx/lynx-cart.s @@ -6,7 +6,7 @@ ; ; Ported to cc65 (http://www.cc65.org) by ; Shawn Jefferson, June 2004 -; +; ; This version by Karri Kaksonen, December 2010 ; ; Helper stuff for the cartridge file functions. This version can deal @@ -16,7 +16,7 @@ .include "lynx.inc" .include "extzp.inc" .export lynxskip0, lynxread0 - .export lynxblock + .export lynxblock .import __BLOCKSIZE__ .code @@ -60,7 +60,7 @@ readbyte0: bne exit ;********************************** -; Select a block +; Select a block ;********************************** lynxblock: pha diff --git a/libsrc/mouse/mouse_load.s b/libsrc/mouse/mouse_load.s index 347250843..a3a3f284d 100644 --- a/libsrc/mouse/mouse_load.s +++ b/libsrc/mouse/mouse_load.s @@ -1,4 +1,4 @@ -; +; ; Ullrich von Bassewitz, 2006-06-05 ; ; unsigned char __fastcall__ mouse_load_driver (const struct mouse_callbacks* c, diff --git a/libsrc/mouse/mouse_move.s b/libsrc/mouse/mouse_move.s index b25716b37..4d809109c 100644 --- a/libsrc/mouse/mouse_move.s +++ b/libsrc/mouse/mouse_move.s @@ -10,7 +10,7 @@ ; .import incsp2 - .import ptr1: zp + .import ptr1: zp .include "mouse-kernel.inc" diff --git a/libsrc/nes/cclear.s b/libsrc/nes/cclear.s index 7a2413826..93f5c7c9a 100644 --- a/libsrc/nes/cclear.s +++ b/libsrc/nes/cclear.s @@ -17,7 +17,7 @@ _cclearxy: _cclear: cmp #0 ; Is the length zero? beq L9 ; Jump if done - sta tmp1 + sta tmp1 L1: lda #$20 ; Blank - screen code jsr cputdirect ; Direct output dec tmp1 diff --git a/libsrc/nes/chline.s b/libsrc/nes/chline.s index d68a77df9..fff229575 100644 --- a/libsrc/nes/chline.s +++ b/libsrc/nes/chline.s @@ -10,7 +10,7 @@ .importzp tmp1 .include "nes.inc" - + _chlinexy: pha ; Save the length jsr gotoxy ; Call this one, will pop params diff --git a/libsrc/nes/gotoy.s b/libsrc/nes/gotoy.s index cfd913f2e..a36e77964 100644 --- a/libsrc/nes/gotoy.s +++ b/libsrc/nes/gotoy.s @@ -19,4 +19,4 @@ .endproc - + diff --git a/libsrc/nes/ppubuf.s b/libsrc/nes/ppubuf.s index 3708b93c1..f08fc1a71 100644 --- a/libsrc/nes/ppubuf.s +++ b/libsrc/nes/ppubuf.s @@ -101,7 +101,7 @@ @end: stx ringread sty ringcount - rts + rts .endproc diff --git a/libsrc/nes/sysuname.s b/libsrc/nes/sysuname.s index 2606d1a60..fcab503e1 100644 --- a/libsrc/nes/sysuname.s +++ b/libsrc/nes/sysuname.s @@ -35,5 +35,5 @@ utsdata: ; machine .asciiz "NES" - + diff --git a/libsrc/osic1p/cclear.s b/libsrc/osic1p/cclear.s index f7e9b2984..e399f14a9 100644 --- a/libsrc/osic1p/cclear.s +++ b/libsrc/osic1p/cclear.s @@ -20,7 +20,7 @@ _cclearxy: _cclear: cmp #0 ; Is the length zero? beq L9 ; Jump if done - sta tmp1 + sta tmp1 L1: lda #' ' jsr cputdirect ; Direct output dec tmp1 diff --git a/libsrc/pce/cclear.s b/libsrc/pce/cclear.s index 14b9d0e8b..e6277eed0 100644 --- a/libsrc/pce/cclear.s +++ b/libsrc/pce/cclear.s @@ -17,7 +17,7 @@ _cclearxy: _cclear: cmp #0 ; Is the length zero? beq L9 ; Jump if done - sta tmp1 + sta tmp1 L1: lda #$20 ; Blank - screen code jsr cputdirect ; Direct output dec tmp1 diff --git a/libsrc/plus4/randomize.s b/libsrc/plus4/randomize.s index 2a7f6a44b..796ad118b 100644 --- a/libsrc/plus4/randomize.s +++ b/libsrc/plus4/randomize.s @@ -11,7 +11,7 @@ .include "plus4.inc" -__randomize: +__randomize: ldx TED_VLINELO ; Use TED rasterline as high byte lda TIME+2 ; Use 60HZ clock as low byte jmp _srand ; Initialize generator diff --git a/libsrc/runtime/add.s b/libsrc/runtime/add.s index e644671c0..a4658cc13 100644 --- a/libsrc/runtime/add.s +++ b/libsrc/runtime/add.s @@ -33,13 +33,13 @@ hiadd: txa ; (19) inc sp+1 ; (-1+5) done: tya ; (36) -.else +.else ldy #0 ; (4) adc (sp),y ; (9) lo byte iny ; (11) sta tmp1 ; (14) save it - txa ; (16) + txa ; (16) adc (sp),y ; (21) hi byte tax ; (23) clc ; (25) diff --git a/libsrc/runtime/aslax1.s b/libsrc/runtime/aslax1.s index 14f0be3cc..97ac71c45 100644 --- a/libsrc/runtime/aslax1.s +++ b/libsrc/runtime/aslax1.s @@ -6,7 +6,7 @@ .export aslax1, shlax1 .importzp tmp1 - + aslax1: shlax1: stx tmp1 asl A diff --git a/libsrc/runtime/decsp1.s b/libsrc/runtime/decsp1.s index 5aa7fa204..3c673664a 100644 --- a/libsrc/runtime/decsp1.s +++ b/libsrc/runtime/decsp1.s @@ -20,4 +20,4 @@ - + diff --git a/libsrc/runtime/incsp1.s b/libsrc/runtime/incsp1.s index 43c92dc82..2272e200f 100644 --- a/libsrc/runtime/incsp1.s +++ b/libsrc/runtime/incsp1.s @@ -19,4 +19,4 @@ - + diff --git a/libsrc/runtime/incsp3.s b/libsrc/runtime/incsp3.s index 29067a55e..f54b13920 100644 --- a/libsrc/runtime/incsp3.s +++ b/libsrc/runtime/incsp3.s @@ -17,4 +17,4 @@ - + diff --git a/libsrc/runtime/incsp4.s b/libsrc/runtime/incsp4.s index 51e9229bb..736438fce 100644 --- a/libsrc/runtime/incsp4.s +++ b/libsrc/runtime/incsp4.s @@ -17,4 +17,4 @@ - + diff --git a/libsrc/runtime/incsp5.s b/libsrc/runtime/incsp5.s index 164c62524..55cf780d4 100644 --- a/libsrc/runtime/incsp5.s +++ b/libsrc/runtime/incsp5.s @@ -17,4 +17,4 @@ - + diff --git a/libsrc/runtime/incsp6.s b/libsrc/runtime/incsp6.s index 1a393840e..94c536e7c 100644 --- a/libsrc/runtime/incsp6.s +++ b/libsrc/runtime/incsp6.s @@ -17,4 +17,4 @@ - + diff --git a/libsrc/runtime/incsp7.s b/libsrc/runtime/incsp7.s index 8a5838137..be8784ecb 100644 --- a/libsrc/runtime/incsp7.s +++ b/libsrc/runtime/incsp7.s @@ -17,4 +17,4 @@ - + diff --git a/libsrc/runtime/land.s b/libsrc/runtime/land.s index 6ea4e5bcb..8e21ebb60 100644 --- a/libsrc/runtime/land.s +++ b/libsrc/runtime/land.s @@ -10,7 +10,7 @@ .importzp sp, sreg, tmp1 .macpack cpu - + tosand0ax: .if (.cpu .bitand ::CPU_ISET_65SC02) stz sreg @@ -19,7 +19,7 @@ tosand0ax: ldy #$00 sty sreg sty sreg+1 -.endif +.endif tosandeax: .if (.cpu .bitand ::CPU_ISET_65SC02) @@ -29,7 +29,7 @@ tosandeax: ldy #0 and (sp),y ; byte 0 iny -.endif +.endif sta tmp1 txa and (sp),y ; byte 1 diff --git a/libsrc/runtime/ldauisp.s b/libsrc/runtime/ldauisp.s index 1afcf2487..54f4d1bd1 100644 --- a/libsrc/runtime/ldauisp.s +++ b/libsrc/runtime/ldauisp.s @@ -21,4 +21,4 @@ ldauiysp: lda (ptr1),y rts - + diff --git a/libsrc/runtime/leave.s b/libsrc/runtime/leave.s index 4a9ff7994..95dcdec9d 100644 --- a/libsrc/runtime/leave.s +++ b/libsrc/runtime/leave.s @@ -1,4 +1,4 @@ -; +; ; Ullrich von Bassewitz, 06.08.1998 ; Christian Krueger, 11-Mar-2017, added 65SC02 optimization ; diff --git a/libsrc/runtime/leq.s b/libsrc/runtime/leq.s index 44316aa08..ac9894b53 100644 --- a/libsrc/runtime/leq.s +++ b/libsrc/runtime/leq.s @@ -7,7 +7,7 @@ .export toseqeax .import toslcmp, booleq -toseqeax: +toseqeax: jsr toslcmp ; Set flags jmp booleq ; Convert to boolean diff --git a/libsrc/runtime/lmod.s b/libsrc/runtime/lmod.s index caeb0c4f6..b8e796dea 100644 --- a/libsrc/runtime/lmod.s +++ b/libsrc/runtime/lmod.s @@ -23,7 +23,7 @@ tosmod0ax: sty sreg+1 .endif -tosmodeax: +tosmodeax: jsr poplsargs ; Get arguments from stack, adjust sign jsr udiv32 ; Do the division, remainder is in (ptr2:tmp3:tmp4) diff --git a/libsrc/runtime/lmul.s b/libsrc/runtime/lmul.s index d3c34637c..90d5f1e97 100644 --- a/libsrc/runtime/lmul.s +++ b/libsrc/runtime/lmul.s @@ -17,10 +17,10 @@ tosumul0ax: stz sreg stz sreg+1 .else - ldy #$00 + ldy #$00 sty sreg sty sreg+1 -.endif +.endif tosmuleax: tosumuleax: @@ -29,7 +29,7 @@ mul32: sta ptr1 .if (.cpu .bitand ::CPU_ISET_65SC02) lda (sp) ldy #1 -.else +.else ldy #0 lda (sp),y iny diff --git a/libsrc/runtime/lor.s b/libsrc/runtime/lor.s index 94ab3c890..f2204b981 100644 --- a/libsrc/runtime/lor.s +++ b/libsrc/runtime/lor.s @@ -8,7 +8,7 @@ .export tosor0ax, tosoreax .import addysp1 .importzp sp, sreg, tmp1 - + .macpack cpu tosor0ax: @@ -19,7 +19,7 @@ tosor0ax: ldy #$00 sty sreg sty sreg+1 -.endif +.endif tosoreax: .if (.cpu .bitand ::CPU_ISET_65SC02) @@ -29,7 +29,7 @@ tosoreax: ldy #0 ora (sp),y ; byte 0 iny -.endif +.endif sta tmp1 txa ora (sp),y ; byte 1 diff --git a/libsrc/runtime/lpop.s b/libsrc/runtime/lpop.s index ffff5ffc1..a90ea5fcb 100644 --- a/libsrc/runtime/lpop.s +++ b/libsrc/runtime/lpop.s @@ -22,7 +22,7 @@ popeax: ldy #3 tax .if (.cpu .bitand ::CPU_ISET_65SC02) lda (sp) -.else +.else dey lda (sp),y .endif diff --git a/libsrc/runtime/lpush.s b/libsrc/runtime/lpush.s index 4fed77f05..0bc67b523 100644 --- a/libsrc/runtime/lpush.s +++ b/libsrc/runtime/lpush.s @@ -41,9 +41,9 @@ pusheax: pla .if (.cpu .bitand ::CPU_ISET_65SC02) sta (sp) -.else +.else dey sta (sp),y -.endif +.endif rts diff --git a/libsrc/runtime/lrsub.s b/libsrc/runtime/lrsub.s index 928164f40..5e8d0b543 100644 --- a/libsrc/runtime/lrsub.s +++ b/libsrc/runtime/lrsub.s @@ -29,7 +29,7 @@ tosrsubeax: .if (.cpu .bitand ::CPU_ISET_65SC02) sbc (sp) ldy #1 -.else +.else ldy #0 sbc (sp),y ; byte 0 iny diff --git a/libsrc/runtime/lsub.s b/libsrc/runtime/lsub.s index 6f80491ca..4c50ded14 100644 --- a/libsrc/runtime/lsub.s +++ b/libsrc/runtime/lsub.s @@ -21,7 +21,7 @@ tossub0ax: ldy #$00 sty sreg sty sreg+1 -.endif +.endif tossubeax: sec diff --git a/libsrc/runtime/lsubeq.s b/libsrc/runtime/lsubeq.s index 5e3d25783..b16ab18e1 100644 --- a/libsrc/runtime/lsubeq.s +++ b/libsrc/runtime/lsubeq.s @@ -1,4 +1,4 @@ -; +; ; Ullrich von Bassewitz, 07.04.2000 ; Christian Krueger, 12-Mar-2017, added 65SC02 optimization ; @@ -22,19 +22,19 @@ lsubeqa: stx sreg+1 lsubeq: sty ptr1+1 ; Store high byte of address - + sec eor #$FF .if (.cpu .bitand ::CPU_ISET_65SC02) adc (ptr1) ; Subtract byte 0 sta (ptr1) - ldy #$01 ; Address byte 1 + ldy #$01 ; Address byte 1 .else ldy #$00 ; Address low byte adc (ptr1),y ; Subtract byte 0 sta (ptr1),y - iny ; Address byte 1 - .endif + iny ; Address byte 1 + .endif pha ; Save byte 0 of result for later txa eor #$FF diff --git a/libsrc/runtime/ltest.s b/libsrc/runtime/ltest.s index 6027b8dd4..d0caf2197 100644 --- a/libsrc/runtime/ltest.s +++ b/libsrc/runtime/ltest.s @@ -17,6 +17,6 @@ utsteax: beq L9 tya ldy #1 ; Force NE -L9: rts +L9: rts diff --git a/libsrc/runtime/ludiv.s b/libsrc/runtime/ludiv.s index 8a3126d72..e2e27371e 100644 --- a/libsrc/runtime/ludiv.s +++ b/libsrc/runtime/ludiv.s @@ -21,7 +21,7 @@ tosudiv0ax: sty sreg+1 .endif -tosudiveax: +tosudiveax: jsr getlop ; Get the paramameters jsr udiv32 ; Do the division lda ptr1 ; Result is in ptr1:sreg diff --git a/libsrc/runtime/lumod.s b/libsrc/runtime/lumod.s index 241801a90..09909c0c9 100644 --- a/libsrc/runtime/lumod.s +++ b/libsrc/runtime/lumod.s @@ -11,7 +11,7 @@ .macpack cpu -tosumod0ax: +tosumod0ax: .if (.cpu .bitand ::CPU_ISET_65SC02) stz sreg stz sreg+1 diff --git a/libsrc/runtime/lxor.s b/libsrc/runtime/lxor.s index 4ec9a4129..a92a59959 100644 --- a/libsrc/runtime/lxor.s +++ b/libsrc/runtime/lxor.s @@ -25,7 +25,7 @@ tosxoreax: .if (.cpu .bitand ::CPU_ISET_65SC02) eor (sp) ; byte 0 ldy #1 -.else +.else ldy #0 eor (sp),y ; byte 0 iny diff --git a/libsrc/runtime/mul.s b/libsrc/runtime/mul.s index 087e639fc..68cdea0c6 100644 --- a/libsrc/runtime/mul.s +++ b/libsrc/runtime/mul.s @@ -23,7 +23,7 @@ tosumulax: ; Do ptr4:ptr4+1 * ptr1:ptr1+1 --> AX - tya ; A = 0 + tya ; A = 0 ldy ptr1+1 ; check if lhs is 8 bit only beq @L4 ; -> we can do 8x16 after swap sta tmp1 @@ -36,7 +36,7 @@ tosumulax: clc adc ptr1 tax - lda ptr1+1 ; Hi byte of left op + lda ptr1+1 ; Hi byte of left op adc tmp1 sta tmp1 txa diff --git a/libsrc/runtime/mulax3.s b/libsrc/runtime/mulax3.s index 513ba723e..342379605 100644 --- a/libsrc/runtime/mulax3.s +++ b/libsrc/runtime/mulax3.s @@ -7,7 +7,7 @@ .export mulax3 .importzp ptr1 - + .proc mulax3 sta ptr1 diff --git a/libsrc/runtime/or.s b/libsrc/runtime/or.s index 1c2c4125e..735f30f61 100644 --- a/libsrc/runtime/or.s +++ b/libsrc/runtime/or.s @@ -21,7 +21,7 @@ tosorax: ldy #0 ora (sp),y iny -.endif +.endif sta tmp1 txa ora (sp),y diff --git a/libsrc/runtime/pushaff.s b/libsrc/runtime/pushaff.s index 08d988bb2..ae2142b0e 100644 --- a/libsrc/runtime/pushaff.s +++ b/libsrc/runtime/pushaff.s @@ -17,4 +17,4 @@ .endproc - + diff --git a/libsrc/runtime/pushax.s b/libsrc/runtime/pushax.s index cba313c2f..ac181b994 100644 --- a/libsrc/runtime/pushax.s +++ b/libsrc/runtime/pushax.s @@ -30,6 +30,6 @@ pusha0: ldx #0 pla ; (31) dey ; (33) sta (sp),y ; (38) - rts ; (44) + rts ; (44) .endproc diff --git a/libsrc/runtime/return0.s b/libsrc/runtime/return0.s index c061e013c..331f3334f 100644 --- a/libsrc/runtime/return0.s +++ b/libsrc/runtime/return0.s @@ -17,4 +17,4 @@ - + diff --git a/libsrc/runtime/return1.s b/libsrc/runtime/return1.s index 76153f3e1..e39cdf74e 100644 --- a/libsrc/runtime/return1.s +++ b/libsrc/runtime/return1.s @@ -17,4 +17,4 @@ - + diff --git a/libsrc/runtime/swap.s b/libsrc/runtime/swap.s index d4a74df5f..5358e08d3 100644 --- a/libsrc/runtime/swap.s +++ b/libsrc/runtime/swap.s @@ -23,13 +23,13 @@ swapstk: tay lda ptr4 sta (sp) - tya -.else + tya +.else dey lda (sp),y pha lda ptr4 sta (sp),y pla -.endif +.endif rts ; whew! diff --git a/libsrc/runtime/umod.s b/libsrc/runtime/umod.s index 5788d569e..205df59d7 100644 --- a/libsrc/runtime/umod.s +++ b/libsrc/runtime/umod.s @@ -25,4 +25,4 @@ tosumodax: ldx sreg+1 rts - + diff --git a/libsrc/runtime/umul16x16r32.s b/libsrc/runtime/umul16x16r32.s index cd2dae351..cfcf82d9e 100644 --- a/libsrc/runtime/umul16x16r32.s +++ b/libsrc/runtime/umul16x16r32.s @@ -12,7 +12,7 @@ ;--------------------------------------------------------------------------- ; 16x16 => 32 unsigned multiplication routine. Because the overhead for a -; 16x16 => 16 unsigned multiplication routine is small, we will tag it with +; 16x16 => 16 unsigned multiplication routine is small, we will tag it with ; the matching labels, as well. ; ; routine LHS RHS result result also in diff --git a/libsrc/sym1/read.s b/libsrc/sym1/read.s index c041664da..5f6a71144 100644 --- a/libsrc/sym1/read.s +++ b/libsrc/sym1/read.s @@ -48,6 +48,6 @@ putch: ldy #$00 ; Put char into return buffer done: lda ptr3 ldx ptr3+1 - rts ; Return count + rts ; Return count .endproc diff --git a/libsrc/sym1/write.s b/libsrc/sym1/write.s index dbe738468..008902e58 100644 --- a/libsrc/sym1/write.s +++ b/libsrc/sym1/write.s @@ -13,7 +13,7 @@ .proc _write - sta ptr3 + sta ptr3 stx ptr3+1 ; Count in ptr3 inx stx ptr2+1 ; Increment and store in ptr2 diff --git a/libsrc/telestrat/cclear.s b/libsrc/telestrat/cclear.s index b9fce4708..804381e89 100644 --- a/libsrc/telestrat/cclear.s +++ b/libsrc/telestrat/cclear.s @@ -6,9 +6,9 @@ ; .export _cclearxy, _cclear - .import update_adscr, display_conio + .import update_adscr, display_conio - .importzp tmp1 + .importzp tmp1 .import popax .include "telestrat.inc" diff --git a/libsrc/telestrat/chline.s b/libsrc/telestrat/chline.s index 91f3bdc9f..cd7628eca 100644 --- a/libsrc/telestrat/chline.s +++ b/libsrc/telestrat/chline.s @@ -4,7 +4,7 @@ ; .export _chlinexy, _chline - + .import rvs, display_conio, update_adscr .import popax @@ -22,7 +22,7 @@ _chlinexy: _chline: tax ; Is the length zero? beq @L9 ; Jump if done -@L1: +@L1: lda #'-' ; Horizontal line screen code ora rvs diff --git a/libsrc/telestrat/clrscr.s b/libsrc/telestrat/clrscr.s index c02c26647..749e40b8f 100644 --- a/libsrc/telestrat/clrscr.s +++ b/libsrc/telestrat/clrscr.s @@ -4,7 +4,7 @@ .export _clrscr .import OLD_CHARCOLOR, OLD_BGCOLOR, BGCOLOR, CHARCOLOR - + .include "telestrat.inc" .proc _clrscr @@ -35,13 +35,13 @@ ldx #$00 stx SCRY stx SCRX - + stx OLD_BGCOLOR ; Black stx BGCOLOR - + ldx #$07 ; White stx OLD_CHARCOLOR stx CHARCOLOR - + rts .endproc diff --git a/libsrc/telestrat/cputc.s b/libsrc/telestrat/cputc.s index 16b13f8cd..13714b32d 100644 --- a/libsrc/telestrat/cputc.s +++ b/libsrc/telestrat/cputc.s @@ -6,7 +6,7 @@ .export _cputc, _cputcxy, cputdirect, display_conio .export CHARCOLOR, OLD_CHARCOLOR, BGCOLOR, OLD_BGCOLOR - + .import update_adscr .import popax @@ -19,13 +19,13 @@ _cputcxy: sta SCRY ; Store Y stx SCRX ; Store X jsr update_adscr - pla + pla _cputc: cmp #$0D bne @not_CR ldy #$00 - sty SCRX + sty SCRX rts @not_CR: cmp #$0A @@ -80,10 +80,10 @@ do_not_change_color: sty SCRX inc SCRY - + jmp update_adscr - -@no_inc: + +@no_inc: sty SCRX rts .endproc diff --git a/libsrc/telestrat/gotoxy.s b/libsrc/telestrat/gotoxy.s index 3fbdc25e0..c0907a623 100644 --- a/libsrc/telestrat/gotoxy.s +++ b/libsrc/telestrat/gotoxy.s @@ -19,7 +19,7 @@ gotoxy: jsr popa ; Get Y ; In telemon, there is a position for the prompt, and another for the cursor. sta SCRY - + jsr popa sta SCRX @@ -48,6 +48,6 @@ skip: sta ADSCR dey bne loop -out: +out: rts .endproc diff --git a/libsrc/telestrat/joy/telestrat.s b/libsrc/telestrat/joy/telestrat.s index e4a6d94f2..0f5d28651 100644 --- a/libsrc/telestrat/joy/telestrat.s +++ b/libsrc/telestrat/joy/telestrat.s @@ -52,7 +52,7 @@ INSTALL: lda #%11000000 sta VIA2::DDRB sta VIA2::PRB - ; We could detect joysticks because with previous command bit0,1,2,3,4 should be set to 1 after + ; We could detect joysticks because with previous command bit0,1,2,3,4 should be set to 1 after ; But if some one press fire or press direction, we could reach others values which could break joystick detection. lda #<JOY_ERR_OK ldx #>JOY_ERR_OK @@ -83,7 +83,7 @@ COUNT: ; PB7 and PB6 select right or left port ; When PB7 and PB6 are high, it controls two CA3083 (2 NPN transistors array) bases. ; In that case, PB0 to PB4 are set to high (it means no action are pressed) -; When the user press something then bit will be set to 0. +; When the user press something then bit will be set to 0. ; Bit 0 is right ; Bit 1 is left ; Bit 2 is fire @@ -94,18 +94,18 @@ READ: lda VIA2::PRB and #%01111111 - ora #%01000000 + ora #%01000000 sta VIA2::PRB ; then read lda VIA2::PRB eor #%01011111 - + rts -right: +right: lda VIA2::PRB and #%10111111 ora #%10000000 - sta VIA2::PRB + sta VIA2::PRB ; then read lda VIA2::PRB diff --git a/libsrc/telestrat/orixhdr.s b/libsrc/telestrat/orixhdr.s index 58e93efbb..78d6c945a 100644 --- a/libsrc/telestrat/orixhdr.s +++ b/libsrc/telestrat/orixhdr.s @@ -24,7 +24,7 @@ .byte $01 ; Version of the header .byte $00,%00000000 ; 6502 only .byte $00,$00 ; Type of language - .byte $00,$00 ; OS version + .byte $00,$00 ; OS version .byte $00 ; Reserved .byte $00 ; Auto or not diff --git a/libsrc/telestrat/sound.s b/libsrc/telestrat/sound.s index 3718debd4..2a786a452 100644 --- a/libsrc/telestrat/sound.s +++ b/libsrc/telestrat/sound.s @@ -33,7 +33,7 @@ sound_bip_keyboard: rts .endproc -.proc _zap +.proc _zap BRK_TELEMON XZAP rts .endproc diff --git a/libsrc/telestrat/syschdir.s b/libsrc/telestrat/syschdir.s index 09763bdbb..6257880b8 100644 --- a/libsrc/telestrat/syschdir.s +++ b/libsrc/telestrat/syschdir.s @@ -11,7 +11,7 @@ .include "telestrat.inc" .include "zeropage.inc" - + __syschdir: ; Throw away all parameters except the name @@ -24,9 +24,9 @@ __syschdir: stx tmp1 ldy tmp1 - + ; Call telemon primitive - + BRK_TELEMON(XPUTCWD) jmp initcwd ; Update cwd diff --git a/libsrc/telestrat/sysmkdir.s b/libsrc/telestrat/sysmkdir.s index 26d97c4b0..259be8d7c 100644 --- a/libsrc/telestrat/sysmkdir.s +++ b/libsrc/telestrat/sysmkdir.s @@ -9,7 +9,7 @@ .include "telestrat.inc" .include "zeropage.inc" - + __sysmkdir: ; Throw away all parameters except the name @@ -19,11 +19,11 @@ __sysmkdir: ; Get name jsr popax - + ; Call telemon primitive - + BRK_TELEMON(XMKDIR) - + rts diff --git a/libsrc/telestrat/tgi/telestrat-228-200-3.s b/libsrc/telestrat/tgi/telestrat-228-200-3.s index 7eda27bc9..402e04e7e 100644 --- a/libsrc/telestrat/tgi/telestrat-228-200-3.s +++ b/libsrc/telestrat/tgi/telestrat-228-200-3.s @@ -107,7 +107,7 @@ INIT: ; Switch into graphics mode. BRK_TELEMON(XHIRES) - + ; Done, reset the error code. lda #TGI_ERR_OK @@ -255,18 +255,18 @@ GETDEFPALETTE: SETPIXEL: lda #$80 - + SETPIXELSETMODE: sta HRSFB lda X1 sta HRS1 lda Y1 sta HRS2 - - + + BRK_TELEMON(XCURSE) - + rts ; ------------------------------------------------------------------------ @@ -291,7 +291,7 @@ LINE: sta HRS1 lda Y1 sta HRS2 - + lda X2 sta HRS3 lda Y2 @@ -300,14 +300,14 @@ LINE: lda X1+1 sta HRS1+1 - lda Y1+1 + lda Y1+1 sta HRS2+1 lda X2+1 sta HRS3+1 - - lda Y2+1 - sta HRS4+1 + + lda Y2+1 + sta HRS4+1 lda #$FF sta HRSPAT @@ -315,12 +315,12 @@ LINE: BRK_TELEMON(XDRAWA) rts - - + + CIRCLE: ; not done yet rts - + ; ------------------------------------------------------------------------ ; BAR: Draw a filled rectangle with the corners X1/Y1, X2/Y2, where ; X1/Y1 = ptr1/ptr2 and X2/Y2 = ptr3/ptr4, using the current drawing color. @@ -364,11 +364,11 @@ OUTTEXT: ; put hires cursor in X & Y lda #$00 jsr SETPIXELSETMODE - - + + ; count the length of the string ldy #$00 -loop: +loop: lda (ptr3),y beq out iny @@ -376,10 +376,10 @@ loop: out: ; XSCHAR routine from telemon needs to have the length of the string in X register ; copy Y register to X register. It could be optimized in 65C02 with TYX - tya + tya tax - + lda ptr3 ; XSCHAR needs in A and Y the address of the string - ldy ptr3+1 + ldy ptr3+1 BRK_TELEMON(XSCHAR) rts diff --git a/libsrc/telestrat/tgi/telestrat-240-200-2.s b/libsrc/telestrat/tgi/telestrat-240-200-2.s index 7a6bb8a4c..d619fc6f1 100644 --- a/libsrc/telestrat/tgi/telestrat-240-200-2.s +++ b/libsrc/telestrat/tgi/telestrat-240-200-2.s @@ -124,7 +124,7 @@ INIT: ; Switch into graphics mode BRK_TELEMON(XHIRES) - + ; Done, reset the error code lda #TGI_ERR_OK @@ -247,17 +247,17 @@ GETDEFPALETTE: ; SETPIXEL: - lda #$80 ; curset on -SETPIXELSETMODE: + lda #$80 ; curset on +SETPIXELSETMODE: sta HRSFB - + lda X1 sta HRS1 lda Y1 sta HRS2 - - - + + + BRK_TELEMON(XCURSE) rts @@ -289,19 +289,19 @@ LINE: sta HRS3 lda Y2 sta HRS4 - + lda X1+1 sta HRS1+1 - lda Y1+1 + lda Y1+1 sta HRS2+1 lda X2+1 sta HRS3+1 - - lda Y2+1 - sta HRS4+1 + + lda Y2+1 + sta HRS4+1 lda #$FF sta HRSPAT @@ -309,11 +309,11 @@ LINE: BRK_TELEMON(XDRAWA) rts - -CIRCLE: + +CIRCLE: ; not done yet - rts - + rts + ; ------------------------------------------------------------------------ ; BAR: Draw a filled rectangle with the corners X1/Y1, X2/Y2, where ; X1/Y1 = ptr1/ptr2 and X2/Y2 = ptr3/ptr4 using the current drawing color. @@ -357,11 +357,11 @@ OUTTEXT: ; put hires cursor in X & Y lda #$00 jsr SETPIXELSETMODE - - + + ; count the length of the string ldy #$00 -loop: +loop: lda (ptr3),y beq out iny @@ -369,10 +369,10 @@ loop: out: ; XSCHAR routine from telemon needs to have the length of the string in X register ; copy Y register to X register. It could be optimized in 65C02 with TYX - tya + tya tax - + lda ptr3 ; XSCHAR needs in A and Y the address of the string - ldy ptr3+1 + ldy ptr3+1 BRK_TELEMON(XSCHAR) rts diff --git a/libsrc/tgi/tgi_gettextheight.s b/libsrc/tgi/tgi_gettextheight.s index 38df6a69a..bd05386c1 100644 --- a/libsrc/tgi/tgi_gettextheight.s +++ b/libsrc/tgi/tgi_gettextheight.s @@ -15,7 +15,7 @@ ; */ ; -.proc _tgi_gettextheight +.proc _tgi_gettextheight ldy _tgi_font bne @L2 ; Jump if vector font diff --git a/libsrc/tgi/tgi_imulround.s b/libsrc/tgi/tgi_imulround.s index 112f2930f..7b7f25b78 100644 --- a/libsrc/tgi/tgi_imulround.s +++ b/libsrc/tgi/tgi_imulround.s @@ -1,7 +1,7 @@ ; ; Ullrich von Bassewitz, 2009-11-05 ; -; Helper function for graphics functions: Multiply two values, one being +; Helper function for graphics functions: Multiply two values, one being ; an 8.8 fixed point one, and return the rounded and scaled result. ; ; The module has two entry points: One is C callable and expects the @@ -60,4 +60,4 @@ tgi_imulround: tya rts - + diff --git a/libsrc/tgi/tgi_lineto.s b/libsrc/tgi/tgi_lineto.s index abe4b3f96..6934bfe2c 100644 --- a/libsrc/tgi/tgi_lineto.s +++ b/libsrc/tgi/tgi_lineto.s @@ -17,7 +17,7 @@ @L1: lda _tgi_curx,y sta tgi_clip_x1,y dey - bpl @L1 + bpl @L1 pla jsr tgi_linepop ; Pop x2/y2 jmp tgi_clippedline ; Call the line clipper diff --git a/libsrc/tgi/tgi_outtext.s b/libsrc/tgi/tgi_outtext.s index 079cea3af..e0a3c6d25 100644 --- a/libsrc/tgi/tgi_outtext.s +++ b/libsrc/tgi/tgi_outtext.s @@ -125,7 +125,7 @@ VectorFont: jsr MoveCursor ; Move the graphics cursor ; Next char in string - + inc text bne @L1 inc text+1 diff --git a/libsrc/tgi/tgidrv_line.inc b/libsrc/tgi/tgidrv_line.inc index e904b5117..5fd6b229e 100644 --- a/libsrc/tgi/tgidrv_line.inc +++ b/libsrc/tgi/tgidrv_line.inc @@ -269,7 +269,7 @@ abs: ; A/Y := abs (A/Y) cpy #$00 bpl :+ - + ; A/Y := neg (A/Y) neg: clc eor #$FF From 299f967527a2ca9d8aa9bca4d641d41d0c518ef5 Mon Sep 17 00:00:00 2001 From: mrdudz <mrdudz@users.noreply.github.com> Date: Sun, 17 Apr 2022 16:06:45 +0200 Subject: [PATCH 088/101] remove dangling spaces --- samples/geos/dialog.c | 4 ++-- samples/geos/filesel.c | 6 +++--- samples/geos/geosconio.c | 10 +++++----- samples/geos/geosver.c | 2 +- samples/geos/hello1.c | 8 ++++---- samples/geos/hello2.c | 12 ++++++------ samples/geos/overlay-demo.c | 2 +- samples/geos/rmvprot.c | 8 ++++---- samples/sym1/symDisplay.c | 4 ++-- samples/sym1/symExtendedMemory.c | 2 +- samples/sym1/symIO.c | 4 ++-- 11 files changed, 31 insertions(+), 31 deletions(-) diff --git a/samples/geos/dialog.c b/samples/geos/dialog.c index 27199a493..c3231e855 100644 --- a/samples/geos/dialog.c +++ b/samples/geos/dialog.c @@ -1,4 +1,4 @@ -/* Note: +/* Note: ** This is just a sample piece of code that shows how to use some structs - ** it may not even run. */ @@ -28,5 +28,5 @@ static const dlgBoxStr myDialog = { void main (void) { - DoDlgBox (&myDialog); + DoDlgBox (&myDialog); } diff --git a/samples/geos/filesel.c b/samples/geos/filesel.c index c0a591eb9..fcca258bb 100644 --- a/samples/geos/filesel.c +++ b/samples/geos/filesel.c @@ -1,11 +1,11 @@ /* GEOSLib example - + using DlgBoxFileSelect - + Maciej 'YTM/Elysium' Witkowiak <ytm@elysium.pl> - + 26.12.1999 */ diff --git a/samples/geos/geosconio.c b/samples/geos/geosconio.c index 963fa06a0..55acac38e 100644 --- a/samples/geos/geosconio.c +++ b/samples/geos/geosconio.c @@ -9,16 +9,16 @@ void main(void) char ch; DlgBoxOk("Now the screen will be", "cleared."); - + clrscr(); - + DlgBoxOk("Now a character will be", "written at 20,20"); - + gotoxy(20, 20); cputc('A'); DlgBoxOk("Now a string will be", "written at 0,1"); - + cputsxy(0, 1, CBOLDON "Just" COUTLINEON "a " CITALICON "string." CPLAINTEXT ); DlgBoxOk("Write text and finish it", "with a dot."); @@ -31,7 +31,7 @@ void main(void) cursor(0); DlgBoxOk("Seems that it is all for conio.", "Let's test mouse routines."); - + mouse_init(1); cputsxy(0, 2, CBOLDON "Now you can't see mouse (press any key)" CPLAINTEXT); mouse_hide(); diff --git a/samples/geos/geosver.c b/samples/geos/geosver.c index 3d68798a2..fa8351e0d 100644 --- a/samples/geos/geosver.c +++ b/samples/geos/geosver.c @@ -57,6 +57,6 @@ void main (void) } Sleep(10*50); - + return; } diff --git a/samples/geos/hello1.c b/samples/geos/hello1.c index 8dc13d5b4..bd51dd1b9 100644 --- a/samples/geos/hello1.c +++ b/samples/geos/hello1.c @@ -1,11 +1,11 @@ /* GEOSLib example - + Hello, world example - with DBox - + Maciej 'YTM/Elysium' Witkowiak <ytm@elysium.pl> - + 26.12.1999 */ @@ -18,7 +18,7 @@ void main (void) DlgBoxOk(CBOLDON "Hello, world" CPLAINTEXT, "This is written in C!"); - + // Normal apps exit from main into system's mainloop, and app finish // when user selects it from icons or menu, but here we want to exit // immediately. diff --git a/samples/geos/hello2.c b/samples/geos/hello2.c index 3f148b0b8..ae93fa1a4 100644 --- a/samples/geos/hello2.c +++ b/samples/geos/hello2.c @@ -1,11 +1,11 @@ /* GEOSLib example - + Hello, world example - using graphic functions - + Maciej 'YTM/Alliance' Witkowiak <ytm@friko.onet.pl> - + 26.12.1999 */ @@ -25,18 +25,18 @@ void main (void) SetPattern(0); InitDrawWindow(&wholeScreen); Rectangle(); - + // Now some texts PutString(COUTLINEON "This is compiled using cc65!" CPLAINTEXT, 20, 10); PutString(CBOLDON "This is bold", 30, 10); PutString(CULINEON "and this is bold and underline!", 40, 10); PutString(CPLAINTEXT "This is plain text", 50, 10); - + // Wait for 5 secs... // Note that this is multitasking sleep, and if there are any icons/menus onscreen, // they would be usable, in this case you have only pointer usable Sleep(5*50); - + // Normal apps exit from main into system's mainloop, and app finish // when user selects it from icons or menu, but here we want to exit // immediately. diff --git a/samples/geos/overlay-demo.c b/samples/geos/overlay-demo.c index a37f6bdcb..73ab0e3c0 100644 --- a/samples/geos/overlay-demo.c +++ b/samples/geos/overlay-demo.c @@ -33,7 +33,7 @@ void foo(void) { /* Functions resident in an overlay can access all program variables and ** constants at any time without any precautions because those are never - ** placed in overlays. The string constant "One" is an example for such + ** placed in overlays. The string constant "One" is an example for such ** a constant resident in the main program. */ show("One"); diff --git a/samples/geos/rmvprot.c b/samples/geos/rmvprot.c index 4f8798f98..152f6cf0f 100644 --- a/samples/geos/rmvprot.c +++ b/samples/geos/rmvprot.c @@ -1,12 +1,12 @@ /* GEOSLib example - + This small application removes GEOS disk write protection tag. e.g. boot disk is always protected after boot-up - + Maciej 'YTM/Elysium' Witkowiak <ytm@elysium.pl> - + 21.03.2000 */ @@ -60,7 +60,7 @@ void main(void) { // Here we clear the screen. Not really needed anyway... GraphicsString(&clearScreen); - + // Get the name of current disk to show it in dialog box GetPtrCurDkNm(diskName); diff --git a/samples/sym1/symDisplay.c b/samples/sym1/symDisplay.c index dce39f6b9..43d18f911 100644 --- a/samples/sym1/symDisplay.c +++ b/samples/sym1/symDisplay.c @@ -14,7 +14,7 @@ int main (void) { int flashes = 255; int displayable = 1; int e = 0; - int r = 0; + int r = 0; int d = 0; int i = 0; int l = 0; @@ -40,7 +40,7 @@ int main (void) { puts ("\n\nHow many times (0 for forever) to repeat?"); c = getchar(); if ( (c >= '0') && (c <= '9') ) {// between 1 and 9 loops allowed - z = 1; // a number was pressed + z = 1; // a number was pressed t = c - '0'; // convert char to int puts ("\n\nLook at the front panel.\n"); } diff --git a/samples/sym1/symExtendedMemory.c b/samples/sym1/symExtendedMemory.c index cc01da353..897276e6f 100644 --- a/samples/sym1/symExtendedMemory.c +++ b/samples/sym1/symExtendedMemory.c @@ -72,7 +72,7 @@ int main (void) { error = 0; } } - segment += 0x1000; // Increment to next segment + segment += 0x1000; // Increment to next segment } segment[0] = 0x00; // Check beginning of top memory segment diff --git a/samples/sym1/symIO.c b/samples/sym1/symIO.c index 50fefc303..bb46dc3df 100644 --- a/samples/sym1/symIO.c +++ b/samples/sym1/symIO.c @@ -52,7 +52,7 @@ int main (void) { ior3b = VIA3.prb; puts ("================== Digital I/O Status =================="); - puts (" Port1A Port1B Port2A Port2B Port3A Port3B" ); + puts (" Port1A Port1B Port2A Port2B Port3A Port3B" ); printf ("DDR %02X %02X %02X %02X %02X %02X\n\r",ddr1a,ddr1b,ddr2a,ddr2b,ddr3a,ddr3b); printf ("IOR %02X %02X %02X %02X %02X %02X\n\r",ior1a,ior1b,ior2a,ior2b,ior3a,ior3b); puts ("========================================================\n"); @@ -75,7 +75,7 @@ int main (void) { cmd[strlen(cmd)-1] = '\0'; if ( strncasecmp(cmd, "quit", 4) == 0 ) { - going = 0; + going = 0; } else if ( strncasecmp(cmd, "help", 4) == 0 ) { instr = 1; From 3c1bb85b8ea7417f31ccd915119a8e71c50f2f3d Mon Sep 17 00:00:00 2001 From: mrdudz <mrdudz@users.noreply.github.com> Date: Sun, 17 Apr 2022 16:07:09 +0200 Subject: [PATCH 089/101] remove dangling spaces --- src/ar65/del.h | 2 +- src/ca65/anonname.c | 2 +- src/ca65/anonname.h | 2 +- src/ca65/easw16.c | 2 +- src/ca65/easw16.h | 2 +- src/ca65/instr.c | 10 +++++----- src/ca65/instr.h | 2 +- src/ca65/istack.c | 2 +- src/ca65/macro.h | 2 +- src/ca65/options.c | 2 +- src/ca65/span.c | 4 ++-- src/ca65/studyexpr.h | 2 +- src/ca65/symbol.c | 2 +- src/ca65/ulabel.c | 4 ++-- src/cc65/codeent.c | 2 +- src/cc65/datatype.c | 2 +- src/cc65/declare.c | 2 +- src/cc65/expr.c | 2 +- src/cl65/error.c | 2 +- src/cl65/main.c | 4 ++-- src/co65/convert.h | 2 +- src/co65/error.c | 2 +- src/co65/model.c | 2 +- src/common/debugflag.c | 2 +- src/common/debugflag.h | 2 +- src/common/filepos.c | 2 +- src/common/searchpath.c | 4 ++-- src/common/strstack.c | 4 ++-- src/common/strutil.c | 4 ++-- src/common/va_copy.h | 2 +- src/common/xsprintf.c | 2 +- src/common/xsprintf.h | 6 +++--- src/da65/comments.c | 2 +- src/da65/opc6502dtv.h | 2 +- src/da65/opc6502x.h | 2 +- src/da65/opctable.h | 2 +- src/dbginfo/dbginfo.h | 2 +- src/ld65/condes.c | 2 +- src/ld65/fragment.h | 2 +- src/ld65/mapfile.c | 2 +- src/od65/dump.c | 2 +- src/od65/fileio.c | 2 +- src/sim65/6502.c | 8 ++++---- src/sp65/bin.c | 2 +- src/sp65/color.h | 2 +- src/sp65/geosbitmap.h | 6 +++--- src/sp65/koala.c | 2 +- src/sp65/lynxsprite.h | 2 +- src/sp65/vic2sprite.c | 2 +- src/sp65/vic2sprite.h | 2 +- 50 files changed, 67 insertions(+), 67 deletions(-) diff --git a/src/ar65/del.h b/src/ar65/del.h index 6100fe60a..dd45d0ec5 100644 --- a/src/ar65/del.h +++ b/src/ar65/del.h @@ -49,6 +49,6 @@ void DelObjFiles (int argc, char* argv []); -/* End of del.h */ +/* End of del.h */ #endif diff --git a/src/ca65/anonname.c b/src/ca65/anonname.c index 90b73fcab..fca20c8cd 100644 --- a/src/ca65/anonname.c +++ b/src/ca65/anonname.c @@ -72,7 +72,7 @@ StrBuf* AnonName (StrBuf* Buf, const char* Spec) int IsAnonName (const StrBuf* Name) /* Check if the given symbol name is that of an anonymous symbol */ -{ +{ if (SB_GetLen (Name) < sizeof (AnonTag) - 1) { /* Too short */ return 0; diff --git a/src/ca65/anonname.h b/src/ca65/anonname.h index 142cd9f87..7d5671c68 100644 --- a/src/ca65/anonname.h +++ b/src/ca65/anonname.h @@ -58,7 +58,7 @@ StrBuf* AnonName (StrBuf* Buf, const char* Spec); int IsAnonName (const StrBuf* Name); /* Check if the given symbol name is that of an anonymous symbol */ - + /* End of anonname.h */ diff --git a/src/ca65/easw16.c b/src/ca65/easw16.c index 578a25734..081828991 100644 --- a/src/ca65/easw16.c +++ b/src/ca65/easw16.c @@ -147,4 +147,4 @@ void GetSweet16EA (EffAddr* A) } - + diff --git a/src/ca65/easw16.h b/src/ca65/easw16.h index b8b06d466..03a48c437 100644 --- a/src/ca65/easw16.h +++ b/src/ca65/easw16.h @@ -65,4 +65,4 @@ void GetSweet16EA (EffAddr* A); - + diff --git a/src/ca65/instr.c b/src/ca65/instr.c index faeff2026..834edfb5f 100644 --- a/src/ca65/instr.c +++ b/src/ca65/instr.c @@ -303,9 +303,9 @@ static const struct { } }; -/* Instruction table for the 6502 with DTV extra opcodes (DTV) and +/* Instruction table for the 6502 with DTV extra opcodes (DTV) and ** those illegal instructions (X) which are supported by DTV. -** Note: illegals opcodes which contain more subinstructions +** Note: illegals opcodes which contain more subinstructions ** (ASO, DCM, LSE, LXA, SBX and SHS) are not enlisted. */ static const struct { @@ -1207,9 +1207,9 @@ static int EvalEA (const InsDesc* Ins, EffAddr* A) } else { ED.AddrSize = DataAddrSize; /* If the default address size of the data segment is unequal - ** to zero page addressing, but zero page addressing is - ** allowed by the instruction, mark all symbols in the - ** expression tree. This mark will be checked at end of + ** to zero page addressing, but zero page addressing is + ** allowed by the instruction, mark all symbols in the + ** expression tree. This mark will be checked at end of ** assembly, and a warning is issued, if a zero page symbol ** was guessed wrong here. */ diff --git a/src/ca65/instr.h b/src/ca65/instr.h index 0a1a5e13d..fe18d2110 100644 --- a/src/ca65/instr.h +++ b/src/ca65/instr.h @@ -101,7 +101,7 @@ /* Bitmask for all FAR operations */ #define AM65_ALL_FAR (AM65_ABS_LONG | AM65_ABS_LONG_X) - + /* Bitmask for all immediate operations */ #define AM65_ALL_IMM (AM65_IMM_ACCU | AM65_IMM_INDEX | AM65_IMM_IMPLICIT | AM65_IMM_IMPLICIT_WORD) diff --git a/src/ca65/istack.c b/src/ca65/istack.c index 8cda7dd2f..7a95e7e8c 100644 --- a/src/ca65/istack.c +++ b/src/ca65/istack.c @@ -81,7 +81,7 @@ void PushInput (int (*Func) (void*), void* Data, const char* Desc) /* Check for a stack overflow */ if (ICount > ISTACK_MAX) { Fatal ("Maximum input stack nesting exceeded"); - } + } /* Create a new stack element */ E = xmalloc (sizeof (*E)); diff --git a/src/ca65/macro.h b/src/ca65/macro.h index bb7b817a8..7f4335706 100644 --- a/src/ca65/macro.h +++ b/src/ca65/macro.h @@ -62,7 +62,7 @@ struct StrBuf; struct Macro; typedef struct Macro Macro; - + /*****************************************************************************/ /* Code */ diff --git a/src/ca65/options.c b/src/ca65/options.c index c71296a57..84d7148be 100644 --- a/src/ca65/options.c +++ b/src/ca65/options.c @@ -182,4 +182,4 @@ void WriteOptions (void) - + diff --git a/src/ca65/span.c b/src/ca65/span.c index a4faea121..5ab3fc955 100644 --- a/src/ca65/span.c +++ b/src/ca65/span.c @@ -204,7 +204,7 @@ static Span* MergeSpan (Span* S) void SetSpanType (Span* S, const StrBuf* Type) /* Set the generic type of the span to Type */ -{ +{ /* Ignore the call if we won't generate debug infos */ if (DbgSyms) { S->Type = GetStrBufId (Type); @@ -354,7 +354,7 @@ static int CollectSpans (void* Entry, void* Data) return 0; } - + void WriteSpans (void) /* Write all spans to the object file */ diff --git a/src/ca65/studyexpr.h b/src/ca65/studyexpr.h index 389bce5a3..a81f6c9c8 100644 --- a/src/ca65/studyexpr.h +++ b/src/ca65/studyexpr.h @@ -36,7 +36,7 @@ #ifndef STUDYEXPR_H #define STUDYEXPR_H - + /* common */ #include "exprdefs.h" diff --git a/src/ca65/symbol.c b/src/ca65/symbol.c index 3b06fd1a2..f1c259082 100644 --- a/src/ca65/symbol.c +++ b/src/ca65/symbol.c @@ -187,7 +187,7 @@ SymEntry* ParseScopedSymName (SymFindAction Action) ** may not expect NULL to be returned if Action contains SYM_ALLOC_NEW, ** create a new symbol. */ - if (Action & SYM_ALLOC_NEW) { + if (Action & SYM_ALLOC_NEW) { Sym = NewSymEntry (&Ident, SF_NONE); } else { Sym = 0; diff --git a/src/ca65/ulabel.c b/src/ca65/ulabel.c index 9712f4942..1127c3743 100644 --- a/src/ca65/ulabel.c +++ b/src/ca65/ulabel.c @@ -160,7 +160,7 @@ void ULabDef (void) */ ULabel* L = CollAtUnchecked (&ULabList, ULabDefCount); CHECK (L->Val == 0); - L->Val = GenCurrentPC (); + L->Val = GenCurrentPC (); ReleaseFullLineInfo (&L->LineInfos); GetFullLineInfo (&L->LineInfos); } else { @@ -200,7 +200,7 @@ ExprNode* ULabResolve (unsigned Index) void ULabDone (void) -/* Run through all unnamed labels, check for anomalies and errors and do +/* Run through all unnamed labels, check for anomalies and errors and do ** necessary cleanups. */ { diff --git a/src/cc65/codeent.c b/src/cc65/codeent.c index 0a1b917db..62118d80c 100644 --- a/src/cc65/codeent.c +++ b/src/cc65/codeent.c @@ -1781,7 +1781,7 @@ void CE_GenRegInfo (CodeEntry* E, RegContents* InputRegs) if (RegValIsKnown (In->RegX)) { Out->RegX = (In->RegX ^ 0xFF); } - } else if (strncmp (E->Arg, "asrax", 5) == 0 || + } else if (strncmp (E->Arg, "asrax", 5) == 0 || strncmp (E->Arg, "shrax", 5) == 0) { if (RegValIsKnown (In->RegX)) { if (In->RegX == 0x00 || In->RegX == 0xFF) { diff --git a/src/cc65/datatype.c b/src/cc65/datatype.c index e5d3f8d96..cc313bd21 100644 --- a/src/cc65/datatype.c +++ b/src/cc65/datatype.c @@ -1105,7 +1105,7 @@ Type* NewBitFieldType (const Type* T, unsigned BitOffs, unsigned BitWidth) /* The type specifier must be integeral */ CHECK (IsClassInt (T)); - + /* Allocate the new type string */ P = TypeAlloc (3); diff --git a/src/cc65/declare.c b/src/cc65/declare.c index fa4c52818..017a69874 100644 --- a/src/cc65/declare.c +++ b/src/cc65/declare.c @@ -2267,7 +2267,7 @@ static void DefineBitFieldData (StructInitData* SI) static void DefineStrData (Literal* Lit, unsigned Count) -{ +{ /* Translate into target charset */ TranslateLiteral (Lit); diff --git a/src/cc65/expr.c b/src/cc65/expr.c index ab48a4554..7343702ea 100644 --- a/src/cc65/expr.c +++ b/src/cc65/expr.c @@ -3786,7 +3786,7 @@ static void hieOr (ExprDesc *Expr) /* Load false only if the result is not true */ g_getimmed (CF_INT | CF_CONST, 0, 0); /* Load FALSE */ g_falsejump (CF_NONE, DoneLab); - + /* Load the true value */ g_defcodelabel (TrueLab); g_getimmed (CF_INT | CF_CONST, 1, 0); /* Load TRUE */ diff --git a/src/cl65/error.c b/src/cl65/error.c index ee2adcfcc..9c234681f 100644 --- a/src/cl65/error.c +++ b/src/cl65/error.c @@ -39,7 +39,7 @@ /* common */ #include "cmdline.h" - + /* cl65 */ #include "global.h" #include "error.h" diff --git a/src/cl65/main.c b/src/cl65/main.c index 023e111e0..e032baee4 100644 --- a/src/cl65/main.c +++ b/src/cl65/main.c @@ -1503,7 +1503,7 @@ int main (int argc, char* argv []) case 'E': /* Forward -E to compiler */ - CmdAddArg (&CC65, Arg); + CmdAddArg (&CC65, Arg); DisableAssemblingAndLinking (); break; @@ -1513,7 +1513,7 @@ int main (int argc, char* argv []) OptAsmArgs (Arg, GetArg (&I, 3)); } else if (Arg[2] == 'c' && Arg[3] == '\0') { /* -Wc: Pass options to compiler */ - /* Remember -Wc sub arguments in cc65 arg struct */ + /* Remember -Wc sub arguments in cc65 arg struct */ OptCCArgs (Arg, GetArg (&I, 3)); } else if (Arg[2] == 'l' && Arg[3] == '\0') { /* -Wl: Pass options to linker */ diff --git a/src/co65/convert.h b/src/co65/convert.h index 8c7782ff3..5045acedd 100644 --- a/src/co65/convert.h +++ b/src/co65/convert.h @@ -56,7 +56,7 @@ struct O65Data; void Convert (const struct O65Data* D); -/* Convert the o65 file in D */ +/* Convert the o65 file in D */ diff --git a/src/co65/error.c b/src/co65/error.c index 1fa099c94..dc3e4e73b 100644 --- a/src/co65/error.c +++ b/src/co65/error.c @@ -81,7 +81,7 @@ void Error (const char* Format, ...) void Internal (const char* Format, ...) /* Print an internal error message and die */ { - va_list ap; + va_list ap; va_start (ap, Format); fprintf (stderr, "%s: Internal error: ", ProgName); vfprintf (stderr, Format, ap); diff --git a/src/co65/model.c b/src/co65/model.c index bb815cd15..2206993bf 100644 --- a/src/co65/model.c +++ b/src/co65/model.c @@ -53,7 +53,7 @@ O65Model Model = O65_MODEL_NONE; /* Name table */ static const char* const NameTable[O65_MODEL_COUNT] = { - "none", + "none", "os/a65", "lunix", "cc65-module" diff --git a/src/common/debugflag.c b/src/common/debugflag.c index 7d2e80009..0a452ae36 100644 --- a/src/common/debugflag.c +++ b/src/common/debugflag.c @@ -32,7 +32,7 @@ /*****************************************************************************/ - + /* common */ #include "debugflag.h" diff --git a/src/common/debugflag.h b/src/common/debugflag.h index d325a9eb9..39034044e 100644 --- a/src/common/debugflag.h +++ b/src/common/debugflag.h @@ -31,7 +31,7 @@ /* */ /*****************************************************************************/ - + #ifndef DEBUGFLAG_H #define DEBUGFLAG_H diff --git a/src/common/filepos.c b/src/common/filepos.c index 51488ffe5..b2cac79e1 100644 --- a/src/common/filepos.c +++ b/src/common/filepos.c @@ -60,7 +60,7 @@ int CompareFilePos (const FilePos* P1, const FilePos* P2) ** compare rates file index over line over column. */ { - if (P1->Name > P2->Name) { + if (P1->Name > P2->Name) { return 1; } else if (P1->Name < P2->Name) { return -1; diff --git a/src/common/searchpath.c b/src/common/searchpath.c index ca7017e6f..70237a1c9 100644 --- a/src/common/searchpath.c +++ b/src/common/searchpath.c @@ -210,9 +210,9 @@ int PushSearchPath (SearchPaths* P, const char* NewPath) ** that it's not already there. If the path is already at the first position, ** return zero, otherwise return a non zero value. */ -{ +{ /* Generate a clean copy of NewPath */ - char* Path = CleanupPath (NewPath); + char* Path = CleanupPath (NewPath); /* If we have paths, check if Path is already at position zero */ if (CollCount (P) > 0 && strcmp (CollConstAt (P, 0), Path) == 0) { diff --git a/src/common/strstack.c b/src/common/strstack.c index 29dd10426..6b9fb0f8b 100644 --- a/src/common/strstack.c +++ b/src/common/strstack.c @@ -32,12 +32,12 @@ /*****************************************************************************/ - + /* common */ #include "check.h" #include "strstack.h" #include "xmalloc.h" - + /*****************************************************************************/ diff --git a/src/common/strutil.c b/src/common/strutil.c index dabed34cd..60284e860 100644 --- a/src/common/strutil.c +++ b/src/common/strutil.c @@ -66,7 +66,7 @@ char* StrCopy (char* Dest, size_t DestSize, const char* Source) int StrCaseCmp (const char* S1, const char* S2) -/* Compare two strings ignoring case */ +/* Compare two strings ignoring case */ { int Diff; while ((Diff = toupper (*S1) - toupper (*S2)) == 0 && *S1) { @@ -77,4 +77,4 @@ int StrCaseCmp (const char* S1, const char* S2) } - + diff --git a/src/common/va_copy.h b/src/common/va_copy.h index 4aa2428db..413d96bdd 100644 --- a/src/common/va_copy.h +++ b/src/common/va_copy.h @@ -41,7 +41,7 @@ #include <stdarg.h> - + /* No action if we have a working va_copy */ #if !defined(va_copy) diff --git a/src/common/xsprintf.c b/src/common/xsprintf.c index 5994bb604..a3fbc676b 100644 --- a/src/common/xsprintf.c +++ b/src/common/xsprintf.c @@ -580,7 +580,7 @@ int xvsnprintf (char* Buf, size_t Size, const char* Format, va_list ap) CHECK (S != 0); /* Handle the length by using a precision */ if ((P.Flags & fPrec) != 0) { - /* Precision already specified, use length of string + /* Precision already specified, use length of string ** if less. */ if ((unsigned) P.Prec > SB_GetLen (S)) { diff --git a/src/common/xsprintf.h b/src/common/xsprintf.h index a37b71914..4d32a7410 100644 --- a/src/common/xsprintf.h +++ b/src/common/xsprintf.h @@ -33,9 +33,9 @@ -/* We need a way to output a StrBuf, but on the other side, we don't want to -** switch off gcc's printf format string checking. So we cheat as follows: -** %m (which is a gcc extension and doesn't take an argument) switches %p +/* We need a way to output a StrBuf, but on the other side, we don't want to +** switch off gcc's printf format string checking. So we cheat as follows: +** %m (which is a gcc extension and doesn't take an argument) switches %p ** between outputting a pointer and a string buf. This works just one time, ** so each StrBuf needs in fact a %m%p spec. There's no way to apply a width ** and precision to such a StrBuf, but *not* using %p would bring up a warning diff --git a/src/da65/comments.c b/src/da65/comments.c index cf0b9d4e9..7c671131f 100644 --- a/src/da65/comments.c +++ b/src/da65/comments.c @@ -36,7 +36,7 @@ /* common */ #include "xmalloc.h" -/* da65 */ +/* da65 */ #include "attrtab.h" #include "comments.h" #include "error.h" diff --git a/src/da65/opc6502dtv.h b/src/da65/opc6502dtv.h index e63e4e44c..33b485029 100644 --- a/src/da65/opc6502dtv.h +++ b/src/da65/opc6502dtv.h @@ -58,4 +58,4 @@ extern const OpcDesc OpcTable_6502DTV[256]; - + diff --git a/src/da65/opc6502x.h b/src/da65/opc6502x.h index e086f87ae..23cd9068c 100644 --- a/src/da65/opc6502x.h +++ b/src/da65/opc6502x.h @@ -58,4 +58,4 @@ extern const OpcDesc OpcTable_6502X[256]; - + diff --git a/src/da65/opctable.h b/src/da65/opctable.h index 69a64db9c..7c871f7b0 100644 --- a/src/da65/opctable.h +++ b/src/da65/opctable.h @@ -38,7 +38,7 @@ -/* common */ +/* common */ #include "cpu.h" /* da65 */ diff --git a/src/dbginfo/dbginfo.h b/src/dbginfo/dbginfo.h index 7317e575f..38d891e7c 100644 --- a/src/dbginfo/dbginfo.h +++ b/src/dbginfo/dbginfo.h @@ -135,7 +135,7 @@ struct cc65_csymdata { unsigned char csym_kind; /* Kind of c symbol */ unsigned char csym_sc; /* Storage class of c symbol */ int csym_offs; /* Offset for auto and register */ - unsigned type_id; /* Id of the data type */ + unsigned type_id; /* Id of the data type */ unsigned symbol_id; /* Attached asm symbol if any */ unsigned scope_id; /* Scope of c symbol */ const char* csym_name; /* Name of the symbol */ diff --git a/src/ld65/condes.c b/src/ld65/condes.c index d8c378211..734b64ebd 100644 --- a/src/ld65/condes.c +++ b/src/ld65/condes.c @@ -281,7 +281,7 @@ const ConDesImport* ConDesGetImport (unsigned Type) /* Check the parameters */ PRECONDITION (Type <= CD_TYPE_MAX); - /* Return the import */ + /* Return the import */ Import = &ConDes[Type].Import; return (Import->Name != INVALID_STRING_ID)? Import : 0; } diff --git a/src/ld65/fragment.h b/src/ld65/fragment.h index 7d6dd9201..34eb5b695 100644 --- a/src/ld65/fragment.h +++ b/src/ld65/fragment.h @@ -100,7 +100,7 @@ INLINE const char* GetFragmentSourceName (const Fragment* F) #if defined(HAVE_INLINE) INLINE unsigned GetFragmentSourceLine (const Fragment* F) /* Return the source file line for this fragment */ -{ +{ return GetSourceLineFromList (&F->LineInfos); } #else diff --git a/src/ld65/mapfile.c b/src/ld65/mapfile.c index 7fec986ff..10d65960e 100644 --- a/src/ld65/mapfile.c +++ b/src/ld65/mapfile.c @@ -93,7 +93,7 @@ void CreateMapFile (int ShortMap) ** requested */ if (VerboseMap || S->Size > 0) { - fprintf (F, + fprintf (F, " %-17s Offs=%06lX Size=%06lX " "Align=%05lX Fill=%04lX\n", GetString (S->Seg->Name), S->Offs, S->Size, diff --git a/src/od65/dump.c b/src/od65/dump.c index 2f538fe1d..1a8c4dbb1 100644 --- a/src/od65/dump.c +++ b/src/od65/dump.c @@ -933,7 +933,7 @@ void DumpObjSegSize (FILE* F, unsigned long Offset) unsigned Len = strlen (Name); /* Skip segment flags, read size */ - (void) ReadVar (F); + (void) ReadVar (F); Size = ReadVar (F); /* Skip alignment, type and fragment count */ diff --git a/src/od65/fileio.c b/src/od65/fileio.c index a8d31c730..1689c4734 100644 --- a/src/od65/fileio.c +++ b/src/od65/fileio.c @@ -53,7 +53,7 @@ void FileSetPos (FILE* F, unsigned long Pos) /* Seek to the given absolute position, fail on errors */ -{ +{ if (fseek (F, Pos, SEEK_SET) != 0) { Error ("Cannot seek: %s", strerror (errno)); } diff --git a/src/sim65/6502.c b/src/sim65/6502.c index b3c06293a..6c23b0dfc 100644 --- a/src/sim65/6502.c +++ b/src/sim65/6502.c @@ -1270,8 +1270,8 @@ static void OPC_6502_6C (void) Cycles = 6; Regs.PC = MemReadWord(Lo); } - - ParaVirtHooks (&Regs); + + ParaVirtHooks (&Regs); } @@ -1283,7 +1283,7 @@ static void OPC_65C02_6C (void) Cycles = 5; Regs.PC = MemReadWord (MemReadWord (Regs.PC+1)); - ParaVirtHooks (&Regs); + ParaVirtHooks (&Regs); } @@ -1439,7 +1439,7 @@ static void OPC_65SC02_7C (void) Adr = MemReadWord (PC+1); Regs.PC = MemReadWord(Adr+Regs.XR); - ParaVirtHooks (&Regs); + ParaVirtHooks (&Regs); } diff --git a/src/sp65/bin.c b/src/sp65/bin.c index a3f856340..93e6a456a 100644 --- a/src/sp65/bin.c +++ b/src/sp65/bin.c @@ -53,7 +53,7 @@ -void WriteBinFile (const StrBuf* Data, const Collection* A, +void WriteBinFile (const StrBuf* Data, const Collection* A, const Bitmap* B attribute ((unused))) /* Write the contents of Data to the given file in binary format */ { diff --git a/src/sp65/color.h b/src/sp65/color.h index 31688bff4..6d898ab2e 100644 --- a/src/sp65/color.h +++ b/src/sp65/color.h @@ -60,7 +60,7 @@ struct Color { /*****************************************************************************/ - + #if defined(HAVE_INLINE) INLINE Color RGB (unsigned char R, unsigned char G, unsigned char B) diff --git a/src/sp65/geosbitmap.h b/src/sp65/geosbitmap.h index 759030224..8f9f09a29 100644 --- a/src/sp65/geosbitmap.h +++ b/src/sp65/geosbitmap.h @@ -54,8 +54,8 @@ StrBuf* GenGeosBitmap (const Bitmap* B, const Collection* A); -/* Generate binary output in GEOS compacted bitmap format for the bitmap B. -** The output is stored in a string buffer (which is actually a dynamic char +/* Generate binary output in GEOS compacted bitmap format for the bitmap B. +** The output is stored in a string buffer (which is actually a dynamic char ** array) and returned. */ @@ -67,4 +67,4 @@ StrBuf* GenGeosBitmap (const Bitmap* B, const Collection* A); - + diff --git a/src/sp65/koala.c b/src/sp65/koala.c index e2122c781..688e37f61 100644 --- a/src/sp65/koala.c +++ b/src/sp65/koala.c @@ -94,7 +94,7 @@ StrBuf* GenKoala (const Bitmap* B, const Collection* A attribute ((unused))) /* Add $4400 as load address */ SB_AppendChar (D, 0x00); SB_AppendChar (D, 0x44); - + /* TODO: The actual work ;-) */ (void) Screen; diff --git a/src/sp65/lynxsprite.h b/src/sp65/lynxsprite.h index 4f9a9f07d..fe686ec8e 100644 --- a/src/sp65/lynxsprite.h +++ b/src/sp65/lynxsprite.h @@ -54,7 +54,7 @@ StrBuf* GenLynxSprite (const Bitmap* B, const Collection* A); -/* Generate binary output in packed Lynx sprite format for the bitmap B. The output +/* Generate binary output in packed Lynx sprite format for the bitmap B. The output ** is stored in a string buffer (which is actually a dynamic char array) and ** returned. */ diff --git a/src/sp65/vic2sprite.c b/src/sp65/vic2sprite.c index 94a9ad499..4ea71b562 100644 --- a/src/sp65/vic2sprite.c +++ b/src/sp65/vic2sprite.c @@ -83,7 +83,7 @@ static enum Mode GetMode (const Collection* A) } else { Error ("Invalid value for attribute 'mode'"); } - } + } return smAuto; } diff --git a/src/sp65/vic2sprite.h b/src/sp65/vic2sprite.h index b6c839c7c..ce2f078e4 100644 --- a/src/sp65/vic2sprite.h +++ b/src/sp65/vic2sprite.h @@ -54,7 +54,7 @@ StrBuf* GenVic2Sprite (const Bitmap* B, const Collection* A); -/* Generate binary output in VICII sprite format for the bitmap B. The output +/* Generate binary output in VICII sprite format for the bitmap B. The output ** is stored in a string buffer (which is actually a dynamic char array) and ** returned. */ From 1be54d13bc0602c7bb3a466fa44fb9640cec762e Mon Sep 17 00:00:00 2001 From: mrdudz <mrdudz@users.noreply.github.com> Date: Sun, 17 Apr 2022 16:07:20 +0200 Subject: [PATCH 090/101] remove dangling spaces --- targettest/cpeek-test.c | 4 ++-- targettest/gamate/audiotest.s | 2 +- targettest/minimal.c | 2 +- targettest/uname-test.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/targettest/cpeek-test.c b/targettest/cpeek-test.c index 1777bce4a..4c1aadcb2 100644 --- a/targettest/cpeek-test.c +++ b/targettest/cpeek-test.c @@ -294,8 +294,8 @@ int main (void) revers(0); cputc('x'); chBack (); c1 = cpeekrevers(); chForth(); revers(1); cputc('X'); chBack (); c2 = cpeekrevers(); chForth(); cputc('\n'); cputc('\r'); - revers(c1); cputc('o'); - revers(c2); cputc('O'); + revers(c1); cputc('o'); + revers(c2); cputc('O'); /* test cpeeks() */ revers(0); diff --git a/targettest/gamate/audiotest.s b/targettest/gamate/audiotest.s index f40199994..4f1496789 100644 --- a/targettest/gamate/audiotest.s +++ b/targettest/gamate/audiotest.s @@ -155,7 +155,7 @@ nocursor: .proc printy ldy #0 -loop1: +loop1: tya pha asl diff --git a/targettest/minimal.c b/targettest/minimal.c index 65ec37a97..f950a5d13 100644 --- a/targettest/minimal.c +++ b/targettest/minimal.c @@ -1,4 +1,4 @@ - + /* this is a minimal / empty c program, any supported target that has some * sort of C support should be able to link this. Failure indicates a problem * with the crt0 or the linker config of the respective target */ diff --git a/targettest/uname-test.c b/targettest/uname-test.c index b0733d0bd..2851da19c 100644 --- a/targettest/uname-test.c +++ b/targettest/uname-test.c @@ -4,7 +4,7 @@ int main (void) -{ +{ /* Get the uname data */ struct utsname buf; if (uname (&buf) != 0) { @@ -12,7 +12,7 @@ int main (void) return EXIT_FAILURE; } - /* Print it */ + /* Print it */ printf ("sysname: \"%s\"\n", buf.sysname); printf ("nodename: \"%s\"\n", buf.nodename); printf ("release: \"%s\"\n", buf.release); From 0129622383d2d8226ad0ad2e25b412f0fc2d7c21 Mon Sep 17 00:00:00 2001 From: mrdudz <mrdudz@users.noreply.github.com> Date: Sun, 17 Apr 2022 16:07:52 +0200 Subject: [PATCH 091/101] remove dangling spaces --- test/err/bug1098.c | 2 +- test/err/bug1098a.c | 2 +- test/err/bug1098b.c | 2 +- test/err/pr1110.c | 4 +- test/misc/bug1265.c | 4 +- test/misc/sitest.c | 10 +- test/ref/array.c | 2 +- test/ref/cc65070303.c | 2 +- test/ref/cc65080227.c | 2 +- test/ref/cc65080328.c | 2 +- test/ref/cc65090111.c | 2 +- test/ref/cc65090124.c | 6 +- test/ref/cc65090726.c | 4 +- test/ref/cc65101209.c | 2 +- test/ref/cf.c | 2 +- test/ref/strptr.c | 18 ++-- test/ref/struct.c | 2 +- test/ref/switch2.c | 6 +- test/ref/yacc.c | 174 +++++++++++++++++----------------- test/ref/yacc2.c | 22 ++--- test/val/bug1075.c | 2 +- test/val/bug1178.c | 4 +- test/val/bug1181.c | 4 +- test/val/bug1438.c | 2 +- test/val/bug1552.c | 2 +- test/val/call1.c | 4 +- test/val/compare10.c | 10 +- test/val/compare5.c | 4 +- test/val/compare6.c | 6 +- test/val/compare7.c | 8 +- test/val/compare8.c | 12 +-- test/val/compare9.c | 10 +- test/val/constexpr.c | 2 +- test/val/cq22.c | 2 +- test/val/cq241.c | 2 +- test/val/cq243.c | 2 +- test/val/cq244.c | 2 +- test/val/cq25.c | 2 +- test/val/cq26.c | 2 +- test/val/cq4.c | 2 +- test/val/cq61.c | 2 +- test/val/cq626.c | 2 +- test/val/cq71.c | 2 +- test/val/cq714.c | 2 +- test/val/cq714b.c | 2 +- test/val/cq715.c | 2 +- test/val/cq72.c | 2 +- test/val/cq7813.c | 2 +- test/val/cq81.c | 2 +- test/val/cq84.c | 2 +- test/val/cq85.c | 2 +- test/val/cq86.c | 2 +- test/val/cq88.c | 2 +- test/val/duffs-device.c | 10 +- test/val/lib_common_ctype.c | 8 +- test/val/lib_common_memmove.c | 4 +- test/val/lib_common_mulxx.c | 2 +- test/val/lib_common_strcat.c | 8 +- test/val/lib_common_strchr.c | 2 +- test/val/lib_common_strcspn.c | 2 +- test/val/lib_common_strncat.c | 8 +- test/val/lib_common_strrchr.c | 2 +- test/val/lib_common_strspn.c | 2 +- test/val/mult1.c | 32 +++---- test/val/or1.c | 22 ++--- test/val/postdec-16-16.c | 26 ++--- test/val/postdec-16-8.c | 26 ++--- test/val/postdec-8-16.c | 26 ++--- test/val/postdec-8-8.c | 26 ++--- test/val/postinc-16-16.c | 26 ++--- test/val/postinc-16-8.c | 26 ++--- test/val/postinc-8-16.c | 26 ++--- test/val/postinc-8-8.c | 26 ++--- test/val/pptest4.c | 2 +- test/val/pptest5.c | 2 +- test/val/pr1423.c | 2 +- test/val/predec-16-16.c | 26 ++--- test/val/predec-16-8.c | 26 ++--- test/val/predec-8-16.c | 26 ++--- test/val/predec-8-8.c | 26 ++--- test/val/preinc-16-16.c | 26 ++--- test/val/preinc-16-8.c | 26 ++--- test/val/preinc-8-16.c | 26 ++--- test/val/preinc-8-8.c | 26 ++--- test/val/static-fwd-decl.c | 2 +- test/val/strnicmp-test.c | 4 +- test/val/switch2.c | 2 +- test/val/time-test.c | 2 +- test/val/xor.c | 4 +- 89 files changed, 459 insertions(+), 459 deletions(-) diff --git a/test/err/bug1098.c b/test/err/bug1098.c index c49296245..eddbce3f1 100644 --- a/test/err/bug1098.c +++ b/test/err/bug1098.c @@ -1,7 +1,7 @@ /* bug #1098 Empty enumerator-list */ -/* The C Standard requires that something exists between the braces for +/* The C Standard requires that something exists between the braces for * enum, struct, and union. */ enum { diff --git a/test/err/bug1098a.c b/test/err/bug1098a.c index 63c1c8da0..aed750267 100644 --- a/test/err/bug1098a.c +++ b/test/err/bug1098a.c @@ -1,7 +1,7 @@ /* bug #1098 Empty enumerator-list */ -/* The C Standard requires that something exists between the braces for +/* The C Standard requires that something exists between the braces for * enum, struct, and union. */ struct { diff --git a/test/err/bug1098b.c b/test/err/bug1098b.c index ebd3e94c8..5f6d8b0f2 100644 --- a/test/err/bug1098b.c +++ b/test/err/bug1098b.c @@ -1,7 +1,7 @@ /* bug #1098 Empty enumerator-list */ -/* The C Standard requires that something exists between the braces for +/* The C Standard requires that something exists between the braces for * enum, struct, and union. */ union { diff --git a/test/err/pr1110.c b/test/err/pr1110.c index 86955c720..671abf9a4 100644 --- a/test/err/pr1110.c +++ b/test/err/pr1110.c @@ -1,5 +1,5 @@ -/* pr #1110 - not only should the current test case for #975 compile and work, +/* pr #1110 - not only should the current test case for #975 compile and work, * but also the code piece below fail to compile and generate errors like commented: */ static const unsigned char array[3]; /* OK */ @@ -7,7 +7,7 @@ static const unsigned char array[] = { 0, 1, 2 }; /* OK - complete definition* static const unsigned char array[3]; /* OK */ static const unsigned char array[]; /* OK */ static const unsigned char array[] = { 1, 2, 3 }; /* Error - redefinition */ -static const unsigned char array[4]; /* Error - conflicting size */ +static const unsigned char array[4]; /* Error - conflicting size */ int main(void) { diff --git a/test/misc/bug1265.c b/test/misc/bug1265.c index 36d1459a7..7c34a25b7 100644 --- a/test/misc/bug1265.c +++ b/test/misc/bug1265.c @@ -17,7 +17,7 @@ int main (void) { x = 1234; n = f1 (x); sprintf (str2, "%p\n", &x); - + if (strcmp(str1, str2)) { puts("not equal"); failures++; @@ -31,7 +31,7 @@ int main (void) { x = 2345; n = f2 (x); sprintf (str2, "%p\n", &x); - + if (strcmp(str1, str2)) { puts("not equal"); failures++; diff --git a/test/misc/sitest.c b/test/misc/sitest.c index 2f1d7df4d..6c8a6f1e2 100644 --- a/test/misc/sitest.c +++ b/test/misc/sitest.c @@ -106,7 +106,7 @@ int main() { int status = 0; /* exit status to be returned */ - + /* <stdint.h> features: */ printf("CHAR_BIT=%u\n", (unsigned)CHAR_BIT ); @@ -526,12 +526,12 @@ main() { else /* for trailing semicolon */ #else - + #define SCAN(buf,fs,var,exp) #define PRINT(fs,var,exp) #endif - + #ifdef SCNo32 SCAN(in_dn, SCNo32, int32, 9); @@ -586,7 +586,7 @@ main() { #endif #if 0 - + #ifdef INT16_MAX { INT16_MAX, INT16_MAX, }, { -INT16_MAX, INT16_MAX, }, @@ -830,7 +830,7 @@ main() { } #endif } - + { char *endptr; wchar_t *wendptr; diff --git a/test/ref/array.c b/test/ref/array.c index 96bf22c3a..19265ef90 100644 --- a/test/ref/array.c +++ b/test/ref/array.c @@ -29,7 +29,7 @@ main() { p[j] = x[i][j]; } g(z, y); - + return 0; } diff --git a/test/ref/cc65070303.c b/test/ref/cc65070303.c index 049f14c40..6cf2e9dc7 100644 --- a/test/ref/cc65070303.c +++ b/test/ref/cc65070303.c @@ -27,7 +27,7 @@ int main(int argc, char* argv[]) test.c(20): Error: Incompatible pointer types for   APtr=&(Bs[7].Data[1]); -My experience in C is very limited, but as this works both in MSVC and +My experience in C is very limited, but as this works both in MSVC and the 8 bit Z80 compiler i originally used, i guess its an bug in CC65. As a workaround, an typecast via  APtr=(TypA*)&(Bs[7].Data[1]); diff --git a/test/ref/cc65080227.c b/test/ref/cc65080227.c index b6d068b2a..86d5ee331 100644 --- a/test/ref/cc65080227.c +++ b/test/ref/cc65080227.c @@ -1,5 +1,5 @@ /* - !!DESCRIPTION!! + !!DESCRIPTION!! !!ORIGIN!! testsuite !!LICENCE!! Public Domain !!AUTHOR!! diff --git a/test/ref/cc65080328.c b/test/ref/cc65080328.c index 630638f3d..7e26ea20a 100644 --- a/test/ref/cc65080328.c +++ b/test/ref/cc65080328.c @@ -1,5 +1,5 @@ /* - !!DESCRIPTION!! + !!DESCRIPTION!! !!ORIGIN!! testsuite !!LICENCE!! Public Domain !!AUTHOR!! diff --git a/test/ref/cc65090111.c b/test/ref/cc65090111.c index be889a608..30b2b3cd0 100644 --- a/test/ref/cc65090111.c +++ b/test/ref/cc65090111.c @@ -1,5 +1,5 @@ /* - !!DESCRIPTION!! + !!DESCRIPTION!! !!ORIGIN!! testsuite !!LICENCE!! Public Domain !!AUTHOR!! diff --git a/test/ref/cc65090124.c b/test/ref/cc65090124.c index 3a75b28fa..910dc1195 100644 --- a/test/ref/cc65090124.c +++ b/test/ref/cc65090124.c @@ -1,5 +1,5 @@ /* - !!DESCRIPTION!! + !!DESCRIPTION!! !!ORIGIN!! testsuite !!LICENCE!! Public Domain !!AUTHOR!! @@ -8,7 +8,7 @@ #include <stdio.h> /* -there is a bug in the preprocessor (i think) ... the following works +there is a bug in the preprocessor (i think) ... the following works (compiles) correctly: unsigned long fs,fd,a; @@ -32,7 +32,7 @@ int main(void) fs=(func((fd/a),(func(2,0x0082c90f)))); } -i get "Error: ')' expected" on that line. (this is with the snapshot, freshly +i get "Error: ')' expected" on that line. (this is with the snapshot, freshly compiled 5 minutes ago) */ diff --git a/test/ref/cc65090726.c b/test/ref/cc65090726.c index 609594dc4..f22b9c203 100644 --- a/test/ref/cc65090726.c +++ b/test/ref/cc65090726.c @@ -1,5 +1,5 @@ /* - !!DESCRIPTION!! + !!DESCRIPTION!! !!ORIGIN!! testsuite !!LICENCE!! Public Domain !!AUTHOR!! @@ -36,7 +36,7 @@ void Proc1(RecordPtr PtrParIn) Proc3((*(PtrParIn->PtrComp)).PtrComp); Proc3(NextRecord.PtrComp); #endif - + #undef NextRecord } diff --git a/test/ref/cc65101209.c b/test/ref/cc65101209.c index daeab8509..eba209d1d 100644 --- a/test/ref/cc65101209.c +++ b/test/ref/cc65101209.c @@ -34,5 +34,5 @@ So testing with 999 gives: 231 mod 999 is 0 999 mod 999 is 0 -This seems to be systematic. +This seems to be systematic. */ diff --git a/test/ref/cf.c b/test/ref/cf.c index bb0c13e8b..6001009ce 100644 --- a/test/ref/cf.c +++ b/test/ref/cf.c @@ -67,7 +67,7 @@ char *argv[]; } printf("input:\n\n"); - + nc = 0; while ((c = GETCHAR()) != -1) { diff --git a/test/ref/strptr.c b/test/ref/strptr.c index 152c1bb48..d596e19d1 100644 --- a/test/ref/strptr.c +++ b/test/ref/strptr.c @@ -1,5 +1,5 @@ /* - !!DESCRIPTION!! + !!DESCRIPTION!! !!ORIGIN!! testsuite !!LICENCE!! Public Domain !!AUTHOR!! Groepaz/Hitmen @@ -24,7 +24,7 @@ FILE *outfile=NULL; #else #endif - + #include <stdio.h> #include <stdlib.h> #include <fcntl.h> @@ -65,17 +65,17 @@ static unsigned char ch; /* basic line-link / file-length */ memcpy(buffer,b1,4); - - dir->off=dir->off+4; + + dir->off=dir->off+4; entry.d_reclen=254*(buffer[2]+(buffer[3]<<8)); /* read file entry */ memcpy(buffer,b2,0x10); - - dir->off=dir->off+i; + + dir->off=dir->off+i; printf("Xreaddir: '%s'\n",buffer); - + /* skip until either quote (file) or b (blocks free => end) */ i=0;ii=0; while(i==0){ @@ -113,9 +113,9 @@ int main(void) char mydirname[XNAME_MAX+1]="."; XDIR mydir; struct Xdirent *mydirent; - + printf("start\n"); - + if((mydirent=Xreaddir(&mydir))==NULL) { printf("NULL\n"); diff --git a/test/ref/struct.c b/test/ref/struct.c index 15fae62fc..e5957f265 100644 --- a/test/ref/struct.c +++ b/test/ref/struct.c @@ -246,7 +246,7 @@ rect screen = ); test1(); - + for (i = 0; i < sizeof pts/sizeof pts[0]; i++) { printf("(%d,%d) is ", pts[i].x, (x = makepoint(pts[i].x, pts[i].y)).y); diff --git a/test/ref/switch2.c b/test/ref/switch2.c index 78d383b52..0e52775e4 100644 --- a/test/ref/switch2.c +++ b/test/ref/switch2.c @@ -169,7 +169,7 @@ void testdefault2(unsigned char i) { case 170: break; - + case 18: break; case 19: @@ -215,12 +215,12 @@ int main(void) { testlimits(32767); testlimits(-32768); testlimits(-1); - + testdefault1(1); testdefault1(2); testdefault1(3); testdefault1(4); - + testdefault2(1); testdefault2(2); testdefault2(3); diff --git a/test/ref/yacc.c b/test/ref/yacc.c index 776e4f93d..3831b67fd 100644 --- a/test/ref/yacc.c +++ b/test/ref/yacc.c @@ -70,7 +70,7 @@ int yytchar; #define yyout outfile extern int yylineno; -struct yysvf +struct yysvf { struct yywork *yystoff; struct yysvf *yyother; @@ -150,7 +150,7 @@ yyfussy: } } - + #ifdef YYDEBUG fprintf(yyout,"yylex: return 0\n"); #endif @@ -164,9 +164,9 @@ int yyvstop[] = }; # define YYTYPE char -struct yywork -{ - YYTYPE verify, advance; +struct yywork +{ + YYTYPE verify, advance; } yycrank[] = { {0,0}, {0,0}, {1,3}, {0,0}, @@ -178,12 +178,12 @@ struct yywork {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, - + {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, - + {0,0}, {1,5}, {5,7}, {5,7}, {5,7}, {5,7}, {5,7}, {5,7}, {5,7}, {5,7}, {5,7}, {5,7}, @@ -193,17 +193,17 @@ struct yywork {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {0,0}, {0,0}, {0,0}, - + {0,0}, {0,0}, {0,0}, {0,0}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, - + {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {0,0}, {0,0}, - + {0,0}, {0,0}, {6,8}, {0,0}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, @@ -240,7 +240,7 @@ struct yywork }; /* -struct yysvf +struct yysvf { struct yywork *yystoff; struct yysvf *yyother; @@ -281,27 +281,27 @@ char yymatch[] = #endif 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , - + 011 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , - + '0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' , '0' ,'0' ,01 ,01 ,01 ,01 ,01 ,01 , - + /* 0x40 (ascii) @A... (petscii) @a... */ 01 ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' , 'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' , - + 'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' , 'A' ,'A' ,'A' ,01 ,01 ,01 ,01 ,'A' , - + /* 0x60 (ascii) @a... */ 01 ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' , 'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' , - + 'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' , 'A' ,'A' ,'A' ,01 ,01 ,01 ,01 ,01 , - + #ifdef CHARSETHACK /* 0x80 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, @@ -312,10 +312,10 @@ char yymatch[] = /* 0xc0 (petcii) @A... */ 01 ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' , 'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' , - + 'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' , 'A' ,'A' ,'A' ,01 ,01 ,01 ,01 ,01 , - + 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, @@ -354,9 +354,9 @@ yylook() int debug; # endif */ - + char *yylastch; - + /* start off machines */ /* @@ -372,11 +372,11 @@ yylook() # else #define debug 0 #endif - + #ifdef YYDEBUG fprintf(yyout,"yylook()\n"); # endif - + if (!yymorfg) yylastch = yytext; else @@ -388,7 +388,7 @@ yylook() #ifdef YYDEBUG fprintf(yyout,"yylook: yymorfg=%d\n",yymorfg); # endif - + for(;;) { #ifdef YYDEBUG @@ -400,7 +400,7 @@ yylook() if (yyprevious==YYNEWLINE) yystate++; testbreak=0; - + for (;;) { # ifdef LEXDEBUG @@ -412,12 +412,12 @@ yylook() exit(EXIT_FAILURE); } testbreak++; - + yyt = yystate->yystoff; /* fprintf(yyout,"yylook: yyt offs: %02x\n",yyt-yycrank); */ - + if(yyt == yycrank) { /* may not be any transitions */ yyz = yystate->yyother; @@ -430,7 +430,7 @@ yylook() fprintf(yyout,"yylook: input "); printchar("yych",yych); # endif - + tryagain: # ifdef LEXDEBUG @@ -440,7 +440,7 @@ yylook() yyr = yyt; /* fprintf(yyout,"yylook: yyr offs: %02x\n",yyr-yycrank); */ - + if ( yyt > yycrank) { yyt = yyr + yych; @@ -467,7 +467,7 @@ yylook() } # ifdef YYOPTIM else if(yyt < yycrank) /* r < yycrank */ - { + { yyt = yyr = yycrank+(yycrank-yyt); # ifdef LEXDEBUG fprintf(yyout,"yylook: compressed state\n"); @@ -492,7 +492,7 @@ yylook() fprintf(yyout,"yylook: continue (2)\n"); # endif goto contin; - + } # ifdef LEXDEBUG /* @@ -509,12 +509,12 @@ yylook() */ fprintf(yyout,"yylook: try fall back character\n"); # endif - if(yyt <= yytop && yyt->verify+yysvec == yystate) + if(yyt <= yytop && yyt->verify+yysvec == yystate) { # ifdef LEXDEBUG fprintf(yyout,"yylook: (2a)\n"); # endif - + if(yyt->advance+yysvec == YYLERR) /* error transition */ { # ifdef LEXDEBUG @@ -531,7 +531,7 @@ yylook() fprintf(yyout,"yylook: continue (3)\n"); # endif goto contin; - + } # ifdef LEXDEBUG fprintf(yyout,"yylook: (2)\n"); @@ -578,7 +578,7 @@ yylook() { yyolsp = lsp; if(yyextra[*yyfnd]) /* must backup */ - { + { while(yyback((*lsp)->yystops,-*yyfnd) != 1 && lsp > yylstate) { lsp--; @@ -630,7 +630,7 @@ yylook() # endif } - + yyback(p, m) int *p; { @@ -648,25 +648,25 @@ yyback(p, m) yyinput() { int out=input(); - + #ifdef YYDEBUG fprintf(yyout,"yylook: input "); printchar("out",out); -#endif +#endif return(out); } yyoutput(c) - int c; + int c; { output(c); } yyunput(c) - int c; + int c; { unput(c); } -main() +main() { printf("main start\n"); infile = fopen("yacc.in","rb"); @@ -681,8 +681,8 @@ main() } /* yyerror - issue error message */ -yyerror(s) -char *s; +yyerror(s) +char *s; { printf("[%s]\n", s); } @@ -722,39 +722,39 @@ short yyact[]= 0, 0, 0, 0, 0, 0, 0, 6, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 4, 6 + 0, 0, 0, 0, 0, 0, 0, 4, 6 }; short yypact[]= { -1000, -9,-1000, 5, -7, -59,-1000,-1000,-1000, -40, -29, -40, -40,-1000,-1000, -40, -40, -40, -40, -38, - -35, -38, -38,-1000,-1000,-1000 + -35, -38, -38,-1000,-1000,-1000 }; short yypgo[]= { - 0, 21, 20, 17, 11 + 0, 21, 20, 17, 11 }; short yyr1[]= { 0, 1, 1, 1, 1, 2, 4, 4, 4, 4, - 4, 4, 4, 4, 3 + 4, 4, 4, 4, 3 }; short yyr2[]= { 0, 0, 2, 3, 3, 3, 3, 3, 3, 3, - 2, 3, 1, 1, 1 + 2, 3, 1, 1, 1 }; short yychk[]= { -1000, -1, 10, -2, 256, -3, 257, 10, 10, 61, -4, 45, 40, -3, 258, 43, 45, 42, 47, -4, - -4, -4, -4, -4, -4, 41 + -4, -4, -4, -4, -4, 41 }; short yydef[]= { 1, -2, 2, 0, 0, 0, 14, 3, 4, 0, 5, 0, 0, 12, 13, 0, 0, 0, 0, 10, - 0, 6, 7, 8, 9, 11 + 0, 6, 7, 8, 9, 11 }; # define YYFLAG -1000 @@ -774,7 +774,7 @@ int yychar = -1; /* current input token number */ int yynerrs = 0; /* number of errors */ short yyerrflag = 0; /* error recovery flag */ -yyparse() +yyparse() { short yys[YYMAXDEPTH]; short yyj, yym; @@ -820,23 +820,23 @@ yyparse() #ifdef YYDEBUG printf("yyparse: yynewstate (1)\n"); #endif - + if( yychar<0 ) if( (yychar=yylex())<0 ) yychar=0; #ifdef YYDEBUG - + printf("yyparse: yynewstate yyn=%d ",yyn); printchar("yychar",yychar); #endif - + if( (yyn += yychar)<0 || yyn >= YYLAST ) goto yydefault; #ifdef YYDEBUG printf("yyparse: yynewstate (2)\n"); #endif - + if( yychk[ yyn=yyact[ yyn ] ] == yychar ) /* valid shift */ - { + { yychar = -1; yyval = yylval; yystate = yyn; @@ -872,9 +872,9 @@ yyparse() #ifdef YYDEBUG printf("yyparse: yyn=%d yyerrflag=%d\n",yyn,yyerrflag); #endif - + if( yyn == 0 ) /* error */ - { + { /* error ... attempt to resume parsing */ switch( yyerrflag ){ @@ -942,65 +942,65 @@ yyparse() yyn = yyr1[yyn]; yyj = yypgo[yyn] + *yyps + 1; if( yyj>=YYLAST || yychk[ yystate = yyact[yyj] ] != -yyn ) yystate = yyact[yypgo[yyn]]; - + switch(yym) { case 4: - { - yyerrok; + { + yyerrok; } break; case 5: - { + { printf("[STORE]\n"); - } + } break; case 6: - { + { printf("[ADD]\n"); - } + } break; case 7: - { + { printf("[NEG]\n[ADD]\n"); - } + } break; case 8: - { + { printf("[MUL]\n"); - } + } break; case 9: - { + { printf("[DIV]\n"); - } + } break; case 10: - { - printf("[NEG]\n"); - } + { + printf("[NEG]\n"); + } break; case 12: - { - printf("[LOAD]\n"); - } + { + printf("[LOAD]\n"); + } break; case 13: - { + { printf("[PUSH %s]\n", yytext); - } + } break; case 14: - { + { printf("[%s]\n", yytext); - } + } break; } - + goto yystack; /* stack new state and value */ } - -int yywrap() -{ - return 1; + +int yywrap() +{ + return 1; } diff --git a/test/ref/yacc2.c b/test/ref/yacc2.c index 3b4819c55..33288b25d 100644 --- a/test/ref/yacc2.c +++ b/test/ref/yacc2.c @@ -8,9 +8,9 @@ #include <stdio.h> # define YYTYPE char -struct yywork -{ - YYTYPE verify, advance; +struct yywork +{ + YYTYPE verify, advance; } yycrank[] = { {0,0}, {0,0}, {1,3}, {0,0}, @@ -22,12 +22,12 @@ struct yywork {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, - + {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, - + {0,0}, {1,5}, {5,7}, {5,7}, {5,7}, {5,7}, {5,7}, {5,7}, {5,7}, {5,7}, {5,7}, {5,7}, @@ -37,17 +37,17 @@ struct yywork {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {0,0}, {0,0}, {0,0}, - + {0,0}, {0,0}, {0,0}, {0,0}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, - + {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {0,0}, {0,0}, - + {0,0}, {0,0}, {6,8}, {0,0}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, @@ -90,7 +90,7 @@ int yyvstop[] = 0,4,0,3,4,0,2,4,0,1,4,0,2,0,1,0,0 }; -struct yysvf +struct yysvf { struct yywork *yystoff; struct yysvf *yyother; @@ -157,7 +157,7 @@ void subtest3(void) yyt=yycrank; yystate=yysvec; - + bogus(); if(yyt <= yytop && yyt->verify+yysvec == yystate) { @@ -173,7 +173,7 @@ void subtest3(void) short yyr2[]= { 0, 0, 2, 3, 3, 3, 3, 3, 3, 3, - 2, 3, 1, 1, 1 + 2, 3, 1, 1, 1 }; // yyps -= yyr2[yyn]; diff --git a/test/val/bug1075.c b/test/val/bug1075.c index 6ff5ec8e7..3e259fd22 100644 --- a/test/val/bug1075.c +++ b/test/val/bug1075.c @@ -8,7 +8,7 @@ long rhs; int test(void) { - /* the whole lhs is errorneously treated as an absolute address (integer + /* the whole lhs is errorneously treated as an absolute address (integer constant) neglecting its dereference */ return *(char *)0xD77C + rhs; } diff --git a/test/val/bug1178.c b/test/val/bug1178.c index 043767e4c..7fb7e7803 100644 --- a/test/val/bug1178.c +++ b/test/val/bug1178.c @@ -41,7 +41,7 @@ void dotest1(void) StructArray1[0] = test1; - printf ("test1: %d, %d, %d, %d, %d\n", + printf ("test1: %d, %d, %d, %d, %d\n", (int)StructArray1[0].a, (int)StructArray1[0].b, (int)StructArray1[0].c, (int)StructArray1[0].d, (int)StructArray1[0].e); if ((StructArray1[0].a != 42) || @@ -62,7 +62,7 @@ void dotest2(void) StructArray2[0] = test2; - printf ("test2: %d, %d, %d, %d, %d\n", + printf ("test2: %d, %d, %d, %d, %d\n", (int)StructArray2[0].a, (int)StructArray2[0].b, (int)StructArray2[0].c, (int)StructArray2[0].d); if ((StructArray2[0].a != 42) || diff --git a/test/val/bug1181.c b/test/val/bug1181.c index 4ea2d54bf..077707d94 100644 --- a/test/val/bug1181.c +++ b/test/val/bug1181.c @@ -1,5 +1,5 @@ -/* bug #1181 - Testing struct member against NULL is broken */ +/* bug #1181 - Testing struct member against NULL is broken */ #include <stdio.h> #include <stdlib.h> @@ -52,7 +52,7 @@ MENUITEM optionsitems_menu[] = { static MENU optionsmenu_menu = { &optionsitems_menu[0], -}; +}; unsigned char __fastcall__ menu_getnumitems(MENU *menu) { diff --git a/test/val/bug1438.c b/test/val/bug1438.c index 3894f87f1..9c8f7a8ce 100644 --- a/test/val/bug1438.c +++ b/test/val/bug1438.c @@ -1,5 +1,5 @@ -/* Issue #1438 fix #1439 - crash in cc65, related to delayed post-counting +/* Issue #1438 fix #1439 - crash in cc65, related to delayed post-counting this is an odd issue, the compile would crash *sometimes*, perhaps in one of ten compilation runs. diff --git a/test/val/bug1552.c b/test/val/bug1552.c index 42f39eec6..92ad902bd 100644 --- a/test/val/bug1552.c +++ b/test/val/bug1552.c @@ -23,7 +23,7 @@ int execute(TREPTR argt, int execflg, int *pf1, int *pf2) { register TREPTR t; int type; - switch (type) + switch (type) { case 6: { diff --git a/test/val/call1.c b/test/val/call1.c index c7ac920b3..d09ae0dec 100644 --- a/test/val/call1.c +++ b/test/val/call1.c @@ -70,7 +70,7 @@ call5 (unsigned int k) return (k); } -unsigned char +unsigned char call6a(unsigned char uc) { if(uc>uchar1) @@ -85,7 +85,7 @@ call6(unsigned char uc) return(call6a(uc)); } -unsigned int +unsigned int call7a(unsigned int ui) { if(ui) diff --git a/test/val/compare10.c b/test/val/compare10.c index 861a02d64..742213851 100644 --- a/test/val/compare10.c +++ b/test/val/compare10.c @@ -59,7 +59,7 @@ void c_char_gte_lit1(unsigned char expected_result) if(char0 >= 0x7e) result |= 0x10; - + if(char0 >= 0x7f) result |= 0x20; @@ -138,10 +138,10 @@ void c_int_gte_lit1(unsigned char expected_result) if(int0 >= 0x0101) result |= 0x10; - + if(int0 >= 0x01ff) result |= 0x20; - + if(int0 >= 0x0200) result |= 0x40; @@ -226,10 +226,10 @@ void c_int_gte_lit2(unsigned char expected_result) if(int0 >= -0x0101) result |= 0x10; - + if(int0 >= -0x0100) result |= 0x20; - + if(int0 >= -0xff) result |= 0x40; diff --git a/test/val/compare5.c b/test/val/compare5.c index f1d94d537..cf51fac89 100644 --- a/test/val/compare5.c +++ b/test/val/compare5.c @@ -284,7 +284,7 @@ void c_ifelse1(void) void c_minus1(void) { printf("long0:%ld long1:%ld\n",long0,long1); - + printf("(long0 != -1)\n"); if(long0 != -1) { @@ -432,7 +432,7 @@ main (void) success = failures; done (); - + printf("failures: %d\n",failures); return failures; diff --git a/test/val/compare6.c b/test/val/compare6.c index 85f16a1c4..bad411c0c 100644 --- a/test/val/compare6.c +++ b/test/val/compare6.c @@ -60,7 +60,7 @@ void c_char(void) if(char1 || !char0) failures++; - if((char0 >5 ) && (char0 < 10)) + if((char0 >5 ) && (char0 < 10)) failures++; char0 +=5; /* char0 = 6 now */ @@ -100,7 +100,7 @@ void c_int(void) if(int1 || !int0) failures++; - if((int0 >5 ) && (int0 < 10)) + if((int0 >5 ) && (int0 < 10)) failures++; int0 +=5; /* int0 = 6 now */ @@ -140,7 +140,7 @@ void c_long(void) if(long1 || !long0) failures++; - if((long0 >5 ) && (long0 < 10)) + if((long0 >5 ) && (long0 < 10)) failures++; long0 +=5; /* long0 = 6 now */ diff --git a/test/val/compare7.c b/test/val/compare7.c index 6c9636dec..d88952f62 100644 --- a/test/val/compare7.c +++ b/test/val/compare7.c @@ -129,10 +129,10 @@ void c_int_lt_lit1(unsigned char expected_result) if(int0 < 0x0101) result |= 0x10; - + if(int0 < 0x01ff) result |= 0x20; - + if(int0 < 0x0200) result |= 0x40; @@ -214,10 +214,10 @@ void c_int_lt_lit2(unsigned char expected_result) if(int0 < -0x0101) result |= 0x10; - + if(int0 < -0x0100) result |= 0x20; - + if(int0 < -0xff) result |= 0x40; diff --git a/test/val/compare8.c b/test/val/compare8.c index 0abff8c69..2621dad1d 100644 --- a/test/val/compare8.c +++ b/test/val/compare8.c @@ -59,10 +59,10 @@ void c_char_gt_lit1(unsigned char expected_result) if(char0 > 0x7e) result |= 0x10; - + if(char0 > 0x7f) result |= 0x20; - + if(result != expected_result) failures++; } @@ -132,10 +132,10 @@ void c_int_gt_lit1(unsigned char expected_result) if(int0 > 0x0101) result |= 0x10; - + if(int0 > 0x01ff) result |= 0x20; - + if(int0 > 0x0200) result |= 0x40; @@ -220,10 +220,10 @@ void c_int_gt_lit2(unsigned char expected_result) if(int0 > -0x0101) result |= 0x10; - + if(int0 > -0x0100) result |= 0x20; - + if(int0 > -0xff) result |= 0x40; diff --git a/test/val/compare9.c b/test/val/compare9.c index 4a3714199..a498c15cb 100644 --- a/test/val/compare9.c +++ b/test/val/compare9.c @@ -54,7 +54,7 @@ void c_char_lte_lit1(unsigned char expected_result) if(char0 <= 0x7f) result |= 0x10; - + if(result != expected_result) failures++; } @@ -124,10 +124,10 @@ void c_int_lte_lit1(unsigned char expected_result) if(int0 <= 0x0101) result |= 0x10; - + if(int0 <= 0x01ff) result |= 0x20; - + if(int0 <= 0x0200) result |= 0x40; @@ -209,10 +209,10 @@ void c_int_lte_lit2(unsigned char expected_result) if(int0 <= -0x0101) result |= 0x10; - + if(int0 <= -0x0100) result |= 0x20; - + if(int0 <= -0xff) result |= 0x40; diff --git a/test/val/constexpr.c b/test/val/constexpr.c index 4338717f4..c66946a19 100644 --- a/test/val/constexpr.c +++ b/test/val/constexpr.c @@ -8,7 +8,7 @@ if they are being compiled/evaluated correctly. related: pr #1424 - More compile-time constant expressions regarding object addresses -issue #1196 - Constant expressions in general +issue #1196 - Constant expressions in general */ diff --git a/test/val/cq22.c b/test/val/cq22.c index 015b7bf77..20048fa2c 100644 --- a/test/val/cq22.c +++ b/test/val/cq22.c @@ -125,7 +125,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq241.c b/test/val/cq241.c index 1f66a378c..611b5a376 100644 --- a/test/val/cq241.c +++ b/test/val/cq241.c @@ -267,7 +267,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq243.c b/test/val/cq243.c index aaec9a8ea..8aba7dfe8 100644 --- a/test/val/cq243.c +++ b/test/val/cq243.c @@ -245,7 +245,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq244.c b/test/val/cq244.c index 9f4704f36..896ddb75b 100644 --- a/test/val/cq244.c +++ b/test/val/cq244.c @@ -140,7 +140,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq25.c b/test/val/cq25.c index bfdade957..7cacebf0a 100644 --- a/test/val/cq25.c +++ b/test/val/cq25.c @@ -152,7 +152,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq26.c b/test/val/cq26.c index 239411f1c..1c88dfed6 100644 --- a/test/val/cq26.c +++ b/test/val/cq26.c @@ -197,7 +197,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq4.c b/test/val/cq4.c index a8b6b1d52..205f62c88 100644 --- a/test/val/cq4.c +++ b/test/val/cq4.c @@ -344,7 +344,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq61.c b/test/val/cq61.c index fc4d1d95f..c16b64066 100644 --- a/test/val/cq61.c +++ b/test/val/cq61.c @@ -167,7 +167,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq626.c b/test/val/cq626.c index a8b05c8f2..b7c592d58 100644 --- a/test/val/cq626.c +++ b/test/val/cq626.c @@ -318,7 +318,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq71.c b/test/val/cq71.c index f7167c728..725a40e88 100644 --- a/test/val/cq71.c +++ b/test/val/cq71.c @@ -221,7 +221,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq714.c b/test/val/cq714.c index d7a878033..c36c992aa 100644 --- a/test/val/cq714.c +++ b/test/val/cq714.c @@ -1776,7 +1776,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq714b.c b/test/val/cq714b.c index 9538281b8..19b58628c 100644 --- a/test/val/cq714b.c +++ b/test/val/cq714b.c @@ -997,7 +997,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq715.c b/test/val/cq715.c index 0fe864159..2e7e22d85 100644 --- a/test/val/cq715.c +++ b/test/val/cq715.c @@ -132,7 +132,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq72.c b/test/val/cq72.c index 421177a0b..6b8026576 100644 --- a/test/val/cq72.c +++ b/test/val/cq72.c @@ -326,7 +326,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq7813.c b/test/val/cq7813.c index 9d4308a3e..d6c9b445f 100644 --- a/test/val/cq7813.c +++ b/test/val/cq7813.c @@ -362,7 +362,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq81.c b/test/val/cq81.c index 85e1ac1d6..1e83a2e04 100644 --- a/test/val/cq81.c +++ b/test/val/cq81.c @@ -708,7 +708,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq84.c b/test/val/cq84.c index 64429e300..c1f62913e 100644 --- a/test/val/cq84.c +++ b/test/val/cq84.c @@ -249,7 +249,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq85.c b/test/val/cq85.c index 49423e7de..81a99c960 100644 --- a/test/val/cq85.c +++ b/test/val/cq85.c @@ -294,7 +294,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq86.c b/test/val/cq86.c index 9c850662a..90cfa0b7c 100644 --- a/test/val/cq86.c +++ b/test/val/cq86.c @@ -209,7 +209,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq88.c b/test/val/cq88.c index ef742824e..a9af7bef7 100644 --- a/test/val/cq88.c +++ b/test/val/cq88.c @@ -165,7 +165,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/duffs-device.c b/test/val/duffs-device.c index effb33bb2..eb91e244f 100644 --- a/test/val/duffs-device.c +++ b/test/val/duffs-device.c @@ -1,6 +1,6 @@ /* !!DESCRIPTION!! Implementation of Duff's device (loop unrolling). - !!ORIGIN!! + !!ORIGIN!! !!LICENCE!! GPL, read COPYING.GPL */ @@ -34,7 +34,7 @@ int acmp(char* a, char* b, int count) return 0; } -void duffit (char* to, char* from, int count) +void duffit (char* to, char* from, int count) { int n = (count + 7) / 8; @@ -55,14 +55,14 @@ int main(void) { char a[ASIZE] = {1}; char b[ASIZE] = {2}; - + /* a and b should be different */ if(!acmp(a, b, ASIZE)) { failures++; } - + duffit(a, b, ASIZE); - + /* a and b should be the same */ if(acmp(a, b, ASIZE)) { failures++; diff --git a/test/val/lib_common_ctype.c b/test/val/lib_common_ctype.c index 39c92953b..281ee454e 100644 --- a/test/val/lib_common_ctype.c +++ b/test/val/lib_common_ctype.c @@ -16,7 +16,7 @@ #define NUMTESTS 257 -typedef struct +typedef struct { bool isalnum; bool isalpha; @@ -30,7 +30,7 @@ typedef struct bool isspace; bool isupper; bool isxdigit; - bool isblank; + bool isblank; } CTypeClassifications; @@ -89,7 +89,7 @@ CTypeClassifications testSet[NUMTESTS] = {false, false, true, false, false, true, false, true, true, false, false, false, false}, // 2D {false, false, true, false, false, true, false, true, true, false, false, false, false}, // 2E {false, false, true, false, false, true, false, true, true, false, false, false, false}, // 2F - + {true, false, true, false, true, true, false, true, false, false, false, true, false}, // 30 {true, false, true, false, true, true, false, true, false, false, false, true, false}, // 31 {true, false, true, false, true, true, false, true, false, false, false, true, false}, // 32 @@ -123,7 +123,7 @@ CTypeClassifications testSet[NUMTESTS] = {true, true, true, false, false, true, false, true, false, false, true, false, false}, // 4D {true, true, true, false, false, true, false, true, false, false, true, false, false}, // 4E {true, true, true, false, false, true, false, true, false, false, true, false, false}, // 4F - + {true, true, true, false, false, true, false, true, false, false, true, false, false}, // 50 {true, true, true, false, false, true, false, true, false, false, true, false, false}, // 51 {true, true, true, false, false, true, false, true, false, false, true, false, false}, // 52 diff --git a/test/val/lib_common_memmove.c b/test/val/lib_common_memmove.c index 6b2273e78..cf81bc404 100644 --- a/test/val/lib_common_memmove.c +++ b/test/val/lib_common_memmove.c @@ -10,7 +10,7 @@ TEST { unsigned i, v; char* p; - + for (i=0; i < BufferSize; ++i) Buffer[i+1] = (i%128); @@ -35,7 +35,7 @@ TEST ASSERT_AreEqual(i%128, (unsigned)Buffer[i+2], "%u", "Unexpected value in buffer at position %u!" COMMA i+2); } - v = Buffer[BufferSize+1]; // rember value of first untouched end-byte + v = Buffer[BufferSize+1]; // rember value of first untouched end-byte // copy downwards p = memmove(Buffer+1, Buffer+2, BufferSize); diff --git a/test/val/lib_common_mulxx.c b/test/val/lib_common_mulxx.c index cf5f089e9..e5afb3f0e 100644 --- a/test/val/lib_common_mulxx.c +++ b/test/val/lib_common_mulxx.c @@ -4,7 +4,7 @@ TEST { unsigned i; - + for (i=0; i < 256; ++i) { ASSERT_AreEqual(i*20, mul20(i), "%u", "Invalid 'mul20(%u)' calculation!" COMMA i); diff --git a/test/val/lib_common_strcat.c b/test/val/lib_common_strcat.c index 1872053a4..3947c5130 100644 --- a/test/val/lib_common_strcat.c +++ b/test/val/lib_common_strcat.c @@ -11,7 +11,7 @@ TEST { unsigned i,j; char* p; - + for (i=0; i < SourceStringSize; ++i) SourceString[i] = (i%128)+1; @@ -23,13 +23,13 @@ TEST DestinationString[0] = 0; ASSERT_AreEqual(0, strlen(DestinationString), "%u", "Destination string initialization or 'strlen()' problem!"); - + /* Test concatenation to empty buffer */ strcat(DestinationString, SourceString); - + ASSERT_AreEqual(SourceStringSize, strlen(DestinationString), "%u", "Unexpected string length while string concatenation to empty buffer!"); - + /* Test concatenation to non empty buffer */ p = strcat(DestinationString, SourceString); diff --git a/test/val/lib_common_strchr.c b/test/val/lib_common_strchr.c index a48d287e5..6f2db258a 100644 --- a/test/val/lib_common_strchr.c +++ b/test/val/lib_common_strchr.c @@ -1,7 +1,7 @@ #include <string.h> #include "unittest.h" - + /* Test string. Must NOT have duplicate characters! */ static char S[] = "Helo wrd!\n"; diff --git a/test/val/lib_common_strcspn.c b/test/val/lib_common_strcspn.c index f289ddb95..1adb19671 100644 --- a/test/val/lib_common_strcspn.c +++ b/test/val/lib_common_strcspn.c @@ -11,7 +11,7 @@ static char* TestChars="1234567890"; // we like to find numbe TEST { unsigned i; - + for (i=0; i < EstimatedStringSize; ++i) EstimatedString[i] = (i%26)+'A'; // put ABCD... into the string to be estimated diff --git a/test/val/lib_common_strncat.c b/test/val/lib_common_strncat.c index a6f92ac05..54cf0e3e5 100644 --- a/test/val/lib_common_strncat.c +++ b/test/val/lib_common_strncat.c @@ -11,7 +11,7 @@ TEST { unsigned i; char* p; - + for (i=0; i < SourceStringSize; ++i) SourceString[i] = (i%128)+1; @@ -23,13 +23,13 @@ TEST DestinationString[0] = 0; ASSERT_AreEqual(0, strlen(DestinationString), "%u", "Destination string initialization or 'strlen()' problem!"); - + /* Test "unlimted" concatenation to empty buffer */ strncat(DestinationString, SourceString, 1024); - + ASSERT_AreEqual(SourceStringSize, strlen(DestinationString), "%u", "Unexpected string length while string concatenation to empty buffer!"); - + /* Test limited concatenation to non empty buffer */ p = strncat(DestinationString, SourceString, 128); diff --git a/test/val/lib_common_strrchr.c b/test/val/lib_common_strrchr.c index a72c44db9..840ec2b7c 100644 --- a/test/val/lib_common_strrchr.c +++ b/test/val/lib_common_strrchr.c @@ -1,6 +1,6 @@ #include <string.h> #include "unittest.h" - + static char TestString[] = "01234567890123456789"; // two times the same string static char Found[256]; diff --git a/test/val/lib_common_strspn.c b/test/val/lib_common_strspn.c index 96a006469..b7b4c1d85 100644 --- a/test/val/lib_common_strspn.c +++ b/test/val/lib_common_strspn.c @@ -10,7 +10,7 @@ static char* TestChars="1234567890"; // we like to find numbe TEST { unsigned i; - + for (i=0; i < EstimatedStringSize; ++i) EstimatedString[i] = (i%10)+'0'; // put 0123... into the string to be estimated diff --git a/test/val/mult1.c b/test/val/mult1.c index 831bde7ec..6d491a427 100644 --- a/test/val/mult1.c +++ b/test/val/mult1.c @@ -48,23 +48,23 @@ void m2(unsigned char uc) void m3(unsigned char uc) { volatile unsigned char vuc; - + /* uchar = uchar * lit */ /* testing literal multiply with same source and destination */ vuc = uc; - uc2 = 0; - uc1 = vuc; uc1 = uc1*1; if( uc1 != (uc2+=TESTLIT) ) failures++; - uc1 = vuc; uc1 = uc1*2; if( uc1 != (uc2+=TESTLIT) ) failures++; - uc1 = vuc; uc1 = uc1*3; if( uc1 != (uc2+=TESTLIT) ) failures++; - uc1 = vuc; uc1 = uc1*4; if( uc1 != (uc2+=TESTLIT) ) failures++; + uc2 = 0; + uc1 = vuc; uc1 = uc1*1; if( uc1 != (uc2+=TESTLIT) ) failures++; + uc1 = vuc; uc1 = uc1*2; if( uc1 != (uc2+=TESTLIT) ) failures++; + uc1 = vuc; uc1 = uc1*3; if( uc1 != (uc2+=TESTLIT) ) failures++; + uc1 = vuc; uc1 = uc1*4; if( uc1 != (uc2+=TESTLIT) ) failures++; uc1 = vuc; uc1 = uc1*5; if( uc1 != (uc2+=TESTLIT) ) failures++; - uc1 = vuc; uc1 = uc1*6; if( uc1 != (uc2+=TESTLIT) ) failures++; - uc1 = vuc; uc1 = uc1*7; if( uc1 != (uc2+=TESTLIT) ) failures++; - uc1 = vuc; uc1 = uc1*8; if( uc1 != (uc2+=TESTLIT) ) failures++; + uc1 = vuc; uc1 = uc1*6; if( uc1 != (uc2+=TESTLIT) ) failures++; + uc1 = vuc; uc1 = uc1*7; if( uc1 != (uc2+=TESTLIT) ) failures++; + uc1 = vuc; uc1 = uc1*8; if( uc1 != (uc2+=TESTLIT) ) failures++; uc1 = vuc; uc1 = uc1*9; if( uc1 != (uc2+=TESTLIT) ) failures++; - uc1 = vuc; uc1 = uc1*10; if( uc1 != (uc2+=TESTLIT) ) failures++; - uc1 = vuc; uc1 = uc1*11; if( uc1 != (uc2+=TESTLIT) ) failures++; - uc1 = vuc; uc1 = uc1*12; if( uc1 != (uc2+=TESTLIT) ) failures++; + uc1 = vuc; uc1 = uc1*10; if( uc1 != (uc2+=TESTLIT) ) failures++; + uc1 = vuc; uc1 = uc1*11; if( uc1 != (uc2+=TESTLIT) ) failures++; + uc1 = vuc; uc1 = uc1*12; if( uc1 != (uc2+=TESTLIT) ) failures++; uc1 = vuc; uc1 = uc1*13; if( uc1 != (uc2+=TESTLIT) ) failures++; uc1 = vuc; uc1 = uc1*14; if( uc1 != (uc2+=TESTLIT) ) failures++; uc1 = vuc; uc1 = uc1*15; if( uc1 != (uc2+=TESTLIT) ) failures++; @@ -75,17 +75,17 @@ void m3(unsigned char uc) uc1 = vuc; uc1 = uc1*20; if( uc1 != (uc2+=TESTLIT) ) failures++; uc1 = vuc; uc1 = uc1*21; if( uc1 != (uc2+=TESTLIT) ) failures++; uc1 = vuc; uc1 = uc1*22; if( uc1 != (uc2+=TESTLIT) ) failures++; - uc1 = vuc; uc1 = uc1*23; if( uc1 != (uc2+=TESTLIT) ) failures++; + uc1 = vuc; uc1 = uc1*23; if( uc1 != (uc2+=TESTLIT) ) failures++; uc1 = vuc; uc1 = uc1*24; if( uc1 != (uc2+=TESTLIT) ) failures++; - + uc1 = vuc; uc1 = uc1*31; if( uc1 != ((31*TESTLIT) & 0xff) ) failures++; uc1 = vuc; uc1 = uc1*32; if( uc1 != ((32*TESTLIT) & 0xff) ) failures++; uc1 = vuc; uc1 = uc1*64; if( uc1 != ((64*TESTLIT) & 0xff) ) failures++; uc1 = vuc; uc1 = uc1*128;if( uc1 != ((128*TESTLIT)& 0xff) ) failures++; /* testing literal multiply with different source and destination */ - uc1 = vuc*1; if( uc1 != ((1*TESTLIT) & 0xff) ) failures++; - uc1 = vuc*2; if( uc1 != ((2*TESTLIT) & 0xff) ) failures++; + uc1 = vuc*1; if( uc1 != ((1*TESTLIT) & 0xff) ) failures++; + uc1 = vuc*2; if( uc1 != ((2*TESTLIT) & 0xff) ) failures++; uc1 = vuc*4; if( uc1 != ((4*TESTLIT) & 0xff) ) failures++; } diff --git a/test/val/or1.c b/test/val/or1.c index 9e41d7a39..b5f550331 100644 --- a/test/val/or1.c +++ b/test/val/or1.c @@ -57,23 +57,23 @@ void or_lit2uint(void) failures++; uint0 |= 1; - if(uint0 != 1) + if(uint0 != 1) failures++; uint0 |= 2; - if(uint0 != 3) + if(uint0 != 3) failures++; uint0 |= 0x100; - if(uint0 != 0x103) + if(uint0 != 0x103) failures++; uint0 |= 0x102; - if(uint0 != 0x103) + if(uint0 != 0x103) failures++; uint0 |= 0x303; - if(uint0 != 0x303) + if(uint0 != 0x303) failures++; } @@ -83,27 +83,27 @@ void or_lit2ulong(void) failures++; ulong0 |= 1; - if(ulong0 != 1) + if(ulong0 != 1) failures++; ulong0 |= 2; - if(ulong0 != 3) + if(ulong0 != 3) failures++; ulong0 |= 0x100; - if(ulong0 != 0x103) + if(ulong0 != 0x103) failures++; ulong0 |= 0x102; - if(ulong0 != 0x103) + if(ulong0 != 0x103) failures++; ulong0 |= 0x303; - if(ulong0 != 0x303) + if(ulong0 != 0x303) failures++; ulong0 |= 0x80000000; - if(ulong0 != 0x80000303) + if(ulong0 != 0x80000303) failures++; } diff --git a/test/val/postdec-16-16.c b/test/val/postdec-16-16.c index e55b5765f..bb4475959 100644 --- a/test/val/postdec-16-16.c +++ b/test/val/postdec-16-16.c @@ -2,12 +2,12 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#ifdef __C64__ +#ifdef __C64__ #include <conio.h> #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned short u16w = 3; static unsigned short u16r = 5; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0x1, 0xc, 0xd, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0x1, 0xc, 0xd, 0x4, 0x5, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u16w: %d\n\r", u16w); printf("u16r: %d\n\r", u16r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/postdec-16-8.c b/test/val/postdec-16-8.c index 76a64d769..d2a5bab3b 100644 --- a/test/val/postdec-16-8.c +++ b/test/val/postdec-16-8.c @@ -2,12 +2,12 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#ifdef __C64__ +#ifdef __C64__ #include <conio.h> #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned short u16w = 3; static unsigned char u8r = 5; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0x1, 0xc, 0xd, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0x1, 0xc, 0xd, 0x4, 0x5, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u16w: %d\n\r", u16w); printf("u8r: %d\n\r", u8r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/postdec-8-16.c b/test/val/postdec-8-16.c index f7716ae89..7eeda2dcc 100644 --- a/test/val/postdec-8-16.c +++ b/test/val/postdec-8-16.c @@ -2,12 +2,12 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#ifdef __C64__ +#ifdef __C64__ #include <conio.h> #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned char u8w = 3; static unsigned short u16r = 5; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0x1, 0xc, 0xd, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0x1, 0xc, 0xd, 0x4, 0x5, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u8w: %d\n\r", u8w); printf("u16r: %d\n\r", u16r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/postdec-8-8.c b/test/val/postdec-8-8.c index b620c46dc..38470cb14 100644 --- a/test/val/postdec-8-8.c +++ b/test/val/postdec-8-8.c @@ -2,12 +2,12 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#ifdef __C64__ +#ifdef __C64__ #include <conio.h> #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned char u8w = 3; static unsigned char u8r = 5; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0x1, 0xc, 0xd, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0x1, 0xc, 0xd, 0x4, 0x5, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u8w: %d\n\r", u8w); printf("u8r: %d\n\r", u8r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/postinc-16-16.c b/test/val/postinc-16-16.c index 286e0364b..4a122e51f 100644 --- a/test/val/postinc-16-16.c +++ b/test/val/postinc-16-16.c @@ -2,12 +2,12 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#ifdef __C64__ +#ifdef __C64__ #include <conio.h> #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned short u16w = 1; static unsigned short u16r = 3; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u16w: %d\n\r", u16w); printf("u16r: %d\n\r", u16r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/postinc-16-8.c b/test/val/postinc-16-8.c index dd0a03d6c..a604ab34c 100644 --- a/test/val/postinc-16-8.c +++ b/test/val/postinc-16-8.c @@ -1,12 +1,12 @@ #include <stdio.h> #include <string.h> -#ifdef __C64__ +#ifdef __C64__ #include <conio.h> #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -26,9 +26,9 @@ static unsigned char mem[0x10]; static unsigned short u16w = 1; static unsigned char u8r = 3; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; static unsigned char i; static unsigned char err = 0; @@ -40,17 +40,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -60,13 +60,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u16w: %d\n\r", u16w); printf("u8r: %d\n\r", u8r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/postinc-8-16.c b/test/val/postinc-8-16.c index 57e934ced..7ac57e9da 100644 --- a/test/val/postinc-8-16.c +++ b/test/val/postinc-8-16.c @@ -2,12 +2,12 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#ifdef __C64__ +#ifdef __C64__ #include <conio.h> #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned char u8w = 1; static unsigned short u16r = 3; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u8w: %d\n\r", u8w); printf("u16r: %d\n\r", u16r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/postinc-8-8.c b/test/val/postinc-8-8.c index b168af8df..97c8aa9f7 100644 --- a/test/val/postinc-8-8.c +++ b/test/val/postinc-8-8.c @@ -2,12 +2,12 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#ifdef __C64__ +#ifdef __C64__ #include <conio.h> #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned char u8w = 1; static unsigned char u8r = 3; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u8w: %d\n\r", u8w); printf("u8r: %d\n\r", u8r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/pptest4.c b/test/val/pptest4.c index 827be7200..6c0891661 100644 --- a/test/val/pptest4.c +++ b/test/val/pptest4.c @@ -2,7 +2,7 @@ /* preprocessor test #4 */ #define t(x,y,z) x ## y ## z -int j[] = { t(1,2,3), t(,4,5), t(6,,7), t(8,9,), +int j[] = { t(1,2,3), t(,4,5), t(6,,7), t(8,9,), t(10,,), t(,11,), t(,,12), t(,,) }; int e[] = { 123, 45, 67, 89, 10, 11, 12, }; diff --git a/test/val/pptest5.c b/test/val/pptest5.c index 82f642c8e..0b9db291d 100644 --- a/test/val/pptest5.c +++ b/test/val/pptest5.c @@ -1,7 +1,7 @@ /* preprocessor test #5 */ -#define t(x,y,z) x ## y ## z +#define t(x,y,z) x ## y ## z int j[] = { t(1,2,3), t(,4,5), t(6,,7), t(8,9,), t(10,,), t(,11,), t(,,12), t(,,) }; diff --git a/test/val/pr1423.c b/test/val/pr1423.c index 3135b64a3..47f0f0610 100644 --- a/test/val/pr1423.c +++ b/test/val/pr1423.c @@ -10,7 +10,7 @@ void test1(void) } fails++; return; -} +} void test2(void) { diff --git a/test/val/predec-16-16.c b/test/val/predec-16-16.c index 7d70b1208..a8c1658e4 100644 --- a/test/val/predec-16-16.c +++ b/test/val/predec-16-16.c @@ -2,12 +2,12 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#ifdef __C64__ +#ifdef __C64__ #include <conio.h> #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned short u16w = 3; static unsigned short u16r = 5; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u16w: %d\n\r", u16w); printf("u16r: %d\n\r", u16r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/predec-16-8.c b/test/val/predec-16-8.c index 69a0a3e28..a0e77da89 100644 --- a/test/val/predec-16-8.c +++ b/test/val/predec-16-8.c @@ -2,12 +2,12 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#ifdef __C64__ +#ifdef __C64__ #include <conio.h> #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned short u16w = 3; static unsigned char u8r = 5; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u16w: %d\n\r", u16w); printf("u8r: %d\n\r", u8r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/predec-8-16.c b/test/val/predec-8-16.c index 750312215..353f819d2 100644 --- a/test/val/predec-8-16.c +++ b/test/val/predec-8-16.c @@ -2,12 +2,12 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#ifdef __C64__ +#ifdef __C64__ #include <conio.h> #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned char u8w = 3; static unsigned short u16r = 5; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u8w: %d\n\r", u8w); printf("u16r: %d\n\r", u16r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/predec-8-8.c b/test/val/predec-8-8.c index d1069b39e..e468c9426 100644 --- a/test/val/predec-8-8.c +++ b/test/val/predec-8-8.c @@ -2,12 +2,12 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#ifdef __C64__ +#ifdef __C64__ #include <conio.h> #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned char u8w = 3; static unsigned char u8r = 5; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u8w: %d\n\r", u8w); printf("u8r: %d\n\r", u8r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/preinc-16-16.c b/test/val/preinc-16-16.c index d9c6dbf62..b600b6533 100644 --- a/test/val/preinc-16-16.c +++ b/test/val/preinc-16-16.c @@ -2,12 +2,12 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#ifdef __C64__ +#ifdef __C64__ #include <conio.h> #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned short u16w = 3; static unsigned short u16r = 5; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0x1, 0x2, 0x3, 0xe, 0xf, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0x1, 0x2, 0x3, 0xe, 0xf, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u16w: %d\n\r", u16w); printf("u16r: %d\n\r", u16r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/preinc-16-8.c b/test/val/preinc-16-8.c index 97a5dd306..a7bc5d53a 100644 --- a/test/val/preinc-16-8.c +++ b/test/val/preinc-16-8.c @@ -2,12 +2,12 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#ifdef __C64__ +#ifdef __C64__ #include <conio.h> #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned short u16w = 3; static unsigned char u8r = 5; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0x1, 0x2, 0x3, 0xe, 0xf, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0x1, 0x2, 0x3, 0xe, 0xf, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u16w: %d\n\r", u16w); printf("u8r: %d\n\r", u8r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/preinc-8-16.c b/test/val/preinc-8-16.c index 3c3a9b479..2b4104df5 100644 --- a/test/val/preinc-8-16.c +++ b/test/val/preinc-8-16.c @@ -2,12 +2,12 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#ifdef __C64__ +#ifdef __C64__ #include <conio.h> #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned char u8w = 3; static unsigned short u16r = 5; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0x1, 0x2, 0x3, 0xe, 0xf, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0x1, 0x2, 0x3, 0xe, 0xf, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u8w: %d\n\r", u8w); printf("u16r: %d\n\r", u16r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/preinc-8-8.c b/test/val/preinc-8-8.c index a700bfc48..9f6ec35a9 100644 --- a/test/val/preinc-8-8.c +++ b/test/val/preinc-8-8.c @@ -2,12 +2,12 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#ifdef __C64__ +#ifdef __C64__ #include <conio.h> #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned char u8w = 3; static unsigned char u8r = 5; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0x1, 0x2, 0x3, 0xe, 0xf, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0x1, 0x2, 0x3, 0xe, 0xf, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u8w: %d\n\r", u8w); printf("u8r: %d\n\r", u8r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/static-fwd-decl.c b/test/val/static-fwd-decl.c index 420640d97..a133e930f 100644 --- a/test/val/static-fwd-decl.c +++ b/test/val/static-fwd-decl.c @@ -15,7 +15,7 @@ typedef struct _DIRMENU { const char *name; struct _DIRMENU *dest; -} DIRMENU; +} DIRMENU; static DIRMENU rmenu; diff --git a/test/val/strnicmp-test.c b/test/val/strnicmp-test.c index 6376a39bb..e6e5a3b04 100644 --- a/test/val/strnicmp-test.c +++ b/test/val/strnicmp-test.c @@ -71,9 +71,9 @@ int main(void) ret = do_test("", "", 5); printresult(ret); - + printf("fails: %d\n", fails); - + #if defined(__CC65__) && !defined(__SIM6502__) && !defined(__SIM65C02__) cgetc(); #endif diff --git a/test/val/switch2.c b/test/val/switch2.c index 65c24eeda..eff06ce12 100644 --- a/test/val/switch2.c +++ b/test/val/switch2.c @@ -1,6 +1,6 @@ /* !!DESCRIPTION!! Testing empty bodied switch statements. - !!ORIGIN!! + !!ORIGIN!! !!LICENCE!! GPL, read COPYING.GPL */ diff --git a/test/val/time-test.c b/test/val/time-test.c index 304238fa0..db086410d 100644 --- a/test/val/time-test.c +++ b/test/val/time-test.c @@ -46,7 +46,7 @@ int main (void) sprintf (result, "%08lX - %s\n", t, buf); printf (result); if (strcmp(result, EXPECTSTR) != 0) { fails++; } - + printf("fails: %d\n", fails); return fails; diff --git a/test/val/xor.c b/test/val/xor.c index 2a346023e..98bd5faf1 100644 --- a/test/val/xor.c +++ b/test/val/xor.c @@ -31,12 +31,12 @@ void xor_chars_0_1(void) void xor_if(void) { - if(achar0 ^ achar1) + if(achar0 ^ achar1) failures++; achar0 ^= 0xff; - if( !(achar0 ^ achar1) ) + if( !(achar0 ^ achar1) ) failures++; } From 92e16432f792a5b358df68588980efb5b993fb1b Mon Sep 17 00:00:00 2001 From: mrdudz <mrdudz@users.noreply.github.com> Date: Sun, 17 Apr 2022 16:08:04 +0200 Subject: [PATCH 092/101] remove dangling spaces --- util/atari/ataricvt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/atari/ataricvt.c b/util/atari/ataricvt.c index 104d4f6de..23ad5a24a 100644 --- a/util/atari/ataricvt.c +++ b/util/atari/ataricvt.c @@ -8,7 +8,7 @@ int main (void) putchar ('\n'); } else if (C == 0x7F) { putchar ('\t'); - } else { + } else { putchar (C); } } From 4e3bba0c3f7f67c1b05a11c4373c8daf61e8c257 Mon Sep 17 00:00:00 2001 From: mrdudz <mrdudz@users.noreply.github.com> Date: Sun, 17 Apr 2022 16:08:21 +0200 Subject: [PATCH 093/101] also check spaces at end of lines --- .github/checks/Makefile | 8 +++----- Contributing.md | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/checks/Makefile b/.github/checks/Makefile index 827606d01..662477790 100644 --- a/.github/checks/Makefile +++ b/.github/checks/Makefile @@ -1,15 +1,13 @@ .PHONY: tabs -check: tabs lastline +check: tabs lastline spaces tabs: tabs.sh @./tabs.sh - + lastline: lastline.sh @./lastline.sh - -# checks that will currently fail (on a lot of files), so they are not included -# in the general "check" action + spaces: spaces.sh @./spaces.sh diff --git a/Contributing.md b/Contributing.md index c8681c7ee..6258ce523 100644 --- a/Contributing.md +++ b/Contributing.md @@ -20,7 +20,7 @@ This is an ongoing controversial topic - everyone knows that. However, the follo * No extra spaces at the end of lines. * All text files must end with new-line characters. Don't leave the last line "dangling". -The (bash) scipts used to check the above rules can be found in ```.github/check``` +The (bash) scipts used to check the above rules can be found in ```.github/check```. You can also run all checks using ```make check```. ### misc From e9fec5e3fe4569b5c018aa6b9aa5d72572e16480 Mon Sep 17 00:00:00 2001 From: mrdudz <mrdudz@users.noreply.github.com> Date: Sun, 17 Apr 2022 17:12:52 +0200 Subject: [PATCH 094/101] define CHECK_PATH rather than leaving it open --- .github/checks/lastline.sh | 2 ++ .github/checks/spaces.sh | 2 ++ .github/checks/tabs.sh | 2 ++ 3 files changed, 6 insertions(+) diff --git a/.github/checks/lastline.sh b/.github/checks/lastline.sh index d455481d1..464f1774a 100755 --- a/.github/checks/lastline.sh +++ b/.github/checks/lastline.sh @@ -1,6 +1,8 @@ #! /bin/bash OLDCWD=`pwd` SCRIPT_PATH=`dirname $0` +CHECK_PATH=. + cd $SCRIPT_PATH/../../ nl=' diff --git a/.github/checks/spaces.sh b/.github/checks/spaces.sh index 309ba9ac1..71bdd877f 100755 --- a/.github/checks/spaces.sh +++ b/.github/checks/spaces.sh @@ -1,6 +1,8 @@ #! /bin/bash OLDCWD=`pwd` SCRIPT_PATH=`dirname $0` +CHECK_PATH=. + cd $SCRIPT_PATH/../../ FILES=`find $CHECK_PATH -type f \( \( -name \*.inc -a \! -name Makefile.inc \) -o -name \*.cfg -o -name \*.c -o -name \*.s -o -name \*.h -o -name \*.asm -o -name \*.sgml \) -print | xargs grep -l ' $' | grep -v "libwrk/" | grep -v "testwrk/"` diff --git a/.github/checks/tabs.sh b/.github/checks/tabs.sh index ad10dfe14..db2b61eac 100755 --- a/.github/checks/tabs.sh +++ b/.github/checks/tabs.sh @@ -1,6 +1,8 @@ #! /bin/bash OLDCWD=`pwd` SCRIPT_PATH=`dirname $0` +CHECK_PATH=. + cd $SCRIPT_PATH/../../ FILES=`find $CHECK_PATH -type f \( \( -name \*.inc -a \! -name Makefile.inc \) -o -name \*.cfg -o -name \*.c -o -name \*.s -o -name \*.h -o -name \*.asm -o -name \*.sgml \) -print | xargs grep -l $'\t' | grep -v "libwrk/" | grep -v "testwrk/"` From b2319f35787a227af0dda65ffaddf1c6c273102e Mon Sep 17 00:00:00 2001 From: Greg King <gregdk@users.sf.net> Date: Sun, 17 Apr 2022 14:45:33 -0400 Subject: [PATCH 095/101] Made all of the Makefile's rules be phony. --- .github/checks/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/checks/Makefile b/.github/checks/Makefile index 662477790..dc42d14ca 100644 --- a/.github/checks/Makefile +++ b/.github/checks/Makefile @@ -1,5 +1,5 @@ -.PHONY: tabs +.PHONY: check tabs lastline spaces check: tabs lastline spaces From 86ca11222a905a122773029da44223bea0171490 Mon Sep 17 00:00:00 2001 From: Greg King <gregdk@users.sf.net> Date: Sun, 17 Apr 2022 14:47:19 -0400 Subject: [PATCH 096/101] Fixed and tightenned the find commands' expressions. --- .github/checks/lastline.sh | 2 +- .github/checks/spaces.sh | 2 +- .github/checks/tabs.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/checks/lastline.sh b/.github/checks/lastline.sh index 464f1774a..797b6acfd 100755 --- a/.github/checks/lastline.sh +++ b/.github/checks/lastline.sh @@ -8,7 +8,7 @@ cd $SCRIPT_PATH/../../ nl=' ' nl=$'\n' -FILES=`find $CHECK_PATH -type f \( \( -name \*.inc -a \! -name Makefile.inc \) -o -name \*.cfg -o -name \*.c -o -name \*.s -o -name \*.h -o -name \*.asm -o -name \*.sgml \) -print | while read f; do +FILES=`find $CHECK_PATH -type f \( -name \*.inc -o -name Makefile -o -name \*.cfg -o -name \*.\[chs\] -o -name \*.asm -o -name \*.sgml \) -print | while read f; do t=$(tail -c2 $f; printf x); r1="${nl}$"; [[ ${t%x} =~ $r1 ]] || echo "$f" done` diff --git a/.github/checks/spaces.sh b/.github/checks/spaces.sh index 71bdd877f..02a03ff58 100755 --- a/.github/checks/spaces.sh +++ b/.github/checks/spaces.sh @@ -5,7 +5,7 @@ CHECK_PATH=. cd $SCRIPT_PATH/../../ -FILES=`find $CHECK_PATH -type f \( \( -name \*.inc -a \! -name Makefile.inc \) -o -name \*.cfg -o -name \*.c -o -name \*.s -o -name \*.h -o -name \*.asm -o -name \*.sgml \) -print | xargs grep -l ' $' | grep -v "libwrk/" | grep -v "testwrk/"` +FILES=`find $CHECK_PATH -type f \( -name \*.inc -o -name Makefile -o -name \*.cfg -o -name \*.\[chs\] -o -name \*.asm -o -name \*.sgml \) -print | xargs grep -l ' $' | grep -v "libwrk/" | grep -v "testwrk/"` cd $OLDCWD diff --git a/.github/checks/tabs.sh b/.github/checks/tabs.sh index db2b61eac..3823eb370 100755 --- a/.github/checks/tabs.sh +++ b/.github/checks/tabs.sh @@ -5,7 +5,7 @@ CHECK_PATH=. cd $SCRIPT_PATH/../../ -FILES=`find $CHECK_PATH -type f \( \( -name \*.inc -a \! -name Makefile.inc \) -o -name \*.cfg -o -name \*.c -o -name \*.s -o -name \*.h -o -name \*.asm -o -name \*.sgml \) -print | xargs grep -l $'\t' | grep -v "libwrk/" | grep -v "testwrk/"` +FILES=`find $CHECK_PATH -type f \( \( -name \*.inc -a \! -name Makefile.inc \) -o -name \*.cfg -o -name \*.\[chs\] -o -name \*.asm -o -name \*.sgml \) -print | xargs grep -l $'\t' | grep -v "libwrk/" | grep -v "testwrk/"` cd $OLDCWD From a4e1cf9a0a62bddcc660ae339062e047b8ddf21c Mon Sep 17 00:00:00 2001 From: Greg King <gregdk@users.sf.net> Date: Sun, 17 Apr 2022 15:08:42 -0400 Subject: [PATCH 097/101] Moved a constant expression out of a loop. --- .github/checks/lastline.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/checks/lastline.sh b/.github/checks/lastline.sh index 797b6acfd..406814ff4 100755 --- a/.github/checks/lastline.sh +++ b/.github/checks/lastline.sh @@ -8,8 +8,9 @@ cd $SCRIPT_PATH/../../ nl=' ' nl=$'\n' +r1="${nl}$" FILES=`find $CHECK_PATH -type f \( -name \*.inc -o -name Makefile -o -name \*.cfg -o -name \*.\[chs\] -o -name \*.asm -o -name \*.sgml \) -print | while read f; do - t=$(tail -c2 $f; printf x); r1="${nl}$"; + t=$(tail -c2 $f; printf x) [[ ${t%x} =~ $r1 ]] || echo "$f" done` From 58392982035b609189f93dedc94fe5a759240225 Mon Sep 17 00:00:00 2001 From: Greg King <gregdk@users.sf.net> Date: Sun, 17 Apr 2022 16:10:28 -0400 Subject: [PATCH 098/101] Remove work directory paths _before_ checking for style errors. --- .github/checks/spaces.sh | 2 +- .github/checks/tabs.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/checks/spaces.sh b/.github/checks/spaces.sh index 02a03ff58..e133d1e47 100755 --- a/.github/checks/spaces.sh +++ b/.github/checks/spaces.sh @@ -5,7 +5,7 @@ CHECK_PATH=. cd $SCRIPT_PATH/../../ -FILES=`find $CHECK_PATH -type f \( -name \*.inc -o -name Makefile -o -name \*.cfg -o -name \*.\[chs\] -o -name \*.asm -o -name \*.sgml \) -print | xargs grep -l ' $' | grep -v "libwrk/" | grep -v "testwrk/"` +FILES=`find $CHECK_PATH -type f \( -name \*.inc -o -name Makefile -o -name \*.cfg -o -name \*.\[chs\] -o -name \*.asm -o -name \*.sgml \) -print | grep -v "libwrk/" | grep -v "testwrk/" | xargs grep -l ' $'` cd $OLDCWD diff --git a/.github/checks/tabs.sh b/.github/checks/tabs.sh index 3823eb370..87350efd9 100755 --- a/.github/checks/tabs.sh +++ b/.github/checks/tabs.sh @@ -5,7 +5,7 @@ CHECK_PATH=. cd $SCRIPT_PATH/../../ -FILES=`find $CHECK_PATH -type f \( \( -name \*.inc -a \! -name Makefile.inc \) -o -name \*.cfg -o -name \*.\[chs\] -o -name \*.asm -o -name \*.sgml \) -print | xargs grep -l $'\t' | grep -v "libwrk/" | grep -v "testwrk/"` +FILES=`find $CHECK_PATH -type f \( \( -name \*.inc -a \! -name Makefile.inc \) -o -name \*.cfg -o -name \*.\[chs\] -o -name \*.asm -o -name \*.sgml \) -print | grep -v "libwrk/" | grep -v "testwrk/" | xargs grep -l $'\t'` cd $OLDCWD From 2cdccd5e8a9784ef642014818ae99fa50254e723 Mon Sep 17 00:00:00 2001 From: Greg King <gregdk@users.sf.net> Date: Sun, 17 Apr 2022 19:06:35 -0400 Subject: [PATCH 099/101] Oops, forgot to check macros. --- .github/checks/lastline.sh | 2 +- .github/checks/spaces.sh | 2 +- .github/checks/tabs.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/checks/lastline.sh b/.github/checks/lastline.sh index 406814ff4..851a2cfc4 100755 --- a/.github/checks/lastline.sh +++ b/.github/checks/lastline.sh @@ -9,7 +9,7 @@ nl=' ' nl=$'\n' r1="${nl}$" -FILES=`find $CHECK_PATH -type f \( -name \*.inc -o -name Makefile -o -name \*.cfg -o -name \*.\[chs\] -o -name \*.asm -o -name \*.sgml \) -print | while read f; do +FILES=`find $CHECK_PATH -type f \( -name \*.inc -o -name Makefile -o -name \*.cfg -o -name \*.\[chs\] -o -name \*.mac -o -name \*.asm -o -name \*.sgml \) -print | while read f; do t=$(tail -c2 $f; printf x) [[ ${t%x} =~ $r1 ]] || echo "$f" done` diff --git a/.github/checks/spaces.sh b/.github/checks/spaces.sh index e133d1e47..d695beaba 100755 --- a/.github/checks/spaces.sh +++ b/.github/checks/spaces.sh @@ -5,7 +5,7 @@ CHECK_PATH=. cd $SCRIPT_PATH/../../ -FILES=`find $CHECK_PATH -type f \( -name \*.inc -o -name Makefile -o -name \*.cfg -o -name \*.\[chs\] -o -name \*.asm -o -name \*.sgml \) -print | grep -v "libwrk/" | grep -v "testwrk/" | xargs grep -l ' $'` +FILES=`find $CHECK_PATH -type f \( -name \*.inc -o -name Makefile -o -name \*.cfg -o -name \*.\[chs\] -o -name \*.mac -o -name \*.asm -o -name \*.sgml \) -print | grep -v "libwrk/" | grep -v "testwrk/" | xargs grep -l ' $'` cd $OLDCWD diff --git a/.github/checks/tabs.sh b/.github/checks/tabs.sh index 87350efd9..16f0280ae 100755 --- a/.github/checks/tabs.sh +++ b/.github/checks/tabs.sh @@ -5,7 +5,7 @@ CHECK_PATH=. cd $SCRIPT_PATH/../../ -FILES=`find $CHECK_PATH -type f \( \( -name \*.inc -a \! -name Makefile.inc \) -o -name \*.cfg -o -name \*.\[chs\] -o -name \*.asm -o -name \*.sgml \) -print | grep -v "libwrk/" | grep -v "testwrk/" | xargs grep -l $'\t'` +FILES=`find $CHECK_PATH -type f \( \( -name \*.inc -a \! -name Makefile.inc \) -o -name \*.cfg -o -name \*.\[chs\] -o -name \*.mac -o -name \*.asm -o -name \*.sgml \) -print | grep -v "libwrk/" | grep -v "testwrk/" | xargs grep -l $'\t'` cd $OLDCWD From ece6f10588da52de804ad8d834fabdbbe98d3a0e Mon Sep 17 00:00:00 2001 From: mrdudz <mrdudz@users.noreply.github.com> Date: Mon, 18 Apr 2022 17:43:56 +0200 Subject: [PATCH 100/101] remove dangling spaces when changing the checker scripts and/or directly comitting to git head, please make sure to also run the checks first so you don't break the autobuilds --- asminc/atari.mac | 2 +- samples/atari2600/Makefile | 2 +- samples/cbm/Makefile | 2 +- samples/geos/Makefile | 2 +- samples/supervision/Makefile | 2 +- samples/tutorial/Makefile | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/asminc/atari.mac b/asminc/atari.mac index 8e76888d7..3916254d0 100644 --- a/asminc/atari.mac +++ b/asminc/atari.mac @@ -1,5 +1,5 @@ ; Convert characters to screen codes - + ; Helper macro that converts and outputs one character .macro _scrcode char .if (char >= 0) .and (char <= 31) diff --git a/samples/atari2600/Makefile b/samples/atari2600/Makefile index a02ec9e80..bd2ebc41a 100644 --- a/samples/atari2600/Makefile +++ b/samples/atari2600/Makefile @@ -31,7 +31,7 @@ else CL := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65) LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65) SP := $(if $(wildcard ../../bin/sp65*),../../bin/sp65,sp65) -endif +endif EXELIST_atari2600 = \ hello diff --git a/samples/cbm/Makefile b/samples/cbm/Makefile index 989710932..03387a061 100644 --- a/samples/cbm/Makefile +++ b/samples/cbm/Makefile @@ -31,7 +31,7 @@ else CL := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65) LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65) SP := $(if $(wildcard ../../bin/sp65*),../../bin/sp65,sp65) -endif +endif ifneq ($(filter disk samples.%,$(MAKECMDGOALS)),) ifdef CC65_HOME diff --git a/samples/geos/Makefile b/samples/geos/Makefile index 04de0aaa3..1fc49a873 100644 --- a/samples/geos/Makefile +++ b/samples/geos/Makefile @@ -44,7 +44,7 @@ else CL := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65) LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65) SP := $(if $(wildcard ../../bin/sp65*),../../bin/sp65,sp65) -endif +endif DIRLIST = grc diff --git a/samples/supervision/Makefile b/samples/supervision/Makefile index 5829b3f01..097329384 100644 --- a/samples/supervision/Makefile +++ b/samples/supervision/Makefile @@ -31,7 +31,7 @@ else CL := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65) LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65) SP := $(if $(wildcard ../../bin/sp65*),../../bin/sp65,sp65) -endif +endif EXELIST_supervision = \ hello diff --git a/samples/tutorial/Makefile b/samples/tutorial/Makefile index 67dd84003..eb8627c29 100644 --- a/samples/tutorial/Makefile +++ b/samples/tutorial/Makefile @@ -29,7 +29,7 @@ else CC := $(if $(wildcard ../../bin/cc65*),../../bin/cc65,cc65) CL := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65) LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65) -endif +endif EXELIST_atari2600 = \ notavailable From 6ea1f8ee85a6a0fa1a346a8613abd2051bfc8aaf Mon Sep 17 00:00:00 2001 From: Greg King <gregdk@users.sf.net> Date: Mon, 18 Apr 2022 19:25:48 -0400 Subject: [PATCH 101/101] Made the style-check scripts send their file lists to stderr. A complete list will be shown before make shows its error message. There will be less confusion about which lines are in the list. --- .github/checks/lastline.sh | 4 ++-- .github/checks/spaces.sh | 4 ++-- .github/checks/tabs.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/checks/lastline.sh b/.github/checks/lastline.sh index 851a2cfc4..d80d2fb57 100755 --- a/.github/checks/lastline.sh +++ b/.github/checks/lastline.sh @@ -17,9 +17,9 @@ done` cd $OLDCWD if [ x"$FILES"x != xx ]; then - echo "error: found following files that have no newline at the end:" + echo "error: found following files that have no newline at the end:" >&2 for n in $FILES; do - echo $n + echo $n >&2 done exit -1 fi diff --git a/.github/checks/spaces.sh b/.github/checks/spaces.sh index d695beaba..945e9acc3 100755 --- a/.github/checks/spaces.sh +++ b/.github/checks/spaces.sh @@ -10,9 +10,9 @@ FILES=`find $CHECK_PATH -type f \( -name \*.inc -o -name Makefile -o -name \*.cf cd $OLDCWD if [ x"$FILES"x != xx ]; then - echo "error: found dangling spaces in the following files:" + echo "error: found dangling spaces in the following files:" >&2 for n in $FILES; do - echo $n + echo $n >&2 done exit -1 fi diff --git a/.github/checks/tabs.sh b/.github/checks/tabs.sh index 16f0280ae..1c32def17 100755 --- a/.github/checks/tabs.sh +++ b/.github/checks/tabs.sh @@ -10,9 +10,9 @@ FILES=`find $CHECK_PATH -type f \( \( -name \*.inc -a \! -name Makefile.inc \) - cd $OLDCWD if [ x"$FILES"x != xx ]; then - echo "error: found TABs in the following files:" + echo "error: found TABs in the following files:" >&2 for n in $FILES; do - echo $n + echo $n >&2 done exit -1 fi