+ if (state != ASM_FUNCTION) {
+ printf("%li: Statement not inside function block\n", line);
+ goto end;
+ }
+
+ /* update parser state */
+ if (i == INSTR_DONE || i == INSTR_RETURN) {
+ goto end;
+ state = ASM_NULL;
+ }
+
+ /* parse the statement */
+ o = asm_instr[i].o; /* operands */
+ skip += asm_instr[i].l; /* skip instruction */
+ t = strtok(skip, " ,");
+ i = 0;
+ while (t != NULL && i < 3) {
+ strcpy(op[i], t);
+ t = strtok(NULL, " ,");
+ i ++;
+ }
+
+ util_debug("ASM", "Operand 1: %s\n", util_strrnl(op[0]));
+ util_debug("ASM", "Operand 2: %s\n", util_strrnl(op[1]));
+ util_debug("ASM", "Operand 3: %s\n", util_strrnl(op[2]));
+
+ /* check */
+ if (i != o) {
+ printf("not enough operands, expected: %li, got %li\n", o, i);
+ }
+
+ /* TODO: hashtable value LOAD .... etc */
+ code_statements_add((prog_section_statement){
+ i, {0}, {0}, {0}
+ });