Changelog 10/12/2009, v2.00: Bugfixes: - for output format OMF, the listing contained "random" values of data bytes in BSS segments. - syntax check for WHILE didn't reject additional arguments. - PUSH/POP instruction: a forward reference to a variable caused an error if cpu was 8086. - for most MMX and SSE instructions, type of memory operand wasn't checked too strictly. - ALIGN for data segments did emit the same bytes as for code segments. - in 16-bit code, PUSH with -65535 <= imm <= -129 made JWasm push a DWORD value or - if cpu was < 80386 - caused error 'instruction form requires 80386'. - in v1.96, usage of a not-yet-defined symbol in a data definition may have caused error "initializer magnitude too large". - .NO87 had no effect in v1.96. - OMF format: size of LNAMES record may have exceeded 1024 bytes. - in v1.96, if -Zm was set, structure fields had offset 0 when they were referenced without the structure name. - inside macros, value of predefined symbol @Line was current macro line number instead of current source line number. - support for IMAGEREL and SECTIONREL operators was effectively disabled. - missing quotation mark in strings wasn't flagged. - JWASMR.EXE: array initialization strings caused a syntax error. - JWASMR.EXE: value of equates was truncated to 16bit. - argument of INCLUDE directive was always expanded. Now it's only expanded if the expansion operator (%) is the line's first character (Masm compatible). - -Zp switch was ignored. - padding of a struct's last member didn't depend on the largest type of the structure, thus it was incompatible with common C compilers. - ECHO without argument might have displayed garbage. - alignment of members of type STRUCT didn't work as expected. - equate @FileCur always returned the main source filename. - in v1.96, indirectly calling a function with a different offset magnitude by type coercion (call PF16 ptr [ebx]) created wrong code. - the argument of REPEAT was treated as unsigned integer, but should be a signed integer. - JWasm complained about a missing argument for IRC/IRPC, but this is actually a valid syntax. - If a struct member's name was also a type name and the member's type was of arbitrary type, a syntax error occured. - directive ASSUME :ptr caused an error in pass 2 if still wasn't defined. Now it's just skipped, which is what Masm does. - DB directive: empty string argument ("") wasn't rejected if directive was used without label. - directives [ELSE]IF[N]DEF without argument caused a warning. - code generated by runtime conditionals might have been wrong if expression had the format ( && ( || )) - INCBIN was ignored if it was first instruction to insert bytes. - if cpu was 8086, INVOKE failed for constant arguments. - operators SIZE and LENGTH worked like SIZEOF/LENGTHOF if expression contained the DUP operator. - directives INCLUDE, INCLUDELIB and INCBIN: filenames beginning with a digit may have caused a GPF. - indirect addressing mode: usage of multiple index registers wasn't detected in all cases. Other changes: - support for 64-bit enabled. - new cmdline options -win64 and -elf64. - new cmdline cpu options -7, -8, -9, -10. - object module is accessed with standard stream functions, low-level file i/o isn't used anymore. - format of error/warning msgs is more Masm-compatible. - directives for 64-bit SEH added (.ALLOCSTACK, .PUSHFRAME, ... ) - OPTION FRAME added. - type SQWORD supported. - OPTION DOTNAME | NODOTNAME fully supported (previously NODOTNAME was ignored). - directive .SAFESEH and cmdline option -safeseh supported. - cmdline option -Zd implemented for COFF output format. - cmdline option -Zi implemented for OMF and COFF output formats. - cmdline option -zld removed. File dependency records are written when options -Zd or -Zi are set. - Masm compatible cmdline option -Zs added, and existing cmdline option -zs renamed to -zt to avoid ambiguity. - operators IMAGEREL and SECTIONREL work with BIN format, which makes it possible to create PE binaries using this format. - BIN format: initial ORG in any segment will just set current offset. Prior to v2.0 this was true for the very first segment only. - ELF32 format: LD extensions for 8/16-bit relocations supported. - OPTION ELF added. - PUSHCONTEXT/POPCONTEXT ALIGNMENT added. - option -j removed. - directive OPTION RENAMEKEYWORD added. - optional attribute LABEL for first macro parameter supported. - macro loop iteration displayed in error msgs. - expansion of macro parameters improved. - regression tests added to source package. 07/29/2009, v1.96a: Bugfixes: - JWASMR.EXE in v1.96 contained a bug in the ASSUME directive which made it unusable. Other changes: - JWASMR.EXE is now distributed in a separate package. 07/26/2009, v1.96: Bugfixes: - BIN format: fixups related to $ were always resolved to 0. - offset didn't return the segment's highest offset. - if ASSUME forward referenced a type, the type's validity wasn't checked in pass 2 if the directive was located before any code or data definitions. - BIN format: in v1.95, a stack segment generally wasn't written, but this rule has turned out to be too simple. Now a segment isn't written if the segment itself AND all segments following it don't contain initialized data. - BIN format: if .DOSSEG was set, segments might have got lost in the binary. - if a macro which contained EXITM was placed behind a code label, the code label was duplicated, giving error msg "symbol already defined". - INVOKE directive, cpu 8086: if ADDR operator was used to push the direct address of a memory variable, a "PUSH OFFSET
" was generated. However, push with immediate operands isn't supported by this cpu. - BIN output format: operators LOW and HIGH were rejected. - OMF output format: in code lines, the HIGH operator was ignored, resulting in a wrong fixup type. - cmdline "-Fo\ *.asm" didn't work reliably, the information got lost after the first file had been assembled. Same for -Fr and -Fl. - the JWasm versions for DOS 16-bit, OS/2 and Linux had problems if a cmdline option and its argument were separated by a white space (i.e.: -Fo Sample.com). - nesting of response files wasn't handled properly. - if name of response file contained spaces, it wasn't parsed correctly. - type coercion within () did force the whole operand to this type. example: mov (, ax - a macro function invoked by EXITM might have caused a line number mess. - JWasm did complain if a character was found in a number without 'h' suffix. This is too rigid if current radix is > 10. - output format COFF, ELF: a buffer was allocated for segments which contain just uninitialized data. This isn't necessary. - output format COFF: segments with combine type STACK were marked as 'uninitialized', even if they contained initialized data. - no error msg was displayed if a non-segment register was on the left side of the ':' operator. - no error msg was displayed if a segment register which was assumed to error was used in an expression. - if a data label was defined more than once, an error was displayed. However, this is to happen only if the label's address or type differs from the previous definition. - (invalid) fixups were created for data items consisting of a segment override and a number (i.e. "dw ds:[12h]"). - -fpc option was virtually ineffective because cpu directives also set a default fpu mode. - SYSENTER was erroneously marked as a privileged instruction. - in v1.95, there was a regression if a literal enclosed in <> contained (double) quotes and was used as a parameter for FORC,IRPC. - OPTION PROC:PUBLIC caused a syntax error. - EXITM did restore the line number too late. Thus the macro's line number was displayed in error msgs, although the macro function itself ran successfully. - regressions in v1.95: for SSE2 instructions CMPSD/MOVSD, the code which was generated wasn't correct. - no check was done to ensure that index for ST(n) doesn't exceed 7. - there was no error msg if a third argument was given for instructions which accept two arguments at most. - INVOKE: a general-purpose register which was assumed to be a function pointer wasn't accepted as first argument. - OPTION OLDSTRUCTS didn't work the way it does in Masm. Other changes: - -mz format option added. - directive OPTION MZ added. - a segment map was added to the listing file of binary formats. - undocumented (and useless) cmdline option -7 removed. - samples Mixed216 and Mixed232 added. - invalid cmdline options don't abort the assembly process anymore, just a warning is displayed. - GccDos.MAK, PellesC.MAK, BCC.MAK and TCC.MAK added. - the 16bit version, JWASMR, no longer supports -coff and -elf. It didn't work reliably in v1.95. - Makefile: creating JWASMD.EXE now also works with OW v1.8. - OW v1.8 used to create the JWasm binaries. Previously it was v1.7a. - INVOKE: extending a memory argument from word to dword won't destroy content of register EAX if option -Zg is set. - experimental support for x86-64 added to the source (not active in the binaries). - support for FASTCALL implemented, replaces language WATCOM_C. - options -zf0 and -zf1 added. - options -zzo and -zzp renamed to -zs0 and -zs1 for better name consistency. Option -zs2 added. - options -fp5 and -fp6 removed. They were useless. - instruction UD2 added (requires cpu .686) 05/26/2009, v1.95: Bugfixes: - listing of items in initialized structures was wrong. - listing for .STARTUP and .EXIT was messed up. - optional value behind .EXIT directive wasn't parsed correctly. - .LISTIF didn't display true conditionals inside macros. - -Sa cmdline option didn't set .LISTMACROALL - "if" state wasn't saved/restored if a macro had to be run in a line with expansion operator at the beginning of the line. - bit 6 returned by OPATTR was set for local variables only, but is has to be set for any indirect memory reference related to SS. - TYPE with indirect memory operand and a type coercion returned 0. - line continuation caused by a comma as last token did ignore empty lines. However, an empty line must stop the continuation. - OPATTR didn't accept expressions as operands which contained the OFFSET operator. - if the expression evaluator found a macro name, it changed the symbol's type to a label. Now error 'invalid symbol type in expression' is displayed. - if an INVOKE directive was first line to emit code bytes and was placed outside of a PROC, the code which was generated was wrong. - names of locals in macros beginning with a digit weren't rejected. - using OFFSET operator in 'LEA ,[ OFFSET ]' was rejected. - if an array of data items was defined, a terminating comma caused a syntax error. - if a term '.' was found in an expression, it wasn't handled similar to ' PTR '. - @InStr and @SizeStr returned result as string in radix 10, but current radix is to be used instead (which "usually" IS 10). - AT segments didn't work in v1.94. - ALIGN directive did emit bytes in BSS and AT segments. - OMF output format: segment and class names must be converted to uppercase for both OPTION CASEMAP:ALL and OPTION CASEMAP:NOTPUBLIC. - syntax check of LABEL directive wasn't restrictive enough. - labels within structure definitions wasn't rejected. - TYPE with struct operand returned wrong result in v1.94 if size of struct was > 8. - ASSUME did reject forward references to types. - syntax check for PUBLIC, EXTERN, EXTERNDEF, GROUP, ENDS, LOCAL wasn't fool-proved. - @SizeStr's parameter wasn't optional. - it wasn't possible to define an array of 0 items with the LOCAL directive, size was silently changed to 1 item then. - a forward reference to a symbol of RECORD type gave an error. - the MOD operator didn't check if second operand was zero. - syntax check for conditional assembly directives did accept invalid formats. - value of $ was wrong inside structure or array definitions. - reserved word '.386C' was missing. - once the cpu was set > .8086 it wasn't possible to set .8086 again. - wrong fixup generated for 32bit addressing modes if the symbol was 16bit. - JWasm got confused if a macro's VARARG parameter did start with a ','. - in v1.94, OPTION SEGMENT:USE32 set default segment size to USE16. - JWasm didn't reject an undefined symbol in an expression after IF. - OPATTR for code labels returned wrong value. - .NOCREF/.XCREF directives didn't accept arguments. - type conflicts for symbols which had an additional EXTERNDEF entry were detected for data labels only. - IF[N]DEF failed if was a forward reference. - ':' operator did clear a type which was set by the PTR operator. Test case: PTR ds:[0]. - hll expression evaluator did always handle the '()' operator, while it should handle it only if the expression enclosed contains a hll operator. - -D cmdline option didn't tolerate spaces between -D and macro name. - IF[N]DEF directive didn't work reliably in pass two. This was hardly noticed because in JWasm all passes except the first one handle preprocessed input only - usually. - protection exception occured if a parameter for INVOKE consist of a register pair (DS::SI) and value of register [E]AX was modified before. - forward references of assembly time variables were evaluated to 0, but the value must be the variable's value after pass one is finished. - in v1.94, data initializer of strings within structures didn't cover the full array length. - ASSUME ignored the PTR operator and accepted invalid types for register. - ENDP didn't complain if tokens were found behind the directive. - support for WATCOM_C calling convention was 32bit only. - for WATCOM_C, it was assumed that the caller does stack cleanup if not all parameters did fit into registers. However, this is true for VARARG procs only. - for WATCOM_C, register parameters weren't displayed correctly in the symbol list. - output format BIN: fixups might have been written multiple times, which then caused a bad binary. - output format BIN: relative offsets (jumps and calls) were calculated wrong. - OPTION PROC:PRIVATE made procedures private even if PUBLIC directives existed for them. - PROTOs will no longer accept PUBLIC attribute (Masm also rejects). - a PROC with attribute PRIVATE and a PUBLIC directive for the very same symbol wasn't rejected. - empty line in a COMMENT block may have been interpreted as EOF. - a forward reference to a symbol in a DB directive was rejected (initializer magnitude too large). - if two macro params were separated by one substitution operator (&) and the first param additionally had a & prefix, then the second param wasn't recognized (and substituted). - CMPSx string instruction was rejected if two segment overrides were used. Now it's rejected only if the second one is != ES:. - CTRL-Z in input files wasn't interpreted as EOF. - output format BIN: uninitialized variables located at the start of a segment were skipped. - output format BIN: stack segment was always written. Now it's written only if it isn't the last segment. - if radix was > 10, the literal created by the % operator may have contained lowercase letters ('a'-'f'), which isn't Masm-compatible. - if -Zm (OPTION M510) is set, reserved words which were introduced in "later" cpus should be free to use. For JWasm this still isn't fully true, but it's now possible to use the names introduced by MMX/K3D/SSE extensions. - OFFSET operator applied to a non-relocatable constant wasn't ignored. - listing of LABEL directive didn't display current offset. - handling of macro parameters improved so that strings enclosed in (double)quotes and containing '>' work similiar to Masm. - OMF format: size of PUBDEF records might have exceeded 1024. - for errors detected in pass two or later the source filename which was displayed may have been wrong. Other changes: - -Zg option implemented. - a hash table for local symbols has been implemented since the old implementation (linked list) was too slow if lots of local labels were defined. - OPTION OFFSET:SEGMENT supported. - GccUnix.mak added, MinGW.mak renamed to GccWin.mak. - -X option supported. - warning level for PAGE, TITLE, SUBTITLE changed from 3 to 4. - instruction FFREEP supported. - OWDOS16.mak and OWOS2.mak added. - -zze option added. - samples Window4, Mixed1 and OS232 added. 12/24/2008, v1.94c, bugfixes: - multiple filename arguments in cmdline didn't work in v1.94-v1.94b. 12/21/2008, v1.94b, bugfixes: - initialization of structure date items embedded in another structure data item didn't work in v1.94/v1.94a. 12/20/2008, v1.94a, bugfixes: - .LISTALL didn't enable listing. - ".IF 1" doesn't generate code, which made problems in v1.94. 12/19/2008, v1.94: Bugfixes: - INVOKE rejected a byte register if the parameter type was BYTE. - if additional cmdline options were given in a separate file - by '@' - then an exception might have occured. - syntax 'exitm<>' (no white space after 'exitm') wasn't accepted. - an external absolute symbol was sometimes forced to 16bit, which was a problem if the symbol was used in an operand for PUSH. - include paths set with -I had less precedence than include paths set in INCLUDE environment variable. - expression after .WHILE and .UNTIL wasn't optional. - keywords removed with OPTION NOKEYWORD weren't restored when another source module was to be assembled. - if more than one file was to be assembled, there was a risk that setting the include path by either option -I or environment variable INCLUDE caused a GPF. - size information was lost in an expression if a register plus displacement or scale factor was located AFTER the structure field. - in COMM directive, a language type followed by the NEAR|FAR keyword wasn't accepted and caused a syntax error. - invalid size of memory operands for CALL/JMP was silently changed to WORD/DWORD. - substitution operator (&) didn't work for macro function calls if the expansion operator (%) was first character on a line. - "TYPE " returned value of . Now 0 is returned. - "SIZE " wasn't accepted. - invalid fixup types for COFF format were accepted without error message. - if the filename parameter of an INCLUDE directive wasn't enclosed in <> and did start with a number, the file wasn't found. - MASK and WIDTH operators worked with bitfields only, not with RECORD types. - if OPTION OLDSTRUCTS was set, multiple occurances of the same struct definition may have caused error "symbol already defined". - access to memory locations without fixup, but with a segment override, was assumed with an offset magnitude equal to current CS, which isn't necessarily true. - it wasn't allowed to open a segment which was already "opened". - initializer for a structure wasn't ensured to be a literal enclosed in <> or {}. - the parser didn't distinguish between a single item and an array of size 1. Since data initialization is to be handled differently for these cases, this behavior wasn't compatible. - there was no test for a max. nesting level implemented if a macro called itself. Usual result was an "endless" loop. - if option -Fl was set and the assembly source didn't contain any instructions or data definitions, then all lines were listed twice. - if a required macro parameter was to be expanded, but expansion failed due to an undefined symbol, an access violation might have occured. - expansion of macro function calls in text equates failed if the string contained a '<', '>' or '!' character. - OPATTR returned 36 and OPATTR without operand caused a syntax error. In both cases OPATTR will now return 0. - SHORT operator did accept any operand types. - if a short jump destination was a forward reference and too far away, the error was displayed when the destination label was parsed. Now the error is displayed when the jump instruction is parsed. - environment variable "JWASM" wasn't handled as expected. - cmdline option -nd didn't work as expected. - expansion operator in TEXTEQU/CATSTR may have given unexpected results. - SIZEOF returned double the size for an internal item if it first was declared by an EXTERNDEF directive. - since v1.9, warning count was reset for every pass. - if a macro parameter was expanded due to the expansion operator %, it didn't work if at the first nesting level a macro function was expanded and at the next level a text macro had to be expanded. - numbers > 0xFFFFFFFFh weren't stored as text macros in all cases. - precedence of operator PTR changed from 5 to 4. This change makes syntax "TYPE PTR