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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1f26a6202ce7871ab01cec979e2e566af2dd0b50 | 2,292 | asm | Assembly | examples/HexConvertor.asm | AbdulrahmanAbumdas/emu8086 | b99ea60f5dbf8647f278eef60ed1bd8a174468e5 | [
"FSFAP"
] | 287 | 2015-10-01T20:34:49.000Z | 2022-03-31T09:19:39.000Z | examples/HexConvertor.asm | BurunluVoldi/emu8086 | b99ea60f5dbf8647f278eef60ed1bd8a174468e5 | [
"FSFAP"
] | 6 | 2017-06-13T17:22:24.000Z | 2021-01-29T23:40:11.000Z | examples/HexConvertor.asm | BurunluVoldi/emu8086 | b99ea60f5dbf8647f278eef60ed1bd8a174468e5 | [
"FSFAP"
] | 239 | 2015-09-13T09:40:53.000Z | 2022-03-29T14:15:16.000Z | ; hex convertor.
; this example converts a 2 digit hexadecimal number
; into a numeric value and then into decimal/ascii string representation,
; and finally it prints out the result in binary code.
; to see decimal string:
; 1. click "vars"
; 2. click "result" variable
; 3. enter "3" for the elements and "ascii" for show as.
name "hex"
org 100h
jmp start
; source hex value is 2 char string.
; numeric value is stored into temp,
; and string decimal value is stored into result.
source db '1b', 0 ; 1bh is converted to 27 (decimal) 00011011b (binary)
result db '000', 0
temp dw ?
start:
; convert first digit to value 0..15 from ascii:
mov al, source[0]
cmp al, '0'
jae f1
f1:
cmp al, '9'
ja f2 ; jumps only if not '0' to '9'.
sub al, 30h ; convert char '0' to '9' to numeric value.
jmp num1_ready
f2:
; gets here if it's 'a' to 'f' case:
or al, 00100000b ; remove upper case (if any).
sub al, 57h ; convert char 'a' to 'f' to numeric value.
num1_ready:
mov bl, 16
mul bl ; ax = al * bl
mov temp, ax
; convert second digit to value 0..15 from ascii:
mov al, source[1]
cmp al, '0'
jae g1
g1:
cmp al, '9'
ja g2 ; jumps only if not '0' to '9'.
sub al, 30h ; convert char '0' to '9' to numeric value.
jmp num2_ready
g2:
; gets here if it's 'a' to 'f' case:
or al, 00100000b ; remove upper case (if any).
sub al, 57h ; convert char 'a' to 'f' to numeric value.
num2_ready:
xor ah, ah
add temp, ax
; convertion from hex string complete!
push temp ; store original temp value.
; convert to decimal string,
; it has to be 3 decimal digits or less:
mov di, 2 ; point to top of the string.
next_digit:
cmp temp, 0
je stop
mov ax, temp
mov bl, 10
div bl ; al = ax / operand, ah = remainder.
mov result[di], ah
add result[di], 30h ; convert to ascii.
xor ah, ah
mov temp, ax
dec di ; next digit in string.
jmp next_digit
stop:
pop temp ; re-store original temp value.
; print result in binary:
mov bl, b.temp
mov cx, 8
print: mov ah, 2 ; print function.
mov dl, '0'
test bl, 10000000b ; test first bit.
jz zero
mov dl, '1'
zero: int 21h
shl bl, 1
loop print
; print binary suffix:
mov dl, 'b'
int 21h
; wait for any key press:
mov ah, 0
int 16h
ret ; return to operating system. | 17.90625 | 75 | 0.657941 |
4593fb1855c9b87dbefae722afc62007b6b8ad69 | 334 | asm | Assembly | 01-macro/hello.asm | gashev/assembly-examples | 3e7e5d37af00e6d6202a589ffa36a888edb5be16 | [
"Unlicense"
] | 1 | 2021-01-06T01:45:37.000Z | 2021-01-06T01:45:37.000Z | 01-macro/hello.asm | gashev/assembly-examples | 3e7e5d37af00e6d6202a589ffa36a888edb5be16 | [
"Unlicense"
] | null | null | null | 01-macro/hello.asm | gashev/assembly-examples | 3e7e5d37af00e6d6202a589ffa36a888edb5be16 | [
"Unlicense"
] | null | null | null | %macro print_string 2
mov eax, 4
mov ebx, 1
mov ecx, %1
mov edx, %2
int 80h
%endmacro
%macro exit 0
mov eax, 1
mov ebx, 0
int 80h
%endmacro
SECTION .data
hello: db 'Hello world!', 10
len: equ $-hello
SECTION .text
GLOBAL _start
_start:
print_string hello, len
exit
| 13.36 | 38 | 0.57485 |
9a78e01585e5d85da2ee0060dd4bb20e58afcba9 | 697 | asm | Assembly | programs/oeis/080/A080522.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/080/A080522.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/080/A080522.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A080522: Leading diagonal of triangle in A080521.
; 1,3,5,10,22,49,107,228,476,979,1993,4030,8114,16293,32663,65416,130936,261991,524117,1048386,2096942,4194073,8388355,16776940,33554132,67108539,134217377,268435078,536870506,1073741389,2147483183,4294966800,8589934064,17179868623,34359737773,68719476106,137438952806,274877906241,549755813147,1099511626996,2199023254732,4398046510243,8796093021305,17592186043470,35184372087842,70368744176629,140737488354247,281474976709528,562949953420136,1125899906841399,2251799813683973,4503599627369170,9007199254739614
mov $1,1
lpb $0
mul $1,2
add $1,1
add $3,$0
sub $0,1
mov $2,4
lpe
add $2,1
add $1,$2
trn $1,5
add $1,3
sub $1,$3
sub $1,2
| 38.722222 | 511 | 0.810617 |
c980da17a227187b5ed395c9ff003cbb370ba4b9 | 7,621 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_sm_/i3-7100_9_0x84_notsx.log_21829_455.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i3-7100_9_0x84_notsx.log_21829_455.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i3-7100_9_0x84_notsx.log_21829_455.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 %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x31e0, %rax
nop
add %r13, %r13
mov (%rax), %r10w
sub %r15, %r15
lea addresses_normal_ht+0x1a100, %rsi
lea addresses_WT_ht+0xf100, %rdi
nop
nop
nop
nop
cmp %rax, %rax
mov $8, %rcx
rep movsb
nop
nop
xor %rax, %rax
lea addresses_UC_ht+0x1a190, %rdi
nop
nop
nop
xor %rax, %rax
mov (%rdi), %r10d
nop
sub $65524, %rsi
lea addresses_WT_ht+0xc040, %rdi
nop
nop
nop
nop
cmp %rax, %rax
movl $0x61626364, (%rdi)
nop
and %rax, %rax
lea addresses_normal_ht+0x1e116, %r10
and %rsi, %rsi
movb $0x61, (%r10)
nop
nop
xor %r10, %r10
lea addresses_UC_ht+0xc3f2, %rsi
nop
nop
nop
nop
inc %r13
movups (%rsi), %xmm3
vpextrq $1, %xmm3, %r10
nop
sub $18592, %r10
lea addresses_normal_ht+0x1e64c, %rsi
sub $32475, %rdi
mov (%rsi), %rcx
nop
dec %rax
lea addresses_UC_ht+0x1a104, %rsi
cmp $13520, %rdi
mov (%rsi), %r15w
nop
nop
nop
nop
add %rax, %rax
lea addresses_WT_ht+0x97e4, %rcx
nop
sub %r15, %r15
vmovups (%rcx), %ymm7
vextracti128 $1, %ymm7, %xmm7
vpextrq $1, %xmm7, %rax
nop
nop
nop
nop
nop
inc %rax
lea addresses_UC_ht+0x5900, %rsi
lea addresses_WT_ht+0x130fa, %rdi
clflush (%rsi)
nop
nop
nop
nop
nop
add $57096, %rbp
mov $59, %rcx
rep movsb
nop
nop
nop
sub $23379, %r10
lea addresses_WT_ht+0x6080, %rsi
lea addresses_normal_ht+0x17300, %rdi
nop
nop
nop
nop
nop
and $11059, %r13
mov $54, %rcx
rep movsl
nop
nop
nop
and $18259, %r15
lea addresses_D_ht+0x17906, %rax
nop
and %rbp, %rbp
movb (%rax), %r15b
nop
nop
cmp $10884, %rax
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r15
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r14
push %r8
push %rbp
push %rdi
push %rdx
push %rsi
// Store
lea addresses_D+0x4100, %r8
nop
nop
add %rdi, %rdi
movb $0x51, (%r8)
nop
sub $53080, %rbp
// Store
lea addresses_D+0x12c80, %rdx
nop
nop
nop
nop
and $51367, %r14
mov $0x5152535455565758, %r11
movq %r11, %xmm5
vmovups %ymm5, (%rdx)
nop
and $38587, %r8
// Load
lea addresses_D+0x4100, %r8
clflush (%r8)
nop
nop
nop
nop
xor $5232, %rbp
mov (%r8), %si
nop
xor $36120, %r8
// Faulty Load
lea addresses_D+0x4100, %rbp
nop
nop
nop
sub $50310, %rdi
mov (%rbp), %esi
lea oracles, %rdi
and $0xff, %rsi
shlq $12, %rsi
mov (%rdi,%rsi,1), %rsi
pop %rsi
pop %rdx
pop %rdi
pop %rbp
pop %r8
pop %r14
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_D', 'same': True, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_D', 'same': True, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_D', 'same': False, 'size': 32, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_D', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_D', 'same': True, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_D_ht', 'same': False, 'size': 2, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': True}, 'OP': 'REPM'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 4, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 4, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 16, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 8, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'same': True, 'size': 2, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 32, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_D_ht', 'same': False, 'size': 1, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'51': 21829}
51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51
*/
| 34.484163 | 2,999 | 0.652933 |
75c4ba7583c3dfdc0e700a7c22f65701821ff9e8 | 453 | asm | Assembly | programs/oeis/204/A204330.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/204/A204330.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/204/A204330.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A204330: a(n) is the number of k satisfying 1 <= k <= n and such that floor(sqrt(k)) divides k.
; 1,2,3,4,4,5,5,6,7,7,7,8,8,8,9,10,10,10,10,11,11,11,11,12,13,13,13,13,13,14,14,14,14,14,15,16,16,16,16,16,16,17,17,17,17,17,17,18,19,19,19,19,19,19,19,20,20,20,20,20,20,20,21,22,22,22,22,22,22,22
mov $2,$0
add $2,1
mov $4,$0
lpb $2
mov $0,$4
sub $2,1
sub $0,$2
seq $0,79644 ; n (mod sqrtint(n)).
mov $3,$0
cmp $3,0
add $1,$3
lpe
mov $0,$1
| 26.647059 | 196 | 0.591611 |
0146fab1177e0dbac80e254efeb769b1a6649749 | 13,140 | asm | Assembly | libtool/src/gmp-6.1.2/mpn/x86/pentium4/sse2/divrem_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/x86/pentium4/sse2/divrem_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/x86/pentium4/sse2/divrem_1.asm | kroggen/aergo | 05af317eaa1b62b21dc0144ef74a9e7acb14fb87 | [
"MIT"
] | 498 | 2015-01-08T18:58:18.000Z | 2022-03-20T15:37:45.000Z | dnl Intel Pentium-4 mpn_divrem_1 -- mpn by limb division.
dnl Copyright 1999-2004 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 P4: 32 cycles/limb integer part, 30 cycles/limb fraction part.
C mp_limb_t mpn_divrem_1 (mp_ptr dst, mp_size_t xsize,
C mp_srcptr src, mp_size_t size,
C mp_limb_t divisor);
C mp_limb_t mpn_divrem_1c (mp_ptr dst, mp_size_t xsize,
C mp_srcptr src, mp_size_t size,
C mp_limb_t divisor, mp_limb_t carry);
C mp_limb_t mpn_preinv_divrem_1 (mp_ptr dst, mp_size_t xsize,
C mp_srcptr src, mp_size_t size,
C mp_limb_t divisor, mp_limb_t inverse,
C unsigned shift);
C
C Algorithm:
C
C The method and nomenclature follow part 8 of "Division by Invariant
C Integers using Multiplication" by Granlund and Montgomery, reference in
C gmp.texi.
C
C "m" is written for what is m' in the paper, and "d" for d_norm, which
C won't cause any confusion since it's only the normalized divisor that's of
C any use in the code. "b" is written for 2^N, the size of a limb, N being
C 32 here.
C
C The step "sdword dr = n - 2^N*d + (2^N-1-q1) * d" is instead done as
C "n-d - q1*d". This rearrangement gives the same two-limb answer but lets
C us have just a psubq on the dependent chain.
C
C For reference, the way the k7 code uses "n-(q1+1)*d" would not suit here,
C detecting an overflow of q1+1 when q1=0xFFFFFFFF would cost too much.
C
C Notes:
C
C mpn_divrem_1 and mpn_preinv_divrem_1 avoid one division if the src high
C limb is less than the divisor. mpn_divrem_1c doesn't check for a zero
C carry, since in normal circumstances that will be a very rare event.
C
C The test for skipping a division is branch free (once size>=1 is tested).
C The store to the destination high limb is 0 when a divide is skipped, or
C if it's not skipped then a copy of the src high limb is stored. The
C latter is in case src==dst.
C
C There's a small bias towards expecting xsize==0, by having code for
C xsize==0 in a straight line and xsize!=0 under forward jumps.
C
C Enhancements:
C
C The loop measures 32 cycles, but the dependent chain would suggest it
C could be done with 30. Not sure where to start looking for the extras.
C
C Alternatives:
C
C If the divisor is normalized (high bit set) then a division step can
C always be skipped, since the high destination limb is always 0 or 1 in
C that case. It doesn't seem worth checking for this though, since it
C probably occurs infrequently.
dnl MUL_THRESHOLD is the value of xsize+size at which the multiply by
dnl inverse method is used, rather than plain "divl"s. Minimum value 1.
dnl
dnl The inverse takes about 80-90 cycles to calculate, but after that the
dnl multiply is 32 c/l versus division at about 58 c/l.
dnl
dnl At 4 limbs the div is a touch faster than the mul (and of course
dnl simpler), so start the mul from 5 limbs.
deflit(MUL_THRESHOLD, 5)
defframe(PARAM_PREINV_SHIFT, 28) dnl mpn_preinv_divrem_1
defframe(PARAM_PREINV_INVERSE, 24) dnl mpn_preinv_divrem_1
defframe(PARAM_CARRY, 24) dnl mpn_divrem_1c
defframe(PARAM_DIVISOR,20)
defframe(PARAM_SIZE, 16)
defframe(PARAM_SRC, 12)
defframe(PARAM_XSIZE, 8)
defframe(PARAM_DST, 4)
dnl re-use parameter space
define(SAVE_ESI,`PARAM_SIZE')
define(SAVE_EBP,`PARAM_SRC')
define(SAVE_EDI,`PARAM_DIVISOR')
define(SAVE_EBX,`PARAM_DST')
TEXT
ALIGN(16)
PROLOGUE(mpn_preinv_divrem_1)
deflit(`FRAME',0)
movl PARAM_SIZE, %ecx
xorl %edx, %edx C carry if can't skip a div
movl %esi, SAVE_ESI
movl PARAM_SRC, %esi
movl %ebp, SAVE_EBP
movl PARAM_DIVISOR, %ebp
movl %edi, SAVE_EDI
movl PARAM_DST, %edi
movl -4(%esi,%ecx,4), %eax C src high limb
movl %ebx, SAVE_EBX
movl PARAM_XSIZE, %ebx
movd PARAM_PREINV_INVERSE, %mm4
movd PARAM_PREINV_SHIFT, %mm7 C l
cmpl %ebp, %eax C high cmp divisor
cmovc( %eax, %edx) C high is carry if high<divisor
movd %edx, %mm0 C carry
movd %edx, %mm1 C carry
movl $0, %edx
movd %ebp, %mm5 C d
cmovnc( %eax, %edx) C 0 if skip div, src high if not
C (the latter in case src==dst)
leal -4(%edi,%ebx,4), %edi C &dst[xsize-1]
movl %edx, (%edi,%ecx,4) C dst high limb
sbbl $0, %ecx C skip one division if high<divisor
movl $32, %eax
subl PARAM_PREINV_SHIFT, %eax
psllq %mm7, %mm5 C d normalized
leal (%edi,%ecx,4), %edi C &dst[xsize+size-1]
leal -4(%esi,%ecx,4), %esi C &src[size-1]
movd %eax, %mm6 C 32-l
jmp L(start_preinv)
EPILOGUE()
ALIGN(16)
PROLOGUE(mpn_divrem_1c)
deflit(`FRAME',0)
movl PARAM_CARRY, %edx
movl PARAM_SIZE, %ecx
movl %esi, SAVE_ESI
movl PARAM_SRC, %esi
movl %ebp, SAVE_EBP
movl PARAM_DIVISOR, %ebp
movl %edi, SAVE_EDI
movl PARAM_DST, %edi
movl %ebx, SAVE_EBX
movl PARAM_XSIZE, %ebx
leal -4(%edi,%ebx,4), %edi C &dst[xsize-1]
jmp L(start_1c)
EPILOGUE()
ALIGN(16)
PROLOGUE(mpn_divrem_1)
deflit(`FRAME',0)
movl PARAM_SIZE, %ecx
xorl %edx, %edx C initial carry (if can't skip a div)
movl %esi, SAVE_ESI
movl PARAM_SRC, %esi
movl %ebp, SAVE_EBP
movl PARAM_DIVISOR, %ebp
movl %edi, SAVE_EDI
movl PARAM_DST, %edi
movl %ebx, SAVE_EBX
movl PARAM_XSIZE, %ebx
leal -4(%edi,%ebx,4), %edi C &dst[xsize-1]
orl %ecx, %ecx C size
jz L(no_skip_div) C if size==0
movl -4(%esi,%ecx,4), %eax C src high limb
cmpl %ebp, %eax C high cmp divisor
cmovnc( %eax, %edx) C 0 if skip div, src high if not
movl %edx, (%edi,%ecx,4) C dst high limb
movl $0, %edx
cmovc( %eax, %edx) C high is carry if high<divisor
sbbl $0, %ecx C size-1 if high<divisor
L(no_skip_div):
L(start_1c):
C eax
C ebx xsize
C ecx size
C edx carry
C esi src
C edi &dst[xsize-1]
C ebp divisor
leal (%ebx,%ecx), %eax C size+xsize
leal -4(%esi,%ecx,4), %esi C &src[size-1]
leal (%edi,%ecx,4), %edi C &dst[size+xsize-1]
cmpl $MUL_THRESHOLD, %eax
jae L(mul_by_inverse)
orl %ecx, %ecx
jz L(divide_no_integer) C if size==0
L(divide_integer):
C eax scratch (quotient)
C ebx xsize
C ecx counter
C edx carry
C esi src, decrementing
C edi dst, decrementing
C ebp divisor
movl (%esi), %eax
subl $4, %esi
divl %ebp
movl %eax, (%edi)
subl $4, %edi
subl $1, %ecx
jnz L(divide_integer)
L(divide_no_integer):
orl %ebx, %ebx
jnz L(divide_fraction) C if xsize!=0
L(divide_done):
movl SAVE_ESI, %esi
movl SAVE_EDI, %edi
movl SAVE_EBX, %ebx
movl SAVE_EBP, %ebp
movl %edx, %eax
ret
L(divide_fraction):
C eax scratch (quotient)
C ebx counter
C ecx
C edx carry
C esi
C edi dst, decrementing
C ebp divisor
movl $0, %eax
divl %ebp
movl %eax, (%edi)
subl $4, %edi
subl $1, %ebx
jnz L(divide_fraction)
jmp L(divide_done)
C -----------------------------------------------------------------------------
L(mul_by_inverse):
C eax
C ebx xsize
C ecx size
C edx carry
C esi &src[size-1]
C edi &dst[size+xsize-1]
C ebp divisor
bsrl %ebp, %eax C 31-l
movd %edx, %mm0 C carry
movd %edx, %mm1 C carry
movl %ecx, %edx C size
movl $31, %ecx
C
xorl %eax, %ecx C l = leading zeros on d
addl $1, %eax
shll %cl, %ebp C d normalized
movd %ecx, %mm7 C l
movl %edx, %ecx C size
movd %eax, %mm6 C 32-l
movl $-1, %edx
movl $-1, %eax
C
subl %ebp, %edx C (b-d)-1 so edx:eax = b*(b-d)-1
divl %ebp C floor (b*(b-d)-1 / d)
movd %ebp, %mm5 C d
C
movd %eax, %mm4 C m
L(start_preinv):
C eax inverse
C ebx xsize
C ecx size
C edx
C esi &src[size-1]
C edi &dst[size+xsize-1]
C ebp
C
C mm0 carry
C mm1 carry
C mm2
C mm4 m
C mm5 d
C mm6 31-l
C mm7 l
psllq %mm7, %mm0 C n2 = carry << l, for size==0
subl $1, %ecx
jb L(integer_none)
movd (%esi), %mm0 C src high limb
punpckldq %mm1, %mm0
psrlq %mm6, %mm0 C n2 = high (carry:srchigh << l)
jz L(integer_last)
C The dependent chain here consists of
C
C 2 paddd n1+n2
C 8 pmuludq m*(n1+n2)
C 2 paddq n2:nadj + m*(n1+n2)
C 2 psrlq q1
C 8 pmuludq d*q1
C 2 psubq (n-d)-q1*d
C 2 psrlq high n-(q1+1)*d mask
C 2 pand d masked
C 2 paddd n2+d addback
C --
C 30
C
C But it seems to run at 32 cycles, so presumably there's something else
C going on.
ALIGN(16)
L(integer_top):
C eax
C ebx
C ecx counter, size-1 to 0
C edx
C esi src, decrementing
C edi dst, decrementing
C
C mm0 n2
C mm4 m
C mm5 d
C mm6 32-l
C mm7 l
ASSERT(b,`C n2<d
movd %mm0, %eax
movd %mm5, %edx
cmpl %edx, %eax')
movd -4(%esi), %mm1 C next src limbs
movd (%esi), %mm2
leal -4(%esi), %esi
punpckldq %mm2, %mm1
psrlq %mm6, %mm1 C n10
movq %mm1, %mm2 C n10
movq %mm1, %mm3 C n10
psrad $31, %mm1 C -n1
pand %mm5, %mm1 C -n1 & d
paddd %mm2, %mm1 C nadj = n10+(-n1&d), ignore overflow
psrld $31, %mm2 C n1
paddd %mm0, %mm2 C n2+n1
punpckldq %mm0, %mm1 C n2:nadj
pmuludq %mm4, %mm2 C m*(n2+n1)
C
paddq %mm2, %mm1 C n2:nadj + m*(n2+n1)
pxor %mm2, %mm2 C break dependency, saves 4 cycles
pcmpeqd %mm2, %mm2 C FF...FF
psrlq $63, %mm2 C 1
psrlq $32, %mm1 C q1 = high(n2:nadj + m*(n2+n1))
paddd %mm1, %mm2 C q1+1
pmuludq %mm5, %mm1 C q1*d
punpckldq %mm0, %mm3 C n = n2:n10
pxor %mm0, %mm0
psubq %mm5, %mm3 C n - d
C
psubq %mm1, %mm3 C n - (q1+1)*d
por %mm3, %mm0 C copy remainder -> new n2
psrlq $32, %mm3 C high n - (q1+1)*d, 0 or -1
ASSERT(be,`C 0 or -1
movd %mm3, %eax
addl $1, %eax
cmpl $1, %eax')
paddd %mm3, %mm2 C q
pand %mm5, %mm3 C mask & d
paddd %mm3, %mm0 C addback if necessary
movd %mm2, (%edi)
leal -4(%edi), %edi
subl $1, %ecx
ja L(integer_top)
L(integer_last):
C eax
C ebx xsize
C ecx
C edx
C esi &src[0]
C edi &dst[xsize]
C
C mm0 n2
C mm4 m
C mm5 d
C mm6
C mm7 l
ASSERT(b,`C n2<d
movd %mm0, %eax
movd %mm5, %edx
cmpl %edx, %eax')
movd (%esi), %mm1 C src[0]
psllq %mm7, %mm1 C n10
movq %mm1, %mm2 C n10
movq %mm1, %mm3 C n10
psrad $31, %mm1 C -n1
pand %mm5, %mm1 C -n1 & d
paddd %mm2, %mm1 C nadj = n10+(-n1&d), ignore overflow
psrld $31, %mm2 C n1
paddd %mm0, %mm2 C n2+n1
punpckldq %mm0, %mm1 C n2:nadj
pmuludq %mm4, %mm2 C m*(n2+n1)
C
paddq %mm2, %mm1 C n2:nadj + m*(n2+n1)
pcmpeqd %mm2, %mm2 C FF...FF
psrlq $63, %mm2 C 1
psrlq $32, %mm1 C q1 = high(n2:nadj + m*(n2+n1))
paddd %mm1, %mm2 C q1
pmuludq %mm5, %mm1 C q1*d
punpckldq %mm0, %mm3 C n
psubq %mm5, %mm3 C n - d
pxor %mm0, %mm0
C
psubq %mm1, %mm3 C n - (q1+1)*d
por %mm3, %mm0 C remainder -> n2
psrlq $32, %mm3 C high n - (q1+1)*d, 0 or -1
ASSERT(be,`C 0 or -1
movd %mm3, %eax
addl $1, %eax
cmpl $1, %eax')
paddd %mm3, %mm2 C q
pand %mm5, %mm3 C mask & d
paddd %mm3, %mm0 C addback if necessary
movd %mm2, (%edi)
leal -4(%edi), %edi
L(integer_none):
C eax
C ebx xsize
orl %ebx, %ebx
jnz L(fraction_some) C if xsize!=0
L(fraction_done):
movl SAVE_EBP, %ebp
psrld %mm7, %mm0 C remainder
movl SAVE_EDI, %edi
movd %mm0, %eax
movl SAVE_ESI, %esi
movl SAVE_EBX, %ebx
emms
ret
C -----------------------------------------------------------------------------
C
L(fraction_some):
C eax
C ebx xsize
C ecx
C edx
C esi
C edi &dst[xsize-1]
C ebp
L(fraction_top):
C eax
C ebx counter, xsize iterations
C ecx
C edx
C esi src, decrementing
C edi dst, decrementing
C
C mm0 n2
C mm4 m
C mm5 d
C mm6 32-l
C mm7 l
ASSERT(b,`C n2<d
movd %mm0, %eax
movd %mm5, %edx
cmpl %edx, %eax')
movq %mm0, %mm1 C n2
pmuludq %mm4, %mm0 C m*n2
pcmpeqd %mm2, %mm2
psrlq $63, %mm2
C
psrlq $32, %mm0 C high(m*n2)
paddd %mm1, %mm0 C q1 = high(n2:0 + m*n2)
paddd %mm0, %mm2 C q1+1
pmuludq %mm5, %mm0 C q1*d
psllq $32, %mm1 C n = n2:0
psubq %mm5, %mm1 C n - d
C
psubq %mm0, %mm1 C r = n - (q1+1)*d
pxor %mm0, %mm0
por %mm1, %mm0 C r -> n2
psrlq $32, %mm1 C high n - (q1+1)*d, 0 or -1
ASSERT(be,`C 0 or -1
movd %mm1, %eax
addl $1, %eax
cmpl $1, %eax')
paddd %mm1, %mm2 C q
pand %mm5, %mm1 C mask & d
paddd %mm1, %mm0 C addback if necessary
movd %mm2, (%edi)
leal -4(%edi), %edi
subl $1, %ebx
jne L(fraction_top)
jmp L(fraction_done)
EPILOGUE()
| 20.340557 | 79 | 0.648706 |
65e9f49bba9db5594d5df1ad8ebe1804f103adac | 216 | asm | Assembly | data/pokemon/dex_entries/wigglytuff.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 28 | 2019-11-08T07:19:00.000Z | 2021-12-20T10:17:54.000Z | data/pokemon/dex_entries/wigglytuff.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 13 | 2020-01-11T17:00:40.000Z | 2021-09-14T01:27:38.000Z | data/pokemon/dex_entries/wigglytuff.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 22 | 2020-05-28T17:31:38.000Z | 2022-03-07T20:49:35.000Z | db "BALLOON@" ; species name
dw 303, 260 ; height, weight
db "The rich, fluffy"
next "fur that covers"
next "its body feels so"
page "good that anyone"
next "who feels it can't"
next "stop touching it.@"
| 19.636364 | 29 | 0.666667 |
86070c16df76b1bf56bd2e6434f51b0543e27863 | 5,725 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0xca_notsx.log_21829_1354.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0xca_notsx.log_21829_1354.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0xca_notsx.log_21829_1354.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r15
push %rbx
lea addresses_D_ht+0x2e07, %r15
nop
nop
nop
nop
and %r12, %r12
vmovups (%r15), %ymm4
vextracti128 $1, %ymm4, %xmm4
vpextrq $1, %xmm4, %rbx
nop
nop
nop
nop
nop
xor %r12, %r12
pop %rbx
pop %r15
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r14
push %r15
push %rbp
push %rcx
push %rdx
push %rsi
// Store
lea addresses_normal+0x8f30, %r10
nop
nop
nop
nop
nop
xor $692, %rcx
movl $0x51525354, (%r10)
nop
nop
nop
nop
add %r10, %r10
// Store
lea addresses_A+0x1b668, %rsi
nop
add $2283, %rdx
mov $0x5152535455565758, %r14
movq %r14, %xmm2
vmovups %ymm2, (%rsi)
nop
nop
nop
and %r14, %r14
// Store
lea addresses_D+0x17870, %r15
nop
nop
nop
nop
dec %rcx
mov $0x5152535455565758, %r10
movq %r10, (%r15)
nop
nop
nop
nop
sub $14496, %r14
// Store
lea addresses_normal+0xf4ea, %r15
nop
nop
nop
nop
nop
sub %rbp, %rbp
movw $0x5152, (%r15)
nop
nop
nop
and %rcx, %rcx
// Store
lea addresses_UC+0x12b30, %r15
cmp $44492, %rcx
movl $0x51525354, (%r15)
nop
nop
nop
nop
nop
add %rsi, %rsi
// Store
lea addresses_UC+0x7730, %rdx
nop
nop
nop
nop
add %r15, %r15
mov $0x5152535455565758, %r10
movq %r10, (%rdx)
nop
nop
nop
nop
nop
cmp %rsi, %rsi
// Faulty Load
lea addresses_normal+0x8f30, %r10
nop
nop
nop
nop
nop
sub $44266, %rbp
vmovups (%r10), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $0, %xmm3, %rdx
lea oracles, %rbp
and $0xff, %rdx
shlq $12, %rdx
mov (%rbp,%rdx,1), %rdx
pop %rsi
pop %rdx
pop %rcx
pop %rbp
pop %r15
pop %r14
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 1, 'same': False, 'type': 'addresses_A'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 6, 'same': False, 'type': 'addresses_D'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_normal'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 7, 'same': False, 'type': 'addresses_UC'}, 'OP': 'STOR'}
{'dst': {'NT': True, 'AVXalign': True, 'size': 8, 'congruent': 8, 'same': False, 'type': 'addresses_UC'}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'54': 21829}
54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54
*/
| 35.78125 | 2,999 | 0.657467 |
f023fac7de394d928bd3d9114241a83724ad1cfd | 466 | asm | Assembly | oeis/134/A134986.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/134/A134986.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/134/A134986.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A134986: a(n) = smallest integer m not equal to n such that n = (floor(n^2/m) + m)/2.
; 2,3,2,3,4,5,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,21,22,23,24,25,26,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,47,48,49,50,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,82,83,84,85,86,87,88,89,90,91
mov $1,$0
mov $2,4
lpb $1,2
sub $0,1
trn $1,2
sub $2,2
add $1,$2
lpe
add $0,2
| 35.846154 | 290 | 0.61588 |
f53e73ad0b3107a3a13107e35fc36ef1c48002a6 | 636 | asm | Assembly | cards/bn5/ModCards/136-A008 Billy.asm | RockmanEXEZone/MMBN-Mod-Card-Kit | d591ddca5566dbb323dc19c11e69410fa4073d1b | [
"Unlicense"
] | 10 | 2017-12-05T14:25:38.000Z | 2022-02-21T04:28:00.000Z | cards/bn5/ModCards/136-A008 Billy.asm | RockmanEXEZone/MMBN-Mod-Card-Kit | d591ddca5566dbb323dc19c11e69410fa4073d1b | [
"Unlicense"
] | null | null | null | cards/bn5/ModCards/136-A008 Billy.asm | RockmanEXEZone/MMBN-Mod-Card-Kit | d591ddca5566dbb323dc19c11e69410fa4073d1b | [
"Unlicense"
] | null | null | null | .include "defaults_mod.asm"
table_file_jp equ "exe5-utf8.tbl"
table_file_en equ "bn5-utf8.tbl"
game_code_len equ 3
game_code equ 0x4252424A // BRBJ
game_code_2 equ 0x42524245 // BRBE
game_code_3 equ 0x42524250 // BRBP
card_type equ 1
card_id equ 8
card_no equ "008"
card_sub equ "Mod Card 008"
card_sub_x equ 64
card_desc_len equ 2
card_desc_1 equ "Billy"
card_desc_2 equ "5MB"
card_desc_3 equ ""
card_name_jp_full equ "ビリー"
card_name_jp_game equ "ビリー"
card_name_en_full equ "Billy"
card_name_en_game equ "Billy"
card_address equ ""
card_address_id equ 0
card_bug equ 0
card_wrote_en equ ""
card_wrote_jp equ "" | 23.555556 | 35 | 0.767296 |
fb03861e1cf3fea108c2beb1deba0a14d40b7b55 | 1,100 | asm | Assembly | Bootloader/Pure64/src/init/pic.asm | gbaliarda/TP_ARQUI | 1c4f29807eb3e0eb5ea792c5dc3ea9e277046381 | [
"BSD-3-Clause"
] | null | null | null | Bootloader/Pure64/src/init/pic.asm | gbaliarda/TP_ARQUI | 1c4f29807eb3e0eb5ea792c5dc3ea9e277046381 | [
"BSD-3-Clause"
] | null | null | null | Bootloader/Pure64/src/init/pic.asm | gbaliarda/TP_ARQUI | 1c4f29807eb3e0eb5ea792c5dc3ea9e277046381 | [
"BSD-3-Clause"
] | 1 | 2022-03-08T15:31:23.000Z | 2022-03-08T15:31:23.000Z | ; =============================================================================
; Pure64 -- a 64-bit OS loader written in Assembly for x86-64 systems
; Copyright (C) 2008-2014 Return Infinity -- see LICENSE.TXT
;
; INIT PIC
; =============================================================================
init_pic:
; Enable specific interrupts
in al, 0x21
mov al, 11111001b ; Enable Cascade, Keyboard
out 0x21, al
in al, 0xA1
mov al, 11111110b ; Enable RTC
out 0xA1, al
; Set the periodic flag in the RTC
mov al, 0x0B ; Status Register B
out 0x70, al ; Select the address
in al, 0x71 ; Read the current settings
push rax
mov al, 0x0B ; Status Register B
out 0x70, al ; Select the address
pop rax
bts ax, 6 ; Set Periodic(6)
out 0x71, al ; Write the new settings
sti ; Enable interrupts
; Acknowledge the RTC
mov al, 0x0C ; Status Register C
out 0x70, al ; Select the address
in al, 0x71 ; Read the current settings
ret
; =============================================================================
; EOF
| 26.829268 | 80 | 0.510909 |
f3fe6e3b57b0f5237b0305bb56348d89be9a2a4a | 625 | asm | Assembly | oeis/006/A006659.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/006/A006659.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/006/A006659.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A006659: Closed meander systems of order n+1 with n components.
; 2,12,56,240,990,4004,16016,63648,251940,994840,3922512,15452320,60843510,239519700,942871200,3711935040,14615744220,57562286760,226760523600,893550621600,3522078700140,13887053160552,54771314563296,216086506731200,852769964064200,3366382947795504,13292896768218144,52504559994897472,207439891051269030,819788576756425780,3240576021060694848,12812968783733069952,50673511960666550956,200452958861604783880,793123471904430073680,3138793403097239016864,12424390553926571108420,49189775653845079813560
mov $1,4
add $1,$0
add $1,$0
bin $1,$0
mul $1,2
mov $0,$1
| 62.5 | 499 | 0.8656 |
1b87f86f0ac9b8a73b80ac0a9800ec294e5526f4 | 12,402 | asm | Assembly | bahamut/source/menu-large.asm | higan-emu/bahamut-lagoon-translation-kit | 6f08de5b92b597c0b9ecebd485cc975b99acfc13 | [
"0BSD"
] | 2 | 2021-08-15T04:10:10.000Z | 2021-08-15T20:14:13.000Z | bahamut/source/menu-large.asm | higan-emu/bahamut-lagoon-translation-kit | 6f08de5b92b597c0b9ecebd485cc975b99acfc13 | [
"0BSD"
] | 1 | 2022-02-16T02:46:39.000Z | 2022-02-16T04:30:29.000Z | bahamut/source/menu-large.asm | higan-emu/bahamut-lagoon-translation-kit | 6f08de5b92b597c0b9ecebd485cc975b99acfc13 | [
"0BSD"
] | 1 | 2021-12-25T11:34:57.000Z | 2021-12-25T11:34:57.000Z | namespace menu {
seek(codeCursor)
namespace largeText {
enqueue pc
seek($ee53fc); jsl description; jmp $5409 //descriptions
seek($ee5532); jsl chapterName; jmp $553f //chapter names
seek($ee51f2); jsl main; nop #15 //text renderer for both description types
seek($ee540b); jsl test; nop #2 //test if OAM text should be cleared during list navigation
seek($ee9317); jml cancelStatus; nop #2 //clear OAM text when cancelling list navigation
seek($eeba32); jml acceptEquipment; nop #2 //clear OAM text when accepting list navigation
seek($eeba40); jml cancelEquipment; nop #2 //clear OAM text when cancelling list navigation
seek($eee218); jml cancelShop; nop #2 //clear OAM text when cancelling list navigation
seek($eeeca5); jml cancelInventory; nop #2 //clear OAM text when cancelling list navigation
seek($ee5478); nop #2 //disable post-main text increment (descriptions)
seek($ee55af); nop #2 //disable post-main text increment (name entry)
seek($ee5175); nop #3 //disable OAM setup (now handled inside main)
seek($ee511c); nop #4 //disable OAM clearing (left-half)
seek($ee5140); nop #4 //disable OAM clearing (right-half)
dequeue pc
//the tiledata output is segmented into four quadrants for sprite 16x16 alignment:
//$7e7800 = ( 0-127),(0- 7)
//$7e7a00 = ( 0-127),(8-15)
//$7e7c00 = (128-255),(0- 7)
//$7e7e00 = (128-255),(8-15)
constant index = $12 //current Y index into text string
constant buffer = $14 //text string is located at [$14],y
constant output = $7e7804 //where to write tiledata to ($7e:7800+)
constant naming = $7e9e00 //name select screen text is always located here
variable(2, pixel) //current X position position to render to
variable(2, pixels) //maximum number of pixels that can be rendered for this line
variable(2, ramAddressL) //position of tile N
variable(2, ramAddressR) //position of tile N+1
variable(2, character) //current character being rendered
variable(2, style) //current font style being used (#$00 = normal, #$60 = italic)
variable(2, color) //current font color being used (#$00 = normal, #$01 = yellow, #$02 = shadow)
//keeps track of the type of text being rendered.
//item descriptions will be transferred to VRAM via main.
//chapter descriptions will be transferred to VRAM via the original game engine.
variable(2, type)
namespace type {
constant nameEntry = 0
constant chapterName = 1
constant description = 2
}
function description {
enter
asl; tax; lda lists.descriptions.text,x
add.w #lists.descriptions.text >> 0; sta.b buffer+0; sep #$20; lda #$00
adc.b #lists.descriptions.text >> 16; sta.b buffer+2; rep #$20
lda.w #type.description; sta type
leave; rtl
}
function chapterName {
enter
asl; tax; lda lists.descriptions.text,x
add.w #lists.descriptions.text >> 0; sta.b buffer+0; sep #$20; lda #$00
adc.b #lists.descriptions.text >> 16; sta.b buffer+2; rep #$20
lda.w #type.chapterName; sta type
leave; rtl
}
//------
//ee51f2 lda $12
//ee51f4 and #$0001
//ee51f7 beq $51fb
//ee51f9 bra $5200
//ee51fb jsr $5207
//ee51fe bra $5205
//ee5200 jsr $5283
//ee5203 bra $5205
//------
function main {
enter; ldb #$7e
lda.b buffer+0; cmp.w #naming >> 0; bne +
lda.b buffer+1; cmp.w #naming >> 8; bne +
lda.w #type.nameEntry; sta type; +
initialize:
lda #$0000; sta character; sta pixel; sta style; sta color
lda.w #216; sta pixels
renderCharacter:
ldy.b index; lda [buffer],y; and #$00ff
cmp.w #command.terminal; bne +; jml finished; +; inc.b index
cmp.w #command.base; bcc decode
cmp.w #command.styleNormal; bne +; lda.w #$00; sta style; bra renderCharacter; +
cmp.w #command.styleItalic; bne +; lda.w #$60; sta style; bra renderCharacter; +
cmp.w #command.colorNormal; bne +; lda.w #$00; sta color; bra renderCharacter; +
cmp.w #command.colorYellow; bne +; lda.w #$01; sta color; bra renderCharacter; +
cmp.w #command.alignLeft; bne +; jsl align.left; bra renderCharacter; +
cmp.w #command.alignCenter; bne +; jsl align.center; bra renderCharacter; +
cmp.w #command.alignRight; bne +; jsl align.right; bra renderCharacter; +
cmp.w #command.alignSkip; bne +; jsl align.skip; bra renderCharacter; +
bra renderCharacter
decode:
character.decode(); add style; pha
//perform font kerning
lda character; mul(180); add $01,s; tax
lda largeFont.kernings,x; and #$00ff; pha
lda pixel; sub $01,s; sta pixel; pla; pla
sta character
//calculate first RAM tile write position
lda pixel; and #$00f8; asl #2; cmp #$0200; bcc +
add #$0200; +; sta ramAddressL
//calculate second RAM tile write position
lda pixel; add #$0008; and #$00f8; asl #2; cmp #$0200; bcc +
add #$0200; +; sta ramAddressR
//select one of eight pre-shifted copies of the proportional font
lda pixel; and #$0007; mul(8192); pha
//select the tile for the given character
lda character; mul(44); add $01,s; tax; pla
//add character width to pixel position for next character render
phx; lda character; tax
lda largeFont.widths,x; and #$00ff
plx; add pixel; cmp pixels; bcc +; beq +
lda pixels; sta pixel; jmp renderCharacter
+;sta pixel
//draw all 11 lines of the current character
lda type; cmp.w #type.description; jne shadow
lda color; jne yellow //only descriptions support font color selection
macro tile(variable font) {
macro lineL(variable n) {
variable t = n + 1
variable r = t / 6 * $200 + t % 6 * 2 - t / 6 * 4
lda.l font+$00+n*2,x; ora.w output+r,y; sta.w output+r,y
}
lda ramAddressL; tay
lineL(0); lineL(1); lineL(2); lineL(3); lineL(4)
lineL(5); lineL(6); lineL(7); lineL(8); lineL(9); lineL(10)
macro lineR(variable n) {
variable t = n + 1
variable r = t / 6 * $200 + t % 6 * 2 - t / 6 * 4
lda.l font+$16+n*2,x; ora.w output+r,y; sta.w output+r,y
}
lda ramAddressR; tay
lineR(0); lineR(1); lineR(2); lineR(3); lineR(4)
lineR(5); lineR(6); lineR(7); lineR(8); lineR(9); lineR(10)
jmp renderCharacter //keep rendering until all characters have been rendered
}
normal:; tile(largeFont.normal)
yellow:; tile(largeFont.yellow)
shadow:; tile(largeFont.shadow)
finished:
lda type; cmp.w #type.description; bne +; jsl write; +
leave; rtl
}
namespace align {
function left {
lda.w #0; sta pixel; rtl
}
function center {
lda.b index; add.b buffer+0; sta render.large.width.address+0
lda.w #$0000; adc.b buffer+2; sta render.large.width.address+2
lda style; sta render.large.width.style; jsl render.large.width
cmp pixels; bcc +; beq +; lda.w #0; sta pixel; rtl; +
pha; lda pixels; inc; sub $01,s; lsr; sta pixel; pla; rtl
}
function right {
lda.b index; add.b buffer+0; sta render.large.width.address+0
lda.w #$0000; adc.b buffer+2; sta render.large.width.address+2
lda style; sta render.large.width.style; jsl render.large.width
cmp pixels; bcc +; beq +; lda.w #0; sta pixel; rtl; +
pha; lda pixels; sub $01,s; sta pixel; pla; rtl
}
function skip {
ldy.b index; lda [buffer],y; and #$00ff; inc.b index
add pixel; sta pixel; rtl
}
}
function write {
//write 15 OAM entries (240 pixels)
lda #$c818; ldx #$0000; ldy #$000f
-;sta $7e6e20,x; add #$0010
inx #4; dey; bne -
//descriptions were originally rendered one character at a time, and only the
//next 24x16 pixels would be transferred after each function call, whereas this
//routine renders the entire string all at once, so it needs to all be copied here.
vwait() //vsync() cannot be used here due to the large size of the transfer
ldb #$00; sep #$20
lda #$01; sta $4300
lda #$18; sta $4301
ldx #$7800; stx $4302
lda #$7e; sta $4304
ldx #$0800; stx $4305
lda #$80; sta $2115
ldx #$7c00; stx $2116
lda #$01; sta $420b
lda #$ff; sta [buffer]
rtl
}
function clearSprites {
enter; ldb #$7e
lda #$e000; ldx #$0000; ldy #$000f
-;sta $6e20,x; add #$0010
inx #4; dey; bne -
leave; rtl
}
//------
//ee9312 bit #$8000 ;test if B is pressed
//ee9315 beq $92dd ;branch if not set
//ee9317 lda #$000c
//ee931a jsr $fb7c
//------
function cancelStatus {
jsl clearSprites
lda #$000c
pea $931c
jml $eefb7c
}
//------
//eeba2d bit #$0080 ;test if A is pressed
//eeba30 beq $ba3b ;branch if not set
//eeba32 lda #$000e
//eeba35 jsr $fb7c
//------
function acceptEquipment {
jsl clearSprites
lda #$000e
pea $ba37
jml $eefb7c
}
//------
//eeba3b bit #$8000 ;test if B is pressed
//eeba3e beq $ba49 ;branch if not set
//eeba40 lda #$000c
//eeba43 jsr $fb7c
//------
function cancelEquipment {
jsl clearSprites
lda #$000c
pea $ba45
jml $eefb7c
}
//------
//eee213 bit #$8000 ;test if B is pressed
//eee216 beq $e221 ;branch if not set
//eee218 lda #$000c
//eee21b jsr $fb7c
//------
function cancelShop {
jsl clearSprites
lda #$000c
pea $e21d
jml $eefb7c
}
//------
//eeeca0 bit #$8000 ;test if B is pressed
//eeeca3 beq $ecae ;branch if not set
//eeeca5 lda #$000c
//eeeca8 jsr $fb7c
//------
function cancelInventory {
jsl clearSprites
lda #$000c
pea $ecaa
jml $eefb7c
}
//------
//ee540b lda [$14],y
//ee540d and #$00ff
//------
function test {
lda [$14],y; and #$00ff
cmp #$00ff; beq +; rtl; +
cpy #$0000; beq +; rtl; +
jsl clearSprites; rtl
}
}
namespace disableTileQueuing {
//original renderer would queue up two 24x8 DMA transfers at a time.
//this resulted in choppy partial-character text rendering.
//------
//trying to extend it to transfer the entire #$0800 bytes of tiledata failed:
//the DMA list processing would occasionally run beyond vblank for the NMI routine,
//which resorted in severe graphical distortion. so instead of using this routine,
//tiledata is uploaded to VRAM manually inside renderCharacter.
//------
//a second issue is that this list can only hold 96 entries, and each character adds
//two (or when striding the left/right quadrants, four) transfer requests. however,
//some strings render immediately and queue all characters before sending any.
//this would cause the DMA transfer buffer to overflow on particularly long strings.
enqueue pc
seek($ee5178); plp; rts
dequeue pc
}
namespace disableTileAlignment {
//original renderer drew 12x12 tiles onto 16x16 sprites.
//after rendering 10 tiles, 120 of 128 pixels were used.
//the game would then skip the remaining 8 pixels, too short for another character,
//and place all subsequent sprites 8 pixels further to the left to account for this.
//the proportional font renderer writes to all 128 pixels, so this is not desirable.
//------
//ee5352 cpx #$001c ;is this the first tile of the second line?
//ee5355 bne $535b ;no, continue as normal
//ee5357 sec ;yes, subtract 8 for sprite X position,
//ee5358 sbc #$0008 ;which will affect all remaining tiles
//------
enqueue pc
seek($ee5355); db $80 //bne $535b -> bra $535b
dequeue pc
}
namespace disableCharacterLengthLimits {
//original game limited the maximum length of text strings.
//this doesn't work well for the thinner proportional font, so disable these checks.
//------
//ee547a lda $12 ;load how many characters have been rendered
//ee547c cmp #$0014 ;20 characters * 12x12 = 240 pixels
//ee547f bcs $5484 ;if length exceeded, skip rendering character
//------
//ee55b1 lda $12 ;load how many characters have been rendered
//ee55b3 cmp #$000a ;10 characters * 12x12 = 120 pixels
//ee55b6 bcs $55bb ;if length exceeded, skip rendering character
//------
enqueue pc
seek($ee547c); nop #5
seek($ee55b3); nop #5
dequeue pc
}
codeCursor = pc()
}
| 34.642458 | 106 | 0.633527 |
42a26750ed2cd1fa154f64a6e672f98d88febc6e | 193 | asm | Assembly | libsrc/_DEVELOPMENT/math/float/math48/z80/am48_dsize.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_dsize.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_dsize.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_dsize
am48_dsize:
; size of double in memory
;
; exit : bc = size of double in bytes
;
; uses : bc
ld bc,6
ret
| 11.352941 | 40 | 0.632124 |
54fcc4faa1f60472092baf0fe8076a7908fe2da2 | 3,199 | asm | Assembly | programs/oeis/027/A027622.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/027/A027622.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/027/A027622.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A027622: a(n) = n + (n+1)^2 + (n+2)^3 + (n+3)^4 + (n+4)^5.
; 1114,3413,8476,18247,35414,63529,107128,171851,264562,393469,568244,800143,1102126,1488977,1977424,2586259,3336458,4251301,5356492,6680279,8253574,10110073,12286376,14822107,17760034,21146189,25029988,29464351,34505822,40214689,46655104,53895203,62007226,71067637,81157244,92361319,104769718,118477001,133582552,150190699,168410834,188357533,210150676,233915567,259783054,287889649,318377648,351395251,387096682,425642309,467198764,511939063,560042726,611695897,667091464,726429179,789915778,857765101,930198212,1007443519,1089736894,1177321793,1270449376,1369378627,1474376474,1585717909,1703686108,1828572551,1960677142,2100308329,2247783224,2403427723,2567576626,2740573757,2922772084,3114533839,3316230638,3528243601,3750963472,3984790739,4230135754,4487418853,4757070476,5039531287,5335252294,5644694969,5968331368,6306644251,6660127202,7029284749,7414632484,7816697183,8236016926,8673141217,9128631104,9603059299,10097010298,10611080501,11145878332,11702024359,12280151414,12880904713,13504941976,14152933547,14825562514,15523524829,16247529428,16998298351,17776566862,18583083569,19418610544,20283923443,21179811626,22107078277,23066540524,24059029559,25085390758,26146483801,27243182792,28376376379,29546967874,30755875373,32004031876,33292385407,34621899134,35993551489,37408336288,38867262851,40371356122,41921656789,43519221404,45165122503,46860448726,48606304937,50403812344,52254108619,54158348018,56117701501,58133356852,60206518799,62338409134,64530266833,66783348176,69098926867,71478294154,73922758949,76433647948,79012305751,81660094982,84378396409,87168609064,90032150363,92970456226,95984981197,99077198564,102248600479,105500698078,108835021601,112253120512,115756563619,119346939194,123025855093,126794938876,130655837927,134610219574,138659771209,142806200408,147051235051,151396623442,155844134429,160395557524,165052703023,169817402126,174691507057,179676891184,184775449139,189989096938,195319772101,200769433772,206340062839,212033662054,217852256153,223797891976,229872638587,236078587394,242417852269,248892569668,255504898751,262257021502,269151142849,276189490784,283374316483,290707894426,298192522517,305830522204,313624238599,321576040598,329688321001,337963496632,346404008459,355012321714,363790926013,372742335476,381869088847,391173749614,400658906129,410327171728,420181184851,430223609162,440457133669,450884472844,461508366743,472331581126,483356907577,494587163624,506025192859,517673865058,529536076301,541614749092,553912832479,566433302174,579179160673,592153437376,605359188707,618799498234,632477476789,646396262588,660559021351,674968946422,689629258889,704543207704,719714069803,735145150226,750839782237,766801327444,783033175919,799538746318,816321486001,833384871152,850732406899,868367627434,886294096133,904515405676,923035178167,941857065254,960984748249,980421938248,1000172376251,1020239833282,1040628110509
mov $5,$0
mov $6,$0
mov $0,5
mov $2,10
mov $4,4
add $5,1
lpb $0,1
sub $0,1
add $1,$2
add $4,$5
mul $7,$4
sub $1,$7
add $1,4
mov $2,3
mov $3,1
sub $3,$4
mov $4,$3
mov $5,1
add $7,1
add $7,$3
lpe
sub $1,290
div $1,2
mul $1,2
add $1,260
add $1,$6
| 106.633333 | 2,866 | 0.865896 |
81faa8ec954ee7dc0a0cd842a88ac92e2ac2738a | 8,722 | asm | Assembly | rom/example/joypad.asm | novoru/GBR | 2d4a2c2c5740e0b6064a86d5aea29829c2ea9f3b | [
"MIT"
] | null | null | null | rom/example/joypad.asm | novoru/GBR | 2d4a2c2c5740e0b6064a86d5aea29829c2ea9f3b | [
"MIT"
] | null | null | null | rom/example/joypad.asm | novoru/GBR | 2d4a2c2c5740e0b6064a86d5aea29829c2ea9f3b | [
"MIT"
] | null | null | null | ; -----------------------------------------------------------------------------
; Example: Reading joypad state
; -----------------------------------------------------------------------------
; Font comes from ZX Spectrum - https://en.wikipedia.org/wiki/ZX_Spectrum_character_set
; More examples by tmk @ https://github.com/gitendo/helloworld
; -----------------------------------------------------------------------------
INCLUDE "hardware.inc" ; system defines
SECTION "VBL",ROM0[$0040] ; vblank interrupt handler
jp vbl
SECTION "Start",ROM0[$100] ; start vector, followed by header data applied by rgbfix.exe
nop
jp start
SECTION "Example",ROM0[$150] ; code starts here
start:
di ; disable interrupts
ld sp,$E000 ; setup stack
.wait_vbl ; wait for vblank to properly disable lcd
ld a,[rLY]
cp $90
jr nz,.wait_vbl
xor a
ld [rIF],a ; reset important registers
ld [rLCDC],a
ld [rSTAT],a
ld [rSCX],a
ld [rSCY],a
ld [rLYC],a
ld [rIE],a
ld hl,_RAM ; clear ram (fill with a which is 0 here)
ld bc,$2000-2 ; watch out for stack ;)
call fill
ld hl,_HRAM ; clear hram
ld c,$80 ; a = 0, b = 0 here, so let's save a byte and 4 cycles (ld c,$80 - 2/8 vs ld bc,$80 - 3/12)
call fill
ld hl,_VRAM ; clear vram, lcdc is disabled so you have 'easy' access
ld b,$18 ; a = 0, bc should be $1800; c = 0 here, so..
call fill
ld a,$20 ; ascii code for 'space' character
; no need to setup hl since _SCRN0 ($9800) and _SCRN1 ($9C00) are part of _VRAM, just continue
ld b,8 ; bc should be $800 (_SCRN0/1 are 32*32 bytes); c = 0 here, so..
call fill
ld a,%10010011 ; bits: 7-6 = 1st color, 5-4 = 2nd, 3-2 = 3rd and 1-0 = 4th color
; color values: 00 - light, 01 - gray, 10 - dark gray, 11 - dark
ld [rBGP],a ; bg palette
ld [rOBP0],a ; obj palettes (not used in this example)
ld [rOBP1],a
ld hl,font ; font data
ld de,_VRAM+$200 ; place it here to get ascii mapping ('space' code is $20, tile size $10)
ld bc,1776 ; font_8x8.chr file size
call copy
ld hl,text ; menu text
ld de,_SCRN0+$60 ; center it a bit
ld b,11
call copy_text
ld a,IEF_VBLANK ; vblank interrupt
ld [rIE],a ; setup
ld a,LCDCF_ON | LCDCF_BG8000 | LCDCF_BG9800 | LCDCF_OBJ8 | LCDCF_OBJOFF | LCDCF_WINOFF | LCDCF_BGON
; lcd setup: tiles at $8000, map at $9800, 8x8 sprites (disabled), no window, etc.
ld [rLCDC],a ; enable lcd
ei ; enable interrupts
.loop
call parse_input ; read joypad and update inputs array that holds individual keys status
halt ; save battery
; nop ; nop after halt is mandatory but rgbasm takes care of it :)
jr .loop ; endless loop
vbl: ; update screen
ld hl,_SCRN0+$C5 ; this points exactly at vram character between square brackets in 'Down' entry
ld bc,32 ; next line, hl + bc will point to another entry
ldh a,[btn_dn] ; use ldh instead of ld to copy value from hram, it's one byte shorter and 8 cycles faster
ld [hl],a ; since it's vblank we have easy access to vram, update 1st entry
add hl,bc ; and go to another
ldh a,[btn_up] ; repeat 7 times ...
ld [hl],a
add hl,bc
ldh a,[btn_lt]
ld [hl],a
add hl,bc
ldh a,[btn_rt]
ld [hl],a
add hl,bc
ldh a,[btn_st]
ld [hl],a
add hl,bc
ldh a,[btn_sl]
ld [hl],a
add hl,bc
ldh a,[btn_b]
ld [hl],a
add hl,bc
ldh a,[btn_a]
ld [hl],a
reti
;-------------------------------------------------------------------------------
parse_input:
;-------------------------------------------------------------------------------
ld a,"-" ; button not pressed, you could write $2D instead
ld hl,inputs ; 8 byte array that holds individual keys status
ld c,8
.clear
ld [hl+],a ; mark all keys as not pressed
dec c
jr nz,.clear
call read_keys ; read joypad
ld a,"+" ; button pressed, you could write $2B instead
dec l ; hl points here to next byte after inputs array, move it back to point on btn_a
.btn_a
bit 0,b ; is button a pressed ? (bit must be 1)
jr z,.btn_b ; no, check other key (apparently it's 0)
ldh [btn_a],a ; it is, mark it as +
.btn_b
bit 1,b ; ...
jr z,.select
ldh [btn_b],a
.select
bit 2,b
jr z,.start
ldh [btn_sl],a
.start
bit 3,b
jr z,.right
ldh [btn_st],a
.right
bit 4,b
jr z,.left
ldh [btn_rt],a
.left
bit 5,b
jr z,.up
ldh [btn_lt],a
.up
bit 6,b
jr z,.down
ldh [btn_up],a
.down
bit 7,b
ret z
ldh [btn_dn],a
ret
;-------------------------------------------------------------------------------
copy:
;-------------------------------------------------------------------------------
; hl - source address
; de - destination
; bc - size
inc b
inc c
jr .skip
.copy
ld a,[hl+]
ld [de],a
inc de
.skip
dec c
jr nz,.copy
dec b
jr nz,.copy
ret
;-------------------------------------------------------------------------------
copy_text:
;-------------------------------------------------------------------------------
; hl - text to display
; de - _SCRN0 or _SCRN1
; b - rows
; c - columns
.next_row
ld c,20
.row
ld a,[hl+] ; fetch one byte from text array and increase hl to point to another one
ld [de],a ; store it at _SCRN0
inc de ; unfortunately there's no [de+]
dec c ; one byte done
jr nz,.row ; next byte, copy untill c=0
ld a,e ; our row = 20 which is what you can see on the screen
add a,12 ; the part you don't see = 12, so we need to add it
jr nc,.skip ; to make sure the next row is copied at right offset
inc d ; nc flag is set when a+12 > 255
.skip
ld e,a
dec b ; next row, copy untill b=0
jr nz,.next_row
ret
;-------------------------------------------------------------------------------
fill:
;-------------------------------------------------------------------------------
; a - byte to fill with
; hl - destination address
; bc - size of area to fill
inc b
inc c
jr .skip
.fill
ld [hl+],a
.skip
dec c
jr nz,.fill
dec b
jr nz,.fill
ret
;-------------------------------------------------------------------------------
read_keys:
;-------------------------------------------------------------------------------
; this function returns two different values in b and c registers:
; b - returns raw state (pressing key triggers given action continuously as long as it's pressed - it does not prevent bouncing)
; c - returns debounced state (pressing key triggers given action only once - key must be released and pressed again)
ld a,$20 ; read P15 - returns a, b, select, start
ldh [rP1],a
ldh a,[rP1] ; mandatory
ldh a,[rP1]
cpl ; rP1 returns not pressed keys as 1 and pressed as 0, invert it to make result more readable
and $0f ; lower nibble has a, b, select, start state
swap a
ld b,a
ld a,$10 ; read P14 - returns up, down, left, right
ldh [rP1],a
ldh a,[rP1] ; mandatory
ldh a,[rP1]
ldh a,[rP1]
ldh a,[rP1]
ldh a,[rP1]
ldh a,[rP1]
cpl ; rP1 returns not pressed keys as 1 and pressed as 0, invert it to make result more readable
and $0f ; lower nibble has up, down, left, right state
or b ; combine P15 and P14 states in one byte
ld b,a ; store it
ldh a,[previous] ; this is when important part begins, load previous P15 & P14 state
xor b ; result will be 0 if it's the same as current read
and b ; keep buttons that were pressed during this read only
ldh [current],a ; store final result in variable and register
ld c,a
ld a,b ; current P15 & P14 state will be previous in next read
ldh [previous],a
ld a,$30 ; reset rP1
ldh [rP1],a
ret
;-------------------------------------------------------------------------------
font:
INCBIN "font_8x8.chr" ; converted with https://github.com/gitendo/bmp2cgb
text:
DB " Joypad state: "
DB " "
DB " "
DB " [-] - Down "
DB " [-] - Up "
DB " [-] - Left "
DB " [-] - Right "
DB " [-] - Start "
DB " [-] - Select "
DB " [-] - B "
DB " [-] - A "
;-------------------------------------------------------------------------------
SECTION "Variables",HRAM
current: DS 1 ; usually you read keys state and store it into variable for further processing
previous: DS 1 ; this is previous keys state used by debouncing part of read_keys function
inputs: ; array of buttons
btn_dn: DS 1
btn_up: DS 1
btn_lt: DS 1
btn_rt: DS 1
btn_st: DS 1
btn_sl: DS 1
btn_b: DS 1
btn_a: DS 1 | 26.672783 | 128 | 0.527402 |
98473443405ab5b03ed84a0962706ef3b6b64c24 | 291 | asm | Assembly | programs/oeis/163/A163581.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/163/A163581.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/163/A163581.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A163581: Number of zeros of sin(x) in integer intervals starting with (0,1).
; 0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0
mod $0,22
sub $0,1
mod $0,3
mov $1,$0
div $1,2
| 32.333333 | 163 | 0.56701 |
5cc67c8a050b60c5dbca4ad2daa4c19d51c42c71 | 5,899 | asm | Assembly | Transynther/x86/_processed/NC/_zr_/i7-7700_9_0x48.log_21829_278.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NC/_zr_/i7-7700_9_0x48.log_21829_278.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NC/_zr_/i7-7700_9_0x48.log_21829_278.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r14
push %r15
push %r9
push %rax
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x1a9c6, %r14
nop
nop
inc %rax
movl $0x61626364, (%r14)
cmp %rdx, %rdx
lea addresses_normal_ht+0x1b77e, %r15
nop
nop
xor $18023, %rdx
mov (%r15), %cx
nop
nop
lfence
lea addresses_A_ht+0x95c6, %r14
nop
nop
nop
nop
inc %r9
movl $0x61626364, (%r14)
nop
nop
nop
nop
dec %r14
lea addresses_A_ht+0xe30e, %rsi
lea addresses_D_ht+0x10006, %rdi
nop
and $45980, %r15
mov $48, %rcx
rep movsb
nop
nop
nop
and %rdx, %rdx
lea addresses_UC_ht+0x1c33e, %rcx
nop
nop
nop
nop
add $14526, %rax
movb $0x61, (%rcx)
nop
nop
xor $8585, %rax
lea addresses_A_ht+0x1b5e6, %rsi
lea addresses_A_ht+0x67c6, %rdi
nop
nop
nop
nop
nop
sub %r9, %r9
mov $83, %rcx
rep movsb
nop
xor $64616, %rax
lea addresses_A_ht+0x14216, %r14
clflush (%r14)
cmp %r9, %r9
mov $0x6162636465666768, %rdi
movq %rdi, (%r14)
nop
nop
nop
nop
nop
and %r9, %r9
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r15
pop %r14
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %rax
push %rbp
push %rbx
push %rdi
push %rsi
// Store
lea addresses_A+0xdd86, %rsi
add $27436, %rdi
mov $0x5152535455565758, %rbp
movq %rbp, %xmm3
movups %xmm3, (%rsi)
nop
nop
nop
nop
nop
inc %rax
// Faulty Load
mov $0x7af38900000007c6, %r13
clflush (%r13)
nop
nop
nop
nop
cmp %rbp, %rbp
mov (%r13), %rbx
lea oracles, %rbp
and $0xff, %rbx
shlq $12, %rbx
mov (%rbp,%rbx,1), %rbx
pop %rsi
pop %rdi
pop %rbx
pop %rbp
pop %rax
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 5, 'size': 16, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 8, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': True, 'congruent': 3, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 9, 'size': 4, 'same': True, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 3, 'size': 1, 'same': True, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 11, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': True, 'congruent': 4, 'size': 8, '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
*/
| 38.555556 | 2,999 | 0.658586 |
ba83ee5641c830acb9bec69fbb6a7003d2b771d5 | 8,282 | asm | Assembly | Transynther/x86/_processed/US/_zr_/i7-7700_9_0xca_notsx.log_21829_389.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/US/_zr_/i7-7700_9_0xca_notsx.log_21829_389.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/US/_zr_/i7-7700_9_0xca_notsx.log_21829_389.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %rax
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0xb72a, %rsi
lea addresses_WT_ht+0x1c056, %rdi
nop
nop
nop
sub %rax, %rax
mov $114, %rcx
rep movsb
nop
nop
nop
nop
nop
sub %rdx, %rdx
lea addresses_D_ht+0x1a6a, %rax
nop
nop
nop
xor %rbp, %rbp
mov (%rax), %edi
nop
sub $670, %rdi
lea addresses_WC_ht+0x5aa, %rsi
lea addresses_normal_ht+0xa2ea, %rdi
nop
nop
nop
nop
add %r12, %r12
mov $104, %rcx
rep movsb
nop
nop
xor %rsi, %rsi
lea addresses_WC_ht+0x19daa, %rax
xor %rcx, %rcx
mov (%rax), %esi
nop
nop
nop
nop
nop
and %rdi, %rdi
lea addresses_UC_ht+0xef2a, %rdi
nop
add %rcx, %rcx
mov (%rdi), %esi
nop
nop
nop
nop
dec %rdi
lea addresses_WT_ht+0x1eb8a, %rbp
xor $34833, %rsi
mov $0x6162636465666768, %rdi
movq %rdi, %xmm4
vmovups %ymm4, (%rbp)
dec %rax
lea addresses_UC_ht+0x1b2a, %rsi
lea addresses_WC_ht+0x6d2a, %rdi
nop
nop
nop
dec %r11
mov $107, %rcx
rep movsq
sub %rsi, %rsi
lea addresses_D_ht+0x1406a, %rcx
nop
and %rax, %rax
and $0xffffffffffffffc0, %rcx
vmovntdqa (%rcx), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $0, %xmm1, %rsi
nop
add %rcx, %rcx
lea addresses_UC_ht+0x1bf2a, %rsi
clflush (%rsi)
nop
nop
nop
nop
nop
and %rbp, %rbp
mov (%rsi), %edx
nop
nop
nop
nop
nop
xor $55099, %r11
lea addresses_WT_ht+0x1cf00, %rbp
cmp $21328, %rdi
mov (%rbp), %edx
nop
nop
nop
nop
add %rdi, %rdi
lea addresses_D_ht+0x1aed8, %r11
nop
nop
xor $27335, %r12
mov (%r11), %edx
nop
dec %r12
lea addresses_WC_ht+0x4632, %rsi
lea addresses_A_ht+0x1832a, %rdi
nop
nop
nop
and %rbp, %rbp
mov $100, %rcx
rep movsb
nop
nop
nop
dec %rsi
lea addresses_WT_ht+0x746a, %rsi
lea addresses_normal_ht+0x8302, %rdi
clflush (%rsi)
nop
nop
nop
dec %rdx
mov $111, %rcx
rep movsl
nop
nop
nop
nop
nop
add %r12, %r12
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r14
push %r15
push %rdi
push %rdx
push %rsi
// Store
lea addresses_UC+0x242a, %rdx
clflush (%rdx)
nop
cmp %rdi, %rdi
movl $0x51525354, (%rdx)
nop
nop
xor %r14, %r14
// Store
lea addresses_PSE+0x69ca, %r15
nop
nop
nop
nop
sub %r11, %r11
movb $0x51, (%r15)
inc %rdx
// Load
mov $0xe6a, %r11
nop
nop
add $27270, %rdx
movb (%r11), %r15b
cmp %r14, %r14
// Store
lea addresses_US+0x5f2a, %r10
nop
add %rsi, %rsi
mov $0x5152535455565758, %rdi
movq %rdi, %xmm0
vmovntdq %ymm0, (%r10)
nop
nop
nop
sub %rdi, %rdi
// Faulty Load
lea addresses_US+0x1af2a, %r10
clflush (%r10)
dec %rdi
vmovups (%r10), %ymm4
vextracti128 $0, %ymm4, %xmm4
vpextrq $1, %xmm4, %rdx
lea oracles, %r10
and $0xff, %rdx
shlq $12, %rdx
mov (%r10,%rdx,1), %rdx
pop %rsi
pop %rdx
pop %rdi
pop %r15
pop %r14
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': True, 'size': 8, 'congruent': 0, 'same': False, 'type': 'addresses_US'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 8, 'same': False, 'type': 'addresses_UC'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 4, 'same': False, 'type': 'addresses_PSE'}, 'OP': 'STOR'}
{'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 6, 'same': False, 'type': 'addresses_P'}, 'OP': 'LOAD'}
{'dst': {'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 11, 'same': False, 'type': 'addresses_US'}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': True, 'type': 'addresses_US'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 10, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 4, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 6, 'same': False, 'type': 'addresses_WC_ht'}, 'dst': {'congruent': 4, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 7, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 11, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 2, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 9, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'}
{'src': {'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 6, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': True, 'size': 4, 'congruent': 10, 'same': True, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 1, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'src': {'NT': True, 'AVXalign': False, 'size': 4, 'congruent': 1, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 3, 'same': False, 'type': 'addresses_WC_ht'}, 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'}
{'src': {'congruent': 5, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 3, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'}
{'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
*/
| 32.996016 | 2,999 | 0.653948 |
e17e2961fd3d03b80b474ad8eca6c6d1f067248b | 2,075 | asm | Assembly | programs/oeis/051/A051437.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/051/A051437.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/051/A051437.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A051437: Number of undirected walks of length n+1 on an oriented triangle, visiting n+2 vertices, with n "corners"; the symmetry group is C3. Walks are not self-avoiding.
; 1,3,4,10,16,36,64,136,256,528,1024,2080,4096,8256,16384,32896,65536,131328,262144,524800,1048576,2098176,4194304,8390656,16777216,33558528,67108864,134225920,268435456,536887296,1073741824,2147516416,4294967296,8590000128,17179869184,34359869440,68719476736,137439215616,274877906944,549756338176,1099511627776,2199024304128,4398046511104,8796095119360,17592186044416,35184376283136,70368744177664,140737496743936,281474976710656,562949970198528,1125899906842624,2251799847239680,4503599627370496,9007199321849856,18014398509481984,36028797153181696,72057594037927936,144115188344291328,288230376151711744,576460752840294400,1152921504606846976,2305843010287435776,4611686018427387904,9223372039002259456,18446744073709551616,36893488151714070528,73786976294838206464,147573952598266347520,295147905179352825856,590295810375885520896,1180591620717411303424,2361183241469182345216,4722366482869645213696,9444732965808009904128,18889465931478580854784,37778931863094600663040,75557863725914323419136,151115727452103524745216,302231454903657293676544,604462909807864343166976,1208925819614629174706176,2417851639230357861040128,4835703278458516698824704,9671406556919232420904960,19342813113834066795298816,38685626227672531637108736,77371252455336267181195264,154742504910681330455412736,309485009821345068724781056,618970019642707729635606528,1237940039285380274899124224,2475880078570795734170337280,4951760157141521099596496896,9903520314283112567937171456,19807040628566084398385987584,39614081257132309534260330496,79228162514264337593543950336,158456325028528956662064611328,316912650057057350374175801344,633825300114115263698305024000
mov $2,$0
mov $4,2
lpb $4
mov $0,$2
sub $4,1
add $0,$4
max $0,0
seq $0,56309 ; Number of reversible strings with n beads using exactly two different colors.
mov $3,$0
mov $5,$4
mul $5,$0
add $1,$5
lpe
min $2,1
mul $2,$3
sub $1,$2
mov $0,$1
| 98.809524 | 1,642 | 0.879518 |
0410efba974f26636d9009f25fd19600bdcf0fff | 383 | asm | Assembly | oeis/053/A053186.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/053/A053186.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/053/A053186.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A053186: Square excess of n: difference between n and largest square <= n.
; Submitted by Simon Strandgaard
; 0,0,1,2,0,1,2,3,4,0,1,2,3,4,5,6,0,1,2,3,4,5,6,7,8,0,1,2,3,4,5,6,7,8,9,10,0,1,2,3,4,5,6,7,8,9,10,11,12,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18
lpb $0
add $1,1
sub $0,$1
add $1,1
lpe
| 38.3 | 226 | 0.603133 |
9b67cc724bfa74f9d669df8fdeff857aa75955c1 | 579 | asm | Assembly | libsrc/psg/msx/set_psg_callee.asm | RC2014Z80/z88dk | e5b9447b970e5fae26544b6d8aa5957c98ba0e6a | [
"ClArtistic"
] | 8 | 2017-01-18T12:02:17.000Z | 2021-06-12T09:40:28.000Z | libsrc/psg/msx/set_psg_callee.asm | RC2014Z80/z88dk | e5b9447b970e5fae26544b6d8aa5957c98ba0e6a | [
"ClArtistic"
] | 1 | 2017-03-06T07:41:56.000Z | 2017-03-06T07:41:56.000Z | libsrc/psg/msx/set_psg_callee.asm | RC2014Z80/z88dk | e5b9447b970e5fae26544b6d8aa5957c98ba0e6a | [
"ClArtistic"
] | 3 | 2017-03-07T03:19:40.000Z | 2021-09-15T17:59:19.000Z | ;
; MSX specific routines
; by Stefano Bodrato, December 2007
;
; int msx_sound(int reg, int val);
;
; Play a sound by PSG
;
;
; $Id: set_psg_callee.asm,v 1.5 2016-06-10 21:13:58 dom Exp $
;
SECTION code_clib
PUBLIC set_psg_callee
PUBLIC _set_psg_callee
EXTERN msxbios
PUBLIC ASMDISP_SET_PSG_CALLEE
IF FORmsx
INCLUDE "msxbios.def"
ELSE
INCLUDE "svibios.def"
ENDIF
set_psg_callee:
_set_psg_callee:
pop hl
pop de
ex (sp),hl
.asmentry
ld a,l
ld ix, WRTPSG
jp msxbios
DEFC ASMDISP_SET_PSG_CALLEE = # asmentry - set_psg_callee
| 13.785714 | 61 | 0.692573 |
dd46052da29530c867c01b02b62caffb15f490d4 | 483 | asm | Assembly | programs/oeis/081/A081738.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/081/A081738.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/081/A081738.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A081738: Sum_{ 2 <= p <= n, p prime } p^2.
; 0,4,13,13,38,38,87,87,87,87,208,208,377,377,377,377,666,666,1027,1027,1027,1027,1556,1556,1556,1556,1556,1556,2397,2397,3358,3358,3358,3358,3358,3358,4727,4727,4727,4727,6408,6408,8257,8257,8257,8257,10466,10466
mov $2,$0
mov $4,$0
lpb $2
mov $0,$4
sub $2,1
sub $0,$2
mov $3,$0
add $3,1
cal $0,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
mul $0,2
mul $3,$0
pow $3,2
div $3,4
add $1,$3
lpe
| 25.421053 | 213 | 0.637681 |
c057e826dcc32b483f8be31b3fbdb56c6c9e5184 | 705 | asm | Assembly | MDPL/lab03/asm lab 3/lab1.asm | 3xlerman/labsbonch | 5255bb62e3cd8d707e38d7ffc0e7ef99f764773b | [
"MIT"
] | 3 | 2020-04-27T11:49:34.000Z | 2020-04-30T10:27:58.000Z | MDPL/lab03/asm lab 3/lab1.asm | 3xlerman/labsbonch | 5255bb62e3cd8d707e38d7ffc0e7ef99f764773b | [
"MIT"
] | null | null | null | MDPL/lab03/asm lab 3/lab1.asm | 3xlerman/labsbonch | 5255bb62e3cd8d707e38d7ffc0e7ef99f764773b | [
"MIT"
] | null | null | null |
; Assemble: nasm -f elf64 -l lab1.lst lab1.asm
; Link: gcc -m64 -o lab1 lab1.o
; Run: ./lab1
global main
extern printf
extern exit
section .data
test: db 1010101b
msg: db 'Hello World!',0Dh,0Ah,0
frm: db '%s',0
frm2: db 'summa = %lld',0x0D,0Ah,0
var1: dq 1234
var2: dq 99999
section .text
main:
push rbp
mov rdi, frm
mov rsi, msg
mov rax, 0
call printf
mov rax,[var1]
mov [var2],rax
add rax,[var2]
mov rdi, frm2
mov rsi, rax
mov rax, 0
call printf
mov rdi,0
call exit
pop rbp
ret
| 16.785714 | 49 | 0.476596 |
f5ad27e738c736f2ef70a6ad90a9a158aadd217f | 595 | asm | Assembly | oeis/016/A016197.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/016/A016197.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/016/A016197.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A016197: a(n) = 12^n - 11^n.
; Submitted by Jon Maiga
; 0,1,23,397,6095,87781,1214423,16344637,215622815,2801832661,35979939623,457696700077,5777672071535,72470493235141,904168630965623,11229773405170717,138934529031464255,1713164078241143221,21063415967393012423,258320908922208380557,3161009997514915112975,38604869965111541364901,470658689525596656480023,5729307023693999638873597,69647114527583233038729695,845615107006806407559468181,10255728343515560612755448423,124260557775959448295525513837,1504236687503013309913367626415
mov $1,11
pow $1,$0
mov $2,12
pow $2,$0
sub $2,$1
mov $0,$2
| 54.090909 | 477 | 0.862185 |
2327647d1c5c1044ba60ff4d6b94b7222e9b4628 | 7,452 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0xca_notsx.log_21829_973.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0xca_notsx.log_21829_973.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0xca_notsx.log_21829_973.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r14
push %r8
push %r9
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x261f, %r14
nop
nop
nop
inc %rax
mov $0x6162636465666768, %r8
movq %r8, (%r14)
nop
nop
nop
nop
add $29589, %r9
lea addresses_D_ht+0xf5b7, %rsi
lea addresses_D_ht+0x19e2f, %rdi
nop
add %r8, %r8
mov $71, %rcx
rep movsw
nop
nop
nop
inc %rdi
lea addresses_normal_ht+0x12b9f, %rsi
lea addresses_A_ht+0x4f7f, %rdi
nop
nop
nop
sub %rax, %rax
mov $49, %rcx
rep movsw
add $7455, %r8
lea addresses_WT_ht+0x1dc9f, %rsi
lea addresses_normal_ht+0xd57, %rdi
cmp $48340, %r11
mov $57, %rcx
rep movsb
nop
nop
nop
nop
nop
and %rcx, %rcx
lea addresses_WC_ht+0x4c3f, %r14
nop
nop
nop
nop
nop
add %rcx, %rcx
movw $0x6162, (%r14)
sub $29621, %rcx
lea addresses_UC_ht+0x1d09f, %r14
nop
and %rax, %rax
mov $0x6162636465666768, %rsi
movq %rsi, %xmm4
vmovups %ymm4, (%r14)
nop
nop
nop
nop
sub $5189, %r11
lea addresses_WT_ht+0x1239f, %r8
sub $55255, %r9
mov (%r8), %si
nop
add $50459, %rsi
lea addresses_A_ht+0x1399f, %r14
nop
xor %r11, %r11
mov (%r14), %r9d
nop
nop
xor %r8, %r8
lea addresses_D_ht+0x7f9f, %rdi
clflush (%rdi)
nop
nop
cmp %r14, %r14
mov $0x6162636465666768, %r8
movq %r8, %xmm0
and $0xffffffffffffffc0, %rdi
vmovntdq %ymm0, (%rdi)
nop
cmp %r14, %r14
lea addresses_WT_ht+0x9b9f, %r8
nop
nop
add %rax, %rax
and $0xffffffffffffffc0, %r8
movntdqa (%r8), %xmm4
vpextrq $0, %xmm4, %rcx
and $38596, %rdi
lea addresses_A_ht+0x83ff, %rsi
lea addresses_D_ht+0x1189f, %rdi
clflush (%rsi)
nop
nop
nop
cmp %r11, %r11
mov $96, %rcx
rep movsq
xor %rax, %rax
lea addresses_D_ht+0x299f, %rdi
add %r9, %r9
mov (%rdi), %r14w
nop
nop
nop
nop
nop
inc %r14
lea addresses_normal_ht+0x1329f, %rdi
nop
xor $10366, %rcx
mov (%rdi), %r14d
nop
xor %rcx, %rcx
lea addresses_UC_ht+0x10a0b, %r14
clflush (%r14)
nop
and %rcx, %rcx
movb $0x61, (%r14)
nop
and $44331, %r8
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r8
pop %r14
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r13
push %r15
push %r8
push %rcx
push %rsi
// Faulty Load
lea addresses_A+0xd39f, %r13
nop
nop
nop
nop
cmp %r15, %r15
mov (%r13), %ecx
lea oracles, %r11
and $0xff, %rcx
shlq $12, %rcx
mov (%r11,%rcx,1), %rcx
pop %rsi
pop %rcx
pop %r8
pop %r15
pop %r13
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': False, 'type': 'addresses_A'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': True, 'size': 4, 'congruent': 0, 'same': True, 'type': 'addresses_A'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 7, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 3, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM'}
{'src': {'congruent': 11, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 4, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'}
{'src': {'congruent': 6, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 3, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 4, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 8, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'}
{'src': {'NT': True, 'AVXalign': False, 'size': 2, 'congruent': 11, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 9, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 10, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'}
{'src': {'NT': True, 'AVXalign': False, 'size': 16, 'congruent': 9, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 5, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 6, 'same': True, 'type': 'addresses_D_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 3, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 8, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 2, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'}
{'35': 21829}
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
*/
| 37.447236 | 2,999 | 0.656334 |
6b528ae50f498feffb1e0e82aa58e3b3b060d005 | 421 | asm | Assembly | programs/oeis/048/A048775.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/048/A048775.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/048/A048775.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A048775: Number of (partially defined) monotone maps from intervals of 1..n to 1..n.
; 1,7,31,121,456,1709,6427,24301,92368,352705,1352066,5200287,20058286,77558745,300540179,1166803093,4537567632,17672631881,68923264390,269128937199,1052049481838,4116715363777,16123801841526,63205303218851,247959266474026,973469712824029,3824345300380192
mov $1,$0
mov $2,2
add $2,$0
add $1,$2
add $1,1
bin $1,$2
sub $1,$0
sub $1,2
| 35.083333 | 255 | 0.786223 |
0bbb9bdd2cbc5cb8b63c6794f00721d0b69fc86b | 1,122 | asm | Assembly | sdlib/sys/x64/save_regs.asm | dhasenan/SDC | 5e373ac5e762c1992fcb575e8769e8de4c329e15 | [
"MIT"
] | 79 | 2015-08-28T18:48:02.000Z | 2021-02-03T12:02:05.000Z | sdlib/sys/x64/save_regs.asm | dhasenan/SDC | 5e373ac5e762c1992fcb575e8769e8de4c329e15 | [
"MIT"
] | 63 | 2015-08-23T16:19:38.000Z | 2021-02-15T18:29:42.000Z | sdlib/sys/x64/save_regs.asm | dhasenan/SDC | 5e373ac5e762c1992fcb575e8769e8de4c329e15 | [
"MIT"
] | 29 | 2015-08-23T05:38:10.000Z | 2021-02-26T01:32:34.000Z | global __sdgc_push_registers
section .text
__sdgc_push_registers:
; We could actually make things faster by not pushing the base and stack pointers
; but this is not performance critical and need to be rock solid.
; For some reason, clang seems to use rbp, but gcc rbx (?) so we will do it
; the clang way and push rbx to the stack as a parameter.
push rbp
mov rbp, rsp
; Not using push to make sure I not messup with stack alignement.
; Also sub + mov is usually faster than push (not that it matter much here).
sub rsp, 48
; Register r12 to r15 are callee saved so can have live values.
; Other registers are trash or already saved on the stack.
mov [rbp - 8], rbx
mov [rbp - 16], r12
mov [rbp - 24], r13
mov [rbp - 32], r14
mov [rbp - 40], r15
; This method is passed a delegate. rdi contains the context as a first argument
; and rsi, the second argument is the function pointer. rdi do not need any special
; threatement as it is also the first argument when calling the delegate.
call rsi
; rsp and rbp are the only callee saved register we modified, no need to restore others.
mov rsp, rbp
pop rbp
ret
| 38.689655 | 88 | 0.742424 |
0018697c216f2e2051b61f04bfd20b87797e8b46 | 1,817 | asm | Assembly | programs/oeis/158/A158586.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/158/A158586.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/158/A158586.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A158586: a(n) = 34*n^2 + 1.
; 1,35,137,307,545,851,1225,1667,2177,2755,3401,4115,4897,5747,6665,7651,8705,9827,11017,12275,13601,14995,16457,17987,19585,21251,22985,24787,26657,28595,30601,32675,34817,37027,39305,41651,44065,46547,49097,51715,54401,57155,59977,62867,65825,68851,71945,75107,78337,81635,85001,88435,91937,95507,99145,102851,106625,110467,114377,118355,122401,126515,130697,134947,139265,143651,148105,152627,157217,161875,166601,171395,176257,181187,186185,191251,196385,201587,206857,212195,217601,223075,228617,234227,239905,245651,251465,257347,263297,269315,275401,281555,287777,294067,300425,306851,313345,319907,326537,333235,340001,346835,353737,360707,367745,374851,382025,389267,396577,403955,411401,418915,426497,434147,441865,449651,457505,465427,473417,481475,489601,497795,506057,514387,522785,531251,539785,548387,557057,565795,574601,583475,592417,601427,610505,619651,628865,638147,647497,656915,666401,675955,685577,695267,705025,714851,724745,734707,744737,754835,765001,775235,785537,795907,806345,816851,827425,838067,848777,859555,870401,881315,892297,903347,914465,925651,936905,948227,959617,971075,982601,994195,1005857,1017587,1029385,1041251,1053185,1065187,1077257,1089395,1101601,1113875,1126217,1138627,1151105,1163651,1176265,1188947,1201697,1214515,1227401,1240355,1253377,1266467,1279625,1292851,1306145,1319507,1332937,1346435,1360001,1373635,1387337,1401107,1414945,1428851,1442825,1456867,1470977,1485155,1499401,1513715,1528097,1542547,1557065,1571651,1586305,1601027,1615817,1630675,1645601,1660595,1675657,1690787,1705985,1721251,1736585,1751987,1767457,1782995,1798601,1814275,1830017,1845827,1861705,1877651,1893665,1909747,1925897,1942115,1958401,1974755,1991177,2007667,2024225,2040851,2057545,2074307,2091137,2108035
mov $1,$0
pow $1,2
mul $1,34
add $1,1
| 227.125 | 1,747 | 0.842598 |
0770dff6a13378eb8b437f4c5ff6fd2b8e982b07 | 8,426 | asm | Assembly | Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca_notsx.log_21829_1988.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca_notsx.log_21829_1988.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca_notsx.log_21829_1988.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 %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0x16a30, %rbp
nop
nop
nop
nop
nop
sub %r8, %r8
movw $0x6162, (%rbp)
nop
nop
nop
nop
and %rbx, %rbx
lea addresses_D_ht+0xcdc8, %rsi
lea addresses_WT_ht+0x1367f, %rdi
nop
nop
nop
nop
sub $29550, %r13
mov $112, %rcx
rep movsb
and $31119, %rsi
lea addresses_UC_ht+0xe4c8, %rsi
lea addresses_WT_ht+0xf52e, %rdi
nop
nop
and %r12, %r12
mov $10, %rcx
rep movsw
nop
nop
nop
nop
nop
dec %r8
lea addresses_normal_ht+0x5bc8, %r12
nop
and $16114, %rsi
movups (%r12), %xmm0
vpextrq $0, %xmm0, %r13
nop
nop
nop
sub %rcx, %rcx
lea addresses_normal_ht+0x7e68, %r12
nop
nop
sub %r8, %r8
mov $0x6162636465666768, %r13
movq %r13, %xmm6
movups %xmm6, (%r12)
nop
cmp %rdi, %rdi
lea addresses_D_ht+0x196c8, %rsi
dec %rbx
vmovups (%rsi), %ymm0
vextracti128 $0, %ymm0, %xmm0
vpextrq $0, %xmm0, %rdi
nop
nop
nop
nop
nop
xor $10714, %rsi
lea addresses_D_ht+0x185e8, %rsi
lea addresses_D_ht+0xc768, %rdi
clflush (%rdi)
nop
nop
nop
nop
dec %r13
mov $29, %rcx
rep movsw
nop
nop
nop
nop
nop
xor $12590, %rcx
lea addresses_WC_ht+0x17dc8, %rsi
lea addresses_WC_ht+0x1d608, %rdi
nop
nop
nop
nop
nop
and %rbx, %rbx
mov $79, %rcx
rep movsb
sub $57918, %r12
lea addresses_WC_ht+0x5548, %rcx
nop
nop
nop
nop
nop
and %r12, %r12
mov $0x6162636465666768, %r8
movq %r8, %xmm2
vmovups %ymm2, (%rcx)
nop
nop
and $40344, %r8
lea addresses_D_ht+0x124a2, %rcx
nop
nop
cmp %rbp, %rbp
movw $0x6162, (%rcx)
nop
add $21275, %rdi
lea addresses_WT_ht+0xc7b8, %rsi
nop
nop
nop
and $28178, %rcx
mov $0x6162636465666768, %r12
movq %r12, %xmm2
movups %xmm2, (%rsi)
nop
nop
nop
nop
nop
inc %r12
lea addresses_A_ht+0x5bc8, %rbp
nop
nop
nop
nop
add %rdi, %rdi
mov (%rbp), %r12d
and %r12, %r12
lea addresses_UC_ht+0x1efa8, %rbp
nop
nop
nop
nop
nop
cmp $40987, %rbx
mov (%rbp), %ecx
nop
nop
nop
cmp %rdi, %rdi
lea addresses_A_ht+0x60c8, %rbp
nop
nop
nop
nop
nop
cmp %rdi, %rdi
mov (%rbp), %r8
nop
nop
sub %r12, %r12
lea addresses_D_ht+0x16108, %rsi
lea addresses_WC_ht+0x1dd64, %rdi
add %r13, %r13
mov $18, %rcx
rep movsq
nop
sub $37216, %r12
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r8
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r15
push %r8
push %r9
push %rax
push %rbp
push %rbx
push %rcx
// Load
lea addresses_US+0x16288, %r8
nop
nop
nop
nop
xor $3401, %rbp
movb (%r8), %bl
nop
nop
sub $41844, %rbx
// Store
lea addresses_normal+0x197c8, %rbp
and %rax, %rax
mov $0x5152535455565758, %rcx
movq %rcx, %xmm4
vmovups %ymm4, (%rbp)
xor %r9, %r9
// Faulty Load
lea addresses_normal+0x197c8, %rcx
nop
nop
and %rax, %rax
vmovups (%rcx), %ymm1
vextracti128 $1, %ymm1, %xmm1
vpextrq $0, %xmm1, %r9
lea oracles, %rbp
and $0xff, %r9
shlq $12, %r9
mov (%rbp,%r9,1), %r9
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r9
pop %r8
pop %r15
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_US', 'NT': False, 'AVXalign': True, 'size': 1, 'congruent': 6}}
{'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_normal', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_normal', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 3}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 9, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_WT_ht'}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 4, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_WT_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 10}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 3}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 7}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 5, 'type': 'addresses_D_ht'}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 9, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 6, 'type': 'addresses_WC_ht'}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 7}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 2}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': True, 'size': 4, 'congruent': 7}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 5}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 7}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 4, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_WC_ht'}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 32.038023 | 2,999 | 0.656421 |
822ced45b711ae0390684a99158ec2acb766977d | 2,252 | asm | Assembly | device/vga.asm | Qiu-Weidong/Qiux | 2a6b6f290ed732d305d0635ae15b401243ab2e1f | [
"MIT"
] | null | null | null | device/vga.asm | Qiu-Weidong/Qiux | 2a6b6f290ed732d305d0635ae15b401243ab2e1f | [
"MIT"
] | null | null | null | device/vga.asm | Qiu-Weidong/Qiux | 2a6b6f290ed732d305d0635ae15b401243ab2e1f | [
"MIT"
] | null | null | null | ; vga相关控制函数
; 端口定义
CRTC_ADDR_REG equ 0x3D4 ;/* CRT Controller Registers - Addr Register */
CRTC_DATA_REG equ 0x3D5 ;/* CRT Controller Registers - Data Register */
START_ADDR_H equ 0xC ;/* reg index of video mem start addr (MSB) */
START_ADDR_L equ 0xD ;/* reg index of video mem start addr (LSB) */
CURSOR_H equ 0xE ;/* reg index of cursor position (MSB) */
CURSOR_L equ 0xF ;/* reg index of cursor position (LSB) */
V_MEM_BASE equ 0xB8000
[global set_cursor ]
[global set_video_start_addr ]
[global vga_flush ]
set_cursor:
pushf
; outb(CRTC_ADDR_REG, CURSOR_H);
mov al, CURSOR_H
mov dx, CRTC_ADDR_REG
out dx, al
; outb(CRTC_DATA_REG, (position >> 8) & 0xff);
mov eax, [esp + 8]
shr eax, 8
mov dx, CRTC_DATA_REG
out dx, al
; outb(CRTC_ADDR_REG, CURSOR_L);
mov al, CURSOR_L
mov dx, CRTC_ADDR_REG
out dx, al
; outb(CRTC_DATA_REG, position & 0xff);
mov eax, [esp + 8]
mov dx, CRTC_DATA_REG
out dx, al
popf
ret
set_video_start_addr:
pushf
; outb(CRTC_ADDR_REG, START_ADDR_H);
mov al, START_ADDR_H
mov dx, CRTC_ADDR_REG
out dx, al
; outb(CRTC_DATA_REG, ((V_MEM_BASE + addr) >> 8) & 0xff);
mov eax, [esp + 8]
add eax, V_MEM_BASE
mov ecx, eax
shr eax, 8
mov dx, CRTC_DATA_REG
out dx, al
; outb(CRTC_ADDR_REG, START_ADDR_L);
mov al, START_ADDR_L
mov dx, CRTC_ADDR_REG
out dx, al
; outb(CRTC_DATA_REG, (V_MEM_BASE + addr) & 0xff);
mov eax, ecx
mov dx, CRTC_DATA_REG
out dx, al
popf
ret
vga_flush:
pushf
mov al, CURSOR_L
mov dx, CRTC_ADDR_REG
out dx, al
mov eax, [esp + 8] ; position
mov dx, CRTC_DATA_REG
out dx, al
mov al, CURSOR_H
mov dx, CRTC_ADDR_REG
out dx, al
mov eax, [esp + 8]
shr eax, 8
mov dx, CRTC_DATA_REG
out dx, al
mov al, START_ADDR_L
mov dx, CRTC_ADDR_REG
out dx, al
mov eax, [esp + 12]
add eax, V_MEM_BASE
mov dx, CRTC_DATA_REG
out dx, al
mov al, START_ADDR_H
mov dx, CRTC_ADDR_REG
out dx, al
mov eax, [esp + 12]
add eax, V_MEM_BASE
shr eax, 8
mov dx, CRTC_DATA_REG
out dx, al
popf
ret
| 19.929204 | 73 | 0.615009 |
141491415f0987dbd0d12065ba00eb6f33a58aa8 | 1,243 | asm | Assembly | reference_asm/menu_choose_name.asm | tashiww/maten_tools | efaf43958639edfdcd342615f4c23ccba35d80ce | [
"MIT"
] | 1 | 2021-05-14T19:14:38.000Z | 2021-05-14T19:14:38.000Z | reference_asm/menu_choose_name.asm | tashiww/maten_tools | efaf43958639edfdcd342615f4c23ccba35d80ce | [
"MIT"
] | null | null | null | reference_asm/menu_choose_name.asm | tashiww/maten_tools | efaf43958639edfdcd342615f4c23ccba35d80ce | [
"MIT"
] | null | null | null | ; ########################################################################################
; # Generated by the active disassembly feature of the Exodus emulation platform
; #
; # Creation Date: 2021-1-2 18:25:04
; # Analysis Region: 0x00003F88 - 0x0000403C
; ########################################################################################
org $00003F88
MOVEQ #1, D0
MOVEQ #1, D1
MOVEQ #$00000026, D2
MOVEQ #$0000001A, D3
MOVE.w #$0043, D4
BSR.w *+$F340
MOVE.w D0, $1E(A1)
MOVEQ #$0000001D, D0
MOVEQ #$00000016, D1
MOVEQ #8, D2
MOVEQ #4, D3
MOVEQ #3, D4
BSR.w *+$F044
MOVEQ #4, D0
MOVEQ #3, D1
BSR.w *+$F5EE
BSR.w *+$F674
NOP
NOP
NOP
NOP
NOP
NOP
MOVEQ #$0000001C, D0
MOVEQ #3, D1
BSR.w *+$F5DE
BSR.w *+$F65C
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
CLR.w $14(A1)
CLR.w $16(A1)
CLR.w $18(A1)
MOVE.w #3, $1A(A1)
MOVE.w #3, $1C(A1)
BSR.w *+$D868
MOVEQ #$0000001E, D0
MOVEQ #$00000018, D1
LEA $00004428, A0
BSR.w *+$F61A
MOVEA.l A1, A0
BSR.w *+$F614
MOVE.w $1A(A1), D0
MOVE.w $1C(A1), D1
MOVE.w $18(A1), D2
BTST.l #4, D2
BNE.b loc_0000402E
MOVE.w #$E5A7, D2
BRA.b loc_00004032
loc_0000402E:
MOVE.w #$E52F, D2
loc_00004032:
MOVEA.w #$C000, A0
BSR.w *+$DDB6
TRAP #5
| 16.797297 | 90 | 0.533387 |
c8d11b484ea583a57a4934f904de8a732c16ed50 | 640 | asm | Assembly | payloads/x64/src/single/calc_hash.asm | kurobeats/MS17-010 | 0d825a929df917b370995bbbb4a04a41700797e0 | [
"Apache-2.0"
] | 2 | 2017-06-07T03:17:58.000Z | 2021-06-09T00:39:11.000Z | payloads/x64/src/single/calc_hash.asm | jeperez/MS17-010 | 641afc89e7bd16b6ba10b03d5f3da188bff95345 | [
"Apache-2.0"
] | null | null | null | payloads/x64/src/single/calc_hash.asm | jeperez/MS17-010 | 641afc89e7bd16b6ba10b03d5f3da188bff95345 | [
"Apache-2.0"
] | 6 | 2017-07-22T13:21:38.000Z | 2021-03-06T20:40:29.000Z | ;
; Windows x64 Calculate Hash
;
; Arguments: RSI = string to hash
; Clobbers: RAX, RSI, r9
; Return: r9d = hash
;
calc_hash:
xor r9, r9
_calc_hash_loop:
xor eax, eax
lodsb ; Read in the next byte of the ASCII function name
ror r9d, 13 ; Rotate right our hash value
cmp al, 'a'
jl _calc_hash_not_lowercase
sub al, 0x20 ; If so normalise to uppercase
_calc_hash_not_lowercase:
add r9d, eax ; Add the next byte of the name
cmp al, ah ; Compare AL to AH (\0)
jne _calc_hash_loop
ret
| 25.6 | 90 | 0.553125 |
6b4c3b69aeb4a2a2ecbb84697610bb1cbca62511 | 1,029 | asm | Assembly | libsrc/_DEVELOPMENT/math/integer/z80_zxn/l_z80_zxn_mulu_16_16x16.asm | Toysoft/z88dk | f930bef9ac4feeec91a07303b79ddd9071131a24 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/math/integer/z80_zxn/l_z80_zxn_mulu_16_16x16.asm | Toysoft/z88dk | f930bef9ac4feeec91a07303b79ddd9071131a24 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/math/integer/z80_zxn/l_z80_zxn_mulu_16_16x16.asm | Toysoft/z88dk | f930bef9ac4feeec91a07303b79ddd9071131a24 | [
"ClArtistic"
] | 1 | 2019-12-03T23:28:20.000Z | 2019-12-03T23:28:20.000Z | ; 2017 dom / feilipu
; 2017 aralbrec - slightly faster
INCLUDE "config_private.inc"
SECTION code_clib
SECTION code_math
PUBLIC l_z80_zxn_mulu_16_16x16
l_z80_zxn_mulu_16_16x16:
; multiplication of two 16-bit numbers into a 16-bit product
;
; enter : de = 16-bit multiplicand
; hl = 16-bit multiplicand
;
; exit : hl = 16-bit product
; carry reset
;
; uses : af, bc, de, hl
ld a,d ; a = xh
ld d,h ; d = yh
ld h,a ; h = xh
ld c,e ; c = xl
ld b,l ; b = yl
mul de ; yh * yl
ex de,hl
mul de ; xh * yl
add hl,de ; add cross products
ld e,c
ld d,b
mul de ; yl * xl
ld a,l ; cross products lsb
add a,d ; add to msb final
ld h,a
ld l,e ; hl = final
; 83 cycles, 19 bytes
xor a
ret
| 23.386364 | 63 | 0.440233 |
547188dd0724dc620bf90cf6bd66f39eb76d5238 | 3,120 | asm | Assembly | dino/lcs/123p/B2.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 | dino/lcs/123p/B2.asm | zengfr/arcade_game_romhacking_sourcecode_top_secret_data | a4a0c86c200241494b3f1834cd0aef8dc02f7683 | [
"Apache-2.0"
] | null | null | null | dino/lcs/123p/B2.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
00042A move.l D1, (A0)+
00042C dbra D0, $42a
004D94 move.l D1, (A1)+
004D96 dbra D0, $4d94
01075A move.b D0, ($b2,A3)
01075E move.b ($5e,A2), ($e9,A3)
0116A8 move.b D0, ($b2,A3)
0116AC move.b ($5e,A2), ($e9,A3)
011DC0 move.b D0, ($b2,A3)
011DC4 move.b ($5e,A2), ($e9,A3)
012604 move.b D0, ($b2,A3)
012608 move.b ($5e,A6), ($e9,A3)
0191B4 tst.b ($b2,A6)
0191B8 beq $191c4 [123p+ B2]
019408 move.b D0, ($b2,A6)
01940C move.b D0, ($bc,A6)
01943E clr.b ($b2,A6) [123p+ AE]
019442 bra $19122
019470 addq.b #1, ($b2,A6)
019474 clr.w ($70,A6) [123p+ B2]
0194B8 cmpi.b #$4, ($b2,A6) [123p+ AE]
0194BE bne $194d0 [123p+ B2]
0194C8 move.b D0, ($b2,A6)
0194CC move.b D0, ($ae,A6)
0194E6 move.b ($b2,A6), D3
0194EA cmpi.b #$4, D3 [123p+ B2]
019562 clr.b ($b2,A6) [123p+ B3]
019566 bra $19122 [123p+ B2]
0196D6 move.b D0, ($b2,A6)
0196DA move.b D0, ($25,A6)
01975C move.b D0, ($b2,A6)
019760 move.w D0, ($16,A6)
01A220 move.b D0, ($b2,A6)
01A224 bra $1a2f2
01AA08 move.b D0, ($b2,A6)
01AA0C move.b D0, ($50,A6)
01AA92 move.b D0, ($b2,A6)
01AA96 move.b D0, ($50,A6)
01AB10 move.b D0, ($b2,A6)
01AB14 move.w D0, ($b4,A6)
01ABF2 move.b D0, ($b2,A6)
01ABF6 move.b D0, ($25,A6)
01B58E move.b D0, ($b2,A6)
01B592 move.b ($59,A6), D3
01B6FE move.b D0, ($b2,A6)
01B702 move.b #$15, ($c8,A6)
0AAACA move.l (A0), D2
0AAACC move.w D0, (A0) [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
0AAACE move.w D0, ($2,A0)
0AAAD2 cmp.l (A0), D0
0AAAD4 bne $aaafc
0AAAD8 move.l D2, (A0)+
0AAADA cmpa.l A0, A1 [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
0AAAE6 move.l (A0), D2
0AAAE8 move.w D0, (A0) [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
0AAAF4 move.l D2, (A0)+
0AAAF6 cmpa.l A0, A1 [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
copyright zengfr site:http://github.com/zengfr/romhack
| 50.322581 | 350 | 0.624679 |
a3cf81c7e1ba7108e7f2d21b4701199ecf28021a | 10,797 | asm | Assembly | unused/develop/obj/spritesheet_12_tiles.asm | pau-tomas/gbvm | c2c7a93a42f6e3168b013c93c4a3bd1c9e8b989b | [
"MIT"
] | 33 | 2020-12-27T11:53:23.000Z | 2022-02-19T23:05:12.000Z | unused/develop/obj/spritesheet_12_tiles.asm | pau-tomas/gbvm | c2c7a93a42f6e3168b013c93c4a3bd1c9e8b989b | [
"MIT"
] | 2 | 2020-12-10T16:53:53.000Z | 2022-01-31T21:42:01.000Z | unused/develop/obj/spritesheet_12_tiles.asm | pau-tomas/gbvm | c2c7a93a42f6e3168b013c93c4a3bd1c9e8b989b | [
"MIT"
] | 6 | 2021-04-18T08:09:16.000Z | 2022-01-31T21:52:24.000Z | ;--------------------------------------------------------
; File Created by SDCC : free open source ANSI-C Compiler
; Version 4.1.4 #12246 (Mac OS X x86_64)
;--------------------------------------------------------
.module spritesheet_12_tiles
.optsdcc -mgbz80
;--------------------------------------------------------
; Public variables in this module
;--------------------------------------------------------
.globl _spritesheet_12_tiles
.globl ___bank_spritesheet_12_tiles
;--------------------------------------------------------
; special function registers
;--------------------------------------------------------
;--------------------------------------------------------
; ram data
;--------------------------------------------------------
.area _DATA
;--------------------------------------------------------
; ram data
;--------------------------------------------------------
.area _INITIALIZED
;--------------------------------------------------------
; absolute external ram data
;--------------------------------------------------------
.area _DABS (ABS)
;--------------------------------------------------------
; global & static initialisations
;--------------------------------------------------------
.area _HOME
.area _GSINIT
.area _GSFINAL
.area _GSINIT
;--------------------------------------------------------
; Home
;--------------------------------------------------------
.area _HOME
.area _HOME
;--------------------------------------------------------
; code
;--------------------------------------------------------
.area _CODE_255
.area _CODE_255
___bank_spritesheet_12_tiles = 0x00ff
_spritesheet_12_tiles:
.dw #0x0022
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x03 ; 3
.db #0x03 ; 3
.db #0x0c ; 12
.db #0x0f ; 15
.db #0x14 ; 20
.db #0x1b ; 27
.db #0x24 ; 36
.db #0x3f ; 63
.db #0x29 ; 41
.db #0x3e ; 62
.db #0x33 ; 51 '3'
.db #0x3d ; 61
.db #0x2f ; 47
.db #0x3f ; 63
.db #0x27 ; 39
.db #0x3d ; 61
.db #0x37 ; 55 '7'
.db #0x2c ; 44
.db #0x33 ; 51 '3'
.db #0x2e ; 46
.db #0x7d ; 125
.db #0x43 ; 67 'C'
.db #0xd4 ; 212
.db #0xab ; 171
.db #0x41 ; 65 'A'
.db #0x7f ; 127
.db #0x3f ; 63
.db #0x3f ; 63
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0xf8 ; 248
.db #0xf8 ; 248
.db #0x34 ; 52 '4'
.db #0xcc ; 204
.db #0x0a ; 10
.db #0xf6 ; 246
.db #0xc5 ; 197
.db #0x7b ; 123
.db #0xbf ; 191
.db #0xff ; 255
.db #0x7e ; 126
.db #0x82 ; 130
.db #0xfe ; 254
.db #0x6e ; 110 'n'
.db #0xfe ; 254
.db #0x02 ; 2
.db #0xb6 ; 182
.db #0x6e ; 110 'n'
.db #0xb6 ; 182
.db #0x6e ; 110 'n'
.db #0xfe ; 254
.db #0x02 ; 2
.db #0xce ; 206
.db #0xb6 ; 182
.db #0xf9 ; 249
.db #0xff ; 255
.db #0x0f ; 15
.db #0x0f ; 15
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0xf8 ; 248
.db #0xf8 ; 248
.db #0x34 ; 52 '4'
.db #0xcc ; 204
.db #0x0a ; 10
.db #0xf6 ; 246
.db #0xc5 ; 197
.db #0x7b ; 123
.db #0xbf ; 191
.db #0xff ; 255
.db #0x7e ; 126
.db #0x82 ; 130
.db #0xfe ; 254
.db #0x6e ; 110 'n'
.db #0xfe ; 254
.db #0x02 ; 2
.db #0x92 ; 146
.db #0x6e ; 110 'n'
.db #0xfe ; 254
.db #0x6e ; 110 'n'
.db #0xfe ; 254
.db #0x02 ; 2
.db #0xce ; 206
.db #0xb6 ; 182
.db #0xf9 ; 249
.db #0xff ; 255
.db #0x0f ; 15
.db #0x0f ; 15
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x07 ; 7
.db #0x07 ; 7
.db #0x08 ; 8
.db #0x0f ; 15
.db #0x16 ; 22
.db #0x19 ; 25
.db #0x21 ; 33
.db #0x3e ; 62
.db #0x60 ; 96
.db #0x7f ; 127
.db #0xe0 ; 224
.db #0xff ; 255
.db #0x20 ; 32
.db #0x3f ; 63
.db #0x29 ; 41
.db #0x36 ; 54 '6'
.db #0x29 ; 41
.db #0x36 ; 54 '6'
.db #0x29 ; 41
.db #0x36 ; 54 '6'
.db #0x55 ; 85 'U'
.db #0x6a ; 106 'j'
.db #0x95 ; 149
.db #0xea ; 234
.db #0x7e ; 126
.db #0x7d ; 125
.db #0x03 ; 3
.db #0x03 ; 3
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0xe0 ; 224
.db #0xe0 ; 224
.db #0x10 ; 16
.db #0xf0 ; 240
.db #0x68 ; 104 'h'
.db #0x98 ; 152
.db #0x84 ; 132
.db #0x7c ; 124
.db #0x04 ; 4
.db #0xfc ; 252
.db #0x04 ; 4
.db #0xfc ; 252
.db #0x04 ; 4
.db #0xfc ; 252
.db #0x24 ; 36
.db #0xdc ; 220
.db #0x24 ; 36
.db #0xdc ; 220
.db #0x24 ; 36
.db #0xdc ; 220
.db #0xaa ; 170
.db #0x56 ; 86 'V'
.db #0xa9 ; 169
.db #0xd7 ; 215
.db #0x9e ; 158
.db #0xfe ; 254
.db #0x60 ; 96
.db #0x60 ; 96
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x0e ; 14
.db #0x09 ; 9
.db #0x1e ; 30
.db #0x11 ; 17
.db #0x2c ; 44
.db #0x33 ; 51 '3'
.db #0x5d ; 93
.db #0x63 ; 99 'c'
.db #0x3f ; 63
.db #0x31 ; 49 '1'
.db #0x4e ; 78 'N'
.db #0x7f ; 127
.db #0x74 ; 116 't'
.db #0x4f ; 79 'O'
.db #0x5c ; 92
.db #0x67 ; 103 'g'
.db #0x3f ; 63
.db #0x3f ; 63
.db #0x1f ; 31
.db #0x1f ; 31
.db #0x3f ; 63
.db #0x3f ; 63
.db #0x3e ; 62
.db #0x21 ; 33
.db #0x3f ; 63
.db #0x3f ; 63
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0xb0 ; 176
.db #0xd0 ; 208
.db #0x68 ; 104 'h'
.db #0xf8 ; 248
.db #0x08 ; 8
.db #0xf8 ; 248
.db #0x24 ; 36
.db #0xdc ; 220
.db #0x66 ; 102 'f'
.db #0x9e ; 158
.db #0x65 ; 101 'e'
.db #0x9f ; 159
.db #0xf7 ; 247
.db #0x0d ; 13
.db #0xf7 ; 247
.db #0x0d ; 13
.db #0xfe ; 254
.db #0x3e ; 62
.db #0xfc ; 252
.db #0xfc ; 252
.db #0xfc ; 252
.db #0xfc ; 252
.db #0xbe ; 190
.db #0xbe ; 190
.db #0xaf ; 175
.db #0xb1 ; 177
.db #0xbf ; 191
.db #0xbf ; 191
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x03 ; 3
.db #0x03 ; 3
.db #0x0e ; 14
.db #0x0d ; 13
.db #0x1e ; 30
.db #0x11 ; 17
.db #0x2c ; 44
.db #0x33 ; 51 '3'
.db #0x3d ; 61
.db #0x3b ; 59
.db #0x27 ; 39
.db #0x3f ; 63
.db #0x3b ; 59
.db #0x27 ; 39
.db #0x3f ; 63
.db #0x23 ; 35
.db #0x1f ; 31
.db #0x1e ; 30
.db #0x2f ; 47
.db #0x3f ; 63
.db #0x27 ; 39
.db #0x3f ; 63
.db #0x13 ; 19
.db #0x1f ; 31
.db #0x0e ; 14
.db #0x0f ; 15
.db #0x07 ; 7
.db #0x07 ; 7
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0xb0 ; 176
.db #0xd0 ; 208
.db #0x68 ; 104 'h'
.db #0xf8 ; 248
.db #0x08 ; 8
.db #0xf8 ; 248
.db #0x94 ; 148
.db #0xec ; 236
.db #0x36 ; 54 '6'
.db #0xce ; 206
.db #0x35 ; 53 '5'
.db #0xcf ; 207
.db #0x7f ; 127
.db #0x83 ; 131
.db #0x7f ; 127
.db #0x81 ; 129
.db #0xfe ; 254
.db #0x1e ; 30
.db #0xfe ; 254
.db #0xfe ; 254
.db #0xf8 ; 248
.db #0xf8 ; 248
.db #0x70 ; 112 'p'
.db #0xb0 ; 176
.db #0x78 ; 120 'x'
.db #0x88 ; 136
.db #0xf8 ; 248
.db #0xf8 ; 248
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x0f ; 15
.db #0x0f ; 15
.db #0x1e ; 30
.db #0x11 ; 17
.db #0x3e ; 62
.db #0x21 ; 33
.db #0x6d ; 109 'm'
.db #0x53 ; 83 'S'
.db #0x72 ; 114 'r'
.db #0x7f ; 127
.db #0xce ; 206
.db #0xbf ; 191
.db #0xf4 ; 244
.db #0x8f ; 143
.db #0xfd ; 253
.db #0x8e ; 142
.db #0x77 ; 119 'w'
.db #0x78 ; 120 'x'
.db #0x3f ; 63
.db #0x3f ; 63
.db #0x3f ; 63
.db #0x3f ; 63
.db #0x6e ; 110 'n'
.db #0x76 ; 118 'v'
.db #0x4f ; 79 'O'
.db #0x71 ; 113 'q'
.db #0x7f ; 127
.db #0x7f ; 127
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0xb0 ; 176
.db #0xd0 ; 208
.db #0x68 ; 104 'h'
.db #0xf8 ; 248
.db #0x0c ; 12
.db #0xfc ; 252
.db #0x16 ; 22
.db #0xee ; 238
.db #0x37 ; 55 '7'
.db #0xcd ; 205
.db #0xb5 ; 181
.db #0x4f ; 79 'O'
.db #0xff ; 255
.db #0x03 ; 3
.db #0xfe ; 254
.db #0x0e ; 14
.db #0xff ; 255
.db #0x1f ; 31
.db #0xff ; 255
.db #0xf9 ; 249
.db #0xa6 ; 166
.db #0xba ; 186
.db #0x1c ; 28
.db #0x1c ; 28
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x07 ; 7
.db #0x07 ; 7
.db #0x0f ; 15
.db #0x0c ; 12
.db #0x0e ; 14
.db #0x09 ; 9
.db #0x1d ; 29
.db #0x13 ; 19
.db #0x1e ; 30
.db #0x11 ; 17
.db #0x37 ; 55 '7'
.db #0x39 ; 57 '9'
.db #0x4a ; 74 'J'
.db #0x7f ; 127
.db #0xe5 ; 229
.db #0xfe ; 254
.db #0xf3 ; 243
.db #0xfe ; 254
.db #0xbf ; 191
.db #0xff ; 255
.db #0xbf ; 191
.db #0xff ; 255
.db #0xf8 ; 248
.db #0x98 ; 152
.db #0x7c ; 124
.db #0x44 ; 68 'D'
.db #0x3c ; 60
.db #0x3c ; 60
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0xb0 ; 176
.db #0xd0 ; 208
.db #0xe8 ; 232
.db #0x78 ; 120 'x'
.db #0x08 ; 8
.db #0xf8 ; 248
.db #0x14 ; 20
.db #0xec ; 236
.db #0xb4 ; 180
.db #0xcc ; 204
.db #0xdc ; 220
.db #0xe4 ; 228
.db #0x7c ; 124
.db #0xa4 ; 164
.db #0xfa ; 250
.db #0x26 ; 38
.db #0xde ; 222
.db #0x62 ; 98 'b'
.db #0xbe ; 190
.db #0xc2 ; 194
.db #0xfe ; 254
.db #0xfe ; 254
.db #0xf8 ; 248
.db #0xf8 ; 248
.db #0x9c ; 156
.db #0xe4 ; 228
.db #0xfc ; 252
.db #0xfc ; 252
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x7f ; 127
.db #0x7f ; 127
.db #0xf8 ; 248
.db #0x97 ; 151
.db #0xf8 ; 248
.db #0x97 ; 151
.db #0xf3 ; 243
.db #0x9f ; 159
.db #0x7c ; 124
.db #0x7f ; 127
.db #0xec ; 236
.db #0xf3 ; 243
.db #0xff ; 255
.db #0xe0 ; 224
.db #0xbf ; 191
.db #0xf0 ; 240
.db #0xbf ; 191
.db #0xff ; 255
.db #0xfe ; 254
.db #0x9e ; 158
.db #0x7c ; 124
.db #0x44 ; 68 'D'
.db #0x3c ; 60
.db #0x3c ; 60
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0xbf ; 191
.db #0xdf ; 223
.db #0x6f ; 111 'o'
.db #0xfd ; 253
.db #0x17 ; 23
.db #0xed ; 237
.db #0x36 ; 54 '6'
.db #0xce ; 206
.db #0xb4 ; 180
.db #0x4c ; 76 'L'
.db #0xfe ; 254
.db #0x02 ; 2
.db #0xfe ; 254
.db #0x0e ; 14
.db #0xff ; 255
.db #0x1f ; 31
.db #0xff ; 255
.db #0xf9 ; 249
.db #0x66 ; 102 'f'
.db #0x7a ; 122 'z'
.db #0x1c ; 28
.db #0x1c ; 28
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x07 ; 7
.db #0x07 ; 7
.db #0x0f ; 15
.db #0x0f ; 15
.db #0x1f ; 31
.db #0x1f ; 31
.db #0x23 ; 35
.db #0x3f ; 63
.db #0x60 ; 96
.db #0x7f ; 127
.db #0xe3 ; 227
.db #0xbc ; 188
.db #0xf3 ; 243
.db #0xbc ; 188
.db #0xe7 ; 231
.db #0xf8 ; 248
.db #0x5f ; 95
.db #0x60 ; 96
.db #0x7f ; 127
.db #0x7e ; 126
.db #0x67 ; 103 'g'
.db #0x7f ; 127
.db #0x3b ; 59
.db #0x27 ; 39
.db #0x3a ; 58
.db #0x26 ; 38
.db #0x1e ; 30
.db #0x12 ; 18
.db #0x1e ; 30
.db #0x1e ; 30
.db #0x00 ; 0
.db #0x00 ; 0
.db #0xf0 ; 240
.db #0xf0 ; 240
.db #0xff ; 255
.db #0xff ; 255
.db #0xff ; 255
.db #0xf9 ; 249
.db #0xdb ; 219
.db #0xfd ; 253
.db #0x0e ; 14
.db #0xfe ; 254
.db #0x0c ; 12
.db #0xfc ; 252
.db #0x0c ; 12
.db #0xfc ; 252
.db #0x04 ; 4
.db #0xfc ; 252
.db #0x06 ; 6
.db #0xfe ; 254
.db #0x82 ; 130
.db #0x7e ; 126
.db #0xba ; 186
.db #0xfe ; 254
.db #0xfe ; 254
.db #0xfe ; 254
.db #0x24 ; 36
.db #0x3c ; 60
.db #0x3c ; 60
.db #0x3c ; 60
.db #0x00 ; 0
.db #0x00 ; 0
.area _INITIALIZER
.area _CABS (ABS)
| 18.176768 | 57 | 0.468927 |
ae4ee343a448a15fcd8dfa0cb69d256c66e92e81 | 254 | asm | Assembly | russian/russian.asm | AbderrhmanAbdellatif/SysPro | fa6ee66a63a62043c5d114bf80efec397fb1a13c | [
"MIT"
] | null | null | null | russian/russian.asm | AbderrhmanAbdellatif/SysPro | fa6ee66a63a62043c5d114bf80efec397fb1a13c | [
"MIT"
] | null | null | null | russian/russian.asm | AbderrhmanAbdellatif/SysPro | fa6ee66a63a62043c5d114bf80efec397fb1a13c | [
"MIT"
] | null | null | null | segment .text
global russian
russian:
push ebp
mov ebp,esp
mov ecx,[ebp+8]
mov edx,[ebp+12]
xor eax,eax
next:
shr ecx,1
jnc even
add eax,edx
even:
shl edx,1
cmp ecx,0
jne next
pop ebp
ret
| 11.545455 | 21 | 0.543307 |
061e19ccff4f1970391c11f1bac3ffde542404f4 | 1,591 | asm | Assembly | programs/oeis/055/A055015.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/055/A055015.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/055/A055015.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A055015: Sum of 6th powers of digits of n.
; 0,1,64,729,4096,15625,46656,117649,262144,531441,1,2,65,730,4097,15626,46657,117650,262145,531442,64,65,128,793,4160,15689,46720,117713,262208,531505,729,730,793,1458,4825,16354,47385,118378,262873,532170,4096,4097,4160,4825,8192,19721,50752,121745,266240,535537,15625,15626,15689,16354,19721,31250,62281,133274,277769,547066,46656,46657,46720,47385,50752,62281,93312,164305,308800,578097,117649,117650,117713,118378,121745,133274,164305,235298,379793,649090,262144,262145,262208,262873,266240,277769,308800,379793,524288,793585,531441,531442,531505,532170,535537,547066,578097,649090,793585,1062882,1,2,65,730,4097,15626,46657,117650,262145,531442,2,3,66,731,4098,15627,46658,117651,262146,531443,65,66,129,794,4161,15690,46721,117714,262209,531506,730,731,794,1459,4826,16355,47386,118379,262874,532171,4097,4098,4161,4826,8193,19722,50753,121746,266241,535538,15626,15627,15690,16355,19722,31251,62282,133275,277770,547067,46657,46658,46721,47386,50753,62282,93313,164306,308801,578098,117650,117651,117714,118379,121746,133275,164306,235299,379794,649091,262145,262146,262209,262874,266241,277770,308801,379794,524289,793586,531442,531443,531506,532171,535538,547067,578098,649091,793586,1062883,64,65,128,793,4160,15689,46720,117713,262208,531505,65,66,129,794,4161,15690,46721,117714,262209,531506,128,129,192,857,4224,15753,46784,117777,262272,531569,793,794,857,1522,4889,16418,47449,118442,262937,532234,4160,4161,4224,4889,8256,19785,50816,121809,266304,535601
lpb $0,1
mov $2,$0
div $0,10
mod $2,10
pow $2,6
add $1,$2
lpe
| 144.636364 | 1,472 | 0.809554 |
807f55aed6b4a6595b79901a8d24545841c8d4d1 | 1,070 | asm | Assembly | dos/test_add_sub.asm | spaceflint7/daedgaem | 8f54b1c2daa91661bd42d29e6e875b06581f1496 | [
"MIT"
] | null | null | null | dos/test_add_sub.asm | spaceflint7/daedgaem | 8f54b1c2daa91661bd42d29e6e875b06581f1496 | [
"MIT"
] | null | null | null | dos/test_add_sub.asm | spaceflint7/daedgaem | 8f54b1c2daa91661bd42d29e6e875b06581f1496 | [
"MIT"
] | null | null | null | bits 16
org 100h
;
; TEST ADD AND SUB
;
mov si, 0
L1: mov di, 0
L2: mov bx, si
clc
;add bx, di
sub bx, di
pushf
mov dx, bx
lea bp, STRING
call N2H
pop dx
and dx, 07FFFh
add bp, 6
call N2H
mov dx, si
add bp, 8
call N2H
mov dx, di
add bp, 7
call N2H
mov ah, 9
lea dx, STRING
int 21h
mov ax, si
add al, ah
xor ah, ah
add ax, 3
add di, ax
jno L2
inc si
jnz L1
int 20h
;STRING db "XXXX (XXXX) = XXXX + XXXX"
STRING db "XXXX (XXXX) = XXXX - XXXX"
db 13, 10, "$"
; DX = number to print
; BP = string to write
; destroys AX, BX
N2H:
lea bx, TABLE
mov al, dl
and al, 0fh
xlat
mov [bp+3], al
mov al, dl
shr al, 1
shr al, 1
shr al, 1
shr al, 1
xlat
mov [bp+2], al
mov al, dh
and al, 0fh
xlat
mov [bp+1], al
mov al, dh
shr al, 1
shr al, 1
shr al, 1
shr al, 1
xlat
mov [bp+0], al
ret
TABLE db "0123456789ABCDEF"
| 12.738095 | 38 | 0.484112 |
baceaaf882ba014353500603e761c5c5ab3f45fe | 701 | asm | Assembly | oeis/216/A216688.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/216/A216688.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/216/A216688.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A216688: E.g.f. exp( x * exp(x^2) ).
; Submitted by Simon Strandgaard
; 1,1,1,7,25,121,841,4831,40657,325585,2913841,29910871,301088041,3532945417,41595396025,531109561711,7197739614241,100211165640481,1507837436365537,23123578483200295,376697477235716281,6348741961892933401,111057167658053740201,2032230051717594032767,38165344729967908264945,748728077209938328239601,15081910662630846367491601,314698092267931824042904951,6769737190520771282220806857,149714160343809543766373811625,3418456903850363136211129245721,79978354903190792084807502885391
add $0,1
lpb $0
sub $0,1
mov $2,$4
sub $2,$0
pow $2,$0
mov $3,$4
bin $3,$0
mul $3,$2
mul $5,$4
add $4,1
add $5,$3
lpe
mov $0,$5
| 36.894737 | 479 | 0.797432 |
0b8271639ebf808118ed5c8ecd38a4c1be3b5d12 | 1,610 | asm | Assembly | src/messages.asm | remy/next-http | 61c4d3139178f375e61d703671c1a7533725b8c2 | [
"MIT"
] | 14 | 2021-04-09T18:45:38.000Z | 2022-02-27T15:58:52.000Z | src/messages.asm | remy/next-http | 61c4d3139178f375e61d703671c1a7533725b8c2 | [
"MIT"
] | 2 | 2021-05-19T18:44:15.000Z | 2022-02-27T16:37:09.000Z | src/messages.asm | remy/next-httpbank | 61c4d3139178f375e61d703671c1a7533725b8c2 | [
"MIT"
] | 3 | 2021-04-11T23:56:32.000Z | 2022-02-27T15:49:17.000Z | MODULE Err
ESPTimeout DC "1 WiFi/server timeout"
hostConnect DC "2 Failed to connect to host"
errorConnect DC "3 Cannot open TCP connection"
badOption DC "4 Unknown command option"
varNotFound DC "5 NextBASIC variable not found"
wifiInit DC "6 WiFi chip init failed"
tcpSend1 DC "7 HTTP send post fail"
tcpSend2 DC "8 HTTP send fail"
tcpSend3 DC "9 HTTP get fail"
tcpSend4 DC "A HTTP send tcp frame fail"
readTimeout DC "B HTTP read timeout"
bankError DC "C Bank arg error"
lengthError DC "D Length arg error"
offsetError DC "E Offset arg error"
portError DC "F Port error"
borderError DC "G Border out of range 0-7"
hostError DC "H Host required"
noFileOrBank DC "I Filename or bank required"
fileOpen DC "J Can't open file for writing"
contentLength DC "K Content length error"
outOfMemory DC "L Out of memory: try '-r'"
notEnoughMemory DC "M Not enough memory: try '-r'"
ENDMODULE
MODULE Msg
help
;; 12345678901234567890123456789012
DB NAME, " v", VERSION, " by Remy Sharp", CR
DB "-> GET and POST over HTTP", CR, CR
DB "Synopsis:",CR
DB " .",NAME," get ...args",CR
DB " .",NAME," post ...args",CR, CR
DB "Args:",CR
DB "-b num* bank to use",CR
DB "-f str* filename",CR
DB "-r disable rolling banks",CR
DB "-h str host address",CR
DB "-p num* port",CR
DB "-u str* url",CR
DB "-l num* length of data",CR
DB " (required with POST)",CR
DB "-o num* offset in bank",CR
DB "-7 base64 decode",CR
DB "-v num* flash border colour",CR,CR
DB "* denotes optional with defaults",CR
DB "FAQ: github.com/remy/next-http",CR,0
ENDMODULE
| 31.568627 | 50 | 0.683851 |
04ba18baf77b8b3dd6258e3e2fced10e88f3fe4c | 8,117 | asm | Assembly | parse/parse_fn.asm | DigitalMars/optlink | 493de158282046641ef2a3a60a88e25e26d88ec4 | [
"BSL-1.0"
] | 28 | 2015-02-03T01:38:24.000Z | 2022-03-23T05:48:24.000Z | parse/parse_fn.asm | DigitalMars/optlink | 493de158282046641ef2a3a60a88e25e26d88ec4 | [
"BSL-1.0"
] | 20 | 2015-01-02T14:51:20.000Z | 2021-01-09T21:37:19.000Z | parse/parse_fn.asm | DigitalMars/optlink | 493de158282046641ef2a3a60a88e25e26d88ec4 | [
"BSL-1.0"
] | 9 | 2015-02-11T17:43:56.000Z | 2019-09-05T11:07:02.000Z | TITLE PARSE_FN - Copyright (c) SLR Systems 1994
INCLUDE MACROS
INCLUDE IO_STRUC
PUBLIC PARSE_FILENAME
; PUBLIC FNTBL
.DATA
externdef FNTBL:byte
.CODE FILEPARSE_TEXT
externdef _parse_filename:proc
externdef _force_path:proc
PARSE_FILENAME PROC
push EAX
call _parse_filename
add ESP,4
ret
;
;EAX IS NFN_STRUCT
;(LENGTH IS ALREADY SET, AND TEXT IS THERE)
;
;RETURNS:
; EAX IS NFN_STRUCT
;
PUSHM EDI,ESI,EBX
MOV ESI,EAX
ASSUME ESI:PTR NFN_STRUCT
XOR EAX,EAX
MOV EDI,ESI
ASSUME EDI:PTR NFN_STRUCT
MOV [ESI].NFN_PATHLEN,EAX
MOV [ESI].NFN_PRIMLEN,EAX
MOV [ESI].NFN_EXTLEN,EAX
MOV DPTR [ESI].NFN_FLAGS,EAX
MOV ECX,[ESI].NFN_TOTAL_LENGTH
LEA ESI,[ESI].NFN_TEXT
MOV EBX,OFF FNTBL
; MOV EDX,ESI ;SAVE START OF FILENAME IN DX
MOV DPTR [ESI+ECX],EAX ;ZERO AT END
LEA ESI,[ESI+ECX-1] ;ESI IS AT THE LAST CHAR OF TOKEN
;
;SCAN FORWARDS LOOKING FOR AMBIGUOUS CHARACTERS
;
TEST ECX,ECX
JZ L9$
;
;OK, NOW SCAN BACKWARDS FOR EXTENT OR PATH STUFF
;
;
;SKIP TRAILING SPACES
;
L30$:
MOV AL,[ESI]
DEC ESI
CMP AL,' '
JNZ L31$
DEC ECX
MOV [EDI].NFN_TOTAL_LENGTH,ECX
JNZ L30$
JMP L9$
L3$:
DEC ESI
L31$:
MOV AL,[EBX+EAX]
DEC ECX
TEST AL,MASK FNTBL_PATH_SEPARATOR+MASK FNTBL_DOT+MASK FNTBL_AMBIGUOUS
JNZ L32$
MOV AL,[ESI]
TEST ECX,ECX
JNZ L3$
JMP DO_PRIMARY2
L32$:
TEST AL,MASK FNTBL_AMBIGUOUS
JZ L33$
OR [EDI].NFN_FLAGS,MASK NFN_AMBIGUOUS
MOV AL,[ESI]
OR ECX,ECX
JNZ L3$
JMP DO_PRIMARY2
L55$:
TEST AL,MASK FNTBL_PATH_SEPARATOR + MASK FNTBL_AMBIGUOUS
JZ DO_PRIMARY2
TEST AL,MASK FNTBL_PATH_SEPARATOR
JNZ DO_PRIMARY1
OR [EDI].NFN_FLAGS,MASK NFN_AMBIGUOUS
JMP DO_PRIMARY1
L33$:
TEST AL,MASK FNTBL_DOT
JZ DO_PRIMARY1
;
;GOT A '.', SO STORE EXTENT LENGTH PLEASE
;
MOV EAX,[EDI].NFN_TOTAL_LENGTH
OR [EDI].NFN_FLAGS,MASK NFN_EXT_SPECIFIED
SUB EAX,ECX
CMP EAX,1
JZ L4$
L41$:
MOV [EDI].NFN_EXTLEN,EAX
L49$:
;
;NOW LOOK ONLY FOR END-OF-PRIMARY...
;
XOR EAX,EAX
TEST ECX,ECX
JZ L9$
L5$:
MOV AL,[ESI]
DEC ESI
DEC ECX
MOV AL,[EBX+EAX]
JZ L55$
TEST AL,MASK FNTBL_PATH_SEPARATOR + MASK FNTBL_AMBIGUOUS
JZ L5$
TEST AL,MASK FNTBL_PATH_SEPARATOR
JNZ DO_PRIMARY1
OR [EDI].NFN_FLAGS,MASK NFN_AMBIGUOUS
JMP L5$
DO_PRIMARY1:
INC ECX
DO_PRIMARY:
; INC ESI
DO_PRIMARY2:
MOV EAX,[EDI].NFN_TOTAL_LENGTH
SUB EAX,[EDI].NFN_EXTLEN
SUB EAX,ECX
MOV [EDI].NFN_PRIMLEN,EAX
JZ DP_3
OR [EDI].NFN_FLAGS,MASK NFN_PRIM_SPECIFIED
DP_3:
;
;NOW, CX IS # OF BYTES IN A PATH-SPEC
;
TEST ECX,ECX
JZ L9$
MOV [EDI].NFN_PATHLEN,ECX
OR [EDI].NFN_FLAGS,MASK NFN_PATH_SPECIFIED
L9$:
;
;ALL DONE, CONGRATS!
;
BITT FORCE_PATH
JNZ FP_1
L99$:
POPM EBX,ESI
MOV EAX,EDI
POP EDI
RET
L4$:
;
;JUST A DOT, REMOVE IT...
;
BITT FORCE_PATH
JNZ L41$
DEC [EDI].NFN_TOTAL_LENGTH
JMP L49$
FP_1:
push EDI
call _force_path
add ESP,4
jmp L99$
;
;IF PRIMLEN OR EXTLEN !=0, MAKE THEM ZERO AND ADD A \ AT END
;
MOV EBX,[EDI].NFN_PRIMLEN
AND [EDI].NFN_FLAGS,NOT (MASK NFN_PRIM_SPECIFIED+MASK NFN_EXT_SPECIFIED)
ADD EBX,[EDI].NFN_EXTLEN
JZ L8$
INC EBX
XOR EAX,EAX
ADD EBX,[EDI].NFN_PATHLEN
MOV [EDI].NFN_PRIMLEN,EAX
MOV [EDI].NFN_PATHLEN,EBX
MOV [EDI].NFN_EXTLEN,EAX
MOV BPTR [EDI+EBX].NFN_TEXT-1,'\'
INC [EDI].NFN_TOTAL_LENGTH
OR [EDI].NFN_FLAGS,MASK NFN_PATH_SPECIFIED
L8$:
JMP L99$
PARSE_FILENAME ENDP
.DATA ;MUST BE IN DATA SEGMENT, AS WE MODIFY IT...
;FNTBL LABEL BYTE
;
;ILLEGAL HPFS FILENAME CHARS ARE:
;
; 0-1FH, " * + , / : ; < = > ? [ \ ] |
;
;WE ALLOW PATH SEPARATORS \ / :
;WE ALLOW AMBIGUOUS CHARS ? *
;
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;00 NUL
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;01 SOH
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;02
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;03
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;04
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;05
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;06
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;07 BEL
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;08 BS
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;09 TAB
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;0A LF
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;0B
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;0C
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;0D CR
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;0E
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;0F
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;10
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;11
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;12
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;13
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;14
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;15
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;16
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;17
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;18
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;19
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;1A
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;1B ESC
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;1C
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;1D
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;1E
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;1F
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;20 SPACE
DB 0 ;21 !
DB MASK FNTBL_ILLEGAL ;22 "
DB 0 ;23 #
DB 0 ;24 $
DB 0 ;25 %
DB 0 ;26 &
DB 0 ;27 '
DB MASK SYMTBL_ILLEGAL ;28 (
DB MASK SYMTBL_ILLEGAL ;29 ) ;ILLEGAL IN FILE NAMES IF '(' OVERLAY FOUND
DB MASK FNTBL_AMBIGUOUS+MASK SYMTBL_ILLEGAL;2A *
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;2B +
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;2C ,
DB 0 ;2D -
DB MASK FNTBL_DOT ;2E .
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;2F / ;ILLEGAL FOR MSCMDLIN SUPPORT...
DB MASK IS_NUMERIC ;30 0
DB MASK IS_NUMERIC ;31 1
DB MASK IS_NUMERIC ;32 2
DB MASK IS_NUMERIC ;33 3
DB MASK IS_NUMERIC ;34 4
DB MASK IS_NUMERIC ;35 5
DB MASK IS_NUMERIC ;36 6
DB MASK IS_NUMERIC ;37 7
DB MASK IS_NUMERIC ;38 8
DB MASK IS_NUMERIC ;39 9
DB MASK FNTBL_PATH_SEPARATOR+MASK SYMTBL_ILLEGAL ;3A :
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;3B ;
DB MASK FNTBL_ILLEGAL ;3C <
DB MASK FNTBL_ILLEGAL+MASK SYMTBL_ILLEGAL ;3D =
DB MASK FNTBL_ILLEGAL ;3E >
DB MASK FNTBL_AMBIGUOUS ;3F ?
DB 0 ;40 @
DB MASK IS_ALPHA ;41 A
DB MASK IS_ALPHA ;42 B
DB MASK IS_ALPHA ;43 C
DB MASK IS_ALPHA ;44 D
DB MASK IS_ALPHA ;45 E
DB MASK IS_ALPHA ;46 F
DB MASK IS_ALPHA ;47 G
DB MASK IS_ALPHA ;48 H
DB MASK IS_ALPHA ;49 I
DB MASK IS_ALPHA ;4A J
DB MASK IS_ALPHA ;4B K
DB MASK IS_ALPHA ;4C L
DB MASK IS_ALPHA ;4D M
DB MASK IS_ALPHA ;4E N
DB MASK IS_ALPHA ;4F O
DB MASK IS_ALPHA ;50 P
DB MASK IS_ALPHA ;51 Q
DB MASK IS_ALPHA ;52 R
DB MASK IS_ALPHA ;53 S
DB MASK IS_ALPHA ;54 T
DB MASK IS_ALPHA ;55 U
DB MASK IS_ALPHA ;56 V
DB MASK IS_ALPHA ;57 W
DB MASK IS_ALPHA ;58 X
DB MASK IS_ALPHA ;59 Y
DB MASK IS_ALPHA ;5A Z
DB MASK FNTBL_ILLEGAL ;5B [
DB MASK FNTBL_PATH_SEPARATOR ;5C \
DB MASK FNTBL_ILLEGAL ;5D ]
DB 0 ;5E ^
DB 0 ;5F _
DB 0 ;60 `
DB MASK IS_ALPHA ;61 a
DB MASK IS_ALPHA ;62 b
DB MASK IS_ALPHA ;63 c
DB MASK IS_ALPHA ;64 d
DB MASK IS_ALPHA ;65 e
DB MASK IS_ALPHA ;66 f
DB MASK IS_ALPHA ;67 g
DB MASK IS_ALPHA ;68 h
DB MASK IS_ALPHA ;69 i
DB MASK IS_ALPHA ;6A j
DB MASK IS_ALPHA ;6B k
DB MASK IS_ALPHA ;6C l
DB MASK IS_ALPHA ;6D m
DB MASK IS_ALPHA ;6E n
DB MASK IS_ALPHA ;6F o
DB MASK IS_ALPHA ;70 p
DB MASK IS_ALPHA ;71 q
DB MASK IS_ALPHA ;72 r
DB MASK IS_ALPHA ;73 s
DB MASK IS_ALPHA ;74 t
DB MASK IS_ALPHA ;75 u
DB MASK IS_ALPHA ;76 v
DB MASK IS_ALPHA ;77 w
DB MASK IS_ALPHA ;78 x
DB MASK IS_ALPHA ;79 y
DB MASK IS_ALPHA ;7A z
DB 0 ;7B {
DB MASK FNTBL_ILLEGAL ;7C |
DB 0 ;7D }
DB 0 ;7E ~
DB 0 ;7F
db 80h dup (0)
END
| 23.191429 | 82 | 0.682025 |
0fd391ce91e63ea2a243c5965d06f23d5ed611af | 998 | asm | Assembly | maps/GuideGentsHouse.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 28 | 2019-11-08T07:19:00.000Z | 2021-12-20T10:17:54.000Z | maps/GuideGentsHouse.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 13 | 2020-01-11T17:00:40.000Z | 2021-09-14T01:27:38.000Z | maps/GuideGentsHouse.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 22 | 2020-05-28T17:31:38.000Z | 2022-03-07T20:49:35.000Z | object_const_def ; object_event constants
const GUIDEGENTSHOUSE_GRAMPS
GuideGentsHouse_MapScripts:
db 0 ; scene scripts
db 0 ; callbacks
GuideGentsHouseGuideGent:
jumptextfaceplayer GuideGentsHouseGuideGentText
GuideGentsHouseBookshelf:
jumpstd magazinebookshelf
GuideGentsHouseGuideGentText:
text "When I was a wee"
line "lad, I was a hot-"
cont "shot trainer!"
para "Here's a word of"
line "advice: Catch lots"
cont "of #MON!"
para "Treat them all"
line "with kindness!"
done
GuideGentsHouse_MapEvents:
db 0, 0 ; filler
db 2 ; warp events
warp_event 2, 7, CHERRYGROVE_CITY, 4
warp_event 3, 7, CHERRYGROVE_CITY, 4
db 0 ; coord events
db 2 ; bg events
bg_event 0, 1, BGEVENT_READ, GuideGentsHouseBookshelf
bg_event 1, 1, BGEVENT_READ, GuideGentsHouseBookshelf
db 1 ; object events
object_event 2, 3, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GuideGentsHouseGuideGent, EVENT_GUIDE_GENT_VISIBLE_IN_CHERRYGROVE
| 23.209302 | 172 | 0.770541 |
4065438af06ef0274c03f00aead00acc6102c273 | 422 | asm | Assembly | programs/oeis/266/A266178.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/266/A266178.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/266/A266178.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A266178: Triangle read by rows giving successive states of cellular automaton generated by "Rule 6" initiated with a single ON (black) cell.
; 1,1,1,0,1,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
lpb $0
add $0,1
sub $2,2
add $0,$2
cmp $1,0
lpe
bin $1,$0
mov $0,$1
| 35.166667 | 201 | 0.592417 |
dc31cf0acddf57631f86846b4f81675b28216cae | 8,145 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0.log_21829_99.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.log_21829_99.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.log_21829_99.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 %r8
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x9199, %rsi
lea addresses_normal_ht+0x285, %rdi
nop
add %r11, %r11
mov $71, %rcx
rep movsw
nop
nop
nop
nop
nop
add $59844, %r8
lea addresses_A_ht+0x7c85, %r10
nop
nop
nop
nop
add %rax, %rax
mov $0x6162636465666768, %rdi
movq %rdi, %xmm0
vmovups %ymm0, (%r10)
nop
add %r8, %r8
lea addresses_D_ht+0xe7a5, %r10
nop
nop
nop
nop
inc %rsi
mov $0x6162636465666768, %rcx
movq %rcx, (%r10)
nop
nop
nop
nop
add $63295, %rsi
lea addresses_D_ht+0x57d2, %rsi
lea addresses_A_ht+0xf635, %rdi
nop
nop
nop
nop
add %rbp, %rbp
mov $127, %rcx
rep movsl
nop
nop
nop
nop
nop
and $22875, %rbp
lea addresses_D_ht+0x8c85, %rcx
sub $21431, %r8
movb $0x61, (%rcx)
cmp $19798, %rbp
lea addresses_A_ht+0x235e, %rax
nop
nop
nop
nop
xor $23214, %rdi
vmovups (%rax), %ymm3
vextracti128 $1, %ymm3, %xmm3
vpextrq $0, %xmm3, %r10
add $16848, %rdi
lea addresses_UC_ht+0x166de, %rsi
nop
nop
nop
nop
nop
dec %r8
mov $0x6162636465666768, %rbp
movq %rbp, (%rsi)
and $41451, %rcx
lea addresses_normal_ht+0xeee5, %rbp
nop
nop
nop
nop
nop
sub $56489, %rax
mov $0x6162636465666768, %rdi
movq %rdi, %xmm3
vmovups %ymm3, (%rbp)
sub $32589, %rcx
lea addresses_normal_ht+0x1e485, %rax
nop
nop
nop
cmp $23572, %r11
mov $0x6162636465666768, %rdi
movq %rdi, %xmm2
movups %xmm2, (%rax)
nop
nop
nop
sub %r11, %r11
lea addresses_WT_ht+0x18725, %r8
nop
nop
dec %rax
mov $0x6162636465666768, %r10
movq %r10, (%r8)
nop
nop
nop
and %r10, %r10
lea addresses_normal_ht+0x19c85, %rbp
xor %r10, %r10
movb (%rbp), %cl
nop
nop
dec %rsi
lea addresses_normal_ht+0x1591d, %rsi
lea addresses_D_ht+0xa3d3, %rdi
add %r10, %r10
mov $99, %rcx
rep movsw
nop
nop
nop
xor %rax, %rax
lea addresses_D_ht+0x9525, %rbp
nop
nop
nop
nop
nop
sub %rax, %rax
vmovups (%rbp), %ymm3
vextracti128 $1, %ymm3, %xmm3
vpextrq $0, %xmm3, %r11
nop
nop
cmp %rcx, %rcx
lea addresses_normal_ht+0x4985, %rbp
xor %r10, %r10
movw $0x6162, (%rbp)
nop
nop
nop
nop
nop
xor %rcx, %rcx
lea addresses_D_ht+0x1e325, %rsi
nop
nop
nop
nop
nop
add $51455, %rbp
vmovups (%rsi), %ymm2
vextracti128 $0, %ymm2, %xmm2
vpextrq $0, %xmm2, %r10
nop
nop
nop
nop
inc %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r8
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r13
push %r8
push %rax
push %rbx
push %rcx
// Load
lea addresses_D+0x1e0b5, %r8
nop
nop
nop
nop
sub $26116, %r11
movups (%r8), %xmm5
vpextrq $0, %xmm5, %r13
nop
nop
nop
xor $28589, %rax
// Faulty Load
lea addresses_RW+0x1485, %r13
nop
nop
and %r8, %r8
mov (%r13), %bx
lea oracles, %rax
and $0xff, %rbx
shlq $12, %rbx
mov (%rax,%rbx,1), %rbx
pop %rcx
pop %rbx
pop %rax
pop %r8
pop %r13
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_RW', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_D', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_RW', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'same': False, 'congruent': 1, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_normal_ht'}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 32}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 8}}
{'src': {'same': False, 'congruent': 0, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_A_ht'}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1}}
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_UC_ht', 'AVXalign': True, 'size': 8}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': True, 'congruent': 3, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 32}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 16}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 8}}
{'src': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 0, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 0, 'type': 'addresses_D_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 2}}
{'src': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'32': 21829}
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
*/
| 32.842742 | 2,999 | 0.657581 |
321c8f4497b9ed57370856ebc80db97cc3beb547 | 8,159 | asm | Assembly | Transynther/x86/_processed/US/_zr_/i7-7700_9_0xca.log_21829_594.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/US/_zr_/i7-7700_9_0xca.log_21829_594.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/US/_zr_/i7-7700_9_0xca.log_21829_594.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r8
push %r9
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0xa4eb, %rsi
lea addresses_normal_ht+0x182eb, %rdi
nop
nop
nop
nop
nop
cmp $32554, %r11
mov $41, %rcx
rep movsl
nop
add %rcx, %rcx
lea addresses_UC_ht+0x1b06b, %r8
nop
nop
nop
nop
nop
xor $36951, %rbx
mov (%r8), %r9w
nop
nop
nop
nop
nop
cmp $28738, %r11
lea addresses_WC_ht+0xd6eb, %rsi
lea addresses_normal_ht+0x30eb, %rdi
nop
nop
sub %r11, %r11
mov $54, %rcx
rep movsb
cmp %rsi, %rsi
lea addresses_D_ht+0x1c2eb, %rsi
lea addresses_UC_ht+0x22bd, %rdi
inc %r12
mov $109, %rcx
rep movsb
nop
nop
nop
nop
nop
and $17254, %r12
lea addresses_D_ht+0x1baeb, %rcx
nop
nop
nop
and $2048, %rsi
mov $0x6162636465666768, %r12
movq %r12, %xmm3
movups %xmm3, (%rcx)
nop
nop
sub %rcx, %rcx
lea addresses_WC_ht+0x2bdb, %rdi
clflush (%rdi)
nop
nop
nop
nop
nop
cmp %r9, %r9
movb $0x61, (%rdi)
xor $60955, %r12
lea addresses_D_ht+0x13eeb, %rsi
lea addresses_D_ht+0xd96b, %rdi
nop
nop
xor %r12, %r12
mov $66, %rcx
rep movsq
sub %r11, %r11
lea addresses_D_ht+0xa58b, %rbx
nop
nop
nop
nop
sub %rsi, %rsi
movl $0x61626364, (%rbx)
nop
nop
nop
nop
nop
and $9781, %r8
lea addresses_D_ht+0x93cb, %r11
and $53290, %rsi
movb $0x61, (%r11)
nop
nop
nop
nop
nop
and $52314, %rcx
lea addresses_WT_ht+0x2deb, %rsi
lea addresses_WT_ht+0xeeeb, %rdi
clflush (%rsi)
nop
nop
nop
nop
and $48000, %r12
mov $66, %rcx
rep movsl
nop
nop
nop
nop
nop
sub %rbx, %rbx
lea addresses_WT_ht+0x145ab, %rsi
lea addresses_WC_ht+0x14a6b, %rdi
nop
nop
nop
nop
nop
sub %r9, %r9
mov $119, %rcx
rep movsw
nop
nop
nop
nop
cmp %r9, %r9
lea addresses_UC_ht+0x4703, %r8
clflush (%r8)
nop
nop
nop
nop
cmp $22142, %rcx
mov $0x6162636465666768, %r11
movq %r11, (%r8)
nop
sub $48463, %rcx
lea addresses_UC_ht+0x1c63b, %rsi
lea addresses_D_ht+0x11aeb, %rdi
clflush (%rsi)
nop
nop
nop
nop
and %r9, %r9
mov $18, %rcx
rep movsw
nop
nop
nop
add %rbx, %rbx
lea addresses_WT_ht+0x1693, %r12
nop
nop
nop
xor %r9, %r9
mov (%r12), %bx
sub $22596, %r11
lea addresses_WC_ht+0x82cb, %r11
nop
nop
sub $45495, %r9
movw $0x6162, (%r11)
nop
sub $46988, %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r9
pop %r8
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r14
push %r8
push %r9
push %rcx
push %rsi
// Load
lea addresses_A+0x7483, %r14
clflush (%r14)
inc %rcx
movaps (%r14), %xmm3
vpextrq $0, %xmm3, %r12
nop
nop
nop
nop
nop
inc %r14
// Faulty Load
lea addresses_US+0x7eeb, %r8
nop
nop
nop
nop
and $50061, %r10
movb (%r8), %cl
lea oracles, %r10
and $0xff, %rcx
shlq $12, %rcx
mov (%r10,%rcx,1), %rcx
pop %rsi
pop %rcx
pop %r9
pop %r8
pop %r14
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_US'}, 'OP': 'LOAD'}
{'src': {'congruent': 3, 'AVXalign': True, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_A'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 1, 'NT': False, 'type': 'addresses_US'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 5, 'same': True, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_normal_ht'}}
{'src': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 10, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_normal_ht'}}
{'src': {'congruent': 10, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_UC_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_D_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WC_ht'}}
{'src': {'congruent': 11, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_D_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 5, 'AVXalign': True, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_D_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_D_ht'}}
{'src': {'congruent': 8, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_WT_ht'}}
{'src': {'congruent': 6, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_WC_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_UC_ht'}}
{'src': {'congruent': 4, 'same': True, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_D_ht'}}
{'src': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_WC_ht'}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 31.747082 | 2,999 | 0.657066 |
d1da69169173120b3c05a6aee20d3f6e9c7b02dd | 678 | asm | Assembly | oeis/306/A306927.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/306/A306927.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/306/A306927.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A306927: a(n) = A001615(n) - n.
; Submitted by Jon Maiga
; 0,1,1,2,1,6,1,4,3,8,1,12,1,10,9,8,1,18,1,16,11,14,1,24,5,16,9,20,1,42,1,16,15,20,13,36,1,22,17,32,1,54,1,28,27,26,1,48,7,40,21,32,1,54,17,40,23,32,1,84,1,34,33,32,19,78,1,40,27,74,1,72,1,40,45,44,19,90,1,64,27,44,1,108,23,46,33,56,1,126,21,52,35,50,25,96,1,70,45,80
add $0,1
mov $1,1
mov $7,$0
lpb $0
mov $3,$0
lpb $3
mov $4,$0
mov $6,$2
cmp $6,0
add $2,$6
mod $4,$2
cmp $4,0
cmp $4,0
mov $5,$2
add $2,1
cmp $5,1
max $4,$5
sub $3,$4
lpe
mov $5,1
lpb $0
dif $0,$2
mul $5,$2
lpe
dif $5,$2
mul $1,$5
add $2,1
mul $1,$2
lpe
mov $0,$1
sub $0,$7
| 18.833333 | 267 | 0.514749 |
c0be714ffb2d61e1c29200812f02b6f473e7ab82 | 9,737 | asm | Assembly | third_party/silabs/gecko_sdk_suite/v1.0/util/third_party/micrium/uCOS-III/uCOS-III/Ports/ARM-Cortex-M3/Generic/IAR/os_cpu_a.asm | syin2/openthread | a9f42768ec221380f42bfd311bc68e784b2163a6 | [
"BSD-3-Clause"
] | 1 | 2018-12-31T08:12:49.000Z | 2018-12-31T08:12:49.000Z | third_party/silabs/gecko_sdk_suite/v1.0/util/third_party/micrium/uCOS-III/uCOS-III/Ports/ARM-Cortex-M3/Generic/IAR/os_cpu_a.asm | syin2/openthread | a9f42768ec221380f42bfd311bc68e784b2163a6 | [
"BSD-3-Clause"
] | null | null | null | third_party/silabs/gecko_sdk_suite/v1.0/util/third_party/micrium/uCOS-III/uCOS-III/Ports/ARM-Cortex-M3/Generic/IAR/os_cpu_a.asm | syin2/openthread | a9f42768ec221380f42bfd311bc68e784b2163a6 | [
"BSD-3-Clause"
] | null | null | null | ;
;********************************************************************************************************
; uC/OS-III
; The Real-Time Kernel
;
;
; (c) Copyright 2009-2016; Micrium, Inc.; Weston, FL
; All rights reserved. Protected by international copyright laws.
;
; ARM Cortex-M3 Port
;
; File : OS_CPU_A.ASM
; Version : V3.06.00
; By : JJL
; BAN
;
; For : ARMv7M Cortex-M3
; Mode : Thumb2
; Toolchain : IAR EWARM
;********************************************************************************************************
;
;/*
;*********************************************************************************************************
;*********************************************************************************************************
;* WARNING - DEPRECATION NOTICE - WARNING
;* June 2016
;* This file is part of a deprecated port and will be removed in a future release.
;* The functionalities of this port were replaced by the generic ARM-Cortex-M port.
;*********************************************************************************************************
;*********************************************************************************************************
;*/
;********************************************************************************************************
; PUBLIC FUNCTIONS
;********************************************************************************************************
EXTERN OSRunning ; External references
EXTERN OSPrioCur
EXTERN OSPrioHighRdy
EXTERN OSTCBCurPtr
EXTERN OSTCBHighRdyPtr
EXTERN OSIntExit
EXTERN OSTaskSwHook
EXTERN OS_CPU_ExceptStkBase
PUBLIC OSStartHighRdy ; Functions declared in this file
PUBLIC OS_CPU_PendSVHandler
;PAGE
;********************************************************************************************************
; EQUATES
;********************************************************************************************************
NVIC_INT_CTRL EQU 0xE000ED04 ; Interrupt control state register.
NVIC_SYSPRI14 EQU 0xE000ED22 ; System priority register (priority 14).
NVIC_PENDSV_PRI EQU 0xFF ; PendSV priority value (lowest).
NVIC_PENDSVSET EQU 0x10000000 ; Value to trigger PendSV exception.
;********************************************************************************************************
; CODE GENERATION DIRECTIVES
;********************************************************************************************************
RSEG CODE:CODE:NOROOT(2)
THUMB
;PAGE
;********************************************************************************************************
; START MULTITASKING
; void OSStartHighRdy(void)
;
; Note(s) : 1) This function triggers a PendSV exception (essentially, causes a context switch) to cause
; the first task to start.
;
; 2) OSStartHighRdy() MUST:
; a) Setup PendSV exception priority to lowest;
; b) Set the main stack to OS_CPU_ExceptStkBase
; c) Switch to PSP;
; d) Enable interrupts (tasks will run with interrupts enabled).
;********************************************************************************************************
OSStartHighRdy
CPSID I ; Prevent interruption during context switch
MOV32 R0, NVIC_SYSPRI14 ; Set the PendSV exception priority
MOV32 R1, NVIC_PENDSV_PRI
STRB R1, [R0]
MOV32 R0, OS_CPU_ExceptStkBase ; Initialize the MSP to the OS_CPU_ExceptStkBase
LDR R1, [R0]
MSR MSP, R1
MOV32 R0, OSPrioCur ; OSPrioCur = OSPrioHighRdy;
MOV32 R1, OSPrioHighRdy
LDRB R2, [R1]
STRB R2, [R0]
MOV32 R5, OSTCBCurPtr
MOV32 R1, OSTCBHighRdyPtr ; OSTCBCurPtr = OSTCBHighRdyPtr;
LDR R2, [R1]
STR R2, [R5]
LDR R0, [R2] ; R0 is new process SP; SP = OSTCBHighRdyPtr->StkPtr;
MSR PSP, R0 ; Load PSP with new process SP
MRS R0, CONTROL
ORR R0, R0, #2
MSR CONTROL, R0
ISB ; Sync instruction stream
LDMFD SP!, {R4-R11} ; Restore r4-11 from new process stack
LDMFD SP!, {R0-R3} ; Restore r0, r3
LDMFD SP!, {R12, LR} ; Load R12 and LR
LDMFD SP!, {R1, R2} ; Load PC and discard xPSR
CPSIE I
BX R1
;PAGE
;********************************************************************************************************
; HANDLE PendSV EXCEPTION
; void OS_CPU_PendSVHandler(void)
;
; Note(s) : 1) PendSV is used to cause a context switch. This is a recommended method for performing
; context switches with Cortex-M3. This is because the Cortex-M3 auto-saves half of the
; processor context on any exception, and restores same on return from exception. So only
; saving of R4-R11 is required and fixing up the stack pointers. Using the PendSV exception
; this way means that context saving and restoring is identical whether it is initiated from
; a thread or occurs due to an interrupt or exception.
;
; 2) Pseudo-code is:
; a) Get the process SP, if 0 then skip (goto d) the saving part (first context switch);
; b) Save remaining regs r4-r11 on process stack;
; c) Save the process SP in its TCB, OSTCBCurPtr->OSTCBStkPtr = SP;
; d) Call OSTaskSwHook();
; e) Get current high priority, OSPrioCur = OSPrioHighRdy;
; f) Get current ready thread TCB, OSTCBCurPtr = OSTCBHighRdyPtr;
; g) Get new process SP from TCB, SP = OSTCBHighRdyPtr->OSTCBStkPtr;
; h) Restore R4-R11 from new process stack;
; i) Perform exception return which will restore remaining context.
;
; 3) On entry into PendSV handler:
; a) The following have been saved on the process stack (by processor):
; xPSR, PC, LR, R12, R0-R3
; b) Processor mode is switched to Handler mode (from Thread mode)
; c) Stack is Main stack (switched from Process stack)
; d) OSTCBCurPtr points to the OS_TCB of the task to suspend
; OSTCBHighRdyPtr points to the OS_TCB of the task to resume
;
; 4) Since PendSV is set to lowest priority in the system (by OSStartHighRdy() above), we
; know that it will only be run when no other exception or interrupt is active, and
; therefore safe to assume that context being switched out was using the process stack (PSP).
;********************************************************************************************************
OS_CPU_PendSVHandler
CPSID I ; Prevent interruption during context switch
MRS R0, PSP ; PSP is process stack pointer
STMFD R0!, {R4-R11} ; Save remaining regs r4-11 on process stack
MOV32 R5, OSTCBCurPtr ; OSTCBCurPtr->OSTCBStkPtr = SP;
LDR R6, [R5]
STR R0, [R6] ; R0 is SP of process being switched out
; At this point, entire context of process has been saved
MOV R4, LR ; Save LR exc_return value
BL OSTaskSwHook ; OSTaskSwHook();
MOV32 R0, OSPrioCur ; OSPrioCur = OSPrioHighRdy;
MOV32 R1, OSPrioHighRdy
LDRB R2, [R1]
STRB R2, [R0]
MOV32 R1, OSTCBHighRdyPtr ; OSTCBCurPtr = OSTCBHighRdyPtr;
LDR R2, [R1]
STR R2, [R5]
ORR LR, R4, #0x04 ; Ensure exception return uses process stack
LDR R0, [R2] ; R0 is new process SP; SP = OSTCBHighRdyPtr->StkPtr;
LDMFD R0!, {R4-R11} ; Restore r4-11 from new process stack
MSR PSP, R0 ; Load PSP with new process SP
CPSIE I
BX LR ; Exception return will restore remaining context
END
| 52.069519 | 122 | 0.399199 |
f004a82e4e6e8653805a3c78211f83cad81ace1c | 163 | asm | Assembly | C/Mips(Assembly)_C/Lab3/lab3_1a.asm | paulolima18/ProgrammingMesh | 2b91085fa5010e73a3bc1f3d9f02c20ce46eb8df | [
"MIT"
] | 3 | 2021-02-15T11:36:52.000Z | 2021-06-27T14:21:01.000Z | C/Mips(Assembly)_C/Lab3/lab3_1a.asm | paulolima18/ProgrammingMesh | 2b91085fa5010e73a3bc1f3d9f02c20ce46eb8df | [
"MIT"
] | null | null | null | C/Mips(Assembly)_C/Lab3/lab3_1a.asm | paulolima18/ProgrammingMesh | 2b91085fa5010e73a3bc1f3d9f02c20ce46eb8df | [
"MIT"
] | null | null | null | .data
end1: .word 0xffff0010
.text
main:
la $s0,end1
lw $s0,0($s0)
li $s1,256
reset:
li $t1,1
loop:
beq $t1,$s1,reset
sw $t1,0($s0)
sll $t1,$t1,1
j loop | 9.588235 | 22 | 0.601227 |
dd060b8ef98df7a9bd4fc975646e13dbf9cfa592 | 140 | asm | Assembly | libsrc/_DEVELOPMENT/math/float/math48/lm/c/sdcc_ix/fmod_callee.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/math/float/math48/lm/c/sdcc_ix/fmod_callee.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/math/float/math48/lm/c/sdcc_ix/fmod_callee.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 _fmod_callee
EXTERN cm48_sdccix_fmod_callee
defc _fmod_callee = cm48_sdccix_fmod_callee
| 14 | 43 | 0.878571 |
d4db16cb2d19af7f535c8e1d9c8d2c0e1ba751bb | 16,727 | asm | Assembly | sources/ippcp/asm_ia32/pcpsha256w7as.asm | ymarkovitch/ipp-crypto | ac8f1c443cc79e9f2f8508f8c707c9ed0caa22c8 | [
"Apache-2.0"
] | null | null | null | sources/ippcp/asm_ia32/pcpsha256w7as.asm | ymarkovitch/ipp-crypto | ac8f1c443cc79e9f2f8508f8c707c9ed0caa22c8 | [
"Apache-2.0"
] | null | null | null | sources/ippcp/asm_ia32/pcpsha256w7as.asm | ymarkovitch/ipp-crypto | ac8f1c443cc79e9f2f8508f8c707c9ed0caa22c8 | [
"Apache-2.0"
] | null | null | null | ;===============================================================================
; Copyright 2014-2019 Intel Corporation
; All Rights Reserved.
;
; If this software was obtained under the Intel Simplified Software License,
; the following terms apply:
;
; The source code, information and material ("Material") contained herein is
; owned by Intel Corporation or its suppliers or licensors, and title to such
; Material remains with Intel Corporation or its suppliers or licensors. The
; Material contains proprietary information of Intel or its suppliers and
; licensors. The Material is protected by worldwide copyright laws and treaty
; provisions. No part of the Material may be used, copied, reproduced,
; modified, published, uploaded, posted, transmitted, distributed or disclosed
; in any way without Intel's prior express written permission. No license under
; any patent, copyright or other intellectual property rights in the Material
; is granted to or conferred upon you, either expressly, by implication,
; inducement, estoppel or otherwise. Any license under such intellectual
; property rights must be express and approved by Intel in writing.
;
; Unless otherwise agreed by Intel in writing, you may not remove or alter this
; notice or any other notice embedded in Materials by Intel or Intel's
; suppliers or licensors in any way.
;
;
; If this software was obtained under the Apache License, Version 2.0 (the
; "License"), the following terms apply:
;
; You may not use this file except in compliance with the License. You may
; obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
;
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;
; See the License for the specific language governing permissions and
; limitations under the License.
;===============================================================================
;
;
; Purpose: Cryptography Primitive.
; Message block processing according to SHA256
;
; Content:
; UpdateSHA256
;
;
.686P
.MMX
.XMM
.MODEL FLAT,C
INCLUDE asmdefs.inc
INCLUDE ia_emm.inc
INCLUDE pcpvariant.inc
IF (_ENABLE_ALG_SHA256_)
IF (_SHA_NI_ENABLING_ EQ _FEATURE_OFF_) OR (_SHA_NI_ENABLING_ EQ _FEATURE_TICKTOCK_)
IF (_IPP GE _IPP_M5) AND (_IPP LT _IPP_V8)
;;
;; SIG0(x) = ROR32(x, 7) ^ ROR32(x,18) ^ LSR(x, 3)
;; SIG1(x) = ROR32(x,17) ^ ROR32(x,19) ^ LSR(x,10)
;; W[i] = SIG1(W[i-2]) + W[i-7] + SIG0(W[i-15]) + W[i-16], i=16,..,63
;;
UPDATE MACRO nr:REQ, wBuff:REQ
mov ebx,[wBuff+((nr-2) and 0Fh)*sizeof(dword)] ; W[i- 2]
ror ebx, 10
mov ecx,[wBuff+((nr-15) and 0Fh)*sizeof(dword)] ; W[i-15]
ror ecx, 3
mov esi,[wBuff+((nr-7) and 0Fh)*sizeof(dword)] ; +W[i- 7]
add esi,[wBuff+((nr-16) and 0Fh)*sizeof(dword)] ; +W[i-16]
mov edi,003FFFFFh ; SIG1()
and edi,ebx
ror ebx,(17-10)
xor edi,ebx
ror ebx,(19-17)
xor edi,ebx
add edi, esi ; SIG0() +W[i-7] +W[i-16]
mov esi,1FFFFFFFh ; SIG0()
and esi,ecx
ror ecx,(7-3)
xor esi,ecx
ror ecx,(18-7)
xor esi,ecx
add edi,esi ; SIG0() +W[i-7] +W[i-16] + SIG1()
mov [wBuff+(nr and 0Fh)*sizeof(dword)],edi
ENDM
;
; SUM1(x) = ROR32(x, 6) ^ ROR32(x,11) ^ ROR32(x,25)
; SUM0(x) = ROR32(x, 2) ^ ROR32(x,13) ^ ROR32(x,22)
;
; CH(x,y,x) = (x & y) ^ (~x & z)
; MAJ(x,y,z) = (x & y) ^ (x & z) ^ (y & z) = (x&y)^((x^y)&z)
;
; T1 = SUM1(E) +CH(E,F,G) +K[i] +W[i] + H
; T2 = SUM0(A) +MAJ(A,B,C)
;
; D += T1
; H = T1+T2
;
; eax = E
; edx = A
;
SHA256_STEP MACRO nr:REQ, hashBuff:REQ, wBuff:REQ, immCnt:REQ
mov esi,[hashBuff+((vF-nr) and 7)*sizeof(dword)] ; init CH()
mov ecx,eax
mov edi,[hashBuff+((vG-nr) and 7)*sizeof(dword)] ; init CH()
mov ebx,eax ; SUM1()
ror eax,6 ; SUM1()
not ecx ; CH()
and esi,ebx ; CH()
ror ebx,11 ; SUM1()
and edi,ecx ; CH()
xor eax,ebx ; SUM1()
ror ebx,(25-11) ; SUM1()
xor esi,edi ; CH()
xor eax,ebx ; SUM1()
add eax,esi ; T1 = SUM1() +CH()
add eax,[hashBuff+((vH-nr) and 7)*sizeof(dword)] ; T1 += h
;; add eax,[wBuff+(nr and 0Fh)*sizeof(dword)] ; T1 += w[]
add eax,[wBuff] ; T1 += w[]
add eax, immCnt ; T1 += K[]
mov esi,[hashBuff+((vB-nr) and 7)*sizeof(dword)] ; init MAJ()
mov ecx,edx
mov edi,[hashBuff+((vC-nr) and 7)*sizeof(dword)] ; init MAJ()
mov ebx,edx ; SUM0()
and ecx,esi ; MAJ()
ror edx,2 ; SUM0()
xor esi,ebx ; MAJ()
ror ebx,13 ; SUM0()
and esi,edi ; MAJ()
xor edx,ebx ; SUM0()
xor esi,ecx ; MAJ()
ror ebx,(22-13) ; SUM0()
xor edx,ebx ; SUM0()
add edx,esi ; T2 = SUM0()+MAJ()
add edx,eax ; T2+T1
add eax,[hashBuff+((vD-nr) and 7)*sizeof(dword)] ; T1+d
mov [hashBuff+((vH-nr) and 7)*sizeof(dword)],edx
mov [hashBuff+((vD-nr) and 7)*sizeof(dword)],eax
ENDM
IPPCODE SEGMENT 'CODE' ALIGN (IPP_ALIGN_FACTOR)
;*****************************************************************************************
;* Purpose: Update internal digest according to message block
;*
;* void UpdateSHA256(DigestSHA256 digest, const Ipp32u* mblk, int mlen, const void* pParam)
;*
;*****************************************************************************************
;;
;; Lib = W7
;;
;; Caller = ippsSHA256Update
;; Caller = ippsSHA256Final
;; Caller = ippsSHA256MessageDigest
;;
;; Caller = ippsSHA224Update
;; Caller = ippsSHA224Final
;; Caller = ippsSHA224MessageDigest
;;
;; Caller = ippsHMACSHA256Update
;; Caller = ippsHMACSHA256Final
;; Caller = ippsHMACSHA256MessageDigest
;;
;; Caller = ippsHMACSHA224Update
;; Caller = ippsHMACSHA224Final
;; Caller = ippsHMACSHA224MessageDigest
;;
ALIGN IPP_ALIGN_FACTOR
IPPASM UpdateSHA256 PROC NEAR C PUBLIC \
USES esi edi ebx ebp,\
pHash: PTR DWORD,\ ; pointer to the input/output hash
pSrc: PTR DWORD,\ ; input message
srcL: DWORD,\ ; message length
pParm: PTR DWORD ; dummy parameter
MBS_SHA256 equ (64) ; SHA256 block data size
dSize = 8 ; size of digest (dwords)
wSize = 16 ; W values queue (dwords)
hashOffset = 0 ; hash address
msgOffset = hashOffset+sizeof(dword) ; message address offset
lenOffset = msgOffset+sizeof(dword) ; message length offset
dOffset = lenOffset+sizeof(dword) ; hash buffer offset
wOffset = dOffset+dSize*sizeof(dword) ; W values offset
stackSize = 3*sizeof(dword) + (dSize+wSize)*sizeof(dword)
vA = 0
vB = 1
vC = 2
vD = 3
vE = 4
vF = 5
vG = 6
vH = 7
mov eax, pParm ; dummy
mov edi, pHash ; hash address
mov esi, pSrc ; source data address
mov eax, srcL ; source data length
sub esp, stackSize ; allocate local buffers
mov [esp+hashOffset], edi; save hash address
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; process next data block
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
sha256_block_loop:
mov [esp+msgOffset], esi ; save message address
mov [esp+lenOffset], eax ; save message length
;;
;; copy input digest
;;
mov eax, [edi+0*sizeof(dword)]
mov ebx, [edi+1*sizeof(dword)]
mov ecx, [edi+2*sizeof(dword)]
mov edx, [edi+3*sizeof(dword)]
mov [esp+dOffset+vA*sizeof(dword)], eax
mov [esp+dOffset+vB*sizeof(dword)], ebx
mov [esp+dOffset+vC*sizeof(dword)], ecx
mov [esp+dOffset+vD*sizeof(dword)], edx
mov eax, [edi+4*sizeof(dword)]
mov ebx, [edi+5*sizeof(dword)]
mov ecx, [edi+6*sizeof(dword)]
mov edx, [edi+7*sizeof(dword)]
mov [esp+dOffset+vE*sizeof(dword)], eax
mov [esp+dOffset+vF*sizeof(dword)], ebx
mov [esp+dOffset+vG*sizeof(dword)], ecx
mov [esp+dOffset+vH*sizeof(dword)], edx
;;
;; initialize the first 16 qwords of W array
;; - remember about endian
;;
xor ecx, ecx
loop1:
mov eax, [esi+ecx*sizeof(dword)]
bswap eax
mov ebx, [esi+ecx*sizeof(dword)+sizeof(dword)]
bswap ebx
mov [esp+wOffset+ecx*sizeof(dword)], eax
mov [esp+wOffset+ecx*sizeof(dword)+sizeof(dword)], ebx
add ecx, 2
cmp ecx, 16
jl loop1
;;
;; perform 0-64 steps
;;
mov eax, [esp+dOffset+vE*sizeof(dword)]
mov edx, [esp+dOffset+vA*sizeof(dword)]
SHA256_STEP 0, <esp+dOffset>, <esp+wOffset+ 0*sizeof(dword)>, 0428A2F98h
UPDATE 16, <esp+wOffset>
SHA256_STEP 1, <esp+dOffset>, <esp+wOffset+ 1*sizeof(dword)>, 071374491h
UPDATE 17, <esp+wOffset>
SHA256_STEP 2, <esp+dOffset>, <esp+wOffset+ 2*sizeof(dword)>, 0B5C0FBCFh
UPDATE 18, <esp+wOffset>
SHA256_STEP 3, <esp+dOffset>, <esp+wOffset+ 3*sizeof(dword)>, 0E9B5DBA5h
UPDATE 19, <esp+wOffset>
SHA256_STEP 4, <esp+dOffset>, <esp+wOffset+ 4*sizeof(dword)>, 03956C25Bh
UPDATE 20, <esp+wOffset>
SHA256_STEP 5, <esp+dOffset>, <esp+wOffset+ 5*sizeof(dword)>, 059F111F1h
UPDATE 21, <esp+wOffset>
SHA256_STEP 6, <esp+dOffset>, <esp+wOffset+ 6*sizeof(dword)>, 0923F82A4h
UPDATE 22, <esp+wOffset>
SHA256_STEP 7, <esp+dOffset>, <esp+wOffset+ 7*sizeof(dword)>, 0AB1C5ED5h
UPDATE 23, <esp+wOffset>
SHA256_STEP 8, <esp+dOffset>, <esp+wOffset+ 8*sizeof(dword)>, 0D807AA98h
UPDATE 24, <esp+wOffset>
SHA256_STEP 9, <esp+dOffset>, <esp+wOffset+ 9*sizeof(dword)>, 012835B01h
UPDATE 25, <esp+wOffset>
SHA256_STEP 10,<esp+dOffset>, <esp+wOffset+10*sizeof(dword)>, 0243185BEh
UPDATE 26, <esp+wOffset>
SHA256_STEP 11, <esp+dOffset>, <esp+wOffset+11*sizeof(dword)>, 0550C7DC3h
UPDATE 27, <esp+wOffset>
SHA256_STEP 12, <esp+dOffset>, <esp+wOffset+12*sizeof(dword)>, 072BE5D74h
UPDATE 28, <esp+wOffset>
SHA256_STEP 13, <esp+dOffset>, <esp+wOffset+13*sizeof(dword)>, 080DEB1FEh
UPDATE 29, <esp+wOffset>
SHA256_STEP 14, <esp+dOffset>, <esp+wOffset+14*sizeof(dword)>, 09BDC06A7h
UPDATE 30, <esp+wOffset>
SHA256_STEP 15, <esp+dOffset>, <esp+wOffset+15*sizeof(dword)>, 0C19BF174h
UPDATE 31, <esp+wOffset>
SHA256_STEP 16, <esp+dOffset>, <esp+wOffset+ 0*sizeof(dword)>, 0E49B69C1h
UPDATE 32, <esp+wOffset>
SHA256_STEP 17, <esp+dOffset>, <esp+wOffset+ 1*sizeof(dword)>, 0EFBE4786h
UPDATE 33, <esp+wOffset>
SHA256_STEP 18, <esp+dOffset>, <esp+wOffset+ 2*sizeof(dword)>, 00FC19DC6h
UPDATE 34, <esp+wOffset>
SHA256_STEP 19, <esp+dOffset>, <esp+wOffset+ 3*sizeof(dword)>, 0240CA1CCh
UPDATE 35, <esp+wOffset>
SHA256_STEP 20, <esp+dOffset>, <esp+wOffset+ 4*sizeof(dword)>, 02DE92C6Fh
UPDATE 36, <esp+wOffset>
SHA256_STEP 21, <esp+dOffset>, <esp+wOffset+ 5*sizeof(dword)>, 04A7484AAh
UPDATE 37, <esp+wOffset>
SHA256_STEP 22, <esp+dOffset>, <esp+wOffset+ 6*sizeof(dword)>, 05CB0A9DCh
UPDATE 38, <esp+wOffset>
SHA256_STEP 23, <esp+dOffset>, <esp+wOffset+ 7*sizeof(dword)>, 076F988DAh
UPDATE 39, <esp+wOffset>
SHA256_STEP 24, <esp+dOffset>, <esp+wOffset+ 8*sizeof(dword)>, 0983E5152h
UPDATE 40, <esp+wOffset>
SHA256_STEP 25, <esp+dOffset>, <esp+wOffset+ 9*sizeof(dword)>, 0A831C66Dh
UPDATE 41, <esp+wOffset>
SHA256_STEP 26, <esp+dOffset>, <esp+wOffset+10*sizeof(dword)>, 0B00327C8h
UPDATE 42, <esp+wOffset>
SHA256_STEP 27, <esp+dOffset>, <esp+wOffset+11*sizeof(dword)>, 0BF597FC7h
UPDATE 43, <esp+wOffset>
SHA256_STEP 28, <esp+dOffset>, <esp+wOffset+12*sizeof(dword)>, 0C6E00BF3h
UPDATE 44, <esp+wOffset>
SHA256_STEP 29, <esp+dOffset>, <esp+wOffset+13*sizeof(dword)>, 0D5A79147h
UPDATE 45, <esp+wOffset>
SHA256_STEP 30, <esp+dOffset>, <esp+wOffset+14*sizeof(dword)>, 006CA6351h
UPDATE 46, <esp+wOffset>
SHA256_STEP 31, <esp+dOffset>, <esp+wOffset+15*sizeof(dword)>, 014292967h
UPDATE 47, <esp+wOffset>
SHA256_STEP 32, <esp+dOffset>, <esp+wOffset+ 0*sizeof(dword)>, 027B70A85h
UPDATE 48, <esp+wOffset>
SHA256_STEP 33, <esp+dOffset>, <esp+wOffset+ 1*sizeof(dword)>, 02E1B2138h
UPDATE 49, <esp+wOffset>
SHA256_STEP 34, <esp+dOffset>, <esp+wOffset+ 2*sizeof(dword)>, 04D2C6DFCh
UPDATE 50, <esp+wOffset>
SHA256_STEP 35, <esp+dOffset>, <esp+wOffset+ 3*sizeof(dword)>, 053380D13h
UPDATE 51, <esp+wOffset>
SHA256_STEP 36, <esp+dOffset>, <esp+wOffset+ 4*sizeof(dword)>, 0650A7354h
UPDATE 52, <esp+wOffset>
SHA256_STEP 37, <esp+dOffset>, <esp+wOffset+ 5*sizeof(dword)>, 0766A0ABBh
UPDATE 53, <esp+wOffset>
SHA256_STEP 38, <esp+dOffset>, <esp+wOffset+ 6*sizeof(dword)>, 081C2C92Eh
UPDATE 54, <esp+wOffset>
SHA256_STEP 39, <esp+dOffset>, <esp+wOffset+ 7*sizeof(dword)>, 092722C85h
UPDATE 55, <esp+wOffset>
SHA256_STEP 40, <esp+dOffset>, <esp+wOffset+ 8*sizeof(dword)>, 0A2BFE8A1h
UPDATE 56, <esp+wOffset>
SHA256_STEP 41, <esp+dOffset>, <esp+wOffset+ 9*sizeof(dword)>, 0A81A664Bh
UPDATE 57, <esp+wOffset>
SHA256_STEP 42, <esp+dOffset>, <esp+wOffset+10*sizeof(dword)>, 0C24B8B70h
UPDATE 58, <esp+wOffset>
SHA256_STEP 43, <esp+dOffset>, <esp+wOffset+11*sizeof(dword)>, 0C76C51A3h
UPDATE 59, <esp+wOffset>
SHA256_STEP 44, <esp+dOffset>, <esp+wOffset+12*sizeof(dword)>, 0D192E819h
UPDATE 60, <esp+wOffset>
SHA256_STEP 45, <esp+dOffset>, <esp+wOffset+13*sizeof(dword)>, 0D6990624h
UPDATE 61, <esp+wOffset>
SHA256_STEP 46, <esp+dOffset>, <esp+wOffset+14*sizeof(dword)>, 0F40E3585h
UPDATE 62, <esp+wOffset>
SHA256_STEP 47, <esp+dOffset>, <esp+wOffset+15*sizeof(dword)>, 0106AA070h
UPDATE 63, <esp+wOffset>
SHA256_STEP 48, <esp+dOffset>, <esp+wOffset+ 0*sizeof(dword)>, 019A4C116h
SHA256_STEP 49, <esp+dOffset>, <esp+wOffset+ 1*sizeof(dword)>, 01E376C08h
SHA256_STEP 50, <esp+dOffset>, <esp+wOffset+ 2*sizeof(dword)>, 02748774Ch
SHA256_STEP 51, <esp+dOffset>, <esp+wOffset+ 3*sizeof(dword)>, 034B0BCB5h
SHA256_STEP 52, <esp+dOffset>, <esp+wOffset+ 4*sizeof(dword)>, 0391C0CB3h
SHA256_STEP 53, <esp+dOffset>, <esp+wOffset+ 5*sizeof(dword)>, 04ED8AA4Ah
SHA256_STEP 54, <esp+dOffset>, <esp+wOffset+ 6*sizeof(dword)>, 05B9CCA4Fh
SHA256_STEP 55, <esp+dOffset>, <esp+wOffset+ 7*sizeof(dword)>, 0682E6FF3h
SHA256_STEP 56, <esp+dOffset>, <esp+wOffset+ 8*sizeof(dword)>, 0748F82EEh
SHA256_STEP 57, <esp+dOffset>, <esp+wOffset+ 9*sizeof(dword)>, 078A5636Fh
SHA256_STEP 58, <esp+dOffset>, <esp+wOffset+10*sizeof(dword)>, 084C87814h
SHA256_STEP 59, <esp+dOffset>, <esp+wOffset+11*sizeof(dword)>, 08CC70208h
SHA256_STEP 60, <esp+dOffset>, <esp+wOffset+12*sizeof(dword)>, 090BEFFFAh
SHA256_STEP 61, <esp+dOffset>, <esp+wOffset+13*sizeof(dword)>, 0A4506CEBh
SHA256_STEP 62, <esp+dOffset>, <esp+wOffset+14*sizeof(dword)>, 0BEF9A3F7h
SHA256_STEP 63, <esp+dOffset>, <esp+wOffset+15*sizeof(dword)>, 0C67178F2h
;
; update digest
;
mov edi,[esp+hashOffset]
mov esi,[esp+msgOffset]
mov eax,[esp+dOffset+vA*sizeof(dword)]
mov ebx,[esp+dOffset+vB*sizeof(dword)]
mov ecx,[esp+dOffset+vC*sizeof(dword)]
mov edx,[esp+dOffset+vD*sizeof(dword)]
add [edi+0*sizeof(dword)],eax
add [edi+1*sizeof(dword)],ebx
add [edi+2*sizeof(dword)],ecx
add [edi+3*sizeof(dword)],edx
mov eax,[esp+dOffset+vE*sizeof(dword)]
mov ebx,[esp+dOffset+vF*sizeof(dword)]
mov ecx,[esp+dOffset+vG*sizeof(dword)]
mov edx,[esp+dOffset+vH*sizeof(dword)]
add [edi+4*sizeof(dword)],eax
add [edi+5*sizeof(dword)],ebx
add [edi+6*sizeof(dword)],ecx
add [edi+7*sizeof(dword)],edx
mov eax,[esp+lenOffset]
add esi, MBS_SHA256
sub eax, MBS_SHA256
jg sha256_block_loop
add esp,stackSize ; remove local buffers
ret
IPPASM UpdateSHA256 ENDP
ENDIF ;; (_IPP GE _IPP_M5) AND (_IPP LT _IPP_V8)
ENDIF ;; _FEATURE_OFF_ / _FEATURE_TICKTOCK_
ENDIF ;; _ENABLE_ALG_SHA256_
END
| 38.809745 | 91 | 0.606026 |
a829b572f82662e1c0e1dd4a38a8b7a9ad578f86 | 587 | asm | Assembly | programs/oeis/072/A072527.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/072/A072527.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/072/A072527.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A072527: Number of values of k such that n divided by k leaves a remainder 3.
; 0,0,0,0,0,0,1,1,1,1,2,1,2,1,3,1,2,2,3,1,3,1,4,2,2,1,5,2,2,2,4,1,5,1,4,2,2,3,6,1,2,2,6,1,5,1,4,4,2,1,7,2,4,2,4,1,5,3,6,2,2,1,9,1,2,4,5,3,5,1,4,2,6,1,9,1,2,4,4,3,5,1,8,3,2,1,9,3,2,2,6,1,9,3,4,2,2,3,9,1
mov $4,$0
mov $6,2
lpb $6
mov $0,$4
mov $2,0
mov $3,0
sub $6,1
add $0,$6
sub $0,4
lpb $0
mov $5,$0
sub $0,3
add $2,1
sub $5,2
div $5,$2
add $3,$5
lpe
mov $5,$3
mov $7,$6
lpb $7
mov $1,$5
sub $7,1
lpe
lpe
lpb $4
sub $1,$5
mov $4,0
lpe
mov $0,$1
| 17.787879 | 201 | 0.499148 |
4f2401060a3526fe0437968a6671c93bcab6f4dc | 785 | asm | Assembly | programs/oeis/078/A078485.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/078/A078485.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/078/A078485.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A078485: Number of irreducible indecomposable permutations of degree n.
; 0,1,1,1,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215,33554431,67108863,134217727,268435455,536870911,1073741823,2147483647,4294967295,8589934591,17179869183,34359738367,68719476735,137438953471,274877906943,549755813887,1099511627775,2199023255551,4398046511103,8796093022207,17592186044415,35184372088831,70368744177663,140737488355327,281474976710655,562949953421311,1125899906842623,2251799813685247,4503599627370495,9007199254740991
mov $1,1
mov $2,1
mov $3,2
mov $4,3
mov $5,1
lpb $0
sub $0,1
sub $3,$5
mul $3,2
trn $4,$2
mov $5,$0
trn $0,$4
add $1,3
add $2,$1
mul $1,2
add $3,$0
add $3,5
lpe
trn $1,$3
| 34.130435 | 516 | 0.780892 |
13ed7642e8cca755f44d401db3079363a824a705 | 4,114 | asm | Assembly | FASM/Windows/Subsystem-CFG/subsystem-cfg.asm | chronox777/ChronoX-s-Playground | 52412c090a28c555b050e463474eb0f985638de9 | [
"MIT"
] | null | null | null | FASM/Windows/Subsystem-CFG/subsystem-cfg.asm | chronox777/ChronoX-s-Playground | 52412c090a28c555b050e463474eb0f985638de9 | [
"MIT"
] | null | null | null | FASM/Windows/Subsystem-CFG/subsystem-cfg.asm | chronox777/ChronoX-s-Playground | 52412c090a28c555b050e463474eb0f985638de9 | [
"MIT"
] | null | null | null | ;control flow guard was introduced in Windows 8.1. This means if by any purpose your program ONLY target
;Windows 8.1 (subsystem 6.1 or 10.0) and above that has control flow guard, your executable must have cfg info
;(which can be specified in the load configuration directory in the pe file (index 10 of data directories).
;this example shows the most simplest form of it. The load config directory structure size must at least
;includes up until GuardFlags, and if the values of all members are 0, GuardFlags must have value 0x800
;(to indicate that no scurity cookies used).
;original code was written by Tomasz Grysztar, author of Flat Assembler, and I just modify the 'format'
;directive and add the load configuration directory (data 10).
format PE64 NX GUI 10.0
entry start
include 'win64a.inc'
section '.data' data readable writeable
_title db 'AVX playground',0
_error db 'AVX instructions are not supported.',0
x dq 3.14159265389
vector_output:
rept 16 i:0
{
db 'ymm',`i,': %f,%f,%f,%f',13,10
}
db 0
buffer db 1000h dup ?
section '.text' code readable executable
start:
mov eax,1
cpuid
and ecx,18000000h
cmp ecx,18000000h
jne no_AVX
xor ecx,ecx
xgetbv
and eax,110b
cmp eax,110b
jne no_AVX
vbroadcastsd ymm0, [x]
vsqrtpd ymm1, ymm0
vsubpd ymm2, ymm0, ymm1
vsubpd ymm3, ymm1, ymm2
vaddpd xmm4, xmm2, xmm3
vaddpd ymm5, ymm4, ymm0
vperm2f128 ymm6, ymm4, ymm5, 03h
vshufpd ymm7, ymm6, ymm5, 10010011b
vroundpd ymm8, ymm7, 0011b
vroundpd ymm9, ymm7, 0
sub rsp,418h
rept 16 i:0
{
vmovups [rsp+10h+i*32],ymm#i
}
mov r8,[rsp+10h]
mov r9,[rsp+18h]
lea rdx,[vector_output]
lea rcx,[buffer]
call [sprintf]
xor ecx,ecx
lea rdx,[buffer]
lea r8,[_title]
xor r9d,r9d
call [MessageBoxA]
xor ecx,ecx
call [ExitProcess]
no_AVX:
sub rsp,28h
xor ecx,ecx
lea rdx,[_error]
lea r8,[_title]
mov r9d,10h
call [MessageBoxA]
mov ecx,1
call [ExitProcess]
section '.idata' import data readable
library kernel32,'KERNEL32.DLL',\
user32,'USER32.DLL',\
msvcrt,'MSVCRT.DLL'
include 'api\kernel32.inc'
include 'api\user32.inc'
import msvcrt,\
sprintf,'sprintf'
section '.rdata' data readable
data 10
.Size dd .datasize
.TimeDateStamp dd 0
.MajorVersion dw 0
.MinorVersion dw 0
.GlobalFlagsClear dd 0
.GlobalFlagsSet dd 0
.CriticalSectionDefaultTimeout dd 0
.DeCommitFreeBlockThreshold dq 0
.DeCommitTotalFreeThreshold dq 0
.LockPrefixTable dq 0
.MaximumAllocationSize dq 0
.VirtualMemoryThreshold dq 0
.ProcessAffinityMask dq 0
.ProcessHeapFlags dd 0
.CSDVersion dw 0
.DependentLoadFlags dw 0
.EditList dq 0
.SecurityCookie dq 0
.SEHandlerTable dq 0
.SEHandlerCount dq 0
.GuardCFCheckFunctionPointer dq 0
.GuardCFDispatchFunctionPointer dq 0
.GuardCFFunctionTable dq 0
.GuardCFFunctionCount dq 0
.GuardFlags dd 0x00000800 ;IMAGE_GUARD_SECURITY_COOKIE_UNUSED
;dw 0, 0 ;IMAGE_LOAD_CONFIG_CODE_INTEGRITY CodeIntegrity
;dd 0, 0 ;IMAGE_LOAD_CONFIG_CODE_INTEGRITY CodeIntegrity
;.GuardAddressTakenIatEntryTable dq 0
;.GuardAddressTakenIatEntryCount dq 0
;.GuardLongJumpTargetTable dq 0
;.GuardLongJumpTargetCount dq 0
;.DynamicValueRelocTable dq 0
;.CHPEMetadataPointer dq 0
;.GuardRFFailureRoutined dq 0
;.GuardRFFailureRoutineFunctionPointer dq 0
;.DynamicValueRelocTableOffset dd 0
;.DynamicValueRelocTableSection dw 0
;.Reserved2 dw 0
;.GuardRFVerifyStackPointerFunctionPointer dq 0
;.HotPatchTableOffset dd 0
;.Reserved3 dd 0
;.EnclaveConfigurationPointer dq 0
;.VolatileMetadataPointer dq 0
;.GuardEHContinuationTable dq 0
;.GuardEHContinuationCount dq 0
;dq 0
.datasize = $-.Size
end data
| 25.552795 | 110 | 0.66772 |
981375685a353fa5d25c43b9ef08f3430a2a428e | 680 | asm | Assembly | programs/oeis/213/A213706.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/213/A213706.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/213/A213706.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A213706: Partial sums of A071542.
; 0,1,3,5,8,11,15,19,24,29,35,41,48,55,62,69,77,85,94,103,113,123,133,143,154,165,176,187,199,211,223,235,248,261,275,289,304,319,334,349,365,381,397,413,430,447,464,481,499,517,535,553,572,591,610,629,649,669,689,709,730,751,772,793,815,837,860,883,907,931,955,979,1004,1029,1054,1079,1105,1131,1157,1183,1210,1237,1264,1291,1319,1347,1375,1403,1432,1461,1490,1519,1549,1579,1609,1639,1670,1701,1732,1763
mov $2,$0
mov $3,$0
lpb $2
mov $0,$3
sub $2,1
sub $0,$2
seq $0,71542 ; Number of steps to reach 0 starting with n and using the iterated process : x -> x - (number of 1's in binary representation of x).
add $1,$0
lpe
mov $0,$1
| 48.571429 | 405 | 0.704412 |
58e7c44be15347002dbd08d4b3c7e4c597890e25 | 6,840 | asm | Assembly | MathProgs/StaProgs.asm | bbernardoni/MathTI83 | 9b2c7da3b486fd3a41761413332e3ba7f0ffec6f | [
"MIT"
] | null | null | null | MathProgs/StaProgs.asm | bbernardoni/MathTI83 | 9b2c7da3b486fd3a41761413332e3ba7f0ffec6f | [
"MIT"
] | 1 | 2019-10-13T06:14:21.000Z | 2019-10-13T14:02:45.000Z | MathProgs/StaProgs.asm | bbernardoni/MathTI83 | 9b2c7da3b486fd3a41761413332e3ba7f0ffec6f | [
"MIT"
] | null | null | null | COMPOUND_INTEREST:
call PutLine
.db "Y=P(1+R/N)^(NT)",0
ld a, 4;5
call InlineOpt
.db "Y?",0,"P?",0,"R?",0,"T?",0;,"N?",0
cp 1
jr z, COMPOUND_INTEREST_P
cp 2
jr z, COMPOUND_INTEREST_R
cp 3
jp z, COMPOUND_INTEREST_T
ld a, tA
call Prompt
.db "P=",0
ld a, tB
call Prompt
.db "R=",0
ld a, tC
call Prompt
.db "N=",0
ld a, tD
call Prompt
.db "T=",0
call ParseExpr ;A(1+B/C)^(CD
.db tA,tLParen,t1,tAdd,tB,tDiv,tC,tRParen,tPower,tLParen,tC,tD,0
call PrintPause
jp Menu_Start
COMPOUND_INTEREST_P:
ld a, tA
call Prompt
.db "Y=",0
ld a, tB
call Prompt
.db "R=",0
ld a, tC
call Prompt
.db "N=",0
ld a, tD
call Prompt
.db "T=",0
call ParseExpr ;A/(1+B/C)^(CD
.db tA,tDiv,tLParen,t1,tAdd,tB,tDiv,tC,tRParen,tPower,tLParen,tC,tD,0
call PrintPause
jp Menu_Start
COMPOUND_INTEREST_R:
ld a, tA
call Prompt
.db "Y=",0
ld a, tB
call Prompt
.db "P=",0
ld a, tC
call Prompt
.db "N=",0
ld a, tD
call Prompt
.db "T=",0
call ParseExpr ;C((CD)x√(A/B)-1
.db tC,tLParen,tLParen,tC,tD,tRParen,tXRoot,tLParen,tA,tDiv,tB,tRParen,tSub,t1,0
call PrintPause
jp Menu_Start
COMPOUND_INTEREST_T:
ld a, tA
call Prompt
.db "Y=",0
ld a, tB
call Prompt
.db "P=",0
ld a, tC
call Prompt
.db "R=",0
ld a, tD
call Prompt
.db "N=",0
call ParseExpr ;log(A/B)/(Dlog(1+C/D
.db tlog,tA,tDiv,tB,tLParen,tDiv,tRParen,tD,tlog,t1,tAdd,tC,tDiv,tD,0
call PrintPause
jp Menu_Start
SIMPLIFIED_COMP_INT:
call PutLine
.db "Y=P(1+R)^T",0
ld a, 4
call InlineOpt
.db "Y?",0,"P?",0,"R?",0,"T?",0
cp 1
jr z, SIMPLIFIED_COMP_INT_P
cp 2
jr z, SIMPLIFIED_COMP_INT_R
cp 3
jp z, SIMPLIFIED_COMP_INT_T
ld a, tA
call Prompt
.db "P=",0
ld a, tB
call Prompt
.db "R=",0
ld a, tC
call Prompt
.db "T=",0
call ParseExpr ;A(1+B)^C
.db tA,tLParen,t1,tAdd,tB,tRParen,tPower,tC,0
call PrintPause
jp Menu_Start
SIMPLIFIED_COMP_INT_P:
ld a, tA
call Prompt
.db "Y=",0
ld a, tB
call Prompt
.db "R=",0
ld a, tC
call Prompt
.db "T=",0
call ParseExpr ;A/(1+B)^C
.db tA,tDiv,tLParen,t1,tAdd,tB,tRParen,tPower,tC,0
call PrintPause
jp Menu_Start
SIMPLIFIED_COMP_INT_R:
ld a, tA
call Prompt
.db "Y=",0
ld a, tB
call Prompt
.db "P=",0
ld a, tC
call Prompt
.db "T=",0
call ParseExpr ;Cx√(A/B)-1
.db tC,tXRoot,tLParen,tA,tDiv,tB,tRParen,tSub,t1,0
call PrintPause
jp Menu_Start
SIMPLIFIED_COMP_INT_T:
ld a, tA
call Prompt
.db "Y=",0
ld a, tB
call Prompt
.db "P=",0
ld a, tC
call Prompt
.db "R=",0
call ParseExpr ;log(A/B)/log(1+C
.db tlog,tA,tDiv,tB,tLParen,tDiv,tlog,t1,tAdd,tC,0
call PrintPause
jp Menu_Start
CONTINUOUS_COMP_INT:
call PutLine
.db "Y=Ae^(KT)",0
ld a, 4
call InlineOpt
.db "Y?",0,"P?",0,"R?",0,"T?",0
cp 1
jr z, CONTINUOUS_COMP_INT_P
cp 2
jr z, CONTINUOUS_COMP_INT_R
cp 3
jr z, CONTINUOUS_COMP_INT_T
ld a, tX
call Prompt
.db "P=",0
ld a, tY
call Prompt
.db "R=",0
ld a, tAns
call Prompt
.db "T=",0
call ParseExpr ;Xe^(YAns
.db tX,tExp,tY,tAns,0
call PrintPause
jp Menu_Start
CONTINUOUS_COMP_INT_P:
ld a, tX
call Prompt
.db "Y=",0
ld a, tY
call Prompt
.db "R=",0
ld a, tAns
call Prompt
.db "T=",0
call ParseExpr ;X/e^(YAns
.db tX,tDiv,tExp,tY,tAns,0
call PrintPause
jp Menu_Start
CONTINUOUS_COMP_INT_R:
ld a, tX
call Prompt
.db "Y=",0
ld a, tY
call Prompt
.db "P=",0
ld a, tAns
call Prompt
.db "T=",0
call ParseExpr ;ln(X/Y)/Ans
.db tLn,tX,tDiv,tY,tLParen,tDiv,tAns,0
call PrintPause
jp Menu_Start
CONTINUOUS_COMP_INT_T:
ld a, tX
call Prompt
.db "Y=",0
ld a, tY
call Prompt
.db "P=",0
ld a, tAns
call Prompt
.db "R=",0
call ParseExpr ;ln(X/Y)/Ans
.db tLn,tX,tDiv,tY,tLParen,tDiv,tAns,0
call PrintPause
jp Menu_Start
DATA_INFO:
call PutLine
.db "ENTER AS LIST",0
ld a, tAns
call Prompt
.db "DATA=",0
call AppendStrInlineInit
.db "MEAN=",0
call ParseExpr
.db tMean,tAns,0
ld a, 11
bcall(_FormReal)
ld hl, OP3
call AppendStr
call PrintRightAlignStr
call AppendStrInlineInit
.db "MEDIAN=",0
call ParseExpr
.db tMedian,tAns,0
ld a, 9
bcall(_FormReal)
ld hl, OP3
call AppendStr
call PrintRightAlignStr
call ParseExpr ;sum((Ans-mean(Ans))²)/dim(Ans
.db tsum,tLParen,tAns,tSub,tMean,tAns,tRParen,tRParen,tSqr,tRParen,tDiv,tDim,tAns,0
call AppendStrInlineInit
.db "VARIANCE=",0
ld a, 7
bcall(_FormReal)
ld hl, OP3
call AppendStr
call PrintRightAlignStr
call SqRoot
call AppendStrInlineInit
.db "STD DEV=",0
ld a, 8
bcall(_FormReal)
ld hl, OP3
call AppendStr
call PrintRightAlignStr
; create lT
call DATA_INFO_TEMP_NAME
ld hl, 1
bcall(_CreateRList)
ld hl, 0
push hl
DATA_INFO_MODE_LOOP:
; get ans[1]
bcall(_AnsName)
rst rFindSym
ld a, (de)
or a
jp z, DATA_INFO_MODE_BREAK
ld hl, 1
bcall(_GetLToOP1)
bcall(_PushRealO1)
; delete ans[1]
bcall(_AnsName)
rst rFindSym
and 1Fh
ld h, d
ld l, e
ld c, (hl)
inc hl
ld b, (hl)
push bc
ld hl, 1
ld bc, 1
bcall(_DelListEl)
ld hl, 1
push hl
ld hl, 0
push hl
DATA_INFO_MODE_FIND_LOOP:
; get ans[hl]
bcall(_AnsName)
pop hl
inc hl
pop bc
pop de
bcall(_CpHLDE)
jr nc, DATA_INFO_MODE_FIND_BREAK
push de
push bc
push hl
rst rFindSym
pop hl
push hl
bcall(_GetLToOP1)
bcall(_PopRealO2)
bcall(_PushRealO2)
bcall(_CpOP1OP2)
jr nz, DATA_INFO_MODE_FIND_LOOP
pop hl
pop de
pop bc
dec hl
inc de
dec bc
push bc
push de
push hl
; del t[(sp)]
bcall(_AnsName)
rst rFindSym
and 1Fh
pop bc
push bc
inc bc
ld hl, 1
bcall(_DelListEl)
jr DATA_INFO_MODE_FIND_LOOP
DATA_INFO_MODE_FIND_BREAK:
ld h, b
ld l, c
pop de
bcall(_CpHLDE)
jr c, DATA_INFO_MODE_CONTINUE
push hl
jr z, DATA_INFO_MODE_ADD
; delete t.length-1 elements
call DATA_INFO_TEMP_NAME
rst rFindSym
push de
ld h, d
ld l, e
ld c, (hl)
inc hl
ld b, (hl)
ld h, b
ld l, c
dec hl
ld bc, 2
bcall(_DelListEl)
; set t[1]
bcall(_PopRealO1)
pop de
ld hl, 1
bcall(_PutToL)
jp DATA_INFO_MODE_LOOP
DATA_INFO_MODE_ADD:
; addpend from op stack
call DATA_INFO_TEMP_NAME
rst rFindSym
and 1Fh
bcall(_IncLstSize)
push de
push hl
bcall(_PopRealO1)
pop hl
pop de
bcall(_PutToL)
jp DATA_INFO_MODE_LOOP
DATA_INFO_MODE_CONTINUE:
push de
bcall(_PopRealO1)
jp DATA_INFO_MODE_LOOP
DATA_INFO_MODE_BREAK:
pop hl
call PutLine
.db "MODE=",0
call DATA_INFO_TEMP_NAME
bcall(_FormDisp)
bcall(_CleanAll)
call Pause
jp Menu_Start
DATA_INFO_TEMP_NAME:
ld hl, 2401h
ld (OP1), hl
ld hl, (pTempCnt)
ld (OP1+2), hl
ret
MARGIN_OF_ERROR:
call PutLine
.db "2√P(1-P)/N",0
ld a, tX
call Prompt
.db "PERCENT=",0
ld a, tY
call Prompt
.db "NUMBER=",0
call ParseExpr ;2√X(1-X)/Y
.db t2,tSqrt,tX,tLParen,t1,tSub,tX,tRParen,tDiv,tY,0
call PrintPause
jp Menu_Start
NUMBER_FROM_ME:
call PutLine
.db "P(1-P)/(M/2)²",0
ld a, tX
call Prompt
.db "PERCENT=",0
ld a, tY
call Prompt
.db "MARGIN=",0
call ParseExpr ;X(1-X)/(Y/2)²
.db tX,tLParen,t1,tSub,tX,tRParen,tDiv,tLParen,tY,tDiv,t2,tRParen,tSqr,0
call PrintPause
jp Menu_Start | 16.601942 | 84 | 0.687281 |
34687bad514ac0a54fa496f9402ddfd2859cb723 | 5,596 | asm | Assembly | kernel/kernel.asm | OmegaZhou/SImpleOS | c8b29dd12c860943ea62a0d66792899c90958d99 | [
"MIT"
] | null | null | null | kernel/kernel.asm | OmegaZhou/SImpleOS | c8b29dd12c860943ea62a0d66792899c90958d99 | [
"MIT"
] | null | null | null | kernel/kernel.asm | OmegaZhou/SImpleOS | c8b29dd12c860943ea62a0d66792899c90958d99 | [
"MIT"
] | null | null | null | SELECTOR_KERNEL_CS equ 8
; global function
extern cstart
extern exception_handler
extern spurious_irq
extern main
; global value
extern gdt_ptr
extern idt_ptr
extern disp_pos
extern irq_table
[SECTION .bss]
StackSpace resb 2 * 1024
StackTop:
[section .text]
global _start
global divide_error
global single_step_exception
global nmi
global breakpoint_exception
global overflow
global bounds_check
global inval_opcode
global copr_not_available
global double_fault
global copr_seg_overrun
global inval_tss
global segment_not_present
global stack_exception
global general_protection
global page_fault
global copr_error
global hwint00
global hwint01
global hwint02
global hwint03
global hwint04
global hwint05
global hwint06
global hwint07
global hwint08
global hwint09
global hwint10
global hwint11
global hwint12
global hwint13
global hwint14
global hwint15
_start:
mov esp, StackTop
sgdt [gdt_ptr]
call cstart
lgdt [gdt_ptr]
lidt [idt_ptr]
jmp SELECTOR_KERNEL_CS:csinit
csinit:
jmp main
hlt
INT_M_CTL equ 0x20 ; I/O port for interrupt controller <Master>
INT_M_CTL_MASK equ 0x21 ; setting bits in this port disables ints <Master>
INT_S_CTL equ 0xA0 ; I/O port for second interrupt controller <Slave>
INT_S_CTL_MASK equ 0xA1 ; setting bits in this port disables ints <Slave>
EOI equ 0x20
; 中断和异常 -- 硬件中断
; ---------------------------------
%macro hwint_master 1
in al, INT_M_CTL_MASK ; `.
or al, (1 << %1) ; | 屏蔽当前中断
out INT_M_CTL_MASK, al ; /
mov al, EOI ; `. 置EOI位
out INT_M_CTL, al ; /
sti ; CPU在响应中断的过程中会自动关中断,这句之后就允许响应新的中断
push %1
call [irq_table + 4*%1]
pop ecx ; /
cli
in al, INT_M_CTL_MASK ; `.
and al, ~(1 << %1) ; | 恢复接受当前中断
out INT_M_CTL_MASK, al ; /
ret
%endmacro
; ---------------------------------
ALIGN 16
hwint00: ; Interrupt routine for irq 0 (the clock).
hwint_master 0
ALIGN 16
hwint01: ; Interrupt routine for irq 1 (keyboard)
hwint_master 1
ALIGN 16
hwint02: ; Interrupt routine for irq 2 (cascade!)
hwint_master 2
ALIGN 16
hwint03: ; Interrupt routine for irq 3 (second serial)
hwint_master 3
ALIGN 16
hwint04: ; Interrupt routine for irq 4 (first serial)
hwint_master 4
ALIGN 16
hwint05: ; Interrupt routine for irq 5 (XT winchester)
hwint_master 5
ALIGN 16
hwint06: ; Interrupt routine for irq 6 (floppy)
hwint_master 6
ALIGN 16
hwint07: ; Interrupt routine for irq 7 (printer)
hwint_master 7
; ---------------------------------
%macro hwint_slave 1
in al, INT_S_CTL_MASK ; `.
or al, (1 << (%1 - 8)) ; | 屏蔽当前中断
out INT_S_CTL_MASK, al ; /
mov al, EOI ; `. 置EOI位(master)
out INT_M_CTL, al ; /
nop ; `. 置EOI位(slave)
out INT_S_CTL, al ; / 一定注意:slave和master都要置EOI
sti ; CPU在响应中断的过程中会自动关中断,这句之后就允许响应新的中断
push %1 ; `.
call [irq_table + 4 * %1] ; | 中断处理程序
pop ecx ; /
cli
in al, INT_S_CTL_MASK ; `.
and al, ~(1 << (%1 - 8)) ; | 恢复接受当前中断
out INT_S_CTL_MASK, al ; /
ret
%endmacro
; ---------------------------------
ALIGN 16
hwint08: ; Interrupt routine for irq 8 (realtime clock).
hwint_slave 8
ALIGN 16
hwint09: ; Interrupt routine for irq 9 (irq 2 redirected)
hwint_slave 9
ALIGN 16
hwint10: ; Interrupt routine for irq 10
hwint_slave 10
ALIGN 16
hwint11: ; Interrupt routine for irq 11
hwint_slave 11
ALIGN 16
hwint12: ; Interrupt routine for irq 12
hwint_slave 12
ALIGN 16
hwint13: ; Interrupt routine for irq 13 (FPU exception)
hwint_slave 13
ALIGN 16
hwint14: ; Interrupt routine for irq 14 (AT winchester)
hwint_slave 14
ALIGN 16
hwint15: ; Interrupt routine for irq 15
hwint_slave 15
; 中断和异常 -- 异常
divide_error:
push 0xFFFFFFFF ; no err code
push 0 ; vector_no = 0
jmp exception
single_step_exception:
push 0xFFFFFFFF ; no err code
push 1 ; vector_no = 1
jmp exception
nmi:
push 0xFFFFFFFF ; no err code
push 2 ; vector_no = 2
jmp exception
breakpoint_exception:
push 0xFFFFFFFF ; no err code
push 3 ; vector_no = 3
jmp exception
overflow:
push 0xFFFFFFFF ; no err code
push 4 ; vector_no = 4
jmp exception
bounds_check:
push 0xFFFFFFFF ; no err code
push 5 ; vector_no = 5
jmp exception
inval_opcode:
push 0xFFFFFFFF ; no err code
push 6 ; vector_no = 6
jmp exception
copr_not_available:
push 0xFFFFFFFF ; no err code
push 7 ; vector_no = 7
jmp exception
double_fault:
push 8 ; vector_no = 8
jmp exception
copr_seg_overrun:
push 0xFFFFFFFF ; no err code
push 9 ; vector_no = 9
jmp exception
inval_tss:
push 10 ; vector_no = A
jmp exception
segment_not_present:
push 11 ; vector_no = B
jmp exception
stack_exception:
push 12 ; vector_no = C
jmp exception
general_protection:
push 13 ; vector_no = D
jmp exception
page_fault:
push 14 ; vector_no = E
jmp exception
copr_error:
push 0xFFFFFFFF ; no err code
push 16 ; vector_no = 10h
jmp exception
exception:
call exception_handler
add esp, 4*2 ; 让栈顶指向 EIP,堆栈中从顶向下依次是:EIP、CS、EFLAGS
hlt
save:
pushad
push ds
push es
push fs
push gs
ret
restart:
pop gs
pop fs
pop es
pop ds
popad
| 21.689922 | 77 | 0.634739 |
9c2e2214e9a8ba82e7cfd21aa9f0f1854021a241 | 3,317 | asm | Assembly | OrcaHLL/MinnowTest.asm | jaredwhitney/os3 | 05e0cda4670da093cc720d0dccbfeb29e788fa0f | [
"MIT"
] | 5 | 2015-02-25T01:28:09.000Z | 2021-05-22T09:03:04.000Z | OrcaHLL/MinnowTest.asm | jaredwhitney/os3 | 05e0cda4670da093cc720d0dccbfeb29e788fa0f | [
"MIT"
] | 38 | 2015-02-10T18:37:11.000Z | 2017-10-03T03:08:50.000Z | OrcaHLL/MinnowTest.asm | jaredwhitney/os3 | 05e0cda4670da093cc720d0dccbfeb29e788fa0f | [
"MIT"
] | 2 | 2016-05-06T22:48:46.000Z | 2017-01-12T19:28:49.000Z | [bits 32]
dd MinnowTest.$FILE_END - MinnowTest.$FILE_START
db "OrcaHLL Class", 0
db "MinnowTest", 0
MinnowTest.$FILE_START :
MinnowTest.$global.nameToDelete :
dd 0x0
MinnowTest.$global.type :
dd 0x0
MinnowTest.$global.fileContents :
dd 0x0
MinnowTest.$global.nameToUse :
dd 0x0
MinnowTest.$global.name1 :
dd 0x0
MinnowTest.$global.name0 :
dd 0x0
MinnowTest.$global.switch :
db 0x0
MinnowTest._init:
pop dword [MinnowTest._init.returnVal]
push eax
push ebx
push edx
mov ecx, 20
push ecx
mov ax, 0x0502
int 0x30
mov [MinnowTest.$global.nameToUse], ecx
mov ecx, 20
push ecx
mov ax, 0x0502
int 0x30
mov [MinnowTest.$global.nameToDelete], ecx
mov ecx, [MinnowTest._init.string_0]
mov [MinnowTest.$global.name0], ecx
mov ecx, [MinnowTest._init.string_1]
mov [MinnowTest.$global.name1], ecx
mov ecx, [MinnowTest._init.string_2]
mov [MinnowTest.$global.type], ecx
mov ecx, [MinnowTest._init.string_3]
mov [MinnowTest.$global.fileContents], ecx
pop edx
pop ebx
pop eax
push dword [MinnowTest._init.returnVal]
ret
;Vars:
MinnowTest._init.string_3 :
dd MinnowTest._init.string_3_data
MinnowTest._init.string_0_data :
db "Write Test", 0
MinnowTest._init.string_0 :
dd MinnowTest._init.string_0_data
MinnowTest._init.string_1_data :
db "Filesystem Test", 0
MinnowTest._init.string_2_data :
db "Text", 0
MinnowTest._init.string_3_data :
db "This is some test text that has been written to the filesystem with the new Minnow.WriteFile() command!", 0
MinnowTest._init.string_1 :
dd MinnowTest._init.string_1_data
MinnowTest._init.string_2 :
dd MinnowTest._init.string_2_data
MinnowTest._init.returnVal:
dd 0x0
MinnowTest.RunTest:
pop dword [MinnowTest.RunTest.returnVal]
push eax
push ebx
push edx
push ebx
mov ebx, MinnowTest.$global.nameToUse
mov ecx, 0
push ecx
mov ecx, 0
push ecx
call String.SetChar
pop ebx
push ebx
mov ebx, MinnowTest.$global.nameToDelete
mov ecx, 0
push ecx
mov ecx, 0
push ecx
call String.SetChar
pop ebx
mov ecx, [MinnowTest.$global.name1]
push ecx
mov ecx, [MinnowTest.$global.type]
push ecx
call Minnow.CheckExists
cmp cl, 0xFF
jne MinnowTest.$loop_if.0_close
push ebx
mov ebx, MinnowTest.$global.nameToUse
mov ecx, [MinnowTest.$global.name0]
push ecx
call String.Append
pop ebx
push ebx
mov ebx, MinnowTest.$global.nameToDelete
mov ecx, [MinnowTest.$global.name1]
push ecx
call String.Append
pop ebx
MinnowTest.$loop_if.0_close :
mov ecx, [MinnowTest.$global.name0]
push ecx
mov ecx, [MinnowTest.$global.type]
push ecx
call Minnow.CheckExists
cmp cl, 0xFF
jne MinnowTest.$loop_if.1_close
push ebx
mov ebx, MinnowTest.$global.nameToUse
mov ecx, [MinnowTest.$global.name1]
push ecx
call String.Append
pop ebx
push ebx
mov ebx, MinnowTest.$global.nameToDelete
mov ecx, [MinnowTest.$global.name0]
push ecx
call String.Append
pop ebx
MinnowTest.$loop_if.1_close :
mov ecx, [MinnowTest.$global.nameToDelete]
push ecx
mov ecx, [MinnowTest.$global.type]
push ecx
call Minnow.DeleteFile
mov ecx, [MinnowTest.$global.nameToUse]
push ecx
mov ecx, [MinnowTest.$global.type]
push ecx
mov ecx, [MinnowTest.$global.fileContents]
push ecx
push ebx
mov ebx, MinnowTest.$global.fileContents
call String.GetLength
pop ebx
push ecx
call Minnow.WriteFile
pop edx
pop ebx
pop eax
push dword [MinnowTest.RunTest.returnVal]
ret
;Vars:
MinnowTest.RunTest.returnVal:
dd 0x0
MinnowTest.$FILE_END :
| 20.349693 | 112 | 0.782032 |
98efb75398608a752f3fe6009c989ae03e11c9dd | 3,276 | asm | Assembly | libsrc/_DEVELOPMENT/adt/ba_priority_queue/z80/__b_heap_sift_down.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/adt/ba_priority_queue/z80/__b_heap_sift_down.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/adt/ba_priority_queue/z80/__b_heap_sift_down.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null |
SECTION code_adt_ba_priority_queue
PUBLIC __b_heap_sift_down
EXTERN l_compare_de_hl, l_ltu_de_hl, error_znc
__b_heap_sift_down:
; assumes 1-based array
;
; enter : bc = array
; de = start_index in bytes
; hl = n = number of bytes in queue
; ix = compare
;
; exit : hl = 0
; carry reset
;
; uses : af, bc, de, hl
push hl ; save n
ld l,e
ld h,d ; hl = parent_index
add hl,hl
jp c, error_znc - 1
ex de,hl ; de = child_index
add hl,bc
ex (sp),hl
; de = child_index
; hl = n
; bc = array
; stack = & array[parent_index]
while:
; sifted to the bottom ?
call l_ltu_de_hl
jr nc, end_while ; if child_index >= n, exit loop
ex (sp),hl
push hl
push de
ex de,hl
; choose smallest child
; hl = child_index
; bc = array
; stack = n, & array[parent_index], child_index
add hl,bc
ld e,l
ld d,h ; de = & array[left_child]
inc hl ; hl = & array[right_child]
call l_compare_de_hl ; (compar)(de = void *left_child, hl = void *right_child)
pop hl ; hl = left_child_index
jp m, small_child_found
inc hl ; hl = right_child_index
inc de ; de = & array[right_child]
small_child_found:
ex (sp),hl
; bc = array
; hl = & array[parent_index]
; de = & array[child_index]
; stack = n, child_index
; find out if parent needs to be pushed further down
call l_compare_de_hl ; (compar)(de = void *child, hl = void *parent)
jp p, error_znc - 2 ; if array[parent] <= array[child], it's in the right place so return
push bc ; save array
ex de,hl
; swap(array[child], array[parent])
; hl = & array[child]
; de = & array[parent]
; stack = n, child_index, array
ld c,(hl)
ld a,(de)
ld (hl),a
ld a,c
ld (de),a
ex de,hl ; de = & array[child]
pop bc ; bc = array
pop hl ; hl = child_index
; child becomes parent
add hl,hl ; hl = new child_index = old_child_index * 2
jp c, error_znc - 1
; de = & array[parent]
; bc = array
; hl = child_index
; stack = n
ex de,hl
ex (sp),hl
; de = child_index
; hl = n
; bc = array
; stack = & array[parent_index]
jr while
end_while:
; child_index >= n
jp nz, error_znc - 1 ; if child_index > n, return
; there is one last comparison to be made against last item in array
; de = child_index
; bc = array
; stack = & array[parent_index]
ex de,hl
add hl,bc ; hl = & array[child]
pop de ; de = & array[parent]
ex de,hl
call l_compare_de_hl ; (compar)(de = void *child, hl = void *parent)
jp p, error_znc ; if array[child] >= array[parent], parent is in right place
; swap(array[child], array[parent])
ld c,(hl)
ld a,(de)
ld (hl),a
ld a,c
ld (de),a
jp error_znc
| 21.135484 | 100 | 0.508242 |
c0d0694abe5c5858e469cd8425897742cae0c29e | 9,959 | asm | Assembly | Library/Spreadsheet/UI/uiChart.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Library/Spreadsheet/UI/uiChart.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Library/Spreadsheet/UI/uiChart.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z | COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE: uiChart.asm
AUTHOR: Gene Anderson, Sep 13, 1992
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
Gene 9/13/92 Initial revision
DESCRIPTION:
Code for SSChartControlClass
$Id: uiChart.asm,v 1.1 97/04/07 11:12:17 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
;---------------------------------------------------
SpreadsheetClassStructures segment resource
SSChartControlClass ;declare the class record
SpreadsheetClassStructures ends
;---------------------------------------------------
ChartControlCode segment resource
if _CHARTS
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SSCCGetInfo
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get GenControl info for the SSChartControl
CALLED BY: MSG_GEN_CONTROL_GET_INFO
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of SSChartControlClass
ax - the message
cx:dx - GenControlBuildInfo structure to fill in
RETURN: cx:dx - filled in
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 5/22/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSCCGetInfo method dynamic SSChartControlClass, \
MSG_GEN_CONTROL_GET_INFO
mov si, offset SSCC_dupInfo
mov es, cx
mov di, dx ;es:di = dest
segmov ds, cs
mov cx, size GenControlBuildInfo
rep movsb
ret
SSCCGetInfo endm
SSCC_dupInfo GenControlBuildInfo <
mask GCBF_SUSPEND_ON_APPLY, ; GCBI_flags
SSCC_IniFileKey, ; GCBI_initFileKey
SSCC_gcnList, ; GCBI_gcnList
length SSCC_gcnList, ; GCBI_gcnCount
SSCC_notifyTypeList, ; GCBI_notificationList
length SSCC_notifyTypeList, ; GCBI_notificationCount
SSCCName, ; GCBI_controllerName
handle SSChartUI, ; GCBI_dupBlock
SSCC_childList, ; GCBI_childList
length SSCC_childList, ; GCBI_childCount
SSCC_featuresList, ; GCBI_featuresList
length SSCC_featuresList, ; GCBI_featuresCount
SSCC_DEFAULT_FEATURES, ; GCBI_features
handle SSChartToolUI, ; GCBI_toolBlock
SSCC_toolList, ; GCBI_toolList
length SSCC_toolList, ; GCBI_toolCount
SSCC_toolFeaturesList, ; GCBI_toolFeaturesList
length SSCC_toolFeaturesList, ; GCBI_toolFeaturesCount
SSCC_DEFAULT_TOOLBOX_FEATURES> ; GCBI_toolFeatures
SSCC_IniFileKey char "ssChart", 0
SSCC_gcnList GCNListType \
<MANUFACTURER_ID_GEOWORKS, GAGCNLT_APP_TARGET_NOTIFY_SPREADSHEET_SELECTION_CHANGE>
SSCC_notifyTypeList NotificationType \
<MANUFACTURER_ID_GEOWORKS, GWNT_SPREADSHEET_SELECTION_CHANGE>
;---
ifdef SPIDER_CHART
SSCC_childList GenControlChildInfo \
<offset ColumnTrigger, mask SSCCF_COLUMN, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset BarTrigger, mask SSCCF_BAR, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset LineTrigger, mask SSCCF_LINE, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset AreaTrigger, mask SSCCF_AREA, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset ScatterTrigger, mask SSCCF_SCATTER, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset PieTrigger, mask SSCCF_PIE, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset HighLowTrigger, mask SSCCF_HIGH_LOW, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset SpiderTrigger, mask SSCCF_SPIDER, mask GCCF_IS_DIRECTLY_A_FEATURE>
else
SSCC_childList GenControlChildInfo \
<offset ColumnTrigger, mask SSCCF_COLUMN, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset BarTrigger, mask SSCCF_BAR, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset LineTrigger, mask SSCCF_LINE, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset AreaTrigger, mask SSCCF_AREA, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset ScatterTrigger, mask SSCCF_SCATTER, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset PieTrigger, mask SSCCF_PIE, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset HighLowTrigger, mask SSCCF_HIGH_LOW, mask GCCF_IS_DIRECTLY_A_FEATURE>
endif
; Careful, this table is in the *opposite* order as the record which
; it corresponds to.
ifdef SPIDER_CHART
SSCC_featuresList GenControlFeaturesInfo \
<offset ColumnTrigger, SSCCColumnName, 0>,
<offset BarTrigger, SSCCBarName, 0>,
<offset LineTrigger, SSCCLineName, 0>,
<offset AreaTrigger, SSCCAreaName, 0>,
<offset ScatterTrigger, SSCCScatterName, 0>,
<offset PieTrigger, SSCCPieName, 0>,
<offset HighLowTrigger, SSCCHighLowName, 0>,
<offset SpiderTrigger, SSCCSpiderName, 0>
else
SSCC_featuresList GenControlFeaturesInfo \
<offset ColumnTrigger, SSCCColumnName, 0>,
<offset BarTrigger, SSCCBarName, 0>,
<offset LineTrigger, SSCCLineName, 0>,
<offset AreaTrigger, SSCCAreaName, 0>,
<offset ScatterTrigger, SSCCScatterName, 0>,
<offset PieTrigger, SSCCPieName, 0>,
<offset HighLowTrigger, SSCCHighLowName, 0>
endif
;---
ifdef SPIDER_CHART
SSCC_toolList GenControlChildInfo \
<offset ColumnTool, mask SSCCTF_COLUMN, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset BarTool, mask SSCCTF_BAR, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset LineTool, mask SSCCTF_LINE, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset AreaTool, mask SSCCTF_AREA, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset ScatterTool, mask SSCCTF_SCATTER, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset PieTool, mask SSCCTF_PIE, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset HighLowTool, mask SSCCTF_HIGH_LOW, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset SpiderTool, mask SSCCTF_SPIDER, mask GCCF_IS_DIRECTLY_A_FEATURE>
else
SSCC_toolList GenControlChildInfo \
<offset ColumnTool, mask SSCCTF_COLUMN, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset BarTool, mask SSCCTF_BAR, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset LineTool, mask SSCCTF_LINE, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset AreaTool, mask SSCCTF_AREA, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset ScatterTool, mask SSCCTF_SCATTER, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset PieTool, mask SSCCTF_PIE, mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset HighLowTool, mask SSCCTF_HIGH_LOW, mask GCCF_IS_DIRECTLY_A_FEATURE>
endif
; Careful, this table is in the *opposite* order as the record which
; it corresponds to.
ifdef SPIDER_CHART
SSCC_toolFeaturesList GenControlFeaturesInfo \
<offset ColumnTool, SSCCColumnName, 0>,
<offset BarTool, SSCCBarName, 0>,
<offset LineTool, SSCCLineName, 0>,
<offset AreaTool, SSCCAreaName, 0>,
<offset ScatterTool, SSCCScatterName, 0>,
<offset PieTool, SSCCPieName, 0>,
<offset HighLowTool, SSCCHighLowName, 0>,
<offset SpiderTool, SSCCSpiderName, 0>
else
SSCC_toolFeaturesList GenControlFeaturesInfo \
<offset ColumnTool, SSCCColumnName, 0>,
<offset BarTool, SSCCBarName, 0>,
<offset LineTool, SSCCLineName, 0>,
<offset AreaTool, SSCCAreaName, 0>,
<offset ScatterTool, SSCCScatterName, 0>,
<offset PieTool, SSCCPieName, 0>,
<offset HighLowTool, SSCCHighLowName, 0>
endif
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SSCCUpdateUI
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Update UI for SSChartController
CALLED BY: MSG_GEN_CONTROL_UPDATE_UI
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of SSChartControlClass
ax - the message
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 9/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSCCUpdateUI method dynamic SSChartControlClass,
MSG_GEN_CONTROL_UPDATE_UI
;
; Get the notification block
;
mov bx, ss:[bp].GCUUIP_dataBlock
push ds
call MemLock
mov ds, ax
mov dx, ds:NSSSC_flags ;dx <- SSheetSelectionFlags
call MemUnlock
pop ds
;
; Enable or disable the menu UI
;
mov ax, ss:[bp].GCUUIP_features
mov bx, ss:[bp].GCUUIP_childBlock
mov cx, length SSCC_childList ;cx <- # of entries
mov di, offset SSCC_childList
call childLoop
;
; Enable or disable the tool UI
;
mov ax, ss:[bp].GCUUIP_toolboxFeatures
mov bx, ss:[bp].GCUUIP_toolBlock
mov cx, length SSCC_toolList
mov di, offset SSCC_toolList
call childLoop
ret
childLoop:
test ax, 0x0001 ;does feature exist?
jz noFeature ;branch if feature doesn't exist
push ax, di, cx, dx
mov ax, MSG_GEN_SET_NOT_ENABLED
test dx, mask SSSF_SINGLE_CELL
jnz doEnableDisable
mov ax, MSG_GEN_SET_ENABLED
doEnableDisable:
mov si, cs:[di].GCCI_object ;^lbx:si <- OD of object
mov di, mask MF_FIXUP_DS
mov dl, VUM_NOW
call ObjMessage
pop ax, di, cx, dx
noFeature:
shr ax, 1 ;ax <- next bit to test
add di, (size GenControlChildInfo)
loop childLoop
retn
SSCCUpdateUI endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SSCCChart
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Send chart message to the spreadsheet
CALLED BY: MSG_SSCC_CHART
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of SSChartControlClass
ax - the message
cl - ChartType
ch - ChartVariation
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 9/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSCCChart method dynamic SSChartControlClass,
MSG_SSCC_CHART
mov ax, MSG_SPREADSHEET_CHART_RANGE
call SSCSendToSpreadsheet
ret
SSCCChart endm
endif
ChartControlCode ends
| 31.416404 | 84 | 0.682799 |
4e5dc7042dfa8a98737ea5aa4b01aa0622ca2c7b | 7,008 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_540.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_0xca_notsx.log_21829_540.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_0xca_notsx.log_21829_540.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 %r8
push %r9
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x14696, %rsi
lea addresses_D_ht+0x119c6, %rdi
nop
nop
and $62023, %rbp
mov $67, %rcx
rep movsq
nop
nop
nop
nop
xor %r14, %r14
lea addresses_WC_ht+0x11a96, %r10
nop
nop
nop
inc %r8
mov $0x6162636465666768, %rcx
movq %rcx, (%r10)
nop
nop
nop
and $43973, %r8
lea addresses_normal_ht+0x2dde, %rsi
lea addresses_WT_ht+0x7556, %rdi
nop
nop
xor %r9, %r9
mov $82, %rcx
rep movsw
nop
dec %r10
lea addresses_WT_ht+0x1a4fe, %rdi
nop
sub $60724, %r14
mov $0x6162636465666768, %rsi
movq %rsi, (%rdi)
sub $17041, %rdi
lea addresses_A_ht+0x8396, %rbp
nop
nop
nop
nop
sub %r9, %r9
mov (%rbp), %ecx
nop
nop
add %rbp, %rbp
lea addresses_A_ht+0x1bf46, %r8
add %rcx, %rcx
mov $0x6162636465666768, %rsi
movq %rsi, %xmm3
vmovups %ymm3, (%r8)
nop
nop
inc %rcx
lea addresses_A_ht+0xbdf5, %rsi
lea addresses_normal_ht+0xb256, %rdi
dec %r14
mov $6, %rcx
rep movsb
sub %r14, %r14
lea addresses_UC_ht+0x10996, %r10
nop
nop
nop
nop
inc %r8
mov $0x6162636465666768, %rsi
movq %rsi, (%r10)
nop
add %rdi, %rdi
lea addresses_UC_ht+0x15dd6, %rsi
lea addresses_WT_ht+0x10596, %rdi
nop
nop
nop
nop
nop
sub $62151, %r8
mov $6, %rcx
rep movsb
nop
nop
and $27783, %r9
lea addresses_D_ht+0x18a96, %rbp
nop
add $18725, %rdi
movw $0x6162, (%rbp)
nop
nop
nop
nop
nop
cmp %rcx, %rcx
lea addresses_WC_ht+0x12d96, %r8
nop
sub %rsi, %rsi
mov (%r8), %r9w
nop
nop
nop
nop
nop
xor $10439, %r8
lea addresses_UC_ht+0x10196, %rcx
clflush (%rcx)
nop
nop
nop
sub $32965, %r9
mov (%rcx), %rdi
and %r10, %r10
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r14
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r14
push %rbp
push %rbx
push %rdi
push %rsi
// Faulty Load
lea addresses_normal+0x6296, %rsi
nop
nop
nop
nop
nop
sub $11581, %r12
vmovups (%rsi), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $0, %xmm1, %r14
lea oracles, %rbx
and $0xff, %r14
shlq $12, %r14
mov (%rbx,%r14,1), %r14
pop %rsi
pop %rdi
pop %rbx
pop %rbp
pop %r14
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_normal', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_normal', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 11, 'NT': False, 'type': 'addresses_WC_ht', 'size': 8, 'AVXalign': False}}
{'src': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False}}
{'src': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_A_ht', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_A_ht', 'size': 32, 'AVXalign': False}}
{'src': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False}}
{'src': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 10, 'NT': False, 'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False}}
{'src': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'}
{'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.276596 | 2,999 | 0.659532 |
5fdbedf0fa332d183910a764d345db520217e2b1 | 373 | asm | Assembly | programs/oeis/004/A004737.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/004/A004737.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/004/A004737.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A004737: Concatenation of sequences (1,2,...,n-1,n,n-1,...,1) for n >= 1.
; 1,1,2,1,1,2,3,2,1,1,2,3,4,3,2,1,1,2,3,4,5,4,3,2,1,1,2,3,4,5,6,5,4,3,2,1,1,2,3,4,5,6,7,6,5,4,3,2,1,1,2,3,4,5,6,7,8,7,6,5,4,3,2,1,1,2,3,4,5,6,7,8,9,8,7,6,5,4,3,2,1,1,2,3,4,5,6,7,8,9,10,9,8,7,6,5,4,3,2,1
mul $0,2
mov $1,1
lpb $0
sub $0,$1
gcd $0,$2
sub $0,1
add $1,4
lpe
div $0,2
add $0,1
| 26.642857 | 202 | 0.514745 |
37307290b703a7b46283e6633bc81b5ac9153a2c | 551 | asm | Assembly | programs/oeis/168/A168539.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/168/A168539.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/168/A168539.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A168539: Terms of A123239 which are prime in Z(i), Z(rho) and Z(sqrt(2)).
; 11,59,83,107,131,179,227,251,347,419,443,467,491,563,587,659,683,827,947,971,1019,1091,1163,1187,1259,1283,1307,1427,1451,1499,1523,1571,1619,1667,1787,1811,1907,1931,1979,2003,2027,2099,2243,2267,2339
mov $2,$0
add $2,1
pow $2,2
lpb $2
add $1,10
sub $2,1
mov $3,$1
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,14
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
lpe
div $1,2
sub $1,22
mul $1,2
add $1,31
mov $0,$1
| 22.958333 | 203 | 0.651543 |
a82dd2d9971c77407f7b12d0eae16f1b6a10c179 | 684 | asm | Assembly | oeis/027/A027180.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/027/A027180.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/027/A027180.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A027180: a(n) = Sum_{0<=j<=i<=n} A027170(i, j).
; Submitted by Jamie Morken(s3)
; 1,7,27,79,199,459,1003,2119,4383,8947,18115,36495,73303,146971,294363,589207,1178959,2358531,4717747,9436255,18873351,37747627,75496267,150993639,301988479,603978259,1207957923,2415917359,4831836343,9663674427,19327350715,38654703415,77309408943,154618820131,309237642643,618475287807,1236950578279,2473901159371,4947802321707,9895604646535,19791209296351,39582418596147,79164837195907,158329674395599,316659348795159,633318697594459,1266637395193243,2533274790390999,5066549580786703
mov $1,3
mov $3,1
lpb $0
sub $0,1
add $2,$1
add $3,1
add $1,$3
mul $1,2
lpe
mov $0,$2
mul $0,2
add $0,1
| 40.235294 | 486 | 0.79386 |
1166c39ff6bcdcef3a8c5c4a57c2f8a37623da7f | 336 | asm | Assembly | programs/oeis/309/A309685.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/309/A309685.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/309/A309685.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A309685: Number of even parts appearing among the smallest parts of the partitions of n into 3 parts.
; 0,0,0,0,0,0,1,1,2,2,3,3,5,5,7,7,9,9,12,12,15,15,18,18,22,22,26,26,30,30,35,35,40,40,45,45,51,51,57,57,63,63,70,70,77,77,84,84,92,92,100,100,108,108,117,117,126,126,135,135,145,145,155,155,165
div $0,2
bin $0,2
div $0,3
mov $1,$0
| 42 | 193 | 0.681548 |
d8fd4c96d9d61cf8d420e2dba98422d3a13ef66e | 213 | asm | Assembly | libsrc/math/genmath/hladd.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/math/genmath/hladd.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/math/genmath/hladd.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | ; Small C+ Math Library
; General "fudging routine"
PUBLIC hladd
EXTERN ldbchl
EXTERN fadd
;
.hladd
CALL ldbchl
JP fadd
| 15.214286 | 33 | 0.431925 |
4edfebdddcbcdbcb86d7c269340d8cfe288dbf19 | 143 | asm | Assembly | kernel/boot/limine/header.asm | unsafecast/quartz | b9d4f9a2858d364a95c6351f01bf68da77ee3f1b | [
"MIT"
] | 3 | 2021-04-10T23:47:26.000Z | 2021-09-15T02:22:06.000Z | kernel/boot/limine/header.asm | unsafecast/quartz | b9d4f9a2858d364a95c6351f01bf68da77ee3f1b | [
"MIT"
] | null | null | null | kernel/boot/limine/header.asm | unsafecast/quartz | b9d4f9a2858d364a95c6351f01bf68da77ee3f1b | [
"MIT"
] | null | null | null | extern KernelStackTop
extern EarlyInit
section .stivale2hdr
align 4
Stivale2Header:
dq EarlyInit
dq KernelStackTop
dq 0
dq 0
| 11.916667 | 21 | 0.741259 |
36d4235e3022754c83614ac6f4d36726a5785eb1 | 359 | asm | Assembly | programs/oeis/029/A029004.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/029/A029004.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/029/A029004.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A029004: Expansion of 1/((1-x)(1-x^2)(1-x^3)(1-x^10)).
; 1,1,2,3,4,5,7,8,10,12,15,17,21,24,28,32,37,41,47,52,59,65,73,80,89,97,107,116,127,137,150,161,175,188,203,217,234,249,267,284,304,322,344,364,387,409,434,457,484,509
mov $1,17
lpb $0
mov $2,$0
sub $0,1
cal $2,25770 ; Expansion of 1/((1-x)(1-x^3)(1-x^10)).
sub $0,1
add $1,$2
lpe
sub $1,16
| 27.615385 | 167 | 0.601671 |
9214284e3fd80684afe3445fd7bfa5f5b64def16 | 1,965 | asm | Assembly | 45/beef/drv/kbd/src/keyddl3.asm | minblock/msdos | 479ffd237d9bb7cc83cb06361db2c4ef42dfbac0 | [
"Apache-2.0"
] | null | null | null | 45/beef/drv/kbd/src/keyddl3.asm | minblock/msdos | 479ffd237d9bb7cc83cb06361db2c4ef42dfbac0 | [
"Apache-2.0"
] | null | null | null | 45/beef/drv/kbd/src/keyddl3.asm | minblock/msdos | 479ffd237d9bb7cc83cb06361db2c4ef42dfbac0 | [
"Apache-2.0"
] | null | null | null | ;*
;* CW : Character Windows Drivers
;*
;* keyddl3.asm : DOS 3 keyboard special shift handling tables
;*
;****************************************************************************
;
; The following two data objects are bit-packed boolean arrays
; whose indices are key scan codes (sc's).
; mpscffAltDiddle[sc] = 1 indicates that ALT-sc needs special
; handling to get it past the BIOS.
; mpscffCtrlDiddle[sc] is the same thing for CTRL-sc.
mpscffAltDiddle equ this byte ; Which ALT- keys require diddling
db 00000000b ; 0-
db 01100000b ; 8- '=', Backspace
db 00000000b ; 16-
db 00000000b ; 24-
db 00000000b ; 32-
db 00000000b ; 40-
db 00000000b ; 48-
db 00000000b ; 56-
db 00000000b ; 64-
db 01000100b ; 72- SUBTRACT, LEFT_ARROW, RIGHT_ARROW, ADD
db 00000000b ; 80-
db 00000000b ; 88-
db 00000000b ; 96-
db 00000000b ; 104-
db 00000000b ; 112-
db 00000000b ; 120-
mpscffCtrlDiddle equ this byte ; Which CTRL- keys require diddling
db 11111100b ; 0- '1', '2', '3', '4', '5', '6'
db 10101111b ; 8- '7', '8', '9', '0', '=', TAB
db 00000000b ; 16-
db 00000000b ; 24-
db 10000000b ; 32- ';'
db 00000001b ; 40- "'"
db 00011000b ; 48- ',' '.'
db 00000000b ; 56-
db 00000000b ; 64-
db 01010101b ; 72- Up, SUBTRACT, Num5, ADD
db 00001101b ; 80- Down, Ins, Del
db 00000000b ; 88-
db 00000000b ; 96-
db 00000000b ; 104-
db 00000000b ; 112-
db 00000000b ; 120-
mpscffAltCtrlDiddle equ this byte ; Which ALT+CTRL keys to diddle
db 00000000b ; 0-
IFNDEF LANGUAGE_SWISS
db 01010000b ; 8- '-', Backspace
ELSE ;LANGUAGE_SWISS
db 01000000b ; 8- Backspace
ENDIF ;LANGUAGE_SWISS
db 00000000b ; 16-
db 00000000b ; 24-
db 00000000b ; 32-
db 00000000b ; 40-
db 00000000b ; 48-
db 00000000b ; 56-
db 00000000b ; 64-
db 00000000b ; 72-
db 00000000b ; 80-
db 00000000b ; 88-
db 00000000b ; 96-
db 00000000b ; 104-
db 00000000b ; 112-
db 00000000b ; 120-
;****************************************************************************
| 26.917808 | 77 | 0.623919 |
07c12d841206bd5290e2ef5def6ebcb755d899c7 | 627 | asm | Assembly | oeis/170/A170751.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/170/A170751.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/170/A170751.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A170751: Expansion of g.f.: (1+x)/(1-31*x).
; 1,32,992,30752,953312,29552672,916132832,28400117792,880403651552,27292513198112,846067909141472,26228105183385632,813071260684954592,25205209081233592352,781361481518241362912,24222205927065482250272,750888383739029949758432,23277539895909928442511392,721603736773207781717853152,22369715839969441233253447712,693461191039052678230856879072,21497296922210633025156563251232,666416204588529623779853460788192,20658902342244418337175457284433952,640425972609576968452439175817452512
add $0,1
mov $3,1
lpb $0
sub $0,1
add $2,$3
div $3,$2
mul $2,31
lpe
mov $0,$2
div $0,31
| 44.785714 | 483 | 0.848485 |
d212209f3b8fcd8043f393e90b79f5b1bfac6bc3 | 2,521 | asm | Assembly | io.asm | campaul/dos-from-scratch | 7aec4dbf3395f505114e9ffcc809534043f61392 | [
"MIT"
] | null | null | null | io.asm | campaul/dos-from-scratch | 7aec4dbf3395f505114e9ffcc809534043f61392 | [
"MIT"
] | null | null | null | io.asm | campaul/dos-from-scratch | 7aec4dbf3395f505114e9ffcc809534043f61392 | [
"MIT"
] | null | null | null | ; io.asm
[bits 16]
[org 0]
; Make sure DS and ES matches CS
mov ax, cs
mov ds, ax
mov es, ax
; Load the rest of IO.SYS
mov si, IO_SYS
call get_first_sector
; Skip past the first 3 sectors that the bootloader already loaded
call get_fat_entry
call get_fat_entry
call get_fat_entry
mov cx, 0
load_io_sys_loop:
push ax
push cx
add ax, 31
mov bx, FOURTH_SECTOR
add bx, cx
; TODO: this is hard coded for 1 sector per cluster
mov cl, 1
call load_sectors
pop cx
pop ax
call get_fat_entry
add cx, 512
cmp ax, 0x0fff ; TODO: there are more values this could be
jnz load_io_sys_loop
; Register int 0x21 handler
push ds
push 0
pop ds
mov word [0x86], cs
mov word [0x84], dos_api_handler
pop ds
; Print welcome message
mov ah, 0x09
mov bx, WELCOME_MESSAGE
int 0x21
; Halt
hlt
jmp $-1
%include "lib/string.asm"
%include "lib/disk.asm"
%include "lib/fat.asm"
IO_SYS: db "IO SYS"
; Pad file to 3 sectors to ensure code above doesn't exceed that length
times 1536-($-$$) db 0
FOURTH_SECTOR:
dos_api_handler:
push si
; Load the address stored in the dos_api_functions array below
; dos_api_functions[ah * 2]
mov si, ax
shr si, 8
shl si, 1
add si, dos_api_functions
mov si, [si]
; Call the appropriate handler
call si
pop si
iret
dos_api_functions:
dw unknown_function_code ; 0x00 program terminate
dw unknown_function_code ; 0x01 character input
dw unknown_function_code ; 0x02 character output
dw unknown_function_code ; 0x03 auxiliary input
dw unknown_function_code ; 0x04 auxiliary output
dw unknown_function_code ; 0x05 printer output
dw unknown_function_code ; 0x06 direct console I/O
dw unknown_function_code ; 0x07 direct console input without echo
dw unknown_function_code ; 0x07 console input without echo
dw print ; 0x09 display string
; Fill out a full 256 entries so any unknown value of ah will result
; in a useful error message.
times 256-($-dos_api_functions)/2 dw unknown_function_code
unknown_function_code:
mov bx, UNKNOWN_FUNCTION
call print
shr ax, 8
call print_hex
hlt
jmp $-1
UNKNOWN_FUNCTION: db "Unknown function code: $"
%include "lib/print.asm"
%include "lib/debug.asm"
WELCOME_MESSAGE: db "Welcome to DOS from Scratch!", 0x0a, 0x0d, "$"
FAT_WINDOW: times 1536 db 0
DIRECTORY_WINDOW: times 512 db 0
| 19.098485 | 76 | 0.683062 |
f5559c118efc1b9b1788fe85107c879d6b395e22 | 266 | asm | Assembly | libsrc/_DEVELOPMENT/sound/bit/c/sdcc_ix/bit_play_tritone_di_fastcall.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/sound/bit/c/sdcc_ix/bit_play_tritone_di_fastcall.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/sound/bit/c/sdcc_ix/bit_play_tritone_di_fastcall.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
; void *bit_play_tritone_di_fastcall(void *song)
SECTION code_clib
SECTION code_sound_bit
PUBLIC _bit_play_tritone_di_fastcall
EXTERN asm_bit_play_tritone_di
_bit_play_tritone_di_fastcall:
push ix
call asm_bit_play_tritone_di
pop ix
ret
| 14 | 48 | 0.793233 |
6def83b858b21183d9681ed61007de7bc28b57bd | 1,899 | asm | Assembly | programs/oeis/061/A061099.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/061/A061099.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/061/A061099.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A061099: Squares with digital root 1.
; 1,64,100,289,361,676,784,1225,1369,1936,2116,2809,3025,3844,4096,5041,5329,6400,6724,7921,8281,9604,10000,11449,11881,13456,13924,15625,16129,17956,18496,20449,21025,23104,23716,25921,26569,28900,29584,32041,32761,35344,36100,38809,39601,42436,43264,46225,47089,50176,51076,54289,55225,58564,59536,63001,64009,67600,68644,72361,73441,77284,78400,82369,83521,87616,88804,93025,94249,98596,99856,104329,105625,110224,111556,116281,117649,122500,123904,128881,130321,135424,136900,142129,143641,148996,150544,156025,157609,163216,164836,170569,172225,178084,179776,185761,187489,193600,195364,201601,203401,209764,211600,218089,219961,226576,228484,235225,237169,244036,246016,253009,255025,262144,264196,271441,273529,280900,283024,290521,292681,300304,302500,310249,312481,320356,322624,330625,332929,341056,343396,351649,354025,362404,364816,373321,375769,384400,386884,395641,398161,407044,409600,418609,421201,430336,432964,442225,444889,454276,456976,466489,469225,478864,481636,491401,494209,504100,506944,516961,519841,529984,532900,543169,546121,556516,559504,570025,573049,583696,586756,597529,600625,611524,614656,625681,628849,640000,643204,654481,657721,669124,672400,683929,687241,698896,702244,714025,717409,729316,732736,744769,748225,760384,763876,776161,779689,792100,795664,808201,811801,824464,828100,840889,844561,857476,861184,874225,877969,891136,894916,908209,912025,925444,929296,942841,946729,960400,964324,978121,982081,996004,1000000,1014049,1018081,1032256,1036324,1050625,1054729,1069156,1073296,1087849,1092025,1106704,1110916,1125721,1129969,1144900,1149184,1164241,1168561,1183744,1188100,1203409,1207801,1223236,1227664,1243225,1247689,1263376
mov $1,1
mov $5,$0
lpb $0,1
sub $0,$1
trn $0,1
add $4,3
lpe
pow $4,2
mul $4,5
mov $1,$4
add $1,1
mov $2,$5
mul $2,9
add $1,$2
mov $3,$5
mul $3,$5
mov $2,$3
mul $2,9
add $1,$2
| 82.565217 | 1,676 | 0.815166 |
2c9ac36f18cfecb645314984acd709a7661da357 | 3,736 | asm | Assembly | test/include/gmp-6.1.2/mpn/bdiv_q_1.asm | kcpikkt/apa | 9e84491ff58666b273ef50faea086e43abb89ab1 | [
"MIT"
] | 43 | 2020-10-29T18:05:40.000Z | 2022-03-29T03:47:01.000Z | homomorphic_evaluation/gmp-6.1.2/mpn/bdiv_q_1.asm | dklee0501/Lobster | f2b73df9165c76e8b521d8ebd639d68321e3862b | [
"MIT"
] | 1 | 2021-12-31T01:36:49.000Z | 2021-12-31T15:21:54.000Z | homomorphic_evaluation/gmp-6.1.2/mpn/bdiv_q_1.asm | dklee0501/Lobster | f2b73df9165c76e8b521d8ebd639d68321e3862b | [
"MIT"
] | 6 | 2020-11-07T07:31:27.000Z | 2022-01-09T18:48:19.000Z | dnl AMD64 mpn_bdiv_q_1, mpn_pi1_bdiv_q_1 -- schoolbook Hensel division by
dnl 1-limb divisor, returning quotient only.
dnl Copyright 2001, 2002, 2004-2006, 2009, 2011, 2012 Free Software
dnl Foundation, Inc.
dnl This file is part of the GNU MP Library.
dnl
dnl The GNU MP Library is free software; you can redistribute it and/or modify
dnl it under the terms of either:
dnl
dnl * the GNU Lesser General Public License as published by the Free
dnl Software Foundation; either version 3 of the License, or (at your
dnl option) any later version.
dnl
dnl or
dnl
dnl * the GNU General Public License as published by the Free Software
dnl Foundation; either version 2 of the License, or (at your option) any
dnl later version.
dnl
dnl or both in parallel, as here.
dnl
dnl The GNU MP Library is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
dnl for more details.
dnl
dnl You should have received copies of the GNU General Public License and the
dnl GNU Lesser General Public License along with the GNU MP Library. If not,
dnl see https://www.gnu.org/licenses/.
include(`../config.m4')
C cycles/limb
C AMD K8,K9 10
C AMD K10 10
C Intel P4 33
C Intel core2 13.25
C Intel corei 14
C Intel atom 42
C VIA nano ?
C INPUT PARAMETERS
define(`rp', `%rdi')
define(`up', `%rsi')
define(`n', `%rdx')
define(`d', `%rcx')
define(`di', `%r8') C just mpn_pi1_bdiv_q_1
define(`ncnt', `%r9') C just mpn_pi1_bdiv_q_1
ABI_SUPPORT(DOS64)
ABI_SUPPORT(STD64)
ASM_START()
TEXT
ALIGN(16)
PROLOGUE(mpn_bdiv_q_1)
FUNC_ENTRY(4)
push %rbx
mov %rcx, %rax
xor R32(%rcx), R32(%rcx) C ncnt count
mov %rdx, %r10
bt $0, R32(%rax)
jnc L(evn) C skip bsfq unless divisor is even
L(odd): mov %rax, %rbx
shr R32(%rax)
and $127, R32(%rax) C d/2, 7 bits
LEA( binvert_limb_table, %rdx)
movzbl (%rdx,%rax), R32(%rax) C inv 8 bits
mov %rbx, %r11 C d without twos
lea (%rax,%rax), R32(%rdx) C 2*inv
imul R32(%rax), R32(%rax) C inv*inv
imul R32(%rbx), R32(%rax) C inv*inv*d
sub R32(%rax), R32(%rdx) C inv = 2*inv - inv*inv*d, 16 bits
lea (%rdx,%rdx), R32(%rax) C 2*inv
imul R32(%rdx), R32(%rdx) C inv*inv
imul R32(%rbx), R32(%rdx) C inv*inv*d
sub R32(%rdx), R32(%rax) C inv = 2*inv - inv*inv*d, 32 bits
lea (%rax,%rax), %r8 C 2*inv
imul %rax, %rax C inv*inv
imul %rbx, %rax C inv*inv*d
sub %rax, %r8 C inv = 2*inv - inv*inv*d, 64 bits
jmp L(com)
L(evn): bsf %rax, %rcx
shr R8(%rcx), %rax
jmp L(odd)
EPILOGUE()
PROLOGUE(mpn_pi1_bdiv_q_1)
FUNC_ENTRY(4)
IFDOS(` mov 56(%rsp), %r8 ')
IFDOS(` mov 64(%rsp), %r9 ')
push %rbx
mov %rcx, %r11 C d
mov %rdx, %r10 C n
mov %r9, %rcx C ncnt
L(com): mov (up), %rax C up[0]
dec %r10
jz L(one)
mov 8(up), %rdx C up[1]
lea (up,%r10,8), up C up end
lea (rp,%r10,8), rp C rp end
neg %r10 C -n
shrd R8(%rcx), %rdx, %rax
xor R32(%rbx), R32(%rbx)
jmp L(ent)
ALIGN(8)
L(top):
C rax q
C rbx carry bit, 0 or 1
C rcx ncnt
C rdx
C r10 counter, limbs, negative
mul %r11 C carry limb in rdx
mov (up,%r10,8), %rax
mov 8(up,%r10,8), %r9
shrd R8(%rcx), %r9, %rax
nop
sub %rbx, %rax C apply carry bit
setc R8(%rbx)
sub %rdx, %rax C apply carry limb
adc $0, %rbx
L(ent): imul %r8, %rax
mov %rax, (rp,%r10,8)
inc %r10
jnz L(top)
mul %r11 C carry limb in rdx
mov (up), %rax C up high limb
shr R8(%rcx), %rax
sub %rbx, %rax C apply carry bit
sub %rdx, %rax C apply carry limb
imul %r8, %rax
mov %rax, (rp)
pop %rbx
FUNC_EXIT()
ret
L(one): shr R8(%rcx), %rax
imul %r8, %rax
mov %rax, (rp)
pop %rbx
FUNC_EXIT()
ret
EPILOGUE()
| 22.238095 | 79 | 0.658191 |
456f8e1d41c14a0482704f3505b09445b1d60946 | 2,410 | asm | Assembly | vp8/decoder/arm/neon/idct_dequant_0_2x_neon.asm | CM-Archive/android_external_libvpx | 76e0247ec867fcc232fc79f21e9bf85d3c3a5a3f | [
"BSD-3-Clause"
] | 3 | 2015-08-31T15:24:31.000Z | 2020-04-24T20:31:29.000Z | vp8/decoder/arm/neon/idct_dequant_0_2x_neon.asm | CM-Archive/android_external_libvpx | 76e0247ec867fcc232fc79f21e9bf85d3c3a5a3f | [
"BSD-3-Clause"
] | null | null | null | vp8/decoder/arm/neon/idct_dequant_0_2x_neon.asm | CM-Archive/android_external_libvpx | 76e0247ec867fcc232fc79f21e9bf85d3c3a5a3f | [
"BSD-3-Clause"
] | 4 | 2015-09-16T11:40:39.000Z | 2019-06-10T01:08:46.000Z | ;
; Copyright (c) 2010 The WebM project authors. All Rights Reserved.
;
; Use of this source code is governed by a BSD-style license and patent
; grant that can be found in the LICENSE file in the root of the source
; tree. All contributing project authors may be found in the AUTHORS
; file in the root of the source tree.
;
EXPORT |idct_dequant_0_2x_neon|
ARM
REQUIRE8
PRESERVE8
AREA ||.text||, CODE, READONLY, ALIGN=2
;void idct_dequant_0_2x_neon(short *q, short dq, unsigned char *pre,
; int pitch, unsigned char *dst, int stride);
; r0 *q
; r1 dq
; r2 *pre
; r3 pitch
; sp *dst
; sp+4 stride
|idct_dequant_0_2x_neon| PROC
add r12, r2, #4
vld1.32 {d2[0]}, [r2], r3
vld1.32 {d2[1]}, [r2], r3
vld1.32 {d4[0]}, [r2], r3
vld1.32 {d4[1]}, [r2]
vld1.32 {d8[0]}, [r12], r3
vld1.32 {d8[1]}, [r12], r3
vld1.32 {d10[0]}, [r12], r3
vld1.32 {d10[1]}, [r12]
ldrh r12, [r0] ; lo q
ldrh r2, [r0, #32] ; hi q
mov r3, #0
strh r3, [r0]
strh r3, [r0, #32]
sxth r12, r12 ; lo
mul r0, r12, r1
add r0, r0, #4
asr r0, r0, #3
vdup.16 q0, r0
sxth r2, r2 ; hi
mul r0, r2, r1
add r0, r0, #4
asr r0, r0, #3
vdup.16 q3, r0
vaddw.u8 q1, q0, d2 ; lo
vaddw.u8 q2, q0, d4
vaddw.u8 q4, q3, d8 ; hi
vaddw.u8 q5, q3, d10
ldr r2, [sp] ; dst
ldr r3, [sp, #4] ; stride
vqmovun.s16 d2, q1 ; lo
vqmovun.s16 d4, q2
vqmovun.s16 d8, q4 ; hi
vqmovun.s16 d10, q5
add r0, r2, #4
vst1.32 {d2[0]}, [r2], r3 ; lo
vst1.32 {d2[1]}, [r2], r3
vst1.32 {d4[0]}, [r2], r3
vst1.32 {d4[1]}, [r2]
vst1.32 {d8[0]}, [r0], r3 ; hi
vst1.32 {d8[1]}, [r0], r3
vst1.32 {d10[0]}, [r0], r3
vst1.32 {d10[1]}, [r0]
bx lr
ENDP ; |idct_dequant_0_2x_neon|
END
| 30.125 | 72 | 0.419502 |
12268f8f77782968396207ec2a5045abe78e01a1 | 237 | asm | Assembly | libsrc/_DEVELOPMENT/font/fzx/zx/c/sdcc_ix/fzx_putc.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/font/fzx/zx/c/sdcc_ix/fzx_putc.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/font/fzx/zx/c/sdcc_ix/fzx_putc.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
; int fzx_putc(struct fzx_state *fs, int c)
SECTION code_font
SECTION code_font_fzx
PUBLIC _fzx_putc
EXTERN l0_fzx_putc_callee
_fzx_putc:
pop af
pop hl
pop bc
push bc
push hl
push af
jp l0_fzx_putc_callee
| 10.772727 | 43 | 0.71308 |
2b0e3d8c51be8a016aae7d2d934416b0a0ae1e9e | 442 | asm | Assembly | oeis/135/A135260.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/135/A135260.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/135/A135260.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A135260: Fibonacci Connell sequence: 1 odd, 1 even, 2 odd, 3 even, 5 odd, 8 even, ....
; Submitted by Jon Maiga
; 1,2,3,5,6,8,10,11,13,15,17,19,20,22,24,26,28,30,32,34,35,37,39,41,43,45,47,49,51,53,55,57,59,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,101,103,105,107,109,111,113,115,117,119,121,123,125
mov $1,1
add $1,$0
add $1,$0
seq $0,72649 ; n occurs Fibonacci(n) times (cf. A000045).
sub $1,$0
mov $0,$1
add $0,1
| 36.833333 | 210 | 0.653846 |
ba39f6ad333427420c5f4deef5ab1357ceed2de2 | 68 | nasm | Assembly | EDK-II/BaseLib/vshacks.nasm | firebitsbr/-Rainbow---EFI | 7e858cbd14df0eba4ee6cc15efa4b390347d4a55 | [
"BSD-2-Clause"
] | 3 | 2021-11-23T08:51:35.000Z | 2022-02-14T06:46:21.000Z | EDK-II/BaseLib/vshacks.nasm | firebitsbr/-Rainbow---EFI | 7e858cbd14df0eba4ee6cc15efa4b390347d4a55 | [
"BSD-2-Clause"
] | null | null | null | EDK-II/BaseLib/vshacks.nasm | firebitsbr/-Rainbow---EFI | 7e858cbd14df0eba4ee6cc15efa4b390347d4a55 | [
"BSD-2-Clause"
] | null | null | null | %define ASM_PFX(a) a
%define PcdGet32(a) _gPcd_FixedAtBuild_ %+ a | 22.666667 | 44 | 0.735294 |
9be43795d14ff9a4e6005ac6d402647468ff63df | 3,813 | asm | Assembly | demos/bsd64/demo4/demo4.asm | gbmaster/nasmx | 299fac2950cb10df2afef149da6e075b3ff3cdde | [
"BSD-2-Clause"
] | 18 | 2015-06-22T07:26:13.000Z | 2021-09-09T19:47:44.000Z | demos/bsd64/demo4/demo4.asm | gbmaster/nasmx | 299fac2950cb10df2afef149da6e075b3ff3cdde | [
"BSD-2-Clause"
] | null | null | null | demos/bsd64/demo4/demo4.asm | gbmaster/nasmx | 299fac2950cb10df2afef149da6e075b3ff3cdde | [
"BSD-2-Clause"
] | 5 | 2015-09-22T14:47:09.000Z | 2021-11-08T18:53:11.000Z | ;// demo4.asm
;//
;// Copyright (C)2005-2012 The NASMX Project
;//
;// Purpose:
;// This program demonstrates basic arithmetic operations
;//
;// Contributors:
;// Bryant Keller
;// Rob Neff
;//
;;
;; IMPORTANT DEVELOPER NOTES:
;;
;; Floating point args to vararg functions
;; like printf() MUST:
;; 1. be of type double, AND
;; 2. be pre-loaded manually into the correct xmm register, AND
;; 3. rax must contain the correct number of xmm registers used.
;; If no floating point values are used when calling vararg
;; functions then rax MUST be initialized to zero prior to the call.
%include 'nasmx.inc'
%include 'bsd/libc.inc'
ENTRY demo4
SECTION .data
strIntegerFormat DB '[+] Integer %s %d', 10, 0
strFloatPointFormat DB '[+] Floating-Point %s %e', 10, 0
strAddition DB 'Addition', 0
strSubtraction DB 'Subtraction', 0
strMultiplication DB 'Multiplication', 0
strDivision DB 'Division', 0
ALIGN 8
intVariableA DQ 35
intVariableB DQ 7
fltVariableA DQ __float64__(4.444444444)
fltVariableB DQ __float64__(3.333333333)
fltVariableC DQ __float64__(0.00)
SECTION .text
PROC Addition
locals
local value, qword
endlocals
mov rax, qword [intVariableA]
mov rcx, qword [intVariableB]
add rax, rcx
mov qword [var(.value)], rax
mov rdx, rax
mov rax, 0
invoke printf, strIntegerFormat, strAddition, rdx
mov rax, qword [var(.value)]
ENDPROC
PROC Subtraction
locals
local value, qword
endlocals
mov rax, qword [intVariableA]
mov rcx, qword [intVariableB]
sub rax, rcx
mov qword [var(.value)], rax
mov rdx, rax
xor rax, rax
invoke printf, strIntegerFormat, strSubtraction, rdx
mov rax, qword [var(.value)]
ENDPROC
PROC Multiplication
locals
local value, qword
endlocals
mov rax, qword [intVariableA]
mov rcx, qword [intVariableB]
mul rcx
mov qword [var(.value)], rax
mov rdx, rax
xor rax, rax
invoke printf, strIntegerFormat, strMultiplication, rdx
mov rax, qword [var(.value)]
ENDPROC
PROC Division
locals
local value, qword
endlocals
mov rax, qword [intVariableA]
mov rcx, qword [intVariableB]
xor rdx, rdx
idiv rcx
mov qword [var(.value)], rax
mov rdx, rax
xor rax, rax
invoke printf, strIntegerFormat, strDivision, rdx
mov rax, qword [var(.value)]
ENDPROC
PROC FPU_Addition
locals none
movsd xmm0, [fltVariableA]
addsd xmm0, [fltVariableB]
movsd [fltVariableC], xmm0
mov rdx, qword [fltVariableC]
mov eax, 1
invoke printf, strFloatPointFormat, strAddition, rdx
ENDPROC
PROC FPU_Subtraction
locals none
movsd xmm0, [fltVariableA]
subsd xmm0, [fltVariableB]
movsd [fltVariableC], xmm0
mov rdx, qword [fltVariableC]
mov eax, 1
invoke printf, strFloatPointFormat, strSubtraction, rdx
ENDPROC
PROC FPU_Multiplication
locals none
movsd xmm0, [fltVariableA]
mulsd xmm0, [fltVariableB]
movsd [fltVariableC], xmm0
mov rdx, qword [fltVariableC]
mov eax, 1
invoke printf, strFloatPointFormat, strMultiplication, rdx
ENDPROC
PROC FPU_Division
locals none
movsd xmm0, [fltVariableA]
divsd xmm0, [fltVariableB]
movsd [fltVariableC], xmm0
mov rdx, qword [fltVariableC]
mov eax, 1
invoke printf, strFloatPointFormat, strDivision, rdx
ENDPROC
PROC demo4
locals none
;// Integer Mathematics
invoke Addition
invoke Subtraction
invoke Multiplication
invoke Division
;// Floating Point Mathematics
finit
invoke FPU_Addition
invoke FPU_Subtraction
invoke FPU_Multiplication
invoke FPU_Division
xor rax, rax
invoke exit, rax
ENDPROC
| 19.553846 | 68 | 0.670863 |
78d5e7375e0f844f1170dc29139e71710c89e91c | 15,046 | asm | Assembly | examples/pxScene2d/external/libnode-v10.15.3/deps/openssl/config/archs/VC-WIN32/asm/crypto/bf/bf-586.asm | madanagopaltcomcast/pxCore | c4a3a40a190521c8b6383d126c87612eca5b3c42 | [
"Apache-2.0"
] | 1,666 | 2017-01-12T03:58:44.000Z | 2017-08-20T23:39:20.000Z | examples/pxScene2d/external/libnode-v10.15.3/deps/openssl/config/archs/VC-WIN32/asm/crypto/bf/bf-586.asm | madanagopaltcomcast/pxCore | c4a3a40a190521c8b6383d126c87612eca5b3c42 | [
"Apache-2.0"
] | 1,432 | 2017-06-21T04:08:48.000Z | 2020-08-25T16:21:15.000Z | examples/pxScene2d/external/libnode-v10.15.3/deps/openssl/config/archs/VC-WIN32/asm/crypto/bf/bf-586.asm | madanagopaltcomcast/pxCore | c4a3a40a190521c8b6383d126c87612eca5b3c42 | [
"Apache-2.0"
] | 317 | 2017-06-20T19:57:17.000Z | 2020-09-16T10:28:30.000Z | %ifidn __OUTPUT_FORMAT__,obj
section code use32 class=code align=64
%elifidn __OUTPUT_FORMAT__,win32
$@feat.00 equ 1
section .text code align=64
%else
section .text code
%endif
global _BF_encrypt
align 16
_BF_encrypt:
L$_BF_encrypt_begin:
;
push ebp
push ebx
mov ebx,DWORD [12+esp]
mov ebp,DWORD [16+esp]
push esi
push edi
; Load the 2 words
mov edi,DWORD [ebx]
mov esi,DWORD [4+ebx]
xor eax,eax
mov ebx,DWORD [ebp]
xor ecx,ecx
xor edi,ebx
;
; Round 0
mov edx,DWORD [4+ebp]
mov ebx,edi
xor esi,edx
shr ebx,16
mov edx,edi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor esi,ebx
;
; Round 1
mov edx,DWORD [8+ebp]
mov ebx,esi
xor edi,edx
shr ebx,16
mov edx,esi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor edi,ebx
;
; Round 2
mov edx,DWORD [12+ebp]
mov ebx,edi
xor esi,edx
shr ebx,16
mov edx,edi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor esi,ebx
;
; Round 3
mov edx,DWORD [16+ebp]
mov ebx,esi
xor edi,edx
shr ebx,16
mov edx,esi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor edi,ebx
;
; Round 4
mov edx,DWORD [20+ebp]
mov ebx,edi
xor esi,edx
shr ebx,16
mov edx,edi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor esi,ebx
;
; Round 5
mov edx,DWORD [24+ebp]
mov ebx,esi
xor edi,edx
shr ebx,16
mov edx,esi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor edi,ebx
;
; Round 6
mov edx,DWORD [28+ebp]
mov ebx,edi
xor esi,edx
shr ebx,16
mov edx,edi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor esi,ebx
;
; Round 7
mov edx,DWORD [32+ebp]
mov ebx,esi
xor edi,edx
shr ebx,16
mov edx,esi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor edi,ebx
;
; Round 8
mov edx,DWORD [36+ebp]
mov ebx,edi
xor esi,edx
shr ebx,16
mov edx,edi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor esi,ebx
;
; Round 9
mov edx,DWORD [40+ebp]
mov ebx,esi
xor edi,edx
shr ebx,16
mov edx,esi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor edi,ebx
;
; Round 10
mov edx,DWORD [44+ebp]
mov ebx,edi
xor esi,edx
shr ebx,16
mov edx,edi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor esi,ebx
;
; Round 11
mov edx,DWORD [48+ebp]
mov ebx,esi
xor edi,edx
shr ebx,16
mov edx,esi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor edi,ebx
;
; Round 12
mov edx,DWORD [52+ebp]
mov ebx,edi
xor esi,edx
shr ebx,16
mov edx,edi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor esi,ebx
;
; Round 13
mov edx,DWORD [56+ebp]
mov ebx,esi
xor edi,edx
shr ebx,16
mov edx,esi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor edi,ebx
;
; Round 14
mov edx,DWORD [60+ebp]
mov ebx,edi
xor esi,edx
shr ebx,16
mov edx,edi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor esi,ebx
;
; Round 15
mov edx,DWORD [64+ebp]
mov ebx,esi
xor edi,edx
shr ebx,16
mov edx,esi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
; Load parameter 0 (16) enc=1
mov eax,DWORD [20+esp]
xor edi,ebx
mov edx,DWORD [68+ebp]
xor esi,edx
mov DWORD [4+eax],edi
mov DWORD [eax],esi
pop edi
pop esi
pop ebx
pop ebp
ret
global _BF_decrypt
align 16
_BF_decrypt:
L$_BF_decrypt_begin:
;
push ebp
push ebx
mov ebx,DWORD [12+esp]
mov ebp,DWORD [16+esp]
push esi
push edi
; Load the 2 words
mov edi,DWORD [ebx]
mov esi,DWORD [4+ebx]
xor eax,eax
mov ebx,DWORD [68+ebp]
xor ecx,ecx
xor edi,ebx
;
; Round 16
mov edx,DWORD [64+ebp]
mov ebx,edi
xor esi,edx
shr ebx,16
mov edx,edi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor esi,ebx
;
; Round 15
mov edx,DWORD [60+ebp]
mov ebx,esi
xor edi,edx
shr ebx,16
mov edx,esi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor edi,ebx
;
; Round 14
mov edx,DWORD [56+ebp]
mov ebx,edi
xor esi,edx
shr ebx,16
mov edx,edi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor esi,ebx
;
; Round 13
mov edx,DWORD [52+ebp]
mov ebx,esi
xor edi,edx
shr ebx,16
mov edx,esi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor edi,ebx
;
; Round 12
mov edx,DWORD [48+ebp]
mov ebx,edi
xor esi,edx
shr ebx,16
mov edx,edi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor esi,ebx
;
; Round 11
mov edx,DWORD [44+ebp]
mov ebx,esi
xor edi,edx
shr ebx,16
mov edx,esi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor edi,ebx
;
; Round 10
mov edx,DWORD [40+ebp]
mov ebx,edi
xor esi,edx
shr ebx,16
mov edx,edi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor esi,ebx
;
; Round 9
mov edx,DWORD [36+ebp]
mov ebx,esi
xor edi,edx
shr ebx,16
mov edx,esi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor edi,ebx
;
; Round 8
mov edx,DWORD [32+ebp]
mov ebx,edi
xor esi,edx
shr ebx,16
mov edx,edi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor esi,ebx
;
; Round 7
mov edx,DWORD [28+ebp]
mov ebx,esi
xor edi,edx
shr ebx,16
mov edx,esi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor edi,ebx
;
; Round 6
mov edx,DWORD [24+ebp]
mov ebx,edi
xor esi,edx
shr ebx,16
mov edx,edi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor esi,ebx
;
; Round 5
mov edx,DWORD [20+ebp]
mov ebx,esi
xor edi,edx
shr ebx,16
mov edx,esi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor edi,ebx
;
; Round 4
mov edx,DWORD [16+ebp]
mov ebx,edi
xor esi,edx
shr ebx,16
mov edx,edi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor esi,ebx
;
; Round 3
mov edx,DWORD [12+ebp]
mov ebx,esi
xor edi,edx
shr ebx,16
mov edx,esi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor edi,ebx
;
; Round 2
mov edx,DWORD [8+ebp]
mov ebx,edi
xor esi,edx
shr ebx,16
mov edx,edi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
xor eax,eax
xor esi,ebx
;
; Round 1
mov edx,DWORD [4+ebp]
mov ebx,esi
xor edi,edx
shr ebx,16
mov edx,esi
mov al,bh
and ebx,255
mov cl,dh
and edx,255
mov eax,DWORD [72+eax*4+ebp]
mov ebx,DWORD [1096+ebx*4+ebp]
add ebx,eax
mov eax,DWORD [2120+ecx*4+ebp]
xor ebx,eax
mov edx,DWORD [3144+edx*4+ebp]
add ebx,edx
; Load parameter 0 (1) enc=0
mov eax,DWORD [20+esp]
xor edi,ebx
mov edx,DWORD [ebp]
xor esi,edx
mov DWORD [4+eax],edi
mov DWORD [eax],esi
pop edi
pop esi
pop ebx
pop ebp
ret
global _BF_cbc_encrypt
align 16
_BF_cbc_encrypt:
L$_BF_cbc_encrypt_begin:
;
push ebp
push ebx
push esi
push edi
mov ebp,DWORD [28+esp]
; getting iv ptr from parameter 4
mov ebx,DWORD [36+esp]
mov esi,DWORD [ebx]
mov edi,DWORD [4+ebx]
push edi
push esi
push edi
push esi
mov ebx,esp
mov esi,DWORD [36+esp]
mov edi,DWORD [40+esp]
; getting encrypt flag from parameter 5
mov ecx,DWORD [56+esp]
; get and push parameter 3
mov eax,DWORD [48+esp]
push eax
push ebx
cmp ecx,0
jz NEAR L$000decrypt
and ebp,4294967288
mov eax,DWORD [8+esp]
mov ebx,DWORD [12+esp]
jz NEAR L$001encrypt_finish
L$002encrypt_loop:
mov ecx,DWORD [esi]
mov edx,DWORD [4+esi]
xor eax,ecx
xor ebx,edx
bswap eax
bswap ebx
mov DWORD [8+esp],eax
mov DWORD [12+esp],ebx
call L$_BF_encrypt_begin
mov eax,DWORD [8+esp]
mov ebx,DWORD [12+esp]
bswap eax
bswap ebx
mov DWORD [edi],eax
mov DWORD [4+edi],ebx
add esi,8
add edi,8
sub ebp,8
jnz NEAR L$002encrypt_loop
L$001encrypt_finish:
mov ebp,DWORD [52+esp]
and ebp,7
jz NEAR L$003finish
call L$004PIC_point
L$004PIC_point:
pop edx
lea ecx,[(L$005cbc_enc_jmp_table-L$004PIC_point)+edx]
mov ebp,DWORD [ebp*4+ecx]
add ebp,edx
xor ecx,ecx
xor edx,edx
jmp ebp
L$006ej7:
mov dh,BYTE [6+esi]
shl edx,8
L$007ej6:
mov dh,BYTE [5+esi]
L$008ej5:
mov dl,BYTE [4+esi]
L$009ej4:
mov ecx,DWORD [esi]
jmp NEAR L$010ejend
L$011ej3:
mov ch,BYTE [2+esi]
shl ecx,8
L$012ej2:
mov ch,BYTE [1+esi]
L$013ej1:
mov cl,BYTE [esi]
L$010ejend:
xor eax,ecx
xor ebx,edx
bswap eax
bswap ebx
mov DWORD [8+esp],eax
mov DWORD [12+esp],ebx
call L$_BF_encrypt_begin
mov eax,DWORD [8+esp]
mov ebx,DWORD [12+esp]
bswap eax
bswap ebx
mov DWORD [edi],eax
mov DWORD [4+edi],ebx
jmp NEAR L$003finish
L$000decrypt:
and ebp,4294967288
mov eax,DWORD [16+esp]
mov ebx,DWORD [20+esp]
jz NEAR L$014decrypt_finish
L$015decrypt_loop:
mov eax,DWORD [esi]
mov ebx,DWORD [4+esi]
bswap eax
bswap ebx
mov DWORD [8+esp],eax
mov DWORD [12+esp],ebx
call L$_BF_decrypt_begin
mov eax,DWORD [8+esp]
mov ebx,DWORD [12+esp]
bswap eax
bswap ebx
mov ecx,DWORD [16+esp]
mov edx,DWORD [20+esp]
xor ecx,eax
xor edx,ebx
mov eax,DWORD [esi]
mov ebx,DWORD [4+esi]
mov DWORD [edi],ecx
mov DWORD [4+edi],edx
mov DWORD [16+esp],eax
mov DWORD [20+esp],ebx
add esi,8
add edi,8
sub ebp,8
jnz NEAR L$015decrypt_loop
L$014decrypt_finish:
mov ebp,DWORD [52+esp]
and ebp,7
jz NEAR L$003finish
mov eax,DWORD [esi]
mov ebx,DWORD [4+esi]
bswap eax
bswap ebx
mov DWORD [8+esp],eax
mov DWORD [12+esp],ebx
call L$_BF_decrypt_begin
mov eax,DWORD [8+esp]
mov ebx,DWORD [12+esp]
bswap eax
bswap ebx
mov ecx,DWORD [16+esp]
mov edx,DWORD [20+esp]
xor ecx,eax
xor edx,ebx
mov eax,DWORD [esi]
mov ebx,DWORD [4+esi]
L$016dj7:
ror edx,16
mov BYTE [6+edi],dl
shr edx,16
L$017dj6:
mov BYTE [5+edi],dh
L$018dj5:
mov BYTE [4+edi],dl
L$019dj4:
mov DWORD [edi],ecx
jmp NEAR L$020djend
L$021dj3:
ror ecx,16
mov BYTE [2+edi],cl
shl ecx,16
L$022dj2:
mov BYTE [1+esi],ch
L$023dj1:
mov BYTE [esi],cl
L$020djend:
jmp NEAR L$003finish
L$003finish:
mov ecx,DWORD [60+esp]
add esp,24
mov DWORD [ecx],eax
mov DWORD [4+ecx],ebx
pop edi
pop esi
pop ebx
pop ebp
ret
align 64
L$005cbc_enc_jmp_table:
dd 0
dd L$013ej1-L$004PIC_point
dd L$012ej2-L$004PIC_point
dd L$011ej3-L$004PIC_point
dd L$009ej4-L$004PIC_point
dd L$008ej5-L$004PIC_point
dd L$007ej6-L$004PIC_point
dd L$006ej7-L$004PIC_point
align 64
| 16.77369 | 54 | 0.680779 |
f78c1f6ad9e09450e62814b49d2a8089e719acbd | 268 | asm | Assembly | programs/oeis/199/A199319.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/199/A199319.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/199/A199319.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A199319: 4*6^n+1.
; 5,25,145,865,5185,31105,186625,1119745,6718465,40310785,241864705,1451188225,8707129345,52242776065,313456656385,1880739938305,11284439629825,67706637778945,406239826673665,2437438960041985,14624633760251905
mov $1,6
pow $1,$0
mul $1,4
add $1,1
| 33.5 | 209 | 0.813433 |
9dcbbc5e28e20d97c58094e2250b05145a62d42e | 1,097 | asm | Assembly | libsrc/target/kaypro83/pointxy.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/target/kaypro83/pointxy.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/target/kaypro83/pointxy.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z | ;
; Kaypro ('83 versions) pseudo graphics routines
; Version for the standard text symbols
;
SECTION code_graphics
PUBLIC pointxy
EXTERN plot_decode
EXTERN GRAPHICS_CHAR_UNSET
EXTERN __kayproii_gfxmode
EXTERN generic_console_vpeek
EXTERN CONSOLE_ROWS
EXTERN CONSOLE_COLUMNS
.pointxy
ld a,h
cp CONSOLE_COLUMNS
ret nc
ld a,(__kayproii_gfxmode)
and a
jr z,point_one
; Plotting with funny characters
ld a,l
cp CONSOLE_ROWS * 2
ret nc
push bc
push de
push hl
call plot_decode
jr c,odd
and 1
jr even
.odd
and 2
.even
pop hl
pop de
pop bc
ret
point_one:
ld a,l
cp CONSOLE_ROWS
ret nc
push bc ;save entry bc
ld c,h
ld b,l
ld e,1 ;raw mode
call generic_console_vpeek
cp GRAPHICS_CHAR_UNSET
pop bc
ret
| 19.245614 | 54 | 0.506837 |
0abe724bb3b112900b545b81d237a872eb06e586 | 2,023 | asm | Assembly | programs/oeis/081/A081374.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/081/A081374.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/081/A081374.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A081374: Size of "uniform" Hamming covers of distance 1, that is, Hamming covers in which all vectors of equal weight are treated the same, included or excluded from the cover together.
; 1,2,2,5,10,22,43,86,170,341,682,1366,2731,5462,10922,21845,43690,87382,174763,349526,699050,1398101,2796202,5592406,11184811,22369622,44739242,89478485,178956970,357913942,715827883,1431655766,2863311530,5726623061,11453246122,22906492246,45812984491,91625968982,183251937962,366503875925,733007751850,1466015503702,2932031007403,5864062014806,11728124029610,23456248059221,46912496118442,93824992236886,187649984473771,375299968947542,750599937895082,1501199875790165,3002399751580330,6004799503160662,12009599006321323,24019198012642646,48038396025285290,96076792050570581,192153584101141162,384307168202282326,768614336404564651,1537228672809129302,3074457345618258602,6148914691236517205,12297829382473034410,24595658764946068822,49191317529892137643,98382635059784275286,196765270119568550570,393530540239137101141,787061080478274202282,1574122160956548404566,3148244321913096809131,6296488643826193618262,12592977287652387236522,25185954575304774473045,50371909150609548946090,100743818301219097892182,201487636602438195784363,402975273204876391568726,805950546409752783137450,1611901092819505566274901,3223802185639011132549802,6447604371278022265099606,12895208742556044530199211,25790417485112089060398422,51580834970224178120796842,103161669940448356241593685,206323339880896712483187370,412646679761793424966374742,825293359523586849932749483,1650586719047173699865498966,3301173438094347399730997930,6602346876188694799461995861,13204693752377389598923991722,26409387504754779197847983446,52818775009509558395695966891,105637550019019116791391933782,211275100038038233582783867562,422550200076076467165567735125
lpb $0
mov $2,$0
sub $0,2
trn $2,1
seq $2,281166 ; a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3) for n>2, a(0)=a(1)=1, a(2)=3.
add $1,$2
lpe
lpb $0
mov $2,$0
div $0,2
add $1,$2
lpe
add $1,1
mov $0,$1
| 112.388889 | 1,625 | 0.87395 |
f88882ea1f2eb8acab8ef5f8d0efebd1646cc06b | 585 | asm | Assembly | oeis/170/A170777.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/170/A170777.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/170/A170777.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A170777: a(n) = n^8*(n^5 + 1)/2.
; 0,1,4224,800442,33587200,610546875,6531186816,48447387604,274886295552,1270954437525,5000050000000,17261463251406,53496817680384,151437961161487,396858124521600,973098815625000,2251801961168896,4952292504331689,10411487942815872,21026500222910050,40960012800000000,77236207780989411,141405056379478144,252018220123726332,438244224270336000,745058135986328125,1240576541015400576,2026277717724256374,3251055900149972992,5130314606602507575,7971615328050000000,12208773575168040016
mov $1,$0
pow $0,8
mov $2,$1
pow $2,5
mul $2,$0
add $0,$2
div $0,2
| 53.181818 | 481 | 0.851282 |
9d7e4064ea4eac3a55b2e3bc583e6505de25d613 | 658 | asm | Assembly | Library/Math/Main/mainManager.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Library/Math/Main/mainManager.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Library/Math/Main/mainManager.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: mainManager.asm
AUTHOR: jimmy lefkowitz
REVISION HISTORY:
Name Date Description
---- ---- -----------
jimmy 3/ 2/92 Initial version.
DESCRIPTION:
$Id: mainManager.asm,v 1.1 97/04/05 01:22:53 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
include mathGeode.def
include mathConstants.def
InitCode segment resource
global FloatInit:far
global FloatExit:far
InitCode ends
include mainMain.asm
include mainThread.asm
| 19.939394 | 71 | 0.551672 |
0c10eaef6d461bd081caf5867dfcd229b39ae107 | 537 | asm | Assembly | libsrc/_DEVELOPMENT/math/float/math32/c/sccz80/cm32_sccz80_fssqr.asm | rjcorrig/z88dk | c49c26bb232c17ea5a45d21bb81b6343572b7f4c | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/math/float/math32/c/sccz80/cm32_sccz80_fssqr.asm | rjcorrig/z88dk | c49c26bb232c17ea5a45d21bb81b6343572b7f4c | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/math/float/math32/c/sccz80/cm32_sccz80_fssqr.asm | rjcorrig/z88dk | c49c26bb232c17ea5a45d21bb81b6343572b7f4c | [
"ClArtistic"
] | null | null | null |
; float __fssqr (float number)
SECTION code_clib
SECTION code_math
PUBLIC cm32_sccz80_fssqr
EXTERN m32_fssqr_fastcall
; square (^2) sccz80 floats
;
; enter : stack = ret
; DEHL = sccz80_float number
;
; exit : DEHL = sccz80_float(number^2)
;
; uses : af, bc, de, hl, af'
DEFC cm32_sccz80_fssqr = m32_fssqr_fastcall ; enter stack = ret
; DEHL = d32_float
; return DEHL = d32_float
| 23.347826 | 73 | 0.523277 |
c69b90cfede8f77bcb490fbbb4c2c8c9df419271 | 604 | asm | Assembly | oeis/313/A313702.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/313/A313702.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/313/A313702.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A313702: Coordination sequence Gal.6.337.5 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings.
; Submitted by Jon Maiga
; 1,5,10,15,19,25,29,33,39,43,48,53,58,63,68,73,77,83,87,91,97,101,106,111,116,121,126,131,135,141,145,149,155,159,164,169,174,179,184,189,193,199,203,207,213,217,222,227,232,237
mov $1,$0
seq $0,314836 ; Coordination sequence Gal.6.131.4 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings.
add $1,1
div $1,3
add $0,$1
| 60.4 | 182 | 0.743377 |
9594ea363fdceb777cb27f0abc05594eb9260c82 | 6,749 | asm | Assembly | cpm2/RomWBW/Tools/simh/Z80Project/Z80 UART Transmit Test/Code/UARTTEST.asm | grancier/z180 | e83f35e36c9b4d1457e40585019430e901c86ed9 | [
"ClArtistic"
] | null | null | null | cpm2/RomWBW/Tools/simh/Z80Project/Z80 UART Transmit Test/Code/UARTTEST.asm | grancier/z180 | e83f35e36c9b4d1457e40585019430e901c86ed9 | [
"ClArtistic"
] | null | null | null | cpm2/RomWBW/Tools/simh/Z80Project/Z80 UART Transmit Test/Code/UARTTEST.asm | grancier/z180 | e83f35e36c9b4d1457e40585019430e901c86ed9 | [
"ClArtistic"
] | 1 | 2019-12-03T23:57:48.000Z | 2019-12-03T23:57:48.000Z |
false equ 0
true equ 1
;========== Z180 Internal Interrupt Vectors ========
; The following vectors are offsets from the value
; loaded in IL, the Interrupt Vector Low register.
VINT1 equ 0 ;External INT-1 pin
VINT2 equ 2 ;External INT-2 pin
VPRT0 equ 4 ;Timer 0
VPRT1 equ 6 ;Timer 1
VDMA0 equ 8 ;DMA Ch-0
VDMA1 equ 0ah ;DMA Ch-1
VCSIO equ 0ch ;Clocked serial I/O
VASC0 equ 0eh ;Asynch. comms. Ch-0
VASC1 equ 10h ;Asynch. comms. Ch-1
;========== Z180 System Control Registers ==========
;NB These registers may be relocated to multiples of
; 40H, by setting the IO Control Register (ICR = 3FH)
; The addresses below are valid with ICR=0 (else they
; are offsets from the ICR base value).
;ASCI Registers
cntla0 equ 00h ;ASCI Control Reg A Ch0
cntla1 equ 01h ;ASCI Control Reg A Ch1
cntlb0 equ 02h ;ASCI Control Reg B Ch0
cntlb1 equ 03h ;ASCI Control Reg B Ch1
stat0 equ 04h ;ASCI Status Reg Ch0
stat1 equ 05h ;ASCI Status Reg Ch1
tdr0 equ 06h ;ASCI TX Data Reg Ch0
tdr1 equ 07h ;ASCI TX Data Reg Ch1
rdr0 equ 08h ;ASCI RX Data Reg Ch0
rdr1 equ 09h ;ASCI RX Data Reg Ch1
brk0 equ 12h ;Break Control Reg Ch0
brk1 equ 13h ;Break Control reg Ch1
;CSI/O Registers
cntr equ 0ah ;CSI/O Control Reg
trdr equ 0bh ;CSI/O TX/RX Data Reg
ccr equ 1fh ;CPU control reg.
intype equ 0dfh ;Interrupt edge/pin mux reg.
wsgcs equ 0d8h ;Wait-State Generator CS
enh182 equ 0d9h ;Z80182 Enhancements Reg
pinmux equ 0dfh ;Interrupt Edge/Pin Mux Reg
ramubr equ 0e6h ;RAM End Boundary
ramlbr equ 0e7h ;RAM Start Boundary
rombr equ 0e8h ;ROM Boundary
romend equ 0e8h
ramstart equ 0e7h
ramend equ 0e6h
fifoctl equ 0e9h ;FIFO Control Reg
rtotc equ 0eah ;RX Time-Out Time Const
ttotc equ 0ebh ;TX Time-Out Time Const
fcr equ 0ech ;FIFO Register
scr equ 0efh ;System Pin Control
rbr equ 0f0h ;MIMIC RX Buffer Reg
thr equ 0f0h ;MIMIC TX Holding Reg
ier equ 0f1h ;Interrupt Enable Reg
lcr equ 0f3h ;Line Control Reg
mcr equ 0f4h ;Modem Control Reg
lsr equ 0f5h ;Line Status Reg
msr equ 0f6h ;Modem Status Reg
mscr equ 0f7h ;MIMIC Scratch Reg
dlatl equ 0f8h ;Divisor latch LS
dlatm equ 0f9h ;Divisor latch MS
ttcr equ 0fah ;TX Time Constant
rtcr equ 0fbh ;RX Time Constant
ivec equ 0fch ;MIMIC Interrupt Vector
mimie equ 0fdh ;MIMIC Interrupt Enable Reg
iusip equ 0feh ;MIMIC Interrupt Under-Service Reg
mmcr equ 0ffh ;MIMIC Master Control Reg
;DMA Registers
sar0l equ 20h ;DMA Source Addr Reg Ch0-Low
sar0h equ 21h ;DMA Source Addr Reg Ch0-High
sar0b equ 22h ;DMA Source Addr Reg Ch0-B
dar0l equ 23h ;DMA Destn Addr Reg Ch0-Low
dar0h equ 24h ;DMA Destn Addr Reg Ch0-High
dar0b equ 25h ;DMA Destn Addr Reg Ch0-B
bcr0l equ 26h ;DMA Byte Count Reg Ch0-Low
bcr0h equ 27h ;DMA Byte Count Reg Ch0-High
mar1l equ 28h ;DMA Memory Addr Reg Ch1-Low
mar1h equ 29h ;DMA Memory Addr Reg Ch1-High
mar1b equ 2ah ;DMA Memory Addr Reg Ch1-B
iar1l equ 2bh ;DMA I/O Addr Reg Ch1-Low
iar1h equ 2ch ;DMA I/O Addr Reg Ch1-High
bcr1l equ 2eh ;DMA Byte Count Reg Ch1-Low
bcr1h equ 2fh ;DMA Byte Count Reg Ch1-High
dstat equ 30h ;DMA Status Reg
dmode equ 31h ;DMA Mode Reg
dcntl equ 32h ;DMA/WAIT Control Reg
;System Control Registers
il equ 33h ;INT Vector Low Reg
itc equ 34h ;INT/TRAP Control Reg
rcr equ 36h ;Refresh Control Reg
cbr equ 38h ;MMU Common Base Reg
bbr equ 39h ;MMU Bank Base Reg
cbar equ 3ah ;MMU Common/Bank Area Reg
omcr equ 3eh ;Operation Mode Control Reg
icr equ 3fh ;I/O Control Reg
;--- Character Device Section ---
; The following two devices result in non-standard data rates
; with the standard 16.00 MHz crystal in the P112. If a more
; "standard" crystal is used (12.288, 18.432, 24.576 MHz etc)
; is used, the ports become usable.
; Driver code for ASCI0 and ASCI1 includes an option for
; assembling Polled or Interrupt-driven buffered input.
; Select the desired option for ASCI0 with the BUFFA0 flag,
; and BUFFA1 for ASCI1.
ASCI_0 EQU false ; Include ASCI0 Driver?
BUFFA0 EQU false ; Use buffered ASCI0 Input Driver?
ASCI_1 EQU false ; Include ASCI1 Driver?
BUFFA1 EQU false ; Use buffered ASCI1 Input Driver?
QSIZE EQU 32 ; size of interrupt typeahead buffers (if used)
; ..must be 2^n with n<8
RTSCTS EQU false ; Include RTS/CTS code on Serial Outputs?
XONOFF EQU false ; Include Xon/Xoff handshaking in Serial lines?
;******************************************************************
;INIT_UART
;Function: Initialize the UART to BAUD Rate 9600 (1.8432 MHz clock input)
;DLAB A2 A1 A0 Register
;0 0 0 0 Receiver Buffer (read),
; Transmitter Holding
; Register (write)
;0 0 0 1 Interrupt Enable
;X 0 1 0 Interrupt Identification (read)
;X 0 1 0 FIFO Control (write)
;X 0 1 1 Line Control
;X 1 0 0 MODEM Control
;X 1 0 1 Line Status
;X 1 1 0 MODEM Status
;X 1 1 1 Scratch
;1 0 0 0 Divisor Latch
; (least significant byte)
;1 0 0 1 Divisor Latch
; (most significant byte)
;******************************************************************
;***********************************
;* UART Test Program *
;* *
;***********************************
.ORG 00000H
INIT_UART:
LD A,80H ; Mask to Set DLAB Flag
db 0edh
OUT (03H),A
LD A,12 ; Divisor = 12 @ 9600bps w/ 1.8432 Mhz
OUT (00H),A ; Set BAUD rate to 9600
LD A,00
OUT (01H),A ; Set BAUD rate to 9600
LD A,03H
OUT (03H),A ; Set 8-bit data, 1 stop bit, reset DLAB Flag
;******************************************************************
;Main Program
;Function: Display A->Z then a new line and loop
;******************************************************************
MAIN_LOOP:
IN A,(05H) ; Get the line status register's contents
BIT 5,A ; Test BIT, it will be set if the UART is ready
JP Z,MAIN_LOOP
LD A,41H ; Load acumulator with "A" Character
OUT (00H),A ; Send "A" Character through the UART
JP MAIN_LOOP
.END | 36.481081 | 73 | 0.587939 |
a6b5d61733cd3ccb588c9b3720720ee086826115 | 387 | asm | Assembly | oeis/143/A143554.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/143/A143554.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/143/A143554.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A143554: G.f. satisfies: A(x) = 1 + x*A(x)^5*A(-x)^4.
; Submitted by Christian Krause
; 1,1,1,5,9,55,117,775,1785,12350,29799,211876,527085,3818430,9706503,71282640,184138713,1366368375,3573805950,26735839650,70625252863,531838637759,1416298046436,10723307329700,28748759731965
mov $1,$0
mul $0,4
div $1,2
mov $2,$0
add $0,$1
bin $0,$2
add $1,$2
add $2,1
bin $1,$2
mul $1,8
sub $0,$1
| 24.1875 | 191 | 0.70801 |
515bca7a522301a4ea9e27d1e4ba27e63f8d7550 | 681 | asm | Assembly | libsrc/_DEVELOPMENT/math/float/math48/z80/core/mm48_log.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/math/float/math48/z80/core/mm48_log.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/core/mm48_log.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 mm48_log
EXTERN mm48_ln, mm48_fpmul, mm48__add10
mm48_log:
; base 10 logarithm
; AC' = log(AC')
;
; enter : AC'(BCDEHL') = float x
;
; exit : success
;
; AC'= log(x)
; carry reset
;
; fail if domain error
;
; AC'= double_min
; carry set, errno set
;
; uses : af, af', bc', de', hl'
;LOG(X) beregnes af LN(X)/LN(10).
call mm48_ln
ret c
push bc ;save AC
push de
push hl
ld bc,$5E5B ;1/LN(10)
ld de,$D8A9
ld hl,$367F
call mm48_fpmul
jp mm48__add10 + 1
| 15.837209 | 40 | 0.49486 |
26450e3d9d90c971b8b3248505235b2e79a6fedd | 4,145 | asm | Assembly | Gunz/xpsupport/xpmfcwrap64.asm | WhyWolfie/Repack-Aren | 4839db138a502ca4cfac8c2a8c950f1b59064955 | [
"FSFAP"
] | null | null | null | Gunz/xpsupport/xpmfcwrap64.asm | WhyWolfie/Repack-Aren | 4839db138a502ca4cfac8c2a8c950f1b59064955 | [
"FSFAP"
] | null | null | null | Gunz/xpsupport/xpmfcwrap64.asm | WhyWolfie/Repack-Aren | 4839db138a502ca4cfac8c2a8c950f1b59064955 | [
"FSFAP"
] | null | null | null | ;Copyright (c) 2012 Mike Ryan
;Permission is hereby granted, free of charge, to any person obtaining a copy of this software
;and associated documentation files (the "Software"), to deal in the Software without restriction,
;including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
;and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
;subject to the following conditions:
;The above copyright notice and this permission notice shall be included in all copies or substantial
;portions of the Software.
;THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
;LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
;IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
;WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
;OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
__ML_64 = OPATTR rax
IF __ML_64
AfxApplicationRecoveryFinished PROTO :DWORD
AfxApplicationRecoveryInProgress PROTO :QWORD
AfxRegisterApplicationRecoveryCallback PROTO :QWORD,:QWORD,:DWORD,:DWORD
AfxRegisterApplicationRestart PROTO :QWORD,:DWORD
AfxGetThreadPreferredUILanguages PROTO :DWORD,:QWORD,:QWORD,:QWORD
AfxSHCreateItemFromParsingName PROTO :QWORD,:DWORD,:QWORD,:QWORD
AfxInitNetworkAddressControl PROTO
AfxChangeWindowMessageFilter PROTO :DWORD,:DWORD
AfxDrawThemeTextEx PROTO :DWORD,:DWORD,:DWORD,:DWORD,:QWORD,:DWORD,:DWORD,:QWORD,:QWORD
AfxBufferedPaintInit PROTO
AfxBufferedPaintUnInit PROTO
AfxBeginBufferedPaint PROTO :DWORD,:QWORD,:DWORD,:QWORD,:QWORD
AfxEndBufferedPaint PROTO :DWORD,:DWORD
AfxDwmIsCompositionEnabled PROTO :QWORD
AfxDwmDefWindowProc PROTO :DWORD,:DWORD,:DWORD,:DWORD
AfxDwmSetWindowAttribute PROTO :DWORD,:DWORD,:QWORD,:DWORD
AfxDwmExtendFrameIntoClientArea PROTO :DWORD,:QWORD
AfxPSGetPropertyDescriptionListFromString PROTO :QWORD,:DWORD,:QWORD
.data
__imp_ApplicationRecoveryFinished dq AfxApplicationRecoveryFinished
__imp_ApplicationRecoveryInProgress dq AfxApplicationRecoveryInProgress
__imp_RegisterApplicationRecoveryCallback dq AfxRegisterApplicationRecoveryCallback
__imp_RegisterApplicationRestart dq AfxRegisterApplicationRestart
__imp_GetThreadPreferredUILanguages dq AfxGetThreadPreferredUILanguages
__imp_SHCreateItemFromParsingName dq AfxSHCreateItemFromParsingName
__imp_InitNetworkAddressControl dq AfxInitNetworkAddressControl
__imp_ChangeWindowMessageFilter dq AfxChangeWindowMessageFilter
__imp_DrawThemeTextEx dq AfxDrawThemeTextEx
__imp_BufferedPaintInit dq AfxBufferedPaintInit
__imp_BufferedPaintUnInit dq AfxBufferedPaintUnInit
__imp_BeginBufferedPaint dq AfxBeginBufferedPaint
__imp_EndBufferedPaint dq AfxEndBufferedPaint
__imp_DwmIsCompositionEnabled dq AfxDwmIsCompositionEnabled
__imp_DwmDefWindowProc dq AfxDwmDefWindowProc
__imp_DwmSetWindowAttribute dq AfxDwmSetWindowAttribute
__imp_DwmExtendFrameIntoClientArea dq AfxDwmExtendFrameIntoClientArea
__imp_PSGetPropertyDescriptionListFromString dq AfxPSGetPropertyDescriptionListFromString
EXTERNDEF __imp_ApplicationRecoveryFinished :
EXTERNDEF __imp_ApplicationRecoveryInProgress : DWORD
EXTERNDEF __imp_RegisterApplicationRecoveryCallback : DWORD
EXTERNDEF __imp_RegisterApplicationRestart : DWORD
EXTERNDEF __imp_GetThreadPreferredUILanguages : DWORD
EXTERNDEF __imp_SHCreateItemFromParsingName : DWORD
EXTERNDEF __imp_InitNetworkAddressControl : DWORD
EXTERNDEF __imp_ChangeWindowMessageFilter : DWORD
EXTERNDEF __imp_DrawThemeTextEx : DWORD
EXTERNDEF __imp_BufferedPaintInit : DWORD
EXTERNDEF __imp_BufferedPaintUnInit : DWORD
EXTERNDEF __imp_BeginBufferedPaint : DWORD
EXTERNDEF __imp_EndBufferedPaint : DWORD
EXTERNDEF __imp_DwmIsCompositionEnabled : DWORD
EXTERNDEF __imp_DwmDefWindowProc : DWORD
EXTERNDEF __imp_DwmSetWindowAttribute : DWORD
EXTERNDEF __imp_DwmExtendFrameIntoClientArea : DWORD
EXTERNDEF __imp_PSGetPropertyDescriptionListFromString : DWORD
.code
ENDIF
end
| 42.731959 | 109 | 0.859349 |
5a9337c26dc3274db0909d0345912cac81126eab | 877 | asm | Assembly | programs/oeis/193/A193577.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/193/A193577.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/193/A193577.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A193577: 5*7^n
; 5,35,245,1715,12005,84035,588245,4117715,28824005,201768035,1412376245,9886633715,69206436005,484445052035,3391115364245,23737807549715,166164652848005,1163152569936035,8142067989552245,56994475926865715,398961331488060005,2792729320416420035,19549105242914940245,136843736700404581715,957906156902832072005,6705343098319824504035,46937401688238771528245,328561811817671400697715,2299932682723699804884005,16099528779065898634188035,112696701453461290439316245,788876910174229033075213715,5522138371219603231526496005,38654968598537222620685472035,270584780189760558344798304245,1894093461328323908413588129715,13258654229298267358895116908005,92810579605087871512265818356035,649674057235615100585860728492245,4547718400649305704101025099445715,31834028804545139928707175696120005,222838201631815979500950229872840035
mov $1,7
pow $1,$0
mul $1,5
mov $0,$1
| 109.625 | 820 | 0.920182 |
ce9ef40c604821704df1d66d1a67afaaaf129537 | 2,436 | asm | Assembly | streaming_libs/x264/common/x86/const-a.asm | HellicarAndLewis/Caravideo | bba46ae7b049d5cb6382ca111050441d5b6ddcdf | [
"MIT"
] | 7 | 2015-04-18T19:52:02.000Z | 2020-04-29T21:45:45.000Z | streaming_libs/x264/common/x86/const-a.asm | HellicarAndLewis/Caravideo | bba46ae7b049d5cb6382ca111050441d5b6ddcdf | [
"MIT"
] | null | null | null | streaming_libs/x264/common/x86/const-a.asm | HellicarAndLewis/Caravideo | bba46ae7b049d5cb6382ca111050441d5b6ddcdf | [
"MIT"
] | null | null | null | ;*****************************************************************************
;* const-a.asm: x86 global constants
;*****************************************************************************
;* Copyright (C) 2010-2012 x264 project
;*
;* Authors: Loren Merritt <lorenm@u.washington.edu>
;* Jason Garrett-Glaser <darkshikari@gmail.com>
;*
;* This program is free software; you can redistribute it and/or modify
;* it under the terms of the GNU General Public License as published by
;* the Free Software Foundation; either version 2 of the License, or
;* (at your option) any later version.
;*
;* This program is distributed in the hope that it will be useful,
;* but WITHOUT ANY WARRANTY; without even the implied warranty of
;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;* GNU General Public License for more details.
;*
;* You should have received a copy of the GNU General Public License
;* along with this program; if not, write to the Free Software
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.
;*
;* This program is also available under a commercial proprietary license.
;* For more information, contact us at licensing@x264.com.
;*****************************************************************************
%include "x86inc.asm"
SECTION_RODATA
const pb_01, times 8 db 0,1
const pb_0, times 16 db 0
const pb_a1, times 16 db 0xa1
const pb_1, times 16 db 1
const pb_3, times 16 db 3
const hsub_mul, times 8 db 1, -1
const pb_shuf8x8c, db 0,0,0,0,2,2,2,2,4,4,4,4,6,6,6,6
const pw_1, times 8 dw 1
const pw_2, times 8 dw 2
const pw_m2, times 8 dw -2
const pw_4, times 8 dw 4
const pw_8, times 8 dw 8
const pw_16, times 8 dw 16
const pw_32, times 8 dw 32
const pw_64, times 8 dw 64
const pw_32_0, times 4 dw 32,
times 4 dw 0
const pw_8000, times 8 dw 0x8000
const pw_3fff, times 8 dw 0x3fff
const pw_pixel_max,times 8 dw ((1 << BIT_DEPTH)-1)
const pw_ppppmmmm, dw 1,1,1,1,-1,-1,-1,-1
const pw_ppmmppmm, dw 1,1,-1,-1,1,1,-1,-1
const pw_pmpmpmpm, dw 1,-1,1,-1,1,-1,1,-1
const pw_pmmpzzzz, dw 1,-1,-1,1,0,0,0,0
const pd_1, times 4 dd 1
const pd_32, times 4 dd 32
const pd_1024, times 4 dd 1024
const pd_ffff, times 4 dd 0xffff
const pw_00ff, times 8 dw 0x00ff
const pw_ff00, times 8 dw 0xff00
const sw_64, dd 64
| 37.476923 | 78 | 0.612069 |
f804b84618b019337a8448b4b460e9e41451da07 | 632 | asm | Assembly | src/test/ref/comma-expr-for.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | 2 | 2022-03-01T02:21:14.000Z | 2022-03-01T04:33:35.000Z | src/test/ref/comma-expr-for.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | src/test/ref/comma-expr-for.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | // Tests comma-expressions in for()-statement
// Commodore 64 PRG executable file
.file [name="comma-expr-for.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
.segment Code
main: {
.label SCREEN = $400
lda #'g'
ldx #0
__b1:
// for( byte i=0; j<10, i<10; i++, j++)
cpx #$a
bcc __b2
// }
rts
__b2:
// SCREEN[i] = j
sta SCREEN,x
// for( byte i=0; j<10, i<10; i++, j++)
inx
clc
adc #1
jmp __b1
}
| 21.066667 | 65 | 0.594937 |
09b601b7830f9f1b463a7e319686590591e65c51 | 563 | asm | Assembly | libsrc/graphics/cpc/swapgfxbk.asm | grancier/z180 | e83f35e36c9b4d1457e40585019430e901c86ed9 | [
"ClArtistic"
] | null | null | null | libsrc/graphics/cpc/swapgfxbk.asm | grancier/z180 | e83f35e36c9b4d1457e40585019430e901c86ed9 | [
"ClArtistic"
] | null | null | null | libsrc/graphics/cpc/swapgfxbk.asm | grancier/z180 | e83f35e36c9b4d1457e40585019430e901c86ed9 | [
"ClArtistic"
] | 1 | 2019-12-03T23:57:48.000Z | 2019-12-03T23:57:48.000Z | ;
; Page the graphics bank in/out - used by all gfx functions
; Doesn't really page on the Amstrad CPC.
;
;
; $Id: swapgfxbk.asm,v 1.7 2017/01/02 22:57:57 aralbrec Exp $
;
; There might be something to put here; it looks like the
; alternate registers and/or the index registers have to be
; handled carefully
;
SECTION code_clib
PUBLIC swapgfxbk
PUBLIC _swapgfxbk
PUBLIC swapgfxbk1
PUBLIC _swapgfxbk1
.swapgfxbk
._swapgfxbk
;di
;ret
.swapgfxbk1
._swapgfxbk1
;ei
ret
| 19.413793 | 65 | 0.632327 |
1aa9f61bb126f20c15679530ad647b54a0c8045a | 403 | asm | Assembly | libsrc/_DEVELOPMENT/math/float/math48/c/sccz80/cm48_sccz80p_dpush2.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/math/float/math48/c/sccz80/cm48_sccz80p_dpush2.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/math/float/math48/c/sccz80/cm48_sccz80p_dpush2.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null |
SECTION code_fp_math48
PUBLIC cm48_sccz80p_dpush2
EXTERN am48_dpushw
; sccz80 float primitive
; Push float in AC' onto stack underneath one stacked word
;
; Float is in math48 format.
;
; enter : AC' = double (math48 format)
; stack = word, return
;
; exit : stack = double (math48 format), word
;
; uses : DE, HL
defc cm48_sccz80p_dpush2 = am48_dpushw
| 19.190476 | 61 | 0.652605 |
0cad87297b8fa4eccd08d09c7f11600a5c755ab2 | 1,392 | asm | Assembly | programs/oeis/022/A022316.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/022/A022316.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/022/A022316.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A022316: a(n) = a(n-1) + a(n-2) + 1, with a(0) = 0 and a(1) = 11.
; 0,11,12,24,37,62,100,163,264,428,693,1122,1816,2939,4756,7696,12453,20150,32604,52755,85360,138116,223477,361594,585072,946667,1531740,2478408,4010149,6488558,10498708,16987267,27485976,44473244,71959221,116432466,188391688,304824155,493215844,798040000,1291255845,2089295846,3380551692,5469847539,8850399232,14320246772,23170646005,37490892778,60661538784,98152431563,158813970348,256966401912,415780372261,672746774174,1088527146436,1761273920611,2849801067048,4611074987660,7460876054709,12071951042370,19532827097080,31604778139451,51137605236532,82742383375984,133879988612517,216622371988502,350502360601020,567124732589523,917627093190544,1484751825780068,2402378918970613,3887130744750682,6289509663721296,10176640408471979,16466150072193276,26642790480665256,43108940552858533,69751731033523790,112860671586382324,182612402619906115,295473074206288440,478085476826194556,773558551032482997,1251644027858677554,2025202578891160552,3276846606749838107,5302049185640998660,8578895792390836768,13880944978031835429,22459840770422672198,36340785748454507628,58800626518877179827,95141412267331687456,153942038786208867284,249083451053540554741,403025489839749422026,652108940893289976768,1055134430733039398795,1707243371626329375564,2762377802359368774360
seq $0,22102 ; Fibonacci sequence beginning 1, 12.
sub $0,1
| 232 | 1,262 | 0.886494 |
e8c7c115486a16d7db249e9f8c8258b15f7ea67e | 1,677 | asm | Assembly | programs/oeis/133/A133044.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/133/A133044.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/133/A133044.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A133044: Area of the spiral of equilateral triangles with side lengths which follow the Padovan sequence, divided by the area of the initial triangle.
; 1,2,3,7,11,20,36,61,110,191,335,591,1032,1816,3185,5586,9811,17207,30203,53004,93004,163229,286430,502655,882111,1547967,2716528,4767152,8365761,14680930,25763171,45211271,79340235,139232356,244335860,428779421,752455502,1320467391,2317258575,4066505551,7136219576,12523192392,21976670833,38566368434,67679259059,118768819959,208424749435,365759938460,641863946396,1126392704957,1976681401278,3468834043647,6087379392511,10682606140415,18746666933856,32898107119456,57732153443585,101312866705346,177791687082435,312002660905351,547526501435147,960842029041716,1686160217561540,2959004907510141,5192691626501166,9112538563060927,15991390407117263,28062933877689039,49247015911314664,86422488352051064,151660894670497265,266146316900230290,467054227482035731,819623032734337847,1438338154886843003,2524107504521432492,4429499886890310636,7773230424146053725,13641068465923255966,23938406394590692991,42008974747404281535,73720611566141054911,129370654779468516560,227029672740200362256,398409302267073089217,699159586573414501666,1226939543619956209955,2153128802933570900231,3778477648820600368331,6630766038327585703812,11636183230768142174868,20420078072029299055069,35834738951618041255694,62885583061974926249919,110356505244361109721295,193662166378365334642895,339853410574344486238616,596401160014684746553512,1046611075833390342707953,1836674402226440424328562
mov $2,$0
mov $3,$0
add $3,1
lpb $3
mov $0,$2
sub $3,1
sub $0,$3
seq $0,134816 ; Padovan's spiral numbers.
pow $0,2
add $1,$0
lpe
mov $0,$1
| 104.8125 | 1,370 | 0.880143 |
4814149832423937a309522180c0c7dc5296ea83 | 1,416 | asm | Assembly | programs/oeis/084/A084684.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/084/A084684.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/084/A084684.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A084684: Degrees of certain maps.
; 1,2,4,8,13,20,28,38,49,62,76,92,109,128,148,170,193,218,244,272,301,332,364,398,433,470,508,548,589,632,676,722,769,818,868,920,973,1028,1084,1142,1201,1262,1324,1388,1453,1520,1588,1658,1729,1802,1876,1952,2029,2108,2188,2270,2353,2438,2524,2612,2701,2792,2884,2978,3073,3170,3268,3368,3469,3572,3676,3782,3889,3998,4108,4220,4333,4448,4564,4682,4801,4922,5044,5168,5293,5420,5548,5678,5809,5942,6076,6212,6349,6488,6628,6770,6913,7058,7204,7352,7501,7652,7804,7958,8113,8270,8428,8588,8749,8912,9076,9242,9409,9578,9748,9920,10093,10268,10444,10622,10801,10982,11164,11348,11533,11720,11908,12098,12289,12482,12676,12872,13069,13268,13468,13670,13873,14078,14284,14492,14701,14912,15124,15338,15553,15770,15988,16208,16429,16652,16876,17102,17329,17558,17788,18020,18253,18488,18724,18962,19201,19442,19684,19928,20173,20420,20668,20918,21169,21422,21676,21932,22189,22448,22708,22970,23233,23498,23764,24032,24301,24572,24844,25118,25393,25670,25948,26228,26509,26792,27076,27362,27649,27938,28228,28520,28813,29108,29404,29702,30001,30302,30604,30908,31213,31520,31828,32138,32449,32762,33076,33392,33709,34028,34348,34670,34993,35318,35644,35972,36301,36632,36964,37298,37633,37970,38308,38648,38989,39332,39676,40022,40369,40718,41068,41420,41773,42128,42484,42842,43201,43562,43924,44288,44653,45020,45388,45758,46129,46502
mov $1,$0
pow $1,2
mul $1,3
add $1,5
div $1,4
| 157.333333 | 1,332 | 0.800141 |
755ad68dddd672cca2a7e5aefcdf745bdcbd4c31 | 7,921 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_1945.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_1945.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_1945.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r14
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0x199f3, %rdx
and $18739, %r11
mov (%rdx), %r13d
cmp %r11, %r11
lea addresses_D_ht+0xe2d3, %rbp
nop
nop
add $23147, %r14
mov (%rbp), %ecx
nop
nop
nop
nop
sub $24434, %r13
lea addresses_D_ht+0x4cd3, %rsi
lea addresses_WC_ht+0xbc2d, %rdi
nop
xor $49607, %r13
mov $38, %rcx
rep movsw
nop
nop
inc %r13
lea addresses_WT_ht+0x114d3, %r13
clflush (%r13)
nop
xor $48594, %rcx
movb $0x61, (%r13)
nop
nop
nop
nop
add $22711, %r13
lea addresses_WT_ht+0x6559, %r13
nop
and %rcx, %rcx
and $0xffffffffffffffc0, %r13
movaps (%r13), %xmm1
vpextrq $0, %xmm1, %rsi
nop
nop
nop
nop
nop
cmp %r11, %r11
lea addresses_UC_ht+0x1e12b, %rdx
nop
nop
nop
nop
cmp $59917, %r14
movb $0x61, (%rdx)
nop
nop
nop
nop
nop
xor $36511, %r13
lea addresses_D_ht+0x1211, %rdx
nop
nop
nop
nop
dec %rdi
vmovups (%rdx), %ymm1
vextracti128 $1, %ymm1, %xmm1
vpextrq $0, %xmm1, %rcx
nop
nop
nop
nop
nop
add %rbp, %rbp
lea addresses_normal_ht+0x5253, %rdx
nop
nop
and $36423, %rbp
movw $0x6162, (%rdx)
nop
nop
nop
nop
xor $36245, %rsi
lea addresses_D_ht+0xc4d3, %rdx
nop
nop
sub $824, %r11
movb $0x61, (%rdx)
nop
nop
add $49185, %rdi
lea addresses_normal_ht+0x54bf, %r13
nop
nop
nop
cmp %rdi, %rdi
mov $0x6162636465666768, %r11
movq %r11, %xmm5
vmovups %ymm5, (%r13)
nop
nop
nop
nop
nop
xor $29853, %rcx
lea addresses_UC_ht+0x16f23, %rsi
lea addresses_normal_ht+0x184b3, %rdi
nop
nop
nop
add $36830, %r14
mov $91, %rcx
rep movsq
nop
nop
nop
sub %rdx, %rdx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r14
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %r15
push %rax
push %rbp
push %rbx
push %rsi
// Store
mov $0xc1f, %rbx
xor $35455, %r13
movl $0x51525354, (%rbx)
nop
nop
nop
cmp $30713, %r13
// Store
lea addresses_US+0x2553, %r15
cmp %r12, %r12
mov $0x5152535455565758, %rbx
movq %rbx, %xmm5
vmovups %ymm5, (%r15)
nop
sub %r15, %r15
// Load
lea addresses_WT+0x1c1d3, %rax
inc %r13
mov (%rax), %r12
nop
nop
nop
sub $39513, %r15
// Store
lea addresses_UC+0x6cd3, %r12
nop
nop
nop
xor $53441, %rbx
mov $0x5152535455565758, %rax
movq %rax, (%r12)
nop
and $43355, %rbp
// Load
lea addresses_WC+0x1e3d3, %rbx
nop
nop
and %rax, %rax
mov (%rbx), %r13w
nop
nop
nop
nop
xor $41661, %rbx
// Faulty Load
lea addresses_PSE+0x14d3, %r15
cmp $11702, %rsi
movb (%r15), %r12b
lea oracles, %rbx
and $0xff, %r12
shlq $12, %r12
mov (%rbx,%r12,1), %r12
pop %rsi
pop %rbx
pop %rbp
pop %rax
pop %r15
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_PSE', 'same': False, 'size': 4, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_P', 'same': False, 'size': 4, 'congruent': 1, 'NT': True, 'AVXalign': True}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_US', 'same': False, 'size': 32, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT', 'same': False, 'size': 8, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_UC', 'same': False, 'size': 8, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC', 'same': False, 'size': 2, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_PSE', 'same': True, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_D_ht', 'same': False, 'size': 4, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'same': False, 'size': 4, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 1, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 16, 'congruent': 1, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 1, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_D_ht', 'same': False, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 2, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 1, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'}
{'33': 21829}
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
*/
| 32.86722 | 2,999 | 0.652948 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.