Hi...
I have two questions about programming for OS/2.
First, what is the DOS interrupt to give up
timeslicing back to the OS? I think its 2F, but can
someone tell me for sure? And when specifically should
a timeslice be given back to OS/2? (keyboard idling,
etc?)
And second, I have MS-PDS 7.1 (QuickBasic), which can build both DOS and OS/2 applications. It works wonderful, except for some
reason I can't perform ANY "low level" operations if I
want to compile for OS/2 (ie. poking around in memory,
calling interrupts, etc). I think there is a way
around this in the BC compiler (or possibly the
linker?) but does anyone know why?
IF ISTRUE BIT(pbvHost, 8%) THEN ' In WIN environment > ! pushDS
! mov AX, &H1680; Save DS for PowerBASIC > ! mov AX, &H8600 ; Place function $AH68in AX > ! mov CX, &H00 ; Use less than 1000 MS delay > ! mov DX, &H0A00 ; Try &H0A00 for a delay in DX
! int &H2F
! pop DS
ELSE ' Not in a WIN environment > ! push DS
! int &H15 ; Call timer interrupt
! pop DS
END IF
And second, I have MS-PDS 7.1 (QuickBasic), which can build both DOS
and OS/2 applications. It works wonderful, except for some reason I
can't perform ANY "low level" operations if I want to compile for
OS/2 (ie. poking around in memory, calling interrupts, etc). I think
there is a way around this in the BC compiler (or possibly the
linker?) but does anyone know why?
Koi.
But writing a deltree program is not rocket science.
There is nothing to be coy about, really. Just
remember to test it on a directory whose contents are
expendable, just in case it works.
Ooooh Dave ..
BC? Is that the suffix for the year it was written? ... :-)
Gordon Letwin would roll in his grave if he were in it! ;)
... Since you asked about a deltree
program in the main OS/2 echo the other day, why don't
you try writing one of those? It would give you a nice
introduction to API programming if you bypass your
compiler's RTL and make direct calls into OS/2.
Remember the name for those pretty fishees that swim around in the
tanks im in the foyer of the better Asian restaurants? ;)
Hi...>
In warp 3 and warp 4 beyond FP 6, the call is AX = 1680h Int => source tidbits for the PowerBASIC crew? There have been a
2fh. Note that the call was broken in the warp 4 GA version up
till FP 6 was released. You can also use the slightly less
effecient DOS IDLE Int = 28h.
I didn't know the FP 6 part of this!
I have a pascal unit that encapsulates all this and a lot more,
such as OS detection, for every Intel based OS, drop an email to
leea@psynet.net if you want a copy.
would you mind if I got it from you and posted in the
Posting it there, and/or, perhaps, adapting it to in-line> assembler might be worth a lot to folks...
In warp 3 and warp 4 beyond FP 6, the call is AX = 1680h Int =
2fh. Note that the call was broken in the warp 4 GA version up
till FP 6 was released. You can also use the slightly less
effecient DOS IDLE Int = 28h.
I have a pascal unit that encapsulates all this and a lot more,
such as OS detection, for every Intel based OS, drop an email to
leea@psynet.net if you want a copy.
In warp 3 and warp 4 beyond FP 6, the call is AX = 1680h Int => source tidbits for the PowerBASIC crew? There have been a
2fh. Note that the call was broken in the warp 4 GA version up
till FP 6 was released. You can also use the slightly less
effecient DOS IDLE Int = 28h.
I didn't know the FP 6 part of this!
I have a pascal unit that encapsulates all this and a lot more,
such as OS detection, for every Intel based OS, drop an email to
leea@psynet.net if you want a copy.
would you mind if I got it from you and posted in the
Posting it there, and/or, perhaps, adapting it to in-line> assembler might be worth a lot to folks...
> They do not generate any interrupt; they simply fiddle someThe OS/2 API is built on call gates and ring gates, not interrupts.
And are not those gates accessed via an interrupt?
No.
Call gates are simply part of protected mode execution.
The use of an INT instruction in p-mode, as per PC-DOS/MS-> DOS/DR-DOS + DPMI (e.g. Win 3.x/9x/Me), NT and LINUX, is an
I guess that makes OS/2 a "Gates environment".
...I would like to have an Intel or AMD manual about the i386
because this stuff IMHO is best explained by the processor
vendor but I have only a bad german short reference. One
of these days I should "lend" one from the library...
I have an old (vintage 1987) book by Stephen P. Morse, Eric J. Isaacson, and Douglas J. Alpert: "The 80386/387 Architecture" [ISBN 0-471-85352-0012]. Morse was the architect of the 80386. I imagine
that this book is now out of print. You might be able to find it in
a secondhand bookstore, or on some Web bookstore site (avoid
amazon.com except as a last resort; they charge entirely too much for out-of-print books. bibliofind.com now belongs to amazon.com, so
they, too, are useless. Try ABEbooks.com. There may be others.)
Well, to be exact: OS/2 uses callgates to jump into kernel code. [...]
Ah, but are not those callgates accessed through an interrupt?
Well, to be exact: OS/2 uses callgates to jump into kernel code. [...]
Ah, but are not those callgates accessed through an interrupt?
I would like to have an Intel or AMD manual about the i386 because
this stuff IMHO is best explained by the processor vendor but I have
only a bad german short reference. One of these days I should "lend"
one from the library...
First, OS/2 doesn't use interrupts. [...]
Not to niggle the point, but of course OS/2 uses interrupts. Each
and every one of those API calls is a wrapper around an interrupt call.
I have an old (vintage 1987) book by Stephen P. Morse, Eric J. Isaacson, and Douglas J. Alpert: "The 80386/387 Architecture" [ISBN 0-471-85352-0012]. Morse was the architect of the 80386. I imagine>...
that this book is now out of print. You might be able to find it in
a secondhand bookstore, or on some Web bookstore site (avoid
amazon.com except as a last resort; they charge entirely too much for out-of-print books. bibliofind.com now belongs to amazon.com, so
they, too, are useless. Try ABEbooks.com. There may be others.)
Is this book black? I'm just asking because two of my friends had>really good books about the 80286 while I had -- well, a
Anyway, I trusted your words and ordered "The 80386/387>Architecture" from ABEbooks.com. It's only 12$, so no big
I had assumed that OS/2 used the same method of
forcing a processor exception
to jump to ring zero as MonopolySoft uses, apparently I was wrong.
I had simply assumed that OS/2 used the same invalid int trick to
switch rings as Win does.
I would like to have an Intel or AMD manual about the i386 because
this stuff IMHO is best explained by the processor vendor but I have
only a bad german short reference. One of these days I should
"lend" one from the library...
I had assumed that OS/2 used the same method of forcing a processorexception
to jump to ring zero as MonopolySoft uses, apparently I was wrong.
I had simply assumed that OS/2 used the same invalid int trick to
switch rings as Win does.
And second, I have MS-PDS 7.1 (QuickBasic), which can build both DOS
and OS/2 applications. It works wonderful, except for some reason I
can't perform ANY "low level" operations if I want to compile for
OS/2 (ie. poking around in memory, calling interrupts, etc). I think
there is a way around this in the BC compiler (or possibly the
linker?) but does anyone know why?
First, OS/2 doesn't use interrupts. You have to use API calls.
Second, since OS/2 is a multitasking OS, it manages memory much
differently than DOS does.
Not to niggle the point, but of course OS/2 uses interrupts. Each and every one of those API calls is a wrapper around an interrupt call.
>> since OS/2 is a multitasking OS, it manages memory much differentlyFirst, OS/2 doesn't use interrupts. You have to use API calls.
Second,
Not to niggle the point, but of course OS/2 uses interrupts. Each and every one of those API calls is a wrapper around an interrupt call.
And second, I have MS-PDS 7.1 (QuickBasic), which can build both DOS> since OS/2 is a multitasking OS, it manages memory much differently than
and OS/2 applications. It works wonderful, except for some reason I
can't perform ANY "low level" operations if I want to compile for
OS/2 (ie. poking around in memory, calling interrupts, etc). I think
there is a way around this in the BC compiler (or possibly the
linker?) but does anyone know why?
First, OS/2 doesn't use interrupts. You have to use API calls. Second,
Gordon Letwin would roll in his grave if he were in it! ;)> Philippe Kahn or Anders Forsberg ...
I didn't think Gordon Letwin ever worked for Borland. Now
I would like to have an Intel or AMD manual about the i386 because
this stuff IMHO is best explained by the processor vendor but I have
only a bad german short reference. One of these days I should
"lend" one from the library...
I would like to have an Intel or AMD manual about the i386 because
this stuff IMHO is best explained by the processor vendor but I
have only a bad german short reference. One of these days I should
"lend" one from the library...
ftp server: download.intel.com
directory: /design/PentiumII/manuals
or: /design/Pentium4/manuals
Just slurp all the .PDF files (binary mode, of course) and you should
have all the library that does not require a NDA.
First, OS/2 doesn't use interrupts. You have to use API calls.
Second, since OS/2 is a multitasking OS, it manages memory much
differently than DOS does.
Not to niggle the point, but of course OS/2 uses interrupts. Each
and every one of those API calls is a wrapper around an interrupt
call.
Well, to be exact: OS/2 uses callgates to jump into kernel code.
Callbacks are similar to interrupt gates in that they switch priviledge
levels and have a predefined entry point into the kernel but they
additionally copy bytes from lower to higher level stacks while
swichting (byte count defined in the callgate). Something what a
interrupt gate won't do.
It is a common design of OSses to do this switching via a software
interrupt but OS/2 is different.
Ah, but are not those callgates accessed through an interrupt?
It's irrelevant that it is an invalid interrupt, a spade 's a
spade after all...
First, OS/2 doesn't use interrupts. You have to use API calls.
Second, since OS/2 is a multitasking OS, it manages memory much
differently than DOS does.
Not to niggle the point, but of course OS/2 uses interrupts. Each and every one of those API calls is a wrapper around an interrupt call.
Well, to be exact: OS/2 uses callgates to jump into kernel code. Callbacks
>> since OS/2 is a multitasking OS, it manages memory much differentlyFirst, OS/2 doesn't use interrupts. You have to use API calls.
Second,
Not to niggle the point, but of course OS/2 uses interrupts. Each and every one of those API calls is a wrapper around an interrupt call.
No, Rachel is correct.
The OS/2 API is built on call gates and ring gates, not interrupts.
The OS/2 API is built on call gates and ring gates, not interrupts.
And are not those gates accessed via an interrupt?
> *CALL FAR XXXX:0000*.Not to niggle the point, but of course OS/2 uses interrupts. Each
and every one of those API calls is a wrapper around an interrupt
call.
Well, to be exact: OS/2 uses callgates to jump into kernel code.
Callbacks are similar to interrupt gates in that
they switch priviledge
levels and have a predefined entry point into the kernel but they
additionally copy bytes from lower to higher level stacks while
swichting (byte count defined in the callgate). Something what a
interrupt gate won't do.
It is a common design of OSses to do this switching via a software
interrupt but OS/2 is different.
Ah, but are not those callgates accessed through an interrupt?
It's irrelevant that it is an invalid interrupt, a spade 's a
spade after all...
It's no INT xx instruction but really a call far. You do a
You can examine how this works by installing _Theseus_ on> your machine. Debug your program using any debugger which
I would like to have an Intel or AMD manual about the i386> because this stuff IMHO is best explained by the processor
Bye,> Vitus
PS: I'm maintaining an OS for embedded systems where we use> an interrupt, a structure pointed to by register XWA and a
As I am sure that you know (but perhaps Lee does not): The DOS> interrupt system is emulated, not executed, when operating in a VDM.
I would like to have an Intel or AMD manual about the i386>because this stuff IMHO is best explained by the processor
PS: cool, the download aborted after 25 minutes. I love it.
I had assumed that OS/2 used the same method of
forcing a processor exception
to jump to ring zero as MonopolySoft uses, apparently I was wrong.
I guess that would tell us something about what G. Letwin thought
of the jump to the bios IBM copyright notice as a means of
switching processor state then, eh?
I had simply assumed that OS/2 used the same invalid int trick to
switch rings as Win does.
<sigh> OK, poor choice of language. The int is fine.
What is done to switch control from the application to the OS is
a jump into the bios copyright notice to force a processor exception.
Happy now?
PS: cool, the download aborted after 25 minutes. I love it.
And second, I have MS-PDS 7.1 (QuickBasic), which can build both DOS
and OS/2 applications. It works wonderful, except for some reason I
can't perform ANY "low level" operations if I want to compile for
OS/2 (ie. poking around in memory, calling interrupts, etc). I think
there is a way around this in the BC compiler (or possibly the
linker?) but does anyone know why?
First, OS/2 doesn't use interrupts. You have to use API calls.
Second, since OS/2 is a multitasking OS, it manages memory much
differently than DOS does.
Not to niggle the point, but of course OS/2 uses interrupts. Each and every one of those API calls is a wrapper around an interrupt call.
>> since OS/2 is a multitasking OS, it manages memory much differentlyFirst, OS/2 doesn't use interrupts. You have to use API calls.
Second,
Not to niggle the point, but of course OS/2 uses interrupts. Each and every one of those API calls is a wrapper around an interrupt call.
And second, I have MS-PDS 7.1 (QuickBasic), which can build both DOS> since OS/2 is a multitasking OS, it manages memory much differently than
and OS/2 applications. It works wonderful, except for some reason I
can't perform ANY "low level" operations if I want to compile for
OS/2 (ie. poking around in memory, calling interrupts, etc). I think
there is a way around this in the BC compiler (or possibly the
linker?) but does anyone know why?
First, OS/2 doesn't use interrupts. You have to use API calls. Second,
Gordon Letwin would roll in his grave if he were in it! ;)> Philippe Kahn or Anders Forsberg ...
I didn't think Gordon Letwin ever worked for Borland. Now
Sysop: | digital man |
---|---|
Location: | Riverside County, California |
Users: | 1,028 |
Nodes: | 17 (0 / 17) |
Uptime: | 178:54:00 |
Calls: | 503,701 |
Calls today: | 4 |
Files: | 158,902 |
D/L today: |
11,507 files (3,434M bytes) |
Messages: | 444,267 |
Posted today: | 2 |