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 *.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

View File

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

View File

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