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
3f9db2af4b1d5dcfe4dfe71d98f485fa17c2703e
78
asm
Assembly
public/wintab/wintabx/get.asm
SmileyAG/cstrike15_src
5315265785320e0f53ebd27c3486e6c7b826a227
[ "Unlicense" ]
2
2022-02-25T12:18:31.000Z
2022-03-16T23:59:59.000Z
public/wintab/wintabx/get.asm
SmileyAG/cstrike15_src
5315265785320e0f53ebd27c3486e6c7b826a227
[ "Unlicense" ]
null
null
null
public/wintab/wintabx/get.asm
SmileyAG/cstrike15_src
5315265785320e0f53ebd27c3486e6c7b826a227
[ "Unlicense" ]
7
2021-08-22T11:29:02.000Z
2022-03-29T11:59:15.000Z
include xlibproc.inc include Wintab.inc PROC_TEMPLATE WTGet, 4, Wintab, -, 61
19.5
37
0.782051
efacd059d7564c6ddb4c176773fab7eb258b3fe4
1,196
asm
Assembly
programs/oeis/265/A265413.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/265/A265413.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/265/A265413.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A265413: Positions of records in A265410: a(0) = 1; for n >= 1, a(n) = 1 + A265412(n-1). ; 1,2,9,12,15,16,19,20,23,24,25,28,29,30,33,34,35,36,39,40,41,42,45,46,47,48,49,52,53,54,55,56,59,60,61,62,63,64,67,68,69,70,71,72,75,76,77,78,79,80,81,84,85,86,87,88,89,90,93,94,95,96,97,98,99,100,103,104,105,106,107,108,109,110,113,114,115,116,117,118,119,120,121,124,125,126,127,128,129,130,131,132,135,136,137,138,139,140,141,142,143,144,147,148,149,150,151,152,153,154,155,156,159,160,161,162,163,164,165,166,167,168,169,172,173,174,175,176,177,178,179,180,181,182,185,186,187,188,189,190,191,192,193,194,195,196,199,200,201,202,203,204,205,206,207,208,209,210,213,214,215,216,217,218,219,220,221,222,223,224,225,228,229,230,231,232,233,234,235,236,237,238,239,240,243,244,245,246,247,248,249,250,251,252,253,254,255,256,259,260,261,262,263,264,265,266,267,268,269,270,271,272,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,309,310,311,312,313,314,315,316 mov $1,$0 mul $1,2 trn $1,2 mov $2,$0 mov $0,$1 add $0,$1 trn $1,$0 add $2,2 lpb $0 sub $0,1 trn $0,$1 add $1,2 lpe mov $0,2 trn $0,$1 add $1,$2 add $1,1 sub $1,$0
54.363636
933
0.688127
5ac69621636f8540c4f1974ad09b73a32f47caff
468
asm
Assembly
oeis/037/A037531.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/037/A037531.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/037/A037531.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A037531: Base 6 digits are, in order, the first n terms of the periodic sequence with initial period 1,1,2. ; Submitted by Jon Maiga ; 1,7,44,265,1591,9548,57289,343735,2062412,12374473,74246839,445481036,2672886217,16037317303,96223903820,577343422921,3464060537527,20784363225164,124706179350985,748237076105911,4489422456635468 seq $0,33133 ; Base-6 digits are, in order, the first n terms of the periodic sequence with initial period 1,1,0. mul $0,88 div $0,84
58.5
197
0.799145
db88de34fb50caf43f9c7be546f2c8f09c73a3ce
1,341
asm
Assembly
Transynther/x86/_processed/US/_zr_/i7-7700_9_0xca_notsx.log_1_1397.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_1_1397.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_1_1397.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 %r14 push %r9 push %rcx push %rdi push %rdx push %rsi lea addresses_WT_ht+0x1208a, %r12 nop nop nop xor %rdx, %rdx movl $0x61626364, (%r12) nop sub $1585, %r9 lea addresses_normal_ht+0x3b0a, %rsi lea addresses_D_ht+0x330a, %rdi nop nop nop sub $63534, %r14 mov $3, %rcx rep movsb nop nop nop add %rdx, %rdx pop %rsi pop %rdx pop %rdi pop %rcx pop %r9 pop %r14 pop %r12 ret .global s_faulty_load s_faulty_load: push %r11 push %r14 push %r15 push %r8 push %r9 push %rbp // Faulty Load lea addresses_US+0x1e30a, %r15 xor $15053, %r14 mov (%r15), %r9w lea oracles, %rbp and $0xff, %r9 shlq $12, %r9 mov (%rbp,%r9,1), %r9 pop %rbp pop %r9 pop %r8 pop %r15 pop %r14 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_US'}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': True, 'type': 'addresses_US'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 7, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'} {'src': {'congruent': 11, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM'} {'00': 1} 00 */
17.644737
153
0.653244
625f45dc673cfd73db70ec4061bdb27a9aa8a26f
786
asm
Assembly
oeis/167/A167321.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/167/A167321.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/167/A167321.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A167321: Totally multiplicative sequence with a(p) = 2*(p+3) for prime p. ; Submitted by Christian Krause ; 1,10,12,100,16,120,20,1000,144,160,28,1200,32,200,192,10000,40,1440,44,1600,240,280,52,12000,256,320,1728,2000,64,1920,68,100000,336,400,320,14400,80,440,384,16000,88,2400,92,2800,2304,520,100,120000,400,2560,480,3200,112,17280,448,20000,528,640,124,19200,128,680,2880,1000000,512,3360,140,4000,624,3200,148,144000,152,800,3072,4400,560,3840,164,160000,20736,880,172,24000,640,920,768,28000,184,23040,640,5200,816,1000,704,1200000,200,4000,4032,25600 add $0,1 mov $1,1 mov $2,2 mov $4,1 lpb $0 mul $1,$4 mov $3,$0 lpb $3 mov $4,$0 mod $4,$2 add $2,1 cmp $4,0 cmp $4,0 sub $3,$4 lpe div $0,$2 mov $4,$2 add $4,$2 add $4,6 lpe mov $0,$1
30.230769
452
0.6743
09286fabfc4336bb139802a2bf5c8efecba8c084
6,438
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_10501_420.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_10501_420.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_10501_420.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 %r15 push %r8 push %r9 push %rax push %rdi lea addresses_A_ht+0xdbe0, %r11 nop nop nop xor %rdi, %rdi movl $0x61626364, (%r11) nop dec %r13 lea addresses_WC_ht+0x8195, %r8 cmp $13192, %r15 movl $0x61626364, (%r8) nop nop nop inc %r9 lea addresses_D_ht+0x19393, %rax cmp %rdi, %rdi and $0xffffffffffffffc0, %rax movaps (%rax), %xmm4 vpextrq $0, %xmm4, %r9 nop dec %r11 lea addresses_D_ht+0x136af, %rdi nop nop nop nop nop and $7841, %r11 mov (%rdi), %r9d add $22760, %rax lea addresses_A_ht+0xb093, %r11 nop nop nop nop nop inc %rdi and $0xffffffffffffffc0, %r11 vmovntdqa (%r11), %ymm6 vextracti128 $0, %ymm6, %xmm6 vpextrq $1, %xmm6, %rax nop nop nop dec %r9 lea addresses_WT_ht+0x54a8, %r8 sub $49247, %r9 and $0xffffffffffffffc0, %r8 movaps (%r8), %xmm3 vpextrq $0, %xmm3, %r15 nop nop cmp $53035, %r15 lea addresses_A_ht+0x186f8, %rdi nop nop add $18191, %r13 movl $0x61626364, (%rdi) nop nop nop nop nop add $15611, %r11 pop %rdi pop %rax pop %r9 pop %r8 pop %r15 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r14 push %r8 push %rbx push %rcx push %rdi push %rsi // REPMOV lea addresses_WT+0x7d2b, %rsi lea addresses_A+0xa5b3, %rdi nop nop nop sub %r14, %r14 mov $30, %rcx rep movsq nop add %rcx, %rcx // Store lea addresses_PSE+0x14b6, %r11 clflush (%r11) sub $19821, %rcx mov $0x5152535455565758, %rsi movq %rsi, %xmm0 movups %xmm0, (%r11) nop nop nop nop cmp $57149, %r14 // Store mov $0xf93, %r8 nop nop add %rdi, %rdi mov $0x5152535455565758, %rcx movq %rcx, %xmm3 vmovups %ymm3, (%r8) nop nop nop nop nop sub %r8, %r8 // Faulty Load lea addresses_D+0xe893, %r8 nop nop cmp $34737, %r14 mov (%r8), %cx lea oracles, %rsi and $0xff, %rcx shlq $12, %rcx mov (%rsi,%rcx,1), %rcx pop %rsi pop %rdi pop %rcx pop %rbx pop %r8 pop %r14 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_D', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_A', 'congruent': 5, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_PSE', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_P', 'same': False, 'size': 32, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_D', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 4, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_D_ht', 'same': False, 'size': 16, 'congruent': 7, 'NT': True, 'AVXalign': True}, 'OP': 'LOAD'} {'src': {'type': 'addresses_D_ht', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'same': False, 'size': 32, 'congruent': 10, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'36': 10501} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
37.213873
2,999
0.654862
d7ff9fe9d42c0c4b14deb04f91afe92c4a429b85
364
asm
Assembly
test/asm/redef-equs.asm
michealccc/rgbds
b51e1c7c2c4ce2769f01e016967d0115893a7a88
[ "MIT" ]
522
2017-02-25T21:10:13.000Z
2020-09-13T14:26:18.000Z
test/asm/redef-equs.asm
michealccc/rgbds
b51e1c7c2c4ce2769f01e016967d0115893a7a88
[ "MIT" ]
405
2017-02-25T21:32:37.000Z
2020-09-13T16:43:29.000Z
test/asm/redef-equs.asm
michealccc/rgbds
b51e1c7c2c4ce2769f01e016967d0115893a7a88
[ "MIT" ]
84
2017-02-25T21:10:26.000Z
2020-09-13T14:28:25.000Z
s EQUS "Hello, " REDEF s EQUS "{s}world!" ; prints "Hello, world!" PRINTLN "{s}" list: MACRO LIST_NAME EQUS "\1" REDEF {LIST_NAME} EQUS "[" REPT _NARG - 1 REDEF {LIST_NAME} EQUS "{{LIST_NAME}}\2;" SHIFT ENDR REDEF {LIST_NAME} EQUS "{{LIST_NAME}}]" PURGE LIST_NAME ENDM list FOO PRINTLN "{FOO}" list FOO, 1, A, 2, B PRINTLN "{FOO}" N EQU 42 REDEF N EQUS "X"
15.166667
41
0.653846
e56b46148eb1bf4d4a2982a4c74653a61b9ed6ac
4,638
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_189.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_189.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_189.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 %rbp push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_normal_ht+0x4972, %rsi lea addresses_normal_ht+0x1e9a6, %rdi nop nop xor $59522, %rdx mov $75, %rcx rep movsq nop nop nop and %rbp, %rbp lea addresses_normal_ht+0x1d172, %rdi nop nop nop nop sub $50549, %rbx mov $0x6162636465666768, %rsi movq %rsi, %xmm7 movups %xmm7, (%rdi) nop cmp %rcx, %rcx lea addresses_normal_ht+0x1e372, %rdi nop nop inc %rbp mov (%rdi), %si nop nop nop xor $56587, %rcx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rbp ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r15 push %rax push %rbp push %rdx // Faulty Load lea addresses_RW+0xc972, %r15 nop nop nop cmp $5302, %rax mov (%r15), %r13w lea oracles, %rax and $0xff, %r13 shlq $12, %r13 mov (%rax,%r13,1), %r13 pop %rdx pop %rbp pop %rax pop %r15 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 11, 'size': 16, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 9, 'size': 2, 'same': False, 'NT': False}} {'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 */
52.11236
2,999
0.664942
38b88fc85779e7acc9ce9841eb6f4fe3f3cda36c
731
asm
Assembly
programs/oeis/228/A228705.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/228/A228705.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/228/A228705.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A228705: Expansion of (1-2*x+4*x^2-2*x^3+x^4)/((1-x)^4*(1+x^2)^2). ; 1,2,4,10,19,28,40,60,85,110,140,182,231,280,336,408,489,570,660,770,891,1012,1144,1300,1469,1638,1820,2030,2255,2480,2720,2992,3281,3570,3876,4218,4579,4940,5320,5740,6181,6622,7084,7590,8119,8648,9200,9800,10425,11050,11700,12402,13131,13860,14616,15428,16269,17110,17980,18910,19871,20832,21824,22880,23969,25058,26180,27370,28595,29820,31080,32412,33781,35150,36556,38038,39559,41080,42640,44280,45961,47642,49364,51170,53019,54868,56760,58740,60765,62790,64860,67022,69231,71440,73696,76048,78449,80850,83300,85850 lpb $0 mov $2,$0 sub $0,1 seq $2,282079 ; Number of n-element subsets of [n+2] having an even sum. add $1,$2 lpe add $1,1 mov $0,$1
60.916667
520
0.737346
c6f74ef60e60b8626147ba08a5e2008a3a5d612c
698
asm
Assembly
oeis/131/A131115.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/131/A131115.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/131/A131115.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A131115: Triangle read by rows: T(n,k) = 7*binomial(n,k) for 1 <= k <= n with T(n,n) = 1 for n >= 0. ; Submitted by Jamie Morken(s2) ; 1,7,1,7,14,1,7,21,21,1,7,28,42,28,1,7,35,70,70,35,1,7,42,105,140,105,42,1,7,49,147,245,245,147,49,1,7,56,196,392,490,392,196,56,1,7,63,252,588,882,882,588,252,63,1,7,70,315,840,1470,1764,1470,840,315,70,1,7,77,385,1155,2310,3234,3234,2310,1155,385,77,1,7,84,462,1540,3465,5544,6468,5544,3465,1540,462,84,1,7,91,546,2002,5005,9009,12012,12012,9009 add $0,1 seq $0,198321 ; Triangle T(n,k), read by rows, given by (0,1,0,0,0,0,0,0,0,0,0,...) DELTA (1,1,-1,1,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938. mul $0,28 sub $0,1 div $0,4 add $0,1
63.454545
348
0.657593
08893dd84f8ca1da7af1555f0d302bf215cb3020
1,270
asm
Assembly
programs/oeis/248/A248572.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/248/A248572.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/248/A248572.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A248572: a(n) = 29*n + 1. ; 1,30,59,88,117,146,175,204,233,262,291,320,349,378,407,436,465,494,523,552,581,610,639,668,697,726,755,784,813,842,871,900,929,958,987,1016,1045,1074,1103,1132,1161,1190,1219,1248,1277,1306,1335,1364,1393,1422,1451,1480,1509,1538,1567,1596,1625,1654,1683,1712,1741,1770,1799,1828,1857,1886,1915,1944,1973,2002,2031,2060,2089,2118,2147,2176,2205,2234,2263,2292,2321,2350,2379,2408,2437,2466,2495,2524,2553,2582,2611,2640,2669,2698,2727,2756,2785,2814,2843,2872,2901,2930,2959,2988,3017,3046,3075,3104,3133,3162,3191,3220,3249,3278,3307,3336,3365,3394,3423,3452,3481,3510,3539,3568,3597,3626,3655,3684,3713,3742,3771,3800,3829,3858,3887,3916,3945,3974,4003,4032,4061,4090,4119,4148,4177,4206,4235,4264,4293,4322,4351,4380,4409,4438,4467,4496,4525,4554,4583,4612,4641,4670,4699,4728,4757,4786,4815,4844,4873,4902,4931,4960,4989,5018,5047,5076,5105,5134,5163,5192,5221,5250,5279,5308,5337,5366,5395,5424,5453,5482,5511,5540,5569,5598,5627,5656,5685,5714,5743,5772,5801,5830,5859,5888,5917,5946,5975,6004,6033,6062,6091,6120,6149,6178,6207,6236,6265,6294,6323,6352,6381,6410,6439,6468,6497,6526,6555,6584,6613,6642,6671,6700,6729,6758,6787,6816,6845,6874,6903,6932,6961,6990,7019,7048,7077,7106,7135,7164,7193,7222 mov $1,$0 mul $1,29 add $1,1
181.428571
1,211
0.77874
90ca9c2aad4d9c5419606e0e4d07b9a9393d3a79
1,161
asm
Assembly
src/kernel/write.asm
johnnystarr/xtnix
0baab99017908456ee8447ef3dcc73c1adbcaa95
[ "MIT" ]
null
null
null
src/kernel/write.asm
johnnystarr/xtnix
0baab99017908456ee8447ef3dcc73c1adbcaa95
[ "MIT" ]
null
null
null
src/kernel/write.asm
johnnystarr/xtnix
0baab99017908456ee8447ef3dcc73c1adbcaa95
[ "MIT" ]
null
null
null
;------------------------------------------------------------------------------ ; kernel_write 0.1.0 ; input: SI = 16-bit address of string ; input: DH: TODO: implement DH = file descriptor (see kernel.inc) ; input: DL:d0 = No carriage return if set ;------------------------------------------------------------------------------ kernel_write: .do: lodsb ; loads next byte to al, (inc si) cmp al, 0 ; at the end of our string? je .done ; if so, leave mov ah, 0eh ; bios (output char) int int 10h ; call bios int jmp .do ; loop .done: test dl, 00000001b ; check no carriage return flag jne .nc ; if checked, goto nc (no carriage) mov ah, 0eh ; setup ah for bios output char mov al, 0dh ; carriage return int 10h ; output carriage return mov al, 0ah ; new line int 10h ; output new line .nc: ret ; return
52.772727
79
0.388458
a4e1e3fd698ed62b9dfa3dbcb1efcd6352fbc9cf
719
asm
Assembly
oeis/178/A178626.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/178/A178626.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/178/A178626.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A178626: Convolution of Pell(n) and 10^n. ; Submitted by Christian Krause ; 1,12,125,1262,12649,126560,1265769,12658098,126581965,1265822028,12658226021,126582274070,1265822774161,12658227822392,126582278418945,1265822784660282,12658227847739509,126582278480139300,1265822784808018109,12658227848096175518,126582278481000369145,1265822784810096913808,12658227848101194196761,126582278481012485307330,1265822784810126164811421,12658227848101264814930172,126582278481012655794671765,1265822784810126576404273702,12658227848101265808603219169,126582278481012658193610712040 add $0,1 mov $4,1 lpb $0 sub $0,1 add $2,$4 mov $1,$2 mov $2,$3 mul $4,10 sub $4,$3 mul $3,2 add $3,$1 add $4,$2 lpe mov $0,$3
37.842105
496
0.820584
c4b49352f1d48c2c521b5f5892bdf57e5fe45cf5
258
asm
Assembly
mc-sema/validator/x86/tests/Pushl32m.asm
randolphwong/mcsema
eb5b376736e7f57ff0a61f7e4e5a436bbb874720
[ "BSD-3-Clause" ]
2
2021-08-07T16:21:29.000Z
2021-11-17T10:58:37.000Z
mc-sema/validator/x86/tests/Pushl32m.asm
randolphwong/mcsema
eb5b376736e7f57ff0a61f7e4e5a436bbb874720
[ "BSD-3-Clause" ]
null
null
null
mc-sema/validator/x86/tests/Pushl32m.asm
randolphwong/mcsema
eb5b376736e7f57ff0a61f7e4e5a436bbb874720
[ "BSD-3-Clause" ]
null
null
null
BITS 32 ;TEST_FILE_META_BEGIN ;TEST_TYPE=TEST_F ;TEST_IGNOREFLAGS=FLAG_AF ;TEST_FILE_META_END ; Pushl32m ;TEST_BEGIN_RECORDING lea edi, [esp-0x4] mov DWORD [edi], 0x8 push DWORD [edi] pop ecx xor edi, edi ;TEST_END_RECORDING
17.2
25
0.70155
a2c99b8caf5bbebcb6477c97a9857bfa6441ec18
797
asm
Assembly
asm/execve_24byte.asm
SYANiDE-/pentesteracademy_reverse-engineering-linux-32bit-applications
dfbfd30a6abb242b55353c18dab17a943d253758
[ "MIT" ]
null
null
null
asm/execve_24byte.asm
SYANiDE-/pentesteracademy_reverse-engineering-linux-32bit-applications
dfbfd30a6abb242b55353c18dab17a943d253758
[ "MIT" ]
null
null
null
asm/execve_24byte.asm
SYANiDE-/pentesteracademy_reverse-engineering-linux-32bit-applications
dfbfd30a6abb242b55353c18dab17a943d253758
[ "MIT" ]
null
null
null
; Author Chase Hatch ; execve("////bin/bash",""); ; nasm -f elf32 execve_24byte.asm -o execve_24byte.o ; ld -melf_i386 execve_24byte.o -o execve_24byte.elf ; note the lack of an environment; environment will be inherited, in all it's glory ; good or bad! global _start section .text _start: mov al, 0xb xor ecx,ecx push ecx ; echo -n "////bin/bash" |rev |xxd -g 4 -c 4 ; [#] 08/28/19 06:03:37 PM ; 00000000: 68736162 hsab ; 00000004: 2f6e6962 /nib ; 00000008: 2f2f2f2f //// push dword 0x68736162 push dword 0x2f6e6962 push dword 0x2f2f2f2f mov ebx, esp int 0x80 ; objdump -D execve_28byte.elf -Mintel ; echo -n """ b0 0b ; 31 c9 ; 51 ; 68 62 61 73 68 ; 68 62 69 6e 2f ; 68 2f 2f 2f 2f ; 89 e3 ; cd 80""" |xxd -r -p |wc -c ; 24
19.925
84
0.622334
38a8cc5a0c6fa3fb974384a20267f2eeec5f6a9c
3,153
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_40_174.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_40_174.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_40_174.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 %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0x4822, %rdx nop nop nop nop xor %rsi, %rsi movl $0x61626364, (%rdx) nop nop nop nop and $45594, %r12 lea addresses_D_ht+0x9a22, %rsi nop add %r12, %r12 mov (%rsi), %ebx nop nop nop nop nop cmp %rdx, %rdx lea addresses_A_ht+0x12a82, %rsi lea addresses_D_ht+0x17522, %rdi inc %rdx mov $40, %rcx rep movsq nop cmp %rdi, %rdi lea addresses_A_ht+0x1b122, %rcx nop nop nop nop xor $54569, %r11 movups (%rcx), %xmm2 vpextrq $0, %xmm2, %rbx nop nop nop sub $6473, %rsi lea addresses_WT_ht+0x18eb2, %rsi nop add %rdx, %rdx mov (%rsi), %rbx nop nop dec %rdx lea addresses_UC_ht+0x1bc22, %rdi nop cmp $24002, %r11 mov (%rdi), %edx nop nop nop nop nop cmp %rbx, %rbx lea addresses_D_ht+0x14af2, %rdi nop nop nop and %rdx, %rdx mov (%rdi), %r11 nop nop nop nop nop xor %r11, %r11 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r12 push %r14 push %r9 push %rax push %rbp push %rcx push %rsi // Store mov $0x5fc2680000000166, %rsi nop nop inc %r12 movl $0x51525354, (%rsi) nop nop cmp %rbp, %rbp // Load lea addresses_RW+0x1ee22, %r14 clflush (%r14) cmp %r9, %r9 mov (%r14), %eax nop nop nop xor %rax, %rax // Faulty Load lea addresses_RW+0x1ee22, %rsi clflush (%rsi) nop nop nop nop nop add %r9, %r9 movups (%rsi), %xmm4 vpextrq $0, %xmm4, %rcx lea oracles, %rbp and $0xff, %rcx shlq $12, %rcx mov (%rbp,%rcx,1), %rcx pop %rsi pop %rcx pop %rbp pop %rax pop %r9 pop %r14 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_RW', 'congruent': 0}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_NC', 'congruent': 2}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_RW', 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_RW', 'congruent': 0}} <gen_prepare_buffer> {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_D_ht', 'congruent': 8}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_D_ht', 'congruent': 10}} {'dst': {'same': False, 'congruent': 7, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 3, 'type': 'addresses_A_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_A_ht', 'congruent': 8}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WT_ht', 'congruent': 4}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_UC_ht', 'congruent': 9}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_D_ht', 'congruent': 4}} {'32': 40} 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 */
19.462963
145
0.64066
895cc8539d6439c9421a9ad2d20721c0166ee6e1
4,256
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_405.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_405.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_405.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r14 push %rbp push %rdi lea addresses_D_ht+0x2afe, %rdi cmp $61709, %r10 mov $0x6162636465666768, %r14 movq %r14, (%rdi) nop nop and $10132, %rbp pop %rdi pop %rbp pop %r14 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r13 push %r15 push %rbp push %rbx // Store lea addresses_RW+0x1d306, %r11 nop nop nop nop nop cmp %r13, %r13 movb $0x51, (%r11) nop xor $32623, %r11 // Faulty Load lea addresses_RW+0x2166, %r15 nop nop nop xor $37743, %rbx mov (%r15), %r13 lea oracles, %r15 and $0xff, %r13 shlq $12, %r13 mov (%r15,%r13,1), %r13 pop %rbx pop %rbp pop %r15 pop %r13 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_RW', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_RW', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 5}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_RW', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': True, 'size': 8, 'congruent': 3}} {'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 */
59.111111
2,999
0.660714
7b03cb9e55d6c3cd180b268b8ec3d1a02abc8a52
1,012
asm
Assembly
programs/oeis/004/A004772.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/004/A004772.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/004/A004772.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A004772: Numbers that are not congruent to 1 mod 4. ; 0,2,3,4,6,7,8,10,11,12,14,15,16,18,19,20,22,23,24,26,27,28,30,31,32,34,35,36,38,39,40,42,43,44,46,47,48,50,51,52,54,55,56,58,59,60,62,63,64,66,67,68,70,71,72,74,75,76,78,79,80,82,83,84,86,87,88,90,91,92,94,95,96,98,99,100,102,103,104,106,107,108,110,111,112,114,115,116,118,119,120,122,123,124,126,127,128,130,131,132,134,135,136,138,139,140,142,143,144,146,147,148,150,151,152,154,155,156,158,159,160,162,163,164,166,167,168,170,171,172,174,175,176,178,179,180,182,183,184,186,187,188,190,191,192,194,195,196,198,199,200,202,203,204,206,207,208,210,211,212,214,215,216,218,219,220,222,223,224,226,227,228,230,231,232,234,235,236,238,239,240,242,243,244,246,247,248,250,251,252,254,255,256,258,259,260,262,263,264,266,267,268,270,271,272,274,275,276,278,279,280,282,283,284,286,287,288,290,291,292,294,295,296,298,299,300,302,303,304,306,307,308,310,311,312,314,315,316,318,319,320,322,323,324,326,327,328,330,331,332 mul $0,4 mov $1,$0 add $1,2 div $1,3
126.5
919
0.719368
7940be48dd6b9c7e4553899b6e3118b3a89eea7a
208
asm
Assembly
libsrc/_DEVELOPMENT/math/float/am9511/lam32/c/sccz80/log2.asm
ahjelm/z88dk
c4de367f39a76b41f6390ceeab77737e148178fa
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/math/float/am9511/lam32/c/sccz80/log2.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/math/float/am9511/lam32/c/sccz80/log2.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
SECTION code_fp_am9511 PUBLIC log2 EXTERN cam32_sccz80_log2 defc log2 = cam32_sccz80_log2 ; SDCC bridge for Classic IF __CLASSIC PUBLIC _log2 EXTERN cam32_sdcc_log2 defc _log2 = cam32_sdcc_log2 ENDIF
13.866667
30
0.822115
acc0654c52673d1fd7fde5d27858b4cd8d497c8f
348
asm
Assembly
programs/oeis/026/A026583.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/026/A026583.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/026/A026583.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A026583: a(n) = Sum{T(i,j)}, 0<=j<=i, 0<=i<=2n, T given by A026568. ; 1,4,11,30,77,200,511,1314,3361,8620,22067,56550,144821,371024,950311,2434410,6235657,15973300,40915931,104809134,268472861,687709400,1761600847,4512438450,11558841841,29608595644,75843963011 add $0,3 seq $0,26597 ; Expansion of (1+x)/(1-x-4*x^2). sub $0,14 div $0,8 add $0,1
38.666667
192
0.715517
abdf459938682f418fc749dafb58c765ac5638d8
722
asm
Assembly
programs/oeis/070/A070940.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/070/A070940.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/070/A070940.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A070940: Number of digits that must be counted from left to right to reach the last 1 in the binary representation of n. ; 1,1,2,1,3,2,3,1,4,3,4,2,4,3,4,1,5,4,5,3,5,4,5,2,5,4,5,3,5,4,5,1,6,5,6,4,6,5,6,3,6,5,6,4,6,5,6,2,6,5,6,4,6,5,6,3,6,5,6,4,6,5,6,1,7,6,7,5,7,6,7,4,7,6,7,5,7,6,7,3,7,6,7,5,7,6,7,4,7,6,7,5,7,6,7,2,7,6,7,5,7,6,7,4,7,6,7,5,7,6,7,3,7,6,7,5,7,6,7,4,7,6,7,5,7,6,7,1,8,7,8,6,8,7,8,5,8,7,8,6,8,7,8,4,8,7,8,6,8,7,8,5,8,7,8,6,8,7,8,3,8,7,8,6,8,7,8,5,8,7,8,6,8,7,8,4,8,7,8,6,8,7,8,5,8,7,8,6,8,7,8,2,8,7,8,6,8,7,8,5,8,7,8,6,8,7,8,4,8,7,8,6,8,7,8,5,8,7,8,6,8,7,8,3,8,7,8,6,8,7,8,5,8,7,8,6,8,7,8,4,8,7,8,6,8,7,8,5,8,7 lpb $0,1 add $2,$0 add $2,1 gcd $2,2 div $0,$2 lpe mov $1,$0 add $1,1 log $1,2 add $1,1
51.571429
501
0.545706
1cbe8f2de6e771a6adead2fdc20698d55bc9c1fa
4,161
asm
Assembly
source/modules/basic/variables/vargetset.asm
paulscottrobson/mega-basic
f71750889136e2fdc4e6053c5696593318162bcf
[ "MIT" ]
3
2019-12-03T06:05:24.000Z
2021-03-24T01:51:07.000Z
source/modules/basic/variables/vargetset.asm
paulscottrobson/mega-basic
f71750889136e2fdc4e6053c5696593318162bcf
[ "MIT" ]
null
null
null
source/modules/basic/variables/vargetset.asm
paulscottrobson/mega-basic
f71750889136e2fdc4e6053c5696593318162bcf
[ "MIT" ]
null
null
null
; ******************************************************************************************* ; ******************************************************************************************* ; ; Name : vargetset.asm ; Purpose : Copy variable data to and from the mantissa,x ; Date : 25th August 2019 ; Author : Paul Robson (paul@robsons.org.uk) ; ; ******************************************************************************************* ; ******************************************************************************************* ; ******************************************************************************************* ; ; Copy data in zVarDataPtr/zVarType => Mantissa in correct format. ; ; ******************************************************************************************* VariableGet: phy ldy #0 ; copy first two bytes lda (zVarDataPtr),y sta XS_Mantissa,x iny lda (zVarDataPtr),y sta XS_Mantissa+1,x iny ; lda zVarType ; if it is a string, set up for that. cmp #token_Dollar beq _VGString ; lda (zVarDataPtr),y ; copy the next two bytes. sta XS_Mantissa+2,x iny lda (zVarDataPtr),y sta XS_Mantissa+3,x iny lda #1 ; set type to 1. sta XS_Type,x lda zVarType cmp #token_Percent ; if it is a %, then exit with default integer. beq _VGExit ; ; Set up an exponent. ; lda #$40 ; set type byte to zero sta XS_Type,x ; which is the code for zero/float. lda (zVarDataPtr),y ; the last value to copy is the exponent. sta XS_Exponent,x beq _VGExit ; if exponent is zero ... it's zero. ; lda XS_Mantissa+3,x ; the sign bit is the top mantissa bit. pha and #$80 sta XS_Type,x ; this is the type byte. pla ora #$80 ; set the MSB as you would expect. sta XS_Mantissa+3,x ; so it's a normalised float. bra _VGExit ; ; Handle string. ; _VGString: lda #2 ; set type to 2, a string sta XS_Type,x lda XS_Mantissa,x ; is the value there $0000 ora XS_Mantissa+1,x bne _VGExit ; if not, exit. ; sta zNullString ; make zNullString a 00 string. lda #zNullString sta XS_Mantissa,x ; make it point to it. _VGExit: ; exit ply rts ; ******************************************************************************************* ; ; Copy data in Mantissa => zVarDataPtr/zVarType, typecasting/checking ; ; ******************************************************************************************* VariableSet: lda XS_Type,x ; is the result a string and #2 ; if so, it has to be bne _VSString ; lda zVarType ; if type is $ there's an error. cmp #token_Dollar beq _VSBadType ; .if hasFloat==1 cmp #token_Percent ; type convert to float/int beq _VSMakeInt jsr FPUToFloat bra _VSCopy ; _VSMakeInt: jsr FPUToInteger ; .endif _VSCopy: phy ldy #0 ; copy mantissa to target. lda XS_Mantissa+0,x sta (zVarDataPtr),y iny lda XS_Mantissa+1,x sta (zVarDataPtr),y iny lda XS_Mantissa+2,x sta (zVarDataPtr),y iny lda XS_Mantissa+3,x sta (zVarDataPtr),y ; lda zVarType ; if target is integer, alrady done. cmp #token_Percent beq _VSExit ; lda XS_Type,x ; get the sign bit into carry flag. asl a ; lda XS_Mantissa+3,x ; shift the sign into the mantissa high. php asl a plp ror a sta (zVarDataPtr),y ; iny lda XS_Exponent,x ; copy the exponent in sta (zVarDataPtr),y ; bit XS_Type,x ; if the result is non zero bvc _VSExit ; lda #0 ; zero exponent indicating 0. sta (zVarDataPtr),y ; _VSExit: ply rts _VSBadType: jmp TypeError ; ; Assign a string. ; _VSString: lda zVarType ; type must be $ cmp #token_Dollar bne _VSBadType ; ; phx phy jsr StringConcrete ; concrete the string in the mantissa -> AX ldy #1 ; save high byte sta (zVarDataPtr),y dey ; save low byte txa sta (zVarDataPtr),y ply ; and exit. plx rts
24.767857
93
0.49964
30b9601dfd472db4b8e34859dbe279ad72dc1aa4
20,479
asm
Assembly
Library/Spool/Process/processUtils.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Library/Spool/Process/processUtils.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Library/Spool/Process/processUtils.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1990 -- All Rights Reserved PROJECT: PC GEOS MODULE: System Spooler FILE: processUtils.asm AUTHOR: Jim DeFrisco, 9 March 1990 REVISION HISTORY: Name Date Description ---- ---- ----------- Jim 3/13/90 Initial revision DESCRIPTION: This file contains the code to implement the printer job queues $Id: processUtils.asm,v 1.1 97/04/07 11:11:17 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ QueueManagement segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AllocPrintQueue %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Allocates and initializes print queue buffer CALLED BY: INTERNAL SpoolAddJob PASS: queueSemaphore down RETURN: ax - segment of locked print queue block DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Jim 03/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ; alloc enough for minimum queue, round up to 16-byte bound INITIAL_QUEUE_SIZE equ <(((size PrintQueue + size QueueInfo + size JobInfoStruct + size JobParameters + 8 + 15)/16)*16)> QUEUE_HEAP_SIZE equ <INITIAL_QUEUE_SIZE - size PrintQueue> AllocPrintQueue proc near uses cx, dx, ds .enter ; alloc a buffer for the thing mov ax, INITIAL_QUEUE_SIZE ; init size mov bx, handle 0 ; set owner to spool mov cx, ALLOC_DYNAMIC_NO_ERR_LOCK or mask HF_SHARABLE call MemAllocSetOwner call HandleP ; Own block too mov ds, ax ; ds -> block ; it's an LMem managed block so do the init thing mov dx, size PrintQueue ; offset to heap mov ax, LMEM_TYPE_GENERAL ; just general type mov cx, QUEUE_HEAP_SIZE ; initial heap size push si, di, bp mov si, 2 ; alloc two handles clr di clr bp call LMemInitHeap ; init the block pop si, di, bp ; initializing other things clr ax mov ds:[PQ_numQueues], ax ; no queues yet mov ds:[PQ_numJobs], ax ; no jobs yet mov ds:[PQ_firstQueue], ax ; no queues yet mov ax, ds ; return segment in ax mov cx, dgroup mov ds, cx mov ds:[queueHandle], bx ; save handle .leave ret AllocPrintQueue endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FindRightQueue %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Find the queue that's right for the job CALLED BY: INTERNAL SpoolAddJob PASS: ds - segment address of locked/owned PrintQueue es:si - pointer to PrintPortInfo for queue RETURN: bx - handle to the right queue or 0 if no queue allocated for this device DESTROYED: nothing PSEUDO CODE/STRATEGY: Follow the queue chain, comparing device names. KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- Jim 03/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ FindRightQueue proc near uses di, si, es, cx .enter ; if there aren't any queues yet, then bail clr bx ; assume this is first one cmp ds:[PQ_numQueues], 0 ; any here ? jz done ; no, finished ; start at the beginning. Search, search, search... mov bx, ds:[PQ_firstQueue] ; get chunk to first one searchLoop: mov di, ds:[bx] ; get pointer to next one mov cx, ds:[di].QI_portInfo.PPI_type cmp cx, es:[si].PPI_type ; same type? if not, bail jne nextOne ; else check port number cmp cx, PPT_CUSTOM je checkCustom cmp cx, PPT_PARALLEL ; parallel or serial ?? ja done ; if not, only one queue exists mov cx, ds:[di].QI_portInfo.PPI_params.PP_serial.SPP_portNum cmp cx, es:[si].PPI_params.PP_serial.SPP_portNum je done ; if we found it, we're done nextOne: mov bx, ds:[di].QI_next ; get pointer to next one tst bx ; at end of list ? jnz searchLoop ; else keep looking done: ; handle (or zero) is is BX .leave ret checkCustom: ; Compare all the CPP_info bytes of the two to see if this is ; the right queue to use. push si, cx, di add di, offset QI_portInfo.PPI_params.PP_custom.CPP_info add si, offset PPI_params.PP_custom.CPP_info xchg si, di mov cx, size CPP_info/2 repe cmpsw if size CPP_info and 1 jne 10$ cmpsb 10$: endif pop si, cx, di jne nextOne jmp done FindRightQueue endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% InsertJobIntoQueue %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Enter a filled out job structure into a print queue CALLED BY: INTERNAL CreateThreadStart PASS: ax - chunk handle of job info bx - chunk handle of queue to insert into ds - segment of locked/owned PrintQueue RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- Jim 01/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ InsertJobIntoQueue proc near uses ax, bx .enter ; dereference the queue handle. If there are no jobs yet, ; just make this one the current job. Else follow the chain ; until we hit the end. mov bx, ds:[bx] ; ds:bx -> queue info block cmp ds:[bx].QI_curJob, 0 ; any jobs in the queue ? jne followChain ; yes, follow the chain mov ds:[bx].QI_curJob, ax ; store the job handle clr ax mov ds:[bx].QI_fileHan, ax ; clear out all the other info mov {word} ds:[bx].QI_filePos, ax mov {word} ds:[bx].QI_filePos+2, ax mov ds:[bx].QI_curPage, ax exit: .leave ret ; at least one job is in the queue, follow the links followChain: mov si, ds:[bx].QI_curJob linkLoop: mov si, ds:[si] ; dereference next handle cmp ds:[si].JIS_next, 0 ; is this the end ? je foundIt ; yes, finish up mov si, ds:[si].JIS_next ; no, get next link jmp linkLoop foundIt: mov ds:[si].JIS_next, ax ; save link jmp exit ; all done InsertJobIntoQueue endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% MapJobIDtoHandle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Return a job chunk handle given a jobID CALLED BY: INTERNAL SpoolDelJob... PASS: cx - jobID ds - locked/owned PrintQueue RETURN: bx - job chunk handle - zero if no match found DESTROYED: nothing PSEUDO CODE/STRATEGY: given a unique job id, map it to the chunk handle for the desired job for each queue for each job in the queue if (jobIDs match) return current job handle KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- Jim 10/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ MapJobIDtoHandle proc near uses si,di,ax .enter mov bx, ds:[PQ_firstQueue] ; for each queue... nextQueueInBlock: tst bx ; if no queues, exit jz exit mov si, ds:[bx] ; ds:si -> queue mov di, ds:[si].QI_curJob ; get current job pointer nextJobInQueue: tst di ; jz nextQueue mov ax, di ; save job handle mov di, ds:[di] ; ds:di -> job GetJobID ds,di,bx cmp cx,bx jne nextJob mov bx, ax ; return job handle jmp exit nextJob: mov di, ds:[di].JIS_next ; get next job handle jmp nextJobInQueue nextQueue: mov bx, ds:[si].QI_next ; on to next queue jmp nextQueueInBlock exit: .leave ret MapJobIDtoHandle endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SendJobNotification %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Send method to process notifying it that a job has been added to or removed from a queue CALLED BY: SpoolAddJob(), SpoolDelJob() PASS: *DS:BX - JobInfoStruct of job in queue AX - Message to be sent to process RETURN: nothing DESTROYED: AX PSEUDO CODE/STRATEGY: none KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- srs 10/18/90 Initial version don 5/27/92 Combined removed & added routines %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SendJobAddedNotification proc far mov ax, MSG_SPOOL_JOB_ADDED GOTO SendJobNotification SendJobAddedNotification endp SendJobRemovedNotification proc far mov ax, MSG_SPOOL_JOB_REMOVED FALL_THRU SendJobNotification SendJobRemovedNotification endp SendJobNotification proc far uses bx, cx, dx, di, bp, si .enter mov di, ds:[bx] GetJobID ds, di, cx mov di, ds:[di].JIS_queue mov di, ds:[di] mov dx, ds:[di].QI_portInfo.PPI_type mov bp, ds:[di].QI_portInfo.PPI_params.PP_serial.SPP_portNum push ax, di, bx mov bx, handle 0 ; sending it to ourself mov di, mask MF_FORCE_QUEUE call ObjMessage pop ax, di, bx ; ; Now cope with notifying the system GCN list, when the job is removed. ; cmp ax, MSG_SPOOL_JOB_REMOVED jne done mov dx, cx ; dx <- job ID, always mov al, ds:[di].QI_error mov cx, PSCT_COMPLETE ; assume successful cmp al, SI_KEEP_GOING je sendToGCN mov cx, PSCT_ERROR ; nope -- maybe error? cmp al, SI_ERROR je sendToGCN mov cx, PSCT_CANCELED ; nope -- was canceled cmp al, SI_DETACH jne sendToGCN ; ; Don't send out canceled notification on detach unless job is ; actually being canceled due to the detach; the thing is just ; suspended, so notification isn't appropriate. ; mov bx, ds:[bx] test ds:[bx].JIS_info.JP_spoolOpts, mask SO_SHUTDOWN_ACTION jz done sendToGCN: mov bx, MANUFACTURER_ID_GEOWORKS mov si, GCNSLT_PRINT_JOB_STATUS mov ax, MSG_PRINT_STATUS_CHANGE mov di, mask GCNLSF_FORCE_QUEUE call GCNListRecordAndSend done: .leave ret SendJobNotification endp QueueManagement ends idata segment COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AllocDeviceQueue %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Alloc a queue for a specific device CALLED BY: INTERNAL SpoolAddJob PASS: *ds:si - chunk handle of job info block for job to start queue for (in locked/owned PrintQueue block) RETURN: ds - still points at PrintQueue, but may have changed value bx - handle of allocated queue - zero if unable to create thread DESTROYED: es PSEUDO CODE/STRATEGY: Alloc a chunk for the info, init the info. Update the affected PrintQueue variables KNOWN BUGS/SIDE EFFECTS/IDEAS: This function is in IDATA so that the thread creation is done from a fixed block. This minimizes the possibility that ThreadCreate is called from a movable (locked) block that is right above the FIXED part of the heap. REVISION HISTORY: Name Date Description ---- ---- ----------- Jim 03/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ AllocDeviceQueue proc near uses ax, cx, dx, di, si, bp .enter ; allocate & initialize the queue chunk call AllocDeviceQueueLow ; start up the thread that will be associated with the ; queue. It is OK to do this now, since the first thing ; that the thread will do is try to PLock the PrintQueue ; buffer, which is currently owned by this thread. We ; won't release it until we've initialized everything, so ; we're OK. tryCreateThread: push bx ; save queue handle push di ; preserve frame ptr mov cx, dgroup ; starting address for thread mov dx, offset dgroup:SpoolThreadBirth mov al, PRIORITY_LOW ; start things off in backgrnd mov di, SPOOL_THREAD_STACK_SIZE mov bp, handle 0 ; have spooler own them call ThreadCreate jnc threadOK ; allocated things ok ; some problem allocating a stack for the thread, try again mov ax, 30 ; sleep for a while call TimerSleep ; mov al, PRIORITY_LOW ; don't need high priority call ThreadCreate ; try again jc threadCreateError ; if error, deal with it ; success - store the thread handle threadOK: pop di ; restore frame ptr mov ds:[di].QI_thread, bx ; save thread handle pop bx ; restore queue handle if _DUAL_THREADED_PRINTING push bx mov ax, size PrintThreadInfo mov cx, (mask HF_SHARABLE or mask HF_FIXED) or \ (mask HAF_ZERO_INIT or mask HAF_NO_ERR) shl 8 call MemAlloc ; bx <- PrintThreadInfo handle mov es, ax ; create semaphores for synchronizing threads push bx mov bx, 1 call ThreadAllocSem mov es:[PTI_dataSem], bx mov bx, 1 call ThreadAllocSem mov es:[PTI_printSem], bx pop bx ; allocate print thread push bx, di mov al, PRIORITY_LOW mov cx, vseg PrintThreadPrintSwaths mov dx, offset PrintThreadPrintSwaths mov di, 500 ; small stack mov bp, handle 0 ; have spooler own them call ThreadCreate pop bx, di jnc pThreadOK ; couldn't create print thread. free semaphores and mem block. push bx mov bx, es:[PTI_dataSem] call ThreadFreeSem mov bx, es:[PTI_printSem] call ThreadFreeSem pop bx call MemFree jmp noPrintThread pThreadOK: mov ds:[di].QI_printThreadInfo, bx noPrintThread: pop bx endif ; _DUAL_THREADED_PRINTING done: .leave ret ; Let the user decide what we should do threadCreateError: pop di, bx ; restore data call AllocDeviceQueueError jnc tryCreateThread ; try again if user so desires jmp done AllocDeviceQueue endp idata ends QueueManagement segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AllocDeviceQueueLow %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Allocate a device queue chunk (but not the thread) PASS: *ds:si - JobInfoStruct to be inserted into new queue RETURN: es:di - new QueueInfo structure ds:si - passed JobInfo structure bx - handle of allocated queue chunk DESTROYED: ax, cx, dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 9/ 4/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ AllocDeviceQueueLow proc far .enter ; get es -> PrintQueue too segmov es, ds ; first alloc a chunk to hold the queue info mov cx, size QueueInfo ; need this much space clr al ; no flags call LMemAlloc mov di, ax ; save chunk handle mov di, ds:[di] ; ds:di -> queue info chunk ; now that we're done with the LMemReAlloc, dereference the ; JobInfoStruct handle mov si, ds:[si] ; dereference JIS handle ; init the queue info ; copy the device name first. then the port info. SBCS < mov cx, MAX_DEVICE_NAME_SIZE / 2 ; copy the whole buffer> DBCS < mov cx, MAX_DEVICE_NAME_SIZE ; copy the whole buffer> add si, JIS_info.JP_deviceName ; set pointer to name add di, QI_device ; set up destination ptr rep movsw SBCS < sub si, MAX_DEVICE_NAME_SIZE + JIS_info.JP_deviceName> SBCS < sub di, MAX_DEVICE_NAME_SIZE + QI_device > DBCS < sub si, MAX_DEVICE_NAME_SIZE*(size wchar) + JIS_info.JP_deviceName> DBCS < sub di, MAX_DEVICE_NAME_SIZE*(size wchar) + QI_device > mov cx, size PrintPortInfo ; copy the whole buffer add si, JIS_info.JP_portInfo ; set pointer to name add di, QI_portInfo ; set up destination ptr rep movsb sub si, size PrintPortInfo + JIS_info.JP_portInfo sub di, size PrintPortInfo + QI_portInfo cmp ds:[si].JIS_info.JP_portInfo.PPI_type, PPT_CUSTOM jne clearOtherVars ; For a custom port, specify a unique CPP_unit so the job ; notification has something to send out that identifies the ; queue. push ds segmov ds, dgroup, cx mov cx, ds:[customQueueID] inc cx xchg cx, ds:[customQueueID] pop ds mov es:[di].QI_portInfo.PPI_params.PP_custom.CPP_unit, cx clearOtherVars: clr cx mov es:[di].QI_curJob, cx ; clear the other variables mov es:[di].QI_fileHan, cx mov {word} es:[di].QI_filePos, cx mov {word} es:[di].QI_filePos+2, cx mov es:[di].QI_curPage, cx mov es:[di].QI_curPhysPg, cx mov es:[di].QI_numPhysPgs, cx mov es:[di].QI_next, cx ; this will be the last in line mov es:[di].QI_thread, cx ; no thread yet mov es:[di].QI_error, SI_KEEP_GOING ; init to no error if _DUAL_THREADED_PRINTING mov es:[di].QI_printThreadInfo, cx endif ; now insert the queue into the queue chain cmp ds:[PQ_firstQueue], 0 ; is this the first one ? jne followQueues ; no, follow the chain mov ds:[PQ_firstQueue], ax ; store chunk handle ; queue is on list, bump the number we have queueInserted: inc ds:[PQ_numQueues] ; now we have one more mov bx, ax ; return queue handle in bx .leave ret ; follow the queue chain and insert this one at the end followQueues: mov bx, ds:[PQ_firstQueue] ; get chunk handle to first mov bx, ds:[bx] ; get pointer to it EC < mov cx, ds:[PQ_numQueues] ; search this many > findEndLoop: cmp ds:[bx].QI_next, 0 ; is this the end ? jz foundEnd ; yes, done looping mov bx, ds:[bx].QI_next ; no, get the next link mov bx, ds:[bx] ; dereference next link NEC < jmp findEndLoop ; assume it's ok for prod > EC < loop findEndLoop > EC < ERROR SPOOL_INVALID_QUEUE_LIST ; something is wrong > ; ok, found the end of the chain. Put ours in. foundEnd: mov ds:[bx].QI_next, ax ; put in our handle jmp queueInserted ; and continue AllocDeviceQueueLow endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AllocDeviceQueueError %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Display an error to the user if a print thread cannot be created. CALLED BY: AllocDeviceQueue() PASS: BX = QueueInfo chunk handle RETURN: Carry = Clear (try again) BX = preserved - or - Carry = Set (abort queue creation) BX = 0 DESTROYED: CX, DX, SI PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 9/ 4/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ AllocDeviceQueueError proc far .enter ; Put up a box and make the user decide what to do. mov cx, SERROR_CANT_ALLOC_BITMAP ; this gives a good message clr dx ; no queue yet call SpoolErrorBox ; put up a box TestUserStandardDialogResponses \ SPOOL_BAD_USER_STANDARD_DIALOG_RESPONSE, IC_OK, IC_DISMISS cmp ax, IC_OK ; if affirmative, do it again je done ; carry = clear ; the user wants to cancel. De-allocate the queue and exit ; unlink the queue from the queue chain. then free the chunk. mov_tr ax, bx ; ax <- queue handle dec ds:[PQ_numQueues] ; one less queue jnz moreThanOneQueue ; handle if more than one mov ds:[PQ_firstQueue], 0 ; null head queue pointer freeQueue: call LMemFree ; free the queue clr bx ; queue handle = 0 stc done: .leave ret ; more than one queue going. find the one to unlink. moreThanOneQueue: mov bx, ds:[PQ_firstQueue] ; get pointer to first delSearchLoop: mov bx, ds:[bx] ; dereference handle cmp ax, ds:[bx].QI_next ; is it the next one je foundDelQ ; found queue to delete mov bx, ds:[bx].QI_next ; follow the chain EC < tst bx ; valid queue handle ? > EC < ERROR_Z SPOOL_INVALID_QUEUE_LIST > jmp delSearchLoop foundDelQ: mov si, ax mov si, ds:[si] mov si, ds:[si].QI_next mov ds:[bx].QI_next, si ; stuff new link jmp freeQueue AllocDeviceQueueError endp QueueManagement ends
26.390464
121
0.611602
e91ed3841a56dfdb628798fe54b0d43bc8fbf5ce
387
asm
Assembly
oeis/122/A122508.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/122/A122508.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/122/A122508.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A122508: G.f.: 1/[(1-2x)(1+2x+3x^2)]. ; Submitted by Jon Maiga ; 1,0,1,6,1,12,37,18,109,240,217,894,1657,2196,7021,12138,20197,54264,93025,175446,418609,733596,1471285,3245250,5872861,12072960,25344361,47310126,97782121,199376292,381642877,786069018,1577900629,3075926280 mov $4,1 lpb $0 sub $0,1 mov $1,$4 mul $3,6 mov $4,$2 mov $2,$1 add $2,$3 mov $3,$1 lpe mov $0,$4
24.1875
208
0.679587
46e7336792c1c0874d73807f7a619a75cac96c00
670
asm
Assembly
data/pokemon/base_stats/seel.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
1
2022-02-15T00:19:44.000Z
2022-02-15T00:19:44.000Z
data/pokemon/base_stats/seel.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
data/pokemon/base_stats/seel.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
db DEX_SEEL ; pokedex id db 65, 45, 55, 45, 70 ; hp atk def spd spc db WATER, WATER ; type db 190 ; catch rate db 100 ; base exp INCBIN "gfx/pokemon/front/seel.pic", 0, 1 ; sprite dimensions dw SeelPicFront, SeelPicBack db HEADBUTT, BUBBLE, GROWL, NO_MOVE ; level 1 learnset db GROWTH_MEDIUM_FAST ; growth rate ; tm/hm learnset tmhm TOXIC, COUNTER, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \ BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, PAY_DAY, \ RAGE, MIMIC, DOUBLE_TEAM, BIDE, SKULL_BASH, \ REST, SUBSTITUTE, SURF, STRENGTH ; end db 0 ; padding
27.916667
77
0.6
3863e5c1e51b60bdf0c52aa87a081d5ef231f78e
1,095
asm
Assembly
source/ecdsa.asm
feilipu/z80_crypto
4b5dc6c6496fcf6cedb714a17b4d70c7fc35b2c1
[ "MIT" ]
null
null
null
source/ecdsa.asm
feilipu/z80_crypto
4b5dc6c6496fcf6cedb714a17b4d70c7fc35b2c1
[ "MIT" ]
null
null
null
source/ecdsa.asm
feilipu/z80_crypto
4b5dc6c6496fcf6cedb714a17b4d70c7fc35b2c1
[ "MIT" ]
null
null
null
;------------------------------------------------------------------------------ ; ECDSA signature ; In: KECCAKS hash state, PRIVK private key ; Out: ECX r, ECV s, A v SECTION code_user EXTERN MODQADD EXTERN MODQMUL EXTERN ECGMUL EXTERN KECCAKI EXTERN KECCAKU EXTERN KECCAKR EXTERN KECCAK EXTERN KECCAKS EXTERN ECDSAZ PUBLIC ECDSAS ECDSAS: CALL KECCAK LD DE,KECCAKS LD HL,ECDSAZ + 0x20 LD B,0x20 ECDSAL1: LD A,(DE) ; Save Z INC E DEC L LD (HL),A DJNZ ECDSAL1 LD HL,PRIVK LD C,0x20 LDIR ; Concatenate Z and Pk LD L,E LD H,D LD (KECCAKP),HL INC E LD (HL),C LD BC,0x87 LDIR CALL KECCAK ; Deterministic K LD HL,KECCAKS LD DE,ECDSAK CALL MODQINV LD DE,KECCAKS + 0x1F CALL ECGMUL LD HL,ECDSAM PUSH HL EXX LD HL,PRIVK LD DE,ECX CALL MODQMUL POP DE PUSH DE LD HL,ECDSAZ CALL MODQADD POP HL EXX LD HL,ECDSAZ LD DE,ECDSAK CALL MODQMUL LD A,(ECY) AND 1 ADD 0x1B RET
15.208333
79
0.53516
88b9aa0fdc62f8a2be2b4a4e35ed227ab3e47224
124
asm
Assembly
libsrc/stdio/spectrum/CRT_FONT_FZX.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
38
2021-06-18T12:56:15.000Z
2022-03-12T20:38:40.000Z
libsrc/stdio/spectrum/CRT_FONT_FZX.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
2
2021-06-20T16:28:12.000Z
2021-11-17T21:33:56.000Z
libsrc/stdio/spectrum/CRT_FONT_FZX.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
6
2021-06-18T18:18:36.000Z
2021-12-22T08:01:32.000Z
SECTION rodata_clib PUBLIC CRT_FONT_FZX EXTERN _ff_ind_Termino defc CRT_FONT_FZX = _ff_ind_Termino
13.777778
36
0.709677
7d65bdf969fc32fcd89f150e81b26379e1d20726
7,528
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_2079.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_2079.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_2079.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r12 push %rax push %rbx push %rcx push %rdi push %rsi lea addresses_WC_ht+0x1edcb, %rcx nop nop nop and $20487, %rsi mov $0x6162636465666768, %r10 movq %r10, %xmm5 vmovups %ymm5, (%rcx) nop nop nop xor $184, %rax lea addresses_normal_ht+0xca0b, %r11 nop cmp %r12, %r12 vmovups (%r11), %ymm6 vextracti128 $0, %ymm6, %xmm6 vpextrq $0, %xmm6, %r10 nop nop nop nop nop and %rsi, %rsi lea addresses_UC_ht+0x18c4b, %rcx nop nop nop add $6734, %r11 mov (%rcx), %r12w add $36787, %rax lea addresses_WT_ht+0x12f0b, %rax nop xor $5440, %rdi mov (%rax), %rsi nop nop nop nop add %rdi, %rdi lea addresses_A_ht+0x17c8b, %rsi lea addresses_A_ht+0x1974b, %rdi sub %rax, %rax mov $91, %rcx rep movsl sub $622, %r12 lea addresses_WC_ht+0x1bb0b, %rcx nop nop nop nop and %r10, %r10 mov $0x6162636465666768, %rax movq %rax, %xmm7 movups %xmm7, (%rcx) nop nop nop inc %rdi lea addresses_D_ht+0x1070b, %rsi lea addresses_WC_ht+0x1d70b, %rdi nop nop nop cmp $19138, %r12 mov $20, %rcx rep movsw nop nop nop nop inc %rdi lea addresses_WC_ht+0xa4df, %rsi nop nop nop sub %r10, %r10 movl $0x61626364, (%rsi) nop sub %r12, %r12 lea addresses_D_ht+0x6998, %r10 nop add $31609, %r12 mov (%r10), %r11 nop nop cmp $13533, %rcx lea addresses_WC_ht+0xf0eb, %rax nop nop nop nop cmp $25720, %r11 mov (%rax), %r10 nop nop add $59382, %r11 lea addresses_UC_ht+0xf70b, %rsi lea addresses_A_ht+0x5b4d, %rdi clflush (%rsi) xor %rbx, %rbx mov $45, %rcx rep movsq nop nop sub $19779, %r10 lea addresses_UC_ht+0x1380b, %rsi lea addresses_normal_ht+0x5c63, %rdi nop nop nop nop nop xor %r12, %r12 mov $47, %rcx rep movsb nop add %r11, %r11 lea addresses_normal_ht+0x178eb, %rbx nop nop nop nop inc %rsi mov $0x6162636465666768, %rcx movq %rcx, %xmm7 vmovups %ymm7, (%rbx) nop nop cmp %r11, %r11 pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r12 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r14 push %r9 push %rax push %rbx push %rdx push %rsi // Load mov $0x129eff000000073b, %r9 nop add %rax, %rax movups (%r9), %xmm2 vpextrq $0, %xmm2, %r11 nop nop nop add $8927, %r11 // Faulty Load lea addresses_RW+0x470b, %rsi sub %rbx, %rbx mov (%rsi), %r9 lea oracles, %rax and $0xff, %r9 shlq $12, %r9 mov (%rax,%r9,1), %r9 pop %rsi pop %rdx pop %rbx pop %rax pop %r9 pop %r14 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 3, 'size': 16, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 6, 'size': 32, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 8, 'size': 32, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 4, 'size': 2, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 11, 'size': 8, 'same': True, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 7, 'same': True}, 'dst': {'type': 'addresses_A_ht', 'congruent': 6, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 9, 'size': 16, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 1, 'size': 4, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 5, 'size': 8, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': True}, 'dst': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 5, 'size': 32, 'same': False, 'NT': False}} {'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 */
35.342723
2,999
0.656615
755dae005fa815c85b9d8b1f2e96189170bc88fd
24,827
asm
Assembly
8bit-gmail-notifier/8bit-gmail-notifier/main.asm
borko-rajkovic/8bit-gmail-notifier
56643cef6de0b58fa40438fc5fd853b70bd7da2f
[ "MIT" ]
3
2019-10-03T11:57:44.000Z
2019-10-11T22:44:39.000Z
8bit-gmail-notifier/8bit-gmail-notifier/main.asm
borko-rajkovic/8bit-gmail-notifier
56643cef6de0b58fa40438fc5fd853b70bd7da2f
[ "MIT" ]
null
null
null
8bit-gmail-notifier/8bit-gmail-notifier/main.asm
borko-rajkovic/8bit-gmail-notifier
56643cef6de0b58fa40438fc5fd853b70bd7da2f
[ "MIT" ]
null
null
null
/****************************************************** **** 8 bit Gmail Notifier **** **** **** **** Date: 02.01.2016 12:56:51 **** **** Author: Borko Rajkovic **** **** Ver: 3.0 (7Segm. LED + Buzzer + LCD) **** **** (+ display EEPROM + T/C driven) **** **** **** ******************************************************/ ; EEPROM Initial values .ESEG ; Go to EEPROM .ORG 0x00 ; Write byte for digit zero (0) on Location 0x00 .DB "0 " ; Change memory type .CSEG ; Back to flash memory .ORG 0x00 ; Start from address 0x00 ; DEFINES .def tmpReg = R16 ; Standard tmpReg register .def displayCountReg = R19 ; Counts how much parts of digit has left to write .def displayReg = R15 ; Register from which we are taking bit by bit to write on LCD display .def dataReg = R18 ; We will use this register for taking data from EEPROM & UART and copy it to displayReg .def tmpSREG = R0 ; This register will keep SREG when calling routine .def tc0Count7seg = R1 ; Helper register which counts on interrupt from Counter 0 .def invalidChar = R20 ; If char is not valid it will be 1, otherwise 0 .def toneDuration = R17 .def notEndOfMusic = R2 .def volume = R3 .def biggerDigit = R4 .def LCDPauseCountH = R6 .def LCDPauseCountL = R5 .def LCDCurrentChar = R7 .def USARTinProgress = r8 .def sameDigitReg = r9 .def current7seg = r10 .equ pauseLCD = 6 ; INTERRUPTS jmp Start ; Reset interrupt nop nop ; Since interrupt is addressed with 2 bytes, we should write 2 nop bytes for interrupt we do not use nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop jmp USART_RX_COMPLETE ; USART Recieve completed interrupt; We cannot use pins PD0 and PD1 as GPIO because they are used for USART nop nop nop nop nop nop nop nop nop nop nop nop nop nop jmp TIMER0_COMP_INT ; Timer/Counter0 Compare Match (pin PB3 is used for this) nop nop ; START Start: ; Setup stack pointer for method calls (so "ret" could work) ldi tmpReg, low(RAMEND) out SPL, tmpReg ldi tmpReg, high(RAMEND) out SPH, tmpReg ; After restart initialization and reading from EEPROM, then display on LCD screen call PORT_INIT call TC0_INIT call TC1_INIT call USART_Init call lcd_init_4d call Refresh_data ; MAIN main: ; Main function is empty, we are using interrupts exclusively jmp main ; --------------------------------------------------------------------------- ; Name: Refresh_data ; Purpose: Display new data from EEPROM. If number of emails is bigger then before, play music ; Entry: sameDigitReg, biggerDigit ; Exit: no parameters ; Notes: If number of emails is same, exit routine ; otherwise continue to Loading_characters Refresh_data: ; If same digit, then jump to end_LCD_display, otherwise go to continue_first_digit push tmpReg mov tmpReg, sameDigitReg cpi tmpReg, 0x01 pop tmpReg brne continue_first_digit rjmp end_LCD_display ; If digit is bigger than before, play music, otherwise just refresh LCD display continue_first_digit: mov tmpReg, biggerDigit cpi tmpReg, 0x01 brne skip_reset_music call Reset_music skip_reset_music: ; Set current char of LCD to 0, read from EEPROM to dataReg, format digit and display it ldi tmpReg, 0x00 mov LCDCurrentChar, tmpReg call EEPROM_read mov current7seg, dataReg call Format_digit call Display_write_start ; --------------------------------------------------------------------------- ; Name: Loading_characters ; Purpose: Display new data from EEPROM ; Entry: LCDCurrentChar ; Exit: no parameters ; Notes: Refresh_data does not have ret, so it will go through Loading_characters ; this routine will be called from TIMER0_COMP_INT ; Data is containing two sets of 32 characters delimited by pipe "|" ; so in first set there will be 16 characters on first line and 16 on second line, which starts from position 17 ; for the second set, there are 32 characters prior to that set + delimiter (33) + 16 characters for first line (49) ; so second line of second set starts at position 50 Loading_characters: ; Check if USART is in progress and if it's not, go to continue_loading_characters push tmpReg mov tmpReg, USARTinProgress cpi tmpReg, 0x01 pop tmpReg brne continue_loading_characters ret continue_loading_characters: ; increment LCDCurrentChar mov tmpReg, LCDCurrentChar inc tmpReg mov LCDCurrentChar, tmpReg ; check if first data set reached the end cpi tmpReg, 33 breq finished_loading_characters ; check if second data set reached the end cpi tmpReg, 65 breq finished_loading_characters call EEPROM_read ; set cursor to second line in case current position is 17 or 50 cpi tmpReg, 17 breq second_line_set_cursor cpi tmpReg, 50 breq second_line_set_cursor ; if not characters that starts second line, skip setting cursor to second line rjmp skip_second_line_set_cursor second_line_set_cursor: push tmpReg ; setting cursor to point to second line ldi tmpReg, lcd_LineTwo ; set up the initial DDRAM address ori tmpReg, lcd_SetCursor ; convert the plain address to a set cursor instruction call lcd_write_instruction_4d ; set up the first DDRAM address ldi tmpReg, 80 ; 40 uS delay (min) call delayTx1uS pop tmpReg skip_second_line_set_cursor: ; if position of char in data is 1 (first character of first set) ; or 34 (first character of second set), we need to set cursor to first line cpi tmpReg, 34 breq first_line_set_cursor cpi tmpReg, 1 breq first_line_set_cursor ; skip setting cursor to first line if not expected rjmp skip_first_line_set_cursor first_line_set_cursor: ; set cursor to first line push tmpReg ldi tmpReg, lcd_LineOne ; set up the initial DDRAM address ori tmpReg, lcd_SetCursor ; convert the plain address to a set cursor instruction call lcd_write_instruction_4d ; set up the first DDRAM address ldi tmpReg, 80 ; 40 uS delay (min) call delayTx1uS pop tmpReg skip_first_line_set_cursor: ; write data from dataReg to LCD call lcd_write_character_4d_dataReg push tmpReg ldi tmpReg, 80 ; 40 uS delay (min) call delayTx1uS pop tmpReg ; continue writing to LCD until finished_loading_characters is called rjmp Loading_characters finished_loading_characters: ; check if current position is 65 (end of second set) ; if so, reset position to 0 cpi tmpReg, 65 brne end_LCD_display ldi tmpReg, 0 end_LCD_display: ret ; PORT_INIT PORT_INIT: ldi tmpReg, 0b00011100 ; tmpReg - set DDRD (exit ports) and PORTD (values on ports) out DDRD, tmpReg ; (since it's port D we avoid TxD, RxD) PIND2=CLK; PIND3=Data; OC1B=Buzzer ldi tmpReg, 0b00001100 out PORTD, tmpReg ret .include "Timer_counter_1_init.asm" .include "Timer_counter_0_init.asm" .include "EEPROM_read_write.asm" ; Timer/Counter0 Interrupt Service Routine TIMER0_COMP_INT: ; this interrupt will trigger on 1ms push tmpReg ; adding one to LCDPauseCountL and LCDPauseCountH (add 0 to LCDPauseCountH with carry from adding 1 to LCDPauseCountL) ldi tmpReg, 0x01 add LCDPauseCountL, tmpReg ldi tmpReg, 0x00 adc LCDPauseCountH, tmpReg ; we are counting up to pauseLCD seconds ; (actually, it will not be exact, for example 6 << 10 = 6144 ms) ; if high and low part of our count is not same as desired, go to LCDisPause mov tmpReg, LCDPauseCountH cpi tmpReg, HIGH(pauseLCD << 10) brne LCDisPause mov tmpReg, LCDPauseCountL cpi tmpReg, LOW(pauseLCD << 10) brne LCDisPause ; otherwise, reset our pause counter to zero and call Loading_characters to show other set on display ; (if first set was shown, show second and vice-verse) ldi tmpReg, 0x00 mov LCDPauseCountH, tmpReg mov LCDPauseCountL, tmpReg pop tmpReg call Loading_characters push tmpReg LCDisPause: pop tmpReg ; In all cases, call Play_music to check if tone or volume needs to be changed call Play_music ; Animate number of emails on 7-segment display ; ; Use tc0Count7seg to count to 100ms ; Once it reach 100ms: ; - clear tc0Count7seg ; - check if there are still bits to move to shift register, ; if there are none, then exit; ; otherwise go to Display_write_continue push tmpReg INC tc0Count7seg ; Increment tc0Count7seg by one mov tmpReg, tc0Count7seg ; Copy tc0Count7seg to tmpReg cpi tmpReg, 100 ; Compare tc0Count7seg with 100 (for 100ms, actually it will be more) pop tmpReg ; IMPORTANT! If we do not pop here, ; then in a stack it will be tmpReg and ret will return to address to which points tmpReg, ; instead of the one that is written in a moment we entered routine BRNE TIMER0_COMP_INT_EXIT ; If tc0Count7seg != 100 then exit; otherwise continue clr tc0Count7seg ; Clear tc0Count7seg, so it can count from start cpi displayCountReg, 0 ; Compare displayCountReg to 0 BRNE Display_write_continue ; If displayCountReg != 0 then go to routine, otherwise exit TIMER0_COMP_INT_EXIT: reti ; reti will finish interrupt and set global interrupt to 1 ; Start animation of number of emails on 7-segment display using shift register and shifting each bit every 100ms Display_write_start: mov displayReg, dataReg ; Copy from dataReg to displayReg ldi displayCountReg, 8 ; 8 bits are used, so we will count with displayCountReg from 8 to 0 Display_write_continue: push tmpReg mov tmpReg, displayReg ; Copy displayReg to tmpReg andi tmpReg, 1 ; Take just first bit lsl tmpReg ; Move tmpReg 3 places left lsl tmpReg lsl tmpReg out PORTD, tmpReg ; Set value of tmpReg to PORTD; PIND3 is set to data (for shift register) and PIND2 is set to 0 now sbi PORTD, PIND2 ; Set PIND2 (Clock for shift register) cbi PORTD, PIND2 ; Clear PIND2 and with that one puls is finished => 0 - 1 - 0 pop tmpReg lsr displayReg ; Shift right, move on to next bit subi displayCountReg, 1 ; Decrement displayCountReg by 1 reti .include "USART_init_transmit.asm" ; USART Rx Complete Interrupt USART_RX_COMPLETE: in dataReg, UCSRA ; First, we need to read content of UCSRA (USART Control and Status Register A), ; because due to reading of UDR (USART Data Register) data are deleted from UCSRA ; UCSRA contains control bits for Frame Error (FE), Data Over-Run (DOR) and Parity Error (PE) ; After getting content of UCSRA we do logical AND with desired control bits andi dataReg, (1<<FE)|(1<<DOR)|(1<<PE) push tmpReg ldi tmpReg, $1 ; We will compare control bits with 1 (comparison is >= type) cp dataReg, tmpReg pop tmpReg BRGE RX_interrupt_exception ; If any bit returned error, dataReg will be > 1 and it will go to RX_interrupt_exception rjmp skip_RX_interrupt_exception RX_interrupt_exception: in dataReg, UDR ; Put content of UDR (USART Data Register) to dataReg ; Cleanup of UCSRA is required, otherwise next frame could not be received reti skip_RX_interrupt_exception: in dataReg, UDR ; Put content of UDR (USART Data Register) to dataReg call USART_Transmit ; After receiving, we are transmiting back message via UART for confirmation cli ; disable global interrupt ; At this point we have our data from UART in dataReg ; ; We are expecting following data to be received via UART: ; ; 1) start of transmit ; value is 0x02 ; 2) number of emails ; single digit from 0 to 9, or dot "." if more than 9 new messages ; 3) 32 chars for first data set ; LCD contains 2 lines X 16 chars, so first data set is 32 chars long ; 4) delimiter (pipe "|") ; this is used to separate two data sets ; 5) 32 chars for second data set ; second data set, also 32 chars long ; 6) end of transmit and Refresh ; value is 0x03 ; Case 1) ; ; Compare if dataReg is 0x02; if not, skip this code ; otherwise, set USARTinProgress to 1 and set LCDCurrentChar to 0 cpi dataReg, 0x02 brne not_start_of_transmit push tmpReg ldi tmpReg, 0x01 mov USARTinProgress, tmpReg ldi tmpReg, 0x00 mov LCDCurrentChar, tmpReg pop tmpReg reti not_start_of_transmit: ; Case 6) ; ; Compare if dataReg is 0x03; if not, skip this code ; otherwise, set USARTinProgress to 0 and call Refresh_data cpi dataReg, 0x03 brne not_end_of_transmit push tmpReg ldi tmpReg, 0x00 mov USARTinProgress, tmpReg pop tmpReg call Refresh_data reti not_end_of_transmit: ; Check if USARTinProgress ; if not, skip to end push tmpReg mov tmpReg, USARTinProgress cpi tmpReg, 0x01 pop tmpReg brne not_USARTinProgress ; Here we know that we want to process data from UART ; ; We will write dataReg to EEPROM and increment LCDCurrentChar push tmpReg mov tmpReg, LCDCurrentChar call EEPROM_write ; Write dataReg to EEPROM on address given in tmpReg inc LCDCurrentChar ; increment LCDCurrentChar pop tmpReg ; Case 2) ; ; First we will check if it's case two by checking is LCDCurrentChar == 1 push tmpReg mov tmpReg, LCDCurrentChar cpi tmpReg, 0x01 pop tmpReg brne not_case_2 ; Skip Case 2) if LCDCurrentChar != 1 ; Compare new number of emails with previous push tmpReg ldi tmpReg, 0x00 mov sameDigitReg, tmpReg ; Reset sameDigitReg to 0 pop tmpReg cp dataReg, current7seg ; Compare old number of emails (current7seg register) with new one (dataReg) brne number_of_emails_changed ; If they are same, we are marking sameDigitReg to 1 and finish this routine for case 2) number_of_emails_not_changed: push tmpReg ldi tmpReg, 0x01 mov sameDigitReg, tmpReg ; Set sameDigitReg to 1 to indicate that new and previous number of emails are same pop tmpReg rjmp number_of_emails_same number_of_emails_changed: ; Reset bigger digit to 0 push tmpReg ldi tmpReg, 0x00 mov biggerDigit, tmpReg ; Reset biggerDigit to 0 pop tmpReg ; if old number of emails was "." then new number cannot be bigger push tmpReg mov tmpReg, current7seg cpi tmpReg, '.' pop tmpReg breq USART_digit_not_bigger ; compare old number of emails with new one if old one was != "." cp current7seg, dataReg ; compare dataReg (new emails count) and current7seg (old emails count) brlo email_count_got_bigger ; if current7seg is lower than dataReg, go to email_count_got_bigger cpi dataReg, 0x2E ; compare dataReg with "." breq email_count_got_bigger ; if dataReg == ".", then go to email_count_got_bigger rjmp USART_digit_not_bigger ; at this point, we know that new email count is lower than old count email_count_got_bigger: push tmpReg ldi tmpReg, 0x01 mov biggerDigit, tmpReg ; Set biggerDigit to 1 to indicate that new email count is bigger than old one, so we can play music pop tmpReg USART_digit_not_bigger: ; Cases 3), 4), 5) not_case_2: cli ; Global interrupt disable not_USARTinProgress: number_of_emails_same: in dataReg, UDR ; Put content of UDR (USART Data Register) to dataReg ; Cleanup of UCSRA is required, otherwise next frame could not be received sei ; Global interrupt enable ret ; Format digit Format_digit: digit_0: cpi dataReg, 0x30 ; With cpi we are comparing char and ASCII 0 (0x30) brne digit_1 ; If not equal, move on to next digit ldi dataReg, 0b00011000 ; If equal, format it for display ret digit_1: cpi dataReg, 0x31 brne digit_2 ldi dataReg, 0b11011110 ret digit_2: cpi dataReg, 0x32 brne digit_3 ldi dataReg, 0b00110100 ret digit_3: cpi dataReg, 0x33 brne digit_4 ldi dataReg, 0b10010100 ret digit_4: cpi dataReg, 0x34 brne digit_5 ldi dataReg, 0b11010010 ret digit_5: cpi dataReg, 0x35 brne digit_6 ldi dataReg, 0b10010001 ret digit_6: cpi dataReg, 0x36 brne digit_7 ldi dataReg, 0b00010001 ret digit_7: cpi dataReg, 0x37 brne digit_8 ldi dataReg, 0b11011100 ret digit_8: cpi dataReg, 0x38 brne digit_9 ldi dataReg, 0b00010000 ret digit_9: cpi dataReg, 0x39 brne digit_9_dot ldi dataReg, 0b10010000 ret digit_9_dot: ldi dataReg, 0b10000000 ; Represents "9." if more than 9 ret ; --------------------------------------------------------------------------- ; Name: Reset_music ; Purpose: Reseting melody to start ; Entry: no parameters ; Exit: no parameters ; Notes: Z register is set to point to address in memory where our melody is written ; We reset toneDuration and notEndOfMusic registers to 1 ; After that, we are reading 4 times from memory because melodies are written in pairs, ; out of which first pair is a volume (example: .DW 40, 0) ; and other pairs are tone and duration of that particular note (example: .DW E7, 84) ; as .DW is writing word, it means each part of pair is 2 bytes long, hence 4 bytes are filling out space of two pairs; ; reading is done first by reading low, then high part of 16 bits Reset_music: push tmpReg ldi ZH, HIGH(super_mario << 1) ; you can choose between super_mario and start_wars melodies ldi ZL, LOW(super_mario << 1) ; or you can create your own melody in Melodies.inc ; ldi ZH, HIGH(starwars << 1) ; ldi ZL, LOW(starwars << 1) ldi toneDuration, 0x01 ; set toneDuration and notEndOfMusic to 1 ldi tmpReg, 0x01 mov notEndOfMusic, tmpReg lpm tmpReg, Z+ ; set up volume register mov volume, tmpReg lpm tmpReg, Z+ lpm tmpReg, Z+ lpm tmpReg, Z+ pop tmpReg ret ; --------------------------------------------------------------------------- ; Name: Play_music ; Purpose: plays melody with PWM using Timer/Counter1 ; Entry: toneDuration, notEndOfMusic, Z register ; Exit: no parameters ; Notes: We are reading 4 times from memory because melodies are written in pairs, ; out of which first pair is a volume (example: .DW 40, 0) ; and other pairs are tone and duration of that particular note (example: .DW E7, 84) ; as .DW is writing word, it means each part of pair is 2 bytes long, hence 4 bytes are filling out space of two pairs; ; for this we use registers r21, r22, r23, r24; ; reading is done first by reading low, then high part of 16 bits; ; first pair is consumed by Reset_music Play_music: push tmpReg dec toneDuration ldi tmpReg, 0x00 cp toneDuration, tmpReg ; only when toneDuration reaches 0 go on to change tone pop tmpReg breq loading ret loading: push tmpReg mov tmpReg, notEndOfMusic ; check if notEndOfMusic is != 0, then pick up notes and start playing cpi tmpReg, 0x00 ; it will be 1 after Reset_music pop tmpReg brne not_end_of_music ret not_end_of_music: ; if not end of music, load next pair from memory into registers r21, r22, r23, r24 lpm r21, Z+ ; low 8 bits of tone lpm r22, Z+ ; high 8 bits of tone lpm r23, Z+ ; low 8 bits of delay lpm r24, Z+ ; high 8 bits of delay (always 0, we will not use it) mov toneDuration, r23 cpi r22, 1 ; if r22 same or higher than 1, go to play_tone brsh play_tone cpi r21, 2 ; if r21 same or higher than 2, go to play_tone brsh play_tone ; in case it's 1, than it means we have pause; in case of 0 it's end of music silence: ldi r25, 0x00 ldi r26, 0x00 out OCR1BH, r26 ; provide zeros to OCR1BH and OCR1BL to set up volume to 0 and skip play_tone out OCR1BL, r25 ; OCR1 - Timer/Counter1 Output Compare Register rjmp skip_play_tone play_tone: mov r25, volume ldi r26, 0x00 out OCR1BH, r26 ; provide desired volume to OCR1BH and OCR1BL (only low part, high is always 0) for Timer/Counter1 out OCR1BL, r25 ; OCR1 - Timer/Counter1 Output Compare Register out ICR1H, r22 ; set up tone in ICR1H and ICR1L with r22 and r21, respectively out ICR1L, r21 ; ICR1 - Timer/Counter1 Input Capture Register skip_play_tone: cpi r21, 0x00 ; if any of registers r21, r22, r23 are not empty, then skip setting end of music brne skip_set_end_of_music cpi r22, 0x00 brne skip_set_end_of_music cpi r23, 0x00 brne skip_set_end_of_music cpi r24, 0x00 set_end_of_music: push tmpReg ldi tmpReg, 0x00 mov notEndOfMusic, tmpReg ; set notEndOfMusic to 0, basicaly this means the melody is over pop tmpReg ; that is why all melodies must end with zeros (example: .DW 0, 0) skip_set_end_of_music: ret .include "PWM_music_notes.asm" .include "LCD.asm" .include "Delays.asm" .include "Melodies.asm"
32.581365
148
0.586861
7b2c660cc5f68bf13cd0001f86db10562200a9a3
154,556
asm
Assembly
libsrc/math/daimath32/z80/math_dai32.asm
ahjelm/z88dk
c4de367f39a76b41f6390ceeab77737e148178fa
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/math/daimath32/z80/math_dai32.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/math/daimath32/z80/math_dai32.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; Floating point package extract from the DAI machine ; ; Labels taken from the DAI firmware disassembly ; ; MODULE math_dai32 GLOBAL xget GLOBAL xfmul GLOBAL xfdiv GLOBAL xload GLOBAL xsave GLOBAL xfabs GLOBAL xfchs GLOBAL xfrac GLOBAL xiadd GLOBAL xisub GLOBAL ximul GLOBAL xidiv GLOBAL xirem GLOBAL xflt GLOBAL xfix GLOBAL xfint GLOBAL xsqrt GLOBAL xexp GLOBAL xln GLOBAL xsin GLOBAL xcos GLOBAL xpwr GLOBAL xlog10 GLOBAL xtan GLOBAL xatan GLOBAL xasin GLOBAL xacos GLOBAL xfadd GLOBAL xfsub GLOBAL fpcomp GLOBAL fpexit GLOBAL fperr_overflow GLOBAL fperr_div0 GLOBAL fperr_underflow GLOBAL fperr_argerror GLOBAL fppop GLOBAL fppush GLOBAL sext GLOBAL fp_half GLOBAL addexp GLOBAL ___dai32_fpac SECTION code_fp_dai32 ; Floating point compare ; ; Compare FPT number in MACC and that starting at (hl) ; ; Exit: ABCDEHL preserved ; Flags: cy=1,S=0,Z=1 -> both numbers 0 ; cy=0,S=0,Z=1 -> both numbers identical ; cy=0,S=0,Z=0 -> MACC > (hl) (jp P,) ; cy=0,S=1,Z=0 -> MACC < (hl) (jp M,) fpcomp: push bc ;[c079] c5 push af ;[c07a] f5 push de ;[c07b] d5 push hl ;[c07c] e5 call xget ld e,a ;[c07f] 5f xor (hl) ;[c080] ae ; Jump if signs different jp m,lc0b7 ;[c081] fa b7 c0 ld a,b ;[d1e8] 78 inc hl ;[d1e9] 23 and (hl) ;[d1ea] a6 ld a,(hl) ;[d1eb] 7e dec hl ;[d1ec] 2b jp m,ld1f5 ;[d1ed] fa f5 d1 cp b ;[d1f0] b8 ccf ;[d1f1] 3f jp lc09f ;[d1f2] c3 9f c0 ld1f5: ld a,e ;[d1f5] 7b xor (hl) ;[d1f6] ae and $40 ;[d1f7] e6 40 ld a,e ;[d1f9] 7b rla ;[c087] 17 jp nz,lc0a3 ;[c088] c2 a3 c0 ld a,e ;[c08b] 7b sub (hl) ;[c08c] 96 jp nz,lc0a2 ;[c08d] c2 a2 c0 inc hl ;[c090] 23 ld a,b ;[c091] 78 sub (hl) ;[c092] 96 jp nz,lc0a2 ;[c093] c2 a2 c0 inc hl ;[c096] 23 ld a,c ;[c097] 79 sub (hl) ;[c098] 96 jp nz,lc0a6 ;[c099] c2 a2 c0 inc hl ;[c09c] 23 ld a,d ;[c09d] 7a ld a,d ;[c09d] 7a sub (hl) ;[c09e] 96 lc09f: jp z,lc0a6 ;[c09f] ca a6 c0 lc0a2: rra ;[c0a2] 1f lc0a3: xor e ;[c0a3] ab lc0a4: or $01 ;[c0a4] f6 01 lc0a6: pop hl ;[c0a6] e1 pop de ;[c0a7] d1 pop bc ;[c0a8] c1 ld a,b ;[c0a9] 78 pop bc ;[c0aa] c1 ret ;[c0ab] c9 lc0b7: xor (hl) ;[c0b7] ae jp lc0a4 ;[c0b8] c3 a4 c0 sext: rlca ;[c1e9] 07 rlca ;[c1ea] 07 rrca ;[c1eb] 0f rra ;[c1ec] 1f ret ;[c1ed] c9 lc1b7: ld hl,fpac addexp: push hl ;[c1ba] e5 push de ;[c1bb] d5 push bc ;[c1bc] c5 ld c,a ;[c1bd] 4f ld a,(hl) ;[c1be] 7e and $80 ;[c1bf] e6 80 ld b,a ;[c1c1] 47 ld a,(hl) ;[c1c2] 7e call sext ;[c1c3] cd e9 c1 push af ;[c1c6] f5 xor c ;[c1c7] a9 cpl ;[c1c8] 2f ld d,a ;[c1c9] 57 pop af ;[c1ca] f1 add c ;[c1cb] 81 ld c,a ;[c1cc] 4f rra ;[c1cd] 1f xor c ;[c1ce] a9 and d ;[c1cf] a2 jp m,lc1e2 ;[c1d0] fa e2 c1 ld a,c ;[c1d3] 79 rla ;[c1d4] 17 xor c ;[c1d5] a9 jp m,lc1e2 ;[c1d6] fa e2 c1 ld a,c ;[c1d9] 79 and $7f ;[c1da] e6 7f or b ;[c1dc] b0 ld (hl),a ;[c1dd] 77 lc1de: pop bc ;[c1de] c1 pop de ;[c1df] d1 pop hl ;[c1e0] e1 ret ;[c1e1] c9 lc1e2: ld a,c ;[c1e2] 79 rla ;[c1e3] 17 or a ;[c1e4] b7 scf ;[c1e5] 37 jp lc1de ;[c1e6] c3 de c1 fppush: ld (xphls),hl ;[c21e] 22 e1 00 ex (sp),hl ;[c221] e3 ld (fwork),hl ;[c222] 22 df 00 push hl ;[c225] e5 ld hl,$0000 ;[c226] 21 00 00 add hl,sp ;[c229] 39 call xsave ld hl,(fwork) ;[c22c] 2a df 00 push hl ;[c22f] e5 lc230: ld hl,(xphls) ;[c230] 2a e1 00 ret fppop: ld (xphls),hl ;[c234] 22 e1 00 pop hl ;[c237] e1 ld (fwork),hl ;[c238] 22 df 00 ld hl,$0000 ;[c23b] 21 00 00 add hl,sp ;[c23e] 39 call xload pop hl ;[c241] e1 ld hl,(fwork) ;[c242] 2a df 00 ex (sp),hl ;[c245] e3 jp lc230 ;[c246] c3 30 c2 fperr_overflow: push hl ;[c04b] e5 ld hl,$0000 ;[c04c] 21 00 00 handle_error: pop hl ret ; TODO push af ;[c04f] f5 push de ;[c050] d5 ex de,hl ;[c051] eb ld hl,(error_vector) ;[c052] 2a d0 00 add hl,de ;[c055] 19 ld a,(hl) ;[c056] 7e inc hl ;[c057] 23 ld h,(hl) ;[c058] 66 ld l,a ;[c059] 6f pop de ;[c05a] d1 pop af ;[c05b] f1 ex (sp),hl ;[c05c] e3 ret ;[c05d] c9 fperr_argerror: push hl ;[c05e] e5 ld hl,$0002 ;[c05f] 21 02 00 jp handle_error ;[c062] c3 4f c0 fperr_underflow: push hl ;[c065] e5 ld hl,fp_zero ;[c066] 21 5e c4 call xload ; Copy to MACC ld hl,$0004 jp handle_error fperr_div0: push hl ;[c06c] e5 ld hl,$0006 ;[c06d] 21 06 00 jp handle_error ;[c070] c3 4f c0 fpexit: pop hl ;[c14d] e1 pop de ;[c14e] d1 pop bc ;[c14f] c1 pop af ;[c150] f1 ret ;[c151] c9 ; FPT Multiplication ; ; MACC = MACC * MEM ; ; Entry: HL: Points to multiplier ; Exit: All registers preserved xfmul: push af ;[e0fe] f5 push bc ;[e0ff] c5 push de ;[e100] d5 push hl ;[e101] e5 call amul ;[e102] cd 59 ea jp fpexit ;[e105] c3 4d c1 ; FPT Division ; ; MACC = MACC / MEM ; ; Entry: HL: Points to divisor ; Exit: All registers preserved xfdiv: push af ;[e108] f5 push bc ;[e109] c5 push de ;[e10a] d5 push hl ;[e10b] e5 call adiv ;[e10c] cd 20 ea jp fpexit ;[e10f] c3 4d c1 ; Copy operand into MACC ; ; Entry: HL: Points to operand ; Exit: All registers preserved xload: push af ;[e112] f5 push bc ;[e113] c5 push de ;[e114] d5 push hl ;[e115] e5 call loadfphl ;[e116] cd fb e9 jp fpexit ;[e119] c3 4d c1 ; Copy MACC to operand ; ; Entry: HL: Points to operand ; Exit: All registers preserved xsave: push af ;[e11c] f5 push bc ;[e11d] c5 push de ;[e11e] d5 push hl ;[e11f] e5 call asave ;[e120] cd d6 e9 jp fpexit ;[e123] c3 4d c1 ; Copy registers a,b,c,d into MACC ; ; Entry: None ; Exit: All registers preserved xput: push hl ;[e126] e5 ld h,d ;[e127] 62 ld l,c ;[e128] 69 ld (fpac+2),hl ;[e129] 22 d7 00 ld h,b ;[e12c] 60 ld l,a ;[e12d] 6f ld (fpac),hl ;[e12e] 22 d5 00 pop hl ;[e131] e1 ret ;[e132] c9 ; Copy MACC into registers a,b,c,d ; ; Entry: None ; Exit: e hl f preserved xget: push hl ;[e133] e5 ld hl,(fpac+2) ;[e134] 2a d7 00 ld c,l ;[e137] 4d ld d,h ;[e138] 54 ld hl,(fpac) ;[e139] 2a d5 00 ld a,l ;[e13c] 7d ld b,h ;[e13d] 44 pop hl ;[e13e] e1 ret ;[e13f] c9 ; FPT Abs ; ; For FPT values MACC = absolute value of MACC ; ; Entry: None ; Exit: All registers preserved xfabs: push af ;[e140] f5 push bc ;[e141] c5 push de ;[e142] d5 push hl ;[e143] e5 call abs_MACC ;[e144] cd ee e9 jp fpexit ;[e147] c3 4d c1 ; FPT Change sign of MACC ; ; MACC = -MACC ; ; Entry; None ; Exit: All registers preserved xfchs: push af ;[e14a] f5 push bc ;[e14b] c5 push de ;[e14c] d5 push hl ;[e14d] e5 call achgs ;[e14e] cd e4 e9 jp fpexit ;[e151] c3 4d c1 ; FPT Frac ; ; The FPT number in MACC is replaced by its fractional part ; ; Entry; None ; Exit: All registers preserved xfrac: push af ;[e154] f5 push hl ;[e155] e5 call fppush ;[e156] cd 1e c2 call xfint ;[e159] cd 43 e4 ld hl,$0000 ;[e15c] 21 00 00 add hl,sp ;[e15f] 39 call xfsub ;[e160] cd b4 ed call xfchs ;[e163] cd 4a e1 inc sp ;[e166] 33 inc sp ;[e167] 33 inc sp ;[e168] 33 inc sp ;[e169] 33 pop hl ;[e16a] e1 pop af ;[e16b] f1 ret ;[e16c] c9 ; Integer addition ; ; Signed 32-bit addition: MACC = MACC + MEM ; ; Entry: hl = points to operand ; Exit: All registers preserved xiadd: push af ;[e16d] f5 push bc ;[e16e] c5 push de ;[e16f] d5 push hl ;[e170] e5 call l1e51 ;[e171] cd 8c e3 push de ;[e174] d5 add (hl) ;[e175] 86 ld d,a ;[e176] 57 dec hl ;[e177] 2b ld a,c ;[e178] 79 adc (hl) ;[e179] 8e ld c,a ;[e17a] 4f dec hl ;[e17b] 2b ld a,b ;[e17c] 78 adc (hl) ;[e17d] 8e ld b,a ;[e17e] 47 dec hl ;[e17f] 2b ld a,e ;[e180] 7b adc (hl) ;[e181] 8e ld e,a ;[e182] 5f rra ;[e183] 1f xor e ;[e184] ab pop hl ;[e185] e1 and h ;[e186] a4 l1e11: call m,fperr_overflow ;[e187] fc 4b c0 jp l1e48 ;[e18a] c3 84 e3 ; Integer subtraction ; ; Signed 32-bit addition: MACC = MACC - MEM ; ; Entry: hl = points to operand ; Exit: All registers preserved xisub: push af ;[e18d] f5 push bc ;[e18e] c5 push de ;[e18f] d5 push hl ;[e190] e5 call l1e51 ;[e191] cd 8c e3 push de ;[e194] d5 sub (hl) ;[e195] 96 ld d,a ;[e196] 57 dec hl ;[e197] 2b ld a,c ;[e198] 79 sbc (hl) ;[e199] 9e ld c,a ;[e19a] 4f dec hl ;[e19b] 2b ld a,b ;[e19c] 78 sbc (hl) ;[e19d] 9e ld b,a ;[e19e] 47 dec hl ;[e19f] 2b ld a,e ;[e1a0] 7b sbc (hl) ;[e1a1] 9e ld e,a ;[e1a2] 5f rra ;[e1a3] 1f xor e ;[e1a4] ab pop hl ;[e1a5] e1 or h ;[e1a6] b4 cpl ;[e1a7] 2f or a ;[e1a8] b7 jp l1e11 ;[e1a9] c3 87 e1 ; Integer multiplication ; ; Signed 32-bit multiplication: MACC = MACC * MEM ; ; Entry: hl = points to multiplier ; Exit: All registers preserved ximul: push af ;[e1ac] f5 push bc ;[e1ad] c5 push de ;[e1ae] d5 push hl ;[e1af] e5 ld a,(fpac) ;[e1b0] 3a d5 00 or a ;[e1b3] b7 call m,x1chs ;[e1b4] fc 15 e3 jp c,l1e21 ;[e1b7] da 25 e2 xor (hl) ;[e1ba] ae push af ;[e1bb] f5 ld a,(hl) ;[e1bc] 7e inc hl ;[e1bd] 23 or a ;[e1be] b7 ld b,a ;[e1bf] 47 ld c,(hl) ;[e1c0] 4e inc hl ;[e1c1] 23 ld d,(hl) ;[e1c2] 56 inc hl ;[e1c3] 23 ld e,(hl) ;[e1c4] 5e call m,l1e57 ;[e1c5] fc c9 e3 jp c,l1e21 ;[e1c8] da 25 e2 or c ;[e1cb] b1 jp z,l1e14 ;[e1cc] ca df e1 ld hl,(fpac) ;[e1cf] 2a d5 00 ld a,h ;[e1d2] 7c or l ;[e1d3] b5 jp nz,l1e21 ;[e1d4] c2 25 e2 ld hl,(fpac+2) ;[e1d7] 2a d7 00 call l1e58 ;[e1da] cd cf e3 ld d,l ;[e1dd] 55 ld e,h ;[e1de] 5c l1e14: ld hl,$0000 ;[e1df] 21 00 00 push hl ;[e1e2] e5 ld hl,fpac+3 ;[e1e3] 21 d8 00 ld c,(hl) ;[e1e6] 4e l1e15: ex (sp),hl ;[e1e7] e3 ld a,c ;[e1e8] 79 or a ;[e1e9] b7 jp z,l1e20 ;[e1ea] ca 1e e2 ld b,$80 ;[e1ed] 06 80 l1e16: ld a,c ;[e1ef] 79 rra ;[e1f0] 1f ld c,a ;[e1f1] 4f jp nc,l1e17 ;[e1f2] d2 f6 e1 add hl,de ;[e1f5] 19 l1e17: ld a,h ;[e1f6] 7c rra ;[e1f7] 1f ld h,a ;[e1f8] 67 ld a,l ;[e1f9] 7d rra ;[e1fa] 1f ld l,a ;[e1fb] 6f ld a,b ;[e1fc] 78 rra ;[e1fd] 1f ld b,a ;[e1fe] 47 jp nc,l1e16 ;[e1ff] d2 ef e1 l1e18: ex (sp),hl ;[e202] e3 ld (hl),b ;[e203] 70 dec hl ;[e204] 2b ld a,l ;[e205] 7d cp $d4 ;[e206] fe d4 ld c,(hl) ;[e208] 4e jp nz,l1e15 ;[e209] c2 e7 e1 pop hl ;[e20c] e1 ld a,b ;[e20d] 78 or a ;[e20e] b7 jp m,l1e21 ;[e20f] fa 25 e2 ld a,h ;[e212] 7c or l ;[e213] b5 jp nz,l1e21 ;[e214] c2 25 e2 l1e19: pop af ;[e217] f1 call m,x1chs ;[e218] fc 15 e3 jp fpexit ;[e21b] c3 4d c1 l1e20: ld b,l ;[e21e] 45 ld l,h ;[e21f] 6c ld h,$00 ;[e220] 26 00 jp l1e18 ;[e222] c3 02 e2 l1e21: call fperr_overflow ;[e225] cd 4b c0 jp l1e19 ;[e228] c3 17 e2 ; Signed integer division ; ; MACC = MACC / MEM ; ; Entry: hl = points to divisor ; MACC = dividend ; Exit: MACC = quotient ; All registers preserved xidiv: push af ;[e22b] f5 push bc ;[e22c] c5 push de ;[e22d] d5 push hl ;[e22e] e5 call lie24 ;[e22f] cd 42 e2 call l1e58 ;[e232] cd cf e3 jp fpexit ;[e235] c3 4d c1 xirem: push af ;[e238] f5 push bc ;[e239] c5 push de ;[e23a] d5 push hl ;[e23b] e5 call lie24 ;[e23c] cd 42 e2 jp fpexit ;[e23f] c3 4d c1 ; Signed integer division ; ; Entry: hl = points to divisor ; MACC = divident ; Exit: bcde = quotient ; MACC = remainder lie24: call l1e234 ;[e242] cd 8f ed ld a,b ;[e245] 78 push af ;[e246] f5 call ldbcde ;[e247] cd 0e ea ld a,b ;[e24a] 78 or c ;[e24b] b1 or d ;[e24c] b2 or e ;[e24d] b3 jp z,l1e31 ;[e24e] ca e4 e2 ld a,b ;[e251] 78 or a ;[e252] b7 call m,l1e57 ;[e253] fc c9 e3 jp c,l1e31 ;[e256] da e4 e2 push bc ;[e259] c5 push de ;[e25a] d5 call normbcde ;[e25b] cd ec e2 cpl ;[e25e] 2f inc a ;[e25f] 3c ld h,a ;[e260] 67 ld a,(fpac) ;[e261] 3a d5 00 or a ;[e264] b7 call m,x1chs ;[e265] fc 15 e3 call l1e59 ;[e268] cd d6 e3 or c ;[e26b] b1 or d ;[e26c] b2 or e ;[e26d] b3 jp z,l1e30 ;[e26e] ca e0 e2 call normbcde ;[e271] cd ec e2 pop de ;[e274] d1 pop bc ;[e275] c1 add h ;[e276] 84 jp m,l1e27 ;[e277] fa c9 e2 call lshn ;[e27a] cd 39 eb push de ;[e27d] d5 push bc ;[e27e] c5 ld bc,$8000 ;[e27f] 01 00 80 ld de,$0000 ;[e282] 11 00 00 call rshn ;[e285] cd 55 eb ld h,b ;[e288] 60 ld l,c ;[e289] 69 pop bc ;[e28a] c1 ex (sp),hl ;[e28b] e3 ex de,hl ;[e28c] eb push hl ;[e28d] e5 l1e25: ld hl,(fpac+2) ;[e28e] 2a d7 00 ld a,h ;[e291] 7c sub e ;[e292] 93 ld h,a ;[e293] 67 ld a,l ;[e294] 7d sbc d ;[e295] 9a ld l,a ;[e296] 6f ld (fpac+2),hl ;[e297] 22 d7 00 ld hl,(fpac) ;[e29a] 2a d5 00 ld a,h ;[e29d] 7c sbc c ;[e29e] 99 ld h,a ;[e29f] 67 ld a,l ;[e2a0] 7d sbc b ;[e2a1] 98 ld l,a ;[e2a2] 6f ld (fpac),hl ;[e2a3] 22 d5 00 l1e26: pop hl ;[e2a6] e1 rla ;[e2a7] 17 ccf ;[e2a8] 3f ld a,l ;[e2a9] 7d rla ;[e2aa] 17 ld l,a ;[e2ab] 6f ld a,h ;[e2ac] 7c rla ;[e2ad] 17 ld h,a ;[e2ae] 67 ex (sp),hl ;[e2af] e3 ld a,l ;[e2b0] 7d rla ;[e2b1] 17 ld l,a ;[e2b2] 6f ld a,h ;[e2b3] 7c rla ;[e2b4] 17 ld h,a ;[e2b5] 67 ex (sp),hl ;[e2b6] e3 jp c,l1e28 ;[e2b7] da d0 e2 call l1e188 ;[e2ba] cd 70 eb ld a,l ;[e2bd] 7d rra ;[e2be] 1f push hl ;[e2bf] e5 jp c,l1e25 ;[e2c0] da 8e e2 call l1e33 ;[e2c3] cd f2 e2 jp l1e26 ;[e2c6] c3 a6 e2 l1e27: ld de,$0000 ;[e2c9] 11 00 00 push de ;[e2cc] d5 jp l1e29 ;[e2cd] c3 d7 e2 l1e28: ld a,l ;[e2d0] 7d rra ;[e2d1] 1f push hl ;[e2d2] e5 call nc,l1e33 ;[e2d3] d4 f2 e2 pop de ;[e2d6] d1 l1e29: pop bc ;[e2d7] c1 pop af ;[e2d8] f1 call l1e233 ;[e2d9] cd 88 ed call m,x1chs ;[e2dc] fc 15 e3 ret ;[e2df] c9 l1e30: pop hl ;[e2e0] e1 pop hl ;[e2e1] e1 pop af ;[e2e2] f1 ret ;[e2e3] c9 l1e31: call c,fperr_overflow ;[e2e4] dc 4b c0 call z,fperr_div0 ;[e2e7] cc 6c c0 pop af ;[e2ea] f1 ret ;[e2eb] c9 ; INTEGER: Normalise bcde normbcde: push hl ;[e2ec] e5 call l1e192 ;[e2ed] cd a0 eb pop hl ;[e2f0] e1 ret ;[e2f1] c9 l1e33: ld hl,(fpac+2) ;[e2f2] 2a d7 00 ld a,h ;[e2f5] 7c add e ;[e2f6] 83 ld h,a ;[e2f7] 67 ld a,l ;[e2f8] 7d adc d ;[e2f9] 8a ld l,a ;[e2fa] 6f ld (fpac+2),hl ;[e2fb] 22 d7 00 ld hl,(fpac) ;[e2fe] 2a d5 00 ld a,h ;[e301] 7c adc c ;[e302] 89 ld h,a ;[e303] 67 ld a,l ;[e304] 7d adc b ;[e305] 88 ld l,a ;[e306] 6f ld (fpac),hl ;[e307] 22 d5 00 ret ;[e30a] c9 x1abs: push af ;[e30b] f5 ld a,(fpac) ;[e30c] 3a d5 00 or a ;[e30f] b7 call m,x1chs ;[e310] fc 15 e3 pop af ;[e313] f1 ret ;[e314] c9 x1chs: push af ;[e315] f5 push bc ;[e316] c5 push de ;[e317] d5 push hl ;[e318] e5 call l1e59 ;[e319] cd d6 e3 call l1e57 ;[e31c] cd c9 e3 jp nc,l1e37 ;[e31f] d2 28 e3 l1e36: call fperr_overflow ;[e322] cd 4b c0 jp fpexit ;[e325] c3 4d c1 l1e37: call l1e58 ;[e328] cd cf e3 jp fpexit ;[e32b] c3 4d c1 xiand: push af ;[e32e] f5 push bc ;[e32f] c5 push de ;[e330] d5 push hl ;[e331] e5 jp l1e213 ;[e332] c3 e1 ec siand: and (hl) ;[e335] a6 ld d,a ;[e336] 57 dec hl ;[e337] 2b ld a,c ;[e338] 79 and (hl) ;[e339] a6 ld c,a ;[e33a] 4f dec hl ;[e33b] 2b ld a,b ;[e33c] 78 and (hl) ;[e33d] a6 ld b,a ;[e33e] 47 dec hl ;[e33f] 2b ld a,e ;[e340] 7b and (hl) ;[e341] a6 ret ;[e342] c9 l1e40: add l ;[e343] 85 ex (sp),hl ;[e344] e3 xior: push af ;[e345] f5 push bc ;[e346] c5 push de ;[e347] d5 push hl ;[e348] e5 jp l1e214 ;[e349] c3 ea ec sior: or (hl) ;[e34c] b6 ld d,a ;[e34d] 57 dec hl ;[e34e] 2b ld a,c ;[e34f] 79 or (hl) ;[e350] b6 ld c,a ;[e351] 4f dec hl ;[e352] 2b ld a,b ;[e353] 78 or (hl) ;[e354] b6 ld b,a ;[e355] 47 dec hl ;[e356] 2b ld a,e ;[e357] 7b or (hl) ;[e358] b6 ret ;[e359] c9 l1e43: add l ;[e35a] 85 ex (sp),hl ;[e35b] e3 xixor: push af ;[e35c] f5 push bc ;[e35d] c5 push de ;[e35e] d5 push hl ;[e35f] e5 jp l1e215 ;[e360] c3 f3 ec sixor: xor (hl) ;[e363] ae ld d,a ;[e364] 57 dec hl ;[e365] 2b ld a,c ;[e366] 79 xor (hl) ;[e367] ae ld c,a ;[e368] 4f dec hl ;[e369] 2b ld a,b ;[e36a] 78 xor (hl) ;[e36b] ae ld b,a ;[e36c] 47 dec hl ;[e36d] 2b ld a,e ;[e36e] 7b xor (hl) ;[e36f] ae ret ;[e370] c9 l1e46: add l ;[e371] 85 ex (sp),hl ;[e372] e3 x1not: push af ;[e373] f5 push bc ;[e374] c5 push de ;[e375] d5 push hl ;[e376] e5 call l1e216 ;[e377] cd fc ec ld e,a ;[e37a] 5f ld a,d ;[e37b] 7a cpl ;[e37c] 2f ld d,a ;[e37d] 57 ld a,c ;[e37e] 79 cpl ;[e37f] 2f ld c,a ;[e380] 4f ld a,b ;[e381] 78 cpl ;[e382] 2f ld b,a ;[e383] 47 l1e48: ld a,e ;[e384] 7b l1e49: call xput ;[e385] cd 26 e1 jp fpexit ;[e388] c3 4d c1 l1e50: ret ;[e38b] c9 l1e51: jp l1e217 ;[e38c] c3 01 ed l1e52: xor (hl) ;[e38f] ae cpl ;[e390] 2f inc hl ;[e391] 23 inc hl ;[e392] 23 inc hl ;[e393] 23 push de ;[e394] d5 ld d,a ;[e395] 57 pop af ;[e396] f1 ret ;[e397] c9 xshr: push af ;[e398] f5 push bc ;[e399] c5 push de ;[e39a] d5 push hl ;[e39b] e5 call l1e219 ;[e39c] cd 08 ed call rshn ;[e39f] cd 55 eb jp l1e37 ;[e3a2] c3 28 e3 xshl: push af ;[e3a5] f5 push bc ;[e3a6] c5 push de ;[e3a7] d5 push hl ;[e3a8] e5 call l1e219 ;[e3a9] cd 08 ed call lshn ;[e3ac] cd 39 eb jp l1e37 ;[e3af] c3 28 e3 xstst: ld a,(hl) ;[e3b2] 7e inc hl ;[e3b3] 23 or (hl) ;[e3b4] b6 inc hl ;[e3b5] 23 or (hl) ;[e3b6] b6 inc hl ;[e3b7] 23 jp nz,l1e56 ;[e3b8] c2 c2 e3 ld a,(hl) ;[e3bb] 7e and $e0 ;[e3bc] e6 e0 nop ;[e3be] 00 nop ;[e3bf] 00 ld a,(hl) ;[e3c0] 7e ret z ;[e3c1] c8 l1e56: ld a,$00 ;[e3c2] 3e 00 ld b,a ;[e3c4] 47 ld c,a ;[e3c5] 4f ld d,a ;[e3c6] 57 ld e,a ;[e3c7] 5f ret ;[e3c8] c9 l1e57: push hl ;[e3c9] e5 call l1e190 ;[e3ca] cd 82 eb pop hl ;[e3cd] e1 ret ;[e3ce] c9 l1e58: ld a,b ;[e3cf] 78 ld b,c ;[e3d0] 41 ld c,d ;[e3d1] 4a ld d,e ;[e3d2] 53 jp xput ;[e3d3] c3 26 e1 l1e59: push af ;[e3d6] f5 call xget ;[e3d7] cd 33 e1 jp gbc10 ;[e3da] c3 13 ed l1e60: ret ;[e3dd] c9 ; Change contents of MACC to FLT ; ; Entry: none ; Exit: All registers preservied xflt: push af ;[e3de] f5 push bc ;[e3df] c5 push de ;[e3e0] d5 push hl ;[e3e1] e5 call l1e59 ;[e3e2] cd d6 e3 call l1e232 ;[e3e5] cd 83 ed jp z,l1e63 ;[e3e8] ca 0e e4 ld h,$20 ;[e3eb] 26 20 ld a,b ;[e3ed] 78 or a ;[e3ee] b7 jp p,l1e62 ;[e3ef] f2 fd e3 ld h,$a0 ;[e3f2] 26 a0 call l1e57 ;[e3f4] cd c9 e3 jp nc,l1e62 ;[e3f7] d2 fd e3 ld b,$80 ;[e3fa] 06 80 ; Bug fix to handle bug ;inc h ;[e3fc] 24 l1e62: ld a,h ;[e3fd] 7c ld hl,fpac ;[e3fe] 21 d5 00 ld (hl),a ;[e401] 77 push hl ;[e402] e5 call l1e191 ;[e403] cd 96 eb pop hl ;[e406] e1 ld a,(hl) ;[e407] 7e call astore ;[e408] cd db e9 jp fpexit ;[e40b] c3 4d c1 l1e63: call zero ;[e40e] cd 16 ea jp fpexit ;[e411] c3 4d c1 ; Change contents of MACC to integer ; ; Entry: none ; Exit: All registers preservied xfix: push af ;[e414] f5 push bc ;[e415] c5 push de ;[e416] d5 push hl ;[e417] e5 call xget ;[e418] cd 33 e1 push af ;[e41b] f5 and $7f ;[e41c] e6 7f jp z,l1e65 ;[e41e] ca 3b e4 cp $40 ;[e421] fe 40 jp nc,l1e65 ;[e423] d2 3b e4 sub $20 ;[e426] d6 20 jp nc,l1e66 ;[e428] d2 3f e4 cpl ;[e42b] 2f inc a ;[e42c] 3c call rshn ;[e42d] cd 55 eb pop af ;[e430] f1 or a ;[e431] b7 call m,l1e57 ;[e432] fc c9 e3 jp c,l1e36 ;[e435] da 22 e3 jp l1e37 ;[e438] c3 28 e3 l1e65: pop af ;[e43b] f1 jp l1e63 ;[e43c] c3 0e e4 l1e66: pop af ;[e43f] f1 jp l1e36 ;[e440] c3 22 e3 ; FPT INT(x) ; ; The contents of the MACC are replaced by the FPT integer ; The fractional bits of mantissa are masked off ; ; Exit: All registers preserved xfint: push af ;[e443] f5 push bc ;[e444] c5 push de ;[e445] d5 push hl ;[e446] e5 ld hl,fpac ;[e447] 21 d5 00 ld a,(hl) ;[e44a] 7e and $7f ;[e44b] e6 7f jp z,l1e63 ;[e44d] ca 0e e4 cp $40 ;[e450] fe 40 jp nc,l1e63 ;[e452] d2 0e e4 sub $19 ;[e455] d6 19 ld hl,fpac+3 ;[e457] 21 d8 00 ld e,$03 ;[e45a] 1e 03 ld d,a ;[e45c] 57 l1e68: ld c,$08 ;[e45d] 0e 08 l1e69: inc d ;[e45f] 14 scf ;[e460] 37 jp p,l1e70 ;[e461] f2 65 e4 ccf ;[e464] 3f l1e70: rra ;[e465] 1f dec c ;[e466] 0d jp nz,l1e69 ;[e467] c2 5f e4 and (hl) ;[e46a] a6 ld (hl),a ;[e46b] 77 dec hl ;[e46c] 2b dec e ;[e46d] 1d jp nz,l1e68 ;[e46e] c2 5d e4 jp fpexit ;[e471] c3 4d c1 IF MATH_AM9511 ; AMD: FPT addition ; ; MTOS = MTOS + MEM ; ; Entry: hl = points to operand ; Exit: All registers preserved zfadd: call wlopi ;[e474] cd 27 e5 defb $10 ret ; AMD: FPT subtraction ; ; MTOS = MTOS - MEM ; ; Entry: hl = points to operand ; Exit: All registers preserved zfsub: call wlopi ;[e479] cd 27 e5 defb $11 ret ; AMD: FPT multiplication ; ; MTOS = MTOS * MEM ; ; Entry: hl = points to multiplier ; Exit: All registers preserved zfmul: call wlopi defb $12 ret ; AMD: FPT division ; ; MTOS = MTOS / MEM ; ; Entry: hl = points to divisor ; Exit: All registers preserved zfdiv: call wlopi ;[e483] cd 27 e5 inc de ;[e486] 13 ret ;[e487] c9 ; AMD: FPT abs ; ; MTOS = abs(MTOS) ; Entry: none ; Exit: All registers preserved zfabs: push af ;[e488] f5 call mfstat ;[e489] cd 95 ed nop ;[e48c] 00 add a ;[e48d] 87 call m,zfchs ;[e48e] fc 93 e4 pop af ;[e491] f1 ret ;[e492] c9 ; AMD: Change sign ; ; MTOS = -MTOS ; ; Entry: none ; Exit: All registers preserved zfchs: call wopi ;[e493] cd 35 e5 defb $15 ret ;[e497] c9 zfint: call zfix ;[e498] cd ef e4 zflt: call wopi ;[e49b] cd 35 e5 defb $1c ret ;[e49f] c9 zfrac: call wopi ;[e4a0] cd 35 e5 defb $37 call zfint ;[e4a4] cd 98 e4 call wopi ;[e4a7] cd 35 e5 defb $11 ret ; Part of AMD: POWER ; ; Entry: hl = points to operand ; Exit: All registers preserved mpr14: call wlopi defb $0b ret zln: call wopi ;[e4b1] cd 35 e5 defb $09 ret ;[e4b5] c9 zexp: call wopi ;[e4b6] cd 35 e5 defb $0a ret ;[e4ba] c9 zlog: call wopi ;[e4bb] cd 35 e5 defb $08 ret ;[e4bf] c9 zalog: push hl ;[e4c0] e5 ld hl,fp_invln10 ;[e4c1] 21 90 e8 call zfdiv ;[e4c4] cd 83 e4 pop hl ;[e4c7] e1 call zexp ;[e4c8] cd b6 e4 ret ;[e4cb] c9 zsqrt: call wopi ;[e4cc] cd 35 e5 defb $01 ret zsin: call wopi defb $02 ret zcos: call wopi ;[e4d6] cd 35 e5 defb $03 ret ;[e4da] c9 ztan: call wopi ;[e4db] cd 35 e5 defb $04 ret ;[e4df] c9 zasin: call wopi ;[e4e0] cd 35 e5 defb $05 ret ;[e4e4] c9 zacos: call wopi ;[e4e5] cd 35 e5 defb $06 ret zatan: call wopi ;[e4ea] cd 35 e5 defb $07 ret ;[e4ee] c9 zfix: call wopi ;[e4ef] cd 35 e5 defb $1e ret ziadd: call wlopi ;[e4f4] cd 27 e5 defb $2c ret ;[e4f8] c9 zisub: call wlopi ;[e4f9] cd 27 e5 defb $2d ret ;[e4fd] c9 zimul: call wlopi ;[e4fe] cd 27 e5 defb $2e ret zidiv: call wlopi ;[e503] cd 27 e5 defb $2f ret ;[e507] c9 zirem: call wopi ;[e508] cd 35 e5 defb $37 call zidiv ;[e50c] cd 03 e5 call zimul ;[e50f] cd fe e4 call wopi ;[e512] cd 35 e5 defb $2d ret ;[e516] c9 z1abs: push af ;[e517] f5 call mfstat ;[e518] cd 95 ed nop ;[e51b] 00 add a ;[e51c] 87 call m,zichs ;[e51d] fc 22 e5 pop af ;[e520] f1 ret ;[e521] c9 zichs: call wopi ;[e522] cd 35 e5 defb $34 ret ;[e526] c9 wlopi: call wmath ;[e527] cd 3b e5 call zload ;[e52a] cd 88 e5 opi: ex (sp),hl ;[e52d] e3 push af ;[e52e] f5 call mpt15 ;[e52f] cd cc ec pop af ;[e532] f1 ex (sp),hl ;[e533] e3 ret ;[e534] c9 wopi: call wmath ;[e535] cd 3b e5 jp opi ;[e538] c3 2d e5 ; Wait for AMD chip ready wmath: push af ;[e53b] f5 wmt10: ld a,($fb02) ;[e53c] 3a 02 fb or a ;[e53f] b7 jp m,wmt10 ;[e540] fa 3c e5 and $1e ;[e543] e6 1e jp z,wmt20 ;[e545] ca 5d e5 nop ;[e548] 00 call mpt16 ;[e549] cd d2 ec rra ;[e54c] 1f rra ;[e54d] 1f call c,fperr_overflow ;[e54e] dc 4b c0 rra ;[e551] 1f call c,fperr_underflow ;[e552] dc 65 c0 rra ;[e555] 1f call c,fperr_argerror ;[e556] dc 5e c0 rra ;[e559] 1f call c,fperr_div0 ;[e55a] dc 6c c0 wmt20: pop af ;[e55d] f1 ret ;[e55e] c9 ; AMD: Copy registers a,b,c,d into MTOS zput: push af ;[e55f] f5 ld a,d ;[e560] 7a call wmath ;[e561] cd 3b e5 zpt10: ld ($fb00),a ;[e564] 32 00 fb ld a,c ;[e567] 79 ld ($fb00),a ;[e568] 32 00 fb ld a,b ;[e56b] 78 jp mpt17 ;[e56c] c3 d9 ec zget: call wmath ;[e56f] cd 3b e5 ld a,($fb00) ;[e572] 3a 00 fb push af ;[e575] f5 ld a,($fb00) ;[e576] 3a 00 fb ld b,a ;[e579] 47 ld a,($fb00) ;[e57a] 3a 00 fb ld c,a ;[e57d] 4f ld a,($fb00) ;[e57e] 3a 00 fb ld d,a ;[e581] 57 jp zpt10 ;[e582] c3 64 e5 ; Unused l1e109: ld d,l ;[e585] 55 pop hl ;[e586] e1 ret ;[e587] c9 ; AMD: Copy operand into MTOS ; ; Entry: hl = points to operand ; Exit: All registers preserved zload: push af ;[e588] f5 push bc ;[e589] c5 push de ;[e58a] d5 push hl ;[e58b] e5 ld a,(hl) ;[e58c] 7e inc hl ;[e58d] 23 ld b,(hl) ;[e58e] 46 inc hl ;[e58f] 23 ld c,(hl) ;[e590] 4e inc hl ;[e591] 23 ld d,(hl) ;[e592] 56 call zput ;[e593] cd 5f e5 jp fpexit ;[e596] c3 4d c1 ; AMD: Copy MTOS to operand ; ; Entry: hl points to operand ; Exit: All registers preserved zsave: push af ;[e599] f5 push bc ;[e59a] c5 push de ;[e59b] d5 push hl ;[e59c] e5 call zget ;[e59d] cd 6f e5 ld (hl),a ;[e5a0] 77 inc hl ;[e5a1] 23 ld (hl),b ;[e5a2] 70 inc hl ;[e5a3] 23 ld (hl),c ;[e5a4] 71 inc hl ;[e5a5] 23 ld (hl),d ;[e5a6] 72 jp fpexit ;[e5a7] c3 4d c1 ENDIF ; Calculate taylor sum ; ; Entry: hl = points to a list of FPT constants (M0, M1, M2) ; MACC: Constant term of Taylor series (S0) ; 00e3-e6: Initial power of argument (P) ; 00e7-ea: Argument X ; ; Routine computes: ; Sum = S0 + M0 * P + M1*P*X + M2*P*X^2... ; ; Exit: sum-ee: Sum of series ; 00e3-e6: Last P*X^i added in ; 00e7-ea: Preserved ; MACC + abcd: Sum of series ; fehl corrupted poly: push hl ;[e5aa] e5 ld hl,sum ;[e5ab] 21 eb 00 call asave ;[e5ae] cd d6 e9 ld hl,icbwk ;[e5b1] 21 e3 00 call loadfphl ;[e5b4] cd fb e9 l1e113: pop hl ;[e5b7] e1 push hl ;[e5b8] e5 call amul ;[e5b9] cd 59 ea ld hl,sum ;[e5bc] 21 eb 00 push hl ;[e5bf] e5 call aadd ;[e5c0] cd 72 ea pop hl ;[e5c3] e1 call astore ;[e5c4] cd db e9 ld a,(expdf) ;[e5c7] 3a de 00 or a ;[e5ca] b7 jp p,l1e114 ;[e5cb] f2 d3 e5 cp $e8 ;[e5ce] fe e8 jp c,l1e115 ;[e5d0] da f3 e5 l1e114: pop hl ;[e5d3] e1 inc hl ;[e5d4] 23 inc hl ;[e5d5] 23 inc hl ;[e5d6] 23 inc hl ;[e5d7] 23 push hl ;[e5d8] e5 inc hl ;[e5d9] 23 ld a,(hl) ;[e5da] 7e or a ;[e5db] b7 jp p,l1e115 ;[e5dc] f2 f3 e5 ld hl,icbwk ;[e5df] 21 e3 00 push hl ;[e5e2] e5 call loadfphl ;[e5e3] cd fb e9 ld hl,xk ;[e5e6] 21 e7 00 call amul ;[e5e9] cd 59 ea pop hl ;[e5ec] e1 call astore ;[e5ed] cd db e9 jp l1e113 ;[e5f0] c3 b7 e5 l1e115: pop hl ;[e5f3] e1 call atest ;[e5f4] cd f8 e9 ret ;[e5f7] c9 ; FPT Sqrt ; ; MACC = SQRT(MACC) ; ; Method: approximation followed by Newton iterations ; ; Let X = 2^(2K)*F then 2^(2K) is exponent and F is matnissa ; ; Then SQRT(X) = 2^K*SQRT(F) 2^K is exp/2 ; SQRT(F) = P(i): ; 1st approx: P(1)= a*F+b ; 0.5 <= F < 1: values a1 and b1 ; 1 <= F < 2: values a2 and b2 ; Iterations: P(i+1)= P(i)+F/P(i))/2 ; Final SQRT(F): P(3) ; ; Exit: All registers preserved xsqrt: push af ;[e5f8] f5 push bc ;[e5f9] c5 push de ;[e5fa] d5 push hl ;[e5fb] e5 call tstza ;[e5fc] cd f1 eb jp z,l1e118 ;[e5ff] ca 3a e6 rlca ;[e602] 07 jp c,faser ;[e603] da d0 e9 rlca ;[e606] 07 rrca ;[e607] 0f rra ;[e608] 1f or a ;[e609] b7 rra ;[e60a] 1f push af ;[e60b] f5 ld a,$00 ;[e60c] 3e 00 ld de,l1e277 ;[e60e] 11 5f e6 jp nc,l1e117 ;[e611] d2 18 e6 inc a ;[e614] 3c ld de,l1e275 ;[e615] 11 57 e6 l1e117: ld (hl),a ;[e618] 77 push hl ;[e619] e5 ld hl,icbwk ;[e61a] 21 e3 00 call xsave ;[e61d] cd 1c e1 ex de,hl ;[e620] eb push hl ;[e621] e5 call amul ;[e622] cd 59 ea pop hl ;[e625] e1 inc hl ;[e626] 23 inc hl ;[e627] 23 inc hl ;[e628] 23 inc hl ;[e629] 23 call aadd ;[e62a] cd 72 ea call l1e119 ;[e62d] cd 3d e6 call l1e119 ;[e630] cd 3d e6 pop hl ;[e633] e1 pop bc ;[e634] c1 add b ;[e635] 80 and $7f ;[e636] e6 7f ld (hl),a ;[e638] 77 nop ;[e639] 00 l1e118: jp fpexit ;[e63a] c3 4d c1 ; Calculate P(i+1) l1e119: ld hl,xk ;[e63d] 21 e7 00 push hl ;[e640] e5 call astore ;[e641] cd db e9 ld hl,icbwk ;[e644] 21 e3 00 call loadfphl ;[e647] cd fb e9 pop hl ;[e64a] e1 push hl ;[e64b] e5 call adiv ;[e64c] cd 20 ea pop hl ;[e64f] e1 call aadd ;[e650] cd 72 ea dec a ;[e653] 3d and $7f ;[e654] e6 7f ret ;[e656] c9 ; FPT EXP ; ; MACC = e ^ MACC ; ; Method: Polynomial approximation xexp: push af ;[e667] f5 push bc ;[e668] c5 push de ;[e669] d5 push hl ;[e66a] e5 ld a,(fpac) ;[e66b] 3a d5 00 ld (fatzx),a ;[e66e] 32 ef 00 call abs_MACC ;[e671] cd ee e9 ld hl,l1e291 ;[e674] 21 2b e7 call amul ;[e677] cd 59 ea call fppush ;[e67a] cd 1e c2 call xfix ;[e67d] cd 14 e4 call xget ;[e680] cd 33 e1 call fppop ;[e683] cd 34 c2 or b ;[e686] b0 or c ;[e687] b1 jp z,exp_part2 ;[e688] ca c9 ef le68b: ld a,(fatzx) ;[e68b] 3a ef 00 cpl ;[e68e] 2f or a ;[e68f] b7 scf ;[e690] 37 jp l1e126 ;[e691] c3 f5 e6 l1e121: push de ;[e694] d5 call xfrac ;[e695] cd 54 e1 ld de,l1e279 ;[e698] 11 fb e6 ld hl,(fpac) ;[e69b] 2a d5 00 or l ;[e69e] b5 jp z,l1e272 ;[e69f] ca f9 ef cp $7f ;[e6a2] fe 7f jp c,l1e123 ;[e6a4] da b8 e6 ld de,l1e280 ;[e6a7] 11 ff e6 jp l1e123 ;[e6aa] c3 b8 e6 l1e122: rlca ;[e6ad] 07 rlca ;[e6ae] 07 ld de,l1e281 ;[e6af] 11 03 e7 jp nc,l1e123 ;[e6b2] d2 b8 e6 ld de,l1e282 ;[e6b5] 11 07 e7 l1e123: ex de,hl ;[e6b8] eb push hl ;[e6b9] e5 call asub ;[e6ba] cd 6d ea ld e,a ;[e6bd] 5f ld a,(fatzx) ;[e6be] 3a ef 00 rlca ;[e6c1] 07 push af ;[e6c2] f5 ld a,e ;[e6c3] 7b call c,achgs ;[e6c4] dc e4 e9 ld hl,icbwk ;[e6c7] 21 e3 00 call astore ;[e6ca] cd db e9 call astore ;[e6cd] cd db e9 ld hl,fp_one ;[e6d0] 21 62 c4 call loadfphl ;[e6d3] cd fb e9 ld hl,l1e292 ;[e6d6] 21 2f e7 call poly ;[e6d9] cd aa e5 pop af ;[e6dc] f1 pop de ;[e6dd] d1 push af ;[e6de] f5 ld hl,$0010 ;[e6df] 21 10 00 jp nc,l1e124 ;[e6e2] d2 e6 e6 add hl,hl ;[e6e5] 29 l1e124: add hl,de ;[e6e6] 19 call amul ;[e6e7] cd 59 ea pop af ;[e6ea] f1 pop hl ;[e6eb] e1 ld a,h ;[e6ec] 7c jp nc,l1e125 ;[e6ed] d2 f2 e6 cpl ;[e6f0] 2f inc a ;[e6f1] 3c l1e125: call lc1b7 ;[e6f2] cd b7 c1 l1e126: call c,ovunf ;[e6f5] dc 4b ea l1e127: jp fpexit ;[e6f8] c3 4d c1 ; FPT LOG ; ; MACC = LN(MACC) ; ; Method: Polynomial expansion ; ; Exit: icbwk-e6: Last significant summand ; xk-ea: v^2 ; sum-ee: Entry MACC (X) ; MACC: Result ; All registers preserved xln: push af ;[e745] f5 push bc ;[e746] c5 push de ;[e747] d5 push hl ;[e748] e5 call tstza ;[e749] cd f1 eb jp z,faser ;[e74c] ca d0 e9 or a ;[e74f] b7 jp m,faser ;[e750] fa d0 e9 call sext ;[e753] cd e9 c1 push af ;[e756] f5 ld (hl),$00 ;[e757] 36 00 ld a,(fpac+1) ;[e759] 3a d6 00 cp $b5 ;[e75c] fe b5 jp nc,flna ;[e75e] d2 6a e7 ld hl,fp_two ;[e761] 21 66 c4 call amul ;[e764] cd 59 ea pop af ;[e767] f1 dec a ;[e768] 3d push af ;[e769] f5 flna: ld hl,fp_one ;[e76a] 21 62 c4 call aadd ;[e76d] cd 72 ea call fppush ;[e770] cd 1e c2 ld hl,fp_two ;[e773] 21 66 c4 call asub ;[e776] cd 6d ea ld hl,$0000 ;[e779] 21 00 00 add hl,sp ;[e77c] 39 call adiv ;[e77d] cd 20 ea inc sp ;[e780] 33 inc sp ;[e781] 33 inc sp ;[e782] 33 inc sp ;[e783] 33 ld hl,icbwk ;[e784] 21 e3 00 call astore ;[e787] cd db e9 push hl ;[e78a] e5 call fppush ;[e78b] cd 1e c2 ld hl,$0000 ;[e78e] 21 00 00 l1e273: add hl,sp ;[e791] 39 call amul ;[e792] cd 59 ea inc sp ;[e795] 33 inc sp ;[e796] 33 inc sp ;[e797] 33 inc sp ;[e798] 33 pop hl ;[e799] e1 call astore ;[e79a] cd db e9 pop de ;[e79d] d1 ld a,d ;[e79e] 7a rla ;[e79f] 17 sbc a ;[e7a0] 9f ld b,a ;[e7a1] 47 ld c,a ;[e7a2] 4f call xput ;[e7a3] cd 26 e1 call xflt ;[e7a6] cd de e3 ld hl,fp_ln2 ;[e7a9] 21 b8 e7 call amul ;[e7ac] cd 59 ea ld hl,l1e299 ;[e7af] 21 bc e7 call poly ;[e7b2] cd aa e5 jp fpexit ;[e7b5] c3 4d c1 ; MACC = SIN(MACC) xsin: push af ;[e7d2] f5 push bc ;[e7d3] c5 push de ;[e7d4] d5 push hl ;[e7d5] e5 jp l1e132 ;[e7d6] c3 e3 e7 ; MACC = COS(MACC) ; ; Method: Polynomial expansion xcos: push af ;[e7d9] f5 push bc ;[e7da] c5 push de ;[e7db] d5 push hl ;[e7dc] e5 ld hl,fp_halfpi ;[e7dd] 21 33 e8 call aadd ;[e7e0] cd 72 ea l1e132: ld hl,l1e306 ;[e7e3] 21 3f e8 call adiv ;[e7e6] cd 20 ea call xfrac ;[e7e9] cd 54 e1 ld hl,fpac ;[e7ec] 21 d5 00 ld a,(hl) ;[e7ef] 7e and $7f ;[e7f0] e6 7f jp z,l1e133 ;[e7f2] ca fa e7 cp $7e ;[e7f5] fe 7e jp c,l1e134 ;[e7f7] da 18 e8 l1e133: cp (hl) ;[e7fa] be ld hl,fp_one ;[e7fb] 21 62 c4 call nz,aadd ;[e7fe] c4 72 ea ld hl,fp_quarter ;[e801] 21 37 e8 push hl ;[e804] e5 call asub ;[e805] cd 6d ea call abs_MACC ;[e808] cd ee e9 ld hl,fp_half ;[e80b] 21 3b e8 call asub ;[e80e] cd 6d ea call abs_MACC ;[e811] cd ee e9 pop hl ;[e814] e1 call asub ;[e815] cd 6d ea l1e134: ld hl,icbwk ;[e818] 21 e3 00 push hl ;[e81b] e5 call asave ;[e81c] cd d6 e9 ex (sp),hl ;[e81f] e3 call amul ;[e820] cd 59 ea pop hl ;[e823] e1 call astore ;[e824] cd db e9 call zero ;[e827] cd 16 ea ld hl,l1e306 ;[e82a] 21 3f e8 call poly ;[e82d] cd aa e5 jp fpexit ;[e830] c3 4d c1 xpwr: push af ;[e855] f5 push bc ;[e856] c5 push de ;[e857] d5 push hl ;[e858] e5 push hl ;[e859] e5 call atest ;[e85a] cd f8 e9 pop hl ;[e85d] e1 jp z,xpw10 ;[e85e] ca 6d e8 jp m,faser ;[e861] fa d0 e9 call xln ;[e864] cd 45 e7 call amul ;[e867] cd 59 ea call xexp ;[e86a] cd 67 e6 xpw10: jp fpexit ;[e86d] c3 4d c1 xlog10: push af ;[e870] f5 push bc ;[e871] c5 push de ;[e872] d5 push hl ;[e873] e5 call xln ;[e874] cd 45 e7 ld hl,fp_invln10 ;[e877] 21 90 e8 call amul ;[e87a] cd 59 ea jp fpexit ;[e87d] c3 4d c1 ; FLT ALOC ; ; MACC = ALOC(MACC) ; ; Method: 10^x = e^(X*ln10) ; ; Exit: All registers preserved xalog: push af ;[e880] f5 push bc ;[e881] c5 push de ;[e882] d5 push hl ;[e883] e5 ld hl,fp_invln10 ;[e884] 21 90 e8 call adiv ;[e887] cd 20 ea call xexp ;[e88a] cd 67 e6 jp fpexit ;[e88d] c3 4d c1 xtan: push hl ;[e894] e5 call fppush ;[e895] cd 1e c2 call xcos ;[e898] cd d9 e7 ld hl,fatzx ;[e89b] 21 ef 00 call xsave ;[e89e] cd 1c e1 call fppop ;[e8a1] cd 34 c2 call xsin ;[e8a4] cd d2 e7 call xfdiv ;[e8a7] cd 08 e1 pop hl ;[e8aa] e1 ret ;[e8ab] c9 xatan: push af ;[e8ac] f5 push bc ;[e8ad] c5 push de ;[e8ae] d5 push hl ;[e8af] e5 call tstza ;[e8b0] cd f1 eb jp z,l1e145 ;[e8b3] ca 43 e9 push af ;[e8b6] f5 call abs_MACC ;[e8b7] cd ee e9 ld hl,fatzx ;[e8ba] 21 ef 00 call astore ;[e8bd] cd db e9 cp $40 ;[e8c0] fe 40 jp c,l1e141 ;[e8c2] da d3 e8 cp $7f ;[e8c5] fe 7f ld a,$01 ;[e8c7] 3e 01 jp z,l1e143 ;[e8c9] ca e6 e8 ld hl,fp_zero ;[e8cc] 21 5e c4 push hl ;[e8cf] e5 jp l1e144 ;[e8d0] c3 15 e9 l1e141: cp $01 ;[e8d3] fe 01 ld a,$02 ;[e8d5] 3e 02 jp z,l1e143 ;[e8d7] ca e6 e8 jp nc,l1e142 ;[e8da] d2 e3 e8 ld a,b ;[e8dd] 78 rlca ;[e8de] 07 rlca ;[e8df] 07 ld a,$01 ;[e8e0] 3e 01 ccf ;[e8e2] 3f l1e142: ccf ;[e8e3] 3f adc $00 ;[e8e4] ce 00 l1e143: add a ;[e8e6] 87 add a ;[e8e7] 87 add a ;[e8e8] 87 ld hl,fatc1-8 ;[e8e9] 21 3e e9 ld e,a ;[e8ec] 5f ld d,$00 ;[e8ed] 16 00 add hl,de ;[e8ef] 19 push hl ;[e8f0] e5 ld de,$0004 ;[e8f1] 11 04 00 add hl,de ;[e8f4] 19 push hl ;[e8f5] e5 call amul ;[e8f6] cd 59 ea ld hl,fp_one ;[e8f9] 21 62 c4 call aadd ;[e8fc] cd 72 ea ld hl,fwork ;[e8ff] 21 df 00 call astore ;[e902] cd db e9 ld hl,fatzx ;[e905] 21 ef 00 call loadfphl ;[e908] cd fb e9 pop hl ;[e90b] e1 call asub ;[e90c] cd 6d ea ld hl,fwork ;[e90f] 21 df 00 call adiv ;[e912] cd 20 ea l1e144: ld hl,fatzx ;[e915] 21 ef 00 push hl ;[e918] e5 push hl ;[e919] e5 call asave ;[e91a] cd d6 e9 pop hl ;[e91d] e1 call amul ;[e91e] cd 59 ea ld hl,icbwk ;[e921] 21 e3 00 call astore ;[e924] cd db e9 call astore ;[e927] cd db e9 ld hl,fp_one ;[e92a] 21 62 c4 call loadfphl ;[e92d] cd fb e9 ld hl,fatpl ;[e930] 21 5e e9 call poly ;[e933] cd aa e5 pop hl ;[e936] e1 call amul ;[e937] cd 59 ea pop hl ;[e93a] e1 call aadd ;[e93b] cd 72 ea pop af ;[e93e] f1 or a ;[e93f] b7 call m,achgs ;[e940] fc e4 e9 l1e145: jp fpexit ;[e943] c3 4d c1 xasin: push af ;[e96c] f5 push bc ;[e96d] c5 push de ;[e96e] d5 push hl ;[e96f] e5 call atest ;[e970] cd f8 e9 ld e,a ;[e973] 5f and $7f ;[e974] e6 7f cp $01 ;[e976] fe 01 jp c,fas20 ;[e978] da 99 e9 jp nz,fas10 ;[e97b] c2 94 e9 ld a,b ;[e97e] 78 and $7f ;[e97f] e6 7f or c ;[e981] b1 or d ;[e982] b2 jp nz,faser ;[e983] c2 d0 e9 ld a,e ;[e986] 7b or a ;[e987] b7 ld hl,fp_halfpi ;[e988] 21 33 e8 call xload ;[e98b] cd 12 e1 call m,achgs ;[e98e] fc e4 e9 fasret: jp fpexit ;[e991] c3 4d c1 fas10: cp $40 ;[e994] fe 40 jp c,faser ;[e996] da d0 e9 fas20: call fppush ;[e999] cd 1e c2 ld hl,$0000 ;[e99c] 21 00 00 add hl,sp ;[e99f] 39 call amul ;[e9a0] cd 59 ea call achgs ;[e9a3] cd e4 e9 ld hl,fp_one ;[e9a6] 21 62 c4 call aadd ;[e9a9] cd 72 ea call xsqrt ;[e9ac] cd f8 e5 ld hl,fatzx ;[e9af] 21 ef 00 call xsave ;[e9b2] cd 1c e1 call fppop ;[e9b5] cd 34 c2 call xfdiv ;[e9b8] cd 08 e1 call xatan ;[e9bb] cd ac e8 jp fasret ;[e9be] c3 91 e9 xacos: call xasin ;[e9c1] cd 6c e9 call xfchs ;[e9c4] cd 4a e1 push hl ;[e9c7] e5 ld hl,fp_halfpi ;[e9c8] 21 33 e8 call xfadd ;[e9cb] cd aa ed pop hl ;[e9ce] e1 ret ;[e9cf] c9 faser: call fperr_argerror ;[e9d0] cd 5e c0 jp fasret ;[e9d3] c3 91 e9 asave: push hl ;[e9d6] e5 call atest ;[e9d7] cd f8 e9 pop hl ;[e9da] e1 astore: ld (hl),a ;[e9db] 77 inc hl ;[e9dc] 23 ld (hl),b ;[e9dd] 70 inc hl ;[e9de] 23 ld (hl),c ;[e9df] 71 inc hl ;[e9e0] 23 ld (hl),d ;[e9e1] 72 inc hl ;[e9e2] 23 ret ;[e9e3] c9 achgs: call tstza ;[e9e4] cd f1 eb ret z ;[e9e7] c8 ld bc,$ff80 ;[e9e8] 01 80 ff ; Change sign bit jp l1e156 ;[e9eb] c3 f1 e9 abs_MACC: ld bc,$7f00 ;[e9ee] 01 00 7f l1e156: ld hl,fpac ;[e9f1] 21 d5 00 ld a,b ;[e9f4] 78 and (hl) ;[e9f5] a6 xor c ;[e9f6] a9 ld (hl),a ;[e9f7] 77 atest: ld hl,fpac ;[e9f8] 21 d5 00 loadfphl: call tstz ;[e9fb] cd f4 eb jp z,zero ;[e9fe] ca 16 ea ld e,a ;[ea01] 5f inc hl ;[ea02] 23 ld b,(hl) ;[ea03] 46 inc hl ;[ea04] 23 ld c,(hl) ;[ea05] 4e inc hl ;[ea06] 23 ld d,(hl) ;[ea07] 56 ld hl,fpac ;[ea08] 21 d5 00 jp l1e177 ;[ea0b] c3 17 eb ldbcde: ld b,(hl) ;[ea0e] 46 inc hl ;[ea0f] 23 ld c,(hl) ;[ea10] 4e inc hl ;[ea11] 23 ld d,(hl) ;[ea12] 56 inc hl ;[ea13] 23 ld e,(hl) ;[ea14] 5e ret ;[ea15] c9 zero: ld hl,fpac ;[ea16] 21 d5 00 xor a ;[ea19] af ld b,a ;[ea1a] 47 ld c,a ;[ea1b] 4f ld d,a ;[ea1c] 57 jp astore ;[ea1d] c3 db e9 adiv: call tstz ;[ea20] cd f4 eb jp z,div0 ;[ea23] ca 54 ea push af ;[ea26] f5 and $80 ;[ea27] e6 80 ld b,a ;[ea29] 47 pop af ;[ea2a] f1 and $7f ;[ea2b] e6 7f cpl ;[ea2d] 2f inc a ;[ea2e] 3c cp $c0 ;[ea2f] fe c0 jp z,overf ;[ea31] ca 46 ea and $7f ;[ea34] e6 7f or b ;[ea36] b0 call mdex ;[ea37] cd 1d eb jp c,ovunf ;[ea3a] da 4b ea jp z,zero ;[ea3d] ca 16 ea call divx ;[ea40] cd 4a ec jp nc,add11 ;[ea43] d2 06 eb overf: call fperr_overflow ;[ea46] cd 4b c0 scf ;[ea49] 37 ret ;[ea4a] c9 ovunf: jp m,overf ;[ea4b] fa 46 ea call fperr_underflow ;[ea4e] cd 65 c0 jp zero ;[ea51] c3 16 ea div0: call fperr_div0 ;[ea54] cd 6c c0 scf ;[ea57] 37 ret ;[ea58] c9 amul: call tstz ;[ea59] cd f4 eb call nz,mdex ;[ea5c] c4 1d eb jp c,ovunf ;[ea5f] da 4b ea jp z,zero ;[ea62] ca 16 ea call mulx ;[ea65] cd 00 ec ld a,b ;[ea68] 78 or a ;[ea69] b7 jp ad10a ;[ea6a] c3 00 eb asub: ld b,$80 ;[ea6d] 06 80 jp ad10 ;[ea6f] c3 74 ea aadd: ld b,$00 ;[ea72] 06 00 ad10: ld a,$7f ;[ea74] 3e 7f ld (expdf),a ;[ea76] 32 de 00 call tstz ;[ea79] cd f4 eb jp z,atest ;[ea7c] ca f8 e9 ld a,b ;[ea7f] 78 xor (hl) ;[ea80] ae inc hl ;[ea81] 23 ld b,(hl) ;[ea82] 46 inc hl ;[ea83] 23 ld c,(hl) ;[ea84] 4e inc hl ;[ea85] 23 ld d,(hl) ;[ea86] 56 ld e,a ;[ea87] 5f ld hl,fpac ;[ea88] 21 d5 00 ld a,(hl) ;[ea8b] 7e xor e ;[ea8c] ab and $80 ;[ea8d] e6 80 ld (sf),a ;[ea8f] 32 d9 00 call tstz ;[ea92] cd f4 eb jp z,l1e175 ;[ea95] ca 11 eb push de ;[ea98] d5 ld a,e ;[ea99] 7b call sext ;[ea9a] cd e9 c1 ld e,a ;[ea9d] 5f ld a,(hl) ;[ea9e] 7e call sext ;[ea9f] cd e9 c1 sub e ;[eaa2] 93 pop de ;[eaa3] d1 ld (expdf),a ;[eaa4] 32 de 00 jp m,l1e169 ;[eaa7] fa b2 ea cp $19 ;[eaaa] fe 19 jp c,l1e170 ;[eaac] da c6 ea jp atest ;[eaaf] c3 f8 e9 l1e169: cp $e7 ;[eab2] fe e7 jp c,l1e176 ;[eab4] da 16 eb ld (hl),e ;[eab7] 73 cpl ;[eab8] 2f inc a ;[eab9] 3c inc hl ;[eaba] 23 ld e,(hl) ;[eabb] 5e ld (hl),b ;[eabc] 70 ld b,e ;[eabd] 43 inc hl ;[eabe] 23 ld e,(hl) ;[eabf] 5e ld (hl),c ;[eac0] 71 ld c,e ;[eac1] 4b inc hl ;[eac2] 23 ld e,(hl) ;[eac3] 5e ld (hl),d ;[eac4] 72 ld d,e ;[eac5] 53 l1e170: ld e,$00 ;[eac6] 1e 00 call rshn ;[eac8] cd 55 eb ld a,(sf) ;[eacb] 3a d9 00 or a ;[eace] b7 ld hl,fpac+3 ;[eacf] 21 d8 00 jp m,l1e171 ;[ead2] fa ef ea ld a,(hl) ;[ead5] 7e add d ;[ead6] 82 ld d,a ;[ead7] 57 dec hl ;[ead8] 2b ld a,(hl) ;[ead9] 7e adc c ;[eada] 89 ld c,a ;[eadb] 4f dec hl ;[eadc] 2b ld a,(hl) ;[eadd] 7e adc b ;[eade] 88 ld b,a ;[eadf] 47 jp nc,add11 ;[eae0] d2 06 eb call l1e188 ;[eae3] cd 70 eb call l1e198 ;[eae6] cd d9 eb jp c,overf ;[eae9] da 46 ea jp add11 ;[eaec] c3 06 eb l1e171: xor a ;[eaef] af sub e ;[eaf0] 93 ld e,a ;[eaf1] 5f ld a,(hl) ;[eaf2] 7e sbc d ;[eaf3] 9a ld d,a ;[eaf4] 57 dec hl ;[eaf5] 2b ld a,(hl) ;[eaf6] 7e sbc c ;[eaf7] 99 ld c,a ;[eaf8] 4f dec hl ;[eaf9] 2b ld a,(hl) ;[eafa] 7e sbc b ;[eafb] 98 ld b,a ;[eafc] 47 call c,l1e189 ;[eafd] dc 7d eb ad10a: call p,l1e191 ;[eb00] f4 96 eb jp p,zero ;[eb03] f2 16 ea add11: call l1e196 ;[eb06] cd c3 eb jp c,overf ;[eb09] da 46 ea l1e174: ld a,e ;[eb0c] 7b or $01 ;[eb0d] f6 01 ld a,e ;[eb0f] 7b ret ;[eb10] c9 l1e175: ld a,$80 ;[eb11] 3e 80 ld (expdf),a ;[eb13] 32 de 00 l1e176: ld a,e ;[eb16] 7b l1e177: call astore ;[eb17] cd db e9 jp l1e174 ;[eb1a] c3 0c eb mdex: ld b,a ;[eb1d] 47 inc hl ;[eb1e] 23 ld c,(hl) ;[eb1f] 4e inc hl ;[eb20] 23 ld d,(hl) ;[eb21] 56 inc hl ;[eb22] 23 ld e,(hl) ;[eb23] 5e call tstza ;[eb24] cd f1 eb ret z ;[eb27] c8 ld a,b ;[eb28] 78 call sext ;[eb29] cd e9 c1 call addexp ;[eb2c] cd ba c1 ret c ;[eb2f] d8 ld a,b ;[eb30] 78 and $80 ;[eb31] e6 80 xor (hl) ;[eb33] ae ld (hl),a ;[eb34] 77 ld a,$01 ;[eb35] 3e 01 or a ;[eb37] b7 ret ;[eb38] c9 lshn: push af ;[eb39] f5 ld l,a ;[eb3a] 6f l1e180: dec l ;[eb3b] 2d jp m,l1e182 ;[eb3c] fa 46 eb or a ;[eb3f] b7 call l1e183 ;[eb40] cd 48 eb jp l1e180 ;[eb43] c3 3b eb l1e182: pop af ;[eb46] f1 ret ;[eb47] c9 l1e183: ld a,e ;[eb48] 7b rla ;[eb49] 17 ld e,a ;[eb4a] 5f ld a,d ;[eb4b] 7a rla ;[eb4c] 17 ld d,a ;[eb4d] 57 ld a,c ;[eb4e] 79 rla ;[eb4f] 17 ld c,a ;[eb50] 4f ld a,b ;[eb51] 78 adc a ;[eb52] 8f ld b,a ;[eb53] 47 ret ;[eb54] c9 rshn: ld l,$08 ;[eb55] 2e 08 l1e185: cp l ;[eb57] bd jp m,l1e186 ;[eb58] fa 64 eb ld e,d ;[eb5b] 5a ld d,c ;[eb5c] 51 ld c,b ;[eb5d] 48 ld b,$00 ;[eb5e] 06 00 sub l ;[eb60] 95 jp nz,l1e185 ;[eb61] c2 57 eb l1e186: or a ;[eb64] b7 ret z ;[eb65] c8 ld l,a ;[eb66] 6f l1e187: or a ;[eb67] b7 call l1e188 ;[eb68] cd 70 eb dec l ;[eb6b] 2d jp nz,l1e187 ;[eb6c] c2 67 eb ret ;[eb6f] c9 l1e188: ld a,b ;[eb70] 78 rra ;[eb71] 1f ld b,a ;[eb72] 47 ld a,c ;[eb73] 79 rra ;[eb74] 1f ld c,a ;[eb75] 4f ld a,d ;[eb76] 7a rra ;[eb77] 1f ld d,a ;[eb78] 57 ld a,e ;[eb79] 7b rra ;[eb7a] 1f ld e,a ;[eb7b] 5f ret ;[eb7c] c9 l1e189: dec hl ;[eb7d] 2b ld a,(hl) ;[eb7e] 7e xor $80 ;[eb7f] ee 80 ld (hl),a ;[eb81] 77 l1e190: xor a ;[eb82] af ld l,a ;[eb83] 6f sub e ;[eb84] 93 ld e,a ;[eb85] 5f ld a,l ;[eb86] 7d sbc d ;[eb87] 9a ld d,a ;[eb88] 57 ld a,l ;[eb89] 7d sbc c ;[eb8a] 99 ld c,a ;[eb8b] 4f ld a,l ;[eb8c] 7d sbc b ;[eb8d] 98 ld l,a ;[eb8e] 6f and b ;[eb8f] a0 rla ;[eb90] 17 ld b,l ;[eb91] 45 ld a,l ;[eb92] 7d rra ;[eb93] 1f adc a ;[eb94] 8f ret ;[eb95] c9 l1e191: call l1e192 ;[eb96] cd a0 eb call nc,lc1b7 ;[eb99] d4 b7 c1 ccf ;[eb9c] 3f rra ;[eb9d] 1f or a ;[eb9e] b7 ret ;[eb9f] c9 l1e192: push hl ;[eba0] e5 ld l,$20 ;[eba1] 2e 20 l1e193: ld a,b ;[eba3] 78 or a ;[eba4] b7 jp nz,l1e195 ;[eba5] c2 ba eb ld b,c ;[eba8] 41 ld c,d ;[eba9] 4a ld d,e ;[ebaa] 53 ld e,a ;[ebab] 5f ld a,l ;[ebac] 7d sub $08 ;[ebad] d6 08 ld l,a ;[ebaf] 6f jp nz,l1e193 ;[ebb0] c2 a3 eb pop hl ;[ebb3] e1 scf ;[ebb4] 37 ret ;[ebb5] c9 l1e194: dec l ;[ebb6] 2d call l1e183 ;[ebb7] cd 48 eb l1e195: jp p,l1e194 ;[ebba] f2 b6 eb ld a,l ;[ebbd] 7d sub $20 ;[ebbe] d6 20 or a ;[ebc0] b7 pop hl ;[ebc1] e1 ret ;[ebc2] c9 l1e196: ld a,e ;[ebc3] 7b or a ;[ebc4] b7 call m,l1e197 ;[ebc5] fc d1 eb ret c ;[ebc8] d8 ld hl,fpac ;[ebc9] 21 d5 00 ld e,(hl) ;[ebcc] 5e ld a,(hl) ;[ebcd] 7e jp astore ;[ebce] c3 db e9 l1e197: inc d ;[ebd1] 14 ret nz ;[ebd2] c0 inc c ;[ebd3] 0c ret nz ;[ebd4] c0 inc b ;[ebd5] 04 ret nz ;[ebd6] c0 ld b,$80 ;[ebd7] 06 80 l1e198: push bc ;[ebd9] c5 push af ;[ebda] f5 push hl ;[ebdb] e5 ld a,$01 ;[ebdc] 3e 01 l1e199: ld hl,fpac ;[ebde] 21 d5 00 call addexp ;[ebe1] cd ba c1 pop hl ;[ebe4] e1 pop bc ;[ebe5] c1 ld a,b ;[ebe6] 78 pop bc ;[ebe7] c1 ret ;[ebe8] c9 l1e274: push bc ;[ebe9] c5 push af ;[ebea] f5 push hl ;[ebeb] e5 ld a,$ff ;[ebec] 3e ff jp l1e199 ;[ebee] c3 de eb tstza: ld hl,fpac ;[ebf1] 21 d5 00 tstz: ld a,(hl) ;[ebf4] 7e inc hl ;[ebf5] 23 or (hl) ;[ebf6] b6 inc hl ;[ebf7] 23 or (hl) ;[ebf8] b6 inc hl ;[ebf9] 23 or (hl) ;[ebfa] b6 dec hl ;[ebfb] 2b dec hl ;[ebfc] 2b dec hl ;[ebfd] 2b ld a,(hl) ;[ebfe] 7e ret ;[ebff] c9 mulx: ld a,c ;[ec00] 79 ld (dp1),a ;[ec01] 32 dd 00 ld h,d ;[ec04] 62 ld l,e ;[ec05] 6b ld (dp3),hl ;[ec06] 22 db 00 xor a ;[ec09] af ld d,a ;[ec0a] 57 ld c,a ;[ec0b] 4f ld b,a ;[ec0c] 47 ld a,(fpac+3) ;[ec0d] 3a d8 00 call l1e203 ;[ec10] cd 1c ec ld a,(fpac+2) ;[ec13] 3a d7 00 call l1e203 ;[ec16] cd 1c ec ld a,(fpac+1) ;[ec19] 3a d6 00 l1e203: ld l,d ;[ec1c] 6a ld e,c ;[ec1d] 59 ld d,b ;[ec1e] 50 ld b,a ;[ec1f] 47 xor a ;[ec20] af ld c,a ;[ec21] 4f sub b ;[ec22] 90 jp c,l1e204 ;[ec23] da 29 ec ld c,d ;[ec26] 4a ld d,e ;[ec27] 53 ret ;[ec28] c9 l1e204: ld a,l ;[ec29] 7d adc a ;[ec2a] 8f ret z ;[ec2b] c8 ld l,a ;[ec2c] 6f call l1e183 ;[ec2d] cd 48 eb jp nc,l1e204 ;[ec30] d2 29 ec ld a,(dp3) ;[ec33] 3a db 00 add e ;[ec36] 83 ld e,a ;[ec37] 5f ld a,(dp2) ;[ec38] 3a dc 00 adc d ;[ec3b] 8a ld d,a ;[ec3c] 57 ld a,(dp1) ;[ec3d] 3a dd 00 adc c ;[ec40] 89 ld c,a ;[ec41] 4f jp nc,l1e204 ;[ec42] d2 29 ec inc b ;[ec45] 04 or a ;[ec46] b7 jp l1e204 ;[ec47] c3 29 ec divx: ld hl,fpac+3 ;[ec4a] 21 d8 00 ld a,(hl) ;[ec4d] 7e sub e ;[ec4e] 93 ld (hl),a ;[ec4f] 77 dec hl ;[ec50] 2b ld a,(hl) ;[ec51] 7e sbc d ;[ec52] 9a ld (hl),a ;[ec53] 77 dec hl ;[ec54] 2b ld a,(hl) ;[ec55] 7e sbc c ;[ec56] 99 ld (hl),a ;[ec57] 77 ld hl,dp1 ;[ec58] 21 dd 00 scf ;[ec5b] 37 ld a,c ;[ec5c] 79 rra ;[ec5d] 1f ld (hl),a ;[ec5e] 77 dec hl ;[ec5f] 2b ld a,d ;[ec60] 7a rra ;[ec61] 1f ld (hl),a ;[ec62] 77 dec hl ;[ec63] 2b ld a,e ;[ec64] 7b rra ;[ec65] 1f ld (hl),a ;[ec66] 77 dec hl ;[ec67] 2b ld b,$00 ;[ec68] 06 00 ld a,b ;[ec6a] 78 rra ;[ec6b] 1f ld (hl),a ;[ec6c] 77 ld hl,fpac+1 ;[ec6d] 21 d6 00 ld a,(hl) ;[ec70] 7e inc hl ;[ec71] 23 ld d,(hl) ;[ec72] 56 inc hl ;[ec73] 23 ld e,(hl) ;[ec74] 5e or a ;[ec75] b7 jp m,l1e209 ;[ec76] fa c4 ec call l1e198 ;[ec79] cd d9 eb ret c ;[ec7c] d8 ld l,e ;[ec7d] 6b ld h,d ;[ec7e] 62 ld e,a ;[ec7f] 5f ld d,$01 ;[ec80] 16 01 ld c,b ;[ec82] 48 l1e206: push bc ;[ec83] c5 ld b,h ;[ec84] 44 ld c,l ;[ec85] 4d ld hl,dp4 ;[ec86] 21 da 00 xor a ;[ec89] af sub (hl) ;[ec8a] 96 inc hl ;[ec8b] 23 ld a,c ;[ec8c] 79 sbc (hl) ;[ec8d] 9e ld c,a ;[ec8e] 4f inc hl ;[ec8f] 23 ld a,b ;[ec90] 78 sbc (hl) ;[ec91] 9e ld b,a ;[ec92] 47 inc hl ;[ec93] 23 ld a,e ;[ec94] 7b sbc (hl) ;[ec95] 9e ld e,a ;[ec96] 5f ld l,c ;[ec97] 69 ld h,b ;[ec98] 60 pop bc ;[ec99] c1 l1e207: ld a,(dp4) ;[ec9a] 3a da 00 lec9d: rlca ;[ec9d] 07 ld a,b ;[ec9e] 78 rla ;[ec9f] 17 ccf ;[eca0] 3f ret nc ;[eca1] d0 rra ;[eca2] 1f ld a,l ;[eca3] 7d rla ;[eca4] 17 ld l,a ;[eca5] 6f ld a,h ;[eca6] 7c rla ;[eca7] 17 ld h,a ;[eca8] 67 call l1e183 ;[eca9] cd 48 eb ld a,d ;[ecac] 7a rrca ;[ecad] 0f jp c,l1e206 ;[ecae] da 83 ec l1e208: push bc ;[ecb1] c5 ld b,h ;[ecb2] 44 ld c,l ;[ecb3] 4d ld hl,(dp3) ;[ecb4] 2a db 00 add hl,bc ;[ecb7] 09 ld a,(dp1) ;[ecb8] 3a dd 00 adc e ;[ecbb] 8b ld e,a ;[ecbc] 5f pop bc ;[ecbd] c1 ld a,(dp4) ;[ecbe] 3a da 00 jp lec9d ;[ecc1] c3 9d ec l1e209: ld l,e ;[ecc4] 6b ld h,d ;[ecc5] 62 ld e,a ;[ecc6] 5f ld d,b ;[ecc7] 50 ld c,b ;[ecc8] 48 jp l1e208 ;[ecc9] c3 b1 ec mpt15: ld a,(hl) ;[eccc] 7e inc hl ;[eccd] 23 ld ($fb02),a ;[ecce] 32 02 fb ret ;[ecd1] c9 mpt16: push af ;[ecd2] f5 xor a ;[ecd3] af ld ($fb02),a ;[ecd4] 32 02 fb pop af ;[ecd7] f1 ret ;[ecd8] c9 mpt17: ld ($fb00),a ;[ecd9] 32 00 fb pop af ;[ecdc] f1 ld ($fb00),a ;[ecdd] 32 00 fb ret ;[ece0] c9 l1e213: call l1e51 ;[ece1] cd 8c e3 call siand ;[ece4] cd 35 e3 jp l1e49 ;[ece7] c3 85 e3 l1e214: call l1e51 ;[ecea] cd 8c e3 call sior ;[eced] cd 4c e3 jp l1e49 ;[ecf0] c3 85 e3 l1e215: call l1e51 ;[ecf3] cd 8c e3 call sixor ;[ecf6] cd 63 e3 jp l1e49 ;[ecf9] c3 85 e3 l1e216: call xget ;[ecfc] cd 33 e1 cpl ;[ecff] 2f ret ;[ed00] c9 l1e217: call xget ;[ed01] cd 33 e1 igp10: ld e,a ;[ed04] 5f jp l1e52 ;[ed05] c3 8f e3 l1e219: call xstst ;[ed08] cd b2 e3 call z,l1e59 ;[ed0b] cc d6 e3 ret ;[ed0e] c9 IF MATH_AM9511 l1e220: push af ;[ed0f] f5 call zget ;[ed10] cd 6f e5 ENDIF gbc10: ld e,d ;[ed13] 5a ld d,c ;[ed14] 51 ld c,b ;[ed15] 48 ld b,a ;[ed16] 47 pop af ;[ed17] f1 ret ;[ed18] c9 IF MATH_AM9511 ziand: push af ;[ed19] f5 push bc ;[ed1a] c5 push de ;[ed1b] d5 push hl ;[ed1c] e5 call zigtp ;[ed1d] cd 4f ed call siand ;[ed20] cd 35 e3 jp zort1 ;[ed23] c3 3d ed zior: push af ;[ed26] f5 push bc ;[ed27] c5 push de ;[ed28] d5 push hl ;[ed29] e5 call zigtp ;[ed2a] cd 4f ed call sior ;[ed2d] cd 4c e3 jp zort1 ;[ed30] c3 3d ed zixor: push af ;[ed33] f5 push bc ;[ed34] c5 push de ;[ed35] d5 push hl ;[ed36] e5 call zigtp ;[ed37] cd 4f ed call sixor ;[ed3a] cd 63 e3 zort1: call zput ;[ed3d] cd 5f e5 jp fpexit ;[ed40] c3 4d c1 zinot: call zichs ;[ed43] cd 22 e5 push hl ;[ed46] e5 ld hl,fp_one ;[ed47] 21 20 c4 call ziadd ;[ed4a] cd f4 e4 pop hl ;[ed4d] e1 ret ;[ed4e] c9 zigtp: call zget ;[ed4f] cd 6f e5 jp igp10 ;[ed52] c3 04 ed zshr: push af ;[ed55] f5 push bc ;[ed56] c5 push de ;[ed57] d5 push hl ;[ed58] e5 call xstst ;[ed59] cd b2 e3 call z,zgbcde ;[ed5c] cc 7c ed call rshn ;[ed5f] cd 55 eb zrreg: ld a,b ;[ed62] 78 ld b,c ;[ed63] 41 ld c,d ;[ed64] 4a ld d,e ;[ed65] 53 call zput ;[ed66] cd 5f e5 jp fpexit ;[ed69] c3 4d c1 zshl: push af ;[ed6c] f5 push bc ;[ed6d] c5 push de ;[ed6e] d5 push hl ;[ed6f] e5 call xstst ;[ed70] cd b2 e3 call z,zgbcde ;[ed73] cc 7c ed call lshn ;[ed76] cd 39 eb jp zrreg ;[ed79] c3 62 ed zgbcde: push af ;[ed7c] f5 call zget ;[ed7d] cd 6f e5 jp gbc10 ;[ed80] c3 13 ed ENDIF l1e232: ld a,b ;[ed83] 78 or c ;[ed84] b1 or d ;[ed85] b2 or e ;[ed86] b3 ret ;[ed87] c9 l1e233: push af ;[ed88] f5 call m,l1e57 ;[ed89] fc c9 e3 pop af ;[ed8c] f1 or a ;[ed8d] b7 ret ;[ed8e] c9 l1e234: ld a,(fpac) ;[ed8f] 3a d5 00 ld b,a ;[ed92] 47 xor (hl) ;[ed93] ae ret ;[ed94] c9 IF MATH_AM9511 mfstat: call opi ;[ed95] cd 2d e5 defb $37 call opi ;[ed99] cd 2d e5 defb $38 ld a,($fb02) ret ;[eda0] c9 zpwr: call mfstat ;[eda1] cd 95 ed and $20 ;[eda4] e6 20 ret nz ;[eda6] c0 jp mpr14 ;[eda7] c3 ac e4 ENDIF xfadd: push af ;[edaa] f5 push bc ;[edab] c5 push de ;[edac] d5 push hl ;[edad] e5 call aadd ;[edae] cd 72 ea jp fpexit ;[edb1] c3 4d c1 ; FPT subtraction ; MACC = MACC - MEM ; ; Entry: hl points to fp number in memory ; Exit: all registers preserved xfsub: push af ;[edb4] f5 push bc ;[edb5] c5 push de ;[edb6] d5 push hl ;[edb7] e5 call asub ;[edb8] cd 6d ea jp fpexit ;[edbb] c3 4d c1 ;Part of exp exp_part2: ld a,d ;[efc9] 7a and $c0 ;[efca] e6 c0 jp nz,le68b ;[efcc] c2 8b e6 jp l1e121 ;[efcf] c3 94 e6 ;Part of exp l1e272: or h ;[eff9] b4 jp p,l1e123 ;[effa] f2 b8 e6 jp l1e122 ;[effd] c3 ad e6 SECTION rodata_fp_dai32 ; Constants for xexp (RODATA) l1e279: defb $7e, $80, $00, $00 ;FPT(1/8) l1e280: defb $7f, $c0, $00, $00 ;FPT(3/8) l1e281: defb $00, $a0, $00, $00 ;FPT(5/8) l1e282: defb $00, $e0, $00, $00 ;FPT(7/8) l1e283: defb $01, $8b, $95, $c2 ;2 ^(1/8) defb $01, $a5, $fe, $d7 ;2 ^(3/8) defb $01, $c5, $67, $2a ;2 ^(5/8) defb $01, $ea, $c0, $c7 ;2 ^(7/8) l1e287: defb $00, $ea, $c0, $c7 ;2 ^(-1/8) defb $00, $c5, $67, $2a ;2 ^(-3/8) defb $00, $a5, $fe, $d7 ;2 ^(-5/8) defb $00, $8b, $95, $c2 ;2 ^(-7/8) l1e291: defb $01, $b8, $aa, $3b ;1 / LN2 l1e292: defb $00, $b1, $72, $18 ;a1: LN2, -> 0.69314718057 defb $7e, $f4, $fd, $ef ;a2: ((LN2)^2)/2! -> 0.24022648580 defb $7c, $e3, $58, $46 ;a3: ((LN2)^3)/3! -> 0.055504105406 defb $7a, $9d, $a4, $b1 ;a4: ((LN2)^4)/4! -> 0.0096217389747 defb $77, $aa, $d1, $fe ;a5: ((LN2)^5)/5! -> 0.0013337729375 defb $00, $00 ;end of table ; Constants for xsqrt (RODATA) l1e275: defb $7f, $d2, $d0, $1c ;a1: 0.578125 defb $00, $99, $ee, $14 ;b1: 0.421875 l1e277: defb $00, $94, $00, $00 ;a2: 0.411744 defb $7f, $d8, $00, $00 ;b2: 0.601289 ; Constants for xatn fatc1: defb $7f, $e5, $c8, $fa ;a(1): PI/7 -> 0.4487978506 defb $7f, $f6, $90, $f3 ;b(1): TAN(a(1)) -> 0.4815746188 defb $00, $e5, $c8, $fa ;a(2): 2* PI/7 -> 0.8975979011 defb $01, $a0, $81, $c6 ;b(2): TAN(a(2)) -> 1.253960337 defb $01, $ac, $56, $bb ;a(3): 3* PI/7 -> 1.346396852 defb $03, $8c, $33, $7f ;b(3): TAN(a(3)) -> 4.381286272 fatpl: defb $ff, $aa, $aa, $2d ;Q1: ~-1/3 -> -0.333329573 defb $7e, $cc, $6e, $b3 ;Q2 ~1/5 -> 0.199641035 defb $fe, $86, $f1, $4f ;Q3 ~-1/7 -> -0.131779888 defb $00, $00 ;end of table fp_halfpi: defb $01, $c9, $0f, $db ; PI / 2 fp_quarter: defb $7f, $80, $00, $00 ; 0.25 fp_half: defb $00, $80, $00, $00 ; 0.5 l1e306: defb $03, $c9, $0f, $db ;a1: ~PI/2 -> 6.2831853 defb $86, $a5, $5d, $e2 ;a2: ~-(PI*2)^3/3! -> -41.341681 defb $07, $a3, $34, $7b ;a3: ~(PI*2)^5/5! -> 81.602481 defb $87, $99, $29, $9e ;a4: ~-(PI*2)^7/7! -> -76.581285 defb $06, $9f, $0a, $fb ;a5: ~(PI*2)^9/9! -> 39.760722 defb $00, $00 ;End of table fp_invln10: defb $7f, $de, $5b, $d9 ;1/ln(10) fp_tenth: defb $7d, $cc, $cc, $cd ;0.1 fp_zero: defb $00, $00, $00, $00 ;0 fp_one: defb $01, $80, $00, $00 ;1.0 (c462) fp_two: defb $02, $80, $00, $00 ;2.0 (c466) ; Data Constants for LN (RODATA) fp_ln2: defb $00, $b1, $72, $18 ;LN(2) l1e299: defb $02, $80, $00, $00 ;b1: 2.0 defb $00, $aa, $aa, $a9 ;b2: ~2/3 -> 0.666666564181 defb $7f, $cc, $cf, $45 ;b5: ~2/5 -> 0.400018840613 defb $7f, $91, $ae, $ab ;b7: ~2/7 -> 0.2845357266 defb $7e, $80, $00, $00 ;b9: ~2/9 -> 0.125 defb $00, $00 ;End of table SECTION bss_fp_dai32 error_vector: defw 0 ;0xd0 ___dai32_fpac: fpac: defb 0,0,0,0 ;0xd5-d8 sf: defb 0 ;0xd9 dp4: defb 0 ;0xda dp3: defb 0 ;0xdb dp2: defb 0 ;0xdc dp1: defb 0 ;0xdd expdf: defb 0 ;0xde fwork: defb 0,0 ;0xdf,e0 xphls: defb 0,0 ;0xe1,e2 decbuf: ;0xe3-f1 - number output buffer icbwk: ;0xe3-e6 - number input buffer f: xn: defb 0,0,0,0 ;0xe3-e6 p: xk: defb 0,0,0,0 ;0xe7-ea sum: defb 0,0,0,0 ;0xeb-ee rsign: ftwrk: fatzx: defb 0,0,0,0 ;0xef-f2 ; TODO: Decimal buffer
55.436155
110
0.21213
6516553b40da75e18d136254e12b6121f48598fe
2,089
asm
Assembly
Transynther/x86/_processed/NONE/_xt_sm_/i7-8650U_0xd2.log_1_900.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_sm_/i7-8650U_0xd2.log_1_900.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_sm_/i7-8650U_0xd2.log_1_900.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 %rax push %rdi lea addresses_D_ht+0xa453, %rdi nop nop and %r13, %r13 mov $0x6162636465666768, %r12 movq %r12, (%rdi) nop nop nop nop and %rax, %rax pop %rdi pop %rax pop %r13 pop %r12 ret .global s_faulty_load s_faulty_load: push %r14 push %r15 push %r8 push %r9 push %rcx push %rdi push %rdx // Store lea addresses_RW+0x1050b, %rdi nop nop nop inc %r9 mov $0x5152535455565758, %rcx movq %rcx, %xmm3 vmovups %ymm3, (%rdi) // Exception!!! nop nop nop mov (0), %rdi nop nop nop nop add %r14, %r14 // Store lea addresses_US+0x143, %r14 nop nop nop nop nop inc %r15 movb $0x51, (%r14) nop xor %rdx, %rdx // Store mov $0x2c1f590000000f4b, %rcx nop nop and $38162, %r14 mov $0x5152535455565758, %rdx movq %rdx, %xmm0 vmovups %ymm0, (%rcx) nop nop nop nop add %r15, %r15 // Load mov $0x7d25bc000000090b, %r9 nop nop nop nop nop cmp %r8, %r8 mov (%r9), %rcx add %rdx, %rdx // Faulty Load lea addresses_RW+0x1050b, %rcx dec %r9 mov (%rcx), %dx lea oracles, %r8 and $0xff, %rdx shlq $12, %rdx mov (%r8,%rdx,1), %rdx pop %rdx pop %rdi pop %rcx pop %r9 pop %r8 pop %r15 pop %r14 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_US', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'58': 1} 58 */
16.846774
123
0.638583
e1d294a84037ddfab2f14bfcd86470cdd2c39249
8,392
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_zr_/i7-8650U_0xd2_notsx.log_19435_560.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_zr_/i7-8650U_0xd2_notsx.log_19435_560.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_zr_/i7-8650U_0xd2_notsx.log_19435_560.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 %r8 push %r9 push %rax push %rbx push %rcx push %rdi push %rsi lea addresses_WC_ht+0x1139b, %rsi lea addresses_WC_ht+0x195db, %rdi nop nop nop and $3766, %r9 mov $74, %rcx rep movsw nop nop sub $16254, %r8 lea addresses_A_ht+0xa1ef, %r8 nop add %r9, %r9 movl $0x61626364, (%r8) nop lfence lea addresses_A_ht+0xaadb, %rsi nop nop nop nop nop and $60871, %rcx and $0xffffffffffffffc0, %rsi vmovntdqa (%rsi), %ymm6 vextracti128 $0, %ymm6, %xmm6 vpextrq $1, %xmm6, %rdi cmp %rcx, %rcx lea addresses_normal_ht+0x1d4db, %rax nop add %r10, %r10 movups (%rax), %xmm5 vpextrq $1, %xmm5, %r9 nop nop nop add %r9, %r9 lea addresses_normal_ht+0x1bb5b, %rsi lea addresses_WT_ht+0x1241b, %rdi nop nop dec %rbx mov $74, %rcx rep movsb nop nop nop nop and $2432, %r8 lea addresses_D_ht+0x1adb, %r10 nop sub %rsi, %rsi movb (%r10), %r8b nop nop dec %r9 lea addresses_A_ht+0xbaa1, %rsi clflush (%rsi) nop nop nop and $50859, %rcx mov (%rsi), %r8 nop nop nop inc %rcx pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r9 pop %r8 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r15 push %r9 push %rax push %rbp push %rbx // Store lea addresses_WC+0x192db, %r9 nop nop nop nop nop xor $54550, %rax mov $0x5152535455565758, %r11 movq %r11, %xmm5 vmovups %ymm5, (%r9) inc %r11 // Store lea addresses_PSE+0x18cdb, %r10 sub %rbp, %rbp movl $0x51525354, (%r10) nop nop nop cmp $53979, %r9 // Store lea addresses_UC+0x18703, %r10 nop nop nop nop nop dec %r15 movw $0x5152, (%r10) nop nop nop nop and $24462, %rbx // Store lea addresses_normal+0x1f63b, %r11 nop nop nop nop nop add $12363, %r10 movl $0x51525354, (%r11) nop nop nop nop and %rbp, %rbp // Store lea addresses_PSE+0x80db, %rax clflush (%rax) nop nop nop nop add %r11, %r11 movb $0x51, (%rax) inc %rax // Load lea addresses_WT+0xe7db, %r11 nop nop nop nop cmp %r15, %r15 mov (%r11), %ax nop nop nop nop nop add $30147, %r10 // Store lea addresses_D+0xaadb, %r9 lfence movw $0x5152, (%r9) nop nop nop xor $64484, %rbp // Store lea addresses_UC+0x10db, %r10 nop nop add $47911, %r15 movw $0x5152, (%r10) // Exception!!! nop nop mov (0), %r9 nop xor $23870, %r11 // Store lea addresses_D+0x1e35b, %r10 add %rbp, %rbp movw $0x5152, (%r10) nop nop nop add %r15, %r15 // Store lea addresses_UC+0x3e7b, %rax sub %r9, %r9 mov $0x5152535455565758, %r15 movq %r15, (%rax) nop nop nop nop nop inc %rbx // Store lea addresses_WC+0x1346f, %rbp clflush (%rbp) nop nop nop nop add %r9, %r9 movb $0x51, (%rbp) nop nop nop nop nop sub %rbp, %rbp // Faulty Load lea addresses_US+0xe8db, %r9 nop nop nop cmp %rax, %rax mov (%r9), %ebx lea oracles, %r10 and $0xff, %rbx shlq $12, %rbx mov (%r10,%rbx,1), %rbx pop %rbx pop %rbp pop %rax pop %r9 pop %r15 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 4, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 2, 'AVXalign': True, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 4, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 32, 'AVXalign': False, 'NT': True, 'congruent': 9, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 8, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': False}} {'00': 19435} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
29.445614
2,999
0.648832
98cb34f37c812fea270e93adf802b3b95371ea96
173
asm
Assembly
engine/engine/interrupt/implementation/handler/active-video/wait-for-start/ntsc.asm
neomura/atmega328p-cartridge
e7152425e5253cd4e513cad41dc03d306003e91e
[ "MIT" ]
null
null
null
engine/engine/interrupt/implementation/handler/active-video/wait-for-start/ntsc.asm
neomura/atmega328p-cartridge
e7152425e5253cd4e513cad41dc03d306003e91e
[ "MIT" ]
2
2021-04-17T09:31:24.000Z
2021-04-17T09:31:53.000Z
engine/engine/interrupt/implementation/handler/active-video/wait-for-start/ntsc.asm
neomura/atmega328p-cartridge
e7152425e5253cd4e513cad41dc03d306003e91e
[ "MIT" ]
null
null
null
; Delay an extra cycle if the alternative palette is selected. brtc interrupt_active_video_wait_for_start_palette_a dec r28 interrupt_active_video_wait_for_start_palette_a:
34.6
62
0.890173
d0b674365eb04af6909e524443b1dacc46359ada
440
asm
Assembly
programs/oeis/188/A188438.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/188/A188438.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/188/A188438.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A188438: Positions of 1 in A188436; complement of A188437. ; 8,16,21,29,37,42,50,55,63,71,76,84,92,97,105,110,118,126,131,139,144,152,160,165,173,181,186,194,199,207,215,220,228,236,241,249,254,262,270,275,283,288,296,304,309,317,325,330,338,343,351,359,364,372,377,385,393,398 add $0,1 mov $2,$0 seq $0,130568 ; Generalized Beatty sequence 1+2*floor(n*phi), which contains infinitely many primes. add $0,$2 mul $0,55 div $0,34 add $0,2
40
218
0.720455
601ff75345e1b547336f8022002c4269b3dc5364
2,029
asm
Assembly
maps/CherrygroveMart.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
28
2019-11-08T07:19:00.000Z
2021-12-20T10:17:54.000Z
maps/CherrygroveMart.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
13
2020-01-11T17:00:40.000Z
2021-09-14T01:27:38.000Z
maps/CherrygroveMart.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 CHERRYGROVEMART_CLERK const CHERRYGROVEMART_COOLTRAINER_M const CHERRYGROVEMART_YOUNGSTER CherrygroveMart_MapScripts: db 0 ; scene scripts db 0 ; callbacks CherrygroveMartClerkScript: opentext checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM iftrue .PokeBallsInStock pokemart MARTTYPE_STANDARD, MART_CHERRYGROVE closetext end .PokeBallsInStock: pokemart MARTTYPE_STANDARD, MART_CHERRYGROVE_DEX closetext end CherrygroveMartCooltrainerMScript: faceplayer opentext checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM iftrue .PokeBallsInStock writetext CherrygroveMartCooltrainerMText waitbutton closetext end .PokeBallsInStock: writetext CherrygroveMartCooltrainerMText_PokeBallsInStock waitbutton closetext end CherrygroveMartYoungsterScript: jumptextfaceplayer CherrygroveMartYoungsterText CherrygroveMartCooltrainerMText: text "They're fresh out" line "of # BALLS!" para "When will they get" line "more of them?" done CherrygroveMartCooltrainerMText_PokeBallsInStock: text "# BALLS are in" line "stock! Now I can" cont "catch #MON!" done CherrygroveMartYoungsterText: text "When I was walking" line "in the grass, a" para "bug #MON poi-" line "soned my #MON!" para "I just kept going," line "but then my" cont "#MON fainted." para "You should keep an" line "ANTIDOTE with you." done CherrygroveMart_MapEvents: db 0, 0 ; filler db 2 ; warp events warp_event 2, 7, CHERRYGROVE_CITY, 1 warp_event 3, 7, CHERRYGROVE_CITY, 1 db 0 ; coord events db 0 ; bg events db 3 ; object events object_event 1, 3, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CherrygroveMartClerkScript, -1 object_event 7, 6, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CherrygroveMartCooltrainerMScript, -1 object_event 2, 5, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CherrygroveMartYoungsterScript, -1
23.321839
153
0.792016
1287d92be1a605a9f0cb80f1829bb4e9ab814d96
589
asm
Assembly
programs/oeis/024/A024172.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/024/A024172.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/024/A024172.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A024172: Integer part of ((3rd elementary symmetric function of 1,2,..,n)/(2nd elementary symmetric function of 1,2,...,n)). ; 0,0,1,2,4,6,8,10,13,16,20,24,28,33,38,43,48,54,60,67,74,81,89,97,105,113,122,131,141,151,161,172,183,194,205,217,229,242,255,268,282,296,310,324,339,354,370,386,402,419,436,453,470,488,506,525,544,563,583,603,623,643,664,685,707,729,751,774,797,820,843,867,891,916,941,966,992,1018,1044,1070,1097,1124,1152,1180,1208,1237,1266,1295,1324,1354,1384,1415,1446,1477,1509,1541,1573,1605,1638,1671 mov $1,$0 add $1,3 mul $0,$1 div $1,3 sub $0,$1 sub $0,$1 div $0,6
53.545455
393
0.70798
ecdf5c7b3419711c85692e4106d53a9c340f8ab1
2,112
asm
Assembly
programs/oeis/158/A158629.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/158/A158629.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/158/A158629.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A158629: a(n) = 484*n^2 + 22. ; 22,506,1958,4378,7766,12122,17446,23738,30998,39226,48422,58586,69718,81818,94886,108922,123926,139898,156838,174746,193622,213466,234278,256058,278806,302522,327206,352858,379478,407066,435622,465146,495638,527098,559526,592922,627286,662618,698918,736186,774422,813626,853798,894938,937046,980122,1024166,1069178,1115158,1162106,1210022,1258906,1308758,1359578,1411366,1464122,1517846,1572538,1628198,1684826,1742422,1800986,1860518,1921018,1982486,2044922,2108326,2172698,2238038,2304346,2371622,2439866,2509078,2579258,2650406,2722522,2795606,2869658,2944678,3020666,3097622,3175546,3254438,3334298,3415126,3496922,3579686,3663418,3748118,3833786,3920422,4008026,4096598,4186138,4276646,4368122,4460566,4553978,4648358,4743706,4840022,4937306,5035558,5134778,5234966,5336122,5438246,5541338,5645398,5750426,5856422,5963386,6071318,6180218,6290086,6400922,6512726,6625498,6739238,6853946,6969622,7086266,7203878,7322458,7442006,7562522,7684006,7806458,7929878,8054266,8179622,8305946,8433238,8561498,8690726,8820922,8952086,9084218,9217318,9351386,9486422,9622426,9759398,9897338,10036246,10176122,10316966,10458778,10601558,10745306,10890022,11035706,11182358,11329978,11478566,11628122,11778646,11930138,12082598,12236026,12390422,12545786,12702118,12859418,13017686,13176922,13337126,13498298,13660438,13823546,13987622,14152666,14318678,14485658,14653606,14822522,14992406,15163258,15335078,15507866,15681622,15856346,16032038,16208698,16386326,16564922,16744486,16925018,17106518,17288986,17472422,17656826,17842198,18028538,18215846,18404122,18593366,18783578,18974758,19166906,19360022,19554106,19749158,19945178,20142166,20340122,20539046,20738938,20939798,21141626,21344422,21548186,21752918,21958618,22165286,22372922,22581526,22791098,23001638,23213146,23425622,23639066,23853478,24068858,24285206,24502522,24720806,24940058,25160278,25381466,25603622,25826746,26050838,26275898,26501926,26728922,26956886,27185818,27415718,27646586,27878422,28111226,28344998,28579738,28815446,29052122,29289766,29528378,29767958,30008506 mov $1,$0 pow $1,2 mul $1,484 add $1,22
264
2,038
0.864583
b38ccb7e933c5ee915eb0701d350591742f4d7ad
153
asm
Assembly
ramdisk/ramdisk_header.asm
Tangent-Project/Tangent-OS
102c1a32b2ab7e676c6721f0aa831c0d7dd942be
[ "MIT" ]
6
2022-01-06T11:12:35.000Z
2022-01-12T17:43:40.000Z
ramdisk/ramdisk_header.asm
Andrej123456789/Tangent-Kernel
3b2e8bd3ffc4ecba7a90494e87a57aa50880eee0
[ "MIT" ]
null
null
null
ramdisk/ramdisk_header.asm
Andrej123456789/Tangent-Kernel
3b2e8bd3ffc4ecba7a90494e87a57aa50880eee0
[ "MIT" ]
null
null
null
SECTION .ramdisk global ramdisk_start ramdisk_start db '',0x0 db 0x0 db 0x0 db 0x1 db 0x0 db 0x0 db 0x1 db '@' db '*' db '!' incbin "ramdisk"
11.769231
24
0.653595
6daf4f67ed3081cddad045e8a3c4c8eebaa76ab7
644
asm
Assembly
programs/oeis/094/A094258.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/094/A094258.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/094/A094258.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A094258: a(1) = 1, a(n+1) = n*n! for n >= 1. ; 1,1,4,18,96,600,4320,35280,322560,3265920,36288000,439084800,5748019200,80951270400,1220496076800,19615115520000,334764638208000,6046686277632000,115242726703104000,2311256907767808000,48658040163532800000,1072909785605898240000,24728016011107368960000,594596384994354462720000,14890761641597746544640000,387780251083274649600000000,10485577989291746525184000000,293999475161295508340736000000,8536873649127988094042112000000,256411097818451356681764864000000,7957585794365731759089254400000000,254907998279515607349492449280000000 mov $2,$0 lpb $2 mul $0,$2 sub $2,1 lpe trn $0,1 add $0,1
58.545455
533
0.857143
a3d326a08e79d648acf838dc04a846470037208a
333
asm
Assembly
programs/oeis/258/A258198.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/258/A258198.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/258/A258198.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A258198: a(n) = largest k for which A001563(k) = k*k! <= n. ; 0,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4 lpb $0 add $0,$1 add $1,1 div $0,$1 sub $0,$1 lpe mov $0,$1
30.272727
201
0.504505
54d74fe5f5772cb1a5743e78bb4ec506d8faf575
442
asm
Assembly
joystick.asm
bsutherland/c64lib
881d47166a01e3988a43f571c5eab9673a367289
[ "MIT" ]
1
2021-02-02T15:20:38.000Z
2021-02-02T15:20:38.000Z
joystick.asm
bsutherland/c64lib
881d47166a01e3988a43f571c5eab9673a367289
[ "MIT" ]
null
null
null
joystick.asm
bsutherland/c64lib
881d47166a01e3988a43f571c5eab9673a367289
[ "MIT" ]
1
2021-03-24T08:36:05.000Z
2021-03-24T08:36:05.000Z
#importonce #import "cia.asm" // confusingly, joystick 1 is on port B .const JOYSTICK1_PORT = CIA_PORT_B .const JOYSTICK1_DDR = CIA_DDR_PORT_B // joystick 2 is on port A .const JOYSTICK2_PORT = CIA_PORT_A .const JOYSTICK2_DDR = CIA_DDR_PORT_A // bitmasks for joystick switches .const JOYSTICK_UP = $01 .const JOYSTICK_DOWN = $02 .const JOYSTICK_LEFT = $04 .const JOYSTICK_RIGHT = $08 .const JOYSTICK_FIRE = $10 .const JOYSTICK_MASK = $1f
22.1
39
0.762443
b75cbe8402786218de55f180375c63b85d991960
6,310
asm
Assembly
modules/simpleRender/SimpleRender.asm
jaredwhitney/os3
05e0cda4670da093cc720d0dccbfeb29e788fa0f
[ "MIT" ]
5
2015-02-25T01:28:09.000Z
2021-05-22T09:03:04.000Z
modules/simpleRender/SimpleRender.asm
jaredwhitney/os3
05e0cda4670da093cc720d0dccbfeb29e788fa0f
[ "MIT" ]
38
2015-02-10T18:37:11.000Z
2017-10-03T03:08:50.000Z
modules/simpleRender/SimpleRender.asm
jaredwhitney/os3
05e0cda4670da093cc720d0dccbfeb29e788fa0f
[ "MIT" ]
2
2016-05-06T22:48:46.000Z
2017-01-12T19:28:49.000Z
Point2D_x equ 0 Point2D_y equ 4 Point_x equ 0 Point_y equ 4 Point_z equ 8 SimpleRender.init : pusha push dword SimpleRender.COMMAND_RUN call iConsole2.RegisterCommand popa ret SimpleRender.trinumber : dd 0x8 SimpleRender.tridata : dd -100, -100, 500 ; tri 1 dd 100, -100, 500 dd -100, 100, 500 dd 100, -100, 500 ; tri 2 dd -100, 100, 500 dd 100, 100, 500 dd -100, -100, 500 dd -100, 100, 500 dd -100, -100, 700 dd -100, 100, 500 dd -100, 100, 700 dd -100, -100, 700 dd 100, -100, 500 dd 100, 100, 500 dd 100, -100, 700 dd 100, 100, 500 dd 100, 100, 700 dd 100, -100, 700 dd -100, -100, 700 dd 100, -100, 700 dd 100, 100, 700 dd -100, -100, 700 dd -100, 100, 700 dd 100, 100, 700 SimpleRender.TRI_SIZE equ SimpleRender.POINT_SIZE*3 SimpleRender.POINT_SIZE equ 4*3 SimpleRender.drawTri : times 2*3 dd 0x0 SimpleRender.currentTri : dd SimpleRender.tridata SimpleRender.newPoint : times 3 dd 0x0 SimpleRender.window : dd 0x0 SimpleRender.image : dd 0x0 SimpleRender.tempZ : dd 0x0 SimpleRender.mxacc : dd 0 SimpleRender.mxaccf : times 2 dd 0x0 SimpleRender.lockMouse : dd FALSE SimpleRender.STR_SIMPLERENDER : db "3dengine", 0x0 SimpleRender.COMMAND_RUN : dd SimpleRender.STR_SIMPLERENDER dd SimpleRender.main dd null SimpleRender.main : pusha push dword .STR_TITLE push dword 0*4 push dword 0 push dword 400*4 push dword 400 call WinMan.CreateWindow;Dolphin2.makeWindow mov [SimpleRender.window], ecx mov ebx, 400*400*4 call ProgramManager.reserveMemory mov [SimpleRender.image], ebx push ebx push dword 400*4 push dword 400 push dword 0*4 push dword 0 push dword 400*4 push dword 400 call Image.Create mov ebx, [SimpleRender.window] mov eax, ecx call Grouping.Add ;mov [Dolphin2.focusedComponent], ecx mov dword [ecx+Component_keyHandlerFunc], SimpleRender.keyFunc mov eax, [SimpleRender.image] mov ebx, 400 mov ecx, 400 call L3gxImage.FromBuffer mov [SimpleRender.ximage], ecx push dword SimpleRender.TASK_MAINLOOP call iConsole2.RegisterTask mov eax, SimpleRender.exit mov ebx, [SimpleRender.window] call WindowGrouping.RegisterCloseCallback popa ret .STR_TITLE : db "SimpleRender v2", 0 SimpleRender.ximage : dd 0x0 SimpleRender.keyFunc : xor dword [SimpleRender.lockMouse], TRUE cmp dword [SimpleRender.lockMouse], TRUE jne .aret mov dword [Mouse.cursor], Mouse.CURSOR_TRANSPARENT jmp .ret .aret : mov dword [Mouse.cursor], Mouse.CURSOR_DEFAULT .ret : ret SimpleRender.exit : pusha push dword SimpleRender.TASK_MAINLOOP call iConsole2.UnregisterTask popa ret SimpleRender.TASK_MAINLOOP : dd SimpleRender.loop dd null SimpleRender.loop : pusha cmp dword [SimpleRender.lockMouse], TRUE jne .dontUseMouse mov eax, [Mouse.x] mov ebx, [Graphics.SCREEN_WIDTH] shr ebx, 2 ; /4 to get in pixels shr ebx, 1 ; /2 to get center of width sub eax, ebx add [SimpleRender.mxacc], eax ;add dword [SimpleRender.mxacc], 20 mov [Mouse_xsum], ebx ;mov [Mouse_ysum], .dontUseMouse : ; repaint the thing! mov eax, [SimpleRender.image] mov ebx, 400*400*4 call Buffer.clear fild dword [SimpleRender.mxacc] fdiv dword [.f500] fstp dword [SimpleRender.mxaccf] mov dword [SimpleRender.currentTri], SimpleRender.tridata mov edx, [SimpleRender.trinumber] .loop : call SimpleRender.goDrawTri add dword [SimpleRender.currentTri], SimpleRender.TRI_SIZE dec edx cmp edx, 0x0 jg .loop popa ret SimpleRender.goDrawTri : push edx xor ecx, ecx mov [SimpleRender.loop.count], ecx .loop : mov eax, [SimpleRender.currentTri] mov ecx, [SimpleRender.loop.count] imul ecx, 4*3 add eax, ecx mov [SimpleRender.triS], eax mov ebx, SimpleRender.drawTri mov ecx, [SimpleRender.loop.count] imul ecx, 4*2 add ebx, ecx mov [SimpleRender.drawTriS], eax ; r0y mov ebx, [SimpleRender.triS] mov ecx, SimpleRender.newPoint mov edx, [ebx+Point_z] sub edx, 600 mov [SimpleRender.tempZ], edx fld dword [SimpleRender.mxaccf] fcos fimul dword [ebx+Point_x] fstp dword [.fstor0] fld dword [SimpleRender.mxaccf] fsin fimul dword [SimpleRender.tempZ] fsub dword [.fstor0] fistp dword [ecx+Point_x] fld dword [SimpleRender.mxaccf] fsin fimul dword [ebx+Point_x] fstp dword [.fstor0] fld dword [SimpleRender.mxaccf] fcos fimul dword [SimpleRender.tempZ] fadd dword [.fstor0] fistp dword [ecx+Point_z] add dword [ecx+Point_z], 600 mov eax, [ebx+Point_y] mov [ecx+Point_y], eax .nor0y : mov edx, SimpleRender.newPoint mov eax, [edx+Point_x] mov ebx, [edx+Point_z] call SimpleRender.p_func add ecx, 200 mov [.u], ecx mov eax, [edx+Point_y] mov ebx, [edx+Point_z] call SimpleRender.p_func add ecx, 200 mov [.v], ecx cmp dword [SimpleRender.loop.count], 0 jne .goon mov eax, [.u] mov [.u0], eax mov eax, [.v] mov [.v0], eax jmp .noDraw .goon : push dword [SimpleRender.ximage] push dword [.u] push dword [.v] push dword [.ul] push dword [.vl] call SimpleRender.drawLine cmp dword [SimpleRender.loop.count], 2 jne .noDraw push dword [SimpleRender.ximage] push dword [.u] push dword [.v] push dword [.u0] push dword [.v0] call SimpleRender.drawLine .noDraw : mov eax, [.u] mov [.ul], eax mov eax, [.v] mov [.vl], eax inc dword [SimpleRender.loop.count] cmp dword [SimpleRender.loop.count], 3 jl .loop pop edx ret .u : dd 0x0 .v : dd 0x0 .u0 : dd 0x0 .v0 : dd 0x0 .ul : dd 0x0 .vl : dd 0x0 .fstor0 : dd 0x0 SimpleRender.triS : dd 0x0 SimpleRender.drawTriS : dd 0x0 SimpleRender.loop.count : dd 0x0 SimpleRender.loop.f500 : dd 500. SimpleRender.p_func : push eax push ebx push edx xor ecx, ecx cmp ebx, 0 jle .ret mov [.zstor], ebx mov [.astor], eax fild dword [.zstor] fdiv dword [.f80] fstp dword [.zdstor] fild dword [.astor] fdiv dword [.zdstor] fistp dword [.rstor] mov ecx, [.rstor] .ret : pop edx pop ebx pop eax ret .zstor : dd 0x0 .astor : dd 0x0 .zdstor : dd 0x0 .rstor : dd 0x0 .f80 : dd 160. %include "../modules/simpleRender/lineFunc.asm"
17.67507
64
0.677655
ce7085c4f8aada61731e0d8df4108a6c75d7cc24
7,009
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1692.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1692.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1692.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 %rbx push %rcx push %rdi push %rsi lea addresses_WT_ht+0x1d6fe, %rsi lea addresses_D_ht+0x15dfe, %rdi nop nop xor $20371, %r12 mov $113, %rcx rep movsb nop nop dec %r12 lea addresses_WC_ht+0x18cfe, %rsi lea addresses_normal_ht+0x1a16e, %rdi nop nop nop nop nop xor $17700, %rbx mov $43, %rcx rep movsq and $51073, %r12 lea addresses_WT_ht+0x1505e, %rsi lea addresses_WT_ht+0xfebe, %rdi nop nop nop nop and %r8, %r8 mov $122, %rcx rep movsw nop add %rdi, %rdi lea addresses_A_ht+0xf1fe, %rsi lea addresses_A_ht+0x1dafe, %rdi nop nop nop nop inc %r11 mov $23, %rcx rep movsq nop nop and $11666, %r8 lea addresses_A_ht+0x1bafe, %r11 nop xor %r12, %r12 mov $0x6162636465666768, %rsi movq %rsi, %xmm0 movups %xmm0, (%r11) nop nop nop nop xor $48391, %rcx lea addresses_normal_ht+0x14cfe, %r8 nop nop inc %r12 and $0xffffffffffffffc0, %r8 movntdqa (%r8), %xmm3 vpextrq $1, %xmm3, %rcx nop nop nop nop nop add %r12, %r12 lea addresses_WC_ht+0x1ddbe, %r12 nop nop nop and $25545, %rcx mov $0x6162636465666768, %r8 movq %r8, %xmm2 vmovups %ymm2, (%r12) nop nop nop nop nop sub $53479, %r12 lea addresses_A_ht+0xa6de, %r11 nop nop nop nop nop add $40392, %r12 movb $0x61, (%r11) nop sub %r8, %r8 lea addresses_normal_ht+0x180ba, %r11 and %r8, %r8 movb $0x61, (%r11) add $6758, %rcx lea addresses_normal_ht+0x136fe, %r12 nop nop nop nop xor %rsi, %rsi movb $0x61, (%r12) nop nop nop nop sub %rbx, %rbx pop %rsi pop %rdi pop %rcx pop %rbx pop %r8 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r14 push %r8 push %r9 push %rdx // Store lea addresses_WT+0x5e3e, %r11 nop nop inc %rdx movw $0x5152, (%r11) nop nop add %r12, %r12 // Store lea addresses_PSE+0x16fe, %r8 nop nop xor %r14, %r14 movw $0x5152, (%r8) nop nop xor $54736, %r10 // Faulty Load lea addresses_UC+0x12fe, %rdx nop nop nop add %r11, %r11 mov (%rdx), %r14w lea oracles, %r12 and $0xff, %r14 shlq $12, %r14 mov (%r12,%r14,1), %r14 pop %rdx pop %r9 pop %r8 pop %r14 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC', 'NT': False, 'AVXalign': True, 'size': 32, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 5}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 7}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_UC', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'same': False, 'congruent': 9, 'type': 'addresses_WT_ht'}, 'dst': {'same': True, 'congruent': 8, 'type': 'addresses_D_ht'}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 9, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 1, 'type': 'addresses_normal_ht'}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 6, 'type': 'addresses_WT_ht'}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_A_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 10}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': True, 'AVXalign': False, 'size': 16, 'congruent': 9}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 6}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 4}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': True, 'AVXalign': False, 'size': 1, 'congruent': 2}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': True, 'size': 1, 'congruent': 7}} {'37': 21829} 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 */
35.221106
2,999
0.658439
d9acf091d42d71428d1cda2c8e0383e61f6eda01
2,222
asm
Assembly
programs/oeis/006/A006522.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/006/A006522.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/006/A006522.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A006522: 4-dimensional analog of centered polygonal numbers. Also number of regions created by sides and diagonals of a convex n-gon in general position. ; 1,0,0,1,4,11,25,50,91,154,246,375,550,781,1079,1456,1925,2500,3196,4029,5016,6175,7525,9086,10879,12926,15250,17875,20826,24129,27811,31900,36425,41416,46904,52921,59500,66675,74481,82954,92131,102050,112750,124271,136654,149941,164175,179400,195661,213004,231476,251125,272000,294151,317629,342486,368775,396550,425866,456779,489346,523625,559675,597556,637329,679056,722800,768625,816596,866779,919241,974050,1031275,1090986,1153254,1218151,1285750,1356125,1429351,1505504,1584661,1666900,1752300,1840941,1932904,2028271,2127125,2229550,2335631,2445454,2559106,2676675,2798250,2923921,3053779,3187916,3326425,3469400,3616936,3769129,3926076,4087875,4254625,4426426,4603379,4785586,4973150,5166175,5364766,5569029,5779071,5995000,6216925,6444956,6679204,6919781,7166800,7420375,7680621,7947654,8221591,8502550,8790650,9086011,9388754,9699001,10016875,10342500,10676001,11017504,11367136,11725025,12091300,12466091,12849529,13241746,13642875,14053050,14472406,14901079,15339206,15786925,16244375,16711696,17189029,17676516,18174300,18682525,19201336,19730879,20271301,20822750,21385375,21959326,22544754,23141811,23750650,24371425,25004291,25649404,26306921,26977000,27659800,28355481,29064204,29786131,30521425,31270250,32032771,32809154,33599566,34404175,35223150,36056661,36904879,37767976,38646125,39539500,40448276,41372629,42312736,43268775,44240925,45229366,46234279,47255846,48294250,49349675,50422306,51512329,52619931,53745300,54888625,56050096,57229904,58428241,59645300,60881275,62136361,63410754,64704651,66018250,67351750,68705351,70079254,71473661,72888775,74324800,75781941,77260404,78760396,80282125,81825800,83391631,84979829,86590606,88224175,89880750,91560546,93263779,94990666,96741425,98516275,100315436,102139129,103987576,105861000,107759625,109683676,111633379,113608961,115610650,117638675,119693266,121774654,123883071,126018750,128181925,130372831,132591704,134838781,137114300,139418500,141751621,144113904,146505591,148926925,151378150,153859511,156371254 mov $2,$0 mov $3,$0 bin $0,2 sub $2,1 bin $3,4 sub $3,$2 add $0,$3 mov $1,$0
185.166667
1,987
0.855986
390ee3d1370e2621325c8b3f5e198a240624ea52
343
asm
Assembly
oeis/021/A021961.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/021/A021961.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/021/A021961.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A021961: Decimal expansion of 1/957. ; Submitted by Jamie Morken(s3) ; 0,0,1,0,4,4,9,3,2,0,7,9,4,1,4,8,3,8,0,3,5,5,2,7,6,9,0,7,0,0,1,0,4,4,9,3,2,0,7,9,4,1,4,8,3,8,0,3,5,5,2,7,6,9,0,7,0,0,1,0,4,4,9,3,2,0,7,9,4,1,4,8,3,8,0,3,5,5,2,7,6,9,0,7,0,0,1,0,4,4,9,3,2,0,7,9,4,1,4 add $0,2 mov $1,10 pow $1,$0 mul $1,2 div $1,19140 mov $0,$1 mod $0,10
28.583333
199
0.562682
69ef4bff43d4a928ac0eaef67a9f3aa489d75875
370
asm
Assembly
programs/oeis/130/A130053.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/130/A130053.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/130/A130053.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A130053: G.f. A(x) = (1-x+x^2)/(1-x)^3 - x*[Sum_{n>=0} x^(n + 2^n)]/(1-x)^2 . ; 1,2,3,5,7,10,14,18,23,29,36,44,52,61,71,82,94,107,121,136,152,168,185,203,222,242,263,285,308,332,357,383,410,438,467,497,528,560,592,625,659,694,730,767,805,844,884,925,967,1010,1054,1099,1145,1192,1240,1289 mov $1,1 lpb $0 mul $1,2 trn $2,$0 sub $0,1 sub $1,$2 mov $2,$1 lpe
30.833333
210
0.6
bfeeba8f21e9de0f4ef655bc0cee27f4686346be
1,261
asm
Assembly
programs/oeis/020/A020655.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/020/A020655.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/020/A020655.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A020655: Lexicographically earliest increasing sequence of positive numbers that contains no arithmetic progression of length 5. ; 1,2,3,4,6,7,8,9,11,12,13,14,16,17,18,19,26,27,28,29,31,32,33,34,36,37,38,39,41,42,43,44,51,52,53,54,56,57,58,59,61,62,63,64,66,67,68,69,76,77,78,79,81,82,83,84,86,87,88,89,91,92,93,94,126,127,128,129,131,132,133,134,136,137,138,139,141,142,143,144,151,152,153,154,156,157,158,159,161,162,163,164,166,167,168,169,176,177,178,179,181,182,183,184,186,187,188,189,191,192,193,194,201,202,203,204,206,207,208,209,211,212,213,214,216,217,218,219,251,252,253,254,256,257,258,259,261,262,263,264,266,267,268,269,276,277,278,279,281,282,283,284,286,287,288,289,291,292,293,294,301,302,303,304,306,307,308,309,311,312,313,314,316,317,318,319,326,327,328,329,331,332,333,334,336,337,338,339,341,342,343,344,376,377,378,379,381,382,383,384,386,387,388,389,391,392,393,394,401,402,403,404,406,407,408,409,411,412,413,414,416,417,418,419,426,427,428,429,431,432,433,434,436,437,438,439,441,442,443,444,451,452,453,454,456,457,458,459,461,462 mov $6,$0 add $6,1 lpb $6 mov $0,$5 sub $6,1 sub $0,$6 sub $0,$2 add $2,$0 mov $3,$2 mov $4,2 lpb $3 dif $3,4 mul $4,5 lpe mov $7,$4 div $7,8 add $7,1 add $1,$7 lpe
54.826087
929
0.696273
d497eff22c75e9b5e6dbf83eb8b716edf03a67cb
682
asm
Assembly
oeis/189/A189735.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/189/A189735.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/189/A189735.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A189735: a(1)=3, a(2)=1, a(n) = 3*a(n-1) + a(n-2). ; Submitted by Jamie Morken(s4) ; 3,1,6,19,63,208,687,2269,7494,24751,81747,269992,891723,2945161,9727206,32126779,106107543,350449408,1157455767,3822816709,12625905894,41700534391,137727509067,454883061592,1502376693843,4962013143121,16388416123206,54127261512739,178770200661423,590437863497008,1950083791152447,6440689236954349,21272151502015494,70257143743000831,232043582731017987,766387891936054792,2531207258539182363,8360009667553601881,27611236261199988006,91193718451153565899,301192391614660685703,994770893295135623008 mov $1,3 mov $3,1 lpb $0 sub $0,1 mov $2,$3 mul $3,3 add $3,$1 mov $1,$2 lpe mov $0,$1
45.466667
498
0.803519
f0b4ee1a9f0e1cc2cdff35f03684a742356925ff
400
asm
Assembly
oeis/037/A037528.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/037/A037528.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/037/A037528.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A037528: Base-3 digits are, in order, the first n terms of the periodic sequence with initial period 1,1,2. ; Submitted by Jamie Morken(s2.) ; 1,4,14,43,130,392,1177,3532,10598,31795,95386,286160,858481,2575444,7726334,23179003,69537010,208611032,625833097,1877499292,5632497878,16897493635,50692480906,152077442720,456232328161 mov $1,3 pow $1,$0 sub $1,1 mul $1,42 add $1,28 div $1,26 mov $0,$1
33.333333
187
0.765
4e29137db147a2b9245361edefa726cd2f37df79
777
asm
Assembly
test/test_nasm.asm
huhong789/shortcut
bce8a64c4d99b3dca72ffa0a04c9f3485cbab13a
[ "BSD-2-Clause" ]
3
2019-10-31T01:49:48.000Z
2021-10-16T09:36:17.000Z
test/test_nasm.asm
shortcut-sosp19/shortcut
f0ff3d9170dbc6de38e0d8c200db056aa26b9c48
[ "BSD-2-Clause" ]
1
2020-06-30T18:01:37.000Z
2020-06-30T18:01:37.000Z
test/test_nasm.asm
shortcut-sosp19/shortcut
f0ff3d9170dbc6de38e0d8c200db056aa26b9c48
[ "BSD-2-Clause" ]
2
2020-06-29T20:29:24.000Z
2021-10-16T12:42:11.000Z
section .text global _start ;must be declared for linker (ld) _start: ;tell linker entry point mov edx,9 ;message length mov ecx, name ;message to write mov ebx,1 ;file descriptor (stdout) mov eax,4 ;system call number (sys_write) int 0x80 ;call kernel mov [name], dword ' Not' ; Changed the name mov ecx, 100 mov dword [esp+0x68], ecx ;mov dword ds:[0x68], ecx NOT SUPPORTED mov edx,8 ;message length mov ecx,name ;message to write mov ebx,1 ;file descriptor (stdout) mov eax,4 ;system call number (sys_write) int 0x80 ;call kernel mov eax,1 ;system call number (sys_exit) int 0x80 ;call kernel section .data name db 'Have fun'
28.777778
54
0.606178
c09801af9bfaa08df7b2904ef21afc6e97905ec5
630
asm
Assembly
oeis/087/A087463.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/087/A087463.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/087/A087463.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A087463: Generalized multiplicative Jacobsthal sequence. ; Submitted by Jon Maiga ; 0,1,1,0,5,11,0,43,85,0,341,683,0,2731,5461,0,21845,43691,0,174763,349525,0,1398101,2796203,0,11184811,22369621,0,89478485,178956971,0,715827883,1431655765,0,5726623061,11453246123,0,45812984491,91625968981,0,366503875925,733007751851,0,2932031007403,5864062014805,0,23456248059221,46912496118443,0,187649984473771,375299968947541,0,1501199875790165,3002399751580331,0,12009599006321323,24019198012642645,0,96076792050570581,192153584101141163,0,768614336404564651,1537228672809129301,0 dif $0,-3 mov $1,2 pow $1,$0 add $1,1 div $1,3 mov $0,$1
57.272727
487
0.826984
2f61f512307226e09bd23dee7f18134d1b224343
659
asm
Assembly
oeis/138/A138418.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/138/A138418.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/138/A138418.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A138418: a(n) = ((n-th prime)^4-(n-th prime)^2)/2. ; Submitted by Jon Maiga ; 6,36,300,1176,7260,14196,41616,64980,139656,353220,461280,936396,1412040,1708476,2438736,3943836,6056940,6921060,10073316,12703320,14196456,19471920,23725716,31367160,44259936,52025100,56270136,65534076,70573140,81517296,130064256,147241380,176128296,186640860,246431100,259931400,303774276,352942596,388884216,447857556,513296820,536625180,665413440,693725376,753049836,784099800,991037460,1236461856,1327593156,1375003020,1473620616,1631375760,1686672240,1984531500,2181202176,2392140696 seq $0,40 ; The prime numbers. pow $0,2 mov $1,$0 pow $1,2 sub $1,$0 mov $0,$1 div $0,2
54.916667
491
0.807284
f4b6c984176e2fc65951df06078c4265878c465a
5,929
asm
Assembly
texmap/tmap_sky.asm
osgcc/descent-pc
819ed672e9fde6eddea634154306c5154230b84d
[ "Unlicense" ]
3
2016-03-22T12:32:01.000Z
2017-11-07T12:14:28.000Z
texmap/tmap_sky.asm
osgcc/descent-pc
819ed672e9fde6eddea634154306c5154230b84d
[ "Unlicense" ]
null
null
null
texmap/tmap_sky.asm
osgcc/descent-pc
819ed672e9fde6eddea634154306c5154230b84d
[ "Unlicense" ]
1
2021-03-30T07:34:36.000Z
2021-03-30T07:34:36.000Z
;THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX ;SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO ;END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A ;ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS ;IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS ;SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE ;FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE ;CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS ;AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. ;COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. ; ; $Source: f:/miner/source/texmap/rcs/tmap_sky.asm $ ; $Revision: 1.5 $ ; $Author: mike $ ; $Date: 1994/11/30 00:57:04 $ ; ; Sky texture mapper. ; ; $Log: tmap_sky.asm $ ; Revision 1.5 1994/11/30 00:57:04 mike ; optimization. ; ; Revision 1.4 1994/11/12 16:41:14 mike ; jae -> ja. ; ; Revision 1.3 1994/03/25 17:08:48 matt ; Attempt to make this code work on wide windows, but I don't think ; it did. ; ; Revision 1.2 1994/01/18 10:49:54 mike ; Modified linear texture mapper for sky plotting. ; ; Revision 1.1 1994/01/14 15:07:03 mike ; Initial revision ; ; DEBUG_ON = 1 .386 option oldstructs .nolist include psmacros.inc .list public asm_tmap_scanline_lin_sky_ include tmap_inc.asm width_log_2 equ 10 height_log_2 equ 7 big_num_iters equ num_iters*2 _DATA SEGMENT DWORD PUBLIC USE32 'DATA' extd _fx_u extd _fx_v extd _fx_du_dx extd _fx_dv_dx extd _fx_y extd _fx_xleft extd _fx_xright extd _pixptr extd _x extd _loop_count _DATA ENDS DGROUP GROUP _DATA _TEXT SEGMENT PARA PUBLIC USE32 'CODE' ASSUME DS:_DATA ASSUME CS:_TEXT ; -------------------------------------------------------------------------------------------------- ; Enter: ; _xleft fixed point left x coordinate ; _xright fixed point right x coordinate ; _y fixed point y coordinate ; _pixptr address of source pixel map ; _u fixed point initial u coordinate ; _v fixed point initial v coordinate ; _du_dx fixed point du/dx ; _dv_dx fixed point dv/dx ; for (x = (int) xleft; x <= (int) xright; x++) { ; _setcolor(read_pixel_from_tmap(srcb,((int) (u/z)) & 63,((int) (v/z)) & 63)); ; _setpixel(x,y); ; ; u += du_dx; ; v += dv_dx; ; z += dz_dx; ; } align 4 asm_tmap_scanline_lin_sky_: pusha ; Setup for loop: _loop_count iterations = (int) xright - (int) xleft ; esi source pixel pointer = pixptr ; edi initial row pointer = y*320+x ; set esi = pointer to start of texture map data mov esi,_pixptr ; set edi = address of first pixel to modify mov edi,_fx_y cmp edi,_window_bottom ja _none_to_do imul edi,_bytes_per_row mov eax,_fx_xleft sar eax,16 jns eax_ok sub eax,eax eax_ok: add edi,eax add edi,write_buffer ; set _loop_count = # of iterations mov eax,_fx_xright sar eax,16 cmp eax,_window_right jb eax_ok1 mov eax,_window_right eax_ok1: cmp eax,_window_left ja eax_ok2 mov eax,_window_left eax_ok2: mov ebx,_fx_xleft sar ebx,16 sub eax,ebx js _none_to_do cmp eax,_window_width jbe _ok_to_do mov eax,_window_width _ok_to_do: mov _loop_count,eax ; edi destination pixel pointer mov ebx,_fx_u mov ecx,_fx_du_dx mov edx,_fx_dv_dx mov ebp,_fx_v shl ebx,16-width_log_2 shl ebp,16-height_log_2 shl edx,16-height_log_2 shl ecx,16-width_log_2 ; eax work ; ebx u ; ecx du_dx ; edx dv_dx ; ebp v ; esi read address ; edi write address _size = (_end1 - _start1)/big_num_iters mov eax,big_num_iters-1 sub eax,_loop_count jns j_eax_ok1 inc eax ; sort of a hack, but we can get -1 here and want to be graceful jns j_eax_ok1 ; if we jump, we had -1, which is kind of ok, if not, we int 3 int 3 ; oops, going to jump behind _start1, very bad... sub eax,eax ; ok to continue j_eax_ok1: imul eax,eax,dword ptr _size add eax,offset _start1 jmp eax align 4 _start1: ; "OPTIMIZATIONS" maybe not worth making ; Getting rid of the esi from the mov al,[esi+eax] instruction. ; This would require moving into eax at the top of the loop, rather than doing the sub eax,eax. ; You would have to align your bitmaps so that the two shlds would create the proper base address. ; In other words, your bitmap data would have to begin at 4096x (for 64x64 bitmaps). ; I did timings without converting the sub to a mov eax,esi and setting esi to the proper value. ; There was a speedup of about 1% to 1.5% without converting the sub to a mov. ; Getting rid of the edi by doing a mov nnnn[edi],al instead of mov [edi],al. ; The problem with this is you would have a dword offset for nnnn. My timings indicate it is slower. (I think.) ; Combining u,v and du,dv into single longwords. ; The problem with this is you then must do a 16 bit operation to extract them, and you don't have enough ; instructions to separate a destination operand from being used by the next instruction. It shaves out one ; register instruction (an add reg,reg), but adds a 16 bit operation, and the setup is more complicated. ; usage: ; eax work ; ebx u coordinate ; ecx delta u ; edx delta v ; ebp v coordinate ; esi pointer to source bitmap ; edi write address rept big_num_iters mov eax,ebp ; clear for add ebp,edx ; update v coordinate shr eax,32-height_log_2 ; shift in v coordinate shld eax,ebx,width_log_2 ; shift in u coordinate while shifting up v coordinate add ebx,ecx ; update u coordinate mov al,[esi+eax] ; get pixel from source bitmap mov [edi],al inc edi endm _end1: _none_to_do: popa ret _TEXT ends end
26.118943
120
0.684938
c383cd9e632c66362b9bd6e19c502c168c1523da
998
asm
Assembly
ffight/lcs/weapon/6.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
a4a0c86c200241494b3f1834cd0aef8dc02f7683
[ "Apache-2.0" ]
6
2020-10-14T15:29:10.000Z
2022-02-12T18:58:54.000Z
ffight/lcs/weapon/6.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
a4a0c86c200241494b3f1834cd0aef8dc02f7683
[ "Apache-2.0" ]
null
null
null
ffight/lcs/weapon/6.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 003098 rts [1p+ 6, 1p+ 8, boss+6, boss+8, weapon+ 6, weapon+ 8] 0030A6 move.w ($54,A6), D1 [boss+6, boss+8, container+ 6, container+ 8, enemy+ 6, enemy+ 8, weapon+ 6, weapon+ 8] 003A0E movem.l D0-D3, -(A6) 003A12 move.w D4, ($4e,A6) 004422 move.l ($a,A0), ($a,A6) [weapon+ 6, weapon+ 8] 004462 bra $446e [weapon+ 6] 00446E move.b (A2)+, D0 [weapon+ 6] 007C38 move.w ($6,A6), D1 [1p+ 6, container+ 6, enemy+ 6, weapon+ 6] 009ACA dbra D5, $9ac8 0354CC move.w ($6,A6), ($6,A4) [weapon+ A] 0354D2 move.b #$1, ($4a,A6) [weapon+ 6] 03D146 move.w ($6,A6), ($6,A4) [weapon+ A] 03D14C move.b #$1, ($4a,A6) [weapon+ 6] 057E9C jsr $7d2e.w [weapon+ 6, weapon+ 8] 0597E8 move.l ($a,A0), ($a,A6) [weapon+ 6, weapon+ 8] 05981E bra $59828 [weapon+ 6] 059828 move.w (A2)+, D0 [weapon+ 6] 05A984 move.w ($6,A6), ($6,A4) [weapon+ A] 05A98A rts [weapon+ 6] copyright zengfr site:http://github.com/zengfr/romhack
41.583333
115
0.60521
8db8226499895a4cfa882ec4afc4952ea6354119
1,083
asm
Assembly
PRG/levels/HighUp/Unused12.asm
narfman0/smb3_pp1
38a58adafff67a403591e38875e9fae943a5fe76
[ "Unlicense" ]
null
null
null
PRG/levels/HighUp/Unused12.asm
narfman0/smb3_pp1
38a58adafff67a403591e38875e9fae943a5fe76
[ "Unlicense" ]
null
null
null
PRG/levels/HighUp/Unused12.asm
narfman0/smb3_pp1
38a58adafff67a403591e38875e9fae943a5fe76
[ "Unlicense" ]
null
null
null
; Original address was $B03C ; "Unused Level 12" .word $0000 ; Alternate level layout .word $0000 ; Alternate object layout .byte LEVEL1_SIZE_04 | LEVEL1_YSTART_070 .byte LEVEL2_BGPAL_00 | LEVEL2_OBJPAL_08 | LEVEL2_XSTART_18 | LEVEL2_UNUSEDFLAG .byte LEVEL3_TILESET_04 | LEVEL3_VSCROLL_LOCKLOW .byte LEVEL4_BGBANK_INDEX(4) | LEVEL4_INITACT_NOTHING .byte LEVEL5_BGM_ATHLETIC | LEVEL5_TIME_300 .byte $19, $00, $68, $18, $02, $42, $12, $0E, $25, $13, $06, $24, $17, $0A, $22, $15 .byte $07, $04, $19, $0B, $04, $19, $0F, $61, $12, $08, $41, $11, $0F, $42, $14, $11 .byte $04, $36, $15, $62, $16, $19, $24, $15, $1A, $42, $18, $1A, $04, $18, $1C, $04 .byte $36, $20, $61, $13, $23, $10, $03, $19, $23, $63, $12, $24, $41, $14, $24, $04 .byte $36, $25, $10, $31, $2A, $60, $30, $2C, $82, $11, $2C, $10, $02, $35, $2C, $80 .byte $18, $2C, $40, $19, $2C, $62, $12, $2D, $04, $35, $2E, $80, $18, $2E, $40, $15 .byte $30, $10, $02, $16, $31, $04, $34, $35, $23, $34, $37, $00, $37, $34, $10, $38 .byte $34, $10, $37, $38, $10, $38, $38, $10, $19, $34, $65, $16, $3C, $61, $FF
57
85
0.561404
1386f2f320405f117257afe234bb9ba278184167
4,021
nasm
Assembly
Tests/sublime-syntax tests/syntax_test_preprocessor_context.nasm
13xforever/x86-assembly-textmate-bundle
f1bb62f77b776d87d0fd85b0276d4237ff72c43c
[ "MIT" ]
69
2015-04-16T18:01:22.000Z
2022-02-15T07:54:26.000Z
Tests/sublime-syntax tests/syntax_test_preprocessor_context.nasm
javiercbk/x86-assembly-textmate-bundle
62d700e0196f62ef4353a9b95c2e64beb0a6afda
[ "MIT" ]
17
2016-09-20T08:49:09.000Z
2021-02-19T15:01:04.000Z
Tests/sublime-syntax tests/syntax_test_preprocessor_context.nasm
javiercbk/x86-assembly-textmate-bundle
62d700e0196f62ef4353a9b95c2e64beb0a6afda
[ "MIT" ]
19
2016-05-31T07:11:14.000Z
2021-07-19T10:17:12.000Z
; SYNTAX TEST "Packages/User/x86_64 Assembly.tmbundle/Syntaxes/Nasm Assembly.sublime-syntax" %push foobar ;<- punctuation.definition.keyword.preprocessor ;^^^^ keyword.control.preprocessor %pop repeat ;<- punctuation.definition.keyword.preprocessor ;^^^ keyword.control.preprocessor %macro repeat 0 %push repeat %$begin: ; ^^ punctuation.definition.keyword.preprocessor ; ^^^^^ entity.name.constant %endmacro %macro until 1 j%-1 %$begin %pop %endmacro %define %$localmac 3 %$$localmac %$$$localmac ;<- punctuation.definition.keyword.preprocessor ;^^^ punctuation.definition.keyword.preprocessor ; ^^^^^^^^ entity.name.constant ; deprecated %macro ctxthru 0 %push ctx1 %assign %$external 1 %push ctx2 %assign %$internal 1 mov eax, %$external mov eax, %$internal %pop %pop %endmacro ; correct %macro ctxthru 0 %push ctx1 %assign %$external 1 %push ctx2 %assign %$internal 1 mov eax, %$$external ; notice $$ mov eax, %$internal %pop %pop %endmacro %repl newname ;<- punctuation.definition.keyword.preprocessor ;^^^^ keyword.control.preprocessor %macro if 1 %push if j%-1 %$ifnot %endmacro %macro else 0 %ifctx if %repl else jmp %$ifend %$ifnot: %else %error "expected `if' before `else'" %endif %endmacro %macro endif 0 %ifctx if %$ifnot: %pop %elifctx else %$ifend: %pop %else %error "expected `if' or `else' before `endif'" %endif %endmacro %arg ;<- punctuation.definition.keyword.preprocessor ;^^^ keyword.control.preprocessor %stacksize ;<- punctuation.definition.keyword.preprocessor ;^^^^^^^^^ keyword.control.preprocessor %local ;<- punctuation.definition.keyword.preprocessor ;^^^^^ keyword.control.preprocessor some_function: %push mycontext ; save the current context %stacksize large ; tell NASM to use bp ; ^ punctuation.definition.keyword.preprocessor ; ^^^^^^^^^ keyword.control.preprocessor ; ^^^^^ support.constant.macro - invalid.illegal %arg i:word, j_ptr:word ; ^ punctuation.definition.keyword.preprocessor ; ^^^ keyword.control.preprocessor ; ^ variable.parameter.macro ; ^ punctuation.separator ; ^^^^ storage.type ; ^ punctuation.separator mov ax,[i] mov bx,[j_ptr] add ax,[bx] ret %pop ; restore original context %arg invalid, valid:invalid ; ^^^^^^^ invalid.illegal ; ^^^^^ variable.parameter.macro ; ^^^^^^^ invalid.illegal %stacksize flat ; ^^^^ support.constant.macro - invalid.illegal %stacksize flat64 ; ^^^^^^ support.constant.macro - invalid.illegal %stacksize large ; ^^^^^ support.constant.macro - invalid.illegal %stacksize small ; ^^^^^ support.constant.macro - invalid.illegal %stacksize invalid ; ^^^^^^^ invalid.illegal %stacksize flat32 ; ^^^^^^ invalid.illegal silly_swap: %push mycontext ; save the current context %stacksize small ; tell NASM to use bp %assign %$localsize 0 ; see text for explanation %local old_ax:word, old_dx:word enter %$localsize,0 ; see text for explanation mov [old_ax],ax ; swap ax & bx mov [old_dx],dx ; and swap dx & cx mov ax,bx mov dx,cx mov bx,[old_ax] mov cx,[old_dx] leave ; restore old bp ret ; %pop ; restore original context %local invalid, valid:invalid ; ^^^^^^^ invalid.illegal ; ^^^^^ variable.parameter.macro ; ^^^^^^^ invalid.illegal
26.806667
92
0.565034
43fc161c1a24ba9661fc9434c549ebc3400a7c3f
698
asm
Assembly
oeis/087/A087125.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/087/A087125.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/087/A087125.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A087125: Indices n of hex numbers H(n) that are also triangular. ; Submitted by Jon Maiga ; 0,5,54,539,5340,52865,523314,5180279,51279480,507614525,5024865774,49741043219,492385566420,4874114620985,48248760643434,477613491813359,4727886157490160,46801248083088245,463284594673392294,4586044698650834699,45397162391834954700,449385579219698712305,4448458629805152168354,44035200718831822971239,435903548558513077544040,4315000284866298952469165,42714099300104476447147614,422825992716178465519006979,4185545827861680178742922180,41432632285900623321910214825,410140777031144553040359226074 mov $2,2 mov $3,1 lpb $0 sub $0,1 mov $1,$3 mul $1,8 add $2,$1 add $3,$2 lpe mov $0,$3 div $0,2
43.625
498
0.840974
59f95c1c091362d1b69cbc78be238fb800d3201e
483
asm
Assembly
programs/oeis/292/A292465.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/292/A292465.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/292/A292465.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A292465: a(n) = n*F(n)*F(n+1), where F = A000045. ; 0,1,4,18,60,200,624,1911,5712,16830,48950,140976,402624,1141933,3219580,9031050,25219824,70153016,194466672,537404835,1480993800,4071156726,11165970794,30561658848,83490220800,227687745625,619938027124,1685442626946,4575973716132,12407913817640,33604489762800,90910286252751,245683839315264,663308911870638,1789188466509470,4821925518118800 mov $1,$0 cal $0,120718 ; Expansion of 3*x/(1 - 2*x^2 - 2*x + x^3). mul $1,$0 div $1,3
60.375
342
0.784679
05f449a23d102dc727fa123fc996b292a4a2ff26
1,515
asm
Assembly
ROM/include/funcs_math.asm
mspeculatrix/Zolatron64
030c8c60ae4776bcc75c7b00cb061c265549e235
[ "MIT" ]
null
null
null
ROM/include/funcs_math.asm
mspeculatrix/Zolatron64
030c8c60ae4776bcc75c7b00cb061c265549e235
[ "MIT" ]
null
null
null
ROM/include/funcs_math.asm
mspeculatrix/Zolatron64
030c8c60ae4776bcc75c7b00cb061c265549e235
[ "MIT" ]
1
2021-12-01T17:51:03.000Z
2021-12-01T17:51:03.000Z
\ MATHS & Numbers -- funcs_math.asm -------------------------------------------- \ NOT CURRENTLY USING THIS .subtract16u ; subtracts a 16-bit number stored in INT16uB from another 16-bit value ; in INT16uA. pha sec lda INT16uA sbc INT16uB sta FUNC_RES_L lda INT16uA + 1 sbc INT16uB + 1 sta FUNC_RES_H pla rts .compare16u ; Compare two 16-bit unsigned values pha lda INT16uA+1 cmp INT16uB+1 bcc compare16u_less_than bne compare16u_more_than lda INT16uA cmp INT16uB bcc compare16u_less_than bne compare16u_more_than lda #EQUAL ; A = B jmp compare16u_end .compare16u_less_than lda #LESS_THAN ; A < B jmp compare16u_end .compare16u_more_than lda #MORE_THAN ; A > B .compare16u_end sta FUNC_RESULT pla rts .compare32u ; Compare two 32-bit unsigned values pha lda INT32uA+3 cmp INT32uB+3 bcc compare32u_less_than ; NUMA < NUMB bne compare32u_more_than ; if NUMA+3 <> NUMB+3 then NUMA > NUMB lda INT32uA+2 cmp INT32uB+2 bcc compare32u_less_than bne compare32u_more_than lda INT32uA+1 cmp INT32uB+1 bcc compare32u_less_than bne compare32u_more_than lda INT32uA cmp INT32uB bcc compare32u_less_than bne compare32u_more_than lda #EQUAL ; A = B jmp compare32u_end .compare32u_less_than lda #LESS_THAN ; A < B jmp compare32u_end .compare32u_more_than lda #MORE_THAN ; A > B .compare32u_end sta FUNC_RESULT pla rts
21.338028
80
0.669967
19bd1d283e63b498c0dc93a4152e02e695c35c06
640
asm
Assembly
oeis/004/A004004.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/004/A004004.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/004/A004004.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A004004: a(n) = (3^{2n+1} - 8*n - 3)/16. ; 0,1,14,135,1228,11069,99642,896803,8071256,72641337,653772070,5883948671,52955538084,476599842805,4289398585298,38604587267739,347441285409712,3126971568687473,28142744118187326,253284697063686007,2279562273573174140,20516060462158567341,184644544159427106154,1661800897434843955475,14956208076913595599368,134605872692222360394409,1211452854230001243549782,10903075688070011191948143,98127681192630100727533396,883149130733670906547800677,7948342176603038158930206210,71535079589427343430371856011 mov $2,$0 sub $0,1 mul $0,2 add $0,3 mov $1,3 pow $1,$0 mul $2,8 sub $1,$2 div $1,16 mov $0,$1
45.714286
500
0.8375
13ffc33d6b4dca6af7c6625414d82e2f4a18ebcd
6,632
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0x48.log_21829_63.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0x48.log_21829_63.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0x48.log_21829_63.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r14 push %r9 push %rax push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_WT_ht+0x1dbde, %r9 nop nop nop nop nop xor $48561, %rdi movb (%r9), %bl nop nop nop nop add $53039, %rdi lea addresses_normal_ht+0x163fa, %r9 nop add $24756, %rdx movl $0x61626364, (%r9) nop nop nop cmp %rsi, %rsi lea addresses_A_ht+0x1f9e, %r14 nop nop sub %rax, %rax movb (%r14), %r9b nop nop nop nop xor $8573, %r14 lea addresses_UC_ht+0xd456, %rsi lea addresses_WT_ht+0x915a, %rdi nop nop nop nop nop cmp $5438, %rbx mov $47, %rcx rep movsl nop nop nop nop nop and %rax, %rax lea addresses_WC_ht+0x8e2e, %rsi lea addresses_WC_ht+0x1e806, %rdi nop nop nop nop nop and %r9, %r9 mov $21, %rcx rep movsw nop nop nop nop nop sub %rax, %rax lea addresses_normal_ht+0x355e, %r9 nop nop nop and $44554, %r14 mov (%r9), %edx nop nop nop sub $32047, %r14 lea addresses_WT_ht+0xce9e, %rsi nop nop sub $23517, %rdi mov $0x6162636465666768, %rdx movq %rdx, %xmm7 vmovups %ymm7, (%rsi) nop nop sub $14879, %r9 lea addresses_normal_ht+0x9016, %r14 nop xor %rdi, %rdi mov (%r14), %rsi nop nop nop add $42277, %rax lea addresses_A_ht+0x831e, %rcx nop nop nop nop nop sub %rdx, %rdx mov (%rcx), %r14w nop nop nop nop add $52950, %rdx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rax pop %r9 pop %r14 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r15 push %r9 push %rbp push %rdx push %rsi // Store mov $0x196, %rsi sub %rbp, %rbp movl $0x51525354, (%rsi) nop nop nop nop nop and $8748, %r12 // Load lea addresses_RW+0xa79e, %rbp nop and $14502, %r9 mov (%rbp), %rsi nop nop nop sub $25578, %rsi // Faulty Load lea addresses_normal+0x6a9e, %r13 nop xor $19071, %rbp mov (%r13), %si lea oracles, %r15 and $0xff, %rsi shlq $12, %rsi mov (%r15,%rsi,1), %rsi pop %rsi pop %rdx pop %rbp pop %r9 pop %r15 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': False, 'NT': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': False, 'congruent': 3, 'size': 4, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 8, 'size': 8, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': True, 'NT': True}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 6, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 2, 'size': 4, 'same': True, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 8, 'size': 1, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': True, 'congruent': 0, 'size': 4, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 7, 'size': 32, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 7, 'size': 2, 'same': False, 'NT': False}} {'34': 21829} 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 */
34.010256
2,999
0.655458
c0dbd68b182f3eb7c41189d4c640662e66512d1d
339
asm
Assembly
programs/oeis/108/A108766.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/108/A108766.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/108/A108766.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A108766: a(n) = A007290(n+2) - 1 = 2*C(n+2,3) - 1. ; -1,1,7,19,39,69,111,167,239,329,439,571,727,909,1119,1359,1631,1937,2279,2659,3079,3541,4047,4599,5199,5849,6551,7307,8119,8989,9919,10911,11967,13089,14279,15539,16871,18277,19759,21319,22959,24681,26487,28379,30359,32429,34591,36847,39199,41649 add $0,2 bin $0,3 mul $0,2 sub $0,1
42.375
248
0.710914
8d6c5f971652736ced2eb5552edc6e01a7d0ecb6
265
asm
Assembly
programs/oeis/167/A167545.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/167/A167545.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/167/A167545.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A167545: n^6 mod 16. ; 0,1,0,9,0,9,0,1,0,1,0,9,0,9,0,1,0,1,0,9,0,9,0,1,0,1,0,9,0,9,0,1,0,1,0,9,0,9,0,1,0,1,0,9,0,9,0,1,0,1,0,9,0,9,0,1,0,1,0,9,0,9,0,1,0,1,0,9,0,9,0,1,0,1,0,9,0,9,0,1,0,1,0,9,0,9,0,1,0,1,0,9,0,9,0,1,0,1,0,9,0,9,0,1,0 pow $0,6 mod $0,16 mov $1,$0
37.857143
211
0.509434
8caf43c34d434e2d11d9f8cb7ba4e4024ed0b3f8
4,571
asm
Assembly
Assembly logic/If statements logic.asm
cashsignsesh/ProgrammingLanguageTutorialIdea
5fc23ffdfec1505ede5f01d6d05848337905fcfe
[ "MIT" ]
4
2021-11-07T11:49:25.000Z
2022-03-26T01:56:28.000Z
Assembly logic/If statements logic.asm
cashsignsesh/ProgrammingLanguageTutorialIdea
5fc23ffdfec1505ede5f01d6d05848337905fcfe
[ "MIT" ]
null
null
null
Assembly logic/If statements logic.asm
cashsignsesh/ProgrammingLanguageTutorialIdea
5fc23ffdfec1505ede5f01d6d05848337905fcfe
[ "MIT" ]
5
2021-07-05T20:27:29.000Z
2022-03-07T12:47:44.000Z
format PE start: ;== Booleans ==: ;If a boolean==0, it is false, else it is true boolean: ;pushValue(...) push 1 ;True (Zero Flag not set on test instruction) pop eax test al,al jz ifBlockEnd ifBlockStart: ;If true run instructions here... jmp elseBlockEnd ; This instruction is only written if there is an else block ifBlockEnd: elseBlockStart: ;If false run instructions here... elseBlockEnd: nop nop nop int3 ;== Reverse Booleans (Is Not Equal To Boolean) ==: ;If a boolean==0, it is false, else it is true ;However, that logic is reversed here (Notice jz --> jnz) ;So effectively, boolean==0 is true, boolean!=0 is false booleanNot: ;pushValue(...) push 1 ;True (Zero Flag not set on test instruction) pop eax test al,al jnz ifBlockEndNot ifBlockStartNot: ;If true run instructions here... jmp elseBlockEndNot ; This instruction is only written if there is an else block ifBlockEndNot: elseBlockStartNot: ;If false run instructions here... elseBlockEndNot: nop nop nop int3 ;== Greater than ==: greaterThan: ;pushValue(..) push 16 pop eax ;pushValue(..) push 16 pop edx cmp eax,edx jng elseBlockStart0 ifBlockStart0: ;If true run instructions here... ifBlockEnd0: jmp elseBlockEnd0 ; This instruction is only written if there is an else block elseBlockStart0: ;If false run instructions here... elseBlockEnd0: nop nop nop int3 ;== Greater than || equal to ==: greaterThanOrEqualTo: ;pushValue(..) push 16 pop eax ;pushValue(..) push 16 pop edx cmp eax,edx jnge elseBlockStart1 ifBlockStart1: ;If true run instructions here... ifBlockEnd1: jmp elseBlockEnd1 ; This instruction is only written if there is an else block elseBlockStart1: ;If false run instructions here... elseBlockEnd1: nop nop nop int3 ;== Less than ==: lessThan: ;pushValue(..) push 16 pop eax ;pushValue(..) push 16 pop edx cmp eax,edx jnl elseBlockStart2 ifBlockStart2: ;If true run instructions here... ifBlockEnd2: jmp elseBlockEnd2 ; This instruction is only written if there is an else block elseBlockStart2: ;If false run instructions here... elseBlockEnd2: nop nop nop int3 ;== Less than || equal to ==: lessThanOrEqualTo: ;pushValue(..) push 16 pop eax ;pushValue(..) push 16 pop edx cmp eax,edx jnle elseBlockStart3 ifBlockStart3: ;If true run instructions here... ifBlockEnd3: jmp elseBlockEnd3 ; This instruction is only written if there is an else block elseBlockStart3: ;If false run instructions here... elseBlockEnd3: nop nop nop int3 ;== Equal to ==: equalTo: ;pushValue(..) push 16 pop eax ;pushValue(..) push 16 pop edx cmp eax,edx jnz elseBlockStart4 ifBlockStart4: ;If true run instructions here... ifBlockEnd4: jmp elseBlockEnd4 ; This instruction is only written if there is an else block elseBlockStart4: ;If false run instructions here... elseBlockEnd4: nop nop nop int3 ;== Not equal to ==: notEqualTo: ;pushValue(..) push 16 pop eax ;pushValue(..) push 17 pop edx cmp eax,edx jz elseBlockStart5 ifBlockStart5: ;If true run instructions here... ifBlockEnd5: jmp elseBlockEnd5 ; This instruction is only written if there is an else block elseBlockStart5: ;If false run instructions here... elseBlockEnd5: int3 ret
22.18932
92
0.518267
65ee1a02b33de126ed2b20f27462779d5076e88f
8,561
asm
Assembly
dino/lcs/enemy/51.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/enemy/51.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
a4a0c86c200241494b3f1834cd0aef8dc02f7683
[ "Apache-2.0" ]
null
null
null
dino/lcs/enemy/51.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 006088 tst.b ($51,A6) 00608C beq $60e0 [123p+ 51, enemy+51] 010864 tst.b ($51,A3) 010868 bne $10896 [enemy+51] 01091C tst.b ($51,A3) 010920 bne $1095a [enemy+51] 012CFE tst.b ($51,A6) [123p+ 50, enemy+50, etc+50, item+50] 012D02 bne $12d2e [123p+ 51, enemy+51, item+51] 012D1C move.b #$1, ($51,A6) 012D22 rts [123p+ 51, enemy+51, item+51] 012D48 move.b D1, ($51,A6) 012D4C rts 012E4A tst.b ($51,A6) [enemy+50] 012E4E bne $12e7a [enemy+51] 012E94 move.b D1, ($51,A6) 012E98 rts 013086 beq $13096 013096 move.w D0, ($c,A6) 02A656 tst.b ($51,A6) 02A65A bne $2a6c2 [enemy+51] 02A698 tst.b ($51,A6) 02A69C bne $2a84c [enemy+51] 02A768 move.b #$1, ($51,A6) 02A76E clr.b ($83,A6) [enemy+51] 02A7BA tst.b ($51,A6) 02A7BE bne $2a7f4 [enemy+51] 02A7C2 move.b #$1, ($51,A6) 02A7C8 lea ($23ea,PC) ; ($2cbb4), A0 [enemy+51] 02A818 tst.b ($51,A6) 02A81C bne $2a83c [enemy+51] 02A8F2 move.b #$1, ($51,A6) 02A8F8 clr.b ($83,A6) [enemy+51] 02A944 tst.b ($51,A6) 02A948 bne $2a97e [enemy+51] 02A94C move.b #$1, ($51,A6) 02A952 lea ($2270,PC) ; ($2cbc4), A0 [enemy+51] 02AA86 move.b #$1, ($51,A6) 02AA8C lea ($20b8,PC) ; ($2cb46), A1 [enemy+51] 02AB54 tst.b ($51,A6) 02AB58 bne $2ab8a [enemy+51] 02ABC6 tst.b ($51,A6) 02ABCA bne $2abee [enemy+51] 02AD00 move.b #$1, ($51,A6) [base+7B2] 02AD06 clr.b ($83,A6) [enemy+51] 02AD42 tst.b ($51,A6) 02AD46 bne $2ad80 [enemy+51] 02AD4E move.b #$1, ($51,A6) [enemy+23] 02AD54 lea ($1e7e,PC) ; ($2cbd4), A0 [enemy+51] 02AE02 tst.b ($51,A6) 02AE06 bne $2a6c2 02AED6 tst.b ($51,A6) 02AEDA bne $2a84c [enemy+51] 02B326 clr.b ($51,A6) [enemy+80] 02B32A move.w ($54,A6), D0 [enemy+51] 03141E clr.b ($51,A6) [enemy+ C, item+ C] 031422 rts [enemy+51, item+51] 033D32 move.b #$1, ($51,A6) [enemy+ C] 033D38 move.b #$4, ($7b,A6) [enemy+51] 033DA8 tst.b ($51,A6) 033DAC bne $33dda [enemy+51] 033DB0 move.b #$1, ($51,A6) 033DB6 move.w ($16,A6), D0 [enemy+51] 033DFA tst.b ($51,A6) 033DFE bne $33e20 [enemy+51] 033F74 tst.b ($51,A6) 033F78 bne $3474e 03401C tst.b ($51,A6) [enemy+A7] 034020 bne $3474e 034110 tst.b ($51,A6) [enemy+A0] 034114 bne $3474e 034240 tst.b ($51,A6) 034244 beq $3424a 034610 tst.b ($51,A6) 034614 bne $3474e 03470E tst.b ($51,A6) 034712 bne $3474e 035AEC tst.b ($51,A6) 035AF0 bne $36510 035B64 tst.b ($51,A6) 035B68 bne $35b92 03B9DA move.b #$1, ($51,A6) [enemy+ C] 03B9E0 move.b ($5b,A6), ($24,A6) [enemy+51] 03BC5C tst.b ($51,A6) 03BC60 bne $3ca32 [enemy+51] 03BCBE tst.b ($51,A6) 03BCC2 bne $3ca32 03C080 tst.b ($51,A6) 03C084 bne $3ca32 03C308 tst.b ($51,A6) 03C30C bne $3ca32 03C48E tst.b ($51,A6) 03C492 bne $3ca32 03C518 move.b #$1, ($51,A6) 03C51E move.w #$900, ($16,A6) [enemy+51] 03C52A tst.b ($51,A6) [enemy+1C] 03C52E beq $3c53c [enemy+51] 03C548 move.b #$1, ($51,A6) 03C54E move.w #$c, ($a8,A6) [enemy+51] 03C562 tst.b ($51,A6) [enemy+16] 03C566 beq $3c574 [enemy+51] 03C6AA tst.b ($51,A6) 03C6AE bne $3ca32 03CA78 tst.b ($51,A6) 03CA7C beq $3ca8a [enemy+51] 03E140 tst.b ($51,A6) 03E144 bne $3e3d4 03E226 tst.b ($51,A6) 03E22A bne $3e254 03F07C tst.b ($51,A6) 03F080 bne $3f08e [enemy+51] 03FE72 move.b #$1, ($51,A6) [enemy+AC] 03FE78 move.b #$4e, ($6,A6) [enemy+51] 040444 tst.b ($51,A6) 040448 beq $404a8 [enemy+51] 040658 tst.b ($51,A6) 04065C bne $40686 040786 tst.b ($51,A6) 04078A bne $41470 0414C2 move.b #$1, ($51,A6) [enemy+ 6] 0414C8 move.b #$34, ($58,A6) [enemy+51] 042B3A tst.b ($51,A6) 042B3E bne $43738 042B96 tst.b ($51,A6) 042B9A bne $42bac [enemy+51] 042BE0 tst.b ($51,A6) 042BE4 beq $42bec 042C6A tst.b ($51,A6) [enemy+B0] 042C6E bne $43738 042DAA tst.b ($51,A6) [enemy+24] 042DAE beq $42dc2 [enemy+51] 042DCE move.b #$1, ($51,A6) 042DD4 move.w #$700, ($16,A6) [enemy+51] 042EAE tst.b ($51,A6) [enemy+24] 042EB2 beq $42ec6 [enemy+51] 0430B2 tst.b ($51,A6) [enemy+B0] 0430B6 bne $43738 04324C move.b #$1, ($51,A6) 043252 move.w #$700, ($16,A6) [enemy+51] 043360 tst.b ($51,A6) 043364 beq $43378 [enemy+51] 043728 tst.b ($51,A6) 04372C bne $42bb4 [enemy+51] 0437E0 tst.b ($51,A6) 0437E4 beq $437f8 [enemy+51] 045D98 tst.b ($51,A6) 045D9C bne $469be 045DE0 tst.b ($51,A6) 045DE4 bne $469be 045E9C tst.b ($51,A6) [enemy+A9] 045EA0 bne $45eae [enemy+51] 045F0A tst.b ($51,A6) [enemy+22] 045F0E bne $469be 045F96 tst.b ($51,A6) 045F9A beq $45fae [enemy+51] 046028 tst.b ($51,A6) 04602C beq $46034 [enemy+51] 046060 move.b #$1, ($51,A6) 046066 clr.w ($14,A6) [enemy+51] 046098 move.b #$1, ($51,A6) 04609E move.w D1, ($14,A6) [enemy+51] 0462AC move.b #$1, ($51,A6) 0462B2 move.w D1, ($14,A6) [enemy+51] 0462DE tst.b ($51,A6) 0462E2 beq $462f6 [enemy+51] 046476 tst.b ($51,A6) [enemy+A0] 04647A bne $469be 046562 move.b #$1, ($51,A6) 046568 move.w D1, ($14,A6) [enemy+51] 0465B8 tst.b ($51,A6) 0465BC beq $465d0 [enemy+51] 046642 tst.b ($51,A6) 046646 bne $469be 0466C0 move.b #$1, ($51,A6) 0466C6 tst.b ($24,A6) [enemy+51] 046858 move.b #$1, ($51,A6) [enemy+8A] 04685E move.w #$800, ($16,A6) [enemy+51] 04716C tst.b ($51,A6) 047170 bne $4718a [enemy+51] 0484F0 tst.b ($51,A6) 0484F4 beq $48504 048D48 tst.b ($51,A6) 048D4C bne $48d6e 04E30C move.b #$1, ($51,A6) 04E312 move.b #$22, ($58,A6) [enemy+51] 04E5C0 tst.b ($51,A6) 04E5C4 bne $4e600 04E668 tst.b ($51,A6) 04E66C bne $4e6da 04EDDA tst.b ($51,A6) 04EDDE bne $4ee00 04EE6C move.b #$1, ($51,A6) 04EE72 moveq #$0, D0 [enemy+51] 04EE96 tst.b ($51,A6) 04EE9A bne $4eeb6 [enemy+51] 04F3B4 tst.b ($51,A6) 04F3B8 bne $4f3d8 04F3F0 tst.b ($51,A6) 04F3F4 bne $4f43c 05044A move.b #$1, ($51,A6) 050450 move.b #$4, ($7b,A6) [enemy+51] 050484 move.b #$1, ($51,A6) 05048A lea ($5c,PC) ; ($504e8), A0 [enemy+51] 051318 move.b #$1, ($51,A6) [enemy+ 6] 05131E move.w #$100, ($14,A6) [enemy+51] 05135C tst.b ($51,A6) 051360 bne $513c8 [enemy+51] 05594E move.b #$1, ($51,A6) [enemy+A2] 055954 move.b ($24,A1), ($24,A6) [enemy+51] 0559F0 move.b #$1, ($51,A6) 0559F6 tst.b ($24,A6) [enemy+51] 055A36 tst.b ($51,A6) 055A3A beq $55a44 [enemy+51] 055B5A tst.b ($51,A6) 055B5E beq $55b6e [enemy+51] 055D64 move.b #$1, ($51,A6) 055D6A move.w #$a00, ($16,A6) [enemy+51] 055DC2 move.b #$1, ($51,A6) 055DC8 move.w #$280, ($16,A6) [enemy+51] 055E22 move.b #$1, ($51,A6) 055E28 move.w #$280, ($16,A6) [enemy+51] 057376 tst.b ($51,A6) 05737A bne $573d2 [enemy+51] 057442 move.b #$1, ($51,A6) [enemy+ 5] 057448 move.w #$100, ($14,A6) [enemy+51] 059250 tst.b ($51,A6) 059254 bne $592ca [enemy+51] 05928C move.b #$1, ($51,A6) [enemy+A0] 059292 move.w #$40, ($14,A6) [enemy+51] 059440 tst.b ($51,A6) 059444 bne $59464 [enemy+51] 059B30 move.b #$1, ($51,A6) [enemy+ 6] 059B36 move.w #$a, ($ae,A6) [enemy+51] 059B7C move.b #$1, ($51,A6) [enemy+ 6] 059B82 tst.b ($bf,A6) [enemy+51] 05B3A2 move.b #$1, ($51,A6) 05B3A8 bra $5b3b2 [enemy+51] 05B3B6 tst.b ($51,A6) [enemy+A6] 05B3BA beq $5b3c8 [enemy+51] 05B42C move.b #$1, ($51,A6) 05B432 bra $5b43c [enemy+51] 05B440 tst.b ($51,A6) [enemy+A6] 05B444 beq $5b452 [enemy+51] 05B964 move.b #$1, ($51,A6) [enemy+6A] 05B96A move.l #$5bae0, ($40,A6) [enemy+51] 05B9EC tst.b ($51,A6) 05B9F0 bne $5ba2a [enemy+51] 05BA10 move.b #$1, ($51,A6) 05BA16 jsr $119c.l [enemy+51] 05C3CC move.b #$1, ($51,A6) [enemy+A4] 05C3D2 move.b #$4, ($6,A6) [enemy+51] 05C630 move.b #$1, ($51,A6) [enemy+16] 05C636 subq.b #1, ($a4,A6) [enemy+51] 05C646 clr.b ($51,A6) 05C64A move.l #$5c6f0, ($40,A6) 05EFF4 move.b #$1, ($51,A6) [enemy+25] 05EFFA move.w #$400, D1 [enemy+51] 05F020 tst.b ($51,A6) 05F024 beq $5f032 [enemy+51] 05F3EA tst.b ($51,A1) 05F3EE bne $5f436 [enemy+51] 093042 tst.b ($51,A0) 093046 beq $93054 [123p+ 51, enemy+51] copyright zengfr site:http://github.com/zengfr/romhack
32.06367
62
0.573882
5dadf45817cda3251c79211b7458a4899f6ce616
6,682
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_18651_2466.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_18651_2466.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_18651_2466.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r15 push %r9 push %rbp push %rcx push %rdi push %rsi lea addresses_WT_ht+0xbb14, %rsi lea addresses_A_ht+0x4114, %rdi nop nop nop nop nop and %rbp, %rbp mov $68, %rcx rep movsl nop nop nop nop cmp %r11, %r11 lea addresses_D_ht+0x19314, %r11 nop sub %r15, %r15 vmovups (%r11), %ymm7 vextracti128 $0, %ymm7, %xmm7 vpextrq $0, %xmm7, %rbp nop nop nop and $9466, %rbp lea addresses_WT_ht+0x1eda4, %r11 nop nop nop inc %r9 mov $0x6162636465666768, %rcx movq %rcx, (%r11) nop and %r11, %r11 lea addresses_A_ht+0x1bc14, %r9 nop add $43314, %rsi mov $0x6162636465666768, %r15 movq %r15, %xmm6 movups %xmm6, (%r9) nop nop nop nop nop and %rsi, %rsi lea addresses_WC_ht+0x139e7, %rdi nop nop dec %rcx mov (%rdi), %r9 nop nop xor $16209, %r9 lea addresses_normal_ht+0x15914, %rsi nop inc %rdi mov (%rsi), %cx cmp %r11, %r11 pop %rsi pop %rdi pop %rcx pop %rbp pop %r9 pop %r15 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r14 push %r8 push %rbp push %rcx push %rdi push %rsi // Load lea addresses_WT+0xcb14, %r8 add $15097, %r10 mov (%r8), %r11 nop nop nop nop nop and $46441, %rsi // Store lea addresses_D+0x16314, %rcx and $46321, %rbp movw $0x5152, (%rcx) nop nop nop sub %r8, %r8 // Load lea addresses_D+0x138f4, %r10 nop nop nop add $44684, %rbp mov (%r10), %r14d sub %r10, %r10 // Store lea addresses_PSE+0xbc14, %rbp nop nop cmp %r14, %r14 mov $0x5152535455565758, %rsi movq %rsi, %xmm1 movups %xmm1, (%rbp) nop nop nop xor $22545, %r10 // REPMOV lea addresses_US+0x1ba8a, %rsi lea addresses_D+0x1c414, %rdi nop nop nop and %r14, %r14 mov $84, %rcx rep movsb nop nop and $55434, %rdi // Faulty Load lea addresses_D+0x16314, %r8 clflush (%r8) nop and %rbp, %rbp movups (%r8), %xmm4 vpextrq $1, %xmm4, %r14 lea oracles, %rdi and $0xff, %r14 shlq $12, %r14 mov (%rdi,%r14,1), %r14 pop %rsi pop %rdi pop %rcx pop %rbp pop %r8 pop %r14 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_D', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT', 'same': False, 'size': 8, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_D', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_D', 'same': False, 'size': 4, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_PSE', 'same': False, 'size': 16, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_US', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_D', 'congruent': 6, 'same': False}, 'OP': 'REPM'} [Faulty Load] {'src': {'type': 'addresses_D', 'same': True, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_D_ht', 'same': False, 'size': 32, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 8, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 16, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 2, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'36': 18651} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
35.924731
2,999
0.652948
ed235ae022ccf2855ec3aeb8b611a98f2c910e20
11,402
asm
Assembly
Library/Text/TextLine/tlLargeLineInfo.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Library/Text/TextLine/tlLargeLineInfo.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Library/Text/TextLine/tlLargeLineInfo.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: tlLargeLineInfo.asm AUTHOR: John Wedgwood, Dec 26, 1991 ROUTINES: Name Description ---- ----------- REVISION HISTORY: Name Date Description ---- ---- ----------- John 12/26/91 Initial revision DESCRIPTION: Misc information about lines. $Id: tlLargeLineInfo.asm,v 1.1 97/04/07 11:21:16 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TextFixed segment COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LargeLineGetHeight %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the height of a line. CALLED BY: TL_LineGetHeight via CallLineHandler PASS: *ds:si = Instance ptr bx.cx = Line RETURN: dx.bl = Line height (WBFixed) DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 12/26/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ LargeLineGetHeight proc near uses cx, di, es .enter mov di, cx ; bx.di <- line call LargeGetLinePointer ; es:di <- ptr to element ; cx <- size of line/field data CommonLineGetHeight ; dx.bl <- line height call LargeReleaseLineBlock ; Release the line block .leave ret LargeLineGetHeight endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LargeLineGetBLO %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the baseline offset a line. CALLED BY: TL_LineGetHeight via CallLineHandler PASS: *ds:si = Instance ptr bx.cx = Line RETURN: dx.bl = Baseline offset (WBFixed) DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 12/26/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ LargeLineGetBLO proc near uses cx, di, es .enter mov di, cx ; bx.di <- line call LargeGetLinePointer ; es:di <- ptr to element ; cx <- size of line/field data CommonLineGetBLO ; dx.bl <- baseline call LargeReleaseLineBlock ; Release the line block .leave ret LargeLineGetBLO endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LargeLineGetTop %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the top of a line as an offset from the top of the region. CALLED BY: TL_LineGetTop via CallLineHandler PASS: *ds:si = Instance ptr bx.cx = Line RETURN: dx.bl = Line top (WBFixed) DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 12/31/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ LargeLineGetTop proc far uses ax, cx, di .enter call LargeLineGetTopLeftAndStart ; ax <- left edge ; dx.bl <- top edge ; di.cx <- start of line .leave ret LargeLineGetTop endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LargeLineGetTopLeftAndStart %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the top, left, and start of a line. CALLED BY: LargeLineGetTop, LargeLineToPosition, LargeLineDraw, LargeLineDrawLastNChars PASS: *ds:si = Instance bx.cx = Line RETURN: dx.bl = Top edge ax = Left edge di.cx = Start offset of line DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 5/ 1/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ LargeLineGetTopLeftAndStart proc far uses bp stopLine local dword push bx, cx topEdge local WBFixed leftEdge local word startOffset local dword .enter ; ; Set up arguments for HugeArrayEnum ; call T_GetVMFile push bx ; VM file call LargeGetLineArray ; di <- line-array push di ; Pass line-array push cs ; Pass callback mov di, offset cs:CommonGetTopLeftAndStartCallback push di ; ; Figure the region containing the line ; movdw bxdi, stopLine ; bx.di <- line to stop at call TR_RegionFromLineGetStartLineAndOffset ; dx.ax <- region start offset ; bx.di <- region start line movdw startOffset, dxax pushdw bxdi ; Line to start at ; ; Compute the line to stop at ; movdw dxax, stopLine ; dx.ax <- line to stop at subdw dxax, bxdi ; dx.ax <- # to process incdw dxax ; Make it one based movdw stopLine, dxax ; Pass this along pushdw dxax clrwbf topEdge ; First line starts at zero call HugeArrayEnum ; Do the enumeration ; ; Set up the return values ; mov ax, leftEdge movwbf dxbl, topEdge movdw dicx, startOffset .leave ret LargeLineGetTopLeftAndStart endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LargeLineGetLeftEdge %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the left edge of a line as an offset from the left edge of the region containing the line. CALLED BY: TL_LineGetLeftEdge via CallLineHandler PASS: *ds:si = Instance ptr bx.cx = Line RETURN: ax = Left edge DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 12/31/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ LargeLineGetLeftEdge proc far uses cx, di, es .enter mov di, cx ; bx.di <- line call LargeGetLinePointer ; es:di <- ptr to element ; cx <- size of line/field data CommonLineGetAdjustment ; ax <- adjustment call LargeReleaseLineBlock ; Release the line block .leave ret LargeLineGetLeftEdge endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LargeLineGetCount %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the number of lines in a large text object. CALLED BY: TL_LineGetCount PASS: *ds:si = Instance ptr RETURN: dx.ax = Number of lines DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 12/31/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ LargeLineGetCount proc near class VisTextClass uses bx, di .enter call T_GetVMFile ;bx = file call TextFixed_DerefVis_DI ; ds:di <- instance ptr mov di, ds:[di].VTI_lines ; di <- huge-array clrdw dxax tst di jz exit call HugeArrayGetCount ; dx.ax <- number of elements exit: .leave ret LargeLineGetCount endp if ERROR_CHECK COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECLargeLineValidateStructures %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Validate structures for a large line. CALLED BY: ECValidateSingleLineStructure PASS: *ds:si = Instance bx.cx = Line dx.ax = Line start RETURN: nothing DESTROYED: nothing (flags preserved) PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 8/ 7/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ECLargeLineValidateStructures proc far uses cx, di, es pushf info local ECLineValidationInfo .enter inherit mov di, cx ; bx.di <- line call LargeGetLinePointer ; es:di <- ptr to element ; cx <- size of line/field data ; ; Update the stack frame ; movdw info.ECLVI_linePtr, esdi mov info.ECLVI_lineSize, cx call ECCommonLineValidateStructures call LargeReleaseLineBlock ; Release the line block .leave popf ret ECLargeLineValidateStructures endp endif TextFixed ends ;----------- TextRegion segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LargeLineSumAndMarkRange %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Sum the heights of a range of lines and mark the lines as needing to be calculated and drawn. CALLED BY: TL_LineSumAndMarkRange via CallLineHandler PASS: *ds:si = Instance ptr bx.cx = Start of range dx.ax = End of range bp = Flags to set RETURN: cx.dx.ax= Sum of the heights DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 4/ 4/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ LargeLineSumAndMarkRange proc far uses di flags local word push bp hgtSum local DWFixed .enter ForceRef flags ; ; Set up arguments. ; mov di, bx call T_GetVMFile push bx ; VM file mov bx, di call LargeGetLineArray ; di <- line-array push di ; Pass line-array push cs ; Pass callback mov di, offset cs:CommonSumAndMarkCallback push di pushdw bxcx ; Line to start at subdw dxax, bxcx ; dx.ax <- # to process pushdw dxax ; Save number to process clrdw hgtSum.DWF_int ; Set total so far clr hgtSum.DWF_frac call HugeArrayEnum ; Do the enumeration ; ; Return stuff ; movdw cxdx, hgtSum.DWF_int mov ax, hgtSum.DWF_frac .leave ret LargeLineSumAndMarkRange endp TextRegion ends TextInstance segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LargeFindMaxWidth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Find the maximum width of all the lines. CALLED BY: TL_LineFindMaxWidth PASS: *ds:si = Instance RETURN: dx.al = Max width DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 5/27/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ LargeFindMaxWidth proc near uses bx, cx, di, bp .enter sub sp, size LICL_vars ; Allocate stack frame mov bp, sp ; ss:bp <- stack frame call InitVarsForFindMaxWidth ; Set up the parameters ; ; Set up arguments. ; call T_GetVMFile push bx ; VM file call LargeGetLineArray ; di <- line-array push di ; Pass line-array mov di, cs push di ; Pass callback mov di, offset cs:CommonFindMaxWidth push di clr di ; di.di <- 0 push di push di ; Line to start at dec di ; di.di <- -1 push di push di ; Count clrwbf dxcl ; dx.cl <- Max width so far call HugeArrayEnum ; Do the enumeration mov al, cl ; dx.al <- Max width add sp, size LICL_vars ; Restore stack frame .leave ret LargeFindMaxWidth endp TextInstance ends
23.903564
79
0.546308
6cf7eaf8c9d7e26d319318bfb07a237ffd0a7625
683
asm
Assembly
oeis/305/A305460.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/305/A305460.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/305/A305460.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A305460: a(0) = 1, a(1) = 3, a(n) = 3*n*a(n-1) + 2*a(n-2). ; Submitted by Christian Krause ; 1,3,20,186,2272,34452,624680,13187184,317741776,8605402320,258797553152,8557530058656,308588677217920,12052073471616192,506804263162315904,22830295989247448064,1096867816010202138880,55985919208498803979008,3025433372890955819144192,172561674093201479299176960,10359751312337870669588905984,653009456025472255142699430912,43119343600305844580757340252160,2976540727333154220582541876260864,214397171055187715571104529771286528,16085740910593744976274004816599011328 mov $1,1 mov $3,1 lpb $0 mul $1,$0 sub $0,1 add $2,$1 mul $2,2 add $1,$2 mov $2,$3 mov $3,$1 lpe mov $0,$1
40.176471
467
0.800878
f3fd1ee46c13e4e3d4ddc2636a11f179d79648c3
395
asm
Assembly
oeis/181/A181331.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/181/A181331.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/181/A181331.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A181331: Number of 0's in the top rows of all 2-compositions of n. ; Submitted by Jon Maiga ; 0,1,5,23,99,408,1632,6388,24596,93488,351664,1311536,4856432,17873408,65436544,238480960,865665600,3131196672,11290210560,40594476800,145588087552,520933746688,1860059009024,6628828632064,23582036472832 mov $1,$0 mov $2,$0 add $0,2 lpb $1 sub $1,1 mul $2,2 add $2,$0 add $0,$2 lpe div $0,8
26.333333
204
0.744304
cff6558313c1f424eac1cb71ff88c854b8b76e50
26,891
asm
Assembly
Library/Kernel/Win/winTrans.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Library/Kernel/Win/winTrans.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Library/Kernel/Win/winTrans.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1989 -- All Rights Reserved PROJECT: PC GEOS MODULE: Window FILE: winTrans.asm AUTHOR: Jim DeFrisco ROUTINES: Name Description ---- ----------- EXT WinUnTransCoord - translate from screen to document coordinates GBL WinUntransform - translate from screen to document coordinates EXT WinTransCoord - translate from document to screen coordinates GBL WinTransCoordFar - translate from document to screen coordinates GBL WinTransform - translate from document to screen coordinates GBL WinApplyRotation - apply rotation to current window transform GBL WinApplyScale - apply scale factor to current window transform GBL WinApplyTranslation - apply translation to current window transform, subset of WinScroll GBL WinSetTransform - replace window transformation matrix GBL WinApplyTransform - catenate window transformation matrix GBL WinSetNullTransform - replace window transformation matrix with NULL REVISION HISTORY: Name Date Description ---- ---- ----------- Jim 3/89 Initial revision jim 8/9/89 Changed names, used kernel library DESCRIPTION: This file contains routines used by the windowing system to translate coordinates via the set of transformation matrices. Transformation routines: There are two sets of coordinate transformation routines available under PC GEOS: the Gr... set and the Win... set. This file contains the code to implement the Gr... set of routines. The difference is this: there are (at least) two transformation matrices maintained for each window on the screen -- one that is kept in the window, and the other that is kept in the associated gstate. The window t-matrix is used to apply a document wide transformation, such as scaling or scrolling the entire document. The gstate t-matrix is used to scale or rotate a particular object without affecting the rest of the document. The same types of operations could be done (like in PostScript) with only one transformation matrix. This method makes it a little easier. If multiple gstates are used for a single window, then each gstate will have its own transformation matrix that is applied when it is used for drawing. If you are interested in transforming document coordinates to device coordinates, or vice-versa, then you probably want to use the WinTransform and WinUntransform routines. They do the right transformation, ignoring the effect of any gstate applied transformation. To get the full effect of the current gstate transformation, use GrTransform and GrUntransform. $Id: winTrans.asm,v 1.1 97/04/05 01:16:14 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% WinUnTransCoord WinUntransform %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Translate a coordinate pair from screen coordinates to document coordinates, ignoring the effect of any transformation in the associated gstate. CALLED BY: EXTERNAL (WinUnTransCoord) GLOBAL (WinUntransform) PASS: ax - x screen coordinate bx - y screen coordinate ds - PLocked Window structure (WinUnTransCoord) di - window or gstate handle (WinUntransform) RETURN: carry - set if some error. if carry is set: ax - error code, type WinErrEnum. one of: WE_WINDOW_CLOSING - window is closing WE_GSTRING_PASSED - passed handle was a gstring handle WE_COORD_OVERFLOW - coord overflowed 16-bits bx - destroyed if carry is clear: ax - x document coordinate bx - y document coordinate DESTROYED: nothing PSEUDO CODE/STRATEGY: This routine does the reverse translation from screen to document coordinates using W_TMatrix. The reverse translation is optimized depending on the type of transformation done: no scaling or rotation: x = x'-r31 y = y'-r32 no rotation: x = (x'-r31)/r11 y = (y'-r32)/r22 full translation: x = (r22(x'-r31) - r21(y'-r32)) / (r11r22-r12r21) y = (r11(y'-r32) - r12(x'-r31)) / (r11r22-r12r21) For the scaling and scaling/rotation cases, the denominator part of the divide operation (actually, its reciprocal) is pre-calculated and stored in the Window structure, to make this operation fast. KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- Jim 3/89 Initial revision Jim 4/89 Updated to use common routine UnTransComplex Jim 4/89 Added global entry point Doug 7/89 Added return of carry flag if window being destroyed (Used in UI Flow object to prevent disasters) jim 8/89 Changed name from WinUnTranslateCoord %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ WinUntransform proc far push ds, di call FarWinLockFromDI ; lock the window jc exitGS ; nothing to do for gstring test ds:[W_regFlags], mask WRF_CLOSED ; see if closing jnz exitClosing call WinUnTransCoord ; do rev xlation doneTrans: pushf ; save carry push bx ; save coordinate mov bx, di ; get handle for block call NearUnlockV ; unlock, disown block pop bx ; restore coordinate popf ; restore carry exit: pop ds, di ret exitGS: mov ax, WE_GSTRING_PASSED ; gstring handle was passed jmp exit exitClosing: mov ax, WE_WINDOW_CLOSING stc jmp doneTrans WinUntransform endp WinUnTransCoord proc near ; first subtract out the window offsets sub ax, ds:[W_winRect].R_left sub bx, ds:[W_winRect].R_top ; convert passed word values to double words. ; x coordinate in dx.cx and y coordinate in bx.ax push si mov si, W_TMatrix call UnTransCoordCommonFar ; use common routine pop si ; restore reg jnc done mov ax, WE_COORD_OVERFLOW ; signal error type done: ret WinUnTransCoord endp WinMisc segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% WinUntransformDWord %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Write out a string CALLED BY: GLOBAL PASS: dx.cx - x screen coordinate (32-bit integer) bx.ax - y screen coordinate (32-bit integer) di - window or gstate handle (WinUntransformDWord) RETURN: if carry is set: passed di was to a gstring or a window that is closing ax,bx,cx,dx unchanged if carry is not set: dx.cx - x document coordinate (32-bit integer) bx.ax - y document coordinate (32-bit integer) DESTROYED: nothing PSEUDO CODE/STRATEGY: see WinUntransform, above KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- Jim 03/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ WinUntransformDWord proc far push ds, di call FarWinLockFromDI ; lock the window jc exitGS ; nothing to do for gstring test ds:[W_regFlags], mask WRF_CLOSED ; see if closing jnz exitClosing call WinUnTransExtCoord ; do rev xlation doneTrans: pushf push bx ; save coordinate mov bx, di ; get handle for block call MemUnlockV ; unlock, disown block pop bx ; restore coordinate popf ; restore carry exit: pop ds, di ret exitGS: mov ax, WE_GSTRING_PASSED ; gstring handle was passed jmp exit exitClosing: mov ax, WE_WINDOW_CLOSING stc jmp doneTrans WinUntransformDWord endp WinUnTransExtCoord proc near uses si .enter ; before we do anything, subtract out the window offsets push dx, cx ; save x coord mov cx, ax mov ax, ds:[W_winRect].R_top ; need to convert to sdword cwd sub cx, ax ; sbb bx, dx pop dx, ax ; restore x coord push bx, cx ; save y coord mov bx, dx mov cx, ax mov ax, ds:[W_winRect].R_left ; add in x offset cwd sub cx, ax ; sbb bx, dx ; bx.cx = x coord mov dx, bx pop bx, ax ; bx.ax = y coord ; finish untrans mov si, W_TMatrix call UnTransExtCoordCommonFar ; use common routine .leave ret WinUnTransExtCoord endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% WinTransCoord WinTransform WinIntTransCoord %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: translate coordinate from document coordinates to screen coordinates, ignoring the effect of any transformation in the associated gstate. CALLED BY: EXTERNAL (WinTransCoord) GLOBAL (WinTransform) PASS: ax - x coordiante (document coordinates) bx - y coordinate (document coordinates) ds - Window structure (WinTransCoord or WinIntTransCoord) di - window handle (WinTransform only) RETURN: carry - set if some error. if carry is set: ax - error code, type WinError. one of: WE_WINDOW_CLOSING - window is closing WE_GSTRING_PASSED - passed handle was a gstring handle WE_COORD_OVERFLOW - coord overflowed 16-bits bx - destroyed if carry is clear: ax - x screen coordinate bx - y screen coordinate DESTROYED: nothing PSEUDO CODE/STRATEGY: The basic algorithm for converting from document coordinates to screen coordinates involves the following matrix multiplication. [x' y' 1] = [x y 1] * [ r11 r12 0 ] [ r21 r22 0 ] [ r31 r32 1 ] This results in the following equations: x' = r11x + r21y + r31 y' = r12x + r22y + r32 The code is optimized for the cases of no rotation (r12=r21=0), and no rotation/scaling (r12=r21=0, r11=r22=1). KNOWN BUGS/SIDE EFFECTS/IDEAS: Assumes Window structure is already locked; REVISION HISTORY: Name Date Description ---- ---- ----------- Jim 4/89... Initial version (from GrTransCoord) Jim 4/89 Added global entry point jim 8/89 Changed name from WinTranslateCoord %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ kcode segment WinTransform proc far push ds, di call FarWinLockFromDI ; lock the window jc exitGS call WinTransCoord ; do rev xlation pushf push bx ; save coordinate mov bx, di ; get handle for block call MemUnlockV ; unlock, disown block pop bx ; restore coordinate popf exit: pop ds, di ret exitGS: mov ax, WE_GSTRING_PASSED jmp exit WinTransform endp WinTransCoord proc far uses cx, dx .enter ; just use the routine done for GrXXXX routines push si ; save si mov si, W_TMatrix ; set up matrix ptr call TransCoordCommon ; use common routine pop si ; save restore jc doneErr add ax, ds:[W_winRect].R_left ; add in x offset add bx, ds:[W_winRect].R_top ; add it y offset clc ; make sure add ; doesn't set carry! done: .leave ret doneErr: mov ax, WE_COORD_OVERFLOW ; signal error type jmp done WinTransCoord endp kcode ends COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% WinTransformDWord %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Translate a 32-bit integer document coordinate to screen coords CALLED BY: GLOBAL PASS: dx.cx - x document coordinate (32-bit integer) bx.ax - y document coordinate (32-bit integer) di - window or gstate handle (WinUntransformDWord) RETURN: dx.cx - x screen coordinate (32-bit integer) bx.ax - y screen coordinate (32-bit integer) carry set if di is a gstate or a window that is closing DESTROYED: nothing PSEUDO CODE/STRATEGY: see WinUntransform, above KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- Jim 03/91 Initial version Chris 4/26/91 Changed to return carry %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ WinTransformDWord proc far push ds, di call FarWinLockFromDI ; lock the window jc exitGS call WinTransExtCoord ; do rev xlation push bx ; save coordinate mov bx, di ; get handle for block call MemUnlockV ; unlock, disown block pop bx ; restore coordinate clc ; say there was a window exit: pop ds, di ret exitGS: mov ax, WE_GSTRING_PASSED jmp exit WinTransformDWord endp WinTransExtCoord proc far push si mov si, W_TMatrix call TransExtCoordCommonFar ; use common routine pop si ; restore reg ; now we have to add in the window offset. Only take a sec. push dx, cx ; save x coord mov cx, ax mov ax, ds:[W_winRect].R_top ; need to convert to sdword cwd add cx, ax ; adc bx, dx pop dx, ax ; restore x coord push bx, cx ; save y coord mov bx, dx mov cx, ax mov ax, ds:[W_winRect].R_left ; add in x offset cwd add cx, ax ; adc dx, bx ; dx.cx = x coord pop bx, ax ; bx.ax = y coord ret WinTransExtCoord endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% WinApplyRotation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Apply rotation to a transformation matrix CALLED BY: GLOBAL PASS: di - handle to window or GState dx.ax - angle to rotate (WWFixed) si - WinInvalFlag enum WIF_INVALIDATE - to invalidate the window WIF_DONT_INVALIDATE - to avoid invalidating window RETURN: carry set if di is a gstate or a window that is closing DESTROYED: nothing PSEUDO CODE/STRATEGY: Apply rotation to DefMatrix matrix. mark CurXform as invalid The following matrix multiplication is performed: W_TMatrix = rotation * W_TMatrix [ w11 w12 0 ] [ cos -sin 0 ] [ w11 w12 0 ] [ w21 w22 0 ] = [ sin cos 0 ] * [ w21 w22 0 ] [ w31 w32 1 ] [ 0 0 1 ] [ w31 w32 1 ] KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- Jim 03/89 Initial version jim 8/89 Changed name from WinRotate, use kernel lib Chris 4/26/91 Changed to return carry %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ WinApplyRotation proc far call PushAllFar ; lock the window block call FarWinLockFromDI ; see if GState OR win, lock win jc exit ; nothing to do for gstring ; set up pointer to matrix push si, di ; save invalidation flag mov si, W_TMatrix ; set up pointer to matrix call RotateCommon ; use common rotation routine call CalcInverse ; calc inverse factors pop si, di ; restore invalidation flag ; finish for window: invalidate win and curMatrix, UnlockV block call FinishWinTransform ; unlock window, inval if necc. clc ; say OK exit: call PopAllFar ret WinApplyRotation endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FinishWinTransform %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Common utility routine used by a few WinApplyXXXX functions CALLED BY: INTERNAL WinApplyRotation, WinApplyTranslation PASS: ds - locked/owned window segment address si - WinInvalFlag di - window handle RETURN: nothing DESTROYED: ax, bx, cx, dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- Jim 03/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ FinishWinTransform proc near ; ; set window transform invalid, invalidate window if desired ; also invalidate any application clip regions ; andnf {word}ds:[W_grFlags], \ not (mask WGF_XFORM_VALID or \ mask WGRF_PATH_VALID shl 8 or \ mask WGRF_WIN_PATH_VALID shl 8) cmp si, WIF_INVALIDATE ; need to invalidate ? jne unlockWin ; no, skip it call InvalWholeWin ; invalidate the window ; unlock/disown the window unlockWin: mov bx, di ; get handle for block call MemUnlockV ; unlock, disown block ret FinishWinTransform endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% InvalWholeWin %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Invalidate the whole window, causing redraw CALLED BY: INTERNAL PASS: ds - window segment RETURN: ds - new window segment DESTROYED: ax,bx,cx,dx PSEUDO CODE/STRATEGY: Setup up temp region = WHOLE_REG; add temp region to InvalReg; KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- Jim 04/89 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ InvalWholeWin proc far ; now that we're done with TMatrix, set InvalReg to whole push di ; save window handle push si segmov es, ds ; es -> Window struct mov di, ds:[W_temp1Reg] ; di = chunk handle call FarWinWHOLEReg ; set Temp1 to whole region segmov ds, es ; in case it moved call WinAddToInvalReg ; add to invalidation region pop si pop di ; restore window handle ret InvalWholeWin endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% WinApplyScale %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Apply scale factor to transformation matrix CALLED BY: GLOBAL PASS: di - handle to window dx.cx - X-scale factor (WWFixed) bx.ax - Y-scale factor (WWFixed) si - WinInvalFlag enum WIF_INVALIDATE - to invalidate the window WIF_DONT_INVALIDATE - to avoid invalidating window RETURN: carry set if di is a gstate or a window that is closing DESTROYED: nothing PSEUDO CODE/STRATEGY: Apply scaling to appropriate matrix. mark CurXform as invalid The following matrix multiplication is performed: W_TMatrix = scale * W_TMatrix [ w11 w12 0 ] [ Sx 0 0 ] [ w11 w12 0 ] [ w21 w22 0 ] = [ 0 Sx 0 ] * [ w21 w22 0 ] [ w31 w32 1 ] [ 0 0 1 ] [ w31 w32 1 ] KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- Jim 03/89 Initial version jim 8/89 Changed name from WinScale jim 11/89 Eliminated options to scale about a point. They screw up other parts of the system and are generally more work here than in an application. Chris 4/26/91 Changed to return carry %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ WinApplyScale proc far call PushAllFar ; lock the window block call FarWinLockFromDI ; ds -> window, di=window handle jc exit ; check for scaling by one, in which case we'll leave cmp dx, 1 ; check for scale of one jne doTheScale ; no, do it cmp bx, 1 ; check for scale of one jne doTheScale ; no, do it tst cx jnz doTheScale tst ax jz unlockWin ; everything is zero, exit ; set up for call into KLib, can't use ax,bx doTheScale: push si, di ; save invalidation flag mov si, W_TMatrix ; set up pointer to matrix call ScaleCommon ; use common routine call CalcInverse ; calc new inverse factors pop si, di ; restore inval flag call FinishWinTransform ; set flags, etc. clc ; window did exist exit: call PopAllFar ret unlockWin: mov bx, di ; get handle for block call MemUnlockV ; unlock, disown block clc ; window did exist jmp exit WinApplyScale endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% WinApplyTranslation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Apply translation to the current window transform CALLED BY: GLOBAL PASS: di - window handle dx.cx - x translation to apply (WWFixed) bx.ax - y translation to apply (WWFixed) si - WinInvalFlag enum WIF_INVALIDATE - to invalidate the window WIF_DONT_INVALIDATE - to avoid invalidating window RETURN carry set if di is a gstate or a window that is closing DESTROYED: nothing PSEUDO CODE/STRATEGY: Add the offsets to the current matrix; The following matrix multiplication is performed: W_TMatrix = translation * W_TMatrix [ w11 w12 0 ] [ 1 0 0 ] [ w11 w12 0 ] [ w21 w22 0 ] = [ 0 1 0 ] * [ w21 w22 0 ] [ w31 w32 1 ] [ Tx Ty 1 ] [ w31 w32 1 ] KNOWN BUGS/SIDE EFFECTS/IDEAS: NOTE: The window is not Blt'd or invalidated, if you want this behaviour, use WinScroll. REVISION HISTORY: Name Date Description ---- ---- ----------- Jim 09/89 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ WinApplyTranslation proc far uses ds, ax, bx, cx, dx .enter ; lock the window block call FarWinLockFromDI ; ds -> window, di=window handle jc exit call WinApplyTransCommon ; do the real work call FinishWinTransform ; do unlocking, invalidating clc ; window OK exit: .leave ret WinApplyTranslation endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% WinApplyTranslationDWord %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Apply a 32-bit translation to the current window tmatrix CALLED BY: GLOBAL PASS: di - window handle dx.cx - x translation to apply (32-bit integer) bx.ax - y translation to apply (32-bit integer) si - WinInvalFlag enum WIF_INVALIDATE - to invalidate the window WIF_DONT_INVALIDATE - to avoid invalidating window RETURN: carry set if di is a gstate or a window that is closing DESTROYED: nothing PSEUDO CODE/STRATEGY: see WinApplyTranslation, above KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- Jim 03/91 Initial version Chris 4/26/91 Changed to return carry %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ WinApplyTranslationDWord proc far uses ds, ax, bx, cx, dx, si tOffset local PointDWord .enter ; lock the window block call FarWinLockFromDI ; ds -> window, di=window handle jc exit ; see if simple operation, or more detailed.. or ds:[W_TMatrix].TM_flags, TM_TRANSLATED test ds:[W_TMatrix].TM_flags, TM_COMPLEX jnz doComplex ; no scale or rotate, just some adds.. add ds:[W_TMatrix].TM_32.DWF_int.low, ax ; add in Y off adc ds:[W_TMatrix].TM_32.DWF_int.high, bx add ds:[W_TMatrix].TM_31.DWF_int.low, cx ; add in X off adc ds:[W_TMatrix].TM_31.DWF_int.high, dx done: call FinishWinTransform ; do unlocking, invalidating clc ; window OK exit: .leave ret ; handle complex transformation matrix doComplex: push si ; save invalidate flag ; copy the args to the stack mov tOffset.PD_x.low, cx ; copy x factor over mov tOffset.PD_x.high, dx mov tOffset.PD_y.low, ax ; copy y factor over mov tOffset.PD_y.high, bx mov si, W_TMatrix ; ds:si -> matrix lea dx, tOffset ; ss:bp -> PointWWFixed call PreApplyExtTranslation pop si ; restore invalidate flag jmp done WinApplyTranslationDWord endp WinMisc ends GrWinBlt segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% WinApplyTransCommon %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Used by both WinApplyTranslation and WinScroll CALLED BY: INTERNAL PASS: ds - points to locked/owned window dx.cx - x scroll amount (WWFixed) bx.ax - y scroll amount (WWFixed) RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: do the right matrix manipulation thing. See description in WinApplyTranslation. One strange thing about this routine. I have found that in WinScroll, we occasionally end up with a rounding error of one in the fractions place (that is, 1/65535th), due to the inherent inaccuracies of dealing with fixed point math. Hence here we check for -1 and 1 in the one's place, and round appropriately. It seems to do the right thing. KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- Jim 03/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ WinApplyTransCommon proc far uses ax, cx, dx tOffset local PointWWFixed .enter or ds:[W_TMatrix].TM_flags, TM_TRANSLATED test ds:[W_TMatrix].TM_flags, TM_COMPLEX jnz doComplex add ds:[W_TMatrix].TM_31.DWF_frac, cx ; add in X off adc ds:[W_TMatrix].TM_31.DWF_int.low, dx mov cx, ax ; save y frac mov ax, dx cwd adc ds:[W_TMatrix].TM_31.DWF_int.high, dx add ds:[W_TMatrix].TM_32.DWF_frac, cx ; add in Y off adc ds:[W_TMatrix].TM_32.DWF_int.low, bx mov ax, bx cwd adc ds:[W_TMatrix].TM_32.DWF_int.high, dx ; we are done. but check for wierd rounding (see header) done: cmp ds:[W_TMatrix].TM_31.DWF_frac, 1 ; check for 1 jne checkXneg1 clr ds:[W_TMatrix].TM_31.DWF_frac jmp checkY checkXneg1: cmp ds:[W_TMatrix].TM_31.DWF_frac, -1 ; check for -1 jne checkY add ds:[W_TMatrix].TM_31.DWF_frac, 1 adc ds:[W_TMatrix].TM_31.DWF_int.low, 0 adc ds:[W_TMatrix].TM_31.DWF_int.high, 0 checkY: cmp ds:[W_TMatrix].TM_32.DWF_frac, 1 ; check for 1 jne checkYneg1 clr ds:[W_TMatrix].TM_32.DWF_frac jmp exit checkYneg1: cmp ds:[W_TMatrix].TM_32.DWF_frac, -1 ; check for -1 jne exit add ds:[W_TMatrix].TM_32.DWF_frac, 1 adc ds:[W_TMatrix].TM_32.DWF_int.low, 0 adc ds:[W_TMatrix].TM_32.DWF_int.high, 0 exit: .leave ret ; handle complex transformation matrix. stand back. doComplex: push si ; save invalidate flag ; copy the args to the stack mov tOffset.PF_x.WWF_int, dx ; copy x factor over mov tOffset.PF_x.WWF_frac, cx mov tOffset.PF_y.WWF_int, bx ; copy y factor over mov tOffset.PF_y.WWF_frac, ax mov si, W_TMatrix ; ds:si -> matrix lea dx, tOffset ; ss:dx -> PointWWFixed call PreApplyTranslation pop si ; restore invalidate flag jmp done WinApplyTransCommon endp GrWinBlt ends
27.924195
79
0.612547
32c44cd0862304b6bc2f83442d4fc8ede50603c6
565
asm
Assembly
oeis/209/A209561.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/209/A209561.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/209/A209561.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A209561: Triangle of coefficients of polynomials u(n,x) jointly generated with A209562; see the Formula section. ; Submitted by Christian Krause ; 1,1,1,2,2,1,3,4,3,1,4,7,7,4,1,5,11,14,11,5,1,6,16,25,25,16,6,1,7,22,41,50,41,22,7,1,8,29,63,91,91,63,29,8,1,9,37,92,154,182,154,92,37,9,1,10,46,129,246,336,336,246,129,46,10,1,11,56,175,375,582,672,582,375,175,56,11,1,12,67,231,550,957,1254,1254,957,550,231,67,12,1,13,79,298,781,1507,2211,2508,2211,1507 lpb $0 add $0,1 add $2,$1 add $1,1 sub $0,$1 bin $2,$0 sub $0,1 lpe bin $1,$0 add $2,$1 mov $0,$2
35.3125
306
0.663717
07933653d9a7c557fa574a5043d09004bf161140
1,008
asm
Assembly
programs/oeis/033/A033118.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/033/A033118.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/033/A033118.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A033118: Base 8 digits are, in order, the first n terms of the periodic sequence with initial period 1,0. ; 1,8,65,520,4161,33288,266305,2130440,17043521,136348168,1090785345,8726282760,69810262081,558482096648,4467856773185,35742854185480,285942833483841,2287542667870728,18300341342965825,146402730743726600,1171221845949812801,9369774767598502408,74958198140788019265,599665585126304154120,4797324681010433232961,38378597448083465863688,307028779584667726909505,2456230236677341815276040,19649841893418734522208321,157198735147349876177666568,1257589881178799009421332545,10060719049430392075370660360,80485752395443136602965282881,643886019163545092823722263048,5151088153308360742589778104385,41208705226466885940718224835080,329669641811735087525745798680641,2637357134493880700205966389445128,21098857075951045601647731115561025,168790856607608364813181848924488200 add $0,1 lpb $0 mov $2,$0 trn $0,2 mul $2,2 seq $2,94014 ; Expansion of (1-2x)/(1-8x^2). add $3,$2 lpe mov $0,$3 div $0,8
72
766
0.869048
ead8a19a89bd6c9adc49353c2d8c403650e2693e
1,445
asm
Assembly
programs/oeis/176/A176203.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/176/A176203.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/176/A176203.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A176203: Triangle read by rows: T(n, k) = 16*binomial(n, k) - 15. ; 1,1,1,1,17,1,1,33,33,1,1,49,81,49,1,1,65,145,145,65,1,1,81,225,305,225,81,1,1,97,321,545,545,321,97,1,1,113,433,881,1105,881,433,113,1,1,129,561,1329,2001,2001,1329,561,129,1,1,145,705,1905,3345,4017,3345,1905,705,145,1,1,161,865,2625,5265,7377,7377,5265,2625,865,161,1,1,177,1041,3505,7905,12657,14769,12657,7905,3505,1041,177,1,1,193,1233,4561,11425,20577,27441,27441,20577,11425,4561,1233,193,1,1,209,1441,5809,16001,32017,48033,54897,48033,32017,16001,5809,1441,209,1,1,225,1665,7265,21825,48033,80065,102945,102945,80065,48033,21825,7265,1665,225,1,1,241,1905,8945,29105,69873,128113,183025,205905,183025,128113,69873,29105,8945,1905,241,1,1,257,2161,10865,38065,98993,198001,311153,388945,388945,311153,198001,98993,38065,10865,2161,257,1,1,273,2433,13041,48945,137073,297009,509169,700113,777905,700113,509169,297009,137073,48945,13041,2433,273,1,1,289,2721,15489,62001,186033,434097,806193,1209297,1478033,1478033,1209297,806193,434097,186033,62001,15489,2721,289,1,1,305,3025,18225,77505,248049,620145,1240305,2015505,2687345,2956081,2687345,2015505,1240305,620145,248049,77505,18225,3025,305,1,1,321,3345,21265,95745,325569,868209,1860465,3255825,4702865,5643441,5643441,4702865,3255825,1860465,868209,325569,95745,21265 cal $0,109128 ; Triangle read by rows: T(n,k) = T(n-1,k-1) + T(n-1,k) + 1 for 0<k<n, T(n,0) = T(n,n) = 1. mul $0,8 add $0,1 mov $1,$0 sub $1,8
160.555556
1,232
0.75917
80117f583ebadff482f88a170a299b136a885cdc
17,550
asm
Assembly
C5515_Support_Files/C5515_Lib/dsplib_2.40.00/55x_src/dlmsfast.asm
HeroSizy/Sizy
89bc29940dc7666591259730b5112efd0a626043
[ "Unlicense" ]
null
null
null
C5515_Support_Files/C5515_Lib/dsplib_2.40.00/55x_src/dlmsfast.asm
HeroSizy/Sizy
89bc29940dc7666591259730b5112efd0a626043
[ "Unlicense" ]
null
null
null
C5515_Support_Files/C5515_Lib/dsplib_2.40.00/55x_src/dlmsfast.asm
HeroSizy/Sizy
89bc29940dc7666591259730b5112efd0a626043
[ "Unlicense" ]
null
null
null
;*********************************************************** ; Version 2.40.00 ;*********************************************************** ; Function: dlms ; Processor: C55xx ; Description: dlms fir filter ; ; Usage: short oflag = dlms(DATA *h, DATA *x, DATA *r, DATA *des, ; DATA *dbuffer, DATA step, ushort nh, ushort nx) ; ; ...where ; h[2nh] Pointer to coefficient vector of size nh ; - h is stored in reverse order: h(n-1), ... h(0) ; x[nx] Pointer to input vector of size nx ; r[xn] Pointer to output data vector. ; - r can be equal to x ; des[nx] Pointer to expected-output array ; dbuffer[nh+3] Pointer to delay buffer structure ; - first element of structure is index into array ; of OLDEST data (to be overwritten with new) ; - remaining elements are modulo-addressed for ; sample 0 to nh+1. NOTE that this delay buffer ; yields an array length of nh+1, which is used ; for Dual-MAC operations(not used here). ; step Scale factor to control adaptation rate = 2*mu ; nh Number of filter coefficients. Filter order = nh-1. ; nx Number of input samples to process (length of input ; and output data vectors). ; oflag Overflow Flag ; - If oflag = 1, a 32-bit overflow has occured ; - If oflag = 0, a 32-bit overflow has not occured ; ; Copyright Texas instruments Inc, 2000 ; ; History: ; 2.10 Rishi 08/03/2001 - optimized the code for benchmark. ;**************************************************************** .length 32767 .cpl_on .asg 0, coef_cntr .asg 1, filt_cntr .asg 2, index_filt .asg 3, save_AR6 .asg 4, save_AR7 .asg 5, save_T3 ; 2*mu*error(i) variable .asg 6, save_AR5 .asg 7, ret_addr .asg 8, arg_nx ;//----------------------------------------------------------------------------- ;// Temp data ;//----------------------------------------------------------------------------- .bss err, 1 ; register usage ; XAR0-XAR4, T0 & T1 as well as accumulators are all available to callee ; XAR0 through XAR5 are already loaded with *x, *h, *r, *des and *dbuffer ; respectively upon entry. ; While T0 and T1 are loaded with the values of STEP and NH, respectively .asg ar0, ar_input .asg ar1, ar_coef .asg ar2, ar_scratch .asg ar3, ar_des .asg ar4, ar_dbuffer .asg ar5, ar_output .asg ar6, ar_data1 .asg ar7, ar_data2 .asg T3, T_step .asg T1, T_nh ;***************************************************************************** .def _dlmsfast ; Stack frame ; ----------- RET_ADDR_SZ .set 1 ;return address REG_SAVE_SZ .set 0 ;save-on-entry registers saved FRAME_SZ .set 3 ;local variables ARG_BLK_SZ .set 0 ;argument block PARAM_OFFSET .set ARG_BLK_SZ + FRAME_SZ + REG_SAVE_SZ + RET_ADDR_SZ _dlmsfast: ; Preserve registers ;------------------- PSH T3 PSHBOTH XAR5 ;AR5 will be used for the index into dbuffer ;T3 is needed for LMS instruction PSHBOTH XAR6 ;AR6 and AR7 are used in this function PSHBOTH XAR7 ;AR6 and AR7 are used in this function ; ; Allocate the local frame and argument block ;---------------------------------------------------------------- AADD #-(ARG_BLK_SZ + FRAME_SZ + REG_SAVE_SZ), SP ; - one local variable ; Set math and overflow modes ;--------------------------- ; Status registers MOV #0, mmap(ST0_55) ;all fields cleared (OVx, C, TCx) OR #4140h, mmap(ST1_55) ;set CPL, FRCT, SXMD AND #07940h, mmap(ST1_55) ;clear BRAF, M40, SATD, C16, 54CM, ASM OR #00C6h, mmap(ST2_55) ;AR1, AR2, AR6, & AR7 pointers put in circular mode BCLR ARMS ;disable ARMS bit in ST2 BCLR SST ;make sure Saturate-on-STore bit in ST3 is disabled ; ; Get arguments ;--------------- MOV XAR2, XAR5; ;XAR5 set to ar_output MOV T0, T_step ; NOTE!!! the index value saved points to the oldest value: ; EXample: if we need to update x(-16) and X(-15) it will point to X(-16) MOV *ar_dbuffer, ar_data2 ;set AR6 to index in data array ; of oldest input sample MOV *ar_dbuffer+, ar_data1 ;***** Delay buffer ******** ; ; | | ; | x(0) | <------ ar_data1 ; | x(1) | <------ ar_data2 ; | x(-N) | ; | x(-(N-1))| ; | ..... | ; | x(-2) | ; | x(-1) | MOV mmap(ar_dbuffer), BSA67 ;set BSA67 to start of data buffer ; NOTE that this is the SECOND ; element of the dbuffer structure ; initialize delay buffer CDP pointer MOV mmap(ar_dbuffer), BSAC MOV mmap(T_nh), T0 AADD AR1, T0 MOV mmap(T0), BSA23 ; BSA scratch = BSA coeff + NH MOV #0, ar_scratch MOV mmap(AR1), BSA01 ;copy start of coeffs to BSA01 MOV #0, ar_coef ;...then set AR0 to zero (1st coeff) ; initialize counter for Coef update loop MOV T1, T0 SFTS T0, #-1 ;T0 = nh/2 SUB #5, T0 ;T0 = (nh/2 - 2 - 3) => (-3) is for inner loop unroll MOV T0,*SP(coef_cntr) ; initialize counter for Filter loop MOV T1, T0 SUB #2, T0 ;T0 = (nh - 2 - 4) => 4 is for unrolls MOV T0,*SP(filt_cntr) MOV *SP(filt_cntr), CSR ;initialize the error AMOV #err, XCDP MOV mmap(T_nh), BK03 ;load BK03 with # of coeffs for use w/ AR2 AADD #2, T_nh MOV mmap(T_nh), BK47 ;load BK47 with # of data samples (nh+2) ;in delay-line for use w/ AR6,7 MOV mmap(T_nh), BKC MOV *SP(arg_nx), T0 SFTS T0, #-1 SUB #1, T0 MOV mmap(T0), BRC0 ;BRC0 = nx/2 -1 MOV #0,*CDP ;Set initial error is 0 MOV #5, T1 ;circular buffer pointer wrap MOV #2, T0 MOV *ar_input+, *ar_data2+ ;update the two oldest values MOV *ar_input+, *(ar_data2+T0) AMAR *(ar_data1+T0) MOV ar_data2, *SP(index_filt) RPTB #(ext_loop-1) ; First Coefficient update stage ; ------------------------------ ; Update Coefficients from the previous error e(n-1) ; ; The coefficients h and h' are stored in reversed order: h(n-1)... h(0) where ; h(n) is at the lowest memory address. ; ; AR6 ---> h ; AR7 ---> h' ; AR1 ---> x[n-(N-(2*k))] ; AR3 ---> x[n-(N-(2*k+1))] ; CDP ---> e(n-1) ; T0 = #2 ; BRC1 = NH/2 -2 ; ; 21 = 15AD + 6IBQ stalls in the LOOP ;***** Filter coefficients buffer ******** ; ; | h(N-1) | <------ ar_coef ; | ..... | ; | h(0) | ; | h'(N-1) | <------ ar_scratch ; | ..... | ; | h'(0) | ;***** Delay buffer ******** ; ; | x(0) | ; | x(1) | ; | x(-N) | <------ ar_data1 ; | x(-(N-1))| <------ ar_data2 ; | ..... | ; | x(-2) | ; | x(-1) | MOV *SP(coef_cntr), BRC1 ; movethis instruction earlier for benchmarking purpose MOV dbl(*(ar_coef+T0)), PAIR(HI(AC0)) ; Following 3 unrolls for BRC1 set up 4 cycles before rptb MACR *(ar_data1+T0),*CDP,AC0 :: MACR *(ar_data2+T0),*CDP,AC1 MOV PAIR(HI(AC0)),dbl(*(ar_scratch+T0)) || MOV dbl(*(ar_coef+T0)), PAIR(HI(AC0)) MACR *(ar_data1+T0),*CDP,AC0 :: MACR *(ar_data2+T0),*CDP,AC1 MOV PAIR(HI(AC0)),dbl(*(ar_scratch+T0)) || MOV dbl(*(ar_coef+T0)), PAIR(HI(AC0)) MACR *(ar_data1+T0),*CDP,AC0 :: MACR *(ar_data2+T0),*CDP,AC1 MOV PAIR(HI(AC0)),dbl(*(ar_scratch+T0)) || MOV dbl(*(ar_coef+T0)), PAIR(HI(AC0)) RPTBLOCAL #(coef_updt1 -1) ; 2 stalls ; segment update loop MACR *(ar_data1+T0),*CDP,AC0 ; AC0=AC0+2^15+en*x[n-(N-(2*k))] :: MACR *(ar_data2+T0),*CDP,AC1 ; AC1=AC1+2^15+en*x[n-(N-(2*k+1))] MOV PAIR(HI(AC0)),dbl(*(ar_scratch+T0)) ; h'(N-1-(2*k)) = HIGH(AC0) || MOV dbl(*(ar_coef+T0)), PAIR(HI(AC0)) ; h'(N-1-(2*k+1)) = HIGH(AC1) ; HI(AC0) = h[N-(2*k+2)] ; HI(AC0) = h[N-(2*k+2+1)] ; 1 stall in rptblocal loop after 1st iteration coef_updt1: ; modify arr_data1 and ar_data2 pointing to the correct position MACR *(ar_data1+T1),*CDP,AC0 ; AC0=AC0+2^15+en*x[n-1] ::MACR *(ar_data2+T1),*CDP,AC1 ; AC1=AC1+2^15+en*x[n-2] MOV PAIR(HI(AC0)),dbl(*(ar_scratch+T0)) ; h'[0] = HIGH(AC0) || NOP ; h'[1] = HIGH(AC1) ; Filtering stage ; ---------------- ; Two filters are processes in parallel using the dual MAC instruction. ; The filter coefficients are stored in the buffers h[n](k) and h[n+1](k). ; (n is the time index and k is the coefficient index) ; We will use the following notations: ; h(k) = h[i](k) ; h'(k) = h[i+1](k) ; ; Equations: ; ---------- ; y(i) = h(0) x(i-1)+h(1)(1)x(i-2)+ ... +h(N-2)x(i-(N-1))+h(N-1)x(i-N) ; y(i+1) = h'(0)x(i)+ h'(1)x(i-1)+ ... +h'(N-1)x(i-(N-1) ; ; Implementation: ; --------------- ; Head and tail are computed using single MAC, all the other mpys are ; implemented using dual MAC. ; ; The coefficients h and h' are stored in reversed order: h(n-1)... h(0) where ; h(n) is at the lowest memory address. ; ; CDP ---> db , circular ; AR6 ---> h ; AR7 ---> h' ; ; ;***** Filter coefficients buffer ******** ; ; | h(N-1) | <------ ar_coef ; | ..... | ; | h(0) | ; | h'(N-1) | <------ ar_scratch ; | ..... | ; | h'(0) | ;***** Delay buffer ******** ; ; | x(0) | ; | x(1) | ; | x(-N) | ; | x(-(N-1))| ; | x(-(N-2))| <------ CDP ; | ..... | ; | x(-2) | ; | x(-1) | ; TEMP comments ; ar_coef and ar_scratch should be in correct position since they are circular ptrs ; CDP has to be set circular ( parameters BKC, BSAC are set in initialization code) ; the index of CDP has to be set ; CSR has to be set BSET CDPLC ; MOV #0, AC1 MOV XAR4, XCDP ; initialize extended part MOV *SP(index_filt), CDP ; MPYM *ar_coef+,*CDP+,AC0 ; 4 stalls ; h(N-1)x(i-N) ; Following 4 unrolls are for RPTC setup ; MAC *ar_coef+,*CDP+,AC0 ; :: MAC *ar_scratch+,*CDP+,AC1 ; MAC *ar_coef+,*CDP+,AC0 ; :: MAC *ar_scratch+,*CDP+,AC1 ; MAC *ar_coef+,*CDP+,AC0 ; :: MAC *ar_scratch+,*CDP+,AC1 ; MAC *ar_coef+,*CDP+,AC0 ; :: MAC *ar_scratch+,*CDP+,AC1 || RPT CSR MAC *ar_coef+,*CDP+,AC0 :: MAC *ar_scratch+,*CDP+,AC1 MACM *ar_scratch+,*CDP+,AC1 ; h'(0)x(i) AMAR *+CDP(#3) MOV CDP, *SP(index_filt) ; store output MOV rnd(HI(AC0)), *ar_output+; MOV rnd(HI(AC1)), *ar_output+; ; Error computation stage ; ----------------------- ; Computing e(n) and e(n+1) BCLR CDPLC ; 5 stalls; Disable CDP for circ addressing SUB AC0,*ar_des+<<#16,AC0 ; AC0 = e(n) = y(n) - AC0 MPYR T_step, AC0 AMOV #err, XCDP SUB AC1,*ar_des+<<#16,AC2 ; AC1 = e(n+1) = y(n+1) - AC1 MPYR T_step, AC2 ||MOV HI(AC0), *CDP ; 3 stalls ; Second Coefficient update stage ; ------------------------------ ; Update Coefficients from the previous error e(n) ; ; The coefficients h and h' are stored in reversed order: h(n-1)... h(0) where ; h(n) is at the lowest memory address. ; ; AR6 ---> h ; AR7 ---> h' ; AR1 ---> x[n-(N-(2*k))] ; AR3 ---> x[n-(N-(2*k+1))] ; CDP ---> e(n) ; T0 = #2 ; BRC1 = NH/2 -2 ; ;***** Filter coefficients buffer ******** ; ; | h(N-1) | <------ ar_coef ; | ..... | ; | h(0) | ; | h'(N-1) | <------ ar_scratch ; | ..... | ; | h'(0) | ;***** Delay buffer ******** ; ; | x(0) | <------ ar_data1 ; | x(1) | ; | x(-N) | ; | x(-(N-1))| <------ ar_data1 ; | ..... | <------ ar_data2 ; | x(-2) | ; | x(-1) | ; loop starts here MOV *SP(coef_cntr), BRC1 MOV dbl(*(ar_scratch+T0)),PAIR(HI(AC0)) ; Following 3 unrolls are to allow BRC1 setup MACR *(ar_data1+T0),*CDP,AC0 :: MACR *(ar_data2+T0),*CDP,AC1 MOV PAIR(HI(AC0)),dbl(*(ar_coef+T0)) || MOV dbl(*(ar_scratch+T0)), PAIR(HI(AC0)) MACR *(ar_data1+T0),*CDP,AC0 :: MACR *(ar_data2+T0),*CDP,AC1 MOV PAIR(HI(AC0)),dbl(*(ar_coef+T0)) || MOV dbl(*(ar_scratch+T0)), PAIR(HI(AC0)) MACR *(ar_data1+T0),*CDP,AC0 :: MACR *(ar_data2+T0),*CDP,AC1 MOV PAIR(HI(AC0)),dbl(*(ar_coef+T0)) || MOV dbl(*(ar_scratch+T0)), PAIR(HI(AC0)) RPTBLOCAL #(coef_updt2-1) ; 2 stalls ; segment update loop MACR *(ar_data1+T0),*CDP,AC0 ; AC0=AC0+2^15+en*x[n-(N-(2*k))] :: MACR *(ar_data2+T0),*CDP,AC1 ; AC1=AC1+2^15+en*x[n-(N-(2*k+1))] MOV PAIR(HI(AC0)),dbl(*(ar_coef+T0)) ; h'(N-1-(2*k)) = HIGH(AC0) || MOV dbl(*(ar_scratch+T0)), PAIR(HI(AC0)) ; h'(N-1-(2*k+1)) = HIGH(AC1) ; HI(AC0) = h[N-(2*k+2)] ; HI(AC0) = h[N-(2*k+2+1)] ; 1 stall in rptblocal loop after 1st iteration coef_updt2: MACR *(ar_data1+T1),*CDP,AC0 ; AC0=AC0+2^15+en*x[n-1] ::MACR *(ar_data2+T0),*CDP,AC1 ; AC1=AC1+2^15+en*x[n-2] MOV PAIR(HI(AC0)),dbl(*(ar_coef+T0)) ; h'[0] = HIGH(AC0) || NOP ; h'[1] = HIGH(AC1) ; Update the delay line ; ------------------------- ; MOV *ar_input+, *ar_data2+ ;copy input -> state(0) MOV *ar_input+, *(ar_data2+T0) ;copy input -> state(0) ; Preserve e(n+1) for next stage ; ------------------------------ ; MOV HI(AC2), *CDP ext_loop: ; Return overflow flag ; -------------------- MOV #0, T0 ;store zero for return value XCCPART Check1, overflow(AC0) || MOV #1, T0 ;return value 1 if overflow was encountered Check1: XCCPART Check2, overflow(AC1) || MOV #1, T0 ;return value 1 if overflow was encountered Check2 ;NO presumed values in ST0 by C-environment BCLR FRCT ;clear FRCT bit in ST1 for C-environment BSET ARMS ;set ARMS bit for C-environment AND #0F800h, mmap(ST2_55) ;all pointers put in linear mode ;No presumed values of ST3 were modified ; ; Allocate the local frame and argument block ;---------------------------------------------------------------- AADD #(ARG_BLK_SZ + FRAME_SZ + REG_SAVE_SZ), SP ; ; Restore stack to previous value ; Reset status regs to restore normal C operating environment ; Return to calling function ;---------------------------------------------------------------- POPBOTH XAR7 ;AR6 and AR7 are used in this function POPBOTH XAR6 ;AR6 and AR7 are used in this function POPBOTH XAR5 ;AR6 and AR7 are used in this function POP T3 RET ;return to calling function .end ;end of file. please do not remove. it is left here to ensure that no lines of code are removed by any editor
34.752475
119
0.438177
7de52bca70b4f98a50d31cf5342742a398ff0c1e
1,745
asm
Assembly
programs/oeis/090/A090591.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/090/A090591.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/090/A090591.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A090591: Expansion of g.f.: 1/(1 - 2*x + 8*x^2). ; 1,2,-4,-24,-16,160,448,-384,-4352,-5632,23552,92160,-4096,-745472,-1458176,3047424,17760256,11141120,-119799808,-328728576,300941312,3231711232,4055891968,-17741905920,-67930947584,6073352192,555594285056,1062601752576,-2319550775296,-13139915571200,-7723424940032,89672474689536,241132348899328,-235115099717632,-2399288990629888,-2917657183518720,13358997558001664,50059252584153088,-6753475295707136,-413980971264638976,-773934140163620864,1763979489789870080,9719432100888707072,5327028283458453504,-67101400240192749568,-176819026748053127168,183173148425435742208,1780898510835296501760,2096411834267107065856,-10054364418148157882368,-36880023510433172291584,6674868324318918475776,308389924732103215284224,563380902869655082762240,-1340357592117515556749312,-7187762407192271775596544,-3652664077444419097198592,50196771102649336010375168,129614854824854024798339072,-142344459171486638486323200,-1321607756941805475359358976,-1504459840511717842828132352,7563942374511008117218607104,27163563473115758977062273024,-6184412049856546983624310784,-229677331884639165783746805760,-409879367370425955698499125248,1017659920336261414872976195584,5314354779635930475333945393152,2487430196581769631684081221632,-37539977843923904539303400701952,-94979397260501966132079451176960,110361028230387304050268303261696,980557234544790337157172215939072,1078226243246482241912198005784576,-5688005389865358213432981715943424,-20001820725702574362163547478163456,5500401667517716983136758771220480,171015369140656028863581897367748608,298027524941170321862069724565733376,-772067903242907587184515729810522112 mov $1,1 lpb $0 sub $0,1 mul $1,2 mul $2,4 sub $1,$2 add $2,$1 lpe mov $0,$1
134.230769
1,605
0.889398
be8ecde4582eeca93aea4aafe1f15b3dfa28077b
345
asm
Assembly
programs/oeis/015/A015537.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/015/A015537.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/015/A015537.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A015537: Expansion of x/(1 - 5*x - 4*x^2). ; 0,1,5,29,165,941,5365,30589,174405,994381,5669525,32325149,184303845,1050819821,5991314485,34159851709,194764516485,1110461989261,6331368012245,36098688018269,205818912140325,1173489312774701,6690722212434805 cal $0,106567 ; a(0)=0, a(1)=4; for n>1, a(n) = 5*a(n-1) + 4*a(n-2). mov $1,$0 div $1,4
49.285714
210
0.730435
2e76cd6ebe9165d6541af4771cb471c2bd8ba3e7
604
asm
Assembly
oeis/136/A136488.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/136/A136488.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/136/A136488.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A136488: a(n) = 2^n - A005418(n). ; Submitted by Christian Krause ; 1,2,5,10,22,44,92,184,376,752,1520,3040,6112,12224,24512,49024,98176,196352,392960,785920,1572352,3144704,6290432,12580864,25163776,50327552,100659200,201318400,402644992,805289984,1610596352,3221192704,6442418176,12884836352,25769738240,51539476480,103079084032,206158168064,412316598272,824633196544,1649266917376,3298533834752,6597068718080,13194137436160,26388276969472,52776553938944,105553112072192,211106224144384,422212456677376,844424913354752,1688849843486720,3377699686973440 seq $0,135098 ; First differences of A135094.
100.666667
488
0.852649
e326b3d737526ded2b059779a3149e6bacd71f96
248
asm
Assembly
programs/oeis/316/A316562.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/316/A316562.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/316/A316562.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A316562: Koechel number for the works of W. A. Mozart rounded from age 11. ; 16,40,64,89,113,138,162,186,211,235,260,284,308,333,357,382,406,430,455,479,504,528,552,577,601,626 mov $1,$0 mul $0,2 div $0,5 add $0,16 mov $2,$1 mul $2,24 add $0,$2
22.545455
101
0.677419
a387b178ed832189d12d923526c86717cfc4479f
466
asm
Assembly
oeis/005/A005182.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/005/A005182.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/005/A005182.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A005182: a(n) = floor(e^((n-1)/2)). ; Submitted by Jamie Morken(s2) ; 0,1,1,2,4,7,12,20,33,54,90,148,244,403,665,1096,1808,2980,4914,8103,13359,22026,36315,59874,98715,162754,268337,442413,729416,1202604,1982759,3269017,5389698,8886110,14650719,24154952,39824784 sub $0,1 mov $1,1 mov $2,1 mov $3,$0 mul $3,5 lpb $3 mul $1,$0 mul $2,$3 add $1,$2 mul $2,2 add $4,1 div $1,$4 div $2,$4 sub $3,1 max $3,1 lpe mul $1,$0 div $1,$2 add $1,1 mov $0,$1
18.64
194
0.633047
d23d3fa4aa2ecb03870f887636c52e768641764d
46,608
asm
Assembly
Library/Spreadsheet/Spreadsheet/spreadsheetNotify.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Library/Spreadsheet/Spreadsheet/spreadsheetNotify.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Library/Spreadsheet/Spreadsheet/spreadsheetNotify.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: spreadsheetNotify.asm FILE: spreadsheetNotify.asm AUTHOR: Gene Anderson, Dec 20, 1991 ROUTINES: Name Description ---- ----------- REVISION HISTORY: Name Date Description ---- ---- ----------- Gene 12/20/91 Initial revision DESCRIPTION: $Id: spreadsheetNotify.asm,v 1.1 97/04/07 11:13:19 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ NotifStruct struct NS_routine nptr.near NS_size word ;0 to not allocate NS_gcnType GeoWorksNotificationType NS_appType GeoWorksGenAppGCNListType NotifStruct ends DrawCode segment resource SS_SendNotificationSelectChange proc near uses ax class SpreadsheetClass .enter test ds:[si].SSI_attributes, mask SA_ENGINE_MODE jnz noNotify mov ax, SNFLAGS_SELECTION_CHANGE call SS_SendNotification noNotify: .leave ret SS_SendNotificationSelectChange endp SS_SendNotificationSelectAdd proc near uses ax class SpreadsheetClass .enter test ds:[si].SSI_attributes, mask SA_ENGINE_MODE jnz noNotify mov ax, SNFLAGS_SELECTION_ADD call SS_SendNotification noNotify: .leave ret SS_SendNotificationSelectAdd endp DrawCode ends AttrCode segment resource SS_SendNotificationBogusWidth proc near uses ax, bx, cx, dx, di .enter mov ax, size NotifySSheetCellWidthHeightChange mov cx, ALLOC_DYNAMIC_LOCK or mask HF_SHARABLE \ or (mask HAF_ZERO_INIT shl 8) call MemAlloc jc done ; allocation error, bail push ds mov ds, ax ; indeterminate mov ds:NSSCWHC_flags, mask SSWHF_MULTIPLE_HEIGHTS or \ mask SSWHF_MULTIPLE_WIDTHS mov ds:NSSCWHC_height, 0 mov ds:NSSCWHC_width, 0 pop ds lea di, cs:bogusWidthNotif call SendNotification done: .leave ret SS_SendNotificationBogusWidth endp bogusWidthNotif NotifStruct \ <GenCellWidthHeightNotify, size NotifySSheetCellWidthHeightChange, GWNT_SPREADSHEET_CELL_WIDTH_HEIGHT_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_SPREADSHEET_CELL_WIDTH_HEIGHT_CHANGE> SS_SendNullParaAttrNotification proc far uses ax, bx, cx, dx, di .enter clr bx ;bx <- NULL event mov di, offset nullParaNotif call SendNotification done: .leave ret SS_SendNullParaAttrNotification endp nullParaNotif NotifStruct \ <GenCellWidthHeightNotify, size VisTextNotifyParaAttrChange, GWNT_TEXT_PARA_ATTR_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_TEXT_PARA_ATTR_CHANGE> COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SS_SendNotification %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Send out various notification(s) CALLED BY: UTILITY PASS: ds:si - Spreadsheet instance data ax - SpreadsheetNotifyFlags for notification(s) to send - 0 to clear out status events on all TARGET GCN Lists only RETURN: none DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 5/14/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SS_Quit proc far ret SS_Quit endp SS_SendNotification proc far class SpreadsheetClass test ds:[si].SSI_attributes, mask SA_ENGINE_MODE jnz SS_Quit FALL_THRU SS_ForceNotification SS_SendNotification endp SS_ForceNotification proc far uses ax, bx, cx, di, es notifyFlags local SpreadsheetNotifyFlags push ax .enter EC < call ECCheckInstancePtr ;> ; ; Are we sending a Spreadsheet attribute notification? ; clr bx ;bx <- assume spreadsheet test ax, SNFLAGS_REQUIRE_SPREADSHEET_NOTIFY_BLOCK jz noSpreadsheetCreate call CreateSSNotify jnc noSpreadsheetCreate ;branch if no error andnf ax, not (SNFLAGS_REQUIRE_SPREADSHEET_NOTIFY_BLOCK) noSpreadsheetCreate: push bx ; ; Loop through the entries ; mov di, offset notificationTable mov cx, length notificationTable notifyLoop: clr bx ;bx <- assume NULL status tst ss:notifyFlags ;NULL status event? jz nullStatus ;branch if NULL status ror ax, 1 jnc noNotify push ax, cx, ds ; ; Allocate and initialize notification block ; mov ax, cs:[di].NS_size tst ax ;any size? jz noAlloc ;branch if no size mov cx, ALLOC_DYNAMIC_LOCK or mask HF_SHARABLE \ or (mask HAF_ZERO_INIT shl 8) call MemAlloc jc errorAlloc ;branch if error push bx mov bx, ds ;bx:si <- ptr to spreadsheet mov ds, ax ;ds <- seg addr of block clr cx ;cx <- flags o'plenty call cs:[di].NS_routine pop bx ;bx <- handle of notification sendStatus: pop ax, cx, ds nullStatus: call SendNotification noNotify: add di, (size NotifStruct) loop notifyLoop ; ; Did we create a SpreadsheetStyleChange block? If so, free it ; errorPop: pop bx ;bx <- block handle tst bx ;any block? jz noSpreadsheetFree ;branch if no block call MemFree noSpreadsheetFree: .leave ret ; ; The table specified no size, so the generation routine ; will do the allocation itself. ; noAlloc: mov bx, ds ;bx:si <- ptr to spreadsheet call cs:[di].NS_routine jmp sendStatus ; ; An error occurred while allocating a notification block...bail. ; errorAlloc: pop ax, cx, ds jmp errorPop SS_ForceNotification endp CheckHack <offset SNF_EDIT_ENABLE eq 0> CheckHack <offset SNF_CHAR_ATTR eq 1> CheckHack <offset SNF_JUSTIFICATION eq 2> CheckHack <offset SNF_EDIT_BAR eq 3> CheckHack <offset SNF_SELECTION eq 4> CheckHack <offset SNF_ACTIVE_CELL eq 5> CheckHack <offset SNF_CELL_WIDTH_HEIGHT eq 6> CheckHack <offset SNF_DOC_ATTRS eq 7> CheckHack <offset SNF_CELL_ATTRS eq 8> CheckHack <offset SNF_CELL_NOTES eq 9> CheckHack <offset SNF_NAME_CHANGE eq 10> CheckHack <offset SNF_FORMAT_INIT eq 11> CheckHack <offset SNF_FORMAT_CHANGE eq 12> CheckHack <offset SNF_DATA_RANGE eq 13> ; CMT -- The "MAX_CELL_TEXT_SIZE+2" accomodates DBCS and SBCS -- too ; difficult to plug in proper constants here. (witt) ; notificationTable NotifStruct \ <GenSelectStateNotify, size NotifySelectStateChange, GWNT_SELECT_STATE_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_SELECT_STATE_CHANGE>, <GenCharAttrNotify, size VisTextNotifyCharAttrChange, GWNT_TEXT_CHAR_ATTR_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_TEXT_CHAR_ATTR_CHANGE>, <GenJustificationNotify, size NotifyJustificationChange, GWNT_JUSTIFICATION_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_JUSTIFICATION_CHANGE>, <GenEditBarNotify, size NotifySSheetEditBarChange + (MAX_CELL_TEXT_SIZE+2), GWNT_SPREADSHEET_EDIT_BAR_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_SPREADSHEET_EDIT_BAR_CHANGE>, <GenSelectionNotify, size NotifySSheetSelectionChange, GWNT_SPREADSHEET_SELECTION_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_SPREADSHEET_SELECTION_CHANGE>, <GenActiveCellNotify, size NotifySSheetActiveCellChange + (MAX_CELL_GOTO_TEXT_SIZE+2), GWNT_SPREADSHEET_ACTIVE_CELL_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_SPREADSHEET_ACTIVE_CELL_CHANGE>, <GenCellWidthHeightNotify, size NotifySSheetCellWidthHeightChange, GWNT_SPREADSHEET_CELL_WIDTH_HEIGHT_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_SPREADSHEET_CELL_WIDTH_HEIGHT_CHANGE>, <GenDocAttrsNotify, size NotifySSheetDocAttrsChange, GWNT_SPREADSHEET_DOC_ATTR_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_SPREADSHEET_DOC_ATTR_CHANGE>, <GenCellAttrsNotify, size NotifySSheetCellAttrsChange, GWNT_SPREADSHEET_CELL_ATTR_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_SPREADSHEET_CELL_ATTR_CHANGE>, <GenCellNotesNotify, 0, GWNT_SPREADSHEET_CELL_NOTES_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_SPREADSHEET_CELL_NOTES_CHANGE>, <GenNameChangeNotify, size NotifySSheetNameChange, GWNT_SPREADSHEET_NAME_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_SPREADSHEET_NAME_CHANGE>, <GenFormatInitNotify, size NotifyFloatFormatChange, GWNT_FLOAT_FORMAT_INIT, GAGCNLT_FLOAT_FORMAT_INIT>, <GenFormatNotify, size NotifyFloatFormatChange, GWNT_FLOAT_FORMAT_CHANGE, GAGCNLT_FLOAT_FORMAT_CHANGE>, <GenDataRangeNotify, size NotifySSheetDataRangeChange, GWNT_SPREADSHEET_DATA_RANGE_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_SPREADSHEET_DATA_RANGE_CHANGE> COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenSelectStateNotify %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Send NotifySelectStateChange (GenEditControl notification) CALLED BY: SS_SendNotification PASS: ds - seg addr of NotifySelectStateChange block RETURN: none DESTROYED: ax, bx, cx, dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 5/ 9/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenSelectStateNotify proc near uses bp .enter mov ax, BB_TRUE or (BB_FALSE shl 8) mov ds:[NSSC_selectionType], SDT_SPREADSHEET mov ds:[NSSC_selectAllAvailable], al mov ds:[NSSC_clipboardableSelection], al mov ds:[NSSC_deleteableSelection], al ;can delete mov ds:[NSSC_pasteable], ah ;assume can't paste ; ; See if the clipboard has stuff we can deal with ; clr bp ;normal transfer call ClipboardQueryItem ;fill our buffer with formats ; ; does CIF_SPREADSHEET format exist ? ; tst bp jz cleanUp ;branch if no transfer item mov cx, MANUFACTURER_ID_GEOWORKS mov dx, CIF_SPREADSHEET ;dx <- format to search for call ClipboardTestItemFormat jnc canPaste ;jump if can paste ; ; Hack for Wizard to allow GeoCalc to paste text items ; into the edit bar and graphics into the graphics layer. ; clr bp ;bp <- not CIF_QUICK CHART < call GrObjTestSupportedTransferFormats > CHART < jnc cleanUp ;branch if can't paste > NOCHART < jmp cleanUp ; if can't paste > canPaste: mov ds:[NSSC_pasteable], BB_TRUE ;mark as pasteable ; ; Done with transfer item ; cleanUp: call ClipboardDoneWithItem .leave ret GenSelectStateNotify endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenCharAttrNotify %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Send a VisTextNotifyCharAttrChange CALLED BY: SS_SendNotification() PASS: ds - seg addr of VisTextNotifyCharAttrChange block es - seg addr of SpreadsheetStyleChange block RETURN: none DESTROYED: ax, dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: Currently deals with: TextStyle FontID pointsize Text FG Color Text BG Color REVISION HISTORY: Name Date Description ---- ---- ----------- eca 5/14/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenCharAttrNotify proc near uses bx, di .enter ; ; Convert CellAttrs to VisTextCharAttr structure ; CheckHack <(offset SSC_attrs) eq 0> CheckHack <(offset VTNCAC_charAttr) eq 0> clr bx, di ;es:di <- ptr to CellAttrs ;ds:bx <- ptr to VisTextCharAttr call ConvertCellAttrsToTextAttrs ; ; Handle style diffs ; mov al, es:SSC_styleIndeterminates ;al <- indeterminates mov ds:[VTNCAC_charAttrDiffs.VTCAD_textStyles], al ; ; Store the VisTextCharAttrFlags for any other multiple attributes ; mov ax, es:SSC_textFlags mov ds:[VTNCAC_charAttrDiffs.VTCAD_diffs], ax .leave ret GenCharAttrNotify endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConvertCellAttrsToTextAttrs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Convert CellAttrs values to VisTextCharAttr equivalents CALLED BY: UTILITY PASS: es:di - ptr to CellAttrs (source) ds:bx - ptr to VisTextCharAttr (dest) RETURN: none DESTROYED: ax PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- gene 3/ 9/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConvertCellAttrsToTextAttrsFar proc Far call ConvertCellAttrsToTextAttrs ret ConvertCellAttrsToTextAttrsFar endp ConvertCellAttrsToTextAttrs proc near uses dx .enter ; ; TextStyle ; mov al, es:[di].CA_style ;al <- TextStyle mov ds:[bx].VTCA_textStyles, al ; ; FontID ; mov ax, es:[di].CA_font mov ds:[bx].VTCA_fontID, ax ; ; pointsize (WBFixed) ; clr dx mov ax, es:[di].CA_pointsize shrwbf axdh shrwbf axdh shrwbf axdh ;/8 movwbf ds:[bx].VTCA_pointSize, axdh ; ; text foreground color (ColorQuad) ; mov ax, {word}es:[di].CA_textAttrs.AI_color.CQ_redOrIndex mov {word}ds:[bx].VTCA_color.CQ_redOrIndex, ax mov ax, {word}es:[di].CA_textAttrs.AI_color.CQ_green mov {word}ds:[bx].VTCA_color.CQ_green, ax mov al, es:[di].CA_textAttrs.AI_grayScreen mov ds:[bx].VTCA_grayScreen, al CheckHack <(offset CQ_info) eq (offset CQ_redOrIndex+1)> CheckHack <(offset CQ_blue) eq (offset CQ_green+1)> ; ; text background color (ColorQuad) ; mov ax, {word}es:[di].CA_bgAttrs.AI_color.CQ_redOrIndex mov dx, ax ;dl <- index, dh <- flag mov {word}ds:[bx].VTCA_bgColor.CQ_redOrIndex, ax mov ax, {word}es:[di].CA_bgAttrs.AI_color.CQ_green mov {word}ds:[bx].VTCA_bgColor.CQ_green, ax mov al, es:[di].CA_bgAttrs.AI_grayScreen mov ds:[bx].VTCA_bgGrayScreen, al CheckHack <(offset CQ_info) eq (offset CQ_redOrIndex+1)> CheckHack <(offset CQ_blue) eq (offset CQ_green+1)> ; ; Store track kerning, font width and font weight ; mov ax, {word}es:[di].CA_trackKern mov {word}ds:[bx].VTCA_trackKerning, ax CheckHack <(offset CA_fontWidth) eq (offset CA_fontWeight)+1> CheckHack <(offset VTCA_fontWidth) eq (offset VTCA_fontWeight)+1> mov ax, {word}es:[di].CA_fontWeight mov {word}ds:[bx].VTCA_fontWeight, ax ; ; Set stuff we don't use to reasonable values ; clr ax CheckHack <PT_SOLID eq 0> mov ds:[bx].VTCA_bgPattern.GP_type, al mov ds:[bx].VTCA_pattern.GP_type, al mov ds:[bx].VTCA_extendedStyles, ax ; ; The one thing we do use is background color. Set ; the extended style bit appropriately if there is ; a background color. ; cmp dx, C_WHITE or (CF_INDEX shl 8) je noBackColor ornf ds:[bx].VTCA_extendedStyles, mask VTES_BACKGROUND_COLOR noBackColor: ; ; Finally, stuff we really don't use, but the text object will ; barf on if we don't set it to something reasonable. ; mov ds:[bx].VTCA_meta.SSEH_style, CA_NULL_ELEMENT mov ds:[bx].VTCA_meta.SSEH_meta.REH_refCount.WAAH_low, ax mov ds:[bx].VTCA_meta.SSEH_meta.REH_refCount.WAAH_high, al push cx, di, es segmov es, ds lea di, ds:[bx].VTCA_reserved ;es:di <- ptr to shme mov cx, (size VTCA_reserved) ;cx <- # of bytes rep stosb ;store me jesus (al = 0) pop cx, di, es .leave ret ConvertCellAttrsToTextAttrs endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenJustificationNotify %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Send NotifyJustificationChange to output CALLED BY: SS_SendNotification() PASS: ds - seg addr of NotifyJustificationChange block es - seg addr of SpreadsheetStyleChange block RETURN: none DESTROYED: ax PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 12/19/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenJustificationNotify proc near mov al, es:SSC_attrs.CA_justification mov ds:[NJC_justification], al clr al ;al <- FALSE test es:SSC_cellFlags, mask SCF_JUSTIFICATIONS jz oneJust inc al ;al <- TRUE oneJust: mov ds:[NJC_diffs], al mov ds:[NJC_useGeneral], TRUE ret GenJustificationNotify endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenEditBarNotify %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Send a NotifySSheetEditBarChange notification CALLED BY: SS_SendNotification() PASS: ds - seg addr of NotifySSheetEditBarChange block bx:si - ptr to Spreadsheet instance RETURN: none DESTROYED: cx, dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 5/18/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenEditBarNotify proc near uses bp .enter mov dx, ds mov bp, offset NSSEBC_text ;dx:bp <- ptr to buffer push ds mov ds, bx ;ds:si <- ptr to Spreadsheet call FormatEditContents ;cx <- formatted string length pop ds DBCS< shl cx, 1 ;cx <- size > mov ds:NSSEBC_textSize, cx ;store size of text .leave ret GenEditBarNotify endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenSelectionNotify %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Send a NotifySSheetSelectionChange notification CALLED BY: SS_SendNotification() PASS: ds - seg addr of NotifySSheetSelectionChange block bx:si - ptr to Spreadsheet instance RETURN: none DESTROYED: ax, bx, cx, dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 5/23/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenSelectionNotify proc near uses es, bp class SpreadsheetClass .enter mov es, bx ;es:si <- ptr to Spreadsheet clr bp ;bp <- SSheetSelectionFlags ; ; Copy the range ; mov ax, es:[si].SSI_selected.CR_start.CR_column mov bx, es:[si].SSI_selected.CR_start.CR_row mov cx, es:[si].SSI_selected.CR_end.CR_column mov dx, es:[si].SSI_selected.CR_end.CR_row mov ds:NSSSC_selection.CR_start.CR_column, ax mov ds:NSSSC_selection.CR_start.CR_row, bx mov ds:NSSSC_selection.CR_end.CR_column, cx mov ds:NSSSC_selection.CR_end.CR_row, dx ; ; Set any "single" flags ; cmp ax, cx jne notSingleColumn ornf bp, mask SSSF_SINGLE_COLUMN notSingleColumn: cmp bx, dx jne notSingleRow ornf bp, mask SSSF_SINGLE_ROW cmp ax, cx jne notSingleCell ornf bp, mask SSSF_SINGLE_CELL notSingleCell: notSingleRow: ; ; Set any "entire" flags ; tst ax jnz notEntireRow cmp cx, es:[si].SSI_maxCol jb notEntireRow ornf bp, mask SSSF_ENTIRE_ROW notEntireRow: tst bx jnz notEntireColumn cmp dx, es:[si].SSI_maxRow jb notEntireColumn ornf bp, mask SSSF_ENTIRE_COLUMN notEntireColumn: mov ds:NSSSC_flags, bp ;pass SSheetSelectionFlags .leave ret GenSelectionNotify endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenActiveCellNotify %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Send a NotifySSheetActiveCellChange notification CALLED BY: SS_SendNotification() PASS: ds - seg addr of NotifySSheetEditBarChange block bx:si - ptr to Spreadsheet instance RETURN: none DESTROYED: ax, cx, dx, ds PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 5/18/92 Initial version witt 11/15/93 DBCS-ized %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenActiveCellNotify proc near uses bp, es, di class SpreadsheetClass .enter segmov es, ds mov di, offset NSSACC_text ;es:di <- ptr to dest buffer mov ds, bx ;ds:si <- ptr to Spreadsheet mov ax, ds:[si].SSI_active.CR_row mov cx, ds:[si].SSI_active.CR_column ;(ax,cx) <- cell to format call ParserFormatCellReference ;cx <- length (w/out NULL) mov es:NSSACC_textSize, cx ;store length of text .leave ret GenActiveCellNotify endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenCellWidthHeightNotify %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Send a NotifySSheetActiveCellChange notification CALLED BY: SS_SendNotification() PASS: ds - seg addr of NotifySSheetCellWidthHeightChange block es - seg addr of SpreadsheetStyleChange block RETURN: none DESTROYED: ax, cx, dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 7/ 6/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenCellWidthHeightNotify proc near uses ax class SpreadsheetClass .enter ; ; Set the flags for any indeterminates ; clr dl mov cx, es:SSC_cellFlags test cx, mask SCF_ROWS jz noRows ornf dl, mask SSWHF_MULTIPLE_HEIGHTS noRows: test cx, mask SCF_COLUMNS jz noCols ornf dl, mask SSWHF_MULTIPLE_WIDTHS noCols: mov ds:NSSCWHC_flags, dl ; ; Copy the row height and column width ; mov ax, es:SSC_rowHeight mov ds:NSSCWHC_height, ax mov ax, es:SSC_columnWidth mov ds:NSSCWHC_width, ax .leave ret GenCellWidthHeightNotify endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenDocAttrsNotify %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Generate header/footer notification CALLED BY: SS_SendNotification() PASS: ds - seg addr of NotifySSheetDocAttrsChange block bx:si - ptr to Spreadsheet instance RETURN: none DESTROYED: ax, cx, dx, ds PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 7/22/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenDocAttrsNotify proc near uses ax, es, di, si class SpreadsheetClass .enter segmov es, ds ;es <- seg addr of notify mov ds, bx ;ds:si <- ptr to spreadsheet ; ; Copy the draw flags ; mov ax, ds:[si].SSI_drawFlags ;ax <- SpreadsheetDrawFlags mov es:NSSDAC_drawFlags, ax ;pass flags ; ; Copy the header range ; mov di, offset NSSDAC_header ;es:di <- dest mov cx, (size CellRange)/(size word) push si, cx lea si, ds:[si].SSI_header ;ds:si <- source rep movsw ;copy me jesus pop si, cx ; ; Copy the footer range ; push si mov di, offset NSSDAC_footer ;es:di <- dest lea si, ds:[si].SSI_footer ;ds:si <- source rep movsw ;copy me jesus pop si ; ; Copy the recalc parameters ; mov ax, ds:[si].SSI_circCount mov es:NSSDAC_circCount, ax mov ax, ds:[si].SSI_flags mov es:NSSDAC_calcFlags, ax mov cx, (size FloatNum)/(size word) mov di, offset NSSDAC_converge ;es:di <- dest lea si, ds:[si].SSI_converge ;ds:si <- source rep movsw ;copy me jesus .leave ret GenDocAttrsNotify endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenCellAttrsNotify %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Generate cell attributes notification CALLED BY: SS_SendNotification() PASS: ds - seg addr of NotifySSheetCellAttrsChange es - seg addr of SpreadsheetStyleChange block RETURN: none DESTROYED: ax, cx, dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 7/29/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenCellAttrsNotify proc near uses ax .enter ; ; Copy border sides ; mov al, es:SSC_attrs.CA_border mov ds:NSSCAC_borderInfo, al mov al, es:SSC_borderIndeterminates mov ds:NSSCAC_borderIndeterminates, al ; ; Copy border color ; movdw ds:NSSCAC_borderColor, es:SSC_attrs.CA_borderAttrs.AI_color, ax ; ; Copy border mask ; mov al, es:SSC_attrs.CA_borderAttrs.AI_grayScreen mov ds:NSSCAC_borderGrayScreen, al ; ; Copy the flags ; mov ax, es:SSC_cellFlags mov ds:NSSCAC_borderColorIndeterminates, ax .leave ret GenCellAttrsNotify endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenCellNotesNotify %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Generate cell notes notification CALLED BY: SS_SendNotification() PASS: bx:si - ptr to Spreadsheet instance RETURN: bx - handle of notification (locked) DESTROYED: ax, cx, dx, ds PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: This routine allocates its own notification block. REVISION HISTORY: Name Date Description ---- ---- ----------- gene 8/ 5/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenCellNotesNotify proc near uses bp, si, di, es .enter mov ds, bx ;ds:si <- ptr to spreadsheet mov di, si ;ds:di <- ptr to spreadsheet call SpreadsheetGetNoteForActiveCell ; ; We lock the notification block because code later will unlock it ; mov bx, dx ;bx <- handle of text call MemLock .leave ret GenCellNotesNotify endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenDataRangeNotify %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Generate data range notification CALLED BY: SS_SendNotification() PASS: bx:si - ptr to Spreadsheet instance ds - seg addr of NotifySSheetDataRangeChange RETURN: none DESTROYED: ax, cx, dx, ds PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- gene 8/14/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenDataRangeNotify proc near uses si, di, bp, es, ds class SpreadsheetClass .enter segmov es, ds ;es <- seg addr of notification ; ; Get the range of cells with data and store it ; mov ds, bx ;ds:si <- ptr to spreadsheet mov di, SET_NO_EMPTY_CELLS_NO_HDR_FTR call CallRangeExtentWholeSheet mov es:NSSDRC_range.CR_start.CR_row, ax mov es:NSSDRC_range.CR_start.CR_column, cx mov es:NSSDRC_range.CR_end.CR_row, dx mov es:NSSDRC_range.CR_end.CR_column, bx ; ; Also return the selected range, because it's convienent ; mov cx, (size CellRange)/(size word) lea si, ds:[si].SSI_selected ;ds:si <- ptr to source mov di, offset NSSDRC_selection ;es:di <- ptr to dest rep movsw ;copy me jesus .leave ret GenDataRangeNotify endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenFormatNotify %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Send a NotifyFloatFormatChange notification CALLED BY: SS_SendNotification() PASS: ds - seg addr of NotifyFloatFormatChange es - seg addr of SpreadsheetStyleChange block bx:si - ptr to spreadsheet instance RETURN: none DESTROYED: ds PSEUDO CODE/STRATEGY: NotifyFloatFormatChange struc NFFC_vmFileHan word NFFC_vmBlkHan word NFFC_format word NFFC_count word NotifyFloatFormatChange ends KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cheng 10/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenFormatNotify proc near uses es class SpreadsheetClass .enter mov ax, es:SSC_attrs.CA_format test es:SSC_cellFlags, mask SCF_FORMATS jz notIndeterminate mov ax, FORMAT_ID_INDETERMINATE notIndeterminate: segmov es, ds mov ds, bx mov es:NFFC_format, ax mov ax, ds:[si].SSI_cellParams.CFP_file mov es:NFFC_vmFileHan, ax mov ax, ds:[si].SSI_formatArray mov es:NFFC_vmBlkHan, ax ; ; force notification, if caller wants to ; NOFXIP< segmov ds, <segment idata>, ax > FXIP< mov_tr ax, bx ;save bx value > FXIP< mov bx, handle dgroup > FXIP< call MemDerefDS ;ds = dgroup > FXIP< mov_tr bx, ax ;restore bx value > mov ax, ds:formatCount mov es:NFFC_count, ax .leave ret GenFormatNotify endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenFormatInitNotify %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Send a NotifyFloatFormatChange notification CALLED BY: SS_SendNotification() PASS: ds - seg addr of NotifyFloatFormatChange bx:si - ptr to spreadsheet instance RETURN: none DESTROYED: ds PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cheng 10/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenFormatInitNotify proc near uses es class SpreadsheetClass .enter ; ; format field not used by Init code, but set it anyways ; segmov es, ds mov ds, bx mov es:NFFC_format, FORMAT_ID_INDETERMINATE mov ax, ds:[si].SSI_cellParams.CFP_file mov es:NFFC_vmFileHan, ax mov ax, ds:[si].SSI_formatArray mov es:NFFC_vmBlkHan, ax ; ; force notification ; NOFXIP< segmov ds, <segment idata>, ax > FXIP< mov_tr ax, bx ;save bx value > FXIP< mov bx, handle dgroup > FXIP< call MemDerefDS ;ds = dgroup > FXIP< mov_tr bx, ax ;restore bx value > inc ds:formatCount mov ax, ds:formatCount mov es:NFFC_count, ax .leave ret GenFormatInitNotify endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenNameChangeNotify %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Send a NotifySSheetNameChange notification CALLED BY: SS_SendNotification() PASS: ds - seg addr of NotifySSheetNameChange bx:si - ptr to spreadsheet instance RETURN: none DESTROYED: ds PSEUDO CODE/STRATEGY: NotifySSheetNameChange struc NSSNC_count word NotifySSheetNameChange ends KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cassie 3/ 9/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenNameChangeNotify proc near uses es class SpreadsheetClass .enter ; ; force notification ; segmov es, ds FXIP< mov_tr ax, bx ;save bx value > FXIP< mov bx, handle dgroup > FXIP< call MemDerefDS ;ds = dgroup > FXIP< mov_tr bx, ax ;restore bx value > NOFXIP< segmov ds, <segment idata>, ax > inc ds:formatCount mov ax, ds:formatCount mov es:NSSNC_count, ax .leave ret GenNameChangeNotify endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SendNotification %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Send notification block to output of spreadsheet CALLED BY: SS_SendNotification() PASS: ds:si - ptr to Spreadsheet instance bx - handle of notification block (locked) or 0 for NULL status event di - offset of NotifStruct RETURN: none DESTROYED: bx (handle free'd), dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 12/19/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SendNotification proc near uses ax, cx, bp, di, si .enter push cs:[di].NS_appType ;<- GeoWorksGenAppGCNListType mov dx, cs:[di].NS_gcnType ;dx <- GeoWorksNotificationType tst bx ;any block? jz noHandle ;branch if NULL status event call MemUnlock ; ; Initialize reference count for two (2) sends below ; mov ax, 1 ;ax <- reference count call MemInitRefCount noHandle: ; ; Record the notification event ; push si, bp mov bp, bx ;bp <- handle of notification mov cx, MANUFACTURER_ID_GEOWORKS ;cx <- ManufacturerID mov ax, MSG_META_NOTIFY_WITH_DATA_BLOCK mov di, mask MF_RECORD ;di <- MessageFlags call ObjMessage ;di <- recorded event pop si, bp pop ax ;ax <- GeoWorksGenAppGCNListType ; ; Send the recorded notification event to the application object ; mov dx, size GCNListMessageParams ;dx <- size of stack frame sub sp, dx ;create stack frame mov bp, sp mov ss:[bp].GCNLMP_ID.GCNLT_manuf, MANUFACTURER_ID_GEOWORKS mov ss:[bp].GCNLMP_ID.GCNLT_type, ax mov ss:[bp].GCNLMP_block, bx mov ss:[bp].GCNLMP_event, di ; ; Set appropriate flags ; mov ax, mask GCNLSF_SET_STATUS tst bx jnz afterTransitionCheck ornf ax, mask GCNLSF_IGNORE_IF_STATUS_TRANSITIONING afterTransitionCheck: mov ss:[bp].GCNLMP_flags, ax ; ; Send the recorded event off to the GCN list in the app obj ; mov ax, MSG_META_GCN_LIST_SEND clr bx ;bx <- use current process call GeodeGetAppObject ;^lbx:si <- OD of app object mov di, mask MF_STACK call ObjMessage add sp, dx ;clean up stack done:: .leave ret SendNotification endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CreateSSNotify %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Create a SpreadsheetStyleChange notification block CALLED BY: SS_SendNotification() PASS: ds:si - ptr to Spreadsheet instance data RETURN: es - seg addr of SpreadsheetStyleChange block bx - handle of SpreadsheetStyleChange block carry - set if error DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 3/ 5/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CreateSSNotify proc near uses ax, cx, dx, di class SpreadsheetClass .enter ; ; Allocate a block for the SpreadsheetStyleChange ; (which we send to the UI stuff) ; mov ax, (size SpreadsheetStyleChange) mov cl, mask HF_SWAPABLE or mask HF_SHARABLE mov ch, mask HAF_LOCK or mask HAF_ZERO_INIT call MemAlloc mov es, ax ;es <- seg addr of block LONG jc done ;branch if error in allocation push bx clr bx ;bx <- no current attrs mov ax, ds:[si].SSI_selected.CR_start.CR_row mov cx, ds:[si].SSI_selected.CR_start.CR_column call GetCurCellAttrs ;ax <- current cell attributes mov di, offset SSC_attrs ;es:di <- ptr to buffer call StyleGetStyleByTokenFar ;get styles for cell ; ; Check row heights of selection ; mov cx, ds:[si].SSI_selected.CR_start.CR_row mov dx, ds:[si].SSI_selected.CR_end.CR_row call GetRowDiffs mov es:SSC_rowHeight, ax jnc notMultipleRows ornf es:SSC_cellFlags, mask SCF_ROWS notMultipleRows: ; ; Check column widths of selection ; mov cx, ds:[si].SSI_selected.CR_start.CR_column mov dx, ds:[si].SSI_selected.CR_end.CR_column call GetColumnDiffs mov es:SSC_columnWidth, ax jnc notMultipleColumns ornf es:SSC_cellFlags, mask SCF_COLUMNS notMultipleColumns: ; ; If the selection is a single cell, we're done ; call SingleCell? jc singleCell ;branch if single cell ; ; Cycle through the selection and figure out if any ; attributes are different than what we already have. ; call CheckSelectionStyle singleCell: pop bx ;bx <- handle of memory block clc ;carry <- no error done: .leave ret CreateSSNotify endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CheckSelectionStyle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Check style of selection by cycling through each cell CALLED BY: NotifyStyleChange() PASS: ds:si - ptr to Spreadsheet instance es - seg addr of SpreadsheetStyleChange block RETURN: none DESTROYED: ax, bx, cx, dx, di PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 4/30/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CheckSelectionStyle proc near class SpreadsheetClass locals local CellLocals .enter ; ; Cycle through selection and check style of each cell. ; ; Previously, we just cycled through each cell in the ; selection that actually existed, and if not all cells ; were called back for, we added in the default attrs. ; ; To account for default column attributes, we need ; to do this on a column-by-column basis. ; mov ss:locals.CL_data1, es ;pass data word #1 mov ss:locals.CL_params.REP_callback.segment, SEGMENT_CS mov ss:locals.CL_params.REP_callback.offset, \ offset CheckCellStyleCallback mov ax, ds:[si].SSI_selected.CR_start.CR_row mov cx, ds:[si].SSI_selected.CR_start.CR_column mov bx, ds:[si].SSI_selected.CR_end.CR_row mov dx, ds:[si].SSI_selected.CR_end.CR_column ; ; We don't call CallRangeEnum() because some of the arguments ; are constant, and we really don't want it to reinitialize ; the CL_styleToken field each time we call it, so attributes ; we've seen before carry over from column to column. ; mov ss:locals.CL_styleToken, -1 ;no styles set yet mov ss:locals.CL_params.REP_bounds.R_top, ax mov ss:locals.CL_params.REP_bounds.R_bottom, bx mov ss:locals.CL_instanceData.segment, ds mov ss:locals.CL_instanceData.offset, si columnLoop: push dx ; ; Callback for current column only, only data cells ; clr ss:locals.CL_data2 ;data2 <- cell count mov ss:locals.CL_params.REP_bounds.R_left, cx mov ss:locals.CL_params.REP_bounds.R_right, cx clr dl ;dl <- RangeEnumFlags lea bx, ss:locals.CL_params ;ss:bx <- ptr to args CheckHack <offset SSI_cellParams eq 0 > call RangeEnum ; ; Figure out if all the cells had data or not. If so, ; we've got all the attribute information we need. If not, ; we need to add the default attributes for this column. ; mov ax, ds:[si].SSI_selected.CR_end.CR_row sub ax, ds:[si].SSI_selected.CR_start.CR_row inc ax ;ax <- # of cells in column cmp ax, ss:locals.CL_data2 je gotAttrs call ColumnGetDefaultAttrs mov ax, dx ;ax <- default attrs for column call AddStyleDiffs gotAttrs: ; ; Go to the next column ; pop dx inc cx ;cx <- next column cmp cx, dx ;done all columns? jbe columnLoop ;branch while more columns .leave ret CheckSelectionStyle endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CheckCellStyleCallback %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Check style of cell in selected range CALLED BY: NotifyStyleChange() via RangeEnum() PASS: ss:bp - ptr to CallRangeEnum() local variables ds:si - ptr to SpreadsheetInstance data (ax,cx) - cell coordinates (r,c) *es:di - ptr to cell data, if any ss:bp.CL_data1 - seg addr of SpreadsheetStyleChange block ss:bp.CL_data2 - count of cells with data RETURN: carry - set to abort enum DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 4/30/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CheckCellStyleCallback proc far uses ax, di locals local CellLocals .enter inherit inc ss:locals.CL_data2 ;update cell count mov di, es:[di] ;es:di <- ptr to cell data mov ax, es:[di].CC_attrs ;ax <- cell style token cmp ax, ss:locals.CL_styleToken ;same style as before? je done ;branch if already recorded call AddStyleDiffs ;add differences in styles done: clc ;carry <- don't abort .leave ret CheckCellStyleCallback endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AddStyleDiffs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Add differences in styles for a cell CALLED BY: CheckCellStyle() PASS: ax - style token of cell to add ss:bp.CL_data1 - seg addr of SpreadsheetStyleChange block RETURN: none DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 5/15/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ AddStyleDiffs proc near uses ax, dx, di, es, ds locals local CellLocals .enter inherit ; ; The cell has a different style than the previous cell, so ; get the current attribytes ; mov ss:locals.CL_styleToken, ax ;mark style as recorded segmov es, ss lea di, ss:locals.CL_cellAttrs ;es:di <- ptr to buffer call StyleGetStyleByTokenFar mov ds, ss:locals.CL_data1 ;ds <- seg addr of style block mov dx, ds:SSC_textFlags ;dx <- VisTextCharAttrFlags ; ; Compare the current cell attributes ; mov al, ds:SSC_attrs.CA_justification mov ah, ss:locals.CL_cellAttrs.CA_justification cmp al, ah je noJustificationChange ornf ds:SSC_cellFlags, mask SCF_JUSTIFICATIONS noJustificationChange: mov ax, ds:SSC_attrs.CA_format cmp ax, ss:locals.CL_cellAttrs.CA_format je noFormatChange ornf ds:SSC_cellFlags, mask SCF_FORMATS noFormatChange: mov ax, ds:SSC_attrs.CA_pointsize cmp ax, ss:locals.CL_cellAttrs.CA_pointsize je noPointsizeChange ornf dx, mask VTCAF_MULTIPLE_POINT_SIZES noPointsizeChange: mov ax, ds:SSC_attrs.CA_font cmp ax, ss:locals.CL_cellAttrs.CA_font je noFontChange ornf dx, mask VTCAF_MULTIPLE_FONT_IDS noFontChange: ; ; Check TextStyle ; mov al, ds:SSC_attrs.CA_style mov ah, ss:locals.CL_cellAttrs.CA_style xor al, ah ;al <- non-matching bits ornf ds:SSC_styleIndeterminates, al ;indicate style different ; ; Check text color ; mov ax, {word}ds:SSC_attrs.CA_textAttrs.AI_color.CQ_redOrIndex cmp ax, {word}ss:locals.CL_cellAttrs.CA_textAttrs.AI_color.CQ_redOrIndex jnz textColorChange mov ax, {word}ds:SSC_attrs.CA_textAttrs.AI_color.CQ_green cmp ax, {word}ss:locals.CL_cellAttrs.CA_textAttrs.AI_color.CQ_green je noTextColorChange textColorChange: ornf dx, mask VTCAF_MULTIPLE_COLORS noTextColorChange: mov al, ds:SSC_attrs.CA_textAttrs.AI_grayScreen cmp al, ss:locals.CL_cellAttrs.CA_textAttrs.AI_grayScreen je noGrayScreenChange ornf dx, mask VTCAF_MULTIPLE_GRAY_SCREENS noGrayScreenChange: ; ; Check background color ; mov ax, {word}ds:SSC_attrs.CA_bgAttrs.AI_color.CQ_redOrIndex cmp ax, {word}ss:locals.CL_cellAttrs.CA_bgAttrs.AI_color.CQ_redOrIndex jnz backColorChange mov ax, {word}ds:SSC_attrs.CA_bgAttrs.AI_color.CQ_green cmp ax, {word}ss:locals.CL_cellAttrs.CA_bgAttrs.AI_color.CQ_green je noBackColorChange backColorChange: ornf dx, mask VTCAF_MULTIPLE_BG_COLORS noBackColorChange: mov al, ds:SSC_attrs.CA_bgAttrs.AI_grayScreen cmp al, ss:locals.CL_cellAttrs.CA_bgAttrs.AI_grayScreen je noBGGrayScreenChange ornf dx, mask VTCAF_MULTIPLE_BG_GRAY_SCREENS noBGGrayScreenChange: ; ; Deal with track kerning, font width and font weight ; mov ax, {word}ds:SSC_attrs.CA_trackKern cmp ax, {word}ss:locals.CL_cellAttrs.CA_trackKern je noTrackKerningChange ornf dx, mask VTCAF_MULTIPLE_TRACK_KERNINGS noTrackKerningChange: mov ax, {word}ds:SSC_attrs.CA_fontWeight CheckHack <(offset CA_fontWidth) eq (offset CA_fontWeight)+1> cmp al, ss:locals.CL_cellAttrs.CA_fontWeight je noFontWeightChange ornf dx, mask VTCAF_MULTIPLE_FONT_WEIGHTS noFontWeightChange: cmp ah, ss:locals.CL_cellAttrs.CA_fontWidth je noFontWidthChange ornf dx, mask VTCAF_MULTIPLE_FONT_WIDTHS noFontWidthChange: ; ; Store (new) VisTextCharAttrFlags ; mov ds:SSC_textFlags, dx ; ; Deal with cell borders ; mov al, ds:SSC_attrs.CA_border mov ah, ss:locals.CL_cellAttrs.CA_border xor al, ah ;al <- non-matching bits ornf ds:SSC_borderIndeterminates, al ;indicate borders different not al ;al <- matching bits andnf ds:SSC_attrs.CA_border, al ;clear non-matching bits ; ; Deal with cell border color ; cmpdw ds:SSC_attrs.CA_borderAttrs.AI_color, \ ss:locals.CL_cellAttrs.CA_borderAttrs.AI_color, ax je noBorderColorChange ornf ds:SSC_cellFlags, mask SCF_BORDER_COLORS noBorderColorChange: ; ; Deal with cell border gray screen ; mov al, ds:SSC_attrs.CA_borderAttrs.AI_grayScreen cmp al, ss:locals.CL_cellAttrs.CA_borderAttrs.AI_grayScreen je noBorderGrayChange ornf ds:SSC_cellFlags, mask SCF_BORDER_GRAY_SCREENS noBorderGrayChange: .leave ret AddStyleDiffs endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SpreadsheetForceControllerUpdate %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Force the spreadsheet to send a notification CALLED BY: MSG_META_UI_FORCE_CONTROLLER_UPDATE PASS: *ds:si - instance data ds:di - *ds:si es - seg addr of SpreadsheetClass ax - the message cx - manufacturer ID dx - NotificationType (GeoWorksNotificationType) (or 0xffff:0xffff to update all) RETURN: none DESTROYED: bx, si, di, ds, es (method handler) PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- gene 8/14/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SpreadsheetForceControllerUpdate method dynamic SpreadsheetClass, MSG_META_UI_FORCE_CONTROLLER_UPDATE mov si, di ;ds:si <- ptr to spreadsheet ; ; See if we're updating everything ; cmp cx, 0xffff jne notAll cmp dx, 0xffff je sendNotificationAll ; ; If it's not GeoWorks', we don't support it ; notAll: cmp cx, MANUFACTURER_ID_GEOWORKS jne done ; ; Find it in the table ; mov di, offset notificationTable mov cx, length notificationTable mov ax, 0x0001 CheckHack <offset SNF_EDIT_ENABLE eq 0> searchLoop: cmp dx, cs:[di].NS_gcnType ;right notification? CheckHack <segment SpreadsheetForceControllerUpdate eq segment notificationTable> je sendNotification shl ax, 1 ;ax <- try next bit add di, (size NotifStruct) ;cs:di <- next entry loop searchLoop done: ret sendNotificationAll: mov ax, mask SpreadsheetNotifyFlags sendNotification: call SS_ForceNotification ret SpreadsheetForceControllerUpdate endm AttrCode ends
27.25614
82
0.644825
a1be8bd2e7b552db1caba5bbd1210871629bf194
1,419
asm
Assembly
programs/oeis/114/A114964.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/114/A114964.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/114/A114964.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A114964: a(n) = n^2 + 30. ; 30,31,34,39,46,55,66,79,94,111,130,151,174,199,226,255,286,319,354,391,430,471,514,559,606,655,706,759,814,871,930,991,1054,1119,1186,1255,1326,1399,1474,1551,1630,1711,1794,1879,1966,2055,2146,2239,2334,2431,2530,2631,2734,2839,2946,3055,3166,3279,3394,3511,3630,3751,3874,3999,4126,4255,4386,4519,4654,4791,4930,5071,5214,5359,5506,5655,5806,5959,6114,6271,6430,6591,6754,6919,7086,7255,7426,7599,7774,7951,8130,8311,8494,8679,8866,9055,9246,9439,9634,9831,10030,10231,10434,10639,10846,11055,11266,11479,11694,11911,12130,12351,12574,12799,13026,13255,13486,13719,13954,14191,14430,14671,14914,15159,15406,15655,15906,16159,16414,16671,16930,17191,17454,17719,17986,18255,18526,18799,19074,19351,19630,19911,20194,20479,20766,21055,21346,21639,21934,22231,22530,22831,23134,23439,23746,24055,24366,24679,24994,25311,25630,25951,26274,26599,26926,27255,27586,27919,28254,28591,28930,29271,29614,29959,30306,30655,31006,31359,31714,32071,32430,32791,33154,33519,33886,34255,34626,34999,35374,35751,36130,36511,36894,37279,37666,38055,38446,38839,39234,39631,40030,40431,40834,41239,41646,42055,42466,42879,43294,43711,44130,44551,44974,45399,45826,46255,46686,47119,47554,47991,48430,48871,49314,49759,50206,50655,51106,51559,52014,52471,52930,53391,53854,54319,54786,55255,55726,56199,56674,57151,57630,58111,58594,59079,59566,60055,60546,61039,61534,62031 mov $1,$0 pow $1,2 add $1,30
202.714286
1,360
0.801973
78fba621350bfc43027f737843e54704f9527f32
709
asm
Assembly
oeis/038/A038279.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/038/A038279.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/038/A038279.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A038279: Triangle whose (i,j)-th entry is binomial(i,j)*8^(i-j)*1^j. ; Submitted by Christian Krause ; 1,8,1,64,16,1,512,192,24,1,4096,2048,384,32,1,32768,20480,5120,640,40,1,262144,196608,61440,10240,960,48,1,2097152,1835008,688128,143360,17920,1344,56,1,16777216,16777216,7340032,1835008,286720,28672,1792,64,1,134217728,150994944,75497472,22020096,4128768,516096,43008,2304,72,1,1073741824,1342177280,754974720,251658240,55050240,8257536,860160,61440,2880,80,1,8589934592,11811160064,7381975040,2768240640,692060160,121110528,15138816,1351680,84480,3520,88,1,68719476736,103079215104,70866960384 lpb $0 add $1,1 sub $0,$1 mov $2,$1 sub $2,$0 lpe bin $1,$0 mov $0,8 pow $0,$2 mul $1,$0 mov $0,$1
44.3125
497
0.760226
cf57dcf9fe22ea01b6b26ac75482209206150d09
1,137
asm
Assembly
programs/oeis/177/A177018.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/177/A177018.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/177/A177018.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A177018: a(n) is the smallest integer >= a(n-1) such that a(n) + A067076(n) + n-1 is an odd prime. ; 3,3,3,4,4,5,5,6,8,8,10,11,11,12,14,16,16,18,19,19,21,22,24,27,28,28,29,29,30,36,37,39,39,43,43,45,47,48,50,52,52,56,56,57,57,62,67,68,68,69,71,71,75,77,79,81,81,83,84,84,88,94,95,95,96,102,104,108,108,109,111,114,116,118,119,121,124,125,128,132,132,136,136,138,139,141,144,145,145,146,151,154,155,158,159,161,166,166,174,176,180,182,184,184,186,190,192,194,194,196,198,199,199,204,208,208,209,211,213,213,218,219,221,224,228,231,235,238,240,242,243,246,248,249,252,253,259,263,268,268,272,272,273,273,277,283,284,284,285,291,292,292,293,302,303,306,310,313,314,316,318,324,325,327,329,332,334,339,340,342,342,346,346,348,352,352,356,356,358,366,367,367,368,370,372,375,377,379,389,389,393,396,400,402,404,407,412,413,415,417,417,419,424,428,436,436,437,439,439,441,442,442,443,448,448,450,466,468,470,473,481,485,491,492,492,493,495,498,499,499,501,506,510,510,511,511,512,514,519,524,527,532,534,535,537,540,541,544,545,551 add $0,1 cal $0,173072 ; n-th prime minus n-th even number. add $0,12 mov $1,$0 sub $1,13 div $1,2 add $1,3
103.363636
926
0.709763
233ae4fb6207193c46ae8389bdf1761e6404c53c
342
asm
Assembly
programs/oeis/084/A084964.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/084/A084964.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/084/A084964.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A084964: Follow n+2 by n. Also solution of a(n+2)=a(n)+1, a(0)=2, a(1)=0. ; 2,0,3,1,4,2,5,3,6,4,7,5,8,6,9,7,10,8,11,9,12,10,13,11,14,12,15,13,16,14,17,15,18,16,19,17,20,18,21,19,22,20,23,21,24,22,25,23,26,24,27,25,28,26,29,27,30,28,31,29,32,30,33,31,34,32,35,33,36,34,37,35,38,36,39 mov $1,$0 mod $1,2 gcd $1,6 add $1,$0 sub $1,2 div $1,2
34.2
208
0.602339
cafea22883789311bcf036360111d789a6c789c6
1,177
asm
Assembly
ADL/Assemble/Update/0/S~HR_sort_dec.asm
MaxMorning/LinkedListVisualization
b2a4f8f11ff6f6dfb495566a006e3472f1dac369
[ "Apache-2.0" ]
3
2021-11-06T03:47:08.000Z
2021-11-06T03:47:11.000Z
ADL/Assemble/Update/0/S~HR_sort_dec.asm
MaxMorning/LinkedListVisualization
b2a4f8f11ff6f6dfb495566a006e3472f1dac369
[ "Apache-2.0" ]
null
null
null
ADL/Assemble/Update/0/S~HR_sort_dec.asm
MaxMorning/LinkedListVisualization
b2a4f8f11ff6f6dfb495566a006e3472f1dac369
[ "Apache-2.0" ]
1
2021-11-06T03:47:14.000Z
2021-11-06T03:47:14.000Z
aLine 0 gNew basePtr gMove basePtr, Root gNewVPtr minNext aLine 1 gNew basePrev gMove basePrev, null gNew minPtr, 1085, 800 gNew minPrev, 1085, 860 gNew currentPtr, 1085, 920 gNew currentPrev, 1085, 980 aLine 2 gBeq basePtr, null, 46 aLine 4 gMove minPtr, basePtr aLine 5 gMove minPrev, basePrev aLine 6 gMoveNext currentPtr, basePtr aLine 7 gMove currentPrev, basePtr aLine 8 gBeq currentPtr, null, 12 aLine 9 vBle minPtr, currentPtr, 5 aLine 10 gMove minPrev, currentPrev aLine 11 gMove minPtr, currentPtr aLine 13 gMove currentPrev, currentPtr aLine 14 gMoveNext currentPtr, currentPtr Jmp -12 aLine 17 gBne minPtr, basePtr, 3 aLine 18 gMoveNext basePtr, basePtr aLine 20 gBne basePrev, null, 5 aLine 21 gMove basePrev, minPtr aLine 22 gMove Rear, minPtr aLine 24 gBeq minPrev, null, 12 aLine 25 gMoveNext minNext, minPtr nMoveRel minPtr, minPtr, 0, -164.545 pSetNext minPrev, minNext aLine 26 pDeleteNext minPtr nMoveRel minPtr, Root, -95, -164.545 pSetNext minPtr, Root aLine 27 gMove Root, minPtr aStd Jmp -46 aLine 30 gDelete basePrev gDelete basePtr gDelete minNext gDelete minPtr gDelete minPrev gDelete currentPtr gDelete currentPrev aStd Halt
12.793478
36
0.788445
eef019e55d5ed1401f5404e11f4296cbf46f3961
48,213
asm
Assembly
init.asm
B10401023/xv6
11a20ff688c7f9ec395a9a29342a284f53645c6b
[ "MIT-0" ]
null
null
null
init.asm
B10401023/xv6
11a20ff688c7f9ec395a9a29342a284f53645c6b
[ "MIT-0" ]
null
null
null
init.asm
B10401023/xv6
11a20ff688c7f9ec395a9a29342a284f53645c6b
[ "MIT-0" ]
null
null
null
_init: file format elf32-i386 Disassembly of section .text: 00000000 <main>: char *argv[] = { "sh", 0 }; int main(void) { 0: 8d 4c 24 04 lea 0x4(%esp),%ecx 4: 83 e4 f0 and $0xfffffff0,%esp 7: ff 71 fc pushl -0x4(%ecx) a: 55 push %ebp b: 89 e5 mov %esp,%ebp d: 53 push %ebx e: 51 push %ecx int pid, wpid; chpr(getpid(), 1); f: e8 ae 03 00 00 call 3c2 <getpid> 14: 83 ec 08 sub $0x8,%esp 17: 6a 01 push $0x1 19: 50 push %eax 1a: e8 d3 03 00 00 call 3f2 <chpr> if(open("console", O_RDWR) < 0){ 1f: 58 pop %eax 20: 5a pop %edx 21: 6a 02 push $0x2 23: 68 e0 07 00 00 push $0x7e0 28: e8 55 03 00 00 call 382 <open> 2d: 83 c4 10 add $0x10,%esp 30: 85 c0 test %eax,%eax 32: 0f 88 a0 00 00 00 js d8 <main+0xd8> mknod("console", 1, 1); open("console", O_RDWR); } dup(0); // stdout 38: 83 ec 0c sub $0xc,%esp 3b: 6a 00 push $0x0 3d: e8 78 03 00 00 call 3ba <dup> dup(0); // stderr 42: c7 04 24 00 00 00 00 movl $0x0,(%esp) 49: e8 6c 03 00 00 call 3ba <dup> #ifdef DEFAULT printf(1, "Scheduler policy: DEFAULT\n"); 4e: 58 pop %eax 4f: 5a pop %edx 50: 68 e8 07 00 00 push $0x7e8 55: 6a 01 push $0x1 57: e8 64 04 00 00 call 4c0 <printf> 5c: 83 c4 10 add $0x10,%esp 5f: 90 nop #endif #endif #endif for(;;){ printf(1, "init: starting sh\n"); 60: 83 ec 08 sub $0x8,%esp 63: 68 03 08 00 00 push $0x803 68: 6a 01 push $0x1 6a: e8 51 04 00 00 call 4c0 <printf> pid = fork(); 6f: e8 c6 02 00 00 call 33a <fork> if(pid < 0){ 74: 83 c4 10 add $0x10,%esp 77: 85 c0 test %eax,%eax #endif #endif for(;;){ printf(1, "init: starting sh\n"); pid = fork(); 79: 89 c3 mov %eax,%ebx if(pid < 0){ 7b: 78 24 js a1 <main+0xa1> printf(1, "init: fork failed\n"); exit(); } if(pid == 0){ 7d: 74 35 je b4 <main+0xb4> 7f: 90 nop exec("sh", argv); printf(1, "init: exec sh failed\n"); exit(); } while((wpid=wait()) >= 0 && wpid != pid) 80: e8 c5 02 00 00 call 34a <wait> 85: 85 c0 test %eax,%eax 87: 78 d7 js 60 <main+0x60> 89: 39 c3 cmp %eax,%ebx 8b: 74 d3 je 60 <main+0x60> printf(1, "zombie!\n"); 8d: 83 ec 08 sub $0x8,%esp 90: 68 42 08 00 00 push $0x842 95: 6a 01 push $0x1 97: e8 24 04 00 00 call 4c0 <printf> 9c: 83 c4 10 add $0x10,%esp 9f: eb df jmp 80 <main+0x80> for(;;){ printf(1, "init: starting sh\n"); pid = fork(); if(pid < 0){ printf(1, "init: fork failed\n"); a1: 53 push %ebx a2: 53 push %ebx a3: 68 16 08 00 00 push $0x816 a8: 6a 01 push $0x1 aa: e8 11 04 00 00 call 4c0 <printf> exit(); af: e8 8e 02 00 00 call 342 <exit> } if(pid == 0){ exec("sh", argv); b4: 50 push %eax b5: 50 push %eax b6: 68 f0 0a 00 00 push $0xaf0 bb: 68 29 08 00 00 push $0x829 c0: e8 b5 02 00 00 call 37a <exec> printf(1, "init: exec sh failed\n"); c5: 5a pop %edx c6: 59 pop %ecx c7: 68 2c 08 00 00 push $0x82c cc: 6a 01 push $0x1 ce: e8 ed 03 00 00 call 4c0 <printf> exit(); d3: e8 6a 02 00 00 call 342 <exit> int pid, wpid; chpr(getpid(), 1); if(open("console", O_RDWR) < 0){ mknod("console", 1, 1); d8: 51 push %ecx d9: 6a 01 push $0x1 db: 6a 01 push $0x1 dd: 68 e0 07 00 00 push $0x7e0 e2: e8 a3 02 00 00 call 38a <mknod> open("console", O_RDWR); e7: 5b pop %ebx e8: 58 pop %eax e9: 6a 02 push $0x2 eb: 68 e0 07 00 00 push $0x7e0 f0: e8 8d 02 00 00 call 382 <open> f5: 83 c4 10 add $0x10,%esp f8: e9 3b ff ff ff jmp 38 <main+0x38> fd: 66 90 xchg %ax,%ax ff: 90 nop 00000100 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, char *t) { 100: 55 push %ebp 101: 89 e5 mov %esp,%ebp 103: 53 push %ebx 104: 8b 45 08 mov 0x8(%ebp),%eax 107: 8b 4d 0c mov 0xc(%ebp),%ecx char *os; os = s; while((*s++ = *t++) != 0) 10a: 89 c2 mov %eax,%edx 10c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 110: 83 c1 01 add $0x1,%ecx 113: 0f b6 59 ff movzbl -0x1(%ecx),%ebx 117: 83 c2 01 add $0x1,%edx 11a: 84 db test %bl,%bl 11c: 88 5a ff mov %bl,-0x1(%edx) 11f: 75 ef jne 110 <strcpy+0x10> ; return os; } 121: 5b pop %ebx 122: 5d pop %ebp 123: c3 ret 124: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 12a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 00000130 <strcmp>: int strcmp(const char *p, const char *q) { 130: 55 push %ebp 131: 89 e5 mov %esp,%ebp 133: 56 push %esi 134: 53 push %ebx 135: 8b 55 08 mov 0x8(%ebp),%edx 138: 8b 4d 0c mov 0xc(%ebp),%ecx while(*p && *p == *q) 13b: 0f b6 02 movzbl (%edx),%eax 13e: 0f b6 19 movzbl (%ecx),%ebx 141: 84 c0 test %al,%al 143: 75 1e jne 163 <strcmp+0x33> 145: eb 29 jmp 170 <strcmp+0x40> 147: 89 f6 mov %esi,%esi 149: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi p++, q++; 150: 83 c2 01 add $0x1,%edx } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 153: 0f b6 02 movzbl (%edx),%eax p++, q++; 156: 8d 71 01 lea 0x1(%ecx),%esi } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 159: 0f b6 59 01 movzbl 0x1(%ecx),%ebx 15d: 84 c0 test %al,%al 15f: 74 0f je 170 <strcmp+0x40> 161: 89 f1 mov %esi,%ecx 163: 38 d8 cmp %bl,%al 165: 74 e9 je 150 <strcmp+0x20> p++, q++; return (uchar)*p - (uchar)*q; 167: 29 d8 sub %ebx,%eax } 169: 5b pop %ebx 16a: 5e pop %esi 16b: 5d pop %ebp 16c: c3 ret 16d: 8d 76 00 lea 0x0(%esi),%esi } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 170: 31 c0 xor %eax,%eax p++, q++; return (uchar)*p - (uchar)*q; 172: 29 d8 sub %ebx,%eax } 174: 5b pop %ebx 175: 5e pop %esi 176: 5d pop %ebp 177: c3 ret 178: 90 nop 179: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 00000180 <strlen>: uint strlen(char *s) { 180: 55 push %ebp 181: 89 e5 mov %esp,%ebp 183: 8b 4d 08 mov 0x8(%ebp),%ecx int n; for(n = 0; s[n]; n++) 186: 80 39 00 cmpb $0x0,(%ecx) 189: 74 12 je 19d <strlen+0x1d> 18b: 31 d2 xor %edx,%edx 18d: 8d 76 00 lea 0x0(%esi),%esi 190: 83 c2 01 add $0x1,%edx 193: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1) 197: 89 d0 mov %edx,%eax 199: 75 f5 jne 190 <strlen+0x10> ; return n; } 19b: 5d pop %ebp 19c: c3 ret uint strlen(char *s) { int n; for(n = 0; s[n]; n++) 19d: 31 c0 xor %eax,%eax ; return n; } 19f: 5d pop %ebp 1a0: c3 ret 1a1: eb 0d jmp 1b0 <memset> 1a3: 90 nop 1a4: 90 nop 1a5: 90 nop 1a6: 90 nop 1a7: 90 nop 1a8: 90 nop 1a9: 90 nop 1aa: 90 nop 1ab: 90 nop 1ac: 90 nop 1ad: 90 nop 1ae: 90 nop 1af: 90 nop 000001b0 <memset>: void* memset(void *dst, int c, uint n) { 1b0: 55 push %ebp 1b1: 89 e5 mov %esp,%ebp 1b3: 57 push %edi 1b4: 8b 55 08 mov 0x8(%ebp),%edx } static inline void stosb(void *addr, int data, int cnt) { asm volatile("cld; rep stosb" : 1b7: 8b 4d 10 mov 0x10(%ebp),%ecx 1ba: 8b 45 0c mov 0xc(%ebp),%eax 1bd: 89 d7 mov %edx,%edi 1bf: fc cld 1c0: f3 aa rep stos %al,%es:(%edi) stosb(dst, c, n); return dst; } 1c2: 89 d0 mov %edx,%eax 1c4: 5f pop %edi 1c5: 5d pop %ebp 1c6: c3 ret 1c7: 89 f6 mov %esi,%esi 1c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 000001d0 <strchr>: char* strchr(const char *s, char c) { 1d0: 55 push %ebp 1d1: 89 e5 mov %esp,%ebp 1d3: 53 push %ebx 1d4: 8b 45 08 mov 0x8(%ebp),%eax 1d7: 8b 5d 0c mov 0xc(%ebp),%ebx for(; *s; s++) 1da: 0f b6 10 movzbl (%eax),%edx 1dd: 84 d2 test %dl,%dl 1df: 74 1d je 1fe <strchr+0x2e> if(*s == c) 1e1: 38 d3 cmp %dl,%bl 1e3: 89 d9 mov %ebx,%ecx 1e5: 75 0d jne 1f4 <strchr+0x24> 1e7: eb 17 jmp 200 <strchr+0x30> 1e9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 1f0: 38 ca cmp %cl,%dl 1f2: 74 0c je 200 <strchr+0x30> } char* strchr(const char *s, char c) { for(; *s; s++) 1f4: 83 c0 01 add $0x1,%eax 1f7: 0f b6 10 movzbl (%eax),%edx 1fa: 84 d2 test %dl,%dl 1fc: 75 f2 jne 1f0 <strchr+0x20> if(*s == c) return (char*)s; return 0; 1fe: 31 c0 xor %eax,%eax } 200: 5b pop %ebx 201: 5d pop %ebp 202: c3 ret 203: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 209: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000210 <gets>: char* gets(char *buf, int max) { 210: 55 push %ebp 211: 89 e5 mov %esp,%ebp 213: 57 push %edi 214: 56 push %esi 215: 53 push %ebx int i, cc; char c; for(i=0; i+1 < max; ){ 216: 31 f6 xor %esi,%esi cc = read(0, &c, 1); 218: 8d 7d e7 lea -0x19(%ebp),%edi return 0; } char* gets(char *buf, int max) { 21b: 83 ec 1c sub $0x1c,%esp int i, cc; char c; for(i=0; i+1 < max; ){ 21e: eb 29 jmp 249 <gets+0x39> cc = read(0, &c, 1); 220: 83 ec 04 sub $0x4,%esp 223: 6a 01 push $0x1 225: 57 push %edi 226: 6a 00 push $0x0 228: e8 2d 01 00 00 call 35a <read> if(cc < 1) 22d: 83 c4 10 add $0x10,%esp 230: 85 c0 test %eax,%eax 232: 7e 1d jle 251 <gets+0x41> break; buf[i++] = c; 234: 0f b6 45 e7 movzbl -0x19(%ebp),%eax 238: 8b 55 08 mov 0x8(%ebp),%edx 23b: 89 de mov %ebx,%esi if(c == '\n' || c == '\r') 23d: 3c 0a cmp $0xa,%al for(i=0; i+1 < max; ){ cc = read(0, &c, 1); if(cc < 1) break; buf[i++] = c; 23f: 88 44 1a ff mov %al,-0x1(%edx,%ebx,1) if(c == '\n' || c == '\r') 243: 74 1b je 260 <gets+0x50> 245: 3c 0d cmp $0xd,%al 247: 74 17 je 260 <gets+0x50> gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 249: 8d 5e 01 lea 0x1(%esi),%ebx 24c: 3b 5d 0c cmp 0xc(%ebp),%ebx 24f: 7c cf jl 220 <gets+0x10> break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 251: 8b 45 08 mov 0x8(%ebp),%eax 254: c6 04 30 00 movb $0x0,(%eax,%esi,1) return buf; } 258: 8d 65 f4 lea -0xc(%ebp),%esp 25b: 5b pop %ebx 25c: 5e pop %esi 25d: 5f pop %edi 25e: 5d pop %ebp 25f: c3 ret break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 260: 8b 45 08 mov 0x8(%ebp),%eax gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 263: 89 de mov %ebx,%esi break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 265: c6 04 30 00 movb $0x0,(%eax,%esi,1) return buf; } 269: 8d 65 f4 lea -0xc(%ebp),%esp 26c: 5b pop %ebx 26d: 5e pop %esi 26e: 5f pop %edi 26f: 5d pop %ebp 270: c3 ret 271: eb 0d jmp 280 <stat> 273: 90 nop 274: 90 nop 275: 90 nop 276: 90 nop 277: 90 nop 278: 90 nop 279: 90 nop 27a: 90 nop 27b: 90 nop 27c: 90 nop 27d: 90 nop 27e: 90 nop 27f: 90 nop 00000280 <stat>: int stat(char *n, struct stat *st) { 280: 55 push %ebp 281: 89 e5 mov %esp,%ebp 283: 56 push %esi 284: 53 push %ebx int fd; int r; fd = open(n, O_RDONLY); 285: 83 ec 08 sub $0x8,%esp 288: 6a 00 push $0x0 28a: ff 75 08 pushl 0x8(%ebp) 28d: e8 f0 00 00 00 call 382 <open> if(fd < 0) 292: 83 c4 10 add $0x10,%esp 295: 85 c0 test %eax,%eax 297: 78 27 js 2c0 <stat+0x40> return -1; r = fstat(fd, st); 299: 83 ec 08 sub $0x8,%esp 29c: ff 75 0c pushl 0xc(%ebp) 29f: 89 c3 mov %eax,%ebx 2a1: 50 push %eax 2a2: e8 f3 00 00 00 call 39a <fstat> 2a7: 89 c6 mov %eax,%esi close(fd); 2a9: 89 1c 24 mov %ebx,(%esp) 2ac: e8 b9 00 00 00 call 36a <close> return r; 2b1: 83 c4 10 add $0x10,%esp 2b4: 89 f0 mov %esi,%eax } 2b6: 8d 65 f8 lea -0x8(%ebp),%esp 2b9: 5b pop %ebx 2ba: 5e pop %esi 2bb: 5d pop %ebp 2bc: c3 ret 2bd: 8d 76 00 lea 0x0(%esi),%esi int fd; int r; fd = open(n, O_RDONLY); if(fd < 0) return -1; 2c0: b8 ff ff ff ff mov $0xffffffff,%eax 2c5: eb ef jmp 2b6 <stat+0x36> 2c7: 89 f6 mov %esi,%esi 2c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 000002d0 <atoi>: return r; } int atoi(const char *s) { 2d0: 55 push %ebp 2d1: 89 e5 mov %esp,%ebp 2d3: 53 push %ebx 2d4: 8b 4d 08 mov 0x8(%ebp),%ecx int n; n = 0; while('0' <= *s && *s <= '9') 2d7: 0f be 11 movsbl (%ecx),%edx 2da: 8d 42 d0 lea -0x30(%edx),%eax 2dd: 3c 09 cmp $0x9,%al 2df: b8 00 00 00 00 mov $0x0,%eax 2e4: 77 1f ja 305 <atoi+0x35> 2e6: 8d 76 00 lea 0x0(%esi),%esi 2e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi n = n*10 + *s++ - '0'; 2f0: 8d 04 80 lea (%eax,%eax,4),%eax 2f3: 83 c1 01 add $0x1,%ecx 2f6: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax atoi(const char *s) { int n; n = 0; while('0' <= *s && *s <= '9') 2fa: 0f be 11 movsbl (%ecx),%edx 2fd: 8d 5a d0 lea -0x30(%edx),%ebx 300: 80 fb 09 cmp $0x9,%bl 303: 76 eb jbe 2f0 <atoi+0x20> n = n*10 + *s++ - '0'; return n; } 305: 5b pop %ebx 306: 5d pop %ebp 307: c3 ret 308: 90 nop 309: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 00000310 <memmove>: void* memmove(void *vdst, void *vsrc, int n) { 310: 55 push %ebp 311: 89 e5 mov %esp,%ebp 313: 56 push %esi 314: 53 push %ebx 315: 8b 5d 10 mov 0x10(%ebp),%ebx 318: 8b 45 08 mov 0x8(%ebp),%eax 31b: 8b 75 0c mov 0xc(%ebp),%esi char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) 31e: 85 db test %ebx,%ebx 320: 7e 14 jle 336 <memmove+0x26> 322: 31 d2 xor %edx,%edx 324: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi *dst++ = *src++; 328: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx 32c: 88 0c 10 mov %cl,(%eax,%edx,1) 32f: 83 c2 01 add $0x1,%edx { char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) 332: 39 da cmp %ebx,%edx 334: 75 f2 jne 328 <memmove+0x18> *dst++ = *src++; return vdst; } 336: 5b pop %ebx 337: 5e pop %esi 338: 5d pop %ebp 339: c3 ret 0000033a <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 33a: b8 01 00 00 00 mov $0x1,%eax 33f: cd 40 int $0x40 341: c3 ret 00000342 <exit>: SYSCALL(exit) 342: b8 02 00 00 00 mov $0x2,%eax 347: cd 40 int $0x40 349: c3 ret 0000034a <wait>: SYSCALL(wait) 34a: b8 03 00 00 00 mov $0x3,%eax 34f: cd 40 int $0x40 351: c3 ret 00000352 <pipe>: SYSCALL(pipe) 352: b8 04 00 00 00 mov $0x4,%eax 357: cd 40 int $0x40 359: c3 ret 0000035a <read>: SYSCALL(read) 35a: b8 05 00 00 00 mov $0x5,%eax 35f: cd 40 int $0x40 361: c3 ret 00000362 <write>: SYSCALL(write) 362: b8 10 00 00 00 mov $0x10,%eax 367: cd 40 int $0x40 369: c3 ret 0000036a <close>: SYSCALL(close) 36a: b8 15 00 00 00 mov $0x15,%eax 36f: cd 40 int $0x40 371: c3 ret 00000372 <kill>: SYSCALL(kill) 372: b8 06 00 00 00 mov $0x6,%eax 377: cd 40 int $0x40 379: c3 ret 0000037a <exec>: SYSCALL(exec) 37a: b8 07 00 00 00 mov $0x7,%eax 37f: cd 40 int $0x40 381: c3 ret 00000382 <open>: SYSCALL(open) 382: b8 0f 00 00 00 mov $0xf,%eax 387: cd 40 int $0x40 389: c3 ret 0000038a <mknod>: SYSCALL(mknod) 38a: b8 11 00 00 00 mov $0x11,%eax 38f: cd 40 int $0x40 391: c3 ret 00000392 <unlink>: SYSCALL(unlink) 392: b8 12 00 00 00 mov $0x12,%eax 397: cd 40 int $0x40 399: c3 ret 0000039a <fstat>: SYSCALL(fstat) 39a: b8 08 00 00 00 mov $0x8,%eax 39f: cd 40 int $0x40 3a1: c3 ret 000003a2 <link>: SYSCALL(link) 3a2: b8 13 00 00 00 mov $0x13,%eax 3a7: cd 40 int $0x40 3a9: c3 ret 000003aa <mkdir>: SYSCALL(mkdir) 3aa: b8 14 00 00 00 mov $0x14,%eax 3af: cd 40 int $0x40 3b1: c3 ret 000003b2 <chdir>: SYSCALL(chdir) 3b2: b8 09 00 00 00 mov $0x9,%eax 3b7: cd 40 int $0x40 3b9: c3 ret 000003ba <dup>: SYSCALL(dup) 3ba: b8 0a 00 00 00 mov $0xa,%eax 3bf: cd 40 int $0x40 3c1: c3 ret 000003c2 <getpid>: SYSCALL(getpid) 3c2: b8 0b 00 00 00 mov $0xb,%eax 3c7: cd 40 int $0x40 3c9: c3 ret 000003ca <sbrk>: SYSCALL(sbrk) 3ca: b8 0c 00 00 00 mov $0xc,%eax 3cf: cd 40 int $0x40 3d1: c3 ret 000003d2 <sleep>: SYSCALL(sleep) 3d2: b8 0d 00 00 00 mov $0xd,%eax 3d7: cd 40 int $0x40 3d9: c3 ret 000003da <uptime>: SYSCALL(uptime) 3da: b8 0e 00 00 00 mov $0xe,%eax 3df: cd 40 int $0x40 3e1: c3 ret 000003e2 <getptable>: SYSCALL(getptable) 3e2: b8 16 00 00 00 mov $0x16,%eax 3e7: cd 40 int $0x40 3e9: c3 ret 000003ea <getppid>: SYSCALL(getppid) 3ea: b8 17 00 00 00 mov $0x17,%eax 3ef: cd 40 int $0x40 3f1: c3 ret 000003f2 <chpr>: SYSCALL(chpr) 3f2: b8 18 00 00 00 mov $0x18,%eax 3f7: cd 40 int $0x40 3f9: c3 ret 000003fa <wait2>: SYSCALL(wait2) 3fa: b8 19 00 00 00 mov $0x19,%eax 3ff: cd 40 int $0x40 401: c3 ret 00000402 <yield>: SYSCALL(yield) 402: b8 1a 00 00 00 mov $0x1a,%eax 407: cd 40 int $0x40 409: c3 ret 0000040a <chtickets>: SYSCALL(chtickets) 40a: b8 1b 00 00 00 mov $0x1b,%eax 40f: cd 40 int $0x40 411: c3 ret 412: 66 90 xchg %ax,%ax 414: 66 90 xchg %ax,%ax 416: 66 90 xchg %ax,%ax 418: 66 90 xchg %ax,%ax 41a: 66 90 xchg %ax,%ax 41c: 66 90 xchg %ax,%ax 41e: 66 90 xchg %ax,%ax 00000420 <printint>: write(fd, &c, 1); } static void printint(int fd, int xx, int base, int sgn) { 420: 55 push %ebp 421: 89 e5 mov %esp,%ebp 423: 57 push %edi 424: 56 push %esi 425: 53 push %ebx 426: 89 c6 mov %eax,%esi 428: 83 ec 3c sub $0x3c,%esp char buf[16]; int i, neg; uint x; neg = 0; if(sgn && xx < 0){ 42b: 8b 5d 08 mov 0x8(%ebp),%ebx 42e: 85 db test %ebx,%ebx 430: 74 7e je 4b0 <printint+0x90> 432: 89 d0 mov %edx,%eax 434: c1 e8 1f shr $0x1f,%eax 437: 84 c0 test %al,%al 439: 74 75 je 4b0 <printint+0x90> neg = 1; x = -xx; 43b: 89 d0 mov %edx,%eax int i, neg; uint x; neg = 0; if(sgn && xx < 0){ neg = 1; 43d: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp) x = -xx; 444: f7 d8 neg %eax 446: 89 75 c0 mov %esi,-0x40(%ebp) } else { x = xx; } i = 0; 449: 31 ff xor %edi,%edi 44b: 8d 5d d7 lea -0x29(%ebp),%ebx 44e: 89 ce mov %ecx,%esi 450: eb 08 jmp 45a <printint+0x3a> 452: 8d b6 00 00 00 00 lea 0x0(%esi),%esi do{ buf[i++] = digits[x % base]; 458: 89 cf mov %ecx,%edi 45a: 31 d2 xor %edx,%edx 45c: 8d 4f 01 lea 0x1(%edi),%ecx 45f: f7 f6 div %esi 461: 0f b6 92 54 08 00 00 movzbl 0x854(%edx),%edx }while((x /= base) != 0); 468: 85 c0 test %eax,%eax x = xx; } i = 0; do{ buf[i++] = digits[x % base]; 46a: 88 14 0b mov %dl,(%ebx,%ecx,1) }while((x /= base) != 0); 46d: 75 e9 jne 458 <printint+0x38> if(neg) 46f: 8b 45 c4 mov -0x3c(%ebp),%eax 472: 8b 75 c0 mov -0x40(%ebp),%esi 475: 85 c0 test %eax,%eax 477: 74 08 je 481 <printint+0x61> buf[i++] = '-'; 479: c6 44 0d d8 2d movb $0x2d,-0x28(%ebp,%ecx,1) 47e: 8d 4f 02 lea 0x2(%edi),%ecx 481: 8d 7c 0d d7 lea -0x29(%ebp,%ecx,1),%edi 485: 8d 76 00 lea 0x0(%esi),%esi 488: 0f b6 07 movzbl (%edi),%eax #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 48b: 83 ec 04 sub $0x4,%esp 48e: 83 ef 01 sub $0x1,%edi 491: 6a 01 push $0x1 493: 53 push %ebx 494: 56 push %esi 495: 88 45 d7 mov %al,-0x29(%ebp) 498: e8 c5 fe ff ff call 362 <write> buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) 49d: 83 c4 10 add $0x10,%esp 4a0: 39 df cmp %ebx,%edi 4a2: 75 e4 jne 488 <printint+0x68> putc(fd, buf[i]); } 4a4: 8d 65 f4 lea -0xc(%ebp),%esp 4a7: 5b pop %ebx 4a8: 5e pop %esi 4a9: 5f pop %edi 4aa: 5d pop %ebp 4ab: c3 ret 4ac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi neg = 0; if(sgn && xx < 0){ neg = 1; x = -xx; } else { x = xx; 4b0: 89 d0 mov %edx,%eax static char digits[] = "0123456789ABCDEF"; char buf[16]; int i, neg; uint x; neg = 0; 4b2: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 4b9: eb 8b jmp 446 <printint+0x26> 4bb: 90 nop 4bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 000004c0 <printf>: } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 4c0: 55 push %ebp 4c1: 89 e5 mov %esp,%ebp 4c3: 57 push %edi 4c4: 56 push %esi 4c5: 53 push %ebx int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 4c6: 8d 45 10 lea 0x10(%ebp),%eax } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 4c9: 83 ec 2c sub $0x2c,%esp int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 4cc: 8b 75 0c mov 0xc(%ebp),%esi } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 4cf: 8b 7d 08 mov 0x8(%ebp),%edi int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 4d2: 89 45 d0 mov %eax,-0x30(%ebp) 4d5: 0f b6 1e movzbl (%esi),%ebx 4d8: 83 c6 01 add $0x1,%esi 4db: 84 db test %bl,%bl 4dd: 0f 84 b0 00 00 00 je 593 <printf+0xd3> 4e3: 31 d2 xor %edx,%edx 4e5: eb 39 jmp 520 <printf+0x60> 4e7: 89 f6 mov %esi,%esi 4e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ 4f0: 83 f8 25 cmp $0x25,%eax 4f3: 89 55 d4 mov %edx,-0x2c(%ebp) state = '%'; 4f6: ba 25 00 00 00 mov $0x25,%edx state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ 4fb: 74 18 je 515 <printf+0x55> #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 4fd: 8d 45 e2 lea -0x1e(%ebp),%eax 500: 83 ec 04 sub $0x4,%esp 503: 88 5d e2 mov %bl,-0x1e(%ebp) 506: 6a 01 push $0x1 508: 50 push %eax 509: 57 push %edi 50a: e8 53 fe ff ff call 362 <write> 50f: 8b 55 d4 mov -0x2c(%ebp),%edx 512: 83 c4 10 add $0x10,%esp 515: 83 c6 01 add $0x1,%esi int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 518: 0f b6 5e ff movzbl -0x1(%esi),%ebx 51c: 84 db test %bl,%bl 51e: 74 73 je 593 <printf+0xd3> c = fmt[i] & 0xff; if(state == 0){ 520: 85 d2 test %edx,%edx uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ c = fmt[i] & 0xff; 522: 0f be cb movsbl %bl,%ecx 525: 0f b6 c3 movzbl %bl,%eax if(state == 0){ 528: 74 c6 je 4f0 <printf+0x30> if(c == '%'){ state = '%'; } else { putc(fd, c); } } else if(state == '%'){ 52a: 83 fa 25 cmp $0x25,%edx 52d: 75 e6 jne 515 <printf+0x55> if(c == 'd'){ 52f: 83 f8 64 cmp $0x64,%eax 532: 0f 84 f8 00 00 00 je 630 <printf+0x170> printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ 538: 81 e1 f7 00 00 00 and $0xf7,%ecx 53e: 83 f9 70 cmp $0x70,%ecx 541: 74 5d je 5a0 <printf+0xe0> printint(fd, *ap, 16, 0); ap++; } else if(c == 's'){ 543: 83 f8 73 cmp $0x73,%eax 546: 0f 84 84 00 00 00 je 5d0 <printf+0x110> s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 54c: 83 f8 63 cmp $0x63,%eax 54f: 0f 84 ea 00 00 00 je 63f <printf+0x17f> putc(fd, *ap); ap++; } else if(c == '%'){ 555: 83 f8 25 cmp $0x25,%eax 558: 0f 84 c2 00 00 00 je 620 <printf+0x160> #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 55e: 8d 45 e7 lea -0x19(%ebp),%eax 561: 83 ec 04 sub $0x4,%esp 564: c6 45 e7 25 movb $0x25,-0x19(%ebp) 568: 6a 01 push $0x1 56a: 50 push %eax 56b: 57 push %edi 56c: e8 f1 fd ff ff call 362 <write> 571: 83 c4 0c add $0xc,%esp 574: 8d 45 e6 lea -0x1a(%ebp),%eax 577: 88 5d e6 mov %bl,-0x1a(%ebp) 57a: 6a 01 push $0x1 57c: 50 push %eax 57d: 57 push %edi 57e: 83 c6 01 add $0x1,%esi 581: e8 dc fd ff ff call 362 <write> int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 586: 0f b6 5e ff movzbl -0x1(%esi),%ebx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 58a: 83 c4 10 add $0x10,%esp } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 58d: 31 d2 xor %edx,%edx int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 58f: 84 db test %bl,%bl 591: 75 8d jne 520 <printf+0x60> putc(fd, c); } state = 0; } } } 593: 8d 65 f4 lea -0xc(%ebp),%esp 596: 5b pop %ebx 597: 5e pop %esi 598: 5f pop %edi 599: 5d pop %ebp 59a: c3 ret 59b: 90 nop 59c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ printint(fd, *ap, 16, 0); 5a0: 83 ec 0c sub $0xc,%esp 5a3: b9 10 00 00 00 mov $0x10,%ecx 5a8: 6a 00 push $0x0 5aa: 8b 5d d0 mov -0x30(%ebp),%ebx 5ad: 89 f8 mov %edi,%eax 5af: 8b 13 mov (%ebx),%edx 5b1: e8 6a fe ff ff call 420 <printint> ap++; 5b6: 89 d8 mov %ebx,%eax 5b8: 83 c4 10 add $0x10,%esp } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 5bb: 31 d2 xor %edx,%edx if(c == 'd'){ printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ printint(fd, *ap, 16, 0); ap++; 5bd: 83 c0 04 add $0x4,%eax 5c0: 89 45 d0 mov %eax,-0x30(%ebp) 5c3: e9 4d ff ff ff jmp 515 <printf+0x55> 5c8: 90 nop 5c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi } else if(c == 's'){ s = (char*)*ap; 5d0: 8b 45 d0 mov -0x30(%ebp),%eax 5d3: 8b 18 mov (%eax),%ebx ap++; 5d5: 83 c0 04 add $0x4,%eax 5d8: 89 45 d0 mov %eax,-0x30(%ebp) if(s == 0) s = "(null)"; 5db: b8 4b 08 00 00 mov $0x84b,%eax 5e0: 85 db test %ebx,%ebx 5e2: 0f 44 d8 cmove %eax,%ebx while(*s != 0){ 5e5: 0f b6 03 movzbl (%ebx),%eax 5e8: 84 c0 test %al,%al 5ea: 74 23 je 60f <printf+0x14f> 5ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 5f0: 88 45 e3 mov %al,-0x1d(%ebp) #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 5f3: 8d 45 e3 lea -0x1d(%ebp),%eax 5f6: 83 ec 04 sub $0x4,%esp 5f9: 6a 01 push $0x1 ap++; if(s == 0) s = "(null)"; while(*s != 0){ putc(fd, *s); s++; 5fb: 83 c3 01 add $0x1,%ebx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 5fe: 50 push %eax 5ff: 57 push %edi 600: e8 5d fd ff ff call 362 <write> } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ 605: 0f b6 03 movzbl (%ebx),%eax 608: 83 c4 10 add $0x10,%esp 60b: 84 c0 test %al,%al 60d: 75 e1 jne 5f0 <printf+0x130> } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 60f: 31 d2 xor %edx,%edx 611: e9 ff fe ff ff jmp 515 <printf+0x55> 616: 8d 76 00 lea 0x0(%esi),%esi 619: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 620: 83 ec 04 sub $0x4,%esp 623: 88 5d e5 mov %bl,-0x1b(%ebp) 626: 8d 45 e5 lea -0x1b(%ebp),%eax 629: 6a 01 push $0x1 62b: e9 4c ff ff ff jmp 57c <printf+0xbc> } else { putc(fd, c); } } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); 630: 83 ec 0c sub $0xc,%esp 633: b9 0a 00 00 00 mov $0xa,%ecx 638: 6a 01 push $0x1 63a: e9 6b ff ff ff jmp 5aa <printf+0xea> 63f: 8b 5d d0 mov -0x30(%ebp),%ebx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 642: 83 ec 04 sub $0x4,%esp 645: 8b 03 mov (%ebx),%eax 647: 6a 01 push $0x1 649: 88 45 e4 mov %al,-0x1c(%ebp) 64c: 8d 45 e4 lea -0x1c(%ebp),%eax 64f: 50 push %eax 650: 57 push %edi 651: e8 0c fd ff ff call 362 <write> 656: e9 5b ff ff ff jmp 5b6 <printf+0xf6> 65b: 66 90 xchg %ax,%ax 65d: 66 90 xchg %ax,%ax 65f: 90 nop 00000660 <free>: static Header base; static Header *freep; void free(void *ap) { 660: 55 push %ebp Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 661: a1 f8 0a 00 00 mov 0xaf8,%eax static Header base; static Header *freep; void free(void *ap) { 666: 89 e5 mov %esp,%ebp 668: 57 push %edi 669: 56 push %esi 66a: 53 push %ebx 66b: 8b 5d 08 mov 0x8(%ebp),%ebx Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 66e: 8b 10 mov (%eax),%edx void free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; 670: 8d 4b f8 lea -0x8(%ebx),%ecx for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 673: 39 c8 cmp %ecx,%eax 675: 73 19 jae 690 <free+0x30> 677: 89 f6 mov %esi,%esi 679: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 680: 39 d1 cmp %edx,%ecx 682: 72 1c jb 6a0 <free+0x40> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 684: 39 d0 cmp %edx,%eax 686: 73 18 jae 6a0 <free+0x40> static Header base; static Header *freep; void free(void *ap) { 688: 89 d0 mov %edx,%eax Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 68a: 39 c8 cmp %ecx,%eax if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 68c: 8b 10 mov (%eax),%edx free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 68e: 72 f0 jb 680 <free+0x20> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 690: 39 d0 cmp %edx,%eax 692: 72 f4 jb 688 <free+0x28> 694: 39 d1 cmp %edx,%ecx 696: 73 f0 jae 688 <free+0x28> 698: 90 nop 699: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi break; if(bp + bp->s.size == p->s.ptr){ 6a0: 8b 73 fc mov -0x4(%ebx),%esi 6a3: 8d 3c f1 lea (%ecx,%esi,8),%edi 6a6: 39 d7 cmp %edx,%edi 6a8: 74 19 je 6c3 <free+0x63> bp->s.size += p->s.ptr->s.size; bp->s.ptr = p->s.ptr->s.ptr; } else bp->s.ptr = p->s.ptr; 6aa: 89 53 f8 mov %edx,-0x8(%ebx) if(p + p->s.size == bp){ 6ad: 8b 50 04 mov 0x4(%eax),%edx 6b0: 8d 34 d0 lea (%eax,%edx,8),%esi 6b3: 39 f1 cmp %esi,%ecx 6b5: 74 23 je 6da <free+0x7a> p->s.size += bp->s.size; p->s.ptr = bp->s.ptr; } else p->s.ptr = bp; 6b7: 89 08 mov %ecx,(%eax) freep = p; 6b9: a3 f8 0a 00 00 mov %eax,0xaf8 } 6be: 5b pop %ebx 6bf: 5e pop %esi 6c0: 5f pop %edi 6c1: 5d pop %ebp 6c2: c3 ret bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; if(bp + bp->s.size == p->s.ptr){ bp->s.size += p->s.ptr->s.size; 6c3: 03 72 04 add 0x4(%edx),%esi 6c6: 89 73 fc mov %esi,-0x4(%ebx) bp->s.ptr = p->s.ptr->s.ptr; 6c9: 8b 10 mov (%eax),%edx 6cb: 8b 12 mov (%edx),%edx 6cd: 89 53 f8 mov %edx,-0x8(%ebx) } else bp->s.ptr = p->s.ptr; if(p + p->s.size == bp){ 6d0: 8b 50 04 mov 0x4(%eax),%edx 6d3: 8d 34 d0 lea (%eax,%edx,8),%esi 6d6: 39 f1 cmp %esi,%ecx 6d8: 75 dd jne 6b7 <free+0x57> p->s.size += bp->s.size; 6da: 03 53 fc add -0x4(%ebx),%edx p->s.ptr = bp->s.ptr; } else p->s.ptr = bp; freep = p; 6dd: a3 f8 0a 00 00 mov %eax,0xaf8 bp->s.size += p->s.ptr->s.size; bp->s.ptr = p->s.ptr->s.ptr; } else bp->s.ptr = p->s.ptr; if(p + p->s.size == bp){ p->s.size += bp->s.size; 6e2: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 6e5: 8b 53 f8 mov -0x8(%ebx),%edx 6e8: 89 10 mov %edx,(%eax) } else p->s.ptr = bp; freep = p; } 6ea: 5b pop %ebx 6eb: 5e pop %esi 6ec: 5f pop %edi 6ed: 5d pop %ebp 6ee: c3 ret 6ef: 90 nop 000006f0 <malloc>: return freep; } void* malloc(uint nbytes) { 6f0: 55 push %ebp 6f1: 89 e5 mov %esp,%ebp 6f3: 57 push %edi 6f4: 56 push %esi 6f5: 53 push %ebx 6f6: 83 ec 0c sub $0xc,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 6f9: 8b 45 08 mov 0x8(%ebp),%eax if((prevp = freep) == 0){ 6fc: 8b 15 f8 0a 00 00 mov 0xaf8,%edx malloc(uint nbytes) { Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 702: 8d 78 07 lea 0x7(%eax),%edi 705: c1 ef 03 shr $0x3,%edi 708: 83 c7 01 add $0x1,%edi if((prevp = freep) == 0){ 70b: 85 d2 test %edx,%edx 70d: 0f 84 a3 00 00 00 je 7b6 <malloc+0xc6> 713: 8b 02 mov (%edx),%eax 715: 8b 48 04 mov 0x4(%eax),%ecx base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ if(p->s.size >= nunits){ 718: 39 cf cmp %ecx,%edi 71a: 76 74 jbe 790 <malloc+0xa0> 71c: 81 ff 00 10 00 00 cmp $0x1000,%edi 722: be 00 10 00 00 mov $0x1000,%esi 727: 8d 1c fd 00 00 00 00 lea 0x0(,%edi,8),%ebx 72e: 0f 43 f7 cmovae %edi,%esi 731: ba 00 80 00 00 mov $0x8000,%edx 736: 81 ff ff 0f 00 00 cmp $0xfff,%edi 73c: 0f 46 da cmovbe %edx,%ebx 73f: eb 10 jmp 751 <malloc+0x61> 741: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 748: 8b 02 mov (%edx),%eax if(p->s.size >= nunits){ 74a: 8b 48 04 mov 0x4(%eax),%ecx 74d: 39 cf cmp %ecx,%edi 74f: 76 3f jbe 790 <malloc+0xa0> p->s.size = nunits; } freep = prevp; return (void*)(p + 1); } if(p == freep) 751: 39 05 f8 0a 00 00 cmp %eax,0xaf8 757: 89 c2 mov %eax,%edx 759: 75 ed jne 748 <malloc+0x58> char *p; Header *hp; if(nu < 4096) nu = 4096; p = sbrk(nu * sizeof(Header)); 75b: 83 ec 0c sub $0xc,%esp 75e: 53 push %ebx 75f: e8 66 fc ff ff call 3ca <sbrk> if(p == (char*)-1) 764: 83 c4 10 add $0x10,%esp 767: 83 f8 ff cmp $0xffffffff,%eax 76a: 74 1c je 788 <malloc+0x98> return 0; hp = (Header*)p; hp->s.size = nu; 76c: 89 70 04 mov %esi,0x4(%eax) free((void*)(hp + 1)); 76f: 83 ec 0c sub $0xc,%esp 772: 83 c0 08 add $0x8,%eax 775: 50 push %eax 776: e8 e5 fe ff ff call 660 <free> return freep; 77b: 8b 15 f8 0a 00 00 mov 0xaf8,%edx } freep = prevp; return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) 781: 83 c4 10 add $0x10,%esp 784: 85 d2 test %edx,%edx 786: 75 c0 jne 748 <malloc+0x58> return 0; 788: 31 c0 xor %eax,%eax 78a: eb 1c jmp 7a8 <malloc+0xb8> 78c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ if(p->s.size >= nunits){ if(p->s.size == nunits) 790: 39 cf cmp %ecx,%edi 792: 74 1c je 7b0 <malloc+0xc0> prevp->s.ptr = p->s.ptr; else { p->s.size -= nunits; 794: 29 f9 sub %edi,%ecx 796: 89 48 04 mov %ecx,0x4(%eax) p += p->s.size; 799: 8d 04 c8 lea (%eax,%ecx,8),%eax p->s.size = nunits; 79c: 89 78 04 mov %edi,0x4(%eax) } freep = prevp; 79f: 89 15 f8 0a 00 00 mov %edx,0xaf8 return (void*)(p + 1); 7a5: 83 c0 08 add $0x8,%eax } if(p == freep) if((p = morecore(nunits)) == 0) return 0; } } 7a8: 8d 65 f4 lea -0xc(%ebp),%esp 7ab: 5b pop %ebx 7ac: 5e pop %esi 7ad: 5f pop %edi 7ae: 5d pop %ebp 7af: c3 ret base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ if(p->s.size >= nunits){ if(p->s.size == nunits) prevp->s.ptr = p->s.ptr; 7b0: 8b 08 mov (%eax),%ecx 7b2: 89 0a mov %ecx,(%edx) 7b4: eb e9 jmp 79f <malloc+0xaf> Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; 7b6: c7 05 f8 0a 00 00 fc movl $0xafc,0xaf8 7bd: 0a 00 00 7c0: c7 05 fc 0a 00 00 fc movl $0xafc,0xafc 7c7: 0a 00 00 base.s.size = 0; 7ca: b8 fc 0a 00 00 mov $0xafc,%eax 7cf: c7 05 00 0b 00 00 00 movl $0x0,0xb00 7d6: 00 00 00 7d9: e9 3e ff ff ff jmp 71c <malloc+0x2c>
29.945963
60
0.413167
70da6d56f4e699b0a01a6907b3705b46fa4020a0
605
asm
Assembly
oeis/173/A173000.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/173/A173000.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/173/A173000.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A173000: a(n) = binomial(n + 4, 4)*9^n. ; 1,45,1215,25515,459270,7440174,111602610,1578379770,21308126895,277005649635,3490271185401,42835146366285,514021756395420,6049640671423020,70002984912180660,798034027998859524,8977882814987169645,99812932472504415465,1097942257197548570115,11961791959994344948095,129187353167938925439426,1384150212513631343993850,14722324987644987931570950,155544563999901394233553950,1633217921998964639452316475,17050795105669190835882183999,177065949174256981757238064605,1829681474800655478158126667585 mov $1,9 pow $1,$0 mov $2,$0 add $2,4 bin $2,$0 mul $1,$2 mov $0,$1
55
493
0.861157
109c88d8b35a6ed64b5741da966a5ae9b6da01a2
271
asm
Assembly
programs/oeis/109/A109047.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/109/A109047.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/109/A109047.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A109047: a(n) = lcm(n, 6). ; 0,6,6,6,12,30,6,42,24,18,30,66,12,78,42,30,48,102,18,114,60,42,66,138,24,150,78,54,84,174,30,186,96,66,102,210,36,222,114,78,120,246,42,258,132,90,138,282,48,294,150,102,156,318,54,330,168,114,174,354 mov $1,$0 gcd $0,6 div $1,$0 mul $1,6
33.875
202
0.645756
0016da7f5aad8ee3faaa43bdc50c61616a31ca0f
116
asm
Assembly
tests/addr/3.asm
NullMember/customasm
6e34d6432583a41278e6b3596f1817ae82149531
[ "Apache-2.0" ]
414
2016-10-14T22:39:20.000Z
2022-03-30T07:52:44.000Z
tests/addr/3.asm
NullMember/customasm
6e34d6432583a41278e6b3596f1817ae82149531
[ "Apache-2.0" ]
100
2018-03-22T16:12:24.000Z
2022-03-26T09:19:23.000Z
tests/addr/3.asm
NullMember/customasm
6e34d6432583a41278e6b3596f1817ae82149531
[ "Apache-2.0" ]
47
2017-06-29T15:12:13.000Z
2022-03-10T04:50:51.000Z
#ruledef test { ld {x} => 0x55 @ x`8 } ld $ ; = 0x5500 #addr 0x03 ; = 0x00 #addr 0x04 ; = 0x00 ld $ ; = 0x5504
11.6
24
0.517241
808e5badcd8d09308090a87cfcfd8e9174feb3a4
1,041
asm
Assembly
programs/oeis/266/A266539.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/266/A266539.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/266/A266539.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A266539: Terms of A006257 (Josephus problem) repeated. ; 0,0,1,1,1,1,3,3,1,1,3,3,5,5,7,7,1,1,3,3,5,5,7,7,9,9,11,11,13,13,15,15,1,1,3,3,5,5,7,7,9,9,11,11,13,13,15,15,17,17,19,19,21,21,23,23,25,25,27,27,29,29,31,31,1,1,3,3,5,5,7,7,9,9,11,11,13,13,15,15,17,17,19,19,21,21,23,23,25,25,27,27,29,29,31,31,33,33,35,35,37,37,39,39,41,41,43,43,45,45,47,47,49,49,51,51,53,53,55,55,57,57,59,59,61,61,63,63,1,1,3,3,5,5,7,7,9,9,11,11,13,13,15,15,17,17,19,19,21,21,23,23,25,25,27,27,29,29,31,31,33,33,35,35,37,37,39,39,41,41,43,43,45,45,47,47,49,49,51,51,53,53,55,55,57,57,59,59,61,61,63,63,65,65,67,67,69,69,71,71,73,73,75,75,77,77,79,79,81,81,83,83,85,85,87,87,89,89,91,91,93,93,95,95,97,97,99,99,101,101,103,103,105,105,107,107,109,109,111,111,113,113,115,115,117,117,119,119,121,121 mov $2,$0 mov $4,4 lpb $2 lpb $4 div $2,2 mov $1,$2 mov $2,$0 mov $3,2 sub $4,2 mov $5,8 mul $5,$1 mul $1,$0 lpe trn $2,$1 lpb $5 mul $3,2 mov $4,$5 trn $5,$3 lpe mov $1,$2 add $1,$4 mul $1,2 lpe div $1,8
37.178571
717
0.596542
37118ae8b9683320e84e7cfa95b6f2d5f8de70e5
7,092
asm
Assembly
demos/SicDemos/bf/bf.asm
roycrippen/sicxe
fdca37f56c95f2a76a78455f86a90e4b89329a54
[ "MIT" ]
null
null
null
demos/SicDemos/bf/bf.asm
roycrippen/sicxe
fdca37f56c95f2a76a78455f86a90e4b89329a54
[ "MIT" ]
null
null
null
demos/SicDemos/bf/bf.asm
roycrippen/sicxe
fdca37f56c95f2a76a78455f86a90e4b89329a54
[ "MIT" ]
null
null
null
.***** PROGRAM MAIN START ***** bf START 0 loop TD idev .check if device is ready JEQ loop JSUB stackinit .initialise stack state JSUB readinstr .load program string from stdin JSUB stackinit .reset stack pointer to starting position JSUB execute .execute loaded program JSUB cleartape .clear tape state J loop .when program finishes, wait for next one halt J halt .***** INTERPRETER EXECUTION ***** execute STL retaddr .save return address LDA #tape2 .initialise tape state STA tapeptr execloop CLEAR A .load instruction LDCH @stackptr .if 0x00 finish execution COMP =0 JEQ endexec COMP cinc .otherwise, check for appropriate command JEQ incr COMP clshift JEQ lshift COMP crshift JEQ rshift COMP cdec JEQ decr COMP cwrite JEQ writeout COMP cloops JEQ loops COMP cloope JEQ loope COMP cread JEQ readin continue JSUB stackpush .go to next instruction J execloop endexec LDCH =X'0A' WD odev LDL retaddr .restore return address, finish program execution RSUB .***** BRAINFUCK PROGRAM COMMAND EXECUTION ***** loops LDCH @tapeptr .handle command for loop start, load current cell COMP =0 JGT endls LDX #1 RMO X,S LDT #0 whiles COMPR T,S JEQ endls JSUB stackpush LDCH @stackptr COMP cloope JEQ ldecs COMP cloops JEQ lincs J endifs ldecs SUBR X,S J endifs lincs ADDR X,S endifs J whiles endls JSUB clr J continue loope LDCH @tapeptr .handle command for loop end, load current cell COMP =0 JEQ endle .check if cell is empty LDX #1 .set initial loop counter state RMO X,S LDT #0 whilee COMPR T,S .until loop counter is 0 (checking nested loops) JEQ endle JSUB stackpop .check if current instruction is loop start/end LDCH @stackptr COMP cloops JEQ ldece COMP cloope JEQ lince J endife .increment or decrement program loop counter ldece SUBR X,S J endife lince ADDR X,S endife J whilee .continue Brainfuck program loop execution endle JSUB clr .continue to execution J continue lshift LDA tapeptr .shift tape left SUB #1 STA tapeptr J continue rshift LDA tapeptr .shift tape right ADD #1 STA tapeptr J continue incr LDCH @tapeptr .increment cell value ADD #1 STCH @tapeptr J continue decr LDCH @tapeptr .decrement cell value COMP =0 .cannot go lower than 0 JEQ enddecr SUB #1 STCH @tapeptr enddecr J continue readin RD idev .read character from stdin STCH @tapeptr J continue writeout LDCH @tapeptr .print character to stdout WD odev J continue .***** HELPER ROUTINES ***** clr CLEAR A .clear register state CLEAR X CLEAR S CLEAR T RSUB .subroutine reads instructions from stdin to memory readinstr STL retaddr readloop CLEAR A RD idev .while not end of line, read commands from input COMP =X'00000A' .check for EOT character JEQ finish STCH @stackptr .save each command to stack JSUB stackpush J readloop finish LDA #0 STCH @stackptr .null byte signifies end of instructions LDL retaddr RSUB cleartape STL retaddr CLEAR A CLEAR S LDX #tapeend .reset tape pointer, set final address LDA #tape1 STA tapeptr loopclear STCH @tapeptr .set memory cell to 0x00 LDA tapeptr .load current tape pointer and increment ADD #1 COMPR X,A .if end of tape, finish clearing JEQ cleared STA tapeptr CLEAR A J loopclear cleared JSUB clr LDL retaddr RSUB .***** STACK ROUTINES ***** stackinit LDA #stackstart STA stackptr CLEAR A RSUB stackpush STA tmpA .temporarily save value of A LDA stackptr .load stackptr to A and increment ADD #1 STA stackptr LDA tmpA RSUB stackpop STA tmpA LDA stackptr .load stackptr to A and decrement SUB #1 STA stackptr LDA tmpA RSUB .***** VARIABLES ***** idev BYTE X'00' .stdin odev BYTE X'01' .stdout stackptr RESW 1 .pointer to current instruction on stack tapeptr RESW 1 .pointer to current cell on tape tmpA RESW 1 .temporary A register variable stackstart RESB 400 .reserve 400B on stack, increase at own peril .Brainfuck commands crshift WORD X'00003C' .< shift tape right clshift WORD X'00003E' .> shift tape left cinc WORD X'00002B' .+ increment cell value cdec WORD X'00002D' .- decrement cell value cread WORD X'00002C' ., read byte(1 character) from stdin cwrite WORD X'00002E' .. write byte (1 character) to stdout cloops WORD X'00005B' .[ start of a loop (can be nested) cloope WORD X'00005D' .] end of a loop (can be nested) tape1 RESB 200 .tape divided in 2 halves, starts at middle tape2 RESB 200 .limited to 400B, increase at own peril tapeend EQU * retaddr RESW 1 .temporary link register variable END bf
32.090498
85
0.475465
583bc6a9cf8d27a45365cfe765a386ef69731c7f
7,538
asm
Assembly
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_1139.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_1139.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_1139.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 %r15 push %r9 push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_UC_ht+0x4d9c, %rbp nop nop cmp $11910, %r9 mov $0x6162636465666768, %r15 movq %r15, (%rbp) nop nop nop nop nop cmp $10582, %r14 lea addresses_UC_ht+0x9c, %r10 nop and %rdx, %rdx mov (%r10), %cx nop nop sub %r14, %r14 lea addresses_A_ht+0x1969c, %rdx clflush (%rdx) and %rcx, %rcx movl $0x61626364, (%rdx) nop nop nop nop nop and %r14, %r14 lea addresses_UC_ht+0x13764, %rcx nop add %r15, %r15 mov (%rcx), %rdx nop nop nop and $36132, %r15 lea addresses_D_ht+0x4ffc, %r10 dec %rdx movups (%r10), %xmm4 vpextrq $0, %xmm4, %r9 nop nop and %r14, %r14 lea addresses_WT_ht+0xc, %r15 nop nop nop nop cmp %r10, %r10 movb $0x61, (%r15) nop and %rdx, %rdx lea addresses_A_ht+0x3094, %r9 nop add $62786, %r14 mov (%r9), %cx nop nop nop nop nop dec %r14 lea addresses_WC_ht+0xb89c, %rbp clflush (%rbp) and $25470, %r14 movb (%rbp), %r10b nop nop nop nop nop cmp $40352, %r10 lea addresses_normal_ht+0x1aaa4, %r10 nop nop nop and %r15, %r15 mov (%r10), %r14d cmp $35611, %rbp lea addresses_D_ht+0x1153c, %rbp nop nop nop nop and %rdx, %rdx mov $0x6162636465666768, %r9 movq %r9, %xmm7 vmovups %ymm7, (%rbp) inc %rcx lea addresses_WC_ht+0x9b1c, %rsi lea addresses_D_ht+0x104bc, %rdi xor %r10, %r10 mov $105, %rcx rep movsb xor %r9, %r9 lea addresses_D_ht+0xb59c, %rsi lea addresses_A_ht+0x1c29c, %rdi nop xor %r15, %r15 mov $122, %rcx rep movsb nop nop nop nop inc %rbp pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %r9 pop %r15 pop %r14 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r13 push %r9 push %rbp push %rbx push %rdi push %rdx // Store lea addresses_A+0x8bdc, %rdi nop nop nop and $21615, %r13 movb $0x51, (%rdi) and %rbx, %rbx // Store lea addresses_WT+0x1379c, %r11 nop nop nop nop nop cmp %r13, %r13 movw $0x5152, (%r11) nop nop nop nop nop xor %r13, %r13 // Store lea addresses_D+0x1f550, %r9 nop nop and %rdx, %rdx mov $0x5152535455565758, %rbp movq %rbp, %xmm7 vmovups %ymm7, (%r9) nop nop sub $3821, %rbp // Faulty Load lea addresses_WT+0x659c, %r9 cmp $45948, %rdx mov (%r9), %ebp lea oracles, %r11 and $0xff, %rbp shlq $12, %rbp mov (%r11,%rbp,1), %rbp pop %rdx pop %rdi pop %rbx pop %rbp pop %r9 pop %r13 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': True, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 6, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 9, 'size': 2, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 2, 'size': 32, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 10, 'size': 8, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 8, 'size': 2, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 6, 'size': 4, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 3, 'size': 8, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 4, 'size': 16, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 4, 'size': 1, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 2, 'size': 2, 'same': True, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 6, 'size': 1, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 1, 'size': 4, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 5, 'size': 32, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 8, 'same': True}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
34.420091
2,999
0.650968
d2507be95b45bcd658e2dbba7fdb288cc3a2c8da
3,315
asm
Assembly
Transynther/x86/_processed/NC/_st_zr_un_sm_/i3-7100_9_0x84_notsx.log_145_466.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NC/_st_zr_un_sm_/i3-7100_9_0x84_notsx.log_145_466.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NC/_st_zr_un_sm_/i3-7100_9_0x84_notsx.log_145_466.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r13 push %r8 push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0x1e80c, %rsi lea addresses_D_ht+0x155ec, %rdi nop nop nop nop sub %r10, %r10 mov $7, %rcx rep movsb nop nop nop mfence lea addresses_WC_ht+0x10d6c, %r8 nop nop nop add $3111, %rcx mov (%r8), %r13 and $48851, %r10 lea addresses_A_ht+0x503e, %r13 cmp %rcx, %rcx movb (%r13), %r10b nop nop nop nop and %r8, %r8 lea addresses_WT_ht+0x5384, %r13 nop dec %rdx mov $0x6162636465666768, %rsi movq %rsi, %xmm7 vmovups %ymm7, (%r13) nop nop nop nop cmp %r10, %r10 lea addresses_WC_ht+0x2cf4, %rdx clflush (%rdx) nop sub %r8, %r8 mov (%rdx), %rcx nop cmp %r8, %r8 lea addresses_A_ht+0x1cb0c, %rdi nop sub %rsi, %rsi and $0xffffffffffffffc0, %rdi movntdqa (%rdi), %xmm7 vpextrq $0, %xmm7, %rdx nop nop nop nop cmp $55496, %rdi pop %rsi pop %rdx pop %rdi pop %rcx pop %r8 pop %r13 pop %r10 ret .global s_faulty_load s_faulty_load: push %r13 push %r14 push %r9 push %rax push %rbx push %rcx push %rdx // Store lea addresses_normal+0x1322c, %rcx nop nop dec %rbx movl $0x51525354, (%rcx) nop nop add $8386, %r14 // Store mov $0x699e20000000dec, %rcx nop nop nop nop nop lfence mov $0x5152535455565758, %r9 movq %r9, %xmm2 vmovups %ymm2, (%rcx) nop sub $59054, %r13 // Faulty Load mov $0x699e20000000dec, %r13 nop nop nop nop nop xor %rdx, %rdx mov (%r13), %r9w lea oracles, %r13 and $0xff, %r9 shlq $12, %r9 mov (%r13,%r9,1), %r9 pop %rdx pop %rcx pop %rbx pop %rax pop %r9 pop %r14 pop %r13 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_NC', 'same': True, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_normal', 'same': False, 'size': 4, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_NC', 'same': True, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_NC', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_D_ht', 'congruent': 4, 'same': True}, 'dst': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 8, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 32, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 8, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'same': False, 'size': 16, 'congruent': 5, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} {'00': 132, '58': 9, '6d': 4} 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6d 6d 6d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 58 00 6d 00 00 58 58 00 00 00 00 00 00 00 00 58 00 00 */
22.1
434
0.647059
be6ac043ed61041a4a7c4218a8f534a138ef61f8
2,443
asm
Assembly
asm-tests/test.asm
TheShoutingParrot/jasm8080
f32f1642dd709d9e318e36282237d6191f2fd6f0
[ "0BSD" ]
null
null
null
asm-tests/test.asm
TheShoutingParrot/jasm8080
f32f1642dd709d9e318e36282237d6191f2fd6f0
[ "0BSD" ]
null
null
null
asm-tests/test.asm
TheShoutingParrot/jasm8080
f32f1642dd709d9e318e36282237d6191f2fd6f0
[ "0BSD" ]
null
null
null
ORG 100h var1 equ 42 var2 equ ABCDh var3 equ FEDCh var4 equ fedah stackpointer equ AAAAh lxi h, stackpointer sphl ; Some tests to test the assembler call teststack call testarithmetic call testlogic; call testprogramflow JMP 0 teststack: lxi b, var4 lxi d, var2 lxi h, var3 mvi a, var1 push b push d push h push psw lxi b, aaaah lxi d, bbbbh lxi h, cccch mvi a, ddh pop b pop d pop h pop psw ret testarithmetic: inx b inx d inx h inr a inr b inr c inr d inr e inr h inr l dcr a dcr b dcr c dcr d dcr e dcr h dcr l dcx b dcx d dcx h add a add b add c add d add e add h add l add m adc a adc b adc c adc d adc e adc h adc l adc m sub a sub b sub c sub d sub e sub h sub l sub m sbb a sbb b sbb c sbb d sbb e sbb h sbb l sbb m adi ffh aci aah sui 10h sbi 20h nop ret testcall: ret testlogic: mvi a, var1 rlc ral daa stc cmc cma rar rrc ana a ana b ana c ana d ana e ana h ana l ana m xra a xra b xra c xra d xra e xra h xra l xra m ora a ora b ora c ora d ora e ora h ora l ora m cmp a cmp b cmp c cmp d cmp e cmp h cmp l cmp m ani 255 xri aah ori bbh cpi 123 ret testprogramflow: call testcall mvi b, 16 lxi d, looptest1str mvi c, 9 jmp loop1 loop1: dcr b ; print "testing loop" out 1 jnz loop1 jz loop2start loop2start: lxi d, looptest2str mvi a, 250 loop2: out 1 adi 1 jnc loop2 jc loop3start jmp endprogramflowtest ; Will jump to end if jnc/jc not working loop3start: lxi d, looptest3str mvi b, DFh loop3: out 1 inr b jm loop3 jp startrettest startrettest: call returnandcalltest lxi hl, endprogramflowtest pchl nop nop nop endprogramflowtest: ret returnandcalltest: mvi a, 0 adi 1 rz cz returnandcalltest rc cc returnandcalltest rpe cpe returnandcalltest rm cm returnandcalltest sbi 1 rnz cnz returnandcalltest sbi 1 rnc cnc returnandcalltest rpo cpo returnandcalltest rp cp returnandcalltest lxi d, returnandcallteststr mvi c, 9 out 1 ret testspace ds 5 looptest1str db "testing loop1", Ah, "$" looptest2str db "testing loop2", Ah, "$" looptest3str db "testing loop3", Ah, "$" returnandcallteststr db "return instruction and call instruction test successful", Ah, "$" ; useless data statements just for testing dw 1234h dw 5678h dw 9ABCh dw DEF0h ds 10 db "MADE BY VICTOR 2020"
8.725
90
0.67458
24d1171b1494dbf64e9aef85f01615eea2b7c1d7
277
asm
Assembly
libsrc/_DEVELOPMENT/alloc/obstack/c/sdcc_iy/obstack_align_to_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/alloc/obstack/c/sdcc_iy/obstack_align_to_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/alloc/obstack/c/sdcc_iy/obstack_align_to_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; int obstack_align_to_callee(struct obstack *ob, size_t alignment) SECTION code_clib SECTION code_alloc_obstack PUBLIC _obstack_align_to_callee EXTERN asm_obstack_align_to _obstack_align_to_callee: pop af pop hl pop bc push af jp asm_obstack_align_to
14.578947
67
0.794224
9965ac37ac5f134b8b8d10aa79a1352b5620ada8
12,795
asm
Assembly
calculadora.asm
AryelleSiqueira/calculadora-ASM-8086
481ca40559f8a0550d5a95418b6641a7b4ac47cd
[ "MIT" ]
null
null
null
calculadora.asm
AryelleSiqueira/calculadora-ASM-8086
481ca40559f8a0550d5a95418b6641a7b4ac47cd
[ "MIT" ]
null
null
null
calculadora.asm
AryelleSiqueira/calculadora-ASM-8086
481ca40559f8a0550d5a95418b6641a7b4ac47cd
[ "MIT" ]
null
null
null
; Calculadora que realiza as operações básicas: soma, subtração, multiplicação e divisão ; Autores: Aryelle Gomes Siqueira e Luiz Gabriel Bandeira e Ribeiro segment code ..start: mov ax, dados mov ds, ax mov ax, stack mov ss, ax mov sp, stacktop ; ##################### CÓDIGO ##################### ; imprime mensagem de inicio mov dx, msg_ini mov ah, 9 int 21h ; loop de leitura leitura: ; chama função que lê operador call le_operador ; verifica se foi inserido 'q' (quit) para sair mov bx, operador cmp byte [bx], 'q' je quit ; lê operandos (N1 e N2) call le_N1 call le_N2 ; caso op = '+' case_1: cmp byte [bx], '+' jne case_2 call soma jmp leitura ; caso op = '-' case_2: cmp byte [bx], '-' jne case_3 call subtracao jmp leitura ; caso op = '*' case_3: cmp byte [bx], '*' jne case_4 call multiplicao jmp leitura ; caso op = 'd' case_4: cmp byte [bx], 'd' jne case_err call divisao jmp leitura ; caso op inválido case_err: mov dx, msg_erro mov ah, 9 int 21h jmp leitura quit: ; imprime mensagem de fim mov dx, msg_fim mov ah, 9 int 21h ; termina execução do programa mov ah, 4CH int 21h ;##################### FUNÇÕES ##################### le_operador: ; salva contexto push ax push bx push dx ; imprime mensagem mov dx, msg_op mov ah, 9 int 21h ; le caractere mov ah, 1 int 21h ; salva na memória mov bx, operador mov [bx], al ; restaura contexto e retorna pop dx pop bx pop ax ret le_N1: ; salva contexto push ax push bx push dx ; imprime mensagem mov dx,msg_N1 mov ah,9 int 21h ; lê entrada e converte call le_entrada call ascii_2_decimal ; converte e salva na variável 'acumulador' ; lê da memoria o valor lido/convertido e salva em 'N1' mov bx, [acumulador] mov [N1], bx ; restaura contexto e retorna pop dx pop bx pop ax ret le_N2: ; salva contexto push ax push bx push dx ; imprime mensagem mov dx, msg_N2 mov ah,9 int 21h ; lê entrada e converte call le_entrada call ascii_2_decimal ; converte e salva na variável 'acumulador' ; lê da memoria o valor lido/convertido e salva em 'N2' mov bx, [acumulador] mov [N2], bx ; restaura contexto pop dx pop bx pop ax ret le_entrada: ; salva contexto push ax push dx ; lê N caracteres da entrada, onde N máximo é definido em [entrada] ; salva qtd de caracteres lidos em [entrada + 1] e string em [entrada + 2] mov dx, entrada mov ah, 0ah int 21h ; restaura contexto pop dx pop ax ret ascii_2_decimal: ; salva contexto pushf pusha ; inicia acumulador com 0 mov word [acumulador], 0 ; faz bx apontar para primeira posição de num_ascii e inicia registrador CX com qtd digitos mov bx, num_ascii and cx, 0 mov cl, [n_caracteres] mov di, cx dec di ; faz di = cx-1 (qtd de caracteres digitados menos 1) mov si, 1 ; inicializa multiplicador com 1 ; verifica se número é negativo (1° char == '-') and ax, 0 mov al, [bx] cmp al, '-' jne loop_converte ; pula para o loop no caso de ser >= 0 dec cx ; decrementa qtd de caracteres se 1° char = '-' ; loop que pega digito a digito (em ascii), converte e acumula (sem considerar sinal) loop_converte: and ax, 0 mov al, [bx + di] ; pega caracteres de num_ascii de trás pra frente sub al, 30h ; converte para valor correspondente entre 0-9 mul si ; multiplica por si (10x maior a cada iteração) add [acumulador], ax ; acumula resultado (na memória) ; faz multiplicador si = si * 10 mov ax, si mov si, 10 mul si mov si, ax ; decrementa di para acessar posição anterior de num_ascii na próxima iteração dec di ; di = di - 1 loop loop_converte ; finaliza função se a entrada foi um valor positivo, caso contrário faz número ser negativo jne retorna neg word [acumulador] ; restaura contexto e retorna retorna: popa popf ret soma: ; salva contexto push ax push dx ; realiza soma (N1 + N2) mov ax, [N1] add ax, [N2] mov [resultado], ax ; imprime string 'Resultado = ' mov dx, msg_resultado mov ah, 9h int 21h ; imprime resultado da soma call imprime_resultado ; restaura contexto e retorna pop dx pop ax ret subtracao: ; salva contexto push ax push dx ; realiza subtração (N1 - N2) mov ax, [N1] sub ax, [N2] mov [resultado], ax ; imprime string 'Resultado = ' mov dx, msg_resultado mov ah, 9h int 21h ; imprime resultado da subtração (= N1 - N2) call imprime_resultado ; restaura contexto e retorna pop dx pop ax ret multiplicao: ; salva contexto pushf push ax push cx push dx mov ax, 1 ; inicia sinal do resultado como positivo ; lê operandos e, caso sejam negativos, troca por seus respectivos módulos n1: cmp word [N1], 0 ; verifica se N1 é negativo jg n2 ; caso N1 positivo, parte para a leitura de N2 neg word [N1] ; nega, caso negativo (torna positivo) neg ax ; inverte "sinal" do resultado n2: mov dx, [N2] ; lê N2 da memória cmp dx, 0 ; verifica se N2 é negativo jg multi ; parte para a multiplicação, caso N2 positivo neg dx ; nega, caso negativo (torna positivo) neg ax ; inverte "sinal" do resultado ; realiza multiplicação dos módulos de N1 e N2 multi: mov cx, ax ; salva sinal do resultado em cx mov ax, [N1] ; lê N1 da memória imul dx ; multiplica ax por dx (= |N1| * |N2|) ; verifica se resultado extrapola a word (16 bits) cmp dx, 0 ; se (dx != 0) => resultado não coube em ax jne imprime_erro ; multiplica (módulo do) resultado salvo ax por sinal e salva na memória imul cx mov [resultado], ax ; imprime string 'Resultado = ' mov dx, msg_resultado mov ah, 9h int 21h ; imprime o resultado da multiplicação call imprime_resultado jmp termina_mult ; imprime mensagem de erro caso resultado extrapole os 16 bits imprime_erro: mov dx, msg_overflow mov ah, 9h int 21h ; recupera contexto e retorna termina_mult: pop dx pop cx pop ax popf ret divisao: ; salva contexto pushf push ax push bx push cx push dx ; lê operandos na memória mov ax, [N1] mov bx, [N2] ; verifica se N2 é diferente de zero cmp bx, 0 je div_zero ; verifica se N1 é negativo e modifica dx de acordo cmp ax, 0 jl N1_neg and dx, 0 ; caso N1 positivo, faz dx=0 jmp divide N1_neg: or dx, 0xFFFF ; caso N1 negativo, faz dx=0xFFFF ; realiza divisão (N1 / N2) divide: idiv bx ; divide (dx ax) por bx mov [resultado], ax ; salva resultado na memória mov cx, dx ; salva resto da divisão em cx ; imprime string 'Resultado = ' mov dx, msg_resultado mov ah, 9h int 21h ; imprime o resultado da divisão call imprime_resultado ; imprime string 'Resto = ' mov dx, msg_resto mov ah, 9h int 21h ; imprime o resto da divisão mov [resultado], cx call imprime_resultado jmp fim_fdiv ; imprime mensagem de erro se N2 = 0 (divisão por 0) div_zero: mov dx, msg_div_zero mov ah, 9h int 21h ; recupera contexto e retorna fim_fdiv: pop dx pop cx pop bx pop ax popf ret ; Funções responsáveis por converter resultado calculado e imprimi-lo imprime_resultado: ; Salva contexto pushf pusha ; confere se valor a ser convertido (resultado) é negativo cmp word [resultado], 0 jl negativo jmp converte_result ; caso [resultado] < 0, troca por seu módulo na memória e imprime sinal negativo negativo: neg word [resultado] ; nega resultado tornando-o positivo mov dx, sinal_negativo ; imprime sinal negativo mov ah, 9h int 21h converte_result: mov di, saida mov ax, [resultado] call bin_2_ascii ; converte valor em ax, salvando no offset apontado por di ; imprime resultado após conversão p/ ascii mov dx, saida mov ah, 9h int 21h ; recupera contexto popa popf ret bin_2_ascii: cmp ax, 10 ; valor salvo em ax sempre deve ser >= 0 jb Uni cmp ax, 100 jb Dez cmp ax, 1000 jb Cen cmp ax, 10000 jb Mil jmp Dezmil Dezmil: and dx, 0 mov bx, 10000 div bx add al, 0x30 mov byte [di], al mov ax, dx inc di Mil: and dx, 0 mov bx, 1000 div bx add al, 0x30 mov byte [di], al mov ax, dx inc di Cen: mov bl, 100 div bl add al, 0x30 mov byte [di], al mov al, ah and ax, 0x00FF inc di Dez: mov bl, 10 div bl add al, 0x30 mov byte [di], al mov al, ah and ax, 0x00FF inc di Uni: add al, 0x30 mov byte [di], al mov byte [di + 1], '$' ; marca fim da string / valor convertido ret ; ################# SEGMENTO DE DADOS ################## segment dados ; Símbolos TAB EQU 09 CR EQU 13 LF EQU 10 ; Mensagens msg_ini: db LF, 'Calculadora Inicializada... ', CR, LF, '$' msg_op: db LF, '--------------------------------------------' db LF, '>> Escolha a sua operacao (+, -, * ou d):', CR, LF, '$' msg_N1: db LF, '>> Digite o primeiro operando: ', CR, LF, '$' msg_N2: db LF, '>> Digite o segundo operando: ', CR, LF, '$' msg_fim: db LF, '>> Terminando a execucao do programa...', CR, '$' msg_erro: db LF, '>> [ERRO] Operador nao reconhecido! $' msg_overflow: db LF, '>> [ERRO] O resultado excede o limite de 16 bits! $' msg_div_zero: db LF, '>> [ERRO] O divisor deve ser um valor diferente de zero! $' msg_resultado: db LF, '>> Resultado = $' msg_resto: db TAB, 'Resto = $' sinal_negativo: db '-', '$' ; Variáveis operador: resb 1 ; guarda char do operador (+, -, * ou d) N1: dw 0 ; guarda operando 1 (valor em bin) N2: dw 0 ; guarda operando 2 (valor em bin) resultado: resw 1 ; guarda resultado calculado (valor em bin) acumulador: dw 0 ; guarda valor acumulado durante conversão ascii>bin entrada: db 6 ; limite da entrada (buffer size) n_caracteres: resb 1 ; guarda número de characteres lidos da entrada num_ascii: resb 5 ; characteres lidos da entrada (operando) saida: resb 6 ; guarda resultado da operação convertido em ascii ; PILHA segment stack stack resb 256 stacktop:
24.005629
96
0.51442
36c5536344d90b673042644e47151a2236451e71
4,908
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_1030.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_1030.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_1030.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 %rax push %rbx push %rcx push %rdi push %rsi lea addresses_WC_ht+0x13aaa, %rsi nop nop nop add $33071, %r14 mov $0x6162636465666768, %rbx movq %rbx, %xmm4 vmovups %ymm4, (%rsi) nop nop nop nop xor $42529, %rsi lea addresses_WT_ht+0x2eea, %rsi lea addresses_UC_ht+0xadd0, %rdi cmp %r11, %r11 mov $57, %rcx rep movsq nop nop nop nop cmp $29952, %rcx lea addresses_UC_ht+0x9b38, %rbx clflush (%rbx) nop add $63044, %rcx movups (%rbx), %xmm3 vpextrq $0, %xmm3, %r11 nop add $42010, %r14 lea addresses_WT_ht+0xb030, %r14 nop nop nop nop and $35741, %rax mov $0x6162636465666768, %rdi movq %rdi, (%r14) nop add $15631, %rsi pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r14 pop %r11 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r8 push %r9 push %rsi // Faulty Load lea addresses_PSE+0x17fd0, %rsi nop nop nop nop sub $55405, %r12 mov (%rsi), %r9w lea oracles, %r8 and $0xff, %r9 shlq $12, %r9 mov (%r8,%r9,1), %r9 pop %rsi pop %r9 pop %r8 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_PSE', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} [Faulty Load] {'src': {'type': 'addresses_PSE', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 32, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 16, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 8, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'33': 21829} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
48.594059
2,999
0.661777
dc2028cb820a4521563c4952ae558ecbacc494cd
2,565
asm
Assembly
Scrolls/cursor.asm
TerminalCursor/LogOS
f89302a8d1401e0b1e58b3f1abc16fdeec7c7c3f
[ "BSD-2-Clause" ]
null
null
null
Scrolls/cursor.asm
TerminalCursor/LogOS
f89302a8d1401e0b1e58b3f1abc16fdeec7c7c3f
[ "BSD-2-Clause" ]
null
null
null
Scrolls/cursor.asm
TerminalCursor/LogOS
f89302a8d1401e0b1e58b3f1abc16fdeec7c7c3f
[ "BSD-2-Clause" ]
null
null
null
; Sets cursor offset from the cursor offset in cx set_cursor_offset: xor ax, ax ; Clear out a register to get/set I/O bus data shr cx, 1 ; Video buffer has text and attribute data, so multiply offset by 2 mov eax, 14 ; 14 - High byte of cursor offset mov dx, 0x3d4 ; Register Screen Control Address out dx, al ; Query high byte of cursor offset mov al, ch ; High byte of new cursor offset mov dx, 0x3d5 ; Register Screen Data Address out dx, al ; Write high byte of new cursor offset mov eax, 15 ; 15 - Low byte of cursor offset mov dx, 0x3d4 ; Register Screen Control Address out dx, al ; Query low byte of cursor offset mov al, cl ; Low byte of new cursor offset mov dx, 0x3d5 ; Register Screen Data Address out dx, al ; Write low byte of new cursor offset ret ; Stores cursor offset in cx get_cursor_offset: xor ecx, ecx ; Place to store cursor offset xor ax, ax ; Clear out a register to get/set I/O bus data mov eax, 14 ; 14 - High byte of cursor position mov dx, 0x3d4 ; Register Screen Control Address out dx, al ; Query high byte of cursor offset mov dx, 0x3d5 ; Register Screen Data Address in al, dx ; Get high byte of cursor offset mov ch, al ; Store high byte mov eax, 15 ; 15 - Low byte of cursor position mov dx, 0x3d4 ; Register Screen Control Address out dx, al ; Query low byte of cursor offset mov dx, 0x3d5 ; Register Screen Data Address in al, dx ; Get low byte of cursor offset add cl, al ; Add low byte to c register shl cx, 1 ; Double the offset to get the VIDEO_BUFFER offset ret ; Returns with row[eax] and col[edx] get_cursor_position: call get_cursor_offset ; Get cursor offset shr ecx, 1 ; Divide by 2 to get text offset mov eax, ecx ; Move the text offset to eax - to be multiplied mov edx, 0 ; Clear d register to hold remainder mov ecx, 0x50 ; Divide eax by MAX_COLS(0x50) div ecx ; eax/ecx => eax:edx (eax=quotient, edx=remainder) ret ; With row[eax] and col[edx] returns computed offset in[ecx] get_offset: mov ecx, edx ; Store column xor edx, edx ; Clear edx for multiplication mov edx, 0x50 ; Multiply by MAX_COL mul edx ; eax*edx => edx:eax - converts row to offset add ecx, eax ; Add row offset shl ecx, 1 ; Double result since VIDEO_BUFFEER includes attributes ret advance_cursor_offset: push eax push ecx push edx call get_cursor_offset ; Get the offset add ecx, 2 ; Move to the next character call set_cursor_offset ; Move to the next character call _check_bounds ; Ensure we haven't gone past the VIDEO_BUFFER pop edx pop ecx pop eax ret
29.147727
78
0.727875
c7bafb2ae96c4d16dd33518827906898d99d4510
1,043
asm
Assembly
Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_124_978.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_124_978.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_124_978.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: ret .global s_faulty_load s_faulty_load: push %r8 push %r9 push %rax push %rbp push %rbx // Faulty Load lea addresses_WC+0x19e6f, %r9 nop nop nop nop nop and $17015, %rbx mov (%r9), %r8 lea oracles, %r9 and $0xff, %r8 shlq $12, %r8 mov (%r9,%r8,1), %r8 pop %rbx pop %rbp pop %rax pop %r9 pop %r8 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 4, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'00': 124} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
24.255814
371
0.651965
3c093116cf834136caabf2da50e5c800276cdd1e
301
asm
Assembly
programs/oeis/179/A179541.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/179/A179541.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/179/A179541.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A179541: a(n) is the least possible smallest period attainable by the action of a periodic sequence of binary operations <+>,<-> (see A179382,A179480), beginning with 2n-1<+>1 or 2n-1<->1 ; 1,1,1,1,2,2,1,1,3,2,4 lpb $0 max $1,$0 sub $0,5 cmp $0,2 dif $1,3 div $1,3 lpe add $1,1 mov $0,$1
23.153846
189
0.637874