flat assembler
Message board for the users of flat assembler.
Index
> Main > Jump tables in the DATA segment |
Author |
|
revolution 19 Dec 2009, 10:33
What file format are you using? PE? MZ? Binary? ELF?
|
|||
19 Dec 2009, 10:33 |
|
Bernhard Schornak 19 Dec 2009, 11:58
While my code runs on OS/2, it's probably LX (the native compressed executable format). On the other hand, I definitely want to port my stuff to 64 bit Windoze.
Okay, I have some minor problems to attach some sample code, so I add it here: Quote:
Last edited by Bernhard Schornak on 19 Dec 2009, 12:03; edited 1 time in total |
|||
19 Dec 2009, 11:58 |
|
revolution 19 Dec 2009, 12:02
In short, yes you can create jump tables in any segment you want. But depending upon the file format, some are easier to do than others.
A PE64 or PE32 output format will automatically create OS link/tables and things. But I am not sure what you want to do with the jump tables. If it just for OS interaction then there will be no problem with binding it in, the output formatters can do that for you. There are no attachments in this thread, did you attach to another thread? |
|||
19 Dec 2009, 12:02 |
|
Bernhard Schornak 19 Dec 2009, 12:07
I attached a file several times, but it didn't work. Hence, I added the code in the last reply.
Greetings from Augsburg Bernhard Schornak (How could I forget this two times???) |
|||
19 Dec 2009, 12:07 |
|
revolution 19 Dec 2009, 12:20
'.long' is just a dword absolute value of the link time code address.
In fasm just do this: Code: format ... segment ... jt0: dd lable0 dd lable1 segment ... lable0: mov eax,Something ret lable1: call Somewhere ret ... |
|||
19 Dec 2009, 12:20 |
|
Bernhard Schornak 20 Dec 2009, 19:45
Thank you!
I will give it a try if I find some time this week. What I'm going to do is to port this stuff http://schornak.sc.ohost.de/st-open/st7/e/700.htm to Windoze. Seems to be a nightmare or two... As a short test I hacked the usual beginner's MBR sample together and compiled it with fasm. The 249 byte binary looks okay, I check it with one of my old HDs later on. Greetings from Augsburg Bernhard Schornak |
|||
20 Dec 2009, 19:45 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.