3 ms·
A few days ago I had the very foolish notion of trying to learn assembly for x64 Linux. It came out to 73 lines of code and weighs in at 288 bytes. It doesn't s
by blippage 1y ago
A few days ago I had the very foolish notion of trying to learn assembly for x64 Linux. It came out to 73 lines of code and weighs in at 288 bytes. It doesn't support the --help or --version arguments.
https://gitlab.com/mcturra2000/cerbo/-/blob/master/x64-asm/06-yes.asm?ref_type=heads https://gitlab.com/mcturra2000/cerbo/-/blob/master/x64-asm/0...
Some people seem to revel in assembly, but I now know why C exists.
- johnisgood 1y agoFASM[1] is great! [1] https://flatassembler.net https://flatassembler.net
- deleted 1y ago[deleted]
- blippage 1y agoAs an experiment I tried yes | pv > /dev/null and was getting about 5.4GiB/s On the fasm code, I was getting a meagre 7.3MiB/s. Ouch! The non-assembly version is considerably faster. I wonder if it is because I make a syscall for every write I want to perform, whereas C uses buffering, or something.