mirror of
https://gitlab.os-k.eu/os-k-team/kvisc.git
synced 2023-08-25 14:05:46 +02:00
m
This commit is contained in:
parent
267989466a
commit
6b3ac53eb4
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,5 +1,6 @@
|
||||
*.exe
|
||||
*.out
|
||||
*.com
|
||||
*.sym
|
||||
*.bin
|
||||
*.o
|
||||
@ -11,4 +12,4 @@ instrs.lst
|
||||
stdout.txt
|
||||
stderr.txt
|
||||
stdin.txt
|
||||
a.sym
|
||||
*.sym
|
||||
|
@ -26,14 +26,13 @@ print:
|
||||
mov rcx, STRLEN_MAX
|
||||
|
||||
.1:
|
||||
test b[ax0], b[ax0]
|
||||
j.z .2
|
||||
cmp b[ax0], 0
|
||||
ret.z
|
||||
|
||||
prn b[ax0]
|
||||
inc ax0
|
||||
loop .1
|
||||
|
||||
.2:
|
||||
ret
|
||||
|
||||
;
|
||||
|
15
vm/pc/exec.c
15
vm/pc/exec.c
@ -62,16 +62,23 @@ void exec_instr(ctx_t *ctx,
|
||||
rx2++; // since last frame change
|
||||
rx1++; // since startup
|
||||
|
||||
#ifndef NDEBUG
|
||||
dump_instr(ctx, in, p1, p2, lock, rep, cond);
|
||||
#endif
|
||||
|
||||
//
|
||||
// For REPs we evaluate the condition AFTER running the instruction,
|
||||
// in a do ... while(cond) fashion
|
||||
//
|
||||
if (!rep && !eval_cond(ctx, cond))
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
// Say something about ignored instruction?
|
||||
//trace("0x%lX:\n", rpc);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
dump_instr(ctx, in, p1, p2, lock, rep, cond);
|
||||
#endif
|
||||
|
||||
do_rep:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user