lkml.org 
[lkml]   [2003]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: Searching for string problems
    Date
    Hello!

    Big thanks to all of you. Now I'm starting to understand how it's working.
    Here is current version of my code:

    -->
    jmp cl_start
    cl_id_str: .string "STRING"
    cl_start:
    cld
    movw %cs, %ax
    movw %ax, %ds
    movw $0xe000, %ax
    movw %ax, %es
    movb $0, %al
    xor %bx, %bx # start of segment
    cl_compare:
    movw $cl_id_str, %si
    movw $cl_start, %cx
    subw %si, %cx
    decw %cx
    movw %bx, %di
    repz cmpsb
    je cl_compare_done_good
    incw %bx
    cmpw $0xffff, %bx # are we at the end of segment
    je cl_compare_done
    jmp cl_compare
    cl_compare_done_good:
    movb $1, %al
    cl_compare_done:
    <--

    And this code won't work as well :(

    Unfortunately, I can't start DOS and check, cause there is no video and
    keyboard controller on that PC.

    Best reagrds,
    Andrew.

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:34    [W:0.027 / U:0.132 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site