The MASM Forum Archive 2004 to 2012

Project Support Forums => GoAsm Assembler and Tools => Topic started by: component on March 16, 2010, 07:33:11 PM

Title: except.asm file
Post by: component on March 16, 2010, 07:33:11 PM

:boohoo:

hi i had except.asm before and can't remember what to do about the data type error

Data type given in LOCAL data declaration not recognised:-
OSVERSIONINFO
please help i need this thing up and working  :cheekygreen:
Title: Re: except.asm file
Post by: BlackVortex on March 16, 2010, 08:02:58 PM
OSVERSIONINFO is a structure, you have to define it yourself, or better : include some header file with it.

This should work,lol
#include windows.h
Title: Re: except.asm file
Post by: component on March 16, 2010, 08:15:00 PM
thanks blackvortex ....
ya i downloaded it from goasm site and its a complete work but it's all in how you set up the assembler line "try it" its an exception tut on jeremy's site
i will try it any how... thanks tons again BlAcKVoRtEx :U
Title: Re: except.asm file
Post by: BlackVortex on March 17, 2010, 12:54:42 AM
#DEFINE LINKFILES
#include windows.h

CODE SECTION
START:

push addr handler
fs push [0]
fs mov [0],esp

xor eax,eax
div eax                                  ; we force a division by zero to simulate an error
invoke MessageBox, NULL, "Normal execution code, if there isn't an error !", "Normal", MB_ICONERROR

fs pop [0]
add esp,4h
invoke ExitProcess, NULL

;***********************
handler:
invoke MessageBox, NULL, "Exception occured, exiting !", "Exception !", MB_ICONERROR
invoke ExitProcess, 0DEADh               ; Exiting with some macabre error code


I usually dont use exceptions, I'm a godly programmer and nothing ever goes wrong  :toothy
But check out that lame example I made, note the includes as well.
Title: Re: except.asm file
Post by: component on March 17, 2010, 05:57:45 PM
BlackVortex this is funny stuff
"Exiting with some macabre error code"

BlackVortex

I needed that exact exception code working it was found here   

http://www.quickersoft.com/donkey/files/Except.zip

ThAnKs Again BllACKKKKVOOOOOOOOOOOooooooooRteeeeeExxxxxxxxxx
Title: Re: except.asm file
Post by: donkey on March 18, 2010, 06:49:00 PM
Quote from: component on March 17, 2010, 05:57:45 PM
I needed that exact exception code working it was found here   

http://www.quickersoft.com/donkey/files/Except.zip

I'm not sure what you're saying, is there a bug in my exception handling example ?

Edgar
Title: Re: except.asm file
Post by: component on March 19, 2010, 05:39:25 PM
     Edgar      Noooooo im not saying the code has any problem

ya see i lost all my fancy batch files cd rom and i can't remember how to compile except.asm

1. is it that i need to compile the rc files first with gorc
2. did i need to add some line command that i dont remember

please type something that will get me up and running with except.asm

thank you for your reply... thats really nice of ya...


by the way it would be cool if jeremy had a video called "Watch Jeremy Code !!!" and he types out different command's and
assembles some code for newbee's and it would look really user friendly etc...
Title: Re: except.asm file
Post by: donkey on March 19, 2010, 08:48:14 PM
The build command for my except.asm is:

\GoAsm\BIN\GORC.EXE /r "Except.rc"
\GoAsm\BIN\GoAsm.EXE "Except.asm"
\GoAsm\BIN\GoLink.EXE "Except.obj" "Except.res"


The zip contains a RadAsm project, you should really look at using Ketil's IDE, all of my examples are RadAsm projects and it does make assembling and building them very easy, just select the project type and it does the rest. Though it will assemble just fine without RadAsm using a batch file.

Edgar
Title: Re: except.asm file
Post by: component on March 20, 2010, 05:40:31 PM

ASS-embler Edgar

thank you Edgar...
I notice your use of "\" before GoAsm, Very nice reminds me of the nice unix batch file i had on my long lost
batch cd, took me years to get really nice batch files together, i will post some wide dos commands %path% when i get good again
its been awhile since i got to have time ...etc to get back here and enjoy

again thank Edgar and also big thanks to Jeremy's team for making sure i got my new registered debug update
that goes to show how much this site and it's team is on the ball, rock on Assembler Peeps :cheekygreen: