5 /* This file contains the assemble routine that generates assembly code.
6 * As 'str' is in assembly format this is a easy job. Only operands
7 * with "$n" in it need some special treatment.
8 * Note : a '$' is qouted by prefixing it with a '$'.
14 /* Output assembly instruction. Substitute for '$n' the name of the
15 * the n-th argument of the current EM-instruction.
18 char buf[512] , *b_ptr, *arg_format();
23 out( "fprint( codefile,\"");
27 case '$' : if ( *(str+1) == '$') {
32 nr = atoi( str+1) - 1;
34 out( "%s%s\", %s%s);", buf,
36 C_instr_info->arg_type[nr] == ARITH ? "(long)" : "",
37 C_instr_info->arg_conv[nr]);
38 out( "fprint( codefile,\"");
43 case '%': *b_ptr++ = *str;
45 default : *b_ptr++ = *str++;
50 out( "%s\\n\");\n", buf);
57 switch ( C_instr_info->arg_type[nr]) {
58 case ARITH : return( "%ld");
59 case STRING: return( "%s");
60 case INT : return( "%d");