Menu

More high level directives in JWASM

Nikkho
2014-09-06
2014-09-23
  • Nikkho

    Nikkho - 2014-09-06

    Hi Japheth,

    I am missing in JWASM some features that used to see in TASM:
    - FASTIMUL implementation.

    Also I would like to see some kind of optional optimizations options, that if enabled will for instance replace, and give a warning message when done, about some inneficient casuistics:
    - mov ah, 3 / mov al, 5 => mov ax, 0305h
    - dec cx / cmp cx, 0 / je label => dec cx / je label
    - shl cx, 1 / shl cx, 1 => shl cx, 2 (if .286 or later)
    - cmp cx, 0 / je label => jcxz label
    - mov eax, 0 => xor eax, eax (if flags are not used)
    - cmp eax, 0 => test eax, eax (if flags are not used)
    - mov eax, -1 => or eax, -1 (if flags are not used)

    Those would allow to get an extra performance boost while assembling with JWASM from an automatic ASM generated listing, and why not, to automatically optimize some third party codes.

    Reason to be it optional by using a command-line option and a directive, is of course that it could broke some internal code that could rely on timmings or code sizes.

    Looking forward to hear from you.

    Best Regards.

     
  • dosfan01

    dosfan01 - 2014-09-23

    UGH !! JWASM is an assembler, not a compiler. Any real assembly language programmer already knows how to do these very basic optimizations. The worst "feature" ever added to MASM was the ridiculous high-level language constructs. If you're going to use an assembler then write actual assembly language code, otherwise use a procedural high-level language like C.

     

Log in to post a comment.