flat assembler
Message board for the users of flat assembler.
Index
> Main > Why does this switch to protected mode crash? |
Author |
|
jiangfasm 27 Nov 2015, 05:54
Hello.you use far jump.
JMP dword select : Address |
|||
27 Nov 2015, 05:54 |
|
El Tangas 29 Nov 2015, 14:23
Exactly, FASM optimizes jumps so you have to force a far jump to load the code segment selector in CS.
From FASM manual: Quote:
The types of jumps: short, is equivalent to "ADD IP, signed displacement" near, equivalent to "MOV IP, immediate" far, equivalent to "MOV CS, immediate" and "MOV IP, immediate" all in one instruction. This is what you need. |
|||
29 Nov 2015, 14:23 |
|
revolution 29 Nov 2015, 14:30
El Tangas wrote: The types of jumps: |
|||
29 Nov 2015, 14:30 |
|
El Tangas 29 Nov 2015, 14:50
Ah, k I wrote that from memory. But there is an absolute jmp without changing CS, isn't there?
|
|||
29 Nov 2015, 14:50 |
|
revolution 29 Nov 2015, 23:43
El Tangas wrote: Ah, k I wrote that from memory. But there is an absolute jmp without changing CS, isn't there? Code: call [destination] call eax |
|||
29 Nov 2015, 23:43 |
|
CrazyZero 19 Jan 2016, 11:03
You must know a point what is the mechanism of addressing method of protected mode, when you know how to tranfrom a logical address to a linear address, you could find your answer.
|
|||
19 Jan 2016, 11:03 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.