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".
Way back in the dark ages I was fascinated by copy protection schemes
that were being used at the time and some of them used undocumented
INT 21h calls.
I found it interesting at the time even though I wasn't a hardcore
gamer.
Well, I did find Lounge Lizard Larry to be quite addictive.
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:
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.
pothead <pothead@snakebite.com> news:10h7mil$fq1s$1@pothead.dont-email.me Mon,
08 Dec 2025 23:21:57 GMT in comp.os.linux.advocacy, wrote:
Way back in the dark ages I was fascinated by copy protection schemes
that were being used at the time and some of them used undocumented
INT 21h calls.
Yep! Did you ever see any of them rerouting any while they were in use? Sneaky
bastages.
I found it interesting at the time even though I wasn't a hardcore
gamer.
Well, I did find Lounge Lizard Larry to be quite addictive.
<G> That series was fun!
Beat the pants off (no pun intended) of Where in the world is Carmen sandiego.
Give a Democrat a fish and he'll eat all day.
Teach a Democrat to fish and......
He'll steal your rod
Take your wallet
Assault the fish &
Blame Trump.
On 2025-12-10, Gremlin <nobody@haph.org> wrote:
pothead <pothead@snakebite.com>
news:10h7mil$fq1s$1@pothead.dont-email.me Mon, 08 Dec 2025 23:21:57 GMT
in comp.os.linux.advocacy, wrote:
Way back in the dark ages I was fascinated by copy protection schemes
that were being used at the time and some of them used undocumented
INT 21h calls.
Yep! Did you ever see any of them rerouting any while they were in use?
Sneaky bastages.
I have heard something about that but personally I don't recall
experiencing it myself. It might explain why I sometimes had
difficulties tracing what the code was doing. Expected vs actual
results.
I found it interesting at the time even though I wasn't a hardcore
gamer.
Well, I did find Lounge Lizard Larry to be quite addictive.
<G> That series was fun!
Beat the pants off (no pun intended) of Where in the world is Carmen
sandiego.
I never understood the fascination with that game.
Maybe I missed the point?
pothead <pothead@snakebite.com> news:10hcd85$1m977$1@pothead.dont-email.me Wed, 10 Dec 2025 18:13:25 GMT in comp.os.linux.advocacy, wrote:
On 2025-12-10, Gremlin <nobody@haph.org> wrote:
pothead <pothead@snakebite.com>
news:10h7mil$fq1s$1@pothead.dont-email.me Mon, 08 Dec 2025 23:21:57 GMT
in comp.os.linux.advocacy, wrote:
Way back in the dark ages I was fascinated by copy protection schemes
that were being used at the time and some of them used undocumented
INT 21h calls.
Yep! Did you ever see any of them rerouting any while they were in use?
Sneaky bastages.
I have heard something about that but personally I don't recall
experiencing it myself. It might explain why I sometimes had
difficulties tracing what the code was doing. Expected vs actual
results.
I found it interesting at the time even though I wasn't a hardcore
gamer.
Well, I did find Lounge Lizard Larry to be quite addictive.
On 12/12/2025 6:44 pm, Gremlin wrote:
pothead <pothead@snakebite.com>
news:10hcd85$1m977$1@pothead.dont-email.me
Wed, 10 Dec 2025 18:13:25 GMT in comp.os.linux.advocacy, wrote:
On 2025-12-10, Gremlin <nobody@haph.org> wrote:
pothead <pothead@snakebite.com>
news:10h7mil$fq1s$1@pothead.dont-email.me Mon, 08 Dec 2025 23:21:57 GMT >>>> in comp.os.linux.advocacy, wrote:
Way back in the dark ages I was fascinated by copy protection schemes >>>>> that were being used at the time and some of them used undocumented
INT 21h calls.
Yep! Did you ever see any of them rerouting any while they were in use? >>>> Sneaky bastages.
I have heard something about that but personally I don't recall
experiencing it myself. It might explain why I sometimes had
difficulties tracing what the code was doing. Expected vs actual
results.
I found it interesting at the time even though I wasn't a hardcore
gamer.
Well, I did find Lounge Lizard Larry to be quite addictive.
Wasn't it "Leasuresuit Larry in the Land of the Lounge Lizards"!! (Did
all the Devs have a name beginning with 'L' or something??)
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,089 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 155:08:44 |
| Calls: | 13,921 |
| Calls today: | 2 |
| Files: | 187,021 |
| D/L today: |
3,912 files (989M bytes) |
| Messages: | 2,457,198 |