Hi,

On Tue, Apr 11, 2017 at 1:26 AM, Mateusz Viste <mate...@nospam.viste.fr> wrote:
> On Mon, 10 Apr 2017 23:30:35 -0500, Rugxulo wrote:
>>
>> Unless I'm mistaken, conditional jumps on 8086 don't go beyond -128 ..
>> 127 (signed) byte range. Hence the billions of workarounds (TASM
>> "jumps", MASM "option ljmp", etc).
>
> I won't argue about what opcode is or is not available on 8086, since I
> did not bother decoding their exact meaning. I do see however that (NASM
> at least) can assemble JZ and JZ SHORT in two very different forms, JZ
> SHORT being significantly shorter.
>
>   5 00000000 B80100          mov ax, 1
>   6 00000003 48              dec ax
>   7 00000004 746A            jz short gameover
>
>   5 00000000 B80100          mov ax, 1
>   6 00000003 48              dec ax
>   7 00000004 7503E9DD01      jz gameover
>
> Of course NASM always uses the short form whenever it's possible, but
> when the jump is too far away it silently uses the longer form, hence the
> need to always specify SHORT if one wants to be sure what's going on.

AFAIK, the longer one is 386+ only, hence not available with "cpu
8086". Thus, if it still quietly assembles, that is a bug (but I
thought that was long-ago fixed/avoided).

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to