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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d3d3a972947ff62401a403f48155437310a36806 | 537 | asm | Assembly | oeis/013/A013831.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/013/A013831.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/013/A013831.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A013831: a(n) = 4^(5n+2).
; 16,16384,16777216,17179869184,17592186044416,18014398509481984,18446744073709551616,18889465931478580854784,19342813113834066795298816,19807040628566084398385987584,20282409603651670423947251286016,20769187434139310514121985316880384,21267647932558653966460912964485513216,21778071482940061661655974875633165533184,22300745198530623141535718272648361505980416,22835963083295358096932575511191922182123945984,23384026197294446691258957323460528314494920687616
mul $0,5
add $0,2
mov $1,4
pow $1,$0
mov $0,$1
| 59.666667 | 460 | 0.893855 |
4b2761eb02e2f0c26c9fcf84826a32f44e65a605 | 6,015 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_sm_/i3-7100_9_0xca_notsx.log_21829_203.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i3-7100_9_0xca_notsx.log_21829_203.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i3-7100_9_0xca_notsx.log_21829_203.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 %r8
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0xf986, %rsi
lea addresses_UC_ht+0x4116, %rdi
nop
nop
nop
nop
nop
sub $33579, %r8
mov $114, %rcx
rep movsq
nop
nop
nop
sub %rcx, %rcx
lea addresses_WT_ht+0x123a5, %rbx
nop
nop
dec %rbp
mov $0x6162636465666768, %rsi
movq %rsi, %xmm5
vmovups %ymm5, (%rbx)
nop
cmp %rsi, %rsi
lea addresses_normal_ht+0xd1e, %rsi
clflush (%rsi)
nop
nop
nop
nop
nop
inc %rax
movl $0x61626364, (%rsi)
nop
nop
nop
sub %r8, %r8
lea addresses_A_ht+0x86f6, %rbp
nop
sub $31648, %r8
mov (%rbp), %rsi
nop
sub %rbp, %rbp
lea addresses_WT_ht+0x11ec6, %rsi
lea addresses_normal_ht+0x1c0c6, %rdi
nop
nop
nop
nop
and $18735, %r13
mov $62, %rcx
rep movsb
nop
nop
and $48655, %rcx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r8
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r14
push %rcx
push %rdi
push %rsi
// REPMOV
lea addresses_UC+0xc06, %rsi
lea addresses_PSE+0x55c6, %rdi
nop
nop
inc %r14
mov $120, %rcx
rep movsq
nop
nop
nop
nop
sub %rdi, %rdi
// Store
lea addresses_PSE+0x74de, %rcx
nop
nop
nop
nop
xor %rdi, %rdi
movb $0x51, (%rcx)
sub %r14, %r14
// Store
lea addresses_PSE+0x1f6c6, %r10
nop
nop
nop
nop
nop
xor %r14, %r14
mov $0x5152535455565758, %r12
movq %r12, %xmm3
vmovaps %ymm3, (%r10)
nop
and %r10, %r10
// Faulty Load
lea addresses_PSE+0x1f6c6, %r12
xor %rcx, %rcx
movb (%r12), %r10b
lea oracles, %rsi
and $0xff, %r10
shlq $12, %r10
mov (%rsi,%r10,1), %r10
pop %rsi
pop %rdi
pop %rcx
pop %r14
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_PSE', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_PSE', 'congruent': 2, 'same': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_PSE', 'size': 1, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': True, 'congruent': 0, 'NT': True, 'type': 'addresses_PSE', 'size': 32, 'AVXalign': True}}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_PSE', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': False}}
{'src': {'same': True, 'congruent': 3, 'NT': False, 'type': 'addresses_A_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}}
{'58': 21829}
58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
*/
| 38.06962 | 2,999 | 0.65985 |
1e83411dd0404d1567843a1bb2c52b393de15b2b | 516 | asm | Assembly | programs/oeis/301/A301293.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/301/A301293.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/301/A301293.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A301293: Expansion of (x^2+x+1)^2 / ((x^2+1)*(x-1)^2).
; 1,4,9,14,18,22,27,32,36,40,45,50,54,58,63,68,72,76,81,86,90,94,99,104,108,112,117,122,126,130,135,140,144,148,153,158,162,166,171,176,180,184,189,194,198,202,207,212,216,220,225,230,234,238,243,248,252,256,261,266,270,274,279,284,288,292,297,302,306,310,315,320,324,328,333,338,342,346,351,356,360,364,369,374,378,382,387,392,396,400,405,410,414,418,423,428,432,436,441,446
mul $0,5
sub $0,2
mul $0,27
div $0,6
add $0,2
div $0,2
mul $0,2
div $0,5
add $0,2
| 39.692308 | 375 | 0.676357 |
e2f3330d39896e76cc8839035591b3f85f5a7be1 | 4,543 | asm | Assembly | Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_7987_637.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_7987_637.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_7987_637.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 %r15
push %rax
push %rdx
lea addresses_normal_ht+0x56a, %r10
nop
nop
add %rdx, %rdx
mov $0x6162636465666768, %r11
movq %r11, %xmm2
movups %xmm2, (%r10)
nop
nop
nop
add $40121, %r15
lea addresses_WC_ht+0x12b3a, %rax
nop
sub %rdx, %rdx
movb $0x61, (%rax)
nop
add $38121, %r11
pop %rdx
pop %rax
pop %r15
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r8
push %r9
push %rdx
push %rsi
// Store
lea addresses_WC+0x142f0, %r11
nop
nop
nop
xor $1861, %rdx
mov $0x5152535455565758, %r10
movq %r10, %xmm7
movups %xmm7, (%r11)
nop
dec %rdx
// Faulty Load
lea addresses_WT+0x173a, %r9
nop
nop
inc %rdx
mov (%r9), %r8d
lea oracles, %rdx
and $0xff, %r8
shlq $12, %r8
mov (%rdx,%r8,1), %r8
pop %rsi
pop %rdx
pop %r9
pop %r8
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'size': 2, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 1, 'AVXalign': False, 'NT': True, 'congruent': 9, 'same': True}}
{'00': 7987}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 54.083333 | 2,999 | 0.660357 |
d3abbce6a8b5f79d24e9c5a2499a5c44ff5e87c2 | 308 | asm | Assembly | programs/oeis/067/A067273.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/067/A067273.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/067/A067273.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A067273: a(n) = n*(a(n-1)*2+1), a(0) = 0.
; 0,1,6,39,316,3165,37986,531811,8508984,153161721,3063234430,67391157471,1617387779316,42052082262229,1177458303342426,35323749100272795,1130359971208729456,38432239021096801521
mul $0,2
mov $2,$0
lpb $0
sub $0,2
add $1,$2
mul $2,$0
lpe
div $1,2
mov $0,$1
| 23.692308 | 178 | 0.711039 |
51eba441203ce810dea55e368871726a3a453fb8 | 698 | asm | Assembly | oeis/021/A021754.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/021/A021754.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/021/A021754.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A021754: Expansion of 1/((1-x)(1-4x)(1-5x)(1-7x)).
; Submitted by Jon Maiga
; 1,17,190,1770,14931,118587,905920,6742340,49288261,355826757,2546230050,18106416510,128181315991,904540692527,6368500164580,44764509392280,314282333570121,2204653080603897,15456046918261510,108310071701877650,758760684298882651,5314281566082888867,37214778298781832840,260577578597473120620,1824414078012282245581,12772755186435703515437,89418575511598066750570,625976498633125190609190,4382067936768362001610911,30675638173368130550291607,214735281830753569356246700,1503176052050072954251271360
add $0,2
lpb $0
sub $0,1
add $2,2
mul $2,5
sub $2,9
mul $3,7
add $3,$1
mul $1,4
add $1,$2
lpe
mov $0,$3
| 41.058824 | 498 | 0.818052 |
21c9aca61aec4ab0facacf9490446cc9950fc39b | 1,892 | asm | Assembly | src/z80asm/dev/z80asm_lib/cpir.asm | ahjelm/z88dk | c4de367f39a76b41f6390ceeab77737e148178fa | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | src/z80asm/dev/z80asm_lib/cpir.asm | ahjelm/z88dk | c4de367f39a76b41f6390ceeab77737e148178fa | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | src/z80asm/dev/z80asm_lib/cpir.asm | ahjelm/z88dk | c4de367f39a76b41f6390ceeab77737e148178fa | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z | ; Substitute for z80 cpir instruction
; aralbrec 02.2008
; flag-perfect emulation of cpir
SECTION code_l_sccz80
PUBLIC __z80asm__cpir
IF __CPU_GBZ80__
EXTERN __z80asm__ex_sp_hl
ENDIF
__z80asm__cpir:
jr nc, enterloop
call enterloop
; scf clears N and H - must set carry the hard way
push af
IF __CPU_GBZ80__
call __z80asm__ex_sp_hl
ELSE
ex (sp), hl
ENDIF
IF __CPU_INTEL__
ld a, l
or @00000001
ld l, a
ELSE
set 0, l ; set carry
ENDIF
jr retflags
loop:
inc hl
enterloop:
dec bc
cp (hl) ; compare, set flags
jr z, match
inc c
dec c
jr nz, loop
inc b
djnz loop
; .nomatch
cp (hl) ; compare, set flags
inc hl
push af
joinbc0:
IF __CPU_GBZ80__
call __z80asm__ex_sp_hl
ELSE
ex (sp), hl
ENDIF
IF __CPU_INTEL__
ld a, l
and @11111010
ld l, a
ELSE
res 0, l ; clear carry
res 2, l ; clear P/V -> BC == 0
ENDIF
jr retflags
match:
inc hl
push af
ld a, b
or c
jr z, joinbc0
IF __CPU_GBZ80__
call __z80asm__ex_sp_hl
ELSE
ex (sp), hl
ENDIF
IF __CPU_INTEL__
ld a, l
and @11111110
or @00000100
ld l, a
ELSE
res 0, l ; clear carry
set 2, l ; set P/V -> BC != 0
ENDIF
retflags:
IF __CPU_GBZ80__
call __z80asm__ex_sp_hl
ELSE
ex (sp), hl
ENDIF
pop af
ret
| 17.849057 | 62 | 0.446617 |
0878fd3d57d8a3257e7156956905c1e0db3555c4 | 1,034 | asm | Assembly | src/functions.asm | Hacktix/gbctv | b8b97f163d1ac87d09dbfea8aacab045e390f744 | [
"MIT"
] | 14 | 2020-12-12T02:23:39.000Z | 2022-03-01T20:00:08.000Z | src/functions.asm | Hacktix/gbctv | b8b97f163d1ac87d09dbfea8aacab045e390f744 | [
"MIT"
] | null | null | null | src/functions.asm | Hacktix/gbctv | b8b97f163d1ac87d09dbfea8aacab045e390f744 | [
"MIT"
] | null | null | null | SECTION "Functions", ROM0
;------------------------------------------------------------------------
; Copies BC bytes to a memory region starting at HL from a memory
; region starting at DE.
;------------------------------------------------------------------------
Memcpy::
ld a, [de]
ld [hli], a
inc de
dec bc
ld a, b
or c
jr nz, Memcpy
ret
;------------------------------------------------------------------------
; Copies a null-terminated string pointed to by DE to HL (excluding
; the terminating zero-byte)
;------------------------------------------------------------------------
Strcpy::
ld a, [de]
and a
ret z
ld [hli], a
inc de
jr Strcpy
;------------------------------------------------------------------------
; Converts the lower nibble of A to an ASCII value and stores it in A.
;------------------------------------------------------------------------
NibbleToASCII:
and $0f
cp 10
jr c, .digit
add a, "A" - 10 - "0"
.digit
add a, "0"
ret | 27.210526 | 73 | 0.341393 |
59199d8a5cbbbcdcaad07c0506a46b1319a94763 | 5,439 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0x48_notsx.log_21829_1701.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_0x48_notsx.log_21829_1701.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_0x48_notsx.log_21829_1701.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 %rax
push %rdi
push %rdx
lea addresses_UC_ht+0x1e6d0, %rdi
nop
nop
add $62061, %r10
movups (%rdi), %xmm4
vpextrq $1, %xmm4, %rax
nop
nop
nop
nop
sub %rdx, %rdx
lea addresses_D_ht+0x46f8, %r11
nop
nop
sub %r12, %r12
vmovups (%r11), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $0, %xmm3, %r15
nop
nop
add $25249, %r11
pop %rdx
pop %rdi
pop %rax
pop %r15
pop %r12
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r14
push %rbx
push %rcx
push %rdi
push %rsi
// Store
lea addresses_WC+0x6f50, %rcx
nop
nop
nop
cmp %r11, %r11
mov $0x5152535455565758, %r10
movq %r10, %xmm3
vmovups %ymm3, (%rcx)
nop
nop
lfence
// Store
lea addresses_WC+0x1c460, %rdi
nop
nop
nop
nop
sub $56758, %r14
mov $0x5152535455565758, %rcx
movq %rcx, %xmm7
movups %xmm7, (%rdi)
nop
nop
nop
nop
nop
xor %r10, %r10
// Store
lea addresses_PSE+0x1f870, %rdi
nop
nop
and %r14, %r14
movl $0x51525354, (%rdi)
nop
nop
and %r11, %r11
// Store
lea addresses_WT+0x16618, %r11
nop
nop
and $10463, %rcx
movb $0x51, (%r11)
nop
nop
nop
nop
nop
and %rbx, %rbx
// Faulty Load
lea addresses_WT+0x14870, %rdi
nop
nop
and $28329, %r14
movb (%rdi), %cl
lea oracles, %r10
and $0xff, %rcx
shlq $12, %rcx
mov (%r10,%rcx,1), %rcx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r14
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 4, 'type': 'addresses_WT', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_WC', 'congruent': 3}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_WC', 'congruent': 3}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_PSE', 'congruent': 11}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_WT', 'congruent': 3}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': True, 'AVXalign': False, 'size': 1, 'type': 'addresses_WT', 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_UC_ht', 'congruent': 3}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_D_ht', 'congruent': 3}}
{'39': 21829}
39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39
*/
| 39.413043 | 2,999 | 0.657106 |
4802bcdbc2e90deef7f9287018f3b0bca916a99a | 383 | asm | Assembly | programs/oeis/290/A290251.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/290/A290251.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/290/A290251.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A290251: a(n) is the number of parts in the integer partition having viabin number n.
; 0,1,2,1,3,2,2,1,4,3,3,2,3,2,2,1,5,4,4,3,4,3,3,2,4,3,3,2,3,2,2,1,6,5,5,4,5,4,4,3,5,4,4,3,4,3,3,2,5,4,4,3,4,3,3,2,4,3,3,2,3,2,2,1,7,6,6,5,6,5,5,4,6,5,5,4,5,4,4,3,6,5,5,4,5,4,4,3,5,4,4,3,4
mul $0,2
mov $1,96
sub $1,$0
add $1,2
lpb $0,1
div $0,2
add $1,4
add $1,$0
sub $1,3
lpe
sub $1,98
| 25.533333 | 187 | 0.561358 |
1c8be12b60b33589acd4ef446b4d14e4dee3c1ca | 3,978 | asm | Assembly | Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_3817_327.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_3817_327.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_3817_327.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:
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r9
push %rax
push %rbp
push %rcx
push %rdi
push %rdx
// Store
lea addresses_A+0x83e2, %rcx
nop
nop
nop
nop
nop
cmp $36191, %r9
movl $0x51525354, (%rcx)
nop
nop
nop
nop
nop
sub $58717, %r9
// Faulty Load
lea addresses_WC+0xfde2, %rcx
nop
nop
nop
nop
nop
and $49895, %rdi
mov (%rcx), %r11
lea oracles, %rbp
and $0xff, %r11
shlq $12, %r11
mov (%rbp,%r11,1), %r11
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'size': 4, 'AVXalign': False, 'NT': True, 'congruent': 6, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'00': 3817}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 62.15625 | 2,999 | 0.66189 |
1dc38d092a9992d150522ac7214215ce1f7a88cc | 4,749 | asm | Assembly | Transynther/x86/_processed/US/_zr_/i9-9900K_12_0xca.log_21829_1451.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/US/_zr_/i9-9900K_12_0xca.log_21829_1451.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/US/_zr_/i9-9900K_12_0xca.log_21829_1451.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:
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r13
push %r8
push %r9
push %rax
push %rbp
push %rdi
// Store
lea addresses_D+0x8058, %r8
and %rdi, %rdi
movb $0x51, (%r8)
nop
xor %r10, %r10
// Store
lea addresses_US+0x10e0c, %r9
nop
sub $55436, %r8
mov $0x5152535455565758, %r10
movq %r10, %xmm1
movups %xmm1, (%r9)
nop
nop
nop
sub $2097, %r10
// Load
lea addresses_RW+0xa30c, %r9
and $36277, %rdi
mov (%r9), %r10w
// Exception!!!
nop
nop
nop
nop
nop
mov (0), %r13
nop
nop
nop
sub $38227, %r8
// Store
lea addresses_WT+0xc5fc, %r13
clflush (%r13)
nop
nop
nop
inc %rbp
movl $0x51525354, (%r13)
xor %r10, %r10
// Faulty Load
lea addresses_US+0x10e0c, %r10
clflush (%r10)
nop
nop
nop
dec %r13
movups (%r10), %xmm4
vpextrq $1, %xmm4, %rax
lea oracles, %rbp
and $0xff, %rax
shlq $12, %rax
mov (%rbp,%rax,1), %rax
pop %rdi
pop %rbp
pop %rax
pop %r9
pop %r8
pop %r13
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_US', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_D', 'same': False, 'AVXalign': False, 'congruent': 1}}
{'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_US', 'same': True, 'AVXalign': False, 'congruent': 0}}
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_RW', 'same': False, 'AVXalign': False, 'congruent': 7}}
{'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_WT', 'same': False, 'AVXalign': False, 'congruent': 4}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_US', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 48.958763 | 2,999 | 0.654454 |
6fcbf28ac3094d06e42dfd2ceb757364d959d6ab | 20,061 | asm | Assembly | rom0/channels.asm | nagydani/zx-rom-mods | a06cfb2e936c145025c4f3d6f3282cce15ad5f56 | [
"MIT"
] | 15 | 2018-09-07T15:49:44.000Z | 2021-09-21T20:47:14.000Z | rom0/channels.asm | nagydani/zx-rom-mods | a06cfb2e936c145025c4f3d6f3282cce15ad5f56 | [
"MIT"
] | 6 | 2020-05-24T08:43:07.000Z | 2020-05-26T22:02:36.000Z | rom0/channels.asm | nagydani/zx-rom-mods | a06cfb2e936c145025c4f3d6f3282cce15ad5f56 | [
"MIT"
] | 3 | 2020-08-03T06:28:34.000Z | 2021-12-29T00:27:50.000Z | ; K/S channel state
; byte 0:
; bit 0: direct output (0), to be saved (1)
; bit 1: one extra byte (0), two extra bytes (1)
; bit 2: (blinking) cursor character follows
; bit 3: instructions (0), arguments (1)
; bit 4: copy of bit 4 of FRAMES
; bit 5: flashing cursor state
; bit 6; 8 pixel font (0), 4 pixel font (1)
; bit 7: K channel input from K_DATA
;
; byte 1:
; width of display + 1 (defaults to 33)
;
; byte 2:
; control character saved (see TVDATA)
;
; byte 3:
; first argument saved (see TVDATA + 1)
POFETCH:EQU L0B03 + 6
POSTORE:EQU L0ADC + 6
; channel K input service routine
K_IN: CALL STACKSWAP
LD HL,K_STATE
BIT 7,(HL)
JR Z,K_IN0
LD A,(K_DATA)
RES 7,(HL)
CP $80 ; potential token ending signal
SCF
RET NZ
LD A,$0E ; pretend that EXT
LD (LAST_K),A ; has been pressed
JR NOPIP ; in silence
K_INNK: BIT 7,(IY+BORDCR-ERR_NR) ; flashing cursor visible?
RET Z
LD B,(HL)
LD A,(FRAMES)
XOR B
AND $10
RET Z
PUSH BC
PUSH HL
CALL PCURSOR
POP HL
POP BC
XOR $20
XOR B
LD (HL),A
XOR A
RET
; regular input
K_IN0: BIT 3,(IY+$02)
CALL NZ,ED_COPY
AND A
PUSH HL
LD HL,FLAGS
BIT 5,(IY+$30) ; mode K suppressed?
JR Z,K_IN1 ; jump, if not
SET 3,(HL) ; switch off K mode
K_IN1: BIT 5,(HL) ; key pressed?
POP HL
JR Z,K_INNK ; no key pressed
BIT 5,(HL)
RES 5,(HL)
CALL NZ,PCURSOR ; hide cursor
LD HL,$00C8 ; key click pitch
LD D,H
LD A,(PIP) ; duration
OR A
JR Z,NOPIP
RST $30
DEFW BEEP_PIP
NOPIP: LD A,(LAST_K) ; pressed keycode
RES 5,(IY+$01) ; fetched from buffer
BIT 5,(IY+$02)
JR Z,NOCLSL
PUSH AF
RST $30
DEFW L0D6E ; CLS-LOWER
POP AF
NOCLSL: CP $88
JR C,K_INB ; jump, if definitely not block graphics
CP $90
JR NC,K_INW ; jump, if UDG or tokens
LD BC,$7FFE
IN B,(C)
BIT 1,B ; check Symbol Shift
JR NZ,K_ING0 ; jump if not block graphics
ADD A,$100 - $70 ; transpose to $18..$1F, set CF
JR K_ING0
K_INW: CP RND_T ; USR "V" +
JR C,K_INB
BIT 1,(IY+$07) ; mode G?
JR Z,K_INB
RES 1,(IY+$07) ; these turn mode G off
ADD A,$100 - $A4 ; transpose to 1..5, set CF
K_ING0: BIT 5,(IY+$30) ; mode K suppressed?
JR Z,K_ING1 ; jump, if not
LD C,A ; mode L translation
LD HL,L_MODE
CALL INDEXER
LD A,C
JR NC,K_ING1
LD A,(HL)
K_ING1: SCF
K_ING3: BIT 5,(IY+FLAGS2-ERR_NR) ; mode K suppressed?
RET Z ; return, if not
CALL EDITOR_MODE ; editing?
RET NZ ; return, if not
LD HL,K_SAV
BIT 2,(HL) ; inside quotes?
RET NZ ; return, if so
RST $30
DEFW L2C8D ; ALPHA
RET C ; return, if so
LD HL,TKETAB
LD BC,TKETABE-TKETAB
CPIR
JP NZ,K_INSTT
K_TKE: LD (IY-$2D),$80 ; signal potential token end
LD HL,K_STATE
SET 7,(HL)
SCF
RET
K_ENT: LD HL,0
LD (K_CUR_S),HL ; reset old cursor position
LD (IY+DEFADD+1-ERR_NR),1 ; TODO: this is an ugly hack
RES 7,(IY+BORDCR-ERR_NR) ; turn off flashing cursor
K_ENTP: RES 4,(IY+$37) ; allow ELSE
RES 2,(IY+FLAGS-ERR_NR) ; K mode output (another ugly hack)
SCF
JR K_ING3
K_INB:
K_MDL: CP " "
JR Z,KEY_M_K0 ; jump, if space
K_NSP: LD (K_DATA),A
CCF
JR C,K_ING0 ; regular key pressed
; Control keys
CP $0D
JR Z,K_ENT ; ENTER pressed
CP $10
JR NC,KEY_CONTR0
CP $06
JR NC,KEY_M_CL0
LD B,A
AND $01
LD C,A
LD A,B
RRA
ADD A,$12
JR KEY_DATA0
KEY_M_K0:
CALL EDITOR_MODE
SCF
RET NZ ; outside of editor mode, space is a regular key
RST $30
DEFW X1F5A ; CAPS SHIFT ?
LD A," " ; restore A
CCF
JR C,K_TRAD ; in editor mode, BREAK toggles K mode suppression
LD HL,MODE
BIT 0,(HL) ; mode E?
JR Z,K_NSP
DEC (HL) ; leave mode E
K_TRAD: LD A,$20 ; toggle bit 5 (K mode suppression)
JR TFLAGS2
KEY_M_CL0:
JR NZ,KEY_MODE0
LD A,$08 ; toggle CAPS LOCK
TFLAGS2:LD HL,FLAGS2
XOR (HL)
LD (HL),A ; toggle mask in A
JR KEY_FLAG0
KEY_MODE0:
CP $0E
JR C,KEY_CUR ; control keys below EXT
JR NZ,KEY_MODE1 ; EXT key?
LD HL,FLAGS2
BIT 5,(HL) ; mode K suppressed?
JR Z,KEY_MODE1 ; jump, if not - toggle mode E
; EXT key in K suppressed-mode
BIT 2,(HL) ; inside quotes?
JR NZ,KEY_MODE1 ; jump, if not - toggle mode U
CALL EDITOR_MODE
RET NZ ; exit, if not editing
LD HL,(E_LINE)
LD DE,(K_CUR)
AND A
SBC HL,DE
JR Z,K_TRAD ; exit K suppressed mode
EX DE,HL
DEC HL
LD B,0
LD A,(HL)
CP $80 ; is the cursor after a token?
JR C,EXT_NT ; jump, if it is not
LD HL,K_STATE
SET 7,(HL)
SUB RND_T
JR C,CYCOR0
LD DE,L0095
CYC_O: CALL FC_TOKEN_R1
EXT_CYC:LD (K_DATA),A
LD A,$0C
SCF
RET
KEY_CONTR0:
LD B,A
AND $07
LD C,A
LD A,$10
BIT 3,B
JR NZ,KEY_DATA0
INC A
KEY_DATA0:
LD (IY-$2D),C
LD HL,K_STATE
SET 7,(HL)
SCF
RET
KEY_MODE2:
SUB $12
KEY_MODE1:
SUB $0D
LD HL,MODE
CP (HL)
LD (HL),A
JR NZ,KEY_FLAG0
LD (HL),$00
KEY_FLAG0:
SET 3,(IY+$02)
CP A
RET
CYCOR0: LD DE,TOKENS
ADD A,RND_T-$7F
CYCIR0: LD B,A
CALL FC_TOKEN_R0
JR EXT_CYC
KEY_CUR:CALL EDITOR_MODE ; editor mode?
SCF
RET NZ ; all controls are passed on, if not
CP $0A
RET C ; pass on what is not an up or down key
CP $0C
CCF
RET C ; pass on what is not an up or down key
CP $0B ; up arrow
JR Z,K_HOME
K_ENDK: LD HL,(K_CUR)
LD A,$0D
CP (HL) ; cursor on CR?
JR Z,K_DOWN ; if so, pass on the down arrow
LD BC,0 ; set the cursor to the line endig CR
CPIR
DEC HL
EX DE,HL
JR K_UCUR
EXT_NT: LD A,(HL)
CP "$"
JR Z,EXT_N
CP "#"
JR Z,EXT_NS
CP "<"
JR Z,EXT_NR
CP ">"
JR Z,EXT_NR
CP "="
JR Z,EXT_NR
NOREL: RST $30
DEFW L2C8D ; ALPHA
JR C,EXT_N
CP A
RET
K_DOWN: LD A,$0A
SCF
RET
K_HOME: LD HL,(E_LINE)
BIT 5,(IY+$37) ; BASIC editing?
JR Z,KCUR_ED ; jump, if so
LD HL,(WORKSP)
KCUR_ED:EX DE,HL
LD HL,(K_CUR)
SCF
SBC HL,DE
RET C ; pass on the key, if at the beginning,
K_UCUR: LD (K_CUR),DE ; put it there, if not
SET 3,(IY+$02) ; update cursor position
XOR A ; return empty
RET
EXT_NS: LD B,1
DEC HL
LD A,(HL)
DEC HL
CP " "
JR Z,EXT_L
JR EXT_LS
K_INSTT:LD HL,(K_CUR)
DEC HL
LD B,A
LD A,(HL)
RST $30
DEFW L2C8D ; ALPHA
LD A,B
CCF
RET C
EXT_N: LD B,0
DEC HL
EXT_L: INC B
LD A,(HL)
DEC HL
EXT_LS: RST $30
DEFW L2C8D ; ALPHA
JR C,EXT_L
CP " "
JR NZ,EXT_SP
BIT 4,(IY+$37) ; instruction mode?
;; LD A," "
JR Z,EXT_L ; instruction tokens might have spaces
EXT_SP: INC HL
INC HL
JR EXT_OPR
EXT_NR: DEC HL
LD B,2
EXT_OPR:CALL TOK_F
EXT_CNT:JR C,K_INSF
OR A
JR Z,EXT_NF
EX AF,AF'
LD A,(LAST_K)
CP $0E
JR Z,K_INSF1
SCF
RET
EXT_NF: LD A,(LAST_K)
CP $0E
SCF
RET NZ
LD HL,RETADDR
INC (HL)
LD HL,(K_CUR)
DEC HL
LD A,(HL)
LD (LAST_K),A
LD (K_DATA),A
LD BC,$0001
RST $30
DEFW L19E8 ; RECLAIM-2
DEC HL
JR EXT_N
K_INSF: EX AF,AF'
K_INSF1:LD A,(HL)
RST $30
DEFW L2C8D ; ALPHA
JR NC,K_INSX
DEC HL
INC B
LD A,(HL)
CP " "
JR Z,K_INSX
INC HL
DEC B
K_INSX: LD A,(LAST_K)
CP $0E
JR Z,K_INST
CP " "
JR Z,K_INST
LD A,(K_STATE)
OR $80
LD (K_STATE),A
K_INST: LD C,B
LD B,0
RST $30
DEFW L19E8 ; RECLAIM-2
EX AF,AF'
SCF
RET
; print flashing cursor (invert character)
PCURSOR:PUSH AF
RST $30
DEFW POFETCH
PUSH BC
PUSH HL
LD HL,(ECHO_E)
PUSH HL
LD HL,(MASK_T)
PUSH HL
LD BC,(RETADDR)
LD (IY + MASK_T - ERR_NR),$FF ; INK, PAPER, BRIGHT, FLASH 8
CALL CLSET
LD (IY + P_FLAG - ERR_NR),$01 ; OVER 1
LD HL,FLAGS2
LD A,(HL)
SET 2,(HL)
PUSH AF
LD A,$8F ; full block
RST $30
DEFW L0010
POP AF
LD (HL),A
POP HL
LD (MASK_T),HL
POP HL
LD (ECHO_E),HL
POP HL
POP BC
LD (S_POSNL),BC
LD (DF_CCL),HL
POP AF
RET
; channel K ioctl
K_IOCTL:CP 2
RET NC
K_RST: RES 7,(IY+BORDCR-ERR_NR) ; flashing cursor OFF
EX AF,AF'
LD A,(HL)
AND $40 ; preserve font width
LD (HL),A
LD (K_SAV2),A
RES 5,(IY+TV_FLAG-ERR_NR) ; no further clearing
CALL K_TEMPS
SCF
CALL K_SWAP
LD HL,C_PCC
LD (HL),1
LD HL,DF_SZ
LD B,(HL) ; fetch lower screen line count
EX AF,AF'
DEC A
JR Z,K_CLS
LD (HL),$02 ; now set DF_SZ to 2
RES 0,(IY+$02) ; clean hidden upper part
CALL CLLINE
LD B,2
K_CLS: SET 0,(IY+$02) ; clean lower part
CALL NOLEAD ; suppress leading space
CALL CLLINE
LD BC,(K_WIDTH)
LD B,$17 ; line 23 for lower screen
LD (RETADDR),BC
S_IO_E: JP CLSET
AUTOLIST:
LD A,(BANK_M)
AND $07
RET NZ ; no auto-list in X channel
RES 5,(IY+FLAGX-ERR_NR) ; track mode state
RES 7,(IY+BORDCR-ERR_NR) ; Flashing cursor OFF
RST $30
DEFW L1795 ; AUTO-LIST
RET
; check editor mode
; Output: Z is 1 in editor mode, 0 otherwise, CF set
; Corrupts: HL, DE, F
EDITOR_MODE:
LD HL,(ERR_SP)
LD E,(HL)
INC HL
LD D,(HL)
EX DE,HL
LD DE,L107F ; ED-ERROR
AND A
SBC HL,DE
SCF
RET
K_SWAP: LD HL,ATTR_T
LD DE,K_ATTR
JR C,K_SAVE
EX DE,HL
K_SAVE: LDI
LDI
LDI
RET
; copy edit area
ED_COPY:PUSH HL ; save K_STATE address
RES 3,(HL) ; start in K mode
RES 7,(IY+BORDCR-ERR_NR) ; flashing cursor OFF
LD HL,C_PCC
LD (HL),1
LD (IY+T_ADDR-ERR_NR),H ; not LLIST
RST $30
DEFW L111D ; just use ROM1
; DF_CCL correction
LD HL,(ECHO_E)
PUSH HL
LD HL,(DF_CCL)
SBC HL, DE ; reverse ADD HL,DE
CALL CLSET_K
POP HL
LD (ECHO_E),HL
SET 7,(IY+BORDCR-ERR_NR) ; flashing cursor ON
POP HL
RET
; count colons:
PR_COLON:
BIT 2,(IY+FLAGS2-ERR_NR)
RET NZ
PUSH HL
LD HL,C_PCC
INC (HL)
POP HL
RET
; This area must be a data table not to trigger the SAVE trap
TCTRL: DEFB TNOP - $ ; $00 does nothing
DEFB TQUEST - $ ; $01 prints question mark
DEFB TQUEST - $ ; $02 prints question mark
DEFB TQUEST - $ ; $03 prints question mark
DEFB TQUEST - $ ; $04 prints question mark
DEFB TRST - $ ; $05 restore permanent attrs
DEFB TCOMMA - $ ; $06 tabulates with blanks
DEFB T1CTR - $ ; $07 STEP
DEFB TBS - $ ; $08 back
DEFB TFW - $ ; $09 forward
DEFB TLF - $ ; $0A down
DEFB TUP - $ ; $0B up
DEFB TFF - $ ; $0C clear screen
DEFB TCR - $ ; $0D ENTER
DEFB TBLINK - $ ; $0E cursor character
DEFB T1CTR - $ ; $0F prints inverted character
DEFB T1CTR - $ ; $10 INK
DEFB T1CTR - $ ; $11 PAPER
DEFB T1CTR - $ ; $12 FLASH
DEFB T1CTR - $ ; $13 BRIGHT
DEFB T1CTR - $ ; $14 INVERSE
DEFB T1CTR - $ ; $15 OVER
DEFB T2CTR - $ ; $16 AT
DEFB T2CTR - $ ; $17 TAB
TFF: XOR A
BIT 0,(IY+$02)
JP NZ,K_RST
JP S_RST
TQUEST: LD A,"?"
JP PR_PR
TCOMMA: INC DE
EX AF,AF' ; ???
LD A,(DE)
SUB C
OR $0F
INC A
POFILL: RST $30
DEFW POFETCH
ADD A,C
DEC A
LD C,A
LD A,(DE)
SUB A,2
AND C
RET Z
LD D,A
SET 0,(IY+01)
POSPACE:LD A," "
RST $30
DEFW L0C3B ; PO-SAVE
DEC D
JR NZ,POSPACE
TNOP: RET
TBLINK: BIT 0,(IY+TV_FLAG-ERR_NR)
JR Z,T1CTR
RET Z
EX DE,HL
SET 2,(HL) ; set blinking or inverse
RET
T1CTR: EX DE,HL
TCTR: SET 0,(HL)
INC HL ; width
INC HL ; tv1
LD (HL),A
RET
T2CTR: EX DE,HL
SET 1,(HL)
JR TCTR
TRST: RST $30
DEFW L0D4D ; TEMPS
RET
TBS: INC DE
LD A,(DE)
INC A
INC A
INC C
INC SP ; TODO: continue with PO-BACK-1
INC SP
PUSH HL
LD HL,L0A23 + 3 ; PO-BACK-1 + 3
EX (SP),HL
RST $10
TFW: INC DE
LD A,C
DEC A
LD A,(DE)
JR NZ,TFW1
DEC B
INC A
LD C,A
TFW1: CP C
CALL Z,POSCR
DEC C
INC HL
JR TSTORE3
TLF: LD A,C
PUSH AF
CALL TCR0
POP AF
LD C,A
JR TCR1
TCR0: INC DE
LD A,(DE)
LD C,A
CALL POSCR
DEC B
JP NOLEAD
; This area must be a data table not to trigger the LOAD trap
; L-MODE translation table
L_MODE: DEFB $E2,"~"
DEFB $C3,"|"
DEFB $CD,"\\"
DEFB $CC,"{"
DEFB $CB,"}"
DEFB $C6,"["
DEFB $C5,"]"
DEFB $AC,$7F ; copyright
DEFB 0
TKETAB: DEFM "@$#<>="
TKETABE:EQU $
TUP: INC B
LD A,$18 ; TODO: 24 lines
CP B
JR NC,TCR1
DEC B
JR TCR1
TCR: PUSH DE
CALL TCR0
POP HL
RES 2,(IY+FLAGS-ERR_NR) ; track instruction mode
RES 3,(HL) ; reset to instruction mode
TCR1:
CLSET: LD A,B
BIT 0,(IY+$02)
JR Z,CLSET1
ADD A,(IY+$31)
SUB $18
CLSET1: PUSH BC
LD B,A
RST $30
DEFW L0E9B ; CL-ADDR
POP BC
CLSET2: LD A,(S_STATE)
ADD A,A
ADD A,A
LD A,(S_WIDTH)
BIT 0,(IY+$02) ; upper screen?
JR Z,CLSET3
CLSET_K:LD A,(K_STATE)
ADD A,A
ADD A,A
LD A,(K_WIDTH)
CLSET3: JR NC,CLSET5
SUB C
SRL A
DEFB $1E ; LD E,skip next byte
CLSET5: SUB C
LD E,A
LD D,0
LD A,(S_MODE)
CP $10
JR C,CLSET4
SRL E
JR NC,CLSET4
SET 5,H
CLSET4: ADD HL,DE
TSTORE3:JP TSTORE
; channel S output service routine
S_OUT:
S_OUT1: LD HL,S_STATE
JR C,KS_OUT
; channel S ioctl
EX DE,HL
LD HL,S_IOCTL
ADD A,A
CP S_IOCTL_END-S_IOCTL
RET NC
LD C,A
LD B,0
ADD HL,BC
LD A,(HL)
INC HL
LD H,(HL)
LD L,A
JP (HL)
S_RST: EX DE,HL
LD A,(HL)
AND $40 ; preserve font width
LD (HL),A
LD HL,COORDX-SWAP+INIT_5B00
LD DE,COORDX
LD BC,2*5
LDIR ; clear last PLOT coordinates
RES 0,(IY+$30) ; update FLAGS2 - signal main screen is clear.
RST $30
DEFW L0D4D ; TEMPS
LD B,$18 ; 24 lines
CALL CLLINE
LD (IY+$52),$01 ; set SCR_CT - scroll count - to default.
LD BC,(S_WIDTH)
LD B,$18 ; line 24 for upper screen
JP CLSET
KS_CTRL:PUSH HL ; save display address
LD HL,TCTRL
PUSH BC ; save coordinates
LD C,A
LD B,0
ADD HL,BC
LD C,(HL)
ADD HL,BC
POP BC ; restore coordinates
EX (SP),HL ; restore display address, stack destination
RET
P_GR_TK:BIT 4,(IY+FLAGS2-ERR_NR) ; K channel?
JR NZ,P_GRTK ; if so, check quotes
BIT 6,(IY+TV_FLAG-ERR_NR) ; non-automatic listing?
JR NZ,P_GRTK ; if so, ckeck quotes
BIT 4,(IY+TV_FLAG-ERR_NR) ; automatic listing
JR Z,PR_GR_O ; always graphics, if neither of above
P_GRTK: BIT 2,(IY+FLAGS2-ERR_NR) ; in quotes
JP Z, TOKEN_O ; if not, output token
PR_GR_O:SUB $90
JR NC,PR_UDG
PR_GR: LD B,A
LD HL,MEMBOT
RST $30
DEFW LPOGR1 ; PO-GR-1 mosaic
JR PR_GR_E
; channel K output service routine
K_OUT: CALL STACKSWAP
BIT 0,(IY+TV_FLAG-ERR_NR)
JR Z,S_OUT
LD HL,K_STATE
JP NC,K_IOCTL
; channel K/S direct output for coroutines
KS_OUT: BIT 0,(HL) ; direct output
JP NZ,KS_IND
KS_DCT: BIT 2,(HL)
PUSH AF
INC L
LD A,(HL)
DEC L
LD (MEMBOT+8),A ; WIDTH
EX DE,HL ; save HL into DE
LD HL,S_MODE
BIT 4,(HL)
JR Z,KS_COL
LD (IY+MASK_T-ERR_NR),$FF ; do not touch attributes in mono mode
KS_COL: RST $30
DEFW POFETCH
POP AF
JP NZ,E_HEAD
COR_TK: CP $18
JR C,KS_CTRL
PR_PR: EX AF,AF'
LD A,(DE)
AND $40
EX AF,AF' ; ZF' for 8 pixel font, NZF' for 4 pixel font
CP $80
JR NC,P_GR_TK
CP ":"
CALL Z,PR_COLON
CP " "
JR NC,PR_GR_0
EX AF,AF'
JR NZ,PR_GR_4
EX AF,AF'
LD C,A
AND $06
LD E,A
LD D,0
LD HL,GR_TAB
ADD HL,DE
LD E,(HL)
INC HL
LD D,(HL)
LD HL,MEMBOT
LD B,8
RR C
JR C,PR_GR_R
PR_GR_L:LD (HL),E
INC L
RL D
RL E
DJNZ PR_GR_L
JR PR_GR_E
PR_UDG: PUSH BC
LD BC,(UDG)
EX DE,HL
EX AF,AF'
SCF
JR PR_FULL
PR_GR_R:RR E
RR D
LD (HL),D
INC L
DJNZ PR_GR_R
PR_GR_E:RST $30
DEFW POFETCH
LD DE,MEMBOT
JR PR_ALL
PR_GR_4:EX AF,AF'
PR_GR_0:PUSH BC
LD BC,(CHARS)
EX AF,AF'
JR Z,PR_8
LD BC,(CHARS4)
PR_8: EX AF,AF'
PR_CH2: EX DE,HL ; screen address to DE, S/K_STATE to HL
BIT 2,(IY+FLAGS-ERR_NR)
SET 3,(HL)
JR NZ,PR_K ; printing arguments
RES 3,(HL) ; printing printing in K mode
PR_K: LD HL,FLAGS
RES 0,(HL)
CP " "
JR NZ,PR_CH3
SET 0,(HL)
PR_CH3: EX AF,AF'
JR Z,PR_FULL
EX AF,AF'
SRL A
RR H
EX AF,AF'
RL H
PR_FULL:EX AF,AF'
ADD A,A
LD H,$00
LD L,A
ADD HL,HL
ADD HL,HL
ADD HL,BC
POP BC
EX DE,HL
PR_ALL: LD A,C
DEC A
LD A,(MEMBOT+8)
JR NZ,PRALL1
DEC B
LD C,A
PRALL1: CP C
PUSH DE
CALL Z,POSCR
POP DE
EX AF,AF'
JP NZ,PR_COND ; jump, if 4 pixel font
RST $30
DEFW X0B99
TSTOREA:EX AF,AF'
LD A,(S_MODE)
AND $F8
SUB $08
JR NZ,TSTOREX
EX AF,AF'
DEC HL
SET 5,H
LD (HL),A
INC H
LD (HL),A
INC H
LD (HL),A
INC H
LD (HL),A
INC H
LD (HL),A
INC H
LD (HL),A
INC H
LD (HL),A
INC H
LD (HL),A
LD A,H
SUB $27
LD H,A
INC HL
TSTORE: RST $30
DEFW POSTORE
RET
TSTOREX:SUB $08
JR NZ,TSTORE
LD A,H
XOR $20
LD H,A
AND $20
JR Z,TSTORE
DEC HL
JR TSTORE
PRTAB: LD DE,MEMBOT+8
LD A,H
JP POFILL
; channel K/S indirect output
KS_IND: BIT 1,(HL)
JR NZ,KS_IND2
RES 0,(HL)
INC HL ; width
EX AF,AF'
LD A,(HL)
EX AF,AF'
INC HL ; tv1
LD D,A
LD A,(HL)
INC HL ; tv2
LD H,(HL)
CP $16
JR C,COTEMP5
JR NZ,PRTAB
LD B,H
LD C,D
EX AF,AF'
SUB $02
SUB C
JR C,PATERR
ADD $02
LD C,A
LD A,$16
SUB B
PATERR: JP C,ERROR_B
INC A
LD B,A
INC B
BIT 0,(IY+$02)
JP NZ,POSCR
CP (IY+$31)
JP NC,CLSET
JP ERROR_5
COTEMP5:CP $07
JR Z,PRSTEP
INC SP ; TODO; proper handling in this ROM
INC SP ; discard SWAP
PUSH HL
LD HL,L2211 ; CO-TEMP-5
PRTABC: EX (SP),HL
RST $10
KS_IND2:RES 1,(HL)
INC HL ; width
INC HL ; tv1
INC HL ; tv2
LD (HL),A
RET
PRSTEP: LD A,D
JP TEMPS4
E_QUEST:LD HL,(X_PTR)
LD (K_CUR),HL
RET
; draw editor header
E_HEAD: EX DE,HL
RES 2,(HL)
CP "?"
JR Z,E_QUEST
PUSH HL ; channel flag address
LD H,(HL)
PUSH HL ; channel flag content
LD HL,FLAGS2
BIT 2,(HL)
JR NZ,Q_HEAD ; jump if inside quotes
CP "G"
JR NZ,GE_HEAD
LD A,"X"
JR GE_HEAD
Q_HEAD: CP "E"
JR NZ,GE_HEAD
LD A,"U"
GE_HEAD:BIT 5,(HL)
JR Z,K_HEAD
CP "K"
JR NZ,K_HEAD
INC A ; LD A,"L" see $1900 in ROM1
BIT 3,(HL)
JR Z,K_HEAD
LD A,"C"
K_HEAD: LD (RETADDR),BC
PUSH BC
PUSH DE
EXX
PUSH BC
PUSH DE
PUSH HL
SCF
CALL K_SWAP
LD HL,(K_CUR)
LD (K_CUR_S),HL
LD HL,(FLAGS - 1)
LD L,(IY+$30)
SET 2,(IY+$30) ; set quote mode
LD (K_SAV),HL ; save FLAGS and FLAGS2
PUSH HL
PUSH AF ; save cursor character
LD DE,EDITOR_HEADER0
CALL MESSAGE
BIT 5,(IY+$37)
JR Z,E_HEADB
BIT 7,(IY+$37)
JR NZ,E_HEADT ; INPUT LINE (or EDIT string)
LD DE,EDITOR_HEADERS
BIT 6,(IY+$37)
JR Z,E_HEADI
LD DE,EDITOR_HEADERN
E_HEADI:CALL MESSAGE
JR E_HEAD0
E_HEADB:CALL MESSAGE
LD A,(C_PCC)
CALL DECBYTE
E_HEAD0:LD A,$06 ; tabulation
RST $30
DEFW L0010
POP AF ; restore cursor character
RST $30
DEFW L0010 ; and print it
BIT 5,(IY+FLAGS2-ERR_NR) ; check K mode suppression
LD A,"!"
CALL Z,PRINT_A ; and indicate it
LD DE,EDITOR_HEADER1
CALL MESSAGE
POP AF ; restore FLAGS to A and FLAGS2 to F
JP PE,E_HEAD1
RES 2,(IY+$30) ; restore quote mode
E_HEAD1:LD (FLAGS),A
AND A
CALL K_SWAP
POP HL
POP DE
POP BC
EXX
POP HL
POP BC
POP AF ; restore channel flag content into A
POP DE ; restore channel flag address into DE
LD (DE),A
LD (K_SAV2),A ; save channel flag content
JP TSTORE
E_HEADT:LD DE,EDITOR_HEADERT
CALL MESSAGE
LD HL,(K_CUR)
LD DE,(WORKSP)
AND A
SBC HL,DE
CALL DECWORD
LD A,"/"
RST $30
DEFW L0010
LD HL,(STKBOT)
LD DE,(WORKSP)
SCF
SBC HL,DE
CALL DECWORD
JR E_HEAD0
; Print condensed (4 pixel wide) character
; BC coordinates, HL target, DE matrix, CF side
PR_COND:EX AF,AF' ; save CF
PUSH BC
PUSH HL
LD B,8
RR C
LD C,0
LD A,(P_FLAG)
BIT 2,A
JR Z,NOINV
DEC C
NOINV: BIT 0,A
JR NZ,POVER
JR NC,PRCL2B
EX AF,AF'
JR C,PRCL1
PRCL1A: LD A,(DE)
XOR C
AND $F0
XOR (HL)
AND $F0
XOR (HL)
LD (HL),A
INC H
INC DE
DJNZ PRCL1A
JR PRCDR
PRCL1: RLD
LD A,(DE)
XOR C
RRD
INC H
INC DE
DJNZ PRCL1
PRCDR: DEC H
RST $30
DEFW L0BDB ; PO-ATTR
POP HL
JR PORET
PRCL2B: EX AF,AF'
JR C,PRCL2
PRCL2A: RRD
EX DE,HL
RLD
EX DE,HL
XOR C
RLD
INC H
INC DE
DJNZ PRCL2A
JR PORET1
PRCL2: RRD
LD A,(DE)
XOR C
RLD
INC H
INC DE
DJNZ PRCL2
PORET1: DEC H
RST $30
DEFW L0BDB ; PO-ATTR
POP HL
INC HL
PORET: POP BC
DEC C
BIT 0,C
JP NZ,TSTOREA
JP TSTORE
POVER: JR NC,PROL2B
EX AF,AF'
JR C,PROL1
PROL1A: LD A,(DE)
XOR C
AND $F0
XOR (HL)
LD (HL),A
INC H
INC DE
DJNZ PROL1A
JR PRCDR
PROL1: RLD
EX DE,HL
XOR (HL)
EX DE,HL
XOR C
RRD
INC H
INC DE
DJNZ PROL1
JR PRCDR
PROL2B: EX AF,AF'
JR C,PROL2
PROL2A: LD A,(DE)
XOR C
RRCA
RRCA
RRCA
RRCA
AND $0F
XOR (HL)
LD (HL),A
INC H
INC DE
DJNZ PROL2A
JR PORET1
PROL2: RRD
EX DE,HL
XOR (HL)
EX DE,HL
XOR C
RLD
INC H
INC DE
DJNZ PROL2
JR PORET1
TEMPS_CONT:
CALL STACKSWAP
TEMPS3: LD A,(TV_FLAG)
RRCA
LD A,(KS_PERM)
JR C,TEMPS_K
RRCA
TEMPS_K:RRCA
LD A,4
JR C,TEMPS4
ADD A,A
TEMPS4: LD HL,S_STATE
LD DE,S_POSN
BIT 0,(IY+TV_FLAG-ERR_NR) ; lower screen
JR Z,STEP1 ; jump for S channel
LD C,A
IN A,($FF)
LD HL,BORDCR
XOR (HL)
OR $38
XOR (HL)
OUT ($FF),A ; Set BORDER for TIMEX HiRes
LD A,C
LD HL,K_STATE
INC DE
INC DE
STEP1: CP 4
JR Z,STEP4
CP 8
JP NZ,ERROR_K
BIT 6,(HL)
RET Z
LD A,(DE)
RRA
JR C,STEP2
EX DE,HL
PUSH HL
DEC HL
DEC HL
DEC HL
DEC HL
INC (HL)
POP HL
EX DE,HL
STEP2: ADC A,0
LD (DE),A
RES 6,(HL)
INC L
SRL (HL)
INC (HL)
RET
STEP4: BIT 6,(HL)
RET NZ
LD A,(DE)
ADD A,A
DEC A
LD (DE),A
SET 6,(HL)
INC L
SLA (HL)
DEC (HL)
RET
; Short routines without relative addresses to fill gaps
K_TEMPS:RST $30
DEFW L0D4D ; TEMPS
RES 7,(IY+ATTR_T-ERR_NR) ; flash off
RET
INCLUDE "timexscr.asm"
| 15.267123 | 65 | 0.648921 |
e93371abfc16c4c731120cb050263e885c561cb2 | 1,423 | asm | Assembly | programs/oeis/316/A316672.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/316/A316672.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/316/A316672.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A316672: Numbers k for which 120*k + 169 is a square.
; -1,0,1,3,10,14,17,22,36,43,48,56,77,87,94,105,133,146,155,169,204,220,231,248,290,309,322,342,391,413,428,451,507,532,549,575,638,666,685,714,784,815,836,868,945,979,1002,1037,1121,1158,1183,1221,1312,1352,1379,1420,1518,1561,1590,1634,1739,1785,1816,1863,1975,2024,2057,2107,2226,2278,2313,2366,2492,2547,2584,2640,2773,2831,2870,2929,3069,3130,3171,3233,3380,3444,3487,3552,3706,3773,3818,3886,4047,4117,4164,4235,4403,4476,4525,4599,4774,4850,4901,4978,5160,5239,5292,5372,5561,5643,5698,5781,5977,6062,6119,6205,6408,6496,6555,6644,6854,6945,7006,7098,7315,7409,7472,7567,7791,7888,7953,8051,8282,8382,8449,8550,8788,8891,8960,9064,9309,9415,9486,9593,9845,9954,10027,10137,10396,10508,10583,10696,10962,11077,11154,11270,11543,11661,11740,11859,12139,12260,12341,12463,12750,12874,12957,13082,13376,13503,13588,13716,14017,14147,14234,14365,14673,14806,14895,15029,15344,15480,15571,15708,16030,16169,16262,16402,16731,16873,16968,17111,17447,17592,17689,17835,18178,18326,18425,18574,18924,19075,19176,19328,19685,19839,19942,20097,20461,20618,20723,20881,21252,21412,21519,21680,22058,22221,22330,22494,22879,23045,23156,23323,23715,23884,23997,24167,24566,24738,24853,25026,25432,25607,25724,25900,26313,26491,26610,26789,27209,27390,27511,27693,28120,28304,28427,28612,29046,29233
cal $0,214429 ; Integers of the form (n^2 - 49) / 120.
sub $0,1
mov $1,$0
| 203.285714 | 1,291 | 0.788475 |
d95e137af016d9316b07fd5dca001cb03bfd351e | 2,568 | asm | Assembly | programs/oeis/017/A017493.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/017/A017493.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/017/A017493.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A017493: a(n) = (11*n + 8)^9.
; 134217728,322687697779,19683000000000,327381934393961,2779905883635712,15633814156853823,66540410775079424,231616946283203125,692533995824480256,1838459212420154507,4435453859151328768,9892530380752880769,20661046784000000000,40812436757196811351,76848453272063549952,138808137876363860813,241746618002717016064,407672580388201171875,668043870120573226496,1066934121900208390297,1664997642832198238208,2544374934440439784559,3814697265625000000000,5620365587965550179941,8149296820107232673792,11643349118950948694203,16410657202007740245504,22840129087566681640625,31418376777267496615936,42749375419262975703687,57577168359402185282048,76811959212763434593149,101559956668416000000000,133157363176491696843731,173208924958501538463232,223631487929338929249993,286703032122569104031744,365117686069414849609375,462047252296310925912576,581209805676014043990677,726945957793021755916288,904303412765472167650539,1119130473102767000000000,1378179188170883194986721,1689218872685712995254272,2061160758358799212544183,2504194578379511247798784,3029937921833038330078125,3651599233424559404220416,4384155373006584118027267,5244544689388746438716928,6251876603747271565460729,7427658739644928000000000,8796042679221519890632911,10384089468519870076262912,12222056039172791626712773,14343703758792745103130624,16786630368377730248046875,19592626611874464358483456,22808058910723055197469457,26484279484746183959379968,30678065370140273522687719,35452087835576229000000000,40875413748523101429646301,47024040495869441345585152,53981466115734176913011763,61839296351031571325771264,70697890389883186228515625,80667047113353802051485696,91866733727227922328853247,104427858711638817312721408,118493091080313042494155509,134217728000000000000000000,151770612880318395249730891,171335106104769377730196992,193110110635039743277817153,217311154782947815847624704,244171534507469519396484375,273943517658222695213851136,306899612651583916797594637,343333904131263903194677248,383563458231675132606848099,427929800129788411000000000,476800466639393955452430681,530570636670757009031954432,589664842448588113104624943,654538764452033924148754944,725681113112035875376953125,803615600373901048756043776,888903004306282340359989627,982143330011973371394303488,1083978070170987618691909489,1195092568622310912000000000,1316218490467491770955129671,1448136402256865032279593472,1591678465897690847426051133,1747731250002833412649385984,1917238662478801727294921875,2101205008233028261960367616,2300698175962170656115214217
mul $0,11
add $0,8
pow $0,9
| 366.857143 | 2,506 | 0.948209 |
d35d669c2b2c94a32209fbe8c386040beeb512fb | 148 | asm | Assembly | libsrc/_DEVELOPMENT/arch/ts2068/display/c/sccz80/tshc_aaddrcup.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 38 | 2021-06-18T12:56:15.000Z | 2022-03-12T20:38:40.000Z | libsrc/_DEVELOPMENT/arch/ts2068/display/c/sccz80/tshc_aaddrcup.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 2 | 2021-06-20T16:28:12.000Z | 2021-11-17T21:33:56.000Z | libsrc/_DEVELOPMENT/arch/ts2068/display/c/sccz80/tshc_aaddrcup.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 6 | 2021-06-18T18:18:36.000Z | 2021-12-22T08:01:32.000Z | ; void *tshc_aaddrcup(void *saddr)
SECTION code_clib
SECTION code_arch
PUBLIC tshc_aaddrcup
EXTERN zx_saddrcup
defc tshc_aaddrcup = zx_saddrcup
| 13.454545 | 34 | 0.824324 |
62fdadf984522250efae094ea7ccd72a42561bf8 | 1,905 | asm | Assembly | imprimir.asm | jeremylive/Shared_Code | bbb4e105aeb2412b7b3b8ff8b5ee2e791254fb77 | [
"Unlicense"
] | null | null | null | imprimir.asm | jeremylive/Shared_Code | bbb4e105aeb2412b7b3b8ff8b5ee2e791254fb77 | [
"Unlicense"
] | null | null | null | imprimir.asm | jeremylive/Shared_Code | bbb4e105aeb2412b7b3b8ff8b5ee2e791254fb77 | [
"Unlicense"
] | null | null | null | ;falta agregar signos
;imprime en binario ----------------------------------------------------
%macro PutBin 1
push eax
push ebx
push ecx
push edx
mov eax,%1
xor ecx, ecx
dec ecx
%%zero_loop:
inc ecx
rol eax,1
mov ebx, eax
and ebx, 00000001h
cmp ecx, 31 ;condicion de parada
jae %%end
cmp ebx,0
je %%zero_loop
PutCh '1'
%%print_loop:
inc ecx
rol eax,1
mov ebx, eax
and ebx, 00000001h
add bl, '0'
PutCh bl
cmp ecx, 31
jb %%print_loop
%%end:
PutCh 'b'
pop edx
pop ecx
pop ebx
pop eax
%endmacro
;imprime en octal-------------------------------------------------------
%macro PutOct 1
push eax
push ebx
push ecx
push edx
mov eax,%1
xor ecx, ecx
dec ecx
rol eax, 2
mov ebx, eax
and ebx,3
cmp ebx, 0
je %%zero_loop
add bl, '0'
PutCh bl
jmp %%print_loop
%%zero_loop:
inc ecx
rol eax,3
mov ebx, eax
and ebx, 00000007h
cmp ecx, 9 ;condicion de parada
jae %%end
cmp ebx,0
je %%zero_loop
add bl,'0'
PutCh bl
%%print_loop:
inc ecx
rol eax,3
mov ebx, eax
and ebx, 00000007h
add bl, '0'
PutCh bl
cmp ecx, 9
jb %%print_loop
%%end:
PutCh 'o'
pop edx
pop ecx
pop ebx
pop eax
%endmacro
;imprime en hexadecimal-------------------------------------------------
%macro PutHex 1
push eax
push ebx
push ecx
push edx
mov eax,%1
xor ecx, ecx
dec ecx
%%zero_loop:
inc ecx
rol eax,4
mov ebx, eax
and ebx, 0000000Fh
cmp ecx, 8 ;condicion de parada
jae %%end
cmp ebx,0
je %%zero_loop
printN ebx
cmp ecx, 7
jae %%end
%%print_loop:
inc ecx
rol eax,4
mov ebx, eax
and ebx, 0000000Fh
printN ebx
cmp ecx, 7
jb %%print_loop
%%end:
PutCh 'h'
pop edx
pop ecx
pop ebx
pop eax
%endmacro
%macro printN 1
push eax
push ebx
push ecx
push edx
mov ebx, %1
cmp bl, 9
jg %%leter
add bl, '0'
PutCh bl
jmp %%end
%%leter:
sub bl, 10
add bl, 'A'
PutCh bl
%%end:
pop edx
pop ecx
pop ebx
pop eax
%endmacro
| 12.056962 | 72 | 0.59895 |
3b6136578316e8177ae870ef91c432145361d8d5 | 3,732 | asm | Assembly | 2.allToDecimal.asm | mtxr/baseConverter | ed24123b4a0d252244930fb70f61b783ac98e488 | [
"MIT"
] | null | null | null | 2.allToDecimal.asm | mtxr/baseConverter | ed24123b4a0d252244930fb70f61b783ac98e488 | [
"MIT"
] | null | null | null | 2.allToDecimal.asm | mtxr/baseConverter | ed24123b4a0d252244930fb70f61b783ac98e488 | [
"MIT"
] | null | null | null | # CONVERT ANY INPUT TO DECIMAL INTEGER
######### STRING TO DECIMAL FUNCIONS ###############
### BINARY -> DECIMAL
fromBinaryStringToDecimal:
# start counter
la $t2, inputNumberArray # load inputNumber address to t2
li $t8, 1 # start our counter
li $a0, 0 # output number
j binaryToDecimalLoop
binaryToDecimalLoop:
lb $t7, 0($t2)
addi $t7, $t7, -48 # convert from string to int
blt $t7, $zero, convertFinish # print int if t7 < 0
li $t4, 0
blt $t7, $t4, printError
li $t4, 1
bgt $t7, $t4, printError
mul $t7, $t7, $t8 # mult t7 * t8
add $a0, $a0, $t7 # add t7 to a0
li $t6, 2 # load 2 to t6
mul $t8, $t8, $t6 # t8 = t8 * t6
addi $t2, $t2, 1 # increment array position
j binaryToDecimalLoop
### DECIMAL STRING -> DECIMAL
fromDecimalStringToDecimal:
# start counter
la $t2, inputNumberArray # load inputNumber address to t2
li $t8, 1 # start our counter
li $a0, 0 # output number
j decStringToDecimalLoop
decStringToDecimalLoop:
lb $t7, 0($t2)
addi $t7, $t7, -48 # convert from string to int
blt $t7, $zero, convertFinish # print int if t7 < 0
li $t4, 0
blt $t7, $t4, printError
li $t4, 9
bgt $t7, $t4, printError
mul $t7, $t7, $t8 # mult t7 * t8
li $t6, 10 # load 10 to t6
mul $a0, $a0, $t6 # t8 = t8 * t6
add $a0, $a0, $t7 # add t7 to a0
addi $t2, $t2, 1 # increment array position
j decStringToDecimalLoop
### OCTAL -> DECIMAL
fromOctalStringToDecimal:
# start counter
la $t2, inputNumberArray # load inputNumber address to t2
li $t8, 1 # start our counter
li $a0, 0 # output number
j octalStringToDecimalLoop
octalStringToDecimalLoop:
lb $t7, 0($t2)
addi $t7, $t7, -48 # convert from string to int
blt $t7, $zero, convertFinish # print int if t7 < 0
li $t4, 0
blt $t7, $t4, printError
li $t4, 7
bgt $t7, $t4, printError
li $t6, 8 # load 8 to t6
mul $a0, $a0, $t6 # t8 = t8 * t6
add $a0, $a0, $t7 # add t7 to a0
addi $t2, $t2, 1 # increment array position
j octalStringToDecimalLoop
### HEXA -> DECIMAL
fromHexaStringToDecimal:
# start counter
la $t2, inputNumberArray # load inputNumber address to t2
li $t8, 1 # start our counter
li $a0, 0 # output number
j hexaStringToDecimalLoop
hexaStringToDecimalLoop:
lb $t7, 0($t2)
ble $t7, '9', inputSub48 # if t7 less than or equal to char '9' inputSub48
addi $t7, $t7, -55 # convert from string (ABCDEF) to int
blt $t7, $zero, convertFinish # print int if t7 < 0
li $t4, 10
blt $t7, $t4, printError
li $t4, 15
bgt $t7, $t4, printError
j inputHexaNormalized
inputHexaNormalized:
li $t6, 16 # load 16 to t6
mul $a0, $a0, $t6 # t8 = t8 * t6
add $a0, $a0, $t7 # add t7 to a0
addi $t2, $t2, 1 # increment array position
j hexaStringToDecimalLoop
inputSub48:
addi $t7, $t7, -48 # convert from string (ABCDEF) to int
blt $t7, $zero, convertFinish # print int if t7 < 0
li $t4, 0
blt $t7, $t4, printError
j inputHexaNormalized
| 35.542857 | 85 | 0.510718 |
b33a64d1af2b933068bdf9611cd617cb2271664d | 380 | asm | Assembly | ch7_2.asm | ChanJLee/easy-asm | 2dc9ba7f753373cb448f6887081698ce8df6a34f | [
"Apache-2.0"
] | null | null | null | ch7_2.asm | ChanJLee/easy-asm | 2dc9ba7f753373cb448f6887081698ce8df6a34f | [
"Apache-2.0"
] | null | null | null | ch7_2.asm | ChanJLee/easy-asm | 2dc9ba7f753373cb448f6887081698ce8df6a34f | [
"Apache-2.0"
] | null | null | null | assume cs:code, ds:data
data segment
db 'hello'
db 'write'
data ends
code segment
start:
mov ax, data
mov ds, ax
mov bx, 0h
mov si, 0ah
mov cx, 0ah
s:
mov ax, [bx]
mov [si], ax
inc bx
inc si
loop s
mov ax, 4200h
int 21h
code ends
end start | 14.074074 | 24 | 0.442105 |
bdfc1087d2add9ae58fbddeea2f824403f2e1257 | 490 | asm | Assembly | programs/oeis/051/A051066.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/051/A051066.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/051/A051066.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A051066: Partial sums of A051065.
; 0,1,1,1,2,2,2,3,3,4,4,5,6,6,7,8,8,9,9,10,10,10,11,11,11,12,12,12,13,13,13,14,14,14,15,15,16,16,17,18,18,19,20,20,21,21,22,22,22,23,23,23,24,24,24,25,25,25,26,26,26,27,27,28,28,29,30,30,31,32,32,33,33,34,34
mov $3,$0
mov $5,$0
lpb $5,1
mov $0,$3
sub $5,1
sub $0,$5
mov $2,19
mov $4,$0
lpb $0,1
add $2,$4
div $4,3
mov $0,$4
lpe
mov $0,531441
gcd $2,2
mul $0,$2
mov $4,$0
sub $4,531441
div $4,531441
add $1,$4
lpe
| 19.6 | 207 | 0.561224 |
ee782ac52e1d7e225f0d0f11bba85da91d88d335 | 596 | asm | Assembly | libsrc/_DEVELOPMENT/math/float/math48/z80/am48_double8u.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/math/float/math48/z80/am48_double8u.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/math/float/math48/z80/am48_double8u.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
SECTION code_clib
SECTION code_fp_math48
PUBLIC am48_double8u, am48_double8u_0
EXTERN am48_derror_znc
am48_double8u:
; 8-bit unsigned integer to double
;
; enter : L = 8-bit unsigned integer n
;
; exit : AC = AC' (exx set saved)
; AC'= (double)(n)
;
; uses : af, bc, de, hl, bc', de', hl'
ld a,l
or a
jp z, am48_derror_znc + 1
am48_double8u_0:
ld hl,$80 + 8
jp m, normalized
normalize_loop:
dec l
add a,a
jp p, normalize_loop
normalized:
ld b,a
ld c,h
ld d,h
ld e,h
res 7,b
exx
ret
| 12.416667 | 42 | 0.573826 |
b76381f6c1ca0c54c9c953f2908731828a2750bb | 852 | asm | Assembly | 0x02.asm | 0xdea/xorpd-solutions | f6b13d8f4c3a66c75599404707e0c30a180d9df0 | [
"MIT"
] | 53 | 2017-09-06T02:37:25.000Z | 2022-03-10T05:17:06.000Z | 0x02.asm | uf0o/xorpd-solutions | 3a84172f615533ffbd40124594db6d36baa6260a | [
"MIT"
] | 2 | 2019-04-03T12:51:42.000Z | 2020-12-10T13:58:14.000Z | 0x02.asm | uf0o/xorpd-solutions | 3a84172f615533ffbd40124594db6d36baa6260a | [
"MIT"
] | 21 | 2017-09-06T02:37:33.000Z | 2022-03-10T05:17:09.000Z | ;
; $Id: 0x02.asm,v 1.1.1.1 2016/03/27 08:40:12 raptor Exp $
;
; 0x02 explanation - from xchg rax,rax by xorpd@xorpd.net
; Copyright (c) 2016 Marco Ivaldi <raptor@0xdeadbeef.info>
;
; This snippet sets rax to 1 for all its initial values but
; 0, in which case it sets it to 0. To analyze it, I've used
; the handy assembly REPL rappel by yrp604@yahoo.com:
;
; https://github.com/yrp604/rappel/
;
; Example:
; $ ./rappel
; > mov rax,0
; > neg rax
; > sbb rax,rax
; > neg rax
; rax: 0x0000000000000000
; [...]
; > mov rax,1
; > neg rax
; > sbb rax,rax
; > neg rax
; rax: 0x0000000000000001
;
BITS 64
SECTION .text
global main
main:
;mov rax,1 ; initialize the rax register
neg rax ; two's complement (0 - rax); cf = 1 if rax != 0
sbb rax,rax ; rax - rax - cf (it can be either 0 or -1)
neg rax ; two's complement (it can be either 0 or 1)
| 23.027027 | 60 | 0.65493 |
20cbc3e992af7db40d6f969b7ede46e0ae16c59a | 153 | asm | Assembly | libsrc/stdio/__printf_handle_d.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 38 | 2021-06-18T12:56:15.000Z | 2022-03-12T20:38:40.000Z | libsrc/stdio/__printf_handle_d.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 2 | 2021-06-20T16:28:12.000Z | 2021-11-17T21:33:56.000Z | libsrc/stdio/__printf_handle_d.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 6 | 2021-06-18T18:18:36.000Z | 2021-12-22T08:01:32.000Z |
MODULE __printf_handle_d
SECTION code_clib
PUBLIC __printf_handle_d
EXTERN __printf_number
__printf_handle_d:
ld c,1 ;signed
jp __printf_number
| 15.3 | 25 | 0.830065 |
bf6d9113d74c2de2b4e3b48209e96687cd51fcef | 41,715 | asm | Assembly | Library/Math/Float/floatDateTime.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Library/Math/Float/floatDateTime.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Library/Math/Float/floatDateTime.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z |
COMMENT @-----------------------------------------------------------------------
Copyright (c) Geoworks 1991 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE:
AUTHOR: Cheng, 3/91
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial revision
DESCRIPTION:
Routines are grouped togerther thus:
Global routines
Date routines
Time routines
A Date Number is the number of days from Jan 1, 1900 (date
number 1) to through December 31, 2099 (date number 73049).
NOTE: PC/GEOS date numbers differ from Lotus 1-2-3 date numbers
because Lotus counts Feb 29, 1900, a date that did not exist,
so PC/GEOS dates after that will alyays be one higher.
Time Numbers are consecutive decimal values that correspond
to times from midnight (time number 0.000000) through 11:59:59 PM
(time number 0.999988)
$Id: floatDateTime.asm,v 1.1 97/04/05 01:22:55 newdeal Exp $
-------------------------------------------------------------------------------@
;*******************************************************************************
; GLOBAL ROUTINES
;*******************************************************************************
COMMENT @-----------------------------------------------------------------------
FUNCTION: Global routines
DESCRIPTION:
CALLED BY: INTERNAL ()
PASS: possible parameters:
ax, bx, cx, dx
date/time number on fp stack
RETURN: see individual routines
DESTROYED: ax
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial version
-------------------------------------------------------------------------------@
COMMENT @-----------------------------------------------------------------------
FUNCTION: FloatGetDateNumber
DESCRIPTION: Get the date number for the given date.
A Date Number is the number of days from Jan 1, 1900 (date
number 1) to through December 31, 2099 (date number 73050).
NOTE: PC/GEOS date numbers differ from Lotus 1-2-3 date numbers
because Lotus counts Feb 29, 1900, a date that did not exist.
CALLED BY: Global
PASS: ax - year (1900 through 2099)
bl - month (1 through 12)
bh - day (1 through 31)
RETURN: carry clear if successful
date number on the fp stack
else carry set
al - error code (FLOAT_GEN_ERR)
DESTROYED: ax
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
use dx:ax to track number of days
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial version
-------------------------------------------------------------------------------@
FloatGetDateNumber proc far
call GetDateNumber
ret
FloatGetDateNumber endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: FLOATDATENUMBERGETYEAR
DESCRIPTION: Given a date number, extract the year.
CALLED BY: Global
PASS: date number on the fp stack
RETURN: ax - year
date number popped off the fp stack
DESTROYED: carry set if error
al - error code (FLOAT_GEN_ERR)
carry clear otherwise
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial version
-------------------------------------------------------------------------------@
FLOATDATENUMBERGETYEAR proc far
call DateNumberGetYear
ret
FLOATDATENUMBERGETYEAR endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: FloatDateNumberGetMonthAndDay
DESCRIPTION: Given a date number, extract the month.
CALLED BY: Global
PASS: date number on the fp stack
RETURN: bl - month
bh - day
date number popped off the fp stack
DESTROYED: nothing
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
remove number of days in the years preceeding the current one from
the date number
scan down the daysRunningTotal table to get the month and the day
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial version
-------------------------------------------------------------------------------@
FloatDateNumberGetMonthAndDay proc far
call DateNumberGetMonthAndDay
ret
FloatDateNumberGetMonthAndDay endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: FlOATDATENUMBERGETWEEKDAY
DESCRIPTION: Given a date number, return the day of the week. The day
ranges from 1 (Sunday) to 7 (Saturday).
CALLED BY: Global
PASS: date number on the fp stack
RETURN: weekday number on the fp stack
DESTROYED: ax
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial version
-------------------------------------------------------------------------------@
FLOATDATENUMBERGETWEEKDAY proc far
call DateNumberGetWeekday
ret
FLOATDATENUMBERGETWEEKDAY endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: FloatGetTimeNumber
DESCRIPTION: Calculate a time number given the time.
Time Numbers are consecutive decimal values that correspond
to times from midnight (time number 0.000000) through
11:59:59 PM (time number 0.999988)
CALLED BY: Global
PASS: ch - hours (0 through 23)
dl - minutes (0 through 59)
dh - seconds (0 through 59)
RETURN: carry clear if successful
time number on the fp stack
else carry set
al - error code (FLOAT_GEN_ERR)
DESTROYED: ax
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial version
-------------------------------------------------------------------------------@
FloatGetTimeNumber proc far
call GetTimeNumber
ret
FloatGetTimeNumber endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: FLOATTIMENUMBERGETHOUR
DESCRIPTION: Get the hour given the time number.
CALLED BY: Global
PASS: time number on the fp stack
RETURN: hour on the fp stack
DESTROYED:
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial version
-------------------------------------------------------------------------------@
FLOATTIMENUMBERGETHOUR proc far
call TimeNumberGetHour
ret
FLOATTIMENUMBERGETHOUR endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: FLOATTIMENUMBERGETMINUTES
DESCRIPTION: Get the minutes given the time number.
CALLED BY: Global
PASS: time number on the fp stack
RETURN: minutes on the fp stack
DESTROYED:
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial version
-------------------------------------------------------------------------------@
FLOATTIMENUMBERGETMINUTES proc far
call TimeNumberGetMinutes
ret
FLOATTIMENUMBERGETMINUTES endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: FLOATTIMENUMBERGETSECONDS
DESCRIPTION: Get the seconds given the time number.
CALLED BY: Global
PASS: time number on the fp stack
RETURN: seconds on the fp stack
DESTROYED:
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial version
-------------------------------------------------------------------------------@
FLOATTIMENUMBERGETSECONDS proc far
call TimeNumberGetSeconds
ret
FLOATTIMENUMBERGETSECONDS endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: FloatStringGetDateNumber
DESCRIPTION: Parse the sting containing a date and return its date number.
CALLED BY: global
PASS: es:di - string to parse
RETURN: carry clear if successful
date number on the fp stack
ax = DateTimeFormat
carry set otherwise
al - error code (FLOAT_GEN_ERR)
DESTROYED:
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 5/91 Initial version
-------------------------------------------------------------------------------@
FloatStringGetDateNumber proc far
call StringGetDateNumber
ret
FloatStringGetDateNumber endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: FloatStringGetTimeNumber
DESCRIPTION: parse the string containing a time and return its time number.
CALLED BY: Global
PASS: es:di - string to parse
RETURN: carry clear if successful
date number on the fp stack
carry set otherwise
al - error code (FLOAT_GEN_ERR)
DESTROYED:
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 5/91 Initial version
-------------------------------------------------------------------------------@
FloatStringGetTimeNumber proc far
call StringGetTimeNumber
ret
FloatStringGetTimeNumber endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: FloatGetDaysInMonth
DESCRIPTION: Given a year and a month, calculate the number of days
in that month.
CALLED BY: global
PASS: ax - year (YEAR_MIN <= ax <= YEAR_MAX)
bl - month (MONTH_MIN <= bl <= MONTH_MAX)
RETURN: bh - number of days in the month
DESTROYED: nothing
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial version
-------------------------------------------------------------------------------@
FloatGetDaysInMonth proc far
call GetDaysInMonth
ret
FloatGetDaysInMonth endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: FloatFloatToDateTime
DESCRIPTION:
CALLED BY: GLOBAL ()
PASS: FFA_stackFrame containing FloatFloatToDateTimeData
FFA_dateTimeParams.FFA_dateTimeFlags.FFDT_DATE_TIME_OP must be 1
if (FFA_dateTimeParams.FFA_dateTimeFlags.FFDT_FROM_ADDR == 1)
ds:si = location of number
es:di - destination address of string
(at least DATE_TIME_FORMAT_SIZE)
RETURN: carry clear if successful
es:di - the formatted string, null terminated
cx - # of characters in formatted string.
This does not include the NULL terminator at the
end of the string.
carry set otherwise
al - error code (FLOAT_GEN_ERR)
DESTROYED: ax
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial version
-------------------------------------------------------------------------------@
FloatFloatToDateTime proc far uses bx,dx,di,si
locals local FFA_stackFrame
.enter inherit far
;EC< call FloatCheckDateTimeParams >
call FloatGetDateTimeParams
jc done
call LocalFormatDateTime
done:
.leave
ret
FloatFloatToDateTime endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: FloatGetDateTimeParams
DESCRIPTION:
CALLED BY: INTERNAL ()
PASS: FFA_stackFrame containing FloatFloatToDateTimeData
FFA_dateTimeParams.FFA_dateTimeFlags.FFDT_DATE_TIME_OP must be 1
if (FFA_dateTimeParams.FFA_dateTimeFlags.FFDT_FROM_ADDR == 1)
ds:si = location of number
RETURN: carry set if error
else carry clear
for LocalFormatDateTime():
ax - year
bl - month (1-12)
bh - day (1-31)
cl - weekday (0-6)
ch - hours (0-23)
dl - minutes (0-59)
dh - seconds (0-59)
si - DateTimeFormat
DESTROYED: carry clear is successful
else carry set
al - error code (FLOAT_GEN_ERR)
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial version
-------------------------------------------------------------------------------@
FloatGetDateTimeParams proc near uses ds
locals local FFA_stackFrame
.enter inherit far
mov ax, locals.FFA_dateTime.FFA_dateTimeParams.FFA_dateTimeFlags
test ax, mask FFDT_FROM_ADDR
LONG je argInFrame
call FloatPushNumberFar
call FloatEnterFar
;-----------------------------------------------------------------------
; distinguish between date and time operation
and ax, mask FFDT_FORMAT
cmp ax, DTF_START_TIME_FORMATS ; date or time op?
jge timeFormat
;
; lose any time component
; truncation is OK because the range of possible date numbers is
; small enough for every number to be fully represented
;
call FLOATTRUNC
;
; error check date number
;
mov ax, DATE_NUMBER_MIN
call FloatWordToFloatFar ; ( fp: # min )
call FloatCompFar ; # - min
call FLOATDROP ; lose min
jl error ; error if # < min
mov dx, DATE_NUMBER_MAX / 65536
mov ax, DATE_NUMBER_MAX and 0ffffh
call FloatDwordToFloatFar
call FloatCompFar ; # - max
call FLOATDROP ; lose max
jle dateFormat ; else legal
error:
mov si, offset errorStr
call FloatCopyErrorStr
call FLOATDROP ; lose number
call FloatOpDoneFar
mov al, FLOAT_GEN_ERR
stc
jmp exit
;-----------------------------------------------------------------------
; date format
dateFormat:
call FLOATDUP
call FLOATTRUNC
mov ax, 7
call FloatWordToFloatFar
call FLOATMOD
call FLOATFLOATTODWORD ; dx:ax <- weekday (0-6)
mov cl, al
call FLOATDUP
call DateNumberGetMonthAndDay ; bl <- month, bh <- day
;;; call FLOATDUP ; LOSE NUMBER NOW!
call DateNumberGetYear ; ax <- year
jmp short formatDone
;-----------------------------------------------------------------------
; time format
timeFormat:
;
; error check time number
;
call FLOAT0
call FloatCompFar
call FLOATDROP
jl error
call FLOATDUP
call TimeNumberGetHour
call FLOATFLOATTODWORD ; dx:ax <- hour
mov ch, al ; ch <- hour
cmp ch, HOUR_MAX
ja error
call FLOATDUP
call TimeNumberGetMinutes
call FLOATFLOATTODWORD ; dx:ax <- hour
mov bl, al ; bl <- minutes
cmp bl, MINUTE_MAX
ja error
call FLOATDUP
call TimeNumberGetSeconds
call FLOATFLOATTODWORD ; dx:ax <- seconds
mov dh, al ; dh <- seconds
mov dl, bl ; dl <- minutes
cmp dh, SECOND_MAX
LONG ja error
call FLOATDROP
formatDone:
call FloatOpDoneFar ; nothing destroyed, incl flags
jmp short done
;-----------------------------------------------------------------------
; parameters supplied in stack frame
argInFrame:
mov ax, locals.FFA_dateTime.FFA_dateTimeParams.FFA_year
mov bh, locals.FFA_dateTime.FFA_dateTimeParams.FFA_day
mov bl, locals.FFA_dateTime.FFA_dateTimeParams.FFA_month
mov cl, locals.FFA_dateTime.FFA_dateTimeParams.FFA_weekday
mov ch, locals.FFA_dateTime.FFA_dateTimeParams.FFA_hours
mov dl, locals.FFA_dateTime.FFA_dateTimeParams.FFA_minutes
mov dh, locals.FFA_dateTime.FFA_dateTimeParams.FFA_seconds
done:
mov si, locals.FFA_dateTime.FFA_dateTimeParams.FFA_dateTimeFlags
and si, mask FFDT_FORMAT
exit:
.leave
ret
FloatGetDateTimeParams endp
;*******************************************************************************
; DATE ROUTINES
;*******************************************************************************
COMMENT @-----------------------------------------------------------------------
FUNCTION: GetDateNumber
DESCRIPTION: Get the date number for the given date.
A Date Number is the number of days from Jan 1, 1900 (date
number 1) to through December 31, 2099 (date number 73050).
CALLED BY: INTERNAL ()
PASS: ax - year (1900 through 2099)
bl - month (1 through 12)
bh - day (1 through 31)
RETURN: carry clear if successful
date number on the fp stack
else carry set
al - error code (FLOAT_GEN_ERR)
DESTROYED: ax
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
use dx:ax to track number of days
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial version
-------------------------------------------------------------------------------@
global GetDateNumber:far
GetDateNumber proc far uses cx,dx,si
.enter
call CheckDateValid
jc done
mov si, ax ; save year in si
;-----------------------------------------------------------------------
; get number of days up to the year given
call GetDaysInYearsSinceYearMin ; dx:cx <- date number
;-----------------------------------------------------------------------
; get number of days up to, but not including the month given
push bx
clr bh ; bx <- month
dec bx ; dec to get offset
shl bx, 1 ; get offset into word-based table
add cx, cs:daysRunningTotal[bx]
adc dx, 0
pop bx
;
; account for leap years
;
cmp bl, 2 ; feb?
jle doneMonth ; no accounting if jan or feb
mov ax, si ; get year
call IsLeapYear ; leap year?
jnc doneMonth ; done accounting if non-leap year
add cx, 1 ; else inc date-number
adc dx, 0
doneMonth:
;-----------------------------------------------------------------------
; get number of days up to and including the day given
add cl, bh
adc ch, 0
adc dx, 0
;-----------------------------------------------------------------------
; dx:cx = date number, convert to floating point
mov ax, cx
call FloatDwordToFloatFar
done:
.leave
ret
GetDateNumber endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: CheckDateValid
DESCRIPTION: Checks to see if the date given is valid for our purposes.
A date is valid if it is legal and it falls within our
defined range.
CALLED BY: INTERNAL (GetDateNumber)
PASS: ax - year
bl - month
bh - day
RETURN: carry clear if successful
else carry set
al - error code (FLOAT_GEN_ERR)
DESTROYED: nothing
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial version
-------------------------------------------------------------------------------@
CheckDateValid proc near
cmp ax, YEAR_MIN
jl error
cmp ax, YEAR_MAX
jg error
cmp bl, MONTH_MIN
jl error
cmp bl, MONTH_MAX
jg error
cmp bh, DAY_MIN
jl error
cmp bh, DAY_MAX
jg error
;
; ok, limits not exceeded
; now check specifics
;
push cx
mov cx, bx ; save num days in cx
call GetDaysInMonth ; bh <- num days
cmp bh, ch
mov bx, cx ; restore num days
pop cx
clc
jge done
error:
mov al, FLOAT_GEN_ERR
stc
done:
ret
CheckDateValid endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: GetDaysInYearsSinceYearMin
DESCRIPTION: Calculate the number of days in the years from the year
YEAR_MIN to the year before the current year.
CALLED BY: INTERNAL (DateNumberGetMonthAndDay, GetDateNumber)
PASS: ax - year
RETURN: dx:cx - answer
DESTROYED: nothing
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
!!! NOTE !!!
The code written is not a general solution.
It taks advantage of 1900 and 2000 being the only centuries in the
legal range. (2000 is a leap year, 1900 is not)
let year offset = year - YEAR_MIN
then number of leap years = (year offset - 1) DIV 4
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial version
-------------------------------------------------------------------------------@
GetDaysInYearsSinceYearMin proc near uses ax
.enter
sub ax, YEAR_MIN ; ax <- year offset
push ax ; save year offset
mov cx, YEAR_LENGTH
mul cx ; dx:ax <- num days excl leap days
mov cx, ax ; save num days
pop ax ; retrieve year offset
tst ax
je done
dec ax
shr ax, 1
shr ax, 1 ; year offset DIV 4 = num leap days
; dx:cx = number of days excluding leap days
; ax = number of leap days
add cx, ax
adc dx, 0
done:
.leave
ret
GetDaysInYearsSinceYearMin endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: GetDaysInMonth
DESCRIPTION: Given a year and a month, calculate the number of days
in that month.
CALLED BY: INTERNAL (CheckDateValid)
PASS: ax - year (YEAR_MIN <= ax <= YEAR_MAX)
bl - month (MONTH_MIN <= bl <= MONTH_MAX)
RETURN: bh - number of days in the month
DESTROYED: nothing
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial version
-------------------------------------------------------------------------------@
global GetDaysInMonth:far
GetDaysInMonth proc far
.enter
;
; error check year
;
EC< cmp ax, YEAR_MIN >
EC< ERROR_L FLOAT_BAD_ARGUMENT >
EC< cmp ax, YEAR_MAX >
EC< ERROR_G FLOAT_BAD_ARGUMENT >
;
; error check month
;
EC< cmp bl, MONTH_MIN >
EC< ERROR_L FLOAT_BAD_ARGUMENT>
EC< cmp bl, MONTH_MAX >
EC< ERROR_G FLOAT_BAD_ARGUMENT >
clr bh
mov bh, cs:monthLengths[bx]
cmp bl, 2 ; feb?
jne done
call IsLeapYear ; leap year?
jnc done ; done if not
inc bh ; else add a day
done:
.leave
ret
GetDaysInMonth endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: IsLeapYear
DESCRIPTION: Determines if the given year is a leap year.
CALLED BY: INTERNAL (GetDateNumber)
PASS: ax - year
RETURN: carry set if leap year
DESTROYED: nothing
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial version
-------------------------------------------------------------------------------@
IsLeapYear proc near uses ax,cx,dx
.enter
;
; is year divisible by 4?
;
test ax, 3 ; leap year?
jne done ; branch if not, carry is clear
;
; may be a leap year - see if divisible by 100
;
clr dx ; prepare for division
mov cx, 100
div cx ; century?
tst dx ; any remainder?
jne leapYear ; branch if leap year (non-century)
;
; century
; may still be a leap year if divisible by 400 (at this point by 4)
;
test ax, 3 ; divisible by 4?
jne done ; non-leap year if not, carry is clear
leapYear:
stc
done:
.leave
ret
IsLeapYear endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: DateNumberGetYear
DESCRIPTION: Given a date number, extract the year.
CALLED BY: INTERNAL (+DateNumberGetMonthAndDay)
PASS: date number on the fp stack
RETURN: ax - year
date number popped off the fp stack
DESTROYED: carry set if error
al - error code (FLOAT_GEN_ERR)
carry clear otherwise
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial version
-------------------------------------------------------------------------------@
global DateNumberGetYear:far
DateNumberGetYear proc far uses cx,dx,ds,si
.enter
call FLOATTRUNC
call FLOATFLOATTODWORD ; dx:ax <- date number
jc error
;-----------------------------------------------------------------------
; error check the number
cmp dx, DATE_NUMBER_MAX / 65536
ja error
jb checkMin
cmp ax, DATE_NUMBER_MAX and 0ffffh
ja error
checkMin:
tst dx
jne doneCheck
cmp ax, DATE_NUMBER_MIN
jb error
doneCheck:
;-----------------------------------------------------------------------
; locate the decade entry
mov si, size decadeDateNum - size dword ;si <- last decade
locateLoop:
cmp dx, cs:decadeDateNum[si].high
jb next
ja found
cmp ax, cs:decadeDateNum[si].low
jae found
next:
sub si, size dword
jmp locateLoop
;-----------------------------------------------------------------------
; dx:ax = date number such that date number >= decadeDateNum
found:
sub ax, cs:decadeDateNum[si].low ; ax <- residual number of days
EC< sbb dx, cs:decadeDateNum[si].high >
EC< tst dx >
EC< ERROR_NE FLOAT_BAD_DATE >
;
; ax = residual number of days
; need to loop for years
;
mov_tr cx, ax ; cx <- residual number of days
;
; Calculate the decade indicated by si = 10 * (si/size dword)
;
mov ax, si ; ax <- 4 * index
add ax, ax ; ax <- 8 * index
shr si ; si <- 2 * index
add ax, si ; ax <- 10 * index
add ax, YEAR_MIN ; ax <- decade year
;-----------------------------------------------------------------------
; ax = decade year
; cx = residual number of days = day offset from jan 1 of decade
inc cx
residLoop:
sub cx, YEAR_LENGTH ; remove number of days in year
call IsLeapYear ; carry set if leap year
jnc checkDone
dec cx
checkDone:
tst cx ; any residual? (carry is cleared)
jle done ; done if not
inc ax ; up the year
jmp short residLoop
error:
EC< mov ah, 0ffh > ; make year patently illegal
mov al, FLOAT_GEN_ERR
stc
done:
.leave
ret
DateNumberGetYear endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: DateNumberGetMonthAndDay
DESCRIPTION: Given a date number, extract the month.
CALLED BY: INTERNAL ()
PASS: date number on the fp stack
RETURN: bl - month
bh - day
date number popped off the fp stack
DESTROYED: nothing
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
remove number of days in the years preceeding the current one from
the date number
scan down the daysRunningTotal table to get the month and the day
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial version
-------------------------------------------------------------------------------@
global DateNumberGetMonthAndDay:far
DateNumberGetMonthAndDay proc far uses ax,cx,dx,ds,di
.enter
call FLOATDUP ; duplicate date number
call DateNumberGetYear ; ax <- year
jnc yearOK
call FLOATDROP ; lose the number
jmp short exit
yearOK:
call IsLeapYear
mov di, offset daysRunningTotal
jnc 10$
mov di, offset daysRunningTotalLeap
10$:
call GetDaysInYearsSinceYearMin ; dx:cx <- answer
mov bx, dx ; bx:cx = days in years
call FLOATFLOATTODWORD ; dx:ax <- date number
sub ax, cx
sbb dx, bx ; ax <- residual days
EC< tst dx >
EC< ERROR_NE FLOAT_BAD_DATE >
EC< cmp ax, YEAR_LENGTH+1 >
EC< ERROR_G FLOAT_BAD_DATE >
;
; ax = residual days
; scan down running total table to get the month
;
segmov ds, cs, bx
mov bx, (12-1)*2 ; bx <- offset to last entry
; (12 months - 1) * size of each entry
cmpLoop:
cmp ax, ds:[bx][di]
jg cmpDone
sub bx, 2 ; next entry
jmp short cmpLoop
cmpDone:
; ax = residual days
; bx = offset to number of days of prior months
sub ax, ds:[bx][di] ; ax <- day
EC< cmp ax, DAY_MAX >
EC< ERROR_G FLOAT_BAD_DATE >
EC< cmp ax, DAY_MIN >
EC< ERROR_L FLOAT_BAD_DATE >
shr bx, 1
inc bx ; bx <- month
EC< cmp bx, MONTH_MAX >
EC< ERROR_G FLOAT_BAD_DATE >
EC< cmp bx, MONTH_MIN >
EC< ERROR_L FLOAT_BAD_DATE >
mov bh, al ; bh <- day
exit:
.leave
ret
DateNumberGetMonthAndDay endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: DateNumberGetWeekday
DESCRIPTION: Given a date number, return the day of the week. The day
ranges from 1 (Sunday) to 7 (Saturday).
CALLED BY: INTERNAL ()
PASS: date number on the fp stack
RETURN: weekday number on the fp stack
DESTROYED: ax
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial version
-------------------------------------------------------------------------------@
global DateNumberGetWeekday:far
DateNumberGetWeekday proc far uses dx
.enter
call FLOATTRUNC
mov ax, 7
call FloatWordToFloatFar
call FLOATMOD
mov ax, 1
call FloatWordToFloatFar
call FLOATADD
.leave
ret
DateNumberGetWeekday endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: StringGetDateNumber
DESCRIPTION: Parse the sting containing a date and return its date number.
CALLED BY: INTERNAL ()
PASS: es:di - string to parse
RETURN: carry clear if successful
date number on the fp stack
ax - DateTimeFormat that matched
carry set otherwise
al - error code (FLOAT_GEN_ERR)
DESTROYED:
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 5/91 Initial version
-------------------------------------------------------------------------------@
global StringGetDateNumber:far
StringGetDateNumber proc far uses bx,cx,dx,bp,di,si
.enter
if FULL_EXECUTE_IN_PLACE
;
; Make sure the fptr passed in is valid
;
EC < pushdw bxsi >
EC < movdw bxsi, esdi >
EC < call ECAssertValidFarPointerXIP >
EC < popdw bxsi >
endif
mov bp, di ; es:bp <- string
clr si
mov cx, (length stringGetDateNumberLookup)
xlatLoop:
push cx,si
mov si, cs:stringGetDateNumberLookup[si] ; si <- format
call LocalParseDateTime ; modifies ax,bx,cx,dx
jc found ;branch if parsed OK
pop cx,si
inc si
inc si
loop xlatLoop
;
; parsing unsuccessful
;
mov al, FLOAT_GEN_ERR
stc
jmp short done
found:
mov dx, -1 ;we use this a lot...
;
; ax - year
; bl - month (1-12)
; bh - day (1-31)
; cl - weekday (0-6)
;
; The checks below are to give the following behavior:
; "March" -- 3/1/<this year>
; "Monday" -- <nearest month>/nearest Monday/<this year>
; "3/31" -- 3/31/<this year>
; "1993" -- 1/1/93
;
;
; See if the weekday is the only thing present -- if so
; we set other stuff based on the current date
;
cmp cl, dl ;weekday present?
je skipWeekdayCheck ;branch if no weekday
cmp ax, dx ;year present?
jne skipWeekdayCheck ;branch if year present
cmp bx, dx ;month or day present?
jne skipWeekdayCheck ;branch if month or day present
;
; There is only a weekday -- use the current month and year,
; and calculate the nearest day of the specified weekday.
;
push dx
mov dl, cl ;dl <- weekday
call getCurrentDate
sub cl, dl ;cl <- delta to specified weekday
jnc newDay
add cl, 7 ;make sure delta is position
newDay:
;
; Make sure bh is larger than cl, so it won't end up with
; negative day. If bh <= cl, we need to add 7 more days
; in order to make the weekday right.
;
sub bh, cl
ja daySet
add bh, 7
daySet:
pop dx
skipWeekdayCheck:
;
; all unknowns are mapped by the localization driver to -1
; we will map these to the current year, but the first
; day or month.
;
cmp ax, dx ; year present?
jne afterYear ; branch if so
push bx
call getCurrentDate
pop bx
afterYear:
cmp bl, dl ; month present?
jne afterMonth ; branch if so
mov bl, MONTH_MIN ; bl <- 1st month
afterMonth:
cmp bh, dl ; day present?
jne afterDay ; branch if so
mov bh, DAY_MIN ; bh <- 1st day
afterDay:
;
; We've finally got a month/day/year -- make sure it is OK,
; then convert it to floating point.
;
call CheckDateValid
jc skipFormat
call GetDateNumber
jc skipFormat ;branch if error
mov ax, si ;ax <- matching DateTimeFormat
skipFormat:
pop cx,si ;clean up cx,si, preserve carry
done:
.leave
ret
getCurrentDate:
push dx
call TimerGetDateAndTime
pop dx
retn
StringGetDateNumber endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: StringGetTimeNumber
DESCRIPTION: parse the string containing a time and return its time number.
CALLED BY: INTERNAL ()
PASS: es:di - string to parse
RETURN: carry clear if successful
date number on the fp stack
ax - DateTimeFormat that matched
carry set otherwise
al - error code (FLOAT_GEN_ERR)
DESTROYED:
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 5/91 Initial version
-------------------------------------------------------------------------------@
global StringGetTimeNumber:far
StringGetTimeNumber proc far uses bx,cx,dx,bp,di,si
.enter
if FULL_EXECUTE_IN_PLACE
;
; Make sure the fptr passed in is valid
;
EC < pushdw bxsi >
EC < movdw bxsi, esdi >
EC < call ECAssertValidFarPointerXIP >
EC < popdw bxsi >
endif
mov bp, di ; es:bp <- string
clr bx
mov ax, (length stringGetTimeNumberLookup)
xlatLoop:
mov si, cs:stringGetTimeNumberLookup[bx] ; si <- format
push ax,bx
call LocalParseDateTime ; modifies ax,bx,cx,dx
pop ax,bx
jc found
inc bx
inc bx
dec ax ; dec count
jne xlatLoop ; loop while not done
;
; parsing unsuccessful
;
mov al, FLOAT_GEN_ERR
stc
jmp done
found:
;
; ch - hours
; dl - minutes
; dh - seconds
;
; all unknowns are mapped by the localization driver to -1
; we will map these to the min values (0)
;
cmp ch, -1
jne checkMinutes
clr ch
checkMinutes:
cmp dl, -1
jne checkSeconds
clr dl
checkSeconds:
cmp dh, -1
jne getTimeNumber
clr dh
getTimeNumber:
call GetTimeNumber
mov ax, si ;ax <- matching DateTimeFormat
done:
.leave
ret
StringGetTimeNumber endp
;*******************************************************************************
; TIME ROUTINES
;*******************************************************************************
COMMENT @-----------------------------------------------------------------------
FUNCTION: GetTimeNumber
DESCRIPTION: Calculate a time number given the time.
Time Numbers are consecutive decimal values that correspond
to times from midnight (time number 0.000000) through
11:59:59 PM (time number 0.999988)
CALLED BY: INTERNAL ()
PASS: ch - hours (0 through 23)
dl - minutes (0 through 59)
dh - seconds (0 through 59)
RETURN: carry clear if successful
time number on the fp stack
else carry set
al - error code (FLOAT_GEN_ERR)
DESTROYED: ax
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial version
-------------------------------------------------------------------------------@
global GetTimeNumber:far
GetTimeNumber proc far uses bx,dx,si
.enter
call CheckTimeValid
jc done
mov si, 60
mov bx, dx ; save seconds and minutes in bx
mov al, ch
clr ah
mul si ; dx:ax <- hrs * 60
EC< tst dx >
EC< ERROR_NE FLOAT_BAD_TIME >
add al, bl ; dx:ax <- hrs * 60 + min
adc ah, 0
mul si ; dx:ax <- (hrs*60 + min)*60
add al, bh ; add seconds
adc ah, 0
adc dx, 0 ; dx:ax = unnormalized time number
call FloatDwordToFloatFar
call FLOAT86400
call FLOATDIVIDE
done:
.leave
ret
GetTimeNumber endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: CheckTimeValid
DESCRIPTION: Checks to see if the time given is valid.
CALLED BY: INTERNAL (GetTimeNumber)
PASS: ch - hours
dl - minutes
dh - seconds
RETURN: carry clear if successful
else carry set
al - error code (FLOAT_GEN_ERR)
DESTROYED: nothing
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial version
-------------------------------------------------------------------------------@
CheckTimeValid proc near
cmp ch, HOUR_MAX
jg error
cmp dl, MINUTE_MAX
jg error
cmp dh, SECOND_MAX
clc
jle done
error:
mov al, FLOAT_GEN_ERR
stc
done:
ret
CheckTimeValid endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: TimeNumberGetHour
DESCRIPTION: Get the hour given the time number.
CALLED BY: INTERNAL ()
PASS: time number on the fp stack
RETURN: hour on the fp stack
DESTROYED:
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial version
-------------------------------------------------------------------------------@
global TimeNumberGetHour:far
TimeNumberGetHour proc far uses dx
.enter
if 0 ; Commented out by Allen on 7/28/95. (See below)
; Changed 5/19/95 -jw
;
; The problem was that if you did a combination of expressions in GeoCalc,
; you could end up with a seemingly incorrect answer due to a loss of
; precision. For example:
;
; =hour(time(13,0,0)-time(12,0,0))
;
; would produce zero instead of one, due to a very subtle loss of precision.
;
; By rearranging the order of the instructions, we sort of introduce
; our own loss of precision in the calculation of the number of
; minutes per hour.
;
; call FLOATFRAC
; call FLOAT86400
; call FLOATMULTIPLY
; call FLOAT3600
; call FLOATDIV
call FLOATFRAC
call FLOAT86400
call FLOAT3600
call FLOATDIV
call FLOATMULTIPLY
;
; urk! changing the order no longer leaves us with an integer, so we have
; to dump the fraction -- brianc 7/26/95
;
call FLOATINT
endif ; --- AY 7/28/95
;
; For some on-the-hour time values (1am, 2am, 3am, 4am, 8am, 1pm and 4pm),
; calling FLOATINT ends up one hour early (1am becomes 12am, etc.) due to loss
; of precision. Also hour(time(13,0,0)-time(12,0,0)) results in 0 again after
; calling FLOATINT. Adding one espilon (FLOATEPSILON) before FLOATINT solves
; the above cases except hour(time(13,0,0)-time(12,0,0)).
;
; The solution is to round off the time value at the sec granularity before
; truncating the value to an hour integer. The only drawback is if the
; routine is passed time(x,59,59.5), it returns x+1 instead of x. However
; there is no way for a user to specify a fractional second and pass it to
; this routine without first being rounded off by some other code. Hence
; the drawback is tolerable.
;
; --- AY 7/28/95
;
call FLOATFRAC
call FLOAT86400
call FLOATMULTIPLY
; add 0.5sec, for rouding at the sec granularity
call FLOATPOINT5
call FLOATADD
call FLOAT3600
call FLOATDIV ; result truncated to integer
.leave
ret
TimeNumberGetHour endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: TimeNumberGetMinutes
DESCRIPTION: Get the minutes given the time number.
CALLED BY: INTERNAL ()
PASS: time number on the fp stack
RETURN: minutes on the fp stack
DESTROYED:
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial version
-------------------------------------------------------------------------------@
global TimeNumberGetMinutes:far
TimeNumberGetMinutes proc far uses dx
.enter
call FLOATFRAC
call FLOAT86400
call FLOATMULTIPLY
call FLOAT3600
call FLOATMOD
mov ax, 60
call FloatWordToFloatFar
call FLOATDIV
.leave
ret
TimeNumberGetMinutes endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: TimeNumberGetSeconds
DESCRIPTION: Get the seconds given the time number.
CALLED BY: INTERNAL ()
PASS: time number on the fp stack
RETURN: seconds on the fp stack
DESTROYED:
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 3/91 Initial version
-------------------------------------------------------------------------------@
global TimeNumberGetSeconds:far
TimeNumberGetSeconds proc far uses dx
.enter
call FLOATFRAC
call FLOAT86400
call FLOATMULTIPLY
mov ax, 60
call FloatWordToFloatFar
call FLOATMOD
.leave
ret
TimeNumberGetSeconds endp
| 22.153478 | 81 | 0.583339 |
e22d515c73919cfe9af09050574373bf2a784b0c | 328 | asm | Assembly | programs/oeis/069/A069760.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/069/A069760.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/069/A069760.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A069760: Frobenius number of the numerical semigroup generated by consecutive centered square numbers.
; 47,287,959,2399,5039,9407,16127,25919,39599,58079,82367,113567,152879,201599,261119,332927,418607,519839,638399,776159,935087,1117247,1324799,1559999,1825199,2122847
add $0,2
pow $0,2
mul $0,2
sub $0,1
pow $0,2
sub $0,2
| 32.8 | 167 | 0.786585 |
b997bfe4ee82022f92d6f9b09110824335e101d9 | 1,133 | asm | Assembly | software/minol/source/commands/call.asm | paulscottrobson/retrochallenge-jan-2016 | 8bd340efc85969fa6f2fecc788aa21b27123a4db | [
"MIT"
] | null | null | null | software/minol/source/commands/call.asm | paulscottrobson/retrochallenge-jan-2016 | 8bd340efc85969fa6f2fecc788aa21b27123a4db | [
"MIT"
] | null | null | null | software/minol/source/commands/call.asm | paulscottrobson/retrochallenge-jan-2016 | 8bd340efc85969fa6f2fecc788aa21b27123a4db | [
"MIT"
] | null | null | null | ; ****************************************************************************************************************
; ****************************************************************************************************************
;
; CALL command
;
; ****************************************************************************************************************
; ****************************************************************************************************************
jmp CCA_Over
CMD_Call:
lpi p3,EvaluateAddressPair-1 ; evaluate the address pair (e.g. (H,L))
xppc p3
jp CCA_Over ; exit on error.
ld -2(p2) ; retrieve the L value to E
xae
ld -1(p2) ; retrieve the H value to P3.H
xpah p3
lde ; copy L value to P3.L
xpal p3
ld @-1(p3) ; fix up for pre-increment
pushp p1 ; save P1
lpi p1,Variables ; and point P1 to the variables
scl ; set CY/L flag, so the call can return an error.
xppc p3 ; call the routine
pullp p1 ; restore P1
CCA_Over: | 40.464286 | 114 | 0.309797 |
93d9710baaa99f4e442fb2d861ab30be97e34587 | 817 | asm | Assembly | programs/oeis/027/A027786.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/027/A027786.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/027/A027786.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A027786: a(n) = 13*(n+1)*binomial(n+2,13)/2.
; 78,1183,9555,54600,247520,946764,3174444,9573720,26453700,67897830,163601438,373173528,811246800,1690097500,3389852700,6571099080,12351232530,22574731725,40219349625,69995780400,119218619520,199052516520,326270653800,525704634000,833617348200,1302295546188,2006239084668,3050422000080,4581219853600,6800741886120,9985479549864,14510389637744,20879775786870,29766622506075,42062377685055,58939580159928,81930196534368,113023075174100,154784555152500,210506995007400,284390822666860,381766667201010,509365229823450,675643801833000,891179758450800,1169142968824740,1525860884560740,1981492124484600,2560826686304250,3294233512790025,4218779049494373,5379543683605728,6831166582356480,8639653490067600
mov $1,$0
add $1,13
bin $1,$0
add $0,12
mul $1,$0
div $1,2
mul $1,13
| 74.272727 | 699 | 0.866585 |
f82c4283193a79fe9ff2ee9e1d3be6c0f86f8ac0 | 2,270 | asm | Assembly | programs/oeis/213/A213845.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/213/A213845.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/213/A213845.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A213845: Principal diagonal of the convolution array A213844.
; 3,32,119,296,595,1048,1687,2544,3651,5040,6743,8792,11219,14056,17335,21088,25347,30144,35511,41480,48083,55352,63319,72016,81475,91728,102807,114744,127571,141320,156023,171712,188419,206176,225015,244968,266067,288344,311831,336560,362563,389872,418519,448536,479955,512808,547127,582944,620291,659200,699703,741832,785619,831096,878295,927248,977987,1030544,1084951,1141240,1199443,1259592,1321719,1385856,1452035,1520288,1590647,1663144,1737811,1814680,1893783,1975152,2058819,2144816,2233175,2323928,2417107,2512744,2610871,2711520,2814723,2920512,3028919,3139976,3253715,3370168,3489367,3611344,3736131,3863760,3994263,4127672,4264019,4403336,4545655,4691008,4839427,4990944,5145591,5303400,5464403,5628632,5796119,5966896,6140995,6318448,6499287,6683544,6871251,7062440,7257143,7455392,7657219,7862656,8071735,8284488,8500947,8721144,8945111,9172880,9404483,9639952,9879319,10122616,10369875,10621128,10876407,11135744,11399171,11666720,11938423,12214312,12494419,12778776,13067415,13360368,13657667,13959344,14265431,14575960,14890963,15210472,15534519,15863136,16196355,16534208,16876727,17223944,17575891,17932600,18294103,18660432,19031619,19407696,19788695,20174648,20565587,20961544,21362551,21768640,22179843,22596192,23017719,23444456,23876435,24313688,24756247,25204144,25657411,26116080,26580183,27049752,27524819,28005416,28491575,28983328,29480707,29983744,30492471,31006920,31527123,32053112,32584919,33122576,33666115,34215568,34770967,35332344,35899731,36473160,37052663,37638272,38230019,38827936,39432055,40042408,40659027,41281944,41911191,42546800,43188803,43837232,44492119,45153496,45821395,46495848,47176887,47864544,48558851,49259840,49967543,50681992,51403219,52131256,52866135,53607888,54356547,55112144,55874711,56644280,57420883,58204552,58995319,59793216,60598275,61410528,62230007,63056744,63890771,64732120,65580823,66436912,67300419,68171376,69049815,69935768,70829267,71730344,72639031,73555360,74479363,75411072,76350519,77297736,78252755,79215608,80186327,81164944,82151491,83146000
mov $3,$0
lpb $0
add $1,2
add $1,$0
add $2,$1
add $2,$1
add $1,$0
sub $0,1
lpe
mul $2,2
add $2,1
mul $2,2
add $1,$2
sub $1,2
lpb $3
add $1,1
sub $3,1
lpe
add $1,3
| 98.695652 | 2,025 | 0.843612 |
9efc21d31da55ae5cfceb71fee8344707ff39b99 | 253 | asm | Assembly | libsrc/math/mbf32/c/sccz80/sin.asm | rjcorrig/z88dk | c49c26bb232c17ea5a45d21bb81b6343572b7f4c | [
"ClArtistic"
] | null | null | null | libsrc/math/mbf32/c/sccz80/sin.asm | rjcorrig/z88dk | c49c26bb232c17ea5a45d21bb81b6343572b7f4c | [
"ClArtistic"
] | null | null | null | libsrc/math/mbf32/c/sccz80/sin.asm | rjcorrig/z88dk | c49c26bb232c17ea5a45d21bb81b6343572b7f4c | [
"ClArtistic"
] | null | null | null |
SECTION code_fp_mbf32
PUBLIC sin
EXTERN ___mbf32_setup_single
EXTERN ___mbf32_SIN
EXTERN ___mbf32_return
EXTERN msbios
sin:
call ___mbf32_setup_single
ld ix,___mbf32_SIN
call msbios
jp ___mbf32_return
| 16.866667 | 37 | 0.703557 |
3e6d4902664b639a198dfc070459c07b6e707648 | 3,686 | asm | Assembly | 3rdparty/lzma/Asm/x86/XzCrc64Opt.asm | WieszKto/IrrlichtBAW | bcef8386c2ca7f06ff006b866c397035551a2351 | [
"Apache-2.0"
] | 216 | 2020-08-27T20:04:48.000Z | 2022-03-28T19:31:41.000Z | 3rdparty/lzma/Asm/x86/XzCrc64Opt.asm | WieszKto/IrrlichtBAW | bcef8386c2ca7f06ff006b866c397035551a2351 | [
"Apache-2.0"
] | 165 | 2020-09-17T20:12:30.000Z | 2022-03-30T21:32:18.000Z | 3rdparty/lzma/Asm/x86/XzCrc64Opt.asm | WieszKto/IrrlichtBAW | bcef8386c2ca7f06ff006b866c397035551a2351 | [
"Apache-2.0"
] | 118 | 2018-10-29T08:43:57.000Z | 2022-01-07T06:49:25.000Z | ; XzCrc64Opt.asm -- CRC64 calculation : optimized version
; 2011-06-28 : Igor Pavlov : Public domain
include 7zAsm.asm
MY_ASM_START
ifdef x64
rD equ r9
rN equ r10
num_VAR equ r8
table_VAR equ r9
SRCDAT equ rN + rD
CRC_XOR macro dest:req, src:req, t:req
xor dest, QWORD PTR [r5 + src * 8 + 0800h * t]
endm
CRC1b macro
movzx x6, BYTE PTR [rD]
inc rD
movzx x3, x0_L
xor x6, x3
shr r0, 8
CRC_XOR r0, r6, 0
dec rN
endm
MY_PROLOG macro crc_end:req
MY_PUSH_4_REGS
mov r0, r1
mov rN, num_VAR
mov r5, table_VAR
mov rD, r2
test rN, rN
jz crc_end
@@:
test rD, 3
jz @F
CRC1b
jnz @B
@@:
cmp rN, 8
jb crc_end
add rN, rD
mov num_VAR, rN
sub rN, 4
and rN, NOT 3
sub rD, rN
mov x1, [SRCDAT]
xor r0, r1
add rN, 4
endm
MY_EPILOG macro crc_end:req
sub rN, 4
mov x1, [SRCDAT]
xor r0, r1
mov rD, rN
mov rN, num_VAR
sub rN, rD
crc_end:
test rN, rN
jz @F
CRC1b
jmp crc_end
@@:
MY_POP_4_REGS
endm
MY_PROC XzCrc64UpdateT4, 4
MY_PROLOG crc_end_4
align 16
main_loop_4:
mov x1, [SRCDAT]
movzx x2, x0_L
movzx x3, x0_H
shr r0, 16
movzx x6, x0_L
movzx x7, x0_H
shr r0, 16
CRC_XOR r1, r2, 3
CRC_XOR r0, r3, 2
CRC_XOR r1, r6, 1
CRC_XOR r0, r7, 0
xor r0, r1
add rD, 4
jnz main_loop_4
MY_EPILOG crc_end_4
MY_ENDP
else
rD equ r1
rN equ r7
crc_val equ (REG_SIZE * 5)
crc_table equ (8 + crc_val)
table_VAR equ [r4 + crc_table]
num_VAR equ table_VAR
SRCDAT equ rN + rD
CRC macro op0:req, op1:req, dest0:req, dest1:req, src:req, t:req
op0 dest0, DWORD PTR [r5 + src * 8 + 0800h * t]
op1 dest1, DWORD PTR [r5 + src * 8 + 0800h * t + 4]
endm
CRC_XOR macro dest0:req, dest1:req, src:req, t:req
CRC xor, xor, dest0, dest1, src, t
endm
CRC1b macro
movzx x6, BYTE PTR [rD]
inc rD
movzx x3, x0_L
xor x6, x3
shrd r0, r2, 8
shr r2, 8
CRC_XOR r0, r2, r6, 0
dec rN
endm
MY_PROLOG macro crc_end:req
MY_PUSH_4_REGS
mov rN, r2
mov x0, [r4 + crc_val]
mov x2, [r4 + crc_val + 4]
mov r5, table_VAR
test rN, rN
jz crc_end
@@:
test rD, 3
jz @F
CRC1b
jnz @B
@@:
cmp rN, 8
jb crc_end
add rN, rD
mov num_VAR, rN
sub rN, 4
and rN, NOT 3
sub rD, rN
xor r0, [SRCDAT]
add rN, 4
endm
MY_EPILOG macro crc_end:req
sub rN, 4
xor r0, [SRCDAT]
mov rD, rN
mov rN, num_VAR
sub rN, rD
crc_end:
test rN, rN
jz @F
CRC1b
jmp crc_end
@@:
MY_POP_4_REGS
endm
MY_PROC XzCrc64UpdateT4, 5
MY_PROLOG crc_end_4
movzx x6, x0_L
align 16
main_loop_4:
mov r3, [SRCDAT]
xor r3, r2
CRC xor, mov, r3, r2, r6, 3
movzx x6, x0_H
shr r0, 16
CRC_XOR r3, r2, r6, 2
movzx x6, x0_L
movzx x0, x0_H
CRC_XOR r3, r2, r6, 1
CRC_XOR r3, r2, r0, 0
movzx x6, x3_L
mov r0, r3
add rD, 4
jnz main_loop_4
MY_EPILOG crc_end_4
MY_ENDP
endif
end
| 17.893204 | 65 | 0.487249 |
e892d2f826b20d76727761ee2e9508854a45666e | 7,875 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1478.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1478.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1478.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r15
push %r8
push %r9
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x1043f, %r8
nop
nop
nop
and %r15, %r15
mov $0x6162636465666768, %rsi
movq %rsi, %xmm7
movups %xmm7, (%r8)
nop
nop
nop
nop
nop
xor $63956, %r10
lea addresses_WT_ht+0x1a92f, %rsi
lea addresses_A_ht+0x1c51f, %rdi
nop
nop
nop
and $10327, %r9
mov $120, %rcx
rep movsw
nop
inc %rcx
lea addresses_WT_ht+0x223f, %rsi
lea addresses_WT_ht+0x1775f, %rdi
nop
nop
xor %r13, %r13
mov $8, %rcx
rep movsq
nop
cmp $54874, %rsi
lea addresses_D_ht+0x2f7f, %r10
clflush (%r10)
sub %rsi, %rsi
movl $0x61626364, (%r10)
add %r13, %r13
lea addresses_WC_ht+0x8b81, %rsi
lea addresses_normal_ht+0x101e5, %rdi
nop
nop
cmp $3810, %r10
mov $2, %rcx
rep movsb
nop
nop
nop
nop
cmp %rsi, %rsi
lea addresses_A_ht+0x10137, %rsi
lea addresses_UC_ht+0x15177, %rdi
nop
xor %r15, %r15
mov $118, %rcx
rep movsw
cmp $41478, %r13
lea addresses_WT_ht+0xd3f, %rcx
nop
nop
dec %r10
mov (%rcx), %r9d
nop
nop
nop
cmp %r8, %r8
lea addresses_UC_ht+0x11a3f, %r9
nop
nop
dec %r10
mov (%r9), %esi
sub %r9, %r9
lea addresses_normal_ht+0x1b8bf, %rsi
lea addresses_WT_ht+0x7c3f, %rdi
nop
nop
nop
xor %r10, %r10
mov $82, %rcx
rep movsw
cmp %rdi, %rdi
lea addresses_D_ht+0x3b27, %r10
nop
nop
add $3529, %rdi
mov (%r10), %r15d
nop
nop
nop
cmp $4759, %r8
lea addresses_UC_ht+0xc63f, %rsi
lea addresses_A_ht+0x8a3f, %rdi
nop
nop
nop
nop
nop
cmp %r10, %r10
mov $113, %rcx
rep movsq
nop
nop
nop
nop
nop
xor $28827, %rcx
lea addresses_A_ht+0xbc3f, %rsi
lea addresses_normal_ht+0x2a3f, %rdi
clflush (%rsi)
nop
nop
cmp $18725, %r9
mov $49, %rcx
rep movsw
nop
nop
nop
inc %r15
pop %rsi
pop %rdi
pop %rcx
pop %r9
pop %r8
pop %r15
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r13
push %r14
push %rax
push %rbx
push %rcx
push %rsi
// Store
lea addresses_US+0x1543f, %r11
clflush (%r11)
nop
nop
nop
and $14009, %rbx
movw $0x5152, (%r11)
nop
nop
nop
and $6862, %rax
// Load
lea addresses_normal+0x168c7, %rcx
cmp $15472, %r11
movaps (%rcx), %xmm5
vpextrq $1, %xmm5, %rax
nop
nop
nop
and %rsi, %rsi
// Store
lea addresses_PSE+0x843f, %rcx
nop
cmp $55496, %r14
movw $0x5152, (%rcx)
and %rax, %rax
// Faulty Load
lea addresses_normal+0x823f, %r13
nop
add %rsi, %rsi
vmovups (%r13), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $0, %xmm3, %r11
lea oracles, %r13
and $0xff, %r11
shlq $12, %r11
mov (%r13,%r11,1), %r11
pop %rsi
pop %rcx
pop %rbx
pop %rax
pop %r14
pop %r13
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 9, 'same': False, 'type': 'addresses_US'}, 'OP': 'STOR'}
{'src': {'NT': False, 'AVXalign': True, 'size': 16, 'congruent': 1, 'same': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 8, 'same': False, 'type': 'addresses_PSE'}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 6, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 3, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 4, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'}
{'src': {'congruent': 11, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 3, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 4, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 0, 'same': False, 'type': 'addresses_WC_ht'}, 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'}
{'src': {'congruent': 3, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 3, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 6, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 11, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 5, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 3, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 10, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'}
{'src': {'congruent': 9, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'}
{'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
*/
| 35.15625 | 2,999 | 0.657524 |
ab97889e421f6060272571eae36dc1d8a5935348 | 358 | asm | Assembly | programs/oeis/332/A332698.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/332/A332698.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/332/A332698.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A332698: a(n) = (8*n^3 + 15*n^2 + 13*n)/6.
; 0,6,25,65,134,240,391,595,860,1194,1605,2101,2690,3380,4179,5095,6136,7310,8625,10089,11710,13496,15455,17595,19924,22450,25181,28125,31290,34684,38315,42191,46320,50710,55369,60305,65526,71040,76855,82979,89420,96186
mul $0,4
add $0,1
mov $2,1
lpb $0
add $1,$2
add $2,$0
trn $0,4
lpe
sub $1,1
mov $0,$1
| 25.571429 | 219 | 0.678771 |
5ea08cbee5503dda2ebfe5afc158dba767d064df | 4,961 | asm | Assembly | libtool/src/gmp-6.1.2/mpn/pa32/hppa1_1/pa7100/submul_1.asm | kroggen/aergo | 05af317eaa1b62b21dc0144ef74a9e7acb14fb87 | [
"MIT"
] | 1,602 | 2015-01-06T11:26:31.000Z | 2022-03-30T06:17:21.000Z | libtool/src/gmp-6.1.2/mpn/pa32/hppa1_1/pa7100/submul_1.asm | kroggen/aergo | 05af317eaa1b62b21dc0144ef74a9e7acb14fb87 | [
"MIT"
] | 11,789 | 2015-01-05T04:50:15.000Z | 2022-03-31T23:39:19.000Z | libtool/src/gmp-6.1.2/mpn/pa32/hppa1_1/pa7100/submul_1.asm | kroggen/aergo | 05af317eaa1b62b21dc0144ef74a9e7acb14fb87 | [
"MIT"
] | 498 | 2015-01-08T18:58:18.000Z | 2022-03-20T15:37:45.000Z | dnl HP-PA 7100/7200 mpn_submul_1 -- Multiply a limb vector with a limb and
dnl subtract the result from a second limb vector.
dnl Copyright 1995, 2000-2003 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 INPUT PARAMETERS
define(`res_ptr',`%r26')
define(`s1_ptr',`%r25')
define(`size_param',`%r24')
define(`s2_limb',`%r23')
define(`cylimb',`%r28')
define(`s0',`%r19')
define(`s1',`%r20')
define(`s2',`%r3')
define(`s3',`%r4')
define(`lo0',`%r21')
define(`lo1',`%r5')
define(`lo2',`%r6')
define(`lo3',`%r7')
define(`hi0',`%r22')
define(`hi1',`%r23') C safe to reuse
define(`hi2',`%r29')
define(`hi3',`%r1')
ASM_START()
PROLOGUE(mpn_submul_1)
C .callinfo frame=128,no_calls
ldo 128(%r30),%r30
stws s2_limb,-16(%r30)
add %r0,%r0,cylimb C clear cy and cylimb
addib,< -4,size_param,L(few_limbs)
fldws -16(%r30),%fr31R
ldo -112(%r30),%r31
stw %r3,-96(%r30)
stw %r4,-92(%r30)
stw %r5,-88(%r30)
stw %r6,-84(%r30)
stw %r7,-80(%r30)
bb,>=,n s1_ptr,29,L(0)
fldws,ma 4(s1_ptr),%fr4
ldws 0(res_ptr),s0
xmpyu %fr4,%fr31R,%fr5
fstds %fr5,-16(%r31)
ldws -16(%r31),cylimb
ldws -12(%r31),lo0
sub s0,lo0,s0
add s0,lo0,%r0 C invert cy
addib,< -1,size_param,L(few_limbs)
stws,ma s0,4(res_ptr)
C start software pipeline ----------------------------------------------------
LDEF(0)
fldds,ma 8(s1_ptr),%fr4
fldds,ma 8(s1_ptr),%fr8
xmpyu %fr4L,%fr31R,%fr5
xmpyu %fr4R,%fr31R,%fr6
xmpyu %fr8L,%fr31R,%fr9
xmpyu %fr8R,%fr31R,%fr10
fstds %fr5,-16(%r31)
fstds %fr6,-8(%r31)
fstds %fr9,0(%r31)
fstds %fr10,8(%r31)
ldws -16(%r31),hi0
ldws -12(%r31),lo0
ldws -8(%r31),hi1
ldws -4(%r31),lo1
ldws 0(%r31),hi2
ldws 4(%r31),lo2
ldws 8(%r31),hi3
ldws 12(%r31),lo3
addc lo0,cylimb,lo0
addc lo1,hi0,lo1
addc lo2,hi1,lo2
addc lo3,hi2,lo3
addib,< -4,size_param,L(end)
addc %r0,hi3,cylimb C propagate carry into cylimb
C main loop ------------------------------------------------------------------
LDEF(loop)
fldds,ma 8(s1_ptr),%fr4
fldds,ma 8(s1_ptr),%fr8
ldws 0(res_ptr),s0
xmpyu %fr4L,%fr31R,%fr5
ldws 4(res_ptr),s1
xmpyu %fr4R,%fr31R,%fr6
ldws 8(res_ptr),s2
xmpyu %fr8L,%fr31R,%fr9
ldws 12(res_ptr),s3
xmpyu %fr8R,%fr31R,%fr10
fstds %fr5,-16(%r31)
sub s0,lo0,s0
fstds %fr6,-8(%r31)
subb s1,lo1,s1
fstds %fr9,0(%r31)
subb s2,lo2,s2
fstds %fr10,8(%r31)
subb s3,lo3,s3
subb %r0,%r0,lo0 C these two insns ...
add lo0,lo0,%r0 C ... just invert cy
ldws -16(%r31),hi0
ldws -12(%r31),lo0
ldws -8(%r31),hi1
ldws -4(%r31),lo1
ldws 0(%r31),hi2
ldws 4(%r31),lo2
ldws 8(%r31),hi3
ldws 12(%r31),lo3
addc lo0,cylimb,lo0
stws,ma s0,4(res_ptr)
addc lo1,hi0,lo1
stws,ma s1,4(res_ptr)
addc lo2,hi1,lo2
stws,ma s2,4(res_ptr)
addc lo3,hi2,lo3
stws,ma s3,4(res_ptr)
addib,>= -4,size_param,L(loop)
addc %r0,hi3,cylimb C propagate carry into cylimb
C finish software pipeline ---------------------------------------------------
LDEF(end)
ldws 0(res_ptr),s0
ldws 4(res_ptr),s1
ldws 8(res_ptr),s2
ldws 12(res_ptr),s3
sub s0,lo0,s0
stws,ma s0,4(res_ptr)
subb s1,lo1,s1
stws,ma s1,4(res_ptr)
subb s2,lo2,s2
stws,ma s2,4(res_ptr)
subb s3,lo3,s3
stws,ma s3,4(res_ptr)
subb %r0,%r0,lo0 C these two insns ...
add lo0,lo0,%r0 C ... invert cy
C restore callee-saves registers ---------------------------------------------
ldw -96(%r30),%r3
ldw -92(%r30),%r4
ldw -88(%r30),%r5
ldw -84(%r30),%r6
ldw -80(%r30),%r7
LDEF(few_limbs)
addib,=,n 4,size_param,L(ret)
LDEF(loop2)
fldws,ma 4(s1_ptr),%fr4
ldws 0(res_ptr),s0
xmpyu %fr4,%fr31R,%fr5
fstds %fr5,-16(%r30)
ldws -16(%r30),hi0
ldws -12(%r30),lo0
addc lo0,cylimb,lo0
addc %r0,hi0,cylimb
sub s0,lo0,s0
add s0,lo0,%r0 C invert cy
stws,ma s0,4(res_ptr)
addib,<> -1,size_param,L(loop2)
nop
LDEF(ret)
addc %r0,cylimb,cylimb
bv 0(%r2)
ldo -128(%r30),%r30
EPILOGUE(mpn_submul_1)
| 23.850962 | 79 | 0.639186 |
bf6f3062b4531331272fb77a4c1ba09c82890c1c | 1,101 | asm | Assembly | programs/oeis/004/A004456.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/004/A004456.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/004/A004456.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A004456: Nimsum n + 15.
; 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,79,78,77,76,75,74,73,72,71,70,69,68,67,66,65,64,95,94,93,92,91,90,89,88,87,86,85,84,83,82,81,80,111,110,109,108,107,106,105,104,103,102,101,100,99,98,97,96,127,126,125,124,123,122,121,120,119,118,117,116,115,114,113,112,143,142,141,140,139,138,137,136,135,134,133,132,131,130,129,128,159,158,157,156,155,154,153,152,151,150,149,148,147,146,145,144,175,174,173,172,171,170,169,168,167,166,165,164,163,162,161,160,191,190,189,188,187,186,185,184,183,182,181,180,179,178,177,176,207,206,205,204,203,202,201,200,199,198,197,196,195,194,193,192,223,222,221,220,219,218,217,216,215,214,213,212,211,210,209,208,239,238,237,236,235,234,233,232,231,230,229,228,227,226,225,224,255,254,253,252,251,250,249,248,247,246
mov $4,$0
mov $0,10
mov $2,$4
div $4,16
mul $4,4
add $0,$4
mov $1,$4
add $1,4
mul $1,10
mov $3,$4
add $3,$0
mov $5,$2
add $5,7
add $3,$5
lpb $0,1
mov $0,6
sub $1,$3
lpe
sub $1,8
| 47.869565 | 891 | 0.683015 |
879ce7f6b6b576305643b0a8703dba65fabfcc69 | 2,242 | asm | Assembly | calc.asm | gohome0001/calculator_asm | 23c7052d89a1ba824c9c5db1ea21f371a6a64b40 | [
"MIT"
] | null | null | null | calc.asm | gohome0001/calculator_asm | 23c7052d89a1ba824c9c5db1ea21f371a6a64b40 | [
"MIT"
] | null | null | null | calc.asm | gohome0001/calculator_asm | 23c7052d89a1ba824c9c5db1ea21f371a6a64b40 | [
"MIT"
] | null | null | null | ; 2017.07.25
; made by gohome0001
section .data
howto db 'input two SMALL integer', 10, 0
howto_s equ $-howto
r_add db 10, 'add result : ', 0
r_sub db 10, 'sub result : ', 0
r_mul db 10, 'mul result : ', 0
r_div1 db 10, 'div result : ', 0
r_div2 db 10, '>>> leftover ', 0
r_msg_s equ $-r_div2
in_s equ 2
out_s equ 1
end db 10, '---------------------', 10, 0
end_s equ $-end
section .bss
x1 resb 2 ; operand 1
x2 resb 2 ; operand 2
result resb 2 ; result buffer
section .code
global _start
_start:
mov edi, howto
mov esi, howto_s
call print
mov eax, 3 ; read(stdin, buffer, sizeof(buffer))
mov ebx, 0
mov ecx, x1
mov edx, in_s
int 80h ; input operand 1
mov eax, 3
mov ebx, 0
mov ecx, x2
mov edx, in_s
int 80h ; input operand 2
mov ax, [x1]
mov bx, [x2]
and ax, 255 ; remove '\n', or other terminate character
and bx, 255
mov [x1], ax
mov [x2], bx
mov ax, [x1] ; without doing it again, it causes an error on 'add'
mov bx, [x2]
sub bx, '0' ; ascii code to number. don't need to do it all
add ax, bx ; add
mov [result], ax
mov edi, r_add
mov esi, r_msg_s
call print
mov edi, result
mov esi, out_s
call print
mov ax, [x1]
mov bx, [x2]
sub bx, '0'
sub ax, bx ; sub
mov [result], ax
mov edi, r_sub
mov esi, r_msg_s
call print
mov edi, result
mov esi, out_s
call print
mov ax, [x1]
mov bx, [x2]
sub ax, '0' ; have to do it all when mul or div
sub bx, '0'
mul bx ; mul
add ax, '0'
mov [result], ax
mov edi, r_mul
mov esi, r_msg_s
call print
mov edi, result
mov esi, out_s
call print
xor eax, eax
xor edx, edx
mov ax, [x1]
mov bx, [x2]
sub ax, '0'
sub bx, '0'
div bx ; div
add ax, '0'
mov [result], ax
add dx, '0'
mov [x1], dx
mov edi, r_div1
mov esi, r_msg_s
call print
mov edi, result
mov esi, out_s
call print
mov edi, r_div2
mov esi, r_msg_s
call print
mov edi, x1 ; print leftover value in division
mov esi, out_s
call print
mov edi, end
mov esi, end_s
call print
mov eax, 1 ; exit
mov ebx, 0
int 80h
print:
push ebp
mov ebp, esp
mov eax, 4 ; write(stdout, buffer, sizeof(buffer))
mov ebx, 1
mov ecx, edi
mov edx, esi
int 80h
leave
ret
| 15.356164 | 68 | 0.6124 |
8ea6783b89449edcb161e7cc3a8ba7ab022fdca4 | 894 | asm | Assembly | programs/oeis/250/A250363.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/250/A250363.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/250/A250363.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A250363: Number of length 5 arrays x(i), i=1..5 with x(i) in i..i+n and no value appearing more than 3 times.
; 32,243,1016,3094,7712,16700,32608,58826,99704,160672,248360,370718,537136,758564,1047632,1418770,1888328,2474696,3198424,4082342,5151680,6434188,7960256,9763034,11878552,14345840,17207048,20507566,24296144
mov $3,$0
lpb $0
mov $0,1
mov $1,1
lpe
add $0,$1
add $1,$0
add $0,2
mul $1,2
add $1,$0
add $1,30
mov $2,82
mov $4,$3
lpb $2
add $1,$4
sub $2,1
lpe
mov $6,$3
lpb $6
add $5,$4
sub $6,1
lpe
mov $2,75
mov $4,$5
lpb $2
add $1,$4
sub $2,1
lpe
mov $5,0
mov $6,$3
lpb $6
add $5,$4
sub $6,1
lpe
mov $2,40
mov $4,$5
lpb $2
add $1,$4
sub $2,1
lpe
mov $5,0
mov $6,$3
lpb $6
add $5,$4
sub $6,1
lpe
mov $2,10
mov $4,$5
lpb $2
add $1,$4
sub $2,1
lpe
mov $5,0
mov $6,$3
lpb $6
add $5,$4
sub $6,1
lpe
mov $2,1
mov $4,$5
lpb $2
add $1,$4
sub $2,1
lpe
| 13.147059 | 207 | 0.614094 |
0efb04a7347054507c7f7c2ae2dbe5746cc116ee | 818 | asm | Assembly | programs/oeis/185/A185277.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/185/A185277.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/185/A185277.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A185277: a(n) = n^9 + 9^n.
; 1,10,593,20412,268705,2012174,10609137,45136576,177264449,774840978,4486784401,33739007300,287589316833,2552470327702,22897453501745,205929575454024,1853088908328577,16677300287543066,150094833656289489,1350852040360689868,12157665971056928801,109418989925792405790,984770903390880450673,8862938121453653757392,79766443079514317403585,717897987695667286035874,6461081889232102802611217,58149737003047685287875156,523347633027371115669464929,4710128697246259342067579558,42391158275216223197294433201,381520424476945858068272059480,3433683820292512519842221178113,30903154382632612408332126205482,278128389443693511318002768998225,2503155504993241601394387624757724,22528399544939174411941707831441057,202755595904452569706691292612748846
mov $1,9
pow $1,$0
pow $0,9
add $1,$0
mov $0,$1
| 90.888889 | 739 | 0.9022 |
eede2b05e87b430cae94c3d56cb428830dad71b2 | 790 | asm | Assembly | asm/bombbag.asm | Prof9/Minish-Cap-EU-Backport | 7a787d03433847d874ad9cc83f2960a2e16b3e63 | [
"Unlicense"
] | 2 | 2020-12-07T03:04:48.000Z | 2021-12-27T02:14:27.000Z | asm/bombbag.asm | Prof9/Minish-Cap-EU-Backport | 7a787d03433847d874ad9cc83f2960a2e16b3e63 | [
"Unlicense"
] | null | null | null | asm/bombbag.asm | Prof9/Minish-Cap-EU-Backport | 7a787d03433847d874ad9cc83f2960a2e16b3e63 | [
"Unlicense"
] | 1 | 2022-01-09T15:51:31.000Z | 2022-01-09T15:51:31.000Z | // Place hook in the shop's object loading routine
.org 0x804EBB6
bne hook_bomb_bag_check
.org 0x804EBC0
hook_bomb_bag_check:
ldr r1,=sub_bomb_bag_check|1
bx r1
.pool
// Place hook in the purchase flag set routine
.org 0x8064DF8
hook_flag_set:
ldr r1,=sub_flag_set|1
bx r1
.pool
// Shop data for the big bomb bag
.org 0x80FD1D0
.dw 600
.dh 0x2C25
.db 0x63,0x05
// Re-point shop text table pointers to free space
// so that more entries can be added
.org 0x89AEB60+0x2C*4
ptr_text_en:
.dw table_text_en-0x89AEB60
.org 0x89F7420+0x2C*4
ptr_text_fr:
.dw table_text_fr-0x89F7420
.org 0x8A3EEB0+0x2C*4
ptr_text_de:
.dw table_text_de-0x8A3EEB0
.org 0x8A81E70+0x2C*4
ptr_text_es:
.dw table_text_es-0x8A81E70
.org 0x8AC37A0+0x2C*4
ptr_text_it:
.dw table_text_it-0x8AC37A0
| 16.458333 | 50 | 0.76962 |
5c3df1518d0ed1b9444a9b6ac6c0887fea685f00 | 716 | asm | Assembly | oeis/117/A117962.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/117/A117962.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/117/A117962.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A117962: Partial sums of hexagonal numbers with prime indices.
; 6,21,66,157,388,713,1274,1977,3012,4665,6556,9257,12578,16233,20604,26169,33072,40453,49364,59375,69960,82363,96058,111811,130532,150833,171948,194739,218392,243817,275948,310139,347540,386043,430296,475747,524888,577863,633474,693159,757062,822403,895174,969479,1046900,1125903,1214734,1313969,1416800,1521453,1629798,1743801,1859722,1985473,2117314,2255389,2399842,2546453,2699634,2857275,3017170,3188575,3376766,3569897,3765522,3966183,4184974,4411775,4652246,4895499,5144364,5401767,5670778
mov $2,$0
add $2,1
mov $3,$0
lpb $2
mov $0,$3
sub $2,1
sub $0,$2
seq $0,117961 ; Hexagonal numbers with prime indices.
add $4,$0
lpe
mov $0,$4
| 47.733333 | 496 | 0.786313 |
6b1fde97879aa82423150e25f0a4347f628ae9aa | 381 | asm | Assembly | data/mapHeaders/Route23.asm | AmateurPanda92/pokemon-rby-dx | f7ba1cc50b22d93ed176571e074a52d73360da93 | [
"MIT"
] | 9 | 2020-07-12T19:44:21.000Z | 2022-03-03T23:32:40.000Z | data/mapHeaders/Route23.asm | JStar-debug2020/pokemon-rby-dx | c2fdd8145d96683addbd8d9075f946a68d1527a1 | [
"MIT"
] | 7 | 2020-07-16T10:48:52.000Z | 2021-01-28T18:32:02.000Z | data/mapHeaders/Route23.asm | JStar-debug2020/pokemon-rby-dx | c2fdd8145d96683addbd8d9075f946a68d1527a1 | [
"MIT"
] | 2 | 2021-03-28T18:33:43.000Z | 2021-05-06T13:12:09.000Z | Route23_h:
db PLATEAU ; tileset
db ROUTE_23_HEIGHT, ROUTE_23_WIDTH ; dimensions (y, x)
dw Route23_Blocks ; blocks
dw Route23_TextPointers ; texts
dw Route23_Script ; scripts
db NORTH | SOUTH ; connections
NORTH_MAP_CONNECTION ROUTE_23, INDIGO_PLATEAU, 0, 0, IndigoPlateau_Blocks
SOUTH_MAP_CONNECTION ROUTE_23, ROUTE_22, 0, 0, Route22_Blocks, 1
dw Route23_Object ; objects
| 34.636364 | 74 | 0.795276 |
1dcbe3387a4e7ee9d5bde9b32052d0215fb3d2a8 | 1,438 | asm | Assembly | ffight/lcs/weapon/A.asm | zengfr/arcade_game_romhacking_sourcecode_top_secret_data | a4a0c86c200241494b3f1834cd0aef8dc02f7683 | [
"Apache-2.0"
] | 6 | 2020-10-14T15:29:10.000Z | 2022-02-12T18:58:54.000Z | ffight/lcs/weapon/A.asm | zengfr/arcade_game_romhacking_sourcecode_top_secret_data | a4a0c86c200241494b3f1834cd0aef8dc02f7683 | [
"Apache-2.0"
] | null | null | null | ffight/lcs/weapon/A.asm | zengfr/arcade_game_romhacking_sourcecode_top_secret_data | a4a0c86c200241494b3f1834cd0aef8dc02f7683 | [
"Apache-2.0"
] | 1 | 2020-12-17T08:59:10.000Z | 2020-12-17T08:59:10.000Z | copyright zengfr site:http://github.com/zengfr/romhack
003084 move.w ($50,A6), D0 [1p+ A, 1p+ C, boss+A, boss+C, weapon+ A, weapon+ C]
0030BA rts [boss+A, boss+C, container+ A, container+ C, enemy+ A, enemy+ C, weapon+ A, weapon+ C]
003A0E movem.l D0-D3, -(A6)
003A12 move.w D4, ($4e,A6)
004422 move.l ($a,A0), ($a,A6) [weapon+ 6, weapon+ 8]
004428 move.w ($5a,A0), ($5a,A6) [weapon+ A, weapon+ C]
004476 move.b (A2), D0 [weapon+ A]
004492 moveq #$1, D0 [weapon+ A]
009ACA dbra D5, $9ac8
0354C6 move.w ($a,A6), ($a,A4)
0354CC move.w ($6,A6), ($6,A4) [weapon+ A]
03D140 move.w ($a,A6), ($a,A4) [weapon+13]
03D146 move.w ($6,A6), ($6,A4) [weapon+ A]
057C12 move.l ($e,A6), ($a,A6)
057C18 move.b #$2, ($4,A6) [weapon+ A, weapon+ C]
057CA4 movea.w ($4c,A6), A0 [weapon+ A, weapon+ C]
057D36 move.b #$0, ($3,A6) [weapon+ A, weapon+ C]
058C12 move.l ($e,A6), ($a,A6)
058C18 move.b #$2, ($4,A6) [weapon+ A, weapon+ C]
058CCA tst.b ($122,A5) [weapon+ A, weapon+ C]
058E96 move.w ($e,A6), ($a,A6) [weapon+ 4]
058E9C move.w #$280, ($54,A6) [weapon+ A]
0596E4 move.w #$400, ($2,A6) [weapon+ A, weapon+ C]
0597E8 move.l ($a,A0), ($a,A6) [weapon+ 6, weapon+ 8]
0597EE move.l ($e,A0), ($e,A6) [weapon+ A, weapon+ C]
05982E move.w (A2), D0 [weapon+ A]
05A980 move.w D0, ($a,A4) [weapon+ E]
05A984 move.w ($6,A6), ($6,A4) [weapon+ A]
copyright zengfr site:http://github.com/zengfr/romhack
| 43.575758 | 98 | 0.586231 |
76e5c5c9ef69c3c8f635f144e292571f360102b1 | 1,608 | asm | Assembly | programs/oeis/073/A073577.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/073/A073577.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/073/A073577.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A073577: a(n) = 4*n^2 + 4*n - 1.
; 7,23,47,79,119,167,223,287,359,439,527,623,727,839,959,1087,1223,1367,1519,1679,1847,2023,2207,2399,2599,2807,3023,3247,3479,3719,3967,4223,4487,4759,5039,5327,5623,5927,6239,6559,6887,7223,7567,7919,8279,8647,9023,9407,9799,10199,10607,11023,11447,11879,12319,12767,13223,13687,14159,14639,15127,15623,16127,16639,17159,17687,18223,18767,19319,19879,20447,21023,21607,22199,22799,23407,24023,24647,25279,25919,26567,27223,27887,28559,29239,29927,30623,31327,32039,32759,33487,34223,34967,35719,36479,37247,38023,38807,39599,40399,41207,42023,42847,43679,44519,45367,46223,47087,47959,48839,49727,50623,51527,52439,53359,54287,55223,56167,57119,58079,59047,60023,61007,61999,62999,64007,65023,66047,67079,68119,69167,70223,71287,72359,73439,74527,75623,76727,77839,78959,80087,81223,82367,83519,84679,85847,87023,88207,89399,90599,91807,93023,94247,95479,96719,97967,99223,100487,101759,103039,104327,105623,106927,108239,109559,110887,112223,113567,114919,116279,117647,119023,120407,121799,123199,124607,126023,127447,128879,130319,131767,133223,134687,136159,137639,139127,140623,142127,143639,145159,146687,148223,149767,151319,152879,154447,156023,157607,159199,160799,162407,164023,165647,167279,168919,170567,172223,173887,175559,177239,178927,180623,182327,184039,185759,187487,189223,190967,192719,194479,196247,198023,199807,201599,203399,205207,207023,208847,210679,212519,214367,216223,218087,219959,221839,223727,225623,227527,229439,231359,233287,235223,237167,239119,241079,243047,245023,247007,248999,250999
mul $0,2
mov $1,$0
add $1,3
pow $1,2
sub $1,2
| 178.666667 | 1,525 | 0.817164 |
648231368d9cf8712aa153068ad442d796b2dc86 | 17 | asm | Assembly | Assembly Microbenchmarks/addTest.asm | idn0971/HLS_Benchmarking | 1dccf2c83d8e7bb4f2a50bc2b7e464bb7c270f65 | [
"MIT"
] | null | null | null | Assembly Microbenchmarks/addTest.asm | idn0971/HLS_Benchmarking | 1dccf2c83d8e7bb4f2a50bc2b7e464bb7c270f65 | [
"MIT"
] | null | null | null | Assembly Microbenchmarks/addTest.asm | idn0971/HLS_Benchmarking | 1dccf2c83d8e7bb4f2a50bc2b7e464bb7c270f65 | [
"MIT"
] | null | null | null | addi t0, zero, 10 | 17 | 17 | 0.705882 |
25dd9dfe1191ac80bf6752be9e50aedfd56b2050 | 455 | asm | Assembly | src/asm/load_gdt.asm | theobori/drunkOS | a3ec1fbefd6f8af86c4dda87f2ccfc9784d4302f | [
"MIT"
] | 74 | 2021-06-01T14:18:28.000Z | 2022-03-30T16:15:27.000Z | src/asm/load_gdt.asm | theobori/drunkOS | a3ec1fbefd6f8af86c4dda87f2ccfc9784d4302f | [
"MIT"
] | 4 | 2021-06-17T14:52:16.000Z | 2021-07-01T23:58:35.000Z | src/asm/load_gdt.asm | theobori/drunkOS | a3ec1fbefd6f8af86c4dda87f2ccfc9784d4302f | [
"MIT"
] | 9 | 2021-06-06T18:20:16.000Z | 2022-03-12T03:25:39.000Z | section .text
global load_gdt
load_gdt:
mov eax, [esp + 4] ; get gdt pointer
lgdt [eax] ; load gdt
mov ax, 0x10 ; kernel data segment
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
cli ; clear interrupts
mov eax, cr0 ; set bit 0 in cr0 to enter protected mode
or eax, 1
mov cr0, eax
jmp 0x08:far_jump ; jump to far with code data segment
far_jump:
ret
| 18.958333 | 62 | 0.569231 |
9f3376ebf6a51e67eb4313cb979b7796b83bf59e | 323 | asm | Assembly | programs/oeis/141/A141725.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/141/A141725.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/141/A141725.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A141725: a(n) = 4^(n+1) - 3.
; 1,13,61,253,1021,4093,16381,65533,262141,1048573,4194301,16777213,67108861,268435453,1073741821,4294967293,17179869181,68719476733,274877906941,1099511627773,4398046511101,17592186044413,70368744177661,281474976710653,1125899906842621,4503599627370493
add $0,1
mov $1,4
pow $1,$0
sub $1,3
| 40.375 | 253 | 0.801858 |
6b26286f467085652a68ea6c55164c586bb750bd | 1,295 | asm | Assembly | examples/asm-64/array_func.asm | patrickf2000/upl | a58e3fd3f185e52d40332d4e7473ff7de8245f04 | [
"BSD-3-Clause"
] | null | null | null | examples/asm-64/array_func.asm | patrickf2000/upl | a58e3fd3f185e52d40332d4e7473ff7de8245f04 | [
"BSD-3-Clause"
] | 6 | 2019-06-15T12:38:26.000Z | 2019-06-15T13:03:05.000Z | examples/asm-64/array_func.asm | patrickf2000/upl | a58e3fd3f185e52d40332d4e7473ff7de8245f04 | [
"BSD-3-Clause"
] | null | null | null | .intel_syntax noprefix
.data
STR_1: .string "Index 1:"
STR_2: .string ""
STR_3: .string "Printing numbers..."
STR_4: .string "Done"
.bss
.text
.extern puts
.extern printf
.extern exit
.extern fflush
.extern input_int
.extern print_int
.global print_numbers
.global main
print_numbers:
push rbp
mov rbp, rsp
sub rsp, 48
mov rax, rdi
mov [rbp-8], rax
mov DWORD PTR [rbp-20], 0
mov DWORD PTR [rbp-24], 0
mov rax, [rbp-8]
mov eax, [rax+4]
mov DWORD PTR [rbp-20], eax
mov edi, OFFSET FLAT:STR_1
call puts
mov eax, [rbp-20]
mov edi, eax
call print_int
mov edi, OFFSET FLAT:STR_2
call puts
jmp L2
L1:
mov rax, [rbp-8]
mov eax, [rbp-24]
cdqe
mov rbx, rax
mov rax, [rbp-8]
imul rbx, 4
add rax, rbx
mov eax, [rax]
mov DWORD PTR [rbp-20], eax
mov eax, [rbp-20]
mov edi, eax
call print_int
mov eax, [rbp-24]
add eax, 1
mov DWORD PTR[rbp-24], eax
L2:
mov eax, [rbp-24]
cmp eax, 5
jl L1
leave
ret
main:
push rbp
mov rbp, rsp
sub rsp, 128
mov DWORD PTR [rbp-24], 9
mov DWORD PTR [rbp-20], 8
mov DWORD PTR [rbp-16], 7
mov DWORD PTR [rbp-12], 6
mov DWORD PTR [rbp-8], 5
mov edi, OFFSET FLAT:STR_3
call puts
lea rax, [rbp-24]
mov rdi, rax
call print_numbers
mov edi, OFFSET FLAT:STR_4
call puts
leave
ret
| 13.214286 | 37 | 0.646332 |
eae74d1b5ccf705f6cff3f73c6e1849d8c60a209 | 415 | asm | Assembly | ch10/HelloNew.asm | William0Friend/my_masm | e8073266c03c01424ad84b9ed9cf13e9da1eabb1 | [
"Apache-2.0"
] | null | null | null | ch10/HelloNew.asm | William0Friend/my_masm | e8073266c03c01424ad84b9ed9cf13e9da1eabb1 | [
"Apache-2.0"
] | null | null | null | ch10/HelloNew.asm | William0Friend/my_masm | e8073266c03c01424ad84b9ed9cf13e9da1eabb1 | [
"Apache-2.0"
] | null | null | null | ; Macro Functions (HelloNew.asm)
; Shows how to use macros to configure
; a program to run on multiple platforms.
INCLUDE Macros.inc
IF IsDefined( RealMode )
INCLUDE Irvine16.inc
ELSE
INCLUDE Irvine32.inc
ENDIF
.code
main PROC
Startup
mWrite <"This program can be assembled to run ",0dh,0ah>
mWrite <"in both Real mode and Protected mode.",0dh,0ah>
exit
main ENDP
END main | 18.863636 | 58 | 0.696386 |
31698144461b8f4b4684ddacaab5e594d749d6aa | 525 | asm | Assembly | programs/oeis/168/A168672.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/168/A168672.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/168/A168672.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A168672: Numbers that are congruent to {2,13} mod 17.
; 2,13,19,30,36,47,53,64,70,81,87,98,104,115,121,132,138,149,155,166,172,183,189,200,206,217,223,234,240,251,257,268,274,285,291,302,308,319,325,336,342,353,359,370,376,387,393,404,410,421,427,438,444,455,461,472,478,489,495,506,512,523,529,540,546,557,563,574,580,591,597,608,614,625,631,642,648,659,665,676,682,693,699,710,716,727,733,744,750,761,767,778,784,795,801,812,818,829,835,846
mov $1,32
add $1,$0
div $0,2
mul $0,5
mul $1,11
sub $1,$0
sub $1,350
mov $0,$1
| 43.75 | 388 | 0.706667 |
3d9d0002a87c520f59646081fccf2c6ca9b27e91 | 808 | asm | Assembly | oeis/074/A074741.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/074/A074741.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/074/A074741.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A074741: Sum of squares of gaps between consecutive primes.
; Submitted by Jon Maiga
; 1,5,9,25,29,45,49,65,101,105,141,157,161,177,213,249,253,289,305,309,345,361,397,461,477,481,497,501,517,713,729,765,769,869,873,909,945,961,997,1033,1037,1137,1141,1157,1161,1305,1449,1465,1469,1485,1521,1525,1625,1661,1697,1733,1737,1773,1789,1793,1893,2089,2105,2109,2125,2321,2357,2457,2461,2477,2513,2577,2613,2649,2665,2701,2765,2781,2845,2945,2949,3049,3053,3089,3105,3141,3205,3221,3225,3241,3385,3449,3465,3529,3545,3581,3725,3729,4053,4089
mov $2,$0
add $2,1
mov $4,$0
lpb $2
mov $0,$4
sub $2,1
sub $0,$2
add $0,1
seq $0,40 ; The prime numbers.
div $0,2
mul $0,2
sub $0,1
seq $0,64722 ; a(1) = 0; for n >= 2, a(n) = n - (largest prime <= n).
add $0,1
pow $0,2
add $3,$0
lpe
mov $0,$3
| 35.130435 | 451 | 0.679455 |
a745d060e43426ede250d196e2e6f33d3a443f36 | 421 | asm | Assembly | oeis/122/A122946.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/122/A122946.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/122/A122946.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A122946: a(0)=a(1)=0, a(2)=a(3)=2, for n>=3 a(n)=a(n-1)+4*a(n-3).
; Submitted by Jon Maiga
; 0,0,2,2,2,10,18,26,66,138,242,506,1058,2026,4050,8282,16386,32586,65714,131258,261602,524458,1049490,2095898,4193730,8391690,16775282,33550202,67116962,134218090,268418898,536886746,1073759106,2147434698
mov $3,1
lpb $0
sub $0,1
mov $1,$4
mul $4,3
add $1,$4
mov $4,$2
add $2,$3
mov $3,$1
lpe
mov $0,$4
mul $0,2
| 24.764706 | 205 | 0.657957 |
726bf460b4a92ab697e393afd34faa1c554a1bff | 9,554 | asm | Assembly | game.asm | adamsmasher/bustfree | 446d6777f42d3baa57f29ec9e4613a3e5cd4afe9 | [
"MIT"
] | null | null | null | game.asm | adamsmasher/bustfree | 446d6777f42d3baa57f29ec9e4613a3e5cd4afe9 | [
"MIT"
] | null | null | null | game.asm | adamsmasher/bustfree | 446d6777f42d3baa57f29ec9e4613a3e5cd4afe9 | [
"MIT"
] | null | null | null | INCLUDE "ball.inc"
INCLUDE "game.inc"
INCLUDE "paddle.inc"
INCLUDE "powerup.inc"
WINDOW_Y EQU 136
NUM_OF_STAGES EQU 2
GET_READY EQU 0
PLAYING EQU 1
NEXT_LEVEL EQU 2
GET_READY_JINGLE_LENGTH EQU 150
NEXT_LEVEL_JINGLE_LENGTH EQU 150
SECTION "GameVars", WRAM0
GameState: DS 1
GameTimer: DS 1
NoOfLives:: DS 1
BricksBroken:: DS 1
Score:: DS SCORE_BYTES
ReplacementTile: DS 1
ReplacementBrick:: DS 1
BrickDestroyed:: DS 1
SECTION "Game", ROM0
StartGame:: CALL InitGameVBlank
CALL InitGameStatHandler
CALL SetupWindowInterrupt
CALL LoadFont
CALL LoadBGGfx
CALL LoadSpriteGfx
CALL NewGame
CALL DrawStage
CALL DrawStatus
CALL TurnOnScreen
LD HL, GameLoopPtr
LD A, LOW(Game)
LD [HLI], A
LD [HL], HIGH(Game)
RET
SetupWindowInterrupt: ; fire interrupt on LYC=LY coincidence
LD A, %01000000
LDH [$41], A
; set LYC to the top of the window
LD A, WINDOW_Y
LDH [$45], A
; enable STAT interrupt
LD HL, $FFFF
SET 1, [HL]
RET
DisableWindowInterrupt: ; disable stat interrupt
LD HL, $FFFF
RES 1, [HL]
RET
Game: LD A, [GameState]
CP GET_READY
JP Z, DoGetReady
CP PLAYING
JP Z, DoPlaying
CP NEXT_LEVEL
JP Z, DoNextLevel
DoGetReady: LD HL, GameTimer
DEC [HL]
JP Z, StartPlaying
RET
DoNextLevel: LD HL, GameTimer
DEC [HL]
JP Z, LevelComplete
RET
StartPlaying: LD A, PLAYING
LD [GameState], A
RET
StartNextLevel: LD A, NEXT_LEVEL
LD [GameState], A
LD A, NEXT_LEVEL_JINGLE_LENGTH
RET
DoPlaying: CALL UpdateBall
CALL UpdatePaddle
CALL UpdateFlash
CALL UpdateEffect
CALL UpdateLasers
CALL UpdatePowerUps
CALL SetupBallOAM
CALL SetupPaddleOAM
CALL SetupFlashOAM
CALL SetupEffectOAM
CALL SetupLasersOAM
CALL SetupPowerUpOAM
RET
TurnOnScreen: ; enable display
; BG tiles at $8800
; map at $9800
; window map at $9C00
; sprites enabled
; bg enabled
; window enabled
LD A, %11100011
LDH [$40], A
; set window position
LD A, 136
LDH [$4A], A
LD A, 7
LDH [$4B], A
RET
ClearScore: LD HL, Score
XOR A
LD B, SCORE_BYTES
.loop LD [HLI], A
DEC B
JR NZ, .loop
RET
CapScore: LD A, $99
LD B, SCORE_BYTES
LD HL, Score
.loop LD [HLI], A
DEC B
JR NZ, .loop
RET
AddLifeOnScore: LD HL, Score
LD A, [HLI]
AND A
RET NZ
LD A, [HL]
AND $0F
CP $05
RET NZ
LD HL, NoOfLives
INC [HL]
RET
IncrementScore:: LD HL, Score
.loop LD A, L
CP LOW(Score) + SCORE_BYTES
JP Z, CapScore
LD A, [HL]
ADD 1 ; clears the carry flag, unlike INC
DAA
LD [HLI], A
JR C, .loop
CALL AddLifeOnScore
CALL DrawStatus
RET
NewGame: LD A, STARTING_LIVES
LD [NoOfLives], A
XOR A
LD [BricksBroken], A
LD [CurrentStage], A
CALL ClearScore
CALL InitGame
RET
GetReady: LD A, GET_READY
LD [GameState], A
LD A, GET_READY_JINGLE_LENGTH
LD [GameTimer], A
RET
InitGame: CALL InitBall
CALL InitPaddle
CALL InitFlash
CALL InitEffect
CALL InitLasers
CALL InitPowerUps
CALL InitStage
CALL GetReady
RET
LevelComplete: LD HL, CurrentStage
LD A, [HL]
INC A
CP NUM_OF_STAGES
JP Z, GameOver
LD [HL], A
CALL WaitForVBlank
CALL TurnOffScreen
CALL InitGame
CALL DrawStage
CALL ClearOAM
CALL TurnOnScreen
RET
GameOver: CALL WaitForVBlank
CALL TurnOffScreen
CALL DisableWindowInterrupt
CALL ClearVRAM
CALL StartGameOver
RET
PlayerDie:: LD HL, NoOfLives
DEC [HL]
JP Z, GameOver
LD A, BALL_ON_PADDLE
LD [BallState], A
LD A, NO_POWERUP
LD [PowerUpState], A
LD A, 1
LD [PaddleWidthTiles], A
LD A, PADDLE_WIDTH
LD [PaddleWidthPixels], A
CALL DrawStatus
RET
SetupReplaceBrickTransfer: ; compute destination and put in DE
LD D, $98
LD A, [HitBrickRow]
SRL A
ADD 2
SWAP A
ADD A
LD E, A
JR NC, .nc
INC D
.nc LD A, [HitBrickCol]
ADD 2
ADD E
LD E, A
; get pointer to next free update slot
LD A, [VRAMUpdateLen]
SLA A
SLA A
ADD LOW(VRAMUpdates)
LD L, A
LD H, HIGH(VRAMUpdates)
; write destination
LD A, E
LD [HLI], A
LD A, D
LD [HLI], A
; write tile to write
LD A, [ReplacementTile]
LD [HLI], A
; increment number of used slots
LD HL, VRAMUpdateLen
INC [HL]
RET
; writes into ReplacementTile the result of replacing the hit brick with ReplacementBrick
GetReplacementTile: ; determine if we care about the top or the bottom
LD A, [HitBrickRow]
RRCA
LD A, [ReplacementBrick]
LD B, A
LD A, [CollisionTile]
JR C, .bottom
.top SWAP B
AND $0F
JR .write
.bottom AND $F0
.write OR B
LD [ReplacementTile], A
RET
ReplaceHitBrick:: CALL GetReplacementTile
CALL SetupReplaceBrickTransfer
CALL ReplaceBrickOnStageMap
RET
ReplaceBrickOnStageMap: LD H, HIGH(StageMap)
LD A, [HitBrickRow]
SRL A ; divide 4px row by 2 to get 8px row
SWAP A
LD L, A
LD A, [HitBrickCol]
ADD L
LD L, A
LD A, [ReplacementTile]
LD [HL], A
RET
; TODO: implement a better random number generator
SpawnRandomPowerUp: LDH A, [$04]
BIT 2, A
RET Z
AND $03
RET Z ; TODO: when multiball is implemented, 0 should summon it
CP %01
JP Z, SpawnExtendPowerUp
CP %10
JP Z, SpawnLaserPowerUp
JP SpawnSpikePowerUp
OnBrickDestroyed:: CALL StartEffectAtHitBrick
CALL SpawnRandomPowerUp
CALL IncrementScore
LD A, 1
LD [BrickDestroyed], A
LD A, [TotalBricks]
LD B, A
LD HL, BricksBroken
LD A, [HL]
INC A
CP B
JP Z, StartNextLevel
LD [HL], A
RET
GameStatHandler: LD HL, $FF40
RES 1, [HL]
RET
InitGameStatHandler: LD HL, StatHandler
LD A, LOW(GameStatHandler)
LD [HLI], A
LD [HL], HIGH(GameStatHandler)
RET
| 29.670807 | 105 | 0.40067 |
da1ca5c243f2df3ca24884effba9351cda45e246 | 823 | asm | Assembly | vp8/decoder/arm/neon/dequantizeb_neon.asm | mrchapp/libvpx | c2a8d8b54c7ebefd1cd9c55f53b9e8378f088e8b | [
"BSD-3-Clause"
] | 1 | 2015-05-03T19:25:39.000Z | 2015-05-03T19:25:39.000Z | vp8/decoder/arm/neon/dequantizeb_neon.asm | mrchapp/libvpx | c2a8d8b54c7ebefd1cd9c55f53b9e8378f088e8b | [
"BSD-3-Clause"
] | null | null | null | vp8/decoder/arm/neon/dequantizeb_neon.asm | mrchapp/libvpx | c2a8d8b54c7ebefd1cd9c55f53b9e8378f088e8b | [
"BSD-3-Clause"
] | null | null | null | ;
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
;
; Use of this source code is governed by a BSD-style license
; that can be found in the LICENSE file in the root of the source
; tree. An additional intellectual property rights grant can be found
; in the file PATENTS. All contributing project authors may
; be found in the AUTHORS file in the root of the source tree.
;
EXPORT |vp8_dequantize_b_loop_neon|
ARM
REQUIRE8
PRESERVE8
AREA ||.text||, CODE, READONLY, ALIGN=2
; r0 short *Q,
; r1 short *DQC
; r2 short *DQ
|vp8_dequantize_b_loop_neon| PROC
vld1.16 {q0, q1}, [r0]
vld1.16 {q2, q3}, [r1]
vmul.i16 q4, q0, q2
vmul.i16 q5, q1, q3
vst1.16 {q4, q5}, [r2]
bx lr
ENDP
END
| 23.514286 | 70 | 0.617254 |
67a29b244270baedac37c3f705f05489d167ed28 | 729 | asm | Assembly | oeis/079/A079491.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/079/A079491.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/079/A079491.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A079491: Numerator of Sum_{k=0..n} binomial(n,k)/2^(k*(k-1)/2).
; Submitted by Jon Maiga
; 1,2,7,45,545,12625,564929,49162689,8361575425,2789624383745,1830776926245889,2368773751202917377,6053217182280501452801,30595465072175429929979905,306239118989330960523869667329,6076268165073202122463201684865025,239198582664419300152145186528847986689,18695822658621941046337828979079179582636033,2903153734958888497478908235373988092502127935489,896136589447511390013311031688174008082769340929933313,550131547682713642993452426546809586592058229910136493703169
mov $1,1
mov $3,$0
mov $4,1
lpb $3
mul $1,$4
mul $1,$3
add $5,1
div $1,$5
add $2,$1
mul $2,2
sub $3,1
mov $4,2
pow $4,$3
lpe
mov $0,$2
div $0,2
add $0,1
| 33.136364 | 465 | 0.801097 |
e1e616f1a114284b886c8bb4b2dda9fcc939ec87 | 6,759 | asm | Assembly | Transynther/x86/_processed/NONE/_zr_/i3-7100_9_0x84_notsx.log_21829_2913.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_zr_/i3-7100_9_0x84_notsx.log_21829_2913.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_zr_/i3-7100_9_0x84_notsx.log_21829_2913.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 %r15
push %r8
push %r9
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x33a9, %r8
nop
nop
inc %rbp
movb $0x61, (%r8)
nop
nop
nop
and %r11, %r11
lea addresses_A_ht+0x3a9, %rbx
nop
nop
nop
nop
dec %rcx
mov $0x6162636465666768, %r15
movq %r15, %xmm0
movups %xmm0, (%rbx)
nop
nop
cmp $42900, %rcx
lea addresses_normal_ht+0x23a9, %rbp
nop
cmp %r8, %r8
and $0xffffffffffffffc0, %rbp
movaps (%rbp), %xmm6
vpextrq $1, %xmm6, %r15
nop
nop
xor %r8, %r8
lea addresses_WT_ht+0x102ae, %rsi
lea addresses_WC_ht+0x73a9, %rdi
nop
nop
nop
nop
nop
and %r15, %r15
mov $54, %rcx
rep movsw
nop
nop
nop
nop
xor $33346, %r15
lea addresses_D_ht+0x12889, %r9
nop
add %r15, %r15
mov (%r9), %ebp
nop
nop
nop
nop
dec %r8
lea addresses_D_ht+0x113a9, %rbx
nop
xor $47369, %r8
mov $0x6162636465666768, %r11
movq %r11, (%rbx)
nop
nop
nop
nop
sub %rbx, %rbx
lea addresses_A_ht+0xf7e9, %r8
nop
nop
nop
nop
nop
inc %rdi
mov (%r8), %r9d
nop
nop
nop
nop
cmp %rdi, %rdi
lea addresses_A_ht+0x12fa9, %rbx
nop
nop
nop
nop
xor $35156, %r9
and $0xffffffffffffffc0, %rbx
vmovaps (%rbx), %ymm0
vextracti128 $0, %ymm0, %xmm0
vpextrq $0, %xmm0, %r11
nop
nop
nop
inc %rcx
lea addresses_UC_ht+0x16ba9, %r11
nop
nop
xor $17098, %r15
movups (%r11), %xmm6
vpextrq $0, %xmm6, %r9
nop
nop
nop
and %r8, %r8
lea addresses_normal_ht+0x1aba9, %rdi
nop
nop
sub %rbx, %rbx
movw $0x6162, (%rdi)
nop
nop
nop
sub %rbp, %rbp
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r9
pop %r8
pop %r15
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r14
push %rbp
push %rbx
push %rcx
// Store
lea addresses_D+0xf629, %r14
nop
inc %r11
mov $0x5152535455565758, %rbp
movq %rbp, (%r14)
// Exception!!!
nop
nop
nop
mov (0), %rcx
nop
nop
nop
nop
sub $35147, %r11
// Faulty Load
lea addresses_A+0x13ba9, %rbx
nop
nop
nop
nop
nop
add $11118, %r11
mov (%rbx), %r12w
lea oracles, %r14
and $0xff, %r12
shlq $12, %r12
mov (%r14,%r12,1), %r12
pop %rcx
pop %rbx
pop %rbp
pop %r14
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_A', 'same': False, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_D', 'same': False, 'size': 8, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_A', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 1, 'congruent': 11, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 16, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 16, 'congruent': 11, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_D_ht', 'same': True, 'size': 4, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 8, 'congruent': 10, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
{'src': {'type': 'addresses_A_ht', 'same': False, 'size': 4, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'same': False, 'size': 32, 'congruent': 9, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 16, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 2, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 33.460396 | 2,999 | 0.65631 |
27bac4b947acf31c77bc0daa545b9193f5e88a60 | 1,213 | asm | Assembly | programs/oeis/089/A089817.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/089/A089817.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/089/A089817.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A089817: a(n) = 5*a(n-1) - a(n-2) + 1 with a(0)=1, a(1)=6.
; 1,6,30,145,696,3336,15985,76590,366966,1758241,8424240,40362960,193390561,926589846,4439558670,21271203505,101916458856,488311090776,2339638995025,11209883884350,53709780426726,257339018249281,1232985310819680,5907587535849120,28304952368425921,135617174306280486,649780919162976510,3113287421508602065,14916656188380033816,71469993520391567016,342433311413577801265,1640696563547497439310,7861049506323909395286,37664550968072049537121,180461705334036338290320,864643975702109641914480,4142758173176511871282081,19849146890180449714495926,95102976277725736701197550,455665734498448233791491825,2183225696214515432256261576,10460462746574128927489816056,50119088036656129205192818705,240134977436706517098474277470,1150555799146876456287178568646,5512644018297675764337418565761,26412664292341502365399914260160,126550677443409836062662152735040,606340722924707677947910849415041,2905152937180128553676892094340166,13919423962975935090436549622285790,66691966877699546898505856017088785,319540410425521799402092730463158136
mov $1,8
mov $2,2
lpb $0
sub $0,1
add $2,$1
add $1,$2
add $1,$2
add $1,$2
lpe
sub $1,8
div $1,6
add $1,1
mov $0,$1
| 71.352941 | 1,025 | 0.873866 |
5573eaa7b7bf21f982f6eaeef0374b92a56aa70b | 833 | asm | Assembly | oeis/142/A142673.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/142/A142673.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/142/A142673.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A142673: Primes congruent to 13 mod 57.
; Submitted by Simon Strandgaard
; 13,127,241,811,1039,1153,1381,1609,1723,1951,2179,2293,2521,2749,3319,3433,3547,3889,4003,4231,4801,5827,6397,6967,7309,7537,7879,7993,8221,8563,8677,9133,9817,9931,10159,10273,10501,10729,10957,11071,11299,11527,12097,12211,12553,12781,13009,13693,13807,13921,14149,14947,15061,15289,15859,15973,16087,16657,17341,17569,17683,17911,18253,18367,18481,19051,19507,19963,20533,21559,21673,21787,22129,22699,23041,23269,23497,24181,24979,25321,26119,26347,27031,27259,27487,27943,28057,28513,28627
mov $1,6
mov $2,$0
add $2,2
pow $2,2
lpb $2
sub $2,2
mov $3,$1
mul $3,2
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,57
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
lpe
mov $0,$1
mul $0,2
sub $0,113
| 34.708333 | 496 | 0.731092 |
180446fcd70210161a2ff64721ec4530eab9a7e1 | 5,385 | asm | Assembly | game.asm | tevoran/x86-Pong | 27d4a980099c1f56c4ef58fb7f37f4016a3e2cfd | [
"MIT"
] | null | null | null | game.asm | tevoran/x86-Pong | 27d4a980099c1f56c4ef58fb7f37f4016a3e2cfd | [
"MIT"
] | null | null | null | game.asm | tevoran/x86-Pong | 27d4a980099c1f56c4ef58fb7f37f4016a3e2cfd | [
"MIT"
] | null | null | null | [BITS 16]
[ORG 0x7C00]
%include "macros.asm"
; CODE BEGIN
;
;
jmp 0x00:start ;setting code segment
start:
cli
xor ax, ax
mov ds, ax; setting data segment to zero
mov ss, ax; setting up stack segment
mov sp, 0x7C00 ;setting up stackpointer (just before the loaded bootsector)
mov ax, 0xA000 ;beginning of the framebuffer
mov es, ax; setting the extra segment for pixel drawing purposes
;setting 320x200 256 colors graphics mode
mov ax, 0x0013
sti
int 0x10
cli
;initializing keyboard
;wait until keyboard is ready
keyboard_check.loop:
xor ax,ax
in al,0x64
bt ax, 1 ;test if buffer is still full
jc keyboard_check.loop
;activating keyboard
mov al, 0xF4
out 0x60, al
;main game loop
main_loop:
CLS
;drawing stuff
mov si, player1_y
mov dx, word [player1_x]
call draw_player
mov si, player2_y
mov dx, word [player2_x]
call draw_player
DRAW_BALL
;updates
UPDATE_BALL_LOCATION
;get keyboard input
in al, 0x60 ;reading current keyboard input
xor cx, cx ;resetting player y-speed variable
cmp al, 0x11 ;Key W
je .player1_input_w
.player1_input_w_continue:
cmp al, 0x1F ;Key S
je .player1_input_s
.player1_input_s_continue:
mov word [player1_dy], cx ;writing player y-speed
;collisions
mov si, player1_y
call player_screen_collision
mov si, player2_y
call player_screen_collision
;ball outside of screen
;horizontal
mov word ax, [ball_x]
mov bx, RES_X
cmp ax, bx
ja .ball_out_of_screen
.ball_out_of_screen_continue:
;vertical
mov word ax, [ball_y]
mov bx, RES_Y
cmp ax, bx
jna .ball_out_of_screen_vertical_continue
call reflect_ball_y
.ball_out_of_screen_vertical_continue:
;player ball collision
mov cx, 1
call player_ball_check ;player 1 paddle collision
mov cx, 2
call player_ball_check ;player 2 paddle collision
ENEMY_AI
;waiting for the next frame to start
WAIT_FOR_RTC
jmp main_loop
;INPUT IFS
;KEY W
.player1_input_w:
mov word bx, [player1_y]
dec bx
mov word [player1_y], bx
mov cx, -1 ;set player y direction
jmp .player1_input_w_continue
;KEY S
.player1_input_s:
mov word bx, [player1_y]
inc bx
mov word [player1_y], bx
mov cx, 1 ;set player y direction
jmp .player1_input_s_continue
;ball collision ifs
;ball out of screen
.ball_out_of_screen:
mov ax, bx
shr ax,1 ;division by two
mov word [ball_x], ax
xor ax, ax
mov word [ball_dy], ax ;reset y-speed
jmp .ball_out_of_screen_continue
.functions:
;drawing player
;si=adress of the player paddle's y-position
;dx=player paddle's x-position
draw_player:
xor ax,ax
mov word [i], ax ;reset loop variable
player_draw_loop:
;calculating framebuffer offset
mov ax, RES_X
mov word bx, [si] ;loading y-position
add word bx, [i]
push dx ;save dx because the multiplication breaks it
mul bx
pop dx
add ax, dx ;adding player x-position
mov di, ax ;writing the framebuffer offset for the actual writing purposes
mov al, YELLOW ;color code within the 256 color palette
mov cx, PLAYER_WIDTH ;number of repitions in x direction
repe stosb ;write the line of player paddle
;incrementing loop counting variable
mov word ax, [i] ;reading loop variable
inc ax ;incrementing loop variable
mov word [i], ax ;writing loop variable
cmp ax, PLAYER_HEIGHT ;check if loop counter is smaller than PLAYER_HEIGHT
jl player_draw_loop ;jump if less
ret
;player screen collision
;si=address of the player1/2 y-value
player_screen_collision:
;keeping player 1 inside the screen
mov word ax, [si]
;if player is too low on the screen set him a bit higher
cmp ax, PLAYER_LOWEST
jae .player_screen_collision_too_low
.player_screen_collision_too_low_continue:
;if player is too high on the screen set him a bit lower
cmp ax, 0
je .player_screen_collision_too_high
.player_screen_collision_too_high_continue:
mov word [si], ax
ret
;if player is too low on the screen
.player_screen_collision_too_low:
mov ax, PLAYER_LOWEST
jmp .player_screen_collision_too_low_continue
;if player is too high on the screen
.player_screen_collision_too_high:
mov ax, 1
jmp .player_screen_collision_too_high_continue
;player_ball_collision
;cx=1 player one collision check
;else player two collision check
player_ball_check:
mov word ax, [ball_x]
cmp cx, 1
cmove word bx, [player1_x]
cmovne word bx, [player2_x]
add bx, PLAYER_WIDTH_HALF
cmp ax, bx
jne .player_y_ball_check_continue
;check if ball is below the top edge of the paddle
mov word ax, [ball_y]
cmp cx, 1
cmove word bx, [player1_y]
cmovne word bx, [player2_y]
cmp ax, bx
jl .player_y_ball_check_continue
;check if ball is above the bottom edge of the paddle
add bx, PLAYER_HEIGHT
cmp ax, bx
jae .player_y_ball_check_continue
;reflect ball
mov word ax, [ball_dx]
mov bx, -1
mul bx
mov word [ball_dx], ax
;add the y-speed of the paddle
cmp cx, 1 ;if player1
cmove ax, word [player1_dy]
cmovne ax, word [player2_dy]
add ax, word [ball_dy]
mov word [ball_dy], ax
.player_y_ball_check_continue:
ret
reflect_ball_y:
mov word ax, [ball_dy]
mov bx, -1
mul bx
mov word [ball_dy], ax
ret
.data:
timer_current dw 0
i dw 0 ;loop variable
player1_x dw 20
player1_y dw 80
player2_x dw 290
player2_y dw 80
player1_dy dw 0
player2_dy dw 0
ball_x dw 100
ball_y dw 85
ball_dy dw 0
ball_dx dw -1
MARK dq 0xFFFFFFFF
;padding to fill up the bootsector
times 510 - ($-$$) db 0
;bootsector marker
dw 0xAA55
; fill up to make a floppy image
times 1474560 - ($-$$) db 0 | 20.632184 | 76 | 0.76156 |
7adcd2b5a545771ff296bb9b826a4a8777d80acd | 6,517 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_2040.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_2040.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_2040.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r15
push %r9
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x1526, %rsi
lea addresses_D_ht+0xa9e6, %rdi
nop
nop
dec %r15
mov $101, %rcx
rep movsl
nop
nop
nop
nop
sub %r9, %r9
lea addresses_D_ht+0x7c06, %rsi
lea addresses_D_ht+0x1cfd6, %rdi
nop
nop
nop
nop
nop
sub $51916, %r15
mov $84, %rcx
rep movsq
nop
dec %rcx
lea addresses_D_ht+0xc43e, %r13
nop
nop
xor %r9, %r9
movb $0x61, (%r13)
nop
nop
nop
nop
nop
dec %rdi
lea addresses_A_ht+0x13466, %rsi
lea addresses_WC_ht+0x1c966, %rdi
nop
nop
sub $2683, %rdx
mov $67, %rcx
rep movsq
nop
nop
and $41867, %r9
lea addresses_WT_ht+0x7466, %rsi
lea addresses_A_ht+0x1ed6, %rdi
sub $16937, %r10
mov $65, %rcx
rep movsl
nop
nop
nop
nop
xor $43085, %rdx
lea addresses_normal_ht+0x51a6, %rcx
clflush (%rcx)
nop
nop
nop
nop
nop
and %r15, %r15
movb $0x61, (%rcx)
nop
and %rdx, %rdx
lea addresses_WT_ht+0x14c66, %r10
nop
nop
nop
nop
nop
add $44103, %rdx
movb (%r10), %r15b
xor $32648, %rdx
lea addresses_WC_ht+0x3466, %rdx
nop
nop
nop
nop
nop
xor %r15, %r15
mov (%rdx), %di
nop
nop
inc %r9
lea addresses_WT_ht+0x422e, %rsi
lea addresses_UC_ht+0x11821, %rdi
nop
nop
nop
nop
nop
sub %r13, %r13
mov $29, %rcx
rep movsb
nop
sub %r10, %r10
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r9
pop %r15
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %rax
push %rbp
push %rbx
push %rdi
push %rsi
// Store
lea addresses_A+0x1f8c6, %rbx
nop
add %rsi, %rsi
movw $0x5152, (%rbx)
// Exception!!!
nop
nop
nop
nop
mov (0), %rax
nop
nop
nop
add $54720, %r10
// Faulty Load
lea addresses_WT+0x6466, %rbp
nop
nop
cmp $45292, %r11
mov (%rbp), %r10
lea oracles, %rsi
and $0xff, %r10
shlq $12, %r10
mov (%rsi,%r10,1), %r10
pop %rsi
pop %rdi
pop %rbx
pop %rbp
pop %rax
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_WT', 'AVXalign': False, 'size': 32, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 2}}
[Faulty Load]
{'src': {'type': 'addresses_WT', 'AVXalign': False, 'size': 8, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}}
{'src': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 4, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 3}}
{'src': {'type': 'addresses_A_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}}
{'src': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 4, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 5}}
{'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 10}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 11}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}}
{'39': 21829}
39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39
*/
| 35.227027 | 2,999 | 0.658125 |
67f92bf6f2aca6cc321b0b9fa9a71a2f59ab68fc | 374 | asm | Assembly | data/wild/bug_contest_mons.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 6 | 2021-06-19T06:41:19.000Z | 2022-02-15T17:12:33.000Z | data/wild/bug_contest_mons.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 1 | 2020-12-16T01:11:20.000Z | 2020-12-16T22:53:56.000Z | data/wild/bug_contest_mons.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 3 | 2021-01-15T18:45:40.000Z | 2021-10-16T03:35:27.000Z | ContestMons:
; %, species, min, max
dbwbb 20, CATERPIE, 7, 18
dbwbb 20, WEEDLE, 7, 18
dbwbb 10, METAPOD, 9, 18
dbwbb 10, KAKUNA, 9, 18
dbwbb 5, BUTTERFREE, 12, 15
dbwbb 5, BEEDRILL, 12, 15
dbwbb 10, VENONAT, 10, 16
dbwbb 10, PARAS, 10, 17
dbwbb 5, SCYTHER, 13, 14
dbwbb 5, PINSIR, 13, 14
dbwbb -1, VENOMOTH, 30, 40
| 26.714286 | 30 | 0.572193 |
c8b8f503718212cd4f4a31552b9137ef222d4cf6 | 27,454 | asm | Assembly | library/javascript/node_modules/nodeschnaps/deps/node/deps/openssl/asm/x64-win32-masm/bn/x86_64-mont.asm | nihunde/kitchen-stove | 75e62ef2d2b48ba2017f75f436b0a24a918cc87b | [
"MIT"
] | 2,494 | 2015-02-11T04:34:13.000Z | 2022-03-31T14:21:47.000Z | library/javascript/node_modules/nodeschnaps/deps/node/deps/openssl/asm/x64-win32-masm/bn/x86_64-mont.asm | nihunde/kitchen-stove | 75e62ef2d2b48ba2017f75f436b0a24a918cc87b | [
"MIT"
] | 685 | 2015-02-11T17:14:26.000Z | 2021-04-13T09:58:39.000Z | deps/openssl/asm/x64-win32-masm/bn/x86_64-mont.asm | node-bd/node-debian | bb680831187689db0a7e1bcbf45d9f0894d2a229 | [
"Artistic-2.0"
] | 442 | 2015-02-12T13:45:46.000Z | 2022-03-21T05:28:05.000Z | OPTION DOTNAME
.text$ SEGMENT ALIGN(64) 'CODE'
PUBLIC bn_mul_mont
ALIGN 16
bn_mul_mont PROC PUBLIC
mov QWORD PTR[8+rsp],rdi ;WIN64 prologue
mov QWORD PTR[16+rsp],rsi
mov rax,rsp
$L$SEH_begin_bn_mul_mont::
mov rdi,rcx
mov rsi,rdx
mov rdx,r8
mov rcx,r9
mov r8,QWORD PTR[40+rsp]
mov r9,QWORD PTR[48+rsp]
test r9d,3
jnz $L$mul_enter
cmp r9d,8
jb $L$mul_enter
cmp rdx,rsi
jne $L$mul4x_enter
jmp $L$sqr4x_enter
ALIGN 16
$L$mul_enter::
push rbx
push rbp
push r12
push r13
push r14
push r15
mov r9d,r9d
lea r10,QWORD PTR[2+r9]
mov r11,rsp
neg r10
lea rsp,QWORD PTR[r10*8+rsp]
and rsp,-1024
mov QWORD PTR[8+r9*8+rsp],r11
$L$mul_body::
sub r11,rsp
and r11,-4096
$L$mul_page_walk::
mov r10,QWORD PTR[r11*1+rsp]
sub r11,4096
DB 066h,02eh
jnc $L$mul_page_walk
mov r12,rdx
mov r8,QWORD PTR[r8]
mov rbx,QWORD PTR[r12]
mov rax,QWORD PTR[rsi]
xor r14,r14
xor r15,r15
mov rbp,r8
mul rbx
mov r10,rax
mov rax,QWORD PTR[rcx]
imul rbp,r10
mov r11,rdx
mul rbp
add r10,rax
mov rax,QWORD PTR[8+rsi]
adc rdx,0
mov r13,rdx
lea r15,QWORD PTR[1+r15]
jmp $L$1st_enter
ALIGN 16
$L$1st::
add r13,rax
mov rax,QWORD PTR[r15*8+rsi]
adc rdx,0
add r13,r11
mov r11,r10
adc rdx,0
mov QWORD PTR[((-16))+r15*8+rsp],r13
mov r13,rdx
$L$1st_enter::
mul rbx
add r11,rax
mov rax,QWORD PTR[r15*8+rcx]
adc rdx,0
lea r15,QWORD PTR[1+r15]
mov r10,rdx
mul rbp
cmp r15,r9
jne $L$1st
add r13,rax
mov rax,QWORD PTR[rsi]
adc rdx,0
add r13,r11
adc rdx,0
mov QWORD PTR[((-16))+r15*8+rsp],r13
mov r13,rdx
mov r11,r10
xor rdx,rdx
add r13,r11
adc rdx,0
mov QWORD PTR[((-8))+r9*8+rsp],r13
mov QWORD PTR[r9*8+rsp],rdx
lea r14,QWORD PTR[1+r14]
jmp $L$outer
ALIGN 16
$L$outer::
mov rbx,QWORD PTR[r14*8+r12]
xor r15,r15
mov rbp,r8
mov r10,QWORD PTR[rsp]
mul rbx
add r10,rax
mov rax,QWORD PTR[rcx]
adc rdx,0
imul rbp,r10
mov r11,rdx
mul rbp
add r10,rax
mov rax,QWORD PTR[8+rsi]
adc rdx,0
mov r10,QWORD PTR[8+rsp]
mov r13,rdx
lea r15,QWORD PTR[1+r15]
jmp $L$inner_enter
ALIGN 16
$L$inner::
add r13,rax
mov rax,QWORD PTR[r15*8+rsi]
adc rdx,0
add r13,r10
mov r10,QWORD PTR[r15*8+rsp]
adc rdx,0
mov QWORD PTR[((-16))+r15*8+rsp],r13
mov r13,rdx
$L$inner_enter::
mul rbx
add r11,rax
mov rax,QWORD PTR[r15*8+rcx]
adc rdx,0
add r10,r11
mov r11,rdx
adc r11,0
lea r15,QWORD PTR[1+r15]
mul rbp
cmp r15,r9
jne $L$inner
add r13,rax
mov rax,QWORD PTR[rsi]
adc rdx,0
add r13,r10
mov r10,QWORD PTR[r15*8+rsp]
adc rdx,0
mov QWORD PTR[((-16))+r15*8+rsp],r13
mov r13,rdx
xor rdx,rdx
add r13,r11
adc rdx,0
add r13,r10
adc rdx,0
mov QWORD PTR[((-8))+r9*8+rsp],r13
mov QWORD PTR[r9*8+rsp],rdx
lea r14,QWORD PTR[1+r14]
cmp r14,r9
jl $L$outer
xor r14,r14
mov rax,QWORD PTR[rsp]
lea rsi,QWORD PTR[rsp]
mov r15,r9
jmp $L$sub
ALIGN 16
$L$sub:: sbb rax,QWORD PTR[r14*8+rcx]
mov QWORD PTR[r14*8+rdi],rax
mov rax,QWORD PTR[8+r14*8+rsi]
lea r14,QWORD PTR[1+r14]
dec r15
jnz $L$sub
sbb rax,0
xor r14,r14
and rsi,rax
not rax
mov rcx,rdi
and rcx,rax
mov r15,r9
or rsi,rcx
ALIGN 16
$L$copy::
mov rax,QWORD PTR[r14*8+rsi]
mov QWORD PTR[r14*8+rsp],r14
mov QWORD PTR[r14*8+rdi],rax
lea r14,QWORD PTR[1+r14]
sub r15,1
jnz $L$copy
mov rsi,QWORD PTR[8+r9*8+rsp]
mov rax,1
mov r15,QWORD PTR[rsi]
mov r14,QWORD PTR[8+rsi]
mov r13,QWORD PTR[16+rsi]
mov r12,QWORD PTR[24+rsi]
mov rbp,QWORD PTR[32+rsi]
mov rbx,QWORD PTR[40+rsi]
lea rsp,QWORD PTR[48+rsi]
$L$mul_epilogue::
mov rdi,QWORD PTR[8+rsp] ;WIN64 epilogue
mov rsi,QWORD PTR[16+rsp]
DB 0F3h,0C3h ;repret
$L$SEH_end_bn_mul_mont::
bn_mul_mont ENDP
ALIGN 16
bn_mul4x_mont PROC PRIVATE
mov QWORD PTR[8+rsp],rdi ;WIN64 prologue
mov QWORD PTR[16+rsp],rsi
mov rax,rsp
$L$SEH_begin_bn_mul4x_mont::
mov rdi,rcx
mov rsi,rdx
mov rdx,r8
mov rcx,r9
mov r8,QWORD PTR[40+rsp]
mov r9,QWORD PTR[48+rsp]
$L$mul4x_enter::
push rbx
push rbp
push r12
push r13
push r14
push r15
mov r9d,r9d
lea r10,QWORD PTR[4+r9]
mov r11,rsp
neg r10
lea rsp,QWORD PTR[r10*8+rsp]
and rsp,-1024
mov QWORD PTR[8+r9*8+rsp],r11
$L$mul4x_body::
sub r11,rsp
and r11,-4096
$L$mul4x_page_walk::
mov r10,QWORD PTR[r11*1+rsp]
sub r11,4096
DB 02eh
jnc $L$mul4x_page_walk
mov QWORD PTR[16+r9*8+rsp],rdi
mov r12,rdx
mov r8,QWORD PTR[r8]
mov rbx,QWORD PTR[r12]
mov rax,QWORD PTR[rsi]
xor r14,r14
xor r15,r15
mov rbp,r8
mul rbx
mov r10,rax
mov rax,QWORD PTR[rcx]
imul rbp,r10
mov r11,rdx
mul rbp
add r10,rax
mov rax,QWORD PTR[8+rsi]
adc rdx,0
mov rdi,rdx
mul rbx
add r11,rax
mov rax,QWORD PTR[8+rcx]
adc rdx,0
mov r10,rdx
mul rbp
add rdi,rax
mov rax,QWORD PTR[16+rsi]
adc rdx,0
add rdi,r11
lea r15,QWORD PTR[4+r15]
adc rdx,0
mov QWORD PTR[rsp],rdi
mov r13,rdx
jmp $L$1st4x
ALIGN 16
$L$1st4x::
mul rbx
add r10,rax
mov rax,QWORD PTR[((-16))+r15*8+rcx]
adc rdx,0
mov r11,rdx
mul rbp
add r13,rax
mov rax,QWORD PTR[((-8))+r15*8+rsi]
adc rdx,0
add r13,r10
adc rdx,0
mov QWORD PTR[((-24))+r15*8+rsp],r13
mov rdi,rdx
mul rbx
add r11,rax
mov rax,QWORD PTR[((-8))+r15*8+rcx]
adc rdx,0
mov r10,rdx
mul rbp
add rdi,rax
mov rax,QWORD PTR[r15*8+rsi]
adc rdx,0
add rdi,r11
adc rdx,0
mov QWORD PTR[((-16))+r15*8+rsp],rdi
mov r13,rdx
mul rbx
add r10,rax
mov rax,QWORD PTR[r15*8+rcx]
adc rdx,0
mov r11,rdx
mul rbp
add r13,rax
mov rax,QWORD PTR[8+r15*8+rsi]
adc rdx,0
add r13,r10
adc rdx,0
mov QWORD PTR[((-8))+r15*8+rsp],r13
mov rdi,rdx
mul rbx
add r11,rax
mov rax,QWORD PTR[8+r15*8+rcx]
adc rdx,0
lea r15,QWORD PTR[4+r15]
mov r10,rdx
mul rbp
add rdi,rax
mov rax,QWORD PTR[((-16))+r15*8+rsi]
adc rdx,0
add rdi,r11
adc rdx,0
mov QWORD PTR[((-32))+r15*8+rsp],rdi
mov r13,rdx
cmp r15,r9
jl $L$1st4x
mul rbx
add r10,rax
mov rax,QWORD PTR[((-16))+r15*8+rcx]
adc rdx,0
mov r11,rdx
mul rbp
add r13,rax
mov rax,QWORD PTR[((-8))+r15*8+rsi]
adc rdx,0
add r13,r10
adc rdx,0
mov QWORD PTR[((-24))+r15*8+rsp],r13
mov rdi,rdx
mul rbx
add r11,rax
mov rax,QWORD PTR[((-8))+r15*8+rcx]
adc rdx,0
mov r10,rdx
mul rbp
add rdi,rax
mov rax,QWORD PTR[rsi]
adc rdx,0
add rdi,r11
adc rdx,0
mov QWORD PTR[((-16))+r15*8+rsp],rdi
mov r13,rdx
xor rdi,rdi
add r13,r10
adc rdi,0
mov QWORD PTR[((-8))+r15*8+rsp],r13
mov QWORD PTR[r15*8+rsp],rdi
lea r14,QWORD PTR[1+r14]
ALIGN 4
$L$outer4x::
mov rbx,QWORD PTR[r14*8+r12]
xor r15,r15
mov r10,QWORD PTR[rsp]
mov rbp,r8
mul rbx
add r10,rax
mov rax,QWORD PTR[rcx]
adc rdx,0
imul rbp,r10
mov r11,rdx
mul rbp
add r10,rax
mov rax,QWORD PTR[8+rsi]
adc rdx,0
mov rdi,rdx
mul rbx
add r11,rax
mov rax,QWORD PTR[8+rcx]
adc rdx,0
add r11,QWORD PTR[8+rsp]
adc rdx,0
mov r10,rdx
mul rbp
add rdi,rax
mov rax,QWORD PTR[16+rsi]
adc rdx,0
add rdi,r11
lea r15,QWORD PTR[4+r15]
adc rdx,0
mov QWORD PTR[rsp],rdi
mov r13,rdx
jmp $L$inner4x
ALIGN 16
$L$inner4x::
mul rbx
add r10,rax
mov rax,QWORD PTR[((-16))+r15*8+rcx]
adc rdx,0
add r10,QWORD PTR[((-16))+r15*8+rsp]
adc rdx,0
mov r11,rdx
mul rbp
add r13,rax
mov rax,QWORD PTR[((-8))+r15*8+rsi]
adc rdx,0
add r13,r10
adc rdx,0
mov QWORD PTR[((-24))+r15*8+rsp],r13
mov rdi,rdx
mul rbx
add r11,rax
mov rax,QWORD PTR[((-8))+r15*8+rcx]
adc rdx,0
add r11,QWORD PTR[((-8))+r15*8+rsp]
adc rdx,0
mov r10,rdx
mul rbp
add rdi,rax
mov rax,QWORD PTR[r15*8+rsi]
adc rdx,0
add rdi,r11
adc rdx,0
mov QWORD PTR[((-16))+r15*8+rsp],rdi
mov r13,rdx
mul rbx
add r10,rax
mov rax,QWORD PTR[r15*8+rcx]
adc rdx,0
add r10,QWORD PTR[r15*8+rsp]
adc rdx,0
mov r11,rdx
mul rbp
add r13,rax
mov rax,QWORD PTR[8+r15*8+rsi]
adc rdx,0
add r13,r10
adc rdx,0
mov QWORD PTR[((-8))+r15*8+rsp],r13
mov rdi,rdx
mul rbx
add r11,rax
mov rax,QWORD PTR[8+r15*8+rcx]
adc rdx,0
add r11,QWORD PTR[8+r15*8+rsp]
adc rdx,0
lea r15,QWORD PTR[4+r15]
mov r10,rdx
mul rbp
add rdi,rax
mov rax,QWORD PTR[((-16))+r15*8+rsi]
adc rdx,0
add rdi,r11
adc rdx,0
mov QWORD PTR[((-32))+r15*8+rsp],rdi
mov r13,rdx
cmp r15,r9
jl $L$inner4x
mul rbx
add r10,rax
mov rax,QWORD PTR[((-16))+r15*8+rcx]
adc rdx,0
add r10,QWORD PTR[((-16))+r15*8+rsp]
adc rdx,0
mov r11,rdx
mul rbp
add r13,rax
mov rax,QWORD PTR[((-8))+r15*8+rsi]
adc rdx,0
add r13,r10
adc rdx,0
mov QWORD PTR[((-24))+r15*8+rsp],r13
mov rdi,rdx
mul rbx
add r11,rax
mov rax,QWORD PTR[((-8))+r15*8+rcx]
adc rdx,0
add r11,QWORD PTR[((-8))+r15*8+rsp]
adc rdx,0
lea r14,QWORD PTR[1+r14]
mov r10,rdx
mul rbp
add rdi,rax
mov rax,QWORD PTR[rsi]
adc rdx,0
add rdi,r11
adc rdx,0
mov QWORD PTR[((-16))+r15*8+rsp],rdi
mov r13,rdx
xor rdi,rdi
add r13,r10
adc rdi,0
add r13,QWORD PTR[r9*8+rsp]
adc rdi,0
mov QWORD PTR[((-8))+r15*8+rsp],r13
mov QWORD PTR[r15*8+rsp],rdi
cmp r14,r9
jl $L$outer4x
mov rdi,QWORD PTR[16+r9*8+rsp]
mov rax,QWORD PTR[rsp]
pxor xmm0,xmm0
mov rdx,QWORD PTR[8+rsp]
shr r9,2
lea rsi,QWORD PTR[rsp]
xor r14,r14
sub rax,QWORD PTR[rcx]
mov rbx,QWORD PTR[16+rsi]
mov rbp,QWORD PTR[24+rsi]
sbb rdx,QWORD PTR[8+rcx]
lea r15,QWORD PTR[((-1))+r9]
jmp $L$sub4x
ALIGN 16
$L$sub4x::
mov QWORD PTR[r14*8+rdi],rax
mov QWORD PTR[8+r14*8+rdi],rdx
sbb rbx,QWORD PTR[16+r14*8+rcx]
mov rax,QWORD PTR[32+r14*8+rsi]
mov rdx,QWORD PTR[40+r14*8+rsi]
sbb rbp,QWORD PTR[24+r14*8+rcx]
mov QWORD PTR[16+r14*8+rdi],rbx
mov QWORD PTR[24+r14*8+rdi],rbp
sbb rax,QWORD PTR[32+r14*8+rcx]
mov rbx,QWORD PTR[48+r14*8+rsi]
mov rbp,QWORD PTR[56+r14*8+rsi]
sbb rdx,QWORD PTR[40+r14*8+rcx]
lea r14,QWORD PTR[4+r14]
dec r15
jnz $L$sub4x
mov QWORD PTR[r14*8+rdi],rax
mov rax,QWORD PTR[32+r14*8+rsi]
sbb rbx,QWORD PTR[16+r14*8+rcx]
mov QWORD PTR[8+r14*8+rdi],rdx
sbb rbp,QWORD PTR[24+r14*8+rcx]
mov QWORD PTR[16+r14*8+rdi],rbx
sbb rax,0
mov QWORD PTR[24+r14*8+rdi],rbp
xor r14,r14
and rsi,rax
not rax
mov rcx,rdi
and rcx,rax
lea r15,QWORD PTR[((-1))+r9]
or rsi,rcx
movdqu xmm1,XMMWORD PTR[rsi]
movdqa XMMWORD PTR[rsp],xmm0
movdqu XMMWORD PTR[rdi],xmm1
jmp $L$copy4x
ALIGN 16
$L$copy4x::
movdqu xmm2,XMMWORD PTR[16+r14*1+rsi]
movdqu xmm1,XMMWORD PTR[32+r14*1+rsi]
movdqa XMMWORD PTR[16+r14*1+rsp],xmm0
movdqu XMMWORD PTR[16+r14*1+rdi],xmm2
movdqa XMMWORD PTR[32+r14*1+rsp],xmm0
movdqu XMMWORD PTR[32+r14*1+rdi],xmm1
lea r14,QWORD PTR[32+r14]
dec r15
jnz $L$copy4x
shl r9,2
movdqu xmm2,XMMWORD PTR[16+r14*1+rsi]
movdqa XMMWORD PTR[16+r14*1+rsp],xmm0
movdqu XMMWORD PTR[16+r14*1+rdi],xmm2
mov rsi,QWORD PTR[8+r9*8+rsp]
mov rax,1
mov r15,QWORD PTR[rsi]
mov r14,QWORD PTR[8+rsi]
mov r13,QWORD PTR[16+rsi]
mov r12,QWORD PTR[24+rsi]
mov rbp,QWORD PTR[32+rsi]
mov rbx,QWORD PTR[40+rsi]
lea rsp,QWORD PTR[48+rsi]
$L$mul4x_epilogue::
mov rdi,QWORD PTR[8+rsp] ;WIN64 epilogue
mov rsi,QWORD PTR[16+rsp]
DB 0F3h,0C3h ;repret
$L$SEH_end_bn_mul4x_mont::
bn_mul4x_mont ENDP
ALIGN 16
bn_sqr4x_mont PROC PRIVATE
mov QWORD PTR[8+rsp],rdi ;WIN64 prologue
mov QWORD PTR[16+rsp],rsi
mov rax,rsp
$L$SEH_begin_bn_sqr4x_mont::
mov rdi,rcx
mov rsi,rdx
mov rdx,r8
mov rcx,r9
mov r8,QWORD PTR[40+rsp]
mov r9,QWORD PTR[48+rsp]
$L$sqr4x_enter::
mov rax,rsp
push rbx
push rbp
push r12
push r13
push r14
push r15
shl r9d,3
mov r11,rsp
neg r9
mov r8,QWORD PTR[r8]
lea rsp,QWORD PTR[((-72))+r9*2+rsp]
and rsp,-1024
sub r11,rsp
and r11,-4096
$L$sqr4x_page_walk::
mov r10,QWORD PTR[r11*1+rsp]
sub r11,4096
DB 02eh
jnc $L$sqr4x_page_walk
mov r10,r9
neg r9
lea r11,QWORD PTR[((-48))+rax]
mov QWORD PTR[32+rsp],rdi
mov QWORD PTR[40+rsp],rcx
mov QWORD PTR[48+rsp],r8
mov QWORD PTR[56+rsp],r11
$L$sqr4x_body::
lea rbp,QWORD PTR[32+r10]
lea rsi,QWORD PTR[r9*1+rsi]
mov rcx,r9
mov r14,QWORD PTR[((-32))+rbp*1+rsi]
lea rdi,QWORD PTR[64+r9*2+rsp]
mov rax,QWORD PTR[((-24))+rbp*1+rsi]
lea rdi,QWORD PTR[((-32))+rbp*1+rdi]
mov rbx,QWORD PTR[((-16))+rbp*1+rsi]
mov r15,rax
mul r14
mov r10,rax
mov rax,rbx
mov r11,rdx
mov QWORD PTR[((-24))+rbp*1+rdi],r10
xor r10,r10
mul r14
add r11,rax
mov rax,rbx
adc r10,rdx
mov QWORD PTR[((-16))+rbp*1+rdi],r11
lea rcx,QWORD PTR[((-16))+rbp]
mov rbx,QWORD PTR[8+rcx*1+rsi]
mul r15
mov r12,rax
mov rax,rbx
mov r13,rdx
xor r11,r11
add r10,r12
lea rcx,QWORD PTR[16+rcx]
adc r11,0
mul r14
add r10,rax
mov rax,rbx
adc r11,rdx
mov QWORD PTR[((-8))+rcx*1+rdi],r10
jmp $L$sqr4x_1st
ALIGN 16
$L$sqr4x_1st::
mov rbx,QWORD PTR[rcx*1+rsi]
xor r12,r12
mul r15
add r13,rax
mov rax,rbx
adc r12,rdx
xor r10,r10
add r11,r13
adc r10,0
mul r14
add r11,rax
mov rax,rbx
adc r10,rdx
mov QWORD PTR[rcx*1+rdi],r11
mov rbx,QWORD PTR[8+rcx*1+rsi]
xor r13,r13
mul r15
add r12,rax
mov rax,rbx
adc r13,rdx
xor r11,r11
add r10,r12
adc r11,0
mul r14
add r10,rax
mov rax,rbx
adc r11,rdx
mov QWORD PTR[8+rcx*1+rdi],r10
mov rbx,QWORD PTR[16+rcx*1+rsi]
xor r12,r12
mul r15
add r13,rax
mov rax,rbx
adc r12,rdx
xor r10,r10
add r11,r13
adc r10,0
mul r14
add r11,rax
mov rax,rbx
adc r10,rdx
mov QWORD PTR[16+rcx*1+rdi],r11
mov rbx,QWORD PTR[24+rcx*1+rsi]
xor r13,r13
mul r15
add r12,rax
mov rax,rbx
adc r13,rdx
xor r11,r11
add r10,r12
lea rcx,QWORD PTR[32+rcx]
adc r11,0
mul r14
add r10,rax
mov rax,rbx
adc r11,rdx
mov QWORD PTR[((-8))+rcx*1+rdi],r10
cmp rcx,0
jne $L$sqr4x_1st
xor r12,r12
add r13,r11
adc r12,0
mul r15
add r13,rax
adc r12,rdx
mov QWORD PTR[rdi],r13
lea rbp,QWORD PTR[16+rbp]
mov QWORD PTR[8+rdi],r12
jmp $L$sqr4x_outer
ALIGN 16
$L$sqr4x_outer::
mov r14,QWORD PTR[((-32))+rbp*1+rsi]
lea rdi,QWORD PTR[64+r9*2+rsp]
mov rax,QWORD PTR[((-24))+rbp*1+rsi]
lea rdi,QWORD PTR[((-32))+rbp*1+rdi]
mov rbx,QWORD PTR[((-16))+rbp*1+rsi]
mov r15,rax
mov r10,QWORD PTR[((-24))+rbp*1+rdi]
xor r11,r11
mul r14
add r10,rax
mov rax,rbx
adc r11,rdx
mov QWORD PTR[((-24))+rbp*1+rdi],r10
xor r10,r10
add r11,QWORD PTR[((-16))+rbp*1+rdi]
adc r10,0
mul r14
add r11,rax
mov rax,rbx
adc r10,rdx
mov QWORD PTR[((-16))+rbp*1+rdi],r11
lea rcx,QWORD PTR[((-16))+rbp]
xor r12,r12
mov rbx,QWORD PTR[8+rcx*1+rsi]
xor r13,r13
add r12,QWORD PTR[8+rcx*1+rdi]
adc r13,0
mul r15
add r12,rax
mov rax,rbx
adc r13,rdx
xor r11,r11
add r10,r12
adc r11,0
mul r14
add r10,rax
mov rax,rbx
adc r11,rdx
mov QWORD PTR[8+rcx*1+rdi],r10
lea rcx,QWORD PTR[16+rcx]
jmp $L$sqr4x_inner
ALIGN 16
$L$sqr4x_inner::
mov rbx,QWORD PTR[rcx*1+rsi]
xor r12,r12
add r13,QWORD PTR[rcx*1+rdi]
adc r12,0
mul r15
add r13,rax
mov rax,rbx
adc r12,rdx
xor r10,r10
add r11,r13
adc r10,0
mul r14
add r11,rax
mov rax,rbx
adc r10,rdx
mov QWORD PTR[rcx*1+rdi],r11
mov rbx,QWORD PTR[8+rcx*1+rsi]
xor r13,r13
add r12,QWORD PTR[8+rcx*1+rdi]
adc r13,0
mul r15
add r12,rax
mov rax,rbx
adc r13,rdx
xor r11,r11
add r10,r12
lea rcx,QWORD PTR[16+rcx]
adc r11,0
mul r14
add r10,rax
mov rax,rbx
adc r11,rdx
mov QWORD PTR[((-8))+rcx*1+rdi],r10
cmp rcx,0
jne $L$sqr4x_inner
xor r12,r12
add r13,r11
adc r12,0
mul r15
add r13,rax
adc r12,rdx
mov QWORD PTR[rdi],r13
mov QWORD PTR[8+rdi],r12
add rbp,16
jnz $L$sqr4x_outer
mov r14,QWORD PTR[((-32))+rsi]
lea rdi,QWORD PTR[64+r9*2+rsp]
mov rax,QWORD PTR[((-24))+rsi]
lea rdi,QWORD PTR[((-32))+rbp*1+rdi]
mov rbx,QWORD PTR[((-16))+rsi]
mov r15,rax
xor r11,r11
mul r14
add r10,rax
mov rax,rbx
adc r11,rdx
mov QWORD PTR[((-24))+rdi],r10
xor r10,r10
add r11,r13
adc r10,0
mul r14
add r11,rax
mov rax,rbx
adc r10,rdx
mov QWORD PTR[((-16))+rdi],r11
mov rbx,QWORD PTR[((-8))+rsi]
mul r15
add r12,rax
mov rax,rbx
adc rdx,0
xor r11,r11
add r10,r12
mov r13,rdx
adc r11,0
mul r14
add r10,rax
mov rax,rbx
adc r11,rdx
mov QWORD PTR[((-8))+rdi],r10
xor r12,r12
add r13,r11
adc r12,0
mul r15
add r13,rax
mov rax,QWORD PTR[((-16))+rsi]
adc r12,rdx
mov QWORD PTR[rdi],r13
mov QWORD PTR[8+rdi],r12
mul rbx
add rbp,16
xor r14,r14
sub rbp,r9
xor r15,r15
add rax,r12
adc rdx,0
mov QWORD PTR[8+rdi],rax
mov QWORD PTR[16+rdi],rdx
mov QWORD PTR[24+rdi],r15
mov rax,QWORD PTR[((-16))+rbp*1+rsi]
lea rdi,QWORD PTR[64+r9*2+rsp]
xor r10,r10
mov r11,QWORD PTR[((-24))+rbp*2+rdi]
lea r12,QWORD PTR[r10*2+r14]
shr r10,63
lea r13,QWORD PTR[r11*2+rcx]
shr r11,63
or r13,r10
mov r10,QWORD PTR[((-16))+rbp*2+rdi]
mov r14,r11
mul rax
neg r15
mov r11,QWORD PTR[((-8))+rbp*2+rdi]
adc r12,rax
mov rax,QWORD PTR[((-8))+rbp*1+rsi]
mov QWORD PTR[((-32))+rbp*2+rdi],r12
adc r13,rdx
lea rbx,QWORD PTR[r10*2+r14]
mov QWORD PTR[((-24))+rbp*2+rdi],r13
sbb r15,r15
shr r10,63
lea r8,QWORD PTR[r11*2+rcx]
shr r11,63
or r8,r10
mov r10,QWORD PTR[rbp*2+rdi]
mov r14,r11
mul rax
neg r15
mov r11,QWORD PTR[8+rbp*2+rdi]
adc rbx,rax
mov rax,QWORD PTR[rbp*1+rsi]
mov QWORD PTR[((-16))+rbp*2+rdi],rbx
adc r8,rdx
lea rbp,QWORD PTR[16+rbp]
mov QWORD PTR[((-40))+rbp*2+rdi],r8
sbb r15,r15
jmp $L$sqr4x_shift_n_add
ALIGN 16
$L$sqr4x_shift_n_add::
lea r12,QWORD PTR[r10*2+r14]
shr r10,63
lea r13,QWORD PTR[r11*2+rcx]
shr r11,63
or r13,r10
mov r10,QWORD PTR[((-16))+rbp*2+rdi]
mov r14,r11
mul rax
neg r15
mov r11,QWORD PTR[((-8))+rbp*2+rdi]
adc r12,rax
mov rax,QWORD PTR[((-8))+rbp*1+rsi]
mov QWORD PTR[((-32))+rbp*2+rdi],r12
adc r13,rdx
lea rbx,QWORD PTR[r10*2+r14]
mov QWORD PTR[((-24))+rbp*2+rdi],r13
sbb r15,r15
shr r10,63
lea r8,QWORD PTR[r11*2+rcx]
shr r11,63
or r8,r10
mov r10,QWORD PTR[rbp*2+rdi]
mov r14,r11
mul rax
neg r15
mov r11,QWORD PTR[8+rbp*2+rdi]
adc rbx,rax
mov rax,QWORD PTR[rbp*1+rsi]
mov QWORD PTR[((-16))+rbp*2+rdi],rbx
adc r8,rdx
lea r12,QWORD PTR[r10*2+r14]
mov QWORD PTR[((-8))+rbp*2+rdi],r8
sbb r15,r15
shr r10,63
lea r13,QWORD PTR[r11*2+rcx]
shr r11,63
or r13,r10
mov r10,QWORD PTR[16+rbp*2+rdi]
mov r14,r11
mul rax
neg r15
mov r11,QWORD PTR[24+rbp*2+rdi]
adc r12,rax
mov rax,QWORD PTR[8+rbp*1+rsi]
mov QWORD PTR[rbp*2+rdi],r12
adc r13,rdx
lea rbx,QWORD PTR[r10*2+r14]
mov QWORD PTR[8+rbp*2+rdi],r13
sbb r15,r15
shr r10,63
lea r8,QWORD PTR[r11*2+rcx]
shr r11,63
or r8,r10
mov r10,QWORD PTR[32+rbp*2+rdi]
mov r14,r11
mul rax
neg r15
mov r11,QWORD PTR[40+rbp*2+rdi]
adc rbx,rax
mov rax,QWORD PTR[16+rbp*1+rsi]
mov QWORD PTR[16+rbp*2+rdi],rbx
adc r8,rdx
mov QWORD PTR[24+rbp*2+rdi],r8
sbb r15,r15
add rbp,32
jnz $L$sqr4x_shift_n_add
lea r12,QWORD PTR[r10*2+r14]
shr r10,63
lea r13,QWORD PTR[r11*2+rcx]
shr r11,63
or r13,r10
mov r10,QWORD PTR[((-16))+rdi]
mov r14,r11
mul rax
neg r15
mov r11,QWORD PTR[((-8))+rdi]
adc r12,rax
mov rax,QWORD PTR[((-8))+rsi]
mov QWORD PTR[((-32))+rdi],r12
adc r13,rdx
lea rbx,QWORD PTR[r10*2+r14]
mov QWORD PTR[((-24))+rdi],r13
sbb r15,r15
shr r10,63
lea r8,QWORD PTR[r11*2+rcx]
shr r11,63
or r8,r10
mul rax
neg r15
adc rbx,rax
adc r8,rdx
mov QWORD PTR[((-16))+rdi],rbx
mov QWORD PTR[((-8))+rdi],r8
mov rsi,QWORD PTR[40+rsp]
mov r8,QWORD PTR[48+rsp]
xor rcx,rcx
mov QWORD PTR[rsp],r9
sub rcx,r9
mov r10,QWORD PTR[64+rsp]
mov r14,r8
lea rax,QWORD PTR[64+r9*2+rsp]
lea rdi,QWORD PTR[64+r9*1+rsp]
mov QWORD PTR[8+rsp],rax
lea rsi,QWORD PTR[r9*1+rsi]
xor rbp,rbp
mov rax,QWORD PTR[rcx*1+rsi]
mov r9,QWORD PTR[8+rcx*1+rsi]
imul r14,r10
mov rbx,rax
jmp $L$sqr4x_mont_outer
ALIGN 16
$L$sqr4x_mont_outer::
xor r11,r11
mul r14
add r10,rax
mov rax,r9
adc r11,rdx
mov r15,r8
xor r10,r10
add r11,QWORD PTR[8+rcx*1+rdi]
adc r10,0
mul r14
add r11,rax
mov rax,rbx
adc r10,rdx
imul r15,r11
mov rbx,QWORD PTR[16+rcx*1+rsi]
xor r13,r13
add r12,r11
adc r13,0
mul r15
add r12,rax
mov rax,rbx
adc r13,rdx
mov QWORD PTR[8+rcx*1+rdi],r12
xor r11,r11
add r10,QWORD PTR[16+rcx*1+rdi]
adc r11,0
mul r14
add r10,rax
mov rax,r9
adc r11,rdx
mov r9,QWORD PTR[24+rcx*1+rsi]
xor r12,r12
add r13,r10
adc r12,0
mul r15
add r13,rax
mov rax,r9
adc r12,rdx
mov QWORD PTR[16+rcx*1+rdi],r13
xor r10,r10
add r11,QWORD PTR[24+rcx*1+rdi]
lea rcx,QWORD PTR[32+rcx]
adc r10,0
mul r14
add r11,rax
mov rax,rbx
adc r10,rdx
jmp $L$sqr4x_mont_inner
ALIGN 16
$L$sqr4x_mont_inner::
mov rbx,QWORD PTR[rcx*1+rsi]
xor r13,r13
add r12,r11
adc r13,0
mul r15
add r12,rax
mov rax,rbx
adc r13,rdx
mov QWORD PTR[((-8))+rcx*1+rdi],r12
xor r11,r11
add r10,QWORD PTR[rcx*1+rdi]
adc r11,0
mul r14
add r10,rax
mov rax,r9
adc r11,rdx
mov r9,QWORD PTR[8+rcx*1+rsi]
xor r12,r12
add r13,r10
adc r12,0
mul r15
add r13,rax
mov rax,r9
adc r12,rdx
mov QWORD PTR[rcx*1+rdi],r13
xor r10,r10
add r11,QWORD PTR[8+rcx*1+rdi]
adc r10,0
mul r14
add r11,rax
mov rax,rbx
adc r10,rdx
mov rbx,QWORD PTR[16+rcx*1+rsi]
xor r13,r13
add r12,r11
adc r13,0
mul r15
add r12,rax
mov rax,rbx
adc r13,rdx
mov QWORD PTR[8+rcx*1+rdi],r12
xor r11,r11
add r10,QWORD PTR[16+rcx*1+rdi]
adc r11,0
mul r14
add r10,rax
mov rax,r9
adc r11,rdx
mov r9,QWORD PTR[24+rcx*1+rsi]
xor r12,r12
add r13,r10
adc r12,0
mul r15
add r13,rax
mov rax,r9
adc r12,rdx
mov QWORD PTR[16+rcx*1+rdi],r13
xor r10,r10
add r11,QWORD PTR[24+rcx*1+rdi]
lea rcx,QWORD PTR[32+rcx]
adc r10,0
mul r14
add r11,rax
mov rax,rbx
adc r10,rdx
cmp rcx,0
jne $L$sqr4x_mont_inner
sub rcx,QWORD PTR[rsp]
mov r14,r8
xor r13,r13
add r12,r11
adc r13,0
mul r15
add r12,rax
mov rax,r9
adc r13,rdx
mov QWORD PTR[((-8))+rdi],r12
xor r11,r11
add r10,QWORD PTR[rdi]
adc r11,0
mov rbx,QWORD PTR[rcx*1+rsi]
add r10,rbp
adc r11,0
imul r14,QWORD PTR[16+rcx*1+rdi]
xor r12,r12
mov r9,QWORD PTR[8+rcx*1+rsi]
add r13,r10
mov r10,QWORD PTR[16+rcx*1+rdi]
adc r12,0
mul r15
add r13,rax
mov rax,rbx
adc r12,rdx
mov QWORD PTR[rdi],r13
xor rbp,rbp
add r12,QWORD PTR[8+rdi]
adc rbp,rbp
add r12,r11
lea rdi,QWORD PTR[16+rdi]
adc rbp,0
mov QWORD PTR[((-8))+rdi],r12
cmp rdi,QWORD PTR[8+rsp]
jb $L$sqr4x_mont_outer
mov r9,QWORD PTR[rsp]
mov QWORD PTR[rdi],rbp
mov rax,QWORD PTR[64+r9*1+rsp]
lea rbx,QWORD PTR[64+r9*1+rsp]
mov rsi,QWORD PTR[40+rsp]
shr r9,5
mov rdx,QWORD PTR[8+rbx]
xor rbp,rbp
mov rdi,QWORD PTR[32+rsp]
sub rax,QWORD PTR[rsi]
mov r10,QWORD PTR[16+rbx]
mov r11,QWORD PTR[24+rbx]
sbb rdx,QWORD PTR[8+rsi]
lea rcx,QWORD PTR[((-1))+r9]
jmp $L$sqr4x_sub
ALIGN 16
$L$sqr4x_sub::
mov QWORD PTR[rbp*8+rdi],rax
mov QWORD PTR[8+rbp*8+rdi],rdx
sbb r10,QWORD PTR[16+rbp*8+rsi]
mov rax,QWORD PTR[32+rbp*8+rbx]
mov rdx,QWORD PTR[40+rbp*8+rbx]
sbb r11,QWORD PTR[24+rbp*8+rsi]
mov QWORD PTR[16+rbp*8+rdi],r10
mov QWORD PTR[24+rbp*8+rdi],r11
sbb rax,QWORD PTR[32+rbp*8+rsi]
mov r10,QWORD PTR[48+rbp*8+rbx]
mov r11,QWORD PTR[56+rbp*8+rbx]
sbb rdx,QWORD PTR[40+rbp*8+rsi]
lea rbp,QWORD PTR[4+rbp]
dec rcx
jnz $L$sqr4x_sub
mov QWORD PTR[rbp*8+rdi],rax
mov rax,QWORD PTR[32+rbp*8+rbx]
sbb r10,QWORD PTR[16+rbp*8+rsi]
mov QWORD PTR[8+rbp*8+rdi],rdx
sbb r11,QWORD PTR[24+rbp*8+rsi]
mov QWORD PTR[16+rbp*8+rdi],r10
sbb rax,0
mov QWORD PTR[24+rbp*8+rdi],r11
xor rbp,rbp
and rbx,rax
not rax
mov rsi,rdi
and rsi,rax
lea rcx,QWORD PTR[((-1))+r9]
or rbx,rsi
pxor xmm0,xmm0
lea rsi,QWORD PTR[64+r9*8+rsp]
movdqu xmm1,XMMWORD PTR[rbx]
lea rsi,QWORD PTR[r9*8+rsi]
movdqa XMMWORD PTR[64+rsp],xmm0
movdqa XMMWORD PTR[rsi],xmm0
movdqu XMMWORD PTR[rdi],xmm1
jmp $L$sqr4x_copy
ALIGN 16
$L$sqr4x_copy::
movdqu xmm2,XMMWORD PTR[16+rbp*1+rbx]
movdqu xmm1,XMMWORD PTR[32+rbp*1+rbx]
movdqa XMMWORD PTR[80+rbp*1+rsp],xmm0
movdqa XMMWORD PTR[96+rbp*1+rsp],xmm0
movdqa XMMWORD PTR[16+rbp*1+rsi],xmm0
movdqa XMMWORD PTR[32+rbp*1+rsi],xmm0
movdqu XMMWORD PTR[16+rbp*1+rdi],xmm2
movdqu XMMWORD PTR[32+rbp*1+rdi],xmm1
lea rbp,QWORD PTR[32+rbp]
dec rcx
jnz $L$sqr4x_copy
movdqu xmm2,XMMWORD PTR[16+rbp*1+rbx]
movdqa XMMWORD PTR[80+rbp*1+rsp],xmm0
movdqa XMMWORD PTR[16+rbp*1+rsi],xmm0
movdqu XMMWORD PTR[16+rbp*1+rdi],xmm2
mov rsi,QWORD PTR[56+rsp]
mov rax,1
mov r15,QWORD PTR[rsi]
mov r14,QWORD PTR[8+rsi]
mov r13,QWORD PTR[16+rsi]
mov r12,QWORD PTR[24+rsi]
mov rbp,QWORD PTR[32+rsi]
mov rbx,QWORD PTR[40+rsi]
lea rsp,QWORD PTR[48+rsi]
$L$sqr4x_epilogue::
mov rdi,QWORD PTR[8+rsp] ;WIN64 epilogue
mov rsi,QWORD PTR[16+rsp]
DB 0F3h,0C3h ;repret
$L$SEH_end_bn_sqr4x_mont::
bn_sqr4x_mont ENDP
DB 77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105
DB 112,108,105,99,97,116,105,111,110,32,102,111,114,32,120,56
DB 54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83
DB 32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115
DB 115,108,46,111,114,103,62,0
ALIGN 16
EXTERN __imp_RtlVirtualUnwind:NEAR
ALIGN 16
mul_handler PROC PRIVATE
push rsi
push rdi
push rbx
push rbp
push r12
push r13
push r14
push r15
pushfq
sub rsp,64
mov rax,QWORD PTR[120+r8]
mov rbx,QWORD PTR[248+r8]
mov rsi,QWORD PTR[8+r9]
mov r11,QWORD PTR[56+r9]
mov r10d,DWORD PTR[r11]
lea r10,QWORD PTR[r10*1+rsi]
cmp rbx,r10
jb $L$common_seh_tail
mov rax,QWORD PTR[152+r8]
mov r10d,DWORD PTR[4+r11]
lea r10,QWORD PTR[r10*1+rsi]
cmp rbx,r10
jae $L$common_seh_tail
mov r10,QWORD PTR[192+r8]
mov rax,QWORD PTR[8+r10*8+rax]
lea rax,QWORD PTR[48+rax]
mov rbx,QWORD PTR[((-8))+rax]
mov rbp,QWORD PTR[((-16))+rax]
mov r12,QWORD PTR[((-24))+rax]
mov r13,QWORD PTR[((-32))+rax]
mov r14,QWORD PTR[((-40))+rax]
mov r15,QWORD PTR[((-48))+rax]
mov QWORD PTR[144+r8],rbx
mov QWORD PTR[160+r8],rbp
mov QWORD PTR[216+r8],r12
mov QWORD PTR[224+r8],r13
mov QWORD PTR[232+r8],r14
mov QWORD PTR[240+r8],r15
jmp $L$common_seh_tail
mul_handler ENDP
ALIGN 16
sqr_handler PROC PRIVATE
push rsi
push rdi
push rbx
push rbp
push r12
push r13
push r14
push r15
pushfq
sub rsp,64
mov rax,QWORD PTR[120+r8]
mov rbx,QWORD PTR[248+r8]
lea r10,QWORD PTR[$L$sqr4x_body]
cmp rbx,r10
jb $L$common_seh_tail
mov rax,QWORD PTR[152+r8]
lea r10,QWORD PTR[$L$sqr4x_epilogue]
cmp rbx,r10
jae $L$common_seh_tail
mov rax,QWORD PTR[56+rax]
lea rax,QWORD PTR[48+rax]
mov rbx,QWORD PTR[((-8))+rax]
mov rbp,QWORD PTR[((-16))+rax]
mov r12,QWORD PTR[((-24))+rax]
mov r13,QWORD PTR[((-32))+rax]
mov r14,QWORD PTR[((-40))+rax]
mov r15,QWORD PTR[((-48))+rax]
mov QWORD PTR[144+r8],rbx
mov QWORD PTR[160+r8],rbp
mov QWORD PTR[216+r8],r12
mov QWORD PTR[224+r8],r13
mov QWORD PTR[232+r8],r14
mov QWORD PTR[240+r8],r15
$L$common_seh_tail::
mov rdi,QWORD PTR[8+rax]
mov rsi,QWORD PTR[16+rax]
mov QWORD PTR[152+r8],rax
mov QWORD PTR[168+r8],rsi
mov QWORD PTR[176+r8],rdi
mov rdi,QWORD PTR[40+r9]
mov rsi,r8
mov ecx,154
DD 0a548f3fch
mov rsi,r9
xor rcx,rcx
mov rdx,QWORD PTR[8+rsi]
mov r8,QWORD PTR[rsi]
mov r9,QWORD PTR[16+rsi]
mov r10,QWORD PTR[40+rsi]
lea r11,QWORD PTR[56+rsi]
lea r12,QWORD PTR[24+rsi]
mov QWORD PTR[32+rsp],r10
mov QWORD PTR[40+rsp],r11
mov QWORD PTR[48+rsp],r12
mov QWORD PTR[56+rsp],rcx
call QWORD PTR[__imp_RtlVirtualUnwind]
mov eax,1
add rsp,64
popfq
pop r15
pop r14
pop r13
pop r12
pop rbp
pop rbx
pop rdi
pop rsi
DB 0F3h,0C3h ;repret
sqr_handler ENDP
.text$ ENDS
.pdata SEGMENT READONLY ALIGN(4)
ALIGN 4
DD imagerel $L$SEH_begin_bn_mul_mont
DD imagerel $L$SEH_end_bn_mul_mont
DD imagerel $L$SEH_info_bn_mul_mont
DD imagerel $L$SEH_begin_bn_mul4x_mont
DD imagerel $L$SEH_end_bn_mul4x_mont
DD imagerel $L$SEH_info_bn_mul4x_mont
DD imagerel $L$SEH_begin_bn_sqr4x_mont
DD imagerel $L$SEH_end_bn_sqr4x_mont
DD imagerel $L$SEH_info_bn_sqr4x_mont
.pdata ENDS
.xdata SEGMENT READONLY ALIGN(8)
ALIGN 8
$L$SEH_info_bn_mul_mont::
DB 9,0,0,0
DD imagerel mul_handler
DD imagerel $L$mul_body,imagerel $L$mul_epilogue
$L$SEH_info_bn_mul4x_mont::
DB 9,0,0,0
DD imagerel mul_handler
DD imagerel $L$mul4x_body,imagerel $L$mul4x_epilogue
$L$SEH_info_bn_sqr4x_mont::
DB 9,0,0,0
DD imagerel sqr_handler
.xdata ENDS
END
| 16.812002 | 63 | 0.681431 |
23aa4b31f3a46f93b0a473782aa6cbd091da50df | 775 | asm | Assembly | oeis/092/A092495.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/092/A092495.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/092/A092495.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A092495: Least factorial multiple of n.
; Submitted by Christian Krause
; 1,2,6,24,120,6,5040,24,720,120,39916800,24,6227020800,5040,120,720,355687428096000,720,121645100408832000,120,5040,39916800,25852016738884976640000,24,3628800,6227020800,362880,5040,8841761993739701954543616000000,120,8222838654177922817725562880000000,40320,39916800,355687428096000,5040,720,13763753091226345046315979581580902400000000,121645100408832000,6227020800,120,33452526613163807108170062053440751665152000000000,5040,60415263063373835637355132068513997507264512000000000,39916800,720
seq $0,2034 ; Kempner numbers: smallest positive integer m such that n divides m!.
seq $0,142 ; Factorial numbers: n! = 1*2*3*4*...*n (order of symmetric group S_n, number of permutations of n letters).
| 110.714286 | 496 | 0.843871 |
459de7021887994969c7c0b53921d8ddb8f6a65c | 284 | asm | Assembly | programs/oeis/155/A155670.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/155/A155670.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/155/A155670.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A155670: 11^n+9^n-1^n
; 1,19,201,2059,21201,220099,2303001,24270139,257405601,2745368179,29424209001,316692730219,3420857913201,37064577972259,402626626038201,4383139301510299,47802750052424001,522124210198960339
mov $1,9
pow $1,$0
mov $2,11
pow $2,$0
add $1,$2
mov $0,$1
sub $0,1
| 25.818182 | 190 | 0.778169 |
ab6581b961c2035b2c791414e2dacd51d49507ca | 527 | asm | Assembly | programs/oeis/286/A286437.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/286/A286437.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/286/A286437.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A286437: Number of ways to tile an n X n X n triangular area with two 2 X 2 X 2 triangular tiles and an appropriate number (= n^2-8) of 1 X 1 X 1 tiles.
; 0,9,48,153,372,765,1404,2373,3768,5697,8280,11649,15948,21333,27972,36045,45744,57273,70848,86697,105060,126189,150348,177813,208872,243825,282984,326673,375228,428997,488340,553629,625248,703593,789072,882105,983124,1092573
mov $2,$0
lpb $2
trn $1,$0
mov $3,2
add $3,$0
add $5,3
lpb $3
sub $3,1
add $4,$5
lpe
add $1,$4
sub $2,1
add $4,$0
lpe
| 29.277778 | 226 | 0.685009 |
8e66a9d2dafe166f8ae41023f8adfe035b7fc521 | 426 | asm | Assembly | Lista Assembly/questao5.asm | joaovictor42/Arquitetura-de-Computadores | 28a170113e04c0a39608fd61962aa8bd63604f03 | [
"MIT"
] | null | null | null | Lista Assembly/questao5.asm | joaovictor42/Arquitetura-de-Computadores | 28a170113e04c0a39608fd61962aa8bd63604f03 | [
"MIT"
] | null | null | null | Lista Assembly/questao5.asm | joaovictor42/Arquitetura-de-Computadores | 28a170113e04c0a39608fd61962aa8bd63604f03 | [
"MIT"
] | 1 | 2021-07-06T02:05:29.000Z | 2021-07-06T02:05:29.000Z | extern scanf, printf
global main
section .data
msg db "%d", 0AH, 0H
section .text
main:
mov ecx, 1000; Inicio
repetir:
xor edx, edx; Dividendo
mov eax, ecx; Dividendo
mov ebx, 11; Divisor
div ebx
cmp edx, 5
je imprimir
avalicao:
inc ecx
cmp ecx, 2000
jl repetir
fim:
mov eax, 1
xor ecx, ecx
int 80h
imprimir:
push ecx
push ecx
push msg
call printf
add esp, 8
pop ecx
jmp avalicao
| 10.390244 | 24 | 0.661972 |
34cf46fa9b0a9b0a8e09d98d8025ccf3bb87813e | 453 | asm | Assembly | oeis/044/A044412.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/044/A044412.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/044/A044412.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A044412: Numbers n such that string 8,0 occurs in the base 10 representation of n but not of n-1.
; Submitted by Christian Krause
; 80,180,280,380,480,580,680,780,800,880,980,1080,1180,1280,1380,1480,1580,1680,1780,1800,1880,1980,2080,2180,2280,2380,2480,2580,2680,2780,2800,2880,2980,3080,3180,3280,3380,3480,3580
add $0,1
mul $0,10
mov $1,$0
add $0,9
div $0,11
sub $1,3
div $1,11
add $1,3
add $0,$1
add $0,$1
add $0,$1
add $0,$1
sub $0,9
mul $0,20
| 23.842105 | 184 | 0.704194 |
f498091db7d20ef5d6af77b7fa4b5e7367b2177c | 6,219 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48.log_21829_1105.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48.log_21829_1105.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48.log_21829_1105.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r14
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0x1bab1, %r10
clflush (%r10)
nop
nop
nop
nop
nop
add %rbp, %rbp
mov $0x6162636465666768, %rdi
movq %rdi, (%r10)
nop
nop
nop
nop
nop
cmp $57716, %rdx
lea addresses_D_ht+0x1aa5b, %r14
xor $22541, %rbp
movups (%r14), %xmm4
vpextrq $0, %xmm4, %rsi
sub $58768, %r14
lea addresses_WC_ht+0x12523, %rbp
clflush (%rbp)
nop
nop
nop
nop
nop
add %r13, %r13
movl $0x61626364, (%rbp)
nop
nop
nop
nop
dec %rbp
lea addresses_UC_ht+0x1eb1b, %rsi
lea addresses_WC_ht+0x171b, %rdi
nop
nop
nop
nop
xor $32584, %r14
mov $25, %rcx
rep movsw
nop
nop
nop
nop
xor %r14, %r14
lea addresses_UC_ht+0x5f5b, %rsi
lea addresses_WC_ht+0xfddb, %rdi
nop
cmp %rbp, %rbp
mov $35, %rcx
rep movsw
nop
nop
and $61453, %r10
lea addresses_normal_ht+0x1849b, %rsi
lea addresses_D_ht+0x69e3, %rdi
nop
nop
nop
sub $23008, %r13
mov $73, %rcx
rep movsb
cmp %rsi, %rsi
lea addresses_WT_ht+0x6d3b, %rdi
nop
nop
add $39017, %rbp
movups (%rdi), %xmm1
vpextrq $1, %xmm1, %r13
dec %r13
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r14
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r13
push %r14
push %r9
push %rcx
push %rsi
// Store
lea addresses_RW+0x1521b, %r13
nop
nop
nop
dec %r9
movw $0x5152, (%r13)
nop
nop
nop
add $20576, %rcx
// Store
lea addresses_UC+0x1ef1b, %r9
xor $38106, %r14
movl $0x51525354, (%r9)
nop
nop
nop
dec %r9
// Faulty Load
lea addresses_A+0x13b1b, %r13
nop
nop
sub $47365, %rsi
mov (%r13), %r14w
lea oracles, %rsi
and $0xff, %r14
shlq $12, %r14
mov (%rsi,%r14,1), %r14
pop %rsi
pop %rcx
pop %r9
pop %r14
pop %r13
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 8, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 8, 'size': 4, 'same': False, 'NT': True}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': True, 'congruent': 0, 'size': 2, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': True, 'congruent': 1, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 6, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 2, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 10, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 4, 'size': 16, '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
*/
| 37.920732 | 2,999 | 0.658305 |
29290d00239e0f0ac99132ba50ca7dfb492ef918 | 5,820 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_281.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_281.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_281.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 %r9
push %rax
push %rbp
lea addresses_D_ht+0x848b, %r9
nop
nop
sub $38494, %r10
mov $0x6162636465666768, %r14
movq %r14, %xmm6
vmovups %ymm6, (%r9)
nop
nop
add $37969, %rbp
lea addresses_UC_ht+0x1128b, %r10
nop
nop
inc %rax
and $0xffffffffffffffc0, %r10
vmovaps (%r10), %ymm1
vextracti128 $1, %ymm1, %xmm1
vpextrq $0, %xmm1, %r9
nop
nop
nop
nop
nop
cmp %r14, %r14
pop %rbp
pop %rax
pop %r9
pop %r14
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r13
push %r8
push %r9
push %rcx
push %rdi
// Store
mov $0xa5b, %rcx
nop
nop
nop
nop
inc %rdi
mov $0x5152535455565758, %r9
movq %r9, (%rcx)
nop
add $56316, %rcx
// Store
lea addresses_WT+0x1db04, %r9
nop
nop
nop
nop
inc %rcx
movw $0x5152, (%r9)
nop
nop
sub $6590, %rdi
// Store
lea addresses_A+0x8ecb, %r8
nop
nop
nop
nop
nop
add %r9, %r9
movb $0x51, (%r8)
nop
nop
dec %r9
// Store
lea addresses_normal+0x1f58b, %r11
nop
nop
nop
nop
sub %r12, %r12
mov $0x5152535455565758, %r9
movq %r9, %xmm3
vmovups %ymm3, (%r11)
nop
nop
add %r12, %r12
// Load
lea addresses_RW+0x370b, %rcx
nop
sub %r9, %r9
mov (%rcx), %r13d
xor %r12, %r12
// Store
lea addresses_PSE+0x2cdb, %rcx
nop
nop
nop
nop
xor $31923, %rdi
movb $0x51, (%rcx)
nop
dec %r8
// Faulty Load
lea addresses_normal+0x12a8b, %r11
nop
add %rdi, %rdi
mov (%r11), %r9
lea oracles, %r12
and $0xff, %r9
shlq $12, %r9
mov (%r12,%r9,1), %r9
pop %rdi
pop %rcx
pop %r9
pop %r8
pop %r13
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_normal', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_P', 'congruent': 4}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_WT', 'congruent': 0}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_A', 'congruent': 6}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_normal', 'congruent': 8}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': True, 'size': 4, 'type': 'addresses_RW', 'congruent': 6}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_PSE', 'congruent': 4}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_normal', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_D_ht', 'congruent': 4}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': True, 'size': 32, 'type': 'addresses_UC_ht', 'congruent': 9}}
{'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.792208 | 2,999 | 0.653093 |
5dd1452e2db513d3de4e40330bdc15aa7155e0c8 | 567 | asm | Assembly | oeis/347/A347477.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/347/A347477.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/347/A347477.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A347477: Number of total dominating sets in the complement graph of the n-cycle.
; Submitted by Christian Krause
; 0,1,11,39,99,223,475,983,2003,4047,8139,16327,32707,65471,131003,262071,524211,1048495,2097067,4194215,8388515,16777119,33554331,67108759,134217619,268435343,536870795,1073741703,2147483523,4294967167,8589934459,17179869047,34359738227,68719476591,137438953323,274877906791,549755813731,1099511627615
mov $1,1
lpb $0
sub $0,1
add $3,1
add $2,$3
sub $2,1
mov $1,$2
mul $3,2
add $1,$3
lpe
mov $2,$1
trn $1,4
add $1,$2
mov $0,$1
sub $0,1
| 28.35 | 302 | 0.751323 |
eda960f6bf043eb18176181fce856d14d7fc2f00 | 3,948 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_123_537.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_123_537.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_123_537.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 %r14
push %r15
push %r8
push %rbx
push %rdx
lea addresses_A_ht+0x18075, %r10
nop
nop
nop
cmp %r14, %r14
mov (%r10), %r8
nop
xor $39994, %rbx
lea addresses_A_ht+0xde, %r12
nop
nop
nop
xor $49045, %rdx
mov (%r12), %r15
nop
nop
nop
xor %rdx, %rdx
pop %rdx
pop %rbx
pop %r8
pop %r15
pop %r14
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r15
push %r8
push %rax
push %rbx
push %rcx
push %rdi
push %rsi
// Store
lea addresses_D+0xd495, %r10
nop
nop
nop
nop
nop
xor $49761, %rax
movb $0x51, (%r10)
nop
nop
and $59426, %rax
// Load
lea addresses_WC+0xd8d5, %r8
nop
nop
nop
nop
sub %rdi, %rdi
vmovups (%r8), %ymm5
vextracti128 $1, %ymm5, %xmm5
vpextrq $1, %xmm5, %r15
nop
nop
and %rbx, %rbx
// REPMOV
lea addresses_A+0x1899, %rsi
lea addresses_WC+0xc251, %rdi
clflush (%rsi)
cmp %r8, %r8
mov $54, %rcx
rep movsb
nop
nop
nop
nop
nop
add $62803, %rbx
// Store
mov $0xce5, %rax
nop
nop
xor $40917, %rbx
mov $0x5152535455565758, %rdi
movq %rdi, %xmm0
vmovups %ymm0, (%rax)
nop
nop
nop
xor $16011, %r10
// Store
lea addresses_WT+0xe43, %rbx
nop
nop
nop
nop
nop
sub %r8, %r8
mov $0x5152535455565758, %rsi
movq %rsi, %xmm7
movups %xmm7, (%rbx)
nop
nop
nop
nop
cmp $58237, %rdi
// Store
lea addresses_US+0x135df, %r15
clflush (%r15)
nop
nop
nop
sub $21916, %r10
mov $0x5152535455565758, %rcx
movq %rcx, (%r15)
nop
cmp %rcx, %rcx
// Store
lea addresses_US+0x1db95, %rax
clflush (%rax)
nop
nop
dec %r10
mov $0x5152535455565758, %rbx
movq %rbx, %xmm2
vmovntdq %ymm2, (%rax)
nop
nop
nop
nop
sub %rbx, %rbx
// Store
lea addresses_D+0x15615, %r8
nop
nop
xor $4102, %rcx
mov $0x5152535455565758, %rsi
movq %rsi, %xmm0
vmovups %ymm0, (%r8)
nop
nop
nop
nop
and %r15, %r15
// Faulty Load
lea addresses_normal+0x19495, %r15
nop
nop
nop
nop
xor $8145, %rcx
mov (%r15), %eax
lea oracles, %r10
and $0xff, %rax
shlq $12, %rax
mov (%r10,%rax,1), %rax
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r8
pop %r15
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 8, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_WC', 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_US', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_US', 'size': 32, 'AVXalign': False, 'NT': True, 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'34': 123}
34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34
*/
| 19.544554 | 368 | 0.643617 |
0a4ff51a313e4808bb7357236d85064e45b35158 | 747 | asm | Assembly | libsrc/_DEVELOPMENT/arch/sms/vram/z80/asm_sms_setw_vram_unsafe.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/arch/sms/vram/z80/asm_sms_setw_vram_unsafe.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/arch/sms/vram/z80/asm_sms_setw_vram_unsafe.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z | ; ========================================================================
;
; void *sms_setw_vram_unsafe(void *dst, unsigned int c, unsigned int n)
;
; memset VRAM word at a time unsafe; VRAM addresses are assumed to be stable.
;
; ========================================================================
; unsafe version has not been written yet
SECTION code_clib
SECTION code_crt_common
PUBLIC asm_sms_setw_vram_unsafe
EXTERN asm_sms_setw_vram
defc asm_sms_setw_vram_unsafe = asm_sms_setw_vram
; memset vram by word
;
; enter : de = unsigned int c
; bc = unsigned int n > 0
;
; VRAM DESTINATION ADDRESS ALREADY SET!
;
; exit : de = unsigned int c
; bc = 0
;
; uses : af, bc, hl
| 24.096774 | 77 | 0.531459 |
7e3a6e320db282eb0be00e1139f297b416986f53 | 59,813 | asm | Assembly | lab02/lab2/echo.asm | ahchu1993/opsys | b3405cdf48e99654b4bbc2bad8b3cd4ce1cbd09f | [
"Xnet",
"X11"
] | null | null | null | lab02/lab2/echo.asm | ahchu1993/opsys | b3405cdf48e99654b4bbc2bad8b3cd4ce1cbd09f | [
"Xnet",
"X11"
] | null | null | null | lab02/lab2/echo.asm | ahchu1993/opsys | b3405cdf48e99654b4bbc2bad8b3cd4ce1cbd09f | [
"Xnet",
"X11"
] | null | null | null |
_echo: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
#include "stat.h"
#include "user.h"
int
main(int argc, char *argv[])
{
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 83 e4 f0 and $0xfffffff0,%esp
6: 83 ec 20 sub $0x20,%esp
int i;
for(i = 1; i < argc; i++)
9: c7 44 24 1c 01 00 00 movl $0x1,0x1c(%esp)
10: 00
11: eb 4b jmp 5e <main+0x5e>
printf(1, "%s%s", argv[i], i+1 < argc ? " " : "\n");
13: 8b 44 24 1c mov 0x1c(%esp),%eax
17: 83 c0 01 add $0x1,%eax
1a: 3b 45 08 cmp 0x8(%ebp),%eax
1d: 7d 07 jge 26 <main+0x26>
1f: b8 eb 0b 00 00 mov $0xbeb,%eax
24: eb 05 jmp 2b <main+0x2b>
26: b8 ed 0b 00 00 mov $0xbed,%eax
2b: 8b 54 24 1c mov 0x1c(%esp),%edx
2f: 8d 0c 95 00 00 00 00 lea 0x0(,%edx,4),%ecx
36: 8b 55 0c mov 0xc(%ebp),%edx
39: 01 ca add %ecx,%edx
3b: 8b 12 mov (%edx),%edx
3d: 89 44 24 0c mov %eax,0xc(%esp)
41: 89 54 24 08 mov %edx,0x8(%esp)
45: c7 44 24 04 ef 0b 00 movl $0xbef,0x4(%esp)
4c: 00
4d: c7 04 24 01 00 00 00 movl $0x1,(%esp)
54: e8 23 04 00 00 call 47c <printf>
int
main(int argc, char *argv[])
{
int i;
for(i = 1; i < argc; i++)
59: 83 44 24 1c 01 addl $0x1,0x1c(%esp)
5e: 8b 44 24 1c mov 0x1c(%esp),%eax
62: 3b 45 08 cmp 0x8(%ebp),%eax
65: 7c ac jl 13 <main+0x13>
printf(1, "%s%s", argv[i], i+1 < argc ? " " : "\n");
exit();
67: e8 68 02 00 00 call 2d4 <exit>
0000006c <stosb>:
"cc");
}
static inline void
stosb(void *addr, int data, int cnt)
{
6c: 55 push %ebp
6d: 89 e5 mov %esp,%ebp
6f: 57 push %edi
70: 53 push %ebx
asm volatile("cld; rep stosb" :
71: 8b 4d 08 mov 0x8(%ebp),%ecx
74: 8b 55 10 mov 0x10(%ebp),%edx
77: 8b 45 0c mov 0xc(%ebp),%eax
7a: 89 cb mov %ecx,%ebx
7c: 89 df mov %ebx,%edi
7e: 89 d1 mov %edx,%ecx
80: fc cld
81: f3 aa rep stos %al,%es:(%edi)
83: 89 ca mov %ecx,%edx
85: 89 fb mov %edi,%ebx
87: 89 5d 08 mov %ebx,0x8(%ebp)
8a: 89 55 10 mov %edx,0x10(%ebp)
"=D" (addr), "=c" (cnt) :
"0" (addr), "1" (cnt), "a" (data) :
"memory", "cc");
}
8d: 5b pop %ebx
8e: 5f pop %edi
8f: 5d pop %ebp
90: c3 ret
00000091 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
91: 55 push %ebp
92: 89 e5 mov %esp,%ebp
94: 83 ec 10 sub $0x10,%esp
char *os;
os = s;
97: 8b 45 08 mov 0x8(%ebp),%eax
9a: 89 45 fc mov %eax,-0x4(%ebp)
while((*s++ = *t++) != 0)
9d: 90 nop
9e: 8b 45 08 mov 0x8(%ebp),%eax
a1: 8d 50 01 lea 0x1(%eax),%edx
a4: 89 55 08 mov %edx,0x8(%ebp)
a7: 8b 55 0c mov 0xc(%ebp),%edx
aa: 8d 4a 01 lea 0x1(%edx),%ecx
ad: 89 4d 0c mov %ecx,0xc(%ebp)
b0: 0f b6 12 movzbl (%edx),%edx
b3: 88 10 mov %dl,(%eax)
b5: 0f b6 00 movzbl (%eax),%eax
b8: 84 c0 test %al,%al
ba: 75 e2 jne 9e <strcpy+0xd>
;
return os;
bc: 8b 45 fc mov -0x4(%ebp),%eax
}
bf: c9 leave
c0: c3 ret
000000c1 <strcmp>:
int
strcmp(const char *p, const char *q)
{
c1: 55 push %ebp
c2: 89 e5 mov %esp,%ebp
while(*p && *p == *q)
c4: eb 08 jmp ce <strcmp+0xd>
p++, q++;
c6: 83 45 08 01 addl $0x1,0x8(%ebp)
ca: 83 45 0c 01 addl $0x1,0xc(%ebp)
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
ce: 8b 45 08 mov 0x8(%ebp),%eax
d1: 0f b6 00 movzbl (%eax),%eax
d4: 84 c0 test %al,%al
d6: 74 10 je e8 <strcmp+0x27>
d8: 8b 45 08 mov 0x8(%ebp),%eax
db: 0f b6 10 movzbl (%eax),%edx
de: 8b 45 0c mov 0xc(%ebp),%eax
e1: 0f b6 00 movzbl (%eax),%eax
e4: 38 c2 cmp %al,%dl
e6: 74 de je c6 <strcmp+0x5>
p++, q++;
return (uchar)*p - (uchar)*q;
e8: 8b 45 08 mov 0x8(%ebp),%eax
eb: 0f b6 00 movzbl (%eax),%eax
ee: 0f b6 d0 movzbl %al,%edx
f1: 8b 45 0c mov 0xc(%ebp),%eax
f4: 0f b6 00 movzbl (%eax),%eax
f7: 0f b6 c0 movzbl %al,%eax
fa: 29 c2 sub %eax,%edx
fc: 89 d0 mov %edx,%eax
}
fe: 5d pop %ebp
ff: c3 ret
00000100 <strlen>:
uint
strlen(char *s)
{
100: 55 push %ebp
101: 89 e5 mov %esp,%ebp
103: 83 ec 10 sub $0x10,%esp
int n;
for(n = 0; s[n]; n++)
106: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
10d: eb 04 jmp 113 <strlen+0x13>
10f: 83 45 fc 01 addl $0x1,-0x4(%ebp)
113: 8b 55 fc mov -0x4(%ebp),%edx
116: 8b 45 08 mov 0x8(%ebp),%eax
119: 01 d0 add %edx,%eax
11b: 0f b6 00 movzbl (%eax),%eax
11e: 84 c0 test %al,%al
120: 75 ed jne 10f <strlen+0xf>
;
return n;
122: 8b 45 fc mov -0x4(%ebp),%eax
}
125: c9 leave
126: c3 ret
00000127 <memset>:
void*
memset(void *dst, int c, uint n)
{
127: 55 push %ebp
128: 89 e5 mov %esp,%ebp
12a: 83 ec 0c sub $0xc,%esp
stosb(dst, c, n);
12d: 8b 45 10 mov 0x10(%ebp),%eax
130: 89 44 24 08 mov %eax,0x8(%esp)
134: 8b 45 0c mov 0xc(%ebp),%eax
137: 89 44 24 04 mov %eax,0x4(%esp)
13b: 8b 45 08 mov 0x8(%ebp),%eax
13e: 89 04 24 mov %eax,(%esp)
141: e8 26 ff ff ff call 6c <stosb>
return dst;
146: 8b 45 08 mov 0x8(%ebp),%eax
}
149: c9 leave
14a: c3 ret
0000014b <strchr>:
char*
strchr(const char *s, char c)
{
14b: 55 push %ebp
14c: 89 e5 mov %esp,%ebp
14e: 83 ec 04 sub $0x4,%esp
151: 8b 45 0c mov 0xc(%ebp),%eax
154: 88 45 fc mov %al,-0x4(%ebp)
for(; *s; s++)
157: eb 14 jmp 16d <strchr+0x22>
if(*s == c)
159: 8b 45 08 mov 0x8(%ebp),%eax
15c: 0f b6 00 movzbl (%eax),%eax
15f: 3a 45 fc cmp -0x4(%ebp),%al
162: 75 05 jne 169 <strchr+0x1e>
return (char*)s;
164: 8b 45 08 mov 0x8(%ebp),%eax
167: eb 13 jmp 17c <strchr+0x31>
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
169: 83 45 08 01 addl $0x1,0x8(%ebp)
16d: 8b 45 08 mov 0x8(%ebp),%eax
170: 0f b6 00 movzbl (%eax),%eax
173: 84 c0 test %al,%al
175: 75 e2 jne 159 <strchr+0xe>
if(*s == c)
return (char*)s;
return 0;
177: b8 00 00 00 00 mov $0x0,%eax
}
17c: c9 leave
17d: c3 ret
0000017e <gets>:
char*
gets(char *buf, int max)
{
17e: 55 push %ebp
17f: 89 e5 mov %esp,%ebp
181: 83 ec 28 sub $0x28,%esp
int i, cc;
char c;
for(i=0; i+1 < max; ){
184: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
18b: eb 4c jmp 1d9 <gets+0x5b>
cc = read(0, &c, 1);
18d: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
194: 00
195: 8d 45 ef lea -0x11(%ebp),%eax
198: 89 44 24 04 mov %eax,0x4(%esp)
19c: c7 04 24 00 00 00 00 movl $0x0,(%esp)
1a3: e8 44 01 00 00 call 2ec <read>
1a8: 89 45 f0 mov %eax,-0x10(%ebp)
if(cc < 1)
1ab: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
1af: 7f 02 jg 1b3 <gets+0x35>
break;
1b1: eb 31 jmp 1e4 <gets+0x66>
buf[i++] = c;
1b3: 8b 45 f4 mov -0xc(%ebp),%eax
1b6: 8d 50 01 lea 0x1(%eax),%edx
1b9: 89 55 f4 mov %edx,-0xc(%ebp)
1bc: 89 c2 mov %eax,%edx
1be: 8b 45 08 mov 0x8(%ebp),%eax
1c1: 01 c2 add %eax,%edx
1c3: 0f b6 45 ef movzbl -0x11(%ebp),%eax
1c7: 88 02 mov %al,(%edx)
if(c == '\n' || c == '\r')
1c9: 0f b6 45 ef movzbl -0x11(%ebp),%eax
1cd: 3c 0a cmp $0xa,%al
1cf: 74 13 je 1e4 <gets+0x66>
1d1: 0f b6 45 ef movzbl -0x11(%ebp),%eax
1d5: 3c 0d cmp $0xd,%al
1d7: 74 0b je 1e4 <gets+0x66>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
1d9: 8b 45 f4 mov -0xc(%ebp),%eax
1dc: 83 c0 01 add $0x1,%eax
1df: 3b 45 0c cmp 0xc(%ebp),%eax
1e2: 7c a9 jl 18d <gets+0xf>
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
1e4: 8b 55 f4 mov -0xc(%ebp),%edx
1e7: 8b 45 08 mov 0x8(%ebp),%eax
1ea: 01 d0 add %edx,%eax
1ec: c6 00 00 movb $0x0,(%eax)
return buf;
1ef: 8b 45 08 mov 0x8(%ebp),%eax
}
1f2: c9 leave
1f3: c3 ret
000001f4 <stat>:
int
stat(char *n, struct stat *st)
{
1f4: 55 push %ebp
1f5: 89 e5 mov %esp,%ebp
1f7: 83 ec 28 sub $0x28,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
1fa: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
201: 00
202: 8b 45 08 mov 0x8(%ebp),%eax
205: 89 04 24 mov %eax,(%esp)
208: e8 07 01 00 00 call 314 <open>
20d: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd < 0)
210: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
214: 79 07 jns 21d <stat+0x29>
return -1;
216: b8 ff ff ff ff mov $0xffffffff,%eax
21b: eb 23 jmp 240 <stat+0x4c>
r = fstat(fd, st);
21d: 8b 45 0c mov 0xc(%ebp),%eax
220: 89 44 24 04 mov %eax,0x4(%esp)
224: 8b 45 f4 mov -0xc(%ebp),%eax
227: 89 04 24 mov %eax,(%esp)
22a: e8 fd 00 00 00 call 32c <fstat>
22f: 89 45 f0 mov %eax,-0x10(%ebp)
close(fd);
232: 8b 45 f4 mov -0xc(%ebp),%eax
235: 89 04 24 mov %eax,(%esp)
238: e8 bf 00 00 00 call 2fc <close>
return r;
23d: 8b 45 f0 mov -0x10(%ebp),%eax
}
240: c9 leave
241: c3 ret
00000242 <atoi>:
int
atoi(const char *s)
{
242: 55 push %ebp
243: 89 e5 mov %esp,%ebp
245: 83 ec 10 sub $0x10,%esp
int n;
n = 0;
248: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
while('0' <= *s && *s <= '9')
24f: eb 25 jmp 276 <atoi+0x34>
n = n*10 + *s++ - '0';
251: 8b 55 fc mov -0x4(%ebp),%edx
254: 89 d0 mov %edx,%eax
256: c1 e0 02 shl $0x2,%eax
259: 01 d0 add %edx,%eax
25b: 01 c0 add %eax,%eax
25d: 89 c1 mov %eax,%ecx
25f: 8b 45 08 mov 0x8(%ebp),%eax
262: 8d 50 01 lea 0x1(%eax),%edx
265: 89 55 08 mov %edx,0x8(%ebp)
268: 0f b6 00 movzbl (%eax),%eax
26b: 0f be c0 movsbl %al,%eax
26e: 01 c8 add %ecx,%eax
270: 83 e8 30 sub $0x30,%eax
273: 89 45 fc mov %eax,-0x4(%ebp)
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
276: 8b 45 08 mov 0x8(%ebp),%eax
279: 0f b6 00 movzbl (%eax),%eax
27c: 3c 2f cmp $0x2f,%al
27e: 7e 0a jle 28a <atoi+0x48>
280: 8b 45 08 mov 0x8(%ebp),%eax
283: 0f b6 00 movzbl (%eax),%eax
286: 3c 39 cmp $0x39,%al
288: 7e c7 jle 251 <atoi+0xf>
n = n*10 + *s++ - '0';
return n;
28a: 8b 45 fc mov -0x4(%ebp),%eax
}
28d: c9 leave
28e: c3 ret
0000028f <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
28f: 55 push %ebp
290: 89 e5 mov %esp,%ebp
292: 83 ec 10 sub $0x10,%esp
char *dst, *src;
dst = vdst;
295: 8b 45 08 mov 0x8(%ebp),%eax
298: 89 45 fc mov %eax,-0x4(%ebp)
src = vsrc;
29b: 8b 45 0c mov 0xc(%ebp),%eax
29e: 89 45 f8 mov %eax,-0x8(%ebp)
while(n-- > 0)
2a1: eb 17 jmp 2ba <memmove+0x2b>
*dst++ = *src++;
2a3: 8b 45 fc mov -0x4(%ebp),%eax
2a6: 8d 50 01 lea 0x1(%eax),%edx
2a9: 89 55 fc mov %edx,-0x4(%ebp)
2ac: 8b 55 f8 mov -0x8(%ebp),%edx
2af: 8d 4a 01 lea 0x1(%edx),%ecx
2b2: 89 4d f8 mov %ecx,-0x8(%ebp)
2b5: 0f b6 12 movzbl (%edx),%edx
2b8: 88 10 mov %dl,(%eax)
{
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
2ba: 8b 45 10 mov 0x10(%ebp),%eax
2bd: 8d 50 ff lea -0x1(%eax),%edx
2c0: 89 55 10 mov %edx,0x10(%ebp)
2c3: 85 c0 test %eax,%eax
2c5: 7f dc jg 2a3 <memmove+0x14>
*dst++ = *src++;
return vdst;
2c7: 8b 45 08 mov 0x8(%ebp),%eax
}
2ca: c9 leave
2cb: c3 ret
000002cc <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
2cc: b8 01 00 00 00 mov $0x1,%eax
2d1: cd 40 int $0x40
2d3: c3 ret
000002d4 <exit>:
SYSCALL(exit)
2d4: b8 02 00 00 00 mov $0x2,%eax
2d9: cd 40 int $0x40
2db: c3 ret
000002dc <wait>:
SYSCALL(wait)
2dc: b8 03 00 00 00 mov $0x3,%eax
2e1: cd 40 int $0x40
2e3: c3 ret
000002e4 <pipe>:
SYSCALL(pipe)
2e4: b8 04 00 00 00 mov $0x4,%eax
2e9: cd 40 int $0x40
2eb: c3 ret
000002ec <read>:
SYSCALL(read)
2ec: b8 05 00 00 00 mov $0x5,%eax
2f1: cd 40 int $0x40
2f3: c3 ret
000002f4 <write>:
SYSCALL(write)
2f4: b8 10 00 00 00 mov $0x10,%eax
2f9: cd 40 int $0x40
2fb: c3 ret
000002fc <close>:
SYSCALL(close)
2fc: b8 15 00 00 00 mov $0x15,%eax
301: cd 40 int $0x40
303: c3 ret
00000304 <kill>:
SYSCALL(kill)
304: b8 06 00 00 00 mov $0x6,%eax
309: cd 40 int $0x40
30b: c3 ret
0000030c <exec>:
SYSCALL(exec)
30c: b8 07 00 00 00 mov $0x7,%eax
311: cd 40 int $0x40
313: c3 ret
00000314 <open>:
SYSCALL(open)
314: b8 0f 00 00 00 mov $0xf,%eax
319: cd 40 int $0x40
31b: c3 ret
0000031c <mknod>:
SYSCALL(mknod)
31c: b8 11 00 00 00 mov $0x11,%eax
321: cd 40 int $0x40
323: c3 ret
00000324 <unlink>:
SYSCALL(unlink)
324: b8 12 00 00 00 mov $0x12,%eax
329: cd 40 int $0x40
32b: c3 ret
0000032c <fstat>:
SYSCALL(fstat)
32c: b8 08 00 00 00 mov $0x8,%eax
331: cd 40 int $0x40
333: c3 ret
00000334 <link>:
SYSCALL(link)
334: b8 13 00 00 00 mov $0x13,%eax
339: cd 40 int $0x40
33b: c3 ret
0000033c <mkdir>:
SYSCALL(mkdir)
33c: b8 14 00 00 00 mov $0x14,%eax
341: cd 40 int $0x40
343: c3 ret
00000344 <chdir>:
SYSCALL(chdir)
344: b8 09 00 00 00 mov $0x9,%eax
349: cd 40 int $0x40
34b: c3 ret
0000034c <dup>:
SYSCALL(dup)
34c: b8 0a 00 00 00 mov $0xa,%eax
351: cd 40 int $0x40
353: c3 ret
00000354 <getpid>:
SYSCALL(getpid)
354: b8 0b 00 00 00 mov $0xb,%eax
359: cd 40 int $0x40
35b: c3 ret
0000035c <sbrk>:
SYSCALL(sbrk)
35c: b8 0c 00 00 00 mov $0xc,%eax
361: cd 40 int $0x40
363: c3 ret
00000364 <sleep>:
SYSCALL(sleep)
364: b8 0d 00 00 00 mov $0xd,%eax
369: cd 40 int $0x40
36b: c3 ret
0000036c <uptime>:
SYSCALL(uptime)
36c: b8 0e 00 00 00 mov $0xe,%eax
371: cd 40 int $0x40
373: c3 ret
00000374 <clone>:
SYSCALL(clone)
374: b8 16 00 00 00 mov $0x16,%eax
379: cd 40 int $0x40
37b: c3 ret
0000037c <texit>:
SYSCALL(texit)
37c: b8 17 00 00 00 mov $0x17,%eax
381: cd 40 int $0x40
383: c3 ret
00000384 <tsleep>:
SYSCALL(tsleep)
384: b8 18 00 00 00 mov $0x18,%eax
389: cd 40 int $0x40
38b: c3 ret
0000038c <twakeup>:
SYSCALL(twakeup)
38c: b8 19 00 00 00 mov $0x19,%eax
391: cd 40 int $0x40
393: c3 ret
00000394 <test>:
SYSCALL(test)
394: b8 1a 00 00 00 mov $0x1a,%eax
399: cd 40 int $0x40
39b: c3 ret
0000039c <putc>:
#include "stat.h"
#include "user.h"
static void
putc(int fd, char c)
{
39c: 55 push %ebp
39d: 89 e5 mov %esp,%ebp
39f: 83 ec 18 sub $0x18,%esp
3a2: 8b 45 0c mov 0xc(%ebp),%eax
3a5: 88 45 f4 mov %al,-0xc(%ebp)
write(fd, &c, 1);
3a8: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
3af: 00
3b0: 8d 45 f4 lea -0xc(%ebp),%eax
3b3: 89 44 24 04 mov %eax,0x4(%esp)
3b7: 8b 45 08 mov 0x8(%ebp),%eax
3ba: 89 04 24 mov %eax,(%esp)
3bd: e8 32 ff ff ff call 2f4 <write>
}
3c2: c9 leave
3c3: c3 ret
000003c4 <printint>:
static void
printint(int fd, int xx, int base, int sgn)
{
3c4: 55 push %ebp
3c5: 89 e5 mov %esp,%ebp
3c7: 56 push %esi
3c8: 53 push %ebx
3c9: 83 ec 30 sub $0x30,%esp
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
3cc: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
if(sgn && xx < 0){
3d3: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
3d7: 74 17 je 3f0 <printint+0x2c>
3d9: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
3dd: 79 11 jns 3f0 <printint+0x2c>
neg = 1;
3df: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp)
x = -xx;
3e6: 8b 45 0c mov 0xc(%ebp),%eax
3e9: f7 d8 neg %eax
3eb: 89 45 ec mov %eax,-0x14(%ebp)
3ee: eb 06 jmp 3f6 <printint+0x32>
} else {
x = xx;
3f0: 8b 45 0c mov 0xc(%ebp),%eax
3f3: 89 45 ec mov %eax,-0x14(%ebp)
}
i = 0;
3f6: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
do{
buf[i++] = digits[x % base];
3fd: 8b 4d f4 mov -0xc(%ebp),%ecx
400: 8d 41 01 lea 0x1(%ecx),%eax
403: 89 45 f4 mov %eax,-0xc(%ebp)
406: 8b 5d 10 mov 0x10(%ebp),%ebx
409: 8b 45 ec mov -0x14(%ebp),%eax
40c: ba 00 00 00 00 mov $0x0,%edx
411: f7 f3 div %ebx
413: 89 d0 mov %edx,%eax
415: 0f b6 80 2c 10 00 00 movzbl 0x102c(%eax),%eax
41c: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1)
}while((x /= base) != 0);
420: 8b 75 10 mov 0x10(%ebp),%esi
423: 8b 45 ec mov -0x14(%ebp),%eax
426: ba 00 00 00 00 mov $0x0,%edx
42b: f7 f6 div %esi
42d: 89 45 ec mov %eax,-0x14(%ebp)
430: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
434: 75 c7 jne 3fd <printint+0x39>
if(neg)
436: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
43a: 74 10 je 44c <printint+0x88>
buf[i++] = '-';
43c: 8b 45 f4 mov -0xc(%ebp),%eax
43f: 8d 50 01 lea 0x1(%eax),%edx
442: 89 55 f4 mov %edx,-0xc(%ebp)
445: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1)
while(--i >= 0)
44a: eb 1f jmp 46b <printint+0xa7>
44c: eb 1d jmp 46b <printint+0xa7>
putc(fd, buf[i]);
44e: 8d 55 dc lea -0x24(%ebp),%edx
451: 8b 45 f4 mov -0xc(%ebp),%eax
454: 01 d0 add %edx,%eax
456: 0f b6 00 movzbl (%eax),%eax
459: 0f be c0 movsbl %al,%eax
45c: 89 44 24 04 mov %eax,0x4(%esp)
460: 8b 45 08 mov 0x8(%ebp),%eax
463: 89 04 24 mov %eax,(%esp)
466: e8 31 ff ff ff call 39c <putc>
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
46b: 83 6d f4 01 subl $0x1,-0xc(%ebp)
46f: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
473: 79 d9 jns 44e <printint+0x8a>
putc(fd, buf[i]);
}
475: 83 c4 30 add $0x30,%esp
478: 5b pop %ebx
479: 5e pop %esi
47a: 5d pop %ebp
47b: c3 ret
0000047c <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
47c: 55 push %ebp
47d: 89 e5 mov %esp,%ebp
47f: 83 ec 38 sub $0x38,%esp
char *s;
int c, i, state;
uint *ap;
state = 0;
482: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
ap = (uint*)(void*)&fmt + 1;
489: 8d 45 0c lea 0xc(%ebp),%eax
48c: 83 c0 04 add $0x4,%eax
48f: 89 45 e8 mov %eax,-0x18(%ebp)
for(i = 0; fmt[i]; i++){
492: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
499: e9 7c 01 00 00 jmp 61a <printf+0x19e>
c = fmt[i] & 0xff;
49e: 8b 55 0c mov 0xc(%ebp),%edx
4a1: 8b 45 f0 mov -0x10(%ebp),%eax
4a4: 01 d0 add %edx,%eax
4a6: 0f b6 00 movzbl (%eax),%eax
4a9: 0f be c0 movsbl %al,%eax
4ac: 25 ff 00 00 00 and $0xff,%eax
4b1: 89 45 e4 mov %eax,-0x1c(%ebp)
if(state == 0){
4b4: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
4b8: 75 2c jne 4e6 <printf+0x6a>
if(c == '%'){
4ba: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
4be: 75 0c jne 4cc <printf+0x50>
state = '%';
4c0: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp)
4c7: e9 4a 01 00 00 jmp 616 <printf+0x19a>
} else {
putc(fd, c);
4cc: 8b 45 e4 mov -0x1c(%ebp),%eax
4cf: 0f be c0 movsbl %al,%eax
4d2: 89 44 24 04 mov %eax,0x4(%esp)
4d6: 8b 45 08 mov 0x8(%ebp),%eax
4d9: 89 04 24 mov %eax,(%esp)
4dc: e8 bb fe ff ff call 39c <putc>
4e1: e9 30 01 00 00 jmp 616 <printf+0x19a>
}
} else if(state == '%'){
4e6: 83 7d ec 25 cmpl $0x25,-0x14(%ebp)
4ea: 0f 85 26 01 00 00 jne 616 <printf+0x19a>
if(c == 'd'){
4f0: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp)
4f4: 75 2d jne 523 <printf+0xa7>
printint(fd, *ap, 10, 1);
4f6: 8b 45 e8 mov -0x18(%ebp),%eax
4f9: 8b 00 mov (%eax),%eax
4fb: c7 44 24 0c 01 00 00 movl $0x1,0xc(%esp)
502: 00
503: c7 44 24 08 0a 00 00 movl $0xa,0x8(%esp)
50a: 00
50b: 89 44 24 04 mov %eax,0x4(%esp)
50f: 8b 45 08 mov 0x8(%ebp),%eax
512: 89 04 24 mov %eax,(%esp)
515: e8 aa fe ff ff call 3c4 <printint>
ap++;
51a: 83 45 e8 04 addl $0x4,-0x18(%ebp)
51e: e9 ec 00 00 00 jmp 60f <printf+0x193>
} else if(c == 'x' || c == 'p'){
523: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp)
527: 74 06 je 52f <printf+0xb3>
529: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp)
52d: 75 2d jne 55c <printf+0xe0>
printint(fd, *ap, 16, 0);
52f: 8b 45 e8 mov -0x18(%ebp),%eax
532: 8b 00 mov (%eax),%eax
534: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
53b: 00
53c: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp)
543: 00
544: 89 44 24 04 mov %eax,0x4(%esp)
548: 8b 45 08 mov 0x8(%ebp),%eax
54b: 89 04 24 mov %eax,(%esp)
54e: e8 71 fe ff ff call 3c4 <printint>
ap++;
553: 83 45 e8 04 addl $0x4,-0x18(%ebp)
557: e9 b3 00 00 00 jmp 60f <printf+0x193>
} else if(c == 's'){
55c: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp)
560: 75 45 jne 5a7 <printf+0x12b>
s = (char*)*ap;
562: 8b 45 e8 mov -0x18(%ebp),%eax
565: 8b 00 mov (%eax),%eax
567: 89 45 f4 mov %eax,-0xc(%ebp)
ap++;
56a: 83 45 e8 04 addl $0x4,-0x18(%ebp)
if(s == 0)
56e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
572: 75 09 jne 57d <printf+0x101>
s = "(null)";
574: c7 45 f4 f4 0b 00 00 movl $0xbf4,-0xc(%ebp)
while(*s != 0){
57b: eb 1e jmp 59b <printf+0x11f>
57d: eb 1c jmp 59b <printf+0x11f>
putc(fd, *s);
57f: 8b 45 f4 mov -0xc(%ebp),%eax
582: 0f b6 00 movzbl (%eax),%eax
585: 0f be c0 movsbl %al,%eax
588: 89 44 24 04 mov %eax,0x4(%esp)
58c: 8b 45 08 mov 0x8(%ebp),%eax
58f: 89 04 24 mov %eax,(%esp)
592: e8 05 fe ff ff call 39c <putc>
s++;
597: 83 45 f4 01 addl $0x1,-0xc(%ebp)
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
59b: 8b 45 f4 mov -0xc(%ebp),%eax
59e: 0f b6 00 movzbl (%eax),%eax
5a1: 84 c0 test %al,%al
5a3: 75 da jne 57f <printf+0x103>
5a5: eb 68 jmp 60f <printf+0x193>
putc(fd, *s);
s++;
}
} else if(c == 'c'){
5a7: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp)
5ab: 75 1d jne 5ca <printf+0x14e>
putc(fd, *ap);
5ad: 8b 45 e8 mov -0x18(%ebp),%eax
5b0: 8b 00 mov (%eax),%eax
5b2: 0f be c0 movsbl %al,%eax
5b5: 89 44 24 04 mov %eax,0x4(%esp)
5b9: 8b 45 08 mov 0x8(%ebp),%eax
5bc: 89 04 24 mov %eax,(%esp)
5bf: e8 d8 fd ff ff call 39c <putc>
ap++;
5c4: 83 45 e8 04 addl $0x4,-0x18(%ebp)
5c8: eb 45 jmp 60f <printf+0x193>
} else if(c == '%'){
5ca: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
5ce: 75 17 jne 5e7 <printf+0x16b>
putc(fd, c);
5d0: 8b 45 e4 mov -0x1c(%ebp),%eax
5d3: 0f be c0 movsbl %al,%eax
5d6: 89 44 24 04 mov %eax,0x4(%esp)
5da: 8b 45 08 mov 0x8(%ebp),%eax
5dd: 89 04 24 mov %eax,(%esp)
5e0: e8 b7 fd ff ff call 39c <putc>
5e5: eb 28 jmp 60f <printf+0x193>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
5e7: c7 44 24 04 25 00 00 movl $0x25,0x4(%esp)
5ee: 00
5ef: 8b 45 08 mov 0x8(%ebp),%eax
5f2: 89 04 24 mov %eax,(%esp)
5f5: e8 a2 fd ff ff call 39c <putc>
putc(fd, c);
5fa: 8b 45 e4 mov -0x1c(%ebp),%eax
5fd: 0f be c0 movsbl %al,%eax
600: 89 44 24 04 mov %eax,0x4(%esp)
604: 8b 45 08 mov 0x8(%ebp),%eax
607: 89 04 24 mov %eax,(%esp)
60a: e8 8d fd ff ff call 39c <putc>
}
state = 0;
60f: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
616: 83 45 f0 01 addl $0x1,-0x10(%ebp)
61a: 8b 55 0c mov 0xc(%ebp),%edx
61d: 8b 45 f0 mov -0x10(%ebp),%eax
620: 01 d0 add %edx,%eax
622: 0f b6 00 movzbl (%eax),%eax
625: 84 c0 test %al,%al
627: 0f 85 71 fe ff ff jne 49e <printf+0x22>
putc(fd, c);
}
state = 0;
}
}
}
62d: c9 leave
62e: c3 ret
0000062f <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
62f: 55 push %ebp
630: 89 e5 mov %esp,%ebp
632: 83 ec 10 sub $0x10,%esp
Header *bp, *p;
bp = (Header*)ap - 1;
635: 8b 45 08 mov 0x8(%ebp),%eax
638: 83 e8 08 sub $0x8,%eax
63b: 89 45 f8 mov %eax,-0x8(%ebp)
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
63e: a1 4c 10 00 00 mov 0x104c,%eax
643: 89 45 fc mov %eax,-0x4(%ebp)
646: eb 24 jmp 66c <free+0x3d>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
648: 8b 45 fc mov -0x4(%ebp),%eax
64b: 8b 00 mov (%eax),%eax
64d: 3b 45 fc cmp -0x4(%ebp),%eax
650: 77 12 ja 664 <free+0x35>
652: 8b 45 f8 mov -0x8(%ebp),%eax
655: 3b 45 fc cmp -0x4(%ebp),%eax
658: 77 24 ja 67e <free+0x4f>
65a: 8b 45 fc mov -0x4(%ebp),%eax
65d: 8b 00 mov (%eax),%eax
65f: 3b 45 f8 cmp -0x8(%ebp),%eax
662: 77 1a ja 67e <free+0x4f>
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
664: 8b 45 fc mov -0x4(%ebp),%eax
667: 8b 00 mov (%eax),%eax
669: 89 45 fc mov %eax,-0x4(%ebp)
66c: 8b 45 f8 mov -0x8(%ebp),%eax
66f: 3b 45 fc cmp -0x4(%ebp),%eax
672: 76 d4 jbe 648 <free+0x19>
674: 8b 45 fc mov -0x4(%ebp),%eax
677: 8b 00 mov (%eax),%eax
679: 3b 45 f8 cmp -0x8(%ebp),%eax
67c: 76 ca jbe 648 <free+0x19>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
67e: 8b 45 f8 mov -0x8(%ebp),%eax
681: 8b 40 04 mov 0x4(%eax),%eax
684: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
68b: 8b 45 f8 mov -0x8(%ebp),%eax
68e: 01 c2 add %eax,%edx
690: 8b 45 fc mov -0x4(%ebp),%eax
693: 8b 00 mov (%eax),%eax
695: 39 c2 cmp %eax,%edx
697: 75 24 jne 6bd <free+0x8e>
bp->s.size += p->s.ptr->s.size;
699: 8b 45 f8 mov -0x8(%ebp),%eax
69c: 8b 50 04 mov 0x4(%eax),%edx
69f: 8b 45 fc mov -0x4(%ebp),%eax
6a2: 8b 00 mov (%eax),%eax
6a4: 8b 40 04 mov 0x4(%eax),%eax
6a7: 01 c2 add %eax,%edx
6a9: 8b 45 f8 mov -0x8(%ebp),%eax
6ac: 89 50 04 mov %edx,0x4(%eax)
bp->s.ptr = p->s.ptr->s.ptr;
6af: 8b 45 fc mov -0x4(%ebp),%eax
6b2: 8b 00 mov (%eax),%eax
6b4: 8b 10 mov (%eax),%edx
6b6: 8b 45 f8 mov -0x8(%ebp),%eax
6b9: 89 10 mov %edx,(%eax)
6bb: eb 0a jmp 6c7 <free+0x98>
} else
bp->s.ptr = p->s.ptr;
6bd: 8b 45 fc mov -0x4(%ebp),%eax
6c0: 8b 10 mov (%eax),%edx
6c2: 8b 45 f8 mov -0x8(%ebp),%eax
6c5: 89 10 mov %edx,(%eax)
if(p + p->s.size == bp){
6c7: 8b 45 fc mov -0x4(%ebp),%eax
6ca: 8b 40 04 mov 0x4(%eax),%eax
6cd: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
6d4: 8b 45 fc mov -0x4(%ebp),%eax
6d7: 01 d0 add %edx,%eax
6d9: 3b 45 f8 cmp -0x8(%ebp),%eax
6dc: 75 20 jne 6fe <free+0xcf>
p->s.size += bp->s.size;
6de: 8b 45 fc mov -0x4(%ebp),%eax
6e1: 8b 50 04 mov 0x4(%eax),%edx
6e4: 8b 45 f8 mov -0x8(%ebp),%eax
6e7: 8b 40 04 mov 0x4(%eax),%eax
6ea: 01 c2 add %eax,%edx
6ec: 8b 45 fc mov -0x4(%ebp),%eax
6ef: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
6f2: 8b 45 f8 mov -0x8(%ebp),%eax
6f5: 8b 10 mov (%eax),%edx
6f7: 8b 45 fc mov -0x4(%ebp),%eax
6fa: 89 10 mov %edx,(%eax)
6fc: eb 08 jmp 706 <free+0xd7>
} else
p->s.ptr = bp;
6fe: 8b 45 fc mov -0x4(%ebp),%eax
701: 8b 55 f8 mov -0x8(%ebp),%edx
704: 89 10 mov %edx,(%eax)
freep = p;
706: 8b 45 fc mov -0x4(%ebp),%eax
709: a3 4c 10 00 00 mov %eax,0x104c
}
70e: c9 leave
70f: c3 ret
00000710 <morecore>:
static Header*
morecore(uint nu)
{
710: 55 push %ebp
711: 89 e5 mov %esp,%ebp
713: 83 ec 28 sub $0x28,%esp
char *p;
Header *hp;
if(nu < 4096)
716: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp)
71d: 77 07 ja 726 <morecore+0x16>
nu = 4096;
71f: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp)
p = sbrk(nu * sizeof(Header));
726: 8b 45 08 mov 0x8(%ebp),%eax
729: c1 e0 03 shl $0x3,%eax
72c: 89 04 24 mov %eax,(%esp)
72f: e8 28 fc ff ff call 35c <sbrk>
734: 89 45 f4 mov %eax,-0xc(%ebp)
if(p == (char*)-1)
737: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp)
73b: 75 07 jne 744 <morecore+0x34>
return 0;
73d: b8 00 00 00 00 mov $0x0,%eax
742: eb 22 jmp 766 <morecore+0x56>
hp = (Header*)p;
744: 8b 45 f4 mov -0xc(%ebp),%eax
747: 89 45 f0 mov %eax,-0x10(%ebp)
hp->s.size = nu;
74a: 8b 45 f0 mov -0x10(%ebp),%eax
74d: 8b 55 08 mov 0x8(%ebp),%edx
750: 89 50 04 mov %edx,0x4(%eax)
free((void*)(hp + 1));
753: 8b 45 f0 mov -0x10(%ebp),%eax
756: 83 c0 08 add $0x8,%eax
759: 89 04 24 mov %eax,(%esp)
75c: e8 ce fe ff ff call 62f <free>
return freep;
761: a1 4c 10 00 00 mov 0x104c,%eax
}
766: c9 leave
767: c3 ret
00000768 <malloc>:
void*
malloc(uint nbytes)
{
768: 55 push %ebp
769: 89 e5 mov %esp,%ebp
76b: 83 ec 28 sub $0x28,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
76e: 8b 45 08 mov 0x8(%ebp),%eax
771: 83 c0 07 add $0x7,%eax
774: c1 e8 03 shr $0x3,%eax
777: 83 c0 01 add $0x1,%eax
77a: 89 45 ec mov %eax,-0x14(%ebp)
if((prevp = freep) == 0){
77d: a1 4c 10 00 00 mov 0x104c,%eax
782: 89 45 f0 mov %eax,-0x10(%ebp)
785: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
789: 75 23 jne 7ae <malloc+0x46>
base.s.ptr = freep = prevp = &base;
78b: c7 45 f0 44 10 00 00 movl $0x1044,-0x10(%ebp)
792: 8b 45 f0 mov -0x10(%ebp),%eax
795: a3 4c 10 00 00 mov %eax,0x104c
79a: a1 4c 10 00 00 mov 0x104c,%eax
79f: a3 44 10 00 00 mov %eax,0x1044
base.s.size = 0;
7a4: c7 05 48 10 00 00 00 movl $0x0,0x1048
7ab: 00 00 00
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
7ae: 8b 45 f0 mov -0x10(%ebp),%eax
7b1: 8b 00 mov (%eax),%eax
7b3: 89 45 f4 mov %eax,-0xc(%ebp)
if(p->s.size >= nunits){
7b6: 8b 45 f4 mov -0xc(%ebp),%eax
7b9: 8b 40 04 mov 0x4(%eax),%eax
7bc: 3b 45 ec cmp -0x14(%ebp),%eax
7bf: 72 4d jb 80e <malloc+0xa6>
if(p->s.size == nunits)
7c1: 8b 45 f4 mov -0xc(%ebp),%eax
7c4: 8b 40 04 mov 0x4(%eax),%eax
7c7: 3b 45 ec cmp -0x14(%ebp),%eax
7ca: 75 0c jne 7d8 <malloc+0x70>
prevp->s.ptr = p->s.ptr;
7cc: 8b 45 f4 mov -0xc(%ebp),%eax
7cf: 8b 10 mov (%eax),%edx
7d1: 8b 45 f0 mov -0x10(%ebp),%eax
7d4: 89 10 mov %edx,(%eax)
7d6: eb 26 jmp 7fe <malloc+0x96>
else {
p->s.size -= nunits;
7d8: 8b 45 f4 mov -0xc(%ebp),%eax
7db: 8b 40 04 mov 0x4(%eax),%eax
7de: 2b 45 ec sub -0x14(%ebp),%eax
7e1: 89 c2 mov %eax,%edx
7e3: 8b 45 f4 mov -0xc(%ebp),%eax
7e6: 89 50 04 mov %edx,0x4(%eax)
p += p->s.size;
7e9: 8b 45 f4 mov -0xc(%ebp),%eax
7ec: 8b 40 04 mov 0x4(%eax),%eax
7ef: c1 e0 03 shl $0x3,%eax
7f2: 01 45 f4 add %eax,-0xc(%ebp)
p->s.size = nunits;
7f5: 8b 45 f4 mov -0xc(%ebp),%eax
7f8: 8b 55 ec mov -0x14(%ebp),%edx
7fb: 89 50 04 mov %edx,0x4(%eax)
}
freep = prevp;
7fe: 8b 45 f0 mov -0x10(%ebp),%eax
801: a3 4c 10 00 00 mov %eax,0x104c
return (void*)(p + 1);
806: 8b 45 f4 mov -0xc(%ebp),%eax
809: 83 c0 08 add $0x8,%eax
80c: eb 38 jmp 846 <malloc+0xde>
}
if(p == freep)
80e: a1 4c 10 00 00 mov 0x104c,%eax
813: 39 45 f4 cmp %eax,-0xc(%ebp)
816: 75 1b jne 833 <malloc+0xcb>
if((p = morecore(nunits)) == 0)
818: 8b 45 ec mov -0x14(%ebp),%eax
81b: 89 04 24 mov %eax,(%esp)
81e: e8 ed fe ff ff call 710 <morecore>
823: 89 45 f4 mov %eax,-0xc(%ebp)
826: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
82a: 75 07 jne 833 <malloc+0xcb>
return 0;
82c: b8 00 00 00 00 mov $0x0,%eax
831: eb 13 jmp 846 <malloc+0xde>
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
833: 8b 45 f4 mov -0xc(%ebp),%eax
836: 89 45 f0 mov %eax,-0x10(%ebp)
839: 8b 45 f4 mov -0xc(%ebp),%eax
83c: 8b 00 mov (%eax),%eax
83e: 89 45 f4 mov %eax,-0xc(%ebp)
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
841: e9 70 ff ff ff jmp 7b6 <malloc+0x4e>
}
846: c9 leave
847: c3 ret
00000848 <xchg>:
asm volatile("sti");
}
static inline uint
xchg(volatile uint *addr, uint newval)
{
848: 55 push %ebp
849: 89 e5 mov %esp,%ebp
84b: 83 ec 10 sub $0x10,%esp
uint result;
// The + in "+m" denotes a read-modify-write operand.
asm volatile("lock; xchgl %0, %1" :
84e: 8b 55 08 mov 0x8(%ebp),%edx
851: 8b 45 0c mov 0xc(%ebp),%eax
854: 8b 4d 08 mov 0x8(%ebp),%ecx
857: f0 87 02 lock xchg %eax,(%edx)
85a: 89 45 fc mov %eax,-0x4(%ebp)
"+m" (*addr), "=a" (result) :
"1" (newval) :
"cc");
return result;
85d: 8b 45 fc mov -0x4(%ebp),%eax
}
860: c9 leave
861: c3 ret
00000862 <lock_init>:
#include "mmu.h"
#include "spinlock.h"
#include "x86.h"
#include "proc.h"
void lock_init(lock_t *lock){
862: 55 push %ebp
863: 89 e5 mov %esp,%ebp
lock->locked = 0;
865: 8b 45 08 mov 0x8(%ebp),%eax
868: c7 00 00 00 00 00 movl $0x0,(%eax)
}
86e: 5d pop %ebp
86f: c3 ret
00000870 <lock_acquire>:
void lock_acquire(lock_t *lock){
870: 55 push %ebp
871: 89 e5 mov %esp,%ebp
873: 83 ec 08 sub $0x8,%esp
while(xchg(&lock->locked,1) != 0);
876: 90 nop
877: 8b 45 08 mov 0x8(%ebp),%eax
87a: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
881: 00
882: 89 04 24 mov %eax,(%esp)
885: e8 be ff ff ff call 848 <xchg>
88a: 85 c0 test %eax,%eax
88c: 75 e9 jne 877 <lock_acquire+0x7>
}
88e: c9 leave
88f: c3 ret
00000890 <lock_release>:
void lock_release(lock_t *lock){
890: 55 push %ebp
891: 89 e5 mov %esp,%ebp
893: 83 ec 08 sub $0x8,%esp
xchg(&lock->locked,0);
896: 8b 45 08 mov 0x8(%ebp),%eax
899: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
8a0: 00
8a1: 89 04 24 mov %eax,(%esp)
8a4: e8 9f ff ff ff call 848 <xchg>
}
8a9: c9 leave
8aa: c3 ret
000008ab <thread_create>:
void *thread_create(void(*start_routine)(void*), void *arg){
8ab: 55 push %ebp
8ac: 89 e5 mov %esp,%ebp
8ae: 83 ec 28 sub $0x28,%esp
int tid;
void * stack = malloc(2 * 4096);
8b1: c7 04 24 00 20 00 00 movl $0x2000,(%esp)
8b8: e8 ab fe ff ff call 768 <malloc>
8bd: 89 45 f4 mov %eax,-0xc(%ebp)
void *garbage_stack = stack;
8c0: 8b 45 f4 mov -0xc(%ebp),%eax
8c3: 89 45 f0 mov %eax,-0x10(%ebp)
// printf(1,"start routine addr : %d\n",(uint)start_routine);
if((uint)stack % 4096){
8c6: 8b 45 f4 mov -0xc(%ebp),%eax
8c9: 25 ff 0f 00 00 and $0xfff,%eax
8ce: 85 c0 test %eax,%eax
8d0: 74 14 je 8e6 <thread_create+0x3b>
stack = stack + (4096 - (uint)stack % 4096);
8d2: 8b 45 f4 mov -0xc(%ebp),%eax
8d5: 25 ff 0f 00 00 and $0xfff,%eax
8da: 89 c2 mov %eax,%edx
8dc: b8 00 10 00 00 mov $0x1000,%eax
8e1: 29 d0 sub %edx,%eax
8e3: 01 45 f4 add %eax,-0xc(%ebp)
}
if (stack == 0){
8e6: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
8ea: 75 1b jne 907 <thread_create+0x5c>
printf(1,"malloc fail \n");
8ec: c7 44 24 04 fb 0b 00 movl $0xbfb,0x4(%esp)
8f3: 00
8f4: c7 04 24 01 00 00 00 movl $0x1,(%esp)
8fb: e8 7c fb ff ff call 47c <printf>
return 0;
900: b8 00 00 00 00 mov $0x0,%eax
905: eb 6f jmp 976 <thread_create+0xcb>
}
tid = clone((uint)stack,PSIZE,(uint)start_routine,(int)arg);
907: 8b 4d 0c mov 0xc(%ebp),%ecx
90a: 8b 55 08 mov 0x8(%ebp),%edx
90d: 8b 45 f4 mov -0xc(%ebp),%eax
910: 89 4c 24 0c mov %ecx,0xc(%esp)
914: 89 54 24 08 mov %edx,0x8(%esp)
918: c7 44 24 04 00 10 00 movl $0x1000,0x4(%esp)
91f: 00
920: 89 04 24 mov %eax,(%esp)
923: e8 4c fa ff ff call 374 <clone>
928: 89 45 ec mov %eax,-0x14(%ebp)
if(tid < 0){
92b: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
92f: 79 1b jns 94c <thread_create+0xa1>
printf(1,"clone fails\n");
931: c7 44 24 04 09 0c 00 movl $0xc09,0x4(%esp)
938: 00
939: c7 04 24 01 00 00 00 movl $0x1,(%esp)
940: e8 37 fb ff ff call 47c <printf>
return 0;
945: b8 00 00 00 00 mov $0x0,%eax
94a: eb 2a jmp 976 <thread_create+0xcb>
}
if(tid > 0){
94c: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
950: 7e 05 jle 957 <thread_create+0xac>
//store threads on thread table
return garbage_stack;
952: 8b 45 f0 mov -0x10(%ebp),%eax
955: eb 1f jmp 976 <thread_create+0xcb>
}
if(tid == 0){
957: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
95b: 75 14 jne 971 <thread_create+0xc6>
printf(1,"tid = 0 return \n");
95d: c7 44 24 04 16 0c 00 movl $0xc16,0x4(%esp)
964: 00
965: c7 04 24 01 00 00 00 movl $0x1,(%esp)
96c: e8 0b fb ff ff call 47c <printf>
}
// wait();
// free(garbage_stack);
return 0;
971: b8 00 00 00 00 mov $0x0,%eax
}
976: c9 leave
977: c3 ret
00000978 <random>:
unsigned long rands = 1;
// generate 0 -> max random number exclude max.
int random(int max){
978: 55 push %ebp
979: 89 e5 mov %esp,%ebp
rands = rands * 1664525 + 1013904233;
97b: a1 40 10 00 00 mov 0x1040,%eax
980: 69 c0 0d 66 19 00 imul $0x19660d,%eax,%eax
986: 05 69 f3 6e 3c add $0x3c6ef369,%eax
98b: a3 40 10 00 00 mov %eax,0x1040
return (int)(rands % max);
990: a1 40 10 00 00 mov 0x1040,%eax
995: 8b 4d 08 mov 0x8(%ebp),%ecx
998: ba 00 00 00 00 mov $0x0,%edx
99d: f7 f1 div %ecx
99f: 89 d0 mov %edx,%eax
9a1: 5d pop %ebp
9a2: c3 ret
000009a3 <init_q>:
#include "queue.h"
#include "types.h"
#include "user.h"
void init_q(struct queue *q){
9a3: 55 push %ebp
9a4: 89 e5 mov %esp,%ebp
q->size = 0;
9a6: 8b 45 08 mov 0x8(%ebp),%eax
9a9: c7 00 00 00 00 00 movl $0x0,(%eax)
q->head = 0;
9af: 8b 45 08 mov 0x8(%ebp),%eax
9b2: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
q->tail = 0;
9b9: 8b 45 08 mov 0x8(%ebp),%eax
9bc: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
}
9c3: 5d pop %ebp
9c4: c3 ret
000009c5 <add_q>:
void add_q(struct queue *q, int v){
9c5: 55 push %ebp
9c6: 89 e5 mov %esp,%ebp
9c8: 83 ec 28 sub $0x28,%esp
struct node * n = malloc(sizeof(struct node));
9cb: c7 04 24 08 00 00 00 movl $0x8,(%esp)
9d2: e8 91 fd ff ff call 768 <malloc>
9d7: 89 45 f4 mov %eax,-0xc(%ebp)
n->next = 0;
9da: 8b 45 f4 mov -0xc(%ebp),%eax
9dd: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
n->value = v;
9e4: 8b 45 f4 mov -0xc(%ebp),%eax
9e7: 8b 55 0c mov 0xc(%ebp),%edx
9ea: 89 10 mov %edx,(%eax)
if(q->head == 0){
9ec: 8b 45 08 mov 0x8(%ebp),%eax
9ef: 8b 40 04 mov 0x4(%eax),%eax
9f2: 85 c0 test %eax,%eax
9f4: 75 0b jne a01 <add_q+0x3c>
q->head = n;
9f6: 8b 45 08 mov 0x8(%ebp),%eax
9f9: 8b 55 f4 mov -0xc(%ebp),%edx
9fc: 89 50 04 mov %edx,0x4(%eax)
9ff: eb 0c jmp a0d <add_q+0x48>
}else{
q->tail->next = n;
a01: 8b 45 08 mov 0x8(%ebp),%eax
a04: 8b 40 08 mov 0x8(%eax),%eax
a07: 8b 55 f4 mov -0xc(%ebp),%edx
a0a: 89 50 04 mov %edx,0x4(%eax)
}
q->tail = n;
a0d: 8b 45 08 mov 0x8(%ebp),%eax
a10: 8b 55 f4 mov -0xc(%ebp),%edx
a13: 89 50 08 mov %edx,0x8(%eax)
q->size++;
a16: 8b 45 08 mov 0x8(%ebp),%eax
a19: 8b 00 mov (%eax),%eax
a1b: 8d 50 01 lea 0x1(%eax),%edx
a1e: 8b 45 08 mov 0x8(%ebp),%eax
a21: 89 10 mov %edx,(%eax)
}
a23: c9 leave
a24: c3 ret
00000a25 <empty_q>:
int empty_q(struct queue *q){
a25: 55 push %ebp
a26: 89 e5 mov %esp,%ebp
if(q->size == 0)
a28: 8b 45 08 mov 0x8(%ebp),%eax
a2b: 8b 00 mov (%eax),%eax
a2d: 85 c0 test %eax,%eax
a2f: 75 07 jne a38 <empty_q+0x13>
return 1;
a31: b8 01 00 00 00 mov $0x1,%eax
a36: eb 05 jmp a3d <empty_q+0x18>
else
return 0;
a38: b8 00 00 00 00 mov $0x0,%eax
}
a3d: 5d pop %ebp
a3e: c3 ret
00000a3f <pop_q>:
int pop_q(struct queue *q){
a3f: 55 push %ebp
a40: 89 e5 mov %esp,%ebp
a42: 83 ec 28 sub $0x28,%esp
int val;
struct node *destroy;
if(!empty_q(q)){
a45: 8b 45 08 mov 0x8(%ebp),%eax
a48: 89 04 24 mov %eax,(%esp)
a4b: e8 d5 ff ff ff call a25 <empty_q>
a50: 85 c0 test %eax,%eax
a52: 75 5d jne ab1 <pop_q+0x72>
val = q->head->value;
a54: 8b 45 08 mov 0x8(%ebp),%eax
a57: 8b 40 04 mov 0x4(%eax),%eax
a5a: 8b 00 mov (%eax),%eax
a5c: 89 45 f4 mov %eax,-0xc(%ebp)
destroy = q->head;
a5f: 8b 45 08 mov 0x8(%ebp),%eax
a62: 8b 40 04 mov 0x4(%eax),%eax
a65: 89 45 f0 mov %eax,-0x10(%ebp)
q->head = q->head->next;
a68: 8b 45 08 mov 0x8(%ebp),%eax
a6b: 8b 40 04 mov 0x4(%eax),%eax
a6e: 8b 50 04 mov 0x4(%eax),%edx
a71: 8b 45 08 mov 0x8(%ebp),%eax
a74: 89 50 04 mov %edx,0x4(%eax)
free(destroy);
a77: 8b 45 f0 mov -0x10(%ebp),%eax
a7a: 89 04 24 mov %eax,(%esp)
a7d: e8 ad fb ff ff call 62f <free>
q->size--;
a82: 8b 45 08 mov 0x8(%ebp),%eax
a85: 8b 00 mov (%eax),%eax
a87: 8d 50 ff lea -0x1(%eax),%edx
a8a: 8b 45 08 mov 0x8(%ebp),%eax
a8d: 89 10 mov %edx,(%eax)
if(q->size == 0){
a8f: 8b 45 08 mov 0x8(%ebp),%eax
a92: 8b 00 mov (%eax),%eax
a94: 85 c0 test %eax,%eax
a96: 75 14 jne aac <pop_q+0x6d>
q->head = 0;
a98: 8b 45 08 mov 0x8(%ebp),%eax
a9b: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
q->tail = 0;
aa2: 8b 45 08 mov 0x8(%ebp),%eax
aa5: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
}
return val;
aac: 8b 45 f4 mov -0xc(%ebp),%eax
aaf: eb 05 jmp ab6 <pop_q+0x77>
}
return -1;
ab1: b8 ff ff ff ff mov $0xffffffff,%eax
}
ab6: c9 leave
ab7: c3 ret
00000ab8 <sem_init>:
#include "types.h"
#include "user.h"
#include "semaphore.h"
void
sem_init(struct semaphore *s, int size){
ab8: 55 push %ebp
ab9: 89 e5 mov %esp,%ebp
abb: 83 ec 18 sub $0x18,%esp
s->size = size;
abe: 8b 45 08 mov 0x8(%ebp),%eax
ac1: 8b 55 0c mov 0xc(%ebp),%edx
ac4: 89 50 08 mov %edx,0x8(%eax)
s->count = size;
ac7: 8b 45 08 mov 0x8(%ebp),%eax
aca: 8b 55 0c mov 0xc(%ebp),%edx
acd: 89 50 04 mov %edx,0x4(%eax)
lock_init(&s->lock);
ad0: 8b 45 08 mov 0x8(%ebp),%eax
ad3: 89 04 24 mov %eax,(%esp)
ad6: e8 87 fd ff ff call 862 <lock_init>
}
adb: c9 leave
adc: c3 ret
00000add <sem_init_full>:
void
sem_init_full(struct semaphore *s, int size){
add: 55 push %ebp
ade: 89 e5 mov %esp,%ebp
ae0: 83 ec 18 sub $0x18,%esp
s->size = size;
ae3: 8b 45 08 mov 0x8(%ebp),%eax
ae6: 8b 55 0c mov 0xc(%ebp),%edx
ae9: 89 50 08 mov %edx,0x8(%eax)
s->count= 0;
aec: 8b 45 08 mov 0x8(%ebp),%eax
aef: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
lock_init(&s->lock);
af6: 8b 45 08 mov 0x8(%ebp),%eax
af9: 89 04 24 mov %eax,(%esp)
afc: e8 61 fd ff ff call 862 <lock_init>
}
b01: c9 leave
b02: c3 ret
00000b03 <sem_aquire>:
//Attempts to aquire a lock. If count is not
//full then we will add the process to the list of
//processes holding the lock.
void
sem_aquire(struct semaphore * s){
b03: 55 push %ebp
b04: 89 e5 mov %esp,%ebp
b06: 83 ec 28 sub $0x28,%esp
//Disable interrupts? nah
//We need to only get a hold of waiters?
//If count is full then place proccess on waiters list
//Else add to the holding list
lock_acquire(&s->lock);
b09: 8b 45 08 mov 0x8(%ebp),%eax
b0c: 89 04 24 mov %eax,(%esp)
b0f: e8 5c fd ff ff call 870 <lock_acquire>
if(s->count == 0){
b14: 8b 45 08 mov 0x8(%ebp),%eax
b17: 8b 40 04 mov 0x4(%eax),%eax
b1a: 85 c0 test %eax,%eax
b1c: 75 2f jne b4d <sem_aquire+0x4a>
//printf(1, "Sem F\n");
//add proc to waiters list
int tid = getpid();
b1e: e8 31 f8 ff ff call 354 <getpid>
b23: 89 45 f4 mov %eax,-0xc(%ebp)
//place requesting process to sleep
add_q(&s->waiters, tid); //Add process to queue
b26: 8b 45 08 mov 0x8(%ebp),%eax
b29: 8d 50 0c lea 0xc(%eax),%edx
b2c: 8b 45 f4 mov -0xc(%ebp),%eax
b2f: 89 44 24 04 mov %eax,0x4(%esp)
b33: 89 14 24 mov %edx,(%esp)
b36: e8 8a fe ff ff call 9c5 <add_q>
//printf(1, " Added to waiters semaphore with size: %d\n", s->size);
lock_release(&s->lock);
b3b: 8b 45 08 mov 0x8(%ebp),%eax
b3e: 89 04 24 mov %eax,(%esp)
b41: e8 4a fd ff ff call 890 <lock_release>
tsleep();
b46: e8 39 f8 ff ff call 384 <tsleep>
b4b: eb 1a jmp b67 <sem_aquire+0x64>
}
else{
//printf(1, "Sem A\n");
s->count--;
b4d: 8b 45 08 mov 0x8(%ebp),%eax
b50: 8b 40 04 mov 0x4(%eax),%eax
b53: 8d 50 ff lea -0x1(%eax),%edx
b56: 8b 45 08 mov 0x8(%ebp),%eax
b59: 89 50 04 mov %edx,0x4(%eax)
lock_release(&s->lock);
b5c: 8b 45 08 mov 0x8(%ebp),%eax
b5f: 89 04 24 mov %eax,(%esp)
b62: e8 29 fd ff ff call 890 <lock_release>
}
}
b67: c9 leave
b68: c3 ret
00000b69 <sem_signal>:
//Removes a process from a lock and decreases count
//to indicate that more process can hold the lock.
void
sem_signal(struct semaphore * s){
b69: 55 push %ebp
b6a: 89 e5 mov %esp,%ebp
b6c: 83 ec 28 sub $0x28,%esp
//printf(1, "Sem R\n");
//If count is full then place proccess on waiters list
lock_acquire(&s->lock);
b6f: 8b 45 08 mov 0x8(%ebp),%eax
b72: 89 04 24 mov %eax,(%esp)
b75: e8 f6 fc ff ff call 870 <lock_acquire>
if(s->count < s->size){
b7a: 8b 45 08 mov 0x8(%ebp),%eax
b7d: 8b 50 04 mov 0x4(%eax),%edx
b80: 8b 45 08 mov 0x8(%ebp),%eax
b83: 8b 40 08 mov 0x8(%eax),%eax
b86: 39 c2 cmp %eax,%edx
b88: 7d 0f jge b99 <sem_signal+0x30>
s->count++;
b8a: 8b 45 08 mov 0x8(%ebp),%eax
b8d: 8b 40 04 mov 0x4(%eax),%eax
b90: 8d 50 01 lea 0x1(%eax),%edx
b93: 8b 45 08 mov 0x8(%ebp),%eax
b96: 89 50 04 mov %edx,0x4(%eax)
}
int tid;
tid = pop_q(&s->waiters);
b99: 8b 45 08 mov 0x8(%ebp),%eax
b9c: 83 c0 0c add $0xc,%eax
b9f: 89 04 24 mov %eax,(%esp)
ba2: e8 98 fe ff ff call a3f <pop_q>
ba7: 89 45 f4 mov %eax,-0xc(%ebp)
if(tid != -1){
baa: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp)
bae: 74 2e je bde <sem_signal+0x75>
//printf(1, "Sem A\n");
twakeup(tid);
bb0: 8b 45 f4 mov -0xc(%ebp),%eax
bb3: 89 04 24 mov %eax,(%esp)
bb6: e8 d1 f7 ff ff call 38c <twakeup>
s->count--;
bbb: 8b 45 08 mov 0x8(%ebp),%eax
bbe: 8b 40 04 mov 0x4(%eax),%eax
bc1: 8d 50 ff lea -0x1(%eax),%edx
bc4: 8b 45 08 mov 0x8(%ebp),%eax
bc7: 89 50 04 mov %edx,0x4(%eax)
if(s->count < 0) s->count = 0;
bca: 8b 45 08 mov 0x8(%ebp),%eax
bcd: 8b 40 04 mov 0x4(%eax),%eax
bd0: 85 c0 test %eax,%eax
bd2: 79 0a jns bde <sem_signal+0x75>
bd4: 8b 45 08 mov 0x8(%ebp),%eax
bd7: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
}
lock_release(&s->lock);
bde: 8b 45 08 mov 0x8(%ebp),%eax
be1: 89 04 24 mov %eax,(%esp)
be4: e8 a7 fc ff ff call 890 <lock_release>
be9: c9 leave
bea: c3 ret
| 34.614005 | 71 | 0.437296 |
826e5b5c79d1629f5a055f25ca51975460c8d043 | 126 | asm | Assembly | tests/S20-SIM/sim_draft_test.asm | liffiton/256sim | ba284510be88727de15dbd99fa6274df66fa0b96 | [
"MIT"
] | 1 | 2020-04-12T22:32:36.000Z | 2020-04-12T22:32:36.000Z | tests/S20-SIM/sim_draft_test.asm | liffiton/256sim | ba284510be88727de15dbd99fa6274df66fa0b96 | [
"MIT"
] | null | null | null | tests/S20-SIM/sim_draft_test.asm | liffiton/256sim | ba284510be88727de15dbd99fa6274df66fa0b96 | [
"MIT"
] | 1 | 2020-04-13T20:43:51.000Z | 2020-04-13T20:43:51.000Z | # Simple test of ADDI, ADD, and SUB
addi $1 0
addi $1 1
addi $2 2
addi $3 3
add $4 $3
add $4 $1
sub $5 $1
sub $6 $3
sub $6 $3
| 11.454545 | 35 | 0.587302 |
bf0913573fc0411dcd61625c7b24b57ebdb3472f | 686 | asm | Assembly | oeis/202/A202050.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/202/A202050.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/202/A202050.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A202050: Number of (n+2) X 8 binary arrays avoiding patterns 001 and 110 in rows and columns.
; 1392,5216,15760,41088,95984,205792,411696,777760,1400080,2418432,4030832,6511456,10232400,15689792,23534800,34610112,49992496,71042080,99459024,137348288,187293232,252438816,336585200,444292576,580998096,753145792,968330416,1235456160,1564911248,1968759424,2460949392,3057543296,3776965360,4640271840,5671443472,6897701632,8349849456,10062639200,12075167152,14431297440,17180116112,20376416896,24081220080,28362325984,33294904528,38962122432,45455809616,52877166400,61337513136,70959083936
add $0,2
mov $1,$0
mov $2,$0
add $2,8
bin $2,$0
sub $1,$2
sub $2,$1
mov $0,$2
sub $0,1
mul $0,16
| 49 | 491 | 0.8207 |
37c9221aea661fa2999bd57a096496742d8f4073 | 688 | asm | Assembly | oeis/083/A083084.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/083/A083084.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/083/A083084.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A083084: A diagonal of number array A083075.
; Submitted by Christian Krause
; 1,9,141,2893,73081,2200977,77189509,3095295861,139872233073,7039013063065,390656716635901,23714578436644509,1563646420268423401,111315499088924632353,8511391223995285616373,695805743909499121660357,60571079368920401629111009,5594669625105161922742432041,546539885995514876799149946733,56305931233276029424529561747949,6101522187537818486335542008423001,693816990920069013462655100770105009,82610602942300584241604138279689817701,10279013635774970795671059467174388744213
add $0,3
mov $1,$0
add $0,2
add $1,1
add $0,$1
mov $2,$1
sub $1,1
mul $2,$0
mul $2,$0
mul $2,$0
pow $0,$1
mul $0,$1
div $0,$2
add $0,1
| 36.210526 | 472 | 0.84157 |
8c9db906ff15201eae9e319c69814654ab865f66 | 86 | asm | Assembly | libsrc/stdio/ansi/ansifont_f3.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 38 | 2021-06-18T12:56:15.000Z | 2022-03-12T20:38:40.000Z | libsrc/stdio/ansi/ansifont_f3.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 2 | 2021-06-20T16:28:12.000Z | 2021-11-17T21:33:56.000Z | libsrc/stdio/ansi/ansifont_f3.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 6 | 2021-06-18T18:18:36.000Z | 2021-12-22T08:01:32.000Z |
SECTION rodata_clib
PUBLIC ansifont_f3
ansifont_f3:
BINARY "stdio/ansi/F3.BIN"
| 9.555556 | 27 | 0.767442 |
0ed3a91f2c36f7bba06def77f6fba2e0eb9cf10c | 7,606 | asm | Assembly | ugbc/src/hw/6502/mob.asm | spotlessmind1975/ugbasic | 1df3c8fde8e80b479ece86b4ff2b97b599d57ff4 | [
"Apache-2.0"
] | 10 | 2021-10-03T13:44:25.000Z | 2022-03-10T23:53:32.000Z | ugbc/src/hw/6502/mob.asm | spotlessmind1975/ugbasic | 1df3c8fde8e80b479ece86b4ff2b97b599d57ff4 | [
"Apache-2.0"
] | 379 | 2021-08-12T09:46:09.000Z | 2022-03-27T11:29:12.000Z | ugbc/src/hw/6502/mob.asm | spotlessmind1975/ugbasic | 1df3c8fde8e80b479ece86b4ff2b97b599d57ff4 | [
"Apache-2.0"
] | 2 | 2021-11-08T19:37:50.000Z | 2021-11-20T22:27:12.000Z | ; /*****************************************************************************
; * ugBASIC - an isomorphic BASIC language compiler for retrocomputers *
; *****************************************************************************
; * Copyright 2021-2022 Marco Spedaletti (asimov@mclink.it)
; *
; * Licensed under the Apache License, Version 2.0 (the "License");
; * you may not use this file eXcept in compliance with the License.
; * You may obtain a copy of the License at
; *
; * http://www.apache.org/licenses/LICENSE-2.0
; *
; * Unless required by applicable law or agreed to in writing, software
; * distributed under the License is distributed on an "AS IS" BASIS,
; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either eXpress or implied.
; * See the License for the specific language governing permissions and
; * limitations under the License.
; *----------------------------------------------------------------------------
; * Concesso in licenza secondo i termini della Licenza Apache, versione 2.0
; * (la "Licenza"); è proibito usare questo file se non in conformità alla
; * Licenza. Una copia della Licenza è disponibile all'indirizzo:
; *
; * http://www.apache.org/licenses/LICENSE-2.0
; *
; * Se non richiesto dalla legislazione vigente o concordato per iscritto,
; * il software distribuito nei termini della Licenza è distribuito
; * "COSì COM'è", SENZA GARANZIE O CONDIZIONI DI ALCUN TIPO, esplicite o
; * implicite. Consultare la Licenza per il testo specifico che regola le
; * autorizzazioni e le limitazioni previste dalla medesima.
; ****************************************************************************/
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
;* *
;* MOVABLE OBJECTS UNDER 6502 (generic algorithms) *
;* *
;* by Marco Spedaletti *
;* *
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
MOB_COUNT = $10
MOBI: .byte 0
MOBX: .word 0
MOBY: .word 0
MOBW: .word 0
MOBH: .word 0
MOBADDR = $03
MOBSIZE: .word 0
MOBLASTX: .byte 0
MOBCOUNT: .byte 0
; Generic initialization
; MOBINIT(X:indeX,X,y,w,h,draw)
MOBINIT:
STX MOBI
; Initialize status
LDA #$0
STA MOBDESCRIPTORS_S,X
; Initialize position
LDA MOBX
STA MOBDESCRIPTORS_XL,X
STA MOBDESCRIPTORS_PXL,X
LDA MOBX+1
STA MOBDESCRIPTORS_XH,X
STA MOBDESCRIPTORS_PXH,X
LDA MOBY
STA MOBDESCRIPTORS_YL,X
STA MOBDESCRIPTORS_PYL,X
LDA MOBY+1
STA MOBDESCRIPTORS_YH,X
STA MOBDESCRIPTORS_PYH,X
; Initialize size
LDA MOBW
STA MOBDESCRIPTORS_W,X
LDA MOBH
STA MOBDESCRIPTORS_H,X
; Save address of the given data.
; Note that specific chipset
; initialization can easily override this.
LDA MOBADDR
STA MOBDESCRIPTORS_DL,X
LDA MOBADDR+1
STA MOBDESCRIPTORS_DH,X
; Initialize to 0 the space for saving
; background (again, this is a chipset specific
; initialization routine).
LDA #$0
STA MOBDESCRIPTORS_SL,X
STA MOBDESCRIPTORS_SH,X
; Initialize the chipset specific part
JSR MOBINITCS
RTS
; MOBSHOW(X:indeX)
MOBSHOW:
LDA MOBDESCRIPTORS_S,X
ORA #$01
STA MOBDESCRIPTORS_S,X
RTS
; MOBHIDE(X:indeX)
MOBHIDE:
LDA MOBDESCRIPTORS_S,X
AND #$FE
STA MOBDESCRIPTORS_S,X
RTS
; MOBSAVE(X:indeX) -> chipset
; MOBRESTORE(X:indeX) -> chipset
; MOBDRAW(X:indeX) -> chipset
MOBADJUST:
LDA MOBDESCRIPTORS_S,X
AND #$01
BEQ MOBADJUSTN
LDA MOBDESCRIPTORS_S,X
ORA #$03
STA MOBDESCRIPTORS_S,X
RTS
MOBADJUSTN:
LDA MOBDESCRIPTORS_S,X
AND #$FC
STA MOBDESCRIPTORS_S,X
RTS
; MOBAT(X:indeX, X, y)
MOBAT:
STX MOBI
LDA MOBX
STA MOBDESCRIPTORS_XL,X
CMP MOBDESCRIPTORS_PXL,X
BEQ MOBAT2
LDA MOBDESCRIPTORS_S,X
ORA #$04
STA MOBDESCRIPTORS_S,X
MOBAT2:
LDA MOBX+1
STA MOBDESCRIPTORS_XH,X
CMP MOBDESCRIPTORS_PXH,X
BEQ MOBAT3
LDA MOBDESCRIPTORS_S,X
ORA #$04
STA MOBDESCRIPTORS_S,X
MOBAT3:
LDA MOBY
STA MOBDESCRIPTORS_YL,X
CMP MOBDESCRIPTORS_PYL,X
BEQ MOBAT4
LDA MOBDESCRIPTORS_S,X
ORA #$08
STA MOBDESCRIPTORS_S,X
MOBAT4:
LDA MOBY+1
STA MOBDESCRIPTORS_YH,X
STA MOBDESCRIPTORS_PYH,X
BEQ MOBAT5
LDA MOBDESCRIPTORS_S,X
ORA #$08
STA MOBDESCRIPTORS_S,X
MOBAT5:
JSR MOBATCS
RTS
MOBALLOC:
CLC
LDA MOBADDRESS
ADC MOBALLOCATED
STA MOBADDR
LDA MOBADDRESS+1
ADC MOBALLOCATED+1
STA MOBADDR+1
CLC
LDA MOBALLOCATED
ADC MOBSIZE
STA MOBALLOCATED
LDA MOBALLOCATED+1
ADC #0
STA MOBALLOCATED+1
RTS
MOBFREE:
SEC
LDA MOBALLOCATED
SBC MOBSIZE
STA MOBALLOCATED
LDA MOBALLOCATED+1
SBC #0
STA MOBALLOCATED+1
RTS
MOBDESCRIPTORS_S:
.RES MOB_COUNT
MOBDESCRIPTORS_XL:
.RES MOB_COUNT
MOBDESCRIPTORS_XH:
.RES MOB_COUNT
MOBDESCRIPTORS_YL:
.RES MOB_COUNT
MOBDESCRIPTORS_YH:
.RES MOB_COUNT
MOBDESCRIPTORS_PXL:
.RES MOB_COUNT
MOBDESCRIPTORS_PXH:
.RES MOB_COUNT
MOBDESCRIPTORS_PYL:
.RES MOB_COUNT
MOBDESCRIPTORS_PYH:
.RES MOB_COUNT
MOBDESCRIPTORS_W:
.RES MOB_COUNT
MOBDESCRIPTORS_H:
.RES MOB_COUNT
MOBDESCRIPTORS_DL:
.RES MOB_COUNT
MOBDESCRIPTORS_DH:
.RES MOB_COUNT
MOBDESCRIPTORS_SL:
.RES MOB_COUNT
MOBDESCRIPTORS_SH:
.RES MOB_COUNT
MOBDESCRIPTORS_SIZEL:
.RES MOB_COUNT
MOBDESCRIPTORS_SIZEH:
.RES MOB_COUNT
MOBALLOCATED: .WORD $0
MOBVBL: .BYTE $0
MOBRENDER:
; JSR MOBWAITVBL
; X = 0
LDX #0
MOBRENDERL1:
; take descriptor X
LDA MOBDESCRIPTORS_S,X
; unvisibled -> visibled? = $01
; visibled? -> unvisibled = $02
; moved + visibled? = $0D
; moved + unvisibled? = $0E
; moved? = $08 or $04
AND #$03
CMP #$01
BEQ MOBRENDERV1
CMP #$02
BEQ MOBRENDERV1
; retake descriptor X
LDA MOBDESCRIPTORS_S,X
AND #$0C
BNE MOBRENDERV1
; ++X
INX
; X < N ?
CPX #MOB_COUNT
BNE MOBRENDERL1
RTS
MOBRENDERV1:
; LASTX = X
STX MOBLASTX
; X = N - 1
LDX #MOB_COUNT
DEX
MOBRENDERL2:
; previously visible?
LDA MOBDESCRIPTORS_S, X
AND #$02
BEQ MOBRENDERV2
STX MOBI
; restore background at pX,py (w,h) save area
JSR MOBRESTORE
LDX MOBI
; adjust visibility flag
JSR MOBADJUST
MOBRENDERV2:
; update positions
LDA MOBDESCRIPTORS_XL, X
STA MOBDESCRIPTORS_PXL, X
LDA MOBDESCRIPTORS_XH, X
STA MOBDESCRIPTORS_PXH, X
LDA MOBDESCRIPTORS_YL, X
STA MOBDESCRIPTORS_PYL, X
LDA MOBDESCRIPTORS_YH, X
STA MOBDESCRIPTORS_PYH, X
; --X
DEX
; X >= LASTX
CPX MOBLASTX
BCS MOBRENDERL2
BEQ MOBRENDERL2
; Reset the save area to LAST X
MOBRENDERV3:
MOBRENDERL3:
; visible ?
LDA MOBDESCRIPTORS_S, X
AND #$01
BEQ MOBRENDERV4
STX MOBI
; save background at X,y (w,h) to save area
JSR MOBSAVE
LDX MOBI
; draw sprite at X,y (w,h) from draw area
JSR MOBDRAW
LDX MOBI
; adjust visibility flag
JSR MOBADJUST
LDX MOBI
MOBRENDERV4:
; ++X
INX
; X < N ?
CPX #MOB_COUNT
BCC MOBRENDERL3
; JSR MOBWAITVBL
RTS | 21.365169 | 80 | 0.59361 |
6d9eff3e4bebe92698e4dee69ecef8f90be2f180 | 324 | asm | Assembly | programs/oeis/039/A039713.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/039/A039713.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/039/A039713.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A039713: a(n) = n-th prime modulo 15.
; 2,3,5,7,11,13,2,4,8,14,1,7,11,13,2,8,14,1,7,11,13,4,8,14,7,11,13,2,4,8,7,11,2,4,14,1,7,13,2,8,14,1,11,13,2,4,1,13,2,4,8,14,1,11,2,8,14,1,7,11,13,8,7,11,13,2,1,7,2,4,8,14,7,13,4,8,14,7,11,4,14,1,11,13,4,8,14,7,11,13,2,14,7,11,4,8,14,11,13,1
seq $0,40 ; The prime numbers.
mod $0,15
| 54 | 241 | 0.592593 |
bf3ceaaf4fc6dbfaf2d677ba877268c10c2926e4 | 10,854 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_sm_/i7-8650U_0xd2_notsx.log_5063_835.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-8650U_0xd2_notsx.log_5063_835.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-8650U_0xd2_notsx.log_5063_835.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r14
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0x6fe0, %rbx
nop
nop
nop
nop
and $37282, %rdi
mov $0x6162636465666768, %r13
movq %r13, (%rbx)
nop
nop
cmp $25860, %rdx
lea addresses_A_ht+0x3360, %rbx
nop
nop
add $42250, %rcx
and $0xffffffffffffffc0, %rbx
vmovaps (%rbx), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $1, %xmm6, %r10
nop
nop
nop
sub %rcx, %rcx
lea addresses_D_ht+0x9770, %rdx
xor %r14, %r14
movups (%rdx), %xmm7
vpextrq $0, %xmm7, %rcx
nop
nop
inc %rbx
lea addresses_A_ht+0x1ce0, %rsi
lea addresses_D_ht+0xcf60, %rdi
clflush (%rsi)
nop
nop
nop
nop
and $8543, %rdx
mov $93, %rcx
rep movsw
cmp $9860, %rcx
lea addresses_A_ht+0xa678, %r10
nop
nop
nop
nop
nop
sub %rdi, %rdi
movb $0x61, (%r10)
nop
nop
nop
add %rdx, %rdx
lea addresses_UC_ht+0x14b60, %r10
nop
nop
add %rbx, %rbx
movb $0x61, (%r10)
inc %r14
lea addresses_A_ht+0xdb60, %r10
sub %r13, %r13
movl $0x61626364, (%r10)
add $57161, %rbx
lea addresses_UC_ht+0x1ad20, %rsi
lea addresses_WT_ht+0x19ddc, %rdi
nop
nop
nop
and $53203, %r10
mov $6, %rcx
rep movsq
nop
nop
nop
and %rcx, %rcx
lea addresses_normal_ht+0x9f60, %rsi
lea addresses_UC_ht+0xe160, %rdi
nop
cmp $36302, %r10
mov $49, %rcx
rep movsw
nop
nop
nop
nop
add $21643, %rsi
lea addresses_WC_ht+0xc33c, %rdi
nop
nop
nop
nop
sub $4872, %rdx
mov $0x6162636465666768, %rbx
movq %rbx, %xmm0
movups %xmm0, (%rdi)
nop
inc %rsi
lea addresses_WC_ht+0x15760, %rsi
nop
nop
nop
cmp $31502, %rbx
movw $0x6162, (%rsi)
nop
nop
nop
nop
xor $39302, %rdx
lea addresses_A_ht+0xf960, %r14
clflush (%r14)
nop
nop
cmp %rdx, %rdx
mov $0x6162636465666768, %rcx
movq %rcx, %xmm7
movups %xmm7, (%r14)
nop
nop
nop
nop
sub $4321, %rcx
lea addresses_A_ht+0x14360, %rsi
lea addresses_A_ht+0x1dde0, %rdi
nop
nop
nop
inc %r13
mov $44, %rcx
rep movsq
nop
nop
nop
and $57614, %r13
lea addresses_A_ht+0x16e88, %r13
nop
nop
nop
add $61232, %rcx
movw $0x6162, (%r13)
nop
add %rbx, %rbx
lea addresses_UC_ht+0x18798, %rcx
nop
nop
cmp $52215, %rbx
mov (%rcx), %dx
nop
nop
nop
cmp %rdx, %rdx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r14
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r14
push %r15
push %r8
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
// Store
lea addresses_normal+0x15b60, %r10
nop
dec %rcx
movb $0x51, (%r10)
nop
and %rbp, %rbp
// Store
lea addresses_D+0x16f60, %r14
clflush (%r14)
nop
nop
nop
dec %r8
movw $0x5152, (%r14)
xor $18895, %r15
// Store
lea addresses_normal+0x16360, %r10
nop
nop
nop
nop
nop
xor $13785, %rbp
mov $0x5152535455565758, %rcx
movq %rcx, (%r10)
nop
nop
nop
nop
and $38476, %rax
// Load
lea addresses_PSE+0x5f60, %r15
and %rcx, %rcx
mov (%r15), %bp
nop
and $6404, %rbp
// Store
lea addresses_D+0x12f60, %rbp
nop
nop
nop
xor $35048, %r14
mov $0x5152535455565758, %rcx
movq %rcx, %xmm5
movups %xmm5, (%rbp)
nop
add $16463, %r14
// Store
lea addresses_WT+0x8793, %r14
clflush (%r14)
nop
nop
nop
nop
sub $56688, %r8
movw $0x5152, (%r14)
nop
nop
nop
nop
nop
dec %r15
// Load
lea addresses_WC+0x3e0, %r14
xor $23609, %rax
mov (%r14), %cx
nop
nop
add %r10, %r10
// REPMOV
lea addresses_D+0x1f0ae, %rsi
lea addresses_UC+0x9160, %rdi
clflush (%rdi)
nop
nop
nop
nop
and %rax, %rax
mov $30, %rcx
rep movsb
nop
nop
xor %rcx, %rcx
// Store
lea addresses_WC+0x2d60, %r15
nop
nop
add %r10, %r10
movb $0x51, (%r15)
nop
nop
nop
add %r15, %r15
// REPMOV
lea addresses_RW+0x164e0, %rsi
lea addresses_PSE+0x4660, %rdi
nop
sub %r10, %r10
mov $103, %rcx
rep movsl
nop
cmp %rdi, %rdi
// Store
lea addresses_WC+0x1e040, %rcx
sub $37889, %r8
mov $0x5152535455565758, %rax
movq %rax, %xmm7
movups %xmm7, (%rcx)
nop
nop
mfence
// Load
lea addresses_normal+0x25ec, %r8
inc %rbp
movb (%r8), %r10b
nop
nop
nop
nop
dec %rsi
// Faulty Load
lea addresses_normal+0x15b60, %r15
nop
nop
nop
nop
nop
xor $49105, %r14
movb (%r15), %r8b
lea oracles, %rdi
and $0xff, %r8
shlq $12, %r8
mov (%rdi,%r8,1), %r8
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r8
pop %r15
pop %r14
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 2, 'AVXalign': True, 'NT': False, 'congruent': 6, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_UC', 'congruent': 9, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_RW', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_PSE', 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 32, 'AVXalign': True, 'NT': False, 'congruent': 11, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 10, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 2, 'AVXalign': True, 'NT': False, 'congruent': 3, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}}
{'51': 5063}
51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51
*/
| 28.790451 | 2,999 | 0.650451 |
8eaa2e389daf1b256b6b1c56fa8ebefae66855da | 608 | asm | Assembly | oeis/158/A158488.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/158/A158488.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/158/A158488.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A158488: a(n) = 64*n^2 + 8.
; Submitted by Christian Krause
; 72,264,584,1032,1608,2312,3144,4104,5192,6408,7752,9224,10824,12552,14408,16392,18504,20744,23112,25608,28232,30984,33864,36872,40008,43272,46664,50184,53832,57608,61512,65544,69704,73992,78408,82952,87624,92424,97352,102408,107592,112904,118344,123912,129608,135432,141384,147464,153672,160008,166472,173064,179784,186632,193608,200712,207944,215304,222792,230408,238152,246024,254024,262152,270408,278792,287304,295944,304712,313608,322632,331784,341064,350472,360008,369672,379464,389384,399432
add $0,1
pow $0,2
mul $0,8
add $0,1
mul $0,8
| 60.8 | 499 | 0.796053 |
c2cb6b79a3f46ea07acbcadd2a0c7f0555f578ef | 429 | asm | Assembly | libsrc/c128/restorecia.asm | andydansby/z88dk-mk2 | 51c15f1387293809c496f5eaf7b196f8a0e9b66b | [
"ClArtistic"
] | 1 | 2020-09-15T08:35:49.000Z | 2020-09-15T08:35:49.000Z | libsrc/c128/restorecia.asm | andydansby/z88dk-MK2 | 51c15f1387293809c496f5eaf7b196f8a0e9b66b | [
"ClArtistic"
] | null | null | null | libsrc/c128/restorecia.asm | andydansby/z88dk-MK2 | 51c15f1387293809c496f5eaf7b196f8a0e9b66b | [
"ClArtistic"
] | null | null | null | ;
; Keyboard routines for the Commodore 128 (Z80 mode)
; By Stefano Bodrato - 27/08/2001
;
; getk() Read key status
;
; $Id: restorecia.asm,v 1.1 2008/06/23 17:34:34 stefano Exp $
;
XLIB restorecia
XREF SaveA
.restorecia
; restore CIA registers
ld bc,$D02F
ld a,7
out (c),a
ld bc,$DC00+2 ;cia1+ciaDataDirA
ld hl,SaveA
ld a,(hl)
out (c),a
inc bc ;cia1+ciaDataDirB
inc hl
ld a,(hl) ; SaveB
out (c),a
ret
| 13.83871 | 61 | 0.65035 |
bace1eacfff1b2c20f5ea270e808822374e0e78a | 468 | asm | Assembly | programs/oeis/158/A158525.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/158/A158525.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/158/A158525.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A158525: Number of connected spanning subgraphs and number of forests of the wheel graph W_n.
; 38,134,462,1582,5406,18462,63038,215230,734846,2508926,8566014,29246206,99852798,340918782,1163969534,3974040574,13568223230,46324811774,158162800638,540001579006,1843680714750,6294719700990,21491517374462,73376630095870,250523485634558,855340682346494,2920315758116862
add $0,3
mov $2,6
lpb $0,1
sub $0,1
add $1,$2
sub $1,5
add $2,1
add $2,$1
mul $1,2
lpe
| 33.428571 | 271 | 0.786325 |
81e56b8549c4f3f25bb36d8922783f792cc9cab8 | 3,340 | asm | Assembly | Mirocomputer Systems/ex5/ex2.asm | AthinaKyriakou/ntua-ece | ff60111cf26f9056aba30bc86f2ee75d39aaa01e | [
"MIT"
] | null | null | null | Mirocomputer Systems/ex5/ex2.asm | AthinaKyriakou/ntua-ece | ff60111cf26f9056aba30bc86f2ee75d39aaa01e | [
"MIT"
] | null | null | null | Mirocomputer Systems/ex5/ex2.asm | AthinaKyriakou/ntua-ece | ff60111cf26f9056aba30bc86f2ee75d39aaa01e | [
"MIT"
] | null | null | null |
org 100h
TABLE EQU 00
MOV AX,0
MOV BX,TABLE
MOV AL,254
LAB0: MOV [BX],AL
DEC AL
INC BX
CMP AL,0
JA LAB0
MOV [BX],0
INC BX
MOV [BX],255
;doing the calculations, in only one loop:
MOV BX,TABLE
;CH will have the highest number. (initial value = all zeros)
;CL will have the lowest number. (initial value = all ones)
;the current sum of the even numbers will be calculated in SI.
;DH will have the current number.
;DL will count how many numbers are checked.
;we know that all the even numbers are 128 - so there will be a division of the final content of SI with 128
;which means that the result (we don't care about the remainder) will be in AL.
;so AL will have the average.
MOV CH,0
MOV SI,0
MOV CL,255
MOV DL,255
MOV BX,TABLE
JMP LAB1
LAB5: DEC DL
LAB1:
XCHG BX,[4500]
MOV DH,[BX]
INC BX
CMP DH,CH
JNA LAB2
MOV CH,DH
LAB2: CMP DH,CL
JNB LAB3
MOV CL,DH
LAB3: XCHG BX,[4500]
MOV BL,DH
MOV AL,BL
RCR AL,1
JC LAB3B
ADD SI,BX
LAB3B: CMP DL,0
JNE LAB5
MOV AX,SI
MOV BL,128 ;we don't need BX anymore, so we fill BL with the number 128
MOV DX,0 ;<AH:AL> will be divided by 128.
DIV BL ;division
;the result now is in (AL> and the remainder in <AH>
;we now need to print the contents of CH (highest number), of CL (lowest number) and of (AH:AL) (average).
;we will use PRINT_DEC for this, which is the same as in the exercise 5_1.
;PRINT_DEC influences registers AH,AL,BH,BL,CH and CL.
;we will use the stack to save contents of CX and AX.
MOV DL,AH
XCHG AX,[4502]
XCHG CX,[4504]
CALL PRINT_DEC ;printing AH (the first part of the average)
XCHG AX,[4502]
MOV DL,AL
XCHG AX,[4502]
CALL PRINT_DEC ;printing AL (the second part of the average)
MOV DL,10 ;new line
MOV AH,02H
INT 21H
XCHG CX,[4504]
MOV DL,CL ;printing the smallest number
XCHG CX,[4504]
CALL PRINT_DEC
XCHG CX,[4504]
MOV DL,32 ;space
MOV AH,02H
INT 21H
MOV DL,CH ;printing the largest number
XCHG CX,[4504]
CALL PRINT_DEC
HLT
PRINT_DEC: ;since the number is 8-bits, it will have at most 3 decimal digits. so we will need at most 3 addresses to save the number
MOV BX,3
MOV [BX],'$'
MOV AL,DL
MOV CL,DL
MOV DL,3
LAB4: DEC BX
DEC DL
MOV CH,10
MOV AH,0
DIV CH
ADD AH,48
MOV [BX],AH
CMP AL,0
JA LAB4
MOV AH,09H
INT 21H
MOV DL,CL
RET | 29.043478 | 143 | 0.478443 |
1077179b4c20e4731d853fdebd25d9905790273d | 6,022 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_2265.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_2265.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_2265.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r9
push %rbp
push %rbx
push %rdi
push %rsi
lea addresses_D_ht+0x11e51, %r9
clflush (%r9)
nop
nop
nop
nop
xor $19389, %rbp
movw $0x6162, (%r9)
nop
nop
dec %r13
lea addresses_WC_ht+0x1b0db, %rsi
nop
nop
cmp $25988, %rdi
movb $0x61, (%rsi)
sub %rdi, %rdi
lea addresses_normal_ht+0x15691, %r13
nop
nop
sub %rbp, %rbp
mov $0x6162636465666768, %r9
movq %r9, (%r13)
nop
nop
nop
nop
sub %r9, %r9
lea addresses_normal_ht+0x15891, %r10
clflush (%r10)
cmp %rbx, %rbx
mov $0x6162636465666768, %r9
movq %r9, %xmm7
vmovups %ymm7, (%r10)
nop
nop
nop
inc %rbx
lea addresses_A_ht+0x1b584, %rdi
clflush (%rdi)
nop
nop
cmp %rbp, %rbp
mov $0x6162636465666768, %r10
movq %r10, %xmm7
vmovups %ymm7, (%rdi)
nop
nop
nop
nop
nop
dec %r10
lea addresses_UC_ht+0x22cd, %rdi
nop
nop
nop
add $45667, %rbp
movb $0x61, (%rdi)
xor $31542, %rsi
lea addresses_A_ht+0x1a91, %rbp
nop
nop
nop
nop
nop
and %r13, %r13
movb (%rbp), %r10b
nop
add %rbx, %rbx
lea addresses_D_ht+0x4a91, %rbp
nop
add %rsi, %rsi
mov (%rbp), %rdi
nop
nop
inc %rbp
lea addresses_A_ht+0x19d91, %r9
nop
sub $36688, %rbx
mov $0x6162636465666768, %rdi
movq %rdi, (%r9)
xor $46695, %rdi
pop %rsi
pop %rdi
pop %rbx
pop %rbp
pop %r9
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r14
push %rax
push %rbp
push %rdx
// Faulty Load
lea addresses_PSE+0x1e91, %r11
and %r12, %r12
mov (%r11), %r14
lea oracles, %rdx
and $0xff, %r14
shlq $12, %r14
mov (%rdx,%r14,1), %r14
pop %rdx
pop %rbp
pop %rax
pop %r14
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_PSE', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_PSE', 'same': True, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 2, 'congruent': 6, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 1, 'congruent': 1, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 8, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 32, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 1, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_A_ht', 'same': False, 'size': 1, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'same': False, 'size': 8, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 8, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'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
*/
| 41.531034 | 2,999 | 0.656426 |
32d72efee17df6214e9dd9bac5fa30444c7b5af1 | 883 | asm | Assembly | unittests/ASM/PrimaryGroup/1_81_02.asm | cobalt2727/FEX | 13087f8425aeaad28dc81bed46a83e1d72ff0db8 | [
"MIT"
] | 628 | 2020-03-06T14:01:32.000Z | 2022-03-31T06:35:14.000Z | unittests/ASM/PrimaryGroup/1_81_02.asm | cobalt2727/FEX | 13087f8425aeaad28dc81bed46a83e1d72ff0db8 | [
"MIT"
] | 576 | 2020-03-06T08:25:12.000Z | 2022-03-30T04:05:29.000Z | unittests/ASM/PrimaryGroup/1_81_02.asm | cobalt2727/FEX | 13087f8425aeaad28dc81bed46a83e1d72ff0db8 | [
"MIT"
] | 38 | 2020-03-07T06:10:00.000Z | 2022-03-29T09:27:36.000Z | %ifdef CONFIG
{
"RegData": {
"RAX": "0x4142A4A7A6A84748",
"RBX": "0x51525354181B1E21",
"RCX": "0x61626365282B2E31",
"RDX": "0x6162636465666569"
},
"MemoryRegions": {
"0x100000000": "4096"
}
}
%endif
mov rdx, 0xe0000000
mov rax, 0x4142434445464748
mov [rdx + 8 * 0], rax
mov rax, 0x5152535455565758
mov [rdx + 8 * 1], rax
mov rax, 0x6162636465666768
mov [rdx + 8 * 2], rax
mov rax, 0x6162636465666768
mov [rdx + 8 * 3], rax
clc
adc word [rdx + 8 * 0 + 2], 0x6162
clc
adc dword [rdx + 8 * 1 + 0], 0x61626364
clc
adc qword [rdx + 8 * 2 + 0], 0x61626364
clc
adc qword [rdx + 8 * 3 + 0], -256
stc
adc word [rdx + 8 * 0 + 4], 0x6162
stc
adc dword [rdx + 8 * 1 + 0], 0x61626364
stc
adc qword [rdx + 8 * 2 + 0], 0x61626364
stc
adc qword [rdx + 8 * 3 + 0], -256
mov rax, [rdx + 8 * 0]
mov rbx, [rdx + 8 * 1]
mov rcx, [rdx + 8 * 2]
mov rdx, [rdx + 8 * 3]
hlt
| 17.66 | 39 | 0.600227 |
244685dd0ebb66cdfa2fabc12ad43fa185310c11 | 4,024 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0x48_notsx.log_21829_466.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_0x48_notsx.log_21829_466.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_0x48_notsx.log_21829_466.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 %r13
push %r8
push %rbx
lea addresses_WC_ht+0x142c0, %r12
nop
nop
nop
cmp $48841, %rbx
mov $0x6162636465666768, %r8
movq %r8, %xmm3
movups %xmm3, (%r12)
nop
and $43511, %r13
pop %rbx
pop %r8
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r13
push %rbp
push %rdx
push %rsi
// Faulty Load
lea addresses_D+0x1c540, %rbp
nop
nop
nop
xor %rdx, %rdx
mov (%rbp), %r13w
lea oracles, %rsi
and $0xff, %r13
shlq $12, %r13
mov (%rsi,%r13,1), %r13
pop %rsi
pop %rdx
pop %rbp
pop %r13
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_D', 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': True, 'AVXalign': False, 'size': 2, 'type': 'addresses_D', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_WC_ht', 'congruent': 5}, 'OP': 'STOR'}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
| 67.066667 | 2,999 | 0.663022 |
540ad07f2f29bee9107865628dea3014633c4317 | 309 | asm | Assembly | programs/oeis/021/A021319.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/021/A021319.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/021/A021319.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A021319: Decimal expansion of 1/315.
; 0,0,3,1,7,4,6,0,3,1,7,4,6,0,3,1,7,4,6,0,3,1,7,4,6,0,3,1,7,4,6,0,3,1,7,4,6,0,3,1,7,4,6,0,3,1,7,4,6,0,3,1,7,4,6,0,3,1,7,4,6,0,3,1,7,4,6,0,3,1,7,4,6,0,3,1,7,4,6,0,3,1,7,4,6,0,3,1,7,4,6,0,3,1,7,4,6,0,3
add $0,3
mov $1,10
pow $1,$0
div $1,875
sub $1,1
mod $1,10
mov $0,$1
| 28.090909 | 199 | 0.540453 |
d4569b8cad7350359fbdf3a7b93161ff98761fdb | 720 | asm | Assembly | programs/oeis/122/A122002.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/122/A122002.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/122/A122002.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A122002: a(0)=5; otherwise a(n) = (n mod 4) if n is odd, a(n) = h + 4, where h = (highest odd divisor of n) mod 4 if n is even.
; 5,1,5,3,5,1,7,3,5,1,5,3,7,1,7,3,5,1,5,3,5,1,7,3,7,1,5,3,7,1,7,3,5,1,5,3,5,1,7,3,5,1,5,3,7,1,7,3,7,1,5,3,5,1,7,3,7,1,5,3,7,1,7,3,5,1,5,3,5,1,7,3,5,1,5,3,7,1,7,3,5,1,5,3,5,1,7,3,7,1,5,3,7,1,7,3,7,1,5,3,5
mov $4,2
mov $5,$0
lpb $4
mov $0,$5
sub $4,1
add $0,$4
sub $0,1
mov $3,1
mul $3,$0
cal $0,255070 ; (1/2)*(n minus number of runs in the binary expansion of n): a(n) = (n - A005811(n)) / 2 = A236840(n)/2.
add $0,2
div $3,2
mul $3,2
add $0,$3
mov $2,$4
mov $6,$0
lpb $2
mov $1,$6
sub $2,1
lpe
lpe
lpb $5
sub $1,$6
mov $5,0
lpe
mul $1,2
add $1,1
| 23.225806 | 203 | 0.518056 |
f5dbf3e40b3c6593795bdcc1ab31a1b2d172d777 | 703 | asm | Assembly | oeis/293/A293315.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/293/A293315.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/293/A293315.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A293315: The integer k that minimizes |k/2^n - r|, where r = golden ratio.
; Submitted by Jamie Morken(s2)
; 2,3,6,13,26,52,104,207,414,828,1657,3314,6627,13255,26510,53020,106039,212079,424158,848316,1696632,3393263,6786526,13573053,27146106,54292211,108584423,217168846,434337692,868675383,1737350766,3474701533,6949403065,13898806131,27797612262,55595224524,111190449048,222380898096,444761796192,889523592384,1779047184767,3558094369535,7116188739069,14232377478138,28464754956277,56929509912553,113859019825107,227718039650213,455436079300426,910872158600853,1821744317201706,3643488634403412
add $0,1
seq $0,293314 ; Least integer k such that k/2^n > (1+sqrt(5))/2 (the golden ratio).
div $0,2
| 87.875 | 490 | 0.822191 |
fd5f6ddc3d3b886c6c2f84f1899f7daaf5d7624d | 5,098 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_899.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_899.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_899.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 %r9
push %rbp
push %rbx
lea addresses_WC_ht+0xa528, %rbx
nop
nop
nop
nop
cmp %r9, %r9
movl $0x61626364, (%rbx)
inc %r11
pop %rbx
pop %rbp
pop %r9
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r15
push %r8
push %r9
push %rbp
push %rcx
push %rdi
// Load
mov $0x248, %r8
nop
nop
nop
sub %rdi, %rdi
vmovups (%r8), %ymm3
vextracti128 $1, %ymm3, %xmm3
vpextrq $0, %xmm3, %r10
nop
nop
nop
nop
nop
and $30818, %rbp
// Store
lea addresses_US+0x196b8, %r9
nop
nop
nop
nop
nop
add $19666, %rcx
movb $0x51, (%r9)
// Exception!!!
nop
nop
nop
nop
nop
mov (0), %r9
sub $34018, %r10
// Store
lea addresses_US+0x1236, %rdi
nop
nop
sub %r10, %r10
mov $0x5152535455565758, %r9
movq %r9, (%rdi)
nop
nop
nop
nop
nop
sub %rdi, %rdi
// Store
lea addresses_A+0xe868, %rcx
and %r9, %r9
mov $0x5152535455565758, %rbp
movq %rbp, %xmm5
vmovups %ymm5, (%rcx)
nop
nop
cmp $36084, %r15
// Faulty Load
lea addresses_D+0x1b528, %rbp
nop
and %r8, %r8
mov (%rbp), %r10d
lea oracles, %rcx
and $0xff, %r10
shlq $12, %r10
mov (%rcx,%r10,1), %r10
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r15
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_D', 'congruent': 0}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_P', 'congruent': 4}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_US', 'congruent': 4}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_US', 'congruent': 1}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_A', 'congruent': 2}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_D', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 4, 'type': 'addresses_WC_ht', 'congruent': 11}, 'OP': 'STOR'}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
| 41.447154 | 2,999 | 0.653786 |
a102b89bc20153bd430d6467671d5250cad75de7 | 1,544 | asm | Assembly | Tarea 5/tarea_5_00062217.asm | RFuentes22/AC_00062217 | d98b471958affb887c3345464fcc3dce554c409c | [
"Apache-2.0"
] | null | null | null | Tarea 5/tarea_5_00062217.asm | RFuentes22/AC_00062217 | d98b471958affb887c3345464fcc3dce554c409c | [
"Apache-2.0"
] | null | null | null | Tarea 5/tarea_5_00062217.asm | RFuentes22/AC_00062217 | d98b471958affb887c3345464fcc3dce554c409c | [
"Apache-2.0"
] | null | null | null | org 100h
section .text ;320x200
call grafico ; Llamada a iniciar modo grafico 13h
xor si, si
xor di, di
xor bl, bl
mov si, 140d ; X -> Columna
mov di, 55d ; Y -> Fila
mov [0200h],byte 175d
call linea_v
mov si, 140d ; X -> Columna
mov di, 175d ; Y -> Fila
mov [0202h],byte 160d
call linea_h
mov si, 160d ; X -> Columna
mov di, 115d ; Y -> Fila
mov [0200h],byte 175d
call linea_v
mov si, 160d ; X -> Columna
mov di, 115d ; Y -> Fila
mov [0202h],byte 210d
call linea_h
mov si, 210d ; X -> Columna
mov di, 95d ; Y -> Fila
mov [0200h],byte 115d
call linea_v
mov si, 160d ; X -> Columna
mov di, 95d ; Y -> Fila
mov [0202h],byte 210d
call linea_h
mov si, 160d ; X -> Columna
mov di, 75d ; Y -> Fila
mov [0200h],byte 95d
call linea_v
mov si, 160d ; X -> Columna
mov di, 75d ; Y -> Fila
mov [0202h],byte 220d
call linea_h
mov si, 220d ; X -> Columna
mov di, 55d ; Y -> Fila
mov [0200h],byte 75d
call linea_v
mov si, 140d ; X -> Columna
mov di, 55d ; Y -> Fila
mov [0202h],byte 220d
call linea_h
call kb ; Utilizamos espera de alguna tecla
int 20h
grafico:mov ah, 00h
mov al, 13h
int 10h
ret
pixel: mov ah, 0Ch
mov al, 1010b
int 10h
ret
linea_h:
lupi_h: mov cx, 0d ; Columna
add cx, si
mov dx, di ; Fila
call pixel
inc si
cmp si, [0202h]
jne lupi_h
ret
linea_v:
lupi_v:mov cx, si ; Columna
mov dx, 0d ; Fila
add dx, di
call pixel
inc di
cmp di, [0200h]
jne lupi_v
ret
kb: mov ah, 00h
int 16h
ret
section .data | 15.44 | 51 | 0.617876 |
5f771230f4e1fe165286322819116a1a37526788 | 299 | asm | Assembly | programs/oeis/071/A071568.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/071/A071568.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/071/A071568.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A071568: Smallest k>n such that n^3+1 divides k*n^2+1.
; 1,3,11,31,69,131,223,351,521,739,1011,1343,1741,2211,2759,3391,4113,4931,5851,6879,8021,9283,10671,12191,13849,15651,17603,19711,21981,24419,27031,29823,32801,35971,39339,42911,46693,50691,54911,59359
mov $1,$0
pow $0,3
add $1,$0
add $1,1
| 37.375 | 202 | 0.735786 |
3467152b4ce28b0d84153ba1ecbfc86a055694a7 | 7,597 | asm | Assembly | Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0_notsx.log_21829_656.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0_notsx.log_21829_656.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0_notsx.log_21829_656.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 %r13
push %r14
push %r8
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x120a6, %rax
nop
nop
dec %r13
movb $0x61, (%rax)
nop
nop
cmp %r14, %r14
lea addresses_WC_ht+0x75e0, %rsi
lea addresses_normal_ht+0x18163, %rdi
sub $48411, %r8
mov $33, %rcx
rep movsb
nop
nop
nop
nop
xor $20619, %rcx
lea addresses_normal_ht+0x12fbb, %rcx
nop
and %rax, %rax
mov (%rcx), %r13w
nop
dec %r14
lea addresses_D_ht+0x17523, %r8
cmp $47993, %rdi
mov (%r8), %r13
nop
nop
and %rcx, %rcx
lea addresses_normal_ht+0x1b60f, %rdi
nop
nop
nop
nop
cmp $60818, %r14
mov $0x6162636465666768, %rcx
movq %rcx, (%rdi)
nop
sub $64927, %r13
lea addresses_UC_ht+0x1ce3b, %r14
xor %r8, %r8
movw $0x6162, (%r14)
nop
inc %rcx
lea addresses_D_ht+0x19ec3, %r8
nop
nop
nop
inc %rcx
mov $0x6162636465666768, %r14
movq %r14, %xmm1
movups %xmm1, (%r8)
nop
nop
nop
nop
nop
inc %r8
lea addresses_D_ht+0x16323, %rsi
nop
sub $22065, %rcx
mov (%rsi), %r8d
nop
add $38279, %rcx
lea addresses_WC_ht+0x1b523, %rax
clflush (%rax)
nop
nop
nop
nop
add %rdi, %rdi
movups (%rax), %xmm5
vpextrq $1, %xmm5, %r8
nop
nop
dec %rax
lea addresses_WC_ht+0x12603, %rsi
lea addresses_D_ht+0x5ea3, %rdi
clflush (%rsi)
nop
nop
inc %r12
mov $71, %rcx
rep movsb
nop
nop
nop
nop
nop
xor %r8, %r8
lea addresses_normal_ht+0x43ab, %rsi
lea addresses_UC_ht+0xc923, %rdi
nop
xor %r13, %r13
mov $95, %rcx
rep movsw
nop
nop
nop
nop
sub %r13, %r13
lea addresses_WC_ht+0x5c11, %rsi
lea addresses_UC_ht+0x11623, %rdi
and %r14, %r14
mov $93, %rcx
rep movsb
nop
nop
nop
nop
inc %rcx
lea addresses_UC_ht+0x1420b, %rsi
add $7610, %r14
movb (%rsi), %al
nop
nop
nop
nop
inc %rdi
lea addresses_D_ht+0xd1c1, %r12
nop
nop
nop
sub %rsi, %rsi
movl $0x61626364, (%r12)
nop
nop
nop
nop
nop
sub $40837, %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r8
pop %r14
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r15
push %r8
push %r9
push %rbp
push %rcx
push %rsi
// Store
lea addresses_WC+0x19223, %rcx
dec %r9
movb $0x51, (%rcx)
nop
nop
nop
nop
nop
xor $10812, %rcx
// Faulty Load
mov $0x662dc00000000123, %rsi
nop
nop
sub %r15, %r15
mov (%rsi), %ecx
lea oracles, %rbp
and $0xff, %rcx
shlq $12, %rcx
mov (%rbp,%rcx,1), %rcx
pop %rsi
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r15
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 8}}
[Faulty Load]
{'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 4, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': True, 'size': 1, 'NT': False, 'same': False, 'congruent': 0}}
{'src': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}}
{'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 2}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 6}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 2}}
{'src': {'type': 'addresses_D_ht', 'AVXalign': True, 'size': 4, 'NT': False, 'same': False, 'congruent': 8}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 9}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 4, 'same': False}}
{'src': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}}
{'src': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 7, 'same': False}}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 2}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 1}}
{'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.848624 | 2,999 | 0.655654 |
ebd97504f502487289f11fc73e7766f2195d0d6c | 603 | asm | Assembly | macro.asm | TheRealCatherine/MakingGamesForAtari2600-MADS | a8f4863b0ca9796eea9cb20a3bed65b948733643 | [
"BSD-3-Clause"
] | null | null | null | macro.asm | TheRealCatherine/MakingGamesForAtari2600-MADS | a8f4863b0ca9796eea9cb20a3bed65b948733643 | [
"BSD-3-Clause"
] | null | null | null | macro.asm | TheRealCatherine/MakingGamesForAtari2600-MADS | a8f4863b0ca9796eea9cb20a3bed65b948733643 | [
"BSD-3-Clause"
] | null | null | null | .MACRO Clean_Start
sei
cld
ldx #0
txa
tay
ClearStack
dex
txs
pha
bne ClearStack
.ENDM
.MACRO Vertical_Sync
lda #%1110 ; each '1' bits generate a VSYNC ON line (bits 1..3)
VSLOOP sta WSYNC ; 1st '0' bit resets Vsync, 2nd '0' bit exit loop
sta VSYNC
lsr
bne VSLOOP ; branch until VYSNC has been reset
.ENDM
.MACRO Sleep cycles
#cycle #:cycles
.ENDM | 23.192308 | 88 | 0.427861 |
a9f534a675cfa83ccf7e381cfe94968be9841806 | 322 | asm | Assembly | programs/oeis/115/A115536.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/115/A115536.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/115/A115536.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A115536: Numbers n such that the square of n is the concatenation of two numbers m and 4*m.
; 160378,169812,179246,188680,198114,207548,216982,226416,235850,245284,254718,264152,273586,283020,292454,301888,311322,320756,330190,339624,349058,358492,367926,377360,386794,396228,405662
mov $1,$0
mul $1,9434
add $1,160378
| 46 | 190 | 0.795031 |
1bfd24d70ad6132e6865e69085f2ea9cd9dcaed3 | 3,266 | asm | Assembly | i.asm | martianworm17/college-assembly-files | 135ae01f1b15d0d4bbc46a361f43ba8a5078a16d | [
"MIT"
] | null | null | null | i.asm | martianworm17/college-assembly-files | 135ae01f1b15d0d4bbc46a361f43ba8a5078a16d | [
"MIT"
] | null | null | null | i.asm | martianworm17/college-assembly-files | 135ae01f1b15d0d4bbc46a361f43ba8a5078a16d | [
"MIT"
] | null | null | null | .model small
.stack
.code
start:
; Start of the background
mov ah, 06h
mov bh, 250
mov ch, 00
mov cl, 00
mov dh, 32
mov dl, 80
int 10h
;Heart
mov ah, 06h
mov bh, 65
mov ch, 5
mov cl, 20
mov dh, 7
mov dl, 28
int 10h
mov ah, 06h
mov bh, 65
mov ch, 4
mov cl, 21
mov dh, 4
mov dl, 23
int 10h
mov ah, 06h
mov bh, 65
mov ch, 4
mov cl, 25
mov dh, 4
mov dl, 27
int 10h
mov ah, 06h
mov bh, 65
mov ch, 8
mov cl, 21
mov dh, 8
mov dl, 27
int 10h
mov ah, 06h
mov bh, 65
mov ch, 9
mov cl, 22
mov dh, 9
mov dl, 26
int 10h
mov ah, 06h
mov bh, 65
mov ch, 10
mov cl, 23
mov dh, 10
mov dl, 25
int 10h
mov ah, 06h
mov bh, 65
mov ch, 11
mov cl, 24
mov dh, 11
mov dl, 24
int 10h
; Start of the letter B
mov ah, 06h
mov bh, 60h
mov ch, 10
mov cl, 10
mov dh, 20
mov dl, 10
int 10h
mov ah, 06h
mov bh, 60h
mov ch, 10
mov cl, 10
mov dh, 10
mov dl, 14
int 10h
mov ah, 06h
mov bh, 60h
mov ch, 11
mov cl, 15
mov dh, 14
mov dl, 15
int 10h
mov ah, 06h
mov bh, 60h
mov ch, 11
mov cl, 15
mov dh, 14
mov dl, 15
int 10h
mov ah, 06h
mov bh, 60h
mov ch, 15
mov cl, 10
mov dh, 15
mov dl, 14
int 10h
mov ah, 06h
mov bh, 60h
mov ch, 16
mov cl, 15
mov dh, 19
mov dl, 15
int 10h
mov ah, 06h
mov bh, 60h
mov ch, 20
mov cl, 10
mov dh, 20
mov dl, 14
int 10h
; Start of the letter R
mov ah, 06h
mov bh, 60h
mov ch, 10
mov cl, 17
mov dh, 20
mov dl, 17
int 10h
mov ah, 06h
mov bh, 60h
mov ch, 10
mov cl, 17
mov dh, 10
mov dl, 21
int 10h
mov ah, 06h
mov bh, 60h
mov ch, 11
mov cl, 22
mov dh, 14
mov dl, 22
int 10h
mov ah, 06h
mov bh, 60h
mov ch, 15
mov cl, 17
mov dh, 15
mov dl, 21
int 10h
mov ah, 06h
mov bh, 60h
mov ch, 16
mov cl, 22
mov dh, 20
mov dl, 22
int 10h
; Start of the letter I
mov ah, 06h
mov bh, 60h
mov ch, 10
mov cl, 26
mov dh, 20
mov dl, 26
int 10h
mov ah, 06h
mov bh, 60h
mov ch, 10
mov cl, 24
mov dh, 10
mov dl, 28
int 10h
mov ah, 06h
mov bh, 60h
mov ch, 20
mov cl, 24
mov dh, 20
mov dl, 28
int 10h
; Start of the letter E
mov ah, 06h
mov bh, 60h
mov ch, 10
mov cl, 30
mov dh, 20
mov dl, 30
int 10h
mov ah, 06h
mov bh, 60h
mov ch, 10
mov cl, 30
mov dh, 10
mov dl, 35
int 10h
mov ah, 06h
mov bh, 60h
mov ch, 15
mov cl, 30
mov dh, 15
mov dl, 34
int 10h
mov ah, 06h
mov bh, 60h
mov ch, 20
mov cl, 30
mov dh, 20
mov dl, 35
int 10h
; Start of the letter L
mov ah, 06h
mov bh, 60h
mov ch, 10
mov cl, 37
mov dh, 20
mov dl, 37
int 10h
mov ah, 06h
mov bh, 60h
mov ch, 20
mov cl, 37
mov dh, 20
mov dl, 42
int 10h
; Start of the letter L
mov ah, 06h
mov bh, 60h
mov ch, 10
mov cl, 44
mov dh, 20
mov dl, 44
int 10h
mov ah, 06h
mov bh, 60h
mov ch, 20
mov cl, 44
mov dh, 20
mov dl, 49
int 10h
; Start of the letter E
mov ah, 06h
mov bh, 60h
mov ch, 10
mov cl, 51
mov dh, 20
mov dl, 51
int 10h
mov ah, 06h
mov bh, 60h
mov ch, 10
mov cl, 51
mov dh, 10
mov dl, 56
int 10h
mov ah, 06h
mov bh, 60h
mov ch, 15
mov cl, 51
mov dh, 15
mov dl, 55
int 10h
mov ah, 06h
mov bh, 60h
mov ch, 20
mov cl, 51
mov dh, 20
mov dl, 56
int 10h
mov ah, 4ch
int 21h
end start | 10.501608 | 26 | 0.588794 |
5819eb30da2ca21b195eac497e4aed2dc363646c | 454 | asm | Assembly | programs/oeis/120/A120156.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/120/A120156.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/120/A120156.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A120156: a(1)=11; a(n)=floor((35+sum(a(1) to a(n-1)))/3).
; 11,15,20,27,36,48,64,85,113,151,201,268,358,477,636,848,1131,1508,2010,2680,3574,4765,6353,8471,11295,15060,20080,26773,35697,47596,63462,84616,112821,150428,200571,267428,356570,475427,633903,845204
mov $1,2
mov $2,1
lpb $0
add $1,$2
mov $3,$0
sub $0,1
sub $1,16
mov $2,$1
div $1,3
add $2,6
mul $3,$1
sub $1,1
lpe
mov $1,$0
sub $1,$3
sub $1,$3
mul $1,2
div $1,4
add $1,11
| 19.73913 | 201 | 0.627753 |
c76f55f07bb07ba6d6854532df8ec7a1431d914a | 7,376 | asm | Assembly | Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_20297_766.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_20297_766.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_20297_766.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 %r15
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_normal_ht+0x11b9e, %rsi
lea addresses_D_ht+0x10b1e, %rdi
clflush (%rsi)
cmp %r15, %r15
mov $2, %rcx
rep movsq
add %rdx, %rdx
lea addresses_UC_ht+0x1999e, %r13
nop
dec %rsi
mov (%r13), %dx
xor $12313, %r15
lea addresses_D_ht+0x1d19e, %rdi
clflush (%rdi)
nop
nop
nop
inc %rbp
vmovups (%rdi), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $1, %xmm6, %rcx
sub %rbp, %rbp
lea addresses_UC_ht+0x1b04a, %rdx
clflush (%rdx)
nop
nop
nop
cmp $34659, %r13
movw $0x6162, (%rdx)
nop
xor $29219, %rcx
lea addresses_WT_ht+0x2d6e, %rdi
nop
and %rsi, %rsi
movb (%rdi), %r13b
nop
nop
nop
cmp $59071, %r15
lea addresses_WC_ht+0x1325e, %rcx
nop
add $59929, %rbp
movups (%rcx), %xmm0
vpextrq $1, %xmm0, %rdi
nop
nop
nop
nop
nop
and %rbp, %rbp
lea addresses_normal_ht+0x1f06, %rsi
nop
sub %rdi, %rdi
movups (%rsi), %xmm3
vpextrq $1, %xmm3, %r15
nop
nop
xor $39457, %rbp
lea addresses_A_ht+0x13a9e, %rcx
sub $26102, %r15
mov $0x6162636465666768, %rdx
movq %rdx, %xmm0
movups %xmm0, (%rcx)
nop
nop
nop
nop
nop
xor %rbp, %rbp
lea addresses_normal_ht+0x16ae, %rcx
nop
xor $21292, %r15
vmovups (%rcx), %ymm7
vextracti128 $0, %ymm7, %xmm7
vpextrq $0, %xmm7, %rdi
nop
nop
nop
nop
nop
and %rdi, %rdi
lea addresses_D_ht+0xe03e, %r15
clflush (%r15)
nop
nop
nop
nop
nop
xor $48074, %rdi
movl $0x61626364, (%r15)
nop
nop
nop
sub $30759, %rsi
lea addresses_WC_ht+0x1e99e, %rcx
nop
nop
nop
add $40374, %r15
mov $0x6162636465666768, %rbp
movq %rbp, (%rcx)
nop
nop
nop
nop
cmp $39728, %rcx
lea addresses_UC_ht+0x1b2de, %r15
cmp %rdx, %rdx
movb $0x61, (%r15)
nop
xor %r15, %r15
lea addresses_A_ht+0x1529e, %rsi
nop
nop
nop
add $58512, %rdx
movw $0x6162, (%rsi)
nop
sub %rbp, %rbp
lea addresses_WT_ht+0x765e, %rbp
nop
nop
cmp $48549, %rsi
movl $0x61626364, (%rbp)
nop
nop
nop
nop
nop
cmp $39410, %rdx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r15
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r15
push %r9
push %rbp
push %rcx
push %rsi
// Faulty Load
lea addresses_WT+0x6d9e, %r11
nop
nop
and %r15, %r15
mov (%r11), %r9w
lea oracles, %r11
and $0xff, %r9
shlq $12, %r9
mov (%r11,%r9,1), %r9
pop %rsi
pop %rcx
pop %rbp
pop %r9
pop %r15
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 1, 'AVXalign': False, 'NT': True, 'congruent': 4, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
{'00': 20297}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 36.88 | 2,999 | 0.65442 |
5f1305451e0f96923324bf8bcb10c3fc6c6dee24 | 4,924 | asm | Assembly | Transynther/x86/_processed/P/_zr_/i9-9900K_12_0xca_notsx.log_4511_1878.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/P/_zr_/i9-9900K_12_0xca_notsx.log_4511_1878.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/P/_zr_/i9-9900K_12_0xca_notsx.log_4511_1878.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 %r15
push %r8
push %r9
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x1be04, %rsi
lea addresses_WC_ht+0x1be04, %rdi
nop
dec %r8
mov $26, %rcx
rep movsl
nop
cmp $61669, %r13
lea addresses_D_ht+0x2e04, %rsi
lea addresses_UC_ht+0x14a75, %rdi
nop
xor $21093, %rbp
mov $60, %rcx
rep movsb
nop
nop
nop
nop
nop
cmp %rcx, %rcx
lea addresses_A_ht+0x213c, %rsi
add $48901, %r15
movb (%rsi), %r13b
nop
nop
nop
nop
nop
cmp %rbp, %rbp
lea addresses_WC_ht+0x17404, %rsi
lea addresses_A_ht+0x177e4, %rdi
nop
nop
nop
nop
xor $61008, %r9
mov $41, %rcx
rep movsb
nop
cmp %rdi, %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r15
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r13
push %rcx
push %rdi
// Faulty Load
mov $0xe04, %rcx
nop
nop
nop
and %r13, %r13
movups (%rcx), %xmm7
vpextrq $1, %xmm7, %rdi
lea oracles, %r12
and $0xff, %rdi
shlq $12, %rdi
mov (%r12,%rdi,1), %rdi
pop %rdi
pop %rcx
pop %r13
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_P', 'NT': False, 'AVXalign': True, 'size': 32, 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_P', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'same': False, 'congruent': 9, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 11, 'type': 'addresses_WC_ht'}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_UC_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 2}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 9, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_A_ht'}}
{'00': 4511}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 48.27451 | 2,999 | 0.661454 |
9eb96cc0aa50332a79e24d298f2eb7de4742994d | 725 | asm | Assembly | programs/oeis/217/A217096.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/217/A217096.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/217/A217096.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A217096: Characteristic function of numbers that have a nonleading zero in their decimal representation (A011540). 0 itself is also included, so a(0) = 1.
; 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,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,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,0,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,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
cal $0,98736 ; a(n) = product of n and all its digits.
bin $1,$0
| 120.833333 | 501 | 0.569655 |
f0217e150f54e140760d5cdb0e917f7de8585fcd | 666 | asm | Assembly | programs/oeis/267/A267874.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/267/A267874.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/267/A267874.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A267874: Total number of ON (black) cells after n iterations of the "Rule 235" elementary cellular automaton starting with a single ON (black) cell.
; 1,2,6,13,22,33,46,61,78,97,118,141,166,193,222,253,286,321,358,397,438,481,526,573,622,673,726,781,838,897,958,1021,1086,1153,1222,1293,1366,1441,1518,1597,1678,1761,1846,1933,2022,2113,2206,2301,2398,2497,2598,2701,2806,2913,3022,3133,3246,3361,3478,3597,3718,3841,3966,4093,4222,4353,4486,4621,4758,4897,5038,5181,5326,5473,5622,5773,5926,6081,6238,6397,6558,6721,6886,7053,7222,7393,7566,7741,7918,8097,8278,8461,8646,8833,9022,9213,9406,9601,9798,9997
mov $1,$0
pow $0,2
mul $1,2
trn $1,3
add $0,$1
add $0,1
| 66.6 | 457 | 0.755255 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.