Re: [OSDev] How to switch to long mode in x86 CPUs?

Liste des GroupesRevenir à cl c 
Sujet : Re: [OSDev] How to switch to long mode in x86 CPUs?
De : mutazilah (at) *nospam* gmail.com (Paul Edwards)
Groupes : comp.lang.c
Date : 05. Mar 2025, 06:38:36
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vq8r56$2aape$1@dont-email.me>
References : 1 2 3 4 5 6 7 8
User-Agent : Microsoft Outlook Express 6.00.2800.1106
"bart" <bc@freeuk.com> wrote in message news:vq7nnu$20vba$1@dont-email.me...
On 04/03/2025 18:31, Paul Edwards wrote:
"bart" <bc@freeuk.com> wrote in message
news:vq208q$re74$1@dont-email.me...
On 02/03/2025 08:22, Paul Edwards wrote:
"Scott Lurndal" <scott@slp53.sl.home> wrote in message
news:JdFwP.46247$SZca.36276@fx13.iad...
"Paul Edwards" <mutazilah@gmail.com> writes:
"David Brown" <david.brown@hesbynett.no> wrote in message
news:vprtt6$3jah9$1@dont-email.me...
On 27/02/2025 16:57, Ar Rakin wrote:
>
>
Do you consider the concept of a BIOS (as seen as the IBM PC),
"legitimate to use"
>
In the abstract, possibly.  But the last half century has
shown that BIOS as an I/O abstraction layer was a bad idea
from the start.
>
and do you consider MSDOS (which uses that
BIOS) to be an operating system?
>
No, MSDOS was, is, will always be a simple program loader.
>
Plus manages memory.
>
How does it do that? I seem to recall that you got 640KB minus whatever
the resident parts of the OS needed.
>
Yes - and? Then you need to manage that memory, so you
need a memory manager, which MSDOS provides. It's not
trivial to write/debug one of those either.
>
I'm not sure what your question is exactly, so I'll include code
to call the interrupt (21H AH=48H) you need to obtain memory.
>
I was questioning whether MSDOS provided means to manage memory, since I
don't recall anything like that. My programs handled their own memory as
they did most other things.
>
This 0x48/48H syscall is new to me.

It's been around since DOS 2, ie this is MSDOS proper (DOS 1 was
just a clone/port of CP/M effectively).

Int 21/AH=48h

And your programs can handle their own memory - AFTER they
have obtained it from the operating system.

And since the OS (MSDOS) supports multiple such requests
for memory, it necessarily needs a memory manager.

(But it also looks like something it wouldn't use anyway, since it
appears to work like malloc in storing the allocated size. That's
something I would never need, and would be wasteful with the limited
memory available.

Nothing wasteful about that. The whole point is that you ask
for what you actually need.

Because I will either know the fixed size of the object I want to freed,
or would need to keep a record of it anyway if it's more dynamic.)

And? You still need to go to the OS to get that dynamic memory.

Am I missing something?

Perhaps you are talking in terms of an MSDOS program that
gets all available memory by default and then chooses to free
what it doesn't need. But you may not know how much to
free until later in the program. E.g. microemacs loading a
file to edit. It depends on how big the file is. Which depends
on which file they request to be loaded.

BFN. Paul.



Date Sujet#  Auteur
27 Feb 25 * [OSDev] How to switch to long mode in x86 CPUs?29Ar Rakin
27 Feb 25 +* Re: [OSDev] How to switch to long mode in x86 CPUs?14Keith Thompson
28 Feb 25 i`* Re: [OSDev] How to switch to long mode in x86 CPUs?13Ar Rakin
28 Feb 25 i +- Re: [OSDev] How to switch to long mode in x86 CPUs?1Waldek Hebisch
28 Feb 25 i `* OT: (Was: How to switch to long mode in x86 CPUs?)11Salvador Mirzo
28 Feb 25 i  +* Re: OT: USENET9Salvador Mirzo
1 Mar 25 i  i+* Re: OT: USENET7Richard Harnden
1 Mar 25 i  ii+* Re: OT: USENET2Ar Rakin
5 Mar 25 i  iii`- Re: OT: USENET1candycanearter07
2 Mar 25 i  ii`* Re: OT: USENET4Salvador Mirzo
2 Mar 25 i  ii `* Re: OT: USENET3Ar Rakin
2 Mar 25 i  ii  +- Re: OT: USENET1yeti
9 Mar 25 i  ii  `- Re: OT: USENET1Salvador Mirzo
1 Mar 25 i  i`- Re: OT: USENET1Ar Rakin
1 Mar 25 i  `- Re: OT:1Ar Rakin
28 Feb 25 +* Re: [OSDev] How to switch to long mode in x86 CPUs?12David Brown
28 Feb 25 i+* Re: [OSDev] How to switch to long mode in x86 CPUs?2Ar Rakin
1 Mar 25 ii`- Re: [OSDev] How to switch to long mode in x86 CPUs?1Dan Cross
1 Mar 25 i`* Re: [OSDev] How to switch to long mode in x86 CPUs?9Paul Edwards
2 Mar 25 i +* Re: [OSDev] How to switch to long mode in x86 CPUs?3Salvador Mirzo
2 Mar 25 i i+- Re: PC BIOS (was [OSDev] How to switch to long mode in x86 CPUs?)1Dan Cross
2 Mar 25 i i`- Re: [OSDev] How to switch to long mode in x86 CPUs?1Dan Cross
2 Mar 25 i `* Re: [OSDev] How to switch to long mode in x86 CPUs?5Paul Edwards
2 Mar 25 i  `* Re: [OSDev] How to switch to long mode in x86 CPUs?4bart
4 Mar 25 i   `* Re: [OSDev] How to switch to long mode in x86 CPUs?3Paul Edwards
4 Mar 25 i    `* Re: [OSDev] How to switch to long mode in x86 CPUs?2bart
5 Mar 25 i     `- Re: [OSDev] How to switch to long mode in x86 CPUs?1Paul Edwards
1 Mar 25 +- Re: [OSDev] How to switch to long mode in x86 CPUs?1Dan Cross
2 Mar 25 `- Re: [OSDev] How to switch to long mode in x86 CPUs?1Andy Valencia

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal