flat assembler
Message board for the users of flat assembler.
Index
> Windows > Low level 32-bit assembly |
Author |
|
DJ Mauretto 07 Oct 2007, 11:17
hello
CALL AllocConsole |
|||
07 Oct 2007, 11:17 |
|
crazyperson 07 Oct 2007, 12:56
DJ Mauretto wrote: hello Do I enter the parameters the same way I do with invoke, when using "call"? |
|||
07 Oct 2007, 12:56 |
|
DJ Mauretto 07 Oct 2007, 13:27
example with MessageBox
Code: push uType push lpCaption push lpText push hWnd call MessageBoxA |
|||
07 Oct 2007, 13:27 |
|
Mr_Silent 07 Oct 2007, 19:15
maybe like this?
Code: push uType push lpCaption push lpText push hWnd call [MessageBoxA] |
|||
07 Oct 2007, 19:15 |
|
crazyperson 08 Oct 2007, 05:02
Thanks Mr_Silent, it works. I have a few more questions though(more beginner questions).
Obviously I am trying to get as low level as possible, with a lot of control and flexibility. I have noticed 16-bit assembly gives me just that, but is 16-bit assembly obsolete? Will it be useless soon, and a waste of time to learn? Also, is there a way of doing 32-bit assembly without APIs, similar to 16-bit? ps What is the difference between 32-bit and 64-bit, and will I have to re-learn everything? |
|||
08 Oct 2007, 05:02 |
|
karl 08 Oct 2007, 11:35
the apis are just a way to access system functions, something that isn't defined by x86 assembly. in older dos systems you used int 10h or somesuch. you have to use system functions to do most things. like access the screen, get more memory etc.
64bit is basically the same. it's mostly the same instructions but with a different format, and less limitations. try looking at example code. fasm has quite a few nice ones. i must say, though, you need to know a lot before you start to understand what everything is doing. |
|||
08 Oct 2007, 11:35 |
|
karl 08 Oct 2007, 11:45
this post by Aux here http://board.flatassembler.net/topic.php?t=7629 explains well:
1. If you are making Windows application (or application for any other protected mode OS like Linux, Mac OS, BeOS and others), then your application CAN NOT DIRECTLY ACCESS ANY HARDWARE! That includes interrupt (both software and hardware), memory, ports and so on. You can use ONLY API of your operating system. This is because applications run in ring3 and all priveleged commands are available ONLY to ring0 applications! No CLI, no INT, no CPUID and so on. 2. In protected mode OSes ONLY OS kernel and kernel-mode drivers run in ring0! And writting windows driver is not so easy and your book will not help you. 3. DOS applications under Windows are running inside NTVDM emulator which EMULATES all hardware stuff! BUT YOU CAN NOT ACCESS HARDWARE DIRECTLY ANYWAYS! You can write DOS application and try to destroy interrupt table or overwrite all memory - it will not happen. 4. Win95/98/Me technically are NOT operating systems, DOS is still under them, so you can destroy interrupt table there. You can even hook TLS/TLD tables and do whatever you want (: 5. DPMI is DOS Protected Mode Interface. It is kind of addon for MS DOS so 32bit apps can run without Windows. And there you have full access for everything. But ONLY when you are running DPMI application inside clean DOS (not NTVDM or DOSBox). So what can You do? Install DOS and test your apps there. Install DOS inside VMWARE and run your apps there inside emulated environment. Also you can install Win98, but still you will need to write DOS apps. Or you can start learning WinAPI and forget about everything you just read in your book. |
|||
08 Oct 2007, 11:45 |
|
crazyperson 08 Oct 2007, 13:42
Thanks, that cleared up a lot of the confusion.
|
|||
08 Oct 2007, 13:42 |
|
rugxulo 08 Oct 2007, 17:54
Quote:
http://rugxulo.googlepages.com (FreeDOS mini floppy distro) Sorry for the plug, but maybe you'll find it useful. |
|||
08 Oct 2007, 17:54 |
|
shakuni 17 Oct 2007, 06:48
Quote:
But I have heard somewhere that there are many tricks that viruses use that involve getting to ring-0. |
|||
17 Oct 2007, 06:48 |
|
Aux 29 Oct 2007, 10:52
Yep, they install drivers, so they get access. In win9x there were os flaws, which allowed to modify TLS and take control, but it is not possible now. But you can still silently install any driver. How? Google!
|
|||
29 Oct 2007, 10:52 |
|
Dex4u 29 Oct 2007, 11:43
There also hobby OS, like DexOS and BOS that let you program in pmode just like you could in realmode.
|
|||
29 Oct 2007, 11:43 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.