flat assembler
Message board for the users of flat assembler.
Index
> Windows > Is there anything in W32 like the MS-DOS function int 16h? |
Author |
|
typedef 03 Mar 2014, 01:44
For Console EXEs
msvcrt.dll!system("pause") (Has implications, do not use in real applications) kernel32.dll!Sleep(1000 * 50) /// 5 minutes or whatever msvcrt.dll!getch() For GUI EXEs kernel32.dll!Sleep(1000 * 50) /// 5 minutes or whatever kernel32.dll!MessageBox (...) Or just use a debugger |
|||
03 Mar 2014, 01:44 |
|
Walter 03 Mar 2014, 03:16
A getch example:
Code: ;************* ;* getch.asm * ;************* format pe console entry start include 'win32a.inc' section '.data' data readable writeable strPrompt db 'Press a Ukrainian button, you Russian:',0 strMsg db 13,10,'You pressed %c.',0,13,10 section '.code' code readable executable start: cinvoke printf,strPrompt cinvoke _getch cinvoke printf,strMsg,eax invoke ExitProcess,0 section '.idata' import data readable library kernel32,'KERNEL32.DLL',\ msvcrt,'MSVCRT.DLL' import kernel32,\ ExitProcess,'ExitProcess' import msvcrt,\ _getch,'_getch',\ printf,'printf' |
|||
03 Mar 2014, 03:16 |
|
sid123 03 Mar 2014, 07:15
Quote:
Its not a MSDOS Function, it has existed before DOS. It a BIOS Call. _________________ "Those who can make you believe in absurdities can make you commit atrocities" -- Voltaire https://github.com/Benderx2/R3X XD |
|||
03 Mar 2014, 07:15 |
|
prostyle4444 03 Mar 2014, 10:33
If you create a dos .com using INT 16h, it should work on your command prompt on WIN32. It will work only if it`s an application running in text mode.
|
|||
03 Mar 2014, 10:33 |
|
clamicun 04 Mar 2014, 13:09
[quote="Walter"]A getch example:
Walter, you forgot the second getch to see the result. start: cinvoke printf,strPrompt cinvoke _getch cinvoke printf,strMsg,eax cinvoke _getch invoke ExitProcess,0 |
|||
04 Mar 2014, 13:09 |
|
Walter 04 Mar 2014, 18:43
A second getch is not required. The example is a "console" example.
You are a "thankless" idiot. |
|||
04 Mar 2014, 18:43 |
|
cod3b453 04 Mar 2014, 21:27
The Win32 equivalent is ReadConsole
|
|||
04 Mar 2014, 21:27 |
|
DOS386 08 Mar 2014, 08:40
> Is there anything in W32 like the MS-DOS function int 16h?
INT $16 is a BIOS call. > you create a dos .com using INT 16h, it should work on your command prompt on WIN32 Yes, but bad idea. > There is ? NO: http://board.flatassembler.net/topic.php?t=11172 |
|||
08 Mar 2014, 08:40 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.