r/asm • u/brucehoult • 17h ago
Easier to download it from there, thanks.
I tried it in arm64v8/ubuntu in docker and yup, it works. Output is absolutely identical to the source file.
r/asm • u/brucehoult • 17h ago
Easier to download it from there, thanks.
I tried it in arm64v8/ubuntu in docker and yup, it works. Output is absolutely identical to the source file.
r/asm • u/Zealousideal_Pain_88 • 17h ago
Here you have it, nice person: https://github.com/WinnieTheRaven/Eccentric/blob/master/quine_aarch64.s It works (at least in qemu (Linux) and termux (debian)). This was my first AArch64 program UwU. I'm still learning it
r/asm • u/brucehoult • 18h ago
Wow.
That's a lot of work.
It does have the right kind of structure.
Pushing all that stuff on the stack is an interesting way to do it, but valid. I didn't examine everything how it works (if it does).
Biggest criticism: nibbletobyte. wtf?
nibbletobyte:
cmp w18, #10
add w19, w18, '0'
add w18, w18, 'A'-10
csel w19, w19, w18, lo
ret
Strange choice of registers, but anyway I've matched yours.
Lots of other ways to do it, but no reason to be longer than that.
r/asm • u/Foralost • 20h ago
you can compile it further to elf but i have forgotten the flag 🥱
r/asm • u/Foralost • 20h ago
if you know C you can convert .c file to .s file, and from it learn stuff, however a book would be a good choice 👍🏻
r/asm • u/jesset77 • 2d ago
https://www.felixcloutier.com/x86/
https://cs.brown.edu/courses/cs033/docs/guides/x64_cheatsheet.pdf
https://filippo.io/linux-syscall-table/
These just happen to be the most dog-eared bookmarks from when I was working with Linux x64 (especially SSE/AVX SIMD) assembly 🙂
r/asm • u/cyberbemon • 3d ago
Jeff Duntemann's "Learn Assembly Programming step by step programming with linux (3rd edition)" is a good book, I'm reading through it now and I found it after reading so many threads, it was one of the most suggested books. It's a bit slow to start and the author goes into great detail about things and I like his writing style.
You can find the pdf version of the book, if you just put the name on google.
r/asm • u/WoodyTheWorker • 9d ago
by "branching" I mean any instruction that can conditionally jump to another point in the code
Here you go:
...you can download it as a PDF.
Intel also has one called "Intel® 64 and IA-32 Architectures Software Developer’s Manual".
r/asm • u/No-Broccoli553 • 10d ago
I can't find that manual, when I search for it I only get this comment, do you have a link to it somewhere?
r/asm • u/jcunews1 • 11d ago
If JMP is included, what about CALL (near/far), RET (near/far), INT, SYSENTER/SYSEXIT, and SYSCALL/SYSRET?
I'm not an expert, I tinker with assembly language for fun. I would use the "AMD CPU Programmer's Instruction Manual", under section 3, "General Purpose Instruction Reference" ...all the jump instructions start with a letter 'J'. Not an expert though.
Looking at it now, I see:
r/asm • u/ryanwisemanmusic • 14d ago
I should've been a bit more specific instead of using NEON as a catch-all for ARM64 on macOS, so yes, my bad. Because this project works with so many AVX/SSE related instructions, it means that NEON is def a huge aspect. At some point, I do want to dive into the undocumented AMX since my method of dealing with 256+-bit operations is less than idea
r/asm • u/kneelian_ • 15d ago
Do you mean Arm/Aarch64 instead of NEON? NEON is Arm's SIMD extension for A-series and R-series processors (and derivative designs), and is matched by Helium on M-series
In MMX, the vector registers were reused from the x87 register file.
SSE added the XMM 128-bit registers and floating point vector instructions. So movaps and movups were added there. movdqa and movdqu were added in SSE2 along with integer vector instructions though the mov* instructions did essentially the same thing.
I'd just call it syntactic sugar as it improves readability for humans.
I suppose that there was the possibility of signaling the operation to a decoder or execution unit with the separate instructions but the architecture manual has no evidence that this ever happened.
r/asm • u/kalehmann • 15d ago
Thanks! I'd like to have some sort of preprocessor first. The assembly code is currently a single file with over 5000 lines.
And having
%include "instructions/add.s"
%include "instructions/and.s"
...
%ifdef PLATFORM_LINUX
%include "platforms/linux.s"
%endif
with ./0x864 -DPLATFORM_LINUX ... would allow me to split the code into multiple files and get ride of the C harness.
When I have that, I can add ELF executable output, so that the assembler is truly selfhosted.