File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1206,7 +1206,7 @@ int eval() {
1206
1206
else if (op == PUSH ) {* -- sp = ax ;} // push the value of ax onto the stack
1207
1207
else if (op == JMP ) {pc = (int * )* pc ;} // jump to the address
1208
1208
else if (op == JZ ) {pc = ax ? pc + 1 : (int * )* pc ;} // jump if ax is zero
1209
- else if (op == JNZ ) {pc = ax ? (int * )* pc : pc + 1 ;} // jump if ax is zero
1209
+ else if (op == JNZ ) {pc = ax ? (int * )* pc : pc + 1 ;} // jump if ax is not zero
1210
1210
else if (op == CALL ) {* -- sp = (int )(pc + 1 ); pc = (int * )* pc ;} // call subroutine
1211
1211
//else if (op == RET) {pc = (int *)*sp++;} // return from subroutine;
1212
1212
else if (op == ENT ) {* -- sp = (int )bp ; bp = sp ; sp = sp - * pc ++ ;} // make new stack frame
Original file line number Diff line number Diff line change @@ -1236,7 +1236,7 @@ int eval() {
1236
1236
else if (op == PUSH ) {* -- sp = ax ;} // push the value of ax onto the stack
1237
1237
else if (op == JMP ) {pc = (int * )* pc ;} // jump to the address
1238
1238
else if (op == JZ ) {pc = ax ? pc + 1 : (int * )* pc ;} // jump if ax is zero
1239
- else if (op == JNZ ) {pc = ax ? (int * )* pc : pc + 1 ;} // jump if ax is zero
1239
+ else if (op == JNZ ) {pc = ax ? (int * )* pc : pc + 1 ;} // jump if ax is not zero
1240
1240
else if (op == CALL ) {* -- sp = (int )(pc + 1 ); pc = (int * )* pc ;} // call subroutine
1241
1241
//else if (op == RET) {pc = (int *)*sp++;} // return from subroutine;
1242
1242
else if (op == ENT ) {* -- sp = (int )bp ; bp = sp ; sp = sp - * pc ++ ;} // make new stack frame
You can’t perform that action at this time.
0 commit comments