Hi
I've uploaded our new ObjAsm32 revision 1.3e. The main goals of this revision are:
- ObjAsm32 model improvements:
- ObjAsm32 AddIn for RadASM:
- Examples and project reworked to show the new features.
- New DSP library.
- SAPI 5.1:
- DirectX support files improvements (DX9/DX10 Dec 2005).
- Neural Net translation.
As you can seen in the above listing, we have completely replaced the "invoke" internal macro for the method calling. This has given us a greater degree of flexibility for the OCall, ACall, etc. macros.
Now you don't have to worry about the registers you use to pass your arguments, since the indirection is done immediately before the call instruction and after the pushing of the method arguments. Another strong point is the variable argument passing introduced here. Until today, you had to declare the methods as C procedures. This isn't necessary now, since ObjAsm32 detects this situation and handles all details like pushing the arguments and correcting the stack on return if it is required automatically. As a bonus, the number of arguments is passed in the ecx register.
One of the most important model enhancements is the introduction of early binding methods. These methods are hard bound at compile time and no indirection takes place. That means that they are a bit faster than static or dynamic methods at a cost of less flexibility. To define such early binding methods a new method type was introduced: BoundMethod.
Now it is easier to embed an object into another object using the Embed macro. To facilitate the calling of such embedded objects, the method calling macros (OCall, ACall, etc.) can handle symbolic references to them and generate automatically the address needed to be called.
Local objects are designed to be placed on the procedure stack. Such objects lifecycle are limited to the execution of the method or procedure and no allocation and destruction are necessary. For critical methods, this can speedup the code considerably.
We introduced a stack control system called "StackGuard". It works like the /GS C++ switch. A demo has been added in the projects folder.
The RadAsm Addin has been updated to support all new model features. It requires at least RadAsm version 2.2.0.6. A new menu item has been added to the context menu to open all ancestor objects of a selected object. This helps the user the rapidly trace the code through the whole inheritance tree.
The DirectX files were updated to support the latest DX9 / DX10 (Dec. 2005).
A translation work of a Neural Net was added. The classical XOR problem was showed.
The Sound API (SAPI 5.1) was translated and a demo application was added to the projects folder.
As usual, the download link is http://objasm32.tripod.com/.
Regards,
Biterider
I've uploaded our new ObjAsm32 revision 1.3e. The main goals of this revision are:
- ObjAsm32 model improvements:
- Method call improvements (OCall, ACall, etc).
- Invoke have been completely replaced to allow a more flexible argument handling.
- Extended argument calling convention (like STDCALL but supports VARARG, see Array object).
- When using a variable number of arguments, the argument count is passed implicitly.
- Collection iterators have been adapted to handle variable number of arguments.
- Embedded and local objects.
- Early method binding using BoundMethod.
- Stack protection system (StkGuard).
- Documentation updated.
- ObjAsm32 AddIn for RadASM:
- Supports new features like Embed and LNew.
- OCall supports symbolic information.
- Open Ancestors added to the context and Edit menus.
- Examples and project reworked to show the new features.
- New DSP library.
- SAPI 5.1:
- Interface file.
- Demo application.
- DirectX support files improvements (DX9/DX10 Dec 2005).
- Neural Net translation.
As you can seen in the above listing, we have completely replaced the "invoke" internal macro for the method calling. This has given us a greater degree of flexibility for the OCall, ACall, etc. macros.
Now you don't have to worry about the registers you use to pass your arguments, since the indirection is done immediately before the call instruction and after the pushing of the method arguments. Another strong point is the variable argument passing introduced here. Until today, you had to declare the methods as C procedures. This isn't necessary now, since ObjAsm32 detects this situation and handles all details like pushing the arguments and correcting the stack on return if it is required automatically. As a bonus, the number of arguments is passed in the ecx register.
One of the most important model enhancements is the introduction of early binding methods. These methods are hard bound at compile time and no indirection takes place. That means that they are a bit faster than static or dynamic methods at a cost of less flexibility. To define such early binding methods a new method type was introduced: BoundMethod.
Now it is easier to embed an object into another object using the Embed macro. To facilitate the calling of such embedded objects, the method calling macros (OCall, ACall, etc.) can handle symbolic references to them and generate automatically the address needed to be called.
Local objects are designed to be placed on the procedure stack. Such objects lifecycle are limited to the execution of the method or procedure and no allocation and destruction are necessary. For critical methods, this can speedup the code considerably.
We introduced a stack control system called "StackGuard". It works like the /GS C++ switch. A demo has been added in the projects folder.
The RadAsm Addin has been updated to support all new model features. It requires at least RadAsm version 2.2.0.6. A new menu item has been added to the context menu to open all ancestor objects of a selected object. This helps the user the rapidly trace the code through the whole inheritance tree.
The DirectX files were updated to support the latest DX9 / DX10 (Dec. 2005).
A translation work of a Neural Net was added. The classical XOR problem was showed.
The Sound API (SAPI 5.1) was translated and a demo application was added to the projects folder.
As usual, the download link is http://objasm32.tripod.com/.
Regards,
Biterider
Hi Biterider,
I believe I have found an issue with rev. 1.3e. It doesn't seem to like PrivateMethod declarations in the Object definition any more. The same statements worked with the previous version. Changing the statements to be StaticMethod declarations clears the error, but I assume it also makes them non-private. Not a big issue, but I thought you would like to know anyway.
The the error is "error A2008: syntax error".
I believe I have found an issue with rev. 1.3e. It doesn't seem to like PrivateMethod declarations in the Object definition any more. The same statements worked with the previous version. Changing the statements to be StaticMethod declarations clears the error, but I assume it also makes them non-private. Not a big issue, but I thought you would like to know anyway.
The the error is "error A2008: syntax error".
Good afternoon, atandb.
PrivateMethod has been replaced with a new macro pair, Private/PrivateEnd.
All the Methods found between these two 'book-end macros' are Private , no matter what kind of Method they are.. you can now have private Abstract methods, for example.
Within your object definition, use 'Private' (no params) to 'enable' and use 'PrivateEnd' to 'disable' - any methods NOT inside these 'bookend macros' are considered PUBLIC BY DEFAULT.
See the Examples folder if that was not absolutely clear.
Regards, Homer.
PrivateMethod has been replaced with a new macro pair, Private/PrivateEnd.
All the Methods found between these two 'book-end macros' are Private , no matter what kind of Method they are.. you can now have private Abstract methods, for example.
Within your object definition, use 'Private' (no params) to 'enable' and use 'PrivateEnd' to 'disable' - any methods NOT inside these 'bookend macros' are considered PUBLIC BY DEFAULT.
See the Examples folder if that was not absolutely clear.
Regards, Homer.
Thanks,
I am assuming that will allow for private variables as well, pretty cool.
I am assuming that will allow for private variables as well, pretty cool.
Hi,
i have found a Bug in Implementation of IConnectionPoint. The Method EnumConnections will crash the Application, because the Interfacepointer is again ref.
The interface Refcounter may not increased, otherwise the Object is not destroyed later. This Code here is OK and have no Memleaks.
Sorry for my english.
Obi
i have found a Bug in Implementation of IConnectionPoint. The Method EnumConnections will crash the Application, because the Interfacepointer is again ref.
Method IConnectionPoint.EnumConnections,, ppIEnum:Pointer
DbgText "IConnectionPoint.EnumConnections"
.if ppIEnum == NULL
mov eax, E_POINTER
.else
New EnumConnections, Init, Self
OCall eax::EnumConnections.GetInterface, offset IID_IEnumConnections, ppIEnum
;mov ecx, ppIEnum
;OCall DWORD PTR ::IEnumConnections.AddRef
xor eax, eax ;Return S_OK
.endif
MethodEnd
The interface Refcounter may not increased, otherwise the Object is not destroyed later. This Code here is OK and have no Memleaks.
Sorry for my english.
Obi
Hi Obivan
I think you are right, since "EnumConnections.GetInterface" increments the reference counter by itself. I removed the offending lines. Thanks!
Regards,
Biterider
I think you are right, since "EnumConnections.GetInterface" increments the reference counter by itself. I removed the offending lines. Thanks!
Regards,
Biterider
Hi,Biterider !I just downloaded and installed the ObjAsm32 and tried to make the Demo5 example,but failed with a message about "winapp.lib not found".I looked into the required folder and discovered that such a lib did not exist.I run the lib setup again and got an error about losing the "SAPI.inc",and other libs built succesfully but still no "winapp.lib".
I am very intrested about the OOP of Asm and astonished about your design.But I found that the forum here are out of date now and are you give up this project?If true it's really a pity.
I am very intrested about the OOP of Asm and astonished about your design.But I found that the forum here are out of date now and are you give up this project?If true it's really a pity.
Hi jccddd
We never give up :D
I attached the missing files on this post. You can also use the online update service o get the newest files. If you substribe for notifications on the homepage, you will recieve an email each time an online update is available. The next complete release will be ready in the next time.
Biterider
We never give up :D
I attached the missing files on this post. You can also use the online update service o get the newest files. If you substribe for notifications on the homepage, you will recieve an email each time an online update is available. The next complete release will be ready in the next time.
Biterider
More new stuff coming for ObjAsm32 - just finishing up support for asynch file io with iocp thread pooling courtesy of NetComEngine :thumbsup:
Is above link dead?I cannot open it from China.
Hi
Try this http://www.asmcommunity.net/projects/objasm32/ or this http://objasm32.winasm.net link
Regards
Biterider
Try this http://www.asmcommunity.net/projects/objasm32/ or this http://objasm32.winasm.net link
Regards
Biterider
Hi jccddd
We never give up :D
I attached the missing files on this post. You can also use the online update service o get the newest files. If you substribe for notifications on the homepage, you will recieve an email each time an online update is available. The next complete release will be ready in the next time.
Biterider
Thanks.
I downloaded the newest release and the "sapi.inc" file.When I used the "Makelibs.bat" to compile the libraries I got an error about the "sapi.inc",everything went ok but the "TextToSpeech.lib" failed to make.
The error message is "sapi.inc(1651):error a2008 :syntax error:IServiceProvider_VMT BEGIN_INTERFACE(9)......".
Hi jccddd
I guess that there is a redefinition from that interface between COM_Interfaces.inc and SAPI.inc.
Try to comment out the following lines (1646-1648) from SAPI.inc file.
and retry compiling the project
Biterider
I guess that there is a redefinition from that interface between COM_Interfaces.inc and SAPI.inc.
Try to comment out the following lines (1646-1648) from SAPI.inc file.
;BEGIN_INTERFACE IServiceProvider, IUnknown, <6D5140C1-7436-11CE-8034-00AA006009FA>
; STDMETHOD RemoteQueryService, :ptr GUID, :ptr GUID, :ptr LPUNKNOWN
;END_INTERFACE
and retry compiling the project
Biterider
Hi jccddd
I guess that there is a redefinition from that interface between COM_Interfaces.inc and SAPI.inc.
Try to comment out the following lines (1646-1648) from SAPI.inc file.
;BEGIN_INTERFACE IServiceProvider, IUnknown, <6D5140C1-7436-11CE-8034-00AA006009FA>
; STDMETHOD RemoteQueryService, :ptr GUID, :ptr GUID, :ptr LPUNKNOWN
;END_INTERFACE
and retry compiling the project
Biterider
Thx,well-done!Just uncomment the few lines of code.
Now,I use ObjAsm32 1.4b ,but make the DirectX\DX_04_Mesh example (lose qMathData.inc file)
;------------------------------------------------------
Assembling: DxMeshDemo.asm
ERROR: Invalid SysSetup argument - DEBUG_FALSE -
STRING TYPE: ANSI
DEBUG MODE : INACTIVE
OOP LEVEL : WINDOWS BASE
- ObjIDs.inc
- Primer.inc
- Steamable.inc
- WinPrimer.inc
Inheritance path: Primer
Inheritance path: Primer,Streamable
Inheritance path: Primer,Streamable,WinPrimer
error A4910: cannot open file: d:\Masm32\BIN\ml.err
DxMeshDemo.asm(18) : fatal error A1000: : d:\Masm32\ObjAsm32\Code\Macros\qMathData.inc
;------------------------------------------------------
Assembling: DxMeshDemo.asm
ERROR: Invalid SysSetup argument - DEBUG_FALSE -
STRING TYPE: ANSI
DEBUG MODE : INACTIVE
OOP LEVEL : WINDOWS BASE
- ObjIDs.inc
- Primer.inc
- Steamable.inc
- WinPrimer.inc
Inheritance path: Primer
Inheritance path: Primer,Streamable
Inheritance path: Primer,Streamable,WinPrimer
error A4910: cannot open file: d:\Masm32\BIN\ml.err
DxMeshDemo.asm(18) : fatal error A1000: : d:\Masm32\ObjAsm32\Code\Macros\qMathData.inc
Hi
Attached the missing file. Please put it in Masm32\ObjAsm32_SRC_1.4b\Code\Macros\qMathData.inc
Biterider
Attached the missing file. Please put it in Masm32\ObjAsm32_SRC_1.4b\Code\Macros\qMathData.inc
Biterider
:D Very good! Thx, success .