;povinne model tiny .model tiny .data ;uzivatelska data dat db 0ffh,04bh,003h,004h,014h,000h,002h,000h,008h,000h,04ah,0bdh db 042h,02bh,04ah,0b9h,0fah,07eh,02fh,001h,000h,000h,085h,002h db 000h,000h,00bh,000h,000h,000h,055h,04ch,04fh,048h,041h,05fh db 031h,02eh,041h,053h,04dh,075h,052h,0cbh,04eh,0c4h,030h,00ch db 03ch,0b7h,052h,0ffh,0c1h,0b7h,05eh,0b2h,0abh,0eeh,0c2h,005h db 071h,082h,0dfh,040h,01ch,0b2h,04dh,0b6h,0c9h,02ah,04dh,04ah db 092h,0a2h,0c0h,0d7h,063h,027h,07dh,080h,0b4h,048h,03dh,0d8h db 09eh,019h,067h,06ch,0b7h,072h,07eh,080h,053h,0d7h,0a9h,0a6h db 0aeh,082h,01ch,046h,069h,023h,01ch,0a3h,04ch,0b1h,0a9h,09bh db 0fah,0f9h,070h,038h,0c0h,02bh,045h,046h,0dah,021h,02ah,000h db 0f9h,031h,0c3h,0e3h,0f9h,081h,04ah,0d5h,0e8h,03eh,0e1h,092h db 018h,0f7h,09eh,07fh,02dh,069h,09fh,058h,061h,062h,03eh,0cdh db 041h,021h,0beh,051h,045h,062h,0ddh,0f5h,08ah,048h,090h,0dch db 0f7h,0aah,0eah,0c7h,009h,084h,061h,06fh,097h,0f4h,08eh,08ch db 05bh,00fh,0d6h,0c5h,051h,0dbh,095h,0bdh,021h,094h,005h,0cdh db 0a8h,053h,061h,064h,025h,081h,04ch,0a8h,05dh,0c9h,0d3h,0aah db 054h,0bfh,095h,062h,057h,0f2h,054h,069h,0dbh,067h,04bh,095h db 071h,06eh,082h,062h,004h,033h,0fch,092h,0f3h,0c0h,071h,098h db 0b5h,00bh,037h,0a5h,07bh,09eh,0e2h,04fh,0d5h,060h,0dch,073h db 063h,060h,0f2h,0dah,046h,0a2h,060h,0abh,0cch,0b8h,05fh,0b5h db 072h,028h,0c1h,0deh,08ah,00bh,041h,08fh,005h,0fdh,0afh,068h db 061h,008h,04dh,0ebh,0cbh,068h,021h,08ah,079h,09ch,0f6h,00dh db 03dh,061h,088h,010h,09ch,04fh,064h,0d5h,0cbh,0fdh,068h,02fh db 014h,011h,079h,03dh,0cbh,0a9h,06bh,06ah,03eh,070h,0dch,01eh db 04dh,08ah,0b7h,010h,0f4h,08ch,0d0h,004h,0d2h,07bh,056h,06ch db 0e3h,0dfh,0beh,041h,026h,01dh,057h,0c7h,062h,01bh,02dh,0ebh db 017h,097h,054h,025h,056h,059h,08bh,062h,0e7h,0c5h,034h,0bah db 06ah,0bbh,0f6h,09eh,0afh,0fch,09fh,0d0h,005h,02eh,0dah,042h db 01bh,0dch,02dh,017h,08eh,098h,0b5h,03fh,050h,04bh,001h,002h db 014h,000h,014h,000h,002h,000h,008h,000h,04ah,0bdh,042h,02bh db 04ah,0b9h,0fah,07eh,02fh,001h,000h,000h,085h,002h,000h,000h db 00bh,000h,000h,000h,000h,000h,000h,000h,001h,000h,020h,000h db 000h,000h,000h,000h,000h,000h,055h,04ch,04fh,048h,041h,05fh db 031h,02eh,041h,053h,04dh,050h,04bh,005h,006h,000h,000h,000h db 000h,001h,000h,001h,000h,039h,000h,000h,000h,058h,001h,000h db 000h,000h,000h .code ;vlastni programek org 100h ;musi, dos na prvnich 256bytes nahrava servisni data start: ;hledani AX male cislo, BX male idx ; DI velky idx, DX velke cislo xor si, si mov ax, 000ffh cwd ; dx = 0 cykl: mov cl, dat[si] cmp cl, al ja dal mov bx, si mov al, cl dal: cmp cl, dl jb dal2 mov di, si mov dl, cl dal2: inc si cmp si, 423 jne cykl ;vypis push di ; nejv - idx push bx ; nejm - idx push dx ; hodn big ; AX ... hodn. small mov cx, 4 st_vyp: push cx call pis pop cx dec cx jz konec mov al, 20h ; mezera int 029h pop ax jmp short st_vyp pis: mov cx, 10 cykl_dec: xor dx, dx div cx test ax, ax push dx jz exit call cykl_dec exit: pop ax add al, 30h ; 30h="0" int 29h konec: ; uplny konec a taky konec pro PIS ret end start