Hi,
Is it possible to program gui components such as windows and buttons using assembly. I do not want to import any windows libraries. I want to code everything using assembly(even windows and buttons). Plz tell me how to do this. And also tell me where can i find more information on this subject.
Thanks a lot,
chamal.
Is it possible to program gui components such as windows and buttons using assembly. I do not want to import any windows libraries. I want to code everything using assembly(even windows and buttons). Plz tell me how to do this. And also tell me where can i find more information on this subject.
Thanks a lot,
chamal.
I do not want to import any windows libraries. I want to code everything using assembly(even windows and buttons)
Why do you wish such a hard life with re-inventing everything? :)
Why do you want to do that?
:grin: Yes, it is perfectly possible, see this forum:
http://www.asmcommunity.net/board/forumdisplay.php?s=&forumid=34
You cannot do that in any language with Windows. You need memory, you must request that from windows. You need access to the video hardware, you must get that from a driver or through the DirectX API or OpenGL. If you really don't want to use any Windows libraries the best way is to write your own operating system and install it on the machine then use that to draw your GUI. Besides that there is always DOS mode but that sucks. You cannot write a Windows program without a call to Windows so you cannot write one without importing Windows libraries at a minimum Kernel32, be it DirectX or the GDI or USER32 you are going to have to use Windows to do the grunt work for you. There is absolutely no way around this.
http://www.asmcommunity.net/board/forumdisplay.php?s=&forumid=34
You cannot do that in any language with Windows. You need memory, you must request that from windows. You need access to the video hardware, you must get that from a driver or through the DirectX API or OpenGL. If you really don't want to use any Windows libraries the best way is to write your own operating system and install it on the machine then use that to draw your GUI. Besides that there is always DOS mode but that sucks. You cannot write a Windows program without a call to Windows so you cannot write one without importing Windows libraries at a minimum Kernel32, be it DirectX or the GDI or USER32 you are going to have to use Windows to do the grunt work for you. There is absolutely no way around this.
Yes, maybe chamsy will try to create his own O.S :)
IF he placed that question ...
He has no clue how an OS (windows or whatever) works...
Not even marginally, as he did not understand that he needs some memory and Windows as an protected OS will have to be called just to allow that :D and he also needs access to screen as Donkey so well pointed out...
so without any clue how can he program an OS :-? copycat?
He has no clue how an OS (windows or whatever) works...
Not even marginally, as he did not understand that he needs some memory and Windows as an protected OS will have to be called just to allow that :D and he also needs access to screen as Donkey so well pointed out...
so without any clue how can he program an OS :-? copycat?
chamsy, doing something like that makes no sense whatsoever under windows. If you really want to reinvent the wheel, make a futile attempt at OS construction ^_^. If you want to do something useful, use the facilities your OS of choice (whether it be windows or something else) offers you.
If you need something special that the current windows controls doesn't offer you, you can always check out
http://www.asmcommunity.net/board/forumdisplay.php?s=&forumid=36
If you need something special that the current windows controls doesn't offer you, you can always check out
http://www.asmcommunity.net/board/forumdisplay.php?s=&forumid=36
Well, after feeling a little embarassed by the tone of my post I thought about his question a bit more and I'm wondering if we all might have just misunderstood him and he is actually asking how to do a GUI without using import libraries, not the Windows libraries. If that is the case y0da did a program called kernel, the source is available at iczelion's site, it allows you to get the addresses of LoadLibrary and GetProcAddress. With those two addresses you have no need of imports at all.
With those two addresses you have no need of imports at all.
Wrong, you program would end up working on only some windows versions. You need to import from at least kernel32.dll (or some dll ending up importing from kernel32.dll - the safe choice is kernel32!exitprocess, and the 4k choice is gdi32.dll!arc). In short... unless you're doing something silly for fun, you might as well use the features the OS gives you.
To chamsy:
What OS does your program run under?
If the OS is DOS, you can draw button and window yourself by calling BIOS 10H.
If the OS is Microsoft Windows, you should think how to send and recieve Windows message...
What OS does your program run under?
If the OS is DOS, you can draw button and window yourself by calling BIOS 10H.
If the OS is Microsoft Windows, you should think how to send and recieve Windows message...
Wrong, you program would end up working on only some windows versions. You need to import from at least kernel32.dll
No, it's right, both of those functions are resident in kernel32.dll, I don't know if it is even possible not to load that DLL when running a program. There is no API function that is not available via these 2 functions so yes, you have no need of import libraries if you have access to those 2 functions addresses, obviously if you have a valid address to LoadLibrary or GetProcAddress, Kernel32 is loaded and available, any other DLL can be loaded at runtime. As I said, I was talking about import libraries not DLL's.
he is actually asking how to do a GUI without using import libraries, not the Windows libraries
Sorry donkey, I thought you meant no imports, and getting loadlib+gpa addresses by kernel base scanning and export table parsing. If you import loadlib+gpa from kernel32 (via the PE import table, usually using import libraries), of course everything will work :)
The "no imports at all" method works on some windows versions, not on others. For instance, on win2k the EXE will silently fail to load - no error visible to the user - while on XP it will run. So I assume that win2k only maps DLLs in your process address space if you reference them, while XP might do it no matter what?
The "no imports at all" method works on some windows versions, not on others. For instance, on win2k the EXE will silently fail to load - no error visible to the user - while on XP it will run. So I assume that win2k only maps DLLs in your process address space if you reference them, while XP might do it no matter what?