kmm32:remove step

rationale:i was thinking about adding some instructions to
disable/enable interrupt vectors but, it's not really
necessary to have peripherals running in parallel with the
instructions on the CPU, and it simplifies code a lot by
assuming they are not
This commit is contained in:
Kitty-Cricket Piapiac 2023-03-30 21:15:16 -07:00
parent 0364947fcd
commit bbe792d7ae
3 changed files with 3 additions and 4 deletions

3
kip.c
View File

@ -1,7 +1,6 @@
#include<stdio.h>
#include<stdlib.h>
#include"kip.h"
#define STEP 0x1000
IoDevice*ios;
I main(I ac,IM C*av[]){B*b;W l;FILE*f;
@ -14,7 +13,7 @@ I main(I ac,IM C*av[]){B*b;W l;FILE*f;
#undef X
WIF(f,av[1],"rb",fseek(f,0,SEEK_END),l=ftell(f),fseek(f,0,SEEK_SET),b=mk(l+1),fread(b,1,l,f))
b[l]=0,lod(b,l),front_init();
WH(1,front_events(),emu(STEP),front_redraw())
WH(1,front_events(),emu(),front_redraw())
kip_deinit();}
V kip_deinit(V){disk_close(),front_deinit();}

View File

@ -64,5 +64,5 @@ _ V(*ops[])(V)=
/*0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35*/
{np,ex,pb,ph,pw,fb,fh,fw,mb,mh,mw,io,ii,ss,dr,sw,du,ov,ad,su,mu,di,an,or,xr,sl,sr,sa,eq,lt,gt,no,ju,jc,ca,cc};
V emu(W c){B m,f;while(c--&&ip<0x40000){Q((f=(m=mem[ip++])>>6)&1,swp());ops[0x3f&m]();Q(f&1,swp());}}
V emu(V){B m,f;while(ip<0x40000){Q((f=(m=mem[ip++])>>6)&1,swp());ops[0x3f&m]();Q(f&1,swp());}}
V lod(B*c,W l){for(ip=0;ip<l;++ip)mem[ip+0x100]=c[ip];ip=0x100;}

View File

@ -23,6 +23,6 @@ W low(W);
V stb(W,B);
V sth(W,H);
V stw(W,W);
V emu(W);
V emu(V);
V vec(W);
V lod(B*c,W l);