flat assembler
Message board for the users of flat assembler.

Index > Linux > What Linux distro should I use...

Goto page Previous  1, 2, 3, 4, 5
Author
Thread Post new topic Reply to topic
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1178
Location: Unknown
HaHaAnonymous 01 Feb 2013, 17:12
[ Post removed by author. ]


Last edited by HaHaAnonymous on 28 Feb 2015, 21:48; edited 1 time in total
Post 01 Feb 2013, 17:12
View user's profile Send private message Reply with quote
Endre



Joined: 29 Dec 2003
Posts: 217
Location: Budapest, Hungary
Endre 02 Feb 2013, 13:11
Maybe these snippets help you admit your ignorance. And yes, this feature has been there since years.
Code:
/**
 * Compile with
 * gcc -g -masm=intel hello.c -o hello
 */

#include <unistd.h>
#include <sys/syscall.h>

int main(void)
{
    char message[] = "Hello World\n";

    asm("mov     eax, %0 \n\t"
        "mov     edi, %1 \n\t"
        "mov     rsi, %2 \n\t"
        "mov     edx, %3 \n\t"
        "syscall \n\t"
        :: "i" (__NR_write), "i" (STDOUT_FILENO), "g" (message), "i" (sizeof(message)-1)
        : "eax", "edi", "rsi", "edx");

    return 0;
}    


or a simple assembly code, which you can even debug with gdb, just set a break-point at _start, and run.

Code:
/**
 * Compile with
 * gcc -g -nostdlib hello.S -o hello
 */

        .if 0
#include <unistd.h>
#include <sys/syscall.h>
        .endif

        .line __LINE__
        .intel_syntax noprefix
        .text
        .globl _start

_start:
        mov     eax, __NR_write
        mov     edi, STDOUT_FILENO
        mov     rsi, offset message
        mov     edx, offset message.size
        syscall
        xor     edi, edi
        mov     rax, __NR_exit
        syscall

message:
        .ascii "Hello World\n"
message.size = . - message    


Note that in last example even C-headers are included. Try it with fasm. If you're wondering I can show you how you can reach C-structure members from assembly when you mix C and assembly codes.
Post 02 Feb 2013, 13:11
View user's profile Send private message Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1178
Location: Unknown
HaHaAnonymous 02 Feb 2013, 15:33
[ Post removed by author. ]


Last edited by HaHaAnonymous on 28 Feb 2015, 21:46; edited 1 time in total
Post 02 Feb 2013, 15:33
View user's profile Send private message Reply with quote
Endre



Joined: 29 Dec 2003
Posts: 217
Location: Budapest, Hungary
Endre 04 Feb 2013, 11:00
Free pascal? We were talking about gcc/gas. What mistake was expected? Sorry, I just don't understand what you want to say.
Post 04 Feb 2013, 11:00
View user's profile Send private message Reply with quote
chastitywhiterose



Joined: 13 Oct 2025
Posts: 38
chastitywhiterose 19 Oct 2025, 10:08
Endre wrote:
I think your professor did the right thing. Learning something is always a pain but it is also a challenge. I made this decision more than 8 years ago by myself after I finished my diplom software under Windows. The general performance of a Linux system is far better than that of a windows one. Windows networking is a catastrophe. No better word. Slow network connections make it slow and irresponsive. Why? Windows' scheduling method is a big zero. A normal process may run with 100% processor load while the others remain totally irresponsive. Sometimes you encounter processes (started by simple user application) which you can't stop anyway (except by reboot). Windows' security is also a zero (e.g. user continously have to have root permissions). Permissions to system directories (sorry, folders) are granted to anybody. If you catch a virus then it can damage the entire system. It's a joke. Windows is still no multi-user OS. Nvidia video cards show really better performance under linux than under windows. And we could continue endlessly.

I admit I use neither KDE nor GNOME thus I had also some problems with my printer but I learned how to solve it. My oldest PC has an S3 video card. It works 20% faster under linux than under Windows. Why? because the driver is configurable appropriately. Ah, almost forgotten. The driver did never crash the system yet.

You know the law: Create a system which is usable also by stupid people. -- It will be used only by them.


I also agree with the professor on this. I was reading a book by an author on leanpub for RISC-V Assembly who said he tellls his students that at some point they are going to need to learn Linux to get things done as a developer.
Post 19 Oct 2025, 10:08
View user's profile Send private message Send e-mail Reply with quote
Endre



Joined: 29 Dec 2003
Posts: 217
Location: Budapest, Hungary
Endre 09 Nov 2025, 11:32
chastitywhiterose wrote:
I also agree with the professor on this. I was reading a book by an author on leanpub for RISC-V Assembly who said he tellls his students that at some point they are going to need to learn Linux to get things done as a developer.

Maybe also comrade agrees with his professor already Smile.
Post 09 Nov 2025, 11:32
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3, 4, 5

< 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.