亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? xpbitmap.asm

?? 視頻游戲開發C語言源程序
?? ASM
?? 第 1 頁 / 共 2 頁
字號:
;-----------------------------------------------------------------------
; MODULE XPBITMAP
;
; Planar Bitmap functions - System Ram <-> Video Ram
;
; Compile with Tasm.
; C callable.
;
;
; ****** XLIB - Mode X graphics library                ****************
; ******                                               ****************
; ****** Written By Themie Gouthas                     ****************
;
; egg@dstos3.dsto.gov.au
; teg@bart.dsto.gov.au
;-----------------------------------------------------------------------


COMMENT $

  This module implements a set of functions to operate on planar bitmaps.
  Planar bitmaps as used by these functions have the following structure:

  BYTE 0                 The bitmap width in bytes (4 pixel groups) range 1..255
  BYTE 1                 The bitmap height in rows range 1..255
  BYTE 2..n1             The plane 0 pixels width*height bytes
  BYTE n1..n2            The plane 1 pixels width*height bytes
  BYTE n2..n3            The plane 2 pixels width*height bytes
  BYTE n3..n4            The plane 3 pixels width*height bytes

  These functions provide the fastest possible bitmap blts from system ram to
  to video and further, the single bitmap is applicable to all pixel
  allignments. The masked functions do not need separate masks since all non
  zero pixels are considered to be masking pixels, hence if a pixel is 0 the
  corresponding screen destination pixel is left unchanged.


$

include xlib.inc
include xpbitmap.inc
LOCALS
	.code

;----------------------------------------------------------------------
; x_flip_masked_pbm - mask write a planar bitmap from system ram to video ram
; all zero source bitmap bytes indicate destination byte to be left unchanged
; If "Orientation" is set then the bitmap is flipped from left to right as
; it is drawn
;
; Source Bitmap structure:
;
;  Width:byte, Height:byte, Bitmap data (plane 0)...Bitmap data (plane 1)..,
;  Bitmap data (plane 2)..,Bitmap data (plane 3)..
;
;  note width is in bytes ie lots of 4 pixels
;
;  x_flip_masked_pbm(X,Y,ScrnOffs,char far * Bitmap, Orientation)
;
;
; LIMITATIONS: No clipping is supported
;              Only supports bitmaps with widths which are a multiple of
;              4 pixels
;
; Written by Themie Gouthas
;----------------------------------------------------------------------
_x_flip_masked_pbm  proc
        ARG X:word,Y:word,ScrnOffs:word,Bitmap:dword,Orientation:word
	LOCAL Plane:byte,BMHeight:byte,LineInc:word=LocalStk
	push  bp
        mov   bp,sp
	sub   sp,LocalStk                 ; Create space for local variables
        push  si
        push  di
	push  ds
	cld
        mov   ax,SCREEN_SEG
        mov   es,ax
        mov   ax,[Y]                      ; Calculate dest screen row
	mov   bx,[_ScrnLogicalByteWidth]  ;  by mult. dest Y coord by Screen
	mul   bx                          ;  width then adding screen offset
        mov   di,[ScrnOffs]               ;  store result in DI
        add   di,ax
        mov   cx,[X]                      ; Load X coord into CX and make a
	mov   dx,cx                       ;  copy in DX
	shr   dx,2                        ; Find starting byte in dest row
	add   di,dx                       ;  add to DI giving screen offset of
                                          ;  first pixel's byte
        lds   si,[Bitmap]                 ; DS:SI -> Bitmap data
        lodsw                             ; Al = B.M. width (bytes) AH = B.M.
                                          ;  height
        cmp   Orientation,0
        jz    UnFlippedMasked

	mov   [BMHeight],ah               ; Save source bitmap dimensions
        xor   ah,ah                       ; LineInc = bytes to the begin.
	add   bx,ax                       ;  of bitmaps next row on screen
	mov   [LineInc],bx
	mov   bh,al                       ; Use bh as column loop count
        and   cx,0003h                    ; mask X coord giving plane of 1st
					  ; bitmap pixel(zero CH coincidentally)
	mov   ah,11h                      ; Init. mask for VGA plane selection
        shl   ah,cl                       ; Shift for starting pixel plane
        mov   dx,SC_INDEX                 ; Prepare VGA for cpu to video writes
        mov   al,MAP_MASK
        out   dx,al
        inc   dx
	mov   [Plane],4                   ; Set plane counter to 4
@@PlaneLoop:
        push  di                          ; Save bitmap's start dest. offset
        mov   bl,[BMHeight]               ; Reset row counter (BL)
        mov   al,ah
        out   dx,al                       ; set vga write plane
@@RowLoop:
	mov   cl,bh                       ; Reset Column counter cl
@@ColLoop:
	lodsb                             ; Get next source bitmap byte
	or    al,al                       ; If not zero then write to dest.
	jz    @@NoPixel                   ; otherwise skip to next byte
	mov   es:[di],al
@@NoPixel:
	dec   di
	loop  @@ColLoop                   ; loop if more columns left
	add   di,[LineInc]                ; Move to next row
        dec   bl                          ; decrement row counter
        jnz   @@RowLoop                   ; Jump if more rows left
        pop   di                          ; Restore bitmaps start dest byte
        ror   ah,1                        ; Shift mask for next plane
	sbb   di,0                        ; If wrapped increment dest address
	dec   [Plane]                     ; Decrement plane counter
        jnz   @@PlaneLoop                 ; Jump if more planes left

        pop   ds                          ; restore data segment
        pop   di                          ; restore registers
        pop   si
        mov   sp,bp                       ; dealloc local variables
        pop   bp
        ret
_x_flip_masked_pbm  endp


;----------------------------------------------------------------------
; x_put_masked_pbm - mask write a planar bitmap from system ram to video ram
; all zero source bitmap bytes indicate destination byte to be left unchanged
;
; Source Bitmap structure:
;
;  Width:byte, Height:byte, Bitmap data (plane 0)...Bitmap data (plane 1)..,
;  Bitmap data (plane 2)..,Bitmap data (plane 3)..
;
;  note width is in bytes ie lots of 4 pixels
;
;  x_put_masked_pbm(X,Y,ScrnOffs,char far * Bitmap)
;
;
; LIMITATIONS: No clipping is supported
;              Only supports bitmaps with widths which are a multiple of
;              4 pixels
;
; Written by Themie Gouthas
;----------------------------------------------------------------------
_x_put_masked_pbm  proc
        ARG X:word,Y:word,ScrnOffs:word,Bitmap:dword
	LOCAL Plane:byte,BMHeight:byte,LineInc:word=LocalStk
	push  bp
        mov   bp,sp
	sub   sp,LocalStk                 ; Create space for local variables
        push  si
        push  di
	push  ds
	cld
        mov   ax,SCREEN_SEG
        mov   es,ax
        mov   ax,[Y]                      ; Calculate dest screen row
	mov   bx,[_ScrnLogicalByteWidth]  ;  by mult. dest Y coord by Screen
	mul   bx                          ;  width then adding screen offset
        mov   di,[ScrnOffs]               ;  store result in DI
        add   di,ax
        mov   cx,[X]                      ; Load X coord into CX and make a
	mov   dx,cx                       ;  copy in DX
	shr   dx,2                        ; Find starting byte in dest row
	add   di,dx                       ;  add to DI giving screen offset of
                                          ;  first pixel's byte
        lds   si,[Bitmap]                 ; DS:SI -> Bitmap data
        lodsw                             ; Al = B.M. width (bytes) AH = B.M.
                                          ;  height
UnFlippedMasked:
	mov   [BMHeight],ah               ; Save source bitmap dimensions
        xor   ah,ah                       ; LineInc = bytes to the begin.
	sub   bx,ax                       ;  of bitmaps next row on screen
	mov   [LineInc],bx
	mov   bh,al                       ; Use bh as column loop count
        and   cx,0003h                    ; mask X coord giving plane of 1st
					  ; bitmap pixel(zero CH coincidentally)
	mov   ah,11h                      ; Init. mask for VGA plane selection
        shl   ah,cl                       ; Shift for starting pixel plane
        mov   dx,SC_INDEX                 ; Prepare VGA for cpu to video writes
        mov   al,MAP_MASK
        out   dx,al
        inc   dx
	mov   [Plane],4                   ; Set plane counter to 4
@@PlaneLoop:
        push  di                          ; Save bitmap's start dest. offset
        mov   bl,[BMHeight]               ; Reset row counter (BL)
        mov   al,ah
        out   dx,al                       ; set vga write plane
@@RowLoop:
	mov   cl,bh                       ; Reset Column counter cl
@@ColLoop:
	lodsb                             ; Get next source bitmap byte
	or    al,al                       ; If not zero then write to dest.
	jz    @@NoPixel                   ; otherwise skip to next byte
	mov   es:[di],al
@@NoPixel:
	inc   di
	loop  @@ColLoop                   ; loop if more columns left
	add   di,[LineInc]                ; Move to next row
        dec   bl                          ; decrement row counter
        jnz   @@RowLoop                   ; Jump if more rows left
        pop   di                          ; Restore bitmaps start dest byte
        rol   ah,1                        ; Shift mask for next plane
	adc   di,0                        ; If wrapped increment dest address
	dec   [Plane]                     ; Decrement plane counter
        jnz   @@PlaneLoop                 ; Jump if more planes left

        pop   ds                          ; restore data segment
        pop   di                          ; restore registers
        pop   si
        mov   sp,bp                       ; dealloc local variables
        pop   bp
        ret
_x_put_masked_pbm  endp



;----------------------------------------------------------------------
; x_put_pbm - Write a planar bitmap from system ram to video ram
;
; Source Bitmap structure:
;
;  Width:byte, Height:byte, Bitmap data (plane 0)...Bitmap data (plane 1)..,
;  Bitmap data (plane 2)..,Bitmap data (plane 3)..
;
;  note width is in bytes ie lots of 4 pixels
;
;  x_put_pbm(X,Y,ScrnOffs,char far * Bitmap)
;
;
; LIMITATIONS: No clipping is supported
;              Only supports bitmaps with widths which are a multiple of
;              4 pixels
; FEATURES   : Automatically selects REP MOVSB or REP MOVSW  depending on
;              source bitmap width, by modifying opcode ;-).
;
; Written by Themie Gouthas
;----------------------------------------------------------------------


_x_put_pbm  proc
	ARG X:word,Y:word,ScrnOffs:word,Bitmap:dword
	LOCAL Plane:byte,BMHeight:byte,LineInc:word=LocalStk
	push  bp
        mov   bp,sp
	sub   sp,LocalStk                 ; Create space for local variables
	push  si
        push  di
	push  ds
	cld
        mov   ax,SCREEN_SEG
        mov   es,ax
        mov   ax,[Y]                      ; Calculate dest screen row
	mov   bx,[_ScrnLogicalByteWidth]  ;  by mult. dest Y coord by Screen
	mul   bx                          ;  width then adding screen offset
        mov   di,[ScrnOffs]               ;  store result in DI
        add   di,ax
        mov   cx,[X]                      ; Load X coord into CX and make a
	mov   dx,cx                       ;  copy in DX
	shr   dx,2                        ; Find starting byte in dest row
	add   di,dx                       ;  add to DI giving screen offset of
                                          ;  first pixel's byte
        lds   si,[Bitmap]                 ; DS:SI -> Bitmap data
        lodsw                             ; Al = B.M. width (bytes) AH = B.M.
                                          ;  height
UnFlipped:
        mov   [BMHeight],ah               ; Save source bitmap dimensions
        xor   ah,ah                       ; LineInc = bytes to the begin.
	sub   bx,ax                       ;  of bitmaps next row on screen
	mov   [LineInc],bx
	mov   bh,al
					  ; Self Modifying, Shame, shame shame..
        and   cx,0003h                    ; mask X coord giving plane of 1st
                                          ; bitmap pixel(zero CH coincidentally)
	mov   ah,11h                      ; Init. mask for VGA plane selection
        shl   ah,cl                       ; Shift for starting pixel plane
        mov   dx,SC_INDEX                 ; Prepare VGA for cpu to video writes
        mov   al,MAP_MASK
        out   dx,al
        inc   dx
	mov   [Plane],4                   ; Set plane counter to 4
@@PlaneLoop:
        push  di
	mov   bl,[BMHeight]

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩理论片在线| 美国av一区二区| 乱一区二区av| 91片黄在线观看| www国产成人| 日本视频一区二区三区| 91免费国产在线观看| 日本一区二区三区视频视频| 日本视频一区二区| 在线观看区一区二| 亚洲欧洲精品一区二区精品久久久| 免费在线一区观看| 欧美男男青年gay1069videost| 自拍av一区二区三区| 国产成人综合亚洲网站| 2023国产精品自拍| 九色综合狠狠综合久久| 日韩一区二区在线看片| 香蕉成人啪国产精品视频综合网 | 在线视频一区二区免费| 国产精品午夜在线| 懂色av中文字幕一区二区三区| 日韩免费成人网| 六月丁香婷婷色狠狠久久| 欧美精品tushy高清| 午夜电影一区二区三区| 欧美在线短视频| 亚洲不卡av一区二区三区| 欧美日韩一区二区三区在线看| 亚洲一区在线视频| 欧美亚一区二区| 婷婷国产在线综合| 91精品国产黑色紧身裤美女| 日韩精品一区第一页| 欧美美女网站色| 蜜桃视频免费观看一区| 337p日本欧洲亚洲大胆色噜噜| 精品一区二区日韩| 久久精品在线免费观看| 国产69精品一区二区亚洲孕妇 | 韩国毛片一区二区三区| 精品国产乱码91久久久久久网站| 狠狠狠色丁香婷婷综合激情| 日韩美女主播在线视频一区二区三区| 奇米精品一区二区三区四区| 久久夜色精品国产欧美乱极品| 国产成人精品亚洲午夜麻豆| 中文天堂在线一区| 91老师片黄在线观看| 亚洲成人黄色影院| 日韩精品一区二区三区中文不卡 | 紧缚奴在线一区二区三区| 久久色.com| 色婷婷av一区二区三区之一色屋| 一区二区成人在线| 精品久久久久久久人人人人传媒 | 久久成人综合网| 中文字幕av在线一区二区三区| 大美女一区二区三区| 一区二区三区在线免费| 91精品国产欧美一区二区成人 | 麻豆精品在线视频| 中文字幕第一区二区| 色国产精品一区在线观看| 日韩电影免费在线看| 中文字幕欧美三区| 欧美日韩激情在线| 成人手机在线视频| 日韩av中文字幕一区二区三区| 中文字幕第一页久久| 8x福利精品第一导航| 丰满白嫩尤物一区二区| 日韩专区一卡二卡| 亚洲视频一区在线| 精品人在线二区三区| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 亚洲天堂av一区| 精品国产自在久精品国产| 一本一本大道香蕉久在线精品| 美女诱惑一区二区| 亚洲精品国产无天堂网2021 | 一区在线观看视频| 日韩精品一区二区三区老鸭窝| 99久久精品国产精品久久| 久久国产成人午夜av影院| 亚洲综合免费观看高清在线观看 | 91精品国产黑色紧身裤美女| 91小视频免费观看| 国产一区日韩二区欧美三区| 亚洲成av人影院| 亚洲免费在线观看| 欧美激情在线一区二区三区| 日韩一区二区在线播放| 欧美三级三级三级爽爽爽| 99国产精品国产精品毛片| 粉嫩嫩av羞羞动漫久久久| 美女一区二区视频| 欧美aaaaaa午夜精品| 天天操天天综合网| 一区二区免费视频| 有坂深雪av一区二区精品| 国产精品久久三| 国产精品久久二区二区| 国产亲近乱来精品视频| www久久精品| 久久久久97国产精华液好用吗| 日韩你懂的电影在线观看| 日韩女优av电影| 欧美大片一区二区三区| 欧美成va人片在线观看| 日韩免费高清av| 日韩精品最新网址| 久久久亚洲欧洲日产国码αv| 日韩视频在线你懂得| 欧美一级在线免费| 欧美一区二区三区小说| 日韩午夜在线播放| 欧美精品一区二区三区蜜桃| 日韩精品中文字幕在线不卡尤物| 日韩欧美中文字幕一区| 日韩精品一区二| 国产亚洲一区二区三区在线观看| 国产亚洲女人久久久久毛片| 中文幕一区二区三区久久蜜桃| 亚洲天堂精品在线观看| 亚洲一区二区三区中文字幕| 亚洲福利电影网| 免费欧美在线视频| 国产91对白在线观看九色| 99久久精品情趣| 欧美视频精品在线| 日韩欧美中文字幕精品| 中文一区一区三区高中清不卡| 国产精品电影一区二区| 亚洲国产美女搞黄色| 麻豆91精品91久久久的内涵| 国产黄色精品视频| 91高清视频在线| 精品少妇一区二区三区视频免付费 | a在线播放不卡| 在线观看亚洲a| 精品日韩av一区二区| 欧美国产成人在线| 性做久久久久久| 国产精品一区二区三区乱码| 91网站最新网址| 日韩一区二区在线看| 亚洲欧洲av一区二区三区久久| 亚洲chinese男男1069| 国产精品一区二区你懂的| 色综合激情久久| 精品欧美乱码久久久久久1区2区| 国产精品美女久久久久aⅴ| 亚洲丰满少妇videoshd| 国产伦精一区二区三区| 在线视频综合导航| 国产午夜一区二区三区| 亚洲成av人片| aa级大片欧美| 久久久久久久一区| 丝袜亚洲精品中文字幕一区| 丁香五精品蜜臀久久久久99网站| 欧美亚一区二区| 国产精品护士白丝一区av| 蜜乳av一区二区| 欧美色图免费看| 国产精品久久久久久久久久久免费看 | 国产一区在线精品| 欧美精品一二三| 亚洲免费观看高清在线观看| 激情文学综合插| 欧美日韩国产123区| 亚洲女同ⅹxx女同tv| 国产成人一级电影| 精品少妇一区二区三区| 天天综合日日夜夜精品| 在线视频国内自拍亚洲视频| 久久久久99精品一区| 免费成人小视频| 这里只有精品视频在线观看| 日韩理论片网站| av网站一区二区三区| 国产三级精品三级| 国产一区二区视频在线| 欧美一区在线视频| 日韩精品乱码av一区二区| 在线观看www91| 亚洲激情五月婷婷| 99vv1com这只有精品| 国产精品家庭影院| www.欧美日韩| 中文字幕不卡一区| 成人精品小蝌蚪| 国产精品麻豆欧美日韩ww| 成人涩涩免费视频| 国产女人18水真多18精品一级做| 韩国女主播成人在线观看| 精品国产乱码久久久久久久 | 国产亚洲精品久| 成人午夜在线播放|