flat assembler
Message board for the users of flat assembler.

Index > Windows > Can I do things without using Win API's?

Author
Thread Post new topic Reply to topic
bougainville



Joined: 27 Mar 2006
Posts: 8
bougainville
Now that I can manipulate registers, used .text memory etc, is it possible to do anything more clever without having to resort to Win API's? For example, is it not possible to write a single character to screen, or even make the speaker beep, by using just pure assembler code? Confused
Am I to be a slave to Microsoft, even if I use assembler? It seems that I can do more using DOS assembler. Crying or Very sad
Any comments please.
Post 29 Mar 2006, 08:58
View user's profile Send private message Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend
That's the idea between programming for Windows. Programmer has no access to direct I/O and so he must use APIs. The only exception is driver porgamming but you can't have pure assembly there (some APIs needed, but more access)
Post 29 Mar 2006, 09:13
View user's profile Send private message Visit poster's website Reply with quote
RedGhost



Joined: 18 May 2005
Posts: 443
Location: BC, Canada
RedGhost
bougainville wrote:
Now that I can manipulate registers, used .text memory etc, is it possible to do anything more clever without having to resort to Win API's? For example, is it not possible to write a single character to screen, or even make the speaker beep, by using just pure assembler code? Confused
Am I to be a slave to Microsoft, even if I use assembler? It seems that I can do more using DOS assembler. Crying or Very sad
Any comments please.


you can't do things like this in windows in user mode (ring3), it's part of the design principle of the operating system, like Reverend said if you want this kind of programming try a driver (ring0), its a .sys file, there are some posts here about it, there are also numerous exploits to execute code in ring0 from a ring3 application in the NT kernel, i will not post them here but if you really want some links you may PM me

_________________
redghost.ca
Post 29 Mar 2006, 10:18
View user's profile Send private message AIM Address MSN Messenger Reply with quote
bougainville



Joined: 27 Mar 2006
Posts: 8
bougainville
OK, thanks for that - I think. Smile
BTW, what do you mean by ring3 and ring0?
Post 29 Mar 2006, 10:37
View user's profile Send private message Reply with quote
RedGhost



Joined: 18 May 2005
Posts: 443
Location: BC, Canada
RedGhost
bougainville wrote:
OK, thanks for that - I think. Smile
BTW, what do you mean by ring3 and ring0?


the privileges the system gives you, in ring0 (kernel mode) you can use instructions like 'hlt' and do direct port I/O, while in ring3 (user mode) things like this are restricted so the system can remain stable, if a programme crashes in DOS so does the entire system, this is not the case in Windows Smile

but this is not my most most knowledgeable subject, i'm sure there are many here who can expand on this topic much more

_________________
redghost.ca
Post 29 Mar 2006, 11:27
View user's profile Send private message AIM Address MSN Messenger Reply with quote
daluca



Joined: 05 Nov 2005
Posts: 86
daluca
of course you can "do things",you can use the memory and registers
to make your own calculations,conversions and translations,but for some
things like comunicate with the user or create a window is harder.


windows API's are the standard means to work with windows
try to make things work without them is try to make the job they do
so if you do not want to depend on them you must replece them...
and i think you must agree with me:that is alot of work....to make your own
O.S.
if you need to do something very specific you can use driver programming
as mentioned avobe, but to produce a full compatible,fast,eficient,nice looking
program without any windows API's is just too much.

we allways use some kind of high level functions,don't we?
even in DOS we use DOS interrups an BIOS as well,
or somebody want's to create a program in DOS that dos not use any
int ?
Post 02 Apr 2006, 20:41
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.