Skip to content
This repository has been archived by the owner on May 29, 2018. It is now read-only.

API definition #22

Open
noxer opened this issue Feb 14, 2013 · 11 comments
Open

API definition #22

noxer opened this issue Feb 14, 2013 · 11 comments

Comments

@noxer
Copy link
Member

noxer commented Feb 14, 2013

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

@aponigricon
Copy link
Contributor

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

@noxer
Copy link
Member Author

noxer commented Mar 1, 2013

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
Copy link
Contributor

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 😉

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

@noxer
Copy link
Member Author

noxer commented Mar 8, 2013

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
Copy link
Contributor

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

@aponigricon
Copy link
Contributor

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

@noxer
Copy link
Member Author

noxer commented Mar 14, 2013

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

@aponigricon
Copy link
Contributor

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... 😒 😞

@aponigricon
Copy link
Contributor

@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
Copy link
Member Author

noxer commented Mar 19, 2013

it returns the command line arguments for the application.

@aponigricon
Copy link
Contributor

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants