flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > How calculated symbols after . or _ ?

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1718
Roman 20 Jul 2023, 16:09
Fasmw 1.73
Idea work with vectors. Vec2 or vec3
Code:
mvec option,v { ... }

;in code
mvec add,p1.xyz,p2.xyz 

;generated this code 
movss xmm1,[p1]
addss xmm1,[p2]
movss xmm2,[p1+4]
addss xmm2,[p2+4]
movss xmm3,[p1+8]
addss xmm3,[p2+8]

mvec add,p1.y,p2.y

;generated this code 
movss xmm1,[p1+4]
addss xmm1,[p2+4]


    


I thinked on variant:
mvec add.xyz,p1,p2
mvec add.xz,p1,p2
mvec add,p1.y,p2.z

Or how calculated how symbols get macro ? Using math for this ?
mvec add,xyz ;get 3 values
mvec add,xz ;get 2 values
mvec add,x ;get 1 value
Post 20 Jul 2023, 16:09
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.