0x10cAtlas / atlas2

The new version of AtlasOS.
MIT License
6 stars 3 forks source link

API definition #22

Open noxer opened 11 years ago

noxer commented 11 years ago

Let's define the API! https://github.com/0x10cAtlas/atlas2/wiki/API

aponigricon commented 11 years ago

Shouldn't arguments be on the stack, like pretty much every single decent OS do?

noxer commented 11 years ago

Linux offers a fastcall API (AFAIK). I don't know about Windows. Its again a matter of definition. Both ways are possible, both have their odds (fastcall: we block registers, cdecl: slower).

aponigricon commented 11 years ago

Sorry for not working on this project, but I've been very busy with school and activism lately...

But I'm hoping to be able to look at this at some point, when I get the time, I'm also working on other open source projects, actually :wink:

My main problem right now is to find a way to debug my code more efficiently... how do you guys do?

noxer commented 11 years ago

Hi, first: The link does not work. second: I use DevKit to debug it.

I am very busy at uni. It leaves me barely enough time to check my mails (its weekend, yay!).

aponigricon commented 11 years ago

I think you're supposed to log into facebook for the link to work... And I'll check DevKit out then...

aponigricon commented 11 years ago

DevKit doesn't work in Windows 8... i'll try running it in compatibility mode, when I get the time...

noxer commented 11 years ago

ok... there were plans on making a eclipse plugin, but nobody really cared about it.

aponigricon commented 11 years ago

I think I made it work on windows 8 in windows vista SP2 compatibility mode... at least it is actually able to assemble code, but unfortunately plugins doesn't work, so I have neither a monitor nor a keyboard nor any hardware at all besides the dcpu-26 itself... :unamused: :disappointed:

aponigricon commented 11 years ago

@Noxer

Linux offers a fastcall API (AFAIK). I don't know about Windows. Its again a matter of definition. Both ways are possible, both have their odds (fastcall: we block registers, cdecl: slower).

I was referring to (INT 0x8002) uword* arg()... I assume that it returns the system-process arguments, and not function arguments?

noxer commented 11 years ago

it returns the command line arguments for the application.

aponigricon commented 11 years ago

Exactly! I feel that I remember that both windows and linux puts all of the command line stuff in the stack as one big string. But I may be wrong... let me check... Okay, Linux does exactly as I assumed! The kernel pushes the characters in a P-string containing the arguments, in reverse order. I'm not sure about Windows, but from what I know, it should do something quite similiar.