aboutsummaryrefslogtreecommitdiffstats
path: root/creole.c
diff options
context:
space:
mode:
authorGravatar Peter McGoron 2023-04-02 21:37:28 +0000
committerGravatar Peter McGoron 2023-04-02 21:37:28 +0000
commit13c67aba9a3ed72326cfa308b7c3e77e3e9934ed (patch)
tree05644e83ee05ce9128995e429ad5a32a37381b40 /creole.c
parentadd waveform disarm (diff)
add more commands
Diffstat (limited to 'creole.c')
-rw-r--r--creole.c46
1 files changed, 44 insertions, 2 deletions
diff --git a/creole.c b/creole.c
index d5994cb..000fa0d 100644
--- a/creole.c
+++ b/creole.c
@@ -65,7 +65,15 @@ static const struct {
defop(WF_EXEC, 3, TYPE_VAL, TYPE_VAL, TYPE_VAL),
defop(SENDVAL, 1, TYPE_VAL, TYPE_NONE, TYPE_NONE),
defop(SENDDAT, 1, TYPE_IMM, TYPE_NONE, TYPE_NONE),
- defop(WF_DISARM, 1, TYPE_VAL, TYPE_NONE, TYPE_NONE)
+ defop(WF_DISARM, 1, TYPE_VAL, TYPE_NONE, TYPE_NONE),
+ defop(TAKE_ADC, 2, TYPE_VAL, TYPE_VAL, TYPE_NONE),
+ defop(RELEASE_ADC, 1, TYPE_VAL, TYPE_NONE, TYPE_NONE),
+ defop(TAKE_DAC, 2, TYPE_VAL, TYPE_VAL, TYPE_NONE),
+ defop(RELEASE_DAC, 1, TYPE_VAL, TYPE_NONE, TYPE_NONE),
+ defop(TAKE_WF, 2, TYPE_VAL, TYPE_VAL, TYPE_NONE),
+ defop(RELEASE_WF, 1, TYPE_VAL, TYPE_NONE, TYPE_NONE),
+ defop(TAKE_CLOOP, 1, TYPE_VAL, TYPE_NONE, TYPE_NONE),
+ defop(RELEASE_CLOOP, 0, TYPE_NONE, TYPE_NONE, TYPE_NONE)
};
/*************************************************************************
@@ -687,7 +695,7 @@ enum creole_run_ret creole_step(struct creole_env *env, creole_word *sc)
break;
case CREOLE_WF_DISARM:
check(read_val(env, &ins, 0, &a0));
- upsilon_arm_waveform(a0);
+ upsilon_disarm_waveform(a0);
break;
case CREOLE_SENDVAL:
check(read_val(env, &ins, 0, &a0));
@@ -697,6 +705,40 @@ enum creole_run_ret creole_step(struct creole_env *env, creole_word *sc)
check(read_val(env, &ins, 0, &a0));
upsilon_senddat(env, a0);
break;
+ case CREOLE_TAKE_ADC:
+ check(read_val(env, &ins, 0, &a0));
+ check(read_val(env, &ins, 0, &a1));
+ upsilon_take_adc(a0, a1);
+ break;
+ case CREOLE_RELEASE_ADC:
+ check(read_val(env, &ins, 0, &a0));
+ upsilon_release_adc(a0);
+ break;
+ case CREOLE_TAKE_DAC:
+ check(read_val(env, &ins, 0, &a0));
+ check(read_val(env, &ins, 0, &a1));
+ upsilon_take_dac(a0, a1);
+ break;
+ case CREOLE_RELEASE_DAC:
+ check(read_val(env, &ins, 0, &a0));
+ upsilon_release_dac(a0);
+ break;
+ case CREOLE_TAKE_WF:
+ check(read_val(env, &ins, 0, &a0));
+ check(read_val(env, &ins, 0, &a1));
+ upsilon_take_wf(a0, a1);
+ break;
+ case CREOLE_RELEASE_WF:
+ check(read_val(env, &ins, 0, &a0));
+ upsilon_release_wf(a0);
+ break;
+ case CREOLE_TAKE_CLOOP:
+ check(read_val(env, &ins, 0, &a0));
+ upsilon_take_cloop(a0);
+ break;
+ case CREOLE_RELEASE_CLOOP:
+ upsilon_release_cloop();
+ break;
default:
rcode = CREOLE_STEP_UNKNOWN_OPCODE;
}