.model flat,stdcall
option casemap:none


mov AX, 4C00h ; (Exit code)
int 21h

end start

; -----------------------

I try to used some Interruptions under Masm, but it's not work.
What isn't right in this little code.
Posted on 2001-11-25 14:24:38 by Morgatte

DOS interrupts are not used in 32 bit code and in most instances, you will get a GP fault if you try and use them.

Put the following include files at the top of your code,

include \masm32\include\windows.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc

includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib

Replace the interrupt code in your example with the windows API,

invoke ExitProcess,0

and it should build OK.

The include files are part of MASM32.


Posted on 2001-11-25 15:42:59 by hutch--
DOS and 16bit code, RIP.
Posted on 2001-11-25 15:49:59 by f0dder

isn't "RIP" MAC terminology for rasterised image processing ?


Posted on 2001-11-25 16:38:31 by hutch--
Dunno, but it's "rest in peace"... or, in the case of 16bit/dos, "rest in pieces" ;)
Posted on 2001-11-25 16:45:27 by f0dder
Ok, but we can't reroute an interruption under Win32, so ?
TSRs exist under Win32, don't there ?
Posted on 2001-11-26 06:22:31 by Morgatte
Morgatte, windows is a quite different world than DOS. You don't
"TSR", you just refrain from terminating your app =).
Posted on 2001-11-26 06:55:01 by f0dder
Hi Morgatte,
You come back ! That makes a long time !

--> T'es revenu ! Ca fait un bail !

Another French man.
Posted on 2001-11-26 09:24:39 by Vom-bonjour:-()