flat assembler
Message board for the users of flat assembler.

 Index > Main > Base 4 numbers
Author
Eoin

Joined: 16 Jun 2003
Posts: 68
Location: Ireland
Eoin 15 Aug 2003, 19:11
I've a suggestion for Fasm. I think the addition of Base 4 numbers would greatly improve the readability of shuffle instructions.

eg this can be confusing
Code:
`shufps xmm0,xmm0,11010010b    `

but this makes much more sense
Code:
`shufps xmm0,xmm0,3102    `

I don't know what identifer shoud be used, maybe "q" for quad?

Last edited by Eoin on 15 Aug 2003, 19:23; edited 1 time in total
15 Aug 2003, 19:11
scientica
Retired moderator

Joined: 16 Jun 2003
Posts: 689
scientica 15 Aug 2003, 23:11
looks understandable to me, just as undestandable as the binary. But the quadrary is perhaps easier for some.

_________________
... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself.
15 Aug 2003, 23:11
Eoin

Joined: 16 Jun 2003
Posts: 68
Location: Ireland
Eoin 16 Aug 2003, 00:17
Maybe its just me, but in the shuffle instruction pair of binary digits means something, not the number as a whole.

So if you want to quickly see whats being shuffled into say the second slot you first have to look carefully to see which two binary digits refeer to that slot, then translate them. Base 4 numbers allow you to pick out the one important digit very quickly.

Yeah its not very important, but it would be nice.
16 Aug 2003, 00:17
roticv

Joined: 19 Jun 2003
Posts: 374
Location: Singapore
roticv 16 Aug 2003, 08:52
That's a really weird request I must say.
16 Aug 2003, 08:52
Eoin

Joined: 16 Jun 2003
Posts: 68
Location: Ireland
Eoin 16 Aug 2003, 11:36
I know I know, maybe look at it this way, we have number types for

2^1 Binary
2^2 ?
2^3 Octal

Theres a gap there that needs filling nah on second thought my origional posts make more sense .
16 Aug 2003, 11:36
scientica
Retired moderator

Joined: 16 Jun 2003
Posts: 689
scientica 16 Aug 2003, 11:47
Eoin wrote:
2^1 Binary
2^2 ?
2^3 Octal

_________________
... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself.
16 Aug 2003, 11:47
eet_1024

Joined: 22 Jul 2003
Posts: 59
eet_1024 19 Aug 2003, 09:15
tetral?
19 Aug 2003, 09:15
scientica
Retired moderator

Joined: 16 Jun 2003
Posts: 689
scientica 19 Aug 2003, 11:04
tetral - good one too.

_________________
... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself.
19 Aug 2003, 11:04

Joined: 16 Jun 2003
Posts: 1150
Location: Russian Federation

_________________
20 Aug 2003, 00:53

Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
10 Aug 2004, 12:22
vid
Verbosity in development

Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 10 Aug 2004, 18:12
okay, "q", but who would use it anyway? Why should we fill FASM with things almost never used that can be as well achieved another way. Why are two binary digits less readable than one "quadrary"?
10 Aug 2004, 18:12
crc

Joined: 21 Jun 2003
Posts: 637
Location: Penndel, PA [USA]
crc 10 Aug 2004, 19:12
Quote:

Octal is VERY useful for some things... like assemblers. Most of the x86 opcodes can be organized via opcode easily in octal, but not as much so in hex or decimal.
10 Aug 2004, 19:12

Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
I've gotten used to it
think as if you have never heard of base 10 system and you'll get used to
it - like your mother language or a base 10 system. Let it go, you don't
need q or o or even dec in assembly
10 Aug 2004, 19:31
crc

Joined: 21 Jun 2003
Posts: 637
Location: Penndel, PA [USA]
crc 10 Aug 2004, 20:13
Quote:
think as if you have never heard of base 10 system and you'll get used to it - like your mother language or a base 10 system. Let it go, you don't need q or o or even dec in assembly

Hmm, I like decimal, though I also use hex, octal, binary, and other exotic bases (Base 60 is good when dealing with large numbers...). There's no reason NOT to use the base you're most comfortable with, if it's supported by the tool.
10 Aug 2004, 20:13
Imagist

Joined: 13 Jun 2004
Posts: 114
Location: Pennsylvania (USA)
Imagist 10 Aug 2004, 20:19
The computer interprets numbers of all bases into binary, so I don't see how it matters.
10 Aug 2004, 20:19

Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
I have a story:
My English teacher always persuaded us to 'think' in English. I wondered
what she ment by that 'til I suddenly started doing that one day. Nothing
seemed to need translating any more. Few monts ago I started thinking
in HEX and BIN so I don't need to go throuhg any DEC to compare them to
'real' values - I just accept it. It's not hard if you once get the point

...and now, children - it's bedtime. The digits lived happily ever-after.

=>00:04 is really a good time to go to bed, because it's Q
10 Aug 2004, 21:00
mike.dld

Joined: 03 Oct 2003
Posts: 235
Location: Belarus, Minsk
mike.dld 11 Aug 2004, 05:51
Eoin wrote:
I've a suggestion for Fasm. I think the addition of Base 4 numbers would greatly improve the readability of shuffle instructions.

eg this can be confusing
Code:
`shufps xmm0,xmm0,11010010b    `

but this makes much more sense
Code:
`shufps xmm0,xmm0,3102    `

I don't know what identifer shoud be used, maybe "q" for quad?

I think it's so useless as writing 248004015204 (in base 256) and expecting the compiler to translate it to 0xF8040FCC.
11 Aug 2004, 05:51

Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
You did something wrong because 248004015204base256 is
623843501854137515595923460DEC and its
20408000004000105020004HEX
I don't get it, what did you mean with that?
11 Aug 2004, 06:16
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

 Jump to: Select a forum Official----------------AssemblyPeripheria General----------------MainTutorials and ExamplesDOSWindowsLinuxUnixMenuetOS Specific----------------MacroinstructionsOS ConstructionIDE DevelopmentProjects and IdeasNon-x86 architecturesHigh Level LanguagesProgramming Language DesignCompiler Internals Other----------------FeedbackHeapTest Area

Forum Rules:
 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum