Is it a good idea to write multi asm instruction in same line for a better reading when they concern a same block through a new keyword (nasm) like " -> " for example.
( ->: mean nasm will read asm instruction left to right)
( <-: mean nasm will read asm instruction right to left)
Example for function:%define float32(number) dword __float32__(number)
mov rsi, cube_game
mov rdi, end_cube_game
mov [add_angle_object + _y], float32(-1.0)
call rotate_object
begin:
call rotate_object <- mov [add_angle_object + _y], float32(-1.0) <- mov rdi, end_cube_game <- mov rsi, cube_game
(And why not authorize brackets " ( ) " for surrounded the 'parameters')
call rotate_object (<- mov [add_angle_object + _y], float32(-1.0) <- mov rdi, end_cube_game <- mov rsi, cube_game)
Example for calcule:vmovdqu xmm0, [add_angle_object]
vaddps xmm0, [angle_object]
vmovdqu [angle_object], xmm0
begin:
vmovdqu xmm0, [add_angle_object] -> vaddps xmm0, [angle_object] -> vmovdqu [angle_object], xmm0
(And why not do the inverse itteration of code bu changing " ->" in " <-" for another reading way)
vmovdqu [angle_object], xmm0 <- vaddps xmm0, [angle_object] <- vmovdqu xmm0, [add_angle_object]
Example for transfer value from RAM to another:vmovss xmm0, [rsi + _color]
vmovss [screen + REPERE + r8], xmm0
begin:
vmovss [screen + REPERE + r8], xmm0 <- vmovss xmm0, [rsi + _color]
PS: my goal is not transform asm in high level language (hate it anyway), is just for make it more readable cause even if assembly is fantastic programming way, the history make people's choose are turn in high level language.
So like assembly's fan, it will be great to "open" this langage by playing with additional syntaxe, by this way, make more simple to read and write, and finally, don't afraid person who want to be initiated by this wonderful language
Or a just semicolon is enough for read left to right, simple one char and same keyword for higher language level.
So the beginner of assembler will don't be lost with this ' ; ', but the more thing is we don't need to put this always, just for specify if we want enter more than 1 instruction in the same line.