+ else if (*tok >= KW_D0 && *tok <= KW_A7)
+ {
+ if (reglist(&rlist) < 0)
+ return 0;
+
+// for(i=0; i++<16; rlist>>=1)
+ for(i=0; i<16; i++, rlist>>=1)
+ {
+ if (rlist & 1)
+ eval += 4;
+ }
+ }
+ else
+ {
+ switch ((int)*tok)
+ {
+ case KW_USP:
+ case KW_SSP:
+ case KW_PC:
+ eval += 2;
+ // FALLTHROUGH
+ case KW_SR:
+ case KW_CCR:
+ eval += 2;
+ tok++;
+ break;
+ case EOL:
+ return 0;
+ default:
+ return error(".cargs syntax");
+ }
+ }
+
+ // Eat commas in between each argument, if they exist
+ if (*tok == ',')
+ tok++;
+ }
+}
+
+
+//
+// .cstruct [#offset], symbol[.size], ...
+//
+// Lists of registers may also be mentioned; they just take up space. Good for
+// "documentation" purposes:
+//
+// .cstruct a6, .arg1, .arg2, .arg3...
+//
+// Symbols thus created are ABS and EQUATED. Note that this is for
+// compatibility with VBCC and the Remover's library. Thanks to GroovyBee for
+// the suggestion.
+//
+int d_cstruct(void)
+{
+ VALUE eval = 0; // Default, if no offset specified, is zero
+ WORD rlist;
+ SYM * symbol;
+ char * symbolName;
+ int env;
+ int i;
+
+ if (rgpu || rdsp)
+ return error("directive forbidden in gpu/dsp mode");
+
+ if (*tok == '#')
+ {
+ tok++;
+
+ if (abs_expr(&eval) != OK)
+ return 0;
+
+ // Eat the comma, if it's there
+ if (*tok == ',')
+ tok++;
+ }
+
+ for(;;)
+ {
+ if (*tok == SYMBOL)