flat assembler
Message board for the users of flat assembler.
Index
> Main > Intel broke all my programs |
Author |
|
Coddy41 11 Jun 2009, 12:31
Soo... Were here is the point that you decide to sue Intel?
|
|||
11 Jun 2009, 12:31 |
|
TmX 11 Jun 2009, 12:42
revolution wrote: I hope I don't have to go through all of my sources and replace with a new name. Why? Every text editor has a 'search & replace' function, so it's not hard to do that... |
|||
11 Jun 2009, 12:42 |
|
Tomasz Grysztar 11 Jun 2009, 12:46
Code: define icrc32 crc32 define crc32 _crc32_ call crc32 crc32: icrc32 eax,byte [ebx] retn Or even simpler: Code: define crc32 _crc32_ call crc32 crc32: CRC32 eax,byte [ebx] retn |
|||
11 Jun 2009, 12:46 |
|
revolution 11 Jun 2009, 13:08
TmX wrote: Why? I have five options I guess.
Tomasz Grysztar: Thanks for the second suggestion (just like my number 5 I guess). But the ongoing incompatibility is going to be confusing for my customers. They will ask me why I have redefined things like that. BTW: none of the CPUs we use support the crc32 instruction yet so executing the Intel version will just cause an exception and a restart. |
|||
11 Jun 2009, 13:08 |
|
hopcode 11 Jun 2009, 15:37
revolution wrote:
Let Fasm do it ! Mix solution 3+5 Your function is lowercase : crc32 Fasm accept lowercase/uppercase instruction With Fasm You can write CRC32 or CrC32 for the intel istruction it is ok for fasm to compile. 3: Rebuild fasm changing in TABLES.INC "crc32" to CRC32 If fasm doesent lowercase (i dont know, but why should it?) the symbol-names in TABLES.INC, (because they are already all lowercase), the solution is almost oK and your customers and collegues will then use "CRC32" for the Intel instruction and crc32 ,as before, for your function, after downloading your current custom-Fasm Build. 5: in the meanwhile you redefine your crc32 as Thomasz said. This is only intented to gain time to redistribute a macro redefinition. The next version(/s) of Fasm, customers and collegue will download from the standard package of fasm, that allows intel crc32, but your functionname is in the meanwhile changed to redefined_crc32. Is it Possible so ? Regards, hopcode |
|||
11 Jun 2009, 15:37 |
|
r22 11 Jun 2009, 17:06
Massive find and replace is your best option
Quote:
You'll need to tweak the regular expressions adding spaces or a comma to the end etc. |
|||
11 Jun 2009, 17:06 |
|
pal 11 Jun 2009, 20:59
Why not code a function to iterate through your codes folder and replace all calls and function names or something alike?
|
|||
11 Jun 2009, 20:59 |
|
Borsuc 11 Jun 2009, 21:00
I don't know if there are free alternatives but TextPipe is awesome for this kind of tasks. (hint: you can use Sandboxie or a virtual machine and when the trial period is over just restore it back )
_________________ Previously known as The_Grey_Beast |
|||
11 Jun 2009, 21:00 |
|
revolution 12 Jun 2009, 03:03
To all those who suggest I edit all my sources, I think you are correct. This is the only really proper long term solution.
Coddy41: I wish I could, but suing Intel?! You have got to have some pretty good lawyers for that sort of thing. hopcode: fasm converts all the source opcodes to lower case and then compares. If the opcode table has some uppercase letters then it will never be matched, basically disabling that opcode. But also probably breaking a few others due to the requirement for the binary search to have an alphabetical list to work correctly. r22: sed is okay, but really any scripting language with regular expression could probably do some automated thing. PERL maybe? pal: I think I will probably settle for some automated solution, but I don't have time to write a special proggy. The cmd.exe 'for' does a reasonable job of finding files in sub-folders. I can even pipe it to a text file and use that as a list of files to examine. I may have to manually cull some results depending upon the folder, since all my ARM code also uses crc32 and is not affected by Intel's choice of name. So I don't want to touch those files. Borsuc: I like Sandboxie, and I will probably use it to do a dry run and see what gets fucked up before doing a real replacement run. |
|||
12 Jun 2009, 03:03 |
|
mattst88 12 Jun 2009, 15:40
revolution wrote: r22: sed is okay, but really any scripting language with regular expression could probably do some automated thing. PERL maybe? Why even consider that when he gave you a command to do it? Code: find -name *.asm -exec sed -i -e 's/crc32/crc32_proc/g' {} \; _________________ My x86 Instruction Reference -- includes SSE, SSE2, SSE3, SSSE3, SSE4 instructions. Assembly Programmer's Journal |
|||
12 Jun 2009, 15:40 |
|
revolution 12 Jun 2009, 15:46
mattst88 wrote: Why even consider that when he gave you a command to do it? |
|||
12 Jun 2009, 15:46 |
|
Borsuc 12 Jun 2009, 21:03
revolution wrote: Borsuc: I like Sandboxie, and I will probably use it to do a dry run and see what gets fucked up before doing a real replacement run. It has already a backup option anyway. And it can use PERL RegEx and more importantly, it is really fast with MANY files, what you are after. _________________ Previously known as The_Grey_Beast |
|||
12 Jun 2009, 21:03 |
|
pete 15 Jun 2009, 06:37
I do not know what text-editor you use, but my choice is VIM (www.vim.org) and on the DOS command line you can simply do this:
Code: >vim -c "argdo %s/crc32/_crc32/ge | update" *.asm I bet there even is a parameter that scans subdirectories, if you use them. |
|||
15 Jun 2009, 06:37 |
|
revolution 15 Jun 2009, 07:50
Thanks pete, as for scanning subdirs there is always 'for' in the Windows CMD.
|
|||
15 Jun 2009, 07:50 |
|
bitshifter 15 Jun 2009, 11:03
If you are using Win32 i can write you a proggy in about 5 minutes.
|
|||
15 Jun 2009, 11:03 |
|
madmatt 15 Jun 2009, 17:17
Is it possible to comment out that one instructon then recompile the fasm compiler?
|
|||
15 Jun 2009, 17:17 |
|
mattst88 15 Jun 2009, 18:54
madmatt wrote: Is it possible to comment out that one instructon then recompile the fasm compiler? That was considered earlier in the thread, but it's obviously a dirty solution. _________________ My x86 Instruction Reference -- includes SSE, SSE2, SSE3, SSSE3, SSE4 instructions. Assembly Programmer's Journal |
|||
15 Jun 2009, 18:54 |
|
Matrix 27 Jun 2009, 12:31
wonder when they introduce sha1sum instruction
|
|||
27 Jun 2009, 12:31 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.