fix beq
This commit is contained in:
parent
213296bb1c
commit
39dde2e0c5
|
@ -67,7 +67,7 @@ void l_store_i(struct toyboxica *t);
|
|||
void load_i(struct toyboxica *t);
|
||||
void store_i(struct toyboxica *t);
|
||||
void bgt_i(struct toyboxica *t);
|
||||
void bet_i(struct toyboxica *t);
|
||||
void beq_i(struct toyboxica *t);
|
||||
void brn_i(struct toyboxica *t);
|
||||
void call_i(struct toyboxica *t);
|
||||
void ret_i(struct toyboxica *t);
|
||||
|
|
|
@ -79,9 +79,9 @@ bgt_i(struct toyboxica *t) {
|
|||
}
|
||||
|
||||
void
|
||||
bet_i(struct toyboxica *t) {
|
||||
beq_i(struct toyboxica *t) {
|
||||
t->pc++;
|
||||
if (peek_t() = peek_s()) t->pc = read_l(t->pc);
|
||||
if (peek_t() == peek_s()) t->pc = read_l(t->pc);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -163,7 +163,7 @@ eval(struct toyboxica *t, u8 op) {
|
|||
bgt_i(t);
|
||||
break;
|
||||
case t_beq:
|
||||
bet_i(t);
|
||||
beq_i(t);
|
||||
break;
|
||||
case t_brn:
|
||||
brn_i(t);
|
||||
|
|
Loading…
Reference in New Issue