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
|
*.exe
|
||||||
*.out
|
*.out
|
||||||
|
*.com
|
||||||
*.sym
|
*.sym
|
||||||
*.bin
|
*.bin
|
||||||
*.o
|
*.o
|
||||||
@ -11,4 +12,4 @@ instrs.lst
|
|||||||
stdout.txt
|
stdout.txt
|
||||||
stderr.txt
|
stderr.txt
|
||||||
stdin.txt
|
stdin.txt
|
||||||
a.sym
|
*.sym
|
||||||
|
@ -26,14 +26,13 @@ print:
|
|||||||
mov rcx, STRLEN_MAX
|
mov rcx, STRLEN_MAX
|
||||||
|
|
||||||
.1:
|
.1:
|
||||||
test b[ax0], b[ax0]
|
cmp b[ax0], 0
|
||||||
j.z .2
|
ret.z
|
||||||
|
|
||||||
prn b[ax0]
|
prn b[ax0]
|
||||||
inc ax0
|
inc ax0
|
||||||
loop .1
|
loop .1
|
||||||
|
|
||||||
.2:
|
|
||||||
ret
|
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
|
rx2++; // since last frame change
|
||||||
rx1++; // since startup
|
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,
|
// For REPs we evaluate the condition AFTER running the instruction,
|
||||||
// in a do ... while(cond) fashion
|
// in a do ... while(cond) fashion
|
||||||
//
|
//
|
||||||
if (!rep && !eval_cond(ctx, cond))
|
if (!rep && !eval_cond(ctx, cond))
|
||||||
|
{
|
||||||
|
#ifndef NDEBUG
|
||||||
|
// Say something about ignored instruction?
|
||||||
|
//trace("0x%lX:\n", rpc);
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
|
dump_instr(ctx, in, p1, p2, lock, rep, cond);
|
||||||
|
#endif
|
||||||
|
|
||||||
do_rep:
|
do_rep:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user