flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Coddy41
Soo... Were here is the point that you decide to sue Intel?
![]() |
|||
![]() |
|
TmX
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... ![]() |
|||
![]() |
|
Tomasz Grysztar
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 |
|||
![]() |
|
revolution
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. |
|||
![]() |
|
hopcode
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 |
|||
![]() |
|
r22
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. |
|||
![]() |
|
pal
Why not code a function to iterate through your codes folder and replace all calls and function names or something alike?
|
|||
![]() |
|
Borsuc
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 |
|||
![]() |
|
revolution
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. |
|||
![]() |
|
mattst88
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 |
|||
![]() |
|
revolution
mattst88 wrote: Why even consider that when he gave you a command to do it? |
|||
![]() |
|
Borsuc
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 |
|||
![]() |
|
pete
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. |
|||
![]() |
|
revolution
Thanks pete, as for scanning subdirs there is always 'for' in the Windows CMD.
|
|||
![]() |
|
bitshifter
If you are using Win32 i can write you a proggy in about 5 minutes.
|
|||
![]() |
|
madmatt
Is it possible to comment out that one instructon then recompile the fasm compiler?
|
|||
![]() |
|
mattst88
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 |
|||
![]() |
|
Matrix
wonder when they introduce sha1sum instruction
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.