116 points · by wyc · 12y ago · 49 comments
A few tattered notes of it at: http://xania.org/200711/irbasic but sadly most is lost to time.
Nowadays even C++ is simple, compared to mastering all the opcodes and their side effects in latest generation processors.
socket_call: .long 281
connect_call: .long 283
How does one get these numbers?edit: https://github.com/wyc/armbot/blob/master/connect.s#L55
/* syscall to call a syscall! / http://lxr.free-electrons.com/source/arch/arm/include/uapi/a...
/
222 for tux */ http://lxr.free-electrons.com/source/arch/arm/include/uapi/a...I do have a set of reference manuals, opportunity purchase, for acorn-era ARM systems. What sort of consistency would I find between historic ARM instruction set and the latest 32 and 64 bit versions?
One big change is that modern ARM processors tend to run mostly in Thumb (16-bit instruction) mode. It's faster, but you lose all the fun condition codes. High-performance code should take advantage of NEON.
If the above does not answer your question, please ask a more specific one. ;-)
One request though: would someone be so kind as to take the time to annotate them so noobs like me can know what's going on? I think these are great ways to learn Assembly--something I've wanted to do for awhile. I've long felt that understanding coding at that level would only strengthen my skills in higher-level languages.
Bonus question: How can I answer that question for myself in the future when looking at similar source? Said differently: What am I looking at here? :)
Otherwise, it would have had to write a TCP stack, drivers, ...
Software licensing is not a joke.
The author's account on Github seems to have many projects were a license has been either made up, or adapted. Perhaps out of lack of understanding current licensing and available licenses.
They could check this site out for some help: https://tldrlegal.com/
If the author intends to allow anyone to use the codebase for anything, they should choose an existing license that permits this... such as the MIT, Apache, BSD licenses, etc. Making one up is not an acceptable replacement and would not hold up in court should it ever come to that. "But judge, the author said I could do 'WHAT THE FUCK I WANT'!". :(
I do hope you're not restraining yourself from contributing to bfb because of the software license ☺
Could you please point me which licenses were made up or adapted on my repositories?
The only repository I could change is photoalbum because it might useful to someone else.
I'm not discussing your repos, but rather the license choice.
You appear to have forgotten to add the "No Warranty" clause to the repo's you use the WTFPL on. This implicitly means your code is fit for use, and if it crashes my system, you are liable (and, more importantly, you accept liability).
I wouldn't need you to re-license under BSD since the WTFPL allows me to do this already... without your knowledge nor permission.
The WTFPL allows me to re-assign copyright to myself, effectively stealing your work. I might even be able to pursue you after claiming the codebase as my own work (and re-licensing it under a proprietary license).
In any event, the WTFPL provides you with almost no protections against much of anything. As a fellow developer, I don't want anyone to get screwed. I agree with the spirit and intent of your license choice (I use Apache 2.0 for my projects specifically to allow others to do whatever they want, except claim copyright or re-license). However, I feel this license is more of a joke and could do more harm than good.
>> Can’t you change the wording? It’s inappropriate / childish / not corporate-compliant.
>
> The WTFPL lets you relicense the work under any other license.
Also, see FAQ #6 and #8.Not to mention, this "license" was not written by a lawyer, but rather a software developer. I'm no lawyer, and I'm confident any license I can make up would be shredded by real lawyers.
Furthermore -- the codebase in question above, does not include the optional "No Warranty" clause, which means his software implicitly must be fit for use... and if it breaks something, he can be held liable.
While I agree with the spirit and intent of this license, it really isn't a real license and is easily mis-used by even those who do wish to treat it as real.
So, this license appears to be really a joke-license... not a serious one... and I still maintain the codebase's author should pick a real license if the intentions are to allow universal use.
See also GNU's site: https://www.gnu.org/licenses/license-list.html#WTFPL Fair enough that they don't recommend it, but they believe it is GPL compatible.
"Hey while that license is really creative, you realize that its also not doing you any favors. Three things that you might want to watch for are warranty issues, the ability to reassign to any license means you can be barred from using your own code, and someone can reassign the copyright to themselves and then take down your site with a DMCA. That is a lot of risk to carry just to be clever with the license."
The author seems to like it the way it is and you've shined your light on the risk, hope it doesn't show up as another HN post on how evil lawyers did evil things.
So again: exactly what is the problem (beyond hand-wavy unevidenced claims about judges)?
I agree with Alupis that WTF is an unfortunate license choice for many projects, since it introduces a lot of legal uncertainty. But I also agree with most commenters in this thread that for this particular project, it doesn't matter. Cool though it is, no one is going to use this code in a commercial project, or as the basis for another OS project.
So it really doesn't matter in this case.
On the other hand, if someone writes a TCP stack in ARM assembly and licenses it under WTF with the intention of letting other people use it in their projects, there's a potential problem. It's not just corporations who will avoid a non-standard license, it's many established open source projects as well (for the same reason: legal uncertainty).
* The codebase in question neglected to include the "No Warranty" clause, which implicitly means his code is fit for use. So, if I run it on my machine and my machine crashes, he is liable.
* Just because a license has yet to be challenged, does not make it solid. That would be rather dangerous in a corporate environment.
* This license does not forbid me from re-assigning copyright to myself, then pursuing the original author.
As I said before, licensing is serious business. There is a reason most licenses are pretty long, even the "do what you want" licensing like MIT or BSD.