flat assembler
Message board for the users of flat assembler.
Index
> Projects and Ideas > Another attempt at examples... Goto page Previous 1, 2 |
Author |
|
Raedwulf 07 Dec 2007, 08:15
What I started on:
http://www.madwizard.org/dl.php?file=tutors.win32asm |
|||
07 Dec 2007, 08:15 |
|
kohlrak 07 Dec 2007, 20:28
That's good, but what we need is something for fasm though. Most likely something assembleable so the learner can mess with the values to see different outputs.
|
|||
07 Dec 2007, 20:28 |
|
roboman 08 Dec 2007, 05:31
There's some simple, commented, fasm code at:
http://home.comcast.net/~dexos/ It's all for DexOS and you'll need to change the DEX2 to DEX1 or wait a few weeks for the new ver of DexOS to be released (all the examples work on both ver of DexOS) |
|||
08 Dec 2007, 05:31 |
|
andyz74 08 Dec 2007, 09:49
I gladly found this thread for beginners tutorials and would like to say a few words out of a noob's "wishlist" in mind (...as I AM a noob! )
I try Fasm under linux and there are rarely tut's, which I am able to understand, and what I am especially seeking at the moment is a) a SHORT, WELL-decumented sourcecode, which gets the arguments (or parameters, don't know, if this is the exact english word...) of the commandline and put them out at the screen, so I can see, how to handle. I saw a few progs, that try to explain the handling of cmdline-arguments, but none of them was working source-code, although I'm sure, nearly all of U can code a working example in maximal 30 lines of sourcecode. b) a SHORT, WELL-documented sourcecode of how to get in graphics-mode and do some putpixel and getpixel. Nothing high-power, super-performance opengl, or some of this, but a simple piece of code, that gets in graphics-mode (full-screen or window, that doesn't matter) and puts anywhere a pixel in some colour and gets elsewhere the colour of one pixel. That would be on my wishlist in the moment, maybe, one of the forum members has an example-code for this. If U try to help the newbees, why not try this way, small example-progs to various points. -> working (compileable) sourcecode tells me much more, as any theoretically tut. With kindest regards, andyz74 |
|||
08 Dec 2007, 09:49 |
|
Dex4u 08 Dec 2007, 15:17
@andyz74, for your command line demo, i would take a look at the linux source code for fasm, also this: http://board.flatassembler.net/topic.php?t=1446
And for your simple graphic demo, take a look at this
|
|||||||||||
08 Dec 2007, 15:17 |
|
andyz74 08 Dec 2007, 16:23
The graphics-demo seems to be interesting, I hope I can get a lot of knowledge out of the source.
Out of my "duty" I've e found by the search-function the link U posted, and I'm aware of the fact, that prog-name and arguments are stored in the stack, but something doesn't work with that, what I have believed to learn out of it. I expected the downstanding code to work, if I start the prog with one argument. But it doesn't work. (Sorry, this is all off topic, I'll stop it after this entry) Code: format ELF executable entry start segment readable executable start: pop eax ; Get the number of arguments pop ecx ; Get the program name pop edx ; Get arg 1 mov eax,4 ; The system call for write (sys_write) mov ebx,1 ; File descriptor 1 - standard output ; CX should be "popped" as pointer to prog-name ; DX should be "popped" as pointer to arg 1. int 80h mov eax,1 mov ebx,0 int 80h ; Exit |
|||
08 Dec 2007, 16:23 |
|
Dex4u 08 Dec 2007, 19:36
I am also new to linux programming, but i would do something like this:
Code: format ELF executable entry start segment readable executablestart: pop eax ; Get the number of arguments pop ecx ; Get the program name pop ecx ; pointer to the second argument mov esi,ecx call str_len mov edx,esi mov eax,4 ; The system call for write (sys_write) mov ebx,1 ; File descriptor 1 - standard output ; CX should be "popped" as pointer to prog-name ; DX should be "popped" as pointer to arg 1. int 80h mov eax,1 mov ebx,0 int 80h ; Exit;Input ESI = ASCII string;Output ESI = string lenstr_len: push eax push ecx mov ecx,esistr_lp: lodsb or al,al jnz str_lp dec esi sub esi,ecx pop ecx pop eax ret |
|||
08 Dec 2007, 19:36 |
|
kohlrak 09 Dec 2007, 03:01
I'm thinking about waiting for the beginner package to come out before i really start or ask anyone else to start. That way we can get cross-platform stuff rolling out so no one has to first learn how to setup a particular OS first, especially if some one would have ended up coding for windows. No one would want to buy windows just to learn how to code for linux using fasm. As for specific examples, we've tried that numerous times before. Plus, i think learning the mneumonics is more important than screwing around with a specific api.
|
|||
09 Dec 2007, 03:01 |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.