X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=6502.c;h=8141abea67a5e0d1e09f47213738c0e74d7612f3;hp=099c89d115f2ab208560b8705c2c0fb38ca02e5b;hb=968958cccf9201debee2cb0d4856cb5b55c6867d;hpb=2161b198b7b333147c89ef0346d8e9bb6ab9ffd9 diff --git a/6502.c b/6502.c index 099c89d..8141abe 100644 --- 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(; pchptr, 0, UPSEG_SIZE); + } + + SwitchSection(TEXT); // Go back to TEXT } + // // .6502 --- enter 6502 mode //