Releases: Baron-von-Riedesel/JWasm
Releases · Baron-von-Riedesel/JWasm
v2.19pre2
Bugfixes:
- format mz: stack segment was never written - a fault if it isn't
located at the end of the binary; see stack1.asm. - format mz,pe: start offset for first segment may have resulted in
an invalid binary; see org1.asm & org2.asm. - fastcall 32-bit (MS style): registers may have hold float arguments.
- no 'implicit far jmp/call to near label' error in pass one; see
group7.asm. - option -D: accept white spaces if option is enclosed in double quotes
( Masm compatible ). - subtraction of 2 labels may have caused error "constant value too large";
see minus1.asm. - if .model wasn't flat, but segments with flat attribute existed, they
may not have been listed in symbol table. - regression in v2.05-v2.18, DUP operator: if an undefined symbol was
contained in first operand, error message may have been omitted; see
struct43.asm. - local labels were accepted by PUBLIC directive without -Zm being set;
see public3.asm. - omf format: incorrect special handling of assembly-time variable fixups
removed; see label9.asm.
Other changes:
- write listing reworked.
- option -pe: add segments with combine type stack - they may contain
initialized data. - JWasmr.exe: option -Sz removed.
- PUSHW will emit warning "magnitude of offset exceeds 16-bit" if
operand is a 32-bit offset. - using 'option oldmacros' will cause a warning only.
- option -pe: info section ".drectve" will be scanned and some linker
options are recognized and handled. - PUBLIC directive extended to allow setting the export attribute.
- PAGE directive: syntax check added.
- .model flat: ensure variables in 16-bit segments can be accessed
directly if segment register is assumed flat ( Masm compatible );
see flat2.asm.
v2.18
Bugfixes:
- omffixup.c, debug version only: a superfluous %s in a debug display
may have caused an exception for output format omf. - invoke directive: vararg parameter now rejected if used as argument;
see vararg1.asm. - don't add "assume cs:dgroup" in tiny model if format is coff/elf or
model is flat; see tiny3.asm. - default fastcall for 32-bit (MS style) caused a GPF for non-proc
symbols; see fastcms.asm. - listing: when segment directive created a list entry, the offset size
may have been wrong. - omf format: externdef may have caused a PUBDEF record to be written
in pass 2, resulting in an invalid object module. - invoke directive: if cpu was 8086, and the argument was a constant 0,
a wrong value may have been pushed; see invoke56.asm. - jwasm may have entered an infinite loop if a structured variable wasn't
defined (yet), but a member name matched a local name; see undef2.asm.
Other changes:
- output format -djgpp: support added for 16-bit offset fixups.
- in listings, for directives, offset of 16-bit segments displayed with
width 4. - OWDOS32.mak added. Creates a 32-bit version that uses the native Open
Watcom runtime for extended DOS. Open Watcom 2.0 is recommended to
create this variant. - listing: relocations in code marked with lowercase letters.
v2.17
Bugfixes:
- option renamekeyword: if the keyword was renamed multiple times it
did work only if the first occurance of this option was after an
instruction or directive that triggered "fastpass"; see renkeyw.asm. - option renamekeyword: keywords weren't restored to their default at
end of pass; see renkeyw2.asm. - option renamekeyword: renaming an already renamed keyword may have
caused an infinite loop; see renkeyw3.asm. - size operand of DUP operator was checked to be positive, but wasn't
checked for 32-bit overflow; see constnt3.asm. - direct memory access with flat override ( for constant addresses )
may have generated error "cannot access label through segment registers";
see flatgrp3.asm. - regression in v2.16: invoke may have generated a "PUSHD" in 64-bit code
if .model wasn't flat; see invoke54.asm. - FLAT: override may have suppressed address size prefix; see
flatgrp4.asm. - invoke, 64-bit, non-win64, vararg: 32-bit registers were rejected as
arguments; see invoke55.asm. - display of assembly-time was correct only if CLOCKS_PER_SEC was 1000.
- listing of embedded structs/unions: the printed start offset was wrong
if the struct/union wasn't located before any code/data lines; see
struct42.asm. - djgpp output format was broken.
- COMM directive: if a type was given instead of a size, the type wasn't
stored in the symbol and hence couldn't be used in expressions; see
comm7.asm.
Other changes:
- option stackbase: may be used in conjunction with "assume ss" to
define a PROC where CS and SS differ in offset magnitude ( 16-bit
code with 32-bit stack and vice versa ); see stkbase1.asm, stkbase2.asm. - format -pe: 64-bit segments defined with USE64 are added to internal
"flat" group if model is flat. Allows to mix 32- and 64-bit segments in
.model FLAT; see flatgrp5.asm & flatgrp6.asm. - simplified segment directive .code with name argument in tiny model
always added the segment to dgroup. Now this is done only if segment's
offset size matches the model's offset size; see tiny2.asm. - RETs inside PROCs will now show up in listing file like in Masm; see
lst3.asm. - in listings, offset of 16-bit segments now displayed with width 4.
- offsets/displacements that are too large will now always cause error
"constant value too large"; see offset17/18/19.asm. - output format -djgpp ( special coff variant ), previously optional only,
is now activated as default.
v2.16
14.11.2022, v2.16:
Bugfixes:
- format mz: in the binary map of listings, the RVA of segments belonging
to a group may have been incorrect, since the group's align adjustment
was ignored; see grpalign.asm. - symbol $ is internally marked as assembly-time variable - this caused
fixup problems in OMF format; see fixup6.asm. - invoke directive, 32-bit code, "ADDR": if the address of a symbol
in a 16-bit segment was to be pushed, just a WORD was pushed ( Masm is
buggy, pushes a DWORD, then a WORD ); see invoke41.asm.
In the "reverse" case, that is, if the address of a symbol in a 32-bit
segment was to be pushed as a WORD in a 16-bit code segment, a DWORD
was pushed instead; see invoke43.asm. - invoke directive, 32-bit code, "OFFSET": if the address of a symbol
in a 16-bit segment was to be pushed, just a WORD was pushed ( Masm emits
an error in this case - this is now done as well ); see invoke42.asm.
The "reverse" case ( 16-bit code, address of a symbol in a 32-bit
segment to be pushed ) must also be rejected; see invoke44.asm. - invoke directive, "ADDR", "far ptr" modifier for vararg arguments: the
modifier was ignored, so that no segment part was pushed; see
invoke45.asm & invoke46.asm. - invoke directive, ptr types: invoke might have emitted error "argument
type mismatch" for arguments of type MT_PTR if their distance didn't
match the one from the memory model; see invoke47.asm - invoke52.asm. - externdef directive: if the symbol was already defined but neither
internal nor external, no error was emitted; see extern16.asm. - pointer to data did ignore default distance of memory model; see
dsize.asm. - option -pe: .data and .data? sections weren't merged; see pe11.asm.
- option -pe: if a section with initialized data (.reloc) followed a .data?
section, space for the .data? section was reserved in the binary; see
pe11.asm. - if the difference of 2 labels ( at least one is a forward reference ) is
used as operand for another op ( shift ), error 'constant is expected'
may have occured; see forward9.asm. - option -pe: binary without relocations got too long because the (empty)
.reloc section wasn't removed; see pe12.asm.
Other changes:
- option -pe: allow imports by number; see pe10.asm.
- option -Zg: increased Masm compatible codegen for hll expressions; see
hll4.asm. - warning "Prologue not at PROC start" (level 3) added if the procedure's
prologue isn't generated at the procedure's start address; see
invoke53.asm. - option -pe: default image bases changed to 0x10000000 for PE32 dlls,
0x140000000 for PE64 exes, 0x180000000 for PE64 dlls (MS link compat). - error 2058 ( "magnitude of offset exceeds 16-bit" ) changed to a warning
( level 3 ); see offset15.asm & offset16.asm. - if option -Zg is on, OPATTR is to return language bits for procs/protos
only; see opattr10.asm.
v2.15
Bugfixes:
- format bin, mz, omf, pe: fixup created by direct addressing without
symbol ( _DATA:1234h ) was still not always correct if segment was in a
group; see lea2.asm. - invoke directive: a missing left square bracket for indirect addressing
may have been accepted if the size of the register matched the expected
size; see invoke4.asm. - using long instead of intptr_t to hold result of _findfirst() caused a
GPF in Win64 version; see main.c. - erroneously emitted error 'Magnitude of offset exceeds 16-bit' in direct
addressing mode without symbol if segment register had no assume, segment
was 32-bit and default word size was 16-bit only; see offset14.asm. - prologue argument was ignored if procedure had no parameters and
locals; see loadds.asm. - text macro and macro function expansion might have caused a buffer
overflow if expanded line got too long; see expans42.asm & expans44.asm. - macro function expansion inside text macros had swallowed trailing white
spaces behind the macro invokation, sometimes resulting in errors; see
expans43.asm. - a constant defined via EQU could have been changed to an assembly-time
variable if the value didn't change; see equate30.asm. - if two relocatable items belonging to different segments were
subtracted in an expression on the right side of EQU, strange error
"symbol redefinition" was emitted when that symbol was used later; see
equate31.asm. - assembly-time variables: if the expression on the right side of the
equal sign contained an undefined symbol, it might have been ignored;
see expr7.asm. - -pe option: the name in the export directory may have started with a
slash/backslash.
Other changes:
- error "too many segments/sections defined..." emitted for omf and coff
if the number of segments/sections cannot be handled by those formats. - warning "64-bit label referenced with 32-bit fixup", introduced in v2.14,
will be emitted at level 4 only if the code referencing the label isn't
64-bit. - format coff: warning "Output format doesn't support anonymous fixups..."
displayed if a segment override other than FLAT: is used without symbol. - .model flat directive in 64-bit is now rejected in omf format.
- warning displayed in binary formats if a linker directive section is
detected. - warning displayed for PUSHW/PUSHD if operand is a segment register and
the size suffix doesn't match the current mode; see pushwsr.asm and
pushdsr.asm. - if user-defined prologue returns 0, offsets of local variables are no
longer "adjusted". This is undocumented Masm behavior; see prolog3.asm. - directive OPTION READONLY will no longer cause an error, just a warning
that it's ignored.
v2.14
20.12.2020, v2.14:
Bugfixes:
- regression in v2.13: if a not yet defined segment was added to a group,
it got the current offset size, which caused an error if this wasn't the
offset size when the segment was created; see group5.asm. - there was still the possibility that segments with different offset
sizes were added to the same group; see group6.asm. - string operation MOVSx with operands: if destination got an override
(ES:), a source without override was rejected; see string4.asm. - string operation MOVSx with operands: destination with override
!= ES wasn't rejected; see string5.asm. - string operations with symbolic memory operands did ignore assumes, thus
no segment prefix was created; see string8.asm. - comment behind MACRO directive was appended to all lines inside the
macro; see lst2.asm. - jwasmr.exe: memory corruption may have caused a system crash if pass one
ended with an error. - some errors occured in LP64 systems (linux, unix) because LONG_MAX and
LONG_MIN were used inadequately. - INVLPG with direct address >= 0x10000 in 16-bit code was rejected, even
if preceded by 'assume ds:flat'; see invlpg2.asm. - using direct addresses without symbol ( i.e. flat:[1234h] ) may have
caused a GPF if used in math opcodes ( CMP, OR, ...); see flatgrp2.asm. - option -bin: using direct addressing without symbol ( _DATA:1234h )
didn't store the offset in the binary; see data1.asm.
Other changes:
- jfc.asm translated to jfc.c so it can be used in both 32- and 64-bit
unix systems. - added runtest.sh, clrdir.sh and compress.sh to allow regression test in
unix systems. A few tests are skipped, since jwasmr.exe and MS link.exe
won't run in those systems. - DJGPP: djgpp apparently doesn't know "_stat", needs "stat" instead; see
omf.c - error "ADDR32 fixup to at location ..." emitted if 64-bit PE is
created and 32-bit fixup target address is >= 0x80000000; see pe7.asm. - warning "64-bit label referenced with 32-bit fixup" ( warning level 3 )
emitted if 32-bit address used for 64-bit target. - translation for 8/16/32-bit register arguments for INVOKE in 64-bit if
they are to be pushed; see invok64d.asm.
v2.13
Bugfixes:
- regression in v2.12: option -bin didn't work if binary started with
ORG != 0 ( i.e. DOS COM file format ); see bintest2.asm. - option -mz,-bin: invalid binary was written if a .bss or .stack segment
was followed by a segment with initialized data; see mz2.asm. - options -mz,-bin,-omf: a segment override may have caused a group
association to be ignored; see fixup5.asm. - options -mz,-bin: simplified segment directives now generate an assume
for CS that refers to the group (if the segment is in a group).
This solves some fixup problems; see fixup5a.asm. - INVOKE directive, 64-bit: if the calling convention wasn't win64
(=fastcall), an address argument was translated to a "push offset ",
which didn't work in 64-bit code; see invok64c.asm. - option -pe: if a DOS stub was added in the source (section .hdr$1), it
got the wrong segtype, resulting in an invalid binary; see pe4.asm. - stack offsets may have caused an error in 64-bit mode or a warning in
the other modes if an overflow occured; see stkdisp1.asm. - option -pe,-bin: relative fixups weren't handled correctly in all cases;
was relevant for 64-bit only; see pe5.asm. - if an 'undefined symbol' error was displayed, a wrong source file was
given if the error occured in a macro and the line was the first 'real'
code line; see undef1.asm. - a qword-sized parameter in an invoke wasn't pushed correctly if a .x64
directive was in the source, although the current mode was not 64-bit;
see invoke40.asm. - equates in listing weren't always displayed correctly if value exceeded
32-bit; see lst1.asm. - ensured that if cpu is 64-bit, .model is restricted to flat.
- TYPE operator didn't work with register operands inside square brackets;
see types16.asm & types17.asm. - in 64-bit mode, 16-bit index register wasn't rejected; see expr6.asm.
- assembly-time variables modified by directives SIZESTR/INSTR did set
the lower 32-bits of the value only; see equate29.asm. - option -pe: when arranging segments to sections, the segment names
defined in the source were used; this may have given unexpected results
if segment names were translated to section names ("_TEXT" to ".text" );
see pe6.asm. - hll directives: an internally created label was "swallowed" in some cases
if operators && and || were used in combination with brackets; see
rtcond10.asm - rtcond16.asm. - check for segment word size change wasn't as strict as Masm's. If a not
yet defined segment was added to a group, no consistency check was done
later when the segment was actually defined; see group4.asm. - 32-bit relative fixups were created only when the target was 64-bit. Now
they were created generally when the current segment is 64-bit. This
makes a difference for mixed-mode binaries ( -mz and -bin format ),
because it simplifies access of variables in 16-/32-bit segments from
64-bit; see relfix64.asm.
Other changes:
- project tree changed so all generated files are located in 'build'
subtree, and source files are in 'src'. - -Sz cmdline option added to suppress assembly result in listing. This
was mostly done to simplify comparing listing files in regression tests.