Groups | Search | Server Info | Login | Register


Groups > comp.os.linux.misc > #78499

Re: What Thinkest Thou Of LO Donate Banner?

From vallor <vallor@vallor.earth>
Newsgroups comp.os.linux.advocacy, comp.os.linux.misc
Subject Re: What Thinkest Thou Of LO Donate Banner?
Date 2025-12-08 14:30 +0000
Organization The Unnamed Newswriter
Message-ID <10h6nea$6are$1@dont-email.me> (permalink)
References (19 earlier) <20251203083900.00002c04@gmail.com> <XnsB3AAAD7A1C510HT1@cF04o3ON7k2lx05.lLC.9r5> <10h2u70$36bnl$1@dont-email.me> <XnsB3AEDB28EFFADHT1@cF04o3ON7k2lx05.lLC.9r5> <10h5kjp$3tql3$1@dont-email.me>

Cross-posted to 2 groups.

Show all headers | View raw


At Mon, 08 Dec 2025 04:36:08 +0000, vallor <vallor@vallor.earth> wrote:

> At Mon, 8 Dec 2025 02:32:39 -0000 (UTC), Gremlin <nobody@haph.org>
> wrote:
> 
> > vallor <vallor@vallor.earth> news:10h2u70$36bnl$1@dont-email.me Sun,
> > 07 Dec 2025 04:01:36 GMT in comp.os.linux.advocacy, wrote:
> >
> > > At Wed, 3 Dec 2025 22:03:12 -0000 (UTC), Gremlin <nobody@haph.org>
> > > wrote:
> > >> read_file: rem as the name implies, it reads bytes into a buffer.
> > >> :-) rem as with write_file, you need to predefine the dx register
> > >> for the rem buffer where you want the info stored. Like so:
> > >> dx=varptr(buffer(0)) rem if you don't, this routine will not work,
> > >> or will overwrite some rem other section of memory. And for virus
> > >> coding, this is very bad! :) rem cx register is how many bytes to
> > >> read :) if file_handle>4 then ax=&hex3f00 bx=file_handle
> > >> cx=bytesize int86(&hex21,ax,bx,cx,dx,na,na,na,na,na) bytesread=ax
> > >> endif return
> > >
> > > Hey, just wanted to mention that Linux used to use int86(0x80,...)
> > > for its own syscalls.  In C, read(2) is the way to read into a
> > > buffer, which would set up the syscall (call to interrupt 0x80).  I
> > > guess in DOS, C would set up the interrupt call similar to how you
> > > show, and then call the interrupt.
> >
> > I remember from writing elf binaries. <G> Fun and educational times.
> >
> > > Modern processors have an actual SYSCALL intrinsic, so no more
> > > interrupt call to enter the kernel.
> >
> > Windows API calls can still be used to enter the kernel. Modern CPUs
> > running a flavor of DOS still respect DOS interrupt calls when
> > running in 'real mode'  kernel entrance. It's known as 'real mode' vs
> > 'Protected mode and virtualization'
> >
> > As for Linux, here's a c/p from google AI:
> >
> > Yes, Linux absolutely uses interrupts and interrupt calls (like the
> > syscall instruction on modern CPUs) to allow user-space processes to
> > request kernel services, enabling privileged kernel access for tasks
> > like file I/O or process management, with specific mechanisms like
> > IRQs for hardware, `syscall` for system calls, and exceptions for
> > errors all transitioning the CPU to kernel mode (Ring 0) to execute
> > privileged code. Modern systems use efficient instructions like
> > syscall for system calls, but the core principle of interrupt-driven
> > transitions to kernel space for privileged operations remains
> > fundamental. ***
> >
> > The 286 was the first to offer protected mode access. It was
> > significantly improved with the 386. Modern CPUs still offer real
> > mode as well. So, I'm not sure what you mean exactly by a modern CPU
> > in this instance? Or what you mean by no more interrupt call to enter
> > the kernel?
> 
> Exactly.  "SYSCALL" is an opcode on x86_64 processors, and from
> what I've read, it's faster than using an interrupt.  (But don't
> quote me on that. ;)   )
> 
> My main point, though, was the similarity of how DOS handled
> things -- it's basically the old-style "syscall" (setting up
> registers, maybe some stack, and then raising an interrupt),
> even if it wasn't known as a "syscall".
> 
> > > I remember DOS interrupts 0x21 (DOS itself), and 0x10(BIOS, iirc).
> >
> > <G> It takes me back man.

BTW, outlining my thought process:

Saw your call to int86(0x21,...) to read to a buffer.

Recognized that as basically the same as Linux's (old)
syscall mechanism of raising an interrupt to call the kernel ABI.

Looked up the "syscall interrupt" on the net, discovered that it
used to be 0x80, but now newer processors use a new opcode,
"SYSCALL".

 ...and so forth.

-- 
-v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090Ti 24G
   OS: Linux 6.18.0 D: Mint 22.2 DE: Xfce 4.18 
   NVIDIA: 580.105.08 Mem: 258G
   "If at first you don't succeed, then Sky Diving is not for you!"

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Re: What Thinkest Thou Of LO Donate Banner? Gremlin <nobody@haph.org> - 2025-12-02 20:13 +0000
  Re: What Thinkest Thou Of LO Donate Banner? John Ames <commodorejohn@gmail.com> - 2025-12-03 08:39 -0800
    Re: What Thinkest Thou Of LO Donate Banner? "Carlos E.R." <robin_listas@es.invalid> - 2025-12-03 19:42 +0100
    Re: What Thinkest Thou Of LO Donate Banner? Gremlin <nobody@haph.org> - 2025-12-03 22:03 +0000
      Re: What Thinkest Thou Of LO Donate Banner? Brock McNuggets <brock.mcnuggets@gmail.com> - 2025-12-03 22:36 +0000
        Re: What Thinkest Thou Of LO Donate Banner? Gremlin <nobody@haph.org> - 2025-12-04 03:05 +0000
          Re: What Thinkest Thou Of LO Donate Banner? Brock McNuggets <brock.mcnuggets@gmail.com> - 2025-12-04 14:24 +0000
            Re: What Thinkest Thou Of LO Donate Banner? The Natural Philosopher <tnp@invalid.invalid> - 2025-12-04 14:35 +0000
              Re: What Thinkest Thou Of LO Donate Banner? John Ames <commodorejohn@gmail.com> - 2025-12-04 08:21 -0800
                Re: What Thinkest Thou Of LO Donate Banner? The Natural Philosopher <tnp@invalid.invalid> - 2025-12-04 18:05 +0000
                Re: What Thinkest Thou Of LO Donate Banner? John Ames <commodorejohn@gmail.com> - 2025-12-04 10:09 -0800
                Re: What Thinkest Thou Of LO Donate Banner? The Natural Philosopher <tnp@invalid.invalid> - 2025-12-04 19:09 +0000
                Re: What Thinkest Thou Of LO Donate Banner? John Ames <commodorejohn@gmail.com> - 2025-12-04 11:11 -0800
                Re: What Thinkest Thou Of LO Donate Banner? The Natural Philosopher <tnp@invalid.invalid> - 2025-12-04 19:55 +0000
                Re: What Thinkest Thou Of LO Donate Banner? Gremlin <nobody@haph.org> - 2025-12-04 22:47 +0000
                Re: What Thinkest Thou Of LO Donate Banner? Brock McNuggets <brock.mcnuggets@gmail.com> - 2025-12-05 00:15 +0000
              Re: What Thinkest Thou Of LO Donate Banner? Gremlin <nobody@haph.org> - 2025-12-04 22:48 +0000
                Re: What Thinkest Thou Of LO Donate Banner? Brock McNuggets <brock.mcnuggets@gmail.com> - 2025-12-05 00:14 +0000
            Re: What Thinkest Thou Of LO Donate Banner? Gremlin <nobody@haph.org> - 2025-12-04 22:47 +0000
              Re: What Thinkest Thou Of LO Donate Banner? Brock McNuggets <brock.mcnuggets@gmail.com> - 2025-12-05 00:16 +0000
      Re: What Thinkest Thou Of LO Donate Banner? John Ames <commodorejohn@gmail.com> - 2025-12-03 14:41 -0800
        Re: What Thinkest Thou Of LO Donate Banner? Gremlin <nobody@haph.org> - 2025-12-04 03:05 +0000
      Re: What Thinkest Thou Of LO Donate Banner? vallor <vallor@vallor.earth> - 2025-12-07 04:01 +0000
        Re: What Thinkest Thou Of LO Donate Banner? Gremlin <nobody@haph.org> - 2025-12-08 02:32 +0000
          Re: What Thinkest Thou Of LO Donate Banner? vallor <vallor@vallor.earth> - 2025-12-08 04:36 +0000
            Re: What Thinkest Thou Of LO Donate Banner? vallor <vallor@vallor.earth> - 2025-12-08 14:30 +0000
              Re: What Thinkest Thou Of LO Donate Banner? pothead <pothead@snakebite.com> - 2025-12-08 23:21 +0000
                Re: What Thinkest Thou Of LO Donate Banner? The Natural Philosopher <tnp@invalid.invalid> - 2025-12-09 10:01 +0000
                Re: What Thinkest Thou Of LO Donate Banner? Gremlin <nobody@haph.org> - 2025-12-10 01:37 +0000
                Re: What Thinkest Thou Of LO Donate Banner? pothead <pothead@snakebite.com> - 2025-12-10 18:13 +0000
                Re: What Thinkest Thou Of LO Donate Banner? Brock McNuggets <brock.mcnuggets@gmail.com> - 2025-12-10 20:06 +0000
                Re: What Thinkest Thou Of LO Donate Banner? Gremlin <nobody@haph.org> - 2025-12-12 07:44 +0000
                Re: What Thinkest Thou Of LO Donate Banner? Daniel70 <daniel47@nomail.afraid.org> - 2025-12-12 22:39 +1100
                Re: What Thinkest Thou Of LO Donate Banner? The Natural Philosopher <tnp@invalid.invalid> - 2025-12-12 12:18 +0000
              SYSCALL "Carlos E.R." <robin_listas@es.invalid> - 2025-12-10 14:01 +0100
            Re: What Thinkest Thou Of LO Donate Banner? Gremlin <nobody@haph.org> - 2025-12-10 01:37 +0000

csiph-web