Qbasicnews.com
November 27, 2021, 05:46:23 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: TASM issue?  (Read 4903 times)
adosorken
*/-\*
*****
Posts: 3655



WWW
« on: August 08, 2004, 04:31:07 PM »

"Instruction can be compacted with override"

Wtf?! :Huh: This is after using a jg and a jnz. Any suggestions?
Logged

I'd knock on wood, but my desk is particle board.
Nexinarus
Wandering Guru
***
Posts: 301



WWW
« Reply #1 on: August 09, 2004, 03:22:32 AM »

Hah wtf? I suggest use NASM, but thats just me :p.
Logged
relsoft
*/-\*
*****
Posts: 3927



WWW
« Reply #2 on: August 09, 2004, 04:22:02 AM »

What switches are you using to assemble?
Logged

y smiley is 24 bit.


Genso's Junkyard:
http://rel.betterwebber.com/
DrV
Na_th_an
*****
Posts: 1553



WWW
« Reply #3 on: August 09, 2004, 09:59:18 AM »

If you use a jump, the default is a long jump, but you can force a short jump (when the destination is <128 bytes away) using something like "JMP SHORT location" or whatever.
Logged
adosorken
*/-\*
*****
Posts: 3655



WWW
« Reply #4 on: August 09, 2004, 01:34:29 PM »

/e /os /w2 /zn

jg short and jnz short would work and stop the warning? (It's only a warning but I always treat warnings as errors)
Logged

I'd knock on wood, but my desk is particle board.
DrV
Na_th_an
*****
Posts: 1553



WWW
« Reply #5 on: August 09, 2004, 01:37:38 PM »

I assume so... I don't use TASM, but a short jump is only 2 bytes, whereas a long jump is 4 bytes, which I guess is what the message is saying.  Oddly enough, DEBUG's assembler uses the short form whenever possible... weird. NASM makes you do it yourself and doesn't even tell you if it could be short...
Logged
Nexinarus
Wandering Guru
***
Posts: 301



WWW
« Reply #6 on: August 09, 2004, 03:13:47 PM »

real men know the time to use short opcodes.
Logged
adosorken
*/-\*
*****
Posts: 3655



WWW
« Reply #7 on: August 09, 2004, 03:58:33 PM »

I'm not a DOS assembly coder. I'm a Windows assembly coder. Tongue
Logged

I'd knock on wood, but my desk is particle board.
DrV
Na_th_an
*****
Posts: 1553



WWW
« Reply #8 on: August 10, 2004, 09:44:54 AM »

The short and long jumps are exactly the same in "Windows" 32-bit x86 ASM as in 16-bit "DOS" x86 ASM. It's just that some assemblers are smarter/more user friendly than others. Smiley
Logged
relsoft
*/-\*
*****
Posts: 3927



WWW
« Reply #9 on: August 10, 2004, 10:11:50 AM »

Try to add this at the top pf your proggie:

Jumps Smart

and  in the command line

/M

Not sure though but.

Jump Smart generates Nops and smartly jumps short whenever possible and /M is multipass I think.
Logged

y smiley is 24 bit.


Genso's Junkyard:
http://rel.betterwebber.com/
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!