X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=direct.c;h=175027292045ab67193e1b6c75a51ecc48523f6e;hp=750d5873444f38f9a542566c838230d9fb79ddbe;hb=c7c27ef02a3d5c7d17e5728910961a4a1eeacfe3;hpb=71cec8e7896b200c6ae63ebc428339bef147240a diff --git a/direct.c b/direct.c index 750d587..1750272 100644 --- a/direct.c +++ b/direct.c @@ -77,8 +77,8 @@ int (*dirtab[])() = { d_title, // 44 title d_subttl, // 45 subttl eject, // 46 eject - d_unimpl, // 47 error - d_unimpl, // 48 warn + d_error, // 47 error + d_warn, // 48 warn d_noclear, // 49 .noclear d_equrundef, // 50 .equrundef/.regundef d_ccundef, // 51 .ccundef @@ -91,6 +91,48 @@ int (*dirtab[])() = { }; +// +// .error - Abort compilation, printing an error message +// +int d_error(char *str) +{ + if (*tok == EOL) + return error("error directive encountered - aborting assembling"); + else + { + switch(*tok) + { + case STRING: + return error(string[tok[1]]); + break; + default: + return error("error directive encountered - aborting assembling"); + } + } +} + + +// +// .warn - Just display a warning on screen +// +int d_warn(char *str) +{ + if (*tok == EOL) + return warn("WARNING WARNING WARNING"); + else + { + switch(*tok) + { + case STRING: + return warn(string[tok[1]]); + break; + default: + return warn("WARNING WARNING WARNING"); + } + } +} + + // // .org - Set origin // @@ -772,7 +814,7 @@ int d_bss(void) // int d_ds(WORD siz) { -if (verb_flag) +if (debug) printf("Directive: .ds.[size] = %u, sloc = $%X\n", siz, sloc); VALUE eval;