



Implementation history:


Release dates:
  Project begining. 2004/06/20


Version 0.01. 2004/09/19 

  First public release


Version 0.02. 2004/09/29 

  Implemented single step execution in normal mode
  Fixed problem with ISG and DSE. Internal accuracy could change their behavior
  Implemented some commands in program mode. The memory and flags windows now 
  have some buttons for interaction with each window


Version 0.03. 2004/10/05 

  Implemented some commands loaded with XEQ
  The interaction between sim41 main window and his child windows has great 
  enhancements.


Version 0.04. 2004/10/11 

  Implemented more commands: DEC OCT HR HMS HMS+ HMS-
  SIM41W was tested with my program 8QUEENS.PRG (look at sim41 for DOS), and his 
  behavior was OK
  Fixed bug with AVIEW


Version 0.05. 2004/10/18 

  Released two new skins: SIM41W2 and SIM41W3
  Fixed entry of ST+ ST- ST* and ST/ in program mode


Version 0.06. 2004/12/05 


  New: Implemented colors in child windows.
  Fixed: GTO.nnn in run mode
  New: Grids in child windows of variable size
  Fixed: flag 01234 refreshing in main window when these are changed
  from child window
  Changed bitmap of skin3


  Current colors in child windows:


  1. Program child window:

      If a row begins with:

      LBL --> Color:   gray
      GTO --> Color:   dark green
      XEQ --> Color:   yellow

      Default: White.


  2. Flags child window

      If a flag has status =1 (YES)   Color:  Dark Green
                    status =0 (NO)    Color:  White

  3. Memory child window

      If a row has alpha data.        Color:  Light red
                   numeric data =  0. Color:  White
                   numeric data <> 0. Color:  Dark Green


     The colors may be either active or inactive. Press upon the
     Color check box in each window.


  4. There are two new buttons for controlling the grid size
     in the child windows Memory, Flags and Program.

     If the grid size is greater than the height of the container
     window you could increment the size of the container
     window draging over the lower boundary of the window.


Version 0.07 2004/12/21


     Included two new child windows: 


   1. [Pr]  :  Virtual Printer. 
      The interaction with this window is through PRX,PRA,ADV,
      PRSTK, PRREG, PRREGX and  PRS.
      Implemented these commands in Programming mode.

      PRX means Print X
      PRA means Print Alpha
      ADV is Advance the print paper a line. 
      PRSTK Print stack
      PRREG Print memory
      PRREGX Print memory by X where X is bbb.eee and bbb is the
             first memory register and eee is the last register to print. 
      PRS  (PRsigma) Print statistical registers

      XEQ PRX, XEQ PRA, XEQ ADV, XEQ PRSTK, XEQ PRREG, XEQ PRREGX,
      XEQ PRS implemented too.  

      The output is directed to the Virtual Printer Window only if
      that window is open.

    2. [Lp] : Last print session.

       This button opens NOTEPAD with the last virtual print session.
       From Notepad you could print to you real Windows printer.

       A virtual print session begins when you open the window Virtual
       Printer and ends when you close it.

       CLOSE THIS WINDOW when you open the basic printer window!
        
       The last virtual printer session is saved in the PRINT41.TXT
       file in the emulator's directory.


    Also included in version 0.07 are the buttons [Search] and [Next]
    in the program child window and a edit box for entry of the
    text to search.


    You could search for any command. Example: Click with the 
    mouse upon the first program step. Enter the text RCL and
    press the button [Search] . The first instance of RCL is found.
    Pressing the button [NEXT] you will go to the following RCL.


    Another example: If you want to search for strings of Alpha 
    characters write " in the edit box and later press [SEARCH].
         

    Fixed a problem with positioning when you delete a row within the
    program child window.


    Until version 0.06 single step execution in run mode does not 
    advance if the stack child window is open. This problem was
    fixed in version 0.07


    Included tooltips shown when you put the mouse upon the buttons
    [P],[M],[S],[F],[Pr],[Lp].In order to view the messages the main
    calculator window must be the active window.


Version 0.08 2005/01/10

    Included four new child windows:

    1. [Tn]: Tones.

       All sound in SIM41 is played using .WAV files.

       The tones database is unlimited. TONE 0 to TONE 9 may be
       played directly. TONE 10 or greater must be played using
       indirect adressing.

       If a delay for a tone is set to a short value, only a part
       of the wav file could be played.

    2. [C]: Configuration.
       
       These settings are read by SIM41 at the beginning. If you
       change something, restart SIM41 for view the changes.

       All delays in SIM41 are counters from 1 to the value set
       in the delay.

    3. [Pc]: Program colors.

       The program colors database could be accessed by the user
       from this version. Each color has three components. Red,
       Green and Blue where each component is a number between
       0 and 255.
       
       Virtually all 41 commands could have a color assigned. 

       Example:
       Assign these colors to the following commands:

             Red Green Blue
       TONE  200   100  200
       RCL   100   100  100
       STO     0   255    0
       ST+     0    50  150
       1     220     0    0  (Color assigned to lines
                              that begin with 1 )
       X<     20    60   20  (Color assigned to lines
                              that begin with X< )

       Tip: Assign to the empty command a color,
            Example: 100 255 255


    4. [A]: Key assignments.
       Implemented ASN, PASN and CLKEYS.


Version 0.09 2005/01/27 

    Sim41 keyboard was linked to PC keyboard.
    Turbo mode was implemented.
    New Child Window: Trace.

  --------------------------------------
   KEYS
  --------------------------------------
  The PC Keyboard is mapped to the Sim41 keyboard as follows:
  F1 maps to SHIFT
  F2 maps to ON
  F3 maps to USER
  F4 maps to PRGM
  F5 maps to ALPHA
  F6 maps to SST
  F7 maps to R/S
  F8 maps to SPACE  
  F9 : hide/show menu keys 
  END maps to ENTER
  ENTER maps to ENTER and SPACE maps to SPACE in skin3 if the
        menu keys are hidden.
  ESC breaks a running program
  Backspace maps to BACKARROW
  You can switch TURBO mode on/off using TAB.
  /*-+ keys map to corresponding keys
  A-Z, 1-9 and . are directly mapped to corresponding keys regardless of
  shift state.
  This means in ALPHA mode, the number keys do not produce numbers.

  NOTE: If the current active window is a child window and you want
  to use these links to the PC keyboard , activate the main calculator
  window first! (left click with the mouse upon that window)

  Also, some child windows move the focus from the main window to
  those windows. In this case you must close these windows in order
  to use the links to the PC keyboard.


  In TURBO mode the delay after GTO is 1 and the delay number in the
  config file is ignored.

  In this version I worked in stability of USER mode in PRGM mode too.


  New: Trace Child Window. (Button Tr)
  This window allows to follow the behavior of a program executed.

  In this version you can inspect the values  of X,Y,Z,T and ALPHA
  after each step executed.

  In order to trace these variables you must press upon the "Active"
  checkbox in this child window.

  Also, press the button NEW before run the program.

  Look at the example TRACE1.PRG. The debug session for this program
  is loaded in the trace child window. I put the program in the
  program child window. Open both windows and review the variables.

  Try the second example: TRACE2.PRG .  Load the program, open the
  trace and the program child windows. Check out "Active" and press
  the NEW button. Be sure that you are in the first program step.
  Then go to the calculator window and press RUN.

  In this example there is a STOP within the loop. You can
  view how the TRACE child window is filled with new steps in each
  cycle. Press RUN again and again and you will view more steps
  in the trace window.

  Tricks: All grids in child windows have columns of variable
  length. Go with the mouse upon the boundary between the titles
  of two columns. When the cursor changes to <-|-> you can drag
  at left or right and the size of the two columns change.

  Also , the order of columns in a grid could be changed. Go with
  the mouse until  the title of a column. The cursor changes to a
  down arrow. Then you may to move the complete column at left or
  at right draging the column. (While you drag the column title
  changes to black color)

Version 0.10 2005/02/12

  1. Some little bugs fixed as usual in each version.
  2. The configuration child window was expanded. Now you could
     assign a .BMP picture to each child window.
  3. Included skin4.
  4. New child window: Subroutines. (Button Sr)
     With this window you may watch the contents of each return
     address in each subroutine level.

     Important: Before you work with this child window , execute
     the command PACK first in SIM41.

     This is needed because if you delete some steps in a program,
     Visual Fox maintain the steps deleted hidden to the user and
     the return address in a subroutine could not be the step
     calling the subroutine.
     In this case the return address is the database record in
     Visual Fox. The program is executed right if you have deleted
     steps hidden but the data in this child window could not be
     traced.
     The command PACK deletes the hidden steps.


     Example of use:
     I included the program TESTSUB1.PRG for testing this window.
     a. Load the program.
     b. XEQ PACK
     c. Open the child program window and the Subroutines window.
     d. Run the program in single step mode using the key SST in
        Sim41.
     e. Watch the return address of the subroutine levels when
        XEQ 10 and XEQ 11 are reached.



    5. There are new buttons for FONT management in some child
       windows.
    6. In the config Window there is a new button "Back Pictures"
       This button allows to choose a back picture for child
       windows. Open the child windows first and you will see
       the changes.

Version 0.13 (2010/08/09)
------------------------------------
Changed the web page in the window "About"
Shell database window now is hidden.
If calculator is in DEG status , DEG is not shown.
New front button (skin3): Display font.
New option in menu : Show/Hide front buttons.

Version 0.14 (2011/11/24)
------------------------------------
Compiled for new runtime version 50a.
Front buttons do not shown by default.
Font display included in the menu.
Lowercase help over the calculator is not shown by default.
FIX, SCI, ENG in the stack window changed to check boxes.

Version 0.15 (2011/11/28)
------------------------------------
Transparent display
Max mantissa=10 digits.
Changed some mathematics in numbers with exponents.

This version allows several instances of the calculator at same time
sharing the same data: memory , stack, flags , program.

The versions of all calculators must be 0.15 or later.
Also, the calculators must be loaded from the same folder.
 
New menu option : Enable Refresh from another calculator instance.

(Partial numeric data entry or partial alpha data entry is not refreshed when
other calculator instance is changing the shared files.) 

If several calculators are on the same step and one changes this step
other calculators refresh that step when the first calculator
leave the step . Of course, the calculators "client" must be with enable
refresh active. The calculator "server" does not need enable refresh
active)

Inserting or deleting steps in a calculator, are refreshing the number of the current
step in other calculators accessing the same program.
 
If two calculators have enabled refresh active from remote calculator instance, at same
time, you can see the changes in both calculators when someone of them
changes data.   (Both calculators are "server" and "client" )

Also , the changes in sub windows opened by one calculator as memory window,
stack window, program window or flags window are updated when other 41 calculators
update data. You can look at these changes in visible sub windows at real time.

Note: The PACK  command is only allowed when one instance alone of
the calculator is running.

If you have the sim41 folder shared in a personal computer network a 41 calculator
opened in a computer of the network could update data and other 41 calculators
of the PC network, accesing the same folder, could see the changes at real time.

Version 0.16 (2011/11/30)
------------------------------------
New counter of calculator instances located in configuration file.
Control of exponent width since configuration file.
Font used by calculator display is loaded since configuration when
the calculator is executed.

Version 0.17 (2011/12/03)
------------------------------------
Counter of calculator instances is not updated if the Personal Computer
is turned off while the calculator is opened. In version 0.16 is needed
to close first the calculator before turn off the computer.
In version 0.17 there is a process for update (fix) the counter when the
Personal computer is turned on again.

New options for display control. Look at new menu option : Display.
--------------------------------------------------------------------------------------------------------------

Version 0.18 (2011/12/08)
------------------------------------
Compiled again the 4 skins of version 0.12 for this version.
ISG and DSE delete trailing zeros at right of decimal dot.
New button [Clear] located in subwindow stack.
A little error of version 0.17 is fixed.
New icon.
Included again the backgrounds (bmp files) and tones
(wav files) of version 0.12

Version 0.19 (2012/03/10)
-------------
"E" is not shown when you are typing exponents.
Some fixes.

Version 0.20 (2012/03/22)
-------------
In program mode when button NEW is pressed the calculator display
is refreshed.
Catalog 3 implemented.
RTN at run mode go to top of memory.
In program mode after typing LBL nn , XEQ nn or GTO nn if turn on
ALPHA , type some text and turn off ALPHA, the text is appended to
the numeric label. Fixed. Now the text is placed in the following
step.

Version 0.20b (2012-02-26)
--------------
The sub window "Dictionary" was included in this version. This is
a dictionary of internal commands used by the calculator.

Version 0.21 (2012-03-10)
------------------------
Pause Interval in millisec could be set in configuration window.
Display window has new options for set colors of display background,
foreground and annunciators.
HTML help.

Version 0.22 (2012-08-11)
------------------------
Sigma+ and Sigma- show N (Number of data sets).
Implemented Time command. (XEQ TIME)
New option -Skin- in Configuration option of menu.
New button -Txt Color- in subwindows program and memory

Version 0.23 (2013-01-13)
-------------------------
New file BEEP.WAV included.
Fixed an issue when XEQ is used at program entry and the alpha text is
an internal command with parameters.
New box for exponent width control (pixels).

Version 0.24 (2013-04-11)
------------------
New button GridLineColor in program window.
Fixed an issue when a program is loaded and you add new steps:
the grid in program window is not refreshed.
Note that this error was present only in recent versions.
(Since data sharing between calculators was implemented).
Underscores used in some command parameters. (Experimental)
The grid in program window shows 24 steps. (before 21 steps)

Version 0.25 (2013-07-08)
------------
New buttons in stack window.
An issue with [ENTER][CHS]. The stack is disabled and last value
is lost. Fixed.
Example: 5 [ENTER] [CHS] 2 *
Review of SIZE and PSIZE. (Until 999 registers allowed with SIZE).
(Until 9999 registers using PSIZE)
A preview of DEL is implemented at run mode. 
Included LN1+x and e^x-1.

Version 0.26 (2013-09-10)
-----------------------------------
Tones are located in subdirectory tones.
Ability to read ini files. (skingen.exe)
Custom skins could be loaded from bat files.
skin4 is a .bat file now.
Horizontal scroll of alpha data when alpha memory is greater than
certain value. 
Included AROT, ALENG

Version 0.26a (2013-09-11)
-------------------
catalog 1 shows programs located in the current directory and includes
programs located at subdirectory "programs".
Bug fixed at user mode when the current program is empty.
New button -Font- at User Map Window.

Version 0.26b (2013-09-18)
------------------
Fixed a bug about use of EEX in user mode.

When EEX is used without mantissa the default mantissa is 1.
This was implemented in first versions of sim41 when the display
contained both mantissa and exponent with spaces between them.
Later, due to alignment problems of exponent when the font is
changed I decided to manage two regions: one for the mantissa
and another for exponent. 
The EEX key management without mantissa is now updated for
right behaviour with two regions.

New code in buttons NEW and LOAD of program window prevents
some warning messages. Sometimes if you close the program window
after a NEW or LOAD the window can not be opened again. Fixed.

New button FONT in the flags window.

Version 0.27  (2013-09-28)
-------------------
Review of STO L , RCL L  and "command" IND L from keyboard.
When main calculator window is closed while window internals is open some
warnings are shown. Fixed.
Implemented: Catalog4 (Part) , Catalog 6.
New commands: GETP, SAVEP  at run mode.
When a number in alpha is saved (with ASTO) either to a memory or to a
stack register the number is preceded with a single quote. This means
that number is Alpha Data.
ARCL discards the single quote if finds a number saved as alpha data.
Note that operations as + - * / and others are not allowed with alpha data!.


Version 0.28  (2013-10-15)
-------------
A problem entering X<> Memory or X<> [YZTL] to a program was fixed.

X<>spaceMM and x<>spaceStack. The space is optional now. So, if you
write external programs with your favorite text editor you can enter
for example X<>T, X<>00. (Before the space between X<> and the parameter
was mandatory)

Underscore is shown when entering alpha data.

Included the commands DATE , MDY and DMY .

Sub window Extended memory available now.

Some changes in catalogs.

Search for an external program with .PRG extension includes the \sim41w
directory and :
\sim41w\programs directory too (New).
In previous versions only the \sim41w directory . (with command XEQ.)

TIME is shown as a message.

----------------------------------------
New commands (related to extended memory ) :
----------------------------------------
CRFLD CRFLAS
PURFL CLFL RESZFL
SEEKPT SEEKPTA
RCLPT RCLPTA
SAVEX GETX
APPCHR INSCHR DELCHR
APPREC INSREC DELREC
GETREC ARCLREC
New skins.

Version 0.29  (2013-10-24)
-------------
Underscore is shown after XEQ ALPHA.
A program name (Example: TIMES.PRG) that begins with an internal command name
(as TIME) is executed now.
The window Extended memory is closed when RCLPTA is executed. 

Included:
SAVER GETR
SAVERX GETRX
POSFL  X<>F
X<NN? X>NN?
X<=NN? X>=NN?
X=NN? X#NN?
XTOA ATOX

Version 0.29b  (2013-10-26)
-------------
A new feature in version 0.29 generated a bug with XEQ [program file].
Fixed.

Version 0.30 (2013-11-09)
-------------
New buttons:
"BASIC VIEW" in Program Window.
"GridLineCol" in Memory Window
Below Line: "BackColor" in Program Window.
"Font" and Grid Size Buttons in XTOA editable window.

Indirect shows 2 underscores. (Before only 1).
Fixed a problem with R/S when is used in alpha mode. The last
underscore is deleted now.

Included:
ANUM
POSA
GETSUB
CLRGX
CLOCK:  (XEQ "CLOCK" and SHIFT - ON )
XEQ "AON" 
SHIFT - K in alpha mode.
SREG? (SigmaREG?)

Version 0.31 (2013-11-28)
-------------
Fixed a very rare problem in Program mode when XEQ "alpha data" is entered in a program.
"The following LBL "alpha data" is changed into XEQ "alpha data"

Program entry of commands with parameters shows underscores.

Error: If calculator is set to ENG a number < 1E-21 is shown as 0. Fixed.

If you are entering a number at execution mode and press [alpha], X is
not updated with data entry . Fixed.

Included:
CLK12
CLK24
CLKTD
CLKT
ADATE

A basic implementation of SW is present in this version. (Enhancements to SW soon)
Keys:
XEQ SW : Shows Stop Watch
R/S : Stop / Run Stop Watch
[<- ] : Back Key. Set stop Watch to 00:00:00.00
Shift [<-] : Shift - Back :  Turn off (Exit) SW
Enter : Saves the current value to Rnn .and increments register nn. 

--------------------------------------
New options in skingen.exe
--------------------------------------
Menu has a new option : "Objects"
This option has the following sub menu options:

1) View and edit obj table.

This is a two way mode:

2) Skin->Obj . Skin to obj. Updates obj table with all current skin values.
3) Obj->Skin . Obj to skin. Updates current skin with all obj table values.

Allows global changes to several objects at same time.

4) Generate ini file.
Choose a new skin name.
Then the .ini file and the .bat file are generated.
Later load the new skin executing the .bat file.


Over the plain skin:
-------------------
Right click in either some button or label (in skingen.exe) shows object
properties. To change properties enter new values and CLOSE the window
 "object"

Version 0.31 update (2014-08-19)
---------------------------------------------
This version changes the file prgdictionary.41c including in it STOSTEP
and RCLSTEP. Two new examples with multiprogramming are included too:

metaprog001.prg  :
The main program is at LBL A
Program B changes the operator of main program to "+"
Program C changes operator of main program to "-"
Program D changes operator to "*"
Program E changes operator to "/"
 
metaprog002.prg is a version of metaprog001.prg with less steps.

Execute these programs at user mode. Be sure that keys A,B,C,D and E
are not assigned.

Version 0.32 (2017-08-04)
---------------------------------------------
Included REGMOVE and REGSWAP

Version 0.33 (2017-08-14)
---------------------------------------------
Included DOW, DATE+ and DDAYS
Fixed ATIME and ATIME24
Included 4 auxiliary registers M,N,O,P. These can be seen at stack subwindow
It is possible to enter a register M N O P from keyboard using the dot key
Same as you enter stack registers.
Example: Enter STO IND M    
[sto] [yellow] [dot] [M]
To enter RCL N use [rcl] [dot] [N]
In program mode DSE O could be [xeq][alpha][D][S][E][alpha][dot][O]
ST+ P is [sto][+][.][P]


Version .34 (2017-09-18)
---------------------------------------------
Implemented a prefixed stack with 4 to 100 levels chosen previously
The stack could be seen in the new window : Extended stack.
The first 4 levels of the extended stack are x,y,z,t.
To prefix the stack levels there is a new edit box in the stack
subwindow.
If the extended stack subwindow is opened while we changing levels, that
window is rebuilt dynamically to show the new levels.
If you want strict HP41 compatibility prefix the extended stack to 4 levels.


Example:
An extended stack with 10 levels has: st00, st01, st02, st03, st04, st05,
st06, st07, st08, st09.
The first level is st00.  (This means stack00 )
st00 = x
st01 = y
st02 = z
st03 = t


Note: The extended stack is not Dynamic as the stack of the HP48.
The extended stack is prefixed to certain number of levels.

Try to calculate this with an extended stack of 10 levels:

1 + 2 * ( 3 + 4 * ( 5 + 6 * ( 7 + 8 * ( 9 + 10 ) ) ) )


1[Enter]
2[Enter]
3[Enter]
4[Enter]
5[Enter]
6[Enter]
7[Enter]
8[Enter]
9[Enter]
10
+
*
+
*
+
*
+
*
+

Or write the following program and execute it when you entered the
numbers to the 10 levels stack:

+
*
+
*
+
*
+
*
+


Extended Version 1.0

Implemented CLST in the extended stack

---------------------------------------------
Extended version 1.1

Implemented GETKEY
Fixed issues.

Extended version 1.2
Compatibility with vrunfox (version 9)
1) Install the vfp9 service pack 2 runtime available at http://www.foxpert.com/download/runtime.html
2) Download and Install vrunfox9 at the same directory of sim41. (https://www.leafe.com/dls/vfp)
3) Execute vrunfox
3) Write in vrunfox:  do sim41e-12  and press the PC enter key. 
4) For the classic version write on vrunfox: do sim41w104
---------------------------------------------

Original version 1.0

Implemented compatibility with vrunfox.
Changed code to reach compatibility with the version 9 runtime.

---------------------------------------------
Original version 1.02  (2021/03/23)
Integrated tones to main distribution.
---------------------------------------------

Sim41w Version 1.03: (2021/03/31)
New buttons f-color and b-color used to change
foreground and background color on the trace-window.
New options on main menu, configuration, printer. It is possible
to change foreground color, background color and font.
The printer window must be opened first.
Write on vrunfox:  do sim41w103

---------------------------------------------

Sim41w Version 1.04: (sim41w104.exe) (2021/04/06)
On windows 10 with dark theme the window configuration-display
does not show some text. Fixed.
Printing some numbers with exponents. Sometimes the exponent
is not shown on the Printer window if sci or eng are active. Fixed.
The font style of the display is not shown on the display configuration
window. Fixed.

---------------------------------------------

Sim41w Version 1.10: (sim41w110.exe) (2021/05/02)
Experimental implementation of shadow stack registers. 
To see it, open the auxiliary window stack2d
Commands to control it:
ENTER>
SWAP>
ALLON
ALLOFF
These commands are executable (using XEQ) , assignable (usign ASN)
and programmable.

If ALLON is executed previously:
Commands ENTER>  and SWAP> include all registers x,y,z,t.
With ENTER> registers x,y,z,t are copied to x1,y1,z1,t1
If SWAP is used the registers x,y,z,t and x1,y1,z1,t1 are interchanged.

If ALLOFF is executed before:
Commands ENTER> and SWAP> include only registers x and x1.

ALLON command controls the status of optional movements from x,y,z,t
to registers x1,y1,z1,t1 at right of stack.


Auxiliary Window : Dictionary redesigned.
--------------------------------------------------------------

From vrunfox invoke the file with the command: do sim41w110

Commands implemented:

   HP41CV instruction set.
   HP41CX. Many commands.


Commands do not implemented yet:
  
   COPY
   Some special purpose flags.
   Alarms.
   Modules.


Known problems:



Break (stop) a running program using the ESC key in your PC (The mouse must 
  be not used for this task).

If the context menu is not shown when mouse right click is pressed try
using mouse left click.

If shift-on is used to show the clock, sometimes the clock can not interrupted
using the <-  key. To interrupt the clock close all auxiliary windows previously
opened and the use the <- key.

