TASM and far jumps from 16-bit segment to 32-bit segment 
Author Message
 TASM and far jumps from 16-bit segment to 32-bit segment

When writing a small bootup routine that switches to protected mode,
when jumping from the 16-bit segment to a 32-bit segment, why
does TASM compile the line:

jmp     fword ptr ds:[ProtectedModeAddress]

as:

jmp     far word ptr ds:[ProtectedModeAddress]?

After a little annoyance, I decided to manually insert the
default size override as follows:

db      66h
jmp     fword ptr ds:[ProtectedModeAddress]

The above code now works, but my question is this: why doesn't
TASM compile it correctly without the db 66h?



Sat, 24 May 2003 03:00:00 GMT  
 TASM and far jumps from 16-bit segment to 32-bit segment


Quote:

> When writing a small bootup routine that switches to protected mode,
> when jumping from the 16-bit segment to a 32-bit segment, why
> does TASM compile the line:

> jmp        fword ptr ds:[ProtectedModeAddress]

> as:

> jmp        far word ptr ds:[ProtectedModeAddress]?

> After a little annoyance, I decided to manually insert the
> default size override as follows:

> db 66h
> jmp        fword ptr ds:[ProtectedModeAddress]

> The above code now works, but my question is this: why doesn't
> TASM compile it correctly without the db 66h?

Because you are jumping from a 16-bit segment...

--
Visit my web-page at "http://pws.prserv.net/neptun"

Sent via Deja.com
http://www.deja.com/



Sun, 01 Jun 2003 03:00:35 GMT  
 TASM and far jumps from 16-bit segment to 32-bit segment

Quote:
>> jmp    fword ptr ds:[ProtectedModeAddress]

>> as:

>> jmp    far word ptr ds:[ProtectedModeAddress]?

Ever tried:

jmp [fword ProtectedModeAddress]

?

Don't know if it works. But it's worth the try.

Gruss
Julian

--
Zum Antworten via Mail .nospam in der ElektroPost (eMail fuer die Neudeutschen)
Adresse entfernen.
(To reply simply remove .nospam in my email address.)



Mon, 02 Jun 2003 04:44:14 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. 32-bit addr in 16-bit segments - help!!!

2. 16-bit to 32-bit segments

3. jumping from 16 bit seg to 32 bit seg in TASM

4. Division 32-Bit/32-Bit with 16-Bit Register

5. Error with TASM and ILINK: Unsupported 16-bit segment

6. 16, 16/32, 32 bit Forths: Pros/Cons?

7. 32 and 16 bit instructions in TASM

8. 32 and 16 bit instructions in TASM

9. 32 bit ST communicating with 16 bit VB

10. How to use SE at any color resolution (256, 16-bit, 32-bit)

11. Can I use 16 bit DLL and 32-bit exe together

12. Changing from 16-bit to 32-bit makes zillion duplicate symbols

 

 
Powered by phpBB® Forum Software