Skip to content

Commit 8f71582

Browse files
authored
Update 2-Virtual-Machine.md
1 parent 06ca051 commit 8f71582

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tutorial/en/2-Virtual-Machine.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ Let's implement it in the `eval` function:
223223
void eval() {
224224
int op, *tmp;
225225
while (1) {
226+
op = *pc++; // get next operation code
226227
if (op == IMM) {ax = *pc++;} // load immediate value to ax
227228
else if (op == LC) {ax = *(char *)ax;} // load character to ax, address in ax
228229
else if (op == LI) {ax = *(int *)ax;} // load integer to ax, address in ax

0 commit comments

Comments
 (0)