flat assembler
Message board for the users of flat assembler.
Index
> Windows > Base Converter Goto page 1, 2 Next |
Author |
|
Tommy 27 Sep 2003, 20:21
Hi all!
I newly wrote a base converter in FASM and here it is... JohnFound: Maybe it could be useful in the Fresh project (as an add-in or something)? History: 28-09-03: Updated a little bug in the EditCtl-procedure Enjoy! Regards, Tommy
Last edited by Tommy on 28 Sep 2003, 18:52; edited 2 times in total |
|||||||||||
27 Sep 2003, 20:21 |
|
Blag 28 Sep 2003, 04:01
Great Tommy!
|
|||
28 Sep 2003, 04:01 |
|
Tommy 28 Sep 2003, 09:24
What? Hmm...that's strange... Do you have any idea what the problem is?
|
|||
28 Sep 2003, 09:24 |
|
decard 28 Sep 2003, 14:58
I've got a similar problem: it crashes somewhere inside DialogBoxParam..... (under winME)
|
|||
28 Sep 2003, 14:58 |
|
Tommy 28 Sep 2003, 17:08
... that's sad...I'll try to figure it out, but want/need some help because I don't use Win2k nor WinME...
|
|||
28 Sep 2003, 17:08 |
|
decard 28 Sep 2003, 17:22
I was trying to figure what's wrong, but with no results ..... But I'll keep trying, and will inform you when having any result...
|
|||
28 Sep 2003, 17:22 |
|
Tommy 28 Sep 2003, 18:06
Thanks!
[edit]New update on top... The bug in Win2k and WinME is still not fixed...[/edit] |
|||
28 Sep 2003, 18:06 |
|
roticv 29 Sep 2003, 06:04
I was getting bored and was tracing it. Realised that the problem lies in wminitdialog whereby there is an imbalanced stack, resulting in ebx's value not preserved. Grr. did you know that LoadMenu has only 2 parameters and not 3? Stupid bug.
|
|||||||||||
29 Sep 2003, 06:04 |
|
roticv 29 Sep 2003, 06:06
Ah crap, one more crash
--------------------------- Base Converter: basecnv.exe - Application Error --------------------------- The exception unknown software exception (0xc00000fd) occurred in the application at location 0x004023b6. Click on OK to terminate the program Click on CANCEL to debug the program --------------------------- OK Cancel --------------------------- |
|||
29 Sep 2003, 06:06 |
|
Tommy 29 Sep 2003, 07:35
Oops stupid me... Thanks for your bug-fix!
The other bug is obviously on line 240 (div ebx).... But why don't I get any error messages on my computer (not even in OllyDbg)... ?? Since I don't, it's hard to me to fix the problem.... |
|||
29 Sep 2003, 07:35 |
|
Tommy 29 Sep 2003, 07:54
Hmm...I just realized that mine does work without problems on my computer when I fixed the LoadMenu-bug, but not the fixed version from you... Try mine, and see if you get the same problem as you got...
|
|||||||||||
29 Sep 2003, 07:54 |
|
roticv 29 Sep 2003, 08:03
ps some codes can be optimised eg
Code: cmp ebx,2 setz al neg al to Code: cmp ebx, 3 sbb al, al cmp reg, 0 to test reg,reg or or reg,reg mov reg, 0 to xor reg,reg or sub reg,reg PS: That's why I said some parts of the codes I do not like it. |
|||
29 Sep 2003, 08:03 |
|
Tommy 29 Sep 2003, 08:09
Okey... Thanks!!! I'm quite new to assembly and haven't learned too much about optimizing yet... I'll try to learn more about it! Thanks for your help!!!
Did it work now??? |
|||
29 Sep 2003, 08:09 |
|
Tommy 29 Sep 2003, 08:16
Should I optimize:
Code: mov eax,1 ; 5 bytes to: Code: xor eax,eax ; 3 bytes inc eax |
|||
29 Sep 2003, 08:16 |
|
JohnFound 29 Sep 2003, 08:22
Tommy wrote: Should I optimize: Yea, I offen do this. also: Code: mov eax, -1 to: xor eax,eax dec eax |
|||
29 Sep 2003, 08:22 |
|
HarryTuttle 29 Sep 2003, 08:25
add instead of inc is more efficient,isn't it?
_________________ Microsoft: brings power of yesterday to computers of today. Last edited by HarryTuttle on 29 Sep 2003, 08:26; edited 1 time in total |
|||
29 Sep 2003, 08:25 |
|
Tommy 29 Sep 2003, 08:26
Hehe... Thanks!
|
|||
29 Sep 2003, 08:26 |
|
roticv 29 Sep 2003, 09:57
Oh I made a mistake earlier.
Code: cmp ebx, 3 sbb al, al Hehe. Yes add is more efficient but in this context size matters more than speed. For mov reg, -1 , you can try or reg, -1 Oh yes one interesting code that you may want to use for your subclassed edit control is Code: ;eax = input lea ecx,[eax-LOWERLIMIT] cmp ecx,UPPERLIMIT - LOWERLIMIT jna _inrange |
|||
29 Sep 2003, 09:57 |
|
Tommy 29 Sep 2003, 10:05
Quote: Oh I made a mistake earlier. What, actually, does Code: ;eax = input lea ecx,[eax-LOWERLIMIT] cmp ecx,UPPERLIMIT - LOWERLIMIT jna _inrange |
|||
29 Sep 2003, 10:05 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.