有意思的碰撞小球
assume cs:code code segment start: mov ax,0b800h mov es,ax mov dx,0h mov bx,0101h mov cx,50000 s: push cx mov cx, dx mov ax,00a0h mul ch mov ch,0 add cl,cl add ax,cx mov di,ax cmp byte ptr es:[di],01h jne put_ok add byte ptr es:[di+1],1 and byte ptr es:[di+1],0fh jmp end_ok put_ok: mov word ptr es:[di],0a01h end_ok: cmp dh,0 jne x1 mov bh,1 x1: cmp dl,0 jne x2 mov bl,1 x2: cmp dh,24 jne x3 mov bh,-1 x3: cmp dl,79 jne x4 mov bl,-1 x4: add dh,bh add dl,bl mov cx,0ff0h h1:push cx mov cx,05f0h h2:loop h2 pop cx loop h1 pop cx loop s mov ax,4c00h int 21h code ends end start