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

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

?? xpbitmap.asm

?? 視頻游戲開發(fā)C語言源程序
?? ASM
?? 第 1 頁 / 共 2 頁
字號:
        mov   al,ah
        out   dx,al
@@RowLoop:
	mov   cl,bh
	shr   cl,1
	rep   movsw                       ; Copy a complete row for curr plane
	adc   cl,0
	rep   movsb
	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_pbm  endp

;----------------------------------------------------------------------
; x_flip_pbm - Write a planar bitmap from system ram to video ram
; 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_pbm(X,Y,ScrnOffs,char far * Bitmap, WORD orientation)
;
;
; LIMITATIONS: No clipping is supported
;              Only supports bitmaps with widths which are a multiple of
;              4 pixels
;
; NOTES: The flipped put function is slower than the standard put function
;
; Written by Themie Gouthas
;----------------------------------------------------------------------
_x_flip_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    UnFlipped

	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
        mov   es:[di],al
        dec   di
        sub   di,2
	loop  @@ColLoop                   ; loop if more columns left
@@DoneCol:
	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_pbm  endp


;----------------------------------------------------------------------
; x_get_pbm - Read a planar bitmap to system ram from 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_get_pbm(X,Y,BMwidth,BMheight,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_get_pbm  proc
	ARG X:word,Y:word,SrcWidth:byte,SrcHeight:byte,ScrnOffs:word,Bitmap:dword
	LOCAL Plane: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,[Y]                      ; Calculate screen row
	mov   bx,[_ScrnLogicalByteWidth]  ;  by mult. Y coord by Screen
	mul   bx                          ;  width then adding screen offset
	mov   si,[ScrnOffs]               ;  store result in SI
	add   si,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 screen row
	add   si,dx                       ;  add to SI giving screen offset of
					  ;  first pixel's byte
	mov   ax,SCREEN_SEG
	mov   ds,ax
	les   di,[Bitmap]                 ; ES:DI -> Bitmap data
	mov   al,[SrcWidth]
	mov   ah,[SrcHeight]
	stosw                             ; Al = B.M. width (bytes) AH = B.M.
                                          ;  height
        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,GC_INDEX                 ; Prepare VGA for cpu to video reads
	mov   al,READ_MAP
        out   dx,al
        inc   dx
	mov   [Plane],4                   ; Set plane counter (BH) to 4
	mov   al,cl
@@PlaneLoop:
	push  si
	mov   bl,[SrcHeight]
        out   dx,al
@@RowLoop:
	mov   cl,bh
	shr   cl,1
	rep   movsw                       ; Copy a complete row for curr plane
	adc   cl,0
	rep   movsb
	add   si,[LineInc]                ; Move to next row
        dec   bl                          ; decrement row counter
        jnz   @@RowLoop                   ; Jump if more rows left
	pop   si                          ; Restore bitmaps start dest byte

	inc   al                          ; Select next plane to read from
	and   al,3                        ;

	rol   ah,1                        ; Shift mask for next plane
	adc   si,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_get_pbm  endp




	end



        ARG X:word,Y:word,ScrnOffs:word,Bitmap:dword,Orientation:word
	LOCAL Plane:byte,BMHeight:byte,LineInc:word,Columns:byte=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    UnFlipped

	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   [Columns],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   bh,ah
        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,bh
        out   dx,al                       ; set vga write plane
@@RowLoop:
	mov   cl,[Columns]                ; Reset Column counter cl
        shr   cx,1
        jnc   @@ColLoop
        lodsb
        mov   es:[di],al
	dec   di
@@ColLoop:
	lodsw                             ; Get next source bitmap byte
        xchg  al,ah
	mov   es:[di],ax
	sub   di,2
	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   bh,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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品不卡一区二区三区| 日韩你懂的在线观看| 亚洲特黄一级片| 91在线porny国产在线看| 中文字幕一区二区三区在线播放 | 亚洲狼人国产精品| 色偷偷久久一区二区三区| 亚洲欧美日韩国产一区二区三区| 成人av电影在线| 亚洲欧美激情一区二区| 欧洲精品视频在线观看| 日本在线不卡视频一二三区| 日韩午夜电影在线观看| 国产福利一区二区| 成人免费视频在线观看| 欧美久久久久免费| 精品无人区卡一卡二卡三乱码免费卡| 久久综合久久综合亚洲| 99精品视频一区二区| 亚洲自拍偷拍欧美| 欧美一区二区三区精品| 国产高清不卡一区二区| 一区二区三区四区av| 日韩小视频在线观看专区| 成人夜色视频网站在线观看| 亚洲一区二区三区在线播放| 精品伦理精品一区| a美女胸又www黄视频久久| 天天亚洲美女在线视频| 久久久久久亚洲综合影院红桃| 97久久超碰精品国产| 美女mm1313爽爽久久久蜜臀| 欧美国产激情一区二区三区蜜月 | 亚洲成a人片综合在线| 欧美电视剧免费观看| 99视频一区二区三区| 日本免费在线视频不卡一不卡二| 久久久久久久久久久黄色| 色综合久久中文综合久久97| 午夜精品免费在线观看| 久久精品日产第一区二区三区高清版| 国产一区 二区 三区一级| 国产精品传媒视频| 欧美性生活大片视频| 韩国精品主播一区二区在线观看| 亚洲日本va在线观看| 91精品黄色片免费大全| 丁香桃色午夜亚洲一区二区三区| 国产精品久久久久久久久免费丝袜 | 亚洲精品乱码久久久久久久久| 日韩欧美电影在线| 91在线你懂得| 国产河南妇女毛片精品久久久 | 亚洲视频中文字幕| 欧美性色黄大片手机版| 国产精品资源在线| 亚洲视频你懂的| 欧美精品一区二区久久久| 色哟哟亚洲精品| 国产高清亚洲一区| 免费观看一级欧美片| 亚洲免费看黄网站| 中文字幕精品在线不卡| 欧美精品久久天天躁| 国产一区二区视频在线| 午夜欧美电影在线观看| 久久精品欧美日韩精品| 欧美日韩国产123区| 91在线一区二区三区| 国产一区二区三区| 午夜精品123| 亚洲欧洲综合另类| 国产精品久久久久一区二区三区共| 欧美一区二区三区成人| 91精品办公室少妇高潮对白| 国产综合久久久久久久久久久久| 亚洲午夜在线视频| 亚洲一区二区三区不卡国产欧美| 日本一二三不卡| 国产精品网曝门| 国产亚洲欧美日韩俺去了| 久久久美女毛片| 欧美大度的电影原声| 99精品国产视频| 成人高清免费在线播放| 丰满白嫩尤物一区二区| 国产精品一区免费视频| 国产一区二区主播在线| 国产精品996| 国产精品一品视频| 成人国产精品免费网站| 国产一区二区毛片| 国产suv精品一区二区三区| 国产一区二区在线电影| gogogo免费视频观看亚洲一| 成人黄色大片在线观看| 色婷婷av一区二区| 欧洲在线/亚洲| 欧美一卡二卡三卡| 欧美大片免费久久精品三p| 国产欧美精品日韩区二区麻豆天美| 久久久国产精华| 中文字幕一区二区三区精华液 | 欧美一级国产精品| 久久久久国产精品麻豆| 国产视频一区二区在线| 亚洲欧美福利一区二区| 亚洲免费看黄网站| 免费的成人av| 经典三级视频一区| 94-欧美-setu| 97精品超碰一区二区三区| 99久免费精品视频在线观看| 91丨porny丨蝌蚪视频| 欧美日韩视频在线第一区| 欧美成人一区二区三区片免费 | 中文字幕不卡一区| 亚洲精品美国一| 国产一区二区三区香蕉| 99久久99久久综合| 欧美一级生活片| 国产亚洲欧美在线| 亚洲成国产人片在线观看| 裸体歌舞表演一区二区| 91老司机福利 在线| 欧美一区二区在线不卡| 国产精品久久久久久久久久免费看 | 欧美日韩午夜影院| 日韩精品一区二| 亚洲靠逼com| 亚洲一级片在线观看| 蜜桃视频在线一区| 成人av免费观看| 欧美日韩免费观看一区二区三区 | 国产精品一区二区三区乱码| 色欲综合视频天天天| 日韩一级片在线播放| 国产亚洲成aⅴ人片在线观看| 亚洲人成影院在线观看| 久久99精品久久久久久| av在线免费不卡| 日韩午夜电影在线观看| 亚洲欧美日韩国产综合在线| 一区二区高清在线| 99re热这里只有精品免费视频| 日韩视频免费直播| 国产欧美日韩亚州综合| 午夜激情一区二区| 99国产欧美久久久精品| 欧美电影精品一区二区| 亚洲午夜久久久久中文字幕久| 国产91精品露脸国语对白| 欧美一区二区三区公司| 一区二区三区免费看视频| 国产成人综合自拍| 日韩三级视频中文字幕| 中文字幕国产一区二区| 首页国产丝袜综合| 91在线观看视频| 国产精品成人网| 国产成人av影院| 久久精品人人爽人人爽| 精品一区二区三区在线播放视频 | 亚洲高清免费视频| 99久久久免费精品国产一区二区| 中文字幕免费在线观看视频一区| 欧美aaaaaa午夜精品| 91精品国产综合久久蜜臀| 亚洲欧美成人一区二区三区| 91性感美女视频| 国产精品久久久久久久蜜臀| 成人黄色网址在线观看| 久久伊人中文字幕| 国产成人一级电影| 色视频一区二区| 亚洲成人免费观看| 777久久久精品| 视频一区视频二区中文字幕| 欧美一区二区在线视频| 三级久久三级久久| 在线观看91av| 日韩电影一二三区| 欧美色偷偷大香| 日本欧美肥老太交大片| 日韩午夜中文字幕| 蜜桃视频一区二区三区| 日韩视频一区二区三区| 九九视频精品免费| 久久久精品一品道一区| 国产裸体歌舞团一区二区| 久久久亚洲精品石原莉奈| 国产一区欧美二区| 久久精品人人做人人爽人人| 国产在线精品一区二区夜色| 中文字幕乱码亚洲精品一区 | 欧美精品三级在线观看| 日本一道高清亚洲日美韩| 欧美一区二区三区婷婷月色| 天堂精品中文字幕在线| 精品国产免费一区二区三区香蕉|