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
0b6970a63f926d80ad826e376f81c24bc32f5b87
48
asm
Assembly
src/main/fragment/csg65ce02-common/vwum1=pbuz2_derefidx_vbuzz_rol_1.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
2
2022-03-01T02:21:14.000Z
2022-03-01T04:33:35.000Z
src/main/fragment/csg65ce02-common/vwum1=pbuz2_derefidx_vbuzz_rol_1.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
src/main/fragment/csg65ce02-common/vwum1=pbuz2_derefidx_vbuzz_rol_1.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
lda ({z2}),z asl sta {m1} lda #0 rol sta {m1}+1
6.857143
12
0.5625
02c30e59147173c0565255e699d7c555c06d40b5
305
asm
Assembly
libsrc/_DEVELOPMENT/arch/zxn/memory/c/sccz80/zxn_read_mmu_state.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/arch/zxn/memory/c/sccz80/zxn_read_mmu_state.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/arch/zxn/memory/c/sccz80/zxn_read_mmu_state.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; void zxn_read_mmu_state(uint8_t *dst) SECTION code_clib SECTION code_arch PUBLIC zxn_read_mmu_state EXTERN asm_zxn_read_mmu_state defc zxn_read_mmu_state = asm_zxn_read_mmu_state ; SDCC bridge for Classic IF __CLASSIC PUBLIC _zxn_read_mmu_state defc _zxn_read_mmu_state = zxn_read_mmu_state ENDIF
16.944444
48
0.859016
a786ebe9ece6fb0a6ee17182910af865acf56f55
1,512
asm
Assembly
programs/oeis/208/A208064.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/208/A208064.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/208/A208064.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A208064: Number of n X 3 0..1 arrays avoiding 0 0 0 and 1 1 1 horizontally and 0 0 1 and 0 1 1 vertically. ; 6,36,72,144,216,324,432,576,720,900,1080,1296,1512,1764,2016,2304,2592,2916,3240,3600,3960,4356,4752,5184,5616,6084,6552,7056,7560,8100,8640,9216,9792,10404,11016,11664,12312,12996,13680,14400,15120,15876,16632,17424,18216,19044,19872,20736,21600,22500,23400,24336,25272,26244,27216,28224,29232,30276,31320,32400,33480,34596,35712,36864,38016,39204,40392,41616,42840,44100,45360,46656,47952,49284,50616,51984,53352,54756,56160,57600,59040,60516,61992,63504,65016,66564,68112,69696,71280,72900,74520,76176,77832,79524,81216,82944,84672,86436,88200,90000,91800,93636,95472,97344,99216,101124,103032,104976,106920,108900,110880,112896,114912,116964,119016,121104,123192,125316,127440,129600,131760,133956,136152,138384,140616,142884,145152,147456,149760,152100,154440,156816,159192,161604,164016,166464,168912,171396,173880,176400,178920,181476,184032,186624,189216,191844,194472,197136,199800,202500,205200,207936,210672,213444,216216,219024,221832,224676,227520,230400,233280,236196,239112,242064,245016,248004,250992,254016,257040,260100,263160,266256,269352,272484,275616,278784,281952,285156,288360,291600,294840,298116,301392,304704,308016,311364,314712,318096,321480,324900,328320,331776,335232,338724,342216,345744,349272,352836,356400,360000,363600,367236,370872,374544,378216,381924,385632,389376,393120,396900 add $0,1 pow $0,2 div $0,2 mul $0,6 sub $0,1 div $0,2 mov $1,$0 mul $1,6 add $1,6
116.307692
1,319
0.813492
d8bb4c9a55e5a540890dd4722f13b39cd0eff631
500
asm
Assembly
src/util/sprite/alft.asm
olifink/qspread
d6403d210bdad9966af5d2a0358d4eed3f1e1c02
[ "MIT" ]
null
null
null
src/util/sprite/alft.asm
olifink/qspread
d6403d210bdad9966af5d2a0358d4eed3f1e1c02
[ "MIT" ]
null
null
null
src/util/sprite/alft.asm
olifink/qspread
d6403d210bdad9966af5d2a0358d4eed3f1e1c02
[ "MIT" ]
null
null
null
* Sprite alft * * Mode 4 * +------|-----+ * |a | * |a a a | * |a a aaa | * |a a aaaaa | * -a aaaaaaaa - * |a a aaaaa | * |a a aaa | * |a a a | * |a | * +------|-----+ * section sprite xdef mes_alft mes_alft dc.w $0100,$0000 dc.w 12,9,6,4 dc.l sc4_alft-* xref mes_zero dc.l mes_zero-* dc.l 0 sc4_alft dc.w $8080,$0000 dc.w $a0a0,$4040 dc.w $a1a1,$c0c0 dc.w $a7a7,$c0c0 dc.w $bfbf,$c0c0 dc.w $a7a7,$c0c0 dc.w $a1a1,$c0c0 dc.w $a0a0,$4040 dc.w $8080,$0000 * end
13.513514
17
0.512
06a3dcea457db6cbcaa690db2ab78b427e20acc0
6,237
asm
Assembly
Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0x48_notsx.log_21829_1918.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0x48_notsx.log_21829_1918.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0x48_notsx.log_21829_1918.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r14 push %r15 push %r9 push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0x1705f, %r15 add %r9, %r9 mov $0x6162636465666768, %rdi movq %rdi, (%r15) nop nop nop nop xor %r14, %r14 lea addresses_normal_ht+0xd883, %r15 clflush (%r15) nop and %rdx, %rdx movl $0x61626364, (%r15) nop nop xor $47141, %r15 lea addresses_D_ht+0x1db3f, %rbp sub $34080, %rcx movups (%rbp), %xmm0 vpextrq $1, %xmm0, %r15 and $20643, %rbp lea addresses_normal_ht+0xa83f, %rsi lea addresses_WT_ht+0x16f3f, %rdi clflush (%rsi) nop nop nop inc %r14 mov $25, %rcx rep movsw xor %rdx, %rdx lea addresses_A_ht+0x13b5f, %rsi lea addresses_UC_ht+0x88ff, %rdi nop nop inc %r9 mov $40, %rcx rep movsq nop nop inc %rbp lea addresses_UC_ht+0xbf3f, %rsi lea addresses_WT_ht+0xb09f, %rdi clflush (%rsi) nop xor %r14, %r14 mov $119, %rcx rep movsb nop nop nop nop nop cmp $10881, %r9 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %r9 pop %r15 pop %r14 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r8 push %rax push %rbx push %rcx push %rdx // Store lea addresses_PSE+0xcb3f, %rdx nop nop nop nop sub %r12, %r12 movw $0x5152, (%rdx) nop nop nop nop add %rdx, %rdx // Load lea addresses_PSE+0x1e869, %r8 nop nop add %rax, %rax mov (%r8), %r13d nop add %rdx, %rdx // Store lea addresses_RW+0xb80f, %rbx nop nop nop nop cmp $63396, %rcx mov $0x5152535455565758, %r13 movq %r13, %xmm5 vmovups %ymm5, (%rbx) nop nop xor %r12, %r12 // Faulty Load lea addresses_PSE+0xcb3f, %r12 nop nop nop nop xor %rcx, %rcx mov (%r12), %eax lea oracles, %rdx and $0xff, %rax shlq $12, %rax mov (%rdx,%rax,1), %rax pop %rdx pop %rcx pop %rbx pop %rax pop %r8 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_PSE', 'congruent': 0}} {'dst': {'same': True, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_PSE', 'congruent': 0}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': True, 'size': 4, 'type': 'addresses_PSE', 'congruent': 0}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_RW', 'congruent': 4}, 'OP': 'STOR'} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_PSE', 'congruent': 0}} <gen_prepare_buffer> {'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 8, 'type': 'addresses_A_ht', 'congruent': 4}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_normal_ht', 'congruent': 2}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_D_ht', 'congruent': 7}} {'dst': {'same': False, 'congruent': 9, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 8, 'type': 'addresses_normal_ht'}} {'dst': {'same': False, 'congruent': 6, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 0, 'type': 'addresses_A_ht'}} {'dst': {'same': False, 'congruent': 3, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 7, 'type': 'addresses_UC_ht'}} {'52': 21829} 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 */
38.263804
2,999
0.657528
cb2a41c434d2243723f61087c52f66c7acdbcf59
5,487
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_494.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_494.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_494.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 %r8 push %r9 push %rbp push %rcx push %rdi push %rsi lea addresses_normal_ht+0x15cc0, %rsi lea addresses_D_ht+0x195e4, %rdi nop nop nop xor $51711, %r8 mov $89, %rcx rep movsb nop nop sub $22969, %r9 lea addresses_D_ht+0x1c0b, %r8 nop nop nop nop nop dec %rbp and $0xffffffffffffffc0, %r8 movaps (%r8), %xmm6 vpextrq $1, %xmm6, %rdi dec %r8 lea addresses_D_ht+0xcc3c, %rsi lea addresses_WT_ht+0x1150c, %rdi nop nop nop nop cmp $39911, %r11 mov $27, %rcx rep movsb nop nop nop nop and %rdi, %rdi pop %rsi pop %rdi pop %rcx pop %rbp pop %r9 pop %r8 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r13 push %r14 push %r8 push %rcx push %rdi push %rsi // Store lea addresses_A+0xbfc, %rcx nop nop nop cmp $54212, %r14 mov $0x5152535455565758, %r8 movq %r8, (%rcx) inc %rcx // REPMOV lea addresses_WC+0xd73c, %rsi lea addresses_D+0x1203c, %rdi nop nop nop nop nop xor $19187, %r14 mov $2, %rcx rep movsb nop nop xor %r11, %r11 // Load lea addresses_US+0x1bbb0, %rsi xor %r14, %r14 mov (%rsi), %cx nop nop nop inc %r13 // Faulty Load lea addresses_PSE+0xfa3c, %r10 clflush (%r10) nop xor $48955, %rcx movb (%r10), %r8b lea oracles, %r10 and $0xff, %r8 shlq $12, %r8 mov (%r10,%r8,1), %r8 pop %rsi pop %rdi pop %rcx pop %r8 pop %r14 pop %r13 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_PSE', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'size': 8, 'NT': True, 'same': False, 'congruent': 6}} {'src': {'type': 'addresses_WC', 'congruent': 7, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D', 'congruent': 5, 'same': False}} {'src': {'type': 'addresses_US', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} [Faulty Load] {'src': {'type': 'addresses_PSE', 'AVXalign': False, 'size': 1, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_normal_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 2, 'same': False}} {'src': {'type': 'addresses_D_ht', 'AVXalign': True, 'size': 16, 'NT': True, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'src': {'type': 'addresses_D_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': False}} {'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 */
40.345588
2,999
0.659012
a3a5b01f458792572f967cf7f0873f019df5f633
186
asm
Assembly
data/pokemon/dex_entries/turban.asm
AtmaBuster/pokeplat-gen2
fa83b2e75575949b8f72cb2c48f7a1042e97f70f
[ "blessing" ]
6
2021-06-19T06:41:19.000Z
2022-02-15T17:12:33.000Z
data/pokemon/dex_entries/turban.asm
AtmaBuster/pokeplat-gen2-old
01e42c55db5408d72d89133dc84a46c699d849ad
[ "blessing" ]
null
null
null
data/pokemon/dex_entries/turban.asm
AtmaBuster/pokeplat-gen2-old
01e42c55db5408d72d89133dc84a46c699d849ad
[ "blessing" ]
3
2021-01-15T18:45:40.000Z
2021-10-16T03:35:27.000Z
db "CONICAL@" ; species name db "Despite appearing" next "to have no limbs," next "this #MON is" page "able to throw the" next "weight of its body" next "around with force.@"
18.6
29
0.666667
6695e0badd13264f6bf6f2d4ef3ecf9b94096391
955
asm
Assembly
samples/syscall.asm
skwirl42/robco-processor
eb92ee0d2402403b36b9b796f80c3d46aaed1442
[ "MIT" ]
null
null
null
samples/syscall.asm
skwirl42/robco-processor
eb92ee0d2402403b36b9b796f80c3d46aaed1442
[ "MIT" ]
30
2020-12-29T13:25:25.000Z
2021-09-28T12:03:35.000Z
samples/syscall.asm
skwirl42/robco-processor
eb92ee0d2402403b36b9b796f80c3d46aaed1442
[ "MIT" ]
null
null
null
; System .defword EXIT 0x0001 .defword GETERROR 0x0011 ; Text display .defword GETCH 0x0100 .defword SETCH 0x0101 .defword PRINT 0x0102 .defword SETCURSOR 0x0103 .defword SETATTR 0x0104 .defword SETATTRC 0x0105 .defword CLEAR 0x0106 .defword GETCURSOR 0x0107 ; Holotape access .defword HOLOTAPECHECK 0x0200 .defword HOLOTAPEEJECT 0x0201 .defword REWIND 0x0202 .defword FIND 0x0203 .defword EXECUTE 0x0204 .defword SEEK 0x0205 .defword READ 0x0206 .defword WRITE 0x0207 ; Mainframe communication .defword SENDCH 0x0300 .defword RECEIVECH 0x0301 .defword SETCOMM 0x0302 .defword GETCOMM 0x0303 ; Graphics display .defword GRAPHICSTART 0x0400 .defword GRAPHICEND 0x0401 ; Audio .defword SOUNDACK 0x0500 .defword SOUNDNACK 0x0501 .defword SOUNDCMD 0x0502
24.487179
42
0.650262
403ac0019662477eabca21ebddff49cebd090ae7
6,616
asm
Assembly
_incObj/52 Moving Blocks.asm
kodishmediacenter/msu-md-sonic
3aa7c5e8add9660df2cd0eceaa214e7d59f2415c
[ "CC0-1.0" ]
9
2021-01-15T13:47:53.000Z
2022-01-17T15:33:55.000Z
_incObj/52 Moving Blocks.asm
kodishmediacenter/msu-md-sonic
3aa7c5e8add9660df2cd0eceaa214e7d59f2415c
[ "CC0-1.0" ]
7
2021-01-14T02:18:48.000Z
2021-03-24T15:44:30.000Z
_incObj/52 Moving Blocks.asm
kodishmediacenter/msu-md-sonic
3aa7c5e8add9660df2cd0eceaa214e7d59f2415c
[ "CC0-1.0" ]
2
2021-01-14T13:14:26.000Z
2021-01-29T17:46:04.000Z
; --------------------------------------------------------------------------- ; Object 52 - moving platform blocks (MZ, LZ, SBZ) ; --------------------------------------------------------------------------- MovingBlock: moveq #0,d0 move.b obRoutine(a0),d0 move.w MBlock_Index(pc,d0.w),d1 jmp MBlock_Index(pc,d1.w) ; =========================================================================== MBlock_Index: dc.w MBlock_Main-MBlock_Index dc.w MBlock_Platform-MBlock_Index dc.w MBlock_StandOn-MBlock_Index mblock_origX: equ $30 mblock_origY: equ $32 MBlock_Var: dc.b $10, 0 ; object width, frame number dc.b $20, 1 dc.b $20, 2 dc.b $40, 3 dc.b $30, 4 ; =========================================================================== MBlock_Main: ; Routine 0 addq.b #2,obRoutine(a0) move.l #Map_MBlock,obMap(a0) move.w #$42B8,obGfx(a0) cmpi.b #id_LZ,(v_zone).w ; check if level is LZ bne.s loc_FE44 move.l #Map_MBlockLZ,obMap(a0) ; LZ specific code move.w #$43BC,obGfx(a0) move.b #7,obHeight(a0) loc_FE44: cmpi.b #id_SBZ,(v_zone).w ; check if level is SBZ bne.s loc_FE60 move.w #$22C0,obGfx(a0) ; SBZ specific code (object 5228) cmpi.b #$28,obSubtype(a0) ; is object 5228 ? beq.s loc_FE60 ; if yes, branch move.w #$4460,obGfx(a0) ; SBZ specific code (object 523x) loc_FE60: move.b #4,obRender(a0) moveq #0,d0 move.b obSubtype(a0),d0 lsr.w #3,d0 andi.w #$1E,d0 lea MBlock_Var(pc,d0.w),a2 move.b (a2)+,obActWid(a0) move.b (a2)+,obFrame(a0) move.b #4,obPriority(a0) move.w obX(a0),mblock_origX(a0) move.w obY(a0),mblock_origY(a0) andi.b #$F,obSubtype(a0) MBlock_Platform: ; Routine 2 bsr.w MBlock_Move moveq #0,d1 move.b obActWid(a0),d1 jsr (PlatformObject).l bra.s MBlock_ChkDel ; =========================================================================== MBlock_StandOn: ; Routine 4 moveq #0,d1 move.b obActWid(a0),d1 jsr (ExitPlatform).l move.w obX(a0),-(sp) bsr.w MBlock_Move move.w (sp)+,d2 jsr (MvSonicOnPtfm2).l MBlock_ChkDel: out_of_range DeleteObject,mblock_origX(a0) bra.w DisplaySprite ; =========================================================================== MBlock_Move: moveq #0,d0 move.b obSubtype(a0),d0 andi.w #$F,d0 add.w d0,d0 move.w MBlock_TypeIndex(pc,d0.w),d1 jmp MBlock_TypeIndex(pc,d1.w) ; =========================================================================== MBlock_TypeIndex:dc.w MBlock_Type00-MBlock_TypeIndex, MBlock_Type01-MBlock_TypeIndex dc.w MBlock_Type02-MBlock_TypeIndex, MBlock_Type03-MBlock_TypeIndex dc.w MBlock_Type02-MBlock_TypeIndex, MBlock_Type05-MBlock_TypeIndex dc.w MBlock_Type06-MBlock_TypeIndex, MBlock_Type07-MBlock_TypeIndex dc.w MBlock_Type08-MBlock_TypeIndex, MBlock_Type02-MBlock_TypeIndex dc.w MBlock_Type0A-MBlock_TypeIndex ; =========================================================================== MBlock_Type00: rts ; =========================================================================== MBlock_Type01: move.b (v_oscillate+$E).w,d0 move.w #$60,d1 btst #0,obStatus(a0) beq.s loc_FF26 neg.w d0 add.w d1,d0 loc_FF26: move.w mblock_origX(a0),d1 sub.w d0,d1 move.w d1,obX(a0) rts ; =========================================================================== MBlock_Type02: cmpi.b #4,obRoutine(a0) ; is Sonic standing on the platform? bne.s MBlock_02_Wait addq.b #1,obSubtype(a0) ; if yes, add 1 to type MBlock_02_Wait: rts ; =========================================================================== MBlock_Type03: moveq #0,d3 move.b obActWid(a0),d3 bsr.w ObjHitWallRight tst.w d1 ; has the platform hit a wall? bmi.s MBlock_03_End ; if yes, branch addq.w #1,obX(a0) ; move platform to the right move.w obX(a0),mblock_origX(a0) rts ; =========================================================================== MBlock_03_End: clr.b obSubtype(a0) ; change to type 00 (non-moving type) rts ; =========================================================================== MBlock_Type05: moveq #0,d3 move.b obActWid(a0),d3 bsr.w ObjHitWallRight tst.w d1 ; has the platform hit a wall? bmi.s MBlock_05_End ; if yes, branch addq.w #1,obX(a0) ; move platform to the right move.w obX(a0),mblock_origX(a0) rts ; =========================================================================== MBlock_05_End: addq.b #1,obSubtype(a0) ; change to type 06 (falling) rts ; =========================================================================== MBlock_Type06: bsr.w SpeedToPos addi.w #$18,obVelY(a0) ; make the platform fall bsr.w ObjFloorDist tst.w d1 ; has platform hit the floor? bpl.w locret_FFA0 ; if not, branch add.w d1,obY(a0) clr.w obVelY(a0) ; stop platform falling clr.b obSubtype(a0) ; change to type 00 (non-moving) locret_FFA0: rts ; =========================================================================== MBlock_Type07: tst.b (f_switch+2).w ; has switch number 02 been pressed? beq.s MBlock_07_ChkDel subq.b #3,obSubtype(a0) ; if yes, change object type to 04 MBlock_07_ChkDel: addq.l #4,sp out_of_range DeleteObject,mblock_origX(a0) rts ; =========================================================================== MBlock_Type08: move.b (v_oscillate+$1E).w,d0 move.w #$80,d1 btst #0,obStatus(a0) beq.s loc_FFE2 neg.w d0 add.w d1,d0 loc_FFE2: move.w mblock_origY(a0),d1 sub.w d0,d1 move.w d1,obY(a0) rts ; =========================================================================== MBlock_Type0A: moveq #0,d3 move.b obActWid(a0),d3 add.w d3,d3 moveq #8,d1 btst #0,obStatus(a0) beq.s loc_10004 neg.w d1 neg.w d3 loc_10004: tst.w $36(a0) ; is platform set to move back? bne.s MBlock_0A_Back ; if yes, branch move.w obX(a0),d0 sub.w mblock_origX(a0),d0 cmp.w d3,d0 beq.s MBlock_0A_Wait add.w d1,obX(a0) ; move platform move.w #300,$34(a0) ; set time delay to 5 seconds rts ; =========================================================================== MBlock_0A_Wait: subq.w #1,$34(a0) ; subtract 1 from time delay bne.s locret_1002E ; if time remains, branch move.w #1,$36(a0) ; set platform to move back to its original position locret_1002E: rts ; =========================================================================== MBlock_0A_Back: move.w obX(a0),d0 sub.w mblock_origX(a0),d0 beq.s MBlock_0A_Reset sub.w d1,obX(a0) ; return platform to its original position rts ; =========================================================================== MBlock_0A_Reset: clr.w $36(a0) subq.b #1,obSubtype(a0) rts
27.798319
84
0.528114
78d1074ed09efc515f3d0b82b71b91df41af6c12
742
asm
Assembly
programs/oeis/303/A303299.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/303/A303299.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/303/A303299.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A303299: Generalized 22-gonal (or icosidigonal) numbers: m*(10*m - 9) with m = 0, +1, -1, +2, -2, +3, -3, ... ; 0,1,19,22,58,63,117,124,196,205,295,306,414,427,553,568,712,729,891,910,1090,1111,1309,1332,1548,1573,1807,1834,2086,2115,2385,2416,2704,2737,3043,3078,3402,3439,3781,3820,4180,4221,4599,4642,5038,5083,5497,5544,5976,6025,6475,6526,6994,7047,7533,7588,8092,8149,8671,8730,9270,9331,9889,9952,10528,10593,11187,11254,11866,11935,12565,12636,13284,13357,14023,14098,14782,14859,15561,15640,16360,16441,17179,17262,18018,18103,18877,18964,19756,19845,20655,20746,21574,21667,22513,22608,23472,23569,24451,24550 lpb $0 mov $2,$0 sub $0,1 seq $2,317318 ; Multiples of 18 and odd numbers interleaved. add $1,$2 lpe mov $0,$1
67.454545
509
0.734501
f04e1ef0fe169a4e05a8da8fe42feb7c0e5b9a31
6,549
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_1623.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_1623.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_1623.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 %rax push %rbp push %rcx push %rdi push %rsi lea addresses_normal_ht+0x1b694, %rcx nop nop sub $25409, %r14 movw $0x6162, (%rcx) nop nop nop nop cmp $27902, %r14 lea addresses_UC_ht+0x3df4, %rdi nop dec %r12 mov $0x6162636465666768, %rax movq %rax, %xmm7 vmovups %ymm7, (%rdi) nop nop nop xor $51077, %r12 lea addresses_D_ht+0x17194, %rax nop nop nop nop dec %rbp mov $0x6162636465666768, %r14 movq %r14, %xmm4 movups %xmm4, (%rax) nop nop nop nop add $16334, %r14 lea addresses_WC_ht+0x94, %r9 nop xor $52410, %r12 mov $0x6162636465666768, %rbp movq %rbp, (%r9) nop nop nop nop cmp $54860, %r12 lea addresses_A_ht+0x11094, %rsi lea addresses_A_ht+0x12894, %rdi nop and %r14, %r14 mov $56, %rcx rep movsl nop nop nop nop nop dec %rsi lea addresses_D_ht+0x1d094, %rsi lea addresses_D_ht+0x12794, %rdi nop cmp $3786, %r14 mov $32, %rcx rep movsb nop add $44085, %rbp lea addresses_A_ht+0x3094, %r9 nop nop nop cmp $6860, %rdi mov $0x6162636465666768, %rsi movq %rsi, (%r9) nop cmp %rdi, %rdi lea addresses_WT_ht+0x950c, %rsi lea addresses_UC_ht+0x18094, %rdi nop nop inc %r9 mov $93, %rcx rep movsb nop sub %rsi, %rsi lea addresses_WT_ht+0x15d94, %rsi lea addresses_UC_ht+0xfd4c, %rdi clflush (%rdi) nop nop and %r12, %r12 mov $33, %rcx rep movsw nop nop nop sub $1291, %r14 lea addresses_WT_ht+0x3774, %rdi nop nop cmp $24224, %rsi mov $0x6162636465666768, %rbp movq %rbp, (%rdi) nop nop nop nop dec %rsi pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r9 pop %r14 pop %r12 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r15 push %r8 push %rbx push %rcx // Faulty Load lea addresses_RW+0x1c894, %r8 nop nop nop xor %r15, %r15 mov (%r8), %bx lea oracles, %r15 and $0xff, %rbx shlq $12, %rbx mov (%r15,%rbx,1), %rbx pop %rcx pop %rbx pop %r8 pop %r15 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_RW', 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_RW', 'congruent': 0}} <gen_prepare_buffer> {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_normal_ht', 'congruent': 9}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_UC_ht', 'congruent': 4}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_D_ht', 'congruent': 6}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WC_ht', 'congruent': 10}, 'OP': 'STOR'} {'dst': {'same': False, 'congruent': 8, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 9, 'type': 'addresses_A_ht'}} {'dst': {'same': False, 'congruent': 7, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_D_ht'}} {'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 8, 'type': 'addresses_A_ht', 'congruent': 8}, 'OP': 'STOR'} {'dst': {'same': False, 'congruent': 10, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_WT_ht'}} {'dst': {'same': False, 'congruent': 1, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_WT_ht'}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WT_ht', 'congruent': 4}, 'OP': 'STOR'} {'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 */
37.637931
2,999
0.661322
b84a1c76dc425d431174fa73ef1fd989a4ebe952
406
asm
Assembly
programs/oeis/014/A014193.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/014/A014193.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/014/A014193.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A014193: n-th prime + mu(n). ; 3,2,4,7,10,14,16,19,23,30,30,37,40,44,48,53,58,61,66,71,74,80,82,89,97,102,103,107,108,112,126,131,138,140,150,151,156,164,168,173,178,180,190,193,197,200,210,223,227 mov $2,$0 seq $0,40976 ; a(n) = prime(n) - 2. seq $2,8683 ; Möbius (or Moebius) function mu(n). mu(1) = 1; mu(n) = (-1)^k if n is the product of k different primes; otherwise mu(n) = 0. add $0,$2 add $0,2
45.111111
168
0.635468
1000f8bf1aaba6eed5df4540a4692f013ae2bdfe
368
asm
Assembly
programs/oeis/047/A047972.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/047/A047972.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/047/A047972.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A047972: Distance of n-th prime to nearest square. ; 1,1,1,2,2,3,1,3,2,4,5,1,5,6,2,4,5,3,3,7,8,2,2,8,3,1,3,7,9,8,6,10,7,5,5,7,12,6,2,4,10,12,5,3,1,3,14,2,2,4,8,14,15,5,1,7,13,15,12,8,6,4,17,13,11,7,7,13,14,12,8,2,6,12,18,17,11,3,1,9,19,20,10,8,2,2,8,16,20,21,17,5,3,7,15,19,20,8,6,12 seq $0,40 ; The prime numbers. seq $0,53188 ; Distance from n to nearest square.
61.333333
232
0.622283
9849c9f55c575f9d0cbe995148e48a4dc064c882
785
asm
Assembly
programs/oeis/054/A054243.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/054/A054243.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/054/A054243.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A054243: Number of partitions of n into distinct positive parts <= n, where parts are combined by XOR. ; 1,1,1,2,2,4,8,16,16,32,64,128,256,512,1024,2048,2048,4096,8192,16384,32768,65536,131072,262144,524288,1048576,2097152,4194304,8388608,16777216,33554432,67108864,67108864,134217728,268435456,536870912,1073741824,2147483648,4294967296,8589934592,17179869184,34359738368,68719476736,137438953472,274877906944,549755813888,1099511627776,2199023255552,4398046511104,8796093022208,17592186044416,35184372088832,70368744177664,140737488355328,281474976710656,562949953421312,1125899906842624,2251799813685248,4503599627370496,9007199254740992 mov $1,4 mov $2,$0 trn $2,2 lpb $2 mov $3,$2 div $2,2 lpb $3 mul $1,2 trn $3,2 lpe trn $2,1 lpe sub $1,4 div $1,4 add $1,1
41.315789
537
0.796178
d43aa4c92661e78f0b2f94f04af6880671c74122
194,360
asm
Assembly
Palmtree.Math.Core.Implements/vs_build/x64_Release/pmc_add.asm
rougemeilland/Palmtree.Math.Core.Implements
52f4f6c765d16c9b0baf1fd212c61a33daae138c
[ "MIT" ]
null
null
null
Palmtree.Math.Core.Implements/vs_build/x64_Release/pmc_add.asm
rougemeilland/Palmtree.Math.Core.Implements
52f4f6c765d16c9b0baf1fd212c61a33daae138c
[ "MIT" ]
null
null
null
Palmtree.Math.Core.Implements/vs_build/x64_Release/pmc_add.asm
rougemeilland/Palmtree.Math.Core.Implements
52f4f6c765d16c9b0baf1fd212c61a33daae138c
[ "MIT" ]
null
null
null
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.16.27026.1 include listing.inc INCLUDELIB MSVCRT INCLUDELIB OLDNAMES PUBLIC Initialize_Add PUBLIC PMC_Add_I_X PUBLIC PMC_Add_L_X PUBLIC PMC_Add_X_I PUBLIC PMC_Add_X_L PUBLIC PMC_Add_X_X EXTRN CheckBlockLight:PROC EXTRN AllocateNumber:PROC EXTRN DeallocateNumber:PROC EXTRN CommitNumber:PROC EXTRN CheckNumber:PROC EXTRN DuplicateNumber:PROC EXTRN From_I_Imp:PROC EXTRN From_L_Imp:PROC EXTRN number_zero:BYTE _BSS SEGMENT fp_Add_Imp DQ 01H DUP (?) _BSS ENDS ; COMDAT pdata pdata SEGMENT $pdata$PMC_Add_I_X DD imagerel $LN10 DD imagerel $LN10+94 DD imagerel $unwind$PMC_Add_I_X pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$PMC_Add_L_X DD imagerel $LN10 DD imagerel $LN10+96 DD imagerel $unwind$PMC_Add_L_X pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$PMC_Add_X_I DD imagerel $LN10 DD imagerel $LN10+91 DD imagerel $unwind$PMC_Add_X_I pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$PMC_Add_X_L DD imagerel $LN10 DD imagerel $LN10+93 DD imagerel $unwind$PMC_Add_X_L pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$PMC_Add_X_X DD imagerel $LN24 DD imagerel $LN24+405 DD imagerel $unwind$PMC_Add_X_X pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$Add_Imp_using_ADC DD imagerel Add_Imp_using_ADC DD imagerel Add_Imp_using_ADC+999 DD imagerel $unwind$Add_Imp_using_ADC pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$Add_Imp_using_ADCX DD imagerel Add_Imp_using_ADCX DD imagerel Add_Imp_using_ADCX+469 DD imagerel $unwind$Add_Imp_using_ADCX pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$PMC_Add_X_I_Imp DD imagerel PMC_Add_X_I_Imp DD imagerel PMC_Add_X_I_Imp+314 DD imagerel $unwind$PMC_Add_X_I_Imp pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$PMC_Add_X_L_Imp DD imagerel PMC_Add_X_L_Imp DD imagerel PMC_Add_X_L_Imp+318 DD imagerel $unwind$PMC_Add_X_L_Imp pdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$PMC_Add_X_L_Imp DD 060f01H DD 0a640fH DD 09340fH DD 0700b520fH xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$PMC_Add_X_I_Imp DD 060f01H DD 0a640fH DD 09340fH DD 0700b520fH xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$Add_Imp_using_ADCX DD 040a01H DD 08340aH DD 07006520aH xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$Add_Imp_using_ADC DD 040a01H DD 08340aH DD 07006520aH xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$PMC_Add_X_X DD 060f01H DD 0a640fH DD 09340fH DD 0700b520fH xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$PMC_Add_X_L DD 060f01H DD 07640fH DD 06340fH DD 0700b320fH xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$PMC_Add_X_I DD 060f01H DD 07640fH DD 06340fH DD 0700b320fH xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$PMC_Add_L_X DD 060f01H DD 07640fH DD 06340fH DD 0700b320fH xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$PMC_Add_I_X DD 060f01H DD 07640fH DD 06340fH DD 0700b320fH xdata ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; COMDAT PMC_Add_X_L_Imp _TEXT SEGMENT w_light_check_code$1 = 64 u$ = 64 v$ = 72 w$ = 80 PMC_Add_X_L_Imp PROC ; COMDAT ; 406 : { mov QWORD PTR [rsp+16], rbx mov QWORD PTR [rsp+24], rsi push rdi sub rsp, 48 ; 00000030H ; 407 : PMC_STATUS_CODE result; ; 408 : if (u->IS_ZERO) test BYTE PTR [rcx+40], 2 mov rbx, r8 mov rdi, rdx mov rsi, rcx je SHORT $LN2@PMC_Add_X_ ; 409 : { ; 410 : // u が 0 である場合 ; 411 : ; 412 : if (v == 0) test rdx, rdx jne SHORT $LN4@PMC_Add_X_ ; 413 : { ; 414 : // v が 0 である場合 ; 415 : ; 416 : // u と v がともに 0 であるので、加算結果の 0 を呼び出し元に返す。 ; 417 : *w = &number_zero; lea rax, OFFSET FLAT:number_zero mov QWORD PTR [r8], rax ; 504 : } ; 505 : ; 506 : } ; 507 : } ; 508 : return (PMC_STATUS_OK); xor eax, eax ; 509 : } mov rbx, QWORD PTR [rsp+72] mov rsi, QWORD PTR [rsp+80] add rsp, 48 ; 00000030H pop rdi ret 0 $LN4@PMC_Add_X_: ; 418 : } ; 419 : else ; 420 : { ; 421 : // v が 0 ではない場合 ; 422 : ; 423 : // 加算結果となる v の値を持つ NUMBER_HEADER 構造体を獲得し、呼び出し元へ返す。 ; 424 : if ((result = From_L_Imp(v, w)) != PMC_STATUS_OK) mov rdx, rbx mov rcx, rdi call From_L_Imp test eax, eax je $LN11@PMC_Add_X_ ; 509 : } mov rbx, QWORD PTR [rsp+72] mov rsi, QWORD PTR [rsp+80] add rsp, 48 ; 00000030H pop rdi ret 0 $LN2@PMC_Add_X_: ; 425 : return (result); ; 426 : } ; 427 : } ; 428 : else ; 429 : { ; 430 : // u が 0 ではない場合 ; 431 : ; 432 : if (v == 0) test rdi, rdi jne SHORT $LN7@PMC_Add_X_ ; 433 : { ; 434 : // v が 0 である場合 ; 435 : ; 436 : // 加算結果となる u の値を持つ NUMBER_HEADER 構造体を獲得し、呼び出し元へ返す。 ; 437 : if ((result = DuplicateNumber(u, w)) != PMC_STATUS_OK) mov rdx, rbx call DuplicateNumber test eax, eax je $LN11@PMC_Add_X_ ; 509 : } mov rbx, QWORD PTR [rsp+72] mov rsi, QWORD PTR [rsp+80] add rsp, 48 ; 00000030H pop rdi ret 0 $LN7@PMC_Add_X_: ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 644 : _BitScanReverse64(&pos, x); bsr rax, rdi ; 654 : return (sizeof(x) * 8 - 1 - pos); mov ecx, 63 ; 0000003fH ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 494 : if ((result = AllocateNumber(w, w_bit_count, &w_light_check_code)) != PMC_STATUS_OK) lea r8, QWORD PTR w_light_check_code$1[rsp] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 654 : return (sizeof(x) * 8 - 1 - pos); sub ecx, eax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 491 : __UNIT_TYPE v_bit_count = sizeof(v) * 8 - _LZCNT_ALT_UNIT((__UNIT_TYPE)v); mov edx, 64 ; 00000040H movsxd rax, ecx ; 494 : if ((result = AllocateNumber(w, w_bit_count, &w_light_check_code)) != PMC_STATUS_OK) mov rcx, rbx sub rdx, rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 204 : return (x >= y ? x : y); cmp QWORD PTR [rsi+16], rdx cmovae rdx, QWORD PTR [rsi+16] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 492 : __UNIT_TYPE w_bit_count = _MAXIMUM_UNIT(u_bit_count, v_bit_count) + 1; inc rdx ; 494 : if ((result = AllocateNumber(w, w_bit_count, &w_light_check_code)) != PMC_STATUS_OK) call AllocateNumber test eax, eax jne SHORT $LN1@PMC_Add_X_ ; 495 : return (result); ; 496 : if ((result = Add_X_1W(u->BLOCK, u->UNIT_WORD_COUNT, (__UNIT_TYPE)v, (*w)->BLOCK, (*w)->BLOCK_COUNT)) != PMC_STATUS_OK) mov rax, QWORD PTR [rbx] mov r10, QWORD PTR [rsi+56] mov r8, QWORD PTR [rsi+8] mov rdx, QWORD PTR [rax+48] mov r9, QWORD PTR [rax+56] ; 97 : c = _ADD_UNIT(0, *u_ptr++, v, w_ptr++); mov rax, QWORD PTR [r10] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); add rax, rdi mov QWORD PTR [r9], rax setb cl ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 99 : --w_count; lea rax, QWORD PTR [rdx-1] add r9, 8 dec r8 ; 100 : ; 101 : // 残りの桁の繰上りを行い復帰する。 ; 102 : return (DoCarry(c, u_ptr, u_count, w_ptr, w_count)); mov QWORD PTR [rsp+32], rax lea rdx, QWORD PTR [r10+8] call DoCarry ; 495 : return (result); ; 496 : if ((result = Add_X_1W(u->BLOCK, u->UNIT_WORD_COUNT, (__UNIT_TYPE)v, (*w)->BLOCK, (*w)->BLOCK_COUNT)) != PMC_STATUS_OK) mov rcx, QWORD PTR [rbx] ; 102 : return (DoCarry(c, u_ptr, u_count, w_ptr, w_count)); mov edi, eax ; 495 : return (result); ; 496 : if ((result = Add_X_1W(u->BLOCK, u->UNIT_WORD_COUNT, (__UNIT_TYPE)v, (*w)->BLOCK, (*w)->BLOCK_COUNT)) != PMC_STATUS_OK) test eax, eax je SHORT $LN21@PMC_Add_X_ ; 497 : { ; 498 : DeallocateNumber(*w); call DeallocateNumber ; 499 : return (result); mov eax, edi ; 509 : } mov rbx, QWORD PTR [rsp+72] mov rsi, QWORD PTR [rsp+80] add rsp, 48 ; 00000030H pop rdi ret 0 $LN21@PMC_Add_X_: ; 500 : } ; 501 : if ((result = CheckBlockLight((*w)->BLOCK, w_light_check_code)) != PMC_STATUS_OK) mov rdx, QWORD PTR w_light_check_code$1[rsp] mov rcx, QWORD PTR [rcx+56] call CheckBlockLight test eax, eax jne SHORT $LN1@PMC_Add_X_ ; 502 : return (result); ; 503 : CommitNumber(*w); mov rcx, QWORD PTR [rbx] call CommitNumber $LN11@PMC_Add_X_: ; 504 : } ; 505 : ; 506 : } ; 507 : } ; 508 : return (PMC_STATUS_OK); xor eax, eax $LN1@PMC_Add_X_: ; 509 : } mov rbx, QWORD PTR [rsp+72] mov rsi, QWORD PTR [rsp+80] add rsp, 48 ; 00000030H pop rdi ret 0 PMC_Add_X_L_Imp ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; COMDAT PMC_Add_X_I_Imp _TEXT SEGMENT nz_check_code$1 = 64 nu$ = 64 v$ = 72 nw$ = 80 PMC_Add_X_I_Imp PROC ; COMDAT ; 301 : { mov QWORD PTR [rsp+16], rbx mov QWORD PTR [rsp+24], rsi push rdi sub rsp, 48 ; 00000030H ; 302 : PMC_STATUS_CODE result; ; 303 : if (nu->IS_ZERO) test BYTE PTR [rcx+40], 2 mov rbx, r8 mov edi, edx mov rsi, rcx je SHORT $LN2@PMC_Add_X_ ; 304 : { ; 305 : // x が 0 である場合 ; 306 : ; 307 : if (v == 0) test edx, edx jne SHORT $LN4@PMC_Add_X_ ; 308 : { ; 309 : // y が 0 である場合 ; 310 : ; 311 : // x と y がともに 0 であるので、加算結果の 0 を呼び出し元に返す。 ; 312 : *nw = &number_zero; lea rax, OFFSET FLAT:number_zero mov QWORD PTR [r8], rax ; 354 : } ; 355 : } ; 356 : return (PMC_STATUS_OK); xor eax, eax ; 357 : } mov rbx, QWORD PTR [rsp+72] mov rsi, QWORD PTR [rsp+80] add rsp, 48 ; 00000030H pop rdi ret 0 $LN4@PMC_Add_X_: ; 313 : } ; 314 : else ; 315 : { ; 316 : // y が 0 ではない場合 ; 317 : ; 318 : // 加算結果となる y の値を持つ NUMBER_HEADER 構造体を獲得し、呼び出し元へ返す。 ; 319 : if ((result = From_I_Imp(v, nw)) != PMC_STATUS_OK) mov rdx, rbx mov ecx, edi call From_I_Imp test eax, eax je $LN8@PMC_Add_X_ ; 357 : } mov rbx, QWORD PTR [rsp+72] mov rsi, QWORD PTR [rsp+80] add rsp, 48 ; 00000030H pop rdi ret 0 $LN2@PMC_Add_X_: ; 320 : return (result); ; 321 : } ; 322 : } ; 323 : else ; 324 : { ; 325 : // x が 0 ではない場合 ; 326 : ; 327 : if (v == 0) test edx, edx jne SHORT $LN7@PMC_Add_X_ ; 328 : { ; 329 : // y が 0 である場合 ; 330 : ; 331 : // 加算結果となる x の値を持つ NUMBER_HEADER 構造体を獲得し、呼び出し元へ返す。 ; 332 : if ((result = DuplicateNumber(nu, nw)) != PMC_STATUS_OK) mov rdx, rbx call DuplicateNumber test eax, eax je $LN8@PMC_Add_X_ ; 357 : } mov rbx, QWORD PTR [rsp+72] mov rsi, QWORD PTR [rsp+80] add rsp, 48 ; 00000030H pop rdi ret 0 $LN7@PMC_Add_X_: ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 601 : _BitScanReverse(&pos, x); bsr eax, edi ; 607 : return (sizeof(x) * 8 - 1 - pos); mov ecx, 31 ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 344 : if ((result = AllocateNumber(nw, z_bit_count, &nz_check_code)) != PMC_STATUS_OK) lea r8, QWORD PTR nz_check_code$1[rsp] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 607 : return (sizeof(x) * 8 - 1 - pos); sub ecx, eax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 341 : __UNIT_TYPE y_bit_count = sizeof(v) * 8 - _LZCNT_ALT_32(v); mov edx, 32 ; 00000020H movsxd rax, ecx ; 344 : if ((result = AllocateNumber(nw, z_bit_count, &nz_check_code)) != PMC_STATUS_OK) mov rcx, rbx sub rdx, rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 204 : return (x >= y ? x : y); cmp QWORD PTR [rsi+16], rdx cmovae rdx, QWORD PTR [rsi+16] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 342 : __UNIT_TYPE z_bit_count = _MAXIMUM_UNIT(x_bit_count, y_bit_count) + 1; inc rdx ; 344 : if ((result = AllocateNumber(nw, z_bit_count, &nz_check_code)) != PMC_STATUS_OK) call AllocateNumber test eax, eax jne SHORT $LN1@PMC_Add_X_ ; 345 : return (result); ; 346 : if ((result = Add_X_1W(nu->BLOCK, nu->UNIT_WORD_COUNT, v, (*nw)->BLOCK, (*nw)->BLOCK_COUNT)) != PMC_STATUS_OK) mov rax, QWORD PTR [rbx] mov r11, QWORD PTR [rsi+56] mov r10, QWORD PTR [rsi+8] mov r8, QWORD PTR [rax+48] mov r9, QWORD PTR [rax+56] ; 97 : c = _ADD_UNIT(0, *u_ptr++, v, w_ptr++); mov rdx, QWORD PTR [r11] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); add rdx, rdi ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 99 : --w_count; lea rax, QWORD PTR [r8-1] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); mov QWORD PTR [r9], rdx ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 98 : --u_count; lea r8, QWORD PTR [r10-1] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); setb cl ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 102 : return (DoCarry(c, u_ptr, u_count, w_ptr, w_count)); mov QWORD PTR [rsp+32], rax add r9, 8 lea rdx, QWORD PTR [r11+8] call DoCarry ; 345 : return (result); ; 346 : if ((result = Add_X_1W(nu->BLOCK, nu->UNIT_WORD_COUNT, v, (*nw)->BLOCK, (*nw)->BLOCK_COUNT)) != PMC_STATUS_OK) mov rcx, QWORD PTR [rbx] ; 102 : return (DoCarry(c, u_ptr, u_count, w_ptr, w_count)); mov edi, eax ; 345 : return (result); ; 346 : if ((result = Add_X_1W(nu->BLOCK, nu->UNIT_WORD_COUNT, v, (*nw)->BLOCK, (*nw)->BLOCK_COUNT)) != PMC_STATUS_OK) test eax, eax je SHORT $LN11@PMC_Add_X_ ; 347 : { ; 348 : DeallocateNumber(*nw); call DeallocateNumber ; 349 : return (result); mov eax, edi ; 357 : } mov rbx, QWORD PTR [rsp+72] mov rsi, QWORD PTR [rsp+80] add rsp, 48 ; 00000030H pop rdi ret 0 $LN11@PMC_Add_X_: ; 350 : } ; 351 : if ((result = CheckBlockLight((*nw)->BLOCK, nz_check_code)) != PMC_STATUS_OK) mov rdx, QWORD PTR nz_check_code$1[rsp] mov rcx, QWORD PTR [rcx+56] call CheckBlockLight test eax, eax jne SHORT $LN1@PMC_Add_X_ ; 352 : return (result); ; 353 : CommitNumber(*nw); mov rcx, QWORD PTR [rbx] call CommitNumber $LN8@PMC_Add_X_: ; 354 : } ; 355 : } ; 356 : return (PMC_STATUS_OK); xor eax, eax $LN1@PMC_Add_X_: ; 357 : } mov rbx, QWORD PTR [rsp+72] mov rsi, QWORD PTR [rsp+80] add rsp, 48 ; 00000030H pop rdi ret 0 PMC_Add_X_I_Imp ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; COMDAT Add_Imp_using_ADCX _TEXT SEGMENT u_buf$ = 64 u_count$ = 72 v_buf$ = 80 v_count$ = 88 w_buf$ = 96 w_count$ = 104 Add_Imp_using_ADCX PROC ; COMDAT ; 224 : { mov QWORD PTR [rsp+8], rbx push rdi sub rsp, 48 ; 00000030H ; 225 : // x のワード長が y のワード長以上であるようにする ; 226 : if (u_count < v_count) ; 227 : { ; 228 : __UNIT_TYPE* t_buf = u_buf; ; 229 : u_buf = v_buf; ; 230 : v_buf = t_buf; ; 231 : __UNIT_TYPE t_count = u_count; ; 232 : u_count = v_count; ; 233 : v_count = t_count; ; 234 : } ; 235 : __UNIT_TYPE* up = u_buf; cmp rdx, r9 mov rbx, rdx mov rdi, r9 mov r10, rcx cmovae rbx, r9 cmovae rdi, rdx ; 236 : __UNIT_TYPE* vp = v_buf; ; 237 : __UNIT_TYPE* wp = w_buf; mov r9, QWORD PTR w_buf$[rsp] cmovae r10, r8 mov rdx, r8 ; 238 : char c = 0; ; 239 : ; 240 : // まず 32 ワードずつ加算をする。 ; 241 : __UNIT_TYPE count = v_count >> 5; mov r11, rbx cmovae rdx, rcx xor cl, cl shr r11, 5 ; 242 : while (count != 0) test r11, r11 je SHORT $LN3@Add_Imp_us npad 4 $LL2@Add_Imp_us: ; 243 : { ; 244 : c = _ADD_32WORDS_ADCX(c, up, vp, wp); mov r8, r10 call _ADD_32WORDS_ADCX ; 245 : up += 32; add rdx, 256 ; 00000100H ; 246 : vp += 32; add r10, 256 ; 00000100H ; 247 : wp += 32; add r9, 256 ; 00000100H movzx ecx, al ; 248 : --count; sub r11, 1 jne SHORT $LL2@Add_Imp_us $LN3@Add_Imp_us: ; 249 : } ; 250 : // この時点で未処理の桁は 32 ワード未満のはず ; 251 : ; 252 : // 未処理の桁が 16 ワード以上あるなら 16 ワード加算を行う。 ; 253 : if (v_count & 0x10) test bl, 16 je SHORT $LN5@Add_Imp_us ; 254 : { ; 255 : c = _ADD_16WORDS_ADCX(c, up, vp, wp); mov r8, r10 call _ADD_16WORDS_ADCX ; 256 : up += 16; sub rdx, -128 ; ffffffffffffff80H ; 257 : vp += 16; sub r10, -128 ; ffffffffffffff80H ; 258 : wp += 16; sub r9, -128 ; ffffffffffffff80H movzx ecx, al $LN5@Add_Imp_us: ; 259 : } ; 260 : // この時点で未処理の桁は 16 ワード未満のはず ; 261 : ; 262 : // 未処理の桁が 8 ワード以上あるなら 8 ワード加算を行う。 ; 263 : if (v_count & 0x8) test bl, 8 je $LN6@Add_Imp_us ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3286 : c = _ADDX_UNIT(c, xp[0], yp[0], &zp[0]); mov rax, QWORD PTR [rdx] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); add cl, -1 adcx rax, QWORD PTR [r10] mov QWORD PTR [r9], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3287 : c = _ADDX_UNIT(c, xp[1], yp[1], &zp[1]); mov rax, QWORD PTR [rdx+8] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r10+8] mov QWORD PTR [r9+8], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3288 : c = _ADDX_UNIT(c, xp[2], yp[2], &zp[2]); mov rax, QWORD PTR [rdx+16] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r10+16] mov QWORD PTR [r9+16], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3289 : c = _ADDX_UNIT(c, xp[3], yp[3], &zp[3]); mov rax, QWORD PTR [rdx+24] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r10+24] mov QWORD PTR [r9+24], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3290 : c = _ADDX_UNIT(c, xp[4], yp[4], &zp[4]); mov rax, QWORD PTR [rdx+32] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r10+32] mov QWORD PTR [r9+32], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3291 : c = _ADDX_UNIT(c, xp[5], yp[5], &zp[5]); mov rax, QWORD PTR [rdx+40] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r10+40] mov QWORD PTR [r9+40], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3292 : c = _ADDX_UNIT(c, xp[6], yp[6], &zp[6]); mov rax, QWORD PTR [rdx+48] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r10+48] mov QWORD PTR [r9+48], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3293 : c = _ADDX_UNIT(c, xp[7], yp[7], &zp[7]); mov rax, QWORD PTR [rdx+56] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r10+56] mov QWORD PTR [r9+56], rax setb cl ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 266 : up += 8; add rdx, 64 ; 00000040H ; 267 : vp += 8; add r10, 64 ; 00000040H ; 268 : wp += 8; add r9, 64 ; 00000040H $LN6@Add_Imp_us: ; 269 : } ; 270 : // この時点で未処理の桁は 8 ワード未満のはず ; 271 : ; 272 : // 未処理の桁が 4 ワード以上あるなら 4 ワード加算を行う。 ; 273 : if (v_count & 0x4) test bl, 4 je SHORT $LN7@Add_Imp_us ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3938 : c = _ADDX_UNIT(c, xp[0], yp[0], &zp[0]); mov rax, QWORD PTR [rdx] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); add cl, -1 adcx rax, QWORD PTR [r10] mov QWORD PTR [r9], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3939 : c = _ADDX_UNIT(c, xp[1], yp[1], &zp[1]); mov rax, QWORD PTR [rdx+8] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r10+8] mov QWORD PTR [r9+8], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3940 : c = _ADDX_UNIT(c, xp[2], yp[2], &zp[2]); mov rax, QWORD PTR [rdx+16] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r10+16] mov QWORD PTR [r9+16], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3941 : c = _ADDX_UNIT(c, xp[3], yp[3], &zp[3]); mov rax, QWORD PTR [rdx+24] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r10+24] mov QWORD PTR [r9+24], rax setb cl ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 276 : up += 4; add rdx, 32 ; 00000020H ; 277 : vp += 4; add r10, 32 ; 00000020H ; 278 : wp += 4; add r9, 32 ; 00000020H $LN7@Add_Imp_us: ; 279 : } ; 280 : // この時点で未処理の桁は 4 ワード未満のはず ; 281 : ; 282 : // 未処理の桁が 2 ワード以上あるなら 2 ワード加算を行う。 ; 283 : if (v_count & 0x2) test bl, 2 je SHORT $LN8@Add_Imp_us ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 4380 : c = _ADDX_UNIT(c, xp[0], yp[0], &zp[0]); mov rax, QWORD PTR [rdx] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); add cl, -1 adcx rax, QWORD PTR [r10] mov QWORD PTR [r9], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 4381 : c = _ADDX_UNIT(c, xp[1], yp[1], &zp[1]); mov rax, QWORD PTR [rdx+8] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r10+8] mov QWORD PTR [r9+8], rax setb cl ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 286 : up += 2; add rdx, 16 ; 287 : vp += 2; add r10, 16 ; 288 : wp += 2; add r9, 16 $LN8@Add_Imp_us: ; 289 : } ; 290 : // この時点で未処理の桁は 2 ワード未満のはず ; 291 : ; 292 : // 未処理の桁が 1 ワード以上あるなら 1 ワード加算を行う。 ; 293 : if (v_count & 0x1) test bl, 1 je SHORT $LN9@Add_Imp_us ; 294 : c = _ADDX_UNIT(c, *up++, *vp++, wp++); mov rax, QWORD PTR [rdx] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); add cl, -1 adcx rax, QWORD PTR [r10] mov QWORD PTR [r9], rax setb cl ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 294 : c = _ADDX_UNIT(c, *up++, *vp++, wp++); add rdx, 8 add r9, 8 $LN9@Add_Imp_us: ; 295 : ; 296 : // 残りの桁の繰り上がりを計算し、復帰する。 ; 297 : return (DoCarry(c, up, u_count - v_count, wp, w_count - v_count)); mov rax, QWORD PTR w_count$[rsp] sub rdi, rbx sub rax, rbx mov r8, rdi mov QWORD PTR w_buf$[rsp], rax ; 298 : } mov rbx, QWORD PTR [rsp+64] add rsp, 48 ; 00000030H pop rdi ; 295 : ; 296 : // 残りの桁の繰り上がりを計算し、復帰する。 ; 297 : return (DoCarry(c, up, u_count - v_count, wp, w_count - v_count)); jmp DoCarry Add_Imp_using_ADCX ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; COMDAT Add_Imp_using_ADC _TEXT SEGMENT u_buf$ = 64 u_count$ = 72 v_buf$ = 80 v_count$ = 88 w_buf$ = 96 w_count$ = 104 Add_Imp_using_ADC PROC ; COMDAT ; 147 : { mov QWORD PTR [rsp+8], rbx push rdi sub rsp, 48 ; 00000030H ; 148 : // x のワード長が y のワード長以上であるようにする ; 149 : if (u_count < v_count) ; 150 : { ; 151 : __UNIT_TYPE* t_buf = u_buf; ; 152 : u_buf = v_buf; ; 153 : v_buf = t_buf; ; 154 : __UNIT_TYPE t_count = u_count; ; 155 : u_count = v_count; ; 156 : v_count = t_count; ; 157 : } ; 158 : __UNIT_TYPE* up = u_buf; cmp rdx, r9 mov r10, r8 mov r8, rcx mov rbx, r9 cmovae r8, r10 cmovae rbx, rdx cmovae r10, rcx mov r11, rdx cmovae r11, r9 ; 159 : __UNIT_TYPE* vp = v_buf; ; 160 : __UNIT_TYPE* wp = w_buf; mov r9, QWORD PTR w_buf$[rsp] ; 161 : char c = 0; ; 162 : ; 163 : // まず 32 ワードずつ加算をする。 ; 164 : __UNIT_TYPE count = v_count >> 5; mov rdi, r11 xor cl, cl shr rdi, 5 ; 165 : while (count != 0) test rdi, rdi je $LN3@Add_Imp_us ; 148 : // x のワード長が y のワード長以上であるようにする ; 149 : if (u_count < v_count) ; 150 : { ; 151 : __UNIT_TYPE* t_buf = u_buf; ; 152 : u_buf = v_buf; ; 153 : v_buf = t_buf; ; 154 : __UNIT_TYPE t_count = u_count; ; 155 : u_count = v_count; ; 156 : v_count = t_count; ; 157 : } ; 158 : __UNIT_TYPE* up = u_buf; mov rdx, r8 sub rdx, r9 npad 10 $LL2@Add_Imp_us: ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 49 : c = _ADD_UNIT(c, xp[0], yp[0], &zp[0]); mov rax, QWORD PTR [r10] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); add cl, -1 adc rax, QWORD PTR [r8] mov QWORD PTR [r9], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 50 : c = _ADD_UNIT(c, xp[1], yp[1], &zp[1]); mov rax, QWORD PTR [r10+8] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [rdx+r9+8] mov QWORD PTR [r9+8], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 51 : c = _ADD_UNIT(c, xp[2], yp[2], &zp[2]); mov rax, QWORD PTR [r10+16] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [rdx+r9+16] mov QWORD PTR [r9+16], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 52 : c = _ADD_UNIT(c, xp[3], yp[3], &zp[3]); mov rax, QWORD PTR [r10+24] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [rdx+r9+24] mov QWORD PTR [r9+24], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 53 : c = _ADD_UNIT(c, xp[4], yp[4], &zp[4]); mov rax, QWORD PTR [r10+32] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [rdx+r9+32] mov QWORD PTR [r9+32], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 54 : c = _ADD_UNIT(c, xp[5], yp[5], &zp[5]); mov rax, QWORD PTR [r10+40] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+40] mov QWORD PTR [r9+40], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 55 : c = _ADD_UNIT(c, xp[6], yp[6], &zp[6]); mov rax, QWORD PTR [r10+48] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+48] mov QWORD PTR [r9+48], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 56 : c = _ADD_UNIT(c, xp[7], yp[7], &zp[7]); mov rax, QWORD PTR [r10+56] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+56] mov QWORD PTR [r9+56], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 57 : c = _ADD_UNIT(c, xp[8], yp[8], &zp[8]); mov rax, QWORD PTR [r10+64] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+64] mov QWORD PTR [r9+64], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 58 : c = _ADD_UNIT(c, xp[9], yp[9], &zp[9]); mov rax, QWORD PTR [r10+72] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+72] mov QWORD PTR [r9+72], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 59 : c = _ADD_UNIT(c, xp[10], yp[10], &zp[10]); mov rax, QWORD PTR [r10+80] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+80] mov QWORD PTR [r9+80], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 60 : c = _ADD_UNIT(c, xp[11], yp[11], &zp[11]); mov rax, QWORD PTR [r10+88] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+88] mov QWORD PTR [r9+88], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 61 : c = _ADD_UNIT(c, xp[12], yp[12], &zp[12]); mov rax, QWORD PTR [r10+96] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+96] mov QWORD PTR [r9+96], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 62 : c = _ADD_UNIT(c, xp[13], yp[13], &zp[13]); mov rax, QWORD PTR [r10+104] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+104] mov QWORD PTR [r9+104], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 63 : c = _ADD_UNIT(c, xp[14], yp[14], &zp[14]); mov rax, QWORD PTR [r10+112] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+112] mov QWORD PTR [r9+112], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 64 : c = _ADD_UNIT(c, xp[15], yp[15], &zp[15]); mov rax, QWORD PTR [r10+120] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+120] mov QWORD PTR [r9+120], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 65 : c = _ADD_UNIT(c, xp[16], yp[16], &zp[16]); mov rax, QWORD PTR [r10+128] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+128] mov QWORD PTR [r9+128], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 66 : c = _ADD_UNIT(c, xp[17], yp[17], &zp[17]); mov rax, QWORD PTR [r10+136] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+136] mov QWORD PTR [r9+136], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 67 : c = _ADD_UNIT(c, xp[18], yp[18], &zp[18]); mov rax, QWORD PTR [r10+144] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+144] mov QWORD PTR [r9+144], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 68 : c = _ADD_UNIT(c, xp[19], yp[19], &zp[19]); mov rax, QWORD PTR [r10+152] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+152] mov QWORD PTR [r9+152], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 69 : c = _ADD_UNIT(c, xp[20], yp[20], &zp[20]); mov rax, QWORD PTR [r10+160] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+160] mov QWORD PTR [r9+160], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 70 : c = _ADD_UNIT(c, xp[21], yp[21], &zp[21]); mov rax, QWORD PTR [r10+168] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+168] mov QWORD PTR [r9+168], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 71 : c = _ADD_UNIT(c, xp[22], yp[22], &zp[22]); mov rax, QWORD PTR [r10+176] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+176] mov QWORD PTR [r9+176], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 72 : c = _ADD_UNIT(c, xp[23], yp[23], &zp[23]); mov rax, QWORD PTR [r10+184] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+184] mov QWORD PTR [r9+184], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 73 : c = _ADD_UNIT(c, xp[24], yp[24], &zp[24]); mov rax, QWORD PTR [r10+192] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+192] mov QWORD PTR [r9+192], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 74 : c = _ADD_UNIT(c, xp[25], yp[25], &zp[25]); mov rax, QWORD PTR [r10+200] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+200] mov QWORD PTR [r9+200], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 75 : c = _ADD_UNIT(c, xp[26], yp[26], &zp[26]); mov rax, QWORD PTR [r10+208] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+208] mov QWORD PTR [r9+208], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 76 : c = _ADD_UNIT(c, xp[27], yp[27], &zp[27]); mov rax, QWORD PTR [r10+216] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+216] mov QWORD PTR [r9+216], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 77 : c = _ADD_UNIT(c, xp[28], yp[28], &zp[28]); mov rax, QWORD PTR [r10+224] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+224] mov QWORD PTR [r9+224], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 78 : c = _ADD_UNIT(c, xp[29], yp[29], &zp[29]); mov rax, QWORD PTR [r10+232] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+232] mov QWORD PTR [r9+232], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 79 : c = _ADD_UNIT(c, xp[30], yp[30], &zp[30]); mov rax, QWORD PTR [r10+240] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+240] mov QWORD PTR [r9+240], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 80 : c = _ADD_UNIT(c, xp[31], yp[31], &zp[31]); mov rax, QWORD PTR [r10+248] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r9+rdx+248] mov QWORD PTR [r9+248], rax setb cl ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 168 : up += 32; add r10, 256 ; 00000100H ; 169 : vp += 32; add r8, 256 ; 00000100H ; 170 : wp += 32; add r9, 256 ; 00000100H ; 171 : --count; sub rdi, 1 jne $LL2@Add_Imp_us $LN3@Add_Imp_us: ; 172 : } ; 173 : // この時点で未処理の桁は 32 ワード未満のはず ; 174 : ; 175 : // 未処理の桁が 16 ワード以上あるなら 16 ワード加算を行う。 ; 176 : if (v_count & 0x10) test r11b, 16 je SHORT $LN5@Add_Imp_us ; 177 : { ; 178 : c = _ADD_16WORDS_ADC(c, up, vp, wp); mov rdx, r10 call _ADD_16WORDS_ADC ; 179 : up += 16; sub r10, -128 ; ffffffffffffff80H ; 180 : vp += 16; sub r8, -128 ; ffffffffffffff80H ; 181 : wp += 16; sub r9, -128 ; ffffffffffffff80H movzx ecx, al $LN5@Add_Imp_us: ; 182 : } ; 183 : // この時点で未処理の桁は 16 ワード未満のはず ; 184 : ; 185 : // 未処理の桁が 8 ワード以上あるなら 8 ワード加算を行う。 ; 186 : if (v_count & 0x8) test r11b, 8 je SHORT $LN6@Add_Imp_us ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3201 : c = _ADD_UNIT(c, xp[0], yp[0], &zp[0]); mov rax, QWORD PTR [r10] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); add cl, -1 adc rax, QWORD PTR [r8] mov QWORD PTR [r9], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3202 : c = _ADD_UNIT(c, xp[1], yp[1], &zp[1]); mov rax, QWORD PTR [r10+8] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+8] mov QWORD PTR [r9+8], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3203 : c = _ADD_UNIT(c, xp[2], yp[2], &zp[2]); mov rax, QWORD PTR [r10+16] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+16] mov QWORD PTR [r9+16], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3204 : c = _ADD_UNIT(c, xp[3], yp[3], &zp[3]); mov rax, QWORD PTR [r10+24] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+24] mov QWORD PTR [r9+24], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3205 : c = _ADD_UNIT(c, xp[4], yp[4], &zp[4]); mov rax, QWORD PTR [r10+32] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+32] mov QWORD PTR [r9+32], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3206 : c = _ADD_UNIT(c, xp[5], yp[5], &zp[5]); mov rax, QWORD PTR [r10+40] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+40] mov QWORD PTR [r9+40], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3207 : c = _ADD_UNIT(c, xp[6], yp[6], &zp[6]); mov rax, QWORD PTR [r10+48] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+48] mov QWORD PTR [r9+48], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3208 : c = _ADD_UNIT(c, xp[7], yp[7], &zp[7]); mov rax, QWORD PTR [r10+56] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+56] mov QWORD PTR [r9+56], rax setb cl ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 189 : up += 8; add r10, 64 ; 00000040H ; 190 : vp += 8; add r8, 64 ; 00000040H ; 191 : wp += 8; add r9, 64 ; 00000040H $LN6@Add_Imp_us: ; 192 : } ; 193 : // この時点で未処理の桁は 8 ワード未満のはず ; 194 : ; 195 : // 未処理の桁が 4 ワード以上あるなら 4 ワード加算を行う。 ; 196 : if (v_count & 0x4) test r11b, 4 je SHORT $LN7@Add_Imp_us ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3881 : c = _ADD_UNIT(c, xp[0], yp[0], &zp[0]); mov rax, QWORD PTR [r10] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); add cl, -1 adc rax, QWORD PTR [r8] mov QWORD PTR [r9], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3882 : c = _ADD_UNIT(c, xp[1], yp[1], &zp[1]); mov rax, QWORD PTR [r10+8] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+8] mov QWORD PTR [r9+8], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3883 : c = _ADD_UNIT(c, xp[2], yp[2], &zp[2]); mov rax, QWORD PTR [r10+16] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+16] mov QWORD PTR [r9+16], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3884 : c = _ADD_UNIT(c, xp[3], yp[3], &zp[3]); mov rax, QWORD PTR [r10+24] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+24] mov QWORD PTR [r9+24], rax setb cl ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 199 : up += 4; add r10, 32 ; 00000020H ; 200 : vp += 4; add r8, 32 ; 00000020H ; 201 : wp += 4; add r9, 32 ; 00000020H $LN7@Add_Imp_us: ; 202 : } ; 203 : // この時点で未処理の桁は 4 ワード未満のはず ; 204 : ; 205 : // 未処理の桁が 2 ワード以上あるなら 2 ワード加算を行う。 ; 206 : if (v_count & 0x2) test r11b, 2 je SHORT $LN8@Add_Imp_us ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 4337 : c = _ADD_UNIT(c, xp[0], yp[0], &zp[0]); mov rax, QWORD PTR [r10] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); add cl, -1 adc rax, QWORD PTR [r8] mov QWORD PTR [r9], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 4338 : c = _ADD_UNIT(c, xp[1], yp[1], &zp[1]); mov rax, QWORD PTR [r10+8] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+8] mov QWORD PTR [r9+8], rax setb cl ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 209 : up += 2; add r10, 16 ; 210 : vp += 2; add r8, 16 ; 211 : wp += 2; add r9, 16 $LN8@Add_Imp_us: ; 212 : } ; 213 : // この時点で未処理の桁は 2 ワード未満のはず ; 214 : ; 215 : // 未処理の桁が 1 ワード以上あるなら 1 ワード加算を行う。 ; 216 : if (v_count & 0x1) test r11b, 1 je SHORT $LN9@Add_Imp_us ; 217 : c = _ADD_UNIT(c, *up++, *vp++, wp++); mov rax, QWORD PTR [r10] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); add cl, -1 adc rax, QWORD PTR [r8] mov QWORD PTR [r9], rax setb cl ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 217 : c = _ADD_UNIT(c, *up++, *vp++, wp++); add r10, 8 add r9, 8 $LN9@Add_Imp_us: ; 218 : ; 219 : // 残りの桁の繰り上がりを計算し、復帰する。 ; 220 : return (DoCarry(c, up, u_count - v_count, wp, w_count - v_count)); mov rax, QWORD PTR w_count$[rsp] sub rbx, r11 sub rax, r11 mov r8, rbx mov rdx, r10 mov QWORD PTR w_buf$[rsp], rax ; 221 : } mov rbx, QWORD PTR [rsp+64] add rsp, 48 ; 00000030H pop rdi ; 218 : ; 219 : // 残りの桁の繰り上がりを計算し、復帰する。 ; 220 : return (DoCarry(c, up, u_count - v_count, wp, w_count - v_count)); jmp DoCarry Add_Imp_using_ADC ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; COMDAT Add_X_2W _TEXT SEGMENT u_buf$ = 8 u_count$ = 16 v_hi$ = 24 v_lo$ = 32 w_buf$ = 40 w_count$ = 48 Add_X_2W PROC ; COMDAT ; 107 : __UNIT_TYPE* up = u_buf; ; 108 : __UNIT_TYPE* wp = w_buf; mov rax, QWORD PTR [rcx] mov r11, rdx mov r10, r9 mov r9, QWORD PTR w_buf$[rsp] mov rdx, rcx ; 109 : char c; ; 110 : ; 111 : if (u_count < 2) cmp r11, 2 jae SHORT $LN2@Add_X_2W ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); add rax, r10 mov QWORD PTR [r9], rax adc r8, 0 mov QWORD PTR [r9+8], r8 setb al ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 122 : if (c) test al, al je SHORT $LN4@Add_X_2W ; 123 : wp[2] = 1; mov QWORD PTR [r9+16], 1 $LN4@Add_X_2W: ; 124 : ; 125 : // 正常復帰する。 ; 126 : return (PMC_STATUS_OK); xor eax, eax ; 142 : } ; 143 : } ret 0 $LN2@Add_X_2W: ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); add rax, r10 mov QWORD PTR [r9], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 136 : c = _ADD_UNIT(c, *up++, v_hi, wp++); mov rax, QWORD PTR [rcx+8] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, r8 ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 137 : u_count -= 2; lea r8, QWORD PTR [r11-2] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); mov QWORD PTR [r9+8], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 138 : w_count -= 2; mov rax, QWORD PTR w_count$[rsp] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); setb cl ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 138 : w_count -= 2; add rax, -2 add r9, 16 add rdx, 16 ; 139 : ; 140 : // 残りの桁の繰り上がりを計算し、復帰する。 ; 141 : return (DoCarry(c, up, u_count, wp, w_count)); mov QWORD PTR w_buf$[rsp], rax jmp DoCarry Add_X_2W ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; COMDAT Add_X_1W _TEXT SEGMENT u_ptr$ = 8 u_count$ = 16 v$ = 24 w_ptr$ = 32 w_count$ = 40 Add_X_1W PROC ; COMDAT ; 94 : char c; ; 95 : ; 96 : // 最下桁の加算を行う ; 97 : c = _ADD_UNIT(0, *u_ptr++, v, w_ptr++); mov rax, QWORD PTR [rcx] mov r10, rcx ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); add rax, r8 ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 98 : --u_count; lea r8, QWORD PTR [rdx-1] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); mov QWORD PTR [r9], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 99 : --w_count; mov rax, QWORD PTR w_count$[rsp] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); setb cl ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 99 : --w_count; dec rax lea rdx, QWORD PTR [r10+8] add r9, 8 ; 100 : ; 101 : // 残りの桁の繰上りを行い復帰する。 ; 102 : return (DoCarry(c, u_ptr, u_count, w_ptr, w_count)); mov QWORD PTR w_count$[rsp], rax jmp DoCarry Add_X_1W ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; COMDAT DoCarry _TEXT SEGMENT c$ = 8 u_ptr$ = 16 u_count$ = 24 w_ptr$ = 32 w_count$ = 40 DoCarry PROC ; COMDAT ; 42 : // 繰り上がりを続く限り行う ; 43 : for (;;) ; 44 : { ; 45 : if (u_count <= 0) mov r10, QWORD PTR w_count$[rsp] test r8, r8 je SHORT $LN18@DoCarry npad 6 $LL2@DoCarry: ; 60 : } ; 61 : ; 62 : // u の最上位に達してしまった場合はいずれにしろループを中断して正常復帰する。 ; 63 : ; 64 : return (PMC_STATUS_OK); ; 65 : } ; 66 : else if (c) test cl, cl je SHORT $LN17@DoCarry ; 71 : c = _ADD_UNIT(c, *u_ptr++, 0, w_ptr++); mov rax, QWORD PTR [rdx] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); add cl, -1 adc rax, 0 mov QWORD PTR [r9], rax setb cl ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 71 : c = _ADD_UNIT(c, *u_ptr++, 0, w_ptr++); add rdx, 8 add r9, 8 ; 72 : --u_count; ; 73 : --w_count; dec r10 sub r8, 1 jne SHORT $LL2@DoCarry $LN18@DoCarry: ; 46 : { ; 47 : // u の最上位まで達してしまった場合 ; 48 : ; 49 : if (c) test cl, cl je SHORT $LN6@DoCarry ; 50 : { ; 51 : // かつそれでも繰り上がりを行う必要がある場合 ; 52 : if (w_count <= 0) test r10, r10 jne SHORT $LN10@DoCarry ; 53 : { ; 54 : // しかし w がもう終端に達してしまった場合 ; 55 : ; 56 : // w のバッファはこの余裕を見込んでいるのでこのルートには到達しないはず。 ; 57 : return (PMC_STATUS_INTERNAL_ERROR); mov eax, -256 ; ffffffffffffff00H ; 87 : } ; 88 : } ; 89 : } ret 0 $LN17@DoCarry: ; 74 : } ; 75 : else ; 76 : { ; 77 : // u の最上位に達しておらず、かつキャリーが立っていない場合 ; 78 : ; 79 : // 繰り上がりを中断し、u の残りのデータをzにそのまま複写し、正常復帰する。 ; 80 : while (u_count > 0) test r8, r8 je SHORT $LN6@DoCarry sub rdx, r9 npad 4 $LL5@DoCarry: ; 81 : { ; 82 : *w_ptr++ = *u_ptr++; mov rax, QWORD PTR [rdx+r9] mov QWORD PTR [r9], rax lea r9, QWORD PTR [r9+8] ; 83 : --u_count; sub r8, 1 jne SHORT $LL5@DoCarry ; 84 : --w_count; ; 85 : } ; 86 : return (PMC_STATUS_OK); xor eax, eax ; 87 : } ; 88 : } ; 89 : } ret 0 $LN10@DoCarry: ; 58 : } ; 59 : *w_ptr = 1; mov QWORD PTR [r9], 1 $LN6@DoCarry: ; 84 : --w_count; ; 85 : } ; 86 : return (PMC_STATUS_OK); xor eax, eax ; 87 : } ; 88 : } ; 89 : } ret 0 DoCarry ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; COMDAT _ADD_2WORDS_ADCX _TEXT SEGMENT c$ = 8 xp$ = 16 yp$ = 24 zp$ = 32 _ADD_2WORDS_ADCX PROC ; COMDAT ; 4379 : #ifdef _MSC_VER ; 4380 : c = _ADDX_UNIT(c, xp[0], yp[0], &zp[0]); mov rax, QWORD PTR [rdx] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); add cl, -1 adcx rax, QWORD PTR [r8] mov QWORD PTR [r9], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 4381 : c = _ADDX_UNIT(c, xp[1], yp[1], &zp[1]); mov rcx, QWORD PTR [rdx+8] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rcx, QWORD PTR [r8+8] mov QWORD PTR [r9+8], rcx setb al ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 4418 : } ret 0 _ADD_2WORDS_ADCX ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; COMDAT _ADD_2WORDS_ADC _TEXT SEGMENT c$ = 8 xp$ = 16 yp$ = 24 zp$ = 32 _ADD_2WORDS_ADC PROC ; COMDAT ; 4336 : #ifdef _MSC_VER ; 4337 : c = _ADD_UNIT(c, xp[0], yp[0], &zp[0]); mov rax, QWORD PTR [rdx] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); add cl, -1 adc rax, QWORD PTR [r8] mov QWORD PTR [r9], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 4338 : c = _ADD_UNIT(c, xp[1], yp[1], &zp[1]); mov rcx, QWORD PTR [rdx+8] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rcx, QWORD PTR [r8+8] mov QWORD PTR [r9+8], rcx setb al ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 4375 : } ret 0 _ADD_2WORDS_ADC ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; COMDAT _ADD_4WORDS_ADCX _TEXT SEGMENT c$ = 8 xp$ = 16 yp$ = 24 zp$ = 32 _ADD_4WORDS_ADCX PROC ; COMDAT ; 3937 : #ifdef _MSC_VER ; 3938 : c = _ADDX_UNIT(c, xp[0], yp[0], &zp[0]); mov rax, QWORD PTR [rdx] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); add cl, -1 adcx rax, QWORD PTR [r8] mov QWORD PTR [r9], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3939 : c = _ADDX_UNIT(c, xp[1], yp[1], &zp[1]); mov rax, QWORD PTR [rdx+8] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+8] mov QWORD PTR [r9+8], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3940 : c = _ADDX_UNIT(c, xp[2], yp[2], &zp[2]); mov rax, QWORD PTR [rdx+16] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+16] mov QWORD PTR [r9+16], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3941 : c = _ADDX_UNIT(c, xp[3], yp[3], &zp[3]); mov rcx, QWORD PTR [rdx+24] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rcx, QWORD PTR [r8+24] mov QWORD PTR [r9+24], rcx setb al ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3990 : } ret 0 _ADD_4WORDS_ADCX ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; COMDAT _ADD_4WORDS_ADC _TEXT SEGMENT c$ = 8 xp$ = 16 yp$ = 24 zp$ = 32 _ADD_4WORDS_ADC PROC ; COMDAT ; 3880 : #ifdef _MSC_VER ; 3881 : c = _ADD_UNIT(c, xp[0], yp[0], &zp[0]); mov rax, QWORD PTR [rdx] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); add cl, -1 adc rax, QWORD PTR [r8] mov QWORD PTR [r9], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3882 : c = _ADD_UNIT(c, xp[1], yp[1], &zp[1]); mov rax, QWORD PTR [rdx+8] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+8] mov QWORD PTR [r9+8], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3883 : c = _ADD_UNIT(c, xp[2], yp[2], &zp[2]); mov rax, QWORD PTR [rdx+16] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+16] mov QWORD PTR [r9+16], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3884 : c = _ADD_UNIT(c, xp[3], yp[3], &zp[3]); mov rcx, QWORD PTR [rdx+24] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rcx, QWORD PTR [r8+24] mov QWORD PTR [r9+24], rcx setb al ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3933 : } ret 0 _ADD_4WORDS_ADC ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; COMDAT _ADD_8WORDS_ADCX _TEXT SEGMENT c$ = 8 xp$ = 16 yp$ = 24 zp$ = 32 _ADD_8WORDS_ADCX PROC ; COMDAT ; 3285 : #ifdef _MSC_VER ; 3286 : c = _ADDX_UNIT(c, xp[0], yp[0], &zp[0]); mov rax, QWORD PTR [rdx] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); add cl, -1 adcx rax, QWORD PTR [r8] mov QWORD PTR [r9], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3287 : c = _ADDX_UNIT(c, xp[1], yp[1], &zp[1]); mov rax, QWORD PTR [rdx+8] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+8] mov QWORD PTR [r9+8], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3288 : c = _ADDX_UNIT(c, xp[2], yp[2], &zp[2]); mov rax, QWORD PTR [rdx+16] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+16] mov QWORD PTR [r9+16], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3289 : c = _ADDX_UNIT(c, xp[3], yp[3], &zp[3]); mov rax, QWORD PTR [rdx+24] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+24] mov QWORD PTR [r9+24], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3290 : c = _ADDX_UNIT(c, xp[4], yp[4], &zp[4]); mov rax, QWORD PTR [rdx+32] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+32] mov QWORD PTR [r9+32], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3291 : c = _ADDX_UNIT(c, xp[5], yp[5], &zp[5]); mov rax, QWORD PTR [rdx+40] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+40] mov QWORD PTR [r9+40], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3292 : c = _ADDX_UNIT(c, xp[6], yp[6], &zp[6]); mov rax, QWORD PTR [rdx+48] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+48] mov QWORD PTR [r9+48], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3293 : c = _ADDX_UNIT(c, xp[7], yp[7], &zp[7]); mov rcx, QWORD PTR [rdx+56] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rcx, QWORD PTR [r8+56] mov QWORD PTR [r9+56], rcx setb al ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3366 : } ret 0 _ADD_8WORDS_ADCX ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; COMDAT _ADD_8WORDS_ADC _TEXT SEGMENT c$ = 8 xp$ = 16 yp$ = 24 zp$ = 32 _ADD_8WORDS_ADC PROC ; COMDAT ; 3200 : #ifdef _MSC_VER ; 3201 : c = _ADD_UNIT(c, xp[0], yp[0], &zp[0]); mov rax, QWORD PTR [rdx] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); add cl, -1 adc rax, QWORD PTR [r8] mov QWORD PTR [r9], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3202 : c = _ADD_UNIT(c, xp[1], yp[1], &zp[1]); mov rax, QWORD PTR [rdx+8] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+8] mov QWORD PTR [r9+8], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3203 : c = _ADD_UNIT(c, xp[2], yp[2], &zp[2]); mov rax, QWORD PTR [rdx+16] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+16] mov QWORD PTR [r9+16], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3204 : c = _ADD_UNIT(c, xp[3], yp[3], &zp[3]); mov rax, QWORD PTR [rdx+24] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+24] mov QWORD PTR [r9+24], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3205 : c = _ADD_UNIT(c, xp[4], yp[4], &zp[4]); mov rax, QWORD PTR [rdx+32] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+32] mov QWORD PTR [r9+32], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3206 : c = _ADD_UNIT(c, xp[5], yp[5], &zp[5]); mov rax, QWORD PTR [rdx+40] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+40] mov QWORD PTR [r9+40], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3207 : c = _ADD_UNIT(c, xp[6], yp[6], &zp[6]); mov rax, QWORD PTR [rdx+48] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+48] mov QWORD PTR [r9+48], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3208 : c = _ADD_UNIT(c, xp[7], yp[7], &zp[7]); mov rcx, QWORD PTR [rdx+56] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rcx, QWORD PTR [r8+56] mov QWORD PTR [r9+56], rcx setb al ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 3281 : } ret 0 _ADD_8WORDS_ADC ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; COMDAT _ADD_16WORDS_ADCX _TEXT SEGMENT c$ = 8 xp$ = 16 yp$ = 24 zp$ = 32 _ADD_16WORDS_ADCX PROC ; COMDAT ; 2213 : #ifdef _MSC_VER ; 2214 : c = _ADDX_UNIT(c, xp[0], yp[0], &zp[0]); mov rax, QWORD PTR [rdx] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); add cl, -1 adcx rax, QWORD PTR [r8] mov QWORD PTR [r9], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2215 : c = _ADDX_UNIT(c, xp[1], yp[1], &zp[1]); mov rax, QWORD PTR [rdx+8] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+8] mov QWORD PTR [r9+8], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2216 : c = _ADDX_UNIT(c, xp[2], yp[2], &zp[2]); mov rax, QWORD PTR [rdx+16] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+16] mov QWORD PTR [r9+16], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2217 : c = _ADDX_UNIT(c, xp[3], yp[3], &zp[3]); mov rax, QWORD PTR [rdx+24] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+24] mov QWORD PTR [r9+24], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2218 : c = _ADDX_UNIT(c, xp[4], yp[4], &zp[4]); mov rax, QWORD PTR [rdx+32] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+32] mov QWORD PTR [r9+32], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2219 : c = _ADDX_UNIT(c, xp[5], yp[5], &zp[5]); mov rax, QWORD PTR [rdx+40] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+40] mov QWORD PTR [r9+40], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2220 : c = _ADDX_UNIT(c, xp[6], yp[6], &zp[6]); mov rax, QWORD PTR [rdx+48] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+48] mov QWORD PTR [r9+48], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2221 : c = _ADDX_UNIT(c, xp[7], yp[7], &zp[7]); mov rax, QWORD PTR [rdx+56] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+56] mov QWORD PTR [r9+56], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2222 : c = _ADDX_UNIT(c, xp[8], yp[8], &zp[8]); mov rax, QWORD PTR [rdx+64] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+64] mov QWORD PTR [r9+64], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2223 : c = _ADDX_UNIT(c, xp[9], yp[9], &zp[9]); mov rax, QWORD PTR [rdx+72] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+72] mov QWORD PTR [r9+72], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2224 : c = _ADDX_UNIT(c, xp[10], yp[10], &zp[10]); mov rax, QWORD PTR [rdx+80] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+80] mov QWORD PTR [r9+80], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2225 : c = _ADDX_UNIT(c, xp[11], yp[11], &zp[11]); mov rax, QWORD PTR [rdx+88] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+88] mov QWORD PTR [r9+88], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2226 : c = _ADDX_UNIT(c, xp[12], yp[12], &zp[12]); mov rax, QWORD PTR [rdx+96] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+96] mov QWORD PTR [r9+96], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2227 : c = _ADDX_UNIT(c, xp[13], yp[13], &zp[13]); mov rax, QWORD PTR [rdx+104] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+104] mov QWORD PTR [r9+104], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2228 : c = _ADDX_UNIT(c, xp[14], yp[14], &zp[14]); mov rax, QWORD PTR [rdx+112] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+112] mov QWORD PTR [r9+112], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2229 : c = _ADDX_UNIT(c, xp[15], yp[15], &zp[15]); mov rcx, QWORD PTR [rdx+120] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rcx, QWORD PTR [r8+120] mov QWORD PTR [r9+120], rcx setb al ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2350 : } ret 0 _ADD_16WORDS_ADCX ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; COMDAT _ADD_16WORDS_ADC _TEXT SEGMENT c$ = 8 xp$ = 16 yp$ = 24 zp$ = 32 _ADD_16WORDS_ADC PROC ; COMDAT ; 2072 : #ifdef _MSC_VER ; 2073 : c = _ADD_UNIT(c, xp[0], yp[0], &zp[0]); mov rax, QWORD PTR [rdx] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); add cl, -1 adc rax, QWORD PTR [r8] mov QWORD PTR [r9], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2074 : c = _ADD_UNIT(c, xp[1], yp[1], &zp[1]); mov rax, QWORD PTR [rdx+8] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+8] mov QWORD PTR [r9+8], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2075 : c = _ADD_UNIT(c, xp[2], yp[2], &zp[2]); mov rax, QWORD PTR [rdx+16] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+16] mov QWORD PTR [r9+16], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2076 : c = _ADD_UNIT(c, xp[3], yp[3], &zp[3]); mov rax, QWORD PTR [rdx+24] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+24] mov QWORD PTR [r9+24], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2077 : c = _ADD_UNIT(c, xp[4], yp[4], &zp[4]); mov rax, QWORD PTR [rdx+32] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+32] mov QWORD PTR [r9+32], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2078 : c = _ADD_UNIT(c, xp[5], yp[5], &zp[5]); mov rax, QWORD PTR [rdx+40] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+40] mov QWORD PTR [r9+40], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2079 : c = _ADD_UNIT(c, xp[6], yp[6], &zp[6]); mov rax, QWORD PTR [rdx+48] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+48] mov QWORD PTR [r9+48], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2080 : c = _ADD_UNIT(c, xp[7], yp[7], &zp[7]); mov rax, QWORD PTR [rdx+56] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+56] mov QWORD PTR [r9+56], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2081 : c = _ADD_UNIT(c, xp[8], yp[8], &zp[8]); mov rax, QWORD PTR [rdx+64] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+64] mov QWORD PTR [r9+64], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2082 : c = _ADD_UNIT(c, xp[9], yp[9], &zp[9]); mov rax, QWORD PTR [rdx+72] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+72] mov QWORD PTR [r9+72], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2083 : c = _ADD_UNIT(c, xp[10], yp[10], &zp[10]); mov rax, QWORD PTR [rdx+80] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+80] mov QWORD PTR [r9+80], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2084 : c = _ADD_UNIT(c, xp[11], yp[11], &zp[11]); mov rax, QWORD PTR [rdx+88] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+88] mov QWORD PTR [r9+88], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2085 : c = _ADD_UNIT(c, xp[12], yp[12], &zp[12]); mov rax, QWORD PTR [rdx+96] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+96] mov QWORD PTR [r9+96], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2086 : c = _ADD_UNIT(c, xp[13], yp[13], &zp[13]); mov rax, QWORD PTR [rdx+104] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+104] mov QWORD PTR [r9+104], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2087 : c = _ADD_UNIT(c, xp[14], yp[14], &zp[14]); mov rax, QWORD PTR [rdx+112] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+112] mov QWORD PTR [r9+112], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2088 : c = _ADD_UNIT(c, xp[15], yp[15], &zp[15]); mov rcx, QWORD PTR [rdx+120] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rcx, QWORD PTR [r8+120] mov QWORD PTR [r9+120], rcx setb al ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 2209 : } ret 0 _ADD_16WORDS_ADC ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; COMDAT _ADD_32WORDS_ADCX _TEXT SEGMENT c$ = 8 xp$ = 16 yp$ = 24 zp$ = 32 _ADD_32WORDS_ADCX PROC ; COMDAT ; 301 : #ifdef _MSC_VER ; 302 : c = _ADDX_UNIT(c, xp[0], yp[0], &zp[0]); mov rax, QWORD PTR [rdx] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); add cl, -1 adcx rax, QWORD PTR [r8] mov QWORD PTR [r9], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 303 : c = _ADDX_UNIT(c, xp[1], yp[1], &zp[1]); mov rax, QWORD PTR [rdx+8] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+8] mov QWORD PTR [r9+8], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 304 : c = _ADDX_UNIT(c, xp[2], yp[2], &zp[2]); mov rax, QWORD PTR [rdx+16] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+16] mov QWORD PTR [r9+16], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 305 : c = _ADDX_UNIT(c, xp[3], yp[3], &zp[3]); mov rax, QWORD PTR [rdx+24] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+24] mov QWORD PTR [r9+24], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 306 : c = _ADDX_UNIT(c, xp[4], yp[4], &zp[4]); mov rax, QWORD PTR [rdx+32] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+32] mov QWORD PTR [r9+32], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 307 : c = _ADDX_UNIT(c, xp[5], yp[5], &zp[5]); mov rax, QWORD PTR [rdx+40] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+40] mov QWORD PTR [r9+40], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 308 : c = _ADDX_UNIT(c, xp[6], yp[6], &zp[6]); mov rax, QWORD PTR [rdx+48] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+48] mov QWORD PTR [r9+48], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 309 : c = _ADDX_UNIT(c, xp[7], yp[7], &zp[7]); mov rax, QWORD PTR [rdx+56] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+56] mov QWORD PTR [r9+56], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 310 : c = _ADDX_UNIT(c, xp[8], yp[8], &zp[8]); mov rax, QWORD PTR [rdx+64] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+64] mov QWORD PTR [r9+64], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 311 : c = _ADDX_UNIT(c, xp[9], yp[9], &zp[9]); mov rax, QWORD PTR [rdx+72] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+72] mov QWORD PTR [r9+72], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 312 : c = _ADDX_UNIT(c, xp[10], yp[10], &zp[10]); mov rax, QWORD PTR [rdx+80] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+80] mov QWORD PTR [r9+80], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 313 : c = _ADDX_UNIT(c, xp[11], yp[11], &zp[11]); mov rax, QWORD PTR [rdx+88] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+88] mov QWORD PTR [r9+88], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 314 : c = _ADDX_UNIT(c, xp[12], yp[12], &zp[12]); mov rax, QWORD PTR [rdx+96] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+96] mov QWORD PTR [r9+96], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 315 : c = _ADDX_UNIT(c, xp[13], yp[13], &zp[13]); mov rax, QWORD PTR [rdx+104] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+104] mov QWORD PTR [r9+104], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 316 : c = _ADDX_UNIT(c, xp[14], yp[14], &zp[14]); mov rax, QWORD PTR [rdx+112] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+112] mov QWORD PTR [r9+112], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 317 : c = _ADDX_UNIT(c, xp[15], yp[15], &zp[15]); mov rax, QWORD PTR [rdx+120] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+120] mov QWORD PTR [r9+120], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 318 : c = _ADDX_UNIT(c, xp[16], yp[16], &zp[16]); mov rax, QWORD PTR [rdx+128] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+128] mov QWORD PTR [r9+128], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 319 : c = _ADDX_UNIT(c, xp[17], yp[17], &zp[17]); mov rax, QWORD PTR [rdx+136] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+136] mov QWORD PTR [r9+136], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 320 : c = _ADDX_UNIT(c, xp[18], yp[18], &zp[18]); mov rax, QWORD PTR [rdx+144] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+144] mov QWORD PTR [r9+144], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 321 : c = _ADDX_UNIT(c, xp[19], yp[19], &zp[19]); mov rax, QWORD PTR [rdx+152] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+152] mov QWORD PTR [r9+152], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 322 : c = _ADDX_UNIT(c, xp[20], yp[20], &zp[20]); mov rax, QWORD PTR [rdx+160] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+160] mov QWORD PTR [r9+160], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 323 : c = _ADDX_UNIT(c, xp[21], yp[21], &zp[21]); mov rax, QWORD PTR [rdx+168] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+168] mov QWORD PTR [r9+168], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 324 : c = _ADDX_UNIT(c, xp[22], yp[22], &zp[22]); mov rax, QWORD PTR [rdx+176] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+176] mov QWORD PTR [r9+176], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 325 : c = _ADDX_UNIT(c, xp[23], yp[23], &zp[23]); mov rax, QWORD PTR [rdx+184] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+184] mov QWORD PTR [r9+184], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 326 : c = _ADDX_UNIT(c, xp[24], yp[24], &zp[24]); mov rax, QWORD PTR [rdx+192] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+192] mov QWORD PTR [r9+192], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 327 : c = _ADDX_UNIT(c, xp[25], yp[25], &zp[25]); mov rax, QWORD PTR [rdx+200] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+200] mov QWORD PTR [r9+200], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 328 : c = _ADDX_UNIT(c, xp[26], yp[26], &zp[26]); mov rax, QWORD PTR [rdx+208] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+208] mov QWORD PTR [r9+208], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 329 : c = _ADDX_UNIT(c, xp[27], yp[27], &zp[27]); mov rax, QWORD PTR [rdx+216] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+216] mov QWORD PTR [r9+216], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 330 : c = _ADDX_UNIT(c, xp[28], yp[28], &zp[28]); mov rax, QWORD PTR [rdx+224] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+224] mov QWORD PTR [r9+224], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 331 : c = _ADDX_UNIT(c, xp[29], yp[29], &zp[29]); mov rax, QWORD PTR [rdx+232] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+232] mov QWORD PTR [r9+232], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 332 : c = _ADDX_UNIT(c, xp[30], yp[30], &zp[30]); mov rax, QWORD PTR [rdx+240] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rax, QWORD PTR [r8+240] mov QWORD PTR [r9+240], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 333 : c = _ADDX_UNIT(c, xp[31], yp[31], &zp[31]); mov rcx, QWORD PTR [rdx+248] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 245 : return (_addcarryx_u64(carry, u, v, w)); adcx rcx, QWORD PTR [r8+248] mov QWORD PTR [r9+248], rcx setb al ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 550 : } ret 0 _ADD_32WORDS_ADCX ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; COMDAT _ADD_32WORDS_ADC _TEXT SEGMENT c$ = 8 xp$ = 16 yp$ = 24 zp$ = 32 _ADD_32WORDS_ADC PROC ; COMDAT ; 48 : #ifdef _MSC_VER ; 49 : c = _ADD_UNIT(c, xp[0], yp[0], &zp[0]); mov rax, QWORD PTR [rdx] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); add cl, -1 adc rax, QWORD PTR [r8] mov QWORD PTR [r9], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 50 : c = _ADD_UNIT(c, xp[1], yp[1], &zp[1]); mov rax, QWORD PTR [rdx+8] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+8] mov QWORD PTR [r9+8], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 51 : c = _ADD_UNIT(c, xp[2], yp[2], &zp[2]); mov rax, QWORD PTR [rdx+16] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+16] mov QWORD PTR [r9+16], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 52 : c = _ADD_UNIT(c, xp[3], yp[3], &zp[3]); mov rax, QWORD PTR [rdx+24] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+24] mov QWORD PTR [r9+24], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 53 : c = _ADD_UNIT(c, xp[4], yp[4], &zp[4]); mov rax, QWORD PTR [rdx+32] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+32] mov QWORD PTR [r9+32], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 54 : c = _ADD_UNIT(c, xp[5], yp[5], &zp[5]); mov rax, QWORD PTR [rdx+40] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+40] mov QWORD PTR [r9+40], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 55 : c = _ADD_UNIT(c, xp[6], yp[6], &zp[6]); mov rax, QWORD PTR [rdx+48] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+48] mov QWORD PTR [r9+48], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 56 : c = _ADD_UNIT(c, xp[7], yp[7], &zp[7]); mov rax, QWORD PTR [rdx+56] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+56] mov QWORD PTR [r9+56], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 57 : c = _ADD_UNIT(c, xp[8], yp[8], &zp[8]); mov rax, QWORD PTR [rdx+64] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+64] mov QWORD PTR [r9+64], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 58 : c = _ADD_UNIT(c, xp[9], yp[9], &zp[9]); mov rax, QWORD PTR [rdx+72] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+72] mov QWORD PTR [r9+72], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 59 : c = _ADD_UNIT(c, xp[10], yp[10], &zp[10]); mov rax, QWORD PTR [rdx+80] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+80] mov QWORD PTR [r9+80], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 60 : c = _ADD_UNIT(c, xp[11], yp[11], &zp[11]); mov rax, QWORD PTR [rdx+88] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+88] mov QWORD PTR [r9+88], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 61 : c = _ADD_UNIT(c, xp[12], yp[12], &zp[12]); mov rax, QWORD PTR [rdx+96] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+96] mov QWORD PTR [r9+96], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 62 : c = _ADD_UNIT(c, xp[13], yp[13], &zp[13]); mov rax, QWORD PTR [rdx+104] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+104] mov QWORD PTR [r9+104], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 63 : c = _ADD_UNIT(c, xp[14], yp[14], &zp[14]); mov rax, QWORD PTR [rdx+112] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+112] mov QWORD PTR [r9+112], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 64 : c = _ADD_UNIT(c, xp[15], yp[15], &zp[15]); mov rax, QWORD PTR [rdx+120] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+120] mov QWORD PTR [r9+120], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 65 : c = _ADD_UNIT(c, xp[16], yp[16], &zp[16]); mov rax, QWORD PTR [rdx+128] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+128] mov QWORD PTR [r9+128], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 66 : c = _ADD_UNIT(c, xp[17], yp[17], &zp[17]); mov rax, QWORD PTR [rdx+136] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+136] mov QWORD PTR [r9+136], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 67 : c = _ADD_UNIT(c, xp[18], yp[18], &zp[18]); mov rax, QWORD PTR [rdx+144] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+144] mov QWORD PTR [r9+144], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 68 : c = _ADD_UNIT(c, xp[19], yp[19], &zp[19]); mov rax, QWORD PTR [rdx+152] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+152] mov QWORD PTR [r9+152], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 69 : c = _ADD_UNIT(c, xp[20], yp[20], &zp[20]); mov rax, QWORD PTR [rdx+160] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+160] mov QWORD PTR [r9+160], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 70 : c = _ADD_UNIT(c, xp[21], yp[21], &zp[21]); mov rax, QWORD PTR [rdx+168] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+168] mov QWORD PTR [r9+168], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 71 : c = _ADD_UNIT(c, xp[22], yp[22], &zp[22]); mov rax, QWORD PTR [rdx+176] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+176] mov QWORD PTR [r9+176], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 72 : c = _ADD_UNIT(c, xp[23], yp[23], &zp[23]); mov rax, QWORD PTR [rdx+184] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+184] mov QWORD PTR [r9+184], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 73 : c = _ADD_UNIT(c, xp[24], yp[24], &zp[24]); mov rax, QWORD PTR [rdx+192] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+192] mov QWORD PTR [r9+192], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 74 : c = _ADD_UNIT(c, xp[25], yp[25], &zp[25]); mov rax, QWORD PTR [rdx+200] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+200] mov QWORD PTR [r9+200], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 75 : c = _ADD_UNIT(c, xp[26], yp[26], &zp[26]); mov rax, QWORD PTR [rdx+208] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+208] mov QWORD PTR [r9+208], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 76 : c = _ADD_UNIT(c, xp[27], yp[27], &zp[27]); mov rax, QWORD PTR [rdx+216] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+216] mov QWORD PTR [r9+216], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 77 : c = _ADD_UNIT(c, xp[28], yp[28], &zp[28]); mov rax, QWORD PTR [rdx+224] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+224] mov QWORD PTR [r9+224], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 78 : c = _ADD_UNIT(c, xp[29], yp[29], &zp[29]); mov rax, QWORD PTR [rdx+232] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+232] mov QWORD PTR [r9+232], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 79 : c = _ADD_UNIT(c, xp[30], yp[30], &zp[30]); mov rax, QWORD PTR [rdx+240] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rax, QWORD PTR [r8+240] mov QWORD PTR [r9+240], rax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 80 : c = _ADD_UNIT(c, xp[31], yp[31], &zp[31]); mov rcx, QWORD PTR [rdx+248] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 217 : return (_addcarry_u64(carry, u, v, w)); adc rcx, QWORD PTR [r8+248] mov QWORD PTR [r9+248], rcx setb al ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h ; 297 : } ret 0 _ADD_32WORDS_ADC ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; COMDAT _LZCNT_ALT_UNIT _TEXT SEGMENT x$ = 8 _LZCNT_ALT_UNIT PROC ; COMDAT ; 630 : if (x == 0) test rcx, rcx jne SHORT $LN2@LZCNT_ALT_ ; 631 : return (sizeof(x) * 8); mov eax, 64 ; 00000040H ; 655 : } ret 0 $LN2@LZCNT_ALT_: ; 632 : #ifdef _M_IX86 ; 633 : _UINT32_T pos; ; 634 : #ifdef _MSC_VER ; 635 : _BitScanReverse(&pos, x); ; 636 : #elif defined(__GNUC__) ; 637 : __asm__("bsrl %1, %0" : "=r"(pos) : "rm"(x)); ; 638 : #else ; 639 : #error unknown compiler ; 640 : #endif ; 641 : #elif defined(_M_X64) ; 642 : #ifdef _MSC_VER ; 643 : _UINT32_T pos; ; 644 : _BitScanReverse64(&pos, x); bsr rcx, rcx ; 645 : #elif defined(__GNUC__) ; 646 : _UINT64_T pos; ; 647 : __asm__("bsrq %1, %0" : "=r"(pos) : "rm"(x)); ; 648 : #else ; 649 : #error unknown compiler ; 650 : #endif ; 651 : #else ; 652 : #error unknown platform ; 653 : #endif ; 654 : return (sizeof(x) * 8 - 1 - pos); mov eax, 63 ; 0000003fH sub eax, ecx ; 655 : } ret 0 _LZCNT_ALT_UNIT ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; COMDAT _LZCNT_ALT_32 _TEXT SEGMENT x$ = 8 _LZCNT_ALT_32 PROC ; COMDAT ; 597 : if (x == 0) test ecx, ecx jne SHORT $LN2@LZCNT_ALT_ ; 598 : return (sizeof(x) * 8); mov eax, 32 ; 00000020H ; 608 : } ret 0 $LN2@LZCNT_ALT_: ; 599 : _UINT32_T pos; ; 600 : #ifdef _MSC_VER ; 601 : _BitScanReverse(&pos, x); bsr ecx, ecx ; 602 : #elif defined(__GNUC__) ; 603 : __asm__("bsrl %1, %0" : "=r"(pos) : "rm"(x)); ; 604 : #else ; 605 : #error unknown compiler ; 606 : #endif ; 607 : return (sizeof(x) * 8 - 1 - pos); mov eax, 31 sub eax, ecx ; 608 : } ret 0 _LZCNT_ALT_32 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; COMDAT _ADDX_UNIT _TEXT SEGMENT carry$ = 8 u$ = 16 v$ = 24 w$ = 32 _ADDX_UNIT PROC ; COMDAT ; 242 : #ifdef _M_IX86 ; 243 : return (_addcarryx_u32(carry, u, v, w)); ; 244 : #elif defined(_M_X64) ; 245 : return (_addcarryx_u64(carry, u, v, w)); add cl, -1 adcx rdx, r8 mov QWORD PTR [r9], rdx setb al ; 246 : #else ; 247 : #error unknown platform ; 248 : #endif ; 249 : } ret 0 _ADDX_UNIT ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; COMDAT _ADD_UNIT _TEXT SEGMENT carry$ = 8 u$ = 16 v$ = 24 w$ = 32 _ADD_UNIT PROC ; COMDAT ; 214 : #ifdef _M_IX86 ; 215 : return (_addcarry_u32(carry, u, v, w)); ; 216 : #elif defined(_M_X64) ; 217 : return (_addcarry_u64(carry, u, v, w)); add cl, -1 adc rdx, r8 mov QWORD PTR [r9], rdx setb al ; 218 : #else ; 219 : #error unknown platform ; 220 : #endif ; 221 : } ret 0 _ADD_UNIT ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; COMDAT _MAXIMUM_UNIT _TEXT SEGMENT x$ = 8 y$ = 16 _MAXIMUM_UNIT PROC ; COMDAT ; 204 : return (x >= y ? x : y); cmp rcx, rdx cmovae rdx, rcx mov rax, rdx ; 205 : } ret 0 _MAXIMUM_UNIT ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; COMDAT _FROMDWORDTOWORD _TEXT SEGMENT value$ = 8 result_high$ = 16 _FROMDWORDTOWORD PROC ; COMDAT ; 183 : *result_high = (_UINT32_T)(value >> 32); mov rax, rcx shr rax, 32 ; 00000020H mov DWORD PTR [rdx], eax ; 184 : return ((_UINT32_T)value); mov eax, ecx ; 185 : } ret 0 _FROMDWORDTOWORD ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; COMDAT PMC_Add_X_X _TEXT SEGMENT nw$ = 64 u$ = 64 v$ = 72 w$ = 80 w_light_check_code$1 = 88 PMC_Add_X_X PROC ; COMDAT ; 558 : { $LN24: mov QWORD PTR [rsp+16], rbx mov QWORD PTR [rsp+24], rsi push rdi sub rsp, 48 ; 00000030H mov rsi, r8 mov rbx, rdx mov rdi, rcx ; 559 : if (u == NULL) test rcx, rcx je $LN21@PMC_Add_X_ ; 560 : return (PMC_STATUS_ARGUMENT_ERROR); ; 561 : if (v == NULL) test rdx, rdx je $LN21@PMC_Add_X_ ; 562 : return (PMC_STATUS_ARGUMENT_ERROR); ; 563 : if (w == NULL) test r8, r8 je $LN21@PMC_Add_X_ ; 565 : NUMBER_HEADER* nu = (NUMBER_HEADER*)u; ; 566 : NUMBER_HEADER* nv = (NUMBER_HEADER*)v; ; 567 : PMC_STATUS_CODE result; ; 568 : if ((result = CheckNumber(nu)) != PMC_STATUS_OK) call CheckNumber test eax, eax jne $LN1@PMC_Add_X_ ; 569 : return (result); ; 570 : if ((result = CheckNumber(nv)) != PMC_STATUS_OK) mov rcx, rbx call CheckNumber test eax, eax jne $LN1@PMC_Add_X_ ; 571 : return (result); ; 572 : NUMBER_HEADER* nw; ; 573 : if (nu->IS_ZERO) mov eax, DWORD PTR [rbx+40] and eax, 2 test BYTE PTR [rdi+40], 2 je SHORT $LN7@PMC_Add_X_ ; 574 : { ; 575 : if (nv->IS_ZERO) test eax, eax je SHORT $LN9@PMC_Add_X_ ; 576 : nw = &number_zero; lea rax, OFFSET FLAT:number_zero ; 606 : } ; 607 : } ; 608 : *w = nw; mov QWORD PTR [rsi], rax ; 609 : #ifdef _DEBUG ; 610 : if ((result = CheckNumber(*w)) != PMC_STATUS_OK) ; 611 : return (result); ; 612 : #endif ; 613 : return (PMC_STATUS_OK); xor eax, eax ; 614 : } mov rbx, QWORD PTR [rsp+72] mov rsi, QWORD PTR [rsp+80] add rsp, 48 ; 00000030H pop rdi ret 0 $LN9@PMC_Add_X_: ; 577 : else ; 578 : { ; 579 : if ((result = DuplicateNumber(nv, &nw)) != PMC_STATUS_OK) lea rdx, QWORD PTR nw$[rsp] mov rcx, rbx call DuplicateNumber test eax, eax je $LN22@PMC_Add_X_ ; 614 : } mov rbx, QWORD PTR [rsp+72] mov rsi, QWORD PTR [rsp+80] add rsp, 48 ; 00000030H pop rdi ret 0 $LN7@PMC_Add_X_: ; 580 : return (result); ; 581 : } ; 582 : } ; 583 : else ; 584 : { ; 585 : if (nv->IS_ZERO) test eax, eax je SHORT $LN12@PMC_Add_X_ ; 586 : { ; 587 : if ((result = DuplicateNumber(nu, &nw)) != PMC_STATUS_OK) lea rdx, QWORD PTR nw$[rsp] mov rcx, rdi call DuplicateNumber test eax, eax jne $LN1@PMC_Add_X_ ; 606 : } ; 607 : } ; 608 : *w = nw; mov rax, QWORD PTR nw$[rsp] mov QWORD PTR [rsi], rax ; 609 : #ifdef _DEBUG ; 610 : if ((result = CheckNumber(*w)) != PMC_STATUS_OK) ; 611 : return (result); ; 612 : #endif ; 613 : return (PMC_STATUS_OK); xor eax, eax ; 614 : } mov rbx, QWORD PTR [rsp+72] mov rsi, QWORD PTR [rsp+80] add rsp, 48 ; 00000030H pop rdi ret 0 $LN12@PMC_Add_X_: ; 588 : return (result); ; 589 : } ; 590 : else ; 591 : { ; 592 : __UNIT_TYPE u_bit_count = nu->UNIT_BIT_COUNT; ; 593 : __UNIT_TYPE v_bit_count = nv->UNIT_BIT_COUNT; mov rdx, QWORD PTR [rbx+16] ; 596 : if ((result = AllocateNumber(&nw, w_bit_count, &w_light_check_code)) != PMC_STATUS_OK) lea r8, QWORD PTR w_light_check_code$1[rsp] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 204 : return (x >= y ? x : y); cmp QWORD PTR [rdi+16], rdx ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 596 : if ((result = AllocateNumber(&nw, w_bit_count, &w_light_check_code)) != PMC_STATUS_OK) lea rcx, QWORD PTR nw$[rsp] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 204 : return (x >= y ? x : y); cmovae rdx, QWORD PTR [rdi+16] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; 594 : __UNIT_TYPE w_bit_count = _MAXIMUM_UNIT(u_bit_count, v_bit_count) + 1; inc rdx ; 596 : if ((result = AllocateNumber(&nw, w_bit_count, &w_light_check_code)) != PMC_STATUS_OK) call AllocateNumber test eax, eax jne $LN1@PMC_Add_X_ ; 597 : return (result); ; 598 : if ((result = (*fp_Add_Imp)(nu->BLOCK, nu->UNIT_WORD_COUNT, nv->BLOCK, nv->UNIT_WORD_COUNT, nw->BLOCK, nw->BLOCK_COUNT)) != PMC_STATUS_OK) mov rcx, QWORD PTR nw$[rsp] mov r9, QWORD PTR [rbx+8] mov r8, QWORD PTR [rbx+56] mov rdx, QWORD PTR [rdi+8] mov rax, QWORD PTR [rcx+48] mov QWORD PTR [rsp+40], rax mov rax, QWORD PTR [rcx+56] mov rcx, QWORD PTR [rdi+56] mov QWORD PTR [rsp+32], rax call QWORD PTR fp_Add_Imp mov rcx, QWORD PTR nw$[rsp] mov ebx, eax test eax, eax je SHORT $LN16@PMC_Add_X_ ; 599 : { ; 600 : DeallocateNumber(nw); call DeallocateNumber ; 601 : return (result); mov eax, ebx ; 614 : } mov rbx, QWORD PTR [rsp+72] mov rsi, QWORD PTR [rsp+80] add rsp, 48 ; 00000030H pop rdi ret 0 $LN16@PMC_Add_X_: ; 602 : } ; 603 : if ((result = CheckBlockLight(nw->BLOCK, w_light_check_code)) != PMC_STATUS_OK) mov rdx, QWORD PTR w_light_check_code$1[rsp] mov rcx, QWORD PTR [rcx+56] call CheckBlockLight test eax, eax jne SHORT $LN1@PMC_Add_X_ ; 604 : return (result); ; 605 : CommitNumber(nw); mov rcx, QWORD PTR nw$[rsp] call CommitNumber $LN22@PMC_Add_X_: ; 606 : } ; 607 : } ; 608 : *w = nw; mov rax, QWORD PTR nw$[rsp] mov QWORD PTR [rsi], rax ; 609 : #ifdef _DEBUG ; 610 : if ((result = CheckNumber(*w)) != PMC_STATUS_OK) ; 611 : return (result); ; 612 : #endif ; 613 : return (PMC_STATUS_OK); xor eax, eax ; 614 : } mov rbx, QWORD PTR [rsp+72] mov rsi, QWORD PTR [rsp+80] add rsp, 48 ; 00000030H pop rdi ret 0 $LN21@PMC_Add_X_: ; 564 : return (PMC_STATUS_ARGUMENT_ERROR); mov eax, -1 $LN1@PMC_Add_X_: ; 614 : } mov rbx, QWORD PTR [rsp+72] mov rsi, QWORD PTR [rsp+80] add rsp, 48 ; 00000030H pop rdi ret 0 PMC_Add_X_X ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; COMDAT PMC_Add_X_L _TEXT SEGMENT u$ = 48 v$ = 56 w$ = 64 PMC_Add_X_L PROC ; COMDAT ; 535 : { $LN10: mov QWORD PTR [rsp+8], rbx mov QWORD PTR [rsp+16], rsi push rdi sub rsp, 32 ; 00000020H mov rdi, r8 mov rsi, rdx mov rbx, rcx ; 536 : if (__UNIT_TYPE_BIT_COUNT * 2 < sizeof(v) * 8) ; 537 : { ; 538 : // _UINT64_T が 2 ワードで表現しきれない処理系には対応しない ; 539 : return (PMC_STATUS_INTERNAL_ERROR); ; 540 : } ; 541 : if (u == NULL) test rcx, rcx je SHORT $LN8@PMC_Add_X_ ; 542 : return (PMC_STATUS_ARGUMENT_ERROR); ; 543 : if (w == NULL) test r8, r8 je SHORT $LN8@PMC_Add_X_ ; 545 : PMC_STATUS_CODE result; ; 546 : if ((result = CheckNumber((NUMBER_HEADER*)u)) != PMC_STATUS_OK) call CheckNumber test eax, eax jne SHORT $LN6@PMC_Add_X_ ; 547 : return (result); ; 548 : if ((result = PMC_Add_X_L_Imp((NUMBER_HEADER*)u, v, (NUMBER_HEADER**)w)) != PMC_STATUS_OK) mov r8, rdi mov rdx, rsi mov rcx, rbx ; 549 : return (result); ; 550 : #ifdef _DEBUG ; 551 : if ((result = CheckNumber(*w)) != PMC_STATUS_OK) ; 552 : return (result); ; 553 : #endif ; 554 : return (PMC_STATUS_OK); ; 555 : } mov rbx, QWORD PTR [rsp+48] mov rsi, QWORD PTR [rsp+56] add rsp, 32 ; 00000020H pop rdi ; 547 : return (result); ; 548 : if ((result = PMC_Add_X_L_Imp((NUMBER_HEADER*)u, v, (NUMBER_HEADER**)w)) != PMC_STATUS_OK) jmp PMC_Add_X_L_Imp $LN8@PMC_Add_X_: ; 544 : return (PMC_STATUS_ARGUMENT_ERROR); mov eax, -1 $LN6@PMC_Add_X_: ; 549 : return (result); ; 550 : #ifdef _DEBUG ; 551 : if ((result = CheckNumber(*w)) != PMC_STATUS_OK) ; 552 : return (result); ; 553 : #endif ; 554 : return (PMC_STATUS_OK); ; 555 : } mov rbx, QWORD PTR [rsp+48] mov rsi, QWORD PTR [rsp+56] add rsp, 32 ; 00000020H pop rdi ret 0 PMC_Add_X_L ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; COMDAT PMC_Add_X_I _TEXT SEGMENT u$ = 48 v$ = 56 w$ = 64 PMC_Add_X_I PROC ; COMDAT ; 383 : { $LN10: mov QWORD PTR [rsp+8], rbx mov QWORD PTR [rsp+16], rsi push rdi sub rsp, 32 ; 00000020H mov rdi, r8 mov esi, edx mov rbx, rcx ; 384 : if (__UNIT_TYPE_BIT_COUNT < sizeof(v) * 8) ; 385 : { ; 386 : // _UINT32_T が 1 ワードで表現しきれない処理系には対応しない ; 387 : return (PMC_STATUS_INTERNAL_ERROR); ; 388 : } ; 389 : if (u == NULL) test rcx, rcx je SHORT $LN8@PMC_Add_X_ ; 390 : return (PMC_STATUS_ARGUMENT_ERROR); ; 391 : if (w == NULL) test r8, r8 je SHORT $LN8@PMC_Add_X_ ; 393 : PMC_STATUS_CODE result; ; 394 : if ((result = CheckNumber((NUMBER_HEADER*)u)) != PMC_STATUS_OK) call CheckNumber test eax, eax jne SHORT $LN6@PMC_Add_X_ ; 395 : return (result); ; 396 : if ((result = PMC_Add_X_I_Imp((NUMBER_HEADER*)u, v, (NUMBER_HEADER**)w)) != PMC_STATUS_OK) mov r8, rdi mov edx, esi mov rcx, rbx ; 397 : return (result); ; 398 : #ifdef _DEBUG ; 399 : if ((result = CheckNumber(*w)) != PMC_STATUS_OK) ; 400 : return (result); ; 401 : #endif ; 402 : return (PMC_STATUS_OK); ; 403 : } mov rbx, QWORD PTR [rsp+48] mov rsi, QWORD PTR [rsp+56] add rsp, 32 ; 00000020H pop rdi ; 395 : return (result); ; 396 : if ((result = PMC_Add_X_I_Imp((NUMBER_HEADER*)u, v, (NUMBER_HEADER**)w)) != PMC_STATUS_OK) jmp PMC_Add_X_I_Imp $LN8@PMC_Add_X_: ; 392 : return (PMC_STATUS_ARGUMENT_ERROR); mov eax, -1 $LN6@PMC_Add_X_: ; 397 : return (result); ; 398 : #ifdef _DEBUG ; 399 : if ((result = CheckNumber(*w)) != PMC_STATUS_OK) ; 400 : return (result); ; 401 : #endif ; 402 : return (PMC_STATUS_OK); ; 403 : } mov rbx, QWORD PTR [rsp+48] mov rsi, QWORD PTR [rsp+56] add rsp, 32 ; 00000020H pop rdi ret 0 PMC_Add_X_I ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; COMDAT PMC_Add_L_X _TEXT SEGMENT u$ = 48 v$ = 56 w$ = 64 PMC_Add_L_X PROC ; COMDAT ; 512 : { $LN10: mov QWORD PTR [rsp+8], rbx mov QWORD PTR [rsp+16], rsi push rdi sub rsp, 32 ; 00000020H mov rdi, r8 mov rbx, rdx mov rsi, rcx ; 513 : if (__UNIT_TYPE_BIT_COUNT * 2 < sizeof(u) * 8) ; 514 : { ; 515 : // _UINT64_T が 2 ワードで表現しきれない処理系には対応しない ; 516 : return (PMC_STATUS_INTERNAL_ERROR); ; 517 : } ; 518 : if (v == NULL) test rdx, rdx je SHORT $LN8@PMC_Add_L_ ; 519 : return (PMC_STATUS_ARGUMENT_ERROR); ; 520 : if (w == NULL) test r8, r8 je SHORT $LN8@PMC_Add_L_ ; 522 : PMC_STATUS_CODE result; ; 523 : if ((result = CheckNumber((NUMBER_HEADER*)v)) != PMC_STATUS_OK) mov rcx, rdx call CheckNumber test eax, eax jne SHORT $LN6@PMC_Add_L_ ; 524 : return (result); ; 525 : if ((result = PMC_Add_X_L_Imp((NUMBER_HEADER*)v, u, (NUMBER_HEADER**)w)) != PMC_STATUS_OK) mov r8, rdi mov rdx, rsi mov rcx, rbx ; 526 : return (result); ; 527 : #ifdef _DEBUG ; 528 : if ((result = CheckNumber(*w)) != PMC_STATUS_OK) ; 529 : return (result); ; 530 : #endif ; 531 : return (PMC_STATUS_OK); ; 532 : } mov rbx, QWORD PTR [rsp+48] mov rsi, QWORD PTR [rsp+56] add rsp, 32 ; 00000020H pop rdi ; 524 : return (result); ; 525 : if ((result = PMC_Add_X_L_Imp((NUMBER_HEADER*)v, u, (NUMBER_HEADER**)w)) != PMC_STATUS_OK) jmp PMC_Add_X_L_Imp $LN8@PMC_Add_L_: ; 521 : return (PMC_STATUS_ARGUMENT_ERROR); mov eax, -1 $LN6@PMC_Add_L_: ; 526 : return (result); ; 527 : #ifdef _DEBUG ; 528 : if ((result = CheckNumber(*w)) != PMC_STATUS_OK) ; 529 : return (result); ; 530 : #endif ; 531 : return (PMC_STATUS_OK); ; 532 : } mov rbx, QWORD PTR [rsp+48] mov rsi, QWORD PTR [rsp+56] add rsp, 32 ; 00000020H pop rdi ret 0 PMC_Add_L_X ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; COMDAT PMC_Add_I_X _TEXT SEGMENT u$ = 48 v$ = 56 w$ = 64 PMC_Add_I_X PROC ; COMDAT ; 360 : { $LN10: mov QWORD PTR [rsp+8], rbx mov QWORD PTR [rsp+16], rsi push rdi sub rsp, 32 ; 00000020H mov rdi, r8 mov rbx, rdx mov esi, ecx ; 361 : if (__UNIT_TYPE_BIT_COUNT < sizeof(u) * 8) ; 362 : { ; 363 : // _UINT32_T が 1 ワードで表現しきれない処理系には対応しない ; 364 : return (PMC_STATUS_INTERNAL_ERROR); ; 365 : } ; 366 : if (v == NULL) test rdx, rdx je SHORT $LN8@PMC_Add_I_ ; 367 : return (PMC_STATUS_ARGUMENT_ERROR); ; 368 : if (w == NULL) test r8, r8 je SHORT $LN8@PMC_Add_I_ ; 370 : PMC_STATUS_CODE result; ; 371 : if ((result = CheckNumber((NUMBER_HEADER*)v)) != PMC_STATUS_OK) mov rcx, rdx call CheckNumber test eax, eax jne SHORT $LN6@PMC_Add_I_ ; 372 : return (result); ; 373 : if ((result = PMC_Add_X_I_Imp((NUMBER_HEADER*)v, u, (NUMBER_HEADER**)w)) != PMC_STATUS_OK) mov r8, rdi mov edx, esi mov rcx, rbx ; 374 : return (result); ; 375 : #ifdef _DEBUG ; 376 : if ((result = CheckNumber(*w)) != PMC_STATUS_OK) ; 377 : return (result); ; 378 : #endif ; 379 : return (PMC_STATUS_OK); ; 380 : } mov rbx, QWORD PTR [rsp+48] mov rsi, QWORD PTR [rsp+56] add rsp, 32 ; 00000020H pop rdi ; 372 : return (result); ; 373 : if ((result = PMC_Add_X_I_Imp((NUMBER_HEADER*)v, u, (NUMBER_HEADER**)w)) != PMC_STATUS_OK) jmp PMC_Add_X_I_Imp $LN8@PMC_Add_I_: ; 369 : return (PMC_STATUS_ARGUMENT_ERROR); mov eax, -1 $LN6@PMC_Add_I_: ; 374 : return (result); ; 375 : #ifdef _DEBUG ; 376 : if ((result = CheckNumber(*w)) != PMC_STATUS_OK) ; 377 : return (result); ; 378 : #endif ; 379 : return (PMC_STATUS_OK); ; 380 : } mov rbx, QWORD PTR [rsp+48] mov rsi, QWORD PTR [rsp+56] add rsp, 32 ; 00000020H pop rdi ret 0 PMC_Add_I_X ENDP _TEXT ENDS ; Function compile flags: /Ogtpy ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c ; COMDAT Initialize_Add _TEXT SEGMENT feature$ = 8 Initialize_Add PROC ; COMDAT ; 618 : fp_Add_Imp = feature->PROCESSOR_FEATURE_ADX ? Add_Imp_using_ADCX : Add_Imp_using_ADC; test BYTE PTR [rcx], 2 lea rax, OFFSET FLAT:Add_Imp_using_ADC lea rcx, OFFSET FLAT:Add_Imp_using_ADCX cmovne rax, rcx mov QWORD PTR fp_Add_Imp, rax ; 619 : return (PMC_STATUS_OK); xor eax, eax ; 620 : } ret 0 Initialize_Add ENDP _TEXT ENDS END
39.028112
159
0.726029
a1a1d0c87dec249810084908d9ae580f7d60517e
130,737
asm
Assembly
Driver/Socket/TCPIP/tcpipEntry.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Driver/Socket/TCPIP/tcpipEntry.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Driver/Socket/TCPIP/tcpipEntry.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) Geoworks 1994 -- All Rights Reserved GEOWORKS CONFIDENTIAL PROJECT: PC GEOS MODULE: TCP/IP Driver FILE: tcpipEntry.asm AUTHOR: Jennifer Wu, Jul 5, 1994 ROUTINES: Name Description ---- ----------- GLOBAL: TcpipStrategy Entry point for all TCP/IP driver function calls TcpipClientStrategy Entry point for all TCP/IP driver SCO calls INTERNAL: TcpipDoNothing For unsupported SocketFunctions/SCOs TcpipError For unsupported calls that should not be called Driver Functions: see socketDr.def for descriptions TcpipInit TcpipExit TcpipSuspend TcpipRegister TcpipUnregister TcpipAllocConnection TcpipLinkConnectRequest Establish a connection to another geos device TcpipDataConnectRequest Establish a regular TCP connection TcpipStopDataConnect TcpipDisconnectRequest TcpipSendData TcpipStopSendData TcpipSendDatagram TcpipResetRequest TcpipAttach TcpipReject TcpipGetInfo TcpipGetNothing TcpipGetMediaList TcpipGetMediumAndUnit TcpipGetAddrCtrl TcpipGetAddrSize TcpipGetLocalAddr TcpipGetRemoteAddr TcpipGetAddrCommon TcpipGetMediumConnection TcpipSetOption TcpipGetOption TcpipResolveAddr TcpipStopResolve TcpipCloseMedium TcpipMediumConnectRequest TcpipSetMediumOption Extended Tcp Driver Functions: see ip.def for descriptions TcpipSendRawIp SCO Functions: see socketInt.def for descriptions TcpipGetProtocol TcpipAddDomain TcpipLinkOpened TcpipLinkClosed TcpipReceivePacket Subroutines: TcpipGainAccess TcpipReleaseAccess TcpipGetMinDgramHdr TcpipRegisterNewClient TcpipCheckLinkIsMain TcpipCreateInputQueue TcpipDestroyInputQueue TcpipDestroyInputQueueCB TcpipCreateThreadAndTimer TcpipDestroyThreadAndTimer TcpipSendMsgToDriverThread TcpipQueueSendDataRequest TcpipSendDatagramCommon TcpipDetachAllowed TcpipResolveIPAddr TcpipLoadResolver TcpipGetDefaultIPAddr TcpipCheckValidIPAddr ECCheckClientHandle ECCheckIPAddrSize Verify size of IP address ECCheckIPAddr Verifes address is not a broadcast, multicast or experimental address. ECCheckCallerThread Warn if called by TCP thread REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/ 5/94 Initial revision DESCRIPTION: TCP/IP driver info and strategy routine. $Id: tcpipEntry.asm,v 1.1 97/04/18 11:57:05 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ;--------------------------------------------------------------------------- ; Dgroup ;--------------------------------------------------------------------------- ResidentCode segment resource DriverTable SocketDriverInfoStruct < <TcpipStrategy, 0, DRIVER_TYPE_SOCKET>, TcpipClientStrategy, (mask SDPO_TYPE or mask SDPO_ADDRESS \ or mask SDPO_SUBLAYER or mask SDPO_MAX_PKT), 0 > ResidentCode ends ForceRef DriverTable idata segment ; ; Need this so we can call superclass because kernel code expects ; first word in segment of process class to be a handle. As we ; created this in a driver, this isn't automatically true for us. ; myHandle hptr handle 0 ; ; Minimum reserved datagram header. Put in dgroup to make ; retrieval faster. ; minDgramHdr byte TCPIP_DATAGRAM_PACKET_HDR_SIZE idata ends ForceRef myHandle udata segment driverThread hptr.HandleThread ; current driver thread clientThread hptr.HandleThread ; current clients' thread timerHandle hptr hugeLMemBlock hptr ; global data storage unit inputQueue optr ; input packet queue socketBlock hptr ; LMem block for all socket info socketList lptr ; chunk handle to socket list linkTable optr ; table of physical link connections taskSem hptr ; mutex for tcp actions that need ; to be synchronized regSem hptr ; mutex for registration regStatus RegisterStatus ; registration status of driver clients TcpipClientInfo ; info about registered clients ; DHCP variables. dhcpThread hptr ; thread for doing dhcp dhcpStrategy fptr ; Link driver entry point dhcpCookie dword ; Cookie to keep track of our session dhcpRenewTime dword ; Seconds until renew dhcpRebindTime dword ; Seconds until rebind dhcpExpireTime dword ; Seconds until expire dhcpTimerId hptr dhcpTimerHandle hptr dhcpServerIp IPAddr ; IP of server that gave us the lease EC < dropCount word ; input packets dropped due to lack > EC < ; of space in TCP's input queue > udata ends ; ; LMem for Tcp's input queue. ; InputQueue segment lmem LMEM_TYPE_GENERAL, mask LMF_RETURN_ERRORS InputQueue ends ;--------------------------------------------------------------------------- ; Ini File Strings (have to be SBCS) ;--------------------------------------------------------------------------- Strings segment lmem LMEM_TYPE_GENERAL ; ; Indicates name of link driver TCP/IP driver should use for ; establishing connections and the domain of that link driver. ; categoryString chunk.char "tcpip",0 localize not linkDriverKeyString chunk.char "link",0 localize not linkDriverPermanentKeyString chunk.char "linkPermName",0 localize not linkDomainKeyString chunk.char "linkDomain",0 localize not Strings ends ;--------------------------------------------------------------------------- ; Strategy Routines ;--------------------------------------------------------------------------- ResidentCode segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipStrategy %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Entry point for all TCP/IP driver calls. CALLED BY: Socket Library SocketIsDisconnectedLink PASS: di = SocketFunction or TcpipFunction see specific routine for other arguments RETURN: carry set if some error occurred see specific routines for return values DESTROYED: nothing PSEUDO CODE/STRATEGY: If the function is a TcpipFunction, the high bit will be set so shifting left will set the carry. This is used to determine which function table to use. REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/ 7/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipStrategy proc far uses di .enter ; ; Call the procedure to process the driver function, making sure ; it is in range. ; mov ss:[TPD_dataAX], ax mov ss:[TPD_dataBX], bx shl di, 1 ; index (4-byte) fptrs jc tcpipFunction cmp di, size driverProcTable jae notSupported movdw bxax, cs:driverProcTable[di] callIt: call ProcCallFixedOrMovable exit:: .leave ret tcpipFunction: cmp di, size tcpipProcTable jae notSupported movdw bxax, cs:tcpipProcTable[di] jmp callIt notSupported: mov ax, SDE_UNSUPPORTED_FUNCTION stc jmp exit TcpipStrategy endp driverProcTable fptr.far \ TcpipInit, ; DR_INIT TcpipExit, ; DR_EXIT TcpipSuspend, ; DR_SUSPEND TcpipDoNothing, ; DR_UNSUSPEND TcpipRegister, TcpipUnregister, TcpipAllocConnection, TcpipLinkConnectRequest, TcpipDataConnectRequest, TcpipStopDataConnect, TcpipDisconnectRequest, TcpipSendData, TcpipStopSendData, TcpipSendDatagram, TcpipResetRequest, TcpipAttach, TcpipReject, TcpipGetInfo, TcpipSetOption, TcpipGetOption, TcpipResolveAddr, TcpipStopResolve, TcpipCloseMedium, TcpipMediumConnectRequest, TcpipDoNothing, ; DR_SOCKET_MEDIUM_ACTIVATED TcpipSetMediumOption, TcpipResolveLinkLevelAddress tcpipProcTable fptr.far \ TcpipSendRawIp ; DR_TCPIP_SEND_RAW_IP COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipClientStrategy %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Entry point for all TCP/IP client operations. CALLED BY: Client Link Driver PASS: di = SocketClientOperation see specific routine for other arguments RETURN: carry set if some error occurred see specific routines for return values DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/ 7/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipClientStrategy proc far uses di .enter ; ; Make sure the operation code is in range. ; cmp di, SocketClientOperation jae badCall ; ; Call the procedure to process the client operation. ; mov ss:[TPD_dataAX], ax mov ss:[TPD_dataBX], bx shl di, 1 ; index (4-byte) fptrs movdw bxax, cs:clientProcTable[di] shr di, 1 ; restore di call ProcCallFixedOrMovable exit:: .leave ret badCall: EC< ERROR ERROR_INVALID_SOCKET_CLIENT_OPERATION > NEC< stc > NEC< jmp short exit > TcpipClientStrategy endp clientProcTable fptr.far \ TcpipGetProtocol, ; SCO_GET_PROTOCOL TcpipAddDomain, ; SCO_ADD_DOMAIN TcpipLinkOpened, ; SCO_LINK_OPENED TcpipLinkClosed, ; SCO_LINK_CLOSED TcpipReceivePacket, ; SCO_RECEIVE_PACKET TcpipError, ; SCO_CONNECT_REQUESTED TcpipLinkOpened, ; SCO_CONNECT_CONFIRMED TcpipLinkClosed, ; SCO_CONNECT_FAILED TcpipError, ; SCO_EXCEPTION TcpipError, ; SCO_RECEIVE_URGENT_DATA TcpipError ; SCO_GET_INFO ;--------------------------------------------------------------------------- ; Driver Functions ;--------------------------------------------------------------------------- ; ; Put this in fixed resource because we use this as the dummy ; strategy routine for the loopback link driver. ; COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipDoNothing %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Just clear the carry and pretend everything went well. CALLED BY: TcpipStrategy (DR_UNSUSPEND, DR_SOCKET_LINK_ACTIVATED) PASS: nothing RETURN: carry clear DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/ 7/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipDoNothing proc far clc ret TcpipDoNothing endp ResidentCode ends CommonCode segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipError %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Set the carry to indicate that some error occurred. CALLED BY: TcpipClientStrategy (SCO_CONNECT_REQUESTED, SCO_EXCEPTION, SCO_RECEIVE_URGENT_DATA, SCO_GET_INFO) PASS: nothing RETURN: carry set DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/ 7/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipError proc far stc ret TcpipError endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipInit %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Initialize the TCP/IP driver. CALLED BY: TcpipStrategy (DR_INIT) PASS: nothing RETURN: carry set if driver initialization failed carry clear if initialization succeeded DESTROYED: ax, cx, dx, di, si, ds, es (allowed) PSEUDO CODE/STRATEGY: Create the HugeLMem Create the socket list Create link table Initialize IP (reassembly queue and ID only) REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/ 7/94 Initial version jwu 10/31/96 Added input queue %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipInit proc far uses bx .enter ; ; Create the input queue. ; mov bx, handle dgroup call MemDerefES call TcpipCreateInputQueue jc error ; ; Create the hugeLMem. ; clr ax ; use default maximum mov bx, MIN_OPTIMAL_BLOCK_SIZE mov cx, MAX_OPTIMAL_BLOCK_SIZE call HugeLMemCreate ; bx <- handle jc error mov es:[hugeLMemBlock], bx ; ; Create the socket list, link table and semaphores. ; call TSocketCreateSocketList jc error call LinkCreateLinkTable ; (expects es = dgroup) jc error mov bx, 1 call ThreadAllocSem mov es:[regSem], bx mov ax, handle 0 call HandleModifyOwner mov bx, 1 call ThreadAllocSem mov es:[taskSem], bx mov ax, handle 0 call HandleModifyOwner ; ; Initialize the IP and UDP protocols. None necessary for TCP. ; call IpInit call UdpInit ; ; Find out the minimum datagram header required by the link ; driver. ; call TcpipGetMinDgramHdr ifdef PROTO_CONFIG_ALLOWED call TcpipConfigureProtocols endif ifdef WRITE_LOG_FILE call LogOpenFile endif clc ; init succeeded jmp exit error: call TcpipExit stc exit: .leave ret TcpipInit endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipExit %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Exit the TCP/IP driver. CALLED BY: TcpipStrategy (DR_EXIT) TcpipInit PASS: nothing RETURN: nothing DESTROYED: ax, bx, cx, dx, si, di, ds, es (allowed) PSEUDO CODE/STRATEGY: Close any open link connections and unload link drivers Free link table Free HugeLMem (this will free all allocated chunks also) Free LMem holding socket info NOTES: Socket library must have already unregistered TCP/IP driver. REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/ 7/94 Initial version ed 7/10/00 Stop DHCP timers %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipExit proc far mov bx, handle dgroup call MemDerefDS ; ; Destroy input queue, freeing any packets still in it. ; call TcpipDestroyInputQueue ; ; If hugeLMem, socket block, or link table not allocated, ; TCP was never loaded, so we can skip EC checks. ; tst ds:[hugeLMemBlock] jz exit tst ds:[socketBlock] jz freeHugeLMem tst ds:[linkTable].handle jz freeSocketBlock EC < tst ds:[regStatus] > EC < WARNING_NE TCPIP_EXITING_WITH_CLIENTS_REGISTERED > EC < call TSocketGetNumSockets > EC < tst cx > EC < WARNING_NE TCPIP_EXITING_WITH_CONNECTIONS_OPEN > ; ; Free up memory used by the driver. ; call IpExit ; may destroy all except bp mov bx, ds:[regSem] call ThreadFreeSem mov bx, ds:[taskSem] call ThreadFreeSem ifdef WRITE_LOG_FILE call LogCloseFile endif call LinkTableDestroyTable mov bx, ds:[dhcpTimerHandle] tst bx jz freeSocketBlock mov ax, ds:[dhcpTimerId] call TimerStop freeSocketBlock: mov bx, ds:[socketBlock] call MemFree freeHugeLMem: mov bx, ds:[hugeLMemBlock] call HugeLMemDestroy exit: ret TcpipExit endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipSuspend %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Only allow TCP/IP driver to be suspended if there are no connections. CALLED BY: TcpipStrategy (DR_SUSPEND) PASS: cx:dx = buffer to place reason for refusal, if refused RETURN: carry set if suspension refused cx:dx = buffer filled with null-terminated reason (DRIVER_SUSPEND_ERROR_BUFFER_SIZE bytes long) carry clear if suspension approved DESTROYED: ax, di (allowed) PSEUDO CODE/STRATEGY: Find out if any connections exist REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/ 7/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipSuspend proc far uses bx, cx, si, ds, es .enter Assert buffer, cxdx, DRIVER_SUSPEND_ERROR_BUFFER_SIZE mov es, cx mov di, dx ; es:di = buffer ; ; Find out if any connections exist. ; call TSocketGetNumSockets ; cx <- # connections clc ; assume okay jcxz exit ; ; Fill in reason for refusing the suspension. ; mov bx, handle Strings call MemLock mov ds, ax mov si, offset refuseSuspendString mov si, ds:[si] ; ds:si = string EC < call LocalStringSize ; cx = size w/o null > EC < cmp cx, DRIVER_SUSPEND_ERROR_BUFFER_SIZE > EC < ERROR_AE TCPIP_REFUSE_SUSPEND_STRING_TOO_LONG > LocalCopyString call MemUnlock stc ; refuse suspension exit: .leave ret TcpipSuspend endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipRegister %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Socket library is registering driver. CALLED BY: TcpipStrategy (DR_SOCKET_REGISTER) PASS: bx = domain handle of the driver cl = SocketDriverType or TcpipDriverType ds:si = null-term domain name (ignored by TCP/IP driver) dx:bp = client entry point for SCO functions RETURN: carry set if error ax = SocketDrError (SDE_MEDIUM_BUSY) else bx = client handle ch = min header size for outgoing sequenced packets cl = min header size for outgoing datagram packets. DESTROYED: di (preserved by caller) PSEUDO CODE/STRATEGY: Attempt to create thread first so there's no need to cleanup if thread creation fails. Registration only fails if another client of the same type is registered, in which case a thread already exists so there's no need to cleanup. Save geode handle of socket library Save domain handle of the driver Save client entry point for SCO functions REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/ 7/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipRegister proc far uses es .enter EC < call ECCheckCallerThread > EC < push bx, si > EC < movdw bxsi, dxbp > EC < call ECAssertValidFarPointerXIP > EC < pop bx, si > ; ; Create thread for TCP/IP driver and timer if needed. ; Do this first (see notes in header). ; call TcpipCreateThreadAndTimer mov ax, SDE_INSUFFICIENT_MEMORY ; expect the worst... jc exit ; ; Attempt to register the client. ; push bx mov bx, handle dgroup call MemDerefES pop bx call TcpipRegisterNewClient ; bx = client handle jc exit ; ax = SocketDrError ; ; Return amounts of space to reserve. ; mov ch, TCPIP_SEQUENCED_PACKET_HDR_SIZE mov cl, es:[minDgramHdr] clc exit: .leave ret TcpipRegister endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipUnregister %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Socket library is unregistering driver. CALLED BY: TcpipStrategy (DR_SOCKET_UNREGISTER) PASS: bx = client handle RETURN: bx = domain handle DESTROYED: di (preserved by strategy routine) PSEUDO CODE/STRATEGY: If raw IP client, allow unregister always. If link client, allow unregister if no link connection. If data client, allow unregister if no data connections. NOTES: Client handle is a bit mask of the type of client that is registered. ThreadVSem returns a value in AX so have to include in '.uses' line. REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/ 7/94 Initial version jwu 3/27/95 Refuse unreg if have connections %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipUnregister proc far uses ax, cx, es .enter EC < call ECCheckCallerThread > EC < call ECCheckClientHandle > ; ; Only process unregistration if it is allowed for this client. ; mov cx, bx ; cx = client handle mov bx, handle dgroup call MemDerefES mov bx, es:[regSem] call ThreadPSem ; get exclusive access EC < test es:[regStatus], cx > EC < ERROR_Z TCPIP_NOT_REGISTERED > ; ; Raw clients are always allowed to unregister. If a connection ; of the client's type does not exist, allow the unregistration. ; mov bx, offset TCI_rawIp cmp cx, mask RS_RAW_IP je allowUnreg mov bx, offset TCI_data mov ax, SDT_DATA cmp cx, mask RS_DATA je findIt mov bx, offset TCI_link mov ax, SDT_LINK findIt: call TSocketFindSocketOfDomain jc freeSem ; connection exists allowUnreg: ; ; Unregister the client. If no longer registered, destroy the ; thread and timer. Any open links will be closed when thread ; is being destroyed. CX = client handle, ; not cx and es:[regStatus], cx jnz getDomain call TcpipDestroyThreadAndTimer getDomain: mov cx, es:[clients][bx].CI_domain ; cx = domain handle clc ; unreg processed freeSem: mov bx, es:[regSem] call ThreadVSem ; flags preserved mov bx, cx ; bx = domain handle .leave ret TcpipUnregister endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipAllocConnection %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Allocate an empty socket. CALLED BY: TcpipStrategy (DR_SOCKET_ALLOC_CONNECTION) PASS: bx = client handle RETURN: carry set if unable to allocate ax = SocketDrError (SDE_INSUFFICIENT_MEMORY) else carry clear ax = connection handle DESTROYED: di (allowed) PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/29/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipAllocConnection proc far EC < call ECCheckCallerThread > EC < call ECCheckClientHandle > call TSocketCreateConnection ; ax = error or handle ret TcpipAllocConnection endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipLinkConnectRequest %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Establish a connection to the well-known geos port. CALLED BY: TcpipStrategy (DR_SOCKET_LINK_CONNECT_REQUEST) PASS: cx = timeout value (in ticks) bx = connection handle ds:si = buffer holding a non-null terminated string for addr to connect to ax = addr string size RETURN: carry set if connection failed ax = SocketDrError bx = connection handle (if ax = SDE_CONNECTION_EXISTS) otherwise carry clear DESTROYED: ax, bx if not returned di preserved by TcpipStrategy PSEUDO CODE/STRATEGY: If loopback address, return SDE_INVALID_ADDR Set up parameters for remote port number and call TcpipDataConnectRequest If failed and error is SDE_CONNECTION_EXISTS find connection and return its handle if connection exists but isn't open, return SDE_TEMPORARY_ERROR REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/ 7/94 Initial version jwu 8/ 1/96 Nonblocking, interruptible version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipLinkConnectRequest proc far uses dx, bp .enter EC < call ECCheckCallerThread > EC < push bx > EC < mov bx, ds > EC < call ECAssertValidFarPointerXIP > EC < pop bx > EC < call ECCheckIPAddrSize > ; ; Loopback addresses are not allowed for link connections. ; push si mov dx, ds:[si] inc si inc si ; ds:si = link part add si, dx ; ds:si = ip addr mov dl, ds:[si] cmp dl, LOOPBACK_NET pop si ; ds:si = addr string jne notLoopback ; ; Destroy connection before returning error. ; mov cx, bx ; cx = connection handle call TSocketDestroyConnection mov ax, SDE_INVALID_ADDR_FOR_LINK stc jmp exit notLoopback: ; ; Set the port numbers and then treat this as a normal ; connect request. ; mov dx, GEOS_WELL_KNOWN_TCP_PORT ; dx = remote port mov bp, dx ; bx = local port call TcpipDataConnectRequest jnc exit ; ; If failed because connection exists, find the connection ; and return its handle. ; cmp ax, SDE_CONNECTION_EXISTS jne error call TSocketFindOpenConnection ; bx = connection handle jnc error mov ax, SDE_TEMPORARY_ERROR error: stc exit: .leave ret TcpipLinkConnectRequest endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipDataConnectRequest %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Establish a regular data connection. CALLED BY: TcpipStrategy (DR_SOCKET_DATA_CONNECT_REQUEST) TcpipLinkConnectRequest PASS: cx = timeout value (in ticks) bx = connection handle ds:si = buffer holding a non-null terminated string for addr to connect to ax = addr string size dx = remote port number bp = local port number (0 is not a valid port) RETURN: carry set if connection failed ax = SocketDrError (SDE_CONNECTION_EXISTS SDE_INSUFFICIENT_MEMORY SDE_CONNECTION_TIMEOUT SDE_CONNECTION_REFUSED SDE_CONNECTION_RESET SDE_CONNECTION_RESET_BY_PEER if link not already open, then also: SDE_DRIVER_NOT_FOUND SDE_ALREADY_REGISTERED SDE_MEDIUM_BUSY SDE_LINK_OPEN_FAILED) otherwise carry clear DESTROYED: di (preserved by TcpipStrategy) ax (if not returned) PSEUDO CODE/STRATEGY: Check to make sure connection doesn't already exist Create the connection to specified port If link connection is closed, open it Start a timer to stop connection process if it takes too long Tell the driver's thread to establish the connection Block calling thread until connection has been established. If socket is now in open state, return connection handle If socket is in closed state, return SocketDrError based on error stored in the socket state and destroy the socket REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/ 7/94 Initial version jwu 8/ 1/96 Nonblocking, interruptible version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipDataConnectRequest proc far uses bx, cx, si, ds .enter EC < call ECCheckCallerThread > EC < push bx > EC < mov bx, ds > EC < call ECAssertValidFarPointerXIP > EC < pop bx > EC < call ECCheckIPAddrSize > EC < call ECCheckIPAddr > EC < push cx > EC < mov ax, bx > EC < call TSocketFindHandle ; destroys cx > EC < pop cx > EC < ERROR_C TCPIP_INVALID_CONNECTION_HANDLE . ; ; If interrupted, return SDE_INTERRUPTED. Set state ; to TSS_CONNECTING while we have access to the socket. ; push ds, si call TSocketLockInfoExcl mov si, ds:[bx] mov ds:[si].TS_state, TSS_CONNECTING mov ax, ds:[si].TS_error call TSocketUnlockInfoExcl ; preserves flags pop ds, si cmp ax, SDE_INTERRUPTED je errorDestroy ; ; Fail if another connection with the same local port, ; remote port and remote address exists. ; push bx, si mov bx, si ; ds:bx = addr lodsw ; ax = link addr size add si, ax ; ds:si = tcp part movdw disi, ds:[si] ; disi = remote addr call TSocketCheckDuplicate ; ax = error if exists pop bx, si jc errorDestroy ; ; Make sure link is open (so we have a local address). Then ; store the connection info. ; call LinkOpenConnection ; ax = error or link jc errorDestroy mov di, ds:[si] inc si inc si add si, di movdw disi, ds:[si] ; disi = remote addr call TSocketStoreConnectionInfo ; ax = error jc errorDestroy ; ; Have driver's thread establish the connection. ; mov di, bx ; di = connection handle mov ax, MSG_TCPIP_OPEN_CONNECTION_ASM call TcpipSendMsgToDriverThread clc jmp exit errorDestroy: mov cx, bx ; cx = connection handle call TSocketDestroyConnection stc exit: .leave ret TcpipDataConnectRequest endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipStopDataConnect %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Interrupt opening of a connection or close the connection if it has already been opened. CALLED BY: TcpipStrategy (DR_SOCKET_STOP_DATA_CONNECT) (DR_SOCKET_STOP_LINK_CONNECT) PASS: bx = connection handle RETURN: carry set if no such connection ax = SocketDrError (SDE_INVALID_CONNECTION_HANDLE) else, carry clear DESTROYED: di (allowed) ax if not returned PSEUDO CODE/STRATEGY: Set TS_error to SDE_INTERRUPTED for other routines to check. If connection is opening or open, reset connection NOTES: If link connection is open or opening, it will stay open. No good way to detect this and stop it because we can't tell which link is being used by the connection. DO NOT alter the state so that TSocketIsDisconnected knows whether to notify with SCO_CONNECT_FAILED or SCO_CONNECTION_CLOSED. REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/29/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipStopDataConnect proc far uses cx, dx, di .enter ; ; Make sure connection exists. ; mov ax, bx call TSocketFindHandle ; destroys cx mov ax, SDE_INVALID_CONNECTION_HANDLE jc exit ; ; Set error to SDE_INTERRUPTED. Do NOT alter the state. ; [See header notes.] ; call TSocketLockInfoExcl mov di, ds:[bx] mov dx, SDE_INTERRUPTED mov ds:[di].TS_error, dx mov al, ds:[di].TS_state call TSocketUnlockInfoExcl ; ; Send a reset request if the state is not TSS_NEW, ; TSS_CLOSED or TSS_DEAD. ; EC < cmp al, TSS_CONNECT_REQUESTED > EC < ERROR_E TCPIP_BAD_SOCKET_STATE > CheckHack <TSS_CLOSED lt TSS_CONNECT_REQUESTED> CheckHack <TSS_CONNECT_REQUESTED lt TSS_DEAD> CheckHack <TSS_DEAD eq TcpSocketState - 1> cmp al, TSS_NEW je exit ; carry clear cmp al, TSS_CLOSED jae exit ; carry clear mov di, bx mov ax, MSG_TCPIP_RESET_CONNECTION_ASM call TcpipSendMsgToDriverThread clc exit: .leave ret TcpipStopDataConnect endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipDisconnectRequest %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Close a connection CALLED BY: TcpipStrategy (DR_SOCKET_DISCONNECT_REQUEST) PASS: bx = connection handle ax = SocketCloseType RETURN: carry set if error ax = SDE_INVALID_CONNECTION_HANDLE DESTROYED: di (preserved by TcpipStrategy) PSEUDO CODE/STRATEGY: Verify that the connection exists If connection is not open, do nothing Set socket state to disconnecting Queue msg for driver to process disconnection if full close block calling thread until connection has been disconnected Set destruct timer for connection to be destroyed else, we're done NOTE: Using SCT_FULL will cause the caller to block until the 2MSL timer has expired. Use SCT_FULL if caller wants to reopen connection after this returns. Otherwise, the reopen may fail because the connection may still exist. Do not destroy the connection immediately after the PSem returns. Let the driver destroy the connection to avoid destroying it while the driver's thread may still be doing something with the connection. (e.g. the message is queued, but the connection failed and the PSem returned, then the driver's thread gets the queued event) REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/ 7/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipDisconnectRequest proc far uses ax, bx, cx, si, ds .enter Assert etype ax, SocketCloseType EC < cmp ax, SCT_FULL > EC < jne skipCheck > EC < call ECCheckCallerThread > EC <skipCheck: > ; ; If connection doesn't exist, return error. ; call TcpipGainAccess xchg ax, bx ; ax = conn, bx = SocketCloseType call TSocketFindHandle ; destroys cx jnc checkState mov ax, SDE_INVALID_CONNECTION_HANDLE call TcpipReleaseAccess jmp exit checkState: ; ; If socket is not open, no need to do anything. This case ; is NOT an error so return carry clear! ; call TSocketLockInfoExcl mov di, ax mov si, ds:[di] ; ds:si = TcpSocket cmp ds:[si].TS_state, TSS_OPEN je disconnect call TSocketUnlockInfoExcl call TcpipReleaseAccess jmp done disconnect: ; ; Set state to disconnecting and wake blocked send request ; on the connection, if any. ; mov ds:[si].TS_state, TSS_DISCONNECTING mov cx, bx ; cx = SocketCloseType tst ds:[si].TS_pendingData je afterVSend EC < WARNING TCPIP_ABORTING_SEND_DATA_REQUEST > mov bx, ds:[si].TS_sendSem call ThreadVSem afterVSend: ; ; Get sempahore to block calling thread if full close. ; cmp cx, SCT_HALF je doClose EC < tst ds:[si].TS_waiter > EC < ERROR_NZ TCPIP_OPERATION_IN_PROGRESS > mov ds:[si].TS_waiter, TCPIP_WAITER_EXISTS mov bx, ds:[si].TS_sem doClose: call TSocketUnlockInfoExcl ; ; Tell driver to disconnect the connection. ; mov ax, MSG_TCPIP_CLOSE_CONNECTION_ASM call TcpipSendMsgToDriverThread call TcpipReleaseAccess ; ; If full close, block until disconnect completes. ; cmp cx, SCT_HALF je exit ; carry already clear call ThreadPSem done: clc exit: .leave ret TcpipDisconnectRequest endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipSendData %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Socket library is sending some data over a connection CALLED BY: TcpipStrategy (DR_SOCKET_SEND_DATA) PASS: dx:bp = optr of buffer to send (hugeLMem chunk) cx = size of data in buffer bx = connection handle ax = timeout value (or 0 for no blocking) si = SocketSendMode RETURN: carry set if data could not be sent ax = SocketDrError (SDE_CONNECTION_TIMEOUT, SDE_INTERRUPTED, SDE_CONNECTION_RESET_BY_PEER, SDE_CONNECTION_RESET) DESTROYED: di (preserved by TcpipStrategy) PSEUDO CODE/STRATEGY: Verify that the connection exists Add the data to the output queue for the connection Queue a message for the driver's thread to send the data SIDE EFFECTS: Data buffer will be freed by the driver if send is successful. REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/ 7/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipSendData proc far uses bx, cx, dx, ds .enter EC < call ECCheckCallerThread > Assert etype, si, SocketSendMode Assert optr, dxbp ; ; If there is no data, just free the buffer but don't return ; error. ; call TcpipGainAccess clc ; no error jcxz freeBuffer ; ; Add the data to the output queue for the connection and ; have driver's thread send the data. If output queue was full, ; wait for space if blocking is requested. ; mov di, bx ; di = connection handle xchg ax, bx ; ax = connection handle ; bx = timeout value call TSocketNewOutputData ; carry set if not queued jnc sendIt cmp ax, SDE_NO_ERROR stc jne freeBuffer tst bx ; block? stc jz freeBuffer mov ax, di ; ax = connection handle xchg si, bp ; ^ldx:si = buffer call TcpipQueueSendDataRequest ; ax = error, if any xchg si, bp ; ^ldx:bp = buffer, si = SendMode jc freeBuffer sendIt: Assert etype si, SocketSendMode mov bx, handle dgroup call MemDerefDS mov bx, ds:[driverThread] mov dx, si ; dx = SocketSendMode mov cx, di ; cx = connection handle mov ax, MSG_TCPIP_SEND_DATA_ASM mov di, mask MF_CALL ; must use MF_CALL! call ObjMessage ; returns ax = error cmp ax, SDE_NO_ERROR clc ; assume no error je exit ; yes, no error stc ; else, indicate error jmp exit freeBuffer: EC < WARNING TCPIP_DISCARDING_OUTPUT_BUFFER > push ax pushf movdw axcx, dxbp call HugeLMemFree popf pop ax ; ax = error, if any exit: call TcpipReleaseAccess .leave ret TcpipSendData endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipStopSendData %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Interrupt a blocked send data request, if any. CALLED BY: TcpipStrategy (DR_SOCKET_STOP_SEND_DATA) PASS: bx = connection handle RETURN: carry set if error ax = SocketDrError (SDE_INVALID_CONNECTION_HANDLE) else carry clear DESTROYED: di (allowed) ax if not returned PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/29/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipStopSendData proc far uses bx, cx, si, ds .enter ; ; Gain access so we don't get preempted by a send data or a ; disconnect request. Verify connection handle. ; mov_tr ax, bx ; ax = handle mov di, ax ; di = handle call TcpipGainAccess call TSocketLockInfoListFar ; *ds:si = socket list call TSocketFindHandleNoLock ; destroys cx mov ax, SDE_INVALID_CONNECTION_HANDLE jc exit ; ; Interrupt a pending send data request if there is one. ; mov si, ds:[di] ; ds:si = TcpSocket tst_clc ds:[si].TS_pendingData je exit mov ds:[si].TS_error, SDE_INTERRUPTED mov bx, ds:[si].TS_sendSem call ThreadVSem clc exit: call TSocketUnlockInfoExcl call TcpipReleaseAccess .leave ret TcpipStopSendData endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipSendDatagram %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Socket library is sending some unreliable data. CALLED BY: TcpipStrategy (DR_SOCKET_SEND_DATAGRAM) PASS: dx:bp = optr of buffer to send ds:si = remote address (non-null terminated string) ax = address size bx = client handle cx = data size (ignored) RETURN: carry set ax = SocketDrError DESTROYED: nothing PSEUDO CODE/STRATEGY: pass to UDP output routine REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/ 7/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipSendDatagram proc far uses cx .enter EC < call ECCheckCallerThread > Assert optr dxbp EC < cmp bx, mask RS_DATA > EC < ERROR_NE TCPIP_INVALID_CLIENT_HANDLE > EC < push bx > EC < mov bx, ds > EC < call ECAssertValidFarPointerXIP > EC < pop bx > mov cx, MSG_TCPIP_SEND_DATAGRAM_ASM call TcpipSendDatagramCommon .leave ret TcpipSendDatagram endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipResetRequest %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Socket library wants to reset the connection. CALLED BY: TcpipStrategy (DR_SOCKET_RESET_REQUEST) PASS: ax = connection handle RETURN: nothing DESTROYED: di (preserved by TcpipStrategy) PSEUDO CODE/STRATEGY: Verify that the connection exists Set the socket state to closed Tell the driver's thread to reset the connection Block calling thread until connection has been reset REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/ 7/94 Initial version jwu 5/14/96 Use MF_CALL and no PSem version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipResetRequest proc far uses ax, bx, cx, dx, si, ds .enter EC < call ECCheckCallerThread > call TSocketFindHandle ; destroys cx EC < WARNING_C TCPIP_CONNECTION_DOES_NOT_EXIST > jc noSocket ; ; Set the socket state to closed and mark that we are ; waiting for the connection to be closed. (Must do this ; even though we don't PSem here to prevent notifications ; from being sent.) ; call TcpipGainAccess call TSocketLockInfoExcl mov si, ax ; si = connection handle mov_tr cx, ax ; cx = connection handle mov si, ds:[si] ; ds:si = TcpSocket tst si EC < WARNING_Z TCPIP_CONNECTION_DOES_NOT_EXIST > jz noSocketUnlock EC < tst ds:[si].TS_waiter > EC < ERROR_NZ TCPIP_OPERATION_IN_PROGRESS > mov ds:[si].TS_waiter, TCPIP_WAITER_EXISTS mov ds:[si].TS_state, TSS_CLOSED ; ; Wake up any pending sends. Must do this AFTER marking socket ; closed. ; tst ds:[si].TS_pendingData je noSend EC < WARNING TCPIP_ABORTING_SEND_DATA_REQUEST > mov bx, ds:[si].TS_sendSem call ThreadVSem ; destroys ax noSend: call TSocketUnlockInfoExcl ; ; Tell the driver to send a reset and wait until it completes. ; Must use MF_CALL so we know that connection has been destroyed ; when we return. ; mov bx, handle dgroup call MemDerefDS mov bx, ds:[driverThread] EC < Assert thread bx > mov dx, SDE_CONNECTION_RESET mov ax, MSG_TCPIP_RESET_CONNECTION_ASM mov di, mask MF_CALL call ObjMessage exit:: call TcpipReleaseAccess noSocket: .leave ret noSocketUnlock: call TSocketUnlockInfoExcl jmp short exit TcpipResetRequest endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipAttach %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Socket library has decided to accept a connection requested by the peer. CALLED BY: TcpipStrategy (DR_SOCKET_ATTACH) PASS: ax = connection handle cx = timeout value (in ticks) RETURN: carry set if error ax = SocketDrError DESTROYED: di (preserved by TcpipStrategy) PSEUDO CODE/STRATEGY: Verify that the connection exists Tell the driver's thread to accept the connection Start a timer to stop the process if it takes too long Block calling thread until connection has been established If socket is now in open state, return connection handle If socket is in closed state, return SocketDrError based on error stored in the socket state and destroy the socket REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/ 7/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipAttach proc far uses bx, cx .enter EC < call ECCheckCallerThread > EC < push cx > EC < call TSocketFindHandle ; destroys cx > EC < pop cx > EC < ERROR_C TCPIP_INVALID_CONNECTION_HANDLE > ; ; Set state to connecting and get the semaphore to block ; caller's thread. ; mov bl, TSS_CONNECTING call TSocketSetStateAndGetSem ; bx = sem handle ; ; Tell the driver's thread to accept the connection, then wait. ; mov_tr di, ax ; di = connection handle mov ax, MSG_TCPIP_ACCEPT_CONNECTION_ASM call TcpipSendMsgToDriverThread call ThreadPTimedSem ; ax = SemaphoreError ; ; Check if the connection has been successfully established or not. ; mov cx, di ; cx = connection handle call TSocketCheckIfConnected ; ax = SocketDrError exit:: .leave ret TcpipAttach endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipReject %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Socket library rejects the connection requested by the peer. CALLED BY: TcpipStrategy (DR_SOCKET_REJECT) PASS: ax = connection handle RETURN: nothing DESTROYED: di (preserved by TcpipStrategy) PSEUDO CODE/STRATEGY: Verify that the connection exists Set the socket state to dead and set waiter bit Tell the driver's thread to reject this connection Block until rejection completed NOTE: Socket will be destroyed after a timeout period by tcpip thread. REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/ 7/94 Initial version jwu 5/14/96 MF_CALL, no PSem version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipReject proc far uses ax, bx, cx, dx, ds .enter EC < call ECCheckCallerThread > ; ; Verify that the connection exists. ; EC < call TSocketFindHandle ; destroys cx > EC < ERROR_C TCPIP_INVALID_CONNECTION_HANDLE > ; ; Set the socket state to dead and set waiter flag to ; avoid notifications from being sent when connection is ; closed. ; call TSocketLockInfoExcl mov si, ax ; si = connection handle mov_tr cx, ax ; cx = connection handle mov si, ds:[si] ; ds:si = TcpSocket EC < tst ds:[si].TS_waiter > EC < ERROR_NZ TCPIP_OPERATION_IN_PROGRESS > mov ds:[si].TS_waiter, TCPIP_WAITER_EXISTS mov ds:[si].TS_state, TSS_DEAD call TSocketUnlockInfoExcl ; ; Tell the driver's thread to reject the connection by sending ; a reset. Wait until the reset has been processed. Connection ; is destroyed by TCP's thread. ; mov bx, handle dgroup call MemDerefDS mov bx, ds:[driverThread] EC < Assert thread bx > mov dx, SDE_CONNECTION_RESET mov ax, MSG_TCPIP_RESET_CONNECTION_ASM mov di, mask MF_CALL call ObjMessage exit:: .leave ret TcpipReject endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipGetInfo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Furnish requested information. CALLED BY: TcpipStrategy (DR_SOCKET_GET_INFO) PASS: ax = SocketGetInfoType other parameters vary by SocketGetInfoType RETURN: carry set if information not available, else depends on SocketGetInfoType DESTROYED: ax (if not used in return value) di (preserved by TcpipStrategy) PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 10/21/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipGetInfo proc far uses es .enter Assert etype ax, SocketGetInfoType ; ; Return error if SocketGetInfoType not supported by driver. ; cmp ax, size infoProcTable cmc jc exit push bx mov bx, handle dgroup call MemDerefES ; es = dgroup pop bx mov di, ax call cs:infoProcTable[di] exit: .leave ret infoProcTable nptr \ TcpipGetMediaList, ; SGIT_MEDIA_LIST TcpipGetMediumAndUnit, ; SGIT_MEDIUM_AND_UNIT TcpipGetAddrCtrl, ; SGIT_ADDR_CTRL TcpipGetAddrSize, ; SGIT_ADDR_SIZE TcpipGetLocalAddr, ; SGIT_LOCAL_ADDR TcpipGetRemoteAddr, ; SGIT_REMOTE_ADDR TcpipGetNothing, ; SGIT_MTU TcpipGetNothing, ; SGIT_PREF_CTRL TcpipGetMediumConnection, ; SGIT_MEDIUM_CONNECTION TcpipGetMediumLocalAddr ; SGIT_MEDIUM_LOCAL_ADDR TcpipGetInfo endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipGetNothing %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Something to do in your spare time. CALLED BY: TcpipGetInfo (SGIT_MTU, SGIT_PREF_CTRL) PASS: nothing RETURN: carry set DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: set the carry flag because the info is not available REVISION HISTORY: Name Date Description ---- ---- ----------- CL 2/ 3/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipGetNothing proc near stc ret TcpipGetNothing endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipGetMediaList %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pp SYNOPSIS: Return a list of media supported by the driver. CALLED BY: TcpipGetInfo (SGIT_MEDIA_LIST) PASS: *ds:si = chunk array for MediumType RETURN: *ds:si = chunk array filled with MediumType DESTROYED: ax (allowed) di (preserved by caller) PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 10/21/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipGetMediaList proc near uses bx .enter EC < push cx > EC < call ChunkArrayGetCount > EC < tst cx > EC < ERROR_NE TCPIP_INVALID_PARAMS_TO_GET_MEDIA_LIST > EC < pop cx > clr bx ; first entry makeList: call ChunkArrayAppend ; ds:di = new element jc exit mov ax, cs:mediaTable[bx] mov ds:[di].MET_id, ax mov ds:[di].MET_manuf, MANUFACTURER_ID_GEOWORKS inc bx inc bx cmp bx, size mediaTable jb makeList clc exit: .leave ret mediaTable word \ GMID_SERIAL_CABLE, GMID_DATA_MODEM TcpipGetMediaList endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipGetMediumAndUnit %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the medium and unit. CALLED BY: TcpipGetInfo (SGIT_MEDIUM_AND_UNIT) PASS: ds:si = non-null terminated addr string (ignored) dx = addr size (ignored) es dgroup RETURN: carry set if error, else cxdx = MediumType bl = MediumUnitType bp = MediumUnit (port) DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 10/21/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipGetMediumAndUnit proc near call LinkGetMediumAndUnit ret TcpipGetMediumAndUnit endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipGetAddrCtrl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the pointer to the address controller class. CALLED BY: TcpipGetInfo (SGIT_ADDR_CTRL) PASS: nothing RETURN: carry set on error else cx:dx = pointer to class DESTROYED: nothing PSEUDO CODE/STRATEGY: Domain and medium parameters are ignored because there is only possible address controller. Increment ref count of driver. REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 10/31/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipGetAddrCtrl proc near uses bx .enter mov bx, handle 0 call GeodeAddReference mov cx, segment IPAddressControlClass mov dx, offset IPAddressControlClass clc .leave ret TcpipGetAddrCtrl endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipGetAddrSize %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Return significant bytes of resolved IP address only. Link address is not accounted for in returned size CALLED BY: TcpipGetInfo (SGIT_ADDR_SIZE) PASS: nothing RETURN: ax = size of resolved IP address DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 10/21/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipGetAddrSize proc near mov ax, size IPAddr clc ret TcpipGetAddrSize endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipGetLocalAddr/TcpipGetRemoteAddr %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Return the local/remote IP address used in its 4 byte binary form. (Not the extended IP address with link address combined.) CALLED BY: TcpipGetInfo (SGIT_LOCAL_ADDR, SGIT_REMOTE_ADDR) PASS: cx = connection handle (or 0 if connectionless) ds:bx = buffer for addr string dx = buffer size es = dgroup RETURN: carry set if error, else ds:bx = addr string (non null-terminated) ax = address size DESTROYED: di (preserved by caller) PSEUDO CODE/STRATEGY: Get local address of specified connection. If no connection specified, get local address of main tcp link. If main link not open, return carry set. REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 10/21/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipGetLocalAddr proc near uses bx, cx .enter EC < push bx, si > EC < movdw bxsi, dsbx > EC < call ECAssertValidFarPointerXIP > EC < pop bx, si > mov ax, IP_ADDR_SIZE cmp ax, dx ; buffer big enough? ja exit ; carry already clear jcxz noAddr mov di, offset TS_localAddr call TcpipGetAddrCommon jmp exit noAddr: ; ; Return address of main link, if opened. ; push si, es, ds movdw essi, dsbx ; es:si = buffer mov bx, MAIN_LINK_DOMAIN_HANDLE call LinkTableGetEntry ; ds:di = LCB ; ^hbx = table movdw es:[si], ds:[di].LCB_localAddr, cx mov cl, ds:[di].LCB_state call MemUnlockExcl pop si, es, ds cmp cl, LS_OPEN je exit ; carry clear stc exit: .leave ret TcpipGetLocalAddr endp TcpipGetRemoteAddr proc near EC < tst cx > EC < ERROR_E TCPIP_INVALID_CONNECTION_HANDLE > mov ax, IP_ADDR_SIZE cmp ax, dx ; buffer big enough? ja exit ; carry already clear mov di, offset TS_remoteAddr call TcpipGetAddrCommon exit: ret TcpipGetRemoteAddr endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipGetAddrCommon %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Return the requested address. CALLED BY: TcpipGetLocalAddr, TcpipGetRemoteAddr PASS: cx = connection handle ds:bx = buffer for addr string di = offset to TS_localAddr or TS_remoteAddr RETURN: carry set if error, else ds:bx = buffer for addr string DESTROYED: di (preserved by caller) PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 10/24/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipGetAddrCommon proc near uses cx, si .enter EC < push ax > EC < mov_tr ax, cx > EC < call TSocketFindHandle ; destroys cx > EC < ERROR_C TCPIP_INVALID_CONNECTION_HANDLE > EC < mov_tr cx, ax > EC < pop ax > push ds call TSocketLockInfoShared mov si, cx ; si = connection handle mov si, ds:[si] ; ds:si = TcpSocket add si, di ; ds:si = desired address movdw cxdi, ds:[si] ; cxdi = IP address call TSocketUnlockInfoShared pop ds movdw ds:[bx], cxdi clc .leave ret TcpipGetAddrCommon endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipGetMediumConnection %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Check if a connection exists over the specified unit of the medium. If so, then return the connection address. CALLED BY: TcpipGetInfo (SGIT_MEDIUM_CONNECTION) PASS: es = dgroup dx:bx = MediumAndUnit ds:si = address buffer cx = buffer size in bytes RETURN: carry set if no connection is established over the unit of the medium. else ds:si = filled in with address, up to value passed in as buffer size. cx = actual size of address in ds:si. If cx is greater than the buffer size that was passed in, then address in ds:si is incomplete. DESTROYED: di (preserved by caller) REVISION HISTORY: Name Date Description ---- ---- ----------- CL 2/ 3/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipGetMediumConnection proc near uses bx .enter EC < push si > EC < push bx > EC < mov bx, ds > EC < call ECAssertValidFarPointerXIP > EC < pop si > EC < mov bx, dx EC < call ECAssertValidFarPointerXIP > EC < mov bx, si > EC < pop si > call LinkGetMediumAndUnitConnection ; cx = link domain handle jc exit ; no link mov_tr cx, ax ; cx <- addr size ; (carry remains ; clear) exit: .leave ret TcpipGetMediumConnection endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipGetMediumLocalAddr %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Return the local IP address (in its 4 byte binary form) that would be used for outgoing connections/datagrams. CALLED BY: TcpipGetInfo PASS: es = dgroup dx:bx = MediumAndUnit (ignored) ds:si = address buffer cx = buffer size in bytes RETURN: carry set if address not available else ds:si = filled in with address, if buffer big enough cx = actual size of address in ds:si. If cx is greater than the buffer size that was passed in, then address in ds:si is incomplete. DESTROYED: ax, di (allowed/preserved by caller) PSEUDO CODE/STRATEGY: Set up parameters and call TcpipGetLocalAddr. REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 11/ 8/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipGetMediumLocalAddr proc near uses bx, dx .enter mov bx, si ; ds:bx = buffer for addr mov dx, cx ; dx = buffer size clr cx ; no connection call TcpipGetLocalAddr mov_tr cx, ax ; cx = addr size .leave ret TcpipGetMediumLocalAddr endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipSetOption %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Set an option for the connection. CALLED BY: TcpipStrategy (DR_SOCKET_SET_OPTION) PASS: ax = SocketOptionType bx = connection other params by option type: SOT_SEND_BUF: SOT_RECV_BUF: cx = size of receive buffer (-1 for no limit) SOT_INLINE: SOT_NODELAY: cx = TRUE/FALSE RETURN: nothing DESTROYED: di (preserved by TcpipStrategy) PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 1/10/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipSetOption proc far uses ax,bx,cx,dx,si,ds,es .enter Assert etype ax, SocketOptionType ; ; Find connection handle. ; push cx xchg ax, bx call TSocketFindHandle ; destroys CX xchg ax, bx pop cx EC < WARNING_C TCPIP_CONNECTION_HANDLE_IS_BAD > jc exit ; ; If setting send buffer size, do it here, else let C code ; handle it. ; cmp ax, SOT_SEND_BUF jne setProto call TSocketLockInfoExcl mov di, ds:[bx] ; ds:di = TcpSocket mov ds:[di].TS_maxData, cx call TSocketUnlockInfoExcl jmp exit setProto: push bx, ax, cx call TcpSetOption ; may destroy all but bp exit: .leave ret TcpipSetOption endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipGetOption %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the value for a Tcp option from the connection. CALLED BY: TcpipStrategy (DR_SOCKET_GET_OPTION) PASS: ax = SocketOptionType bx = connection RETURN: cx = option value DESTROYED: di (preserved by TcpipStrategy) PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 1/10/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipGetOption proc far uses ax, bx, dx, si, ds, es .enter Assert etype ax, SocketOptionType xchg ax, bx call TSocketFindHandle ; destroys CX xchg ax, bx EC < WARNING_C TCPIP_CONNECTION_HANDLE_IS_BAD > mov cx, 0 ; assume worst... preserve carry! jc exit EC < cmp ax, SOT_RECV_BUF > EC < ERROR_E TCPIP_QUERIED_FOR_RECV_BUFFER_LIMIT > push bx, ax call TcpGetOption ; ax = option value ; may destroy all but bp mov_tr cx, ax exit: .leave ret TcpipGetOption endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipResolveAddr %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Resolve a socket address for TCP/IP. Address is a combined link and IP address. A zero sized IP address will be resolved as the default server or client address depending on whether a link is open or not. This is useful for making direct connections between 2 GEOS devices which do not have IP addresses of their own. CALLED BY: TcpipStrategy (DR_SOCKET_RESOLVE_ADDR) PASS: ds:si = addr to resolve (non-null terminated) (ESACAddress format) cx = size of addr (cannot be zero because there is at least a word for size of link part) dx:bp = buffer for resolved address ax = size of buffer RETURN: carry clr if address returned dx:bp = buffer filled w/non-null terminated addr if buffer is big enough cx = size of resolved address carry set if couldn't resolve it ax = SocketDrError SDE_DESTINATION_UNREACHABLE: address doesn't exist in network SDE_TEMPORARY_ERROR: address unreachable temporarily SDE_INVALID_ADDR SDE_DRIVER_NOT_FOUND and anything else that can be returned by connect and send routines DESTROYED: di (preserved by caller) STRATEGY: make sure buffer is big enough before wasting our efforts copy link address part to buffer first so pointer to addr string is automatically advanced to tcp part if address is in dotted decimal notation, convert to binary form else, use resolver to determine address of host name string return size of resolved address (equals size of link part plus IP_ADDR_SIZE) REVISION HISTORY: Name Date Description ---- ---- ----------- SJ 2/17/95 Initial version jwu 2/23/95 2nd, 3rd, 4th and ... versions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipResolveAddr proc far uses bx, dx, bp, si, ds, es .enter EC < push bx, si > EC < mov bx, ds > EC < call ECAssertValidFarPointerXIP > EC < movdw bxsi, dxbp > EC < call ECAssertValidFarPointerXIP > EC < pop bx, si > EC < tst cx > EC < ERROR_E TCPIP_INVALID_IP_ADDRESS > ; ; Check if buffer is big enough. ; mov di, cx ; di = total addr size mov_tr bx, ax ; bx = buffer size lodsw ; ax = link size mov cx, ax ; cx = link size sub bx, IP_ADDR_SIZE + size word jb setSize ; too small for IP addr and link size ; ; Have link driver resolve the link part of the address. ; xchg ax, bx ; bx = size of link address ; ax = buffer size for link addr mov es, dx jcxz afterLink add bp, size word ; es:bp = start of link part call LinkResolveLinkAddr ; cx = resolved addr size ; dx = access ID, ax unchanged jc exit ; or ax = SocketDrError cmp cx, ax ja setSize ; buffer was too small sub bp, size word ; es:bp = start of buffer afterLink: ; ; Store resolved link address size. ; mov es:[bp], cx add bp, size word add bp, cx ; es:bp = resolved IP addr dest ; ; Advance pointers and update sizes. ; add si, bx ; ds:si = unresolved IP addr add bx, size word ; include word for link size sub di, bx ; di = unresolved IP addr size mov bx, cx ; bx = resolved link addr size mov cx, di ; cx = unresolved IP addr size mov di, bp ; es:di = resolved IP addr dest ; ; Now resolve the IP part of the address. If no IP address is ; provided, return the default IP address. ; jcxz getDefault call TcpipResolveIPAddr ; dxax = address or jc exit ; ax = SocketDrError haveAddr: movdw es:[di], dxax mov cx, bx ; cx = resolved link addr size setSize: add cx, IP_ADDR_SIZE + size word clc exit: .leave ret getDefault: ; ; Get the default remote IP address the client should use. ; call TcpipGetDefaultIPAddr ; dxax = address jmp haveAddr TcpipResolveAddr endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipStopResolve %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Interrupt a resolve operation. CALLED BY: TcpipStrategy PASS: ds:si = addr being resolved (non-null terminated) (ESACAddress format) cx = size of addr (cannot be zero because there is at least a word for size of link part) RETURN: carry set if error ax = SocketDrError (SDE_DRIVER_NOT_FOUND) DESTROYED: di (allowed) PSEUDO CODE/STRATEGY: Get link address Tell link driver to stop resolving Get IP address If first char is alpha, load resolver stop resolve unload resolver clc REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/29/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipStopResolve proc far uses bx, cx, si .enter EC < tst cx > EC < ERROR_E TCPIP_INVALID_IP_ADDRESS > ; ; Stop resolution of link part of address. ; lodsw ; ax = link addr size xchg cx, ax ; ax = total addr size jcxz doIP ; no link address call LinkStopLinkResolve doIP: ; ; Make sure address even needed resolving. Address ; is assumed to be in dotted decimal notation if the ; first character is a digit. (RFC 1034, section 3.5) ; add si, cx ; ds:si = IP address sub ax, cx dec ax dec ax mov_tr cx, ax ; cx = IP address size jcxz done clr ax LocalGetChar ax, dssi, NO_ADVANCE call LocalIsDigit jnz done ; ; Don't know how to check if a resolve is in progress so ; just pass the request along. ; ifdef STATIC_LINK_RESOLVER mov bx, handle resolver else call TcpipLoadResolver ; ax = library handle jc exit ; or SocketDrError push ax mov_tr bx, ax ; bx = library handle endif mov ax, enum ResolverStopResolve call ProcGetLibraryEntry call ProcCallFixedOrMovable ifndef STATIC_LINK_RESOLVER pop bx call GeodeFreeLibrary endif done: clc ifndef STATIC_LINK_RESOLVER exit: endif .leave ret TcpipStopResolve endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipCloseMedium %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Close the link on the specified medium. CALLED BY: TcpipStrategy (DR_SOCKET_CLOSE_MEDIUM) PASS: ax = non-zero to force close dx:bx = MediumAndUnit RETURN: carry clear if medium closed DESTROYED: di (preserved by TcpipStrategy) PSEUDO CODE/STRATEGY: Find the link of the specified medium. if the link is busy if (force = true) reset all connections else return carry clear if link is opening, interrupt it and return if link is opened, close link unregister and free link driver delete entry in link table if not main link driver REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 4/12/95 Initial version jwu 9/22/95 Release link table btwn calls jwu 7/29/96 interruptable version jwu 1/22/97 check LCB_options for busy link ed 6/30/00 GCN notification %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipCloseMedium proc far uses ax, bx, cx, dx, si, ds, es force local word push ax drvrEntry local fptr clientHan local word .enter EC < call ECCheckCallerThread > EC < push bx, si > EC < movdw bxsi, dxbx > EC < call ECAssertValidFarPointerXIP > EC < pop bx, si > ; ; Find the link using the specified medium and unit. ; call TcpipGainAccess mov cx, bx ; dx:cx = MediumAndUnit mov bx, handle dgroup call MemDerefES mov bx, cx ; dx:bx = MediumAndUnit clr cx ; no buffer for address call LinkGetMediumAndUnitConnection ; cx = link handle LONG jc clcExit ; ; If link is busy and client is forcing close, reset ; connection using the link. Otherwise, reject close. ; mov_tr ax, cx ; ax = link handle mov bx, ax call LinkTableGetEntry test ds:[di].LCB_options, mask LO_ALWAYS_BUSY call MemUnlockExcl jnz busyLink call TSocketCheckLinkBusy jnc unusedLink busyLink: mov cx, force stc ; expect no close LONG jcxz exit ; preserves carry ; ; Set error to connection reset because user cancelled (that's ; what forcing the medium close is treated as and no error note ; should be displayed.) ; mov dx, (SSDE_CANCEL or SDE_CONNECTION_RESET) call TSocketResetConnectionsOnLink unusedLink: ; ; If link is still being opened, interrupt it. Set state to ; CLOSED. If link is closing, do nothing. Else close link. ; mov cx, ax ; cx = link handle mov_tr bx, ax call LinkTableGetEntry mov si, ds:[di].LCB_connection BitClr ds:[di].LCB_options, LO_ALWAYS_BUSY mov al, ds:[di].LCB_state cmp al, LS_OPENING je stopLinkOpen ; ; Already closing. Do nothing and wait for link to close. ; cmp al, LS_CLOSING jne closeLink call MemUnlockExcl jmp clcExit stopLinkOpen: ; ; Link is opening. Interrupt it. ; mov ds:[di].LCB_state, LS_CLOSING mov ds:[di].LCB_error, SDE_INTERRUPTED pushdw ds:[di].LCB_strategy call MemUnlockExcl mov ax, TSNT_CLOSING call LinkSendNotification mov bx, si mov di, DR_SOCKET_STOP_LINK_CONNECT call PROCCALLFIXEDORMOVABLE_PASCAL jmp exit closeLink: ; ; Disconnect the link if it is open. MUST unlock link table ; before calling out of driver. Link driver will be unregistered ; and unloaded. ; mov ds:[di].LCB_state, LS_CLOSED mov dx, ds:[di].LCB_clientHan mov clientHan, dx movdw drvrEntry, ds:[di].LCB_strategy, dx clr dx xchg dx, ds:[di].LCB_drvr call MemUnlockExcl push ax mov ax, TSNT_CLOSED call LinkSendNotification pop ax tst_clc dx je exit ; no driver cmp al, LS_CLOSED je closed mov bx, si ; bx = connection mov di, DR_SOCKET_DISCONNECT_REQUEST pushdw drvrEntry call PROCCALLFIXEDORMOVABLE_PASCAL closed: ; ; Unregister and free driver ; mov bx, clientHan mov di, DR_SOCKET_UNREGISTER pushdw drvrEntry call PROCCALLFIXEDORMOVABLE_PASCAL mov bx, dx cmp cx, MAIN_LINK_DOMAIN_HANDLE jne notMain call LinkUnloadLinkDriverFar jmp delete notMain: call GeodeFreeDriver ; ; If not main link driver, delete link entry. ; delete: cmp cx, MAIN_LINK_DOMAIN_HANDLE je exit movdw bxsi, es:[linkTable] call MemLockExcl mov ds, ax mov_tr ax, cx ; ax = link handle mov cx, 1 call ChunkArrayDeleteRange call MemUnlockExcl clcExit: clc exit: call TcpipReleaseAccess .leave ret TcpipCloseMedium endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipMediumConnectRequest %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Open the link for the given address if the link is not currently in use. If link is already opened to the same address, the current link is returned. CALLED BY: TcpipStrategy PASS: cx = timeout value (in ticks) bx = client handle ds:si = non-null terminated string for addr to connect to ax = addr string size (ignored) RETURN: carry set if connection failed ax = SocketDrError otherwise ax = SDE_NO_ERROR DESTROYED: di (preserved by TcpipStrategy) PSEUDO CODE/STRATEGY: call LinkOpenConnection to do all the work REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 9/19/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipMediumConnectRequest proc far EC < call ECCheckCallerThread > EC < call ECCheckIPAddrSize > EC < call ECCheckClientHandle > EC < push ds > EC < push bx > EC < mov bx, handle dgroup > EC < call MemDerefDS > EC < pop bx > EC < test ds:[regStatus], bx > EC < ERROR_Z TCPIP_NOT_REGISTERED > EC < pop ds > EC < push bx > EC < mov bx, ds > EC < call ECAssertValidFarPointerXIP > EC < pop bx > call LinkOpenConnection ; ax = SocketDrError jc exit clr ax exit: ret TcpipMediumConnectRequest endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipSetMediumOption %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Set an option for the link over the given medium. CALLED BY: TcpipStrategy PASS: dxbx = MediumAndUnit ax = MediumOptionType other parameters vary depending on MediumOptionType MOT_ALWAYS_BUSY cx = TRUE/FALSE RETURN: carry set if error DESTROYED: di (preserved by TcpipStrategy) SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 1/16/97 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipSetMediumOption proc far uses ax, bx, cx, dx, si, ds, es .enter EC < call ECCheckCallerThread > ; ; If not MOT_ALWAYS_BUSY, do nothing. ; cmp ax, MOT_ALWAYS_BUSY jne done alwaysBusy:: ; ; Find the link using the specified medium and unit. ; EC < push bx, si > EC < movdw bxsi, dxbx > EC < call ECAssertValidFarPointerXIP > EC < pop bx, si > push cx ; save true/false mov cx, bx ; dx:cx = MediumAndUnit mov bx, handle dgroup call MemDerefES mov bx, cx ; dx:bx = MediumAndUnit clr cx ; no buffer for address call LinkGetMediumAndUnitConnection ; cx = link handle mov bx, cx pop cx ; true/false LONG jc exit ; ; Set/clear option for link. ; call LinkTableGetEntry ; bx = link table ; ds:di = LCB CheckHack < FALSE eq 0 > jcxz clearBusy BitSet ds:[di].LCB_options, LO_ALWAYS_BUSY jmp unlockTable clearBusy: BitClr ds:[di].LCB_options, LO_ALWAYS_BUSY unlockTable: call MemUnlockExcl done: clc exit: .leave ret TcpipSetMediumOption endp ;--------------------------------------------------------------------------- ; Tcpip Extended Socket Driver Functions ;--------------------------------------------------------------------------- COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipSendRawIp %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Send a raw IP datagram. CALLED BY: TcpipStrategy (DR_TCPIP_SEND_RAW_IP) PASS: dx:bp = optr of databuffer ds:si = remote IP address (non-null terminated) ax = address size bx = client handle RETURN: carry set if error ax = SocketDrError DESTROYED: nothing PSEUDO CODE/STRATEGY: Queue a message for driver thread to send raw ip packet. REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 10/13/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipSendRawIp proc far uses cx .enter if ERROR_CHECK call ECCheckCallerThread cmp bx, mask RS_RAW_IP ERROR_NE TCPIP_INVALID_CLIENT_HANDLE Assert optr, dxbp push bx mov bx, ds call ECAssertValidFarPointerXIP pop bx endif ; ERROR_CHECK mov cx, MSG_TCPIP_SEND_RAW_IP_ASM call TcpipSendDatagramCommon .leave ret TcpipSendRawIp endp ;--------------------------------------------------------------------------- ; Client Operations ;--------------------------------------------------------------------------- COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipGetProtocol %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Return the protocol level of the TCP/IP driver interface. The result should be compared with the callers notion of TCPIP_PROTO_MAJOR or TCPIP_PROTO_MINOR. CALLED BY: TcpipClientStrategy (SCO_GET_PROTOCOL) PASS: nothing RETURN: cx = major protocol dx = minor protocol DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 11/ 8/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipGetProtocol proc far mov cx, SOCKET_PROTO_MAJOR mov dx, SOCKET_PROTO_MINOR ret TcpipGetProtocol endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipAddDomain %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: If the link driver loads the TCP/IP driver, it uses this function to register itself. Note that the TCP/IP driver always initiates unregistration, so there is no SCO_REMOVE_DOMAIN call. CALLED BY: TcpipClientStrategy (SCO_ADD_DOMAIN) PASS: ax = client handle (handle assigned to us by link driver) ch = min header size for outgoing sequenced packets cl = min header size for outgoing datagram packets dl = SocketDriverType (ignored by us) ds:si = domain name (null terminated) (FXIP: string cannot be in a movable code resource) es:bx = driver entry point (in fixed resource) bp = driver handle RETURN: carry set if error else bx = domain handle DESTROYED: BX if not returned PSEUDO CODE/STRATEGY: Create thread first. Up the ref count of the link driver. (to prevent it from exiting before we are done with it) Use the larger of the two minimums as the min header size Update all the info in the LinkControlBlock for the given protocol. Return the index of the LCB in the table as the domain handle REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/ 7/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipAddDomain proc far uses cx, dx, ds .enter if ERROR_CHECK push bx mov bx, ds call ECAssertValidFarPointerXIP pop bx endif ; ERROR_CHECK ; ; Create thread for TCP/IP driver and timer if needed. ; call TcpipCreateThreadAndTimer jc exit ; ; Determine the minimum header size to use and put it in CL. ; cmp ch, cl jb haveSize mov cl, ch haveSize: ; ; Up the ref count of the link driver. If the driver is the ; main link driver, fill in main link entry in link table. ; Else, add a new entry to the link table. ; mov dx, bx ; es:dx = driver entry point mov bx, bp call GeodeAddReference call TcpipCheckLinkIsMain jnc exit mov bx, handle dgroup call MemDerefDS call LinkTableAddEntry ; bx = domain handle clc exit: .leave ret TcpipAddDomain endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipLinkOpened %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: TCP/IP driver is being informed that a link has been opened by the peer. CALLED BY: TcpipClientStrategy (SCO_LINK_OPENED) PASS: bx = domain handle ax = link handle di = SCO_LINK_OPENED ds:si = local IP address of link cx = address size (should be size of IPAddr) - or - di = SCO_CONNECT_CONFIRMED RETURN: nothing DESTROYED: di (allowed) PSEUDO CODE/STRATEGY: gain access lock link table set state to OPEN get MTU if SCO_LINK_OPENED store link handle store local address else if SCO_CONNECT_CONFIRMED EC (verify link connection handle matches) get local address V LCB_sem enough times to wake everyone up unlock link table release access NOTES: Okay to leave link table locked when calling link driver to get info because these are nonblocking operations. REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/ 7/94 Initial version jwu 7/29/96 interruptable version jwu 4/19/97 queue link open requests ed 6/13/00 DHCP support, GCN notification %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipLinkOpened proc far uses ax, bx, cx, dx, si, ds, es, bp .enter EC < call ECCheckLinkDomainHandle > EC < ERROR_C TCPIP_INVALID_LINK_DOMAIN_HANDLE > ; ; Set state to LS_OPEN. ; call TcpipGainAccess segmov es, ds, dx mov dx, di ; dx = SCO mov bp, bx ; save domain handle call LinkTableGetEntry ; ds:di = LCB ; ^hbx = link table segxchg es, ds ; ds:si = address ; es:di = LCB ; Don't do this now, as we might have to unlock the block ; mov es:[di].LCB_state, LS_OPEN ; ; Get MTU. ; push ax push di pushdw es:[di].LCB_strategy mov ax, SGIT_MTU mov di, DR_SOCKET_GET_INFO call PROCCALLFIXEDORMOVABLE_PASCAL ; ax = value pop di jnc haveMTU mov ax, DEFAULT_LINK_MTU haveMTU: mov es:[di].LCB_mtu, ax pop ax ; ax = link handle ; ; If SCO_LINK_OPENED, store link connection handle and address. ; cmp dx, SCO_LINK_OPENED jne openConfirmed mov es:[di].LCB_connection, ax EC < cmp cx, size IPAddr > EC < ERROR_NE TCPIP_INVALID_IP_ADDRESS > EC < push bx > EC < mov bx, ds > EC < call ECAssertValidFarPointerXIP > EC < pop bx > add di, offset LCB_localAddr rep movsb push ax mov ax, TSNT_OPEN call LinkSendNotification pop ax jmp unlockTable openConfirmed: ; ; Get local IP address of link. ; EC < cmp dx, SCO_CONNECT_CONFIRMED > EC < ERROR_NE TCPIP_INTERNAL_ERROR > EC < cmp ax, es:[di].LCB_connection > EC < ERROR_NE TCPIP_INTERNAL_ERROR > push bx push di pushdw es:[di].LCB_strategy mov_tr cx, ax ; cx = connection handle segmov ds, es, ax mov bx, di add bx, offset LCB_localAddr ; ds:bx = place for addr mov dx, IP_ADDR_SIZE ; dx = size of buffer mov ax, SGIT_LOCAL_ADDR mov di, DR_SOCKET_GET_INFO call PROCCALLFIXEDORMOVABLE_PASCAL jnc gotIP clrdw ds:[bx] ; Error, make sure no old ip still stored gotIP: pop di ; es:di = LCB ; Check if our ip address is 0.0.0.0. If it is, we have to call ; DHCP. cmpdw es:[di].LCB_localAddr, 0 jne skipDhcp mov bx, handle dgroup call MemDerefDS ; mov ds:[dhcpDomain], bp ; mov ax, es:[di].LCB_clientHan ; mov ds:[dhcpClientHan], ax movdw axbx, es:[di].LCB_strategy movdw ds:[dhcpStrategy], axbx pop bx call MemUnlockExcl mov dx, bp call TcpipStartDhcp jmp abortLinkOpened ; ; Wake up all blocked clients. Link table is locked so clients ; can't proceed until we're done here. ; skipDhcp: EC < tst es:[di].LCB_semCount > EC < ERROR_Z TCPIP_INTERNAL_ERROR ; must have a waiter! > mov es:[di].LCB_state, LS_OPEN mov cx, es:[di].LCB_semCount mov bx, es:[di].LCB_sem wakeLoop: call ThreadVSem loop wakeLoop mov ax, TSNT_OPEN call LinkSendNotification mov es:[di].LCB_semCount, cx ; no waiters left pop bx ; ^hbx = link table unlockTable: call MemUnlockExcl abortLinkOpened: call TcpipReleaseAccess .leave ret TcpipLinkOpened endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipLinkClosed %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: TCP/IP driver is being informed that a link has been closed by the peer. CALLED BY: TcpipClientStrategy (SCO_LINK_CLOSED) PASS: ax = link handle bx = domain handle cx = SocketCloseType (ignored by us) dx = SocketDrError (SDE_NO_ERROR if none) (if dx != SDE_NO_ERROR, all conections on the link will be destroyed) di = SCO_LINK_CLOSED or SCO_CONNECT_FAILED RETURN: nothing DESTROYED: di (allowed) PSEUDO CODE/STRATEGY: gain access lock table Set state in LCB to CLOSED. if connect failed, EC (verify link handle) store error in LCB_error if not SDE_INTERRUPTED clr LCB_connection if prior LCB_connectino != zero (have to check because extra notifications may arrive) V LCB_sem to wake all waiters else if link closed V LCB_closeSem enough times to get LCB_closeCount back to zero unlock table If not registered, queue message for driver's thread to unregister and free link driver, deleting its entry from the link table if not the main link. If registered, destroy all connections on the link. release access NOTES: Don't need to V LCB_sem if SCO_LINK_CLOSED because disconnect requests are synchronous, blocking in PPP until complete. REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/ 7/94 Initial version jwu 7/29/96 interruptable version jwu 4/19/97 queue link open requests ed 6/30/00 GCN notification %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipLinkClosed proc far uses ax, bx, cx, ds .enter EC < call ECCheckLinkDomainHandle > EC < ERROR_C TCPIP_INVALID_LINK_DOMAIN_HANDLE > ; ; Mark the link as closed. ; call TcpipGainAccess mov si, di ; si = SCO mov cx, bx ; cx = domain handle call LinkTableGetEntry ; ds:di = LCB ; ^hbx = table's block mov ds:[di].LCB_state, LS_CLOSED BitClr ds:[di].LCB_options, LO_ALWAYS_BUSY cmp si, SCO_CONNECT_FAILED jne linkClosed connectFailed:: ; ; Connect failed, store error unless the error is already ; SDE_INTERRUPTED. ; cmp ds:[di].LCB_error, SDE_INTERRUPTED je afterError mov ds:[di].LCB_error, dx afterError: ; ; If connection is already zero, then this is an extra ; notification and there's no need to wake blocked clients. ; Keep link table locked while waking clients so they can't ; proceed until we're done. ; tst ds:[di].LCB_connection jz unlockTable EC < cmp ax, ds:[di].LCB_connection > EC < ERROR_NE TCPIP_INTERNAL_ERROR > push cx ; save link domain mov cx, ds:[di].LCB_semCount jcxz afterWake mov dx, bx ; ^hdx = link table mov bx, ds:[di].LCB_sem wakeLoop: call ThreadVSem loop wakeLoop mov bx, dx ; ^hbx = link table mov ds:[di].LCB_semCount, cx ; no waiters left afterWake: mov ds:[di].LCB_connection, cx ; no connection pop cx ; cx = link domain clr dx ; nothing to reset jmp unlockTable linkClosed: ; ; Link has closed. If there are clients waiting for link ; to close before opening a new link, wake them up here. ; We have link table locked so they can't proceed until we're ; done here. ; push cx ; save link domain mov cx, ds:[di].LCB_closeCount jcxz afterWake2 ; no waiters push bx mov bx, ds:[di].LCB_closeSem wake2Loop: call ThreadVSem loop wake2Loop mov ds:[di].LCB_closeCount, cx ; no waiters left pop bx ; ^hbx = table's block afterWake2: pop cx ; cx = link domain unlockTable: call MemUnlockExcl call TcpipReleaseAccess ; ; If no registered clients, queue a message for driver's ; thread to unregister and free the link driver, deleting its ; entry from the link table. ; mov bx, handle dgroup call MemDerefDS tst ds:[regStatus] jnz checkError mov bx, ds:[driverThread] mov ax, MSG_TCPIP_DELETE_LINK_ASM mov di, mask MF_FORCE_QUEUE call ObjMessage jmp exit checkError: ; ; Destroy all connections using the link if there is an error. ; Can't do this without a client because there is noone to notify. ; CheckHack <SDE_NO_ERROR eq 0> tst dx je exit mov_tr ax, cx ; ax = link domain call TSocketGetNumSockets ; cx = # of connections jcxz exit call TSocketResetConnectionsOnLink exit: mov ax, TSNT_CLOSED call LinkSendNotification .leave ret TcpipLinkClosed endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipReceivePacket %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C FUNCTION: TcpipReceivePacket C DECLARATION: extern void _far _far _pascal TcpipReceivePacket(optr dataBuffer); REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/18/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SetGeosConvention TCPIPRECEIVEPACKET proc far C_GetOneDWordArg cx, dx, ax, bx call TcpipReceivePacket ret TCPIPRECEIVEPACKET endp SetDefaultConvention COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipReceivePacket %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Receive an incoming packet from the link connection. CALLED BY: TcpipClientStrategy (SCO_RECEIVE_PACKET) TCPIPRECEIVEPACKET PASS: cxdx = optr of packet (HugeLMem chunk) RETURN: nothing DESTROYED: nothing (DO NOT destroy AX even though we are not returning anything!) PSEUDO CODE/STRATEGY: Add the packet to the input queue. If first packet, send msg to driver's thread to start processing input. logBrkPt is used for swat to set a breakpoint for logging the contents of the packet REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/ 7/94 Initial version jwu 10/31/96 use input queue %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipReceivePacket proc far uses ax, bx, cx, di, es, ds .enter if ERROR_CHECK Assert optr cxdx ; verify the packet header push cx mov bx, cx call HugeLMemLock mov es, ax mov di, dx ; *es:di = PH of buffer mov di, es:[di] ; es:di = PH of buffer logBrkPt:: mov bx, es:[di].PH_domain call ECCheckLinkDomainHandle ; carry set if invalid mov bx, cx call HugeLMemUnlock pop cx ERROR_C TCPIP_INVALID_DOMAIN_HANDLE endif ; ERROR_CHECK ; ; Only process if TCP has a thread. ; mov bx, handle dgroup call MemDerefES mov ax, cx ; ^lax:dx = buffer mov bx, es:[driverThread] tst bx je discard ; no thread, can't deliver ; ; Try to add the packet to the input queue. ; movdw bxsi, es:[inputQueue] mov cx, RESIZE_QUEUE call QueueEnqueueLock ; ds:di = new element jc noRoom movdw ds:[di], axdx call QueueEnqueueUnlock ; ; If this is the first packet in the queue, send msg to start ; processing input. ; call QueueNumEnqueues ; cx = number cmp cx, 1 ja exit mov bx, es:[driverThread] Assert thread bx mov ax, MSG_TCPIP_RECEIVE_DATA_ASM mov di, mask MF_FORCE_QUEUE call ObjMessage exit: .leave ret noRoom: EC < inc es:[dropCount] > discard: EC < WARNING TCPIP_DISCARDING_INPUT_BUFFER > mov cx, dx ; ^lax:cx = buffer call HugeLMemFree jmp exit TcpipReceivePacket endp ;--------------------------------------------------------------------------- ; Subroutines ;--------------------------------------------------------------------------- COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipGainAccess/TcpipReleaseAccess %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get/release exclusive access. Allows serialization of some critical operations. CALLED BY: TcpipDisconnectRequest TcpipStopSendData TcpipResetRequest TcpipSendData These are serialized to prevent destruction of a connection while a send call is in progress for it. TcpipCloseMedium LinkOpenConnection Serialized to prevent link table from being altered while it is unlocked during link driver calls. TcpipLinkOpened TcpipLinkClosed Serialized to make sure client has a chance to adjust semCount before these routines check its value. PASS: nothing RETURN: nothing DESTROYED: nothing (flags preserved by TcpipReleaseAccess) REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 9/22/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipGainAccessFar proc far call TcpipGainAccess ret TcpipGainAccessFar endp TcpipGainAccess proc near uses ax, bx, ds .enter mov bx, handle dgroup call MemDerefDS mov bx, ds:[taskSem] call ThreadPSem ; ax = SemaphoreError .leave ret TcpipGainAccess endp TcpipReleaseAccessFar proc far call TcpipReleaseAccess ret TcpipReleaseAccessFar endp TcpipReleaseAccess proc near uses ax, bx, ds .enter pushf mov bx, handle dgroup call MemDerefDS mov bx, ds:[taskSem] call ThreadVSem popf .leave ret TcpipReleaseAccess endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipGetMinDgramHdr %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the minimum datagram header required by the link driver and add it to space needed by TCP to get the total space clients need to reserve in datagram buffers. CALLED BY: TcpipInit PASS: es = dgroup RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: Load main link driver and get its driver info. Then free it. REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 7/ 5/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipGetMinDgramHdr proc near uses ax, bx, si, ds .enter clr ax ; assume no extra space call LinkLoadLinkDriverFar ; bx = driver handle jc done call GeodeInfoDriver ; ds:si = DriverInfoStruct mov al, ds:[si].SDIS_minDgramHdr call LinkUnloadLinkDriverFar done: add es:[minDgramHdr], al .leave ret TcpipGetMinDgramHdr endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipRegisterNewClient %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Check if the TCP/IP driver is already registered, saving domain handle and entry point if this is the first registration. Does not check who the client is. CALLED BY: TcpipRegister PASS: cl = SocketDriverType or TcpipDriverType bx = domain handle es = dgroup dx:bp = SCO entry point RETURN: carry set if already registered ax = SDE_MEDIUM_BUSY else bx = client handle DESTROYED: nothing PSEUDO CODE/STRATEGY: Client handle is the bit mask for the type of client in RegisterStatus. The mask is 1 shifted left by SocketDriverType or TcpipDriverType. REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 8/25/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipRegisterNewClient proc near uses cx .enter ; ; Grab semaphore first. ; push bx mov bx, es:[regSem] call ThreadPSem pop bx ; ; Compute the client handle which is a RegisterStatus bit mask. ; mov ax, 1 shl ax, cl ; ax = client handle test es:[regStatus], ax jz register mov cx, SDE_MEDIUM_BUSY ; cx = error stc jmp done register: ; ; Store registration info and return client handle. ; ornf es:[regStatus], ax xchg bx, cx ; bl = SocketDriverType ; cx = domain handle clr bh ; bx = SocketDriverType mov bl, cs:clientOffsetTable[bx] mov es:[clients][bx].CI_domain, cx movdw es:[clients][bx].CI_entry, dxbp mov_tr cx, ax ; cx = client handle clc done: ; ; Release semaphore. ; mov bx, es:[regSem] call ThreadVSem ; flags preserved mov_tr ax, cx ; ax = error or client handle jc exit ; was error mov_tr bx, ax ; bx = client handle exit: .leave ret TcpipRegisterNewClient endp clientOffsetTable byte \ TCI_data, TCI_link, TCI_rawIp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipCheckLinkIsMain %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Check if link driver adding itself as a domain is the main link driver. If so, fill in the link entry in the link table. CALLED BY: TcpipAddDomain PASS: ax = client handle cl = min header size es:dx = driver entry point bp = driver handle ds:si = domain name (null terminated) RETURN: carry set if not main link else bx = domain handle of link DESTROYED: bx if not returned PSEUDO CODE/STRATEGY: Read domain name of link from INI (alloc block because we don't know size) compare with passed domain name if not equal, return carry set Get link entry EC: die if main driver already loaded fill in info unlock link table REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 4/ 7/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipCheckLinkIsMain proc near uses ax, cx, dx, di, si, ds, es drvrHandle local hptr push bp clientHan local word push ax minHdrSize local word push cx drvrEntry local fptr push es, dx domainName local fptr push ds, si .enter ; ; Read domain name from INI file. ; push bp ; locals mov bx, handle Strings call MemLock mov ds, ax mov_tr cx, ax assume ds:Strings mov dx, ds:[linkDomainKeyString] ; cx:dx = key string mov si, ds:[categoryString] ; ds:si = category assume ds:nothing mov bp, InitFileReadFlags <IFCC_INTACT, 0, 0, 0> call InitFileReadString ; bx = block pop bp ; locals push bx mov bx, handle Strings call MemUnlock ; flags preserved pop bx EC < WARNING_C TCPIP_MISSING_LINK_DOMAIN_INI_SETTING > jc exit ; ; Compare domain name with passed domain name. ; lds si, domainName ; ds:si = drvr domain call MemLock segmov es, ax clr di ; es:di = main domain clr cx ; null terminated call LocalCmpStringsNoCase lahf call MemFree ; destroys flags sahf stc ; assume no match jnz exit ; ; Get main link entry and fill in the info. ; mov bx, MAIN_LINK_DOMAIN_HANDLE call LinkTableGetEntry ; ds:di = LCB ; ^hbx = table EC < tst ds:[di].LCB_drvr > EC < ERROR_NE TCPIP_MAIN_LINK_ALREADY_REGISTERED > mov ax, drvrHandle mov ds:[di].LCB_drvr, ax mov ax, clientHan mov ds:[di].LCB_clientHan, ax mov ax, minHdrSize mov ds:[di].LCB_minHdr, al movdw axcx, drvrEntry movdw ds:[di].LCB_strategy, axcx call MemUnlockExcl mov bx, MAIN_LINK_DOMAIN_HANDLE ; return domain handle clc exit: .leave ret TcpipCheckLinkIsMain endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipCreateInputQueue %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Create the input queue. CALLED BY: TcpipInit PASS: es = dgroup RETURN: carry set if failed DESTROYED: ax, bx, cx NOTES: Alloc separate HugeLMem block for the input queue because its size will change and we don't want to risk causing any protocol related packets to move unexpectedly. Want to keep this change safe... REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 10/31/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipCreateInputQueue proc near uses dx .enter mov bx, handle InputQueue mov ax, size optr mov cl, INIT_INPUT_QUEUE_CAPACITY mov dx, MAX_INPUT_QUEUE_CAPACITY call QueueLMemCreate ; ^lbx:cx = queue jc exit movdw es:[inputQueue], bxcx exit: .leave ret TcpipCreateInputQueue endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipDestroyInputQueue %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Destroy the input queue, freeing any packets still in it. CALLED BY: TcpipExit PASS: ds = dgroup RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 10/31/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipDestroyInputQueue proc near uses bx, cx, dx, si .enter tstdw ds:[inputQueue] jz exit ; no queue was created ; ; Destroy packets in queue. ; movdw bxsi, ds:[inputQueue] mov cx, SEGMENT_CS mov dx, offset TcpipDestroyInputQueueCB call QueueEnum ; ; Destroy queue. ; mov cx, si ; ^lbx:cx = queue call QueueLMemDestroy clr bx movdw ds:[inputQueue], bxbx exit: .leave ret TcpipDestroyInputQueue endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipDestroyInputQueueCB %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Free packet in input queue. CALLED BY: TcpipDestroyInputQueue via QueueEnum PASS: es:si = current queue element RETURN: nothing DESTROYED: ax, cx (allowed) PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 10/31/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipDestroyInputQueueCB proc far EC < WARNING TCPIP_DISCARDING_OUTPUT_BUFFER > movdw axcx, es:[si] call HugeLMemFree ret TcpipDestroyInputQueueCB endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipCreateThreadAndTimer %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Create a thread for the TCP/IP driver if one does not already exist. Also start the TCP/IP timer. Might as well do GCN list registration here, too. CALLED BY: TcpipRegister TcpipAddDomain PASS: nothing RETURN: carry set if error DESTROYED: nothing REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 8/23/94 Initial version jwu 9/13/95 Added GCN code %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipCreateThreadAndTimer proc near uses ax, bx, cx, dx, di, si, bp, ds .enter ; ; Check if the thread already exists. ; mov bx, handle dgroup call MemDerefDS tst_clc ds:[driverThread] jne done ; ; Create the TCP/IP driver's thread. ; call ImInfoInputProcess ; use input process as parent mov si, handle 0 ; we own the thread mov bp, TCPIP_THREAD_STACK_SIZE ifdef PASCAL_CONV mov cx, segment _TcpipProcessClass mov dx, offset _TcpipProcessClass else mov cx, segment TcpipProcessClass mov dx, offset TcpipProcessClass endif mov ax, MSG_PROCESS_CREATE_EVENT_THREAD_WITH_OWNER mov di, mask MF_CALL call ObjMessage ; ax <- handle of new thread EC < WARNING_C TCPIP_UNABLE_TO_CREATE_THREAD > jc done ; ; Increase the thread's base priority. ; mov_tr bx, ax ; bx = thread handle mov ah, mask TMF_BASE_PRIO mov al, PRIORITY_UI call ThreadModify ; ; Create input queue. ; ; ; Start the timer that controls both TCP and IP timeouts. ; EC < Assert thread bx > mov ds:[driverThread], bx mov ds:[clientThread], bx mov al, TIMER_EVENT_CONTINUAL mov cx, TCPIP_TIMEOUT_INTERVAL ; first interval mov di, cx ; same interval always mov dx, MSG_TCPIP_TIMEOUT_OCCURRED_ASM mov bp, handle 0 call TimerStartSetOwner mov ds:[timerHandle], bx ; ; Add ourself to GCN list for access point notification. ; mov cx, ds:[driverThread] clr dx mov bx, MANUFACTURER_ID_GEOWORKS mov ax, GCNSLT_ACCESS_POINT_CHANGE call GCNListAdd clc done: .leave ret TcpipCreateThreadAndTimer endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipDestroyThreadAndTimer %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Stop the TCP/IP timer and destroy the TCP/IP driver's thread. Might as well do GCN unregistration here. CALLED BY: TcpipUnregiseter LINKTABLEDELETEENTRY via TcpipDestroyThreadAndTimerFar PASS: es = dgroup RETURN: nothing DESTROYED: di (preserved by caller) PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 8/23/94 Initial version jwu 9/13/95 Added GCN code %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipDestroyThreadAndTimerFar proc far call TcpipDestroyThreadAndTimer ret TcpipDestroyThreadAndTimerFar endp TcpipDestroyThreadAndTimer proc near uses ax, bx, cx, dx, bp .enter ; ; Remove ourselves from the GCN list for access point netmask ; changes. ; mov cx, es:[driverThread] clr dx mov bx, MANUFACTURER_ID_GEOWORKS mov ax, GCNSLT_ACCESS_POINT_CHANGE call GCNListRemove ; ; Stop the TCP/IP timer. ; clr ax, bx ; ax = 0 for continual timers xchg bx, es:[timerHandle] EC < tst bx > EC < ERROR_Z TCPIP_CANNOT_FIND_TIMER > call TimerStop ; ; Destroy all Tcp connections. MUST do it on TCP's thread. ; mov bx, es:[driverThread] mov ax, MSG_TCPIP_DESTROY_CONNECTIONS_ASM mov di, mask MF_CALL call ObjMessage ; ; Finally, tell the driver's thread to self-destruct. ; clr bx xchg bx, es:[driverThread] EC < Assert thread bx > clr cx, dx, bp ; no ack needed mov ax, MSG_META_DETACH mov di, mask MF_FORCE_QUEUE call ObjMessage .leave ret TcpipDestroyThreadAndTimer endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipSendMsgToDriverThread %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Send a message to the driver's thread. CALLED BY: TcpipDataConnectRequest TcpipDisconnectRequest TcpipResetRequest TcpipAttach TcpipReject TcpipSendData PASS: ax = msg to send di = connection handle RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 8/24/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipSendMsgToDriverThread proc near uses bx, cx, di, ds .enter mov bx, handle dgroup call MemDerefDS mov bx, ds:[driverThread] EC < Assert thread bx > mov cx, di ; cx = connection mov di, mask MF_FORCE_QUEUE call ObjMessage .leave ret TcpipSendMsgToDriverThread endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipQueueSendDataRequest %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Wait for space in output queue and then try to queue the data again. Caller has called TcpipGainAccess. CALLED BY: TcpipSendData PASS: ax = connection handle bx = timeout value cx = amount of data in buffer ^ldx:si = data buffer RETURN: carry set if data not queued, in which case, caller is responsible for freeing buffer ax = SocketDrError (SDE_CONNECTION_TIMEOUT, SDE_INTERRUPTED, SDE_CONNECTION_RESET_BY_PEER, SDE_CONNECTION_RESET) DESTROYED: nothing PSEUDO CODE/STRATEGY: If timeout is zero, free buffer and return carry set. Else { lock socket info block lock output queue and get header store amount of data pending in output queue header allocate semaphore and store handle in queue header unlock output queue unlock socket info block ThreadPTimedSem Check SemaphoreError, if timeout, reset amount of pending data, free sem and return carry else, setup params to SocketNewOutputData and free sem, returning results } REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 1/11/95 Initial version jwu 8/ 1/96 Interruptible version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipQueueSendDataRequest proc near uses bx, cx, dx, di, si, ds connection local word push ax timeout local word push bx dataSize local word push cx dataBuffer local optr push dx, si .enter ; ; Only queue if connection still exists and is open. ; call TSocketLockInfoListFar ; *ds:si = socket list push cx call TSocketFindHandleNoLock ; destroys cx pop cx EC < WARNING_C TCPIP_CONNECTION_DOES_NOT_EXIST > jc noQueue mov di, ax mov di, ds:[di] ; ds:di = TcpSocket cmp ds:[di].TS_state, TSS_OPEN je goAhead noQueue: call TSocketUnlockInfoExcl mov ax, SDE_CONNECTION_RESET stc jmp exit goAhead: ; ; Store amount of pending data. Allocate initially locked ; semaphore and store its handle. ; mov ds:[di].TS_pendingData, cx clr bx call ThreadAllocSem ; bx = semaphore handle mov ds:[di].TS_sendSem, bx call TSocketUnlockInfoExcl call TcpipReleaseAccess mov cx, timeout call ThreadPTimedSem ; ax = SemaphoreError ; ; If we awoke because of timeout or an interrupt, clear ; pendingData and return carry set after freeing the semaphore. ; Else, try to queue the data again if the connection is still open. ; If we fail, free the semaphore and return error. ; call TcpipGainAccess call TSocketLockInfoExcl mov di, connection mov di, ds:[di] mov_tr cx, ax mov ax, SDE_CONNECTION_TIMEOUT ; assume timeout cmp cx, SE_TIMEOUT je dontSend mov ax, ds:[di].TS_error cmp ax, SDE_INTERRUPTED je dontSend mov ax, SDE_CONNECTION_RESET_BY_PEER ; assume closed cmp ds:[di].TS_state, TSS_OPEN je okayToSend ; carry clear dontSend: clr cx xchg cx, ds:[di].TS_pendingData stc okayToSend: call TSocketUnlockInfoExcl jc freeSem push bp mov cx, dataSize mov ax, connection movdw dxbp, dataBuffer call TSocketNewOutputData ; carry set if failed pop bp freeSem: call ThreadFreeSem ; preserves flags exit: .leave ret TcpipQueueSendDataRequest endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipSendDatagramCommon %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Send an IP datagram. CALLED BY: TcpipSendDatagram TcpipSendRawIp PASS: cx = message for driver's thread bx = client handle dx:bp = databuffer ds:si = remote address (non-null terminated string) ax = address size RETURN: carry set if error ax = SocketDrError DESTROYED: cx (saved by caller) PSEUDO CODE/STRATEGY: EC: verify addr size EC: verify client is registered EC: verify header of datagram packet Open link connection REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 10/14/94 Initial version ed 06/15/00 DHCP support %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipSendDatagramCommon proc near uses bx, di, si, ds, es .enter if ERROR_CHECK call ECCheckIPAddrSize push ds push bx mov bx, handle dgroup call MemDerefDS pop bx test ds:[regStatus], bx ERROR_Z TCPIP_NOT_REGISTERED pop ds push es, bx, cx, si mov cx, bx mov bx, dx call HugeLMemLock mov es, ax mov si, es:[bp] cmp cx, mask RS_RAW_IP jne checkOffset cmp es:[si].PH_flags, mask RIF_IP_HEADER je unlock checkOffset: mov ax, es:[si].PH_dataOffset cmp ax, TCPIP_DATAGRAM_PACKET_HDR_SIZE ERROR_B TCPIP_BAD_PACKET_HEADER unlock: call HugeLMemUnlock pop es, bx, cx, si endif ; ERROR_CHECK ; DHCP workaround. When the time comes to send DHCP packets, ; the link will be open, but the link structure will be exclusively ; locked, therefore any attempts at checking if the link is open ; will cause a deadlock. So, we compare the current thread handle ; to the saved DHCP thread handle. If they match, then we know it's ; safe to jump past the attempts to gain a lock. ; - Ed 6/15/00 if 0 mov ax, dgroup mov es, ax mov ax, es:[dhcpThread] cmp ax, ss:[0].TPD_threadHandle je doingDhcp endif ; ; Check PacketFlags to see if link should be forced open. ; push si mov bx, dx call HugeLMemLock mov es, ax mov si, es:[bp] test es:[si].PH_flags, mask PF_OPEN_LINK call HugeLMemUnlock pop si mov bx, cx ; bx = msg jnz openLink call LinkCheckOpen ; ax = link handle jmp checkResult openLink: ; ; Open link connection. ; mov cx, TCP_LINK_OPEN_WAIT_TIME call LinkOpenConnection ; ax = link handle checkResult: jnc sendIt ; ; Free the data buffer since we can't send it. Datagrams are ; supposed to be unreliable... AX already contains error from ; LinkOpenConnection. ; EC < WARNING TCPIP_DISCARDING_OUTPUT_BUFFER > xchg ax, dx ; dx = error mov cx, bp ; ^lax:cx = buffer call HugeLMemFree xchg ax, dx ; ax = error jmp bad sendIt: ; ; Queue a message for driver's thread to send datagram. ; mov_tr cx, ax ; cx = link mov_tr ax, bx ; ax = msg mov bx, handle dgroup call MemDerefDS if 0 sendDhcp: endif mov bx, ds:[driverThread] mov di, mask MF_CALL call ObjMessage ; ax = SocketDrError tst_clc ax je exit bad: stc exit: .leave ret if 0 doingDhcp: mov bx, handle dgroup call MemDerefDS mov ax, ds mov ax, cx mov cx, ds:[dhcpDomain] jmp sendDhcp endif TcpipSendDatagramCommon endp COMMENT @---------------------------------------------------------------- C FUNCTION: TcpipDetachAllowed DESCRIPTION: Determine if the TCP thread is allowed to be destroyed. Returns non-zero if detach is allowed. C DECLARATION: extern word _far _far _pascal TcpipDetachAllowed(void); REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 10/10/94 Initial version -------------------------------------------------------------------------@ SetGeosConvention TCPIPDETACHALLOWED proc far ; ; If no clients, close all links and allow detach. ; If registered client is not the one this thread was created ; for, allow detach, but don't close the links as the new ; client may be using it. Otherwise, reject detach. ; segmov es, ds, ax ; es = dgroup mov bx, es:[regSem] call ThreadPSem mov cx, TRUE tst es:[regStatus] jnz checkThread call CloseAllLinks jmp done checkThread: mov ax, ss:[TPD_threadHandle] cmp ax, es:[clientThread] jne done mov cx, FALSE done: call ThreadVSem ; destroys ax mov_tr ax, cx ret TCPIPDETACHALLOWED endp SetDefaultConvention COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipResolveIPAddr %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Resolve the IP part of the extended address. CALLED BY: TcpipResolveAddr PASS: ds:si = unresolved IP addr cx = unresolved IP addr size dx = access ID or 0 if none RETURN: carry clear if successful dxax = IP address in network order else carry set ax = SocketDrError (SDE_INVALID_ADDR, SDE_DESTINATION_UNREACHABLE, SDE_TEMPORARY_ERROR, SDE_INSUFFICIENT_MEMORY, SDE_UNSUPPORTED_FUNCTION, SDE_INTERRUPTED) DESTROYED: cx, bp PSEUDO CODE/STRATEGY: If first character is a digit, parse the dotted decimal IP address into the binary form. If not parsable, assume address needs to be resolved. Else, load resolver and have it do the query. Unload the driver when done. If error, return the proper errors. REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 8/16/95 Initial version jwu 12/17/97 non-decimal addr can begin w/digit %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipResolveIPAddr proc near uses bx .enter ; ; If address is in dotted decimal notation, convert to binary. ; Address is assumed to be in dotted decimal notation if the ; first character is a digit. (RFC 1034, section 3.5) ; DBCS < shr cx ; cx = addr *length* > clr ax LocalGetChar ax, dssi, NO_ADVANCE call LocalIsDigit jz doQuery call IPParseDecimalAddr ; dxax = address jc invalid checkValid: call TcpipCheckValidIPAddr jnc exit invalid: ; ; Address begins with digit but parser detected it is not ; a valid decimal IP address. Turns out addresses can now ; begin with a digit. If there are any alpha chars, try ; resolving. Else, return invalid IP addr. --jwu 12/17/97 ; push si, cx alphaLoop: clr ax LocalGetChar ax, dssi call LocalIsAlpha jnz endAlphaLoop ; alpha found loop alphaLoop endAlphaLoop: pop si, ax tst cx mov cx, ax ; cx = size, flags preserved jnz doQuery mov ax, SDE_INVALID_ADDR jmp setC doQuery: ; ; Query address from resolver. ; ifdef STATIC_LINK_RESOLVER mov bx, handle resolver else call TcpipLoadResolver ; ax = library handle jc exit ; or SocketDrError push ax mov_tr bx, ax ; bx = library handle endif mov ax, enum ResolverResolveAddress call ProcGetLibraryEntry ; bxax = vfptr call ProcCallFixedOrMovable ; dxbp = addr or ; dx = ResolverError lahf ifndef STATIC_LINK_RESOLVER pop bx ; bx = library handle call GeodeFreeLibrary endif sahf mov ax, bp ; dxax = resolved addr jnc checkValid ; ; Convert ResolverError to SocketDrError. ; mov ax, SDE_DESTINATION_UNREACHABLE cmp dx, size ResolverToSDETable jae setC mov bx, dx ; bx = ResolverError mov al, cs:ResolverToSDETable[bx] setC: stc exit: .leave ret TcpipResolveIPAddr endp ResolverToSDETable byte \ SDE_NO_ERROR, ; RE_NO_ERROR SDE_TEMPORARY_ERROR, ; RE_TIMEOUT SDE_INSUFFICIENT_MEMORY, ; RE_OUT_OF_RESOURCE SDE_TEMPORARY_ERROR, ; RE_TEMPORARY SDE_DESTINATION_UNREACHABLE, ; RE_INFO_NOT_AVAILABLE SDE_DESTINATION_UNREACHABLE, ; RE_HOST_NOT_AVAILABLE SDE_INSUFFICIENT_MEMORY, ; RE_MEMORY_ERROR SDE_UNSUPPORTED_FUNCTION, ; RE_UNSUPPORTED_FUNCTION SDE_DESTINATION_UNREACHABLE, ; RE_INTERNAL_FAILURE SDE_DESTINATION_UNREACHABLE, ; RE_NO_NAME_SERVER SDE_INTERRUPTED, ; RE_INTERRUPTED SDE_LINK_OPEN_FAILED ; RE_OPEN_DOMAIN_MEDIUM ifndef STATIC_LINK_RESOLVER COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipLoadResolver %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Load the resolver. CALLED BY: TcpipResolveIPAddr PASS: nothing RETURN: carry set if error ax = SDE_DRIVER_NOT_FOUND else ax = library handle DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 4/13/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ EC <LocalDefNLString resolverName, <"EC Resolver", 0> > NEC<LocalDefNLString resolverName, <"Resolver", 0> > TcpipLoadResolver proc near uses bx, si, ds .enter call FilePushDir mov ax, SP_SYSTEM call FileSetStandardPath jc error clr ax, bx segmov ds, cs, si mov si, offset resolverName call GeodeUseLibrary ; bx = handle of library error: call FilePopDir mov ax, SDE_DRIVER_NOT_FOUND ; just in case jc exit mov_tr ax, bx ; return handle exit: .leave ret TcpipLoadResolver endp endif ; not STATIC_LINK_RESOLVER COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipGetDefaultIPAddr %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Return the default remote IP address (for use when making a direct connection to another device). CALLED BY: TcpipResolveAddr PASS: dx = access ID RETURN: dxax = IP address (in network order) DESTROYED: ds PSEUDO CODE/STRATEGY: If link is open, get local address to determine if we are client or server. Else, return server address because we'll be dialing up to a server to open the link. EC code verifies that the address on the link is the server address if the client address is used. REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 8/16/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipGetDefaultIPAddr proc near uses bx, di .enter mov bx, MAIN_LINK_DOMAIN_HANDLE call LinkTableGetEntry ; ds:di = LCB ; ^hbx = tabke cmp ds:[di].LCB_state, LS_OPEN jne useServer movdw dxax, DEFAULT_CLIENT_IP_ADDR cmpdw dxax, ds:[di].LCB_localAddr jne done useServer: movdw dxax, DEFAULT_SERVER_IP_ADDR done: EC < cmpdw dxax, DEFAULT_CLIENT_IP_ADDR > EC < jne okay > EC < push bx > EC < cmpdw ds:[di].LCB_localAddr, DEFAULT_SERVER_IP_ADDR, bx > EC < WARNING_NE TCPIP_USING_STRANGE_CLIENT_SERVER_ADDRESS > EC < pop bx > EC <okay: > call MemUnlockExcl .leave ret TcpipGetDefaultIPAddr endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TcpipCheckValidIPAddr %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Quick validation of a resolved IP address. All 0's or all 1's is an invalid address. Host number for each class of IP address is all 1's is an invalid address: Class A: 0--- ---- 1111 1111 1111 1111 1111 1111 Class B: 10-- ---- ---- ---- 1111 1111 1111 1111 Class C: 110- ---- ---- ---- ---- ---- 1111 1111 First 3 bits are 1's is an invalid address: Class D: 1110 ---- ---- ---- ---- ---- ---- ---- Class E: 1111 ---- ---- ---- ---- ---- ---- ---- CALLED BY: TcpipResolveIPAddr ECCheckIPAddr PASS: dxax = IP addr in network order (e.g. if IP address is 1.2.3.4, al = 1, ah = 2, dl = 3, dh = 4) RETURN: carry set if invalid DESTROYED: nothing REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 9/03/97 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TcpipCheckValidIPAddr proc near uses ax, bx, cx, dx, di .enter ; ; Get address in host format instead of network format so ; we can easily do comparisons against dwords. ; xchg dx, ax xchg ah, al xchg dh, dl ; dxax is addr in host format ; ; Check for all 0's or all 1's. ; tstdw dxax jz invalid movdw cxbx, dxax notdw cxbx tstdw cxbx jz invalid ; ; Check for class broadcast, multicast, or experimental address. ; mov di, 12 ; offset into tables checkLoop: movdw cxbx, cs:[maskTable][di] and cx, dx and bx, ax cmpdw cxbx, cs:[resultTable][di] je invalid sub di, 4 ; dword entries in table jns checkLoop clc ; all's well... jmp done invalid: stc done: .leave ret TcpipCheckValidIPAddr endp maskTable dword \ 0x80ffffff, ; Class A broadcast address 0xc000ffff, ; Class B broadcast address 0xc00000ff, ; Class C broadcast address 0xe0000000 ; Class D or E address resultTable dword \ 0x00ffffff, 0x8000ffff, 0xc00000ff, 0xe0000000 if ERROR_CHECK COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECCheckClientHandle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Verify client handle and ensure client is registered. CALLED BY: TcpipUnregister TcpipSendDatagram TcpipMediumConnectRequest PASS: bx = client handle RETURN: only if client handle is valid DESTROYED: nothing REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 10/27/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ECCheckClientHandle proc near cmp bx, mask RS_DATA je checkReg cmp bx, mask RS_LINK je checkReg cmp bx, mask RS_RAW_IP ERROR_NE TCPIP_INVALID_CLIENT_HANDLE checkReg: push es push bx mov bx, handle dgroup call MemDerefES pop bx test es:[regStatus], bx ERROR_Z TCPIP_NOT_REGISTERED pop es ret ECCheckClientHandle endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECCheckIPAddrSize %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Verify IP address size. CALLED BY: TcpipSendDatagramCommon TcpipLinkConnectRequest TcpipDataConnectRequest TcpipMediumConnectRequest PASS: ds:si = remote address (non-null terminated string) ax = address size RETURN: only if size is valid DESTROYED: nothing REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 4/ 6/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ECCheckIPAddrSize proc near push ax sub ax, ds:[si].ESACA_linkSize dec ax ; exclude byte for size dec ax cmp ax, IP_ADDR_SIZE ERROR_NE TCPIP_INVALID_IP_ADDRESS pop ax ret ECCheckIPAddrSize endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECCheckIPAddr %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Verify address is not a broadcast, multicast address or an experimental address. CALLED BY: TcpipDataConnectRequest PASS: ds:si = string containing IP address (non-null terminated) RETURN: only if address is valid DESTROYED: nothing REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 10/ 3/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ECCheckIPAddr proc near uses ax, dx, di .enter ; ; Get address, advancing address past any link params and ; the word indicating the size of the link params. ; mov di, si mov dx, ds:[di] ; dx = size of link part add di, dx inc di inc di movdw dxax, ds:[di] call TcpipCheckValidIPAddr ERROR_C TCPIP_INVALID_IP_ADDRESS .leave ret ECCheckIPAddr endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECCheckCallerThread %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Make sure TCP is not being called with its own thread. CALLED BY: TcpipRegister TcpipUnregister TcpipLinkConnectRequest TcpipDataConnectRequest TcpipDisconnectRequest TcpipSendData TcpipSendDatagram TcpipResetRequest TcpipAttach TcpipReject TcpipCloseMedium TcpipMediumConnectRequest TcpipSendRawIp PASS: nothing RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: Print a warning if TCP is being called by its own thread. REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 11/27/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ECCheckCallerThread proc near uses bx, ds .enter mov bx, handle dgroup call MemDerefDS mov bx, ss:[TPD_threadHandle] cmp bx, ds:[driverThread] WARNING_E TCPIP_CALLED_WITH_OWN_THREAD .leave ret ECCheckCallerThread endp endif ; ERROR_CHECK ; ; See comments on SocketResolveLinkLevelAddress... same pass/return ; Currently only works if the link is already open, as I can't figure out ; how to open it myself... - Ed 6/00 ; TcpipResolveLinkLevelAddress proc far bufSize local word push bx sockAddrPtr local fptr push ds, si .enter mov bx, MAIN_LINK_DOMAIN_HANDLE call LinkTableGetEntry ; ds:di = LCB push bx mov bl, ds:[di].LCB_state mov si, bx pop bx pushdw ds:[di].LCB_strategy call MemUnlockExcl mov di, DR_SOCKET_RESOLVE_LINK_LEVEL_ADDRESS mov bx, si cmp bl, LS_OPEN jne linkClosed movdw dssi, sockAddrPtr mov bx, bufSize call PROCCALLFIXEDORMOVABLE_PASCAL rllaDone: .leave ret linkClosed: add sp, 6 movdw dssi, sockAddrPtr mov ax, SE_LINK_FAILED jmp rllaDone TcpipResolveLinkLevelAddress endp CommonCode ends
24.644109
79
0.598599
1b689477139a2613eabc1c010cd90e351b6864ff
622
asm
Assembly
oeis/083/A083297.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/083/A083297.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/083/A083297.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A083297: a(n) = (4*4^n + (-6)^n)/5. ; Submitted by Jon Maiga ; 1,2,20,8,464,-736,12608,-42880,388352,-1805824,12932096,-69203968,448778240,-2558451712,15887581184,-93178003456,567657955328,-3371587993600,20366966915072,-121652045676544,732111297314816,-4383871690866688,26338414517288960,-157889749615378432,947901447645691904,-5685156886060466176,34119948515617538048,-204683662296686264320,1228246088968193441792,-7368900073056857227264,44215706281350357057536,-265285014316065287569408,1591746979384539144519680,-9550334302354645190705152 mov $1,-6 pow $1,$0 mov $2,4 pow $2,$0 mul $2,4 add $1,$2 mov $0,$1 div $0,5
47.846154
480
0.810289
2798909d71cbeecc29203f14074683f257bb8364
39,022
asm
Assembly
1571/64tass/fastutl.asm
silverdr/assembly
c2851f7033223e089285dce22443b7e219ed4f61
[ "Unlicense" ]
23
2015-03-23T15:16:57.000Z
2022-03-18T12:43:42.000Z
1571/64tass/fastutl.asm
silverdr/assembly
c2851f7033223e089285dce22443b7e219ed4f61
[ "Unlicense" ]
null
null
null
1571/64tass/fastutl.asm
silverdr/assembly
c2851f7033223e089285dce22443b7e219ed4f61
[ "Unlicense" ]
8
2016-04-13T11:19:35.000Z
2021-12-22T07:39:00.000Z
;NOTE: ALL BURST COMMANDS ARE SENT VIA KERNAL I/O CALLS. ; ;BURST CMD ONE - READ ; ; BYTE BIT 7 6 5 4 3 2 1 0 ;============================================================================ ; 00 0 1 0 1 0 1 0 1 ;---------------------------------------------------------------------------- ; 01 0 0 1 1 0 0 0 0 ;---------------------------------------------------------------------------- ; 02 T E B S 0 0 0 N ;---------------------------------------------------------------------------- ; 03 DESTINATION TRACK ;---------------------------------------------------------------------------- ; 04 DESTINATION SECTOR ;---------------------------------------------------------------------------- ; 05 NUMBER OF SECTORS ;---------------------------------------------------------------------------- ; 06 NEXT TRACK (OPTIONAL) ;---------------------------------------------------------------------------- ; ; ; RANGE: ; ; MFM ALL VALUES ARE DETERMINED UPON THE PARTICULAR DISK FORMAT. ; GCR SEE SOFTWARE SPECIFICATIONS. ; ; ;SWITCHES: ; ; T - TRANSFER DATA (1=NO TRANSFER) ; E - IGNORE ERROR (1=IGNORE) ; B - BUFFER TRANSFER ONLY (1=BUFFER TRANSFER ONLY) ; S - SIDE SELECT (MFM ONLY) ; N - DRIVE NUMBER ; ; ; ;PROTOCOL: ; ; BURST HANDSHAKE. ; ; ; ;CONVENTIONS: ; ; CMD ONE MUST BE PRECEEDED WITH CMD 3 OR CMD 6 ONCE AFTER ; A NEW DISK IS INSERTED. ; ; ;OUTPUT: ; ONE BURST STATUS BYTE PRECEEDING BURST DATA WILL BE SENT ; FOR EVERY SECTOR TRANSFERED. ON AN ERROR CONDITION ; DATA WILL NOT BE SENT UNLESS THE E BIT IS SET. ;BURST CMD TWO - WRITE ; ; BYTE BIT 7 6 5 4 3 2 1 0 ;============================================================================ ; 00 0 1 0 1 0 1 0 1 ;---------------------------------------------------------------------------- ; 01 0 0 1 1 0 0 0 0 ;---------------------------------------------------------------------------- ; 02 T E B S 0 0 1 N ;---------------------------------------------------------------------------- ; 03 DESTINATION TRACK ;---------------------------------------------------------------------------- ; 04 DESTINATION SECTOR ;---------------------------------------------------------------------------- ; 05 NUMBER OF SECTORS ;---------------------------------------------------------------------------- ; 06 NEXT TRACK (OPTIONAL) ;---------------------------------------------------------------------------- ; ; ; RANGE: ; ; MFM ALL VALUES ARE DETERMINED UPON THE PARTICULAR DISK FORMAT. ; GCR SEE SOFTWARE SPECIFICATIONS. ; ; ;SWITCHES: ; ; T - TRANSFER DATA (1=NO TRANSFER) ; E - IGNORE ERROR (1=IGNORE) ; B - BUFFER TRANSFER ONLY (1=BUFFER TRANSFER ONLY) ; S - SIDE SELECT (MFM ONLY) ; N - DRIVE NUMBER ; ; ; ;PROTOCOL: ; ; BURST HANDSHAKE. ; ; ; ;CONVENTIONS: ; ; CMD TWO MUST BE PRECEEDED WITH CMD 3 OR CMD 6 ONCE AFTER ; A NEW DISK IS INSERTED. ; ; ;INPUT: ; HOST MUST TRANSFER BURST DATA. ; ; ;OUTPUT: ; ONE BURST STATUS BYTE FOLLOWING EACH WRITE OPERATION. ;BURST CMD THREE - INQUIRE DISK ; ; ; BYTE BIT 7 6 5 4 3 2 1 0 ;============================================================================ ; 00 0 1 0 1 0 1 0 1 ;---------------------------------------------------------------------------- ; 01 0 0 1 1 0 0 0 0 ;---------------------------------------------------------------------------- ; 02 X X X S 0 1 0 N ;---------------------------------------------------------------------------- ; ; ; ;SWITCHES: ; ; S - SIDE SELECT (MFM ONLY) ; N - DRIVE NUMBER ; ; ;OUTPUT: ; ONE BURST STATUS BYTE FOLLOWING THE INQUIRE OPERATION. ;BURST CMD FOUR - FORMAT MFM ; ; ; BYTE BIT 7 6 5 4 3 2 1 0 ;============================================================================ ; 00 0 1 0 1 0 1 0 1 ;---------------------------------------------------------------------------- ; 01 0 0 1 1 0 0 0 0 ;---------------------------------------------------------------------------- ; 02 P I D S 0 1 1 N ;---------------------------------------------------------------------------- ; 03 M=1 T LOGICAL STARTING SECTOR ;---------------------------------------------------------------------------- ; 04 INTERLEAVE (OPTIONAL DEF-0) ;---------------------------------------------------------------------------- ; 05 SECTOR SIZE * (OPTIONAL 01 for 256 Byte Sectors) ;---------------------------------------------------------------------------- ; 06 LAST TRACK NUMBER (OPTIONAL DEF-39) ;---------------------------------------------------------------------------- ; 07 NUMBER OF SECTORS (OPTIONAL DEPENDS ON BYTE 05) ;---------------------------------------------------------------------------- ; 08 LOGICAL STARTING TRACK (OPTIONAL DEF-0) ;---------------------------------------------------------------------------- ; 09 STARTING TRACK OFFSET (OPTIONAL DEF-0) ;---------------------------------------------------------------------------- ; 0A FILL BYTE (OPTIONAL DEF-$E5) ;---------------------------------------------------------------------------- ; 0B-?? SECTOR TABLE (OPTIONAL T-BIT SET) ; ---------------------------------------------------------------------------- ; ;SWITCHES: ; ; P - PARTIAL FORMAT (1=PARTIAL) ; I - INDEX ADDRESS MARK WRITTEN (1=WRITTEN) ; D - DOUBLE SIDED FLAG (1=FORMAT DOUBLE SIDED) ; S - SIDE SELECT ; T - SECTOR TABLE INCLUDED (1=INCLUDED, ALL OTHER PARMS ; MUST BE INCLUDED) ; N - DRIVE NUMBER ; ; ;PROTOCOL: ; ; CONVENTIONAL. ; ; ; ;CONVENTIONS: ; ; AFTER FORMATTING CMD 3 MUST BE SENT ON CONVENTIONAL FORMAT ; OR CMD 6 ON A NON-CONVENTIONAL FORMAT. ; ; ;OUTPUT: ; NONE. STATUS WILL BE UPDATED WITHIN THE DRIVE. ; ; * 00 - 128 byte sectors ; 01 - 256 byte sectors ; 02 - 512 byte sectors ; 03 - 1024 byte sectors ;BURST CMD FOUR - FORMAT GCR (NO DIRECTORY) ; ; ; BYTE BIT 7 6 5 4 3 2 1 0 ;============================================================================ ; 00 0 1 0 1 0 1 0 1 ;---------------------------------------------------------------------------- ; 01 0 0 1 1 0 0 0 0 ;---------------------------------------------------------------------------- ; 02 X X X X 0 1 1 N ;---------------------------------------------------------------------------- ; 03 M=0 ;---------------------------------------------------------------------------- ; 04 ID LOW ;---------------------------------------------------------------------------- ; 05 ID HIGH ;---------------------------------------------------------------------------- ; ; ;SWITCHES: ; ; N - DRIVE NUMBER ; X - DON'T CARE. ; ;PROTOCOL: ; ; CONVENTIONAL. ; ; ;CONVENTIONS: ; ; AFTER FORMATTING CMD 3 MUST BE SENT. ; ; NOTE: THIS COMMAND DOES NOT WRITE THE BAM OR THE ; DIRECTORY ENTRIES ( DOUBLE SIDED FLAG WILL NOT BE ; ON TRACK 18, SECTOR 0). IT IS SUGGESTED THAT THE ; CONVENTIONAL 'NEW' FORMAT COMMAND BE USED. ; ;OUTPUT: ; NONE. STATUS WILL BE UPDATED WITHIN THE DRIVE. ;BURST CMD FIVE - SECTOR INTERLEAVE ; ; ; BYTE BIT 7 6 5 4 3 2 1 0 ;============================================================================ ; 00 0 1 0 1 0 1 0 1 ;---------------------------------------------------------------------------- ; 01 0 0 1 1 0 0 0 0 ;---------------------------------------------------------------------------- ; 02 W X X 0 1 0 0 N ;---------------------------------------------------------------------------- ; 04 INTERLEAVE ;---------------------------------------------------------------------------- ; ; ;SWITCHES: ; ; W - WRITE SWITCH ; N - DRIVE NUMBER ; X - DON'T CARE ; ;PROTOCOL: ; ; CONVENTIONAL, UNLESS THE W-BIT IS SET. ; ; ;CONVENTIONS: ; ; THIS IS A SOFT INTERLEAVE USED FOR MULTI-SECTOR BURST ; READ AND WRITE. ; ;OUTPUT: ; NONE (W=0), INTERLEAVE BURST BYTE (W=1) ;BURST CMD SIX - QUERY DISK FORMAT ; ; ; BYTE BIT 7 6 5 4 3 2 1 0 ;============================================================================ ; 00 0 1 0 1 0 1 0 1 ;---------------------------------------------------------------------------- ; 01 0 0 1 1 0 0 0 0 ;---------------------------------------------------------------------------- ; 02 F X T S 1 0 1 N ;---------------------------------------------------------------------------- ; 03 OFFSET (OPTIONAL F-BIT SET) ;---------------------------------------------------------------------------- ; ; ;SWITCHES: ; ; F - FORCE FLAG (F=1, WILL STEP THE HEAD WITH THE ; T - END SECTOR TABLE (T=1, SEND) ; N - DRIVE NUMBER ; X - DON'T CARE. ; ;PROTOCOL: ; ; CONVENTIONAL. ; ; ;CONVENTIONS: ; ; THIS IS A METHOD OF DETERMINING THE FORMAT OF THE DISK ON ; ANY PARTICULAR TRACK. ; ; ;OUTPUT: ; BURST STATUS BYTE (IF THERE WAS AN ERROR OR IF THE ; FORMAT IS GCR NO BYTES WILL FOLLOW) ; BURST STATUS BYTE (IF THERE WAS AN ERROR IN COMPILING ; MFM FORMAT INFORMATION NO BYTES ; WILL FOLLOW) ; NUMBER OF SECTORS (THE NUMBER OF SECTORS ON A PARTICULAR ; TRACK) ; LOGICAL TRACK (THE LOGICAL TRACK NUMBER FOUND IN THE ; DISK HEADER) ; MINIMUM SECTOR (THE LOGICAL SECTOR WITH THE LOWEST ; VALUE ADDRESS) ; MAXIMUM SECTOR (THE LOGICAL SECTOR WITH THE HIGHEST ; VALUE ADDRESS) ; CP/M INTERLEAVE (THE HARD INTERLEAVE FOUND ON A PARTICULAR ; TRACK) ; ;BURST CMD SEVEN - INQUIRE STATUS ; ; ; BYTE BIT 7 6 5 4 3 2 1 0 ;============================================================================ ; 00 0 1 0 1 0 1 0 1 ;---------------------------------------------------------------------------- ; 01 0 0 1 1 0 0 0 0 ;---------------------------------------------------------------------------- ; 02 W C X 0 1 1 0 N ;---------------------------------------------------------------------------- ; 03 NEW STATUS (W-BIT CLEAR) ;---------------------------------------------------------------------------- ; ;SWITCHES: ; ; W - WRITE SWITCH ; C - CHANGE (C=1 & W=0 - FORCE LOGIN DISK, ; C=1 & W=1 - RETURN WHETHER DISK WAS LOGGED ; IE. $XB ERROR OR OLD STATUS) ; N - DRIVE NUMBER ; X - DON'T CARE ; ;PROTOCOL: ; ; BURST. ; ; ;CONVENTIONS: ; ; THIS IS A METHOD OF READING OR WRITING CURRENT STATUS. ; ; ;OUTPUT: ; NONE (W=0), BURST STATUS BYTE (W=1) ; ; ;BURST CMD EIGHT - BACKUP DISK ; ; BYTE BIT 7 6 5 4 3 2 1 0 ;============================================================================ ; 00 0 1 0 1 0 1 0 1 ;---------------------------------------------------------------------------- ; 01 0 0 1 1 0 0 0 0 ;---------------------------------------------------------------------------- ; 02 ? ? ? ? 1 1 1 ? ;---------------------------------------------------------------------------- ; ;SWITCHES: ; ; ? - GOT ME ; ;BURST CMD NINE - CHGUTL UTILITY ; ; ; BYTE BIT 7 6 5 4 3 2 1 0 ;============================================================================ ; 00 0 1 0 1 0 1 0 1 ;---------------------------------------------------------------------------- ; 01 0 0 1 1 0 0 0 0 ;---------------------------------------------------------------------------- ; 02 X X X 1 1 1 1 0 ;---------------------------------------------------------------------------- ; 03 UTILITY COMMANDS: 'S', 'R', 'T', 'M', 'H', #DEV ;---------------------------------------------------------------------------- ; 04 COMMAND PARAMETER ;---------------------------------------------------------------------------- ;SWITCHES: ; ; X - DON'T CARE. ; ; ; ;UTILITY COMMANDS: ; ; 'S' - DOS SECTOR INTERLEAVE. ; 'R' - DOS RETRIES. ; 'T' - ROM SIGNATURE ANALYSIS. ; 'M' - MODE SELECT. ; 'H' - HEAD SELECT. ; 'V' - WRITE WITH VERIFY. ; #DEV - DEVICE #. ; ; ;NOTE: BYTE 02 IS EQUIVALENT TO A '>' ; ;EXAMPLES: ; "U0>S"+CHR$(SECTOR-INTERLEAVE) ; "U0>R"+CHR$(RETRIES) ; "U0>T" ; "U0>M1"=1571 MODE, "U0>M0"=1541 MODE ; "U0>H0"=SIDE ZERO, "U0>H1"=SIDE ONE (1541 MODE ONLY) ; "U0>V0"=VERIFY ON, "U0>V1"=NO VERIFY (1571 MODE ONLY) ; "U0>"+CHR$(#DEV), WHERE #DEV = 4-30 ;BURST CMD TEN - FASTLOAD UTILITY ; ; ; BYTE BIT 7 6 5 4 3 2 1 0 ;============================================================================ ; 00 0 1 0 1 0 1 0 1 ;---------------------------------------------------------------------------- ; 01 0 0 1 1 0 0 0 0 ;---------------------------------------------------------------------------- ; 02 P X X 1 1 1 1 1 ;---------------------------------------------------------------------------- ; 03 FILE NAME ;---------------------------------------------------------------------------- ; ;SWITCHES: ; ; P - SEQUENTIAL FILE BIT (P=1, DOES NOT HAVE TO BE A PROGRAM ; FILE) ; X - DON'T CARE. ; ;PROTOCOL: ; ; BURST. ; ; ;OUTPUT: ; BURST STATUS BYTE PRECEEDING EACH SECTOR TRANSFERED. ; ;STATUS IS AS FOLLOWS: ; ; 0000000X ............. OK ; * 00000010 ............. FILE NOT FOUND ; ** 00011111 ............. EOI ; ;* VALUES BETWEEN THE RANGE 3-15 SHOULD BE CONSIDERED A FILE READ ERROR. ;** EOI STATUS BYTE, FOLLOWED BY NUMBER OF BYTES TO FOLLOW. ;STATUS BYTE BREAK DOWN ; ; ; BIT 7 6 5 4 3 2 1 0 ;============================================================================ ; MODE DN SECTOR SIZE [ CONTROLLER STATUS ] ;---------------------------------------------------------------------------- ; ; Values Represented are in Binary ; ; MODE - 1=MFM, 0=GCR ; DN - DRIVE NUMBER ; ; SECTOR SIZE - (MFM ONLY) ; 00 .... 128 BYTE SECTORS ; 01 .... 256 BYTE SECTORS ; 10 .... 512 BYTE SECTORS ; 11 .... 1024 BYTE SECTORS ; ; CONTROLLER STATUS (GCR) ; 000X .... OK ; 0010 .... SECTOR NOT FOUND ; 0011 .... NO SYNC ; 0100 .... DATA BLOCK NOT FOUND ; 0101 .... DATA BLOCK CHECKSUM ERROR ; 0110 .... FORMAT ERROR ; 0111 .... VERIFY ERROR ; 1000 .... WRITE PROTECT ERROR ; 1001 .... HEADER BLOCK CHECKSUM ERROR ; 1010 .... DATA EXTENDS INTO NEXT BLOCK ; 1011 .... DISK ID MISMATCH/ DISK CHANGE ; 1100 .... RESERVED ; 1101 .... RESERVED ; 1110 .... SYNTAX ERROR ; 1111 .... NO DRIVE PRESENT ; ; CONTROLLER STATUS (MFM) ; 000X .... OK ; 0010 .... SECTOR NOT FOUND ; 0011 .... NO ADDRESS MARK ; 0100 .... RESERVED ; 0101 .... DATA CRC ERROR ; 0110 .... FORMAT ERROR ; 0111 .... VERIFY ERROR ; 1000 .... WRITE PROTECT ERROR ; 1001 .... HEADER BLOCK CHECKSUM ERROR ; 1010 .... RESERVED ; 1011 .... DISK CHANGE ; 1100 .... RESERVED ; 1101 .... RESERVED ; 1110 .... SYNTAX ERROR ; 1111 .... NO DRIVE PRESENT ; ;EXAMPLE BURST ROUTINES WRITTEN ON C 128 ; *=$1800 ; ; ROUTINE TO READ N-BLOCKS OF DATA ; COMMAND CHANNEL MUST BE OPEN ON DRIVE ; OPEN 15,8,15 ; BUFFER AND CMD_BUF, AND CMD_LENGTH MUST BE SETUP ; PRIOR TO CALLING THIS COMMAND. ; ;serial = $0a1c ; fast serial flag ;d2pra = $dd00 ;clkout = $10 ;d1icr = $dc0d ;d1sdr = $dc0c ;stat = $fa ;buffer = $fb ; $fb & $fc ; ; lda #15 ; logical file number ; ldx #8 ; device number ; ldy #15 ; secondary address ; jsr setlfs ; setup logical file ; ; lda #0 ; noname ; jsr setnam ; setup file name ; ; jsr open ; open logical channel ; ; after the command channel is open subsequent calls should be from 'read' ; ;read lda #$00 ; sta stat ; clear status ; lda serial ; and #%10111111 ; clear bit 6 fast serial flag ; sta serial ; ldx #15 ; jsr chkout ; open channel for output ; ldx #0 ; ldy cmd_length ; length of the command ;1$ lda cmd_buf,x ; get command ; jsr bsout ; send the command ; inx ; dey ; bne 1$ ; ; jsr clrchn ; send eoi ; bit serial ; check speed of drive ; bvc error ; slow serial drive ; ; sei ; bit d1icr ; clear interrupt control reg ; ldx cmd_buf+5 ; get # of sectors ; lda d2pra ; read serial port ; eor #clkout ; change state of clock ; sta d2pra ; store back ; ;read_itlda #8 ;1$ bit d1icr ; wait for byte ; beq 1$ ; ; lda d2pra ; read serial port ; eor #clkout ; change state of clock ; sta d2pra ; store back ; ; Code to check status byte. ; ; 1) This code will check for mode ; whether GCR or MFM. ; 2) Verify sector size. ; 3) Check for error, if ok then continue. ; On error, check error switch if set continue ; otherwise abort. ; 4) Verify switches ; ; lda d1sdr ; get data from serial data reg ; sta stat ; save status ; and #15 ; cmp #2 ; just check for (3) ; bcs error ; ; ldy #0 ; even page ;top_rd lda #8 ;1$ bit d1icr ; wait for byte ; beq 1$ ; ; lda d2pra ; toggle clock ; eor #clkout ; sta d2pra ; ; lda d1sdr ; get data ; sta (buffer),y ; save data ; iny ; bne top_rd ; continue for buffer size ; ; dex ; beq done_read ; done ? ; ; inc buffer+1 ; next buffer ; jmp read_it ; ;done_read ; clc ; .byte $24 ;error sec ; rts ; return to sender ; ;cmd_buf .text 'U0',0,0,0,0,0 ; ; *=$1800 ; ; ROUTINE TO WRITE N-BLOCKS OF DATA ; COMMAND CHANNEL MUST BE OPEN ON DRIVE ; OPEN 15,8,15 ; BUFFER AND CMD_BUF, AND CMD_LENGTH MUST BE SETUP ; PRIOR TO CALLING THIS COMMAND. ; ;serial = $0a1c ; fast serial flag ;d2pra = $dd00 ;clkout = $10 ;old_clk = $fd ;clkin = $40 ;d1icr = $dc0d ;d1sdr = $dc0c ;stat = $fa ;buffer = $fb ; $fb & $fc ;mmureg = $d505 ;d1timh = $dc05 ; timer a high ;d1timl = $dc04 ; timer a low ;d1cra = $dc0e ; control reg a ; ; lda #15 ; logical file number ; ldx #8 ; device number ; ldy #15 ; secondary address ; jsr setlfs ; setup logical file ; jsr setnam ; setup file name ; ; jsr open ; open logical channel ; ; ; after the command channel is open subsequent calls should be from 'write' ; ;write lda #$00 ; sta stat ; lda serial ; and #%10111111 ; clear bit 6 fast serial flag ; sta serial ; ldx #15 ; jsr chkout ; open channel for output ; ; ldx #0 ; ldy cmd_length ; length of the command ;1$ lda cmd_buf,x ; get command ; jsr bsout ; send the command ; inx ; dey ; bne 1$ ; ; jsr clrchn ; send eoi ; ; bit serial ; check speed of drive ; bvc error ; ; sei ; lda #clkin ; sta old_clk ; clock starts high ; ; ldy #0 ; even page ; ldx cmd_buf+5 ; get # of sectors ;writ_itjsr spout ; serial port out ;1$ lda d2pra ; check clock ; cmp d2pra ; debounce ; bne 1$ ; ; eor old_clk ; and #clkin ; beq 1$ ; ; lda old_clk ; change status of old clock ; eor #clkin ; sta old_clk ; ; lda (buffer),y ; send data ; sta d1sdr ; ;********* OPTIONAL ********** ; ; lda #8 ; put code here or before spin ;2$ bit d1icr ; wait for transmission time ; beq 2$ ; ;***************************** ; ; iny ; bne 1$ ; continue for buffer size ; ; talker turn around ; ; WAIT CODE HERE (OPTIONAL) ; ; jsr spin ; serial port input ; bit d1icr ; clear pending ; jsr clklo ; set clk low, tell him we are ready ; ; lda #8 ;3$ bit d1icr ; wait for status byte ; beq 3$ ; ; lda d1sdr ; get data from serial data reg ; sta stat ; save status ; jsr clkhi ; set clock high ; ; Code to check status byte. ; ; 1) This code will check for mode ; whether GCR or MFM. ; 2) Verify sector size. ; 3) Check for error, if ok then continue. ; On error, check error switch if set continue ; otherwise abort. ; 4) Verify switches ; ; lda stat ; retrieve status ; and #15 ; cmp #2 ; just chk for error only (3) ; bcs error ; finish ; ; dex ; beq done_wr ; done ? ; ; inc buffer+1 ; next buffer ; jmp wrt_it ; ;done_wr ; cli ; .byte $24 ;error sec ; rts ; ;cmd_buf .byte 'U0',2,0,0,0,0 ; ; subroutines ; ; NOTE: spout and spin are C128 kernal vectors (refer to C128 users manual) ; ; ;spout lda mmureg ; change serial direction to output ; ora #$08 ; sta mmureg ; lda #$7f ; sta d1icr ; no irq's ; lda #$00 ; sta d1timh ; lda #$03 ; sta d1timl ; low 6 us bit (fastest) ; lda d1cra ; and #$80 ; keep TOD ; ora #$55 ; sta d1cra ; setup CRA for output ; bit d1icr ; clr pending ; rts ; ;spin lda d1cra ; and #$80 ; save TOD ; ora #$08 ; change fast serial for input ; sta d1cra ; input for 6526 ; lda mmureg ; and #$f7 ; sta mmureg ; mmu serial direction in ; rts ; ;clklo lda d2pra ; set clock low ; ora #clkout ; sta d2pra ; rts ; ;clkhi lda d2pra ; set clock high ; and #$ff-clkout ; sta d2pra ; rts ; ; ****** END EXAMPLES ****** ; ; (1) FAST READ fstrd sta cmd ; save command for dos sta ctl_cmd ; save command for stbctt lda ifr1 ; disk change lsr a bcc frd_00 ; br, ok ldx #%00001011 ; no channel .byte skip2 ndkrd ldx #%01001111 ; no drive fail jsr upinst ; update dkmode finbad jsr statqy ; wait for state handshake final cpx #2 bcs exbad rts exbad txa ; retrieve status and #15 ; bits 0-3 only ldx #0 ; jobnum jmp error ; controller error entry frd_00 jsr spout bit dkmode ; gcr or mfm ? bpl rdgcr ; MFM READ lda #9 ; read cmd jmp prcmd rdgcr jsr autoi ; check for auto init frd_01 cli ; let controller run lda switch ; check for B and #%00100000 bne bfonly lda cmdbuf+3 ; get track sta hdrs lda cmdbuf+4 ; get sector sta hdrs+1 ldx #0 ; job #0 lda ctl_cmd ; read ($80) or fread ($88) sta jobs,x jsr stbctt ; hit controller hard sei ; disable irqs jsr upinst ; update controller status bit switch ; check E bvs igerr cpx #2 ; error bcs fail igerr jsr hskrd ; handshake on state of clkin lda switch ; check B bmi notran bfonly ldy #0 ; even page frd_02 lda $0300,y ; get data sta ctl_dat ; setup data jsr hskrd ; handshake on state iny bne frd_02 notran dec cmdbuf+5 ; any more sectors ? beq exrd jsr sektr ; next sector jmp frd_01 ; more to do exrd cli jmp chksee ; next track ? ; (2) FAST WRITE fstwrt sta cmd ; save command for dos lda ifr1 ; disk change lsr a bcc fwrt_0 ; br, ok ldx #%00001011 ; no channel .byte skip2 ndkwrt ldx #%01001111 ; no drv 1 stx ctl_dat ; save status lda switch ; set internal switch ora #%00001000 sta switch fwrt_0 bit dkmode ; gcr or mfm ? bpl wrtgcr ; MFM WRITE lda #10 jmp prcmd wrtgcr jsr autoi ; chk for autoi lda switch ; transmision required bmi notrx fwrt_1 sei ; no irqs ldy #0 ; even page fwrt_2 lda pb ; debounce eor #clkout ; toggle state of clock bit icr ; clear pending sta pb fwrt_4 lda pb bpl fwrt_3 ; br, attn not low jsr tstatn ; chk for atn fwrt_3 lda icr ; wait for byte and #8 beq fwrt_4 ; chk for attn low only lda sdr ; get data sta $0300,y ; put away data iny bne fwrt_2 ; more ? jsr clkhi ; release clock notrx cli ; let controller run lda switch ; check for buffer transfer only and #%00100000 bne nowrt lda switch ; check internal and #%00001000 beq notrx0 ; br, ok... ldx ctl_dat ; get error jmp fail ; abort notrx0 lda cmdbuf+3 ; get track sta hdrs lda cmdbuf+4 ; get sector sta hdrs+1 ldx #0 ; job #0 lda #write ; get write job sta jobs,x jsr stbctt ; wack controller in the head sei ; no irqs ok ! jsr spout ; go output jsr upinst ; update status jsr hskrd ; send it jsr burst ; wait for reverse jsr spinp cli ; irqs ok now bit switch ; check error abort switch bvs nowrt cpx #2 ; error on job ? bcs fwrt_5 ; abort ? nowrt dec cmdbuf+5 ; more sectors ? beq fwrt_6 jsr sektr ; increment sector jmp fwrt_1 fwrt_5 jmp exbad fwrt_6 cli ; done jmp chksee ; next track ? ; (3) FAST SEEK fstsek .proc lda cmdbuf+2 ; check drive number and #1 bne m3 ; drive 1 - error lda #1 sta ifr1 ; new disk lda #5 ; read address cmd jsr prcmd ; give it to controller ldx mfmcmd ; get status cpx #2 ; ok ? bcc m2 ldx #0 stx dkmode ; force gcr,drv0,ok lda #seek ; seek ;<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> jsr ptch0c ; *** rom ds 12/08/86 ***, set track ; sta cmd ; give command to dos ;<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> sta jobs,x ; give job to controller jsr stbctt ; bang the controller .byte skip2 ; return status m3 ldx #%01001111 ; no drv 1 m2 jmp fail ; update status .pend ; (4) BURST FORMAT MFM/GCR fstfmt .proc lda cmdbuf+2 ; check drive number and #1 bne m1 lda cmdbuf+3 ; format gcr or mfm ? bpl m2 ; FORMAT IN MFM lda #8 ; format disk in mfm jmp prcmd m2 lda #0 sta dkmode ; force GCR,DRV0 sta nodrv ; drive ok lda cmdbuf+4 sta dskid ; low id lda cmdbuf+5 sta dskid+1 ; high id jsr clrchn ; close all channels lda #1 sta track ; track one lda #$ff sta jobrtn ; set error recovery jsr ptch55 ; *** rom ds 06/18/85 ***, format tax ; save error .byte skip2 m1 ldx #%01001111 jsr upinst ; update status jmp final ; finish up ... .pend ; (5) SOFT INTERLEAVE cpmint sei bit switch ; read ? bpl + ; br, write jsr spout ; serial port output lda cpmit ; get current interleave sta ctl_dat ; send it jmp hskrd + ldx cmdsiz cpx #4 bcs + ldx #%00001110 ; syntax jsr upinst ; update dkmode lda #badcmd jmp cmderr + lda cmdbuf+3 sta cpmit ; save rts ; (6) QUERY DISK FORMAT querdk .proc jsr fstsek ; check disk format bit dkmode ; mfm or gcr ? bpl m2 lda #13 jsr prcmd ; generate sector table ldx mfmcmd ; status ok ? cpx #2 bcs + jsr maxmin ; determine low/high sector jsr fn_int ; determine interleave txa ; hard interleave pha ; save it + sei ; no irq's jsr spout ; serial port output lda dkmode ; get status and send it sta ctl_dat jsr hskrd ; transmit status ldx mfmcmd ; was status ok ? cpx #2 bcs m3 lda cpmsek ; get number of sectors sta ctl_dat jsr hskrd ; send it lda cmd_trk ; get logical track number sta ctl_dat jsr hskrd ; send track lda minsek sta ctl_dat ; send min. jsr hskrd ; wait for handshake lda maxsek ; send max. sta ctl_dat jsr hskrd ; wait for handshake pla ; get interleave sta ctl_dat ; send interleave ;<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> jmp ptch63 ; *** rom ds 01/23/86 ***, add sector table ; jsr hskrd ; wait for handshake ;<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> m2 rts m3 pla ; restore stack jmp exbad .pend ; (7) QUERY/INIT STATUS inqst bit switch ; read/write op ? bpl wrstat bit switch ; wp latch ? bvc statqy lda ifr1 lsr a bcc statqy ; ok, give old status lda dkmode and #$f0 ; clr old ora #$0b ; disk change sta dkmode ; updated status statqy sei ; disable irqs jsr spout ; serial port out lda dkmode ; get status sta ctl_dat jsr hskrd ; 6526 will send it lda #0 sta erword exchnl jsr spinp ; serial port input exchn2 cli rts wrstat lda cmdbuf+3 ; new value sta dkmode bit switch ; wp latch ? bvc + lda #1 sta ifr1 ; new disk + rts ; (8) BACKUP DISK duplc1 ldx #%00001110 jsr upinst ; update dkmode lda #badcmd jmp cmderr ; SUBROUTINES chksee .proc lda cmdsiz ; chk for next track cmp #7 bcc m3 lda hdrs ; where are we ? tay ; save sbc #1 ; one less asl a sta cur_trk cpy #36 php ; save status ldy cmdbuf+6 ; destination sty drvtrk dey sty cmd_trk ; initial detent cpy #35 ror a ; rotate carry into neg plp and #$80 ; set/clr neg bcc m1 ; br, we are on side zero bmi m2 ; br, we are on side one & want to goto side one clc lda cmd_trk ; setup for pete seke adc #35 ; select side sta cmd_trk bmi m2 ; bra more or less m1 bpl m2 ; br, we are on side zero & want to goto side zero sec lda cmd_trk sbc #35 ; select side sta cmd_trk m2 jmp seke ; do it m3 rts .pend ;****************************************************** upinst stx ctl_dat lda dkmode ; update main status w/ controller status and #%11110000 ; clear old controller status ora ctl_dat ; or in controller status sta dkmode ; updated sta ctl_dat rts ;****************************************************** hsktst jsr tstatn ; test for atn hskrd - lda pb ; debounce cmp pb bne - and #$ff ; set/clr neg flag bmi hsktst ; br, attn low eor fastsr ; wait for state chg and #4 beq - hsksnd lda ctl_dat ; retrieve data ;<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> jmp ptch68 ; *** rom ds 05/16/86 *** ; sta sdr ; send it ;<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> lda fastsr eor #4 ; change state of clk sta fastsr lda #8 - bit icr ; wait transmission time beq - rts ;****************************************************** sektr lda cmdbuf+3 ; get track cmp #36 ; side one ? bcc + sbc #35 ; get offset + tax lda num_sec-1,x tax dex stx ctl_dat ; save clc lda cmdbuf+4 ; get sector adc cpmit ; add interleave cmp ctl_dat ; less than maxsec ? bcc gtsec sbc ctl_dat ; rap around beq oksec ; special case on max sec sbc #1 ; less one .byte skip2 oksec lda ctl_dat gtsec sta cmdbuf+4 ; new sector lda #fread ; exread job sta ctl_cmd rts ;****************************************************** stbctr ldx jobnum php cli ; let controller run free jsr stbctl ; strobe controller ( hit him hard ) cmp #2 ; was there an error ? bcc + ; br, nope jsr stbret ; let DOS retry lda jobs,x ; get error + tax ; return status in .x plp ; restore status rts ;****************************************************** stbctt ldx #0 ; buffer zero php sei ; no irq's during i/o access lda ledprt ora #8 sta ledprt ; led on cli ; let controller run free jsr stbctl ; strobe controller ( hit him hard ) cmp #2 ; was there an error ? bcc + ; br, nope jsr stbret ; let DOS retry + sei lda ledprt and #$ff-8 sta ledprt ; led off lda jobs,x ; get error return tax ; return status in .x plp ; restore original status rts ;****************************************************** stbret lda #$ff ; micro-step if you can sta jobrtn ; set error recovery on stx jobnum ; set job # lda cmdbuf+2 ; get command sta ctl_cmd ; reset command sta cmd ; set for dos sta lstjob,x ; set last job sta jobs,x ; -04 fix 02/24/86 ds, give it to the controller jsr stbctl ; wait for it jmp watjob ; let dos clean it up ;****************************************************** burtst jsr tstatn ; test for atn burst - lda pb ; debounce cmp pb bne - ; same ? and #$ff ; set/clr neg flag bmi burtst ; br, attn low eor fastsr ; wait for state chg and #4 beq - lda fastsr eor #4 sta fastsr ; state change rts ;******************************************************
28.969562
78
0.383297
a8ae88670ebb8bd2aeb266f1a6956eb32fd9257a
915
asm
Assembly
CS 200 - Project 7.asm
tisaconundrum2/CS200_Assembly
0598b9a7c50b9204e941277498660f2dee1991c5
[ "MIT" ]
null
null
null
CS 200 - Project 7.asm
tisaconundrum2/CS200_Assembly
0598b9a7c50b9204e941277498660f2dee1991c5
[ "MIT" ]
null
null
null
CS 200 - Project 7.asm
tisaconundrum2/CS200_Assembly
0598b9a7c50b9204e941277498660f2dee1991c5
[ "MIT" ]
null
null
null
# TITLE Iodemo (IOdemo.s) # This program demonstrates some system I/O. .data # variables IntPrompt: .asciiz "Enter a integer: " OutStr: .asciiz "\nYour input was " NewLine: .asciiz "\n" .text .globl main main: # start of the main procedure # Get and print an integer la $a0, IntPrompt # point to IntPrompt li $v0, 4 # print_string syscall li $v0, 5 # read_integer move $a0, $v0 # move input before it gets changed syscall la $a0, OutStr # point to OutStr li $v0, 4 # print_string syscall li $v0, 1 # print_integer syscall la $a0, NewLine # point to NewLine li $v0, 4 # print_string syscall li $v0, 10 # Exit the prograrm syscall
26.911765
78
0.497268
2a20f2de140b89d976b3fbd2243b36835e627511
186
asm
Assembly
t0903.asm
zhangyuesai/8086-asm-learning-code
a934fb3a98a53a6167b647535b3251680294a786
[ "MIT" ]
1
2018-07-23T10:30:22.000Z
2018-07-23T10:30:22.000Z
t0903.asm
zhangyuesai/8086-asm-learning-code
a934fb3a98a53a6167b647535b3251680294a786
[ "MIT" ]
null
null
null
t0903.asm
zhangyuesai/8086-asm-learning-code
a934fb3a98a53a6167b647535b3251680294a786
[ "MIT" ]
null
null
null
assume cs:code code segment start: mov ax,2000h mov ds,ax mov bx,0 s: mov cl,[bx] mov ch,0 inc cx inc bx loop s ok: dec bx mov dx,bx mov ax,4c00h int 21h code ends end start
9.789474
14
0.677419
0988d0b72ee80254c00d73409d173e2790eab829
785
asm
Assembly
data/pokemon/base_stats/cloyster.asm
AtmaBuster/pokeplat-gen2
fa83b2e75575949b8f72cb2c48f7a1042e97f70f
[ "blessing" ]
6
2021-06-19T06:41:19.000Z
2022-02-15T17:12:33.000Z
data/pokemon/base_stats/cloyster.asm
AtmaBuster/pokeplat-gen2-old
01e42c55db5408d72d89133dc84a46c699d849ad
[ "blessing" ]
null
null
null
data/pokemon/base_stats/cloyster.asm
AtmaBuster/pokeplat-gen2-old
01e42c55db5408d72d89133dc84a46c699d849ad
[ "blessing" ]
2
2021-08-11T19:47:07.000Z
2022-01-01T07:07:56.000Z
db 0 ; species ID placeholder db 50, 95, 180, 70, 85, 45 ; hp atk def spd sat sdf db WATER, ICE ; type db 60 ; catch rate db 203 ; base exp db PEARL, BIG_PEARL ; items db GENDER_F50 ; gender ratio db 20 ; step cycles to hatch INCBIN "gfx/pokemon/cloyster/front.dimensions" db GROWTH_SLOW ; growth rate dn EGG_WATER_3, EGG_WATER_3 ; egg groups db 70 ; happiness ; tm/hm learnset tmhm WATER_PULSE, TOXIC, HAIL, HIDDEN_POWER, ICE_BEAM, BLIZZARD, HYPER_BEAM, PROTECT, RAIN_DANCE, FRUSTRATION, RETURN, DOUBLE_TEAM, TORMENT, FACADE, SECRET_POWER, REST, ATTRACT, BRINE, ENDURE, EXPLOSION, PAYBACK, GIGA_IMPACT, AVALANCHE, CAPTIVATE, SLEEP_TALK, NATURAL_GIFT, POISON_JAB, SWAGGER, SUBSTITUTE, SURF, DIVE, ICY_WIND, IRON_DEFENSE, SIGNAL_BEAM, SNORE, SWIFT ; end
39.25
370
0.73758
0d268203f6d84861dd1b9b56eab64cec2b5c5e05
142
asm
Assembly
other.7z/SFC.7z/SFC/ソースデータ/MarioKart/Coin.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
other.7z/SFC.7z/SFC/ソースデータ/MarioKart/Coin.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
other.7z/SFC.7z/SFC/ソースデータ/MarioKart/Coin.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
Name: Coin.asm Type: file Size: 13814 Last-Modified: '1992-07-01T15:00:00Z' SHA-1: 2362DD819828AF6AB04CE1656714CE5B29FB5F68 Description: null
20.285714
47
0.809859
63ac8d64638823356002aac66e8f414ab7bc056c
1,095
asm
Assembly
src/geekos/util.asm
serDrem/geekOSenhance
f37d73ef12cce77d0d1d68715af1b148bdf9314f
[ "BSD-4-Clause-UC", "MIT" ]
33
2018-03-26T02:35:17.000Z
2021-11-20T18:28:53.000Z
src/geekos/util.asm
EEDK/actableGeekOs
86ae9741a6bb0261406e6b37a0cfa1e8c1596481
[ "BSD-4-Clause-UC" ]
6
2018-07-21T20:32:39.000Z
2018-07-22T04:02:04.000Z
src/geekos/util.asm
EEDK/actableGeekOs
86ae9741a6bb0261406e6b37a0cfa1e8c1596481
[ "BSD-4-Clause-UC" ]
9
2018-03-07T02:16:05.000Z
2021-06-01T14:15:11.000Z
; This code is adapted from Kernel Toolkit 0.2 ; and Linux version 2.2.x, so the following copyrights apply: ; Copyright (C) 1991, 1992 Linus Torvalds ; modified by Drew Eckhardt ; modified by Bruce Evans (bde) ; adapted for Kernel Toolkit by Luigi Sgro %ifndef UTIL_ASM %define UTIL_ASM ; The following were copied from ktk-0.2 bootsect.asm, and were presumably ; from the Linux bootsect code. I changed them a little so they ; don't clobber the caller's registers. ; Print the word contained in the dx register to the screen. PrintHex: pusha mov cx, 4 ; 4 hex digits .PrintDigit: rol dx, 4 ; rotate so that lowest 4 bits are used mov ax, 0E0Fh ; ah = request, al = mask for nybble and al, dl add al, 90h ; convert al to ascii hex (four instructions) daa ; I've spent 1 hour to understand how it works.. adc al, 40h daa int 10h loop .PrintDigit popa ret ; Print a newline. PrintNL: ; print CR and NL push ax mov ax, 0E0Dh ; CR int 10h mov al, 0Ah ; LF int 10h pop ax ret %endif
24.886364
74
0.663014
450f590b15a87db4ff38ff76522a2359b84c830c
728
asm
Assembly
oeis/271/A271663.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/271/A271663.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/271/A271663.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A271663: Convolution of nonzero squares (A000290) with nonzero pentagonal numbers (A000326). ; 1,9,41,131,336,742,1470,2682,4587,7447,11583,17381,25298,35868,49708,67524,90117,118389,153349,196119,247940,310178,384330,472030,575055,695331,834939,996121,1181286,1393016,1634072,1907400,2216137,2563617,2953377,3389163,3874936,4414878,5013398,5675138,6404979,7208047,8089719,9055629,10111674,11264020,12519108,13883660,15364685,16969485,18705661,20581119,22604076,24783066,27126946,29644902,32346455,35241467,38340147,41653057,45191118,48965616,52988208,57270928,61826193,66666809,71805977 lpb $0 mov $2,$0 sub $0,1 seq $2,132117 ; Binomial transform of [1, 7, 17, 17, 6, 0, 0, 0,...]. add $1,$2 lpe add $1,1 mov $0,$1
60.666667
494
0.787088
9295b90afaf251592b1ffda9085a81f931fd6c11
20
asm
Assembly
externals/skia/third_party/externals/yasm/source/patched-yasm/modules/parsers/gas/tests/gas-segprefix.asm
terrajobst/linux-packaging-skiasharp
47dbb2ff9ae01305b190f409ccea00b3b4f0bc79
[ "MIT" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
externals/skia/third_party/externals/yasm/source/patched-yasm/modules/parsers/gas/tests/gas-segprefix.asm
terrajobst/linux-packaging-skiasharp
47dbb2ff9ae01305b190f409ccea00b3b4f0bc79
[ "MIT" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
externals/skia/third_party/externals/yasm/source/patched-yasm/modules/parsers/gas/tests/gas-segprefix.asm
terrajobst/linux-packaging-skiasharp
47dbb2ff9ae01305b190f409ccea00b3b4f0bc79
[ "MIT" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
.text es pushl %ebp
6.666667
13
0.7
860dc37b88591afbc184a9f3082665521907e47a
355
asm
Assembly
programs/oeis/100/A100672.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/100/A100672.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/100/A100672.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A100672: Second least-significant bit in the binary expansion of the n-th prime. ; 1,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,1,0,1,1,0,1,1,0,0,0,1,1,0,0,1,1,0,1,0,1,0,1,1,0,1,0,1,0,0,1,1,1,1,0,0,1,0,1,0,1,0,1,0,0,1,0,1,1,0,0,1,0,1,0,0,1,1,0,1,1,0,0,0,0,1,0,1,0,1,1,0,0,0,1,1,1,1,1,1,1,0,0,1,0,1,0,1,0,1 cal $0,40 ; The prime numbers. div $0,2 mod $0,2 mov $1,$0
44.375
211
0.580282
341b28e9abea9d5ee34fb456c93a4ed12f46be65
527
asm
Assembly
non_regression/other_x64_linux_13.o.asm
LRGH/plasmasm
4cd50546c3dc895763d72dd60b7c46179c1916bc
[ "Apache-2.0" ]
1
2021-02-28T21:31:18.000Z
2021-02-28T21:31:18.000Z
non_regression/other_x64_linux_13.o.asm
LRGH/plasmasm
4cd50546c3dc895763d72dd60b7c46179c1916bc
[ "Apache-2.0" ]
null
null
null
non_regression/other_x64_linux_13.o.asm
LRGH/plasmasm
4cd50546c3dc895763d72dd60b7c46179c1916bc
[ "Apache-2.0" ]
null
null
null
.file "b0.c" .section .text.startup,"ax",@progbits .globl main .type main, @function main: rep; ret .size main, .-main # ---------------------- .text .globl I .type I, @function I: jmp .LTHUNK7 .size I, .-I # ---------------------- .L00000002: .p2align 4 # ---------------------- .globl H .type H, @function H: jmp .LTHUNK8 .size H, .-H # ---------------------- .set .LTHUNK7,I .set .LTHUNK8,H .ident "GCC: (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4" .section .note.GNU-stack,"",@progbits
18.172414
50
0.485769
3a0f12421da30f5d31d8fc1d345343c28e9f6d46
678
asm
Assembly
Embedded LABs/Embedded lab 1/6a1.asm
amritphuyal/LATEX
7346dc337b8d7aab2dbe81c29611ca2b069e1299
[ "MIT" ]
1
2020-10-01T08:20:34.000Z
2020-10-01T08:20:34.000Z
Embedded LABs/Embedded lab 1/6a1.asm
amritphuyal/LATEX
7346dc337b8d7aab2dbe81c29611ca2b069e1299
[ "MIT" ]
null
null
null
Embedded LABs/Embedded lab 1/6a1.asm
amritphuyal/LATEX
7346dc337b8d7aab2dbe81c29611ca2b069e1299
[ "MIT" ]
3
2021-03-19T09:04:46.000Z
2022-01-17T12:19:26.000Z
ORG 00H MOV 60H,#0A5H MOV 61H,#0FDH MOV 62H,#67H MOV 63H,#42H MOV 64H,#0DFH MOV 65H,#9AH MOV 66H,#84H MOV 67H,#1BH MOV 68H,#0C7H MOV 69H,#31H MOV R1,#09H AGN2: MOV A,R1 MOV R2,A MOV R0,#60H MOV A,@R0 AGN1: INC R0 MOV R3,A MOV A,@R0 MOV R4,A MOV A,R3 SUBB A,R4 JC SKIP MOV A,R3 MOV @R0,A MOV A,R4 DEC R0 MOV @R0,A INC R0 SKIP: MOV A,@R0 DJNZ R2,AGN1 DJNZ R1,AGN2 REP: MOV R1,#0AH MOV R0,#60H LOOP: MOV A,@R0 MOV P0,A ACALL DELAY INC R0 DJNZ R1,LOOP AJMP REP DELAY: MOV R3,#7 HERE1: MOV R4,#255 HERE2: MOV R5,#255 HERE3: DJNZ R5,HERE3 DJNZ R4,HERE2 DJNZ R3,HERE1 RET END
11.689655
20
0.584071
b150674278a8ed876d487ba31dc41f4236ec4b04
1,097
asm
Assembly
engine/overworld/field_move_messages.asm
AmateurPanda92/pokemon-rby-dx
f7ba1cc50b22d93ed176571e074a52d73360da93
[ "MIT" ]
9
2020-07-12T19:44:21.000Z
2022-03-03T23:32:40.000Z
engine/overworld/field_move_messages.asm
JStar-debug2020/pokemon-rby-dx
c2fdd8145d96683addbd8d9075f946a68d1527a1
[ "MIT" ]
7
2020-07-16T10:48:52.000Z
2021-01-28T18:32:02.000Z
engine/overworld/field_move_messages.asm
JStar-debug2020/pokemon-rby-dx
c2fdd8145d96683addbd8d9075f946a68d1527a1
[ "MIT" ]
2
2021-03-28T18:33:43.000Z
2021-05-06T13:12:09.000Z
PrintStrengthTxt: ld hl, wd728 set 0, [hl] ld hl, UsedStrengthText call PrintText ld hl, CanMoveBouldersText jp PrintText UsedStrengthText: TX_FAR _UsedStrengthText TX_ASM ld a, [wcf91] call PlayCry call Delay3 jp TextScriptEnd CanMoveBouldersText: TX_FAR _CanMoveBouldersText db "@" IsSurfingAllowed: ; Returns whether surfing is allowed in bit 1 of wd728. ; Surfing isn't allowed on the Cycling Road or in the lowest level of the ; Seafoam Islands before the current has been slowed with boulders. ld hl, wd728 set 1, [hl] ld a, [wd732] bit 5, a jr nz, .forcedToRideBike ld a, [wCurMap] cp SEAFOAM_ISLANDS_B4F ret nz CheckBothEventsSet EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE ret z ld hl, CoordsData_cdf7 call ArePlayerCoordsInArray ret nc ld hl, wd728 res 1, [hl] ld hl, CurrentTooFastText jp PrintText .forcedToRideBike ld hl, wd728 res 1, [hl] ld hl, CyclingIsFunText jp PrintText CoordsData_cdf7: db $0B,$07,$FF CurrentTooFastText: TX_FAR _CurrentTooFastText db "@" CyclingIsFunText: TX_FAR _CyclingIsFunText db "@"
18.913793
88
0.771194
a6a940c3bcf1bed26d8aa72f5cdde934de33778c
334
asm
Assembly
programs/oeis/097/A097462.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/097/A097462.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/097/A097462.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A097462: Multiplication table for numbers 0 through 10 read by rows. ; 0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,0,2,4,6,8,10,12,14,16,18,20,0,3,6,9,12,15,18,21,24,27,30,0,4,8,12,16,20,24,28,32,36,40,0,5,10,15,20,25,30,35,40,45,50,0,6,12,18,24,30,36,42,48,54,60,0,7,14,21,28,35 mov $1,$0 mod $0,11 sub $1,$0 mul $0,$1 div $0,11
37.111111
211
0.628743
75a14b03ca64cbd2ebccb7c8dcf7722ed6e4ea13
766
nasm
Assembly
assignment_4/decode.nasm
CodeheadUK/SLAE64
e53931acf40345ec136e5f6515cd8ec268aac58e
[ "MIT" ]
2
2019-12-23T06:56:03.000Z
2020-12-25T13:09:45.000Z
assignment_4/decode.nasm
CodeheadUK/SLAE64
e53931acf40345ec136e5f6515cd8ec268aac58e
[ "MIT" ]
null
null
null
assignment_4/decode.nasm
CodeheadUK/SLAE64
e53931acf40345ec136e5f6515cd8ec268aac58e
[ "MIT" ]
null
null
null
; Decoder demo - Byte swapped payload is decoded and executed ; Writeable .text section allows code to run from Nasm without need for shellcode wrapper ; Bulid with: nasm -felf64 decode.nasm -o tmp.o && ld tmp.o -o decode global _start section .TEXT exec write _start: jmp short _marker _decode_init: pop rdi lea rsi, [rdi + 3] _decode: movsb sub rsi, 3 movsb add rsi, 4 mov eax, [rsi-2] cmp eax, 0x12345678 jne short _decode jmp short _shell _marker: call _decode_init _shell: db 0xa9, 0x31,0x26,0x48, 0x50,0x28,0xc0, 0x52,0x71,0x5a, 0xbb,0xde,0x48, 0x2f,0x48,0x2f, 0x69,0x6d,0x62, 0x2f,0x6e,0x6e, 0x68,0x23,0x73, 0x48,0x9f,0x53, 0xe7,0x2f,0x89, 0x57,0x0b,0x50, 0x89,0x1e,0x48, 0x83,0xfe,0xe6, 0x3b,0x81,0xc0, 0x05,0xd3,0x0f, 0x78,0x56,0x34,0x12
28.37037
269
0.740209
7a9730be1139f094b451c563e9288bb28f5c979b
209
asm
Assembly
src/test/resources/data/generationtests/tniasm-constants-expected.asm
santiontanon/mdlz80optimizer
6b4b3205921dfa5a625d65f5ba5d5061564d849f
[ "Apache-2.0" ]
36
2020-06-29T06:52:26.000Z
2022-02-10T19:41:58.000Z
src/test/resources/data/generationtests/tniasm-constants-expected.asm
santiontanon/mdlz80optimizer
6b4b3205921dfa5a625d65f5ba5d5061564d849f
[ "Apache-2.0" ]
39
2020-07-02T18:19:34.000Z
2022-03-27T18:08:54.000Z
src/test/resources/data/generationtests/tniasm-constants-expected.asm
santiontanon/mdlz80optimizer
6b4b3205921dfa5a625d65f5ba5d5061564d849f
[ "Apache-2.0" ]
7
2020-07-02T06:00:05.000Z
2021-11-28T17:31:13.000Z
; Test case: c1: equ 123 c2: equ 123 c3: equ 0x1234 c4: equ 0x1234 c5: equ 0x1234 c6: equ 0b11100100 c7: equ 0b11100100 c8: equ 0b01100100 c9: equ 0b11100100 c10: equ 0b11100100 c11: equ 0o123 c12: equ 0o123
14.928571
19
0.741627
e5197fb01b2f7058fc030af1058c201de69472e5
4,817
asm
Assembly
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_1252.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_1252.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_1252.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r13 push %r14 push %rdi push %rdx lea addresses_normal_ht+0xeb41, %r14 nop nop nop nop nop and %r13, %r13 mov $0x6162636465666768, %rdi movq %rdi, %xmm0 vmovups %ymm0, (%r14) dec %rdx pop %rdx pop %rdi pop %r14 pop %r13 ret .global s_faulty_load s_faulty_load: push %r14 push %r15 push %r8 push %r9 push %rbp push %rdi push %rsi // Store lea addresses_A+0xd341, %r9 nop nop nop nop nop sub $44794, %rsi movw $0x5152, (%r9) nop sub $20903, %r9 // Store lea addresses_A+0x24cd, %rdi nop nop nop nop sub $1613, %r14 mov $0x5152535455565758, %r8 movq %r8, (%rdi) nop nop nop nop nop cmp %rbp, %rbp // Store lea addresses_RW+0x2321, %rsi nop add $34740, %rdi mov $0x5152535455565758, %r15 movq %r15, (%rsi) cmp %rdi, %rdi // Faulty Load lea addresses_WC+0x1bb41, %r14 nop nop nop add %rsi, %rsi mov (%r14), %r8 lea oracles, %r15 and $0xff, %r8 shlq $12, %r8 mov (%r15,%r8,1), %r8 pop %rsi pop %rdi pop %rbp pop %r9 pop %r8 pop %r15 pop %r14 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': True, 'congruent': 0, 'size': 32, 'same': True, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 8, 'size': 2, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 2, 'size': 8, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 5, 'size': 8, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 10, 'size': 32, 'same': False, 'NT': False}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
46.317308
2,999
0.658294
172061ba881063352b15a8f5accaf0a6a1d602fd
498
asm
Assembly
programs/oeis/118/A118286.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/118/A118286.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/118/A118286.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A118286: Numbers n such that n == 0 (mod 4) or n == 2 (mod 12). ; 2,4,8,12,14,16,20,24,26,28,32,36,38,40,44,48,50,52,56,60,62,64,68,72,74,76,80,84,86,88,92,96,98,100,104,108,110,112,116,120,122,124,128,132,134,136,140,144,146,148,152,156,158,160,164,168,170,172,176,180,182,184,188,192,194,196,200,204,206,208,212,216,218,220,224,228,230,232,236,240,242,244,248,252,254,256,260,264,266,268,272,276,278,280,284,288,290,292,296,300 mov $1,$0 mul $0,6 mod $1,4 add $0,$1 div $0,4 mul $0,2 add $0,2
45.272727
365
0.676707
625fa0d9200ed69a608a69246606f522ed500d55
1,441
asm
Assembly
programs/oeis/167/A167562.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/167/A167562.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/167/A167562.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A167562: The fifth row of the ED2 array A167560. ; 120,480,1344,3072,6144,11160,18840,30024,45672,66864,94800,130800,176304,232872,302184,386040,486360,605184,744672,907104,1094880,1310520,1556664,1836072,2151624,2506320,2903280,3345744,3837072,4380744,4980360,5639640,6362424,7152672,8014464,8952000,9969600,11071704,12262872,13547784,14931240,16418160,18013584,19722672,21550704,23503080,25585320,27803064,30162072,32668224,35327520,38146080,41130144,44286072,47620344,51139560,54850440,58759824,62874672,67202064,71749200,76523400,81532104,86782872,92283384,98041440,104064960,110361984,116940672,123809304,130976280,138450120,146239464,154353072,162799824,171588720,180728880,190229544,200100072,210349944,220988760,232026240,243472224,255336672,267629664,280361400,293542200,307182504,321292872,335883984,350966640,366551760,382650384,399273672,416432904,434139480,452404920,471240864,490659072,510671424 mov $7,$0 mul $0,2 add $0,9 mov $4,$0 sub $0,3 mov $1,1 sub $4,1 lpb $0 sub $0,1 trn $2,5 add $2,$1 add $1,$4 add $2,2 lpe add $1,$2 sub $1,44 mov $3,56 mov $8,$7 lpb $3 add $1,$8 sub $3,1 lpe mov $5,$7 lpb $5 sub $5,1 add $6,$8 lpe mov $3,85 mov $8,$6 lpb $3 add $1,$8 sub $3,1 lpe mov $5,$7 mov $6,0 lpb $5 sub $5,1 add $6,$8 lpe mov $3,26 mov $8,$6 lpb $3 add $1,$8 sub $3,1 lpe mov $5,$7 mov $6,0 lpb $5 sub $5,1 add $6,$8 lpe mov $3,5 mov $8,$6 lpb $3 add $1,$8 sub $3,1 lpe mov $0,$1
23.241935
860
0.740458
6fc6173b619bd63aedda53596035f7959df31ca1
32,308
asm
Assembly
source/PFH.asm
stuij/rath
e531155be5394438ea5ffc7d56e4a0e01a7ffcd0
[ "MIT" ]
25
2021-03-11T19:59:56.000Z
2022-02-13T06:34:08.000Z
source/PFH.asm
stuij/rath
e531155be5394438ea5ffc7d56e4a0e01a7ffcd0
[ "MIT" ]
null
null
null
source/PFH.asm
stuij/rath
e531155be5394438ea5ffc7d56e4a0e01a7ffcd0
[ "MIT" ]
null
null
null
# SYSTEM VARIABLES & CONSTANTS ================== #C BL -- char an ASCII space head bl,2,"bl",docon,storedest .word 0x20 #Z tibsize -- n size of TIB head tibsize,7,"tibsize",docon,bl .word 124 /* 2 chars safety zone */ #X tib -- a-addr Terminal Input Buffer # HEX 82 CONSTANT TIB CP/M systems: 126 bytes # HEX -80 USER TIB others: below user area head tib,3,"tib",dovar,tibsize .space 128 #Z u0 -- a-addr current user area adrs codeh u0,2,"u0",tib str r1, [sp, #-4]! /* push TOS */ mov r1, r2 next #C >IN -- a-addr holds offset into TIB head toin,3,">in",douser,u0 .word 4 #C BASE -- a-addr holds conversion radix head base,4,"base",douser,toin .word 8 #C STATE -- a-addr holds compiler state head state,5,"state",douser,base .word 12 #Z dp -- a-addr holds dictionary ptr head dp,2,"dp",douser,state .word 16 #Z 'source -- a-addr two cells: len, adrs head ticksource,7,"'source",douser,dp .word 20 #Z latest -- a-addr last word in dict. head latest,6,"latest",douser,ticksource .word 28 #Z hp -- a-addr HOLD pointer head hp,2,"hp",douser,latest .word 32 #Z LP -- a-addr Leave-stack pointer head lp,2,"lp",douser,hp .word 36 #Z s0 -- a-addr end of parameter stack codeh s0,2,"s0",lp str r1, [sp, #-4]! /* push old TOS */ ldr r1, [r10] next #X PAD -- a-addr user PAD buffer # = end of hold area! codeh pad,3,"pad",s0 str r1, [sp, #-4]! /* push old TOS */ ldr r1, [r10, #12] next #Z l0 -- a-addr bottom of Leave stack head l0,2,"l0",dovar,pad .space 128 #Z r0 -- a-addr end of return stack codeh r0,2,"r0",l0 str r1, [sp, #-4]! /* push old TOS */ ldr r1, [r10, #4] next #Z uinit -- addr initial values for user area head uinit,5,"uinit",docreate,r0 .word 0x12345678,0,10,0 /* reserved (UNUSED),>IN,BASE,STATE */ .word enddict /* DP */ .word 0,0 /* SOURCE init'd elsewhere */ .word lastword /* LATEST */ .word 0 /* HP init'd elsewhere */ #Z #init -- n #bytes of user area init data head ninit,5,"#init",docon,uinit .word 36 # ARITHMETIC OPERATORS ========================== #C S>D n -- d single -> double prec. # DUP 0< ; head stod,3,"s>d",docolon,ninit .word dup,zeroless,exit #Z ?NEGATE n1 n2 -- n3 negate n1 if n2 negative #_ 0< IF NEGATE THEN ; ...a common factor head qnegate,7,"?negate",docolon,stod .word zeroless,qbranch,qneg1,negate qneg1: .word exit #C ABS n1 -- +n2 absolute value # DUP ?NEGATE ; head abs,3,"abs",docolon,qnegate .word dup,qnegate,exit #X DNEGATE d1 -- d2 negate double precision # SWAP INVERT SWAP INVERT 1 M+ ; head dnegate,7,"dnegate",docolon,abs .word swap,invert,swap,invert,lit,1,mplus .word exit #Z ?DNEGATE d1 n -- d2 negate d1 if n negative #_ 0< IF DNEGATE THEN ; ...a common factor head qdnegate,8,"?dnegate",docolon,dnegate .word zeroless,qbranch,dneg1,dnegate dneg1: .word exit #X DABS d1 -- +d2 absolute value dbl.prec. # DUP ?DNEGATE ; head dabs,4,"dabs",docolon,qdnegate .word dup,qdnegate,exit #C M* n1 n2 -- d signed 16*16->32 multiply #_ 2DUP XOR >R carries sign of the result # SWAP ABS SWAP ABS UM* # R> ?DNEGATE ; head mstar,2,"m*",docolon,dabs .word twodup,xor,tor .word swap,abs,swap,abs,umstar .word rfrom,qdnegate,exit #C SM/REM d1 n1 -- n2 n3 symmetric signed div #_ 2DUP XOR >R sign of quotient # OVER >R sign of remainder # ABS >R DABS R> UM/MOD # SWAP R> ?NEGATE # SWAP R> ?NEGATE ; # Ref. dpANS-6 section 3.2.2.1. head smslashrem,6,"sm/rem",docolon,mstar .word twodup,xor,tor,over,tor .word abs,tor,dabs,rfrom,umslashmod .word swap,rfrom,qnegate,swap,rfrom,qnegate .word exit #C FM/MOD d1 n1 -- n2 n3 floored signed div'n # DUP >R save divisor # SM/REM # DUP 0< IF if quotient negative, # SWAP R> + add divisor to rem'dr # SWAP 1- decrement quotient # ELSE R> DROP THEN ; # Ref. dpANS-6 section 3.2.2.1. head fmslashmod,6,"fm/mod",docolon,smslashrem .word dup,tor,smslashrem .word dup,zeroless,qbranch,fmmod1 .word swap,rfrom,plus,swap,oneminus .word branch,fmmod2 fmmod1: .word rfrom,drop fmmod2: .word exit #C * n1 n2 -- n3 signed multiply # M* DROP ; head star,1,"*",docolon,fmslashmod .word mstar,drop,exit #C /MOD n1 n2 -- n3 n4 signed divide/rem'dr # >R S>D R> FM/MOD ; head slashmod,4,"/mod",docolon,star .word tor,stod,rfrom,fmslashmod,exit #C / n1 n2 -- n3 signed divide # /MOD nip ; head slash,1,"/",docolon,slashmod .word slashmod,nip,exit #C MOD n1 n2 -- n3 signed remainder # /MOD DROP ; head mod,3,"mod",docolon,slash .word slashmod,drop,exit #C */MOD n1 n2 n3 -- n4 n5 n1*n2/n3, rem&quot # >R M* R> FM/MOD ; head ssmod,5,"*/mod",docolon,mod .word tor,mstar,rfrom,fmslashmod,exit #C */ n1 n2 n3 -- n4 n1*n2/n3 # */MOD nip ; head starslash,2,"*/",docolon,ssmod .word ssmod,nip,exit #C MAX n1 n2 -- n3 signed maximum #_ 2DUP < IF SWAP THEN DROP ; head max,3,"max",docolon,starslash .word twodup,less,qbranch,max1,swap max1: .word drop,exit #C MIN n1 n2 -- n3 signed minimum #_ 2DUP > IF SWAP THEN DROP ; head min,3,"min",docolon,max .word twodup,greater,qbranch,min1,swap min1: .word drop,exit # DOUBLE OPERATORS ============================== #C 2@ a-addr -- x1 x2 fetch 2 cells # DUP CELL+ @ SWAP @ ; # the lower address will appear on top of stack head twofetch,2,"2@",docolon,min .word dup,cellplus,fetch,swap,fetch,exit #C 2! x1 x2 a-addr -- store 2 cells # SWAP OVER ! CELL+ ! ; # the top of stack is stored at the lower adrs head twostore,2,"2!",docolon,twofetch .word swap,over,store,cellplus,store,exit #C 2DROP x1 x2 -- drop 2 cells # DROP DROP ; head twodrop,5,"2drop",docolon,twostore .word drop,drop,exit #C 2DUP x1 x2 -- x1 x2 x1 x2 dup top 2 cells # OVER OVER ; head twodup,4,"2dup",docolon,twodrop .word over,over,exit #C 2SWAP x1 x2 x3 x4 -- x3 x4 x1 x2 per diagram # ROT >R ROT R> ; head twoswap,5,"2swap",docolon,twodup .word rot,tor,rot,rfrom,exit #C 2OVER x1 x2 x3 x4 -- x1 x2 x3 x4 x1 x2 # >R >R 2DUP R> R> 2SWAP ; head twoover,5,"2over",docolon,twoswap .word tor,tor,twodup,rfrom,rfrom .word twoswap,exit # INPUT/OUTPUT ================================== #C COUNT c-addr1 -- c-addr2 u counted->adr/len # DUP CHAR+ SWAP C@ ; head count,5,"count",docolon,twoover .word dup,charplus,swap,cfetch,exit #C CR -- output newline #_ 0D EMIT 0A EMIT ; head cr,2,"cr",docolon,count .word lit,0x0a,emit,exit #C SPACE -- output a space # BL EMIT ; head space,5,"space",docolon,cr .word bl,emit,exit #C SPACES n -- output n spaces # BEGIN DUP WHILE SPACE 1- REPEAT DROP ; head spaces,6,"spaces",docolon,space spcs1: .word dup,qbranch,spcs2 .word space,oneminus,branch,spcs1 spcs2: .word drop,exit #Z umin u1 u2 -- u unsigned minimum #_ 2DUP U> IF SWAP THEN DROP ; head umin,4,"umin",docolon,spaces .word twodup,ugreater,qbranch,umin1,swap umin1: .word drop,exit #Z umax u1 u2 -- u unsigned maximum # _ 2DUP U< IF SWAP THEN DROP ; head umax,4,"umax",docolon,umin .word twodup,uless,qbranch,umax1,swap umax1: .word drop,exit #C ACCEPT c-addr +n -- +n' get line from term'l # OVER + 1- OVER -- sa ea a # BEGIN KEY -- sa ea a c # DUP 0D <> WHILE # DUP EMIT -- sa ea a c # DUP 8 = IF DROP 1- >R OVER R> UMAX # ELSE OVER C! 1+ OVER UMIN # THEN -- sa ea a # REPEAT -- sa ea a c # DROP NIP SWAP - ; head accept,6,"accept",docolon,umax .word over,plus,oneminus,over acc1: .word key,dup,lit,0x0a,notequal,qbranch,acc5 .word dup,emit,dup,lit,8,equal,qbranch,acc3 .word drop,oneminus,tor,over,rfrom,umax .word branch,acc4 acc3: .word over,cstore,oneplus,over,umin acc4: .word branch,acc1 acc5: .word drop,nip,swap,minus,exit #C TYPE c-addr +n -- type line to term'l # ?DUP IF # OVER + SWAP DO I C@ EMIT LOOP # ELSE DROP THEN ; head type,4,"type",docolon,accept .word qdup,qbranch,typ4 .word over,plus,swap,xdo typ3: .word ii,cfetch,emit,xloop,typ3 .word branch,typ5 typ4: .word drop typ5: .word exit #Z (S") -- c-addr u run-time code for S" # R> COUNT 2DUP + ALIGNED >R ; head xsquote,4,"(s\")",docolon,type .word rfrom,count,twodup,plus,aligned .word tor .word exit #C S" -- compile in-line string # COMPILE (S") [ HEX ] # 22 WORD C@ 1+ ALIGNED ALLOT ; IMMEDIATE immed squote,2,"s\"",docolon,xsquote .word lit,xsquote,commaxt .word lit,0x22,word,cfetch,oneplus .word aligned,allot,exit #C ." -- compile string to print # POSTPONE S" POSTPONE TYPE ; IMMEDIATE immed dotquote,2,".\"",docolon,squote .word squote .word lit,type,commaxt .word exit # NUMERIC OUTPUT ================================ # Numeric conversion is done l.s.digit first, so # the output buffer is built backwards in memory. # Some double-precision arithmetic operators are # needed to implement ANSI numeric conversion. #Z UD/MOD ud1 u2 -- u3 ud4 32/16->32 divide # >R 0 R@ UM/MOD ROT ROT R> UM/MOD ROT ; head udslashmod,6,"ud/mod",docolon,dotquote .word tor,lit,0,rfetch,umslashmod,rot,rot .word rfrom,umslashmod,rot,exit #Z UD* ud1 d2 -- ud3 32*16->32 multiply # DUP >R UM* DROP SWAP R> UM* ROT + ; head udstar,3,"ud*",docolon,udslashmod .word dup,tor,umstar,drop .word swap,rfrom,umstar,rot,plus,exit #C HOLD char -- add char to output string # -1 HP +! HP @ C! ; head hold,4,"hold",docolon,udstar .word lit,-1,hp,plusstore .word hp,fetch,cstore,exit #C <# -- begin numeric conversion # PAD HP ! ; (initialize Hold Pointer) head lessnum,2,"<#",docolon,hold .word pad,hp,store,exit #Z >digit n -- c convert to 0..9A..Z # [ HEX ] DUP 9 > 7 AND + 30 + ; head todigit,6,">digit",docolon,lessnum .word dup,lit,0x9,greater,lit,0x27,and,plus .word lit,0x30,plus,exit #C # ud1 -- ud2 convert 1 digit of output # BASE @ UD/MOD ROT >digit HOLD ; head num,1,"#",docolon,todigit .word base,fetch,udslashmod,rot,todigit .word hold,exit #C #S ud1 -- ud2 convert remaining digits # BEGIN # 2DUP OR 0= UNTIL ; head nums,2,"#s",docolon,num nums1: .word num,twodup,or,zeroequal,qbranch,nums1 .word exit #C #> ud1 -- c-addr u end conv., get string # 2DROP HP @ PAD OVER - ; head numgreater,2,"#>",docolon,nums .word twodrop,hp,fetch,pad,over,minus .word exit #C SIGN n -- add minus sign if n<0 #_ 0< IF 2D HOLD THEN ; head sign,4,"sign",docolon,numgreater .word zeroless,qbranch,sign1,lit,0x2d,hold sign1: .word exit #C U. u -- display u unsigned # <# 0 #S #> TYPE SPACE ; head udot,2,"u.",docolon,sign .word lessnum,lit,0,nums,numgreater,type .word space,exit #C . n -- display n signed # <# DUP ABS 0 #S ROT SIGN #> TYPE SPACE ; head dot,1,".",docolon,udot .word lessnum,dup,abs,lit,0,nums .word rot,sign,numgreater .word type,space,exit #C DECIMAL -- set number base to decimal # 10 BASE ! ; head decimal,7,"decimal",docolon,dot .word lit,10,base,store,exit #X HEX -- set number base to hex # 16 BASE ! ; head hex,3,"hex",docolon,decimal .word lit,16,base,store,exit # DICTIONARY MANAGEMENT ========================= #C HERE -- addr returns dictionary ptr # DP @ ; head here,4,"here",docolon,hex .word dp,fetch,exit #C ALLOT n -- allocate n bytes in dict # DP +! ; head allot,5,"allot",docolon,here .word dp,plusstore,exit # Note: , and C, are only valid for combined # Code and Data spaces. #C , x -- append cell to dict # HERE ! 1 CELLS ALLOT ; head comma,1,",",docolon,allot .word here,store,lit,1,cells,allot,exit #C C, char -- append char to dict # HERE C! 1 CHARS ALLOT ; head ccomma,2,"c,",docolon,comma .word here,cstore,lit,1,chars,allot,exit # INTERPRETER =================================== # Note that NFA>LFA, NFA>CFA, IMMED?, and FIND # are dependent on the structure of the Forth # header. This may be common across many CPUs, # or it may be different. #C SOURCE -- adr n current input buffer # 'SOURCE 2@ ; length is at lower adrs head source,6,"source",docolon,ccomma .word ticksource,twofetch,exit #X /STRING a u n -- a+n u-n trim string # ROT OVER + ROT ROT - ; head slashstring,7,"/string",docolon,source .word rot,over,plus,rot,rot,minus,exit #Z >counted src n dst -- copy to counted str # 2DUP C! CHAR+ SWAP CMOVE ; head tocounted,8,">counted",docolon,slashstring .word twodup,cstore,charplus,swap,cmove,exit #C WORD char -- c-addr n word delim'd by char # DUP SOURCE >IN @ /STRING -- c c adr n # DUP >R ROT SKIP -- c adr' n' # OVER >R ROT SCAN -- adr" n" # DUP IF CHAR- THEN skip trailing delim. # R> R> ROT - >IN +! update >IN offset # TUCK - -- adr' N # HERE >counted -- # HERE -- a # BL OVER COUNT + C! ; append trailing blank head word,4,"word",docolon,tocounted .word dup,source,toin,fetch,slashstring .word dup,tor,rot,skip .word over,tor,rot,scan .word dup,qbranch,word1,charminus word1: .word rfrom,rfrom,rot,minus,toin,plusstore .word tuck,minus .word here,tocounted,here .word bl,over,count,plus,cstore,exit #Z NFA>LFA nfa -- lfa name adr -> link field #_ 3 - ; # Here -8 head nfatolfa,7,"nfa>lfa",docolon,word .word lit,8,minus,exit #Z NFA>CFA nfa -- cfa name adr -> code field # COUNT 7F AND + ; mask off 'smudge' bit # Needs testing head nfatocfa,7,"nfa>cfa",docolon,nfatolfa .word count,lit,0x7f,and,plus .word aligned .word exit #Z IMMED? nfa -- f fetch immediate flag #_ 1- C@ ; nonzero if immed # Here -4 head immedq,6,"immed?",docolon,nfatocfa .word lit,4,minus,fetch,exit #C FIND c-addr -- c-addr 0 if not found #C xt 1 if immediate #C xt -1 if "normal" # LATEST @ BEGIN -- a nfa # 2DUP OVER C@ CHAR+ -- a nfa a nfa n+1 # S= -- a nfa f # DUP IF # DROP # NFA>LFA @ DUP -- a link link # THEN #_ 0= UNTIL -- a nfa OR a 0 # DUP IF # NIP DUP NFA>CFA -- nfa xt # SWAP IMMED? -- xt iflag #_ 0= 1 OR -- xt 1/-1 # THEN ; head find,4,"find",docolon,immedq .word latest,fetch find1: .word twodup,over,cfetch,charplus .word sequal,dup,qbranch,find2 .word drop,nfatolfa,fetch,dup find2: .word zeroequal,qbranch,find1 .word dup,qbranch,find3 .word nip,dup,nfatocfa .word swap,immedq,zeroequal,lit,1,or find3: .word exit #C LITERAL x -- append numeric literal # STATE @ IF ['] LIT ,XT , THEN ; IMMEDIATE # This tests STATE so that it can also be used # interpretively. (ANSI doesn't require this.) immed literal,7,"literal",docolon,find .word state,fetch,qbranch,liter1 .word lit,lit,commaxt,comma liter1: .word exit #Z DIGIT? c -- n -1 if c is a valid digit #Z -- x 0 otherwise # [ HEX ] DUP 39 > 100 AND + silly looking # DUP 140 > 107 AND - 30 - but it works! # DUP BASE @ U< ; head digitq,6,"digit?",docolon,literal .word dup,lit,0x39,greater,lit,0x100,and,plus .word dup,lit,0x160,greater,lit,0x127,and .word minus,lit,0x30,minus .word dup,base,fetch,uless,exit #Z ?SIGN adr n -- adr' n' f get optional sign #Z advance adr/n if sign; return NZ if negative # OVER C@ -- adr n c #_ 2C - DUP ABS 1 = AND -- +=-1, -=+1, else 0 # DUP IF 1+ -- +=0, -=+2 # >R 1 /STRING R> -- adr' n' f # THEN ; head qsign,5,"?sign",docolon,digitq .word over,cfetch,lit,0x2c,minus,dup,abs .word lit,1,equal,and,dup,qbranch,qsign1 .word oneplus,tor,lit,1,slashstring,rfrom qsign1: .word exit #C >NUMBER ud adr u -- ud' adr' u' #C convert string to number # BEGIN # DUP WHILE # OVER C@ DIGIT? #_ 0= IF DROP EXIT THEN # >R 2SWAP BASE @ UD* # R> M+ 2SWAP #_ 1 /STRING # REPEAT ; head tonumber,7,">number",docolon,qsign tonum1: .word dup,qbranch,tonum3 .word over,cfetch,digitq .word zeroequal,qbranch,tonum2,drop,exit tonum2: .word tor,twoswap,base,fetch,udstar .word rfrom,mplus,twoswap .word lit,1,slashstring,branch,tonum1 tonum3: .word exit #Z ?NUMBER c-addr -- n -1 string->number #Z -- c-addr 0 if convert error # DUP 0 0 ROT COUNT -- ca ud adr n # ?SIGN >R >NUMBER -- ca ud adr' n' # IF R> 2DROP 2DROP 0 -- ca 0 (error) # ELSE 2DROP NIP R> # IF NEGATE THEN -1 -- n -1 (ok) # THEN ; head qnumber,7,"?number",docolon,tonumber .word dup,lit,0,dup,rot,count .word qsign,tor,tonumber,qbranch,qnum1 .word rfrom,twodrop,twodrop,lit,0 .word branch,qnum3 qnum1: .word twodrop,nip,rfrom,qbranch,qnum2,negate qnum2: .word lit,-1 qnum3: .word exit #Z INTERPRET i*x c-addr u -- j*x #Z interpret given buffer # This is a common factor of EVALUATE and QUIT. # ref. dpANS-6, 3.4 The Forth Text Interpreter # 'SOURCE 2! 0 >IN ! # BEGIN # BL WORD DUP C@ WHILE -- textadr # FIND -- a 0/1/-1 # ?DUP IF -- xt 1/-1 #_ 1+ STATE @ 0= OR immed or interp? # IF EXECUTE ELSE ,XT THEN # ELSE -- textadr # ?NUMBER # IF POSTPONE LITERAL converted ok # ELSE COUNT TYPE 3F EMIT CR ABORT err # THEN # THEN # REPEAT DROP ; head interpret,9,"interpret",docolon,qnumber .word ticksource,twostore,lit,0,toin,store inter1: .word bl,word,dup,cfetch,qbranch,inter9 .word find .word qdup,qbranch,inter4 .word oneplus,state,fetch .word zeroequal,or .word qbranch,inter2 .word execute .word branch,inter3 inter2: .word commaxt inter3: .word branch,inter8 inter4: .word qnumber,qbranch,inter5 .word literal,branch,inter6 inter5: .word count,type,lit,0x3f,emit,cr,abort inter6: inter8: .word branch,inter1 inter9: .word drop,exit #C EVALUATE i*x c-addr u -- j*x interprt string # 'SOURCE 2@ >R >R >IN @ >R # INTERPRET # R> >IN ! R> R> 'SOURCE 2! ; head evaluate,8,"evaluate",docolon,interpret .word ticksource,twofetch,tor,tor .word toin,fetch,tor,interpret .word rfrom,toin,store,rfrom,rfrom .word ticksource,twostore,exit #C QUIT -- R: i*x -- interpret from kbd # L0 LP ! R0 RP! 0 STATE ! # BEGIN # TIB DUP TIBSIZE ACCEPT SPACE # INTERPRET # STATE @ 0= IF CR ." OK" THEN # AGAIN ; head quit,4,"quit",docolon,evaluate .word l0,lp,store .word r0,rpstore,lit,0,state,store quit1: .word tib,dup,tibsize,accept,space .word interpret .word state,fetch,zeroequal,qbranch,quit2 .word cr,xsquote .byte 3 .ascii "ok " .align /* .align would add 4 bytes here */ .word type /* .word lit,0x1e,emit drop serial receive queue */ quit2: .word branch,quit1 #C ABORT i*x -- R: j*x -- clear stk & QUIT # S0 SP! QUIT ; head abort,5,"abort",docolon,quit /* .word lit,0x1e,emit drop serial receive queue */ .word s0,spstore,quit /* quit never returns */ #Z ?ABORT f c-addr u -- abort & print msg # ROT IF TYPE ABORT THEN 2DROP ; head qabort,6,"?abort",docolon,abort .word rot,qbranch,qabo1,type,abort qabo1: .word twodrop,exit #C ABORT" i*x 0 -- i*x R: j*x -- j*x x1=0 #C i*x x1 -- R: j*x -- x1<>0 # POSTPONE S" POSTPONE ?ABORT ; IMMEDIATE immed abortquote,6,"abort\"",docolon,qabort .word squote .word lit,qabort,commaxt .word exit #C ' -- xt find word in dictionary # BL WORD FIND #_ 0= ABORT" ?" ; head tick,1,"'",docolon,abortquote .word bl,word,find,zeroequal,xsquote .byte 1 .ascii "?" .align .word qabort,exit #C CHAR -- char parse ASCII character # BL WORD 1+ C@ ; head char,4,"char",docolon,tick .word bl,word,oneplus,cfetch,exit #C [CHAR] -- compile character literal # CHAR ['] LIT ,XT , ; IMMEDIATE immed bracchar,6,"[char]",docolon,char .word char .word lit,lit,commaxt .word comma,exit #C ( -- skip input until ) # [ HEX ] 29 WORD DROP ; IMMEDIATE immed paren,1,"(",docolon,bracchar .word lit,0x29,word,drop,exit # COMPILER ====================================== #C CREATE -- create an empty definition # LATEST @ , 0 C, link & immed field # HERE LATEST ! new "latest" link # BL WORD C@ 1+ ALLOT name field # docreate ,CF code field # It's a bit different there head create,6,"create",docolon,paren .word latest,fetch,comma,lit,0,comma .word here,latest,store .word bl,word,cfetch,oneplus,aligned,allot .word lit,docreate,commacf .word exit #Z (DOES>) -- run-time action of DOES> # R> adrs of headless DOES> def'n # LATEST @ NFA>CFA code field to fix up # !CF ; head xdoes,7,"(does>)",docolon,create .word rfrom,latest,fetch,nfatocfa,storecf .word exit #C DOES> -- change action of latest def'n # COMPILE (DOES>) # dodoes ,CF ; IMMEDIATE immed does,5,"does>",docolon,xdoes .word lit,xdoes,commaxt # compiles "mov r3, lr" .word lit,0xe1a0300e,comma .word lit,dodoes,commacf,exit #C RECURSE -- recurse current definition # LATEST @ NFA>CFA ,XT ; IMMEDIATE immed recurse,7,"recurse",docolon,does .word latest,fetch,nfatocfa,commaxt,exit #C [ -- enter interpretive state #_ 0 STATE ! ; IMMEDIATE immed leftbracket,1,"[",docolon,recurse .word lit,0,state,store,exit #C ] -- enter compiling state #_ -1 STATE ! ; head rightbracket,1,"]",docolon,leftbracket .word lit,-1,state,store,exit #Z HIDE -- "hide" latest definition # LATEST @ DUP C@ 80 OR SWAP C! ; head hide,4,"hide",docolon,rightbracket .word latest,fetch,dup,cfetch,lit,0x80,or .word swap,cstore,exit #Z REVEAL -- "reveal" latest definition # LATEST @ DUP C@ 7F AND SWAP C! ; head reveal,6,"reveal",docolon,hide .word latest,fetch,dup,cfetch,lit,0x7f,and .word swap,cstore,exit #C IMMEDIATE -- make last def'n immediate #_ 1 LATEST @ 1- C! ; set immediate flag # It's a bit different there head immediate,9,"immediate",docolon,reveal .word lit,1,latest,fetch,lit,4,minus,store .word exit #C : -- begin a colon definition # CREATE HIDE ] !COLON ; head colon,1,":",docolon,immediate .word create,hide,rightbracket,storcolon .word exit #C ; # REVEAL ,EXIT # POSTPONE [ ; IMMEDIATE # immed SEMICOLON,1,";",docolon,COLON .align .word link_colon .word 1 link_semicolon: .byte 1 .byte 0x3b .align semicolon: bl docolon .word reveal,cexit .word leftbracket,exit #C ['] -- find word & compile as literal # ' ['] LIT ,XT , ; IMMEDIATE # When encountered in a colon definition, the # phrase ['] xxx will cause LIT,xxt to be # compiled into the colon definition # (where xxt is the execution token of word xxx). # When the colon definition executes, xxt will # be put on the stack. (All xt's are one cell.) immed bractick,3,"[']",docolon,semicolon .word tick /* get xt of 'xxx' */ .word lit,lit,commaxt /* append lit action */ .word comma,exit /* append xt literal */ #C POSTPONE -- postpone compile action of word # BL WORD FIND # DUP 0= ABORT" ?" #_ 0< IF -- xt non immed: add code to current # def'n to compile xt later. # ['] LIT ,XT , add "LIT,xt,COMMAXT" # ['] ,XT ,XT to current definition # ELSE ,XT immed: compile into cur. def'n # THEN ; IMMEDIATE immed postpone,8,"postpone",docolon,bractick .word bl,word,find,dup,zeroequal,xsquote .byte 1 .ascii "?" .align .word qabort,zeroless,qbranch,post1 .word lit,lit,commaxt,comma .word lit,commaxt,commaxt,branch,post2 post1: .word commaxt post2: .word exit #Z COMPILE -- append inline execution token # R> DUP CELL+ >R @ ,XT ; # The phrase ['] xxx ,XT appears so often that # this word was created to combine the actions # of LIT and ,XT. It takes an inline literal # execution token and appends it to the dict. head compile,7,"compile",docolon,postpone .word rfrom,dup,cellplus,tor .word fetch,commaxt,exit # N.B.: not used in the current implementation # CONTROL STRUCTURES ============================ #C IF -- adrs conditional forward branch # ['] qbranch ,BRANCH HERE DUP ,DEST ; # IMMEDIATE immed if,2,"if",docolon,compile .word lit,qbranch,commabranch .word here,dup,commadest,exit #C THEN adrs -- resolve forward branch # HERE SWAP !DEST ; IMMEDIATE immed then,4,"then",docolon,if .word here,swap,storedest,exit #C ELSE adrs1 -- adrs2 branch for IF..ELSE # ['] branch ,BRANCH HERE DUP ,DEST # SWAP POSTPONE THEN ; IMMEDIATE immed else,4,"else",docolon,then .word lit,branch,commabranch .word here,dup,commadest .word swap,then,exit #C BEGIN -- adrs target for bwd. branch # HERE ; IMMEDIATE immed begin,5,"begin",docolon,else .word here,exit #C UNTIL adrs -- conditional backward branch # ['] qbranch ,BRANCH ,DEST ; IMMEDIATE # conditional backward branch immed until,5,"until",docolon,begin .word lit,qbranch,commabranch .word commadest,exit #X AGAIN adrs -- uncond'l backward branch # ['] branch ,BRANCH ,DEST ; IMMEDIATE # unconditional backward branch immed again,5,"again",docolon,until .word lit,branch,commabranch .word commadest,exit #C WHILE -- adrs branch for WHILE loop # POSTPONE IF ; IMMEDIATE immed while,5,"while",docolon,again .word if,exit #C REPEAT adrs1 adrs2 -- resolve WHILE loop # SWAP POSTPONE AGAIN POSTPONE THEN ; IMMEDIATE immed repeat,6,"repeat",docolon,while .word swap,again,then,exit #Z >L x -- L: -- x move to leave stack # CELL LP +! LP @ ! ; (L stack grows up) head tol,2,">l",docolon,repeat .word cell,lp,plusstore,lp,fetch,store,exit #Z L> -- x L: x -- move from leave stack # LP @ @ CELL NEGATE LP +! ; head lfrom,2,"l>",docolon,tol .word lp,fetch,fetch .word cell,negate,lp,plusstore,exit #C DO -- adrs L: -- 0 # ['] xdo ,XT HERE target for bwd branch #_ 0 >L ; IMMEDIATE marker for LEAVEs immed do,2,"do",docolon,lfrom .word lit,xdo,commaxt,here .word lit,0,tol,exit #Z ENDLOOP adrs xt -- L: 0 a1 a2 .. aN -- # ,BRANCH ,DEST backward loop # BEGIN L> ?DUP WHILE POSTPONE THEN REPEAT ; # resolve LEAVEs # This is a common factor of LOOP and +LOOP. head endloop,7,"endloop",docolon,do .word commabranch,commadest loop1: .word lfrom,qdup,qbranch,loop2 .word then,branch,loop1 loop2: .word exit #C LOOP adrs -- L: 0 a1 a2 .. aN -- # ['] xloop ENDLOOP ; IMMEDIATE immed loop,4,"loop",docolon,endloop .word lit,xloop,endloop,exit #C +LOOP adrs -- L: 0 a1 a2 .. aN -- # ['] xplusloop ENDLOOP ; IMMEDIATE immed plusloop,5,"+loop",docolon,loop .word lit,xplusloop,endloop,exit #C LEAVE -- L: -- adrs # ['] UNLOOP ,XT # ['] branch ,BRANCH HERE DUP ,DEST >L # ; IMMEDIATE unconditional forward branch immed leave,5,"leave",docolon,plusloop .word lit,unloop,commaxt .word lit,branch,commabranch .word here,dup,commadest,tol,exit # OTHER OPERATIONS ============================== #X WITHIN n1|u1 n2|u2 n3|u3 -- f n2<=n1<n3? # OVER - >R - R> U< ; per ANS document head within,6,"within",docolon,leave .word over,minus,tor,minus,rfrom,uless,exit #C MOVE addr1 addr2 u -- smart move # VERSION FOR 1 ADDRESS UNIT = 1 CHAR # >R 2DUP SWAP DUP R@ + -- ... dst src src+n # WITHIN IF R> CMOVE> src <= dst < src+n # ELSE R> CMOVE THEN ; otherwise # head move,4,"move",docolon,within # .word tor,twodup,swap,dup,rfetch,plus # .word within,qbranch,move1 # .word rfrom,cmoveup,branch,move2 #move1: .word rfrom,cmove #move2: .word exit #C MOVE addr1 addr2 u -- assembly move codeh move,4,"move",within ldr r4, [sp], #4 /* addr2 */ ldr r5, [sp], #4 /* addr1 */ cmp r1, #0 ble move2 move1: ldr r6, [r5], #4 str r6, [r4], #4 subs r1, r1, #4 bgt move1 move2: ldr r1, [sp], #4 /* pop new TOS */ next #C DEPTH -- +n number of items on stack # SP@ S0 SWAP - 2/ ; 16-BIT VERSION! #_ 32-bit version head depth,5,"depth",docolon,move .word spfetch,s0,swap,minus,twoslash,twoslash,exit #C ENVIRONMENT? c-addr u -- false system query # -- i*x true #_ 2DROP 0 ; the minimal definition! head environmentq,12,"environment?",docolon,depth .word twodrop,lit,0,exit # UTILITY WORDS AND STARTUP ===================== #X WORDS -- list all words in dict. # LATEST @ BEGIN # DUP COUNT TYPE SPACE # NFA>LFA @ # DUP 0= UNTIL # DROP ; head words,5,"words",docolon,environmentq .word latest,fetch wds1: .word dup,count,type,space,nfatolfa,fetch .word dup,zeroequal,qbranch,wds1 .word drop,exit #X .S -- print stack contents # SP@ S0 - IF # SP@ S0 2 - DO I @ U. -2 +LOOP # THEN ; #_ 32-bit version head dots,2,".s",docolon,words .word spfetch,s0,minus,qbranch,dots2 .word spfetch,s0,lit,4,minus,xdo dots1: .word ii,fetch,udot,lit,-4,xplusloop,dots1 dots2: .word exit #Z COLD -- cold start Forth system # UINIT U0 #INIT CMOVE init user area # 80 COUNT INTERPRET interpret CP/M cmd # ." Z80 CamelForth etc." # ABORT ; head cold,4,cold,docolon,dots .word uinit,u0,ninit,cmove .word xsquote .byte 28 .ascii "type forth my friend... " .byte 0x0a .align .word type,s0,spstore,quit /* abort never returns */
31.458617
74
0.576328
b500b9853aa85de273ad9f0bde8f7fe7bc18fe09
6,021
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_1156_1849.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_1156_1849.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_1156_1849.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 %rbp push %rcx push %rdi push %rsi lea addresses_WT_ht+0x529d, %rsi lea addresses_A_ht+0x1c367, %rdi nop nop nop nop xor $23532, %r12 mov $4, %rcx rep movsl dec %r11 lea addresses_WT_ht+0xaa2d, %rsi lea addresses_UC_ht+0x10c3d, %rdi nop cmp %rax, %rax mov $22, %rcx rep movsq nop nop nop nop nop xor %rcx, %rcx lea addresses_D_ht+0x259d, %rsi lea addresses_D_ht+0x1d35d, %rdi nop nop nop add %r10, %r10 mov $55, %rcx rep movsw nop and $21907, %rsi lea addresses_WT_ht+0x12c41, %r11 nop add $23925, %rdi mov (%r11), %eax nop nop add %rcx, %rcx lea addresses_WC_ht+0x14f9d, %rsi lea addresses_UC_ht+0x1ac9d, %rdi nop nop nop nop nop cmp %rbp, %rbp mov $34, %rcx rep movsl nop nop nop nop nop add %r11, %r11 lea addresses_A_ht+0x18d1d, %rdi nop nop sub $45626, %r12 mov $0x6162636465666768, %rax movq %rax, %xmm4 vmovups %ymm4, (%rdi) nop nop nop nop add $32865, %r10 pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r12 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r14 push %r15 push %r9 push %rbx push %rcx push %rdi // Store mov $0x898340000000a9d, %r10 nop nop nop add %r14, %r14 mov $0x5152535455565758, %rdi movq %rdi, (%r10) nop nop sub $61751, %r15 // Store lea addresses_RW+0x1ebdc, %rbx sub $21910, %rdi movb $0x51, (%rbx) nop nop add %r14, %r14 // Faulty Load lea addresses_RW+0x1089d, %r15 nop nop nop xor $22002, %r9 mov (%r15), %ebx lea oracles, %r9 and $0xff, %rbx shlq $12, %rbx mov (%r9,%rbx,1), %rbx pop %rdi pop %rcx pop %rbx pop %r9 pop %r15 pop %r14 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 9, 'same': False, 'type': 'addresses_NC'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': False, 'type': 'addresses_RW'}, 'OP': 'STOR'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': True, 'type': 'addresses_RW'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 9, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'src': {'congruent': 4, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 4, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'} {'src': {'congruent': 8, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 2, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 8, 'same': False, 'type': 'addresses_WC_ht'}, 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 3, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'} {'32': 1156} 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 */
38.596154
2,999
0.659525
3f0a3bdf9be3655f91eed6f5b91983d338828e90
4,169
asm
Assembly
source/entity/greywolf.asm
evanbowman/Red
85735269a46757305a81ad39f47034bc6cd97846
[ "BSD-2-Clause" ]
5
2021-08-30T16:18:55.000Z
2021-10-30T20:23:32.000Z
source/entity/greywolf.asm
evanbowman/gbc-project
85735269a46757305a81ad39f47034bc6cd97846
[ "BSD-2-Clause" ]
null
null
null
source/entity/greywolf.asm
evanbowman/gbc-project
85735269a46757305a81ad39f47034bc6cd97846
[ "BSD-2-Clause" ]
null
null
null
;;; $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ;;; ;;; ASM Source code for Red GBC, by Evan Bowman, 2021 ;;; ;;; ;;; The following licence covers the source code included in this file. The ;;; game's characters and artwork belong to Evan Bowman, and should not be used ;;; without permission. ;;; ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions are met: ;;; ;;; 1. Redistributions of source code must retain the above copyright notice, ;;; this list of conditions and the following disclaimer. ;;; ;;; 2. Redistributions in binary form must reproduce the above copyright notice, ;;; this list of conditions and the following disclaimer in the documentation ;;; and/or other materials provided with the distribution. ;;; ;;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ;;; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ;;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ;;; ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ;;; LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ;;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ;;; SUBSTITUTE GOODS OR SERVICES LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ;;; CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ;;; ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ;;; POSSIBILITY OF SUCH DAMAGE. ;;; ;;; $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ GREYWOLF_VAR_COLOR_COUNTER EQU 0 GREYWOLF_VAR_COUNTER EQU 1 GREYWOLF_VAR_STAMINA EQU 2 ; \ GREYWOLF_VAR_STAMINA2 EQU 3 ; | Fixnum GREYWOLF_VAR_STAMINA3 EQU 4 ; / GREYWOLF_VAR_SLAB EQU 5 GREYWOLF_VAR_KNOCKBACK EQU 6 GREYWOLF_VAR_KNOCKBACK_DIR EQU 7 GREYWOLF_VAR_REPEAT_STUNS EQU 8 ;;; Bytes 9 - 14 currently unused. GREYWOLF_VAR_MAX EQU 14 ;;; Make sure vars fit within available entity slack space. STATIC_ASSERT((GREYWOLF_VAR_MAX + 1) <= (32 - ENTITY_SIZE)) ;;; ---------------------------------------------------------------------------- GreywolfUpdate: ;;; bc - self LONG_CALL r9_GreywolfUpdateIdleImpl jp EntityUpdateLoopResume ;;; ---------------------------------------------------------------------------- GreywolfUpdateRunSeekX: ;;; bc - self LONG_CALL r9_GreywolfUpdateRunXImpl jp EntityUpdateLoopResume GreywolfUpdateRunSeekY: ;;; bc - self LONG_CALL r9_GreywolfUpdateRunYImpl jp EntityUpdateLoopResume ;;; ---------------------------------------------------------------------------- GreywolfUpdateStunned: ;;; bc - self LONG_CALL r9_GreywolfUpdateStunnedImpl jp EntityUpdateLoopResume ;;; ---------------------------------------------------------------------------- GreywolfUpdateAttacking: ;;; bc - self LONG_CALL r9_GreywolfUpdateAttackingImpl jp EntityUpdateLoopResume ;;; ---------------------------------------------------------------------------- GreywolfUpdatePause: ;;; bc - self ld h, b ld l, c ld bc, GREYWOLF_VAR_COUNTER fcall EntityGetSlack ld a, [bc] dec a ld [bc], a cp 0 jr Z, .idle jp EntityUpdateLoopResume .idle: ld de, GreywolfUpdate fcall EntitySetUpdateFn jp EntityUpdateLoopResume ;;; ---------------------------------------------------------------------------- GreywolfUpdateDying: ;;; bc - self LONG_CALL r9_GreywolfUpdateDyingImpl jp EntityUpdateLoopResume ;;; ---------------------------------------------------------------------------- GreywolfUpdateDead: LONG_CALL r9_GreywolfUpdateDeadImpl jp EntityUpdateLoopResume ;;; ----------------------------------------------------------------------------
29.992806
80
0.561765
954fc29df113b2c5aed118da58305930e9fbe233
575
asm
Assembly
oeis/010/A010994.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/010/A010994.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/010/A010994.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A010994: a(n) = binomial coefficient C(n,41). ; 1,42,903,13244,148995,1370754,10737573,73629072,450978066,2505433700,12777711870,60403728840,266783135710,1108176102180,4353548972850,16253249498640,57902201338905,197548686920970,647520696018735,2044802197953900,6236646703759395,18412956934908690,52728013040874885,146721427591999680,397370533061665800,1049058207282797712,2703342303382594104,6808417652963570336,16777886359088798328,40498346384007444240,95846086442150951368,222610265284995758016,507829667681396572974,1138769557831010496972 mov $1,$0 add $0,41 bin $0,$1
82.142857
495
0.883478
fb8616cbe3f39287ade1f84693c24d5d3b0e660b
4,600
asm
Assembly
aux/2600/supercharger_bios/bios.asm
6502ts/6502.ts
6f923e5fe693b82a2448ffac1f85aea9693cacff
[ "MIT" ]
49
2016-12-26T15:49:28.000Z
2022-01-21T06:43:48.000Z
aux/2600/supercharger_bios/bios.asm
6502ts/6502.ts
6f923e5fe693b82a2448ffac1f85aea9693cacff
[ "MIT" ]
48
2016-09-14T22:37:24.000Z
2020-09-25T21:53:28.000Z
aux/2600/supercharger_bios/bios.asm
6502ts/6502.ts
6f923e5fe693b82a2448ffac1f85aea9693cacff
[ "MIT" ]
4
2017-01-27T01:46:50.000Z
2022-03-29T12:10:32.000Z
;; ========================================================================== ;; This file is part of 6502.ts, an emulator for 6502 based systems built ;; in Typescript ;; ;; Copyright (c) 2014 -- 2020 Christian Speckner and contributors ;; ;; Permission is hereby granted, free of charge, to any person obtaining a copy ;; of this software and associated documentation files (the "Software"), to deal ;; in the Software without restriction, including without limitation the rights ;; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ;; copies of the Software, and to permit persons to whom the Software is ;; furnished to do so, subject to the following conditions: ;; ;; The above copyright notice and this permission notice shall be included in all ;; copies or substantial portions of the Software. ;; ;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ;; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ;; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ;; SOFTWARE. ;; ========================================================================== ;; Interface: ;; ;; * The BIOS code should be relocated to the beginning of the ROM bank ;; * The entry vector ($F807) must be patched into the last four bytes of the ;; ROM bank ;; * A canary value of zero must be placed at $FFFB ;; * The BIOS triggers the actual load by writing the requested multiload ID ;; $FFF9. The write originates from page zero. ;; * After loading, the following values must be patched into the ROM: ;; - $FFF0: control word ;; - $FFF1: a random value for A ;; - $FFF2 -- $FFF3: entry point ;; ========================================================================== processor 6502 VBLANK equ $01 SEG code ; === ; Entry point for multi-load reading ; === org $F800 ; Load the target bank and jump LDA $FA JMP load ; === ; System reset ; === org $F807 start: SEI CLD LDA #0 LDX #$FF TXS TAX TAY clearmem: ; the regular init dance STA $00,X INX BNE clearmem JMP load load: ; Blank the screen LDX #2 STX VBLANK ; Configure banking and enable RAM writes LDX $F006 STX $FFF8 ; Clear TIA registers LDY #$00 LDX #$28 tiaclr: STY $04,X DEX BPL tiaclr ; Clear memory (skip $80 though as it still contains the requested multiload ID) LDX #$80 LDY #0 clear: STY $0,X INX BNE clear ; Copy wait-for-load snipped to RIOT RAM (11 bytes) LDX #11 copywaitforload: LDY waitforload,X STY $F0,X DEX BPL copywaitforload ; Jump to wait-for-load JMP $F0 ; The load is done; copy the trampoline to RIOT RAM (6 bytes) prepareexec: LDX #6 copyexec: LDA execute,X STA $F0,X DEX BPL copyexec ; The cartridge emulation will provide the load parameters at 0xfff0 -- 0xfff3 ; Prepare the control byte LDX $FFF0 STX $80 LDY $F000,X ; Load random value for A LDA $FFF1 ; The entry point comes next; patch it into the trampoline LDX $FFF2 STX $F4 LDX $FFF3 STX $F5 ; Setup the registers (we have randomized A above) LDX #$FF LDY #0 TXS ; jump into the trampoline and continue execution JMP $F0 ; === ; Wait for the cartridge emulation to load the new multiload into RAM. ; This will be executed from RIOT RAM. ; === waitforload: ; Write the load ID to $FFF9. This will cause the cartridge emulation to ; copy in the new multiload STA $FFF9 wait: ; As long as the cartridge is busy, the data bus will be undriven, and the canary ; load will return $FB LDA $FFFB BNE wait ; We got 0? The cartridge is driving the bus again, so the load is finished, and ; we can continue JMP prepareexec ; === ; Trampoline ; ; Setup the control register and jump back into the code. This will be ; executed from RIOT RAM. ; === execute: ; Trigger the write to the control register... STA $FFF8 ; ... and jump. The address will be patched in. JMP $0000
27.218935
83
0.605652
8edd8a03d8c090e83216ad0ed016c1a076e74160
717
asm
Assembly
Modules/Module4/InputOutput/read_string.asm
hackettccp/CSCI213
c2b5c3e1b5f47fa329a59b0a7261ebeee8e64059
[ "MIT" ]
null
null
null
Modules/Module4/InputOutput/read_string.asm
hackettccp/CSCI213
c2b5c3e1b5f47fa329a59b0a7261ebeee8e64059
[ "MIT" ]
null
null
null
Modules/Module4/InputOutput/read_string.asm
hackettccp/CSCI213
c2b5c3e1b5f47fa329a59b0a7261ebeee8e64059
[ "MIT" ]
null
null
null
#Demonstrates reading a string .text la $a0, prompt #Loads starting address of prompt string to $a0 li $v0, 4 #Sets the syscall code for printing a string syscall la $a0, entry #Loads starting address of entry to $a0 li $a1, 1001 #Maximum string length (in bytes) li $v0, 8 #Sets the syscall code for reading a string syscall la $a0, output #Loads starting address of output string to $a0 li $v0, 4 #Sets the syscall code for printing a string syscall la $a0, entry #Loads starting address of entry string to $a0 li $v0, 4 #Sets the syscall code for printing a string syscall .data prompt: .asciiz "Enter a string: " output: .asciiz "You entered " entry: .space 1001 #1001 bytes of space
31.173913
64
0.72106
ec8c01e4b40b0ad6df49732a8aadd0001c2b67a9
337
asm
Assembly
libsrc/zx81/chroma81/zx_aaddrcup.asm
teknoplop/z88dk
bb03fbfd6b2ab0f397a1358559089f9cd3706485
[ "ClArtistic" ]
null
null
null
libsrc/zx81/chroma81/zx_aaddrcup.asm
teknoplop/z88dk
bb03fbfd6b2ab0f397a1358559089f9cd3706485
[ "ClArtistic" ]
null
null
null
libsrc/zx81/chroma81/zx_aaddrcup.asm
teknoplop/z88dk
bb03fbfd6b2ab0f397a1358559089f9cd3706485
[ "ClArtistic" ]
null
null
null
; uchar __FASTCALL__ *zx_aaddrcup(void *attraddr) ; Stefano, 2014.12 PUBLIC zx_aaddrcup EXTERN HRG_LineStart .zx_aaddrcup ; enter : hl = valid attribute address ; exit : hl = new attribute address up one character ; TODO: carry set if off screen IF FORlambda ld de,33 ELSE ld de,35 ENDIF and a sbc hl,de ret
15.318182
53
0.700297
2257a2fa101540d723b3e10b6ab04f03addd25bd
575
asm
Assembly
libsrc/_DEVELOPMENT/adt/ba_priority_queue/z80/asm_ba_priority_queue_size.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/adt/ba_priority_queue/z80/asm_ba_priority_queue_size.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/adt/ba_priority_queue/z80/asm_ba_priority_queue_size.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; =============================================================== ; Mar 2014 ; =============================================================== ; ; size_t ba_priority_queue_size(ba_priority_queue_t *q) ; ; Return the size of the queue in bytes. ; ; =============================================================== SECTION code_clib SECTION code_adt_ba_priority_queue PUBLIC asm_ba_priority_queue_size EXTERN l_readword_hl defc asm_ba_priority_queue_size = l_readword_hl - 4 ; enter : hl = priority_queue * ; ; exit : hl = size in bytes ; ; uses : a, hl
22.115385
65
0.476522
b356c9cf3d0f57ecc09df92b3825e34066ab7447
716
asm
Assembly
programs/oeis/017/A017306.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/017/A017306.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/017/A017306.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A017306: a(n) = (10*n + 3)^2. ; 9,169,529,1089,1849,2809,3969,5329,6889,8649,10609,12769,15129,17689,20449,23409,26569,29929,33489,37249,41209,45369,49729,54289,59049,64009,69169,74529,80089,85849,91809,97969,104329,110889,117649,124609,131769,139129,146689,154449,162409,170569,178929,187489,196249,205209,214369,223729,233289,243049,253009,263169,273529,284089,294849,305809,316969,328329,339889,351649,363609,375769,388129,400689,413449,426409,439569,452929,466489,480249,494209,508369,522729,537289,552049,567009,582169,597529,613089,628849,644809,660969,677329,693889,710649,727609,744769,762129,779689,797449,815409,833569,851929,870489,889249,908209,927369,946729,966289,986049 mul $0,10 add $0,3 pow $0,2
102.285714
654
0.814246
7a449ecc9474d008891dab2ae2438011dc714432
682
asm
Assembly
oeis/275/A275549.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/275/A275549.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/275/A275549.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A275549: Number of classes of endofunctions of [n] under reversal. ; Submitted by Jon Maiga ; 1,1,3,18,136,1625,23436,412972,8390656,193739769,5000050000,142656721086,4458051717120,151437584670385,5556003465485760,218946946471875000,9223372039002259456,413620131002462320337,19673204037747448432896,989209827833222327690890,52428800000005120000000000,2921293509193166399440833321,170713938682110070857474067456,10440233999923966974489732465444,666867888425142080484714454450176,44408920985006262362003326416015625,3078059790103578656638913580801970176,221713244121518885028834309875331126006 mov $1,$0 mov $2,$0 pow $0,$0 add $2,1 div $2,2 pow $1,$2 add $1,$0 mov $0,$1 div $0,2
48.714286
499
0.860704
b6612afda9476b587a9be95c1bca011b442704ae
45,486
asm
Assembly
extra/ArkosTrackerPlayer_CPC_MSX.asm
sikorama/still_scrolling
e8305a3cf4a58e27c213295aa55c2049f385ebc1
[ "MIT" ]
null
null
null
extra/ArkosTrackerPlayer_CPC_MSX.asm
sikorama/still_scrolling
e8305a3cf4a58e27c213295aa55c2049f385ebc1
[ "MIT" ]
null
null
null
extra/ArkosTrackerPlayer_CPC_MSX.asm
sikorama/still_scrolling
e8305a3cf4a58e27c213295aa55c2049f385ebc1
[ "MIT" ]
null
null
null
OPTIM_SIKO EQU 1 list ;*** Start of Arkos Tracker Player nolist ;org #1000 ; Arkos Tracker Player V1.01 - CPC & MSX version. ; 21/09/09 ; Code By Targhan/Arkos. ; PSG registers sendings based on Madram/Overlander's optimisation trick. ; Restoring interruption status snippet by Grim/Arkos. ; V1.01 additions ; --------------- ; - Small (but not useless !) optimisations by Grim/Arkos at the PLY_Track1_WaitCounter / PLY_Track2_WaitCounter / PLY_Track3_WaitCounter labels. ; - Optimisation of the R13 management by Grim/Arkos. ; This player can adapt to the following machines = ; Amstrad CPC and MSX. ; Output codes are specific, as well as the frequency tables. ; This player modifies all these registers = HL, DE, BC, AF, HL', DE', BC', AF', IX, IY. ; The Stack is used in conventionnal manners (Call, Ret, Push, Pop) so integration with any of your code should be seamless. ; The player does NOT modifies the Interruption state, unless you use the PLY_SystemFriendly flag, which will cut the ; interruptions at the beginning, and will restore them ONLY IF NEEDED. ; Basically, there are three kind of players. ; ASM ; --- ; Used in your Asm productions. You call the Player by yourself, you don't care if all the registers are modified. ; Set PLY_SystemFriendly and PLY_UseFirmwareInterruptions to 0. ; In Assembler = ; ld de,MusicAddress ; call Player / PLY_Init to initialise the player with your song. ; then ; call Player + 3 / PLY_Play whenever you want to play/continue the song. ; call Player + 6 / PLY_Stop to stop the song. ; BASIC ; ----- ; Used in Basic (on CPC), or under the helm of any OS. Interruptions will be cut by the player, but restored ONLY IF NECESSARY. ; Also, some registers are saved (AF', BC', IX and IY), as they are used by the CPC Firmware. ; If you need to add/remove more registers, take care to do it at PLY_Play, but also at PLY_Stop. ; Registers are restored at PLY_PSGREG13_RecoverSystemRegisters. ; Set PLY_SystemFriendly to 1 and PLY_UseFirmwareInterruptions to 0. ; The Calls in Assembler are the same as above. ; In Basic = ; call Player, MusicAddress to initialise the player with your song. ; then ; call Player + 3 whenever you want to play/continue the song. ; call Player + 6 to stop the song. ; INTERRUPTIONS ; ------------- ; CPC Only ! Uses the Firmware Interruptions to put the Player on interruption. Very useful in Basic. ; Set PLY_SystemFriendly and PLY_UseFirmwareInterruptions to 1. ; In Assembler = ; ld de,MusicAddress ; call Player / PLY_InterruptionOn to play the song from start. ; call Player + 3 / PLY_InterruptionOff to stop the song. ; call Player + 6 / PLY_InterruptionContinue to continue the song once it's been stopped. ; In Basic= ; call Player, MusicAddress to play the song from start. ; call Player + 3 to stop the song. ; call Player + 6 to continue the song once it's been stopped. ; FADES IN/OUT ; ------------ ; The player allows the volume to be modified. It provides the interface, but you'll have to set the volume by yourself. ; Set PLY_UseFades to 1. ; In Assembler = ; ld e,Volume (0=full volume, 16 or more=no volume) ; call PLY_SetFadeValue ; In Basic = ; call Player + 9 (or + 18, see just below), Volume (0=full volume, 16 or more=no volume) ; WARNING ! You must call Player + 18 if PLY_UseBasicSoundEffectInterface is set to 1. ; SOUND EFFECTS ; ------------- ; The player manages Sound Effects. They must be defined in another song, generated as a "SFX Music" in the Arkos Tracker. ; Set the PLY_UseSoundEffects to 1. If you want to use sound effects in Basic, set PLY_UseBasicSoundEffectInterface to 1. ; In Assembler = ; ld de,SFXMusicAddress ; call PLY_SFX_Init to initialise the SFX Song. ; Then initialise and play the "music" song normally. ; To play a sound effect = ; A = No Channel (0,1,2) ; L = SFX Number (>0) ; H = Volume (0...F) ; E = Note (0...143) ; D = Speed (0 = As original, 1...255 = new Speed (1 is the fastest)) ; BC = Inverted Pitch (-#FFFF -> FFFF). 0 is no pitch. The higher the pitch, the lower the sound. ; call PLY_SFX_Play ; To stop a sound effect = ; ld e,No Channel (0,1,2) ; call PLY_SFX_Stop ; To stop the sound effects on all the channels = ; call PLY_SFX_StopAll ; In Basic = ; call Player + 9, SFXMusicAddress to initialise the SFX Song. ; To play a sound effect = ; call Player + 12, No Channel, SFX Number, Volume, Note, Speed, Inverted Pitch. No parameter should be ommited ! ; To stop a sound effect = ; call Player + 15, No Channel (0,1,2) ; For more information, check the manual. ; Any question, complaint, a need to reward ? Write to contact@julien-nevo.com PLY_UseCPCMachine equ 1 ;Indicates what frequency table and output code to use. 1 to use it. PLY_UseMSXMachine equ 0 PLY_UseSoundEffects equ 0 ;Set to 1 if you want to use Sound Effects in your player. Both CPU and memory consuming. PLY_UseFades equ 0 ;Set to 1 to allow fades in/out. A little CPU and memory consuming. ;PLY_SetFadeValue becomes available. PLY_SystemFriendly equ 0 ;Set to 1 if you want to save the Registers used by AMSDOS (AF', BC', IX, IY) ;(which allows you to call this player in BASIC) ;As this option is system-friendly, it cuts the interruption, and restore them ONLY IF NECESSARY. PLY_UseFirmwareInterruptions equ 0 ;Set to 1 to use a Player under interruption. Only works on CPC, as it uses the CPC Firmware. ;WARNING, PLY_SystemFriendly must be set to 1 if you use the Player under interruption ! ;SECOND WARNING, make sure the player is above #3fff, else it won't be played (system limitation). PLY_UseBasicSoundEffectInterface equ 0 ;Set to 1 if you want a little interface to be added if you are a BASIC programmer who wants ;to use sound effects. Of course, you must also set PLY_UseSoundEffects to 1. PLY_RetrigValue equ #fe ;Value used to trigger the Retrig of Register 13. #FE corresponds to CP xx. Do not change it ! Player if PLY_UseFirmwareInterruptions ;******* Interruption Player ******** ;You can remove these JPs if using the sub-routines directly. jp PLY_InterruptionOn ;Call Player = Start Music. jp PLY_InterruptionOff ;Call Player + 3 = Stop Music. jp PLY_InterruptionContinue ;Call Player + 6 = Continue (after stopping). if PLY_UseBasicSoundEffectInterface jp PLY_SFX_Init ;Call Player + 9 to initialise the sound effect music. jp PLY_BasicSoundEffectInterface_PlaySound ;Call Player + 12 to add sound effect in BASIC. jp PLY_SFX_Stop ;Call Player + 15 to stop a sound effect. endif if PLY_UseFades jp PLY_SetFadeValue ;Call Player + 9 or + 18 to set Fades values. endif PLY_InterruptionOn call PLY_Init ld hl,PLY_Interruption_Convert PLY_ReplayFrequency ld de,0 ld a,d ld (PLY_Interruption_Cpt + 1),a add hl,de ld a,(hl) ;Chope nbinter wait ld (PLY_Interruption_Value + 1),a PLY_InterruptionContinue ld hl,PLY_Interruption_ControlBloc ld bc,%10000001*256+0 ld de,PLY_Interruption_Play jp #bce0 PLY_InterruptionOff ld hl,PLY_Interruption_ControlBloc call #bce6 jp PLY_Stop PLY_Interruption_ControlBloc defs 10,0 ;Buffer used by the OS. ;Code run by the OS on each interruption. PLY_Interruption_Play di PLY_Interruption_Cpt ld a,0 ;Run the player only if it has to, according to the music frequency. PLY_Interruption_Value cp 5 jr z,PLY_Interruption_NoWait inc a ld (PLY_Interruption_Cpt + 1),a ret PLY_Interruption_NoWait xor a ld (PLY_Interruption_Cpt + 1),a jp PLY_Play ;Table to convert PLY_ReplayFrequency into a Frequency value for the AMSDOS. PLY_Interruption_Convert defb 17, 11, 5, 2, 1, 0 else ;***** Normal Player ***** ;To be called when you want. ;You can remove these following JPs if using the sub-routines directly. jp PLY_Init ;Call Player = Initialise song (DE = Song address). jp PLY_Play ;Call Player + 3 = Play song. jp PLY_Stop ;Call Player + 6 = Stop song. endif if PLY_UseBasicSoundEffectInterface jp PLY_SFX_Init ;Call Player + 9 to initialise the sound effect music. jp PLY_BasicSoundEffectInterface_PlaySound ;Call Player + 12 to add sound effect in BASIC. jp PLY_SFX_Stop ;Call Player + 15 to stop a sound effect. endif if PLY_UseFades jp PLY_SetFadeValue ;Call Player + 9 or + 18 to set Fades values. endif PLY_Digidrum db 0 ;Read here to know if a Digidrum has been played (0=no). PLY_Play if PLY_SystemFriendly call PLY_DisableInterruptions ex af,af' exx push af push bc push ix push iy endif xor a ld (PLY_Digidrum),a ;Reset the Digidrum flag. ;Manage Speed. If Speed counter is over, we have to read the Pattern further. PLY_SpeedCpt ld a,1 dec a jp nz,PLY_SpeedEnd ;Moving forward in the Pattern. Test if it is not over. PLY_HeightCpt ld a,1 dec a jr nz,PLY_HeightEnd ;Pattern Over. We have to read the Linker. ;Get the Transpositions, if they have changed, or detect the Song Ending ! PLY_Linker_PT ld hl,0 ld a,(hl) inc hl rra jr nc,PLY_SongNotOver ;Song over ! We read the address of the Loop point. ld a,(hl) inc hl ld h,(hl) ld l,a ld a,(hl) ;We know the Song won't restart now, so we can skip the first bit. inc hl rra PLY_SongNotOver rra jr nc,PLY_NoNewTransposition1 ld de,PLY_Transposition1 + 1 ldi PLY_NoNewTransposition1 rra jr nc,PLY_NoNewTransposition2 ld de,PLY_Transposition2 + 1 ldi PLY_NoNewTransposition2 rra jr nc,PLY_NoNewTransposition3 ld de,PLY_Transposition3 + 1 ldi PLY_NoNewTransposition3 ;Get the Tracks addresses. ld de,PLY_Track1_PT + 1 ldi ldi ld de,PLY_Track2_PT + 1 ldi ldi ld de,PLY_Track3_PT + 1 ldi ldi ;Get the Special Track address, if it has changed. rra jr nc,PLY_NoNewHeight ld de,PLY_Height + 1 ldi PLY_NoNewHeight rra jr nc,PLY_NoNewSpecialTrack PLY_NewSpecialTrack ld e,(hl) inc hl ld d,(hl) inc hl ld (PLY_SaveSpecialTrack + 1),de PLY_NoNewSpecialTrack ld (PLY_Linker_PT + 1),hl PLY_SaveSpecialTrack ld hl,0 ld (PLY_SpecialTrack_PT + 1),hl ;Reset the SpecialTrack/Tracks line counter. ;We can't rely on the song data, because the Pattern Height is not related to the Tracks Height. ld a,1 ld (PLY_SpecialTrack_WaitCounter + 1),a ld (PLY_Track1_WaitCounter + 1),a ld (PLY_Track2_WaitCounter + 1),a ld (PLY_Track3_WaitCounter + 1),a PLY_Height ld a,1 PLY_HeightEnd ld (PLY_HeightCpt + 1),a ;Read the Special Track/Tracks. ;------------------------------ ;Read the Special Track. PLY_SpecialTrack_WaitCounter ld a,1 dec a jr nz,PLY_SpecialTrack_Wait PLY_SpecialTrack_PT ld hl,0 ld a,(hl) inc hl srl a ;Data (1) or Wait (0) ? jr nc,PLY_SpecialTrack_NewWait ;If Wait, A contains the Wait value. if OPTIM_SIKO==0 ;Data. Effect Type ? srl a ;Speed (0) or Digidrum (1) ? ;First, we don't test the Effect Type, but only the Escape Code (=0) jr nz,PLY_SpecialTrack_NoEscapeCode ld a,(hl) inc hl PLY_SpecialTrack_NoEscapeCode ;Now, we test the Effect type, since the Carry didn't change. jr nc,PLY_SpecialTrack_Speed ld (PLY_Digidrum),a jr PLY_PT_SpecialTrack_EndData endif PLY_SpecialTrack_Speed ld (PLY_Speed + 1),a PLY_PT_SpecialTrack_EndData ld a,1 PLY_SpecialTrack_NewWait ld (PLY_SpecialTrack_PT + 1),hl PLY_SpecialTrack_Wait ld (PLY_SpecialTrack_WaitCounter + 1),a ;Read the Track 1. ;----------------- ;Store the parameters, because the player below is called every frame, but the Read Track isn't. PLY_Track1_WaitCounter ld a,1 dec a jr nz,PLY_Track1_NewInstrument_SetWait PLY_Track1_PT ld hl,0 call PLY_ReadTrack ld (PLY_Track1_PT + 1),hl jr c,PLY_Track1_NewInstrument_SetWait ;No Wait command. Can be a Note and/or Effects. ld a,d ;Make a copy of the flags+Volume in A, not to temper with the original. rra ;Volume ? If bit 4 was 1, then volume exists on b3-b0 jr nc,PLY_Track1_SameVolume and %1111 ld (PLY_Track1_Volume),a PLY_Track1_SameVolume rl d ;New Pitch ? jr nc,PLY_Track1_NoNewPitch ld (PLY_Track1_PitchAdd + 1),ix PLY_Track1_NoNewPitch rl d ;Note ? If no Note, we don't have to test if a new Instrument is here. jr nc,PLY_Track1_NoNoteGiven ld a,e PLY_Transposition1 add a,0 ;Transpose Note according to the Transposition in the Linker. ld (PLY_Track1_Note),a ld hl,0 ;Reset the TrackPitch. ld (PLY_Track1_Pitch + 1),hl rl d ;New Instrument ? jr c,PLY_Track1_NewInstrument PLY_Track1_SavePTInstrument ld hl,0 ;Same Instrument. We recover its address to restart it. ld a,(PLY_Track1_InstrumentSpeed + 1) ;Reset the Instrument Speed Counter. Never seemed useful... ld (PLY_Track1_InstrumentSpeedCpt + 1),a jr PLY_Track1_InstrumentResetPT PLY_Track1_NewInstrument ;New Instrument. We have to get its new address, and Speed. ld l,b ;H is already set to 0 before. add hl,hl PLY_Track1_InstrumentsTablePT ld bc,0 add hl,bc ld a,(hl) ;Get Instrument address. inc hl ld h,(hl) ld l,a ld a,(hl) ;Get Instrument speed. inc hl ld (PLY_Track1_InstrumentSpeed + 1),a ld (PLY_Track1_InstrumentSpeedCpt + 1),a ld a,(hl) or a ;Get IsRetrig?. Code it only if different to 0, else next Instruments are going to overwrite it. jr z,$+5 ld (PLY_PSGReg13_Retrig + 1),a inc hl ld (PLY_Track1_SavePTInstrument + 1),hl ;When using the Instrument again, no need to give the Speed, it is skipped. PLY_Track1_InstrumentResetPT ld (PLY_Track1_Instrument + 1),hl PLY_Track1_NoNoteGiven ld a,1 PLY_Track1_NewInstrument_SetWait ld (PLY_Track1_WaitCounter + 1),a ;Read the Track 2. ;----------------- ;Store the parameters, because the player below is called every frame, but the Read Track isn't. PLY_Track2_WaitCounter ld a,1 dec a jr nz,PLY_Track2_NewInstrument_SetWait PLY_Track2_PT ld hl,0 call PLY_ReadTrack ld (PLY_Track2_PT + 1),hl jr c,PLY_Track2_NewInstrument_SetWait ;No Wait command. Can be a Note and/or Effects. ld a,d ;Make a copy of the flags+Volume in A, not to temper with the original. rra ;Volume ? If bit 4 was 1, then volume exists on b3-b0 jr nc,PLY_Track2_SameVolume and %1111 ld (PLY_Track2_Volume),a PLY_Track2_SameVolume rl d ;New Pitch ? jr nc,PLY_Track2_NoNewPitch ld (PLY_Track2_PitchAdd + 1),ix PLY_Track2_NoNewPitch rl d ;Note ? If no Note, we don't have to test if a new Instrument is here. jr nc,PLY_Track2_NoNoteGiven ld a,e PLY_Transposition2 add a,0 ;Transpose Note according to the Transposition in the Linker. ld (PLY_Track2_Note),a ld hl,0 ;Reset the TrackPitch. ld (PLY_Track2_Pitch + 1),hl rl d ;New Instrument ? jr c,PLY_Track2_NewInstrument PLY_Track2_SavePTInstrument ld hl,0 ;Same Instrument. We recover its address to restart it. ld a,(PLY_Track2_InstrumentSpeed + 1) ;Reset the Instrument Speed Counter. Never seemed useful... ld (PLY_Track2_InstrumentSpeedCpt + 1),a jr PLY_Track2_InstrumentResetPT PLY_Track2_NewInstrument ;New Instrument. We have to get its new address, and Speed. ld l,b ;H is already set to 0 before. add hl,hl PLY_Track2_InstrumentsTablePT ld bc,0 add hl,bc ld a,(hl) ;Get Instrument address. inc hl ld h,(hl) ld l,a ld a,(hl) ;Get Instrument speed. inc hl ld (PLY_Track2_InstrumentSpeed + 1),a ld (PLY_Track2_InstrumentSpeedCpt + 1),a ld a,(hl) or a ;Get IsRetrig?. Code it only if different to 0, else next Instruments are going to overwrite it. jr z,$+5 ld (PLY_PSGReg13_Retrig + 1),a inc hl ld (PLY_Track2_SavePTInstrument + 1),hl ;When using the Instrument again, no need to give the Speed, it is skipped. PLY_Track2_InstrumentResetPT ld (PLY_Track2_Instrument + 1),hl PLY_Track2_NoNoteGiven ld a,1 PLY_Track2_NewInstrument_SetWait ld (PLY_Track2_WaitCounter + 1),a ;Read the Track 3. ;----------------- ;Store the parameters, because the player below is called every frame, but the Read Track isn't. PLY_Track3_WaitCounter ld a,1 dec a jr nz,PLY_Track3_NewInstrument_SetWait PLY_Track3_PT ld hl,0 call PLY_ReadTrack ld (PLY_Track3_PT + 1),hl jr c,PLY_Track3_NewInstrument_SetWait ;No Wait command. Can be a Note and/or Effects. ld a,d ;Make a copy of the flags+Volume in A, not to temper with the original. rra ;Volume ? If bit 4 was 1, then volume exists on b3-b0 jr nc,PLY_Track3_SameVolume and %1111 ld (PLY_Track3_Volume),a PLY_Track3_SameVolume rl d ;New Pitch ? jr nc,PLY_Track3_NoNewPitch ld (PLY_Track3_PitchAdd + 1),ix PLY_Track3_NoNewPitch rl d ;Note ? If no Note, we don't have to test if a new Instrument is here. jr nc,PLY_Track3_NoNoteGiven ld a,e PLY_Transposition3 add a,0 ;Transpose Note according to the Transposition in the Linker. ld (PLY_Track3_Note),a ld hl,0 ;Reset the TrackPitch. ld (PLY_Track3_Pitch + 1),hl rl d ;New Instrument ? jr c,PLY_Track3_NewInstrument PLY_Track3_SavePTInstrument ld hl,0 ;Same Instrument. We recover its address to restart it. ld a,(PLY_Track3_InstrumentSpeed + 1) ;Reset the Instrument Speed Counter. Never seemed useful... ld (PLY_Track3_InstrumentSpeedCpt + 1),a jr PLY_Track3_InstrumentResetPT PLY_Track3_NewInstrument ;New Instrument. We have to get its new address, and Speed. ld l,b ;H is already set to 0 before. add hl,hl PLY_Track3_InstrumentsTablePT ld bc,0 add hl,bc ld a,(hl) ;Get Instrument address. inc hl ld h,(hl) ld l,a ld a,(hl) ;Get Instrument speed. inc hl ld (PLY_Track3_InstrumentSpeed + 1),a ld (PLY_Track3_InstrumentSpeedCpt + 1),a ld a,(hl) or a ;Get IsRetrig?. Code it only if different to 0, else next Instruments are going to overwrite it. jr z,$+5 ld (PLY_PSGReg13_Retrig + 1),a inc hl ld (PLY_Track3_SavePTInstrument + 1),hl ;When using the Instrument again, no need to give the Speed, it is skipped. PLY_Track3_InstrumentResetPT ld (PLY_Track3_Instrument + 1),hl PLY_Track3_NoNoteGiven ld a,1 PLY_Track3_NewInstrument_SetWait ld (PLY_Track3_WaitCounter + 1),a PLY_Speed ld a,1 PLY_SpeedEnd ld (PLY_SpeedCpt + 1),a ;Play the Sound on Track 3 ;------------------------- ;Plays the sound on each frame, but only save the forwarded Instrument pointer when Instrument Speed is reached. ;This is needed because TrackPitch is involved in the Software Frequency/Hardware Frequency calculation, and is calculated every frame. ld iy,PLY_PSGRegistersArray + 4 PLY_Track3_Pitch ld hl,0 PLY_Track3_PitchAdd ld de,0 add hl,de ld (PLY_Track3_Pitch + 1),hl sra h ;Shift the Pitch to slow its speed. rr l sra h rr l ex de,hl exx PLY_Track3_Volume equ $+2 PLY_Track3_Note equ $+1 ld de,0 ;D=Inverted Volume E=Note PLY_Track3_Instrument ld hl,0 call PLY_PlaySound PLY_Track3_InstrumentSpeedCpt ld a,1 dec a jr nz,PLY_Track3_PlayNoForward ld (PLY_Track3_Instrument + 1),hl PLY_Track3_InstrumentSpeed ld a,6 PLY_Track3_PlayNoForward ld (PLY_Track3_InstrumentSpeedCpt + 1),a ;*************************************** ;Play Sound Effects on Track 3 (only assembled used if PLY_UseSoundEffects is set to one) ;*************************************** if PLY_UseSoundEffects PLY_SFX_Track3_Pitch ld de,0 exx PLY_SFX_Track3_Volume equ $+2 PLY_SFX_Track3_Note equ $+1 ld de,0 ;D=Inverted Volume E=Note PLY_SFX_Track3_Instrument ld hl,0 ;If 0, no sound effect. ld a,l or h jr z,PLY_SFX_Track3_End ld a,1 ld (PLY_PS_EndSound_SFX + 1),a call PLY_PlaySound xor a ld (PLY_PS_EndSound_SFX + 1),a ld a,l ;If the new address is 0, the instrument is over. Speed is set in the process, we don't care. or h jr z,PLY_SFX_Track3_Instrument_SetAddress PLY_SFX_Track3_InstrumentSpeedCpt ld a,1 dec a jr nz,PLY_SFX_Track3_PlayNoForward PLY_SFX_Track3_Instrument_SetAddress ld (PLY_SFX_Track3_Instrument + 1),hl PLY_SFX_Track3_InstrumentSpeed ld a,6 PLY_SFX_Track3_PlayNoForward ld (PLY_SFX_Track3_InstrumentSpeedCpt + 1),a PLY_SFX_Track3_End endif ;****************************************** ld a,ixl ;Save the Register 7 of the Track 3. ex af,af' ;Play the Sound on Track 2 ;------------------------- ld iy,PLY_PSGRegistersArray + 2 PLY_Track2_Pitch ld hl,0 PLY_Track2_PitchAdd ld de,0 add hl,de ld (PLY_Track2_Pitch + 1),hl sra h ;Shift the Pitch to slow its speed. rr l sra h rr l ex de,hl exx PLY_Track2_Volume equ $+2 PLY_Track2_Note equ $+1 ld de,0 ;D=Inverted Volume E=Note PLY_Track2_Instrument ld hl,0 call PLY_PlaySound PLY_Track2_InstrumentSpeedCpt ld a,1 dec a jr nz,PLY_Track2_PlayNoForward ld (PLY_Track2_Instrument + 1),hl PLY_Track2_InstrumentSpeed ld a,6 PLY_Track2_PlayNoForward ld (PLY_Track2_InstrumentSpeedCpt + 1),a ;*************************************** ;Play Sound Effects on Track 2 (only assembled used if PLY_UseSoundEffects is set to one) ;*************************************** if PLY_UseSoundEffects PLY_SFX_Track2_Pitch ld de,0 exx PLY_SFX_Track2_Volume equ $+2 PLY_SFX_Track2_Note equ $+1 ld de,0 ;D=Inverted Volume E=Note PLY_SFX_Track2_Instrument ld hl,0 ;If 0, no sound effect. ld a,l or h jr z,PLY_SFX_Track2_End ld a,1 ld (PLY_PS_EndSound_SFX + 1),a call PLY_PlaySound xor a ld (PLY_PS_EndSound_SFX + 1),a ld a,l ;If the new address is 0, the instrument is over. Speed is set in the process, we don't care. or h jr z,PLY_SFX_Track2_Instrument_SetAddress PLY_SFX_Track2_InstrumentSpeedCpt ld a,1 dec a jr nz,PLY_SFX_Track2_PlayNoForward PLY_SFX_Track2_Instrument_SetAddress ld (PLY_SFX_Track2_Instrument + 1),hl PLY_SFX_Track2_InstrumentSpeed ld a,6 PLY_SFX_Track2_PlayNoForward ld (PLY_SFX_Track2_InstrumentSpeedCpt + 1),a PLY_SFX_Track2_End endif ;****************************************** ex af,af' add a,a ;Mix Reg7 from Track2 with Track3, making room first. or ixl rla ex af,af' ;Play the Sound on Track 1 ;------------------------- ld iy,PLY_PSGRegistersArray PLY_Track1_Pitch ld hl,0 PLY_Track1_PitchAdd ld de,0 add hl,de ld (PLY_Track1_Pitch + 1),hl sra h ;Shift the Pitch to slow its speed. rr l sra h rr l ex de,hl exx PLY_Track1_Volume equ $+2 PLY_Track1_Note equ $+1 ld de,0 ;D=Inverted Volume E=Note PLY_Track1_Instrument ld hl,0 call PLY_PlaySound PLY_Track1_InstrumentSpeedCpt ld a,1 dec a jr nz,PLY_Track1_PlayNoForward ld (PLY_Track1_Instrument + 1),hl PLY_Track1_InstrumentSpeed ld a,6 PLY_Track1_PlayNoForward ld (PLY_Track1_InstrumentSpeedCpt + 1),a ;*************************************** ;Play Sound Effects on Track 1 (only assembled used if PLY_UseSoundEffects is set to one) ;*************************************** if PLY_UseSoundEffects PLY_SFX_Track1_Pitch ld de,0 exx PLY_SFX_Track1_Volume equ $+2 PLY_SFX_Track1_Note equ $+1 ld de,0 ;D=Inverted Volume E=Note PLY_SFX_Track1_Instrument ld hl,0 ;If 0, no sound effect. ld a,l or h jr z,PLY_SFX_Track1_End ld a,1 ld (PLY_PS_EndSound_SFX + 1),a call PLY_PlaySound xor a ld (PLY_PS_EndSound_SFX + 1),a ld a,l ;If the new address is 0, the instrument is over. Speed is set in the process, we don't care. or h jr z,PLY_SFX_Track1_Instrument_SetAddress PLY_SFX_Track1_InstrumentSpeedCpt ld a,1 dec a jr nz,PLY_SFX_Track1_PlayNoForward PLY_SFX_Track1_Instrument_SetAddress ld (PLY_SFX_Track1_Instrument + 1),hl PLY_SFX_Track1_InstrumentSpeed ld a,6 PLY_SFX_Track1_PlayNoForward ld (PLY_SFX_Track1_InstrumentSpeedCpt + 1),a PLY_SFX_Track1_End endif ;*********************************** ex af,af' or ixl ;Mix Reg7 from Track3 with Track2+1. ;Send the registers to PSG. Various codes according to the machine used. PLY_SendRegisters ;A=Register 7 if PLY_UseMSXMachine ld b,a ld hl,PLY_PSGRegistersArray ;Register 0 xor a out (#a0),a ld a,(hl) out (#a1),a inc hl ;Register 1 ld a,1 out (#a0),a ld a,(hl) out (#a1),a inc hl ;Register 2 ld a,2 out (#a0),a ld a,(hl) out (#a1),a inc hl ;Register 3 ld a,3 out (#a0),a ld a,(hl) out (#a1),a inc hl ;Register 4 ld a,4 out (#a0),a ld a,(hl) out (#a1),a inc hl ;Register 5 ld a,5 out (#a0),a ld a,(hl) out (#a1),a inc hl ;Register 6 ld a,6 out (#a0),a ld a,(hl) out (#a1),a inc hl ;Register 7 ld a,7 out (#a0),a ld a,b ;Use the stored Register 7. out (#a1),a ;Register 8 ld a,8 out (#a0),a ld a,(hl) if PLY_UseFades PLY_Channel1_FadeValue sub 0 ;Set a value from 0 (full volume) to 16 or more (volume to 0). jr nc,$+3 xor a endif out (#a1),a inc hl inc hl ;Skip unused byte. ;Register 9 ld a,9 out (#a0),a ld a,(hl) if PLY_UseFades PLY_Channel2_FadeValue sub 0 ;Set a value from 0 (full volume) to 16 or more (volume to 0). jr nc,$+3 xor a endif out (#a1),a inc hl inc hl ;Skip unused byte. ;Register 10 ld a,10 out (#a0),a ld a,(hl) if PLY_UseFades PLY_Channel3_FadeValue sub 0 ;Set a value from 0 (full volume) to 16 or more (volume to 0). jr nc,$+3 xor a endif out (#a1),a inc hl ;Register 11 ld a,11 out (#a0),a ld a,(hl) out (#a1),a inc hl ;Register 12 ld a,12 out (#a0),a ld a,(hl) out (#a1),a inc hl ;Register 13 if PLY_SystemFriendly call PLY_PSGReg13_Code PLY_PSGREG13_RecoverSystemRegisters pop iy pop ix pop bc pop af exx ex af,af' ;Restore Interrupt status PLY_RestoreInterruption nop ;Will be automodified to an DI/EI. ret endif PLY_PSGReg13_Code ld a,13 out (#a0),a ld a,(hl) PLY_PSGReg13_Retrig cp 255 ;If IsRetrig?, force the R13 to be triggered. ret z out (#a1),a ld (PLY_PSGReg13_Retrig + 1),a ret endif if PLY_UseCPCMachine ld de,#c080 ld b,#f6 out (c),d ;#f6c0 exx ld hl,PLY_PSGRegistersArray ld e,#f6 ld bc,#f401 ;Register 0 defb #ed,#71 ;#f400+Register ld b,e defb #ed,#71 ;#f600 dec b outi ;#f400+value exx out (c),e ;#f680 out (c),d ;#f6c0 exx ;Register 1 out (c),c ld b,e defb #ed,#71 dec b outi exx out (c),e out (c),d exx inc c ;Register 2 out (c),c ld b,e defb #ed,#71 dec b outi exx out (c),e out (c),d exx inc c ;Register 3 out (c),c ld b,e defb #ed,#71 dec b outi exx out (c),e out (c),d exx inc c ;Register 4 out (c),c ld b,e defb #ed,#71 dec b outi exx out (c),e out (c),d exx inc c ;Register 5 out (c),c ld b,e defb #ed,#71 dec b outi exx out (c),e out (c),d exx inc c ;Register 6 out (c),c ld b,e defb #ed,#71 dec b outi exx out (c),e out (c),d exx inc c ;Register 7 out (c),c ld b,e defb #ed,#71 dec b dec b out (c),a ;Read A register instead of the list. exx out (c),e out (c),d exx inc c ;Register 8 out (c),c ld b,e defb #ed,#71 dec b if PLY_UseFades dec b ld a,(hl) PLY_Channel1_FadeValue sub 0 ;Set a value from 0 (full volume) to 16 or more (volume to 0). jr nc,$+6 defb #ed,#71 jr $+4 out (c),a inc hl else outi endif exx out (c),e out (c),d exx inc c inc hl ;Skip unused byte. ;Register 9 out (c),c ld b,e defb #ed,#71 dec b if PLY_UseFades ;If PLY_UseFades is set to 1, we manage the volume fade. dec b ld a,(hl) PLY_Channel2_FadeValue sub 0 ;Set a value from 0 (full volume) to 16 or more (volume to 0). jr nc,$+6 defb #ed,#71 jr $+4 out (c),a inc hl else outi endif exx out (c),e out (c),d exx inc c inc hl ;Skip unused byte. ;Register 10 out (c),c ld b,e defb #ed,#71 dec b if PLY_UseFades dec b ld a,(hl) PLY_Channel3_FadeValue sub 0 ;Set a value from 0 (full volume) to 16 or more (volume to 0). jr nc,$+6 defb #ed,#71 jr $+4 out (c),a inc hl else outi endif exx out (c),e out (c),d exx inc c ;Register 11 out (c),c ld b,e defb #ed,#71 dec b outi exx out (c),e out (c),d exx inc c ;Register 12 out (c),c ld b,e defb #ed,#71 dec b outi exx out (c),e out (c),d exx inc c ;Register 13 if PLY_SystemFriendly call PLY_PSGReg13_Code PLY_PSGREG13_RecoverSystemRegisters pop iy pop ix pop bc pop af exx ex af,af' ;Restore Interrupt status PLY_RestoreInterruption nop ;Will be automodified to an DI/EI. ret endif PLY_PSGReg13_Code ld a,(hl) PLY_PSGReg13_Retrig cp 255 ;If IsRetrig?, force the R13 to be triggered. ret z ld (PLY_PSGReg13_Retrig + 1),a out (c),c ld b,e defb #ed,#71 dec b outi exx out (c),e out (c),d ret endif ;There are two holes in the list, because the Volume registers are set relatively to the Frequency of the same Channel (+7, always). ;Also, the Reg7 is passed as a register, so is not kept in the memory. PLY_PSGRegistersArray PLY_PSGReg0 db 0 PLY_PSGReg1 db 0 PLY_PSGReg2 db 0 PLY_PSGReg3 db 0 PLY_PSGReg4 db 0 PLY_PSGReg5 db 0 PLY_PSGReg6 db 0 PLY_PSGReg8 db 0 ;+7 db 0 PLY_PSGReg9 db 0 ;+9 db 0 PLY_PSGReg10 db 0 ;+11 PLY_PSGReg11 db 0 PLY_PSGReg12 db 0 PLY_PSGReg13 db 0 PLY_PSGRegistersArray_End ;Plays a sound stream. ;HL=Pointer on Instrument Data ;IY=Pointer on Register code (volume, frequency). ;E=Note ;D=Inverted Volume ;DE'=TrackPitch ;RET= ;HL=New Instrument pointer. ;IXL=Reg7 mask (x00x) ;Also used inside = ;B,C=read byte/second byte. ;IXH=Save original Note (only used for Independant mode). PLY_PlaySound ld b,(hl) inc hl rr b jp c,PLY_PS_Hard ;************** ;Software Sound ;************** ;Second Byte needed ? rr b jr c,PLY_PS_S_SecondByteNeeded ;No second byte needed. We need to check if Volume is null or not. ld a,b and %1111 jr nz,PLY_PS_S_SoundOn ;Null Volume. It means no Sound. We stop the Sound, the Noise, and it's over. ld (iy + 7),a ;We have to make the volume to 0, because if a bass Hard was activated before, we have to stop it. ld ixl,%1001 ret PLY_PS_S_SoundOn ;Volume is here, no Second Byte needed. It means we have a simple Software sound (Sound = On, Noise = Off) ;We have to test Arpeggio and Pitch, however. ld ixl,%1000 sub d ;Code Volume. jr nc,$+3 xor a ld (iy + 7),a rr b ;Needed for the subroutine to get the good flags. call PLY_PS_CalculateFrequency ld (iy + 0),l ;Code Frequency. ld (iy + 1),h exx ret PLY_PS_S_SecondByteNeeded ld ixl,%1000 ;By defaut, No Noise, Sound. ;Second Byte needed. ld c,(hl) inc hl ;Noise ? ld a,c and %11111 jr z,PLY_PS_S_SBN_NoNoise ld (PLY_PSGReg6),a ld ixl,%0000 ;Open Noise Channel. PLY_PS_S_SBN_NoNoise ;Here we have either Volume and/or Sound. So first we need to read the Volume. ld a,b and %1111 sub d ;Code Volume. jr nc,$+3 xor a ld (iy + 7),a ;Sound ? bit 5,c jr nz,PLY_PS_S_SBN_Sound ;No Sound. Stop here. inc ixl ;Set Sound bit to stop the Sound. ret PLY_PS_S_SBN_Sound ;Manual Frequency ? rr b ;Needed for the subroutine to get the good flags. bit 6,c call PLY_PS_CalculateFrequency_TestManualFrequency ld (iy + 0),l ;Code Frequency. ld (iy + 1),h exx ret ;********** ;Hard Sound ;********** PLY_PS_Hard ;We don't set the Volume to 16 now because we may have reached the end of the sound ! rr b ;Test Retrig here, it is common to every Hard sounds. jr nc,PLY_PS_Hard_NoRetrig ld a,(PLY_Track1_InstrumentSpeedCpt + 1) ;Retrig only if it is the first step in this line of Instrument ! ld c,a ld a,(PLY_Track1_InstrumentSpeed + 1) cp c jr nz,PLY_PS_Hard_NoRetrig ld a,PLY_RetrigValue ld (PLY_PSGReg13_Retrig + 1),a PLY_PS_Hard_NoRetrig ;Independant/Loop or Software/Hardware Dependent ? bit 1,b ;We don't shift the bits, so that we can use the same code (Frequency calculation) several times. jp nz,PLY_PS_Hard_LoopOrIndependent ;Hardware Sound. ld (iy + 7),16 ;Set Volume ld ixl,%1000 ;Sound is always On here (only Independence mode can switch it off). ;This code is common to both Software and Hardware Dependent. ld c,(hl) ;Get Second Byte. inc hl ld a,c ;Get the Hardware Envelope waveform. and %1111 ;We don't care about the bit 7-4, but we have to clear them, else the waveform might be reset. ld (PLY_PSGReg13),a if OPTIM_SIKO==0 bit 0,b jr z,PLY_PS_HardwareDependent endif ;****************** ;Software Dependent ;****************** ;Calculate the Software frequency bit 4-2,b ;Manual Frequency ? -2 Because the byte has been shifted previously. call PLY_PS_CalculateFrequency_TestManualFrequency ld (iy + 0),l ;Code Software Frequency. ld (iy + 1),h exx ;Shift the Frequency. ld a,c rra rra ;Shift=Shift*4. The shift is inverted in memory (7 - Editor Shift). and %11100 ld (PLY_PS_SD_Shift + 1),a ld a,b ;Used to get the HardwarePitch flag within the second registers set. exx PLY_PS_SD_Shift jr $+2 srl h rr l srl h rr l srl h rr l srl h rr l srl h rr l srl h rr l srl h rr l jr nc,$+3 inc hl ;Hardware Pitch ? bit 7-2,a jr z,PLY_PS_SD_NoHardwarePitch if OPTIM_SIKO==0 exx ;Get Pitch and add it to the just calculated Hardware Frequency. ld a,(hl) inc hl exx add a,l ;Slow. Can be optimised ? Probably never used anyway..... ld l,a exx ld a,(hl) inc hl exx adc a,h ld h,a endif PLY_PS_SD_NoHardwarePitch ld (PLY_PSGReg11),hl exx ;This code is also used by Hardware Dependent. PLY_PS_SD_Noise ;Noise ? if OPTIM_SIKO==0 bit 7,c ret z ld a,(hl) inc hl ld (PLY_PSGReg6),a ld ixl,%0000 endif ret if OPTIM_SIKO==0 ;****************** ;Hardware Dependent ;****************** PLY_PS_HardwareDependent ;Calculate the Hardware frequency bit 4-2,b ;Manual Hardware Frequency ? -2 Because the byte has been shifted previously. call PLY_PS_CalculateFrequency_TestManualFrequency ld (PLY_PSGReg11),hl ;Code Hardware Frequency. exx ;Shift the Hardware Frequency. ld a,c rra rra ;Shift=Shift*4. The shift is inverted in memory (7 - Editor Shift). and %11100 ld (PLY_PS_HD_Shift + 1),a ld a,b ;Used to get the Software flag within the second registers set. exx PLY_PS_HD_Shift jr $+2 sla l rl h sla l rl h sla l rl h sla l rl h sla l rl h sla l rl h sla l rl h ;Software Pitch ? bit 7-2,a jr z,PLY_PS_HD_NoSoftwarePitch exx ;Get Pitch and add it to the just calculated Software Frequency. ld a,(hl) inc hl exx add a,l ld l,a ;Slow. Can be optimised ? Probably never used anyway..... exx ld a,(hl) inc hl exx adc a,h ld h,a PLY_PS_HD_NoSoftwarePitch ld (iy + 0),l ;Code Frequency. ld (iy + 1),h exx ;Go to manage Noise, common to Software Dependent. jr PLY_PS_SD_Noise endif PLY_PS_Hard_LoopOrIndependent bit 0,b ;We mustn't shift it to get the result in the Carry, as it would be mess the structure jr z,PLY_PS_Independent ;of the flags, making it uncompatible with the common code. ;The sound has ended. ;If Sound Effects activated, we mark the "end of sound" by returning a 0 as an address. if PLY_UseSoundEffects PLY_PS_EndSound_SFX ld a,0 ;Is the sound played is a SFX (1) or a normal sound (0) ? or a jr z,PLY_PS_EndSound_NotASFX ld hl,0 ret PLY_PS_EndSound_NotASFX endif ;The sound has ended. Read the new pointer and restart instrument. ld a,(hl) inc hl ld h,(hl) ld l,a jp PLY_PlaySound ;*********** ;Independent ;*********** PLY_PS_Independent ld (iy + 7),16 ;Set Volume ;Sound ? bit 7-2,b ;-2 Because the byte has been shifted previously. jr nz,PLY_PS_I_SoundOn ;No Sound ! It means we don't care about the software frequency (manual frequency, arpeggio, pitch). ld ixl,%1001 jr PLY_PS_I_SkipSoftwareFrequencyCalculation PLY_PS_I_SoundOn ld ixl,%1000 ;Sound is on. ld ixh,e ;Save the original note for the Hardware frequency, because a Software Arpeggio will modify it. ;Calculate the Software frequency bit 4-2,b ;Manual Frequency ? -2 Because the byte has been shifted previously. call PLY_PS_CalculateFrequency_TestManualFrequency ld (iy + 0),l ;Code Software Frequency. ld (iy + 1),h exx ld e,ixh PLY_PS_I_SkipSoftwareFrequencyCalculation ld b,(hl) ;Get Second Byte. inc hl ld a,b ;Get the Hardware Envelope waveform. and %1111 ;We don't care about the bit 7-4, but we have to clear them, else the waveform might be reset. ld (PLY_PSGReg13),a ;Calculate the Hardware frequency rr b ;Must shift it to match the expected data of the subroutine. rr b bit 4-2,b ;Manual Hardware Frequency ? -2 Because the byte has been shifted previously. call PLY_PS_CalculateFrequency_TestManualFrequency ld (PLY_PSGReg11),hl ;Code Hardware Frequency. exx ;Noise ? We can't use the previous common code, because the setting of the Noise is different, since Independent can have no Sound. bit 7-2,b ret z ld a,(hl) inc hl ld (PLY_PSGReg6),a ld a,ixl ;Set the Noise bit. res 3,a ld ixl,a ret ;Subroutine that = ;If Manual Frequency? (Flag Z off), read frequency (Word) and adds the TrackPitch (DE'). ;Else, Auto Frequency. ; if Arpeggio? = 1 (bit 3 from B), read it (Byte). ; if Pitch? = 1 (bit 4 from B), read it (Word). ; Calculate the frequency according to the Note (E) + Arpeggio + TrackPitch (DE'). ;HL = Pointer on Instrument data. ;DE'= TrackPitch. ;RET= ;HL = Pointer on Instrument moved forward. ;HL'= Frequency ; RETURN IN AUXILIARY REGISTERS PLY_PS_CalculateFrequency_TestManualFrequency jr z,PLY_PS_CalculateFrequency ;Manual Frequency. We read it, no need to read Pitch and Arpeggio. ;However, we add TrackPitch to the read Frequency, and that's all. ld a,(hl) inc hl exx add a,e ;Add TrackPitch LSB. ld l,a exx ld a,(hl) inc hl exx adc a,d ;Add TrackPitch HSB. ld h,a ret PLY_PS_CalculateFrequency ;Pitch ? bit 5-1,b jr z,PLY_PS_S_SoundOn_NoPitch ld a,(hl) inc hl exx add a,e ;If Pitch found, add it directly to the TrackPitch. ld e,a exx ld a,(hl) inc hl exx adc a,d ld d,a exx PLY_PS_S_SoundOn_NoPitch ;Arpeggio ? ld a,e bit 4-1,b jr z,PLY_PS_S_SoundOn_ArpeggioEnd add a,(hl) ;Add Arpeggio to Note. inc hl cp 144 jr c,$+4 ld a,143 PLY_PS_S_SoundOn_ArpeggioEnd ;Frequency calculation. exx ld l,a ld h,0 add hl,hl ld bc,PLY_FrequencyTable add hl,bc ld a,(hl) inc hl ld h,(hl) ld l,a add hl,de ;Add TrackPitch + InstrumentPitch (if any). ret ;Read one Track. ;HL=Track Pointer. ;Ret = ;HL=New Track Pointer. ;Carry = 1 = Wait A lines. Carry=0=Line not empty. ;A=Wait (0(=256)-127), if Carry. ;D=Parameters + Volume. ;E=Note ;B=Instrument. 0=RST ;IX=PitchAdd. Only used if Pitch? = 1. PLY_ReadTrack ld a,(hl) inc hl srl a ;Full Optimisation ? If yes = Note only, no Pitch, no Volume, Same Instrument. jr c,PLY_ReadTrack_FullOptimisation sub 32 ;0-31 = Wait. jr c,PLY_ReadTrack_Wait jr z,PLY_ReadTrack_NoOptimisation_EscapeCode dec a ;0 (32-32) = Escape Code for more Notes (parameters will be read) ;Note. Parameters are present. But the note is only present if Note? flag is 1. ld e,a ;Save Note. ;Read Parameters PLY_ReadTrack_ReadParameters ld a,(hl) ld d,a ;Save Parameters. inc hl rla ;Pitch ? jr nc,PLY_ReadTrack_Pitch_End ld b,(hl) ;Get PitchAdd ld ixl,b inc hl ld b,(hl) ld ixh,b inc hl PLY_ReadTrack_Pitch_End rla ;Skip IsNote? flag. rla ;New Instrument ? ret nc ld b,(hl) inc hl or a ;Remove Carry, as the player interpret it as a Wait command. ret ;Escape code, read the Note and returns to read the Parameters. PLY_ReadTrack_NoOptimisation_EscapeCode ld e,(hl) inc hl jr PLY_ReadTrack_ReadParameters PLY_ReadTrack_FullOptimisation ;Note only, no Pitch, no Volume, Same Instrument. ld d,%01000000 ;Note only. sub 1 ld e,a ret nc ld e,(hl) ;Escape Code found (0). Read Note. inc hl or a ret PLY_ReadTrack_Wait add a,32 ret PLY_FrequencyTable if PLY_UseCPCMachine dw 3822,3608,3405,3214,3034,2863,2703,2551,2408,2273,2145,2025 dw 1911,1804,1703,1607,1517,1432,1351,1276,1204,1136,1073,1012 dw 956,902,851,804,758,716,676,638,602,568,536,506 dw 478,451,426,402,379,358,338,319,301,284,268,253 dw 239,225,213,201,190,179,169,159,150,142,134,127 dw 119,113,106,100,95,89,84,80,75,71,67,63 dw 60,56,53,50,47,45,42,40,38,36,34,32 dw 30,28,27,25,24,22,21,20,19,18,17,16 dw 15,14,13,13,12,11,11,10,9,9,8,8 dw 7,7,7,6,6,6,5,5,5,4,4,4 dw 4,4,3,3,3,3,3,2,2,2,2,2 dw 2,2,2,2,1,1,1,1,1,1,1,1 endif if PLY_UseMSXMachine dw 4095,4095,4095,4095,4095,4095,4095,4095,4095,4030,3804,3591 dw 3389,3199,3019,2850,2690,2539,2397,2262,2135,2015,1902,1795 dw 1695,1599,1510,1425,1345,1270,1198,1131,1068,1008,951,898 dw 847,800,755,712,673,635,599,566,534,504,476,449 dw 424,400,377,356,336,317,300,283,267,252,238,224 dw 212,200,189,178,168,159,150,141,133,126,119,112 dw 106,100,94,89,84,79,75,71,67,63,59,56 dw 53,50,47,45,42,40,37,35,33,31,30,28 dw 26,25,24,22,21,20,19,18,17,16,15,14 dw 13,12,12,11,11,10,9,9,8,8,7,7 dw 7,6,6,6,5,5,5,4,4,4,4,4 dw 3,3,3,3,3,2,2,2,2,2,2,2 endif ;DE = Music PLY_Init if PLY_UseFirmwareInterruptions ld hl,8 ;Skip Header, SampleChannel, YM Clock (DB*3). The Replay Frequency is used in Interruption mode. add hl,de ld de,PLY_ReplayFrequency + 1 ldi else ld hl,9 ;Skip Header, SampleChannel, YM Clock (DB*3), and Replay Frequency. add hl,de endif ld de,PLY_Speed + 1 ldi ;Copy Speed. ld c,(hl) ;Get Instruments chunk size. inc hl ld b,(hl) inc hl ld (PLY_Track1_InstrumentsTablePT + 1),hl ld (PLY_Track2_InstrumentsTablePT + 1),hl ld (PLY_Track3_InstrumentsTablePT + 1),hl add hl,bc ;Skip Instruments to go to the Linker address. ;Get the pre-Linker information of the first pattern. ld de,PLY_Height + 1 ldi ld de,PLY_Transposition1 + 1 ldi ld de,PLY_Transposition2 + 1 ldi ld de,PLY_Transposition3 + 1 ldi ld de,PLY_SaveSpecialTrack + 1 ldi ldi ld (PLY_Linker_PT + 1),hl ;Get the Linker address. ld a,1 ld (PLY_SpeedCpt + 1),a ld (PLY_HeightCpt + 1),a ld a,#ff ld (PLY_PSGReg13),a ;Set the Instruments pointers to Instrument 0 data (Header has to be skipped). ld hl,(PLY_Track1_InstrumentsTablePT + 1) ld e,(hl) inc hl ld d,(hl) ex de,hl inc hl ;Skip Instrument 0 Header. inc hl ld (PLY_Track1_Instrument + 1),hl ld (PLY_Track2_Instrument + 1),hl ld (PLY_Track3_Instrument + 1),hl ret ;Stop the music, cut the channels. PLY_Stop ; Pas besoin de stop si on fait un rst 0! if OPTIM_SIKO==0 if PLY_SystemFriendly call PLY_DisableInterruptions ex af,af' exx push af push bc push ix push iy endif ld hl,PLY_PSGReg8 ld bc,#0300 ld (hl),c inc hl djnz $-2 ld a,%00111111 jp PLY_SendRegisters endif if PLY_UseSoundEffects ;Initialize the Sound Effects. ;DE = SFX Music. PLY_SFX_Init ;Find the Instrument Table. ld hl,12 add hl,de ld (PLY_SFX_Play_InstrumentTable + 1),hl ;Clear the three channels of any sound effect. PLY_SFX_StopAll ld hl,0 ld (PLY_SFX_Track1_Instrument + 1),hl ld (PLY_SFX_Track2_Instrument + 1),hl ld (PLY_SFX_Track3_Instrument + 1),hl ret PLY_SFX_OffsetPitch equ 0 PLY_SFX_OffsetVolume equ PLY_SFX_Track1_Volume - PLY_SFX_Track1_Pitch PLY_SFX_OffsetNote equ PLY_SFX_Track1_Note - PLY_SFX_Track1_Pitch PLY_SFX_OffsetInstrument equ PLY_SFX_Track1_Instrument - PLY_SFX_Track1_Pitch PLY_SFX_OffsetSpeed equ PLY_SFX_Track1_InstrumentSpeed - PLY_SFX_Track1_Pitch PLY_SFX_OffsetSpeedCpt equ PLY_SFX_Track1_InstrumentSpeedCpt - PLY_SFX_Track1_Pitch ;Plays a Sound Effects along with the music. ;A = No Channel (0,1,2) ;L = SFX Number (>0) ;H = Volume (0...F) ;E = Note (0...143) ;D = Speed (0 = As original, 1...255 = new Speed (1 is fastest)) ;BC = Inverted Pitch (-#FFFF -> FFFF). 0 is no pitch. The higher the pitch, the lower the sound. PLY_SFX_Play ld ix,PLY_SFX_Track1_Pitch or a jr z,PLY_SFX_Play_Selected ld ix,PLY_SFX_Track2_Pitch dec a jr z,PLY_SFX_Play_Selected ld ix,PLY_SFX_Track3_Pitch PLY_SFX_Play_Selected ld (ix + PLY_SFX_OffsetPitch + 1),c ;Set Pitch ld (ix + PLY_SFX_OffsetPitch + 2),b ld a,e ;Set Note ld (ix + PLY_SFX_OffsetNote),a ld a,15 ;Set Volume sub h ld (ix + PLY_SFX_OffsetVolume),a ld h,0 ;Set Instrument Address add hl,hl PLY_SFX_Play_InstrumentTable ld bc,0 add hl,bc ld a,(hl) inc hl ld h,(hl) ld l,a ld a,d ;Read Speed or use the user's one ? or a jr nz,PLY_SFX_Play_UserSpeed ld a,(hl) ;Get Speed PLY_SFX_Play_UserSpeed ld (ix + PLY_SFX_OffsetSpeed + 1),a ld (ix + PLY_SFX_OffsetSpeedCpt + 1),a inc hl ;Skip Retrig inc hl ld (ix + PLY_SFX_OffsetInstrument + 1),l ld (ix + PLY_SFX_OffsetInstrument + 2),h ret ;Stops a sound effect on the selected channel ;E = No Channel (0,1,2) ;I used the E register instead of A so that Basic users can call this code in a straightforward way (call player+15, value). PLY_SFX_Stop ld a,e ld hl,PLY_SFX_Track1_Instrument + 1 or a jr z,PLY_SFX_Stop_ChannelFound ld hl,PLY_SFX_Track2_Instrument + 1 dec a jr z,PLY_SFX_Stop_ChannelFound ld hl,PLY_SFX_Track3_Instrument + 1 dec a PLY_SFX_Stop_ChannelFound ld (hl),a inc hl ld (hl),a ret endif if PLY_UseFades ;Sets the Fade value. ;E = Fade value (0 = full volume, 16 or more = no volume). ;I used the E register instead of A so that Basic users can call this code in a straightforward way (call player+9/+18, value). PLY_SetFadeValue ld a,e ld (PLY_Channel1_FadeValue + 1),a ld (PLY_Channel2_FadeValue + 1),a ld (PLY_Channel3_FadeValue + 1),a ret endif if PLY_SystemFriendly ;Save Interrupt status and Disable Interruptions PLY_DisableInterruptions ld a,i di ;IFF in P/V flag. ;Prepare opcode for DI. ld a,#f3 jp po,PLY_DisableInterruptions_Set_Opcode ;Opcode for EI. ld a,#fb PLY_DisableInterruptions_Set_Opcode ld (PLY_RestoreInterruption),a ret endif ;A little convient interface for BASIC user, to allow them to use Sound Effects in Basic. if PLY_UseBasicSoundEffectInterface PLY_BasicSoundEffectInterface_PlaySound ld c,(ix+0) ;Get Pitch ld b,(ix+1) ld d,(ix+2) ;Get Speed ld e,(ix+4) ;Get Note ld h,(ix+6) ;Get Volume ld l,(ix+8) ;Get SFX number ld a,(ix+10) ;Get Channel jp PLY_SFX_Play endif list ;*** End of Arkos Tracker Player nolist
20.433962
145
0.714308
f2e2c77ac0eb2281694289a3ab58841564245c75
352
asm
Assembly
oeis/120/A120730.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/120/A120730.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/120/A120730.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A120730: Another version of Catalan triangle A009766. ; Submitted by Christian Krause ; 1,0,1,0,1,1,0,0,2,1,0,0,2,3,1,0,0,0,5,4,1,0,0,0,5,9,5,1,0,0,0,0,14,14,6,1,0,0,0,0,14,28,20,7,1,0,0,0,0,0,42,48,27,8,1,0,0,0,0,0,42,90,75,35,9,1 lpb $0 add $1,1 sub $0,$1 mov $2,$1 sub $2,$0 lpe bin $1,$0 add $0,1 mul $2,$1 div $2,$0 trn $1,$2 mov $0,$1
20.705882
145
0.585227
94d5e5a68bb1c534b1a8c59f2e82dd97ae817f9d
8,585
asm
Assembly
examples/qemu/x86_64/oz-x86-64-asm-001/oz.asm
duanev/pgdb
fdefdbe043dff15fe1069daf6852ea417bed6415
[ "BSD-3-Clause" ]
9
2015-11-23T07:32:51.000Z
2021-06-04T04:06:07.000Z
examples/qemu/x86_64/oz-x86-64-asm-001/oz.asm
duanev/pgdb
fdefdbe043dff15fe1069daf6852ea417bed6415
[ "BSD-3-Clause" ]
3
2016-02-28T15:56:10.000Z
2019-05-19T19:31:03.000Z
examples/qemu/x86_64/oz-x86-64-asm-001/oz.asm
duanev/pgdb
fdefdbe043dff15fe1069daf6852ea417bed6415
[ "BSD-3-Clause" ]
3
2015-12-30T19:18:16.000Z
2020-06-20T12:37:59.000Z
; OZ - A more utopian OS ; ex: set expandtab softtabstop=4 shiftwidth=4 nowrap : ; ; ; x86-64 startup ; ; ; usage: ; $ qemu-system-x86_64 -boot a -fda oz_fd -monitor stdio ; ; requires: nasm-2.07 or later from: http://www.nasm.us ; ; credits: ; many thanks to the folks at wiki.osdev.org who archive great info. ; http://wiki.osdev.org/Entering_Long_Mode_Directly ; ; contributors: ; djv - Duane Voth ; ; history: ; 2015/10/12 - 0.00.64 - djv - dup oz-x86-32-asm-001, get into 64bit mode %ifdef USB [map symbols oz_usb.map] %else [map symbols oz_fd.map] %endif ; -------- stage 1 --------------------------------------------------------- ; A classic x86 Master Boot Record section .text start=0x7c00 ; PC BIOS boot loader entry point codestart : bios_entry : cli jmp 0:main ; load cs, skip over mbr data struct times 6-($-$$) db 0 oemid db "oz" times 11-($-$$) db 0 ; compute the size of the kernel image in 512 byte sectors nsectors equ codesize/512 ; -------- main (enter protected mode) -------- bits 16 align 2 main : mov ax,kstack_loc mov sp,ax xor ax,ax mov ss,ax mov es,ax mov ds,ax mov fs,ax mov gs,ax cld push dx ; save BIOS drive number mov ax,0x0600 ; ah=06h : scroll window up, if al = 0 clrscr mov cx,0x0000 ; clear window from 0,0 mov dx,0x174f ; to 23,79 mov bh,0xf ; fill with hi white int 0x10 ; clear screen for direct writes to video memory mov si,bootmsg xor bx,bx call puts_vga_rm ; puts_vga_rm leaves gs pointing at video mem mov byte [gs:1],0xE ; turn the first two chars yellow mov byte [gs:3],0xE ; ---- verify this is a 64bit processor pushfd pop eax mov ebx,eax xor eax,0x200000 ; flip the cpuid test flag push eax popfd pushfd pop eax xor eax,ebx ; did anything change? jnz have_cpuid not64 : mov si,no64msg xor bx,bx call puts_vga_rm halt : hlt jmp halt ; we're done have_cpuid : push ebx popfd ; restore flags mov eax,0x80000000 cpuid cmp eax,0x80000001 ; is extended function 0x80000001 available? jb not64 mov eax,0x80000001 cpuid test edx, 1 << 29 ; test LM bit jz not64 ; ---- setup 4KB paging tables ; swdev3a s4.5 pg 4-25 fig 4-8 ; swdev3a s4.6 pg 4-23 fig 4-10 mov edi,pml4e ; first pml4 mov cr3,edi ; install it in cr3 mov eax,pdpte + 7 stosd xor eax,eax mov ecx,0x400-1 rep stosd ; assume pdpte physically follows pml4 mov ax,pgdir + 7 ; next setup the pdpte stosd xor eax,eax mov cx,0x400-1 rep stosd ; assume pgdir physically follows pdpte mov ax,pgtb0 + 7 ; page table 0: present, pl=3, r/w stosd ; ... pl=3 for now (simplify vga access) xor eax,eax ; invalidate the rest of the addr space mov cx,0x400-1 rep stosd ; assume pgtb0 physically follows pgdir ; pgtb0 is the page table for kernel memory stosd ; access to page 0 will always cause a fault stosd mov ebx,eax mov ax,0x1000 + 3 ; rest are direct map: present, pl=0, r/w mov cx,0x200-1 pgtb0_fill : stosd xchg eax,ebx stosd xchg eax,ebx add eax,0x1000 loop pgtb0_fill ; enable paging and protected mode mov eax,0xa0 mov cr4,eax ; set the pae and pge mov ecx,0xc0000080 ; get the efer msr rdmsr or ax,0x00000100 ; set lme wrmsr mov eax,cr0 or eax,0x80000001 ; enable paging and protected mode together mov cr0,eax ; ---- lgdt [gdtr] ; initialize the gdt jmp codesel:flush_ip1 ; flush the cpu instruction pipeline flush_ip1: bits 64 ; instructions after this point are 64bit mov ax,datasel ; yes its silly to load the segments regs in 64bit mov ds,ax ; mode (only fs & gs can be used) but this helps us mov es,ax ; check to see if we are parsing the qemu register mov ss,ax ; dumps correctly mov fs,ax mov ax,videosel mov gs,ax ; ---- debug marker mov byte [gs:rbx+1],0xA ; turn the first two chars green mov byte [gs:rbx+3],0xA ;sti ; can't do this ... idle : hlt ; wait for interrupts jmp idle ; ---------------------------- ; puts_vga_rm - write a null delimited string to the VGA controller ; in real mode ; ; esi - address of string ; ebx - screen location (2 bytes per char, 160 bytes per line) ; eax - destroyed ; gs - destroyed bits 16 puts_vga_rm : mov ax,0xb800 ; point gs at video memory mov gs,ax puts_vga_rm_loop : lodsb cmp al,0 jz puts_vga_rm_done mov [gs:bx],al inc ebx inc ebx jmp puts_vga_rm_loop puts_vga_rm_done : ret align 8 ; only need 4 but 8 looks nicer when debugging codesize equ ($-codestart) ; --------------------------------------------------------- section .data datastart : ; -------- descriptors -------------- ; Intel SW dev manual 3a, 3.4.5, pg 103 ; ; In my opinion, macros for descriptor entries ; don't make the code that much more readable. gdt : nullsel equ $-gdt ; nullsel = 0h dq 0,0 ; first descriptor per convention is 0 codesel equ $-gdt ; codesel = 10h 4Gb flat over all logical mem dw 0x0000 ; limit 0-15 dw 0x0000 ; base 0-15 db 0x00 ; base 16-23 db 0x9a ; present, dpl=0, code e/r db 0x20 ; 4k granular, 64bit/8bit, limit 16-19 db 0x00 ; base 24-31 dd 0 ; base 32-63 dd 0 datasel equ $-gdt ; datasel = 20h 4Gb flat over all logical mem dw 0x0000 ; limit 0-15 dw 0x0000 ; base 0-15 db 0x00 ; base 16-23 db 0x92 ; present, dpl=0, data r/w db 0x20 ; 4k granular, 64bit/8bit, limit 16-19 db 0x00 ; base 24-31 dd 0 ; base 32-63 dd 0 videosel equ $-gdt ; videosel = 30h dw 3999 ; limit 80*25*2-1 dw 0x8000 ; base 0xb8000 db 0x0b db 0x92 ; present, dpl=0, data, r/w db 0x20 ; byte granular, 64bit/8bit db 0 ; base 24-31 dd 0 ; base 32-63 dd 0 gdt_end : gdtr : dw gdt_end - gdt - 1 ; gdt length dq gdt ; gdt physical address idtr : dw idt_end - idt - 1 ; length of the idt dq idt ; address of the idt bootmsg db "OZ v0.00.64 - 2015/10/12",0 no64msg db "cpu not 64bit ",0 times 446-codesize-($-$$) db 0 ; Fill with zeros up to the partition table %ifdef USB ; a partition table for my 512MB USB stick db 0x80, 0x01, 0x01, 0, 0x06, 0x10, 0xe0, 0xbe, 0x20, 0, 0, 0, 0xe0, 0x7b, 0xf, 0 db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 %else ; A default partition table that matches a 1.44MB floppy db 0x80,0x01,0x01,0x00,0x06,0x01,0x12,0x4f db 0x12,0x00,0x00,0x00,0x2e,0x0b,0x00,0x00 db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 %endif times 510-codesize-($-$$) db 0 ; fill with zeros up to MBR signature dw 0x0aa55 ; write aa55 in bytes 511,512 to indicate ; that it is a boot sector. pml4e equ 0x1000 ; use some of the free memory below us pdpte equ 0x2000 ; code above assumes this follows pml4e pgdir equ 0x3000 ; code above assumes this follows pdpte pgtb0 equ 0x4000 ; code above assumes this follows pgdir idt equ 0x6000 idt_end equ idt+48*8 ; 32 sw + 16 remapped hw vectors kstack_loc equ 0x7000 kstack_size equ 1024 datasize equ ($-datastart) kend :
27.340764
81
0.539779
ab9c9746d639d10368dfbfee5e1603e2a853bfa9
1,693
asm
Assembly
programs/oeis/171/A171965.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/171/A171965.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/171/A171965.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A171965: Partial sums of floor(n^2/6) (A056827). ; 0,0,0,1,3,7,13,21,31,44,60,80,104,132,164,201,243,291,345,405,471,544,624,712,808,912,1024,1145,1275,1415,1565,1725,1895,2076,2268,2472,2688,2916,3156,3409,3675,3955,4249,4557,4879,5216,5568,5936,6320,6720,7136,7569,8019,8487,8973,9477,9999,10540,11100,11680,12280,12900,13540,14201,14883,15587,16313,17061,17831,18624,19440,20280,21144,22032,22944,23881,24843,25831,26845,27885,28951,30044,31164,32312,33488,34692,35924,37185,38475,39795,41145,42525,43935,45376,46848,48352,49888,51456,53056,54689,56355,58055,59789,61557,63359,65196,67068,68976,70920,72900,74916,76969,79059,81187,83353,85557,87799,90080,92400,94760,97160,99600,102080,104601,107163,109767,112413,115101,117831,120604,123420,126280,129184,132132,135124,138161,141243,144371,147545,150765,154031,157344,160704,164112,167568,171072,174624,178225,181875,185575,189325,193125,196975,200876,204828,208832,212888,216996,221156,225369,229635,233955,238329,242757,247239,251776,256368,261016,265720,270480,275296,280169,285099,290087,295133,300237,305399,310620,315900,321240,326640,332100,337620,343201,348843,354547,360313,366141,372031,377984,384000,390080,396224,402432,408704,415041,421443,427911,434445,441045,447711,454444,461244,468112,475048,482052,489124,496265,503475,510755,518105,525525,533015,540576,548208,555912,563688,571536,579456,587449,595515,603655,611869,620157,628519,636956,645468,654056,662720,671460,680276,689169,698139,707187,716313,725517,734799,744160,753600,763120,772720,782400,792160,802001,811923,821927,832013,842181,852431,862764 mov $2,$0 mov $4,$0 lpb $2 mov $0,$4 sub $2,1 sub $0,$2 mov $3,$0 pow $3,2 div $3,6 add $1,$3 lpe
112.866667
1,528
0.80567
4d3044f82daf460a70bfdce6a3cafe74cfdbb1d6
703
asm
Assembly
oeis/024/A024630.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/024/A024630.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/024/A024630.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A024630: n written in fractional base 4/2. ; 0,1,2,3,20,21,22,23,200,201,202,203,220,221,222,223,2000,2001,2002,2003,2020,2021,2022,2023,2200,2201,2202,2203,2220,2221,2222,2223,20000,20001,20002,20003,20020,20021,20022,20023,20200,20201,20202,20203,20220,20221,20222,20223,22000,22001,22002,22003,22020,22021,22022,22023,22200,22201,22202,22203,22220,22221,22222,22223,200000,200001,200002,200003,200020,200021,200022,200023,200200,200201,200202,200203,200220,200221,200222,200223,202000,202001,202002,202003,202020,202021,202022,202023,202200 mul $0,2 mov $2,$0 div $0,4 seq $0,228071 ; Write n in binary and interpret as a decimal number; a(n) is this quantity minus n. mul $0,4 add $0,$2 div $0,2
63.909091
500
0.778094
b94d11354848cd42f96fc47117ec2ad117d58116
1,114
asm
Assembly
leds/leds.asm
zsazsaz1/RiscSimulator
8104f99df41698c5aa106ed2e7456843df04ac2a
[ "MIT" ]
null
null
null
leds/leds.asm
zsazsaz1/RiscSimulator
8104f99df41698c5aa106ed2e7456843df04ac2a
[ "MIT" ]
null
null
null
leds/leds.asm
zsazsaz1/RiscSimulator
8104f99df41698c5aa106ed2e7456843df04ac2a
[ "MIT" ]
null
null
null
add $t0, $zero, $imm, 6 # set $t0 = 6 out $imm, $t0, $zero, LedInterrupt # set irqhandler as LedInterrupt out $imm, $zero, $zero, 1 # enable irq0 add $t0, $zero, $imm, 13 # set $t0 = 13 out $imm, $t0, $zero, 1023 # set timermax = 1023 (because it includes zero) add $t0, $zero, $imm, 11 # set $t0 = 12 add $s0, $zero, $imm, Nop # set $s0 = Nop, makes cycles more reliable not using $imm (seeing 1024 clear cycles between each Interrupt on trace file) out $imm, $t0, $zero, 1 # set timerenable = 1024 jal $imm, $zero, $zero, Nop # jump to Nop and save next addres in $ra halt $zero, $zero, $zero, 0 # halt Nop: add $zero, $zero, $zero, 0 # litteraly nothing beq $s0, $zero, $zero, 0 # jump to $s0 (= Nop) LedInterrupt: add $t0, $zero, $imm, 9 # set $t0 = 9 in $t1, $t0, $zero, 0 # set $t1 = leds sll $t1, $t1, $imm, 1 # shift leds by 1 add $t1, $t1, $imm, 1 # add to 1 leds out $t1, $t0, $zero, 0 # set leds = $t1 beq $ra, $t1, $imm, -1 # go to halt if all 32 bits are 1 out $zero, $zero, $imm, 3 # clear irq0 status reti $zero, $zero, $zero, 0 # return from interrupt
42.846154
149
0.604129
73ee4dd43e5d4af569be8a52942299d77b123b78
495
asm
Assembly
programs/oeis/055/A055952.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/055/A055952.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/055/A055952.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A055952: n + reversal of base 6 digits of n (written in base 10). ; 0,2,4,6,8,10,7,14,21,28,35,42,14,21,28,35,42,49,21,28,35,42,49,56,28,35,42,49,56,63,35,42,49,56,63,70,37,74,111,148,185,222,49,86,123,160,197,234,61,98,135,172,209,246,73,110,147,184,221,258,85,122,159,196,233,270,97,134,171,208,245,282,74,111,148,185,222,259,86,123,160,197,234,271,98,135,172,209,246,283,110,147,184,221,258,295,122,159,196,233 mov $1,$0 seq $1,30105 ; Base 6 reversal of n (written in base 10). add $0,$1
70.714286
347
0.692929
088d53af4fc1b9730a09fbcab39ccc50fd1ef92d
444
a51
Assembly
OrgEVM/OEVM_L4/main.a51
sandyre/ifmo_course3
f697b2308acec149c67b1fbba326e2264da88f29
[ "MIT" ]
3
2017-06-19T20:39:26.000Z
2020-09-14T04:15:53.000Z
OrgEVM/OEVM_L4/main.a51
sandyre/ifmo_course3
f697b2308acec149c67b1fbba326e2264da88f29
[ "MIT" ]
null
null
null
OrgEVM/OEVM_L4/main.a51
sandyre/ifmo_course3
f697b2308acec149c67b1fbba326e2264da88f29
[ "MIT" ]
2
2018-11-12T18:42:09.000Z
2019-12-20T03:12:34.000Z
//P2 = 0; //S = 0xFF + (x>>8); //S = 0xFF + ((x*S)>>8); //S= 0x7F + ((x*S)>>8); //P2 = 0x1F; //P3 = S; CSEG AT 0 START: mov r0, #0 // r0 = x; LOOP: mov P2, #0 mov a, #0xFF //S = 0xFF + (x>>8); mov b, r0 mul ab mov a, b add a, #0xFF //S = 0xFF + ((x*S)>>8); mov b, r0 mul ab mov a, b //((x*S)>>8); mov b, #0 add a, #0x7F //S= 0x7F + ((x*S)>>8); mov P2, #0x1F mov P3, a inc r0 cjne r0, #100, LOOP //jump to loop jmp START END
15.857143
38
0.466216
0a017328ffc77d1669664c747732dc6fa615c82a
941
asm
Assembly
_build/dispatcher/jmp_ippsGFpConj_fd3ef001.asm
zyktrcn/ippcp
b0bbe9bbb750a7cf4af5914dd8e6776a8d544466
[ "Apache-2.0" ]
1
2021-10-04T10:21:54.000Z
2021-10-04T10:21:54.000Z
_build/dispatcher/jmp_ippsGFpConj_fd3ef001.asm
zyktrcn/ippcp
b0bbe9bbb750a7cf4af5914dd8e6776a8d544466
[ "Apache-2.0" ]
null
null
null
_build/dispatcher/jmp_ippsGFpConj_fd3ef001.asm
zyktrcn/ippcp
b0bbe9bbb750a7cf4af5914dd8e6776a8d544466
[ "Apache-2.0" ]
null
null
null
extern m7_ippsGFpConj:function extern n8_ippsGFpConj:function extern y8_ippsGFpConj:function extern e9_ippsGFpConj:function extern l9_ippsGFpConj:function extern n0_ippsGFpConj:function extern k0_ippsGFpConj:function extern ippcpJumpIndexForMergedLibs extern ippcpSafeInit:function segment .data align 8 dq .Lin_ippsGFpConj .Larraddr_ippsGFpConj: dq m7_ippsGFpConj dq n8_ippsGFpConj dq y8_ippsGFpConj dq e9_ippsGFpConj dq l9_ippsGFpConj dq n0_ippsGFpConj dq k0_ippsGFpConj segment .text global ippsGFpConj:function (ippsGFpConj.LEndippsGFpConj - ippsGFpConj) .Lin_ippsGFpConj: db 0xf3, 0x0f, 0x1e, 0xfa call ippcpSafeInit wrt ..plt align 16 ippsGFpConj: db 0xf3, 0x0f, 0x1e, 0xfa mov rax, qword [rel ippcpJumpIndexForMergedLibs wrt ..gotpc] movsxd rax, dword [rax] lea r11, [rel .Larraddr_ippsGFpConj] mov r11, qword [r11+rax*8] jmp r11 .LEndippsGFpConj:
24.128205
71
0.766206
e6a85574a70003d78a4daeaac4627ec3654352a0
611
asm
Assembly
oeis/154/A154251.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/154/A154251.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/154/A154251.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A154251: Expansion of (1-x+7x^2)/((1-x)(1-2x)). ; 1,2,11,29,65,137,281,569,1145,2297,4601,9209,18425,36857,73721,147449,294905,589817,1179641,2359289,4718585,9437177,18874361,37748729,75497465,150994937,301989881,603979769,1207959545,2415919097,4831838201,9663676409,19327352825,38654705657,77309411321,154618822649,309237645305,618475290617,1236950581241,2473901162489,4947802324985,9895604649977,19791209299961,39582418599929,79164837199865,158329674399737,316659348799481,633318697598969,1266637395197945,2533274790395897,5066549580791801 mov $1,2 pow $1,$0 mul $1,9 trn $1,15 div $1,2 add $1,1 mov $0,$1
55.545455
493
0.826514
b79f36669a4bc813c5cf02cd47aa8ac91be8fbcc
751
asm
Assembly
libsrc/_DEVELOPMENT/EXAMPLES/zxn/dot-command/mv/128/mv.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/EXAMPLES/zxn/dot-command/mv/128/mv.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/EXAMPLES/zxn/dot-command/mv/128/mv.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
;; these structures are accessed by NextZXOS functions ;; so need to be in memory accessible to NextZXOS ;; in [0x4000,0xbfe0] ;; ;; in an 8k dot program that means space should be ;; allocated via ROM3_BC_SPACE in main memory ;; ;; in a dotn command it just needs to be in the main bank INCLUDE "config_zxn_private.inc" SECTION data_user PUBLIC _catalog PUBLIC _lfn _catalog: defb 0 ; filter defw 0 ; filename defw 0 ; dir_handle defb 0 ; completed_sz defb 2 ; cat_sz (two dos_catalog entries) defs 2*13 ; cat[] _lfn: defw _catalog ; cat defs __ESX_FILENAME_LFN_MAX + 1 ; long filename defs 4 ; time defs 4 ; size
23.46875
57
0.617843
744200b1645b0cafadf3d279685636c5fa7805ac
748
asm
Assembly
oeis/211/A211813.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/211/A211813.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/211/A211813.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A211813: Number of (n+1) X (n+1) -10..10 symmetric matrices with every 2 X 2 subblock having sum zero and two distinct values. ; 32,44,62,92,140,218,344,548,878,1412,2276,3674,5936,9596,15518,25100,40604,65690,106280,171956,278222,450164,728372,1178522,1906880,3085388,4992254,8077628,13069868,21147482,34217336,55364804,89582126,144946916,234529028,379475930,614004944,993480860,1607485790,2600966636,4208452412,6809419034,11017871432,17827290452,28845161870,46672452308,75517614164,122190066458,197707680608,319897747052,517605427646,837503174684,1355108602316,2192611776986,3547720379288,5740332156260,9288052535534 mov $1,6 mov $2,9 lpb $0 sub $0,2 add $1,$2 add $2,$1 lpe lpb $0 sub $0,1 add $2,$1 lpe mov $0,$2 add $0,7 mul $0,2
41.555556
491
0.790107
9e3aa5fbcb8d21b005156d5252ba34e6a00c625d
1,113
asm
Assembly
verify/alfy/3_expression/comparison.alfy.asm
alexandruradovici/alf-alfy-asm-public
43a73cc13c38f39125620fb9bd566c261cff1c73
[ "BSD-2-Clause" ]
null
null
null
verify/alfy/3_expression/comparison.alfy.asm
alexandruradovici/alf-alfy-asm-public
43a73cc13c38f39125620fb9bd566c261cff1c73
[ "BSD-2-Clause" ]
2
2017-05-18T20:29:57.000Z
2017-05-19T19:03:07.000Z
verify/alfy/3_expression/comparison.alfy.asm
alexandruradovici/alf-alfy-asm-language-public
43a73cc13c38f39125620fb9bd566c261cff1c73
[ "BSD-2-Clause" ]
null
null
null
; script start: ; asm ; expression AND ; expression > ; expression + ; value int 2 set r5 2 ; value int 4 set r6 4 add r4 r5 r6 ; expression * ; value int 5 set r6 5 ; value int 6 set r7 6 mul r5 r6 r7 test r4 r5 set r3 1 jg next_0 set r3 0 next_0: ; expression < ; expression + ; value int 4 set r6 4 ; value int 5 set r7 5 add r5 r6 r7 ; expression / ; value int 6 set r7 6 ; value int 7 set r8 7 div r6 r7 r8 test r5 r6 set r4 1 jl next_1 set r4 0 next_1: and r2 r3 r4 writenumber r2 stop
25.295455
33
0.302785
c1eaf640afae822a102ae677f992640964d8aa16
339
asm
Assembly
oeis/052/A052610.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/052/A052610.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/052/A052610.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A052610: E.g.f. 1/(1-x-2x^3). ; Submitted by Jamie Morken(s3) ; 1,1,2,18,120,840,9360,115920,1491840,22861440,395539200,7304774400,148011494400,3281639961600,77850214041600,1975895970048000,53666956062720000,1547595999645696000,47204701332332544000 mov $2,$0 seq $0,77949 ; Expansion of 1/(1-x-2*x^3). lpb $2 mul $0,$2 sub $2,1 lpe
30.818182
186
0.749263
ccda2395324fe1068373df4a8596761f1fe718b8
318
asm
Assembly
Lab 5 - 32 bit Multiplication/6c.asm
SathyasriS27/ARM7-Thumb-Programming
60418e8e7e5a3a775d5eecdea2ff9512074d0cf2
[ "Apache-2.0" ]
null
null
null
Lab 5 - 32 bit Multiplication/6c.asm
SathyasriS27/ARM7-Thumb-Programming
60418e8e7e5a3a775d5eecdea2ff9512074d0cf2
[ "Apache-2.0" ]
null
null
null
Lab 5 - 32 bit Multiplication/6c.asm
SathyasriS27/ARM7-Thumb-Programming
60418e8e7e5a3a775d5eecdea2ff9512074d0cf2
[ "Apache-2.0" ]
null
null
null
AREA SBCS, CODE, READONLY ENTRY LDR R4, =0x00000000 LDR R5, =0x00000000 LDR R7, =0x00000005 LDR R9, =0x00000000 LDR R0, =0x40000000 LDR R1, =0x40000018 LDR R6, =0x40000038 LO LDR R2, [R0], #04 LDR R3, [R1], #04 UMLAL R5, R4, R2, R3 SUBS R9, R9, #01 BNE LO STR R4, [R6], #04 STR R5, [R6] UP B UP END
15.9
26
0.63522
aa6b8662556f31b5625ca5d05a2116774aa8db84
1,973
asm
Assembly
programs/oeis/024/A024019.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/024/A024019.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/024/A024019.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A024019: 2^n-n^9. ; 1,1,-508,-19675,-262128,-1953093,-10077632,-40353479,-134217472,-387419977,-999998976,-2357945643,-5159776256,-10604491181,-20661030400,-38443326607,-68719411200,-118587745425,-198359028224,-322687173491,-511998951424,-794277949429,-1207265023488,-1801144272855,-2641790763008,-3814663711193,-5429436570112,-7625463267259,-10578187517952,-14506609104957,-19681926258176,-26437474677023,-35180077121536,-46402894467361,-60699812897280,-78781278933507,-101491237191680,-129824300841605,-164941223355904,-208178605344871,-261044488372224,-325182911138409,-402273337338368,-493796518914635,-600529653465088,-721496270489293,-851821418491392,-978392984747439,-1071130483884032,-1065463644489137,-827225093157376,-82365359405203,1723693743734784,5707435662938859,14110092597168640,31423430434979593,66641424589783040,137763726120471815,280802717412066816,567797756484768549,1142843808606846976,2294148863120859811,4598148931881124352,9207738222697921985,18428729675200069632,36872776234581212607,73763213614824406528,147546746055280117981,295116818079056396288,590260358270870075483,1180551267110411303424,2361137392934104157817,4722314484171830984704,9444674094152582159479,18889399391067805775360,37778856778270882412693,75557779135270476840960,151115632300134197666835,302231348034736380391936,604462789955718604734769,1208925685396901174706176,2417851489134623052413231,4835703110838966289116672,9671406369976778130109005,19342812905618318264369152,38685625996051187307394507,77371252198008849869531648,154742504625128380119361001,309485009504866686895915008,618970019292333733742076903,1237940038897959785899124224,2475880078142830749668460037,4951760156669359736309940224,9903520313762631116204506499,19807040627993089596157370880,39614081256501919387047365793,79228162513571803597719470080,158456325027768444128433335455,316912650056223602612045651456,633825300113201183500867961789 mov $1,2 pow $1,$0 pow $0,9 add $0,1 sub $1,$0 add $1,1 mov $0,$1
179.363636
1,885
0.902179
6eee82855b171d38b26a913dee980fa3df653cc3
4,617
asm
Assembly
boot/gdt.asm
ValjeanTheWolfie/HelloWorldOS
b085d710f692aad6f172affadcbe28bb57ae2612
[ "MIT" ]
null
null
null
boot/gdt.asm
ValjeanTheWolfie/HelloWorldOS
b085d710f692aad6f172affadcbe28bb57ae2612
[ "MIT" ]
null
null
null
boot/gdt.asm
ValjeanTheWolfie/HelloWorldOS
b085d710f692aad6f172affadcbe28bb57ae2612
[ "MIT" ]
null
null
null
;================================================== ; Pre-defined GDT Table ;-------------------------------------------------- ; 2020.4.2 ValjeanTheWolfie Create ;================================================== %include "boot.inc" ; | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | ; | Pr| Privl | S | Ex|D/C| RW| Ac| GDT_ACCESS_BYTE_CODE equ 1_00_1_1010b ;Ex = 1 GDT_ACCESS_BYTE_ROM equ 1_00_1_0000b ;Ex = 0, RW = 0 GDT_ACCESS_BYTE_DATA equ 1_00_1_0010b ;Ex = 0, RW = 1 ; | 7 | 6 | 5 | 4 | ; | Gr| Sz| 0 | 0 | GDT_FLAGS_1B_16 equ 0000b GDT_FLAGS_1B_32 equ 0100b GDT_FLAGS_4K_16 equ 1000b GDT_FLAGS_4K_32 equ 1100b %define GDT_ENTRY(baseAddr, limit, accessByte, flag) \ dw limit & 0xFFFF, \ baseAddr & 0xFFFF, \ (accessByte << 8) | ((baseAddr >> 16) & 0xFF), \ ((baseAddr >> 24) & 0xFF00) | (flag << 4) | ((limit >> 16) & 0xF) SECTION LOADER vstart=BASE_ADDRESS_GDT ; 0 - The 1st GDT entry is inaccessible GDT_ENTRY(0, 0, 0, 0) ; 1 - The GDT segment GDT_ENTRY(BASE_ADDRESS_GDT, (GDT_TABLE_SIZE - 1), GDT_ACCESS_BYTE_DATA, GDT_FLAGS_1B_32) ; 2 - The video memory (text) segment GDT_ENTRY(BASE_ADDRESS_VIDEO_MEMORY, LIMIT_VIDEO, GDT_ACCESS_BYTE_DATA, GDT_FLAGS_4K_32) ; 3 - The code segment GDT_ENTRY(BASE_ADDRESS_UNLIMITED, LIMIT_UNLIMITED, GDT_ACCESS_BYTE_CODE, GDT_FLAGS_4K_32) ; 4 - The data segment GDT_ENTRY(BASE_ADDRESS_UNLIMITED, LIMIT_UNLIMITED, GDT_ACCESS_BYTE_DATA, GDT_FLAGS_4K_32) ;Padding bits times (GDT_TABLE_SIZE - ($ - $$)) db 0 ; ====================================== ; Appendix: GDT Entry Stucture Info ; (From wiki.osdev.org) ; ====================================== ; |(MSB) - GDT Entry - (LSB)| ; | 31..............................16 | 15.....................0 | ; | Base 15:0 | Limit 15:0 | ; | 63......56 | 55...52 | 51.......48 | 47.......40 | 39......32 | ; | Base 31:24 | Flags | Limit 19:16 | Access Byte | Base 23:16 | ; ; |(MSB) - Access Byte - (LSB)| ; | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | ; | Pr| Privl | S | Ex|D/C| RW| Ac| ; Pr : Present bit. This must be 1 for all valid selectors. ; Privl: Privilege, 2 bits. Contains the ring level, 0 = highest (kernel), 3 = lowest (user applications). ; S : Descriptor type. This bit should be set for code or data segments and should be cleared for system segments (eg. a Task State Segment) ; Ex : Executable bit. If 1 code in this segment can be executed, ie. a code selector. If 0 it is a data selector. ; DC : Direction bit/Conforming bit. ; Direction bit for data selectors: Tells the direction. 0 the segment grows up. 1 the segment grows down, ie. the offset has to be greater than the limit. ; Conforming bit for code selectors: If 1 code in this segment can be executed from an equal or lower privilege level. ; For example, code in ring 3 can far-jump to conforming code in a ring 2 segment. ; The privl-bits represent the highest privilege level that is allowed to execute the segment. ; For example, code in ring 0 cannot far-jump to a conforming code segment with privl==0x2, while code in ring 2 and 3 can. ; Note that the privilege level remains the same, ie. a far-jump form ring 3 to a privl==2-segment remains in ring 3 after the jump. ; If 0 code in this segment can only be executed from the ring set in privl. ; RW : Readable bit/Writable bit. Readable bit for code selectors: Whether read access for this segment is allowed. Write access is never allowed for code segments. ; Writable bit for data selectors: Whether write access for this segment is allowed. Read access is always allowed for data segments. ; Ac : Accessed bit. Just set to 0. The CPU sets this to 1 when the segment is accessed. ; ; | - GDT Flags - | ; (MSB) (LSB) ; | 7 | 6 | 5 | 4 | ; | Gr| Sz| 0 | 0 | ; Gr: Granularity bit. If 0 the limit is in 1 B blocks (byte granularity), if 1 the limit is in 4 KiB blocks (page granularity). ; Sz: Size bit. If 0 the selector defines 16 bit protected mode. If 1 it defines 32 bit protected mode. You can have both 16 bit and 32 bit selectors at once. ; The rest 2 bits is for x64. Just set 0 for our x86 system.
59.961039
174
0.570067
911c4e99043b2ee43bc6af06ad77ed38fb53afcf
9,695
asm
Assembly
engine/menu/naming_screen.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
16
2018-08-28T21:47:01.000Z
2022-02-20T20:29:59.000Z
engine/menu/naming_screen.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
5
2019-04-03T19:53:11.000Z
2022-03-11T22:49:34.000Z
engine/menu/naming_screen.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
2
2019-12-09T19:46:02.000Z
2020-12-05T21:36:30.000Z
AskName: call SaveScreenTilesToBuffer1 call GetPredefRegisters push hl ld a, [wIsInBattle] dec a coord hl, 0, 0 lb bc, 4, 11 call z, ClearScreenArea ; only if in wild battle ld a, [wcf91] ld [wd11e], a call GetMonName ld hl, DoYouWantToNicknameText call PrintText coord hl, 14, 7 lb bc, 8, 15 ld a, TWO_OPTION_MENU ld [wTextBoxID], a call DisplayTextBoxID pop hl ld a, [wCurrentMenuItem] and a jr nz, .declinedNickname ld a, [wUpdateSpritesEnabled] push af xor a ld [wUpdateSpritesEnabled], a push hl ld a, NAME_MON_SCREEN ld [wNamingScreenType], a call DisplayNamingScreen ld a, [wIsInBattle] and a jr nz, .inBattle call ReloadMapSpriteTilePatterns .inBattle call LoadScreenTilesFromBuffer1 pop hl pop af ld [wUpdateSpritesEnabled], a ld a, [wcf4b] cp "@" ret nz .declinedNickname ld d, h ld e, l ld hl, wcd6d ld bc, NAME_LENGTH jp CopyData DoYouWantToNicknameText: TX_FAR _DoYouWantToNicknameText db "@" DisplayNameRaterScreen: ld hl, wBuffer xor a ld [wUpdateSpritesEnabled], a ld a, NAME_MON_SCREEN ld [wNamingScreenType], a call DisplayNamingScreen call GBPalWhiteOutWithDelay3 call RestoreScreenTilesAndReloadTilePatterns call LoadGBPal ld a, [wcf4b] cp "@" jr z, .playerCancelled ld hl, wPartyMonNicks ld bc, NAME_LENGTH ld a, [wWhichPokemon] call AddNTimes ld e, l ld d, h ld hl, wBuffer ld bc, NAME_LENGTH call CopyData and a ret .playerCancelled scf ret DisplayNamingScreen: push hl ld hl, wd730 set 6, [hl] call GBPalWhiteOutWithDelay3 call ClearScreen call UpdateSprites ld b, SET_PAL_GENERIC call RunPaletteCommand call LoadHpBarAndStatusTilePatterns call LoadEDTile callba LoadMonPartySpriteGfx coord hl, 0, 4 lb bc, 9, 18 call TextBoxBorder call PrintNamingText ld a, 3 ld [wTopMenuItemY], a ld a, 1 ld [wTopMenuItemX], a ld [wLastMenuItem], a ld [wCurrentMenuItem], a ld a, $ff ld [wMenuWatchedKeys], a ld a, 7 ld [wMaxMenuItem], a ld a, "@" ld [wcf4b], a xor a ld hl, wNamingScreenSubmitName ld [hli], a ld [hli], a ld [wAnimCounter], a .selectReturnPoint call PrintAlphabet call GBPalNormal .ABStartReturnPoint ld a, [wNamingScreenSubmitName] and a jr nz, .submitNickname call PrintNicknameAndUnderscores .dPadReturnPoint call PlaceMenuCursor .inputLoop ld a, [wCurrentMenuItem] push af callba AnimatePartyMon_ForceSpeed1 pop af ld [wCurrentMenuItem], a call JoypadLowSensitivity ld a, [hJoyPressed] and a jr z, .inputLoop ld hl, .namingScreenButtonFunctions .checkForPressedButton sla a jr c, .foundPressedButton inc hl inc hl inc hl inc hl jr .checkForPressedButton .foundPressedButton ld a, [hli] ld e, a ld a, [hli] ld d, a ld a, [hli] ld h, [hl] ld l, a push de jp hl .submitNickname pop de ld hl, wcf4b ld bc, NAME_LENGTH call CopyData call GBPalWhiteOutWithDelay3 call ClearScreen call ClearSprites call RunDefaultPaletteCommand call GBPalNormal xor a ld [wAnimCounter], a ld hl, wd730 res 6, [hl] ld a, [wIsInBattle] and a jp z, LoadTextBoxTilePatterns jpab LoadHudTilePatterns .namingScreenButtonFunctions dw .dPadReturnPoint dw .pressedDown dw .dPadReturnPoint dw .pressedUp dw .dPadReturnPoint dw .pressedLeft dw .dPadReturnPoint dw .pressedRight dw .ABStartReturnPoint dw .pressedStart dw .selectReturnPoint dw .pressedSelect dw .ABStartReturnPoint dw .pressedB dw .ABStartReturnPoint dw .pressedA .pressedA_changedCase pop de ld de, .selectReturnPoint push de .pressedSelect ld a, [wAlphabetCase] xor $1 ld [wAlphabetCase], a ret .pressedStart ld a, 1 ld [wNamingScreenSubmitName], a ret .pressedA ld a, [wCurrentMenuItem] cp $5 ; "ED" row jr nz, .didNotPressED ld a, [wTopMenuItemX] cp $11 ; "ED" column jr z, .pressedStart .didNotPressED ld a, [wCurrentMenuItem] cp $6 ; case switch row jr nz, .didNotPressCaseSwtich ld a, [wTopMenuItemX] cp $1 ; case switch column jr z, .pressedA_changedCase .didNotPressCaseSwtich ld hl, wMenuCursorLocation ld a, [hli] ld h, [hl] ld l, a inc hl ld a, [hl] ld [wNamingScreenLetter], a call CalcStringLength ld a, [wNamingScreenLetter] cp $e5 ld de, Dakutens jr z, .dakutensAndHandakutens cp $e4 ld de, Handakutens jr z, .dakutensAndHandakutens ld a, [wNamingScreenType] cp NAME_MON_SCREEN jr nc, .checkMonNameLength ld a, [wNamingScreenNameLength] cp $7 ; max length of player/rival names jr .checkNameLength .checkMonNameLength ld a, [wNamingScreenNameLength] cp $a ; max length of pokemon nicknames .checkNameLength jr c, .addLetter ret .dakutensAndHandakutens push hl call DakutensAndHandakutens pop hl ret nc dec hl .addLetter ld a, [wNamingScreenLetter] ld [hli], a ld [hl], "@" ld a, SFX_PRESS_AB call PlaySound ret .pressedB ld a, [wNamingScreenNameLength] and a ret z call CalcStringLength dec hl ld [hl], "@" ret .pressedRight ld a, [wCurrentMenuItem] cp $6 ret z ; can't scroll right on bottom row ld a, [wTopMenuItemX] cp $11 ; max jp z, .wrapToFirstColumn inc a inc a jr .done .wrapToFirstColumn ld a, $1 jr .done .pressedLeft ld a, [wCurrentMenuItem] cp $6 ret z ; can't scroll right on bottom row ld a, [wTopMenuItemX] dec a jp z, .wrapToLastColumn dec a jr .done .wrapToLastColumn ld a, $11 ; max jr .done .pressedUp ld a, [wCurrentMenuItem] dec a ld [wCurrentMenuItem], a and a ret nz ld a, $6 ; wrap to bottom row ld [wCurrentMenuItem], a ld a, $1 ; force left column jr .done .pressedDown ld a, [wCurrentMenuItem] inc a ld [wCurrentMenuItem], a cp $7 jr nz, .wrapToTopRow ld a, $1 ld [wCurrentMenuItem], a jr .done .wrapToTopRow cp $6 ret nz ld a, $1 .done ld [wTopMenuItemX], a jp EraseMenuCursor LoadEDTile: ; In Red/Blue, the bank for the ED_tile was defined incorrectly as bank0 ; Luckily, the MBC3 treats loading $0 into $2000-$2fff range as loading bank1 into $4000-$7fff range ; Because Yellow uses the MBC5, loading $0 into $2000 - $2fff range will load bank0 instead of bank1 and thus incorrectly load the tile ; Instead of defining the correct bank, GameFreak decided to simply copy the ED_Tile in the function during HBlank ld de, ED_Tile ld hl, vFont + $700 ld c, $4 ; number of copies needed .waitForHBlankLoop ld a, [rSTAT] and %10 ; in HBlank? jr nz, .waitForHBlankLoop ld a, [de] ld [hli], a ld [hli], a inc de ld a, [de] ld [hli], a ld [hli], a inc de dec c jr nz, .waitForHBlankLoop ret ED_Tile: INCBIN "gfx/ED_tile.1bpp" ED_TileEnd: PrintAlphabet: xor a ld [H_AUTOBGTRANSFERENABLED], a ld a, [wAlphabetCase] and a ld de, LowerCaseAlphabet jr nz, .lowercase ld de, UpperCaseAlphabet .lowercase coord hl, 2, 5 lb bc, 5, 9 ; 5 rows, 9 columns .outerLoop push bc .innerLoop ld a, [de] ld [hli], a inc hl inc de dec c jr nz, .innerLoop ld bc, SCREEN_WIDTH + 2 add hl, bc pop bc dec b jr nz, .outerLoop call PlaceString ld a, $1 ld [H_AUTOBGTRANSFERENABLED], a jp Delay3 LowerCaseAlphabet: db "abcdefghijklmnopqrstuvwxyz ×():;[]",$e1,$e2,"-?!♂♀/",$f2,",¥UPPER CASE@" UpperCaseAlphabet: db "ABCDEFGHIJKLMNOPQRSTUVWXYZ ×():;[]",$e1,$e2,"-?!♂♀/",$f2,",¥lower case@" PrintNicknameAndUnderscores: call CalcStringLength ld a, c ld [wNamingScreenNameLength], a coord hl, 10, 2 lb bc, 1, 10 call ClearScreenArea coord hl, 10, 2 ld de, wcf4b call PlaceString coord hl, 10, 3 ld a, [wNamingScreenType] cp NAME_MON_SCREEN jr nc, .pokemon1 ld b, 7 ; player or rival max name length jr .playerOrRival1 .pokemon1 ld b, 10 ; pokemon max name length .playerOrRival1 ld a, $76 ; underscore tile id .placeUnderscoreLoop ld [hli], a dec b jr nz, .placeUnderscoreLoop ld a, [wNamingScreenType] cp NAME_MON_SCREEN ld a, [wNamingScreenNameLength] jr nc, .pokemon2 cp 7 ; player or rival max name length jr .playerOrRival2 .pokemon2 cp 10 ; pokemon max name length .playerOrRival2 jr nz, .emptySpacesRemaining ; when all spaces are filled, force the cursor onto the ED tile call EraseMenuCursor ld a, $11 ; "ED" x coord ld [wTopMenuItemX], a ld a, $5 ; "ED" y corrd ld [wCurrentMenuItem], a ld a, [wNamingScreenType] cp NAME_MON_SCREEN ld a, 9 ; keep the last underscore raised jr nc, .pokemon3 ld a, 6 ; keep the last underscore raised .pokemon3 .emptySpacesRemaining ld c, a ld b, $0 coord hl, 10, 3 add hl, bc ld [hl], $77 ; raised underscore tile id ret DakutensAndHandakutens: push de call CalcStringLength dec hl ld a, [hl] pop hl ld de, $2 call IsInArray ret nc inc hl ld a, [hl] ld [wNamingScreenLetter], a ret Dakutens: db "かが", "きぎ", "くぐ", "けげ", "こご" db "さざ", "しじ", "すず", "せぜ", "そぞ" db "ただ", "ちぢ", "つづ", "てで", "とど" db "はば", "ひび", "ふぶ", "へべ", "ほぼ" db "カガ", "キギ", "クグ", "ケゲ", "コゴ" db "サザ", "シジ", "スズ", "セゼ", "ソゾ" db "タダ", "チヂ", "ツヅ", "テデ", "トド" db "ハバ", "ヒビ", "フブ", "へべ", "ホボ" db $ff Handakutens: db "はぱ", "ひぴ", "ふぷ", "へぺ", "ほぽ" db "ハパ", "ヒピ", "フプ", "へぺ", "ホポ" db $ff ; calculates the length of the string at wcf4b and stores it in c CalcStringLength: ld hl, wcf4b ld c, $0 .loop ld a, [hl] cp "@" ret z inc hl inc c jr .loop PrintNamingText: coord hl, 0, 1 ld a, [wNamingScreenType] ld de, YourTextString and a jr z, .notNickname ld de, RivalsTextString dec a jr z, .notNickname ld a, [wcf91] ld [wMonPartySpriteSpecies], a push af callba WriteMonPartySpriteOAMBySpecies pop af ld [wd11e], a call GetMonName coord hl, 4, 1 call PlaceString ld hl, $1 add hl, bc ld [hl], $c9 coord hl, 1, 3 ld de, NicknameTextString jr .placeString .notNickname call PlaceString ld l, c ld h, b ld de, NameTextString .placeString jp PlaceString YourTextString: db "YOUR @" RivalsTextString: db "RIVAL's @" NameTextString: db "NAME?@" NicknameTextString: db "NICKNAME?@"
18.396584
135
0.713461
6495b2d758c4411baf369854da361cdeaf02a511
42
asm
Assembly
src/main/fragment/mos6502-common/vwum1=pbuc1_derefidx_vbuyy_word_pbuc2_derefidx_vbuyy.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
2
2022-03-01T02:21:14.000Z
2022-03-01T04:33:35.000Z
src/main/fragment/mos6502-common/vwum1=pbuc1_derefidx_vbuyy_word_pbuc2_derefidx_vbuyy.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
src/main/fragment/mos6502-common/vwum1=pbuc1_derefidx_vbuyy_word_pbuc2_derefidx_vbuyy.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
lda {c1},y sta {m1}+1 lda {c2},y sta {m1}
8.4
10
0.547619
465c7f213b6f78a81a9dcbbc125047d51d2caa61
1,603
asm
Assembly
bootdict/tc/bootstrap-interpret.asm
ikysil/ikforth
165e049fc007003cd05f59332dc856d553d8aac8
[ "Unlicense" ]
8
2017-08-03T08:49:06.000Z
2021-12-17T12:02:19.000Z
bootdict/tc/bootstrap-interpret.asm
clstrfsck/ikforth
165e049fc007003cd05f59332dc856d553d8aac8
[ "Unlicense" ]
58
2016-04-21T20:03:54.000Z
2022-01-16T00:40:50.000Z
bootdict/tc/bootstrap-interpret.asm
clstrfsck/ikforth
165e049fc007003cd05f59332dc856d553d8aac8
[ "Unlicense" ]
1
2018-07-25T21:07:00.000Z
2018-07-25T21:07:00.000Z
$COLON 'BOOTSTRAP-INTERPRET',$BOOTSTRAP_INTERPRET,VEF_HIDDEN CW $INIT_USER CFETCH $SF CFETCH $HASH_SF CWLIT $INCLUDED CW $CATCH, $DUPE, $EXIT_CODE, $STORE, $QUESTION_DUPE _IF BSI_HAS_EXCEPTION $CR $CR $WRITE 'Exception caught while INCLUDing [' CFETCH $SF CFETCH $HASH_SF CW $TYPE $WRITE ']' $CR $WRITE 'Exception: H# ' CW $HOUT8 $CR CW $TWO_DROP $WRITE 'HERE: H# ' CW $HERE, $HOUT8 $CR $WRITE 'Latest word searched: ' CW $POCKET, $COUNT, $TYPE $CR $WRITE 'Latest vocabulary entry: ' CW $LATEST_NAME_FETCH, $NAME_TO_STRING, $DUPE, $ZERO_NOT_EQUALS _IF BSI_ERROR_HAS_NAME CW $TYPE _ELSE BSI_ERROR_HAS_NAME CW $TWO_DROP $WRITE '(nonamed)' _THEN BSI_ERROR_HAS_NAME $CR $WRITE 'Error in: ' CW $REPORT_SOURCE $CR $CR _THEN BSI_HAS_EXCEPTION CW $PBYE
39.097561
88
0.349345
48358d12b2420fbfa295108d79830ac111b3fda2
310
asm
Assembly
programs/oeis/021/A021382.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/021/A021382.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/021/A021382.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A021382: Decimal expansion of 1/378. ; 0,0,2,6,4,5,5,0,2,6,4,5,5,0,2,6,4,5,5,0,2,6,4,5,5,0,2,6,4,5,5,0,2,6,4,5,5,0,2,6,4,5,5,0,2,6,4,5,5,0,2,6,4,5,5,0,2,6,4,5,5,0,2,6,4,5,5,0,2,6,4,5,5,0,2,6,4,5,5,0,2,6,4,5,5,0,2,6,4,5,5,0,2,6,4,5,5,0,2 add $0,1 mov $1,10 pow $1,$0 mul $1,5 div $1,1890 mod $1,10 mov $0,$1
28.181818
199
0.541935
75c2a0cface5bf022c7b476af1ecaaf4a66d5b4e
44,012
asm
Assembly
echo.asm
dnaef/cs153
eada4dc18db46b006ec2621d56193a418acb6e6a
[ "MIT-0" ]
null
null
null
echo.asm
dnaef/cs153
eada4dc18db46b006ec2621d56193a418acb6e6a
[ "MIT-0" ]
null
null
null
echo.asm
dnaef/cs153
eada4dc18db46b006ec2621d56193a418acb6e6a
[ "MIT-0" ]
null
null
null
_echo: file format elf32-i386 Disassembly of section .text: 00000000 <main>: #include "stat.h" #include "user.h" int main(int argc, char *argv[]) { 0: 55 push %ebp 1: 89 e5 mov %esp,%ebp 3: 83 e4 f0 and $0xfffffff0,%esp 6: 57 push %edi 7: 56 push %esi 8: 53 push %ebx 9: 83 ec 14 sub $0x14,%esp c: 8b 75 08 mov 0x8(%ebp),%esi f: 8b 7d 0c mov 0xc(%ebp),%edi int i; for(i = 1; i < argc; i++) 12: 83 fe 01 cmp $0x1,%esi 15: 7e 60 jle 77 <main+0x77> 17: bb 01 00 00 00 mov $0x1,%ebx printf(1, "%s%s", argv[i], i+1 < argc ? " " : "\n"); 1c: 83 c3 01 add $0x1,%ebx 1f: 39 de cmp %ebx,%esi 21: 7e 30 jle 53 <main+0x53> 23: 90 nop 24: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 28: c7 44 24 0c 56 07 00 movl $0x756,0xc(%esp) 2f: 00 30: 8b 44 9f fc mov -0x4(%edi,%ebx,4),%eax 34: 83 c3 01 add $0x1,%ebx 37: c7 44 24 04 58 07 00 movl $0x758,0x4(%esp) 3e: 00 3f: c7 04 24 01 00 00 00 movl $0x1,(%esp) 46: 89 44 24 08 mov %eax,0x8(%esp) 4a: e8 a1 03 00 00 call 3f0 <printf> 4f: 39 de cmp %ebx,%esi 51: 7f d5 jg 28 <main+0x28> 53: c7 44 24 0c 5d 07 00 movl $0x75d,0xc(%esp) 5a: 00 5b: 8b 44 b7 fc mov -0x4(%edi,%esi,4),%eax 5f: c7 44 24 04 58 07 00 movl $0x758,0x4(%esp) 66: 00 67: c7 04 24 01 00 00 00 movl $0x1,(%esp) 6e: 89 44 24 08 mov %eax,0x8(%esp) 72: e8 79 03 00 00 call 3f0 <printf> exit(0); 77: c7 04 24 00 00 00 00 movl $0x0,(%esp) 7e: e8 35 02 00 00 call 2b8 <exit> 83: 90 nop 84: 90 nop 85: 90 nop 86: 90 nop 87: 90 nop 88: 90 nop 89: 90 nop 8a: 90 nop 8b: 90 nop 8c: 90 nop 8d: 90 nop 8e: 90 nop 8f: 90 nop 00000090 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, char *t) { 90: 55 push %ebp 91: 31 d2 xor %edx,%edx 93: 89 e5 mov %esp,%ebp 95: 8b 45 08 mov 0x8(%ebp),%eax 98: 53 push %ebx 99: 8b 5d 0c mov 0xc(%ebp),%ebx 9c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi char *os; os = s; while((*s++ = *t++) != 0) a0: 0f b6 0c 13 movzbl (%ebx,%edx,1),%ecx a4: 88 0c 10 mov %cl,(%eax,%edx,1) a7: 83 c2 01 add $0x1,%edx aa: 84 c9 test %cl,%cl ac: 75 f2 jne a0 <strcpy+0x10> ; return os; } ae: 5b pop %ebx af: 5d pop %ebp b0: c3 ret b1: eb 0d jmp c0 <strcmp> b3: 90 nop b4: 90 nop b5: 90 nop b6: 90 nop b7: 90 nop b8: 90 nop b9: 90 nop ba: 90 nop bb: 90 nop bc: 90 nop bd: 90 nop be: 90 nop bf: 90 nop 000000c0 <strcmp>: int strcmp(const char *p, const char *q) { c0: 55 push %ebp c1: 89 e5 mov %esp,%ebp c3: 8b 4d 08 mov 0x8(%ebp),%ecx c6: 53 push %ebx c7: 8b 55 0c mov 0xc(%ebp),%edx while(*p && *p == *q) ca: 0f b6 01 movzbl (%ecx),%eax cd: 84 c0 test %al,%al cf: 75 14 jne e5 <strcmp+0x25> d1: eb 25 jmp f8 <strcmp+0x38> d3: 90 nop d4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi p++, q++; d8: 83 c1 01 add $0x1,%ecx db: 83 c2 01 add $0x1,%edx } int strcmp(const char *p, const char *q) { while(*p && *p == *q) de: 0f b6 01 movzbl (%ecx),%eax e1: 84 c0 test %al,%al e3: 74 13 je f8 <strcmp+0x38> e5: 0f b6 1a movzbl (%edx),%ebx e8: 38 d8 cmp %bl,%al ea: 74 ec je d8 <strcmp+0x18> ec: 0f b6 db movzbl %bl,%ebx ef: 0f b6 c0 movzbl %al,%eax f2: 29 d8 sub %ebx,%eax p++, q++; return (uchar)*p - (uchar)*q; } f4: 5b pop %ebx f5: 5d pop %ebp f6: c3 ret f7: 90 nop } int strcmp(const char *p, const char *q) { while(*p && *p == *q) f8: 0f b6 1a movzbl (%edx),%ebx fb: 31 c0 xor %eax,%eax fd: 0f b6 db movzbl %bl,%ebx 100: 29 d8 sub %ebx,%eax p++, q++; return (uchar)*p - (uchar)*q; } 102: 5b pop %ebx 103: 5d pop %ebp 104: c3 ret 105: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 109: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000110 <strlen>: uint strlen(char *s) { 110: 55 push %ebp int n; for(n = 0; s[n]; n++) 111: 31 d2 xor %edx,%edx return (uchar)*p - (uchar)*q; } uint strlen(char *s) { 113: 89 e5 mov %esp,%ebp int n; for(n = 0; s[n]; n++) 115: 31 c0 xor %eax,%eax return (uchar)*p - (uchar)*q; } uint strlen(char *s) { 117: 8b 4d 08 mov 0x8(%ebp),%ecx int n; for(n = 0; s[n]; n++) 11a: 80 39 00 cmpb $0x0,(%ecx) 11d: 74 0c je 12b <strlen+0x1b> 11f: 90 nop 120: 83 c2 01 add $0x1,%edx 123: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1) 127: 89 d0 mov %edx,%eax 129: 75 f5 jne 120 <strlen+0x10> ; return n; } 12b: 5d pop %ebp 12c: c3 ret 12d: 8d 76 00 lea 0x0(%esi),%esi 00000130 <memset>: void* memset(void *dst, int c, uint n) { 130: 55 push %ebp 131: 89 e5 mov %esp,%ebp 133: 8b 55 08 mov 0x8(%ebp),%edx 136: 57 push %edi } static inline void stosb(void *addr, int data, int cnt) { asm volatile("cld; rep stosb" : 137: 8b 4d 10 mov 0x10(%ebp),%ecx 13a: 8b 45 0c mov 0xc(%ebp),%eax 13d: 89 d7 mov %edx,%edi 13f: fc cld 140: f3 aa rep stos %al,%es:(%edi) stosb(dst, c, n); return dst; } 142: 89 d0 mov %edx,%eax 144: 5f pop %edi 145: 5d pop %ebp 146: c3 ret 147: 89 f6 mov %esi,%esi 149: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000150 <strchr>: char* strchr(const char *s, char c) { 150: 55 push %ebp 151: 89 e5 mov %esp,%ebp 153: 8b 45 08 mov 0x8(%ebp),%eax 156: 0f b6 4d 0c movzbl 0xc(%ebp),%ecx for(; *s; s++) 15a: 0f b6 10 movzbl (%eax),%edx 15d: 84 d2 test %dl,%dl 15f: 75 11 jne 172 <strchr+0x22> 161: eb 15 jmp 178 <strchr+0x28> 163: 90 nop 164: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 168: 83 c0 01 add $0x1,%eax 16b: 0f b6 10 movzbl (%eax),%edx 16e: 84 d2 test %dl,%dl 170: 74 06 je 178 <strchr+0x28> if(*s == c) 172: 38 ca cmp %cl,%dl 174: 75 f2 jne 168 <strchr+0x18> return (char*)s; return 0; } 176: 5d pop %ebp 177: c3 ret } char* strchr(const char *s, char c) { for(; *s; s++) 178: 31 c0 xor %eax,%eax if(*s == c) return (char*)s; return 0; } 17a: 5d pop %ebp 17b: 90 nop 17c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 180: c3 ret 181: eb 0d jmp 190 <atoi> 183: 90 nop 184: 90 nop 185: 90 nop 186: 90 nop 187: 90 nop 188: 90 nop 189: 90 nop 18a: 90 nop 18b: 90 nop 18c: 90 nop 18d: 90 nop 18e: 90 nop 18f: 90 nop 00000190 <atoi>: return r; } int atoi(const char *s) { 190: 55 push %ebp int n; n = 0; while('0' <= *s && *s <= '9') 191: 31 c0 xor %eax,%eax return r; } int atoi(const char *s) { 193: 89 e5 mov %esp,%ebp 195: 8b 4d 08 mov 0x8(%ebp),%ecx 198: 53 push %ebx int n; n = 0; while('0' <= *s && *s <= '9') 199: 0f b6 11 movzbl (%ecx),%edx 19c: 8d 5a d0 lea -0x30(%edx),%ebx 19f: 80 fb 09 cmp $0x9,%bl 1a2: 77 1c ja 1c0 <atoi+0x30> 1a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi n = n*10 + *s++ - '0'; 1a8: 0f be d2 movsbl %dl,%edx 1ab: 83 c1 01 add $0x1,%ecx 1ae: 8d 04 80 lea (%eax,%eax,4),%eax 1b1: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax atoi(const char *s) { int n; n = 0; while('0' <= *s && *s <= '9') 1b5: 0f b6 11 movzbl (%ecx),%edx 1b8: 8d 5a d0 lea -0x30(%edx),%ebx 1bb: 80 fb 09 cmp $0x9,%bl 1be: 76 e8 jbe 1a8 <atoi+0x18> n = n*10 + *s++ - '0'; return n; } 1c0: 5b pop %ebx 1c1: 5d pop %ebp 1c2: c3 ret 1c3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 1c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 000001d0 <memmove>: void* memmove(void *vdst, void *vsrc, int n) { 1d0: 55 push %ebp 1d1: 89 e5 mov %esp,%ebp 1d3: 56 push %esi 1d4: 8b 45 08 mov 0x8(%ebp),%eax 1d7: 53 push %ebx 1d8: 8b 5d 10 mov 0x10(%ebp),%ebx 1db: 8b 75 0c mov 0xc(%ebp),%esi char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) 1de: 85 db test %ebx,%ebx 1e0: 7e 14 jle 1f6 <memmove+0x26> n = n*10 + *s++ - '0'; return n; } void* memmove(void *vdst, void *vsrc, int n) 1e2: 31 d2 xor %edx,%edx 1e4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) *dst++ = *src++; 1e8: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx 1ec: 88 0c 10 mov %cl,(%eax,%edx,1) 1ef: 83 c2 01 add $0x1,%edx { char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) 1f2: 39 da cmp %ebx,%edx 1f4: 75 f2 jne 1e8 <memmove+0x18> *dst++ = *src++; return vdst; } 1f6: 5b pop %ebx 1f7: 5e pop %esi 1f8: 5d pop %ebp 1f9: c3 ret 1fa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 00000200 <stat>: return buf; } int stat(char *n, struct stat *st) { 200: 55 push %ebp 201: 89 e5 mov %esp,%ebp 203: 83 ec 18 sub $0x18,%esp int fd; int r; fd = open(n, O_RDONLY); 206: 8b 45 08 mov 0x8(%ebp),%eax return buf; } int stat(char *n, struct stat *st) { 209: 89 5d f8 mov %ebx,-0x8(%ebp) 20c: 89 75 fc mov %esi,-0x4(%ebp) int fd; int r; fd = open(n, O_RDONLY); if(fd < 0) 20f: be ff ff ff ff mov $0xffffffff,%esi stat(char *n, struct stat *st) { int fd; int r; fd = open(n, O_RDONLY); 214: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 21b: 00 21c: 89 04 24 mov %eax,(%esp) 21f: e8 d4 00 00 00 call 2f8 <open> if(fd < 0) 224: 85 c0 test %eax,%eax stat(char *n, struct stat *st) { int fd; int r; fd = open(n, O_RDONLY); 226: 89 c3 mov %eax,%ebx if(fd < 0) 228: 78 19 js 243 <stat+0x43> return -1; r = fstat(fd, st); 22a: 8b 45 0c mov 0xc(%ebp),%eax 22d: 89 1c 24 mov %ebx,(%esp) 230: 89 44 24 04 mov %eax,0x4(%esp) 234: e8 d7 00 00 00 call 310 <fstat> close(fd); 239: 89 1c 24 mov %ebx,(%esp) int r; fd = open(n, O_RDONLY); if(fd < 0) return -1; r = fstat(fd, st); 23c: 89 c6 mov %eax,%esi close(fd); 23e: e8 9d 00 00 00 call 2e0 <close> return r; } 243: 89 f0 mov %esi,%eax 245: 8b 5d f8 mov -0x8(%ebp),%ebx 248: 8b 75 fc mov -0x4(%ebp),%esi 24b: 89 ec mov %ebp,%esp 24d: 5d pop %ebp 24e: c3 ret 24f: 90 nop 00000250 <gets>: return 0; } char* gets(char *buf, int max) { 250: 55 push %ebp 251: 89 e5 mov %esp,%ebp 253: 57 push %edi 254: 56 push %esi 255: 31 f6 xor %esi,%esi 257: 53 push %ebx 258: 83 ec 2c sub $0x2c,%esp 25b: 8b 7d 08 mov 0x8(%ebp),%edi int i, cc; char c; for(i=0; i+1 < max; ){ 25e: eb 06 jmp 266 <gets+0x16> cc = read(0, &c, 1); if(cc < 1) break; buf[i++] = c; if(c == '\n' || c == '\r') 260: 3c 0a cmp $0xa,%al 262: 74 39 je 29d <gets+0x4d> 264: 89 de mov %ebx,%esi gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 266: 8d 5e 01 lea 0x1(%esi),%ebx 269: 3b 5d 0c cmp 0xc(%ebp),%ebx 26c: 7d 31 jge 29f <gets+0x4f> cc = read(0, &c, 1); 26e: 8d 45 e7 lea -0x19(%ebp),%eax 271: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 278: 00 279: 89 44 24 04 mov %eax,0x4(%esp) 27d: c7 04 24 00 00 00 00 movl $0x0,(%esp) 284: e8 47 00 00 00 call 2d0 <read> if(cc < 1) 289: 85 c0 test %eax,%eax 28b: 7e 12 jle 29f <gets+0x4f> break; buf[i++] = c; 28d: 0f b6 45 e7 movzbl -0x19(%ebp),%eax 291: 88 44 1f ff mov %al,-0x1(%edi,%ebx,1) if(c == '\n' || c == '\r') 295: 0f b6 45 e7 movzbl -0x19(%ebp),%eax 299: 3c 0d cmp $0xd,%al 29b: 75 c3 jne 260 <gets+0x10> 29d: 89 de mov %ebx,%esi break; } buf[i] = '\0'; 29f: c6 04 37 00 movb $0x0,(%edi,%esi,1) return buf; } 2a3: 89 f8 mov %edi,%eax 2a5: 83 c4 2c add $0x2c,%esp 2a8: 5b pop %ebx 2a9: 5e pop %esi 2aa: 5f pop %edi 2ab: 5d pop %ebp 2ac: c3 ret 2ad: 90 nop 2ae: 90 nop 2af: 90 nop 000002b0 <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 2b0: b8 01 00 00 00 mov $0x1,%eax 2b5: cd 40 int $0x40 2b7: c3 ret 000002b8 <exit>: SYSCALL(exit) 2b8: b8 02 00 00 00 mov $0x2,%eax 2bd: cd 40 int $0x40 2bf: c3 ret 000002c0 <wait>: SYSCALL(wait) 2c0: b8 03 00 00 00 mov $0x3,%eax 2c5: cd 40 int $0x40 2c7: c3 ret 000002c8 <pipe>: SYSCALL(pipe) 2c8: b8 04 00 00 00 mov $0x4,%eax 2cd: cd 40 int $0x40 2cf: c3 ret 000002d0 <read>: SYSCALL(read) 2d0: b8 05 00 00 00 mov $0x5,%eax 2d5: cd 40 int $0x40 2d7: c3 ret 000002d8 <write>: SYSCALL(write) 2d8: b8 10 00 00 00 mov $0x10,%eax 2dd: cd 40 int $0x40 2df: c3 ret 000002e0 <close>: SYSCALL(close) 2e0: b8 15 00 00 00 mov $0x15,%eax 2e5: cd 40 int $0x40 2e7: c3 ret 000002e8 <kill>: SYSCALL(kill) 2e8: b8 06 00 00 00 mov $0x6,%eax 2ed: cd 40 int $0x40 2ef: c3 ret 000002f0 <exec>: SYSCALL(exec) 2f0: b8 07 00 00 00 mov $0x7,%eax 2f5: cd 40 int $0x40 2f7: c3 ret 000002f8 <open>: SYSCALL(open) 2f8: b8 0f 00 00 00 mov $0xf,%eax 2fd: cd 40 int $0x40 2ff: c3 ret 00000300 <mknod>: SYSCALL(mknod) 300: b8 11 00 00 00 mov $0x11,%eax 305: cd 40 int $0x40 307: c3 ret 00000308 <unlink>: SYSCALL(unlink) 308: b8 12 00 00 00 mov $0x12,%eax 30d: cd 40 int $0x40 30f: c3 ret 00000310 <fstat>: SYSCALL(fstat) 310: b8 08 00 00 00 mov $0x8,%eax 315: cd 40 int $0x40 317: c3 ret 00000318 <link>: SYSCALL(link) 318: b8 13 00 00 00 mov $0x13,%eax 31d: cd 40 int $0x40 31f: c3 ret 00000320 <mkdir>: SYSCALL(mkdir) 320: b8 14 00 00 00 mov $0x14,%eax 325: cd 40 int $0x40 327: c3 ret 00000328 <chdir>: SYSCALL(chdir) 328: b8 09 00 00 00 mov $0x9,%eax 32d: cd 40 int $0x40 32f: c3 ret 00000330 <dup>: SYSCALL(dup) 330: b8 0a 00 00 00 mov $0xa,%eax 335: cd 40 int $0x40 337: c3 ret 00000338 <getpid>: SYSCALL(getpid) 338: b8 0b 00 00 00 mov $0xb,%eax 33d: cd 40 int $0x40 33f: c3 ret 00000340 <sbrk>: SYSCALL(sbrk) 340: b8 0c 00 00 00 mov $0xc,%eax 345: cd 40 int $0x40 347: c3 ret 00000348 <sleep>: SYSCALL(sleep) 348: b8 0d 00 00 00 mov $0xd,%eax 34d: cd 40 int $0x40 34f: c3 ret 00000350 <uptime>: SYSCALL(uptime) 350: b8 0e 00 00 00 mov $0xe,%eax 355: cd 40 int $0x40 357: c3 ret 00000358 <hello>: SYSCALL(hello) 358: b8 16 00 00 00 mov $0x16,%eax 35d: cd 40 int $0x40 35f: c3 ret 00000360 <printint>: write(fd, &c, 1); } static void printint(int fd, int xx, int base, int sgn) { 360: 55 push %ebp 361: 89 e5 mov %esp,%ebp 363: 57 push %edi 364: 89 cf mov %ecx,%edi 366: 56 push %esi 367: 89 c6 mov %eax,%esi 369: 53 push %ebx 36a: 83 ec 4c sub $0x4c,%esp char buf[16]; int i, neg; uint x; neg = 0; if(sgn && xx < 0){ 36d: 8b 4d 08 mov 0x8(%ebp),%ecx 370: 85 c9 test %ecx,%ecx 372: 74 04 je 378 <printint+0x18> 374: 85 d2 test %edx,%edx 376: 78 68 js 3e0 <printint+0x80> neg = 1; x = -xx; } else { x = xx; 378: 89 d0 mov %edx,%eax 37a: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 381: 31 c9 xor %ecx,%ecx 383: 8d 5d d7 lea -0x29(%ebp),%ebx 386: 66 90 xchg %ax,%ax } i = 0; do{ buf[i++] = digits[x % base]; 388: 31 d2 xor %edx,%edx 38a: f7 f7 div %edi 38c: 0f b6 92 66 07 00 00 movzbl 0x766(%edx),%edx 393: 88 14 0b mov %dl,(%ebx,%ecx,1) 396: 83 c1 01 add $0x1,%ecx }while((x /= base) != 0); 399: 85 c0 test %eax,%eax 39b: 75 eb jne 388 <printint+0x28> if(neg) 39d: 8b 45 c4 mov -0x3c(%ebp),%eax 3a0: 85 c0 test %eax,%eax 3a2: 74 08 je 3ac <printint+0x4c> buf[i++] = '-'; 3a4: c6 44 0d d7 2d movb $0x2d,-0x29(%ebp,%ecx,1) 3a9: 83 c1 01 add $0x1,%ecx while(--i >= 0) 3ac: 8d 79 ff lea -0x1(%ecx),%edi 3af: 90 nop 3b0: 0f b6 04 3b movzbl (%ebx,%edi,1),%eax 3b4: 83 ef 01 sub $0x1,%edi #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 3b7: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 3be: 00 3bf: 89 34 24 mov %esi,(%esp) buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) 3c2: 88 45 e7 mov %al,-0x19(%ebp) #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 3c5: 8d 45 e7 lea -0x19(%ebp),%eax 3c8: 89 44 24 04 mov %eax,0x4(%esp) 3cc: e8 07 ff ff ff call 2d8 <write> buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) 3d1: 83 ff ff cmp $0xffffffff,%edi 3d4: 75 da jne 3b0 <printint+0x50> putc(fd, buf[i]); } 3d6: 83 c4 4c add $0x4c,%esp 3d9: 5b pop %ebx 3da: 5e pop %esi 3db: 5f pop %edi 3dc: 5d pop %ebp 3dd: c3 ret 3de: 66 90 xchg %ax,%ax uint x; neg = 0; if(sgn && xx < 0){ neg = 1; x = -xx; 3e0: 89 d0 mov %edx,%eax 3e2: f7 d8 neg %eax 3e4: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp) 3eb: eb 94 jmp 381 <printint+0x21> 3ed: 8d 76 00 lea 0x0(%esi),%esi 000003f0 <printf>: } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 3f0: 55 push %ebp 3f1: 89 e5 mov %esp,%ebp 3f3: 57 push %edi 3f4: 56 push %esi 3f5: 53 push %ebx 3f6: 83 ec 3c sub $0x3c,%esp int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 3f9: 8b 45 0c mov 0xc(%ebp),%eax 3fc: 0f b6 10 movzbl (%eax),%edx 3ff: 84 d2 test %dl,%dl 401: 0f 84 c1 00 00 00 je 4c8 <printf+0xd8> char *s; int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; 407: 8d 4d 10 lea 0x10(%ebp),%ecx 40a: 31 ff xor %edi,%edi 40c: 89 4d d4 mov %ecx,-0x2c(%ebp) 40f: 31 db xor %ebx,%ebx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 411: 8d 75 e7 lea -0x19(%ebp),%esi 414: eb 1e jmp 434 <printf+0x44> 416: 66 90 xchg %ax,%ax state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ 418: 83 fa 25 cmp $0x25,%edx 41b: 0f 85 af 00 00 00 jne 4d0 <printf+0xe0> 421: 66 bf 25 00 mov $0x25,%di int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 425: 83 c3 01 add $0x1,%ebx 428: 0f b6 14 18 movzbl (%eax,%ebx,1),%edx 42c: 84 d2 test %dl,%dl 42e: 0f 84 94 00 00 00 je 4c8 <printf+0xd8> c = fmt[i] & 0xff; if(state == 0){ 434: 85 ff test %edi,%edi uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ c = fmt[i] & 0xff; 436: 0f b6 d2 movzbl %dl,%edx if(state == 0){ 439: 74 dd je 418 <printf+0x28> if(c == '%'){ state = '%'; } else { putc(fd, c); } } else if(state == '%'){ 43b: 83 ff 25 cmp $0x25,%edi 43e: 75 e5 jne 425 <printf+0x35> if(c == 'd'){ 440: 83 fa 64 cmp $0x64,%edx 443: 0f 84 3f 01 00 00 je 588 <printf+0x198> printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ 449: 83 fa 70 cmp $0x70,%edx 44c: 0f 84 a6 00 00 00 je 4f8 <printf+0x108> 452: 83 fa 78 cmp $0x78,%edx 455: 0f 84 9d 00 00 00 je 4f8 <printf+0x108> printint(fd, *ap, 16, 0); ap++; } else if(c == 's'){ 45b: 83 fa 73 cmp $0x73,%edx 45e: 66 90 xchg %ax,%ax 460: 0f 84 ba 00 00 00 je 520 <printf+0x130> s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 466: 83 fa 63 cmp $0x63,%edx 469: 0f 84 41 01 00 00 je 5b0 <printf+0x1c0> putc(fd, *ap); ap++; } else if(c == '%'){ 46f: 83 fa 25 cmp $0x25,%edx 472: 0f 84 00 01 00 00 je 578 <printf+0x188> #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 478: 8b 4d 08 mov 0x8(%ebp),%ecx 47b: 89 55 cc mov %edx,-0x34(%ebp) 47e: c6 45 e7 25 movb $0x25,-0x19(%ebp) 482: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 489: 00 48a: 89 74 24 04 mov %esi,0x4(%esp) 48e: 89 0c 24 mov %ecx,(%esp) 491: e8 42 fe ff ff call 2d8 <write> 496: 8b 55 cc mov -0x34(%ebp),%edx 499: 88 55 e7 mov %dl,-0x19(%ebp) 49c: 8b 45 08 mov 0x8(%ebp),%eax int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 49f: 83 c3 01 add $0x1,%ebx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 4a2: 31 ff xor %edi,%edi 4a4: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 4ab: 00 4ac: 89 74 24 04 mov %esi,0x4(%esp) 4b0: 89 04 24 mov %eax,(%esp) 4b3: e8 20 fe ff ff call 2d8 <write> 4b8: 8b 45 0c mov 0xc(%ebp),%eax int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 4bb: 0f b6 14 18 movzbl (%eax,%ebx,1),%edx 4bf: 84 d2 test %dl,%dl 4c1: 0f 85 6d ff ff ff jne 434 <printf+0x44> 4c7: 90 nop putc(fd, c); } state = 0; } } } 4c8: 83 c4 3c add $0x3c,%esp 4cb: 5b pop %ebx 4cc: 5e pop %esi 4cd: 5f pop %edi 4ce: 5d pop %ebp 4cf: c3 ret #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 4d0: 8b 45 08 mov 0x8(%ebp),%eax state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ 4d3: 88 55 e7 mov %dl,-0x19(%ebp) #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 4d6: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 4dd: 00 4de: 89 74 24 04 mov %esi,0x4(%esp) 4e2: 89 04 24 mov %eax,(%esp) 4e5: e8 ee fd ff ff call 2d8 <write> 4ea: 8b 45 0c mov 0xc(%ebp),%eax 4ed: e9 33 ff ff ff jmp 425 <printf+0x35> 4f2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ printint(fd, *ap, 16, 0); 4f8: 8b 45 d4 mov -0x2c(%ebp),%eax 4fb: b9 10 00 00 00 mov $0x10,%ecx ap++; 500: 31 ff xor %edi,%edi } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ printint(fd, *ap, 16, 0); 502: c7 04 24 00 00 00 00 movl $0x0,(%esp) 509: 8b 10 mov (%eax),%edx 50b: 8b 45 08 mov 0x8(%ebp),%eax 50e: e8 4d fe ff ff call 360 <printint> 513: 8b 45 0c mov 0xc(%ebp),%eax ap++; 516: 83 45 d4 04 addl $0x4,-0x2c(%ebp) 51a: e9 06 ff ff ff jmp 425 <printf+0x35> 51f: 90 nop } else if(c == 's'){ s = (char*)*ap; 520: 8b 55 d4 mov -0x2c(%ebp),%edx ap++; if(s == 0) 523: b9 5f 07 00 00 mov $0x75f,%ecx ap++; } else if(c == 'x' || c == 'p'){ printint(fd, *ap, 16, 0); ap++; } else if(c == 's'){ s = (char*)*ap; 528: 8b 3a mov (%edx),%edi ap++; 52a: 83 c2 04 add $0x4,%edx 52d: 89 55 d4 mov %edx,-0x2c(%ebp) if(s == 0) 530: 85 ff test %edi,%edi 532: 0f 44 f9 cmove %ecx,%edi s = "(null)"; while(*s != 0){ 535: 0f b6 17 movzbl (%edi),%edx 538: 84 d2 test %dl,%dl 53a: 74 33 je 56f <printf+0x17f> 53c: 89 5d d0 mov %ebx,-0x30(%ebp) 53f: 8b 5d 08 mov 0x8(%ebp),%ebx 542: 8d b6 00 00 00 00 lea 0x0(%esi),%esi putc(fd, *s); s++; 548: 83 c7 01 add $0x1,%edi } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ 54b: 88 55 e7 mov %dl,-0x19(%ebp) #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 54e: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 555: 00 556: 89 74 24 04 mov %esi,0x4(%esp) 55a: 89 1c 24 mov %ebx,(%esp) 55d: e8 76 fd ff ff call 2d8 <write> } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ 562: 0f b6 17 movzbl (%edi),%edx 565: 84 d2 test %dl,%dl 567: 75 df jne 548 <printf+0x158> 569: 8b 5d d0 mov -0x30(%ebp),%ebx 56c: 8b 45 0c mov 0xc(%ebp),%eax #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 56f: 31 ff xor %edi,%edi 571: e9 af fe ff ff jmp 425 <printf+0x35> 576: 66 90 xchg %ax,%ax s++; } } else if(c == 'c'){ putc(fd, *ap); ap++; } else if(c == '%'){ 578: c6 45 e7 25 movb $0x25,-0x19(%ebp) 57c: e9 1b ff ff ff jmp 49c <printf+0xac> 581: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi } else { putc(fd, c); } } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); 588: 8b 45 d4 mov -0x2c(%ebp),%eax 58b: b9 0a 00 00 00 mov $0xa,%ecx ap++; 590: 66 31 ff xor %di,%di } else { putc(fd, c); } } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); 593: c7 04 24 01 00 00 00 movl $0x1,(%esp) 59a: 8b 10 mov (%eax),%edx 59c: 8b 45 08 mov 0x8(%ebp),%eax 59f: e8 bc fd ff ff call 360 <printint> 5a4: 8b 45 0c mov 0xc(%ebp),%eax ap++; 5a7: 83 45 d4 04 addl $0x4,-0x2c(%ebp) 5ab: e9 75 fe ff ff jmp 425 <printf+0x35> s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 5b0: 8b 55 d4 mov -0x2c(%ebp),%edx putc(fd, *ap); ap++; 5b3: 31 ff xor %edi,%edi #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 5b5: 8b 4d 08 mov 0x8(%ebp),%ecx s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 5b8: 8b 02 mov (%edx),%eax #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 5ba: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 5c1: 00 5c2: 89 74 24 04 mov %esi,0x4(%esp) 5c6: 89 0c 24 mov %ecx,(%esp) s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 5c9: 88 45 e7 mov %al,-0x19(%ebp) #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 5cc: e8 07 fd ff ff call 2d8 <write> 5d1: 8b 45 0c mov 0xc(%ebp),%eax putc(fd, *s); s++; } } else if(c == 'c'){ putc(fd, *ap); ap++; 5d4: 83 45 d4 04 addl $0x4,-0x2c(%ebp) 5d8: e9 48 fe ff ff jmp 425 <printf+0x35> 5dd: 90 nop 5de: 90 nop 5df: 90 nop 000005e0 <free>: static Header base; static Header *freep; void free(void *ap) { 5e0: 55 push %ebp Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 5e1: a1 80 07 00 00 mov 0x780,%eax static Header base; static Header *freep; void free(void *ap) { 5e6: 89 e5 mov %esp,%ebp 5e8: 57 push %edi 5e9: 56 push %esi 5ea: 53 push %ebx 5eb: 8b 5d 08 mov 0x8(%ebp),%ebx Header *bp, *p; bp = (Header*)ap - 1; 5ee: 8d 4b f8 lea -0x8(%ebx),%ecx for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 5f1: 39 c8 cmp %ecx,%eax 5f3: 73 1d jae 612 <free+0x32> 5f5: 8d 76 00 lea 0x0(%esi),%esi 5f8: 8b 10 mov (%eax),%edx 5fa: 39 d1 cmp %edx,%ecx 5fc: 72 1a jb 618 <free+0x38> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 5fe: 39 d0 cmp %edx,%eax 600: 72 08 jb 60a <free+0x2a> 602: 39 c8 cmp %ecx,%eax 604: 72 12 jb 618 <free+0x38> 606: 39 d1 cmp %edx,%ecx 608: 72 0e jb 618 <free+0x38> 60a: 89 d0 mov %edx,%eax free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 60c: 39 c8 cmp %ecx,%eax 60e: 66 90 xchg %ax,%ax 610: 72 e6 jb 5f8 <free+0x18> 612: 8b 10 mov (%eax),%edx 614: eb e8 jmp 5fe <free+0x1e> 616: 66 90 xchg %ax,%ax if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; if(bp + bp->s.size == p->s.ptr){ 618: 8b 71 04 mov 0x4(%ecx),%esi 61b: 8d 3c f1 lea (%ecx,%esi,8),%edi 61e: 39 d7 cmp %edx,%edi 620: 74 19 je 63b <free+0x5b> bp->s.size += p->s.ptr->s.size; bp->s.ptr = p->s.ptr->s.ptr; } else bp->s.ptr = p->s.ptr; 622: 89 53 f8 mov %edx,-0x8(%ebx) if(p + p->s.size == bp){ 625: 8b 50 04 mov 0x4(%eax),%edx 628: 8d 34 d0 lea (%eax,%edx,8),%esi 62b: 39 ce cmp %ecx,%esi 62d: 74 23 je 652 <free+0x72> p->s.size += bp->s.size; p->s.ptr = bp->s.ptr; } else p->s.ptr = bp; 62f: 89 08 mov %ecx,(%eax) freep = p; 631: a3 80 07 00 00 mov %eax,0x780 } 636: 5b pop %ebx 637: 5e pop %esi 638: 5f pop %edi 639: 5d pop %ebp 63a: 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; 63b: 03 72 04 add 0x4(%edx),%esi 63e: 89 71 04 mov %esi,0x4(%ecx) bp->s.ptr = p->s.ptr->s.ptr; 641: 8b 10 mov (%eax),%edx 643: 8b 12 mov (%edx),%edx 645: 89 53 f8 mov %edx,-0x8(%ebx) } else bp->s.ptr = p->s.ptr; if(p + p->s.size == bp){ 648: 8b 50 04 mov 0x4(%eax),%edx 64b: 8d 34 d0 lea (%eax,%edx,8),%esi 64e: 39 ce cmp %ecx,%esi 650: 75 dd jne 62f <free+0x4f> p->s.size += bp->s.size; 652: 03 51 04 add 0x4(%ecx),%edx 655: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 658: 8b 53 f8 mov -0x8(%ebx),%edx 65b: 89 10 mov %edx,(%eax) } else p->s.ptr = bp; freep = p; 65d: a3 80 07 00 00 mov %eax,0x780 } 662: 5b pop %ebx 663: 5e pop %esi 664: 5f pop %edi 665: 5d pop %ebp 666: c3 ret 667: 89 f6 mov %esi,%esi 669: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000670 <malloc>: return freep; } void* malloc(uint nbytes) { 670: 55 push %ebp 671: 89 e5 mov %esp,%ebp 673: 57 push %edi 674: 56 push %esi 675: 53 push %ebx 676: 83 ec 2c sub $0x2c,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 679: 8b 5d 08 mov 0x8(%ebp),%ebx if((prevp = freep) == 0){ 67c: 8b 0d 80 07 00 00 mov 0x780,%ecx malloc(uint nbytes) { Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 682: 83 c3 07 add $0x7,%ebx 685: c1 eb 03 shr $0x3,%ebx 688: 83 c3 01 add $0x1,%ebx if((prevp = freep) == 0){ 68b: 85 c9 test %ecx,%ecx 68d: 0f 84 9b 00 00 00 je 72e <malloc+0xbe> base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 693: 8b 01 mov (%ecx),%eax if(p->s.size >= nunits){ 695: 8b 50 04 mov 0x4(%eax),%edx 698: 39 d3 cmp %edx,%ebx 69a: 76 27 jbe 6c3 <malloc+0x53> p->s.size -= nunits; p += p->s.size; p->s.size = nunits; } freep = prevp; return (void*)(p + 1); 69c: 8d 3c dd 00 00 00 00 lea 0x0(,%ebx,8),%edi morecore(uint nu) { char *p; Header *hp; if(nu < 4096) 6a3: be 00 80 00 00 mov $0x8000,%esi 6a8: 89 7d e4 mov %edi,-0x1c(%ebp) 6ab: 90 nop 6ac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi p->s.size = nunits; } freep = prevp; return (void*)(p + 1); } if(p == freep) 6b0: 3b 05 80 07 00 00 cmp 0x780,%eax 6b6: 74 30 je 6e8 <malloc+0x78> 6b8: 89 c1 mov %eax,%ecx 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){ 6ba: 8b 01 mov (%ecx),%eax if(p->s.size >= nunits){ 6bc: 8b 50 04 mov 0x4(%eax),%edx 6bf: 39 d3 cmp %edx,%ebx 6c1: 77 ed ja 6b0 <malloc+0x40> if(p->s.size == nunits) 6c3: 39 d3 cmp %edx,%ebx 6c5: 74 61 je 728 <malloc+0xb8> prevp->s.ptr = p->s.ptr; else { p->s.size -= nunits; 6c7: 29 da sub %ebx,%edx 6c9: 89 50 04 mov %edx,0x4(%eax) p += p->s.size; 6cc: 8d 04 d0 lea (%eax,%edx,8),%eax p->s.size = nunits; 6cf: 89 58 04 mov %ebx,0x4(%eax) } freep = prevp; 6d2: 89 0d 80 07 00 00 mov %ecx,0x780 return (void*)(p + 1); 6d8: 83 c0 08 add $0x8,%eax } if(p == freep) if((p = morecore(nunits)) == 0) return 0; } } 6db: 83 c4 2c add $0x2c,%esp 6de: 5b pop %ebx 6df: 5e pop %esi 6e0: 5f pop %edi 6e1: 5d pop %ebp 6e2: c3 ret 6e3: 90 nop 6e4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi morecore(uint nu) { char *p; Header *hp; if(nu < 4096) 6e8: 8b 45 e4 mov -0x1c(%ebp),%eax 6eb: 81 fb 00 10 00 00 cmp $0x1000,%ebx 6f1: bf 00 10 00 00 mov $0x1000,%edi 6f6: 0f 43 fb cmovae %ebx,%edi 6f9: 0f 42 c6 cmovb %esi,%eax nu = 4096; p = sbrk(nu * sizeof(Header)); 6fc: 89 04 24 mov %eax,(%esp) 6ff: e8 3c fc ff ff call 340 <sbrk> if(p == (char*)-1) 704: 83 f8 ff cmp $0xffffffff,%eax 707: 74 18 je 721 <malloc+0xb1> return 0; hp = (Header*)p; hp->s.size = nu; 709: 89 78 04 mov %edi,0x4(%eax) free((void*)(hp + 1)); 70c: 83 c0 08 add $0x8,%eax 70f: 89 04 24 mov %eax,(%esp) 712: e8 c9 fe ff ff call 5e0 <free> return freep; 717: 8b 0d 80 07 00 00 mov 0x780,%ecx } freep = prevp; return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) 71d: 85 c9 test %ecx,%ecx 71f: 75 99 jne 6ba <malloc+0x4a> 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){ if(p->s.size >= nunits){ 721: 31 c0 xor %eax,%eax 723: eb b6 jmp 6db <malloc+0x6b> 725: 8d 76 00 lea 0x0(%esi),%esi if(p->s.size == nunits) prevp->s.ptr = p->s.ptr; 728: 8b 10 mov (%eax),%edx 72a: 89 11 mov %edx,(%ecx) 72c: eb a4 jmp 6d2 <malloc+0x62> Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; 72e: c7 05 80 07 00 00 78 movl $0x778,0x780 735: 07 00 00 base.s.size = 0; 738: b9 78 07 00 00 mov $0x778,%ecx Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; 73d: c7 05 78 07 00 00 78 movl $0x778,0x778 744: 07 00 00 base.s.size = 0; 747: c7 05 7c 07 00 00 00 movl $0x0,0x77c 74e: 00 00 00 751: e9 3d ff ff ff jmp 693 <malloc+0x23>
29.205043
60
0.414319
386d1ea1cbaa939fd7eb0efd2507011c389e6bff
110
asm
Assembly
libsrc/_DEVELOPMENT/math/float/math48/lm/c/sccz80/logb.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/math/float/math48/lm/c/sccz80/logb.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/math/float/math48/lm/c/sccz80/logb.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
SECTION code_clib SECTION code_fp_math48 PUBLIC logb EXTERN cm48_sccz80_logb defc logb = cm48_sccz80_logb
11
28
0.845455
c22bc990ff20f2bfa7888d37fcfa323bc15ac242
7,680
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xca_notsx.log_21829_1435.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xca_notsx.log_21829_1435.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xca_notsx.log_21829_1435.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 %r15 push %r8 push %r9 push %rax push %rbp push %rcx push %rdi push %rsi lea addresses_normal_ht+0x17e36, %rsi lea addresses_D_ht+0x84ae, %rdi nop nop nop nop nop add $20287, %r15 mov $88, %rcx rep movsw nop nop dec %rax lea addresses_A_ht+0x8b3e, %rax nop nop nop nop nop dec %r8 movb (%rax), %cl nop nop nop nop nop xor %rsi, %rsi lea addresses_WT_ht+0x296, %rcx nop cmp $1397, %r8 movups (%rcx), %xmm2 vpextrq $0, %xmm2, %r15 nop nop nop dec %r8 lea addresses_A_ht+0x696, %rcx nop add $3943, %rdi mov (%rcx), %rsi nop nop nop nop cmp %rsi, %rsi lea addresses_normal_ht+0x12c96, %rsi nop nop xor $11292, %rbp movw $0x6162, (%rsi) cmp %rsi, %rsi lea addresses_UC_ht+0x15e96, %rsi lea addresses_UC_ht+0x118ee, %rdi nop nop nop nop nop xor $2830, %r8 mov $88, %rcx rep movsw inc %rdi lea addresses_A_ht+0x3116, %rax nop nop nop nop nop dec %rsi movl $0x61626364, (%rax) nop xor $16151, %rax lea addresses_D_ht+0x1a696, %rcx nop inc %rsi movups (%rcx), %xmm0 vpextrq $1, %xmm0, %r8 nop nop and %r8, %r8 lea addresses_WT_ht+0x27fd, %rbp nop nop nop nop nop add %rcx, %rcx mov (%rbp), %r15d nop dec %rdi lea addresses_A_ht+0x13296, %rsi lea addresses_D_ht+0xce96, %rdi nop nop nop nop nop and $110, %r9 mov $69, %rcx rep movsw sub $9115, %rbp lea addresses_UC_ht+0xea56, %rsi nop nop nop nop nop dec %rdi movw $0x6162, (%rsi) nop nop and $63750, %rdi lea addresses_WT_ht+0x8296, %rsi nop nop nop add %rax, %rax mov (%rsi), %r9w nop nop nop nop nop and %rcx, %rcx lea addresses_A_ht+0x8cd6, %rsi lea addresses_WC_ht+0xde96, %rdi nop nop nop nop sub %r15, %r15 mov $29, %rcx rep movsl nop cmp $15715, %r8 lea addresses_normal_ht+0x183e6, %rsi lea addresses_A_ht+0x1ae96, %rdi nop nop nop nop nop and $64720, %rax mov $83, %rcx rep movsw nop nop nop nop dec %r8 pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r9 pop %r8 pop %r15 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r14 push %r9 push %rbp push %rsi // Store lea addresses_A+0xa296, %rbp nop add $52792, %r12 mov $0x5152535455565758, %r13 movq %r13, %xmm4 movups %xmm4, (%rbp) nop nop nop nop nop xor $57249, %rsi // Faulty Load lea addresses_RW+0x8e96, %rsi nop nop nop dec %r12 mov (%rsi), %bp lea oracles, %r14 and $0xff, %rbp shlq $12, %rbp mov (%r14,%rbp,1), %rbp pop %rsi pop %rbp pop %r9 pop %r14 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_RW', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 10}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_RW', 'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_normal_ht'}, 'dst': {'same': True, 'congruent': 1, 'type': 'addresses_D_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 3}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 8}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 8}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 7}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 10, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_UC_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 5}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 8}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 10, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 5, 'type': 'addresses_D_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 6}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 9}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 4, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_WC_ht'}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_normal_ht'}, 'dst': {'same': False, 'congruent': 11, 'type': 'addresses_A_ht'}} {'32': 21829} 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 */
32.268908
2,999
0.65638
fe7382701c6d9c79d93a2588aee2e6a962621408
447
asm
Assembly
oeis/180/A180141.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/180/A180141.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/180/A180141.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A180141: Eight rooks and one berserker on a 3 X 3 chessboard. G.f.: (1 + x - 2*x^2)/(1 - 3*x - 6*x^2). ; Submitted by Jamie Morken(s1) ; 1,4,16,72,312,1368,5976,26136,114264,499608,2184408,9550872,41759064,182582424,798301656,3490399512,15261008472,66725422488,291742318296,1275579489816,5577192379224,24385054076568,106618316505048 mov $2,1 lpb $0 sub $0,1 sub $1,$3 add $2,$3 mul $2,2 mov $3,$1 mov $1,$2 mul $2,2 lpe mov $0,$2
27.9375
197
0.693512
ac14d7b21fe0fb925bf70719bbae6b2a8b1794e4
1,258
asm
Assembly
programs/oeis/140/A140298.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/140/A140298.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/140/A140298.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A140298: a(0)=1; a(3n+1) = a(3n)+1, a(3n+2) = a(3n+1) + a(3n) (=3*A000244), a(3n+3) = a(3n+2) + a(3n) (=A003462(n+2)). ; 1,2,3,4,5,9,13,14,27,40,41,81,121,122,243,364,365,729,1093,1094,2187,3280,3281,6561,9841,9842,19683,29524,29525,59049,88573,88574,177147,265720,265721,531441,797161,797162,1594323,2391484,2391485,4782969,7174453,7174454,14348907,21523360,21523361,43046721,64570081,64570082,129140163,193710244,193710245,387420489,581130733,581130734,1162261467,1743392200,1743392201,3486784401,5230176601,5230176602,10460353203,15690529804,15690529805,31381059609,47071589413,47071589414,94143178827,141214768240,141214768241,282429536481,423644304721,423644304722,847288609443,1270932914164,1270932914165,2541865828329,3812798742493,3812798742494,7625597484987,11438396227480,11438396227481,22876792454961,34315188682441,34315188682442,68630377364883,102945566047324,102945566047325,205891132094649,308836698141973,308836698141974,617673396283947,926510094425920,926510094425921,1853020188851841,2779530283277761,2779530283277762,5559060566555523,8338590849833284,8338590849833285 mov $2,$0 add $2,1 lpb $2,1 lpb $4,1 mov $4,$2 lpe mul $0,$4 add $0,3 sub $2,1 trn $2,$3 mov $3,2 mov $4,3 lpe mov $1,$0 sub $1,3 div $1,3 add $1,1
59.904762
967
0.797297
f43af9f40ed16b6cb4193ce2efd91ebe85cc8799
456
asm
Assembly
programs/oeis/174/A174373.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/174/A174373.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/174/A174373.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A174373: Triangle T(n,m) = nextprime(binomial(n,m)) read by rows. ; 2,2,2,2,2,2,2,3,3,2,2,5,7,5,2,2,5,11,11,5,2,2,7,17,23,17,7,2,2,7,23,37,37,23,7,2,2,11,29,59,71,59,29,11,2,2,11,37,89,127,127,89,37,11,2,2,11,47,127,211,257,211,127,47,11,2,2,11,59,167,331,463,463,331,167,59,11,2 seq $0,7318 ; Pascal's triangle read by rows: C(n,k) = binomial(n,k) = n!/(k!*(n-k)!), 0 <= k <= n. seq $0,7918 ; Least prime >= n (version 1 of the "next prime" function).
76
213
0.620614
f89b2573f47579c1cdacc61d779a4e87126c381f
43,358
asm
Assembly
cat.asm
dmansilva/OSProject03
233375faceef59e86f76060790cbb40ffce8e32a
[ "MIT-0" ]
null
null
null
cat.asm
dmansilva/OSProject03
233375faceef59e86f76060790cbb40ffce8e32a
[ "MIT-0" ]
null
null
null
cat.asm
dmansilva/OSProject03
233375faceef59e86f76060790cbb40ffce8e32a
[ "MIT-0" ]
null
null
null
_cat: file format elf32-i386 Disassembly of section .text: 00000000 <cat>: char buf[512]; void cat(int fd) { 0: 55 push %ebp 1: 89 e5 mov %esp,%ebp 3: 83 ec 28 sub $0x28,%esp int n; while((n = read(fd, buf, sizeof(buf))) > 0) { 6: eb 39 jmp 41 <cat+0x41> if (write(1, buf, n) != n) { 8: 8b 45 f4 mov -0xc(%ebp),%eax b: 89 44 24 08 mov %eax,0x8(%esp) f: c7 44 24 04 c0 0b 00 movl $0xbc0,0x4(%esp) 16: 00 17: c7 04 24 01 00 00 00 movl $0x1,(%esp) 1e: e8 8d 03 00 00 call 3b0 <write> 23: 3b 45 f4 cmp -0xc(%ebp),%eax 26: 74 19 je 41 <cat+0x41> printf(1, "cat: write error\n"); 28: c7 44 24 04 d3 08 00 movl $0x8d3,0x4(%esp) 2f: 00 30: c7 04 24 01 00 00 00 movl $0x1,(%esp) 37: e8 d1 04 00 00 call 50d <printf> exit(); 3c: e8 4f 03 00 00 call 390 <exit> void cat(int fd) { int n; while((n = read(fd, buf, sizeof(buf))) > 0) { 41: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp) 48: 00 49: c7 44 24 04 c0 0b 00 movl $0xbc0,0x4(%esp) 50: 00 51: 8b 45 08 mov 0x8(%ebp),%eax 54: 89 04 24 mov %eax,(%esp) 57: e8 4c 03 00 00 call 3a8 <read> 5c: 89 45 f4 mov %eax,-0xc(%ebp) 5f: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 63: 7f a3 jg 8 <cat+0x8> if (write(1, buf, n) != n) { printf(1, "cat: write error\n"); exit(); } } if(n < 0){ 65: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 69: 79 19 jns 84 <cat+0x84> printf(1, "cat: read error\n"); 6b: c7 44 24 04 e5 08 00 movl $0x8e5,0x4(%esp) 72: 00 73: c7 04 24 01 00 00 00 movl $0x1,(%esp) 7a: e8 8e 04 00 00 call 50d <printf> exit(); 7f: e8 0c 03 00 00 call 390 <exit> } } 84: c9 leave 85: c3 ret 00000086 <main>: int main(int argc, char *argv[]) { 86: 55 push %ebp 87: 89 e5 mov %esp,%ebp 89: 83 e4 f0 and $0xfffffff0,%esp 8c: 83 ec 20 sub $0x20,%esp int fd, i; if(argc <= 1){ 8f: 83 7d 08 01 cmpl $0x1,0x8(%ebp) 93: 7f 11 jg a6 <main+0x20> cat(0); 95: c7 04 24 00 00 00 00 movl $0x0,(%esp) 9c: e8 5f ff ff ff call 0 <cat> exit(); a1: e8 ea 02 00 00 call 390 <exit> } for(i = 1; i < argc; i++){ a6: c7 44 24 1c 01 00 00 movl $0x1,0x1c(%esp) ad: 00 ae: eb 78 jmp 128 <main+0xa2> if((fd = open(argv[i], 0)) < 0){ b0: 8b 44 24 1c mov 0x1c(%esp),%eax b4: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx bb: 8b 45 0c mov 0xc(%ebp),%eax be: 01 d0 add %edx,%eax c0: 8b 00 mov (%eax),%eax c2: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) c9: 00 ca: 89 04 24 mov %eax,(%esp) cd: e8 fe 02 00 00 call 3d0 <open> d2: 89 44 24 18 mov %eax,0x18(%esp) d6: 83 7c 24 18 00 cmpl $0x0,0x18(%esp) db: 79 2f jns 10c <main+0x86> printf(1, "cat: cannot open %s\n", argv[i]); dd: 8b 44 24 1c mov 0x1c(%esp),%eax e1: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx e8: 8b 45 0c mov 0xc(%ebp),%eax eb: 01 d0 add %edx,%eax ed: 8b 00 mov (%eax),%eax ef: 89 44 24 08 mov %eax,0x8(%esp) f3: c7 44 24 04 f6 08 00 movl $0x8f6,0x4(%esp) fa: 00 fb: c7 04 24 01 00 00 00 movl $0x1,(%esp) 102: e8 06 04 00 00 call 50d <printf> exit(); 107: e8 84 02 00 00 call 390 <exit> } cat(fd); 10c: 8b 44 24 18 mov 0x18(%esp),%eax 110: 89 04 24 mov %eax,(%esp) 113: e8 e8 fe ff ff call 0 <cat> close(fd); 118: 8b 44 24 18 mov 0x18(%esp),%eax 11c: 89 04 24 mov %eax,(%esp) 11f: e8 94 02 00 00 call 3b8 <close> if(argc <= 1){ cat(0); exit(); } for(i = 1; i < argc; i++){ 124: ff 44 24 1c incl 0x1c(%esp) 128: 8b 44 24 1c mov 0x1c(%esp),%eax 12c: 3b 45 08 cmp 0x8(%ebp),%eax 12f: 0f 8c 7b ff ff ff jl b0 <main+0x2a> exit(); } cat(fd); close(fd); } exit(); 135: e8 56 02 00 00 call 390 <exit> 13a: 90 nop 13b: 90 nop 0000013c <stosb>: "cc"); } static inline void stosb(void *addr, int data, int cnt) { 13c: 55 push %ebp 13d: 89 e5 mov %esp,%ebp 13f: 57 push %edi 140: 53 push %ebx asm volatile("cld; rep stosb" : 141: 8b 4d 08 mov 0x8(%ebp),%ecx 144: 8b 55 10 mov 0x10(%ebp),%edx 147: 8b 45 0c mov 0xc(%ebp),%eax 14a: 89 cb mov %ecx,%ebx 14c: 89 df mov %ebx,%edi 14e: 89 d1 mov %edx,%ecx 150: fc cld 151: f3 aa rep stos %al,%es:(%edi) 153: 89 ca mov %ecx,%edx 155: 89 fb mov %edi,%ebx 157: 89 5d 08 mov %ebx,0x8(%ebp) 15a: 89 55 10 mov %edx,0x10(%ebp) "=D" (addr), "=c" (cnt) : "0" (addr), "1" (cnt), "a" (data) : "memory", "cc"); } 15d: 5b pop %ebx 15e: 5f pop %edi 15f: 5d pop %ebp 160: c3 ret 00000161 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, char *t) { 161: 55 push %ebp 162: 89 e5 mov %esp,%ebp 164: 83 ec 10 sub $0x10,%esp char *os; os = s; 167: 8b 45 08 mov 0x8(%ebp),%eax 16a: 89 45 fc mov %eax,-0x4(%ebp) while((*s++ = *t++) != 0) 16d: 90 nop 16e: 8b 45 08 mov 0x8(%ebp),%eax 171: 8d 50 01 lea 0x1(%eax),%edx 174: 89 55 08 mov %edx,0x8(%ebp) 177: 8b 55 0c mov 0xc(%ebp),%edx 17a: 8d 4a 01 lea 0x1(%edx),%ecx 17d: 89 4d 0c mov %ecx,0xc(%ebp) 180: 8a 12 mov (%edx),%dl 182: 88 10 mov %dl,(%eax) 184: 8a 00 mov (%eax),%al 186: 84 c0 test %al,%al 188: 75 e4 jne 16e <strcpy+0xd> ; return os; 18a: 8b 45 fc mov -0x4(%ebp),%eax } 18d: c9 leave 18e: c3 ret 0000018f <strcmp>: int strcmp(const char *p, const char *q) { 18f: 55 push %ebp 190: 89 e5 mov %esp,%ebp while(*p && *p == *q) 192: eb 06 jmp 19a <strcmp+0xb> p++, q++; 194: ff 45 08 incl 0x8(%ebp) 197: ff 45 0c incl 0xc(%ebp) } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 19a: 8b 45 08 mov 0x8(%ebp),%eax 19d: 8a 00 mov (%eax),%al 19f: 84 c0 test %al,%al 1a1: 74 0e je 1b1 <strcmp+0x22> 1a3: 8b 45 08 mov 0x8(%ebp),%eax 1a6: 8a 10 mov (%eax),%dl 1a8: 8b 45 0c mov 0xc(%ebp),%eax 1ab: 8a 00 mov (%eax),%al 1ad: 38 c2 cmp %al,%dl 1af: 74 e3 je 194 <strcmp+0x5> p++, q++; return (uchar)*p - (uchar)*q; 1b1: 8b 45 08 mov 0x8(%ebp),%eax 1b4: 8a 00 mov (%eax),%al 1b6: 0f b6 d0 movzbl %al,%edx 1b9: 8b 45 0c mov 0xc(%ebp),%eax 1bc: 8a 00 mov (%eax),%al 1be: 0f b6 c0 movzbl %al,%eax 1c1: 29 c2 sub %eax,%edx 1c3: 89 d0 mov %edx,%eax } 1c5: 5d pop %ebp 1c6: c3 ret 000001c7 <strlen>: uint strlen(char *s) { 1c7: 55 push %ebp 1c8: 89 e5 mov %esp,%ebp 1ca: 83 ec 10 sub $0x10,%esp int n; for(n = 0; s[n]; n++) 1cd: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) 1d4: eb 03 jmp 1d9 <strlen+0x12> 1d6: ff 45 fc incl -0x4(%ebp) 1d9: 8b 55 fc mov -0x4(%ebp),%edx 1dc: 8b 45 08 mov 0x8(%ebp),%eax 1df: 01 d0 add %edx,%eax 1e1: 8a 00 mov (%eax),%al 1e3: 84 c0 test %al,%al 1e5: 75 ef jne 1d6 <strlen+0xf> ; return n; 1e7: 8b 45 fc mov -0x4(%ebp),%eax } 1ea: c9 leave 1eb: c3 ret 000001ec <memset>: void* memset(void *dst, int c, uint n) { 1ec: 55 push %ebp 1ed: 89 e5 mov %esp,%ebp 1ef: 83 ec 0c sub $0xc,%esp stosb(dst, c, n); 1f2: 8b 45 10 mov 0x10(%ebp),%eax 1f5: 89 44 24 08 mov %eax,0x8(%esp) 1f9: 8b 45 0c mov 0xc(%ebp),%eax 1fc: 89 44 24 04 mov %eax,0x4(%esp) 200: 8b 45 08 mov 0x8(%ebp),%eax 203: 89 04 24 mov %eax,(%esp) 206: e8 31 ff ff ff call 13c <stosb> return dst; 20b: 8b 45 08 mov 0x8(%ebp),%eax } 20e: c9 leave 20f: c3 ret 00000210 <strchr>: char* strchr(const char *s, char c) { 210: 55 push %ebp 211: 89 e5 mov %esp,%ebp 213: 83 ec 04 sub $0x4,%esp 216: 8b 45 0c mov 0xc(%ebp),%eax 219: 88 45 fc mov %al,-0x4(%ebp) for(; *s; s++) 21c: eb 12 jmp 230 <strchr+0x20> if(*s == c) 21e: 8b 45 08 mov 0x8(%ebp),%eax 221: 8a 00 mov (%eax),%al 223: 3a 45 fc cmp -0x4(%ebp),%al 226: 75 05 jne 22d <strchr+0x1d> return (char*)s; 228: 8b 45 08 mov 0x8(%ebp),%eax 22b: eb 11 jmp 23e <strchr+0x2e> } char* strchr(const char *s, char c) { for(; *s; s++) 22d: ff 45 08 incl 0x8(%ebp) 230: 8b 45 08 mov 0x8(%ebp),%eax 233: 8a 00 mov (%eax),%al 235: 84 c0 test %al,%al 237: 75 e5 jne 21e <strchr+0xe> if(*s == c) return (char*)s; return 0; 239: b8 00 00 00 00 mov $0x0,%eax } 23e: c9 leave 23f: c3 ret 00000240 <gets>: char* gets(char *buf, int max) { 240: 55 push %ebp 241: 89 e5 mov %esp,%ebp 243: 83 ec 28 sub $0x28,%esp int i, cc; char c; for(i=0; i+1 < max; ){ 246: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 24d: eb 49 jmp 298 <gets+0x58> cc = read(0, &c, 1); 24f: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 256: 00 257: 8d 45 ef lea -0x11(%ebp),%eax 25a: 89 44 24 04 mov %eax,0x4(%esp) 25e: c7 04 24 00 00 00 00 movl $0x0,(%esp) 265: e8 3e 01 00 00 call 3a8 <read> 26a: 89 45 f0 mov %eax,-0x10(%ebp) if(cc < 1) 26d: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 271: 7f 02 jg 275 <gets+0x35> break; 273: eb 2c jmp 2a1 <gets+0x61> buf[i++] = c; 275: 8b 45 f4 mov -0xc(%ebp),%eax 278: 8d 50 01 lea 0x1(%eax),%edx 27b: 89 55 f4 mov %edx,-0xc(%ebp) 27e: 89 c2 mov %eax,%edx 280: 8b 45 08 mov 0x8(%ebp),%eax 283: 01 c2 add %eax,%edx 285: 8a 45 ef mov -0x11(%ebp),%al 288: 88 02 mov %al,(%edx) if(c == '\n' || c == '\r') 28a: 8a 45 ef mov -0x11(%ebp),%al 28d: 3c 0a cmp $0xa,%al 28f: 74 10 je 2a1 <gets+0x61> 291: 8a 45 ef mov -0x11(%ebp),%al 294: 3c 0d cmp $0xd,%al 296: 74 09 je 2a1 <gets+0x61> gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 298: 8b 45 f4 mov -0xc(%ebp),%eax 29b: 40 inc %eax 29c: 3b 45 0c cmp 0xc(%ebp),%eax 29f: 7c ae jl 24f <gets+0xf> break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 2a1: 8b 55 f4 mov -0xc(%ebp),%edx 2a4: 8b 45 08 mov 0x8(%ebp),%eax 2a7: 01 d0 add %edx,%eax 2a9: c6 00 00 movb $0x0,(%eax) return buf; 2ac: 8b 45 08 mov 0x8(%ebp),%eax } 2af: c9 leave 2b0: c3 ret 000002b1 <stat>: int stat(char *n, struct stat *st) { 2b1: 55 push %ebp 2b2: 89 e5 mov %esp,%ebp 2b4: 83 ec 28 sub $0x28,%esp int fd; int r; fd = open(n, O_RDONLY); 2b7: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 2be: 00 2bf: 8b 45 08 mov 0x8(%ebp),%eax 2c2: 89 04 24 mov %eax,(%esp) 2c5: e8 06 01 00 00 call 3d0 <open> 2ca: 89 45 f4 mov %eax,-0xc(%ebp) if(fd < 0) 2cd: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 2d1: 79 07 jns 2da <stat+0x29> return -1; 2d3: b8 ff ff ff ff mov $0xffffffff,%eax 2d8: eb 23 jmp 2fd <stat+0x4c> r = fstat(fd, st); 2da: 8b 45 0c mov 0xc(%ebp),%eax 2dd: 89 44 24 04 mov %eax,0x4(%esp) 2e1: 8b 45 f4 mov -0xc(%ebp),%eax 2e4: 89 04 24 mov %eax,(%esp) 2e7: e8 fc 00 00 00 call 3e8 <fstat> 2ec: 89 45 f0 mov %eax,-0x10(%ebp) close(fd); 2ef: 8b 45 f4 mov -0xc(%ebp),%eax 2f2: 89 04 24 mov %eax,(%esp) 2f5: e8 be 00 00 00 call 3b8 <close> return r; 2fa: 8b 45 f0 mov -0x10(%ebp),%eax } 2fd: c9 leave 2fe: c3 ret 000002ff <atoi>: int atoi(const char *s) { 2ff: 55 push %ebp 300: 89 e5 mov %esp,%ebp 302: 83 ec 10 sub $0x10,%esp int n; n = 0; 305: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) while('0' <= *s && *s <= '9') 30c: eb 24 jmp 332 <atoi+0x33> n = n*10 + *s++ - '0'; 30e: 8b 55 fc mov -0x4(%ebp),%edx 311: 89 d0 mov %edx,%eax 313: c1 e0 02 shl $0x2,%eax 316: 01 d0 add %edx,%eax 318: 01 c0 add %eax,%eax 31a: 89 c1 mov %eax,%ecx 31c: 8b 45 08 mov 0x8(%ebp),%eax 31f: 8d 50 01 lea 0x1(%eax),%edx 322: 89 55 08 mov %edx,0x8(%ebp) 325: 8a 00 mov (%eax),%al 327: 0f be c0 movsbl %al,%eax 32a: 01 c8 add %ecx,%eax 32c: 83 e8 30 sub $0x30,%eax 32f: 89 45 fc mov %eax,-0x4(%ebp) atoi(const char *s) { int n; n = 0; while('0' <= *s && *s <= '9') 332: 8b 45 08 mov 0x8(%ebp),%eax 335: 8a 00 mov (%eax),%al 337: 3c 2f cmp $0x2f,%al 339: 7e 09 jle 344 <atoi+0x45> 33b: 8b 45 08 mov 0x8(%ebp),%eax 33e: 8a 00 mov (%eax),%al 340: 3c 39 cmp $0x39,%al 342: 7e ca jle 30e <atoi+0xf> n = n*10 + *s++ - '0'; return n; 344: 8b 45 fc mov -0x4(%ebp),%eax } 347: c9 leave 348: c3 ret 00000349 <memmove>: void* memmove(void *vdst, void *vsrc, int n) { 349: 55 push %ebp 34a: 89 e5 mov %esp,%ebp 34c: 83 ec 10 sub $0x10,%esp char *dst, *src; dst = vdst; 34f: 8b 45 08 mov 0x8(%ebp),%eax 352: 89 45 fc mov %eax,-0x4(%ebp) src = vsrc; 355: 8b 45 0c mov 0xc(%ebp),%eax 358: 89 45 f8 mov %eax,-0x8(%ebp) while(n-- > 0) 35b: eb 16 jmp 373 <memmove+0x2a> *dst++ = *src++; 35d: 8b 45 fc mov -0x4(%ebp),%eax 360: 8d 50 01 lea 0x1(%eax),%edx 363: 89 55 fc mov %edx,-0x4(%ebp) 366: 8b 55 f8 mov -0x8(%ebp),%edx 369: 8d 4a 01 lea 0x1(%edx),%ecx 36c: 89 4d f8 mov %ecx,-0x8(%ebp) 36f: 8a 12 mov (%edx),%dl 371: 88 10 mov %dl,(%eax) { char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) 373: 8b 45 10 mov 0x10(%ebp),%eax 376: 8d 50 ff lea -0x1(%eax),%edx 379: 89 55 10 mov %edx,0x10(%ebp) 37c: 85 c0 test %eax,%eax 37e: 7f dd jg 35d <memmove+0x14> *dst++ = *src++; return vdst; 380: 8b 45 08 mov 0x8(%ebp),%eax } 383: c9 leave 384: c3 ret 385: 90 nop 386: 90 nop 387: 90 nop 00000388 <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 388: b8 01 00 00 00 mov $0x1,%eax 38d: cd 40 int $0x40 38f: c3 ret 00000390 <exit>: SYSCALL(exit) 390: b8 02 00 00 00 mov $0x2,%eax 395: cd 40 int $0x40 397: c3 ret 00000398 <wait>: SYSCALL(wait) 398: b8 03 00 00 00 mov $0x3,%eax 39d: cd 40 int $0x40 39f: c3 ret 000003a0 <pipe>: SYSCALL(pipe) 3a0: b8 04 00 00 00 mov $0x4,%eax 3a5: cd 40 int $0x40 3a7: c3 ret 000003a8 <read>: SYSCALL(read) 3a8: b8 05 00 00 00 mov $0x5,%eax 3ad: cd 40 int $0x40 3af: c3 ret 000003b0 <write>: SYSCALL(write) 3b0: b8 10 00 00 00 mov $0x10,%eax 3b5: cd 40 int $0x40 3b7: c3 ret 000003b8 <close>: SYSCALL(close) 3b8: b8 15 00 00 00 mov $0x15,%eax 3bd: cd 40 int $0x40 3bf: c3 ret 000003c0 <kill>: SYSCALL(kill) 3c0: b8 06 00 00 00 mov $0x6,%eax 3c5: cd 40 int $0x40 3c7: c3 ret 000003c8 <exec>: SYSCALL(exec) 3c8: b8 07 00 00 00 mov $0x7,%eax 3cd: cd 40 int $0x40 3cf: c3 ret 000003d0 <open>: SYSCALL(open) 3d0: b8 0f 00 00 00 mov $0xf,%eax 3d5: cd 40 int $0x40 3d7: c3 ret 000003d8 <mknod>: SYSCALL(mknod) 3d8: b8 11 00 00 00 mov $0x11,%eax 3dd: cd 40 int $0x40 3df: c3 ret 000003e0 <unlink>: SYSCALL(unlink) 3e0: b8 12 00 00 00 mov $0x12,%eax 3e5: cd 40 int $0x40 3e7: c3 ret 000003e8 <fstat>: SYSCALL(fstat) 3e8: b8 08 00 00 00 mov $0x8,%eax 3ed: cd 40 int $0x40 3ef: c3 ret 000003f0 <link>: SYSCALL(link) 3f0: b8 13 00 00 00 mov $0x13,%eax 3f5: cd 40 int $0x40 3f7: c3 ret 000003f8 <mkdir>: SYSCALL(mkdir) 3f8: b8 14 00 00 00 mov $0x14,%eax 3fd: cd 40 int $0x40 3ff: c3 ret 00000400 <chdir>: SYSCALL(chdir) 400: b8 09 00 00 00 mov $0x9,%eax 405: cd 40 int $0x40 407: c3 ret 00000408 <dup>: SYSCALL(dup) 408: b8 0a 00 00 00 mov $0xa,%eax 40d: cd 40 int $0x40 40f: c3 ret 00000410 <getpid>: SYSCALL(getpid) 410: b8 0b 00 00 00 mov $0xb,%eax 415: cd 40 int $0x40 417: c3 ret 00000418 <sbrk>: SYSCALL(sbrk) 418: b8 0c 00 00 00 mov $0xc,%eax 41d: cd 40 int $0x40 41f: c3 ret 00000420 <sleep>: SYSCALL(sleep) 420: b8 0d 00 00 00 mov $0xd,%eax 425: cd 40 int $0x40 427: c3 ret 00000428 <uptime>: SYSCALL(uptime) 428: b8 0e 00 00 00 mov $0xe,%eax 42d: cd 40 int $0x40 42f: c3 ret 00000430 <putc>: #include "stat.h" #include "user.h" static void putc(int fd, char c) { 430: 55 push %ebp 431: 89 e5 mov %esp,%ebp 433: 83 ec 18 sub $0x18,%esp 436: 8b 45 0c mov 0xc(%ebp),%eax 439: 88 45 f4 mov %al,-0xc(%ebp) write(fd, &c, 1); 43c: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 443: 00 444: 8d 45 f4 lea -0xc(%ebp),%eax 447: 89 44 24 04 mov %eax,0x4(%esp) 44b: 8b 45 08 mov 0x8(%ebp),%eax 44e: 89 04 24 mov %eax,(%esp) 451: e8 5a ff ff ff call 3b0 <write> } 456: c9 leave 457: c3 ret 00000458 <printint>: static void printint(int fd, int xx, int base, int sgn) { 458: 55 push %ebp 459: 89 e5 mov %esp,%ebp 45b: 56 push %esi 45c: 53 push %ebx 45d: 83 ec 30 sub $0x30,%esp static char digits[] = "0123456789ABCDEF"; char buf[16]; int i, neg; uint x; neg = 0; 460: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) if(sgn && xx < 0){ 467: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 46b: 74 17 je 484 <printint+0x2c> 46d: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 471: 79 11 jns 484 <printint+0x2c> neg = 1; 473: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp) x = -xx; 47a: 8b 45 0c mov 0xc(%ebp),%eax 47d: f7 d8 neg %eax 47f: 89 45 ec mov %eax,-0x14(%ebp) 482: eb 06 jmp 48a <printint+0x32> } else { x = xx; 484: 8b 45 0c mov 0xc(%ebp),%eax 487: 89 45 ec mov %eax,-0x14(%ebp) } i = 0; 48a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) do{ buf[i++] = digits[x % base]; 491: 8b 4d f4 mov -0xc(%ebp),%ecx 494: 8d 41 01 lea 0x1(%ecx),%eax 497: 89 45 f4 mov %eax,-0xc(%ebp) 49a: 8b 5d 10 mov 0x10(%ebp),%ebx 49d: 8b 45 ec mov -0x14(%ebp),%eax 4a0: ba 00 00 00 00 mov $0x0,%edx 4a5: f7 f3 div %ebx 4a7: 89 d0 mov %edx,%eax 4a9: 8a 80 78 0b 00 00 mov 0xb78(%eax),%al 4af: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1) }while((x /= base) != 0); 4b3: 8b 75 10 mov 0x10(%ebp),%esi 4b6: 8b 45 ec mov -0x14(%ebp),%eax 4b9: ba 00 00 00 00 mov $0x0,%edx 4be: f7 f6 div %esi 4c0: 89 45 ec mov %eax,-0x14(%ebp) 4c3: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 4c7: 75 c8 jne 491 <printint+0x39> if(neg) 4c9: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 4cd: 74 10 je 4df <printint+0x87> buf[i++] = '-'; 4cf: 8b 45 f4 mov -0xc(%ebp),%eax 4d2: 8d 50 01 lea 0x1(%eax),%edx 4d5: 89 55 f4 mov %edx,-0xc(%ebp) 4d8: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1) while(--i >= 0) 4dd: eb 1e jmp 4fd <printint+0xa5> 4df: eb 1c jmp 4fd <printint+0xa5> putc(fd, buf[i]); 4e1: 8d 55 dc lea -0x24(%ebp),%edx 4e4: 8b 45 f4 mov -0xc(%ebp),%eax 4e7: 01 d0 add %edx,%eax 4e9: 8a 00 mov (%eax),%al 4eb: 0f be c0 movsbl %al,%eax 4ee: 89 44 24 04 mov %eax,0x4(%esp) 4f2: 8b 45 08 mov 0x8(%ebp),%eax 4f5: 89 04 24 mov %eax,(%esp) 4f8: e8 33 ff ff ff call 430 <putc> buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) 4fd: ff 4d f4 decl -0xc(%ebp) 500: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 504: 79 db jns 4e1 <printint+0x89> putc(fd, buf[i]); } 506: 83 c4 30 add $0x30,%esp 509: 5b pop %ebx 50a: 5e pop %esi 50b: 5d pop %ebp 50c: c3 ret 0000050d <printf>: // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 50d: 55 push %ebp 50e: 89 e5 mov %esp,%ebp 510: 83 ec 38 sub $0x38,%esp char *s; int c, i, state; uint *ap; state = 0; 513: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) ap = (uint*)(void*)&fmt + 1; 51a: 8d 45 0c lea 0xc(%ebp),%eax 51d: 83 c0 04 add $0x4,%eax 520: 89 45 e8 mov %eax,-0x18(%ebp) for(i = 0; fmt[i]; i++){ 523: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 52a: e9 77 01 00 00 jmp 6a6 <printf+0x199> c = fmt[i] & 0xff; 52f: 8b 55 0c mov 0xc(%ebp),%edx 532: 8b 45 f0 mov -0x10(%ebp),%eax 535: 01 d0 add %edx,%eax 537: 8a 00 mov (%eax),%al 539: 0f be c0 movsbl %al,%eax 53c: 25 ff 00 00 00 and $0xff,%eax 541: 89 45 e4 mov %eax,-0x1c(%ebp) if(state == 0){ 544: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 548: 75 2c jne 576 <printf+0x69> if(c == '%'){ 54a: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 54e: 75 0c jne 55c <printf+0x4f> state = '%'; 550: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp) 557: e9 47 01 00 00 jmp 6a3 <printf+0x196> } else { putc(fd, c); 55c: 8b 45 e4 mov -0x1c(%ebp),%eax 55f: 0f be c0 movsbl %al,%eax 562: 89 44 24 04 mov %eax,0x4(%esp) 566: 8b 45 08 mov 0x8(%ebp),%eax 569: 89 04 24 mov %eax,(%esp) 56c: e8 bf fe ff ff call 430 <putc> 571: e9 2d 01 00 00 jmp 6a3 <printf+0x196> } } else if(state == '%'){ 576: 83 7d ec 25 cmpl $0x25,-0x14(%ebp) 57a: 0f 85 23 01 00 00 jne 6a3 <printf+0x196> if(c == 'd'){ 580: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp) 584: 75 2d jne 5b3 <printf+0xa6> printint(fd, *ap, 10, 1); 586: 8b 45 e8 mov -0x18(%ebp),%eax 589: 8b 00 mov (%eax),%eax 58b: c7 44 24 0c 01 00 00 movl $0x1,0xc(%esp) 592: 00 593: c7 44 24 08 0a 00 00 movl $0xa,0x8(%esp) 59a: 00 59b: 89 44 24 04 mov %eax,0x4(%esp) 59f: 8b 45 08 mov 0x8(%ebp),%eax 5a2: 89 04 24 mov %eax,(%esp) 5a5: e8 ae fe ff ff call 458 <printint> ap++; 5aa: 83 45 e8 04 addl $0x4,-0x18(%ebp) 5ae: e9 e9 00 00 00 jmp 69c <printf+0x18f> } else if(c == 'x' || c == 'p'){ 5b3: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp) 5b7: 74 06 je 5bf <printf+0xb2> 5b9: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp) 5bd: 75 2d jne 5ec <printf+0xdf> printint(fd, *ap, 16, 0); 5bf: 8b 45 e8 mov -0x18(%ebp),%eax 5c2: 8b 00 mov (%eax),%eax 5c4: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp) 5cb: 00 5cc: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 5d3: 00 5d4: 89 44 24 04 mov %eax,0x4(%esp) 5d8: 8b 45 08 mov 0x8(%ebp),%eax 5db: 89 04 24 mov %eax,(%esp) 5de: e8 75 fe ff ff call 458 <printint> ap++; 5e3: 83 45 e8 04 addl $0x4,-0x18(%ebp) 5e7: e9 b0 00 00 00 jmp 69c <printf+0x18f> } else if(c == 's'){ 5ec: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp) 5f0: 75 42 jne 634 <printf+0x127> s = (char*)*ap; 5f2: 8b 45 e8 mov -0x18(%ebp),%eax 5f5: 8b 00 mov (%eax),%eax 5f7: 89 45 f4 mov %eax,-0xc(%ebp) ap++; 5fa: 83 45 e8 04 addl $0x4,-0x18(%ebp) if(s == 0) 5fe: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 602: 75 09 jne 60d <printf+0x100> s = "(null)"; 604: c7 45 f4 0b 09 00 00 movl $0x90b,-0xc(%ebp) while(*s != 0){ 60b: eb 1c jmp 629 <printf+0x11c> 60d: eb 1a jmp 629 <printf+0x11c> putc(fd, *s); 60f: 8b 45 f4 mov -0xc(%ebp),%eax 612: 8a 00 mov (%eax),%al 614: 0f be c0 movsbl %al,%eax 617: 89 44 24 04 mov %eax,0x4(%esp) 61b: 8b 45 08 mov 0x8(%ebp),%eax 61e: 89 04 24 mov %eax,(%esp) 621: e8 0a fe ff ff call 430 <putc> s++; 626: ff 45 f4 incl -0xc(%ebp) } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ 629: 8b 45 f4 mov -0xc(%ebp),%eax 62c: 8a 00 mov (%eax),%al 62e: 84 c0 test %al,%al 630: 75 dd jne 60f <printf+0x102> 632: eb 68 jmp 69c <printf+0x18f> putc(fd, *s); s++; } } else if(c == 'c'){ 634: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp) 638: 75 1d jne 657 <printf+0x14a> putc(fd, *ap); 63a: 8b 45 e8 mov -0x18(%ebp),%eax 63d: 8b 00 mov (%eax),%eax 63f: 0f be c0 movsbl %al,%eax 642: 89 44 24 04 mov %eax,0x4(%esp) 646: 8b 45 08 mov 0x8(%ebp),%eax 649: 89 04 24 mov %eax,(%esp) 64c: e8 df fd ff ff call 430 <putc> ap++; 651: 83 45 e8 04 addl $0x4,-0x18(%ebp) 655: eb 45 jmp 69c <printf+0x18f> } else if(c == '%'){ 657: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 65b: 75 17 jne 674 <printf+0x167> putc(fd, c); 65d: 8b 45 e4 mov -0x1c(%ebp),%eax 660: 0f be c0 movsbl %al,%eax 663: 89 44 24 04 mov %eax,0x4(%esp) 667: 8b 45 08 mov 0x8(%ebp),%eax 66a: 89 04 24 mov %eax,(%esp) 66d: e8 be fd ff ff call 430 <putc> 672: eb 28 jmp 69c <printf+0x18f> } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); 674: c7 44 24 04 25 00 00 movl $0x25,0x4(%esp) 67b: 00 67c: 8b 45 08 mov 0x8(%ebp),%eax 67f: 89 04 24 mov %eax,(%esp) 682: e8 a9 fd ff ff call 430 <putc> putc(fd, c); 687: 8b 45 e4 mov -0x1c(%ebp),%eax 68a: 0f be c0 movsbl %al,%eax 68d: 89 44 24 04 mov %eax,0x4(%esp) 691: 8b 45 08 mov 0x8(%ebp),%eax 694: 89 04 24 mov %eax,(%esp) 697: e8 94 fd ff ff call 430 <putc> } state = 0; 69c: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 6a3: ff 45 f0 incl -0x10(%ebp) 6a6: 8b 55 0c mov 0xc(%ebp),%edx 6a9: 8b 45 f0 mov -0x10(%ebp),%eax 6ac: 01 d0 add %edx,%eax 6ae: 8a 00 mov (%eax),%al 6b0: 84 c0 test %al,%al 6b2: 0f 85 77 fe ff ff jne 52f <printf+0x22> putc(fd, c); } state = 0; } } } 6b8: c9 leave 6b9: c3 ret 6ba: 90 nop 6bb: 90 nop 000006bc <free>: static Header base; static Header *freep; void free(void *ap) { 6bc: 55 push %ebp 6bd: 89 e5 mov %esp,%ebp 6bf: 83 ec 10 sub $0x10,%esp Header *bp, *p; bp = (Header*)ap - 1; 6c2: 8b 45 08 mov 0x8(%ebp),%eax 6c5: 83 e8 08 sub $0x8,%eax 6c8: 89 45 f8 mov %eax,-0x8(%ebp) for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 6cb: a1 a8 0b 00 00 mov 0xba8,%eax 6d0: 89 45 fc mov %eax,-0x4(%ebp) 6d3: eb 24 jmp 6f9 <free+0x3d> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 6d5: 8b 45 fc mov -0x4(%ebp),%eax 6d8: 8b 00 mov (%eax),%eax 6da: 3b 45 fc cmp -0x4(%ebp),%eax 6dd: 77 12 ja 6f1 <free+0x35> 6df: 8b 45 f8 mov -0x8(%ebp),%eax 6e2: 3b 45 fc cmp -0x4(%ebp),%eax 6e5: 77 24 ja 70b <free+0x4f> 6e7: 8b 45 fc mov -0x4(%ebp),%eax 6ea: 8b 00 mov (%eax),%eax 6ec: 3b 45 f8 cmp -0x8(%ebp),%eax 6ef: 77 1a ja 70b <free+0x4f> free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 6f1: 8b 45 fc mov -0x4(%ebp),%eax 6f4: 8b 00 mov (%eax),%eax 6f6: 89 45 fc mov %eax,-0x4(%ebp) 6f9: 8b 45 f8 mov -0x8(%ebp),%eax 6fc: 3b 45 fc cmp -0x4(%ebp),%eax 6ff: 76 d4 jbe 6d5 <free+0x19> 701: 8b 45 fc mov -0x4(%ebp),%eax 704: 8b 00 mov (%eax),%eax 706: 3b 45 f8 cmp -0x8(%ebp),%eax 709: 76 ca jbe 6d5 <free+0x19> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; if(bp + bp->s.size == p->s.ptr){ 70b: 8b 45 f8 mov -0x8(%ebp),%eax 70e: 8b 40 04 mov 0x4(%eax),%eax 711: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 718: 8b 45 f8 mov -0x8(%ebp),%eax 71b: 01 c2 add %eax,%edx 71d: 8b 45 fc mov -0x4(%ebp),%eax 720: 8b 00 mov (%eax),%eax 722: 39 c2 cmp %eax,%edx 724: 75 24 jne 74a <free+0x8e> bp->s.size += p->s.ptr->s.size; 726: 8b 45 f8 mov -0x8(%ebp),%eax 729: 8b 50 04 mov 0x4(%eax),%edx 72c: 8b 45 fc mov -0x4(%ebp),%eax 72f: 8b 00 mov (%eax),%eax 731: 8b 40 04 mov 0x4(%eax),%eax 734: 01 c2 add %eax,%edx 736: 8b 45 f8 mov -0x8(%ebp),%eax 739: 89 50 04 mov %edx,0x4(%eax) bp->s.ptr = p->s.ptr->s.ptr; 73c: 8b 45 fc mov -0x4(%ebp),%eax 73f: 8b 00 mov (%eax),%eax 741: 8b 10 mov (%eax),%edx 743: 8b 45 f8 mov -0x8(%ebp),%eax 746: 89 10 mov %edx,(%eax) 748: eb 0a jmp 754 <free+0x98> } else bp->s.ptr = p->s.ptr; 74a: 8b 45 fc mov -0x4(%ebp),%eax 74d: 8b 10 mov (%eax),%edx 74f: 8b 45 f8 mov -0x8(%ebp),%eax 752: 89 10 mov %edx,(%eax) if(p + p->s.size == bp){ 754: 8b 45 fc mov -0x4(%ebp),%eax 757: 8b 40 04 mov 0x4(%eax),%eax 75a: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 761: 8b 45 fc mov -0x4(%ebp),%eax 764: 01 d0 add %edx,%eax 766: 3b 45 f8 cmp -0x8(%ebp),%eax 769: 75 20 jne 78b <free+0xcf> p->s.size += bp->s.size; 76b: 8b 45 fc mov -0x4(%ebp),%eax 76e: 8b 50 04 mov 0x4(%eax),%edx 771: 8b 45 f8 mov -0x8(%ebp),%eax 774: 8b 40 04 mov 0x4(%eax),%eax 777: 01 c2 add %eax,%edx 779: 8b 45 fc mov -0x4(%ebp),%eax 77c: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 77f: 8b 45 f8 mov -0x8(%ebp),%eax 782: 8b 10 mov (%eax),%edx 784: 8b 45 fc mov -0x4(%ebp),%eax 787: 89 10 mov %edx,(%eax) 789: eb 08 jmp 793 <free+0xd7> } else p->s.ptr = bp; 78b: 8b 45 fc mov -0x4(%ebp),%eax 78e: 8b 55 f8 mov -0x8(%ebp),%edx 791: 89 10 mov %edx,(%eax) freep = p; 793: 8b 45 fc mov -0x4(%ebp),%eax 796: a3 a8 0b 00 00 mov %eax,0xba8 } 79b: c9 leave 79c: c3 ret 0000079d <morecore>: static Header* morecore(uint nu) { 79d: 55 push %ebp 79e: 89 e5 mov %esp,%ebp 7a0: 83 ec 28 sub $0x28,%esp char *p; Header *hp; if(nu < 4096) 7a3: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp) 7aa: 77 07 ja 7b3 <morecore+0x16> nu = 4096; 7ac: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp) p = sbrk(nu * sizeof(Header)); 7b3: 8b 45 08 mov 0x8(%ebp),%eax 7b6: c1 e0 03 shl $0x3,%eax 7b9: 89 04 24 mov %eax,(%esp) 7bc: e8 57 fc ff ff call 418 <sbrk> 7c1: 89 45 f4 mov %eax,-0xc(%ebp) if(p == (char*)-1) 7c4: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp) 7c8: 75 07 jne 7d1 <morecore+0x34> return 0; 7ca: b8 00 00 00 00 mov $0x0,%eax 7cf: eb 22 jmp 7f3 <morecore+0x56> hp = (Header*)p; 7d1: 8b 45 f4 mov -0xc(%ebp),%eax 7d4: 89 45 f0 mov %eax,-0x10(%ebp) hp->s.size = nu; 7d7: 8b 45 f0 mov -0x10(%ebp),%eax 7da: 8b 55 08 mov 0x8(%ebp),%edx 7dd: 89 50 04 mov %edx,0x4(%eax) free((void*)(hp + 1)); 7e0: 8b 45 f0 mov -0x10(%ebp),%eax 7e3: 83 c0 08 add $0x8,%eax 7e6: 89 04 24 mov %eax,(%esp) 7e9: e8 ce fe ff ff call 6bc <free> return freep; 7ee: a1 a8 0b 00 00 mov 0xba8,%eax } 7f3: c9 leave 7f4: c3 ret 000007f5 <malloc>: void* malloc(uint nbytes) { 7f5: 55 push %ebp 7f6: 89 e5 mov %esp,%ebp 7f8: 83 ec 28 sub $0x28,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 7fb: 8b 45 08 mov 0x8(%ebp),%eax 7fe: 83 c0 07 add $0x7,%eax 801: c1 e8 03 shr $0x3,%eax 804: 40 inc %eax 805: 89 45 ec mov %eax,-0x14(%ebp) if((prevp = freep) == 0){ 808: a1 a8 0b 00 00 mov 0xba8,%eax 80d: 89 45 f0 mov %eax,-0x10(%ebp) 810: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 814: 75 23 jne 839 <malloc+0x44> base.s.ptr = freep = prevp = &base; 816: c7 45 f0 a0 0b 00 00 movl $0xba0,-0x10(%ebp) 81d: 8b 45 f0 mov -0x10(%ebp),%eax 820: a3 a8 0b 00 00 mov %eax,0xba8 825: a1 a8 0b 00 00 mov 0xba8,%eax 82a: a3 a0 0b 00 00 mov %eax,0xba0 base.s.size = 0; 82f: c7 05 a4 0b 00 00 00 movl $0x0,0xba4 836: 00 00 00 } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 839: 8b 45 f0 mov -0x10(%ebp),%eax 83c: 8b 00 mov (%eax),%eax 83e: 89 45 f4 mov %eax,-0xc(%ebp) if(p->s.size >= nunits){ 841: 8b 45 f4 mov -0xc(%ebp),%eax 844: 8b 40 04 mov 0x4(%eax),%eax 847: 3b 45 ec cmp -0x14(%ebp),%eax 84a: 72 4d jb 899 <malloc+0xa4> if(p->s.size == nunits) 84c: 8b 45 f4 mov -0xc(%ebp),%eax 84f: 8b 40 04 mov 0x4(%eax),%eax 852: 3b 45 ec cmp -0x14(%ebp),%eax 855: 75 0c jne 863 <malloc+0x6e> prevp->s.ptr = p->s.ptr; 857: 8b 45 f4 mov -0xc(%ebp),%eax 85a: 8b 10 mov (%eax),%edx 85c: 8b 45 f0 mov -0x10(%ebp),%eax 85f: 89 10 mov %edx,(%eax) 861: eb 26 jmp 889 <malloc+0x94> else { p->s.size -= nunits; 863: 8b 45 f4 mov -0xc(%ebp),%eax 866: 8b 40 04 mov 0x4(%eax),%eax 869: 2b 45 ec sub -0x14(%ebp),%eax 86c: 89 c2 mov %eax,%edx 86e: 8b 45 f4 mov -0xc(%ebp),%eax 871: 89 50 04 mov %edx,0x4(%eax) p += p->s.size; 874: 8b 45 f4 mov -0xc(%ebp),%eax 877: 8b 40 04 mov 0x4(%eax),%eax 87a: c1 e0 03 shl $0x3,%eax 87d: 01 45 f4 add %eax,-0xc(%ebp) p->s.size = nunits; 880: 8b 45 f4 mov -0xc(%ebp),%eax 883: 8b 55 ec mov -0x14(%ebp),%edx 886: 89 50 04 mov %edx,0x4(%eax) } freep = prevp; 889: 8b 45 f0 mov -0x10(%ebp),%eax 88c: a3 a8 0b 00 00 mov %eax,0xba8 return (void*)(p + 1); 891: 8b 45 f4 mov -0xc(%ebp),%eax 894: 83 c0 08 add $0x8,%eax 897: eb 38 jmp 8d1 <malloc+0xdc> } if(p == freep) 899: a1 a8 0b 00 00 mov 0xba8,%eax 89e: 39 45 f4 cmp %eax,-0xc(%ebp) 8a1: 75 1b jne 8be <malloc+0xc9> if((p = morecore(nunits)) == 0) 8a3: 8b 45 ec mov -0x14(%ebp),%eax 8a6: 89 04 24 mov %eax,(%esp) 8a9: e8 ef fe ff ff call 79d <morecore> 8ae: 89 45 f4 mov %eax,-0xc(%ebp) 8b1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 8b5: 75 07 jne 8be <malloc+0xc9> return 0; 8b7: b8 00 00 00 00 mov $0x0,%eax 8bc: eb 13 jmp 8d1 <malloc+0xdc> 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){ 8be: 8b 45 f4 mov -0xc(%ebp),%eax 8c1: 89 45 f0 mov %eax,-0x10(%ebp) 8c4: 8b 45 f4 mov -0xc(%ebp),%eax 8c7: 8b 00 mov (%eax),%eax 8c9: 89 45 f4 mov %eax,-0xc(%ebp) return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) return 0; } 8cc: e9 70 ff ff ff jmp 841 <malloc+0x4c> } 8d1: c9 leave 8d2: c3 ret
33.846995
60
0.424766
6928a3f2f1766678a8104c1d8b54c467d8fea16e
455
asm
Assembly
programs/oeis/314/A314056.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/314/A314056.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/314/A314056.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A314056: Coordination sequence Gal.4.135.3 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings. ; 1,5,11,15,21,27,31,37,42,47,53,57,63,69,73,79,84,89,95,99,105,111,115,121,126,131,137,141,147,153,157,163,168,173,179,183,189,195,199,205,210,215,221,225,231,237,241,247,252,257 mul $0,6 mov $2,1 lpb $0 trn $0,$2 sub $2,1 add $0,$2 sub $0,1 add $2,15 lpe add $0,1
32.5
179
0.694505
f8ff0a1475ad9d5b79a50c2f395c1ba42e523747
202
asm
Assembly
random.asm
olebabale/shellmark
0f38d020b1ed57de5ee6d12c8d012016f33d51a6
[ "MIT" ]
null
null
null
random.asm
olebabale/shellmark
0f38d020b1ed57de5ee6d12c8d012016f33d51a6
[ "MIT" ]
null
null
null
random.asm
olebabale/shellmark
0f38d020b1ed57de5ee6d12c8d012016f33d51a6
[ "MIT" ]
1
2020-01-01T22:45:26.000Z
2020-01-01T22:45:26.000Z
;RANDOM NUMBER GENERATOR ;USING TIME STAMP COUNTER INSTRUCTION global _start section .text _start: rdtsc ;read time stamp counter shr eax,2 ret ;handshaking with C variable.(ret eax)!
14.428571
45
0.727723
1dc9ecf67a8f992cb7581ce67439be855687b5e5
34,225
asm
Assembly
Palmtree.Math.Core.Implements/vs_build/x86_Release/pmc_bitwiseand.asm
rougemeilland/Palmtree.Math.Core.Implements
52f4f6c765d16c9b0baf1fd212c61a33daae138c
[ "MIT" ]
null
null
null
Palmtree.Math.Core.Implements/vs_build/x86_Release/pmc_bitwiseand.asm
rougemeilland/Palmtree.Math.Core.Implements
52f4f6c765d16c9b0baf1fd212c61a33daae138c
[ "MIT" ]
null
null
null
Palmtree.Math.Core.Implements/vs_build/x86_Release/pmc_bitwiseand.asm
rougemeilland/Palmtree.Math.Core.Implements
52f4f6c765d16c9b0baf1fd212c61a33daae138c
[ "MIT" ]
null
null
null
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.16.27026.1 TITLE Z:\Sources\Lunor\Repos\rougemeilland\Palmtree.Math.Core.Implements\Palmtree.Math.Core.Implements\pmc_bitwiseand.c .686P .XMM include listing.inc .model flat INCLUDELIB MSVCRT INCLUDELIB OLDNAMES PUBLIC _Initialize_BitwiseAnd PUBLIC _PMC_BitwiseAnd_I_X@12 PUBLIC _PMC_BitwiseAnd_L_X@16 PUBLIC _PMC_BitwiseAnd_X_I@12 PUBLIC _PMC_BitwiseAnd_X_L@16 PUBLIC _PMC_BitwiseAnd_X_X@12 EXTRN _CheckBlockLight:PROC EXTRN _AllocateNumber:PROC EXTRN _DeallocateNumber:PROC EXTRN _CommitNumber:PROC EXTRN _CheckNumber:PROC EXTRN _number_zero:BYTE ; Function compile flags: /Ogtp ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; COMDAT _BitwiseAnd_X_X _TEXT SEGMENT tv2428 = -32 ; size = 4 tv2423 = -32 ; size = 4 tv2425 = -28 ; size = 4 tv2424 = -28 ; size = 4 tv2426 = -24 ; size = 4 tv2429 = -20 ; size = 4 _count$1$ = -16 ; size = 4 _v$1$ = -12 ; size = 4 tv2430 = -8 ; size = 4 tv2427 = -8 ; size = 4 _w$1$ = -8 ; size = 4 _u$1$ = -4 ; size = 4 _u$ = 8 ; size = 4 _v$ = 12 ; size = 4 _w$ = 16 ; size = 4 _w_count$ = 20 ; size = 4 _BitwiseAnd_X_X PROC ; COMDAT ; 39 : { push ebp mov ebp, esp sub esp, 32 ; 00000020H ; 40 : __UNIT_TYPE count = w_count >> 5; ; 41 : while (count != 0) mov edx, DWORD PTR _w$[ebp] push ebx mov ebx, DWORD PTR _w_count$[ebp] mov eax, ebx push esi mov esi, DWORD PTR _v$[ebp] shr eax, 5 mov DWORD PTR _count$1$[ebp], eax mov DWORD PTR _w$1$[ebp], edx push edi mov edi, DWORD PTR _u$[ebp] mov DWORD PTR _u$1$[ebp], edi test eax, eax je $LN3@BitwiseAnd mov DWORD PTR _v$1$[ebp], esi npad 2 $LL2@BitwiseAnd: ; 42 : { ; 43 : w[0] = u[0] & v[0]; lea ecx, DWORD PTR [esi+16] xor ebx, ebx lea eax, DWORD PTR [ecx+108] cmp edx, eax ja SHORT $LN27@BitwiseAnd lea eax, DWORD PTR [edx+124] cmp eax, esi jae SHORT $LN67@BitwiseAnd $LN27@BitwiseAnd: lea eax, DWORD PTR [edi+48] mov DWORD PTR tv2423[ebp], eax add eax, 76 ; 0000004cH cmp edx, eax ja SHORT $LN28@BitwiseAnd lea eax, DWORD PTR [edx+124] cmp eax, edi jb SHORT $LN28@BitwiseAnd $LN67@BitwiseAnd: mov DWORD PTR tv2430[ebp], edi mov ecx, edx sub edi, esi mov eax, esi sub ecx, esi mov ebx, 32 ; 00000020H mov DWORD PTR tv2427[ebp], ecx mov esi, ecx npad 4 $LL65@BitwiseAnd: mov ecx, DWORD PTR [eax+edi] lea eax, DWORD PTR [eax+4] and ecx, DWORD PTR [eax-4] mov DWORD PTR [eax+esi-4], ecx sub ebx, 1 jne SHORT $LL65@BitwiseAnd mov edi, DWORD PTR _u$1$[ebp] jmp $LN71@BitwiseAnd $LN28@BitwiseAnd: lea eax, DWORD PTR [edx+32] mov edx, edi mov edi, DWORD PTR _w$1$[ebp] sub edx, esi sub edi, esi mov DWORD PTR tv2429[ebp], edx mov DWORD PTR tv2426[ebp], edi mov edi, DWORD PTR _u$1$[ebp] mov esi, edi sub esi, DWORD PTR _w$1$[ebp] mov DWORD PTR tv2424[ebp], esi mov esi, edx mov edx, DWORD PTR tv2426[ebp] npad 4 $LL12@BitwiseAnd: movups xmm1, XMMWORD PTR [edi+ebx*4] mov edi, DWORD PTR tv2424[ebp] lea ecx, DWORD PTR [ecx+64] movups xmm0, XMMWORD PTR [ecx-80] lea eax, DWORD PTR [eax+64] pand xmm1, xmm0 movups xmm0, XMMWORD PTR [ecx-64] movups XMMWORD PTR [eax-96], xmm1 movups xmm1, XMMWORD PTR [esi+ecx-64] pand xmm1, xmm0 movups xmm0, XMMWORD PTR [ecx-48] movups XMMWORD PTR [edx+ecx-64], xmm1 movups xmm1, XMMWORD PTR [edi+eax-64] mov edi, DWORD PTR tv2423[ebp] pand xmm1, xmm0 movups xmm0, XMMWORD PTR [ecx-32] movups XMMWORD PTR [eax-64], xmm1 movups xmm1, XMMWORD PTR [edi+ebx*4] mov edi, DWORD PTR _u$1$[ebp] add ebx, 16 ; 00000010H pand xmm1, xmm0 movups XMMWORD PTR [eax-48], xmm1 cmp ebx, 32 ; 00000020H jl SHORT $LL12@BitwiseAnd mov edx, DWORD PTR _w$1$[ebp] $LN71@BitwiseAnd: ; 44 : w[1] = u[1] & v[1]; ; 45 : w[2] = u[2] & v[2]; ; 46 : w[3] = u[3] & v[3]; ; 47 : w[4] = u[4] & v[4]; ; 48 : w[5] = u[5] & v[5]; ; 49 : w[6] = u[6] & v[6]; ; 50 : w[7] = u[7] & v[7]; ; 51 : w[8] = u[8] & v[8]; ; 52 : w[9] = u[9] & v[9]; ; 53 : w[10] = u[10] & v[10]; ; 54 : w[11] = u[11] & v[11]; ; 55 : w[12] = u[12] & v[12]; ; 56 : w[13] = u[13] & v[13]; ; 57 : w[14] = u[14] & v[14]; ; 58 : w[15] = u[15] & v[15]; ; 59 : w[16] = u[16] & v[16]; ; 60 : w[17] = u[17] & v[17]; ; 61 : w[18] = u[18] & v[18]; ; 62 : w[19] = u[19] & v[19]; ; 63 : w[20] = u[20] & v[20]; ; 64 : w[21] = u[21] & v[21]; ; 65 : w[22] = u[22] & v[22]; ; 66 : w[23] = u[23] & v[23]; ; 67 : w[24] = u[24] & v[24]; ; 68 : w[25] = u[25] & v[25]; ; 69 : w[26] = u[26] & v[26]; ; 70 : w[27] = u[27] & v[27]; ; 71 : w[28] = u[28] & v[28]; ; 72 : w[29] = u[29] & v[29]; ; 73 : w[30] = u[30] & v[30]; ; 74 : w[31] = u[31] & v[31]; ; 75 : u += 32; mov esi, DWORD PTR _v$1$[ebp] sub edi, -128 ; ffffff80H ; 76 : v += 32; sub esi, -128 ; ffffff80H mov DWORD PTR _u$1$[ebp], edi ; 77 : w += 32; sub edx, -128 ; ffffff80H mov DWORD PTR _v$1$[ebp], esi ; 78 : --count; sub DWORD PTR _count$1$[ebp], 1 mov DWORD PTR _w$1$[ebp], edx jne $LL2@BitwiseAnd ; 40 : __UNIT_TYPE count = w_count >> 5; ; 41 : while (count != 0) mov ebx, DWORD PTR _w_count$[ebp] $LN3@BitwiseAnd: ; 79 : } ; 80 : ; 81 : if (w_count & 0x10) test bl, 16 ; 00000010H je $LN4@BitwiseAnd ; 82 : { ; 83 : w[0] = u[0] & v[0]; lea eax, DWORD PTR [esi+60] lea ecx, DWORD PTR [edx+60] cmp edx, eax ja SHORT $LN31@BitwiseAnd cmp ecx, esi jae SHORT $LN69@BitwiseAnd $LN31@BitwiseAnd: lea eax, DWORD PTR [edi+60] cmp edx, eax ja SHORT $LN32@BitwiseAnd cmp ecx, edi jb SHORT $LN32@BitwiseAnd $LN69@BitwiseAnd: mov eax, edi mov ecx, esi sub eax, esi mov ebx, 16 ; 00000010H mov DWORD PTR tv2428[ebp], eax mov eax, edx mov edx, DWORD PTR tv2428[ebp] sub eax, esi mov DWORD PTR tv2425[ebp], eax mov edi, eax npad 5 $LL66@BitwiseAnd: mov eax, DWORD PTR [edx+ecx] lea ecx, DWORD PTR [ecx+4] and eax, DWORD PTR [ecx-4] mov DWORD PTR [edi+ecx-4], eax sub ebx, 1 jne SHORT $LL66@BitwiseAnd mov edx, DWORD PTR _w$1$[ebp] mov edi, DWORD PTR _u$1$[ebp] mov ebx, DWORD PTR _w_count$[ebp] jmp SHORT $LN15@BitwiseAnd $LN32@BitwiseAnd: movups xmm0, XMMWORD PTR [esi] movups xmm1, XMMWORD PTR [edi] pand xmm1, xmm0 movups xmm0, XMMWORD PTR [esi+16] movups XMMWORD PTR [edx], xmm1 movups xmm1, XMMWORD PTR [edi+16] pand xmm1, xmm0 movups xmm0, XMMWORD PTR [esi+32] movups XMMWORD PTR [edx+16], xmm1 movups xmm1, XMMWORD PTR [edi+32] pand xmm1, xmm0 movups xmm0, XMMWORD PTR [esi+48] movups XMMWORD PTR [edx+32], xmm1 movups xmm1, XMMWORD PTR [edi+48] pand xmm1, xmm0 movups XMMWORD PTR [edx+48], xmm1 $LN15@BitwiseAnd: ; 84 : w[1] = u[1] & v[1]; ; 85 : w[2] = u[2] & v[2]; ; 86 : w[3] = u[3] & v[3]; ; 87 : w[4] = u[4] & v[4]; ; 88 : w[5] = u[5] & v[5]; ; 89 : w[6] = u[6] & v[6]; ; 90 : w[7] = u[7] & v[7]; ; 91 : w[8] = u[8] & v[8]; ; 92 : w[9] = u[9] & v[9]; ; 93 : w[10] = u[10] & v[10]; ; 94 : w[11] = u[11] & v[11]; ; 95 : w[12] = u[12] & v[12]; ; 96 : w[13] = u[13] & v[13]; ; 97 : w[14] = u[14] & v[14]; ; 98 : w[15] = u[15] & v[15]; ; 99 : u += 16; add edi, 64 ; 00000040H ; 100 : v += 16; add esi, 64 ; 00000040H ; 101 : w += 16; add edx, 64 ; 00000040H $LN4@BitwiseAnd: ; 102 : } ; 103 : ; 104 : if (w_count & 0x8) test bl, 8 je SHORT $LN5@BitwiseAnd ; 105 : { ; 106 : w[0] = u[0] & v[0]; mov eax, DWORD PTR [edi] and eax, DWORD PTR [esi] mov DWORD PTR [edx], eax mov eax, DWORD PTR [edi+4] and eax, DWORD PTR [esi+4] mov DWORD PTR [edx+4], eax mov eax, DWORD PTR [edi+8] and eax, DWORD PTR [esi+8] mov DWORD PTR [edx+8], eax mov eax, DWORD PTR [edi+12] and eax, DWORD PTR [esi+12] mov DWORD PTR [edx+12], eax mov eax, DWORD PTR [edi+16] and eax, DWORD PTR [esi+16] mov DWORD PTR [edx+16], eax mov eax, DWORD PTR [edi+20] and eax, DWORD PTR [esi+20] mov DWORD PTR [edx+20], eax mov eax, DWORD PTR [edi+24] and eax, DWORD PTR [esi+24] mov DWORD PTR [edx+24], eax mov eax, DWORD PTR [edi+28] ; 107 : w[1] = u[1] & v[1]; ; 108 : w[2] = u[2] & v[2]; ; 109 : w[3] = u[3] & v[3]; ; 110 : w[4] = u[4] & v[4]; ; 111 : w[5] = u[5] & v[5]; ; 112 : w[6] = u[6] & v[6]; ; 113 : w[7] = u[7] & v[7]; ; 114 : u += 8; add edi, 32 ; 00000020H and eax, DWORD PTR [esi+28] ; 115 : v += 8; add esi, 32 ; 00000020H mov DWORD PTR [edx+28], eax ; 116 : w += 8; add edx, 32 ; 00000020H $LN5@BitwiseAnd: ; 117 : } ; 118 : ; 119 : if (w_count & 0x4) test bl, 4 je SHORT $LN6@BitwiseAnd ; 120 : { ; 121 : w[0] = u[0] & v[0]; mov eax, DWORD PTR [edi] and eax, DWORD PTR [esi] mov DWORD PTR [edx], eax mov eax, DWORD PTR [edi+4] and eax, DWORD PTR [esi+4] mov DWORD PTR [edx+4], eax mov eax, DWORD PTR [edi+8] and eax, DWORD PTR [esi+8] mov DWORD PTR [edx+8], eax mov eax, DWORD PTR [edi+12] ; 122 : w[1] = u[1] & v[1]; ; 123 : w[2] = u[2] & v[2]; ; 124 : w[3] = u[3] & v[3]; ; 125 : u += 4; add edi, 16 ; 00000010H and eax, DWORD PTR [esi+12] ; 126 : v += 4; add esi, 16 ; 00000010H mov DWORD PTR [edx+12], eax ; 127 : w += 4; add edx, 16 ; 00000010H $LN6@BitwiseAnd: ; 128 : } ; 129 : ; 130 : if (w_count & 0x2) test bl, 2 je SHORT $LN7@BitwiseAnd ; 131 : { ; 132 : w[0] = u[0] & v[0]; mov eax, DWORD PTR [edi] and eax, DWORD PTR [esi] mov DWORD PTR [edx], eax ; 133 : w[1] = u[1] & v[1]; mov eax, DWORD PTR [edi+4] ; 134 : u += 2; add edi, 8 and eax, DWORD PTR [esi+4] ; 135 : v += 2; add esi, 8 mov DWORD PTR [edx+4], eax ; 136 : w += 2; add edx, 8 $LN7@BitwiseAnd: ; 137 : } ; 138 : ; 139 : if (w_count & 0x1) test bl, 1 je SHORT $LN8@BitwiseAnd ; 140 : { ; 141 : w[0] = u[0] & v[0]; mov eax, DWORD PTR [edi] and eax, DWORD PTR [esi] mov DWORD PTR [edx], eax $LN8@BitwiseAnd: ; 142 : u += 1; ; 143 : v += 1; ; 144 : w += 1; ; 145 : } ; 146 : } pop edi pop esi pop ebx mov esp, ebp pop ebp ret 0 _BitwiseAnd_X_X ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; COMDAT __MINIMUM_UNIT _TEXT SEGMENT _x$ = 8 ; size = 4 _y$ = 12 ; size = 4 __MINIMUM_UNIT PROC ; COMDAT ; 208 : { push ebp mov ebp, esp ; 209 : return (x <= y ? x : y); mov eax, DWORD PTR _y$[ebp] cmp DWORD PTR _x$[ebp], eax cmovbe eax, DWORD PTR _x$[ebp] ; 210 : } pop ebp ret 0 __MINIMUM_UNIT ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; COMDAT __DIVIDE_CEILING_UNIT _TEXT SEGMENT _u$ = 8 ; size = 4 _v$ = 12 ; size = 4 __DIVIDE_CEILING_UNIT PROC ; COMDAT ; 193 : { push ebp mov ebp, esp ; 194 : return ((u + v - 1) / v); mov eax, DWORD PTR _u$[ebp] xor edx, edx dec eax add eax, DWORD PTR _v$[ebp] div DWORD PTR _v$[ebp] ; 195 : } pop ebp ret 0 __DIVIDE_CEILING_UNIT ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; COMDAT __FROMDWORDTOWORD _TEXT SEGMENT _value$ = 8 ; size = 8 _result_high$ = 16 ; size = 4 __FROMDWORDTOWORD PROC ; COMDAT ; 182 : { push ebp mov ebp, esp ; 183 : *result_high = (_UINT32_T)(value >> 32); mov eax, DWORD PTR _result_high$[ebp] mov ecx, DWORD PTR _value$[ebp+4] mov DWORD PTR [eax], ecx ; 184 : return ((_UINT32_T)value); mov eax, DWORD PTR _value$[ebp] ; 185 : } pop ebp ret 0 __FROMDWORDTOWORD ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; COMDAT __FROMWORDTODWORD _TEXT SEGMENT _value_high$ = 8 ; size = 4 _value_low$ = 12 ; size = 4 __FROMWORDTODWORD PROC ; COMDAT ; 177 : { push ebp mov ebp, esp ; 178 : return (((_UINT64_T)value_high << 32) | value_low); mov edx, DWORD PTR _value_high$[ebp] xor eax, eax or eax, DWORD PTR _value_low$[ebp] ; 179 : } pop ebp ret 0 __FROMWORDTODWORD ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; COMDAT _PMC_BitwiseAnd_X_X@12 _TEXT SEGMENT _nw$ = 8 ; size = 4 _u$ = 8 ; size = 4 _w_bit_count$1$ = 12 ; size = 4 _v$ = 12 ; size = 4 _nw_light_check_code$1 = 16 ; size = 4 _w$ = 16 ; size = 4 _PMC_BitwiseAnd_X_X@12 PROC ; COMDAT ; 317 : { push ebp mov ebp, esp push ebx push esi ; 318 : if (u == NULL) mov esi, DWORD PTR _u$[ebp] push edi test esi, esi je $LN20@PMC_Bitwis ; 319 : return (PMC_STATUS_ARGUMENT_ERROR); ; 320 : if (v == NULL) mov edi, DWORD PTR _v$[ebp] test edi, edi je $LN20@PMC_Bitwis ; 321 : return (PMC_STATUS_ARGUMENT_ERROR); ; 322 : if (w == NULL) mov ebx, DWORD PTR _w$[ebp] test ebx, ebx je $LN20@PMC_Bitwis ; 324 : NUMBER_HEADER* nu = (NUMBER_HEADER*)u; ; 325 : NUMBER_HEADER* nv = (NUMBER_HEADER*)v; ; 326 : PMC_STATUS_CODE result; ; 327 : if ((result = CheckNumber(nu)) != PMC_STATUS_OK) push esi call _CheckNumber add esp, 4 test eax, eax jne $LN1@PMC_Bitwis ; 328 : return (result); ; 329 : if ((result = CheckNumber(nv)) != PMC_STATUS_OK) push edi call _CheckNumber add esp, 4 test eax, eax jne $LN1@PMC_Bitwis ; 330 : return (result); ; 331 : NUMBER_HEADER* nw; ; 332 : if (nu->IS_ZERO) test BYTE PTR [esi+24], 2 jne $LN19@PMC_Bitwis ; 333 : *w = &number_zero; ; 334 : else if (nv->IS_ZERO) test BYTE PTR [edi+24], 2 jne SHORT $LN19@PMC_Bitwis ; 335 : *w = &number_zero; ; 336 : else ; 337 : { ; 338 : __UNIT_TYPE u_bit_count = nu->UNIT_BIT_COUNT; ; 339 : __UNIT_TYPE v_bit_count = nv->UNIT_BIT_COUNT; mov ecx, DWORD PTR [edi+12] ; 342 : if ((result = AllocateNumber(&nw, w_bit_count, &nw_light_check_code)) != PMC_STATUS_OK) lea eax, DWORD PTR _nw_light_check_code$1[ebp] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 209 : return (x <= y ? x : y); cmp DWORD PTR [esi+12], ecx ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; 342 : if ((result = AllocateNumber(&nw, w_bit_count, &nw_light_check_code)) != PMC_STATUS_OK) push eax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 209 : return (x <= y ? x : y); cmovbe ecx, DWORD PTR [esi+12] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; 342 : if ((result = AllocateNumber(&nw, w_bit_count, &nw_light_check_code)) != PMC_STATUS_OK) lea eax, DWORD PTR _nw$[ebp] push ecx push eax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 209 : return (x <= y ? x : y); mov DWORD PTR _w_bit_count$1$[ebp], ecx ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; 342 : if ((result = AllocateNumber(&nw, w_bit_count, &nw_light_check_code)) != PMC_STATUS_OK) call _AllocateNumber add esp, 12 ; 0000000cH test eax, eax jne SHORT $LN1@PMC_Bitwis ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 194 : return ((u + v - 1) / v); mov eax, DWORD PTR _w_bit_count$1$[ebp] add eax, 31 ; 0000001fH shr eax, 5 ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; 345 : BitwiseAnd_X_X(nu->BLOCK, nv->BLOCK, nw->BLOCK, w_word_count); push eax mov eax, DWORD PTR _nw$[ebp] push DWORD PTR [eax+32] push DWORD PTR [edi+32] push DWORD PTR [esi+32] call _BitwiseAnd_X_X ; 346 : if ((result = CheckBlockLight(nw->BLOCK, nw_light_check_code)) != PMC_STATUS_OK) mov eax, DWORD PTR _nw$[ebp] push DWORD PTR _nw_light_check_code$1[ebp] push DWORD PTR [eax+32] call _CheckBlockLight add esp, 24 ; 00000018H test eax, eax jne SHORT $LN1@PMC_Bitwis ; 347 : return (result); ; 348 : CommitNumber(nw); push DWORD PTR _nw$[ebp] call _CommitNumber ; 349 : if (nw->IS_ZERO) mov eax, DWORD PTR _nw$[ebp] add esp, 4 test BYTE PTR [eax+24], 2 je SHORT $LN13@PMC_Bitwis ; 350 : { ; 351 : DeallocateNumber(nw); push eax call _DeallocateNumber add esp, 4 ; 352 : nw = &number_zero; mov eax, OFFSET _number_zero $LN13@PMC_Bitwis: ; 353 : } ; 354 : *w = nw; pop edi mov DWORD PTR [ebx], eax ; 355 : } ; 356 : #ifdef _DEBUG ; 357 : if ((result = CheckNumber(*w)) != PMC_STATUS_OK) ; 358 : return (result); ; 359 : #endif ; 360 : return (PMC_STATUS_OK); xor eax, eax ; 361 : } pop esi pop ebx pop ebp ret 12 ; 0000000cH $LN19@PMC_Bitwis: pop edi pop esi mov DWORD PTR [ebx], OFFSET _number_zero xor eax, eax pop ebx pop ebp ret 12 ; 0000000cH $LN20@PMC_Bitwis: ; 323 : return (PMC_STATUS_ARGUMENT_ERROR); or eax, -1 $LN1@PMC_Bitwis: pop edi ; 361 : } pop esi pop ebx pop ebp ret 12 ; 0000000cH _PMC_BitwiseAnd_X_X@12 ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; COMDAT _PMC_BitwiseAnd_X_L@16 _TEXT SEGMENT _u$ = 8 ; size = 4 $T1 = 12 ; size = 8 _v$ = 12 ; size = 8 _w$ = 20 ; size = 4 _PMC_BitwiseAnd_X_L@16 PROC ; COMDAT ; 268 : { push ebp mov ebp, esp push esi mov esi, DWORD PTR _u$[ebp] push edi ; 269 : if (__UNIT_TYPE_BIT_COUNT * 2 < sizeof(v) * 8) ; 270 : { ; 271 : // _UINT64_T が 2 ワードで表現しきれない処理系には対応しない ; 272 : return (PMC_STATUS_INTERNAL_ERROR); ; 273 : } ; 274 : if (u == NULL) test esi, esi je SHORT $LN19@PMC_Bitwis ; 275 : return (PMC_STATUS_ARGUMENT_ERROR); ; 276 : if (w == NULL) mov edi, DWORD PTR _w$[ebp] test edi, edi je SHORT $LN19@PMC_Bitwis ; 278 : NUMBER_HEADER* nu = (NUMBER_HEADER*)u; ; 279 : PMC_STATUS_CODE result; ; 280 : if ((result = CheckNumber(nu)) != PMC_STATUS_OK) push esi call _CheckNumber add esp, 4 test eax, eax jne SHORT $LN1@PMC_Bitwis ; 281 : return (result); ; 282 : if (nu->IS_ZERO) test BYTE PTR [esi+24], 2 jne SHORT $LN20@PMC_Bitwis ; 283 : { ; 284 : // u が 0 である場合 ; 285 : *w = 0; ; 286 : } ; 287 : else if (v == 0) mov ecx, DWORD PTR _v$[ebp] mov eax, ecx mov edx, DWORD PTR _v$[ebp+4] or eax, edx jne SHORT $LN8@PMC_Bitwis $LN20@PMC_Bitwis: ; 313 : return (PMC_STATUS_OK); xorps xmm0, xmm0 movlpd QWORD PTR $T1[ebp], xmm0 mov eax, DWORD PTR $T1[ebp+4] mov ecx, DWORD PTR $T1[ebp] mov DWORD PTR [edi], ecx mov DWORD PTR [edi+4], eax xor eax, eax pop edi ; 314 : } pop esi pop ebp ret 16 ; 00000010H $LN8@PMC_Bitwis: ; 288 : { ; 289 : // v が 0 である場合 ; 290 : *w = 0; ; 291 : } ; 292 : else ; 293 : { ; 294 : // u と v がともに 0 ではない場合 ; 295 : ; 296 : // x と y の和を計算する ; 297 : if (__UNIT_TYPE_BIT_COUNT < sizeof(v) * 8) ; 298 : { ; 299 : // _UINT64_T が 1 ワードで表現しきれない場合 ; 300 : ; 301 : _UINT32_T v_hi; ; 302 : _UINT32_T v_lo = _FROMDWORDTOWORD(v, &v_hi); ; 303 : _UINT32_T w_hi = nu->UNIT_WORD_COUNT > 1 ? nu->BLOCK[1] & v_hi : 0; cmp DWORD PTR [esi+8], 1 mov eax, DWORD PTR [esi+32] jbe SHORT $LN13@PMC_Bitwis and edx, DWORD PTR [eax+4] ; 304 : _UINT32_T w_lo = nu->BLOCK[0] & v_lo; and ecx, DWORD PTR [eax] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 178 : return (((_UINT64_T)value_high << 32) | value_low); xor eax, eax or eax, edx ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; 313 : return (PMC_STATUS_OK); mov DWORD PTR [edi], ecx mov DWORD PTR [edi+4], eax xor eax, eax pop edi ; 314 : } pop esi pop ebp ret 16 ; 00000010H $LN13@PMC_Bitwis: ; 304 : _UINT32_T w_lo = nu->BLOCK[0] & v_lo; and ecx, DWORD PTR [eax] xor edx, edx ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 178 : return (((_UINT64_T)value_high << 32) | value_low); xor eax, eax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; 313 : return (PMC_STATUS_OK); mov DWORD PTR [edi], ecx ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 178 : return (((_UINT64_T)value_high << 32) | value_low); or eax, edx ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; 313 : return (PMC_STATUS_OK); mov DWORD PTR [edi+4], eax xor eax, eax pop edi ; 314 : } pop esi pop ebp ret 16 ; 00000010H $LN19@PMC_Bitwis: ; 277 : return (PMC_STATUS_ARGUMENT_ERROR); or eax, -1 $LN1@PMC_Bitwis: pop edi ; 314 : } pop esi pop ebp ret 16 ; 00000010H _PMC_BitwiseAnd_X_L@16 ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; COMDAT _PMC_BitwiseAnd_X_I@12 _TEXT SEGMENT _u$ = 8 ; size = 4 _v$ = 12 ; size = 4 _w$ = 16 ; size = 4 _PMC_BitwiseAnd_X_I@12 PROC ; COMDAT ; 184 : { push ebp mov ebp, esp push esi ; 185 : if (__UNIT_TYPE_BIT_COUNT < sizeof(v) * 8) ; 186 : { ; 187 : // _UINT32_T が 1 ワードで表現しきれない処理系には対応しない ; 188 : return (PMC_STATUS_INTERNAL_ERROR); ; 189 : } ; 190 : if (u == NULL) mov esi, DWORD PTR _u$[ebp] push edi test esi, esi je SHORT $LN11@PMC_Bitwis ; 191 : return (PMC_STATUS_ARGUMENT_ERROR); ; 192 : if (w == NULL) mov edi, DWORD PTR _w$[ebp] test edi, edi je SHORT $LN11@PMC_Bitwis ; 194 : NUMBER_HEADER* nu = (NUMBER_HEADER*)u; ; 195 : PMC_STATUS_CODE result; ; 196 : if ((result = CheckNumber(nu)) != PMC_STATUS_OK) push esi call _CheckNumber add esp, 4 test eax, eax jne SHORT $LN1@PMC_Bitwis ; 197 : return (result); ; 198 : if (nu->IS_ZERO) test BYTE PTR [esi+24], 2 jne SHORT $LN12@PMC_Bitwis ; 199 : { ; 200 : // u が 0 である場合 ; 201 : *w = 0; ; 202 : } ; 203 : else if (v == 0) mov ecx, DWORD PTR _v$[ebp] test ecx, ecx jne SHORT $LN8@PMC_Bitwis $LN12@PMC_Bitwis: ; 214 : } ; 215 : return (PMC_STATUS_OK); xor eax, eax mov DWORD PTR [edi], eax pop edi ; 216 : } pop esi pop ebp ret 12 ; 0000000cH $LN8@PMC_Bitwis: ; 204 : { ; 205 : // v が 0 である場合 ; 206 : *w = 0; ; 207 : } ; 208 : else ; 209 : { ; 210 : // u と v がともに 0 ではない場合 ; 211 : ; 212 : // u と v の bit AND を計算する ; 213 : *w = nu->BLOCK[0] & v; mov eax, DWORD PTR [esi+32] mov eax, DWORD PTR [eax] and eax, ecx ; 214 : } ; 215 : return (PMC_STATUS_OK); mov DWORD PTR [edi], eax xor eax, eax pop edi ; 216 : } pop esi pop ebp ret 12 ; 0000000cH $LN11@PMC_Bitwis: ; 193 : return (PMC_STATUS_ARGUMENT_ERROR); or eax, -1 $LN1@PMC_Bitwis: pop edi ; 216 : } pop esi pop ebp ret 12 ; 0000000cH _PMC_BitwiseAnd_X_I@12 ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; COMDAT _PMC_BitwiseAnd_L_X@16 _TEXT SEGMENT $T1 = 8 ; size = 8 _u$ = 8 ; size = 8 _v$ = 16 ; size = 4 _w$ = 20 ; size = 4 _PMC_BitwiseAnd_L_X@16 PROC ; COMDAT ; 219 : { push ebp mov ebp, esp push esi mov esi, DWORD PTR _v$[ebp] push edi ; 220 : if (__UNIT_TYPE_BIT_COUNT * 2 < sizeof(u) * 8) ; 221 : { ; 222 : // _UINT64_T が 2 ワードで表現しきれない処理系には対応しない ; 223 : return (PMC_STATUS_INTERNAL_ERROR); ; 224 : } ; 225 : if (v == NULL) test esi, esi je SHORT $LN19@PMC_Bitwis ; 226 : return (PMC_STATUS_ARGUMENT_ERROR); ; 227 : if (w == NULL) mov edi, DWORD PTR _w$[ebp] test edi, edi je SHORT $LN19@PMC_Bitwis ; 229 : NUMBER_HEADER* nv = (NUMBER_HEADER*)v; ; 230 : PMC_STATUS_CODE result; ; 231 : if ((result = CheckNumber(nv)) != PMC_STATUS_OK) push esi call _CheckNumber add esp, 4 test eax, eax jne SHORT $LN1@PMC_Bitwis ; 232 : return (result); ; 233 : if (nv->IS_ZERO) test BYTE PTR [esi+24], 2 jne SHORT $LN20@PMC_Bitwis ; 234 : { ; 235 : // v が 0 である場合 ; 236 : *w = 0; ; 237 : } ; 238 : else if (u == 0) mov ecx, DWORD PTR _u$[ebp] mov eax, ecx mov edx, DWORD PTR _u$[ebp+4] or eax, edx jne SHORT $LN8@PMC_Bitwis $LN20@PMC_Bitwis: ; 264 : return (PMC_STATUS_OK); xorps xmm0, xmm0 movlpd QWORD PTR $T1[ebp], xmm0 mov eax, DWORD PTR $T1[ebp+4] mov ecx, DWORD PTR $T1[ebp] mov DWORD PTR [edi], ecx mov DWORD PTR [edi+4], eax xor eax, eax pop edi ; 265 : } pop esi pop ebp ret 16 ; 00000010H $LN8@PMC_Bitwis: ; 239 : { ; 240 : // u が 0 である場合 ; 241 : *w = 0; ; 242 : } ; 243 : else ; 244 : { ; 245 : // u と v がともに 0 ではない場合 ; 246 : ; 247 : // x と y の和を計算する ; 248 : if (__UNIT_TYPE_BIT_COUNT < sizeof(u) * 8) ; 249 : { ; 250 : // _UINT64_T が 1 ワードで表現しきれない場合 ; 251 : ; 252 : _UINT32_T u_hi; ; 253 : _UINT32_T u_lo = _FROMDWORDTOWORD(u, &u_hi); ; 254 : _UINT32_T w_hi = nv->UNIT_WORD_COUNT > 1 ? nv->BLOCK[1] & u_hi : 0; cmp DWORD PTR [esi+8], 1 mov eax, DWORD PTR [esi+32] jbe SHORT $LN13@PMC_Bitwis and edx, DWORD PTR [eax+4] ; 255 : _UINT32_T w_lo = nv->BLOCK[0] & u_lo; and ecx, DWORD PTR [eax] ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 178 : return (((_UINT64_T)value_high << 32) | value_low); xor eax, eax or eax, edx ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; 264 : return (PMC_STATUS_OK); mov DWORD PTR [edi], ecx mov DWORD PTR [edi+4], eax xor eax, eax pop edi ; 265 : } pop esi pop ebp ret 16 ; 00000010H $LN13@PMC_Bitwis: ; 255 : _UINT32_T w_lo = nv->BLOCK[0] & u_lo; and ecx, DWORD PTR [eax] xor edx, edx ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 178 : return (((_UINT64_T)value_high << 32) | value_low); xor eax, eax ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; 264 : return (PMC_STATUS_OK); mov DWORD PTR [edi], ecx ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h ; 178 : return (((_UINT64_T)value_high << 32) | value_low); or eax, edx ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; 264 : return (PMC_STATUS_OK); mov DWORD PTR [edi+4], eax xor eax, eax pop edi ; 265 : } pop esi pop ebp ret 16 ; 00000010H $LN19@PMC_Bitwis: ; 228 : return (PMC_STATUS_ARGUMENT_ERROR); or eax, -1 $LN1@PMC_Bitwis: pop edi ; 265 : } pop esi pop ebp ret 16 ; 00000010H _PMC_BitwiseAnd_L_X@16 ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; COMDAT _PMC_BitwiseAnd_I_X@12 _TEXT SEGMENT _u$ = 8 ; size = 4 _v$ = 12 ; size = 4 _w$ = 16 ; size = 4 _PMC_BitwiseAnd_I_X@12 PROC ; COMDAT ; 149 : { push ebp mov ebp, esp push esi ; 150 : if (__UNIT_TYPE_BIT_COUNT < sizeof(u) * 8) ; 151 : { ; 152 : // _UINT32_T が 1 ワードで表現しきれない処理系には対応しない ; 153 : return (PMC_STATUS_INTERNAL_ERROR); ; 154 : } ; 155 : if (v == NULL) mov esi, DWORD PTR _v$[ebp] push edi test esi, esi je SHORT $LN11@PMC_Bitwis ; 156 : return (PMC_STATUS_ARGUMENT_ERROR); ; 157 : if (w == NULL) mov edi, DWORD PTR _w$[ebp] test edi, edi je SHORT $LN11@PMC_Bitwis ; 159 : NUMBER_HEADER* nv = (NUMBER_HEADER*)v; ; 160 : PMC_STATUS_CODE result; ; 161 : if ((result = CheckNumber(nv)) != PMC_STATUS_OK) push esi call _CheckNumber add esp, 4 test eax, eax jne SHORT $LN1@PMC_Bitwis ; 162 : return (result); ; 163 : if (nv->IS_ZERO) test BYTE PTR [esi+24], 2 jne SHORT $LN12@PMC_Bitwis ; 164 : { ; 165 : // v が 0 である場合 ; 166 : *w = 0; ; 167 : } ; 168 : else if (u == 0) mov ecx, DWORD PTR _u$[ebp] test ecx, ecx jne SHORT $LN8@PMC_Bitwis $LN12@PMC_Bitwis: ; 179 : } ; 180 : return (PMC_STATUS_OK); xor eax, eax mov DWORD PTR [edi], eax pop edi ; 181 : } pop esi pop ebp ret 12 ; 0000000cH $LN8@PMC_Bitwis: ; 169 : { ; 170 : // u が 0 である場合 ; 171 : *w = 0; ; 172 : } ; 173 : else ; 174 : { ; 175 : // u と v がともに 0 ではない場合 ; 176 : ; 177 : // u と v の bit AND を計算する ; 178 : *w = nv->BLOCK[0] & u; mov eax, DWORD PTR [esi+32] mov eax, DWORD PTR [eax] and eax, ecx ; 179 : } ; 180 : return (PMC_STATUS_OK); mov DWORD PTR [edi], eax xor eax, eax pop edi ; 181 : } pop esi pop ebp ret 12 ; 0000000cH $LN11@PMC_Bitwis: ; 158 : return (PMC_STATUS_ARGUMENT_ERROR); or eax, -1 $LN1@PMC_Bitwis: pop edi ; 181 : } pop esi pop ebp ret 12 ; 0000000cH _PMC_BitwiseAnd_I_X@12 ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_bitwiseand.c ; COMDAT _Initialize_BitwiseAnd _TEXT SEGMENT _feature$ = 8 ; size = 4 _Initialize_BitwiseAnd PROC ; COMDAT ; 366 : return (PMC_STATUS_OK); xor eax, eax ; 367 : } ret 0 _Initialize_BitwiseAnd ENDP _TEXT ENDS END
24.324805
121
0.615252
ec1c7460f951b2d2f1bfa6aaf923e8b32cef388d
856
asm
Assembly
src/kernel/arch/aarch32/asm/isr.asm
aryanmaurya1/ArvernOS
a8452c01cd180ffbdabf949c80329ccfcc84d2e9
[ "MIT" ]
77
2021-11-19T15:56:32.000Z
2022-03-30T04:02:02.000Z
src/kernel/arch/aarch32/asm/isr.asm
aryanmaurya1/ArvernOS
a8452c01cd180ffbdabf949c80329ccfcc84d2e9
[ "MIT" ]
57
2021-11-19T12:38:52.000Z
2022-03-03T08:56:35.000Z
src/kernel/arch/aarch32/asm/isr.asm
aryanmaurya1/ArvernOS
a8452c01cd180ffbdabf949c80329ccfcc84d2e9
[ "MIT" ]
2
2022-03-01T06:39:25.000Z
2022-03-24T15:47:45.000Z
.global vectors .include "macro-defs.asm" .macro exc_handler type exc_handler_\type: kernel_entry exc mov r0, #\type bl isr_exception_handler b hang .endm .macro irq_handler type irq_handler_\type: kernel_entry irq bl isr_irq_handler kernel_exit .endm .align 5 vectors: ldr pc, ventry_addr_0 ldr pc, ventry_addr_1 ldr pc, ventry_addr_2 ldr pc, ventry_addr_3 ldr pc, ventry_addr_4 ldr pc, ventry_addr_5 ldr pc, ventry_addr_6 ldr pc, ventry_addr_7 ventry_addr_0: .word start ventry_addr_1: .word exc_handler_1 ventry_addr_2: .word syscall_handler ventry_addr_3: .word exc_handler_3 ventry_addr_4: .word exc_handler_4 ventry_addr_5: .word exc_handler_5 ventry_addr_6: .word irq_handler_6 ventry_addr_7: .word exc_handler_7 exc_handler 1 exc_handler 3 exc_handler 4 exc_handler 5 irq_handler 6 exc_handler 7 hang: b hang
17.469388
36
0.793224
b396bf12662cbe2301157f00a291808c48f6267d
310
asm
Assembly
programs/oeis/039/A039963.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/039/A039963.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/039/A039963.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A039963: The period-doubling sequence A035263 repeated. ; 1,1,0,0,1,1,1,1,1,1,0,0,1,1,0,0,1,1,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,1,1,0,0,1,1,0,0,1,1,1,1,1,1,0,0,1,1,0,0,1,1,0,0,1,1,1,1,1,1,0,0,1,1,0,0,1,1,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0 div $0,2 add $0,1 lpb $0 dif $0,4 lpe mod $0,2
31
201
0.56129
675fdf85194ed7b5ee2d4cf3003f9ffff9e7e2cd
1,385
asm
Assembly
programs/oeis/053/A053311.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/053/A053311.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/053/A053311.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A053311: Partial sums of A000285. ; 1,5,10,19,33,56,93,153,250,407,661,1072,1737,2813,4554,7371,11929,19304,31237,50545,81786,132335,214125,346464,560593,907061,1467658,2374723,3842385,6217112,10059501,16276617,26336122,42612743,68948869,111561616,180510489,292072109,472582602,764654715,1237237321,2001892040,3239129365,5241021409,8480150778,13721172191,22201322973,35922495168,58123818145,94046313317,152170131466,246216444787,398386576257,644603021048,1042989597309,1687592618361,2730582215674,4418174834039,7148757049717,11566931883760,18715688933481,30282620817245,48998309750730,79280930567979,128279240318713,207560170886696,335839411205413,543399582092113,879238993297530,1422638575389647,2301877568687181,3724516144076832,6026393712764017,9750909856840853,15777303569604874,25528213426445731,41305516996050609,66833730422496344,108139247418546957,174972977841043305,283112225259590266,458085203100633575,741197428360223845,1199282631460857424,1940480059821081273,3139762691281938701,5080242751103019978,8220005442384958683,13300248193487978665,21520253635872937352,34820501829360916021,56340755465233853377,91161257294594769402,147502012759828622783,238663270054423392189,386165282814252014976,624828552868675407169,1010993835682927422149,1635822388551602829322,2646816224234530251475 mov $1,1 lpb $0 sub $0,1 mov $2,$3 mov $3,$1 add $1,$2 add $1,4 lpe mov $0,$1
106.538462
1,259
0.885921
bd23b1ad250c3cc72bef2a7bf7505247de81f819
3,841
asm
Assembly
util/cv/cvmth.asm
olifink/smsqe
c546d882b26566a46d71820d1539bed9ea8af108
[ "BSD-2-Clause" ]
null
null
null
util/cv/cvmth.asm
olifink/smsqe
c546d882b26566a46d71820d1539bed9ea8af108
[ "BSD-2-Clause" ]
null
null
null
util/cv/cvmth.asm
olifink/smsqe
c546d882b26566a46d71820d1539bed9ea8af108
[ "BSD-2-Clause" ]
null
null
null
* Convert text month to number v0.00  J.R.Oakley Mar 1988 QJUMP * section cv * xref cv_lctab * xdef cv_txtmn xdef cv_mntxt *+++ * Convert a string which should contain a text month name into * a month number from 1 to 12. Leading spaces only are permitted. * * Registers: * Entry Exit * D1 month number * D7 end of text preserved * A0 start of text updated * A2 list of months (36 chars) smashed *--- cv_txtmn * cvmreg reg d0/d2-d6 movem.l cvmreg,-(sp) move.w #%1111111111110,d0 ; all months still valid moveq #' ',d1 rmlspc cmp.l a0,d7 ; off end of buffer? ble.s flsbit ; yes cmp.b (a0)+,d1 ; is this a space? beq.s rmlspc ; yes, ignore it * subq.l #1,a0 ; no, go back to it addq.l #2,a2 ; point to first letter of "Jan" move.l d7,d1 ; we have... sub.l a0,d1 ; ...this many characters beq.s flsbit ; none cmp.w #2,d1 ; more than two? bls.s slctab ; no moveq #2,d1 ; yes, three letters to go slctab lea cv_lctab(pc),a1 ; lower case table is here moveq #0,d2 ; clear out upper bits moveq #0,d6 * cmplp move.b (a0)+,d2 ; character to check move.b 0(a1,d2.w),d2 ; lowercase it move.w d0,d3 ; get map of valid months moveq #12,d4 ; test twelve of them moveq #11*3,d5 ; start with letter at this offset letlp move.b 0(a2,d5.w),d6 ; get month letter cmp.b 0(a1,d6.w),d2 ; compare with it in lower case beq.s letok ; same bclr d4,d3 ; different, this month won't do letok subq.w #1,d4 ; next month subq.w #3,d5 ; and its Nth letter bpl.s letlp ; there is one tst.w d3 ; any months left? beq.s flsbit ; no, find first match move.w d3,d0 ; yes, carry on addq.l #1,a2 ; using next month letter dbra d1,cmplp flsbit moveq #-1,d1 ; start at month -1 (!) flslp addq.w #1,d1 ; next month lsr.w #1,d0 ; is this bit bcc.s flslp ; but it isn't valid * movem.l (sp)+,cvmreg rts *+++ * Convert a month number from 1 to 12 into the corresponding three-letter * string. * * Registers: * Entry Exit * D1 month number preserved * D7 end of buffer preserved * A0 buffer pointer updated * A2 list of months (36 chars) smashed *--- cv_mntxt movem.l cvmreg,-(sp) add.w d1,a2 add.w d1,a2 ; get offset in text subq.w #1,d1 ; including 2 chars for the length! add.w d1,a2 moveq #2,d0 cpchar cmp.l a0,d7 ; off end of buffer? ble.s flsbit ; yes move.b (a2)+,(a0)+ ; no, copy char dbra d0,cpchar movem.l (sp)+,cvmreg rts * end
37.656863
76
0.415517
fffbfa9b3e43cdced013567c65ee1f1f1a793565
8,130
asm
Assembly
vbox/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxSave.asm
Nurzamal/rest_api_docker
a9cc01dfc235467d490d9663755b33ef6990bdd8
[ "MIT" ]
null
null
null
vbox/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxSave.asm
Nurzamal/rest_api_docker
a9cc01dfc235467d490d9663755b33ef6990bdd8
[ "MIT" ]
null
null
null
vbox/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxSave.asm
Nurzamal/rest_api_docker
a9cc01dfc235467d490d9663755b33ef6990bdd8
[ "MIT" ]
null
null
null
; $Id: bs3-cmn-RegCtxSave.asm 69111 2017-10-17 14:26:02Z vboxsync $ ;; @file ; BS3Kit - Bs3RegCtxSave. ; ; ; Copyright (C) 2007-2017 Oracle Corporation ; ; This file is part of VirtualBox Open Source Edition (OSE), as ; available from http://www.virtualbox.org. This file is free software; ; you can redistribute it and/or modify it under the terms of the GNU ; General Public License (GPL) as published by the Free Software ; Foundation, in version 2 as it comes in the "COPYING" file of the ; VirtualBox OSE distribution. VirtualBox OSE is distributed in the ; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. ; ; The contents of this file may alternatively be used under the terms ; of the Common Development and Distribution License Version 1.0 ; (CDDL) only, as it comes in the "COPYING.CDDL" file of the ; VirtualBox OSE distribution, in which case the provisions of the ; CDDL are applicable instead of those of the GPL. ; ; You may elect to license modified versions of this file under the ; terms and conditions of either the GPL or the CDDL or both. ; %include "bs3kit-template-header.mac" BS3_EXTERN_SYSTEM16 Bs3Gdt BS3_EXTERN_DATA16 g_bBs3CurrentMode %if TMPL_BITS != 64 BS3_EXTERN_DATA16 g_uBs3CpuDetected %endif TMPL_BEGIN_TEXT ;; ; Saves the current register context. ; ; @param pRegCtx ; @uses None. ; BS3_PROC_BEGIN_CMN Bs3RegCtxSave, BS3_PBC_HYBRID_SAFE TONLY16 CPU 8086 BS3_CALL_CONV_PROLOG 1 push xBP mov xBP, xSP xPUSHF ; xBP - xCB*1: save the incoming flags exactly. push xAX ; xBP - xCB*2: save incoming xAX push xCX ; xBP - xCB*3: save incoming xCX push xDI ; xBP - xCB*4: save incoming xDI BONLY16 push es ; xBP - xCB*5 BONLY16 push ds ; xBP - xCB*6 ; ; Clear the whole structure first. ; xor xAX, xAX cld AssertCompileSizeAlignment(BS3REGCTX, 4) %if TMPL_BITS == 16 les xDI, [xBP + xCB + cbCurRetAddr] mov xCX, BS3REGCTX_size / 2 rep stosw %else mov xDI, [xBP + xCB + cbCurRetAddr] mov xCX, BS3REGCTX_size / 4 rep stosd %endif mov xDI, [xBP + xCB + cbCurRetAddr] ; ; Save the current mode. ; mov cl, [BS3_DATA16_WRT(g_bBs3CurrentMode)] mov [BS3_ONLY_16BIT(es:) xDI + BS3REGCTX.bMode], cl %if TMPL_BITS == 16 ; ; In 16-bit mode we could be running on really ancient CPUs, so check ; mode and detected CPU and proceed with care. ; cmp cl, BS3_MODE_PP16 jae .save_full mov cl, [BS3_DATA16_WRT(g_uBs3CpuDetected)] cmp cl, BS3CPU_80386 jae .save_full ; load ES into DS so we can save some segment prefix bytes. push es pop ds ; 16-bit GPRs not on the stack. mov [xDI + BS3REGCTX.rdx], dx mov [xDI + BS3REGCTX.rbx], bx mov [xDI + BS3REGCTX.rsi], si ; Join the common code. cmp cl, BS3CPU_80286 jb .common_ancient CPU 286 smsw [xDI + BS3REGCTX.cr0] mov cl, [xDI + BS3REGCTX.bMode] ; assumed by jump destination jmp .common_80286 CPU 386 %endif .save_full: ; ; 80386 or later. ; %if TMPL_BITS != 64 ; Check for CR4 here while we've got a working DS in all contexts. test byte [1 + BS3_DATA16_WRT(g_uBs3CpuDetected)], (BS3CPU_F_CPUID >> 8) jnz .save_full_have_cr4 or byte [BS3_ONLY_16BIT(es:) xDI + BS3REGCTX.fbFlags], BS3REG_CTX_F_NO_CR4 .save_full_have_cr4: %endif %if TMPL_BITS == 16 ; Load es into ds so we can save ourselves some segment prefix bytes. push es pop ds %endif ; GPRs first. mov [xDI + BS3REGCTX.rdx], sDX mov [xDI + BS3REGCTX.rbx], sBX mov [xDI + BS3REGCTX.rsi], sSI %if TMPL_BITS == 64 mov [xDI + BS3REGCTX.r8], r8 mov [xDI + BS3REGCTX.r9], r9 mov [xDI + BS3REGCTX.r10], r10 mov [xDI + BS3REGCTX.r11], r11 mov [xDI + BS3REGCTX.r12], r12 mov [xDI + BS3REGCTX.r13], r13 mov [xDI + BS3REGCTX.r14], r14 mov [xDI + BS3REGCTX.r15], r15 %else or byte [xDI + BS3REGCTX.fbFlags], BS3REG_CTX_F_NO_AMD64 %endif %if TMPL_BITS == 16 ; Save high bits. mov [xDI + BS3REGCTX.rax], eax mov [xDI + BS3REGCTX.rcx], ecx mov [xDI + BS3REGCTX.rdi], edi mov [xDI + BS3REGCTX.rbp], ebp mov [xDI + BS3REGCTX.rsp], esp pushfd pop dword [xDI + BS3REGCTX.rflags] %endif %if TMPL_BITS != 64 ; The VM flag is never on the stack, so derive it from the bMode we saved above. test byte [xDI + BS3REGCTX.bMode], BS3_MODE_CODE_V86 jz .not_v8086 or byte [xDI + BS3REGCTX.rflags + 2], X86_EFL_VM >> 16 mov byte [xDI + BS3REGCTX.bCpl], 3 .not_v8086: %endif ; 386 segment registers. mov [xDI + BS3REGCTX.fs], fs mov [xDI + BS3REGCTX.gs], gs %if TMPL_BITS == 16 ; v8086 and real mode woes. mov cl, [xDI + BS3REGCTX.bMode] cmp cl, BS3_MODE_RM je .common_full_control_regs test cl, BS3_MODE_CODE_V86 jnz .common_full_no_control_regs %endif mov ax, ss test al, 3 jnz .common_full_no_control_regs ; Control registers (ring-0 and real-mode only). .common_full_control_regs: mov sAX, cr0 mov [xDI + BS3REGCTX.cr0], sAX mov sAX, cr2 mov [xDI + BS3REGCTX.cr2], sAX mov sAX, cr3 mov [xDI + BS3REGCTX.cr3], sAX %if TMPL_BITS != 64 test byte [xDI + BS3REGCTX.fbFlags], BS3REG_CTX_F_NO_CR4 jnz .common_80286 %endif mov sAX, cr4 mov [xDI + BS3REGCTX.cr4], sAX jmp .common_80286 .common_full_no_control_regs: or byte [xDI + BS3REGCTX.fbFlags], BS3REG_CTX_F_NO_CR0_IS_MSW | BS3REG_CTX_F_NO_CR2_CR3 | BS3REG_CTX_F_NO_CR4 smsw [xDI + BS3REGCTX.cr0] ; 80286 control registers. .common_80286: TONLY16 CPU 286 %if TMPL_BITS != 64 cmp cl, BS3_MODE_RM je .no_str_sldt test cl, BS3_MODE_CODE_V86 jnz .no_str_sldt %endif str [xDI + BS3REGCTX.tr] sldt [xDI + BS3REGCTX.ldtr] jmp .common_ancient .no_str_sldt: or byte [xDI + BS3REGCTX.fbFlags], BS3REG_CTX_F_NO_TR_LDTR ; Common stuff - stuff on the stack, 286 segment registers. .common_ancient: TONLY16 CPU 8086 mov xAX, [xBP - xCB*1] mov [xDI + BS3REGCTX.rflags], xAX mov xAX, [xBP - xCB*2] mov [xDI + BS3REGCTX.rax], xAX mov xAX, [xBP - xCB*3] mov [xDI + BS3REGCTX.rcx], xAX mov xAX, [xBP - xCB*4] mov [xDI + BS3REGCTX.rdi], xAX mov xAX, [xBP] mov [xDI + BS3REGCTX.rbp], xAX mov xAX, [xBP + xCB] mov [xDI + BS3REGCTX.rip], xAX lea xAX, [xBP + xCB + cbCurRetAddr] mov [xDI + BS3REGCTX.rsp], xAX %if TMPL_BITS == 16 mov ax, [xBP + xCB + 2] mov [xDI + BS3REGCTX.cs], ax mov ax, [xBP - xCB*6] mov [xDI + BS3REGCTX.ds], ax mov ax, [xBP - xCB*5] mov [xDI + BS3REGCTX.es], ax %else mov [xDI + BS3REGCTX.cs], cs mov [xDI + BS3REGCTX.ds], ds mov [xDI + BS3REGCTX.es], es %endif mov [xDI + BS3REGCTX.ss], ss ; ; Return. ; .return: BONLY16 pop ds BONLY16 pop es pop xDI pop xCX pop xAX xPOPF pop xBP BS3_HYBRID_RET BS3_PROC_END_CMN Bs3RegCtxSave
31.030534
122
0.568512
31b8c84546b295eb1d8e9a2bcd422fd818abaed3
1,075
asm
Assembly
Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca.log_22_372.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca.log_22_372.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca.log_22_372.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %rax push %rbx push %rdi push %rsi // Store lea addresses_US+0x16980, %rdi nop and $5451, %r12 mov $0x5152535455565758, %r11 movq %r11, %xmm3 vmovaps %ymm3, (%rdi) nop nop nop nop nop xor $59817, %r11 // Faulty Load lea addresses_WC+0x13400, %r10 clflush (%r10) nop and %rax, %rax mov (%r10), %r11 lea oracles, %rsi and $0xff, %r11 shlq $12, %r11 mov (%rsi,%r11,1), %r11 pop %rsi pop %rdi pop %rbx pop %rax pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_WC', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_US', 'same': False, 'AVXalign': True, 'congruent': 4}} [Faulty Load] {'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_WC', 'same': True, 'AVXalign': False, 'congruent': 0}} <gen_prepare_buffer> {'00': 22} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
18.220339
122
0.650233
3ef9439f5c2ea59e92e90cb2e9e3d7c92954edec
500
asm
Assembly
libsrc/_DEVELOPMENT/math/float/math32/c/sccz80/cm32_sccz80_dloadb.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/math/float/math32/c/sccz80/cm32_sccz80_dloadb.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/math/float/math32/c/sccz80/cm32_sccz80_dloadb.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
SECTION code_clib SECTION code_fp_math32 PUBLIC cm32_sccz80_dloadb cm32_sccz80_dloadb: ; sccz80 float primitive ; Load float given pointer in HL pointing to last byte into DEHL'. ; ; enter : HL = double * (sccz80 format) + 3 bytes ; ; exit : DEHL'= double (math32 format) ; (exx set is swapped) ; ; uses : bc, de, hl, bc', de', hl' ld d,(hl) dec hl ld e,(hl) dec hl ld b,(hl) dec hl ld l,(hl) ld h,b exx ret
16.666667
70
0.566
2159994bdcca90d468dacf2a07ef90eba836cbc0
768
asm
Assembly
oeis/280/A280891.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/280/A280891.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/280/A280891.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A280891: Number of certain noncrossing set partitions. ; Submitted by Jamie Morken(s2) ; 1,4,12,37,118,387,1298,4433,15366,53924,191216,684114,2466428,8951945,32683230,119949945,442281030,1637618400,6086481720,22699003830,84918443220,318593346630,1198421583684,4518886787802,17077448924828,64671604514552,245380598678208,932708665735364,3551238550341944,13542393822575541,51719078374955894,197791494373016201,757409977272682566,2903949364495058152,11146854343710722728,42834518829714441102,164774064401146247908,634474567405354058026,2445393179489485407420,9433493219907922333630 mov $2,$0 add $0,2 seq $0,108 ; Catalan numbers: C(n) = binomial(2n,n)/(n+1) = (2n)!/(n!(n+1)!). seq $2,108 ; Catalan numbers: C(n) = binomial(2n,n)/(n+1) = (2n)!/(n!(n+1)!). sub $0,$2
76.8
492
0.804688
bb3fcdfb444348e403f57ca4bab5299a685ddaf0
687
asm
Assembly
data/pokemon/base_stats/hippopotas.asm
TastySnax12/pokecrystal16-493-plus
9de36c8803c9bdf4b8564ed547f988b0b66f0c41
[ "blessing" ]
2
2021-07-31T07:05:06.000Z
2021-10-16T03:32:26.000Z
data/pokemon/base_stats/hippopotas.asm
TastySnax12/pokecrystal16-493-plus
9de36c8803c9bdf4b8564ed547f988b0b66f0c41
[ "blessing" ]
null
null
null
data/pokemon/base_stats/hippopotas.asm
TastySnax12/pokecrystal16-493-plus
9de36c8803c9bdf4b8564ed547f988b0b66f0c41
[ "blessing" ]
3
2021-01-15T18:45:40.000Z
2021-10-16T03:35:27.000Z
db 0 ; species ID placeholder db 68, 72, 78, 32, 38, 42 ; hp atk def spd sat sdf db GROUND, GROUND ; type db 140 ; catch rate db 66 ; base exp db NO_ITEM, NO_ITEM ; items db GENDER_F50 ; gender ratio db 100 ; unknown 1 db 30 ; step cycles to hatch db 5 ; unknown 2 INCBIN "gfx/pokemon/hippopotas/front.dimensions" db 0, 0, 0, 0 ; padding db GROWTH_SLOW ; growth rate dn EGG_GROUND, EGG_GROUND ; egg groups ; tm/hm learnset tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, REST, ATTRACT, STRENGTH ; end
31.227273
224
0.708879
c59c2a7f02c6af483b03b40c5794e01befb4cbb8
6,214
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1281.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1281.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1281.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r13 push %r9 push %rax push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_D_ht+0x88a6, %r11 and %rbp, %rbp movb $0x61, (%r11) nop dec %rbx lea addresses_UC_ht+0x1b1f6, %rax nop sub $62896, %r13 vmovups (%rax), %ymm4 vextracti128 $1, %ymm4, %xmm4 vpextrq $1, %xmm4, %r9 nop add %r9, %r9 lea addresses_normal_ht+0x1da4e, %r12 nop nop nop nop nop add $528, %r13 vmovups (%r12), %ymm2 vextracti128 $1, %ymm2, %xmm2 vpextrq $0, %xmm2, %rbp and %r11, %r11 lea addresses_WC_ht+0xb37a, %r11 nop nop nop nop add %rax, %rax movb $0x61, (%r11) nop nop sub $3901, %rbp lea addresses_normal_ht+0x7866, %rsi lea addresses_normal_ht+0x10076, %rdi nop add $1200, %r11 mov $107, %rcx rep movsq cmp %r11, %r11 pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %rax pop %r9 pop %r13 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r13 push %r8 push %r9 push %rax push %rdi // Load lea addresses_WT+0xccd6, %r8 cmp %r13, %r13 movb (%r8), %r11b nop nop nop nop nop sub $23674, %rax // Store lea addresses_WC+0xa7f6, %rdi nop nop sub $58959, %r10 mov $0x5152535455565758, %r9 movq %r9, %xmm0 vmovups %ymm0, (%rdi) cmp $37312, %r11 // Store lea addresses_PSE+0x1d596, %r10 nop nop nop nop nop and %r8, %r8 mov $0x5152535455565758, %rdi movq %rdi, (%r10) nop nop nop nop add %r9, %r9 // Store lea addresses_normal+0x15f6, %r11 nop nop xor $29820, %r8 movl $0x51525354, (%r11) cmp %rax, %rax // Faulty Load lea addresses_normal+0x141f6, %r10 nop nop nop nop and %r9, %r9 mov (%r10), %r8w lea oracles, %r9 and $0xff, %r8 shlq $12, %r8 mov (%r9,%r8,1), %r8 pop %rdi pop %rax pop %r9 pop %r8 pop %r13 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_normal', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 9}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 1}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 8}} [Faulty Load] {'src': {'type': 'addresses_normal', 'AVXalign': False, 'size': 2, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 0}} {'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 11}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 2}} {'src': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}} {'34': 21829} 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 */
38.596273
2,999
0.655777
a090742e0ba6b5716ae6abd1405900aef7c5912a
99
asm
Assembly
examples/stm8/start.asm
rakati/ppci-mirror
8f5b0282fd1122d7c389b39c86fcf5d9352b7bb2
[ "BSD-2-Clause" ]
161
2020-05-31T03:29:42.000Z
2022-03-07T08:36:19.000Z
examples/stm8/start.asm
rakati/ppci-mirror
8f5b0282fd1122d7c389b39c86fcf5d9352b7bb2
[ "BSD-2-Clause" ]
74
2020-05-26T18:05:48.000Z
2021-02-13T21:55:39.000Z
examples/stm8/start.asm
rakati/ppci-mirror
8f5b0282fd1122d7c389b39c86fcf5d9352b7bb2
[ "BSD-2-Clause" ]
19
2020-05-27T19:22:11.000Z
2022-02-17T18:53:52.000Z
section reset ; TODO: setup stack pointer? ; TODO: fix this call instruction: ; call main_main
11
34
0.727273
5ef2d2470fb93206d66f48d06924302c2bdfa66f
314
asm
Assembly
src/macro.asm
Gegel85/RunnerGB
3d36597b94558cd3b3f613031291086190b45f2f
[ "MIT" ]
3
2020-02-24T14:31:36.000Z
2020-03-28T22:38:57.000Z
src/macro.asm
Gegel85/RunnerGB
3d36597b94558cd3b3f613031291086190b45f2f
[ "MIT" ]
13
2020-02-13T15:03:13.000Z
2020-02-13T15:27:08.000Z
src/macro.asm
Gegel85/RunnerGB
3d36597b94558cd3b3f613031291086190b45f2f
[ "MIT" ]
1
2020-02-24T14:31:39.000Z
2020-02-24T14:31:39.000Z
; Like doing ld [**], * ; VBLANK interrupt handler ; Params: ; \1 -> Address to write to ; \2 -> Value to write ; Return: ; None ; Registers: ; af -> Not preserved ; bc -> Preserved ; de -> Preserved ; hl -> Preserved reg: MACRO ld a, \2 ld [\1], a ENDM reset: MACRO xor a ld [\1], a ENDM
14.952381
30
0.563694
ec11c9c72908e7dc6525236747fbfc66eb6db52b
840
asm
Assembly
oeis/250/A250808.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/250/A250808.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/250/A250808.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A250808: Number of (n+1) X (4+1) 0..2 arrays with nondecreasing x(i,j)-x(i,j-1) in the i direction and nondecreasing min(x(i,j),x(i-1,j)) in the j direction. ; Submitted by Christian Krause ; 441,1731,6171,20631,66291,207831,641571,1961031,5955891,18013431,54331971,163579431,491905491,1478051031,4438822371,13325805831,39996095091,120025640631,360151632771,1080604320231,3242111804691,9726933102231,29181994683171,87548374802631,262649905914291,787959280755831,2363896968293571,7091729156933031,21275263974903891,63825944932921431,191478140815183971,574435034478391431,1723306327500853491,5169921430633919031,15509769188164474371,46529317357018857831,139587971656107443091 add $0,1 mov $2,4 lpb $0 sub $0,1 add $1,$3 add $1,1 add $2,17 mov $3,$1 add $3,$2 mul $2,2 add $3,$1 lpe mov $0,$3 sub $0,23 mul $0,15 add $0,441
40
483
0.786905
fe8d217fea816804d69b9d336853269f9006731d
6,179
asm
Assembly
src/native/third_party/isa-l/erasure_code/gf_vect_dot_prod_avx512.asm
eshelmarc/noobaa-core
a1db60038170f253ebc7049860b652999bea9d25
[ "Apache-2.0" ]
178
2019-05-07T21:09:12.000Z
2022-03-24T06:17:51.000Z
src/native/third_party/isa-l/erasure_code/gf_vect_dot_prod_avx512.asm
eshelmarc/noobaa-core
a1db60038170f253ebc7049860b652999bea9d25
[ "Apache-2.0" ]
761
2019-05-13T09:35:59.000Z
2022-03-31T18:18:06.000Z
src/native/third_party/isa-l/erasure_code/gf_vect_dot_prod_avx512.asm
eshelmarc/noobaa-core
a1db60038170f253ebc7049860b652999bea9d25
[ "Apache-2.0" ]
57
2019-05-30T13:41:29.000Z
2022-02-20T17:13:01.000Z
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Copyright(c) 2011-2015 Intel Corporation All rights reserved. ; ; Redistribution and use in source and binary forms, with or without ; modification, are permitted provided that the following conditions ; are met: ; * Redistributions of source code must retain the above copyright ; notice, this list of conditions and the following disclaimer. ; * Redistributions in binary form must reproduce the above copyright ; notice, this list of conditions and the following disclaimer in ; the documentation and/or other materials provided with the ; distribution. ; * Neither the name of Intel Corporation nor the names of its ; contributors may be used to endorse or promote products derived ; from this software without specific prior written permission. ; ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; gf_vect_dot_prod_avx512(len, vec, *g_tbls, **buffs, *dest); ;;; %include "reg_sizes.asm" %ifdef HAVE_AS_KNOWS_AVX512 %ifidn __OUTPUT_FORMAT__, elf64 %define arg0 rdi %define arg1 rsi %define arg2 rdx %define arg3 rcx %define arg4 r8 %define arg5 r9 %define tmp r11 %define tmp2 r10 %define return rax %define PS 8 %define LOG_PS 3 %define func(x) x: %define FUNC_SAVE %define FUNC_RESTORE %endif %ifidn __OUTPUT_FORMAT__, win64 %define arg0 rcx %define arg1 rdx %define arg2 r8 %define arg3 r9 %define arg4 r12 ; must be saved, loaded and restored %define arg5 r15 ; must be saved and restored %define tmp r11 %define tmp2 r10 %define return rax %define PS 8 %define LOG_PS 3 %define stack_size 0*16 + 3*8 ; must be an odd multiple of 8 %define arg(x) [rsp + stack_size + PS + PS*x] %define func(x) proc_frame x %macro FUNC_SAVE 0 alloc_stack stack_size save_reg r12, 9*16 + 0*8 save_reg r15, 9*16 + 3*8 end_prolog mov arg4, arg(4) %endmacro %macro FUNC_RESTORE 0 mov r12, [rsp + 9*16 + 0*8] mov r15, [rsp + 9*16 + 3*8] add rsp, stack_size %endmacro %endif %define len arg0 %define vec arg1 %define mul_array arg2 %define src arg3 %define dest1 arg4 %define ptr arg5 %define vec_i tmp2 %define pos return %ifndef EC_ALIGNED_ADDR ;;; Use Un-aligned load/store %define XLDR vmovdqu8 %define XSTR vmovdqu8 %else ;;; Use Non-temporal load/stor %ifdef NO_NT_LDST %define XLDR vmovdqa %define XSTR vmovdqa %else %define XLDR vmovntdqa %define XSTR vmovntdq %endif %endif %define xmask0f zmm5 %define xgft1_lo zmm4 %define xgft1_loy ymm4 %define xgft1_hi zmm3 %define x0 zmm0 %define xgft1_loy ymm4 %define x0y ymm0 %define xtmpa zmm1 %define xp1 zmm2 %define xp1y ymm2 default rel [bits 64] section .text align 16 global gf_vect_dot_prod_avx512:function func(gf_vect_dot_prod_avx512) FUNC_SAVE xor pos, pos mov tmp, 0x0f vpbroadcastb xmask0f, tmp ;Construct mask 0x0f0f0f... sal vec, LOG_PS ;vec *= PS. Make vec_i count by PS sub len, 64 jl .len_lt_64 .loop64: vpxorq xp1, xp1, xp1 mov tmp, mul_array xor vec_i, vec_i .next_vect: mov ptr, [src+vec_i] XLDR x0, [ptr+pos] ;Get next source vector add vec_i, PS vpandq xtmpa, x0, xmask0f ;Mask low src nibble in bits 4-0 vpsraw x0, x0, 4 ;Shift to put high nibble into bits 4-0 vpandq x0, x0, xmask0f ;Mask high src nibble in bits 4-0 vmovdqu8 xgft1_loy, [tmp] ;Load array Ax{00}..{0f}, Ax{00}..{f0} add tmp, 32 vshufi64x2 xgft1_hi, xgft1_lo, xgft1_lo, 0x55 vshufi64x2 xgft1_lo, xgft1_lo, xgft1_lo, 0x00 vpshufb xgft1_hi, xgft1_hi, x0 ;Lookup mul table of high nibble vpshufb xgft1_lo, xgft1_lo, xtmpa ;Lookup mul table of low nibble vpxorq xgft1_hi, xgft1_hi, xgft1_lo ;GF add high and low partials vpxorq xp1, xp1, xgft1_hi ;xp1 += partial cmp vec_i, vec jl .next_vect XSTR [dest1+pos], xp1 add pos, 64 ;Loop on 64 bytes at a time cmp pos, len jle .loop64 lea tmp, [len + 64] cmp pos, tmp je .return_pass ;; Tail len mov pos, len ;Overlapped offset length-64 jmp .loop64 ;Do one more overlap pass .len_lt_64: ; 32-byte version add len, 32 jl .return_fail .loop32: vpxorq xp1, xp1, xp1 mov tmp, mul_array xor vec_i, vec_i .next_vect2: mov ptr, [src+vec_i] XLDR x0y, [ptr+pos] ;Get next source vector 32B add vec_i, PS vpsraw xtmpa, x0, 4 ;Shift to put high nibble into bits 4-0 vshufi64x2 x0, x0, xtmpa, 0x44 ;put x0 = xl:xh vpandq x0, x0, xmask0f ;Mask bits 4-0 vmovdqu8 xgft1_loy, [tmp] ;Load array Ax{00}..{0f}, Ax{00}..{f0} add tmp, 32 vshufi64x2 xgft1_lo, xgft1_lo, xgft1_lo, 0x50 ;=AlAh:AlAh vpshufb xgft1_lo, xgft1_lo, x0 ;Lookup mul table vshufi64x2 xgft1_hi, xgft1_lo, xgft1_lo, 0x0e ;=xh: vpxorq xgft1_hi, xgft1_hi, xgft1_lo ;GF add high and low partials vpxorq xp1, xp1, xgft1_hi ;xp1 += partial cmp vec_i, vec jl .next_vect2 XSTR [dest1+pos], xp1y add pos, 32 ;Loop on 32 bytes at a time cmp pos, len jle .loop32 lea tmp, [len + 32] cmp pos, tmp je .return_pass ;; Tail len mov pos, len ;Overlapped offset length-32 jmp .loop32 ;Do one more overlap pass .return_pass: mov return, 0 FUNC_RESTORE ret .return_fail: mov return, 1 FUNC_RESTORE ret endproc_frame %else %ifidn __OUTPUT_FORMAT__, win64 global no_gf_vect_dot_prod_avx512 no_gf_vect_dot_prod_avx512: %endif %endif ; ifdef HAVE_AS_KNOWS_AVX512
25.639004
72
0.704483
afc59b129080262aa1767d91f2a16cd540b0c4f2
734
asm
Assembly
oeis/292/A292327.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/292/A292327.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/292/A292327.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A292327: p-INVERT of the Fibonacci sequence (A000045), where p(S) = (1 - S)^2. ; Submitted by Christian Krause ; 2,5,14,38,102,271,714,1868,4858,12569,32374,83058,212350,541219,1375570,3487384,8821170,22266413,56098206,141087934,354268502,888238903,2223968666,5561234916,13889778218,34652529473,86361653126,215021205770,534861620718,1329304929355,3301049999778,8191122451760,20310308469346,50325484045397,124615779436078,308379793324374,762675369774406,1885153290659167,4657127470354282,11499122027676796,28378944637587546,70003871322920297,172603980435444630,425393278517910946,1047970723271485790 lpb $0 add $1,$0 sub $0,1 mov $2,$1 mov $1,$3 add $1,4 add $2,$3 add $3,$2 add $3,5 lpe mov $0,$3 div $0,2 add $0,2
40.777778
487
0.792916
dbb62677bfd58d6d53a8122c9b90273f62c18af1
3,020
asm
Assembly
nasm-8086-assembly-course/0x06-menu/menu.asm
ailtonbsj/buffer-overflow-studies
326a26f26a52f5ac055b85fc6879123c91124d23
[ "MIT" ]
null
null
null
nasm-8086-assembly-course/0x06-menu/menu.asm
ailtonbsj/buffer-overflow-studies
326a26f26a52f5ac055b85fc6879123c91124d23
[ "MIT" ]
null
null
null
nasm-8086-assembly-course/0x06-menu/menu.asm
ailtonbsj/buffer-overflow-studies
326a26f26a52f5ac055b85fc6879123c91124d23
[ "MIT" ]
null
null
null
%include 'lib.inc' section .data bar db '+-------------+',LF,NULL tit db '| Calculadora |',LF,NULL obVal1 db 'Valor 1: ',NULL obVal2 db 'Valor 2: ',NULL opc1 db LF,'1. Adicionar',LF,NULL opc2 db '2. Subtrair',LF,NULL opc3 db '3. Multiplicar',LF,NULL opc4 db '4. Dividir',LF,NULL msgOpc db LF,'Deseja realizar? ',NULL msgErr db LF,'Valor de opção Inválido!',LF, NULL equal db ' = ',NULL _plus db ' + ',NULL _minus db ' - ',NULL _times db ' * ',NULL _slash db ' // ',NULL vspace db LF,LF,NULL section .bss opc resb 2 num1Str resb 8 num2Str resb 8 num1Int resd 1 num2Int resd 1 resInt resd 1 section .text global _start _start: ; Print initial banner mov ecx, bar call print mov ecx, tit call print mov ecx, bar call print ; Show options mov ecx, opc1 call print mov ecx, opc2 call print mov ecx, opc3 call print mov ecx, opc4 call print ; Get option mov ecx, msgOpc call print mov ecx, opc mov edx, 0x02 call scan ; Convert option to int and check mov ah, [opc] sub ah, '0' cmp ah, 4 jg error cmp ah, 1 jl error ; Get value 1 mov ecx, obVal1 call print mov ecx, num1Str mov edx, 0x08 call scan lea esi, [num1Str] call atoi mov [num1Int], eax ; Get value 2 mov ecx, obVal2 call print mov ecx, num2Str mov edx, 0x08 call scan lea esi, [num2Str] call atoi mov [num2Int], eax mov ecx, vspace call print ; show first operand mov eax, [num1Int] call itoa mov ecx, buffer call print ; Convert option to int mov ah, [opc] sub ah, '0' ; switch to operation cmp ah, 1 je add cmp ah, 2 je subtract cmp ah, 3 je multiply cmp ah, 4 je divide add: ; show + mov ecx, _plus call print mov eax, [num1Int] add eax, [num2Int] mov [resInt], eax jmp show_result subtract: ; show - mov ecx, _minus call print mov eax, [num1Int] mov ebx, [num2Int] cmp ebx, eax jg error sub eax, ebx mov [resInt], eax jmp show_result multiply: ; show + mov ecx, _times call print mov eax, [num1Int] imul eax, [num2Int] mov [resInt], eax jmp show_result divide: ; show / mov ecx, _slash call print mov eax, [num1Int] mov ebx, [num2Int] test ebx, ebx jz error xor edx, edx ; edx need to be 0 for div work div ebx ; eax = eax // ebx , edx = eax % ebx mov [resInt], eax jmp show_result error: mov ecx, msgErr call print jmp exit show_result: ; show second operand mov eax, [num2Int] call itoa mov ecx, buffer call print ; Show = mov ecx, equal call print ; Result mov eax, [resInt] call itoa mov ecx, buffer call print mov ecx, vspace call print jmp exit
16.685083
52
0.567881
0830c6f19f6c40954678553106e03a7a5953d65a
410
asm
Assembly
oeis/180/A180967.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/180/A180967.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/180/A180967.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A180967: Number of n-game win/loss series that contain at least one dead game. ; Submitted by Jamie Morken(w4) ; 0,0,4,4,20,24,88,116,372,520,1544,2248,6344,9520,25904,39796,105332,164904,427048,679064,1727640,2783440,6977744,11368904,28146120,46307664,113416528,188202256,456637712,763506784 mov $1,3 mov $2,$0 div $0,2 lpb $0 sub $0,1 mov $3,$2 bin $3,$0 add $1,$3 lpe mov $0,$1 sub $0,3 mul $0,4
24.117647
181
0.714634
163590487da77e2542ff1e232fe34a4659133df9
1,087
asm
Assembly
Working Disassembly/Levels/SOZ/Misc Object Data/Map - Sand Cork.asm
TeamASM-Blur/Sonic-3-Blue-Balls-Edition
7e8a2c5df02271615ff4cae529521e6b1560d6b1
[ "Apache-2.0" ]
5
2021-07-09T08:17:56.000Z
2022-02-27T19:57:47.000Z
Working Disassembly/Levels/SOZ/Misc Object Data/Map - Sand Cork.asm
TeamASM-Blur/Sonic-3-Blue-Balls-Edition
7e8a2c5df02271615ff4cae529521e6b1560d6b1
[ "Apache-2.0" ]
null
null
null
Working Disassembly/Levels/SOZ/Misc Object Data/Map - Sand Cork.asm
TeamASM-Blur/Sonic-3-Blue-Balls-Edition
7e8a2c5df02271615ff4cae529521e6b1560d6b1
[ "Apache-2.0" ]
null
null
null
dc.w word_41EB4-Map_SOZSandCork dc.w word_41EBC-Map_SOZSandCork dc.w word_41EE2-Map_SOZSandCork word_41EB4: dc.w 1 ; DATA XREF: ROM:00041EAEo dc.b $F8, 9, 0, 0, $FF, $F4 word_41EBC: dc.w 6 ; DATA XREF: ROM:00041EAEo dc.b $F8, 0, 0, 0, $FF, $F4 dc.b $F8, 0, 0, 2, $FF, $FC dc.b $F8, 0, 0, 4, 0, 4 dc.b 0, 0, 0, 1, $FF, $F4 dc.b 0, 0, 0, 3, $FF, $FC dc.b 0, 0, 0, 5, 0, 4 word_41EE2: dc.w $10 ; DATA XREF: ROM:00041EAEo dc.b $80, 9, 0, 6, $FF, $F4 dc.b $90, 9, 0, 6, $FF, $F4 dc.b $A0, 9, 0, 6, $FF, $F4 dc.b $B0, 9, 0, 6, $FF, $F4 dc.b $C0, 9, 0, 6, $FF, $F4 dc.b $D0, 9, 0, 6, $FF, $F4 dc.b $E0, 9, 0, 6, $FF, $F4 dc.b $F0, 9, 0, 6, $FF, $F4 dc.b 0, 9, 0, 6, $FF, $F4 dc.b $10, 9, 0, 6, $FF, $F4 dc.b $20, 9, 0, 6, $FF, $F4 dc.b $30, 9, 0, 6, $FF, $F4 dc.b $40, 9, 0, 6, $FF, $F4 dc.b $50, 9, 0, 6, $FF, $F4 dc.b $60, 9, 0, 6, $FF, $F4 dc.b $70, 9, 0, 6, $FF, $F4
36.233333
49
0.418583
ce69d1db4d088f59f507c1b86ac67db392f7285f
7,246
asm
Assembly
Transynther/x86/_processed/NONE/_xt_sm_/i3-7100_9_0x84_notsx.log_21829_2044.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_sm_/i3-7100_9_0x84_notsx.log_21829_2044.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_sm_/i3-7100_9_0x84_notsx.log_21829_2044.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 %r14 push %r9 push %rax push %rbx lea addresses_WC_ht+0x6596, %r9 nop nop xor $47258, %r11 movw $0x6162, (%r9) nop nop nop nop xor $16924, %rax lea addresses_UC_ht+0x5aee, %r14 nop nop nop nop nop cmp $3455, %rbx mov (%r14), %r10d nop nop nop nop add $22197, %rax lea addresses_A_ht+0xdf96, %r10 nop nop nop nop and $8146, %rbx movb (%r10), %r11b nop nop and %r11, %r11 lea addresses_WC_ht+0x9e0c, %rbx nop nop nop nop xor %r12, %r12 vmovups (%rbx), %ymm1 vextracti128 $1, %ymm1, %xmm1 vpextrq $1, %xmm1, %r11 nop nop nop nop nop add %r14, %r14 lea addresses_D_ht+0x110ce, %r14 nop nop nop nop nop lfence mov (%r14), %r10 nop inc %rbx pop %rbx pop %rax pop %r9 pop %r14 pop %r12 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r15 push %r8 push %rax push %rcx push %rdi push %rdx push %rsi // Store lea addresses_WT+0x9356, %r15 nop nop xor $29271, %r8 movw $0x5152, (%r15) nop nop nop nop cmp $49189, %r15 // Store lea addresses_normal+0x1a196, %rax nop nop inc %rcx movb $0x51, (%rax) nop nop dec %rcx // Store lea addresses_normal+0x11f96, %rax nop nop nop nop nop and %r12, %r12 mov $0x5152535455565758, %r11 movq %r11, %xmm3 vmovups %ymm3, (%rax) nop nop cmp $33325, %r8 // Load lea addresses_WC+0x4396, %rdx xor $3457, %r11 mov (%rdx), %eax nop nop xor $56189, %rdx // Store lea addresses_normal+0xc8c6, %r15 nop nop nop xor $61894, %rax movb $0x51, (%r15) nop nop sub $29966, %rdx // Load lea addresses_RW+0x19096, %rdx clflush (%rdx) nop xor %r15, %r15 mov (%rdx), %r11w nop nop nop nop xor $30765, %rdx // REPMOV lea addresses_PSE+0x1396, %rsi lea addresses_normal+0x17ba, %rdi nop nop nop nop dec %r12 mov $119, %rcx rep movsl nop nop nop add $17708, %rdx // Store lea addresses_normal+0xd796, %r8 cmp %rsi, %rsi mov $0x5152535455565758, %rdi movq %rdi, %xmm2 movups %xmm2, (%r8) nop nop nop add $38069, %rcx // Faulty Load lea addresses_normal+0xd796, %rcx nop nop nop nop nop add $3050, %rsi vmovups (%rcx), %ymm4 vextracti128 $0, %ymm4, %xmm4 vpextrq $0, %xmm4, %r11 lea oracles, %rsi and $0xff, %r11 shlq $12, %r11 mov (%rsi,%r11,1), %r11 pop %rsi pop %rdx pop %rdi pop %rcx pop %rax pop %r8 pop %r15 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_normal', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT', 'same': False, 'size': 2, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_normal', 'same': False, 'size': 1, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_normal', 'same': False, 'size': 32, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_WC', 'same': False, 'size': 4, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_normal', 'same': False, 'size': 1, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_RW', 'same': False, 'size': 2, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_PSE', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_normal', 'congruent': 2, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_normal', 'same': True, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_normal', 'same': True, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 2, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 4, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'same': True, 'size': 1, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 32, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_D_ht', 'same': False, 'size': 8, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'58': 21829} 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 */
31.232759
2,999
0.65374
c2f028c9e3849b0ce42de9a234ed99fa99503122
741
asm
Assembly
oeis/291/A291337.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/291/A291337.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/291/A291337.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A291337: p-INVERT of (1,1,1,1,1,...), where p(S) = 1 - 2 S - 2 S^3. ; Submitted by Christian Krause ; 1,3,10,34,115,387,1300,4366,14665,49263,165490,555934,1867555,6273687,21075220,70798066,237832225,798950763,2683918570,9016098634,30287816995,101745987387,341795711140,1148195728966,3857138603785,12957301471863,43527515777650,146222161604134,491204704936435,1650105972341487,5543207735173060,18621320394157066,62554677686281345,210140184348172563,705924779907678730,2371415997532592434,7966307450050073875,26761249167060615987,89899173672615524980,301998661443903682366,1014505337346512816905 add $0,1 mov $3,1 lpb $0 sub $0,1 add $1,$2 sub $4,$2 add $2,$3 add $2,$3 mov $3,$2 add $4,$1 add $3,$4 lpe mov $0,$3 div $0,2
39
494
0.781377
4a1ceb471653b30f60ebe01274500ed04771f588
344
asm
Assembly
oeis/183/A183556.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/183/A183556.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/183/A183556.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A183556: Positions of the records of the negative integers in A179319; a(n) is the first position in A179319 equal to -n. ; Submitted by Jon Maiga ; 1,3,37,71,681,1291,12237,23183,219601,416019,3940597,7465175 mov $3,1 lpb $0 sub $0,$3 trn $4,$0 mov $1,$4 mul $1,16 add $2,1 add $2,$1 add $4,$2 lpe mov $0,$2 mul $0,2 add $0,1
19.111111
123
0.656977
0531a33def65b6a8dd74ba704f56af67fabd3972
1,430
asm
Assembly
Driver/Printer/PrintCom/Job/Custom/customNoPCLReset.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Driver/Printer/PrintCom/Job/Custom/customNoPCLReset.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Driver/Printer/PrintCom/Job/Custom/customNoPCLReset.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) Berkeley Softworks 1995 -- All Rights Reserved PROJECT: PC GEOS MODULE: Printer Drivers FILE: customNoPCLReset.asm AUTHOR: Dave Durran ROUTINES: Name Description ---- ----------- REVISION HISTORY: Name Date Description ---- ---- ----------- Dave 6/95 Initial revision DESCRIPTION: Get around JEDI Serial Port Power timing problem by not sending a reset at end of job. $Id: customNoPCLReset.asm,v 1.1 97/04/18 11:50:58 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrintEnterLJ4PCL/PrintExitLJ4PCL %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Do pre-job initialization CALLED BY: INTERNAL jumped to from PrintStartJob/PrintEndJob PASS: es - segment of locked PState RETURN: carry - set if some communication problem DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- Dave 4/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrintExitNoPCLReset proc near jmp EndExit PrintExitNoPCLReset endp
22.698413
79
0.487413
8788990070468e294f59293bd221c14e81f20628
568
asm
Assembly
oeis/092/A092763.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/092/A092763.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/092/A092763.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A092763: a(n) = floor(3^n / n). ; 3,4,9,20,48,121,312,820,2187,5904,16104,44286,122640,341640,956593,2690420,7596480,21523360,61171656,174339220,498112057,1426411800,4093181688,11767897353,33891544377,97764070320,282429536481,817028301962,2366564736720,6863037736488,19924948267224,57906880901620,168456380804712,490505344107840,1429472717114277,4169295424916642,12169835294351280,35548729412447160,103911670590230160,303941636476423220,889585277491970400,2605214026940770457,7633882962663652968,22381156867809346201 add $0,1 mov $1,3 pow $1,$0 div $1,$0 mov $0,$1
63.111111
484
0.846831
4715a89417c9a9dadba89e5a5e4dd1d7d760d673
5,087
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_sm_/i7-7700_9_0x48.log_21829_1434.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_st_sm_/i7-7700_9_0x48.log_21829_1434.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_st_sm_/i7-7700_9_0x48.log_21829_1434.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r13 push %r8 push %r9 push %rax push %rbx push %rcx push %rdi push %rsi lea addresses_WC_ht+0x2b62, %rax nop nop cmp %rdi, %rdi movb (%rax), %r9b dec %r13 lea addresses_WT_ht+0x1a9bc, %rdi sub %r8, %r8 mov (%rdi), %bx sub $14972, %r8 lea addresses_D_ht+0x11e22, %rsi lea addresses_normal_ht+0x1822, %rdi nop nop nop nop nop sub $42679, %r9 mov $23, %rcx rep movsq nop nop nop nop nop add %r9, %r9 lea addresses_WC_ht+0xb842, %rsi nop nop nop nop nop and $37476, %r8 mov $0x6162636465666768, %r13 movq %r13, %xmm1 movups %xmm1, (%rsi) nop sub $33966, %r9 pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r9 pop %r8 pop %r13 ret .global s_faulty_load s_faulty_load: push %r10 push %r13 push %r14 push %r15 push %r9 push %rbp push %rdx // Store lea addresses_WC+0x19622, %r14 and $8153, %r9 movl $0x51525354, (%r14) and %r13, %r13 // Faulty Load lea addresses_WC+0x19622, %rbp nop nop add $61136, %r10 movb (%rbp), %r13b lea oracles, %rbp and $0xff, %r13 shlq $12, %r13 mov (%rbp,%r13,1), %r13 pop %rdx pop %rbp pop %r9 pop %r15 pop %r14 pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': True, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': True, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': True, 'congruent': 0, 'size': 1, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 6, 'size': 1, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 1, 'size': 2, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 4, 'size': 16, 'same': False, 'NT': False}} {'54': 21829} 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 */
46.669725
2,999
0.658541