;find the largest unsigned byte from 2000H - 3000H
;put the max in location 1FFDH
;the location the max occurred store in word ptr 1FFEh
        mov     al, byte ptr 2000h      ;set first max
        mov     cx, 2000h               ;location of first max
        mov     di, 2001h               ;start of rest of array
lp:     cmp     byte ptr 0 [di], al     ;new max??
        jbe     mo                      ;no, it isn't
        mov     al, byte ptr 0 [di]     ;record new max
        mov     cx, di                  ; and where it occurs
mo:     add     di, 1
        cmp     di, 3000h
        jbe     lp
        mov     byte ptr 1ffdh, al
        mov     word ptr 1ffeh, cx
        int     20h