; int20P.asm VKD_Disable_Keyboard
;
; INT 20 P - Microsoft Windows - VKD - VxD SERVICES
; VxD = 000Dh
; Note: the desired VxD and service number are identified by the data
; immediately following the INT 20 instruction, as in:
; INT 20h
; DW service number
; DW VxD identifier
.model small
.486
.stack 200h
.data
.code
start:
mov ax,@data
mov ds,ax
INT 20h
DW 0010h ; service number - VKD_Disable_Keyboard
DW 00Dh ; VxD identifier
exit:
mov ax,4c00h
int 21h
end start
This won't work, because the INT 20h API can be called by Win9x VxDs only. These are FLAT binaries, and won't exit by a ax=4C00h, int 21h.
There might exist an API which the VkD device implements and which can be called by DOS programs (see RBIL for details), but it surely isn't INT 20h.
mov al,0adh
out 64h,al
as far as i remember, INT 20h requires no parameters and terminates a program - lol
if there is some odd-ball use of INT 20h, i bet Ralf Brown's Interrupt list would have it
http://www.cs.cmu.edu/~ralf/files.html
> as far as i remember, INT 20h requires no parameters and terminates a program - lol
Int 20h real-mode expects CS to contain the current PSP.
> if there is some odd-ball use of INT 20h,
Int 20h in protected-mode was frequently used in the good old days, see http://win32assembly.online.fr/vxd-tut1.html
but, but, but, we are in the 16-bit forum, no ?
and - i don't think INT 20h assumes anything about the CS
if you want to access the INT 20h that is at PSP:0000 with a RETN, then yes - CS needs to = PSP
Quote from: dedndave on October 10, 2009, 02:58:39 PM
and - i don't think INT 20h assumes anything about the CS
if you want to access the INT 20h that is at PSP:0000 with a RETN, then yes - CS needs to = PSP
Perhaps you should follow your own advise given above and read Ralf Brown IL:
--------D-20---------------------------------
INT 20 - DOS 1+ - TERMINATE PROGRAM
CS = PSP segment
Return: never
Notes: (see INT 21/AH=00h)
this function sets the program's return code (ERRORLEVEL) to 00h
SeeAlso: INT 21/AH=00h,INT 21/AH=4Ch
That's why int 20h is - usually - used by DOS COM programs only.
ok - you got me, i guess - lol
but, in days of old (before int 21h, function 4Ch), i seem to recall EXE's pushing the PSP and a 0 for a RETF exit
which i see now, does set CS to the PSP
OT-Japeth what kind of bird is that in you avatar pic?
QuoteOT-Japeth what kind of bird is that in you avatar pic?
The European Jay
Here's a more detailed pic: http://www.japheth.de/jay1.png
Quote from: japheth on October 10, 2009, 08:55:01 AM
This won't work, because the INT 20h API can be called by Win9x VxDs only. These are FLAT binaries, and won't exit by a ax=4C00h, int 21h.
There might exist an API which the VkD device implements and which can be called by DOS programs (see RBIL for details), but it surely isn't INT 20h.
Sure it works.
But it does require Win 95 +.
Check Ralph's list under Int 20P.
Andy
QuoteSure it works.
Define "works".
See attached .exe.