journal of all scince V.1. NO.1 | Page 37

: " % 5k Seg1 segment n DW 24 k DW? x dw 100 dup(0( Seg1 ends seg2 segment assume cs:seg2,ds:seg1 L:mov ax,seg1 mov DS,ax mov bx,offset x mov cx,1 L2:cmp cx,n JA L3 mov ax,n mov dx,0 div cx cmp dx,0 JNE L1 mov word ptr[bx],cx add bx,2 inc K L1: inc cx JMP L2 L3: mov ah,4ch int 21H seg2 ends end L HJ_G _ %8_7/ u_ = % , % " % W % @. x % W % P 8 % % n C " PC#8 T , 2% B ? 2 T 8 % :V ` [ h %:V` . " 6 _% _ . _ U HJ_G Wu " % % . */ 3 , % /% 8 . " u I _ - % Ug * 2 I u & % * 4 Seg1 Segment Assume CS: Seg1 L:MOV AL, 0 MOV BX , 0B800H MOV DS, BX MOV SI , 0 L1: MOV [SI], AL MOV byte ptr[SI]+1, 34H Inc AL add SI,2 Cmp AL, 255 JB L1 p B+ % 255 MOV AH , 4CH C 8U . - * % , 2% B ? 8 JBE % K ? W B8000H , 2 2 U HJG % u & % W " % . % %5 W * 4.* % 5