亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
精品电影一区二区三区| 亚洲色欲色欲www| 日韩黄色片在线观看| 日韩欧美国产综合在线一区二区三区| 欧美精品v日韩精品v韩国精品v| 国产欧美一区二区三区在线老狼| 亚洲成人av一区| 欧美日韩国产免费一区二区| 亚洲欧美日韩国产中文在线| 美女国产一区二区三区| 欧美一区二区三区免费视频| 亚洲一二三四在线| 欧美在线free| 日本不卡中文字幕| 91精品国产综合久久精品app| 日日夜夜精品视频免费| 日韩一卡二卡三卡四卡| 蜜臂av日日欢夜夜爽一区| 日韩欧美在线网站| 在线亚洲人成电影网站色www| 91精品国产综合久久久蜜臀图片| 亚洲精品免费看| 欧美日韩一区不卡| 久久99久久久欧美国产| 久久综合久久综合久久综合| 在线不卡一区二区| 国产成人自拍高清视频在线免费播放| 国产精品一区二区无线| 青青草成人在线观看| 亚洲精品ww久久久久久p站| 国产精品毛片久久久久久| 久久精品欧美日韩精品| 精品国产电影一区二区| 日韩精品一区在线观看| 欧美一区二区三区色| 这里只有精品电影| 欧美日韩美少妇| 欧美午夜视频网站| 911国产精品| 日韩欧美一二三| 精品少妇一区二区三区日产乱码 | 尤物视频一区二区| 最新日韩在线视频| 亚洲最大的成人av| 亚洲成人自拍网| 日韩成人伦理电影在线观看| 全国精品久久少妇| 久久99精品一区二区三区| 韩国v欧美v亚洲v日本v| 国产精品88av| 波多野结衣精品在线| 91麻豆免费看| 欧美日韩中文字幕一区| 欧美一区二区三区日韩视频| 精品久久久网站| 国产精品日韩精品欧美在线| 亚洲精品国产视频| 午夜精品福利一区二区蜜股av| 天堂成人国产精品一区| 精久久久久久久久久久| 国产成人av网站| 97久久精品人人澡人人爽| 欧美日韩一区二区在线观看 | 美腿丝袜亚洲一区| 国产激情偷乱视频一区二区三区| 成人黄色大片在线观看| 欧美日韩黄色影视| 精品国产乱码久久久久久图片| 国产精品人人做人人爽人人添 | 国产成人h网站| 色综合天天综合网天天狠天天| 欧美男女性生活在线直播观看| 日韩午夜精品视频| 国产精品盗摄一区二区三区| 亚洲成人av在线电影| 国产精品99久久久久久久女警| 91在线精品秘密一区二区| 欧美日韩一区高清| 国产欧美一区二区三区鸳鸯浴| 亚洲精品视频一区| 久久66热偷产精品| 91在线免费看| 精品免费视频一区二区| 一区二区在线观看免费| 国内精品第一页| 欧美在线看片a免费观看| 国产精品国产三级国产有无不卡| 亚洲一区二区三区四区的 | 欧美视频精品在线| 久久久久久9999| 婷婷开心激情综合| 99久久精品一区二区| 精品成a人在线观看| 亚洲一区二区三区爽爽爽爽爽| 国产在线精品一区二区夜色| 欧美综合久久久| 久久只精品国产| 视频一区二区中文字幕| av资源网一区| 久久女同互慰一区二区三区| 亚洲大片免费看| www.欧美色图| 国产色婷婷亚洲99精品小说| 午夜电影网一区| 91精品福利视频| 中文av一区二区| 激情国产一区二区| 欧美一区二区在线免费播放 | 国产一区二区伦理片| 欧美日精品一区视频| 最新热久久免费视频| 国产精品一级在线| 日韩一区二区三区四区| 怡红院av一区二区三区| thepron国产精品| 中文一区二区在线观看| 国内成人免费视频| 日韩欧美一区二区在线视频| 亚洲超丰满肉感bbw| 99久久er热在这里只有精品66| www欧美成人18+| 精品一区二区免费在线观看| 欧美一区永久视频免费观看| 亚洲成人777| 欧美影视一区二区三区| 夜夜夜精品看看| 91国产视频在线观看| 国产女人aaa级久久久级| 日本一区二区三区国色天香| 国产精品亚洲一区二区三区妖精 | 亚洲精品国产一区二区三区四区在线 | 欧美电影在线免费观看| 亚洲成人资源网| 欧美精品1区2区3区| 日韩av网站在线观看| 欧美一二三区在线观看| 精品在线观看免费| 精品伦理精品一区| 黄网站免费久久| 国产三级欧美三级日产三级99| 国产成人精品网址| 国产精品三级在线观看| bt7086福利一区国产| 一区二区三区精品视频| 欧美日韩视频不卡| 免费在线一区观看| 欧美tk—视频vk| 国产精品66部| 亚洲男人电影天堂| 欧美日韩中文一区| 美脚の诱脚舐め脚责91| 久久婷婷一区二区三区| 成人高清av在线| 亚洲高清中文字幕| 日韩三级.com| 国产aⅴ综合色| 亚洲色图另类专区| 欧美另类高清zo欧美| 久久机这里只有精品| 欧美极品美女视频| 97精品久久久午夜一区二区三区| 亚洲一区二区三区三| 精品国精品自拍自在线| 成a人片亚洲日本久久| 亚洲无线码一区二区三区| 日韩精品一区二区在线| 国产91综合网| 亚洲一区二区三区中文字幕在线| 欧美一级二级三级蜜桃| 成人综合婷婷国产精品久久蜜臀 | 精品久久久久久无| 99在线精品一区二区三区| 视频一区在线视频| 国产日产欧美一区| 亚洲色图欧美偷拍| 天天av天天翘天天综合网 | 欧美一区二区视频在线观看2022| 国产美女精品人人做人人爽| 亚洲女子a中天字幕| 精品国产网站在线观看| 色综合网色综合| 激情图区综合网| 亚洲精品乱码久久久久久久久| 日韩西西人体444www| 99久久综合精品| 久久69国产一区二区蜜臀| 亚洲精品一二三| 久久婷婷久久一区二区三区| 精品视频一区二区不卡| 国产成人免费在线观看不卡| 日韩在线一区二区三区| 中文字幕不卡三区| 精品少妇一区二区三区在线播放 | 亚洲大片免费看| 国产欧美视频一区二区| 欧美一区二区三区视频在线 | 国产成人av福利| 五月激情综合色| 亚洲免费高清视频在线| 久久精品夜色噜噜亚洲aⅴ|