1
0
mirror of https://gitlab.os-k.eu/os-k-team/kvisc.git synced 2023-08-25 14:05:46 +02:00
This commit is contained in:
julianb0 2019-06-28 19:18:53 +02:00
parent 267989466a
commit 6b3ac53eb4
No known key found for this signature in database
GPG Key ID: DDF8325C95299A62
3 changed files with 15 additions and 8 deletions

3
.gitignore vendored
View File

@ -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

View File

@ -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
;

View File

@ -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: