-
Notifications
You must be signed in to change notification settings - Fork 2k
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
debugger: parse octal expressions (prefixed by '0') #980
Conversation
This is going to cause a big change in behaviour as currently you can have leading zeroes on a number using default base. Could you use 0o instead? |
Personally, I'd go for 0o as the octal prefix; most new languages are switching to that for octal, and even C and C++ standards committees are proposing deprecating the old 0 prefix in favor of 0o as it makes code more readable at a glance. |
I thought the standard Intel letter suffixes (h for hexadecimals, o or q for octals) might be a more appropriate syntax to implement in the MAME debugger. I don't know, though; perhaps it's more important to maintain bug-compatibility with C++ and the many other descendants of the typeless language Ken Thompson and Dennis Ritchie implemented on the 18-bit PDP-7. |
The goal here is to be compatible with old DEC documentation, as I understand it, so the old-style leading zero is definitely desirable. Maybe 0o as the default, and have a "DEC mode" command that switches it to accept just 0? |
Another idea I had was that commands that take a CPU space as a parameter could set the default number base to 8 if is_octal() holds true. |
RB: yes, that's the idea -- DEC PDP-11 world is octal. They don't use a prefix, though. Making other parts of MAME honor is_octal() is bigger task, I thought I'd start with something simple :) |
I'd suggest to accept prefix It's quite irritating if addresses printed before e.g. the dasm output are octal, and even without leading zeroes, and you have to enter decimal or 0x prefixed breakpoint adresses. |
I like @pullmoll 's suggestion. @shattered , if you can make it work that way I'll be glad to apply it. |
So who going to actually apply @pullmoll's suggestion before the release goes out? |
No description provided.