when putting together the GoASM SDK I think I stumbled across a lil bug
CODE SECTION
START:
invoke MessageBox,0,'executed notification','title',MB_ICONINFORMATION
invoke MsgBox, 'test' <---------if I call the function we're exporting internally here it won't be added to the export table
invoke ExitProcess,0
EXPORT MsgBox FRAME iMsg
invoke MessageBox,0,[iMsg],'This function is exported from a exe',MB_ICONINFORMATION
ret
ENDF
this is regards to the Exe_Export example.
Hi E^cube
Thanks for reporting this bug, and thanks also for all your excellent work!
I attach a fix.
[attachment deleted by admin]
Hello jorgon,
thankyou for fixing the bug, maybe after the next SDK release you can take a look at the preprocessing code I wrote to add .if,.elseif etc..(can be any naming) to GoASM, and make the SDK official if you think it's good enoughl so people have a nice place to start like they do with MASM32?
Yes of course, I would like to look at this.
So do you think the preprocessor will itself deal with some users' desire to add run-time conditionals to GoAsm?
Great! Yeah the preprocessor comes with full source, and adds support for .if,.elseif,.else,.endif and as I mentioned in another thread will look
IF_STATEMENT db '.if',0
ELSEIF_STATEMENT db '.elseif',0
ELSE_STATEMENT db '.else',0
ENDIF_STATEMENT db '.endif',0
;can can edit the comparisons too
LESS_THAN db '<',0
GREATER_THAN db '>',0
EQUALTO db '==',0
EQUALTO2 db '=',0
LESSTHANEQUAL db '<=',0
LESSTHANEQUAL2 db '=<',0
GREATERTHANEQUAL db '>=',0
GREATERTHANEQUAL2 db '=>',0
NOTEQUALTO db '!=',0
NOTEQUALTO2 db '=!',0
so
.if D[bird] <= 10
is the same as
.if D[bird] =< 10
and it's fully editable so you can change .if to .when and <= to LESS= for example
.when D[bird] LESS= 10
.endw
The parsing code is case and space insensitive so
.iF EcX == 1
is fine
and ofcourse nested is supported I should be done today or tommorow I got caught up at work
.if D[pepsi] == 1
.if
.if
etc ..
.elseif
etc...
.endif
.else
etc ..
.endif
.elseif D[pepsi] < 5
etc ..
.else
etc ..
.endif
how it works is at compile time the preprocessor creates a temp file if it finds conditional statements in the sources or include files in the source then it replaces the found conditional statements with code GoASM understands (cmp, jne etc...) the labels are randomly generated and kept in array when parsing so theres no repeats. then the preprocessor passes on the temp file for compilation.