Re: Help with Enter and Leave Instructions
- From: "T.M. Sommers" <tms@xxxxxx>
- Date: Tue, 13 Dec 2005 09:33:30 GMT
Frank Kotler wrote:
Betov wrote:
Also, this is not only a matter of Graphical instance. For doing something serious you must also have functions for Files accesses,
Unix has everything you need to read and write files.
for Memory Accesses,
Right. The int 80h interface only gives us "chunks" of memory. We need to manage the chunks ourselves. The "normal" way to do this would be with the C library's "malloc".
The only standard way to do it is via malloc. Do anything else and you rely on undocumented, nonstandard, implementation details.
We can write our own "malloc", but I suspect they'll conflict if we try to do both.
It would be a problem only if you used your own memory allocation alongside malloc in the same program (not counting the above-mentioned problem of being nonstandard). There are replacement mallocs around, and it is no problem using them, as long as you use only them.
This could be a problem, since using any library - Xlib, say - is likely to pull in libc also. So we may be "stuck" with C's malloc, if we use Xlib. (shouldn't be a problem with "libASM")
Yes, it could be a problem if any library function you call calls malloc.
for Debug support,
I'm not sure what you have in mind here. ELF has two ways to put symbolic debug info into the executable ("stabs" and "dwarf"). Gdb and ald use "stabs"...
It is more that Linux uses stabs. FreeBSD uses dwarf, but both Linux and FreeBSD use the GNU toolchain, which supports both.
This is very discouraging, because, quite frankely, if i had, for example, nowadays, to manage the tons of Memory Chunks, that i manage, in RosAsm, the way i was doing this, under DOS, ages ago, i would have better suicide, than giving it a try.
Well, I don't know how you were doing it in dos. Memory management isn't easy, especially if we need it to be re-entrant (which I think we do). But I don't think it's worth killin' yourself over. Courage! :)
Using malloc is pretty easy.
... and if all the competent Programmers around FASM have to show is, at best, a 1980-DOS-style console Demo,
Since MS-DOS copied a lot of its command-line interface from Unix, saying that Unix has a DOS-style interface gets things bass-ackwards.
For "serious work", I'd be tempted to use libraries, but I'd still have an inclination to keep everything "in house". A library written in asm - even if by somebody else - would be preferable to a library written in C, for example.
I really don't understand the objection to using C libraries. I mean, they are libraries; who cares what language they are written in? The OS is writtin mostly in C, and no one objects to calling it.
-- Thomas M. Sommers -- tms@xxxxxx -- AB2SB
.
- Follow-Ups:
- Re: Help with Enter and Leave Instructions
- From: randyhyde@xxxxxxxxxxxxx
- Re: Help with Enter and Leave Instructions
- From: Betov
- Re: Help with Enter and Leave Instructions
- References:
- Help with Enter and Leave Instructions
- From: biggerplum
- Re: Help with Enter and Leave Instructions
- From: randyhyde@xxxxxxxxxxxxx
- Re: Help with Enter and Leave Instructions
- From: Betov
- Re: Help with Enter and Leave Instructions
- From: biggerplum
- Re: Help with Enter and Leave Instructions
- From: Paul Dunn
- Re: Help with Enter and Leave Instructions
- From: \\\~\o/~///annabee
- Re: Help with Enter and Leave Instructions
- From: Jonathan Bartlett
- Re: Help with Enter and Leave Instructions
- From: \\\~\o/~///annabee
- Re: Help with Enter and Leave Instructions
- From: Frank Kotler
- Re: Help with Enter and Leave Instructions
- From: Betov
- Re: Help with Enter and Leave Instructions
- From: Frank Kotler
- Re: Help with Enter and Leave Instructions
- From: Betov
- Re: Help with Enter and Leave Instructions
- From: Frank Kotler
- Re: Help with Enter and Leave Instructions
- From: Betov
- Re: Help with Enter and Leave Instructions
- From: Frank Kotler
- Help with Enter and Leave Instructions
- Prev by Date: openGL in Linux
- Next by Date: Re: Help with Enter and Leave Instructions
- Previous by thread: openGL in Linux
- Next by thread: Re: Help with Enter and Leave Instructions
- Index(es):
Relevant Pages
|