aarch64 assembler interactive environment?
Theo Markettos (89) 919 posts |
One of the nice things about BBC BASIC is the ease with which you can interactively write and execute aarch32 assembler: > P%=&9000 > [MOV r0,#42 > [MOV pc,r14 > PRINT USR &9000 Is there anything similar for aarch64? I’m guessing it would not be running under RISC OS, since that can’t switch back to A64 mode, so Linux or some other platform would be needed. It would not need the non-assembler parts of BASIC, but just a more interactive flow than the usual edit/compile/run command line. There are various emulator things, but I’m looking for something that runs on real hardware. Any suggestions? |
Simon Willcocks (1499) 513 posts |
BBCSDL has an aarch64 assembler. It doesn’t do floating point operations, just integer. https://github.com/rtrussell/BBCSDL/
(Probably not the smartest move to run aarch64 code on an Intel processor…) I expect the latest version displays the address correctly, not just 00000000, and puts whitespace before the encoded instruction. |
Rick Murray (539) 13840 posts |
All I’ve been able to find with Google is how to inline in GCC, but that’s hardly interactive.
Except you use P% (a variable), and PRINT and USR… So, BBC BASIC for A64 would be nice. ;) Sadly, it seems we’re a dying breed. I recently had an email about a blog post telling me that I was entirely wasting my time with “processor instructions” (actual quote!) and that I should be using something called Rust. đŸ¤¦ |
Simon Willcocks (1499) 513 posts |
Rust looks like a pretty good idea, making certain types of error impossible to generate, but that’s just from the documentation. It looks like it would be very frustrating until you really get the hang of it. |
André Timmermans (100) 655 posts |
Frustrating indeed. I see a tendency in recent languages (or extensions of them) to pay little attention to clarity. I often takes me several minutes of reflection/analysis to understand Lambda expressions in Java. |
Michael Grunditz (8594) 259 posts |
In my version of hosted bbc basic native code is possible. I am going to add support for native asm at some point. That means aarch64 asm on a a64 system. Another. Option is to start code on a core that runs in 64 bit mode from RISC OS. For that to be useful a inter cpu way of communication is needed. It varies between SoCs how this can be achieved, but they often have some kind of messaging. I am tinkering with running a standard 32bit module to provide simple swis for running 64bit code, I guess that can be used for extending basic as well. ( back on topic :) ) |