flat assembler
Message board for the users of flat assembler.
  
       
      Index
      > Main > How to translate word ptr [bp+buffer+10h],id to FASM?? | 
  
| Author | 
  | 
              
| 
                  
                   cod3b453 07 Aug 2014, 20:52 
                  Assuming the original code is correct, you can simply remove the "ptr". 
                  
                 | 
              |||
                  
  | 
              
| 
                  
                   jhonny6721 07 Aug 2014, 20:57 
                  Thanks cod3b453!!! I will apply your suggestion. 
                  
                 | 
              |||
                  
  | 
              
| 
                  
                   jhonny6721 07 Aug 2014, 21:01 
                  I returned to the forum because my code did not work. I have the following code fragment that not works:
 
                  
                Code: cmp word [buffer+10h], word [exe_type] je infect_exe When I try to assembly it with FASM, it says: Invalid Operant. I don't know why. Can somebody help me???  | 
              |||
                  
  | 
              
| 
                  
                   cod3b453 07 Aug 2014, 21:05 
                  There's no such instruction encoding for cmp. You will need to make one of those parameters a register.
 
                  
                More information on instructions can be found from Intel Volume 2 or AMD Volume 3 manuals.  | 
              |||
                  
  | 
              
| 
                  
                   jhonny6721 07 Aug 2014, 21:21 
                  Thanks. Where I can get that manuals??? From the Official page?? Or there's better manuals out there?? 
                  
                 | 
              |||
                  
  | 
              
| 
                  
                   revolution 07 Aug 2014, 21:22 
                  You can have:
 
                  
                cmp mem,immediate cmp mem,reg But you can't have: cmp mem,mem ;x86 encoding doesn't support this  | 
              |||
                  
  | 
              
| 
                  
                   neville 07 Aug 2014, 23:01 
                  jhonny6721, your 1st post has a very respectable signature, but your 1st and 3rd posts suggest you are learning asm at least partly for the purpose of creating malware, or perhaps mutating existing malware. True? 
                  _________________ FAMOS - the first memory operating system  | 
              |||
                  
  | 
              
| 
                  
                   jhonny6721 08 Aug 2014, 19:19 
                  Revolution, thanks for telling me that it is not possible to compare two variables in memory. And neville, I have to admit that I'm reading some assembly codes, and some of them are about how computer viruses work. I do not do evil purposes, only research 
                  _________________ Мне нравится программирование.  | 
              |||
                  
  | 
              
< Last Thread | Next Thread >  | 
    
Forum Rules: 
  | 
    
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.