diff --git a/ediv/CHANGE_LOG.txt b/ediv/CHANGE_LOG.txt index a3449c6..b777301 100644 --- a/ediv/CHANGE_LOG.txt +++ b/ediv/CHANGE_LOG.txt @@ -1,3 +1,11 @@ +12/12/2002 +---------- + * Corregido fallo en la math.c... el seno de 90º no es infinito, sino 1 ¬¬ + suspenso en mates para el k lo hizo... (Er_Makina) + * Incluido ejemplo torus.prg, probadlo, es precioso =) (ojo, si no se usa + el math.dll con el fallo del seno corregido, en vez de un toroide sale + una especie de comecocos) (Er_Makina) + 2/12/2002 --------- * He añadido en la web una sección desde donde se puede ver este changelog. diff --git a/ediv/src/dlls/dlls.suo b/ediv/src/dlls/dlls.suo index 9c20399..aa530d5 100644 Binary files a/ediv/src/dlls/dlls.suo and b/ediv/src/dlls/dlls.suo differ diff --git a/ediv/src/dlls/math/math.c b/ediv/src/dlls/math/math.c index 8ddb1e0..c8a0226 100644 --- a/ediv/src/dlls/math/math.c +++ b/ediv/src/dlls/math/math.c @@ -41,6 +41,7 @@ int seno[90001] ; int ExportaFuncs(EXPORTAFUNCS_PARAMS) { + CONST("pi",180000); FUNCTION("abs",1,eDiv_Abs); FUNCTION("pow",2,eDiv_Pow); @@ -380,7 +381,8 @@ void first_load() { seno[i] = ftomil( sin( (i / 1000)*PIOVER180 ) ); } - seno[90000] = 0x7FFFFFFF ; + //seno[90000] = 0x7FFFFFFF ; + seno[90000]=1000; srand(time(NULL)); } diff --git a/ediv/src/shared/shared.h b/ediv/src/shared/shared.h index e073774..abe8568 100644 --- a/ediv/src/shared/shared.h +++ b/ediv/src/shared/shared.h @@ -25,7 +25,7 @@ #ifndef __SHARED_H #define __SHARED_H -#define VERSION "0.1 (Orion)" +#define VERSION "0.1.1 (Orion)" #define la_clave "Open_eDiv" #define uchar char diff --git a/ediv/src/stub/inte.c b/ediv/src/stub/inte.c index ab30da5..5ca74f6 100644 --- a/ediv/src/stub/inte.c +++ b/ediv/src/stub/inte.c @@ -183,6 +183,7 @@ int proceso( int num, int padre ) int actual_lin; #endif int _status=reservedptr("status"); + int _param_offset; num_proc = num ; imem = procs_s[num_proc].imem ; @@ -281,7 +282,7 @@ int proceso( int num, int padre ) case lcid://21 pila[++sp] = procs_s[num_proc].id ; break ; - case lrng://22 + case lrng://22 POR HACER (debug) imem++; break ; case ljmp://23 @@ -479,7 +480,7 @@ int proceso( int num, int padre ) #endif break ; - // OPCODES OPTIMIZADOS + /* OPCODES OPTIMIZADOS */ case lcar2://60 pila[++sp]=mem[imem++]; @@ -545,7 +546,107 @@ int proceso( int num, int padre ) case lcardiv://77 no hay nunca "cardiv 0" pila[sp]/=mem[imem++]; break; + + /* OPERACIONES CON DATOS DE TIPO BYTE */ + + case lptrchr: + pila[sp-1]=(unsigned int)memb[pila[sp-1]*4+pila[sp]]; + sp--; + break; + case lasichr: + pila[sp-2]=(unsigned int)(memb[pila[sp-2]*4+pila[sp-1]]=(byte)pila[sp]); + sp-=2; + break; + case liptchr: + pila[sp-1]=(unsigned int)++memb[pila[sp-1]*4+pila[sp]]; + sp--; + break; + case lptichr: + pila[sp-1]=(unsigned int)memb[pila[sp-1]*4+pila[sp]]++; + sp--; + break; + case ldptchr: + pila[sp-1]=(unsigned int)--memb[pila[sp-1]*4+pila[sp]]; + sp--; + break; + case lptdchr: + pila[sp-1]=(unsigned int)memb[pila[sp-1]*4+pila[sp]]--; + sp--; + break; + case ladachr: + pila[sp-2]=(unsigned int)(memb[pila[sp-2]*4+pila[sp-1]]+=(byte)pila[sp]); + sp-=2; + break; + case lsuachr: + pila[sp-2]=(unsigned int)(memb[pila[sp-2]*4+pila[sp-1]]-=(byte)pila[sp]); + sp-=2; + break; + case lmuachr: + pila[sp-2]=(unsigned int)(memb[pila[sp-2]*4+pila[sp-1]]*=(byte)pila[sp]); + sp-=2; + break; + case ldiachr: + /*#ifdef DBG + if (pila[sp]==0) { + memb[pila[sp-2]*4+pila[sp-1]]=0; + sp-=2; pila[sp]=0; + v_function=-2; e(145); + if (call_to_debug) { process_stoped=id; return; } + break; + } + #endif*/ + pila[sp-2]=(unsigned int)(memb[pila[sp-2]*4+pila[sp-1]]/=(byte)pila[sp]); + sp-=2; + break; + case lmoachr: + /*#ifdef DBG + if (pila[sp]==0) { + memb[pila[sp-2]*4+pila[sp-1]]=0; + sp-=2; pila[sp]=0; + v_function=-2; e(145); + if (call_to_debug) { process_stoped=id; return; } + break; + } + #endif*/ + pila[sp-2]=(unsigned int)(memb[pila[sp-2]*4+pila[sp-1]]%=(byte)pila[sp]); + sp-=2; + break; + case lanachr: + pila[sp-2]=(unsigned int)(memb[pila[sp-2]*4+pila[sp-1]]&=(byte)pila[sp]); + sp-=2; + break; + case lorachr: + pila[sp-2]=(unsigned int)(memb[pila[sp-2]*4+pila[sp-1]]|=(byte)pila[sp]); + sp-=2; + break; + case lxoachr: + pila[sp-2]=(unsigned int)(memb[pila[sp-2]*4+pila[sp-1]]^=(byte)pila[sp]); + sp-=2; + break; + case lsrachr: + pila[sp-2]=(unsigned int)(memb[pila[sp-2]*4+pila[sp-1]]>>=(byte)pila[sp]); + sp-=2; + break; + case lslachr: + pila[sp-2]=(unsigned int)(memb[pila[sp-2]*4+pila[sp-1]]<<=(byte)pila[sp]); + sp-=2; + break; + case lcpachr: + _param_offset=reservedptr("param_offset"); + if ((unsigned int)pila[mem[procs_s[num_proc].id+_param_offset]]<256) { + memb[pila[sp-1]*4+pila[sp]]=(byte)pila[mem[procs_s[num_proc].id+_param_offset]]; + } + else { + if (pila[mem[procs_s[num_proc].id+_param_offset]]inicio<=ip && last->fin>=ip) { - printf("(%d) last_lin\n",ip); + //printf("(%d) last_lin\n",ip); return last_lin; } diff --git a/ediv/src/stub/stub.c b/ediv/src/stub/stub.c index 108f9fb..61ff410 100644 --- a/ediv/src/stub/stub.c +++ b/ediv/src/stub/stub.c @@ -340,13 +340,12 @@ int main(int argc, char* argv[]) stub_quit(0); if(teclas[SDLK_p] && (teclas[SDLK_RALT] || teclas[SDLK_LALT])) { - strcpy(capturef,fp.nombre_program); - strcat(capturef,".bmp"); - SDL_SaveBMP(fp.screen,capturef); - + strcpy(capturef,fp.nombre_program); + strcat(capturef,".bmp"); + SDL_SaveBMP(fp.screen,capturef); } - interprete(); + interprete(); #ifdef _DEBUG if(sp!=0) printf("PANIC! Quedan restos en la pila!! (sp=%d)\n",sp); diff --git a/ediv/src/visual c/ediv_ws.suo b/ediv/src/visual c/ediv_ws.suo index 45fda0f..8c266cc 100644 Binary files a/ediv/src/visual c/ediv_ws.suo and b/ediv/src/visual c/ediv_ws.suo differ