Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add assembler directive .global as synonym for .globl #152

Closed
scotws opened this issue Feb 21, 2022 · 3 comments
Closed

Add assembler directive .global as synonym for .globl #152

scotws opened this issue Feb 21, 2022 · 3 comments

Comments

@scotws
Copy link

scotws commented Feb 21, 2022

To increase compatibility with other assemblers and because this is the friggin' 21st century and we shouldn't have to mangle words to save a single character (I'm looking at you, "umount" and "Forth") while making it even harder for newbies, please add .global (a complete word) as a synonym for .globl (barely pronounceable gibberish that looks like a typo to any normal person).

Ideally, this should be the default spelling in all code and documentation as well, though it might be worth adding a separate issue for this.

See https://ftp.gnu.org/old-gnu/Manuals/gas-2.9.1/html_chapter/as_7.html#SEC93 for the take of the GNU Assembler regarding this question. See https://developer.arm.com/documentation/dui0802/b/Directives-Reference/EXPORT-or-GLOBAL where ARM did the intelligent thing and dumped .globl completely. As an aside, see https://unix.stackexchange.com/questions/9832/why-is-umount-not-spelled-unmount for a discussion of the technical limitations that led to umount.

@TheThirdOne
Copy link
Owner

I will probably do this, but I would like to get some more information on your perspective before I do. I am not a normal user of RARS so I rely on issues to get an idea of where most of the users thoughts are.

To increase compatibility with other assemblers

Which other assemblers are you considering?

while making it even harder for newbies,

Are you speaking from personal experience, experience of teaching others, or just informed speculation?

@scotws
Copy link
Author

scotws commented Feb 22, 2022

Sure. Let me provide a bit of background if that helps.

I've been programming assembler since my first days on the ViC-20 on the 6502, and have continued 8-bit assembler as a hobby since then. At some point I took a look at switching to x86, but recoiled when I saw that there were 3000+ (and counting) instructions; ARM looked cleaner but they wanted me to jump through all kinds hoops just to get the most basic information, and it seems you are not allowed to do jack without risking a lawsuit. Add to this that the 6502 crowd is incredibly friendly, welcoming and just generally one of the nicest communities I have ever been part of online. Other programming I have mostly done with Python, Go (golang), and a bunch of stuff out of curiosity like Forth -- no Java, unfortunately. In the end, assembler for its own sake is just too much fun to leave.

Enter RISC-V, a modern-day ISA that a hobbyist can love: Small and fixed base instruction set, no legal headache. But hardly any infrastructure yet.

Because I use Linux systems at home, the first assembler I first took a look at was gcc/as. As you are probably aware - and this is where we get to my gripe about .globl - it is full of all kinds of legacy stuff and historical terms nobody has ever bothered to clean up or replace (my favorite is .bss -- it's like BS but with extra S). You can tell assembler programming has stagnated in the PC world. Then I found your RARS, which is simple to use, just works, and is understandable - great work, and thanks for it.

My suggestion now would be to use this opportunity to at least blunt some of the worst legacy problems, for instance, by pushing terms like .globl to the back row and using .global as the default instead. It's compatible to gcc/as (whereas, as you are probably aware, .eqv doesn't seem to be, gcc/as uses .equ instead, maybe that could be another synonym?). Which is what brought me to this issue.

Again, thanks for RARS!

@TheThirdOne
Copy link
Owner

This should be fixed by 27a7c1f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants