32 bit problem with tasm - Programmers Heaven

Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

32 bit problem with tasm

ScorpieScorpie Posts: 5Member
hello,

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

Scorpie

Comments

  • BitdogBitdog Posts: 528Member
    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
    JNZ NOJMP
    JMP ITsSame ; extra code is only a few bytes machine code
    NOJMP:

    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.

    Bitdog

  • ScorpieScorpie Posts: 5Member
    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

    Scorpie
Sign In or Register to comment.