]> Shamusworld >> Repos - rmac/commitdiff
Version bump for last commit. ;-)
authorShamus Hammons <jlhamm@acm.org>
Fri, 21 Apr 2017 18:59:50 +0000 (13:59 -0500)
committerShamus Hammons <jlhamm@acm.org>
Fri, 21 Apr 2017 18:59:50 +0000 (13:59 -0500)
6502.c
6502.h
direct.c
direct.h
sect.c
token.c
token.h
version.h

diff --git a/6502.c b/6502.c
index 099c89d115f2ab208560b8705c2c0fb38ca02e5b..8141abea67a5e0d1e09f47213738c0e74d7612f3 100644 (file)
--- a/6502.c
+++ b/6502.c
@@ -162,8 +162,9 @@ static char a8internal[] =
     'y', 121, 'z', 122
 };
 
+
 //
-//  initialize 6502 assembler
+// Initialize 6502 assembler
 //
 void Init6502()
 {
@@ -203,26 +204,26 @@ void Init6502()
        // Set up first org section (set to zero)
        orgmap[0][0] = 0;
 
-    SwitchSection(M6502);      // Switch to 6502 section
-    //
-    // Initialise string conversion table(s)
-    //
-
-    char *p = a8internal;
-    memset(strtoa8, 31, 128);   // 31=fallback value ("?")
-    for (; p < a8internal + sizeof(a8internal); p += 2)
-    {
-        strtoa8[p[0]] = p[1];
-    }
-
-    if (challoc == 0) {
-        // Allocate and clear 64K of space for the 6502 section
-        chcheck(UPSEG_SIZE);
-        memset(sect[M6502].scode->chptr, 0, UPSEG_SIZE);
-    }
-    SwitchSection(TEXT);    // Go back to TEXT
+       SwitchSection(M6502);   // Switch to 6502 section
+
+       // Initialise string conversion table(s)
+       char * p = a8internal;
+       memset(strtoa8, 31, 128);   // 31=fallback value ("?")
+
+       for(; p<a8internal+sizeof(a8internal); p+=2)
+               strtoa8[p[0]] = p[1];
+
+       if (challoc == 0)
+       {
+               // Allocate and clear 64K of space for the 6502 section
+               chcheck(UPSEG_SIZE);
+               memset(sect[M6502].scode->chptr, 0, UPSEG_SIZE);
+       }
+
+       SwitchSection(TEXT);    // Go back to TEXT
 }
 
+
 //
 // .6502 --- enter 6502 mode
 //
diff --git a/6502.h b/6502.h
index acf9dede472fce6aa95464728ea4821c34ca66bc..56c20e9ee0223906ecbd312757d529e01de6cfd4 100644 (file)
--- a/6502.h
+++ b/6502.h
@@ -12,6 +12,7 @@
 // Exported variables
 extern const char in_6502mode[];
 extern uint16_t * currentorg;  // Current org range
+extern char strtoa8[];
 
 // Exported functions
 extern void Init6502();
index b7dfb853791d4e236d8803c2ec4ca576b20312d0..aebe56648760f3ee3add972e7ef1b68eb56c44de 100644 (file)
--- a/direct.c
+++ b/direct.c
@@ -990,20 +990,20 @@ int d_dc(WORD siz)
                        if ((challoc - ch_size) < i)
                                chcheck(i);
 
-            if (stringtype == NORMAL)
-            {
-                for (p = string[tok[1]]; *p != EOS; p++)
-                               D_byte(*p);
-            }
-            else if(stringtype == A8INT)
-            {    
-                for (p = string[tok[1]]; *p != EOS; p++)
-                D_byte(strtoa8[*p]);          
-            }
-            else
-            {
-                error("String format not supported yet");
-            }
+                       if (stringtype == NORMAL)
+                       {
+                               for(p=string[tok[1]]; *p!=EOS; p++)
+                                       D_byte(*p);
+                       }
+                       else if(stringtype == A8INT)
+                       {
+                               for(p=string[tok[1]]; *p!=EOS; p++)
+                                       D_byte(strtoa8[*p]);
+                       }
+                       else
+                       {
+                               error("String format not supported... yet");
+                       }
 
 
                        tok += 2;
index 7b4625a11bb64a5d488900b835d2a3835ed62b39..d4b22ce923267c45aa381c4b957ede35299abf35 100644 (file)
--- a/direct.h
+++ b/direct.h
@@ -15,7 +15,7 @@
 extern TOKEN exprbuf[];
 extern SYM * symbolPtr[];
 extern int (* dirtab[])();
-extern char strtoa8[];
+extern int stringtype;
 
 // Exported functions
 void auto_even(void);
diff --git a/sect.c b/sect.c
index cbb15187fa8f6514af7386463d1f1ac1b128e99f..7a6f9e15cb0a64a4aefede0d782050b9008c7360 100644 (file)
--- a/sect.c
+++ b/sect.c
@@ -47,26 +47,26 @@ PTR fchptr;                         // Deposit point in fixup chunk buffer
 // Return a size (SIZB, SIZW, SIZL) or 0, depending on what kind of fixup is
 // associated with a location.
 static uint8_t fusiztab[] = {
-   0,  // FU_QUICK
-   1,  // FU_BYTE
-   2,  // FU_WORD
-   2,  // FU_WBYTE
-   4,  // FU_LONG
-   1,  // FU_BBRA
-   0,  // (unused)
-   1,  // FU_6BRA
+       0,      // FU_QUICK
+       1,      // FU_BYTE
+       2,      // FU_WORD
+       2,      // FU_WBYTE
+       4,      // FU_LONG
+       1,      // FU_BBRA
+       0,      // (unused)
+       1,      // FU_6BRA
 };
 
 // Offset to REAL fixup location
 static uint8_t fusizoffs[] = {
-   0,  // FU_QUICK
-   0,  // FU_BYTE
-   0,  // FU_WORD
-   1,  // FU_WBYTE
-   0,  // FU_LONG
-   1,  // FU_BBRA
-   0,  // (unused)
-   0,  // FU_6BRA
+       0,      // FU_QUICK
+       0,      // FU_BYTE
+       0,      // FU_WORD
+       1,      // FU_WBYTE
+       0,      // FU_LONG
+       1,      // FU_BBRA
+       0,      // (unused)
+       0,      // FU_6BRA
 };
 
 
@@ -116,7 +116,7 @@ void SwitchSection(int sno)
        cursect = sno;
        SECT * p = &sect[sno];
 
-    m6502 = (sno == M6502);    /* set 6502-mode */
+    m6502 = (sno == M6502);    // Set 6502-mode flag
 
        // Copy section vars
        scattr = p->scattr;
@@ -130,11 +130,10 @@ void SwitchSection(int sno)
                challoc = cp->challoc;
                ch_size = cp->ch_size;
                chptr = cp->chptr + ch_size;
-        if (m6502)
-        {
-            // For 6502 mode, add the last org'd address
-            chptr = cp->chptr + orgaddr;
-        }
+
+               // For 6502 mode, add the last org'd address
+               if (m6502)
+                       chptr = cp->chptr + orgaddr;
        }
        else
                challoc = ch_size = 0;
diff --git a/token.c b/token.c
index 1ef99cf572fb0cfa9ca7b28b938333ab228e41f5..00ead96bdf7c0d9f866744433e4779ca620ed4ae 100644 (file)
--- a/token.c
+++ b/token.c
@@ -7,6 +7,7 @@
 //
 
 #include "token.h"
+#include "direct.h"
 #include "error.h"
 #include "macro.h"
 #include "procln.h"
@@ -1161,7 +1162,8 @@ if (debug) printf("TokenizeLine: Calling fpop() from SRC_IREPT...\n");
                // Handle multiple-character tokens
                if (c & MULTX)
                {
-            stringtype = 0;
+                       stringtype = 0;
+
                        switch (*ln++)
                        {
                        case '!':               // ! or !=
@@ -1175,11 +1177,10 @@ if (debug) printf("TokenizeLine: Calling fpop() from SRC_IREPT...\n");
 
                                continue;
                        case '\'':              // 'string'
-                if (m6502)
-                {
-                    stringtype = A8INT; // hardcoded for now, maybe this will change in the future
-                }
-                // Fall through
+                               if (m6502)
+                                       stringtype = A8INT; // hardcoded for now, maybe this will change in the future
+
+                               // Fall through
                        case '\"':              // "string"
                                c1 = ln[-1];
                                *tk++ = STRING;
diff --git a/token.h b/token.h
index aaa4fd6088e878c94f0d84d7992b8ec344cafebe..f5910d3279726d13b42dd56a51adb9c1c21dfbfc 100644 (file)
--- a/token.h
+++ b/token.h
@@ -154,7 +154,6 @@ extern char tolowertab[];
 extern INOBJ * cur_inobj;
 extern int mjump_align;
 extern char * string[];
-extern int stringtype;
 
 // Exported functions
 int include(int, char *);
index f5be1b82e05b0c93046413f40852fdc846f6f2ae..48316aeddc340a557378eeb18f5d740126aaf994 100644 (file)
--- a/version.h
+++ b/version.h
@@ -15,7 +15,7 @@
 
 #define MAJOR   1              // Major version number
 #define MINOR   6              // Minor version number
-#define PATCH   1              // Patch release number
+#define PATCH   2              // Patch release number
 
 #endif // __VERSION_H__