32 bit problem with tasm


i wrote a program for tasm in a 16 bit version. i use lot of jump commands, so that the jumps are out of range for a 286 cpu.
so i replace it to 386. but now the data segment cant initialisized, i think.the errormassage is: "instruction can be compacted with override" and if i use a variable from the datasegment: "offset or pointer is 32-bit"
i thougt that the adressing is the same but it doesnt work.
is it possible to use 32bit in real dos mode (ms-dos 6)?
at least i use of course an 486 computer :-)

thanks for the fast help



  • I believe many of the 286 jumps are the same for a 386 & 486.
    I mean a short jump is 128 bytes in either direction on all CPUs.
    If your jump is out of range on one it will be out of range on the next.
    Do work around code. What looks big, extra, uneeded, .asm code
    adds up to a few extra bytes of code. So it's meaningless.
    AND since asm is fast any way, slower code that works is fine is ok
    in most all circumstances, avoiding repeat situations, loops, REPZ MOV/STO, stuff.
    I use JNZ then JMP to jump 65535 in any direction,
    or JMP FAR 0x####:####h ; jumps anywhere (hopefully the code is correct?)
    CMP AL,SOMETHING ;this is yer standard CMP & JMP NEAR code
    JMP ITsSame ; extra code is only a few bytes machine code

    My Masm6 didn't count instruction code bytes properly and
    wouldn't give the short jump out of range error when it was needed.
    I don't know if Tasm has that flaw?
    There are Tasm .asm programmers around here, a short code snipit
    like a small blank template, might get some comments that point out
    Tasm errors for you.


  • Hello,

    thanks for the fast feedback.
    with the tasm it is possible when it is 386 or higher to make unlimited jumps.
    if i define it for 386 the error appears like descripted in my first message.
    the jump on a 286 is limited as you wrote.
    is it possible that i send you my little project, that you could have a look at it? that might help me to find stupid little bugs.
    i have only one problem, the whole documentation is in german, but if you would be so kind to have a look at it, it wouldnt be a problem to translate it into english.

    best regards, thank you for your help

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!