flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2, 3 Next |
Author |
|
tthsqe 20 Feb 2012, 07:59
Here is a nice little calculator for doing basic operations.
(It is much more useful than the calculator that comes with windows) I hope it comes in handy, and please report any bugs here!
Last edited by tthsqe on 17 Jan 2014, 00:20; edited 9 times in total |
|||||||||||||||||||||
![]() |
|
avcaballero 20 Feb 2012, 08:49
Wow, it has an excellent look
|
|||
![]() |
|
JohnFound 20 Feb 2012, 10:09
Interesting tool. But I have one note and one complaint.
![]() 1 note: Interesting code formatting style! 1 complaint: I can't clear the result windows. Even after select all/delete, on the next calculation, all previous result appears back. IMHO it contradicts to PLA. _________________ Tox ID: 48C0321ADDB2FE5F644BB5E3D58B0D58C35E5BCBC81D7CD333633FEDF1047914A534256478D9 |
|||
![]() |
|
tthsqe 20 Feb 2012, 18:59
@JohnFound,
complaint noted - the option to delete some of the results does seem like a good one. I'll post an update when I get the graphing implemented. ![]() |
|||
![]() |
|
tthsqe 24 Feb 2012, 13:01
Would it be better to have multiplication also implied by a white space?
e.g. x + y z <=> x + y * z |
|||
![]() |
|
tthsqe 04 Mar 2012, 03:48
OK, new version posted with some omprovements.
|
|||
![]() |
|
gunblade 13 Mar 2012, 15:40
Thats very impressive..
Would be awesome to see the source for it - if you dont mind.. if you cant/dont want to release it, then thats fine - was quite interested in how you do that 3D plotting though. Sort of looks raytraced? |
|||
![]() |
|
tthsqe 15 Mar 2012, 02:54
Thanks! I worked hard on it...
Um, the 3D drawing is accomplished with opengl and a manual cpu-based shader. It might look raytraced, but in fact the surfaces are just a bunch of poly's. After the next version (which has an implicit surface plotter) I'll include the source again. Quick question for anyone who can answer: in the function LPVOID WINAPI VirtualAlloc( __in_opt LPVOID lpAddress, __in SIZE_T dwSize, __in DWORD flAllocationType, __in DWORD flProtect ); how can I be sure that all of the memory locations from RETURN_VALUE to RETURN_VALUE+SIZE_T will not incure an access protection fault upon touching? For example, if I call it with SIZE_T set to 4GB, can I assume that all addresses beyond RETURN_VALUE will be accessable? |
|||
![]() |
|
revolution 15 Mar 2012, 03:01
tthsqe wrote: Quick question for anyone who can answer: |
|||
![]() |
|
kalambong 06 Apr 2012, 08:59
Just dl the progs, will try it out this Easter weekend
Happy Easter, dude !! |
|||
![]() |
|
kalambong 09 May 2012, 04:11
|
|||
![]() |
|
AsmGuru62 09 May 2012, 15:00
@tthsqe: I think the Win32 process is able to allocate up to 2Gb and that is un-fragmented room, so 4Gb will most likely give NULL back.
|
|||
![]() |
|
idle 13 May 2012, 20:05
tthsqe wrote: little calculator muMath.EXE 315'392 kB image.ico 270'398 kB ...with a big icon :) tthsqe wrote: Would it be better to have multiplication also implied by a white space? will that cause problems in future? there are many spaces in stream do you restrict instructions to some set? e.g. our cpu is capable up sse3 and the program run(i was happy) could you explain the logics of muMath.asm, ln.1467, please Code: ... pop eax ; mov dl,9 sub dl,al sar dl,7 add al,'0' and dl,39 add al,dl ; stosb ... thanx |
|||
![]() |
|
tthsqe 14 May 2012, 03:45
@AsmGuru62, thanks for the info. I though I was running into memory problems at that time, but I have since reduced the memory usage of the contour plot function from O(n^3) to O(n^2).
![]() @idle, that function looks like one for printing integers. Code: PrintInteger: push ebp mov ebp,esp test eax,eax jns .l1 mov byte[edi],'-' inc edi neg eax .l1: xor edx,edx div dword[OutputBase] push edx test eax,eax jnz .l1 .l2: pop eax mov dl,9 sub dl,al sar dl,7 add al,'0' and dl,39 add al,dl stosb cmp esp,ebp jb .l2 pop ebp ret First, the digits are pushed onto the stack, then they are popped off and printed. The part you quoted makes sure that the digits beyond '9' get mapped to 'a'-'f'. i.e. Code: if al>9 return 'a'+al else return '0'+al endif In the next version, I hope to add a nice 2D plotter, support for arrays, and an optimized compiler (constant propagation, common sub-expression elimination, ...blah blah blah). ![]() |
|||
![]() |
|
dmitriy566 17 Oct 2012, 05:06
Hello!
If i write f[n]=If[n<=1,n,f[n-1]+f[n-2]]; f[40] and evaluate, it takes a lot of time to get the result. How can i reduce time of evaluation? |
|||
![]() |
|
tthsqe 17 Oct 2012, 05:26
That is just to demonstate the recursive features and has exponential running time.
Try Code: f[n:x,y,z]=(x=1;y=0;While[n>0,z=y;y=y+x;x=z;n=n-1];y); f[40] I decided to put local variables in functions after a ":" |
|||
![]() |
|
hopcode 17 Oct 2012, 10:45
hi tthsqe,
as for all your other stuff, this is cool too ![]() i would like to have a native 3D-plotting plugin from it. to say, API like "ParametricPlot3D", but more primitive/abstracted. do you plan separating/abstracting such a graph-engine ? Thanks, Cheers, _________________ ⠓⠕⠏⠉⠕⠙⠑ |
|||
![]() |
|
LocoDelAssembly 17 Oct 2012, 21:12
tthsqe, would you consider adding support for memoization? (automatic, but by letting the programmer asking for it explicitly)
Sorry for the stupid question, but does muMath support arrays already (which could be used for hand-made memoization among other things)?. |
|||
![]() |
|
tthsqe 18 Oct 2012, 06:43
Whoa - I do not know of an algorithm to determin if a function can be memoized.
As for the other stuff: - a SSA based optimizer is in the making - arrays are definitely possible but not currently implemented. I'm not quite sure how to handle the allocation/deallocation of space for intermediate results |
|||
![]() |
|
Goto page 1, 2, 3 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.