flat assembler
Message board for the users of flat assembler.

Index > Windows > try {...} catch {...}

Author
Thread Post new topic Reply to topic
denial



Joined: 12 Sep 2004
Posts: 98
denial 28 Jul 2005, 12:58
I'm sure you know the useful statements try and catch from C++/C# or similar languages. Is there a way to implement something like this in Assembler? They allow an easy and save way of error handling.

Any ideas?
Post 28 Jul 2005, 12:58
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8367
Location: Kraków, Poland
Tomasz Grysztar 28 Jul 2005, 13:02
Actually these constructs were invented in high level languages to allow the same easy way of error handling that is allowed by the branching instructions in languages like assembly.
Post 28 Jul 2005, 13:02
View user's profile Send private message Visit poster's website Reply with quote
bogdanontanu



Joined: 07 Jan 2004
Posts: 403
Location: Sol. Earth. Europe. Romania. Bucuresti
bogdanontanu 28 Jul 2005, 14:10
Besides, in Windows you could use SEH (Structured Exception Handling) just as easy in ASM.
Post 28 Jul 2005, 14:10
View user's profile Send private message Visit poster's website Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend 28 Jul 2005, 14:37
Yes, use SEH
If you want macros like 'try', check macro section in Fresh. But beware, because these macros are out-of-date, and you will have to change them. So better it is imho to understand SEH (it's really easy) and use it without macros.
Post 28 Jul 2005, 14:37
View user's profile Send private message Visit poster's website Reply with quote
denial



Joined: 12 Sep 2004
Posts: 98
denial 28 Jul 2005, 15:29
Thank you, I didn't hear of SEH yet, I'll get some information about.
Post 28 Jul 2005, 15:29
View user's profile Send private message Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner 28 Jul 2005, 15:34
http://www.microsoft.com/msj/0197/exception/exception.aspx

A crash course on the depths of win32 (tm) structured exception handling.
Post 28 Jul 2005, 15:34
View user's profile Send private message Visit poster's website Reply with quote
denial



Joined: 12 Sep 2004
Posts: 98
denial 28 Jul 2005, 16:55
That's a great link. Thank you for posting.
Post 28 Jul 2005, 16:55
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.