The Pawn language - history

Skip to main content (skip navigation menu)






pawn

 
This product is made in the EU

Pawn's icon

An embedded scripting language

Summary of recent changes

 

  4 October, 2026 — version 4.2.7707
  • The ‘&^’ operator (bitwise and-not) was copied from the Go language.
  • Two new intrinsic variables ‘argc’ and ‘argv’ make working with variable argument lists easier.
  • State variables are now cleared (initialized with zero) on entering the state —but only if entering from another state that does not share the variable. That is, when a state variable is shared by two states, toggling between these two states does not clear the variable, but entering either state from elsewhere will clear the variable.
  • A ‘#pragma recursive’ directive was added to mark a function explicitly as recursive, because the warning for possibly unintentional self-call is now always enabled.
  • The compiler now issues a warning when function array parameters are not const, but making them const would generate better code.
  • Literal strings (and literal singe-dimensional arrays) are now merged if this data is read-only. This saves space in the pawn ‘data section’.
  • The pawn compiler supports binary fixed-point numbers in addtion to decimal fixed-point (and floating-point is also still supported). No run-time library (extension module) is currently provided for binary fixed-point arithmetic, but several exist.
  • Improved peephole optimizer with checks for registers whose value is not used (which allows to optimize out save/restore sequences).
  • The assembler core for 32-bit x86 was ported to the GNU assembler.
  • The pawn disassembler supports debug information, to create a better annotated disassembly listing.
  • Fatal errors moved from the range 100...114 to 300...314, because there are now more than 100 error messages.
  • Dark mode support in the pawn IDE (wxQuincy), and also a better selection of the default font for coding.
  • Many bug fixes... (with thanks to those who reported the bugs and/or provided ‘pull requests’ with fixes).
  20 August, 2025 — version 4.1.7483
  • Parentheses around expressions in if, while, for and switch statements are now optional (under the condition that the expression is either followed by an opening brace for a compound statement, or by a line break).
  • No warning ‘redundant test, constant expression is always true’ for the syntax ‘while (true)’ to create an infinite loop.
  • Removed the compiler options ‘-;’, ‘-(code>’ and ‘-^’ to disable optional semicolons, optional parentheses and to change the escape character.
  25 March, 2024 — version 4.1.7152
  • Optimized assembler core for ARMv6-M architecture (ARM Cortex M0/M0+). Further (minor) optimizations in the other ARM assembler cores.
  • New function amx_VerifyAddress(), to test whether an address is valid in the sandbox of the abstract machine.
  • Added ‘#pragma opcodeset’ in the compiler, so that the instruction set that a target supports, can be set in the target's configuration file.
  • Adjust the assembler cores such that they can be built with either GNU GCC or GNU AS (both use a different syntax for assembly macros).
  • A few more cases were added to the peephole optimizer in the compiler.
  • The compiler allows the ‘var’ keyword as the equivalent of the ‘new’ keyword. That is, ‘var’ creates a new variable.
  • The Implementer Guide is expanded with a section (plus an example) on running scripts from ROM, and minimizing the footprint of the abstract machine.
  • Fixes in support for 64-bit code, both in the Pawn compiler and in the abstract machine.
  • Fixes in the garbage collector (this is an optional module for the abstract machine).
  • BUG fix: the compiler applied an incorrect high bound for packed strings.
  • BUG fix: the compiler did not handle progressive initiallers correctly in packed arrays.
  13 June, 2017 — version 4.0.5691
  • Addition of a tool to create ‘dot’ files for the Graphviz programs, to create graphs of state machines.
  • The location of configuration files for target hosts has changed, from the ‘bin’ directory to the directory ‘targets’. The default configuration file is now ‘default.cfg’. For backward compatibility, if no ‘default.cfg’ is found (and no other configuration file is specified), the compiler falls back to ‘pawn.cfg’ file in the ‘bin’ directory.
  • For target host, host-specific include files have moved to a sub-directory with the name of the target host, below the ‘include’ directory. This is similar to the locations of host-specific documentation and samples.
  • In Quincy (the pawn IDE), the sample browser has returned. In the menu, see Tools / Sample browser...
  • The STACK opcode has different semantics: it now sets the ALT register to the value of STK after adjusting it (instead of setting it to the value that STK had before the adjustment). This change has no impact on compiled scripts or the abstract machine. In the past and current release, the pawn compiler does not rely on the ALT register after a STACK opcode.
  • Portability fix: Linux no longer provides the spawn() function, so it has been emulated with posix_spawn() and waitpid().
  • BUG fix: in support of packed opcodes, since the support for 64-bit cells, negative parameters were no longer optimized to packed opcodes. (The generated code was correct, but sub-optimal.)
  • BUG fix: code generation error for native functions that return an array. (pawn functions returning an array were not affected.)
  26 October, 2016 — version 4.0.5588
  • The IDE has been rewritten in wxWidgets (instead of MFC), so that it now runs on Linux as well.
  • New warning to check for functions whose existence is tested (in conditionally compiled sections) before the functions are defined (which also requires an extra compilation pass).
  • Identical literal strings are merged, as to reduce the ‘data’ memory footprint.
  • #warning directive (which works like #error, with the exception that it is a non-fatal message).
  • #pragma warning directive, to push/pop/enable/disable warnings.
  • #ifdef and #ifndef are supported (in addition to #if defined) for compatibility with C.
  • The default extension for include files are now both .i and .inc.
  • All documentation is updated to a format that is easier to read from a screen (as opposed to being printed).
  • Improved support for new versions of GCC, clang and Borland/Embarcadero.
  • BUG fix: dangling comma on initializers of two-dimensional arrays caused incorrect code generation. This has been corrected.
  • BUG fix: when two files have a symbol with the same name, the debugger could pick the wrong source file. This has been corrected.
  • BUG fix in test for UTF-8 files.

  21 June, 2012 — version 4.0.4733
  • BUG fix: the optimizer generated wrong code for subtraction of a variable from a constant. This has been corrected.
  • BUG fix: overlay code caused ‘legacy’ virtual instructions to be generated, instead of the instructions from the new set.
  • The CMake build scripts were updated to reflect the changes in recent versions of CMake.
  • In Quincy, the bottom panel may close automatically when it looses focus and re-open when it gains focus. This allows to keep a large edit window and still access the build/log windows with a single click. (Note: this functionality can be disabled in the application options.)
  • In Quincy, code snippets may now optionally also expand on a space character (previously, only the TAB character was supported).
  • A compilation problem with the ARM7 and Thumb2 cores, in combination with recent releases of the GNU ‘newlib’ chain, has been corrected.

  1 August, 2011 — version 4.0.4548

  8 June, 2009 — version 3.3.4127
  • The entire pawn toolkit is now licensed under the Apache license, version 2. The Apache license is a very liberal license (permitting use in commercial projects), but it contains a patent clause. The previous license (zLib/libpng) did not have a patent clause.
  • wxQuincy, a minimalist IDE distributed in the Linux autopackage and TAR files now comes with source code. The IDE has been enhanced with a multiple-document interface.
  • The compiler is now a little better at guessing the TAB size in case of mixed indentation with TABs and spaces. This avoids the warning ‘loose indentation’ to be reported erroneously.
  • Keep the stack 8-byte aligned in the ARM7 assembler versions of the abstract machine (some ARM compilers require this).
  • amxFile uses the newest version of minIni.
  • Quincy (Microsoft Windows version) now detects FTDI virtual ports (for remote debugging); it supports up to 15 user help files and it supports host-specific help files. Quincy now also has the ability to insert accented characters (extended ASCII), and a new ‘repeat star in multi-line comments’ option.
  • BUG fix with strings with an escape character followed by a single line comment (preprocessor parser error).
  • BUG fix in expressions with chained relational operators and constant operands.
  • BUG fix in the optimizer: removed redundant calls to malloc().
  • BUG fix related to passing arrays based on an enumeration to a function.
  • BUG fix in auto-completion in Quincy, related to non-alphabetic characters ('_' and '@').

  8 April, 2009 — version 3.3.4097
  • The pawn compiler can now take a configuration file with specific settings for an environment. New command line option: -T. The manual contains the details.
  • The Linux distribution now comes with a minimalist IDE, called wxQuincy.
  • Uncrustify replaces ‘artistic style" as the code beautifier for Quincy.
  • BUG fix: minor bug correction in missing comma in initialler of 2-dimensional array.
  • Modifications in Quincy: better detection of read-only paths (or drives), an option to save the file in a different location without aborting the compile, a message in the ‘build log’ that signals that a source file was changed since last build (and thus needs rebuilding), a window to view strings received over the serial line.
  • Improvements for GraphApp terminal (multi-platform).

  15 January, 2009 — version 3.3.4058
  • Function amx_GetString() would terminate packed ANSI strings with two trailing zero bytes. In one of the examples as printed in the manual, this would lead to a buffer overrun.
  • The compiler optimizer applied a wrong limit to parameters when choosing between packed and unpacked opcodes. This led to a case where the compiler generated a packed opcode, while the parameter did not fit in that packed opcode.
  • In pawndisasm: a few opcodes were given the wrong mnemonic.
  • When the compiler halted on a fatal error occurred inside an include file, the ‘parent files’ were left open.
  • The compiler would no longer build with the PAWN_LIGHT or PAWN_NO_CODEPAGE options, because a few new sections lacked the respective conditional-compilation wrappers.
  • A bug was fixed in amx_Clone(). This bug was reported by Luke Salisbury on the pawn forum.
  • Re-entry of the compiler might use data from the previous run. This bug, reported by Soren Hannibal on the pawn forum, was fixed.
  • Quincy now comes with an improved ‘search in files’ function, by using a modified version of GNU grep (see the file ‘grep.txt’ for the modifications).
  • Quincy now also supports auto-completion using Ctrl-Space. If multiple words match, Quincy pops up a balloon. Pressing TAB expands the word up to the first character where multiple matches differ.
  • Warnings when building with Visual Studio 2008 were removed.
  • Various other bug fixes and improvements.

  27 October, 2008 — version 3.3.4026
  • SECURITY FIX (‘arbitrary code execution’ vulnerability): the CALL.pri and JUMP.pri instructions were removed, because one could use them to force a jump out of the virtual sand box of the abstract machine and call arbitrary code that is carefully laid out in the data section of the script.
  • ‘exit’ state functions are now also supported (in addition to ‘entry’ state functions).
  • Trailing commas are now allowed in the initialization data of arrays. For example, the comma behind the closing brace of the second sub-array in the following declaration is allowed (but optional). The commas behind the digits 2 and 4 are allowed too (and also optional).
      new arr[2][2] = {
          { 1, 2,},
          { 3, 4,},
      }
  • The macro substitution processor now recognizes the ‘#’ character for ‘stringizing’ a parameter. For example, if you have the definition
        #define log(%1) #%1
    Then the expression log(test) will result in ’test’.
        Note that concatenation of literal strings requires an ellipsis in pawn (which is different than C/C++). So to combine the parameter with literal strings, use a syntax like:
        #define log(%1) ‘logging: ‘ ... #%1 ... ‘\n’
    The stringize operator is only available in the replacement text of a macro.
  • Support for the ‘thousands’ separator (a comma) in numbers.
  • When a source file contains indenting with both spaces and tab characters, and no explicit tab size is given, the compiler now makes an educated guess for the tab space to use. This reduces warnings about ‘loose indentation’.
  • The handshake of the debugger in a remote-debugging configuration is a little faster. That is, the debugger finds the remote device/host faster. Remote debugging is typically used with embedded systems.
  • Better support for ncurses, which is now also the default for Linux (if it is installed).
  • For the amxProcess module, the dyncall library now replaces the libffi library, because dyncall comes with ports for Unix/Linux, Macintosh and Windows (libffi only supported Unix-like systems). The amxProcess module now also compiles without dyncall, but with reduced functionality. See http://www.dyncall.org/ for details on dyncall.
  • The ‘binreloc’ module is now optional when compiling pawnrun and pawndbg under Linux; binreloc is part of the ‘autopackage’ developer tools.
  • A portable INI file parser in the amxFile extension module (see the minIni project).
  • Support for code snippets and balloon ‘info tips’ in Quincy, as well as supporting info-tips in the debugger for the current value of variables.
  • Quincy supports workspaces (light-weight projects). A set of open files and the currently selected compilation options can be saved in a workspace, for quickly switching between projects.
  • BUG fix: the ternary operator (’a ? b : c’) had a bug when ‘b’ and ‘c’ were arrays of different lengths. This bug was reported by Bailopan on the pawn forum.
  • BUG fix: amxFile had an error in the file CRC calculation.
  • BUG fix: function uuencode() in amxString was broken.
  • BUG fix: when basing a one-dimensional array on an enumeration and using the ellipsis (’...’) in the initialler to initialize the complete array to a value, the ellipsis would drop out immediately and fail to fill the remainder with the given value/sequence.
  • BUG fix in amxString: valstr() failed on large numbers.
  • BUG fix: a string like "\\" was not accepted by the pawn compiler (double backslash at the end of a string). This was fixed before... a regression!
  • BUG fixes in amxpool (minor bugs).
  • BUG fix: indexing an undeclared symbol made the compiler abort with an ‘assertion failed’ message. This has been corrected.
  • Various BUG fixes and improvements in the pawn debugger (pawndbg) for working with Quincy.
  • Various other bug fixes, and many improvements in Quincy.

 
See the history.txt in the downloadable archives for a longer history.