flat assembler
Message board for the users of flat assembler.
Index
> Main > an executable format with segments instead of labels. |
Author |
|
revolution 11 Nov 2009, 13:03
Which output format are you using? MZ, PE, ELF, binary, other?
|
|||
11 Nov 2009, 13:03 |
|
edfed 11 Nov 2009, 13:59
i use .com and .bin by default.
with org XXXX only. and maybe, with many orgs, for each item segments. |
|||
11 Nov 2009, 13:59 |
|
vid 11 Nov 2009, 15:23
What you write is wrong in so many things it makes your question almost impossible to answer.
But anyway... Quote: in PM, the limit is 8195 descriptors in LDT and GDT. FASM is not the option in same category as PM or real mode. It is assembler that can use both PM and real mode, and doesn't put any limit on how many segment your code uses. |
|||
11 Nov 2009, 15:23 |
|
Azu 11 Nov 2009, 19:28
vid wrote: What you write is wrong in so many things it makes your question almost impossible to answer. If that's the case I also want to know. I thought you had to be in ring 0 to change them. |
|||
11 Nov 2009, 19:28 |
|
bitshifter 11 Nov 2009, 19:47
Are you wanting to classify objects and procedures in their own segments?
This seems like a terrible waste but i may not understand what you intend... Generally you only need a few descriptors like linear,code,data,tss... There may be a much simpler approach but what exactly is your goal? |
|||
11 Nov 2009, 19:47 |
|
edfed 11 Nov 2009, 22:21
the goal is to call a part of a program from an other program.
when label for an item is a relative ofset (relative rom org) it is hard to separate it from it's container. i want to make something like modular "hot" programming. something that let you use the strictlly same object or many different programms, or many times inside the same program. to import items without the need to recompile it. etc. for the lib, it is still the case, the same function can be called from many objecs at the same time. i want the same stuff for items and programms. of course, not everything will be segmented, but call items from other segments will be possible. i cannot find a better explanation for what i want to do. |
|||
11 Nov 2009, 22:21 |
|
revolution 12 Nov 2009, 00:34
edfed: Do you mean you want to make thread safe code? Or do you mean you want relocatable code? Or both?
|
|||
12 Nov 2009, 00:34 |
|
edfed 12 Nov 2009, 01:03
both. as well as for very big programs, as for a single instruction.
idem for datas. |
|||
12 Nov 2009, 01:03 |
|
revolution 12 Nov 2009, 01:41
For thread safe code just use the stack. For relocatable code just eliminate global data pointers. In a .com file type both of these are easy to do, just adjust DS/ES/FS/GS/SS based upon CS.
|
|||
12 Nov 2009, 01:41 |
|
bitshifter 12 Nov 2009, 02:33
I once did an API for a hobby OS by making a lookup table at
the top of the file (where offset was known) then other modules in different segments could access these functions with far calls. Does this sound like something you want to do in your code? |
|||
12 Nov 2009, 02:33 |
|
edfed 12 Nov 2009, 12:49
yes, it sounds like what i want to do.
but as it will be completely modular, i think about a tree access to items. with a path or anything that brings the location, independentlly from where it is really. |
|||
12 Nov 2009, 12:49 |
|
revolution 12 Nov 2009, 12:53
DLL?
|
|||
12 Nov 2009, 12:53 |
|
edfed 12 Nov 2009, 13:05
a little like DLL.
in some case, the same item could be imported from an external programm, like a sound generator in a synthetiser, or a character from a 3D game. sometimes, it will not be imported, but just called from destination. and sometimes, it will be cloned to destination. it is a sort of plug in scheme that i want, like in electronics. transistor have 3 pins, resistors have 2. items, functions or applications will have N pins. at the end, the goal is to plug an entire application insisde an other. |
|||
12 Nov 2009, 13:05 |
|
revolution 12 Nov 2009, 13:11
OLE! Windows already has that, perhaps you can go to the MS site and see how they achieve it.
|
|||
12 Nov 2009, 13:11 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.