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

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

?? xpal.asm

?? 視頻游戲開發C語言源程序
?? ASM
?? 第 1 頁 / 共 2 頁
字號:
;-----------------------------------------------------------------------
; MODULE XPAL
;
; Palette functions all MODE X 256 Color resolutions
;
; 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	$



    All the functions in this module operate on two variations of the
    pallete buffer, the raw and annotated buffers.

    All those functions ending in buff operate on the following palette
    structure:

       BYTE:r0,g0,b0,r1,g1,b1,...rn,gn,bn

    No reference to the starting colour index or number of colours stored
    is contained in the structure.

    All those functions ending in struc operate on the following palette
    structure:

       BYTE:c,BYTE:n,BYTE:r0,g0,b0,r1,g1,b1,...rn,gn,bn

    where c is the starting colour and n is the number of colours stored


    NOTE: previously interrupts were disabled for DAC reads/writes but
	  they have been left enabled in this version to allow the mouse
	  interrupt to be invoked.

$




include xlib.inc
include xpal.inc

.code


;----------------------------------------------------------------------
; Read DAC palette into annotated type buffer with interrupts disabled
; ie BYTE colours to skip, BYTE colours to set, r1,g1,b1,r1,g2,b2...rn,gn,bn
;
; x_get_pal_struc(char far * pal, int num_colrs, int start_color)
;
; WARNING: memory for the palette buffers must all be pre-allocated
;
; Written by Themie Gouthas
;----------------------------------------------------------------------
_x_get_pal_struc  proc
ARG  PalBuff:dword,NumColors:word,StartColor:word
     push  bp		; Set up stack frame
     mov   bp,sp
     push  di
     push  si
     cld

     les   di,dword ptr [PalBuff]  ; Point es:di to palette buffer
     mov   si,[StartColor]         ; Store the Start Colour
     mov   ax,si
     stosb
     mov   dx,[NumColors]          ; Store the Number of Colours
     mov   al,dl
     stosb

     mov   cx,dx                   ; setup regs and jump
     jmp   short ReadPalEntry

_x_get_pal_struc endp





;----------------------------------------------------------------------
; Read DAC palette into raw buffer with interrupts disabled
; ie BYTE r1,g1,b1,r1,g2,b2...rn,gn,bn
;
; x_get_pal_raw(char far * pal, int num_colrs, int start_index)
;
; WARNING: memory for the palette buffers must all be pre-allocated
;
; Written by Themie Gouthas
;----------------------------------------------------------------------
_x_get_pal_raw	proc
ARG  PalBuff:dword,NumColors:word,StartColor:word
     push  bp		; Set up stack frame
     mov   bp,sp
     push  di
     push  si

     les   di,dword ptr [PalBuff]  ; Point es:di to palette buffer

     mov  si,[StartColor]
     mov  cx,[NumColors]

ReadPalEntry:
     cld
     WaitVsyncStart
     mov  ax,si
     mov  dx,DAC_READ_INDEX
     ;cli
     out  dx,al                    ; Tell DAC what colour to start reading
     mov  dx,DAC_DATA

     mov  bx,cx                    ; set cx to Num Colors * 3 ( size of
     shl  bx,1                     ; palette buffer)
     add  cx,bx

     rep  insb                     ; read the palette enntries

     ;sti
     pop  si
     pop  di
     pop  bp
     ret
_x_get_pal_raw endp



;----------------------------------------------------------------------
; Write DAC palette from annotated type buffer with interrupts disabled
; ie BYTE colours to skip, BYTE colours to set, r1,g1,b1,r1,g2,b2...rn,gn,bn
;
; x_put_pal_struc(char far * pal)
;
; Written by Themie Gouthas
;----------------------------------------------------------------------

_x_put_pal_struc proc
ARG     CompPalBuff:dword
        push    bp      ;preserve caller's stack frame
	mov     bp,sp   ;point to local stack frame
	push    ds
	push    si
	cld
	lds     si,[CompPalBuff]   ; load the source compressed colour data
	lodsb			   ; get the colours to skip
	mov     ah,0
	mov     bx,ax              ; skip colours

	lodsb			   ; get the count of colours to set
	mov     ah,0
	mov	cx,ax              ; use it as a loop counter
	jmp     short WritePalEntry

_x_put_pal_struc  endp


;----------------------------------------------------------------------
; Write DAC palette from annotated type buffer with interrupts disabled
; starting at a new palette index
;
; ie BYTE colours to skip, BYTE colours to set, r1,g1,b1,r1,g2,b2...rn,gn,bn
;
; x_transpose_pal_struc(char far * pal, int StartColor)
;
; WARNING: memory for the palette buffers must all be pre-allocated
;
; Written by Themie Gouthas
;----------------------------------------------------------------------

_x_transpose_pal_struc proc
ARG     CompPalBuff:dword,StartColor:word
        push    bp      ;preserve caller's stack frame
	mov     bp,sp   ;point to local stack frame
	push    ds
	push    si
	cld
	lds     si,[CompPalBuff]   ; load the source compressed colour data
	mov     bx,[StartColor]
	mov     [si],bl
	inc     si
	lodsb			   ; get the count of colours to set
	mov     ah,0
	mov	cx,ax              ; use it as a loop counter
	jmp     short WritePalEntry
_x_transpose_pal_struc endp


;----------------------------------------------------------------------
; Write DAC palette from raw buffer with interrupts disabled
; ie BYTE r1,g1,b1,r1,g2,b2...rn,gn,bn
;
; _x_put_pal_raw(char far * pal, int num_colrs, int start_index)
;
; Written by Themie Gouthas
;----------------------------------------------------------------------
_x_put_pal_raw  proc
ARG  PalBuff:dword,NumColors:word,StartColor:word
		push bp		; Set up stack frame
		mov  bp,sp
		push ds
		push si

		mov  cx,[NumColors]      ; Number of colours to set
		mov  bx,[StartColor]
		lds  si,[PalBuff]        ; ds:si -> palette buffer


WritePalEntry:
                mov  ax,@data
		mov  es,ax
		cmp  es:[_VsyncHandlerActive],TRUE
		jne  @@NoVsyncHandler
@@WaitForLast:
		cmp  es:[_VsyncPaletteCount],0
		jne  @@WaitForLast
		push cx
		push es
		mov  di, offset _VsyncPaletteBuffer
		mov  ax,3
		mul  cx
		mov  cx,ax
		rep  movsb
		pop  ds
		pop  cx
		mov  [_VsyncPaletteStart],bx
		mov  [_VsyncPaletteCount],cx
		jmp  short @@Done
@@NoVsyncHandler:


		or   cx,cx
		jz   @@Done
		;cli
		cld                      ; Make sure we're going the right way
		WaitVsyncStart           ; Wait for vert sync to start
                mov  ax,bx
		mov  bx,60               ; set the vsync check timer (Vsync
                			 ; is tested for at each bx'th entry to
					 ; prevent snow 60 is otimum for 10
					 ; MHz 286 or greater

@@SetLoop:
		mov  dx,DAC_WRITE_INDEX  ; Tell DAC what colour index to start
		out  dx,al               ; writing from
		mov  dx,DAC_DATA

		outsb                    ; Set the red component
		outsb                    ; Set the green component
		outsb                    ; Set the blue component
		inc  al                  ; increment the colour index
		dec  bx                  ; decrement vsync test counter
		js   @@test_vsync        ; ready to test for vsync again ?
		loop @@SetLoop           ; No! - continue loop
		jmp  short @@Done        ; All colours done

@@test_vsync:
		mov     dx,INPUT_STATUS_0
		push    ax               ; save current colour index
@@Wait:
		in      al,dx            ; wait for vsync leading edge pulse
		test    al,08h
		jz      @@Wait

		pop     ax               ; restore current colour index
		mov     bx,60            ; reset vsync test counter
		loop @@SetLoop           ; loop for next colour index

@@Done:
		;sti
		pop  si
		pop  ds
		pop  bp
		ret
_x_put_pal_raw endp



;----------------------------------------------------------------------
; Set the RGB setting of a vga color

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产乱国产乱300精品| 一级日本不卡的影视| 99re成人在线| 日韩 欧美一区二区三区| 国产精品国产精品国产专区不蜜 | 不卡高清视频专区| 美脚の诱脚舐め脚责91| 亚洲欧美日本韩国| 99久久综合狠狠综合久久| 亚洲日本一区二区| 久久久久久99精品| 欧美精品一区二区三区在线播放| 成人动漫在线一区| 天天色天天操综合| 亚洲天堂精品视频| www亚洲一区| 欧美一卡二卡三卡四卡| 欧美伊人久久久久久久久影院| 成av人片一区二区| 丁香婷婷综合色啪| 精品一区二区免费在线观看| 日韩高清不卡一区| 亚洲一二三专区| 亚洲乱码日产精品bd| 久久久久国产精品厨房| 欧美va在线播放| 欧美一区二区网站| 制服.丝袜.亚洲.另类.中文| 精品视频资源站| 欧美日韩小视频| 欧美日韩国产一区| 欧美午夜免费电影| 欧美午夜一区二区三区 | 99久久精品国产毛片| 国内成+人亚洲+欧美+综合在线 | 波多野结衣中文字幕一区| 国产精品中文有码| 国产麻豆9l精品三级站| 国产一区二区视频在线| 黄色日韩网站视频| 国内精品视频666| 激情综合色综合久久| 国产一区二区主播在线| 国产成人午夜视频| 成人理论电影网| 91香蕉视频黄| 91国偷自产一区二区三区观看| 色94色欧美sute亚洲13| 欧洲av在线精品| 777午夜精品免费视频| 日韩精品一区二区三区视频| 精品毛片乱码1区2区3区| 久久亚洲综合色| 国产精品网站在线观看| 一区二区三区在线观看动漫 | 成人av资源下载| 91免费视频观看| 欧美伊人精品成人久久综合97| 欧美卡1卡2卡| 精品国产伦一区二区三区观看方式 | 韩国av一区二区三区| 豆国产96在线|亚洲| 91原创在线视频| 7777女厕盗摄久久久| 久久午夜电影网| 亚洲三级在线看| 日产国产欧美视频一区精品| 国产黄人亚洲片| 在线影院国内精品| 欧美精品一区视频| 一区二区在线电影| 免费成人在线观看| 成人h动漫精品一区二区| 欧美精品一二三四| 国产日韩欧美电影| 亚洲电影在线播放| 青青国产91久久久久久| 国产成人啪免费观看软件 | 久久久午夜精品理论片中文字幕| 久久老女人爱爱| 国产精品美女久久久久久| 亚洲一卡二卡三卡四卡| 日本中文字幕不卡| jizzjizzjizz欧美| 欧美一区二区美女| 亚洲美腿欧美偷拍| 国内精品在线播放| 欧美午夜片在线看| 国产精品乱码久久久久久| 五月天中文字幕一区二区| 成人精品亚洲人成在线| 日韩午夜电影av| 亚洲黄色av一区| 成人久久视频在线观看| 欧美成人三级电影在线| 尤物av一区二区| 粉嫩欧美一区二区三区高清影视| 欧美日韩1234| 曰韩精品一区二区| 成人高清av在线| 精品国产乱码久久久久久影片| 亚洲第一综合色| 色综合久久中文综合久久97| 国产婷婷色一区二区三区在线| 日韩电影在线观看网站| 色婷婷久久99综合精品jk白丝| 久久久夜色精品亚洲| 免费成人在线观看| 欧美久久久久免费| 亚洲一区在线免费观看| 99精品久久只有精品| 国产精品网站导航| 国产精品1区二区.| 欧美mv和日韩mv的网站| 日韩电影一区二区三区| 欧美性欧美巨大黑白大战| 亚洲人成影院在线观看| 北条麻妃一区二区三区| 久久亚洲精华国产精华液| 亚洲成人精品影院| 欧美在线一二三| 亚洲免费观看高清完整| 成人伦理片在线| 久久精品视频在线看| 国内精品伊人久久久久影院对白| 日韩欧美国产午夜精品| 天天综合天天做天天综合| 欧美日韩一区二区三区高清| 18成人在线观看| 91视频.com| 亚洲精品国产无天堂网2021| 色香色香欲天天天影视综合网 | 国产在线一区观看| 日韩天堂在线观看| 激情综合亚洲精品| 欧美一区二区三区在线视频| 婷婷亚洲久悠悠色悠在线播放| 欧美亚洲国产一区二区三区| 国产精品乱人伦中文| 99久久国产免费看| 中文字幕高清一区| 国产成人福利片| 欧美国产一区二区| 国产99久久久国产精品免费看| 国产精品理论在线观看| 91视频www| 天天综合日日夜夜精品| 精品国产制服丝袜高跟| 国产伦精品一区二区三区免费迷 | 亚洲色图色小说| 欧美日韩综合在线| 日韩福利电影在线观看| 欧美电影免费观看高清完整版在 | 国产精品国产三级国产aⅴ原创 | 欧美伊人久久久久久久久影院| 亚洲一区二区三区中文字幕| 欧美日韩国产精选| 美女精品一区二区| 中文字幕不卡在线观看| 成人av在线网站| 一区二区三区四区乱视频| 欧美日韩综合不卡| 日韩成人免费电影| 26uuu久久天堂性欧美| 国产xxx精品视频大全| 中文久久乱码一区二区| 欧美在线影院一区二区| 美女mm1313爽爽久久久蜜臀| 欧美极品少妇xxxxⅹ高跟鞋| 日本高清无吗v一区| 免费一区二区视频| 亚洲国产精品成人综合色在线婷婷 | 国产.精品.日韩.另类.中文.在线.播放| 国产精品青草综合久久久久99| 在线观看亚洲精品| 国产一区美女在线| 亚洲一卡二卡三卡四卡五卡| 久久免费电影网| 欧美日韩国产一区| av激情综合网| 蜜臀精品一区二区三区在线观看 | 色悠久久久久综合欧美99| 青青草伊人久久| 国产视频在线观看一区二区三区| 97久久超碰国产精品| 免费欧美在线视频| 中文字幕一区二区三区精华液| 欧美日韩不卡在线| 国产精一区二区三区| 一区二区三区四区亚洲| 久久久久久99久久久精品网站| 欧美三日本三级三级在线播放| 国产福利91精品| 日韩av成人高清| 樱桃国产成人精品视频| 国产色一区二区| 欧美一级片在线观看| 91搞黄在线观看| 99视频精品在线| 国产精品18久久久久久久久|