version 1.22, 2010/07/13 13:01:21
|
version 1.35, 2011/01/03 12:08:02
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.0.17 |
RPL/2 (R) version 4.0.20 |
Copyright (C) 1989-2010 Dr. BERTRAND Joël |
Copyright (C) 1989-2011 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
|
|
Line 20
|
Line 20
|
*/ |
*/ |
|
|
|
|
#include "rpl.conv.h" |
#include "rpl-conv.h" |
|
|
|
|
/* |
/* |
Line 459 initialisation_instructions(struct_proce
|
Line 459 initialisation_instructions(struct_proce
|
INSTRUCTION("INCR", instruction_incr); |
INSTRUCTION("INCR", instruction_incr); |
//INSTRUCTION("ISOL"); |
//INSTRUCTION("ISOL"); |
INSTRUCTION("ISWI", instruction_iswi); |
INSTRUCTION("ISWI", instruction_iswi); |
|
# ifndef OS2 |
INSTRUCTION("KILL", instruction_kill); |
INSTRUCTION("KILL", instruction_kill); |
|
# endif |
INSTRUCTION("KIND", instruction_kind); |
INSTRUCTION("KIND", instruction_kind); |
INSTRUCTION("LAST", instruction_last); |
INSTRUCTION("LAST", instruction_last); |
INSTRUCTION("LEGV", instruction_legv); |
INSTRUCTION("LEGV", instruction_legv); |
Line 486 initialisation_instructions(struct_proce
|
Line 488 initialisation_instructions(struct_proce
|
INSTRUCTION("PLOT", instruction_plot); |
INSTRUCTION("PLOT", instruction_plot); |
INSTRUCTION("PMAX", instruction_pmax); |
INSTRUCTION("PMAX", instruction_pmax); |
INSTRUCTION("PMIN", instruction_pmin); |
INSTRUCTION("PMIN", instruction_pmin); |
|
# ifndef OS2 |
INSTRUCTION("POKE", instruction_poke); |
INSTRUCTION("POKE", instruction_poke); |
|
# endif |
INSTRUCTION("PPAR", instruction_ppar); |
INSTRUCTION("PPAR", instruction_ppar); |
INSTRUCTION("PRMD", instruction_prmd); |
INSTRUCTION("PRMD", instruction_prmd); |
INSTRUCTION("PRST", instruction_prst); |
INSTRUCTION("PRST", instruction_prst); |
Line 552 initialisation_instructions(struct_proce
|
Line 556 initialisation_instructions(struct_proce
|
INSTRUCTION("STO-", instruction_sto_moins); |
INSTRUCTION("STO-", instruction_sto_moins); |
INSTRUCTION("STO/", instruction_sto_division); |
INSTRUCTION("STO/", instruction_sto_division); |
INSTRUCTION("STOF", instruction_stof); |
INSTRUCTION("STOF", instruction_stof); |
|
# ifndef OS2 |
INSTRUCTION("STOP", instruction_stop); |
INSTRUCTION("STOP", instruction_stop); |
|
# endif |
INSTRUCTION("STOS", instruction_stos); |
INSTRUCTION("STOS", instruction_stos); |
INSTRUCTION("STWS", instruction_stws); |
INSTRUCTION("STWS", instruction_stws); |
INSTRUCTION("SWAP", instruction_swap); |
INSTRUCTION("SWAP", instruction_swap); |
Line 685 initialisation_instructions(struct_proce
|
Line 691 initialisation_instructions(struct_proce
|
INSTRUCTION("SLICE", instruction_slice); |
INSTRUCTION("SLICE", instruction_slice); |
//INSTRUCTION("SLIST") |
//INSTRUCTION("SLIST") |
//Instruction HP48 (somme des termes d'une liste) |
//Instruction HP48 (somme des termes d'une liste) |
|
# ifndef OS2 |
INSTRUCTION("SPAWN", instruction_spawn); |
INSTRUCTION("SPAWN", instruction_spawn); |
|
# endif |
INSTRUCTION("START", instruction_start); |
INSTRUCTION("START", instruction_start); |
INSTRUCTION("STORE", instruction_store); |
INSTRUCTION("STORE", instruction_store); |
INSTRUCTION("STR->", instruction_str_fleche); |
INSTRUCTION("STR->", instruction_str_fleche); |
Line 715 initialisation_instructions(struct_proce
|
Line 723 initialisation_instructions(struct_proce
|
INSTRUCTION("APPEND", instruction_append); |
INSTRUCTION("APPEND", instruction_append); |
INSTRUCTION("ARRY->", instruction_array_fleche); |
INSTRUCTION("ARRY->", instruction_array_fleche); |
INSTRUCTION("ATEXIT", instruction_atexit); |
INSTRUCTION("ATEXIT", instruction_atexit); |
|
INSTRUCTION("ATPOKE", instruction_atpoke); |
INSTRUCTION("BESSEL", instruction_bessel); |
INSTRUCTION("BESSEL", instruction_bessel); |
INSTRUCTION("CLRERR", instruction_clrerr); |
INSTRUCTION("CLRERR", instruction_clrerr); |
INSTRUCTION("CLRMTX", instruction_clrmtx); |
INSTRUCTION("CLRMTX", instruction_clrmtx); |
INSTRUCTION("CLRSWI", instruction_clrswi); |
INSTRUCTION("CLRSWI", instruction_clrswi); |
INSTRUCTION("CREATE", instruction_create); |
INSTRUCTION("CREATE", instruction_create); |
INSTRUCTION("DELETE", instruction_delete); |
INSTRUCTION("DELETE", instruction_delete); |
|
# ifndef OS2 |
INSTRUCTION("DETACH", instruction_detach); |
INSTRUCTION("DETACH", instruction_detach); |
|
# endif |
INSTRUCTION("DIAG->", instruction_diag_fleche); |
INSTRUCTION("DIAG->", instruction_diag_fleche); |
//INSTRUCTION("DOLIST") |
//INSTRUCTION("DOLIST") |
//Instruction HP48 (application d'une fonction à une liste) |
//Instruction HP48 (application d'une fonction à une liste) |
Line 815 initialisation_instructions(struct_proce
|
Line 826 initialisation_instructions(struct_proce
|
|
|
INSTRUCTION("CLRCNTXT", instruction_clrcntxt); |
INSTRUCTION("CLRCNTXT", instruction_clrcntxt); |
INSTRUCTION("CLRSMPHR", instruction_clrsmphr); |
INSTRUCTION("CLRSMPHR", instruction_clrsmphr); |
|
# ifndef OS2 |
INSTRUCTION("CONTINUE", instruction_continue); |
INSTRUCTION("CONTINUE", instruction_continue); |
|
# endif |
INSTRUCTION("DUPCNTXT", instruction_dupcntxt); |
INSTRUCTION("DUPCNTXT", instruction_dupcntxt); |
INSTRUCTION("FUNCTION", instruction_function); |
INSTRUCTION("FUNCTION", instruction_function); |
INSTRUCTION("IMPLICIT", instruction_implicit); |
INSTRUCTION("IMPLICIT", instruction_implicit); |
Line 836 initialisation_instructions(struct_proce
|
Line 849 initialisation_instructions(struct_proce
|
INSTRUCTION("BACKSPACE", instruction_backspace); |
INSTRUCTION("BACKSPACE", instruction_backspace); |
INSTRUCTION("BACKTRACE", instruction_backtrace); |
INSTRUCTION("BACKTRACE", instruction_backtrace); |
INSTRUCTION("CLRATEXIT", instruction_clratexit); |
INSTRUCTION("CLRATEXIT", instruction_clratexit); |
|
INSTRUCTION("CLRATPOKE", instruction_clratpoke); |
INSTRUCTION("COPYRIGHT", instruction_copyright); |
INSTRUCTION("COPYRIGHT", instruction_copyright); |
//INSTRUCTION("CYLINDRIC"); |
//INSTRUCTION("CYLINDRIC"); |
INSTRUCTION("DAEMONIZE", instruction_daemonize); |
INSTRUCTION("DAEMONIZE", instruction_daemonize); |
Line 882 initialisation_instructions(struct_proce
|
Line 896 initialisation_instructions(struct_proce
|
} |
} |
|
|
|
|
extern inline void * |
void * |
analyse_instruction(struct_processus *s_etat_processus, unsigned char *ptr) |
analyse_instruction(struct_processus *s_etat_processus, unsigned char *ptr) |
{ |
{ |
int pointeur; |
int pointeur; |
Line 955 analyse(struct_processus *s_etat_process
|
Line 969 analyse(struct_processus *s_etat_process
|
|
|
void (*instruction)(); |
void (*instruction)(); |
|
|
|
# ifdef DMALLOC |
|
BUG(dmalloc_verify(NULL) == DMALLOC_VERIFY_ERROR, |
|
printf("HEAP CORRUPTION!")); |
|
# endif |
|
|
errno = 0; |
errno = 0; |
(*s_etat_processus).var_volatile_exception_gsl = 0; |
(*s_etat_processus).var_volatile_exception_gsl = 0; |
|
|
Line 1142 analyse(struct_processus *s_etat_process
|
Line 1161 analyse(struct_processus *s_etat_process
|
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
*/ |
*/ |
|
|
|
# ifndef OS2 |
if ((*s_etat_processus).pourcentage_maximal_cpu < 100) |
if ((*s_etat_processus).pourcentage_maximal_cpu < 100) |
{ |
{ |
getrusage(RUSAGE_SELF, &usage_final); |
getrusage(RUSAGE_SELF, &usage_final); |
Line 1197 analyse(struct_processus *s_etat_process
|
Line 1217 analyse(struct_processus *s_etat_process
|
usage_initial = usage_final; |
usage_initial = usage_final; |
} |
} |
} |
} |
|
# endif |
|
|
/* |
/* |
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |