-1

I am still new at assembly language. I find that frequently using"$" slows down my typing speed because i have to "shift 4" so many times. I am curious to know if there is an equivalent token that I could use.

Or maybe perhaps there is a way for me to program one of my keyboard keys to give me the character "$" so that i don't always have to "shift 4".

Please let me know what you think, and i appreciate your inputs!

Farah
  • 5
  • 2
  • if you want $ on a separate key, create a new keyboard layout for your own, or use a tool to remap the keys. Another way is using a scripting tool like autohotkey – phuclv Mar 11 '17 at 04:17

1 Answers1

2

Whether there's an equivalent token depends on your assembler, but it's unlikely. Here are four solutions:

  • Use a macro preprocessor (like m4 on Unix/Linux) to turn some other string into $ before passing the source code to your assembler. If you're already running your source code through the C preprocessor, use #defines. E.g. #define ra0 $a0.
  • Learn how to set up macros in your text editor so you can, say, type \ a 0 and have your editor replace it with $a0.
  • Type remap keys windows or remap keys linux or remap keys mac into your favorite search engine to find a way to remap, at the operating system level, some other key combination to $. You might have to buy an app to set this up, particularly on Windows or macOS.
  • Learn to type better. The correct way to type $ is to press the right shift with your right pinky, and press 4 with your left index finger. If you're typing it any other way, practice typing it correctly. In particular, if you're using the left shift, you're probably contorting your left hand into an awkward position every time you type $.
rob mayoff
  • 375,296
  • 67
  • 796
  • 848