01.08.03 For I2 (release Alpha Phase I.c): Continue the I2 compiler work by completing the framework, including function debug capabilities. Opcode translations have not been implemented. This means the functions compiled by I2 are identical to the functions you run in interp except that most NOP instructions have been optimized away by I2. For interp: 1. Add the HARD-NOP ('n') opcode because I2 will optimize away most of the other NOP opcodes. 2. Add support for the DEBUG-MODE ('D') opcode for use with I2. 3. Add System Constant 41 (DEBUG_LEVEL, 0=OFF; 1=I2 function tracing; 2=I2 function and opcode tracing.) 4. Add the "exit" macro as an alternative for the "quit" macro because it improves interoperability with Linux. 01.08.02 Start the work on the "experimental" I2 compiler. Currently it consists of only the modified function return stack frame, and the infrastructure for building and testing it. Several documents and two scripts were updated also. There is no change for any of the other build types (interp, nocli, noflags or sin.) 01.08.01 There is really no good reason for the command vector table (cp->vt) to be initialized at run-time. Make it into a constant array of pointers that are initialized at compile-time. This also makes it much easier to adapt interp to a run-from-flash environment that has less RAM. Also refactor interp.c. Features Closed: 3323453 - Convert Command Vector Table 01.08.00 interp image format Add a new document, interp_image_format.doc, that describes the turn-key format for interp applications. Add a new script file, wiff.int, that creates an IIF file containing the currently loaded global and local functions. Corrected a stack leak (one item left on the stack) in DOC/SAMPLE_SCRIPTS/argtest.int. Simplified two more scripts in DOC/SAMPLE_SCRIPTS - kdump.int and kdump2.int. Convert ENFORCE_ADDRESS_ALIGNMENT (System Constant 37) from a run-time to a build-time option. Update test.int to skip the address alignment tests when ENFORCE_ADDRESS_ALIGNMMENT is FALSE. Add support for the Interp Image Format. Add CLI support for the Interp Image Format with the "-b" command line option. Add an API document for iif(3). Modify the Makefile to allow updating the API documents instead of simply building them all. Support Requests Closed: 3225975 - How Do I Create Turn-Key Applications? Features Closed: 3226109 - Define the Interp Image Format 3227588 - Add the Interp Image Format to the Web Site 3237351 - Create IIF files From Interp 3242165 - Simplify kdump.int and kdump2.int 3249516 - Add wiff.int to the Project Web Site 3267980 - Migrate From Piwik to Google Analytics 3271881 - ENFORCE_ADDRESS_ALIGNMENT 3274381 - Update test.int After ENFORCE_ADDRESS_ALIGNMENT 3276660 - Document ENFORCE_ADDRESS_ALIGNMENT 3278402 - Update building_interp.pdf on the Project Website 3282387 - Update the Interp Image Format 3294691 - Add Support for the Interp Image Format 3297682 - Add CLI support for the Interp Image Format 3298270 - Update Documentation for IIF Support 3299038 - Update website with IIF support 3303440 - I want to build only certain API documents Bugs Closed: 3232441 - Incomplete Record Description 3242138 - argtest.int leaves something on the stack 3295440 - The START_M and NEXT_M macros Don't Work for Opcodes > 0x7F 01.07.03 Documentation Corrections and Additions There were minor errors and omissions in chapters 5 and 6 of the interp User Manual. Add a new document, building_interp.doc, that explains all the parameters and how they affect the build. Features Closed: 3190594 - Fix Errors in Interp User Manual 3194996 - Document Conditional Compilation Directives 3196274 - Update Project Web for Patch 01.07.03 3198404 - Fix Description of Example 8 on Sample Code Page 01.07.02 Cleanup, correct, and expand test coverage. Features Closed: 3168051 - Update the Test Script 3178718 - Reformat and Cleanup the Test Script 3179720 - Add Six Missing Tests 3181535 - Tests for NON-ALIGNED-ACCESS and IN-A-FUNCTION 3184364 - Cleanup and Add More Missing Tests 3186448 - Update Project Web for Patch 01.07.02 3187423 - Reformat interpio.html 01.07.01 Improve the documentation of the default macros. Features Closed: 3160318 - Improve Documentation of Default Macros. 01.07.00 Add a new QUOTE (") and M-QUOTE (M") modifier (C) for the '#' meta- character to print one ASCII character. The original "#c" will print -anything- you pass to it on the data stack. It does not check the data. It assumes you have given it exactly what you want to print. On the other hand, the new "#C" will only print ASCII characters in the inclusive range 0x20-0x7E. If you pass it something outside this range, it will print '.' instead. This is the closure for feature #3153493 "Make it easy to print ASCII characters only". Add two new print meta-characters, '!' and '@', to QUOTE (") and M-QUOTE (M"). These new print facilities make it possible to print values taken directly from memory as bytes, halfword, or words. A memory address called the PRINT_ITERATOR_ADDRESS (System Constant 38) is set via "!A". This address is automatically incremented/ decremented as each location is printed. Whether to increment or decrement is determinted by PRINT_ITERATOR_MODE (System Constant 39.) It is initialized to auto-increment by "!A", but can be changed to auto-decrement by "!d", or back to auto-increment by "!i". Auto- decrement requires a more complex implementation because the decrementing can only be done just before printing the value of the -next- memory location. That is handled by PRINT_ITERATOR_FIRST_ONE (System Constant 40.) It is set TRUE by "!A", "!i", and "!d", and set FALSE by the first following '@' metacharacter. As with the '#' print meta-character, the '@' may be followed by an optional modifier. Without a modifier, the value is read from memory as a 32-bit word and printed in the current output base. If a modifier is present, the value is read from memory as indicated below (HALFWORD is 2-bytes, and WORD is 4-bytes): a - (WORD) print the print iterator address as a notated (0x) hexadecimal word (10 characters). Print iterator address is not changed by this modifier. A - (WORD) print the print iterator address as a hexadecimal word (8 characters). Print iterator address is not changed by this modifier. b - (BYTE) print value as a notated (0x) hex byte (4 chars) B - (BYTE) print value as a hex byte (2 characters) c - (BYTE) print value as one ASCII character C - (BYTE) print value as one ASCII character, prints '.' if the character is non-printable d - (WORD) print value as free-form decimal Dn - (BYTE/HALFWORD/WORD) display decimal value right-justified in an n-digit field. The range of n is 0-9 with 0 representing a 10-digit field and all other values representing their equivalent field width. The size of memory read is determined by the specified field width: BYTE - D1, D2, and D3 HALFWORD - D4 and D5 WORD - D6, D7, D8, D9, and D0 h - (HALFWORD) print value as a notated (0x) hexadecimal halfword (6 chars) H - (HALFWORD) print value as a hex halfword (4 characters) s - (WORD) use value as the address of a null-terminated string of ASCII characters, and print the entire string or "NULL" if the value (treated as pointer) is NULL. S - (string length+1) use value as a zero-terminated string of ASCII characters, and print the entire string T - (WORD) treat the value as elapsed time in microseconds and print it as hh:mm:ss.uuuuuu, where "hh" is hours, "mm" minutes, "ss" seconds, and "uuuuuu" microseconds w - (WORD) print value as a notated (0x) hex word (10 chars) W - (WORD) print value as a hex word (8 characters) NOTE: these modifiers (bBhHwW) specify minimum field width. If the value is larger, it still prints properly. NOTE: Each modifier (except aA) increments the print iterator address after reading the value. NOTE: the 'S' modifier is illegal when outo-decrement mode is enabled ("!d") because of the uncertainty associated with searching backwards for the beginning of a variable-length string. Because there are now two new print meta-characters, you are advised to check through your scripts for '!' or '@' in any QUOTE or M-QUOTE print statement, and escape them with a preceding '\' character. For working examples that use the new print iterator, look in DOC/SAMPLE_SCRIPTS for argtest.int, dump.int, example17.int, example18.int, kdump2.int, mprint.int, and mprint2.int. Features Closed: 3153493 - Make it easy to print ASCII characters only 3153494 - Make it Simple to Print Memory-Based Structures 01.06.00 Switch to the GPLv3 license. Prevent in-function use of these commands: Xd, Xg, dG, dL, dg, dl, and v. Add support for an alternative library for embedded builds. Currently ilib.c and ilib.h substitute for strings.h and ctype.h. Features Closed: 3005683 - GPLv3 Bugs Closed: 3008955 - Some interp commands are only interactive 3009675 - Reduce library usage for embedded builds 01.05.00 By default, prevent non-aligned memory accesses. Allow cautious people to determine the status of this selectable protection, and give hardy and adventurous individuals a means to disable it via a System Constant ("K"): 37 - ENFORCE_ALIGNMENT (default, ~0/TRUE) Add conditional compilation directives to provide default definitions for the features with known functionality for embedded builds. Make it easier for the porter to find the code that has to be changed for a particular embedded target. Fix an architecture violation: move redirected_input() into main.c from ilowlevelio.c, and add another argument to imain(). These two changes make redirected_input() a private function in main.c, and eliminate confusion from the porter's mind regarding this function, which is only used in the embedded Linux build anyway. Added a new outer interpreter directive, "#assign", to allow the creation of a macro whose value is computed by the inner interpreter and placed on the top of the data stack. After the assignment, the item is removed from the stack. For example, here we calculate a value and assign it to the "thing1" macro: . . . __ NOT INSIDE A FUNCTION DEFINITION 3 2 + __ put something on the stack #assign thing1=%n . . . It is also possible to select or construct a string, place the address of the string on the top of the data stack, and have the string assigned as the value of the macro. For example, here we create the "Hello World!" program and assign it to the "t2" macro: . . . __ ALSO NOT INSIDE A FUNCTION DEFINITION 0V M"\"Hello World.\\n\"" 0V #assign t2=%s __ NOTE: THE STRING IS -COPIED- INTO THE MACRO DEFINITION. EVEN __ THOUGH IT IS NO LONGER NEEDED, IT IS NOT REMOVED FROM __ MEMORY. YOU MAY DO ANYTHING YOU WANT WITH THAT STRING __ WITHOUT AFFECTING THE MACRO DEFINITION. . . . Here are all the special symbols currently supported: %n - pop the data stack, convert the value to its equivalent HEX-ASCII representation and use the resultant string as the definition. %s - pop the data stack, treat the value as a pointer to a zero terminated string, and use the string as the definition. Features Closed: 2824584 - Calculated Values as Macro Definitions Bugs Closed: 2868551 - Interp Allows Non-aligned Memory Accesses 2851914 - Conditional Compilation Directives for Embedded Sys. Builds 2839880 - Why is redirected_input() in ilowlevel(3)? 01.04.00 Improved the functionality of the CLI "-c command" option by enabling the use of macro definitions (such as "dup", or "YourMacro.") The new outer interpreter directive, "#restore", lets you restore the default macro definitions. Several maintenance changes were made, including a Makefile change. See below Features Closed: 2818776 - "-c" CLI Option Should Expand Macros 2807655 - Restoring Macro Definitions Bugs Closed: 2806170 - Out-of-Order Builds 2813043 - Restore the Default Macro Definitions 2814888 - The Example Memory Dump Script is too Complicated 2816452 - Interp Prompts When Loading the Debug Macros 2811130 - Comments Missing From Feature #2528364 01.03.00 Closes feature #2704614 by adding "Dn", the formatted decimal output modifier to QUOTE (") and M-QUOTE (M"). Closes bug #2750851 "Refactor Common Code From QUOTE and M-QUOTE" by moving common code from send_string() and memory_string() into set_number_base_and_field_width() and usec2h_m_s_usec(). Closes bug #2750857 "#s Crashes Interp When Stack Is Empty" by updating send_string() and memory_string() to return an error status of "Stack empty" instead of trying to continue and either terminating abnormally (core dump) or printing garbage. The formatting options affected were "#s", "#c", and "#T". Closes bug #2766672 by adding tests for the remaining output format operators: #W, #H, #B, and #D0-#D9. 01.02.00 Closes bug #2577211 "Can't Disable #CONTINUE" by adding the "#quit" directive (stop running after an error occurrs while reading from redirected input.) Closes bug #2624491 "File Remains Open After Error" by draining the input when reading input from a file via the "-f" option fails due to a run-time error. Closes feature #2528364 "Build Configuration Parameters" by adding build-time (Makefile) control over the sizes of the data stack, loop control stack, function return stack, global/local variable areas, input buffer, concatenation/execution buffer, and whether or not global and local functions have private data (local variables, and local functions.) Closes feature #2577160 "Make Build Configuration Parameters Visible at Run-Time" by adding eight system constants ("K"): 29 - TYPE_OF_BUILD (0=OS, 1=NOFLAGS, 2=NOCLI, 3=SIN) 30 - DATA_STACK_DEPTH (default=1024) 31 - LCSP_STACK_DEPTH (default=1024) 32 - FRSP_STACK_DEPTH (default=1024) 33 - VARIABLE_POOL_DEPTH (default=1024) 34 - NO_PRIVATE_DATA (for functions; default=FALSE) 35 - INBUF_SIZE (default=4097) 36 - BIGBUF_SIZE (default=65536) Closes bug #2686077 "Don't Put .svn Directories in the Tarball" by changing the "tarball" rule of the Makefile to remove those directories before the tarball is created. Closes bug #2686095 "Make Debug Macros More Portable" by revising the definition of CDEPTH to calculate the number of 32-bit words in one frame of the function return stack instead of using the hard-coded number 3 (which is the current frame size in words.) The calculation is base on System Constant 5 (frame size in bytes.) Closes bug #2686087 "Files Missing from Feature #2577160" by updating DOC/SAMPLE_SCRIPTS/kdump.int, DOC/API_DOCUMENTS/interp.1, DOC/new_interp.doc, and DOC/SOURCEFORGE/interp_commands.txt with the changes relating to feature #2577160 "Make Build Configuration Parameters Visible at Run-Time". 01.01.00 This release improves two aspects of interp: execution efficiency, and macro processor memory management. Execution speed improvements were made to stack operations and function call and return operations.Macro processor memory is a new and much needed feature for interp. Documentation: Corrected the input and output/error message buffer sizes in the Interpreter_State_Variables image files (all versions.) Reformatted interp(1) to conform to manpage expectations. Moved pre-1.0 changes and notes to PRE-1.0-CHANGES and PRE-1.0-NOTES, respectively. Updated INTERNALS_DOCUMENTS/Interp_Internals.doc (and the PDF and XML versions) to reflect the code changes to interp.c. Added macro_usage_info() to API_DOCUMENTS/idefine.3. Updated new_interp.doc and SOURCEFORGE/interp_commands.txt with the new outer-interpreter directive, "#USAGE." Maintenance: In idefine.c, make four parameters adjustable that control the memory usage of the macroprocessor. See comments in this file. Add the function macro_usage_info() which displays the four adjustable parameters along with other helpful information. NOTE: The default value of MAXDEF was reduced from 161 to 71. If you have macros with -long- definitions, and you're getting "getdef: definition too long", edit Makefile and change the value of MAXDEF back to 161 (or even larger if you like.) In interp.c, replace cp->sp and cp->frsp with local register variables named datap and funcp respectively, this improves generated code on some architectures. In interp.c, rewrite the function call logic to eliminate two stack checks, and three stack adjustments, in Interp_do_function, Interp_do_lfunc, Interp_do_global_macro, Interp_do_local_macro, and Interp_do_memory_macro. This improves readability, maintainability, and execution efficiency. In interp.c, rewrite Stop_interpreting and remove two stack checks. Assume the local function table is sparcely populated or empty, and optimize the loop that releases that storage. Rewrite Interp_version, in interp.c, to use put_char() and put_line() for an improved porting experience. In imain.c, add #USAGE directive to display macro usage information. In Makefile, add MACRO_OPTIONS for changing the parameters that control memory usage for the macroprocessor. See Makefile comments 01.00.00 Documentation: Created DOC/INTERNALS_DOCUMENTS/Interp_Internals.doc. Also created PDF, and XML (docbook) versions of it. Bug fixes: In interp.c, change the stack check in Interp_return_caller_context to required at least one full return frame. This prevents a possible out-of-bounds stack access. Also updated some comments. All older notes were moved to PRE-1.0-NOTES.