flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2 |
Author |
|
idle
i finally understood how hash works and managed to copy-paste & comment it out
so try loading '.. /tst/hash.fnv1a.txt' |
|||
![]() |
|
idle
hi, i've frozen my android phone hence i'm scarce on net traffic at the moment, some stuff not included, see an old link from post #1, which is not updated damnit
i found some time to improve gui a bit there are several tips/fixes in ".asm" and "fedit.ash" for TG, marked with ;; or TG or so ok: -drag -n- drop, TG, can fedit post drop message to its parent? -command line -search -n- replace, TG, F3 activity should be rewised in fedit sorry, 3d not ready ps, the tutorial macgub offered gets rank 3/10th as it imlies some knowledge with no mention of what exactly fletcher dunn, ian parberry - 3d math primer for graphics and game development, 2nd ed - 2011 Last edited by idle on 17 Feb 2019, 21:31; edited 3 times in total |
|||
![]() |
|
idle
macgub, i mean 3DICA's - 3d basics tutorial
|
|||
![]() |
|
idle
hi the board
- does any one know why locals, named .dst,.src,.cnt get replaced with edi,esi,ecx? - also ESC in search dialog does not close it - added file path/name/ext routines tnx in advance Code: ;2017.04.11, TG: fix locals naming bug memcopy: ;dst,src,cnt push ebp mov ebp,esp .cnt! label dword at ebp+4*4 .src! label dword at ebp+3*4 .dst! label dword at ebp+2*4 pushf cld push eax ecx edi esi mov esi,[.src!] mov edi,[.dst!] mov ecx,[.cnt!] mov al,cl and al,11b shr ecx,10b rep movsd mov cl,al rep movsb pop esi edi ecx eax popf pop ebp ret 3*4 |
|||
![]() |
|
idle
hi, next features added
- include statement support it is once by default but slight fix possible to follow fasm experimental as tokenization leaves most complicated proc for me - each token got .file_ondisk field include tokens got .include and .include_nest_level (stored but not used currently) - Interface .get_full_pathname_lower_padzero, .set_cur_dir; find_include_by_string, shift_in_buffer include logics needs that - GetFullPathNameA, ShiftInBuffer gizmo - get_float gizmo renamed into GetFloat to keep the style - added tokens.ExprBufRealSizeOf field -> minimal tokens.szExprToken should be 16 (finally seen smart in OllyDbg by default ![]() scripting speed gain up to 1/3rd and that seems the limit caused by fpu-cpu mixture - load/save/error behaviour corrected - maybe smth else p.s.: u can alway recompile the gui using one of predifined languages or defining yours, e.g.: %LNG% equ 'ENU' ;etc %LNG% equ 'EST' ;etc |
|||
![]() |
|
idle
Sniff and appreciate that gem: http://ultimate3d.org/?Categorie=Home&Style=Classic
Time to mail the author. Works, style and vision of fasm forum members esp pabloreda, macgub, tthsqe will always fly by me. Finally found [myself heh]. Time to study. Your links, offers are wellcome! |
|||
![]() |
|
Roman
Quote:
Nice trick ! Very interesting , how fasm use label in this case, like as EQU ! I dont know this ! I try this and get error ! Code: .cnt! label dword at ebp+4*4 ldfff: mov ecx,[.cnt!] |
|||
![]() |
|
idle
Cause .cnt seems to be a sub-label and ldiff closes its local visibility
Thus full name should be used in your case Or precede ldiff with a dot: .ldiff |
|||
![]() |
|
idle
While moving forward/
ABdist routine was added and it took me 2hours to find as rapid and non bloated solution as possible. I wonder how would HLL do that. And that's why, in its origin, we need more and more giga-ram, and asm-dev lives on bare enthusiasm and no money! Code: ;2021.03.07 ;0|Bz -> st5 ; By -> st4 ; Bx -> st3 ;0|Az -> st2 ; Ay -> st1 ; Ax -> st0 ; ; st0<- ../txt/Pythagoras distance.txt ABdist: fsubrp st3,st0 fsubrp st3,st0 fsubrp st3,st0 fmul st0,st0 fincstp fmul st0,st0 fincstp fmul st0,st0 fdecstp fdecstp faddp faddp fsqrt ret During next verification... Code: ;returns 2d (0z) or 3d distance between two dots f04_2d: .A: f04 -1,+1 .B: f04 +1,-1 f04 ABdist f04[ (.A+0) (.A+4) ] 0 \ f04[ (.B+0) (.B+4) ] 0 .a=f04[$-4] .aCheck=sqrt( (f04[.A+0]-f04[.B+0])^2 + (f04[.A+4]-f04[.B+4])^2 ) f08_3d: .A: f08 -1,+1,-1 .B: f08 +1,-1,+1 f08 ABdist f08[(.A+0)(.A+8)(.A+16)] \ f08[(.B+0)(.B+8)(.B+16)] .b=f08[$-8] .bCheck=sqrt( (f08[.A+0]-f08[.B+0])^2 + (f08[.A+8]-f08[.B+8])^2 + (f08[.A+16]-f08[.B+16])^2 ) f10_3d: f10 ABdist (-1)(+1)(-1) (+1)(-1)(+1) .c=f10[$-10] .cCheck=sqrt( ((-1)-(+1))^2 + ((+1)-(-1))^2 + ((-1)-(+1))^2 ) align 4 ... pow had to be revised, i am not sure of with those signs (reminding our last talk ubout universe understanding, i donot know if (-2)^1.9 should be < 0 and (-2)^2.1 should be > 0). pow: Code: .pow: cmp ebx,1 jne .return_error cmp ebx,eax jne .return_error ;x^y = 2^? ;? = log(2;x^y) = log(2;x)*y = fyl2x ;? = int. + .frac ---> 2^? = 2^int. * 2^.frac = f2xm1 +1, fscale ;detect resulting sign as fyl2x fails on -x fld tbyte[ecx+tokens.szExprToken] FLD ST0 FISTTP QWORD[ESP-8] TEST BYTE[ESP-8],0000'0001b ;odd(y) ? ; fld tbyte[edi] fabs fyl2x fld st0 frndint fxch fsub st0,st1 f2xm1 fld1 faddp fscale fstp st1 ; JZ .return_single ;even - result positive TEST BYTE[EDI+9],1000'0000b ;-x? JZ .return_single ;+x - result positive FCHS ;-x^odd(y) - result negative ; jmp .return_single pow sign test Code: m2p0=(-2)^0 m2p1=(-2)^1 m2p2=(-2)^2 m2p3=(-2)^3 m2p4=(-2)^4 p2p0=(+2)^0 p2p1=(+2)^1 p2p2=(+2)^2 p2p3=(+2)^3 p2p4=(+2)^4 m2p1.9=(-2)^1.9 m2p2.1=(-2)^2.1 |
|||
![]() |
|
DimonSoft
I always wondered where, except, maybe, for debugging purposes, would fincstp and fdecstp be useful. Thanks for the example.
|
|||
![]() |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.