Thread: assembly help

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Mar 2007
    Location
    India
    Posts
    17

    assembly help

    I need to understand, what this code is doing, i dont know assambly coding .
    what would be the impact, if i change this logic with corrosponding c code,
    thanks in adv.
    Code:
    WORD lookKbits(BYTE k)
    {
      _asm {
    	mov dl, k
    	mov cl, 16
    	sub cl, dl
    	mov eax, [wordval]
    	shr eax, cl
               }
    }
    
    WORD WORD_hi_lo(BYTE byte_high,BYTE byte_low)
    {
    	_asm {
    		mov ah,byte_high
    			mov al,byte_low
    	}
    }
    
    SWORD get_svalue(BYTE k)
    {
    	_asm {
    		xor ecx, ecx
    			mov cl,k
    			mov eax,[wordval]
    			shl eax,cl
    			shr eax, 16
    			dec cl
    			bt eax,ecx
    			jc end_macro
    signed_value:inc cl
    			 mov ebx,[start_neg_pow2]
    			 add ax,word ptr [ebx+ecx*2]
    end_macro:
    }
    Last edited by Brw_Abhi; 08-20-2007 at 02:46 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Learning Assembly
    By mrafcho001 in forum Tech Board
    Replies: 5
    Last Post: 03-12-2006, 05:00 PM
  2. C to assembly interface
    By Roaring_Tiger in forum C Programming
    Replies: 4
    Last Post: 02-04-2005, 03:51 PM
  3. assembly language...the best tool for game programming?
    By silk.odyssey in forum Game Programming
    Replies: 50
    Last Post: 06-22-2004, 01:11 PM
  4. True ASM vs. Fake ASM ????
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 04-02-2003, 04:28 AM
  5. C,C++,Perl,Java
    By brusli in forum C Programming
    Replies: 9
    Last Post: 12-31-2001, 03:35 AM