Hello,
Run the following program under Windows 95:
/*
defint a-z
$include "regnames.inc"
declare sub GetWinVersion1 (Major as byte, Minor as byte)
declare sub GetWinVersion2 (Major as byte, Minor as byte)
dim Major as byte, Minor as byte
GetWinVersion1 Major, Minor
print "Windows version: "; major; "."; minor
GetWinVersion2 Major, Minor
print "Windows version: "; major; "."; minor
end
SUB GetWinVersion1 (Major as byte, Minor as byte)
dim regax as word
reg %ax, &h1600
call interrupt &h2f
major = reg(%ax) mod 256
minor = reg(%ax) \ 256
END SUB
SUB GetWinVersion2 (Major as byte, Minor as byte)
asm mov ax, &h1600
asm int &h2f
asm les bx, Major
asm mov es:[bx], al
asm les bx, Minor
asm mov es:[bx], ah
END SUB
*/
The resulting output will be:
Windows version: 0 . 22
Windows version: 4 . 0
The statement call interrupt &h2F doesn't work! But the assembler
statement int &h2F does. However, if you go step by step through the
program in the IDE by pushing F7 or F8 you will see that the
assembler statement int &h2f doesn't work as well!
Under Windows 3.1 the program works fine. Also, the same program in
QuickBasic with CALL INTERRUPT (but of course without the assembler
procedure) works OK under Windows 95 as well as Windows 3.1.
Could someone explain this?
Friendly greeting you,
Hans Lunsing, Fido : 2:281/607.214, 2:282/610.12
Internet : jlunsing@doge.nl
--- Terminate 4.00/Pro
# Origin: BBS De Lauwers For BASIC Programmers! ++31594688407 (2:282/610.12)
---------------
* Origin: United Bbs Systems Europe MailGate to -> Fido USA (2:2802/337.0)
|