void i8080_hal_io_output(int port, int value) { if (use_io_space) SavePort(port, value); else SaveByte((port & 0xff)<<8 | (port & 0xff), value); }
/******************************************************************************* Function : DDV_InvalRegion() Purpose : invalidate a specific region of DDV panel Note : disp_from,disp_to,disp_row are display coordinates. disp_from,disp_to are zero-based. disp_row is one-based Return value : the sequence *******************************************************************************/ extern void DDV_InvalRegion(PaneL hWndDDV,UnDViewerGraphDataPtr GrData, Int4 disp_from,Int4 disp_to,Int4 disp_row,Boolean IsSelect) { DdvMainPtr dmp; RecT rcP,rc; Int2 from_x,to_x,from_y,to_y; WindoW temport; dmp = (DdvMainPtr) GetObjectExtra(hWndDDV); if (dmp==NULL) return; /*convert disp coord to pixel positions*/ /*left of the first letter in the range*/ from_x=(Int2)((disp_from-GrData->udv_hscrl.ScrollPos)*GrData->udv_font.ColWidth); /*right of the last letter in the range*/ to_x=(Int2)((disp_to-GrData->udv_hscrl.ScrollPos+1)*GrData->udv_font.ColWidth); /*just above the row*/ from_y=(Int2)((disp_row-GrData->udv_vscrl.ScrollPos-1)*GrData->udv_font.LineHeight); /*just below the row*/ to_y=(Int2)(from_y+2*GrData->udv_font.LineHeight); /*adjust the values according to the PaneL RecT position*/ /*panel size*/ temport=SavePort(ParentWindow(hWndDDV)); Select(hWndDDV); ObjectRect(hWndDDV,&rcP); InsetRect(&rcP,4,4); /*drawing region:*/ DDV_AdjustDrawingRect(&rcP,&(GrData->udv_font),dmp); rcP.left+=GrData->udv_panel.cxName+GrData->udv_scale.cxLeftScale; rcP.top+=3*GrData->udv_panel.cyScale/2; from_x+=rcP.left-1; to_x+=rcP.left; from_y+=rcP.top+1; to_y+=rcP.top; rc.left=from_x-2; rc.top=from_y-2; rc.right=to_x+2; rc.bottom=to_y+2; /*InvalRect(&rc);*/ /*DDV_DrawPanelContent_H (hWndDDV,dmp,&rc,IsSelect);*/ if (!IsSelect){ /*printf("invalRect\n");*/ InvalRect(&rc); } else{ DDV_DrawPanelContent_H (hWndDDV,dmp,&rc,IsSelect); } /* Update();*/ RestorePort(temport); }