]> Shamusworld >> Repos - rmac/blobdiff - 6502.c
(c) message in header files and doc mini adjustments.
[rmac] / 6502.c
diff --git a/6502.c b/6502.c
index 099c89d115f2ab208560b8705c2c0fb38ca02e5b..24000c20f50b01bba97e3e0434e4276f8276b17f 100644 (file)
--- a/6502.c
+++ b/6502.c
@@ -1,5 +1,9 @@
 //
-// 6502 Assembler
+// RMAC - Reboot's Macro Assembler for all Atari computers
+// 6502.C - 6502 Assembler
+// Copyright (C) 199x Landon Dyer, 2011-2017 Reboot and Friends
+// RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986
+// Source utilised with the kind permission of Landon Dyer
 //
 //    Init6502 initialization
 //    d_6502    handle ".6502" directive
@@ -162,8 +166,9 @@ static char a8internal[] =
     'y', 121, 'z', 122
 };
 
+
 //
-//  initialize 6502 assembler
+// Initialize 6502 assembler
 //
 void Init6502()
 {
@@ -203,26 +208,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
 //