flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
FrozenKnight 02 Oct 2007, 10:30
i was justwondering how to define a 128 bit var. i know 8 bit is db and 32 bit is dd and 80 bit is dt but how do i define 128 bits?
|
|||
![]() |
|
0.1 02 Oct 2007, 13:04
do any of following:
Code: var128bit db 16 dup 0 var128bit dw 8 dup 0 var128bit dd 4 dup 0 var128bit dq 2 dup 0 _________________ Code: o__=- ) (\ /\ |
|||
![]() |
|
SFeLi 02 Oct 2007, 14:32
Code:
label var dqword
rb 16
|
|||
![]() |
|
Xorpd! 02 Oct 2007, 15:01
Quote:
Good one, but what if you want to write an initial value? This is not just a problem with FASM, but also with Intel's documentation. In 25366721.pdf sometimes a 128-bit quantity is written as subquantities, high subquantity leftmost, i.e. mixed big- and little-endian. Other times it is written as one 128-bit quantity, and other times it is left to the reader to guess which half goes where (as with palignr). If the user wants to initialize 'var' to two qwords, the low qword would have to come first, backwards compared to what would be the norm in Intel's documentation. It would be neat if there were a way to make this less error-prone for the FASM user. |
|||
![]() |
|
FrozenKnight 03 Oct 2007, 16:46
The reason i asked is because i'm working with very large prime numbers and their multipuls/powers. and was hoping to use 128 but definitions. (without having to spend hours breaking the number into binary.
Tomasz Grysztar could you please implement a data type for this purpose. maybe a dqword or something? |
|||
![]() |
|
Feryno 04 Oct 2007, 08:24
microsoft uses "octaword" (or shortened form "oword") for 128-bit variable
so perhaps feature FASM syntax: var128bit_initialized do 123456789ABCDEF00FEDCBA987654321h var128bit_uninitialized do ? var128bit_uninitialized ro 1 |
|||
![]() |
|
LocoDelAssembly 04 Oct 2007, 15:06
Guys, remember that fasm internally does works with 64-bit integers. By adding such features fasm internals should be improved first (or accept constants only for "do" while in "dq" you can do "label dq 2+4+assembly_time_variable*9/2").
|
|||
![]() |
|
edfed 05 Oct 2007, 20:52
macro or implementation
the manner to build the 128bit value is not important the goal is to have this value type i think hbyte is a good name cause hexa byte very impressive!!! ![]() like goldorack or demolition man and then RH and DH and it cannot be a problem with Dh register because you never write label dh x or dh x so no syntax error but a little of confussion for beginners YEAH |
|||
![]() |
|
MCD 28 Oct 2007, 01:09
those are usually called "dqword" (native fasm size) or "oword" (my preference).
but as LocoDelAssembly wrote, fasm works only on 64bit constants internally. Sure, you can build a macro that defines 16bytes by defining multiple bytes/words/dwords or qwords. That's quiet easy if the arguments of the macro are supposed to be in hexadecimal. if you want the 16bytes to be defined in decimal, than you'll need a macro that does both number base converting and argument parsing, which is not trivial. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.