mikosoft

mikosoft mikosoft Evolution

Niner since 2004

Computer science student

Comments

  • Gary Daniels and Evan Goldring - Mock whiteboard problem

    Start:
    jmp Go
    string db 'AXaXA'

    Palindrome proc near
     mov al,0
     test ecx,ecx
     jz ext
     pusha
     mov ebx,0
     mov edx,edi
     add edx,ecx
     shr ecx,1
     lop:
      mov ah,[edi+ebx]
      inc ebx
      cmp ah,[edx-ebx]
      jne nope
     dec ecx
     jnz lop
     inc al
     nope:
     popa
     ext:
     retn
    Palindrome endp
    
    
    Go:
    lea edi,[string]
    mov ecx,5 ;length
    call Palindrome
    ;al=1 == true