;Diverse plot-rutiner f”r MCGA m.m plot PROTO C, wdth:WORD, hght:WORD, src_adr:FAR PTR BYTE, dest_adr:FAR PTR BYTE rest PROTO C, wdth:WORD, hght:WORD, src_adr:FAR PTR BYTE, dest_adr:FAR PTR BYTE vsync PROTO C .MODEL COMPACT .DOSSEG .CODE plot PROC C USES bx cx dx es si di, wdth:WORD, hght:WORD, src_adr:FAR PTR BYTE, dest_adr:FAR PTR BYTE mov dx,wdth ;store away width value mov bx,hght mov cx,0 les di,dest_adr push ds lds si,src_adr y_lp: mov ax,dx x_lp: mov cl,ds:[si] jcxz skip_palreg0 mov es:[di],cl skip_palreg0: inc si inc di dec ax jnz x_lp add si,320 ;next line add di,320 sub si,dx sub di,dx dec bx jnz y_lp pop ds ret plot ENDP rest PROC C USES bx cx dx es si di, wdth:WORD,hght:WORD,src_adr:FAR PTR BYTE,dest_adr:FAR PTR BYTE mov ax,wdth mov bx,hght mov dx,ax shr dx,1 les di,dest_adr push ds lds si,src_adr y_rlp: mov cx,dx rep movsw add si,320 add di,320 sub si,ax sub di,ax dec bx jnz y_rlp pop ds ret rest ENDP vsync PROC C USES dx mov dx,3dah wt1: in al,dx test al,00001000b jnz wt1 wt2: in al,dx test al,00001000b ;wait until bit is 1 jz wt2 ;indicating vertical blank started ret vsync ENDP END .