{
macuniq = 0;
macnum = 1;
-// argp = NULL;
argp = 0;
}
//
int ExitMacro(void)
{
-#ifndef _MSC_VER
-#pragma message !!! Bad macro exiting !!!
-#else
-#pragma WARNING(!!! Bad macro exiting !!!)
-#endif
+WARNING(!!! Bad macro exiting !!!)
/*
This is a problem. Currently, the argument logic just keeps the current
rptlevel++;
default:
//MORE stupidity here...
-#ifndef _MSC_VER
-#pragma warning "!!! Casting (char *) as LONG !!!"
-#else
-#pragma WARNING(!!! Casting (char *) as LONG !!!)
-#endif
+WARNING(!!! Casting (char *) as LONG !!!)
addln:
// Allocate length of line + 1('\0') + LONG
len = strlen(ln) + 1 + sizeof(LONG);
//
int WriteObject(int fd)
{
-// LONG t; // Scratch long
+ LONG t; // Scratch long
LONG tds; // TEXT & DATA segment size
int i; // Temporary int
CHUNK * cp; // Chunk (for gather)
" -l[filename] Create an output listing file\n"
" -n Don't do things behind your back in RISC assembler\n"
" -o file Output file name\n"
+ " -p[n] Create an ST .prg (1=normal, 2=w/symbols)\n"
" -r[size] Pad segments to boundary size specified\n"
" w: word (2 bytes, default alignment)\n"
" l: long (4 bytes)\n"
#pragma warning(disable:4996)
#endif
- //Makes warnings double clickable on visual studio
+ // Makes warnings double clickable on visual studio (ggn)
#define STRINGIZE_HELPER(x) #x
#define STRINGIZE(x) STRINGIZE_HELPER(x)
- #define WARNING(desc) message(__FILE__ "(" STRINGIZE(__LINE__) ") : Warning: " #desc)
+ #define WARNING(desc) __pragma(message(__FILE__ "(" STRINGIZE(__LINE__) ") : Warning: " #desc))
// usage:
- //#pragma WARNING(FIXME: Code removed because...)
+ // WARNING(FIXME: Code removed because...)
#endif
#include <io.h>
#define _OPEN_FLAGS O_TRUNC|O_CREAT|O_RDWR
#define _OPEN_INC O_RDONLY
#define _PERM_MODE S_IREAD|S_IWRITE
+ // WARNING WARNING WARNING
+ #define DO_PRAGMA(x) _Pragma (#x)
+ #define WARNING(desc) DO_PRAGMA(message (#desc))
#include <sys/fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#define _OPEN_FLAGS O_TRUNC|O_CREAT|O_RDWR
#define _OPEN_INC O_RDONLY
#define _PERM_MODE S_IREAD|S_IWRITE
+ // Defined here, even though the platfrom may not support it...
+ #define DO_PRAGMA(x) _Pragma (#x)
+ #define WARNING(desc) DO_PRAGMA(message (#desc))
#include <sys/fcntl.h>
#include <stdio.h>
#include <stdlib.h>
SECT * p;
// Shamus: Expression lengths are voodoo ATM (variable "i"). Need to fix
// this.
-#ifndef _MSC_VER
-#pragma warning "!!! AddFixup() is filled with VOODOO !!!"
-#else
-#pragma WARNING(!!! AddFixup() is filled with VOODOO !!!)
-#endif
+WARNING(!!! AddFixup() is filled with VOODOO !!!)
DEBUG printf("FIXUP@$%X: $%X\n", loc, attr);
// Compute length of expression (could be faster); determine if it's the
else
reg2 = (signed)((eval - (loc + 2)) / 2);// & 0x1F;
-#if 0
- if ((w & 0x0F00) == FU_MJR)
- {
- // Main code destination alignment checking here for
- // forward declared labels
- address = (oaddr) ? oaddr : loc;
-
- if (((address >= 0xF03000) && (address < 0xF04000)
- && (eval < 0xF03000)) || ((eval >= 0xF03000)
- && (eval < 0xF04000) && (address < 0xF03000)))
- {
- warni("* \'jr\' at $%08X - cannot jump relative between "
- "main memory and local gpu ram", address);
- }
- else
- {
- page_jump = (address & 0xFFFFFF00) - (eval & 0xFFFFFF00);
-
- if (page_jump)
- {
- // This jump is to a page outside of the
- // current 256 byte page
- if (eval % 4)
- {
- warni("* \'jr\' at $%08X - destination address not aligned for long page jump, insert a \'nop\' before the destination address", address);
- }
- }
- else
- {
- // This jump is in the current 256 byte page
- if ((eval - 2) % 4)
- {
- warni("* \'jr\' at $%08X - destination address not aligned for short page jump, insert a \'nop\' before the destination address", address);
- }
- }
- }
- }
-#endif
-
if ((reg2 < -16) || (reg2 > 15))
{
error("relative jump out of range");
case FU_LONG:
if ((w & FUMASKRISC) == FU_MOVEI)
{
-#if 0
- address = loc + 4;
-
- if (eattr & DEFINED)
- {
- for(j=0; j<fwindex; j++)
- {
- if (fwdjump[j] == address)
- {
- page_jump = (address & 0xFFFFFF00) - (eval & 0xFFFFFF00);
-
- if (page_jump)
- {
- if (eval % 4)
- {
- err_setup();
- sprintf(buf, "* \'jump\' at $%08X - destination address not aligned for long page jump, insert a \'nop\' before the destination address", address);
-
- if (listing > 0)
- ship_ln(buf);
-
- if (err_flag)
- write(err_fd, buf, (LONG)strlen(buf));
- else
- printf("%s\n", buf);
- }
- }
- else
- {
- if (!(eval & 0x0000000F) || ((eval - 2) % 4))
- {
- err_setup();
- sprintf(buf, "* \'jump\' at $%08X - destination address not aligned for short page jump, insert a \'nop\' before the destination address", address);
-
- if (listing > 0)
- ship_ln(buf);
-
- if (err_flag)
- write(err_fd, buf, (LONG)strlen(buf));
- else
- printf("%s\n", buf);
- }
- }
-
- // Clear this jump as it has been checked
- fwdjump[j] = 0;
- j = fwindex;
- }
- }
- }
-#endif
-
// Long constant in MOVEI # is word-swapped, so fix it here
eval = ((eval >> 16) & 0x0000FFFF) | ((eval << 16) & 0xFFFF0000);
flags = (MLONG | MMOVEI);
// Compare names (sleazo string compare)
// This string compare is not right. Doesn't check for lengths.
// (actually it does, but in a crappy, unclear way.)
-#ifndef _MSC_VER
- #warning "!!! Bad string comparison !!!"
-#else
- #pragma WARNING(!!!! Bad string comparison !!!)
-#endif
+WARNING(!!!! Bad string comparison !!!)
s1 = sym;
// s2 = (char *)(defln + 1) + 1;
s2 = defln->line;
#define MAJOR 1 // Major version number
#define MINOR 3 // Minor version number
-#define PATCH 7 // Patch release number
+#define PATCH 8 // Patch release number
#endif // __VERSION_H__