;compares two strings in memory at 500h, 600h
;puts a 0 in 4ffh if st1 = str2
;puts a 1 if 4ffh if st1 < str2
;puts a 2 if 4ffh if str1 > str2
        mov     bx, 0   ;number of bytes from start of string
top:    mov     ah, byte ptr 500h [bx]
        cmp     ah, byte ptr 600h [bx]  ;compare 500h[bx] vs. 600h[bx]
        jb      less
        ja      greater
        cmp     ah,  0                  ;both strings at eos???
        je      equal
        inc     bx
        jmp     top
less:   mov     byte ptr 4ffh, 1
        int     20h
greater:mov     byte ptr 4ffh, 2
        int     20h
equal:  mov     byte ptr 4ffh, 0
        int     20h