*** empty log message ***
authorkaashoek <none@none>
Thu, 26 Nov 1987 12:14:32 +0000 (12:14 +0000)
committerkaashoek <none@none>
Thu, 26 Nov 1987 12:14:32 +0000 (12:14 +0000)
util/ceg/assemble/as_assemble/assemble.c
util/ceg/assemble/as_assemble/block_as.c

index 1a7500f..de40e13 100644 (file)
@@ -3,9 +3,18 @@
 #include "em_decl.h"
 #include "as.h"
 
+/* This file contains the assemble routine that generates assembly code.
+ * As 'str' is in assembly format this is a easy job. Only operands 
+ * with "$n" in it need some special treatment. 
+ * Note : a '$' is qouted by prefixing it with a '$'.
+ */
 
 assemble( str)
 char *str;
+
+/* Output assembly instruction. Substitute for '$n' the name of the
+ * the n-th argument of the current EM-instruction.
+ */
 {
        char buf[512] , *b_ptr, *arg_format();
        int nr;
@@ -20,7 +29,7 @@ char *str;
                                        *b_ptr++ = '$';
                                        str = str + 2;
                                }
-                               else {
+                               else {  
                                        nr = atoi( str+1) - 1;
                                        *b_ptr = '\0';
                                        out( "%s%s\", %s);", buf,
index 2b93b4d..ea625ff 100644 (file)
@@ -1,4 +1,10 @@
 block_assemble( instructions, nr, first, last)
+
+/* Assemble a block of assembly instructions. If the table writer wants to
+ * combine assembly instructions he must rewrite this routine to fulfill his
+ * own needs.
+ */
+
 char **instructions;
 int nr, first, last;
 {